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

package v1

// NutanixPlatformSpecApplyConfiguration represents an declarative configuration of the NutanixPlatformSpec type for use
// with apply.
type NutanixPlatformSpecApplyConfiguration struct {
	PrismCentral   *NutanixPrismEndpointApplyConfiguration         `json:"prismCentral,omitempty"`
	PrismElements  []NutanixPrismElementEndpointApplyConfiguration `json:"prismElements,omitempty"`
	FailureDomains []NutanixFailureDomainApplyConfiguration        `json:"failureDomains,omitempty"`
}

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

// WithPrismCentral sets the PrismCentral 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 PrismCentral field is set to the value of the last call.
func (b *NutanixPlatformSpecApplyConfiguration) WithPrismCentral(value *NutanixPrismEndpointApplyConfiguration) *NutanixPlatformSpecApplyConfiguration {
	b.PrismCentral = value
	return b
}

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