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

package v1

import (
	v1 "github.com/openshift/api/config/v1"
	apioperatorv1 "github.com/openshift/api/operator/v1"
	corev1 "k8s.io/api/core/v1"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	runtime "k8s.io/apimachinery/pkg/runtime"
)

// IngressControllerSpecApplyConfiguration represents an declarative configuration of the IngressControllerSpec type for use
// with apply.
type IngressControllerSpecApplyConfiguration struct {
	Domain                     *string                                           `json:"domain,omitempty"`
	HttpErrorCodePages         *v1.ConfigMapNameReference                        `json:"httpErrorCodePages,omitempty"`
	Replicas                   *int32                                            `json:"replicas,omitempty"`
	EndpointPublishingStrategy *EndpointPublishingStrategyApplyConfiguration     `json:"endpointPublishingStrategy,omitempty"`
	DefaultCertificate         *corev1.LocalObjectReference                      `json:"defaultCertificate,omitempty"`
	NamespaceSelector          *metav1.LabelSelector                             `json:"namespaceSelector,omitempty"`
	RouteSelector              *metav1.LabelSelector                             `json:"routeSelector,omitempty"`
	NodePlacement              *NodePlacementApplyConfiguration                  `json:"nodePlacement,omitempty"`
	TLSSecurityProfile         *v1.TLSSecurityProfile                            `json:"tlsSecurityProfile,omitempty"`
	ClientTLS                  *ClientTLSApplyConfiguration                      `json:"clientTLS,omitempty"`
	RouteAdmission             *RouteAdmissionPolicyApplyConfiguration           `json:"routeAdmission,omitempty"`
	Logging                    *IngressControllerLoggingApplyConfiguration       `json:"logging,omitempty"`
	HTTPHeaders                *IngressControllerHTTPHeadersApplyConfiguration   `json:"httpHeaders,omitempty"`
	HTTPEmptyRequestsPolicy    *apioperatorv1.HTTPEmptyRequestsPolicy            `json:"httpEmptyRequestsPolicy,omitempty"`
	TuningOptions              *IngressControllerTuningOptionsApplyConfiguration `json:"tuningOptions,omitempty"`
	UnsupportedConfigOverrides *runtime.RawExtension                             `json:"unsupportedConfigOverrides,omitempty"`
	HTTPCompression            *HTTPCompressionPolicyApplyConfiguration          `json:"httpCompression,omitempty"`
}

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

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

// WithHttpErrorCodePages sets the HttpErrorCodePages 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 HttpErrorCodePages field is set to the value of the last call.
func (b *IngressControllerSpecApplyConfiguration) WithHttpErrorCodePages(value v1.ConfigMapNameReference) *IngressControllerSpecApplyConfiguration {
	b.HttpErrorCodePages = &value
	return b
}

// WithReplicas sets the Replicas 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 Replicas field is set to the value of the last call.
func (b *IngressControllerSpecApplyConfiguration) WithReplicas(value int32) *IngressControllerSpecApplyConfiguration {
	b.Replicas = &value
	return b
}

// WithEndpointPublishingStrategy sets the EndpointPublishingStrategy 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 EndpointPublishingStrategy field is set to the value of the last call.
func (b *IngressControllerSpecApplyConfiguration) WithEndpointPublishingStrategy(value *EndpointPublishingStrategyApplyConfiguration) *IngressControllerSpecApplyConfiguration {
	b.EndpointPublishingStrategy = value
	return b
}

// WithDefaultCertificate sets the DefaultCertificate 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 DefaultCertificate field is set to the value of the last call.
func (b *IngressControllerSpecApplyConfiguration) WithDefaultCertificate(value corev1.LocalObjectReference) *IngressControllerSpecApplyConfiguration {
	b.DefaultCertificate = &value
	return b
}

// WithNamespaceSelector sets the NamespaceSelector 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 NamespaceSelector field is set to the value of the last call.
func (b *IngressControllerSpecApplyConfiguration) WithNamespaceSelector(value metav1.LabelSelector) *IngressControllerSpecApplyConfiguration {
	b.NamespaceSelector = &value
	return b
}

// WithRouteSelector sets the RouteSelector 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 RouteSelector field is set to the value of the last call.
func (b *IngressControllerSpecApplyConfiguration) WithRouteSelector(value metav1.LabelSelector) *IngressControllerSpecApplyConfiguration {
	b.RouteSelector = &value
	return b
}

// WithNodePlacement sets the NodePlacement 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 NodePlacement field is set to the value of the last call.
func (b *IngressControllerSpecApplyConfiguration) WithNodePlacement(value *NodePlacementApplyConfiguration) *IngressControllerSpecApplyConfiguration {
	b.NodePlacement = value
	return b
}

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

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

// WithRouteAdmission sets the RouteAdmission 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 RouteAdmission field is set to the value of the last call.
func (b *IngressControllerSpecApplyConfiguration) WithRouteAdmission(value *RouteAdmissionPolicyApplyConfiguration) *IngressControllerSpecApplyConfiguration {
	b.RouteAdmission = value
	return b
}

// WithLogging sets the Logging 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 Logging field is set to the value of the last call.
func (b *IngressControllerSpecApplyConfiguration) WithLogging(value *IngressControllerLoggingApplyConfiguration) *IngressControllerSpecApplyConfiguration {
	b.Logging = value
	return b
}

// WithHTTPHeaders sets the HTTPHeaders 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 HTTPHeaders field is set to the value of the last call.
func (b *IngressControllerSpecApplyConfiguration) WithHTTPHeaders(value *IngressControllerHTTPHeadersApplyConfiguration) *IngressControllerSpecApplyConfiguration {
	b.HTTPHeaders = value
	return b
}

// WithHTTPEmptyRequestsPolicy sets the HTTPEmptyRequestsPolicy 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 HTTPEmptyRequestsPolicy field is set to the value of the last call.
func (b *IngressControllerSpecApplyConfiguration) WithHTTPEmptyRequestsPolicy(value apioperatorv1.HTTPEmptyRequestsPolicy) *IngressControllerSpecApplyConfiguration {
	b.HTTPEmptyRequestsPolicy = &value
	return b
}

// WithTuningOptions sets the TuningOptions 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 TuningOptions field is set to the value of the last call.
func (b *IngressControllerSpecApplyConfiguration) WithTuningOptions(value *IngressControllerTuningOptionsApplyConfiguration) *IngressControllerSpecApplyConfiguration {
	b.TuningOptions = value
	return b
}

// WithUnsupportedConfigOverrides sets the UnsupportedConfigOverrides 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 UnsupportedConfigOverrides field is set to the value of the last call.
func (b *IngressControllerSpecApplyConfiguration) WithUnsupportedConfigOverrides(value runtime.RawExtension) *IngressControllerSpecApplyConfiguration {
	b.UnsupportedConfigOverrides = &value
	return b
}

// WithHTTPCompression sets the HTTPCompression 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 HTTPCompression field is set to the value of the last call.
func (b *IngressControllerSpecApplyConfiguration) WithHTTPCompression(value *HTTPCompressionPolicyApplyConfiguration) *IngressControllerSpecApplyConfiguration {
	b.HTTPCompression = value
	return b
}
