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

package v1

import (
	v1 "github.com/openshift/api/machine/v1"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// ControlPlaneMachineSetSpecApplyConfiguration represents an declarative configuration of the ControlPlaneMachineSetSpec type for use
// with apply.
type ControlPlaneMachineSetSpecApplyConfiguration struct {
	State    *v1.ControlPlaneMachineSetState                   `json:"state,omitempty"`
	Replicas *int32                                            `json:"replicas,omitempty"`
	Strategy *ControlPlaneMachineSetStrategyApplyConfiguration `json:"strategy,omitempty"`
	Selector *metav1.LabelSelector                             `json:"selector,omitempty"`
	Template *ControlPlaneMachineSetTemplateApplyConfiguration `json:"template,omitempty"`
}

// ControlPlaneMachineSetSpecApplyConfiguration constructs an declarative configuration of the ControlPlaneMachineSetSpec type for use with
// apply.
func ControlPlaneMachineSetSpec() *ControlPlaneMachineSetSpecApplyConfiguration {
	return &ControlPlaneMachineSetSpecApplyConfiguration{}
}

// WithState sets the State 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 State field is set to the value of the last call.
func (b *ControlPlaneMachineSetSpecApplyConfiguration) WithState(value v1.ControlPlaneMachineSetState) *ControlPlaneMachineSetSpecApplyConfiguration {
	b.State = &value
	return b
}

// WithReplicas sets the Replicas 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 Replicas field is set to the value of the last call.
func (b *ControlPlaneMachineSetSpecApplyConfiguration) WithReplicas(value int32) *ControlPlaneMachineSetSpecApplyConfiguration {
	b.Replicas = &value
	return b
}

// WithStrategy sets the Strategy 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 Strategy field is set to the value of the last call.
func (b *ControlPlaneMachineSetSpecApplyConfiguration) WithStrategy(value *ControlPlaneMachineSetStrategyApplyConfiguration) *ControlPlaneMachineSetSpecApplyConfiguration {
	b.Strategy = value
	return b
}

// WithSelector sets the Selector 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 Selector field is set to the value of the last call.
func (b *ControlPlaneMachineSetSpecApplyConfiguration) WithSelector(value metav1.LabelSelector) *ControlPlaneMachineSetSpecApplyConfiguration {
	b.Selector = &value
	return b
}

// WithTemplate sets the Template 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 Template field is set to the value of the last call.
func (b *ControlPlaneMachineSetSpecApplyConfiguration) WithTemplate(value *ControlPlaneMachineSetTemplateApplyConfiguration) *ControlPlaneMachineSetSpecApplyConfiguration {
	b.Template = value
	return b
}
