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

package v1

import (
	configv1 "github.com/openshift/api/config/v1"
)

// IdentityProviderConfigApplyConfiguration represents a declarative configuration of the IdentityProviderConfig type for use
// with apply.
//
// IdentityProviderConfig contains configuration for using a specific identity provider
type IdentityProviderConfigApplyConfiguration struct {
	// type identifies the identity provider type for this entry.
	Type *configv1.IdentityProviderType `json:"type,omitempty"`
	// basicAuth contains configuration options for the BasicAuth IdP
	BasicAuth *BasicAuthIdentityProviderApplyConfiguration `json:"basicAuth,omitempty"`
	// github enables user authentication using GitHub credentials
	GitHub *GitHubIdentityProviderApplyConfiguration `json:"github,omitempty"`
	// gitlab enables user authentication using GitLab credentials
	GitLab *GitLabIdentityProviderApplyConfiguration `json:"gitlab,omitempty"`
	// google enables user authentication using Google credentials
	Google *GoogleIdentityProviderApplyConfiguration `json:"google,omitempty"`
	// htpasswd enables user authentication using an HTPasswd file to validate credentials
	HTPasswd *HTPasswdIdentityProviderApplyConfiguration `json:"htpasswd,omitempty"`
	// keystone enables user authentication using keystone password credentials
	Keystone *KeystoneIdentityProviderApplyConfiguration `json:"keystone,omitempty"`
	// ldap enables user authentication using LDAP credentials
	LDAP *LDAPIdentityProviderApplyConfiguration `json:"ldap,omitempty"`
	// openID enables user authentication using OpenID credentials
	OpenID *OpenIDIdentityProviderApplyConfiguration `json:"openID,omitempty"`
	// requestHeader enables user authentication using request header credentials
	RequestHeader *RequestHeaderIdentityProviderApplyConfiguration `json:"requestHeader,omitempty"`
}

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

// WithType sets the Type 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 Type field is set to the value of the last call.
func (b *IdentityProviderConfigApplyConfiguration) WithType(value configv1.IdentityProviderType) *IdentityProviderConfigApplyConfiguration {
	b.Type = &value
	return b
}

// WithBasicAuth sets the BasicAuth 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 BasicAuth field is set to the value of the last call.
func (b *IdentityProviderConfigApplyConfiguration) WithBasicAuth(value *BasicAuthIdentityProviderApplyConfiguration) *IdentityProviderConfigApplyConfiguration {
	b.BasicAuth = value
	return b
}

// WithGitHub sets the GitHub 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 GitHub field is set to the value of the last call.
func (b *IdentityProviderConfigApplyConfiguration) WithGitHub(value *GitHubIdentityProviderApplyConfiguration) *IdentityProviderConfigApplyConfiguration {
	b.GitHub = value
	return b
}

// WithGitLab sets the GitLab 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 GitLab field is set to the value of the last call.
func (b *IdentityProviderConfigApplyConfiguration) WithGitLab(value *GitLabIdentityProviderApplyConfiguration) *IdentityProviderConfigApplyConfiguration {
	b.GitLab = value
	return b
}

// WithGoogle sets the Google 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 Google field is set to the value of the last call.
func (b *IdentityProviderConfigApplyConfiguration) WithGoogle(value *GoogleIdentityProviderApplyConfiguration) *IdentityProviderConfigApplyConfiguration {
	b.Google = value
	return b
}

// WithHTPasswd sets the HTPasswd 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 HTPasswd field is set to the value of the last call.
func (b *IdentityProviderConfigApplyConfiguration) WithHTPasswd(value *HTPasswdIdentityProviderApplyConfiguration) *IdentityProviderConfigApplyConfiguration {
	b.HTPasswd = value
	return b
}

// WithKeystone sets the Keystone 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 Keystone field is set to the value of the last call.
func (b *IdentityProviderConfigApplyConfiguration) WithKeystone(value *KeystoneIdentityProviderApplyConfiguration) *IdentityProviderConfigApplyConfiguration {
	b.Keystone = value
	return b
}

// WithLDAP sets the LDAP 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 LDAP field is set to the value of the last call.
func (b *IdentityProviderConfigApplyConfiguration) WithLDAP(value *LDAPIdentityProviderApplyConfiguration) *IdentityProviderConfigApplyConfiguration {
	b.LDAP = value
	return b
}

// WithOpenID sets the OpenID 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 OpenID field is set to the value of the last call.
func (b *IdentityProviderConfigApplyConfiguration) WithOpenID(value *OpenIDIdentityProviderApplyConfiguration) *IdentityProviderConfigApplyConfiguration {
	b.OpenID = value
	return b
}

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