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

package v1

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

// MachineOSBuildSpecApplyConfiguration represents a declarative configuration of the MachineOSBuildSpec type for use
// with apply.
//
// MachineOSBuildSpec describes information about a build process primarily populated from a MachineOSConfig object.
type MachineOSBuildSpecApplyConfiguration struct {
	// machineConfig points to the rendered MachineConfig resource to be included in this image build.
	MachineConfig *MachineConfigReferenceApplyConfiguration `json:"machineConfig,omitempty"`
	// machineOSConfig references the MachineOSConfig resource that this image build extends.
	MachineOSConfig *MachineOSConfigReferenceApplyConfiguration `json:"machineOSConfig,omitempty"`
	// renderedImagePushSpec is set by the Machine Config Operator from the MachineOSConfig object this build is attached to.
	// This field describes the location of the final image, which will be pushed by the build once complete.
	// The format of the image push spec is: host[:port][/namespace]/name:<tag> or svc_name.namespace.svc[:port]/repository/name:<tag>.
	// The length of the push spec must be between 1 to 447 characters.
	RenderedImagePushSpec *machineconfigurationv1.ImageTagFormat `json:"renderedImagePushSpec,omitempty"`
}

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

// WithMachineConfig sets the MachineConfig 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 MachineConfig field is set to the value of the last call.
func (b *MachineOSBuildSpecApplyConfiguration) WithMachineConfig(value *MachineConfigReferenceApplyConfiguration) *MachineOSBuildSpecApplyConfiguration {
	b.MachineConfig = value
	return b
}

// WithMachineOSConfig sets the MachineOSConfig 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 MachineOSConfig field is set to the value of the last call.
func (b *MachineOSBuildSpecApplyConfiguration) WithMachineOSConfig(value *MachineOSConfigReferenceApplyConfiguration) *MachineOSBuildSpecApplyConfiguration {
	b.MachineOSConfig = value
	return b
}

// WithRenderedImagePushSpec sets the RenderedImagePushSpec 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 RenderedImagePushSpec field is set to the value of the last call.
func (b *MachineOSBuildSpecApplyConfiguration) WithRenderedImagePushSpec(value machineconfigurationv1.ImageTagFormat) *MachineOSBuildSpecApplyConfiguration {
	b.RenderedImagePushSpec = &value
	return b
}
