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

package v1

import (
	configv1 "github.com/openshift/api/config/v1"
)

// PlatformSpecApplyConfiguration represents a declarative configuration of the PlatformSpec type for use
// with apply.
//
// PlatformSpec holds the desired state specific to the underlying infrastructure provider
// of the current cluster. Since these are used at spec-level for the underlying cluster, it
// is supposed that only one of the spec structs is set.
type PlatformSpecApplyConfiguration struct {
	// type is the underlying infrastructure provider for the cluster. This
	// value controls whether infrastructure automation such as service load
	// balancers, dynamic volume provisioning, machine creation and deletion, and
	// other integrations are enabled. If None, no infrastructure automation is
	// enabled. Allowed values are "AWS", "Azure", "BareMetal", "GCP", "Libvirt",
	// "OpenStack", "VSphere", "oVirt", "IBMCloud", "KubeVirt", "EquinixMetal",
	// "PowerVS", "AlibabaCloud", "Nutanix", "External", and "None". Individual
	// components may not support all platforms, and must handle unrecognized
	// platforms as None if they do not support that platform.
	Type *configv1.PlatformType `json:"type,omitempty"`
	// aws contains settings specific to the Amazon Web Services infrastructure provider.
	AWS *AWSPlatformSpecApplyConfiguration `json:"aws,omitempty"`
	// azure contains settings specific to the Azure infrastructure provider.
	Azure *configv1.AzurePlatformSpec `json:"azure,omitempty"`
	// gcp contains settings specific to the Google Cloud Platform infrastructure provider.
	GCP *configv1.GCPPlatformSpec `json:"gcp,omitempty"`
	// baremetal contains settings specific to the BareMetal platform.
	BareMetal *BareMetalPlatformSpecApplyConfiguration `json:"baremetal,omitempty"`
	// openstack contains settings specific to the OpenStack infrastructure provider.
	OpenStack *OpenStackPlatformSpecApplyConfiguration `json:"openstack,omitempty"`
	// ovirt contains settings specific to the oVirt infrastructure provider.
	Ovirt *configv1.OvirtPlatformSpec `json:"ovirt,omitempty"`
	// vsphere contains settings specific to the VSphere infrastructure provider.
	VSphere *VSpherePlatformSpecApplyConfiguration `json:"vsphere,omitempty"`
	// ibmcloud contains settings specific to the IBMCloud infrastructure provider.
	IBMCloud *IBMCloudPlatformSpecApplyConfiguration `json:"ibmcloud,omitempty"`
	// kubevirt contains settings specific to the kubevirt infrastructure provider.
	Kubevirt *configv1.KubevirtPlatformSpec `json:"kubevirt,omitempty"`
	// equinixMetal contains settings specific to the Equinix Metal infrastructure provider.
	EquinixMetal *configv1.EquinixMetalPlatformSpec `json:"equinixMetal,omitempty"`
	// powervs contains settings specific to the IBM Power Systems Virtual Servers infrastructure provider.
	PowerVS *PowerVSPlatformSpecApplyConfiguration `json:"powervs,omitempty"`
	// alibabaCloud contains settings specific to the Alibaba Cloud infrastructure provider.
	AlibabaCloud *configv1.AlibabaCloudPlatformSpec `json:"alibabaCloud,omitempty"`
	// nutanix contains settings specific to the Nutanix infrastructure provider.
	Nutanix *NutanixPlatformSpecApplyConfiguration `json:"nutanix,omitempty"`
	// ExternalPlatformType represents generic infrastructure provider.
	// Platform-specific components should be supplemented separately.
	External *ExternalPlatformSpecApplyConfiguration `json:"external,omitempty"`
}

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

// WithType sets the Type 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 Type field is set to the value of the last call.
func (b *PlatformSpecApplyConfiguration) WithType(value configv1.PlatformType) *PlatformSpecApplyConfiguration {
	b.Type = &value
	return b
}

