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

package v1

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

// NodePortStrategyApplyConfiguration represents a declarative configuration of the NodePortStrategy type for use
// with apply.
//
// NodePortStrategy holds parameters for the NodePortService endpoint publishing strategy.
type NodePortStrategyApplyConfiguration struct {
	// protocol specifies whether the IngressController expects incoming
	// connections to use plain TCP or whether the IngressController expects
	// PROXY protocol.
	//
	// PROXY protocol can be used with load balancers that support it to
	// communicate the source addresses of client connections when
	// forwarding those connections to the IngressController.  Using PROXY
	// protocol enables the IngressController to report those source
	// addresses instead of reporting the load balancer's address in HTTP
	// headers and logs.  Note that enabling PROXY protocol on the
	// IngressController will cause connections to fail if you are not using
	// a load balancer that uses PROXY protocol to forward connections to
	// the IngressController.  See
	// http://www.haproxy.org/download/2.2/doc/proxy-protocol.txt for
	// information about PROXY protocol.
	//
	// The following values are valid for this field:
	//
	// * The empty string.
	// * "TCP".
	// * "PROXY".
	//
	// The empty string specifies the default, which is TCP without PROXY
	// protocol.  Note that the default is subject to change.
	Protocol *operatorv1.IngressControllerProtocol `json:"protocol,omitempty"`
}

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

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