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

package v1beta1

// MachineHealthCheckStatusApplyConfiguration represents a declarative configuration of the MachineHealthCheckStatus type for use
// with apply.
//
// MachineHealthCheckStatus defines the observed state of MachineHealthCheck
type MachineHealthCheckStatusApplyConfiguration struct {
	// total number of machines counted by this machine health check
	ExpectedMachines *int `json:"expectedMachines,omitempty"`
	// total number of machines counted by this machine health check
	CurrentHealthy *int `json:"currentHealthy,omitempty"`
	// remediationsAllowed is the number of further remediations allowed by this machine health check before
	// maxUnhealthy short circuiting will be applied
	RemediationsAllowed *int32 `json:"remediationsAllowed,omitempty"`
	// conditions defines the current state of the MachineHealthCheck
	Conditions []ConditionApplyConfiguration `json:"conditions,omitempty"`
}

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

// WithExpectedMachines sets the ExpectedMachines 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 ExpectedMachines field is set to the value of the last call.
func (b *MachineHealthCheckStatusApplyConfiguration) WithExpectedMachines(value int) *MachineHealthCheckStatusApplyConfiguration {
	b.ExpectedMachines = &value
	return b
}

// WithCurrentHealthy sets the CurrentHealthy 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 CurrentHealthy field is set to the value of the last call.
func (b *MachineHealthCheckStatusApplyConfiguration) WithCurrentHealthy(value int) *MachineHealthCheckStatusApplyConfiguration {
	b.CurrentHealthy = &value
	return b
}

// WithRemediationsAllowed sets the RemediationsAllowed 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 RemediationsAllowed field is set to the value of the last call.
func (b *MachineHealthCheckStatusApplyConfiguration) WithRemediationsAllowed(value int32) *MachineHealthCheckStatusApplyConfiguration {
	b.RemediationsAllowed = &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 *MachineHealthCheckStatusApplyConfiguration) WithConditions(values ...*ConditionApplyConfiguration) *MachineHealthCheckStatusApplyConfiguration {
	for i := range values {
		if values[i] == nil {
			panic("nil value passed to WithConditions")
		}
		b.Conditions = append(b.Conditions, *values[i])
	}
	return b
}
