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

package v1

// DNSStatusApplyConfiguration represents a declarative configuration of the DNSStatus type for use
// with apply.
//
// DNSStatus defines the observed status of the DNS.
type DNSStatusApplyConfiguration struct {
	// clusterIP is the service IP through which this DNS is made available.
	//
	// In the case of the default DNS, this will be a well known IP that is used
	// as the default nameserver for pods that are using the default ClusterFirst DNS policy.
	//
	// In general, this IP can be specified in a pod's spec.dnsConfig.nameservers list
	// or used explicitly when performing name resolution from within the cluster.
	// Example: dig foo.com @<service IP>
	//
	// More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies
	ClusterIP *string `json:"clusterIP,omitempty"`
	// clusterDomain is the local cluster DNS domain suffix for DNS services.
	// This will be a subdomain as defined in RFC 1034,
	// section 3.5: https://tools.ietf.org/html/rfc1034#section-3.5
	// Example: "cluster.local"
	//
	// More info: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service
	ClusterDomain *string `json:"clusterDomain,omitempty"`
	// conditions provide information about the state of the DNS on the cluster.
	//
	// These are the supported DNS conditions:
	//
	// * Available
	// - True if the following conditions are met:
	// * DNS controller daemonset is available.
	// - False if any of those conditions are unsatisfied.
	Conditions []OperatorConditionApplyConfiguration `json:"conditions,omitempty"`
}

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

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

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

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