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

package v1

// VSphereFailureDomainHostGroupApplyConfiguration represents a declarative configuration of the VSphereFailureDomainHostGroup type for use
// with apply.
//
// VSphereFailureDomainHostGroup holds the 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.
type VSphereFailureDomainHostGroupApplyConfiguration struct {
	// vmGroup is the name of the vm-host group of type virtual machine within vCenter for this failure domain.
	// vmGroup is limited to 80 characters.
	// This field is required when the VSphereFailureDomain ZoneType is HostGroup
	VMGroup *string `json:"vmGroup,omitempty"`
	// hostGroup is the name of the vm-host group of type host within vCenter for this failure domain.
	// hostGroup is limited to 80 characters.
	// This field is required when the VSphereFailureDomain ZoneType is HostGroup
	HostGroup *string `json:"hostGroup,omitempty"`
	// vmHostRule is the name of the affinity vm-host rule within vCenter for this failure domain.
	// vmHostRule is limited to 80 characters.
	// This field is required when the VSphereFailureDomain ZoneType is HostGroup
	VMHostRule *string `json:"vmHostRule,omitempty"`
}

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

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

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

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