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

package v1

// NutanixFailureDomainApplyConfiguration represents a declarative configuration of the NutanixFailureDomain type for use
// with apply.
type NutanixFailureDomainApplyConfiguration struct {
	Name    *string                                       `json:"name,omitempty"`
	Cluster *NutanixResourceIdentifierApplyConfiguration  `json:"cluster,omitempty"`
	Subnets []NutanixResourceIdentifierApplyConfiguration `json:"subnets,omitempty"`
}

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

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

// WithCluster sets the Cluster 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 Cluster field is set to the value of the last call.
func (b *NutanixFailureDomainApplyConfiguration) WithCluster(value *NutanixResourceIdentifierApplyConfiguration) *NutanixFailureDomainApplyConfiguration {
	b.Cluster = value
	return b
}

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