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

package v1

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

// IdentityProviderApplyConfiguration represents a declarative configuration of the IdentityProvider type for use
// with apply.
type IdentityProviderApplyConfiguration struct {
	Name                                     *string                     `json:"name,omitempty"`
	MappingMethod                            *configv1.MappingMethodType `json:"mappingMethod,omitempty"`
	IdentityProviderConfigApplyConfiguration `json:",inline"`
}

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

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

// WithMappingMethod sets the MappingMethod 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 MappingMethod field is set to the value of the last call.
func (b *IdentityProviderApplyConfiguration) WithMappingMethod(value configv1.MappingMethodType) *IdentityProviderApplyConfiguration {
	b.MappingMethod = &value
	return b
}

// 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 *IdentityProviderApplyConfiguration) WithType(value configv1.IdentityProviderType) *IdentityProviderApplyConfiguration {
	b.IdentityProviderConfigApplyConfiguration.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 *IdentityProviderApplyConfiguration) WithBasicAuth(value *BasicAuthIdentityProviderApplyConfiguration) *IdentityProviderApplyConfiguration {
	b.IdentityProviderConfigApplyConfiguration.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 *IdentityProviderApplyConfiguration) WithGitHub(value *GitHubIdentityProviderApplyConfiguration) *IdentityProviderApplyConfiguration {
	b.IdentityProviderConfigApplyConfiguration.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 *IdentityProviderApplyConfiguration) WithGitLab(value *GitLabIdentityProviderApplyConfiguration) *IdentityProviderApplyConfiguration {
	b.IdentityProviderConfigApplyConfiguration.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 *IdentityProviderApplyConfiguration) WithGoogle(value *GoogleIdentityProviderApplyConfiguration) *IdentityProviderApplyConfiguration {
	b.IdentityProviderConfigApplyConfiguration.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 *IdentityProviderApplyConfiguration) WithHTPasswd(value *HTPasswdIdentityProviderApplyConfiguration) *IdentityProviderApplyConfiguration {
	b.IdentityProviderConfigApplyConfiguration.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 *IdentityProviderApplyConfiguration) WithKeystone(value *KeystoneIdentityProviderApplyConfiguration) *IdentityProviderApplyConfiguration {
	b.IdentityProviderConfigApplyConfiguration.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 *IdentityProviderApplyConfiguration) WithLDAP(value *LDAPIdentityProviderApplyConfiguration) *IdentityProviderApplyConfiguration {
	b.IdentityProviderConfigApplyConfiguration.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 *IdentityProviderApplyConfiguration) WithOpenID(value *OpenIDIdentityProviderApplyConfiguration) *IdentityProviderApplyConfiguration {
	b.IdentityProviderConfigApplyConfiguration.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 *IdentityProviderApplyConfiguration) WithRequestHeader(value *RequestHeaderIdentityProviderApplyConfiguration) *IdentityProviderApplyConfiguration {
	b.IdentityProviderConfigApplyConfiguration.RequestHeader = value
	return b
}
