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

package v1

// ClusterVersionStatusApplyConfiguration represents a declarative configuration of the ClusterVersionStatus type for use
// with apply.
type ClusterVersionStatusApplyConfiguration struct {
	Desired            *ReleaseApplyConfiguration                          `json:"desired,omitempty"`
	History            []UpdateHistoryApplyConfiguration                   `json:"history,omitempty"`
	ObservedGeneration *int64                                              `json:"observedGeneration,omitempty"`
	VersionHash        *string                                             `json:"versionHash,omitempty"`
	Capabilities       *ClusterVersionCapabilitiesStatusApplyConfiguration `json:"capabilities,omitempty"`
	Conditions         []ClusterOperatorStatusConditionApplyConfiguration  `json:"conditions,omitempty"`
	AvailableUpdates   []ReleaseApplyConfiguration                         `json:"availableUpdates,omitempty"`
	ConditionalUpdates []ConditionalUpdateApplyConfiguration               `json:"conditionalUpdates,omitempty"`
}

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

// WithDesired sets the Desired 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 Desired field is set to the value of the last call.
func (b *ClusterVersionStatusApplyConfiguration) WithDesired(value *ReleaseApplyConfiguration) *ClusterVersionStatusApplyConfiguration {
	b.Desired = value
	return b
}

// WithHistory adds the given value to the History field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the History field.
func (b *ClusterVersionStatusApplyConfiguration) WithHistory(values ...*UpdateHistoryApplyConfiguration) *ClusterVersionStatusApplyConfiguration {
	for i := range values {
		if values[i] == nil {
			panic("nil value passed to WithHistory")
		}
		b.History = append(b.History, *values[i])
	}
	return b
}

// WithObservedGeneration sets the ObservedGeneration 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 ObservedGeneration field is set to the value of the last call.
func (b *ClusterVersionStatusApplyConfiguration) WithObservedGeneration(value int64) *ClusterVersionStatusApplyConfiguration {
	b.ObservedGeneration = &value
	return b
}

// WithVersionHash sets the VersionHash 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 VersionHash field is set to the value of the last call.
func (b *ClusterVersionStatusApplyConfiguration) WithVersionHash(value string) *ClusterVersionStatusApplyConfiguration {
	b.VersionHash = &value
	return b
}

// WithCapabilities sets the Capabilities 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 Capabilities field is set to the value of the last call.
func (b *ClusterVersionStatusApplyConfiguration) WithCapabilities(value *ClusterVersionCapabilitiesStatusApplyConfiguration) *ClusterVersionStatusApplyConfiguration {
	b.Capabilities = value
	return b
}

// WithConditions adds the given value to the Conditions field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Conditions field.
func (b *ClusterVersionStatusApplyConfiguration) WithConditions(values ...*ClusterOperatorStatusConditionApplyConfiguration) *ClusterVersionStatusApplyConfiguration {
	for i := range values {
		if values[i] == nil {
			panic("nil value passed to WithConditions")
		}
		b.Conditions = append(b.Conditions, *values[i])
	}
	return b
}

// WithAvailableUpdates adds the given value to the AvailableUpdates field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the AvailableUpdates field.
func (b *ClusterVersionStatusApplyConfiguration) WithAvailableUpdates(values ...*ReleaseApplyConfiguration) *ClusterVersionStatusApplyConfiguration {
	for i := range values {
		if values[i] == nil {
			panic("nil value passed to WithAvailableUpdates")
		}
		b.AvailableUpdates = append(b.AvailableUpdates, *values[i])
	}
	return b
}

// WithConditionalUpdates adds the given value to the ConditionalUpdates field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the ConditionalUpdates field.
func (b *ClusterVersionStatusApplyConfiguration) WithConditionalUpdates(values ...*ConditionalUpdateApplyConfiguration) *ClusterVersionStatusApplyConfiguration {
	for i := range values {
		if values[i] == nil {
			panic("nil value passed to WithConditionalUpdates")
		}
		b.ConditionalUpdates = append(b.ConditionalUpdates, *values[i])
	}
	return b
}