// WithAWS sets the AWS 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 AWS field is set to the value of the last call.
func (b *PlatformSpecApplyConfiguration) WithAWS(value *AWSPlatformSpecApplyConfiguration) *PlatformSpecApplyConfiguration {
	b.AWS = value
	return b
}

// WithAzure sets the Azure 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 Azure field is set to the value of the last call.
func (b *PlatformSpecApplyConfiguration) WithAzure(value configv1.AzurePlatformSpec) *PlatformSpecApplyConfiguration {
	b.Azure = &value
	return b
}

// WithGCP sets the GCP 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 GCP field is set to the value of the last call.
func (b *PlatformSpecApplyConfiguration) WithGCP(value configv1.GCPPlatformSpec) *PlatformSpecApplyConfiguration {
	b.GCP = &value
	return b
}

// WithBareMetal sets the BareMetal 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 BareMetal field is set to the value of the last call.
func (b *PlatformSpecApplyConfiguration) WithBareMetal(value *BareMetalPlatformSpecApplyConfiguration) *PlatformSpecApplyConfiguration {
	b.BareMetal = value
	return b
}

// WithOpenStack sets the OpenStack 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 OpenStack field is set to the value of the last call.
func (b *PlatformSpecApplyConfiguration) WithOpenStack(value *OpenStackPlatformSpecApplyConfiguration) *PlatformSpecApplyConfiguration {
	b.OpenStack = value
	return b
}

// WithOvirt sets the Ovirt 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 Ovirt field is set to the value of the last call.
func (b *PlatformSpecApplyConfiguration) WithOvirt(value configv1.OvirtPlatformSpec) *PlatformSpecApplyConfiguration {
	b.Ovirt = &value
	return b
}

// WithVSphere sets the VSphere 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 VSphere field is set to the value of the last call.
func (b *PlatformSpecApplyConfiguration) WithVSphere(value *VSpherePlatformSpecApplyConfiguration) *PlatformSpecApplyConfiguration {
	b.VSphere = value
	return b
}

// WithIBMCloud sets the IBMCloud 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 IBMCloud field is set to the value of the last call.
func (b *PlatformSpecApplyConfiguration) WithIBMCloud(value *IBMCloudPlatformSpecApplyConfiguration) *PlatformSpecApplyConfiguration {
	b.IBMCloud = value
	return b
}

// WithKubevirt sets the Kubevirt 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 Kubevirt field is set to the value of the last call.
func (b *PlatformSpecApplyConfiguration) WithKubevirt(value configv1.KubevirtPlatformSpec) *PlatformSpecApplyConfiguration {
	b.Kubevirt = &value
	return b
}

// WithEquinixMetal sets the EquinixMetal 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 EquinixMetal field is set to the value of the last call.
func (b *PlatformSpecApplyConfiguration) WithEquinixMetal(value configv1.EquinixMetalPlatformSpec) *PlatformSpecApplyConfiguration {
	b.EquinixMetal = &value
	return b
}

// WithPowerVS sets the PowerVS 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 PowerVS field is set to the value of the last call.
func (b *PlatformSpecApplyConfiguration) WithPowerVS(value *PowerVSPlatformSpecApplyConfiguration) *PlatformSpecApplyConfiguration {
	b.PowerVS = value
	return b
}

// WithAlibabaCloud sets the AlibabaCloud 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 AlibabaCloud field is set to the value of the last call.
func (b *PlatformSpecApplyConfiguration) WithAlibabaCloud(value configv1.AlibabaCloudPlatformSpec) *PlatformSpecApplyConfiguration {
	b.AlibabaCloud = &value
	return b
}

// WithNutanix sets the Nutanix 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 Nutanix field is set to the value of the last call.
func (b *PlatformSpecApplyConfiguration) WithNutanix(value *NutanixPlatformSpecApplyConfiguration) *PlatformSpecApplyConfiguration {
	b.Nutanix = value
	return b
}

// WithExternal sets the External 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 External field is set to the value of the last call.
func (b *PlatformSpecApplyConfiguration) WithExternal(value *ExternalPlatformSpecApplyConfiguration) *PlatformSpecApplyConfiguration {
	b.External = value
	return b
}
