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

package v1

import (
	v1 "github.com/openshift/api/route/v1"
)

// TLSConfigApplyConfiguration represents an declarative configuration of the TLSConfig type for use
// with apply.
type TLSConfigApplyConfiguration struct {
	Termination                   *v1.TLSTerminationType                  `json:"termination,omitempty"`
	Certificate                   *string                                 `json:"certificate,omitempty"`
	Key                           *string                                 `json:"key,omitempty"`
	CACertificate                 *string                                 `json:"caCertificate,omitempty"`
	DestinationCACertificate      *string                                 `json:"destinationCACertificate,omitempty"`
	InsecureEdgeTerminationPolicy *v1.InsecureEdgeTerminationPolicyType   `json:"insecureEdgeTerminationPolicy,omitempty"`
	ExternalCertificate           *LocalObjectReferenceApplyConfiguration `json:"externalCertificate,omitempty"`
}

// TLSConfigApplyConfiguration constructs an declarative configuration of the TLSConfig type for use with
// apply.
func TLSConfig() *TLSConfigApplyConfiguration {
	return &TLSConfigApplyConfiguration{}
}

// WithTermination sets the Termination 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 Termination field is set to the value of the last call.
func (b *TLSConfigApplyConfiguration) WithTermination(value v1.TLSTerminationType) *TLSConfigApplyConfiguration {
	b.Termination = &value
	return b
}

// WithCertificate sets the Certificate 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 Certificate field is set to the value of the last call.
func (b *TLSConfigApplyConfiguration) WithCertificate(value string) *TLSConfigApplyConfiguration {
	b.Certificate = &value
	return b
}

// WithKey sets the Key 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 Key field is set to the value of the last call.
func (b *TLSConfigApplyConfiguration) WithKey(value string) *TLSConfigApplyConfiguration {
	b.Key = &value
	return b
}

// WithCACertificate sets the CACertificate 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 CACertificate field is set to the value of the last call.
func (b *TLSConfigApplyConfiguration) WithCACertificate(value string) *TLSConfigApplyConfiguration {
	b.CACertificate = &value
	return b
}

// WithDestinationCACertificate sets the DestinationCACertificate 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 DestinationCACertificate field is set to the value of the last call.
func (b *TLSConfigApplyConfiguration) WithDestinationCACertificate(value string) *TLSConfigApplyConfiguration {
	b.DestinationCACertificate = &value
	return b
}

// WithInsecureEdgeTerminationPolicy sets the InsecureEdgeTerminationPolicy 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 InsecureEdgeTerminationPolicy field is set to the value of the last call.
func (b *TLSConfigApplyConfiguration) WithInsecureEdgeTerminationPolicy(value v1.InsecureEdgeTerminationPolicyType) *TLSConfigApplyConfiguration {
	b.InsecureEdgeTerminationPolicy = &value
	return b
}

// WithExternalCertificate sets the ExternalCertificate 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 ExternalCertificate field is set to the value of the last call.
func (b *TLSConfigApplyConfiguration) WithExternalCertificate(value *LocalObjectReferenceApplyConfiguration) *TLSConfigApplyConfiguration {
	b.ExternalCertificate = value
	return b
}
