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

package v1

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

// OpenStackPlatformStatusApplyConfiguration represents a declarative configuration of the OpenStackPlatformStatus type for use
// with apply.
//
// OpenStackPlatformStatus holds the current status of the OpenStack infrastructure provider.
type OpenStackPlatformStatusApplyConfiguration struct {
	// apiServerInternalIP is an IP address to contact the Kubernetes API server that can be used
	// by components inside the cluster, like kubelets using the infrastructure rather
	// than Kubernetes networking. It is the IP that the Infrastructure.status.apiServerInternalURI
	// points to. It is the IP for a self-hosted load balancer in front of the API servers.
	//
	// Deprecated: Use APIServerInternalIPs instead.
	APIServerInternalIP *string `json:"apiServerInternalIP,omitempty"`
	// apiServerInternalIPs are the IP addresses to contact the Kubernetes API
	// server that can be used by components inside the cluster, like kubelets
	// using the infrastructure rather than Kubernetes networking. These are the
	// IPs for a self-hosted load balancer in front of the API servers. In dual
	// stack clusters this list contains two IPs otherwise only one.
	APIServerInternalIPs []string `json:"apiServerInternalIPs,omitempty"`
	// cloudName is the name of the desired OpenStack cloud in the
	// client configuration file (`clouds.yaml`).
	CloudName *string `json:"cloudName,omitempty"`
	// ingressIP is an external IP which routes to the default ingress controller.
	// The IP is a suitable target of a wildcard DNS record used to resolve default route host names.
	//
	// Deprecated: Use IngressIPs instead.
	IngressIP *string `json:"ingressIP,omitempty"`
	// ingressIPs are the external IPs which route to the default ingress
	// controller. The IPs are suitable targets of a wildcard DNS record used to
	// resolve default route host names. In dual stack clusters this list
	// contains two IPs otherwise only one.
	IngressIPs []string `json:"ingressIPs,omitempty"`
	// nodeDNSIP is the IP address for the internal DNS used by the
	// nodes. Unlike the one managed by the DNS operator, `NodeDNSIP`
	// provides name resolution for the nodes themselves. There is no DNS-as-a-service for
	// OpenStack deployments. In order to minimize necessary changes to the
	// datacenter DNS, a DNS service is hosted as a static pod to serve those hostnames
	// to the nodes in the cluster.
	NodeDNSIP *string `json:"nodeDNSIP,omitempty"`
	// loadBalancer defines how the load balancer used by the cluster is configured.
	LoadBalancer *OpenStackPlatformLoadBalancerApplyConfiguration `json:"loadBalancer,omitempty"`
	// dnsRecordsType determines whether records for api, api-int, and ingress
	// are provided by the internal DNS service or externally.
	// Allowed values are `Internal`, `External`, and omitted.
	// When set to `Internal`, records are provided by the internal infrastructure and
	// no additional user configuration is required for the cluster to function.
	// When set to `External`, records are not provided by the internal infrastructure
	// and must be configured by the user on a DNS server outside the cluster.
	// Cluster nodes must use this external server for their upstream DNS requests.
	// This value may only be set when loadBalancer.type is set to UserManaged.
	// When omitted, this means the user has no opinion and the platform is left
	// to choose reasonable defaults. These defaults are subject to change over time.
	// The current default is `Internal`.
	DNSRecordsType *configv1.DNSRecordsType `json:"dnsRecordsType,omitempty"`
	// machineNetworks are IP networks used to connect all the OpenShift cluster nodes.
	MachineNetworks []configv1.CIDR `json:"machineNetworks,omitempty"`
}

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

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

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

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

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

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

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

// WithLoadBalancer sets the LoadBalancer 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 LoadBalancer field is set to the value of the last call.
func (b *OpenStackPlatformStatusApplyConfiguration) WithLoadBalancer(value *OpenStackPlatformLoadBalancerApplyConfiguration) *OpenStackPlatformStatusApplyConfiguration {
	b.LoadBalancer = value
	return b
}

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

// WithMachineNetworks adds the given value to the MachineNetworks 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 MachineNetworks field.
func (b *OpenStackPlatformStatusApplyConfiguration) WithMachineNetworks(values ...configv1.CIDR) *OpenStackPlatformStatusApplyConfiguration {
	for i := range values {
		b.MachineNetworks = append(b.MachineNetworks, values[i])
	}
	return b
}
