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

package v1

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

// ClientTLSApplyConfiguration represents a declarative configuration of the ClientTLS type for use
// with apply.
type ClientTLSApplyConfiguration struct {
	ClientCertificatePolicy *operatorv1.ClientCertificatePolicy `json:"clientCertificatePolicy,omitempty"`
	ClientCA                *configv1.ConfigMapNameReference    `json:"clientCA,omitempty"`
	AllowedSubjectPatterns  []string                            `json:"allowedSubjectPatterns,omitempty"`
}

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

// WithClientCertificatePolicy sets the ClientCertificatePolicy 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 ClientCertificatePolicy field is set to the value of the last call.
func (b *ClientTLSApplyConfiguration) WithClientCertificatePolicy(value operatorv1.ClientCertificatePolicy) *ClientTLSApplyConfiguration {
	b.ClientCertificatePolicy = &value
	return b
}

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

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