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

package v1

// PKIApplyConfiguration represents a declarative configuration of the PKI type for use
// with apply.
type PKIApplyConfiguration struct {
	CertificateAuthorityRootsData         []byte                                   `json:"caRootsData,omitempty"`
	CertificateAuthorityIntermediatesData []byte                                   `json:"caIntermediatesData,omitempty"`
	PKICertificateSubject                 *PKICertificateSubjectApplyConfiguration `json:"pkiCertificateSubject,omitempty"`
}

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

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

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

// WithPKICertificateSubject sets the PKICertificateSubject 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 PKICertificateSubject field is set to the value of the last call.
func (b *PKIApplyConfiguration) WithPKICertificateSubject(value *PKICertificateSubjectApplyConfiguration) *PKIApplyConfiguration {
	b.PKICertificateSubject = value
	return b
}
