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

package v1

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

// BootImageSkewEnforcementConfigApplyConfiguration represents a declarative configuration of the BootImageSkewEnforcementConfig type for use
// with apply.
//
// BootImageSkewEnforcementConfig is used to configure how boot image version skew is enforced on the cluster.
type BootImageSkewEnforcementConfigApplyConfiguration struct {
	// mode determines the underlying behavior of skew enforcement mechanism.
	// Valid values are Manual and None.
	// 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 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.BootImageSkewEnforcementConfigMode `json:"mode,omitempty"`
	// manual describes the current boot image of the cluster.
	// This should be set to the oldest boot image used amongst all machine resources in the cluster.
	// This must include either the RHCOS version of the boot image or the OCP release version which shipped with that
	// RHCOS boot image.
	// Required when mode is set to "Manual" and forbidden otherwise.
	Manual *ClusterBootImageManualApplyConfiguration `json:"manual,omitempty"`
}

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

// 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 *BootImageSkewEnforcementConfigApplyConfiguration) WithMode(value operatorv1.BootImageSkewEnforcementConfigMode) *BootImageSkewEnforcementConfigApplyConfiguration {
	b.Mode = &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 *BootImageSkewEnforcementConfigApplyConfiguration) WithManual(value *ClusterBootImageManualApplyConfiguration) *BootImageSkewEnforcementConfigApplyConfiguration {
	b.Manual = value
	return b
}
