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

package v1

import (
	operatorv1 "github.com/openshift/api/operator/v1"
)

// BootImageSkewEnforcementStatusApplyConfiguration represents a declarative configuration of the BootImageSkewEnforcementStatus type for use
// with apply.
//
// BootImageSkewEnforcementStatus is the type for the status object. It represents the cluster defaults when
// the boot image skew enforcement configuration is undefined and reflects the actual configuration when it is defined.
type BootImageSkewEnforcementStatusApplyConfiguration struct {
	// mode determines the underlying behavior of skew enforcement mechanism.
	// Valid values are Automatic, Manual and None.
	// Automatic means that the MCO will perform boot image updates and store the
	// OCP & RHCOS version associated with the last boot image update in the automatic field.
	// Manual means that the cluster admin is expected to perform manual boot image updates and store the OCP
	// & RHCOS version associated with the last boot image update in the manual field.
	// In Automatic and Manual mode, the MCO will prevent upgrades when the boot image skew exceeds the
	// skew limit described by the release image.
	// None means that the MCO will no longer monitor the boot image skew. This may affect
	// the cluster's ability to scale.
	// This field is required.
	Mode *operatorv1.BootImageSkewEnforcementModeStatus `json:"mode,omitempty"`
	// automatic describes the current boot image of the cluster.
	// This will be populated by the MCO when performing boot image updates. This value will be compared against
	// the cluster's skew limit to determine skew compliance.
	// Required when mode is set to "Automatic" and forbidden otherwise.
	Automatic *ClusterBootImageAutomaticApplyConfiguration `json:"automatic,omitempty"`
	// manual describes the current boot image of the cluster.
	// This will be populated by the MCO using the values provided in the spec.bootImageSkewEnforcement.manual field.
	// This value will be compared against the cluster's skew limit to determine skew compliance.
	// Required when mode is set to "Manual" and forbidden otherwise.
	Manual *ClusterBootImageManualApplyConfiguration `json:"manual,omitempty"`
}

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

// WithMode sets the Mode 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 Mode field is set to the value of the last call.
func (b *BootImageSkewEnforcementStatusApplyConfiguration) WithMode(value operatorv1.BootImageSkewEnforcementModeStatus) *BootImageSkewEnforcementStatusApplyConfiguration {
	b.Mode = &value
	return b
}

// WithAutomatic sets the Automatic 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 Automatic field is set to the value of the last call.
func (b *BootImageSkewEnforcementStatusApplyConfiguration) WithAutomatic(value *ClusterBootImageAutomaticApplyConfiguration) *BootImageSkewEnforcementStatusApplyConfiguration {
	b.Automatic = value
	return b
}

// WithManual sets the Manual 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 Manual field is set to the value of the last call.
func (b *BootImageSkewEnforcementStatusApplyConfiguration) WithManual(value *ClusterBootImageManualApplyConfiguration) *BootImageSkewEnforcementStatusApplyConfiguration {
	b.Manual = value
	return b
}
