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

package v1

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

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

// ClientTLSApplyConfiguration constructs an 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 v1.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
}
