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

package v1

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

// AWSPlatformStatusApplyConfiguration represents a declarative configuration of the AWSPlatformStatus type for use
// with apply.
//
// AWSPlatformStatus holds the current status of the Amazon Web Services infrastructure provider.
type AWSPlatformStatusApplyConfiguration struct {
	// region holds the default AWS region for new AWS resources created by the cluster.
	Region *string `json:"region,omitempty"`
	// serviceEndpoints list contains custom endpoints which will override default
	// service endpoint of AWS Services.
	// There must be only one ServiceEndpoint for a service.
	ServiceEndpoints []AWSServiceEndpointApplyConfiguration `json:"serviceEndpoints,omitempty"`
	// resourceTags is a list of additional tags to apply to AWS resources created for the cluster.
	// See https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html for information on tagging AWS resources.
	// AWS supports a maximum of 50 tags per resource. OpenShift reserves 25 tags for its use, leaving 25 tags
	// available for the user.
	ResourceTags []AWSResourceTagApplyConfiguration `json:"resourceTags,omitempty"`
	// cloudLoadBalancerConfig holds configuration related to DNS and cloud
	// load balancers. It allows configuration of in-cluster DNS as an alternative
	// to the platform default DNS implementation.
	// When using the ClusterHosted DNS type, Load Balancer IP addresses
	// must be provided for the API and internal API load balancers as well as the
	// ingress load balancer.
	CloudLoadBalancerConfig *CloudLoadBalancerConfigApplyConfiguration `json:"cloudLoadBalancerConfig,omitempty"`
	// ipFamily specifies the IP protocol family that should be used for AWS
	// network resources. This controls whether AWS resources are created with
	// IPv4-only, or dual-stack networking with IPv4 or IPv6 as the primary
	// protocol family.
	IPFamily *configv1.IPFamilyType `json:"ipFamily,omitempty"`
}

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

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

// WithServiceEndpoints adds the given value to the ServiceEndpoints 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 ServiceEndpoints field.
func (b *AWSPlatformStatusApplyConfiguration) WithServiceEndpoints(values ...*AWSServiceEndpointApplyConfiguration) *AWSPlatformStatusApplyConfiguration {
	for i := range values {
		if values[i] == nil {
			panic("nil value passed to WithServiceEndpoints")
		}
		b.ServiceEndpoints = append(b.ServiceEndpoints, *values[i])
	}
	return b
}

// WithResourceTags adds the given value to the ResourceTags 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 ResourceTags field.
func (b *AWSPlatformStatusApplyConfiguration) WithResourceTags(values ...*AWSResourceTagApplyConfiguration) *AWSPlatformStatusApplyConfiguration {
	for i := range values {
		if values[i] == nil {
			panic("nil value passed to WithResourceTags")
		}
		b.ResourceTags = append(b.ResourceTags, *values[i])
	}
	return b
}

// WithCloudLoadBalancerConfig sets the CloudLoadBalancerConfig 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 CloudLoadBalancerConfig field is set to the value of the last call.
func (b *AWSPlatformStatusApplyConfiguration) WithCloudLoadBalancerConfig(value *CloudLoadBalancerConfigApplyConfiguration) *AWSPlatformStatusApplyConfiguration {
	b.CloudLoadBalancerConfig = value
	return b
}

// WithIPFamily sets the IPFamily 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 IPFamily field is set to the value of the last call.
func (b *AWSPlatformStatusApplyConfiguration) WithIPFamily(value configv1.IPFamilyType) *AWSPlatformStatusApplyConfiguration {
	b.IPFamily = &value
	return b
}
