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

package v1

// VSpherePlatformVCenterSpecApplyConfiguration represents an declarative configuration of the VSpherePlatformVCenterSpec type for use
// with apply.
type VSpherePlatformVCenterSpecApplyConfiguration struct {
	Server      *string  `json:"server,omitempty"`
	Port        *int32   `json:"port,omitempty"`
	Datacenters []string `json:"datacenters,omitempty"`
}

// VSpherePlatformVCenterSpecApplyConfiguration constructs an 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
}
