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

package v1

// APIServerNamedServingCertApplyConfiguration represents a declarative configuration of the APIServerNamedServingCert type for use
// with apply.
//
// APIServerNamedServingCert maps a server DNS name, as understood by a client, to a certificate.
type APIServerNamedServingCertApplyConfiguration struct {
	// names is a optional list of explicit DNS names (leading wildcards allowed) that should use this certificate to
	// serve secure traffic. If no names are provided, the implicit names will be extracted from the certificates.
	// Exact names trump over wildcard names. Explicit names defined here trump over extracted implicit names.
	Names []string `json:"names,omitempty"`
	// servingCertificate references a kubernetes.io/tls type secret containing the TLS cert info for serving secure traffic.
	// The secret must exist in the openshift-config namespace and contain the following required fields:
	// - Secret.Data["tls.key"] - TLS private key.
	// - Secret.Data["tls.crt"] - TLS certificate.
	ServingCertificate *SecretNameReferenceApplyConfiguration `json:"servingCertificate,omitempty"`
}

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

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

// WithServingCertificate sets the ServingCertificate 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 ServingCertificate field is set to the value of the last call.
func (b *APIServerNamedServingCertApplyConfiguration) WithServingCertificate(value *SecretNameReferenceApplyConfiguration) *APIServerNamedServingCertApplyConfiguration {
	b.ServingCertificate = value
	return b
}
