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

package v1

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

// MachineConfigNodeSpecConfigImageApplyConfiguration represents a declarative configuration of the MachineConfigNodeSpecConfigImage type for use
// with apply.
//
// MachineConfigNodeSpecConfigImage holds the desired image for the node.
// This structure is populated from the `machineconfiguration.openshift.io/desiredImage`
// annotation on the target node, which is set by the Machine Config Pool controller
// to signal the desired image pullspec for the node to update to.
type MachineConfigNodeSpecConfigImageApplyConfiguration struct {
	// desiredImage is a required field that configures the image that the node should be updated to use.
	// It must be a fully qualified OCI image pull spec of the format host[:port][/namespace]/name@sha256:, where the digest must be exactly 64 characters in length and consist only of lowercase hexadecimal characters, a-f and 0-9.
	// desiredImage must not be an empty string and must not exceed 447 characters in length.
	DesiredImage *machineconfigurationv1.ImageDigestFormat `json:"desiredImage,omitempty"`
}

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

// WithDesiredImage sets the DesiredImage 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 DesiredImage field is set to the value of the last call.
func (b *MachineConfigNodeSpecConfigImageApplyConfiguration) WithDesiredImage(value machineconfigurationv1.ImageDigestFormat) *MachineConfigNodeSpecConfigImageApplyConfiguration {
	b.DesiredImage = &value
	return b
}
