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

package v1alpha1

// PKIProfileApplyConfiguration represents a declarative configuration of the PKIProfile type for use
// with apply.
//
// PKIProfile defines the certificate generation parameters that OpenShift
// components use to create certificates. Category overrides take precedence
// over defaults.
type PKIProfileApplyConfiguration struct {
	// defaults specifies the default certificate configuration that applies
	// to all certificates unless overridden by a category override.
	Defaults *DefaultCertificateConfigApplyConfiguration `json:"defaults,omitempty"`
	// signerCertificates optionally overrides certificate parameters for
	// certificate authority (CA) certificates that sign other certificates.
	// When set, these parameters take precedence over defaults for all signer certificates.
	// When omitted, the defaults are used for signer certificates.
	SignerCertificates *CertificateConfigApplyConfiguration `json:"signerCertificates,omitempty"`
	// servingCertificates optionally overrides certificate parameters for
	// TLS server certificates used to serve HTTPS endpoints.
	// When set, these parameters take precedence over defaults for all serving certificates.
	// When omitted, the defaults are used for serving certificates.
	ServingCertificates *CertificateConfigApplyConfiguration `json:"servingCertificates,omitempty"`
	// clientCertificates optionally overrides certificate parameters for
	// client authentication certificates used to authenticate to servers.
	// When set, these parameters take precedence over defaults for all client certificates.
	// When omitted, the defaults are used for client certificates.
	ClientCertificates *CertificateConfigApplyConfiguration `json:"clientCertificates,omitempty"`
}

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

// WithDefaults sets the Defaults 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 Defaults field is set to the value of the last call.
func (b *PKIProfileApplyConfiguration) WithDefaults(value *DefaultCertificateConfigApplyConfiguration) *PKIProfileApplyConfiguration {
	b.Defaults = value
	return b
}

// WithSignerCertificates sets the SignerCertificates 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 SignerCertificates field is set to the value of the last call.
func (b *PKIProfileApplyConfiguration) WithSignerCertificates(value *CertificateConfigApplyConfiguration) *PKIProfileApplyConfiguration {
	b.SignerCertificates = value
	return b
}

// WithServingCertificates sets the ServingCertificates 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 ServingCertificates field is set to the value of the last call.
func (b *PKIProfileApplyConfiguration) WithServingCertificates(value *CertificateConfigApplyConfiguration) *PKIProfileApplyConfiguration {
	b.ServingCertificates = value
	return b
}

// WithClientCertificates sets the ClientCertificates 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 ClientCertificates field is set to the value of the last call.
func (b *PKIProfileApplyConfiguration) WithClientCertificates(value *CertificateConfigApplyConfiguration) *PKIProfileApplyConfiguration {
	b.ClientCertificates = value
	return b
}
