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

package v1

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

// InfrastructureSpecApplyConfiguration represents a declarative configuration of the InfrastructureSpec type for use
// with apply.
//
// InfrastructureSpec contains settings that apply to the cluster infrastructure.
type InfrastructureSpecApplyConfiguration struct {
	// cloudConfig is a reference to a ConfigMap containing the cloud provider configuration file.
	// This configuration file is used to configure the Kubernetes cloud provider integration
	// when using the built-in cloud provider integration or the external cloud controller manager.
	// The namespace for this config map is openshift-config.
	//
	// cloudConfig should only be consumed by the kube_cloud_config controller.
	// The controller is responsible for using the user configuration in the spec
	// for various platforms and combining that with the user provided ConfigMap in this field
	// to create a stitched kube cloud config.
	// The controller generates a ConfigMap `kube-cloud-config` in `openshift-config-managed` namespace
	// with the kube cloud config is stored in `cloud.conf` key.
	// All the clients are expected to use the generated ConfigMap only.
	CloudConfig *ConfigMapFileReferenceApplyConfiguration `json:"cloudConfig,omitempty"`
	// platformSpec holds desired information specific to the underlying
	// infrastructure provider.
	PlatformSpec *PlatformSpecApplyConfiguration `json:"platformSpec,omitempty"`
	// controlPlaneTopology expresses the desired topology configuration for control nodes.
	//
	// When status.controlPlaneTopology is 'SingleReplica' and spec.controlPlaneTopology is set to 'HighlyAvailable',
	// a transition will be triggered to reconfigure the cluster from SingleReplica to HighlyAvailable.
	//
	// When left blank or status.controlPlaneTopology and spec.controlPlaneTopology are the same value,
	// no changes are required and no transitions will be triggered.
	//
	// This value may be set to match status.controlPlaneTopology regardless of the current value.
	ControlPlaneTopology *configv1.TopologyMode `json:"controlPlaneTopology,omitempty"`
}

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

// WithCloudConfig sets the CloudConfig 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 CloudConfig field is set to the value of the last call.
func (b *InfrastructureSpecApplyConfiguration) WithCloudConfig(value *ConfigMapFileReferenceApplyConfiguration) *InfrastructureSpecApplyConfiguration {
	b.CloudConfig = value
	return b
}

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

// WithControlPlaneTopology sets the ControlPlaneTopology 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 ControlPlaneTopology field is set to the value of the last call.
func (b *InfrastructureSpecApplyConfiguration) WithControlPlaneTopology(value configv1.TopologyMode) *InfrastructureSpecApplyConfiguration {
	b.ControlPlaneTopology = &value
	return b
}
