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

package v1

// VSpherePlatformVCenterSpecApplyConfiguration represents a declarative configuration of the VSpherePlatformVCenterSpec type for use
// with apply.
//
// VSpherePlatformVCenterSpec stores the vCenter connection fields.
// This is used by the vSphere CCM.
type VSpherePlatformVCenterSpecApplyConfiguration struct {
	// server is the fully-qualified domain name or the IP address of the vCenter server.
	// ---
	Server *string `json:"server,omitempty"`
	// port is the TCP port that will be used to communicate to
	// the vCenter endpoint.
	// When omitted, this means the user has no opinion and
	// it is up to the platform to choose a sensible default,
	// which is subject to change over time.
	Port *int32 `json:"port,omitempty"`
	// The vCenter Datacenters in which the RHCOS
	// vm guests are located. This field will
	// be used by the Cloud Controller Manager.
	// Each datacenter listed here should be used within
	// a topology.
	Datacenters []string `json:"datacenters,omitempty"`
}

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

// 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 *VSpherePlatformVCenterSpecApplyConfiguration) WithServer(value string) *VSpherePlatformVCenterSpecApplyConfiguration {
	b.Server = &value
	return b
}

// WithPort sets the Port 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 Port field is set to the value of the last call.
func (b *VSpherePlatformVCenterSpecApplyConfiguration) WithPort(value int32) *VSpherePlatformVCenterSpecApplyConfiguration {
	b.Port = &value
	return b
}

// WithDatacenters adds the given value to the Datacenters 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 Datacenters field.
func (b *VSpherePlatformVCenterSpecApplyConfiguration) WithDatacenters(values ...string) *VSpherePlatformVCenterSpecApplyConfiguration {
	for i := range values {
		b.Datacenters = append(b.Datacenters, values[i])
	}
	return b
}
