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

package v1

// AuthenticationProxyConfigApplyConfiguration represents a declarative configuration of the AuthenticationProxyConfig type for use
// with apply.
//
// AuthenticationProxyConfig holds proxy configuration scoped to
// authentication components (the OAuth server and the cluster
// authentication operator).
type AuthenticationProxyConfigApplyConfiguration struct {
	// httpProxy is the URL of the proxy for HTTP requests.
	// Must be a valid URL with http or https scheme, a non-empty
	// hostname, and no path, query parameters, or fragment.
	// Userinfo (e.g. user:password@host) is allowed for proxy
	// authentication. Maximum length is 2048 characters.
	HTTPProxy *string `json:"httpProxy,omitempty"`
	// httpsProxy is the URL of the proxy for HTTPS requests.
	// Must be a valid URL with http or https scheme, a non-empty
	// hostname, and no path, query parameters, or fragment.
	// Userinfo (e.g. user:password@host) is allowed for proxy
	// authentication. Maximum length is 2048 characters.
	HTTPSProxy *string `json:"httpsProxy,omitempty"`
	// noProxy is a list of hostnames and/or CIDRs and/or IPs for which
	// the proxy should not be used. Must contain at least one entry
	// when set. Each entry must be between 1 and 253 characters long
	// and at most 64 entries are allowed. Duplicate
	// entries are not permitted. Entries that are not valid hostnames,
	// CIDRs, or IPs are silently ignored. Cluster-internal defaults
	// (.cluster.local, .svc, 127.0.0.1, localhost) are always appended
	// automatically and do not need to be included.
	NoProxy []string `json:"noProxy,omitempty"`
	// trustedCA is a reference to a ConfigMap in the openshift-config
	// namespace containing a CA certificate bundle under the key
	// "ca-bundle.crt". This bundle is appended to the system trust store
	// used by authentication components for proxy TLS connections.
	// When omitted, only the system trust store is used.
	TrustedCA *AuthenticationConfigMapReferenceApplyConfiguration `json:"trustedCA,omitempty"`
}

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

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

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

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

// WithTrustedCA sets the TrustedCA 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 TrustedCA field is set to the value of the last call.
func (b *AuthenticationProxyConfigApplyConfiguration) WithTrustedCA(value *AuthenticationConfigMapReferenceApplyConfiguration) *AuthenticationProxyConfigApplyConfiguration {
	b.TrustedCA = value
	return b
}
