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

package v1

// VSpherePlatformFailureDomainSpecApplyConfiguration represents a declarative configuration of the VSpherePlatformFailureDomainSpec type for use
// with apply.
//
// VSpherePlatformFailureDomainSpec holds the region and zone failure domain and the vCenter topology of that failure domain.
type VSpherePlatformFailureDomainSpecApplyConfiguration struct {
	// name defines the arbitrary but unique name
	// of a failure domain.
	Name *string `json:"name,omitempty"`
	// region defines the name of a region tag that will
	// be attached to a vCenter datacenter. The tag
	// category in vCenter must be named openshift-region.
	Region *string `json:"region,omitempty"`
	// zone defines the name of a zone tag that will
	// be attached to a vCenter cluster. The tag
	// category in vCenter must be named openshift-zone.
	Zone *string `json:"zone,omitempty"`
	// regionAffinity holds the type of region, Datacenter or ComputeCluster.
	// When set to Datacenter, this means the region is a vCenter Datacenter as defined in topology.
	// When set to ComputeCluster, this means the region is a vCenter Cluster as defined in topology.
	RegionAffinity *VSphereFailureDomainRegionAffinityApplyConfiguration `json:"regionAffinity,omitempty"`
	// zoneAffinity holds the type of the zone and the hostGroup which
	// vmGroup and the hostGroup names in vCenter corresponds to
	// a vm-host group of type Virtual Machine and Host respectively. Is also
	// contains the vmHostRule which is an affinity vm-host rule in vCenter.
	ZoneAffinity *VSphereFailureDomainZoneAffinityApplyConfiguration `json:"zoneAffinity,omitempty"`
	// server is the fully-qualified domain name or the IP address of the vCenter server.
	// ---
	Server *string `json:"server,omitempty"`
	// topology describes a given failure domain using vSphere constructs
	Topology *VSpherePlatformTopologyApplyConfiguration `json:"topology,omitempty"`
}

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

// 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 *VSpherePlatformFailureDomainSpecApplyConfiguration) WithName(value string) *VSpherePlatformFailureDomainSpecApplyConfiguration {
	b.Name = &value
	return b
}

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

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

// WithRegionAffinity sets the RegionAffinity 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 RegionAffinity field is set to the value of the last call.
func (b *VSpherePlatformFailureDomainSpecApplyConfiguration) WithRegionAffinity(value *VSphereFailureDomainRegionAffinityApplyConfiguration) *VSpherePlatformFailureDomainSpecApplyConfiguration {
	b.RegionAffinity = value
	return b
}

// WithZoneAffinity sets the ZoneAffinity 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 ZoneAffinity field is set to the value of the last call.
func (b *VSpherePlatformFailureDomainSpecApplyConfiguration) WithZoneAffinity(value *VSphereFailureDomainZoneAffinityApplyConfiguration) *VSpherePlatformFailureDomainSpecApplyConfiguration {
	b.ZoneAffinity = value
	return b
}

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

// WithTopology sets the Topology 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 Topology field is set to the value of the last call.
func (b *VSpherePlatformFailureDomainSpecApplyConfiguration) WithTopology(value *VSpherePlatformTopologyApplyConfiguration) *VSpherePlatformFailureDomainSpecApplyConfiguration {
	b.Topology = value
	return b
}
