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

package v1

// VSpherePlatformSpecApplyConfiguration represents an declarative configuration of the VSpherePlatformSpec type for use
// with apply.
type VSpherePlatformSpecApplyConfiguration struct {
	VCenters       []VSpherePlatformVCenterSpecApplyConfiguration       `json:"vcenters,omitempty"`
	FailureDomains []VSpherePlatformFailureDomainSpecApplyConfiguration `json:"failureDomains,omitempty"`
	NodeNetworking *VSpherePlatformNodeNetworkingApplyConfiguration     `json:"nodeNetworking,omitempty"`
}

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

// WithVCenters adds the given value to the VCenters 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 VCenters field.
func (b *VSpherePlatformSpecApplyConfiguration) WithVCenters(values ...*VSpherePlatformVCenterSpecApplyConfiguration) *VSpherePlatformSpecApplyConfiguration {
	for i := range values {
		if values[i] == nil {
			panic("nil value passed to WithVCenters")
		}
		b.VCenters = append(b.VCenters, *values[i])
	}
	return b
}

// WithFailureDomains adds the given value to the FailureDomains 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 FailureDomains field.
func (b *VSpherePlatformSpecApplyConfiguration) WithFailureDomains(values ...*VSpherePlatformFailureDomainSpecApplyConfiguration) *VSpherePlatformSpecApplyConfiguration {
	for i := range values {
		if values[i] == nil {
			panic("nil value passed to WithFailureDomains")
		}
		b.FailureDomains = append(b.FailureDomains, *values[i])
	}
	return b
}

// WithNodeNetworking sets the NodeNetworking 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 NodeNetworking field is set to the value of the last call.
func (b *VSpherePlatformSpecApplyConfiguration) WithNodeNetworking(value *VSpherePlatformNodeNetworkingApplyConfiguration) *VSpherePlatformSpecApplyConfiguration {
	b.NodeNetworking = value
	return b
}
