// Code generated by applyconfiguration-gen. DO NOT EDIT.

package v1

import (
	machineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1"
)

// MachineOSContainerfileApplyConfiguration represents a declarative configuration of the MachineOSContainerfile type for use
// with apply.
//
// MachineOSContainerfile contains all custom content the user wants built into the image
type MachineOSContainerfileApplyConfiguration struct {
	// containerfileArch describes the architecture this containerfile is to be built for.
	// This arch is optional. If the user does not specify an architecture, it is assumed
	// that the content can be applied to all architectures, or in a single arch cluster: the only architecture.
	ContainerfileArch *machineconfigurationv1.ContainerfileArch `json:"containerfileArch,omitempty"`
	// content is an embedded Containerfile/Dockerfile that defines the contents to be built into your image.
	// See https://github.com/containers/common/blob/main/docs/Containerfile.5.md for the spec reference.
	// for example, this would add the tree package to your hosts:
	// FROM configs AS final
	// RUN rpm-ostree install tree && \
	// ostree container commit
	// This is a required field and can have a maximum length of **4096** characters.
	Content *string `json:"content,omitempty"`
}

// MachineOSContainerfileApplyConfiguration constructs a declarative configuration of the MachineOSContainerfile type for use with
// apply.
func MachineOSContainerfile() *MachineOSContainerfileApplyConfiguration {
	return &MachineOSContainerfileApplyConfiguration{}
}

// WithContainerfileArch sets the ContainerfileArch field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ContainerfileArch field is set to the value of the last call.
func (b *MachineOSContainerfileApplyConfiguration) WithContainerfileArch(value machineconfigurationv1.ContainerfileArch) *MachineOSContainerfileApplyConfiguration {
	b.ContainerfileArch = &value
	return b
}

// WithContent sets the Content field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Content field is set to the value of the last call.
func (b *MachineOSContainerfileApplyConfiguration) WithContent(value string) *MachineOSContainerfileApplyConfiguration {
	b.Content = &value
	return b
}
