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

package v1

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

// MachineConfigNodeStatusConfigImageApplyConfiguration represents a declarative configuration of the MachineConfigNodeStatusConfigImage type for use
// with apply.
//
// MachineConfigNodeStatusConfigImage holds the observed state of the image
// on the node, including both the image targeted for an update and the image
// currently applied. This allows for monitoring the progress of the layering
// rollout. If Image Mode is enabled, desiredImage must be defined.
type MachineConfigNodeStatusConfigImageApplyConfiguration struct {
	// currentImage is an optional field that represents the current image that is applied to the node.
	// When omitted, this means that no image updates have been applied to the node and it will be up to date with the specific current rendered config version.
	// When specified, this means that the node is currently using this image.
	// currentImage 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.
	// currentImage must not be an empty string and must not exceed 447 characters in length.
	CurrentImage *machineconfigurationv1.ImageDigestFormat `json:"currentImage,omitempty"`
	// desiredImage is an optional field that represents the currently observed state of image that the node should be updated to use.
	// When not specified, this means that Image Mode has been disabled and the node will up to date with the specific current rendered config version.
	// When specified, this means that Image Mode has been enabled and the node is actively progressing to update the node to this image.
	// If currentImage and desiredImage match, the node has been successfully updated to use the desired image.
	// desiredImage 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"`
}

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

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

// 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 *MachineConfigNodeStatusConfigImageApplyConfiguration) WithDesiredImage(value machineconfigurationv1.ImageDigestFormat) *MachineConfigNodeStatusConfigImageApplyConfiguration {
	b.DesiredImage = &value
	return b
}
