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

package v1

// RequestHeaderIdentityProviderApplyConfiguration represents an declarative configuration of the RequestHeaderIdentityProvider type for use
// with apply.
type RequestHeaderIdentityProviderApplyConfiguration struct {
	LoginURL                 *string                                   `json:"loginURL,omitempty"`
	ChallengeURL             *string                                   `json:"challengeURL,omitempty"`
	ClientCA                 *ConfigMapNameReferenceApplyConfiguration `json:"ca,omitempty"`
	ClientCommonNames        []string                                  `json:"clientCommonNames,omitempty"`
	Headers                  []string                                  `json:"headers,omitempty"`
	PreferredUsernameHeaders []string                                  `json:"preferredUsernameHeaders,omitempty"`
	NameHeaders              []string                                  `json:"nameHeaders,omitempty"`
	EmailHeaders             []string                                  `json:"emailHeaders,omitempty"`
}

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

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

// WithChallengeURL sets the ChallengeURL 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 ChallengeURL field is set to the value of the last call.
func (b *RequestHeaderIdentityProviderApplyConfiguration) WithChallengeURL(value string) *RequestHeaderIdentityProviderApplyConfiguration {
	b.ChallengeURL = &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 *RequestHeaderIdentityProviderApplyConfiguration) WithClientCA(value *ConfigMapNameReferenceApplyConfiguration) *RequestHeaderIdentityProviderApplyConfiguration {
	b.ClientCA = value
	return b
}

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

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

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

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

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