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

package v1

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

// VaultAuthenticationApplyConfiguration represents a declarative configuration of the VaultAuthentication type for use
// with apply.
//
// VaultAuthentication defines the authentication method used to authenticate with Vault.
type VaultAuthenticationApplyConfiguration struct {
	// type defines the authentication method used to authenticate with Vault.
	// Allowed values are AppRole.
	// When set to AppRole, the plugin uses AppRole credentials to authenticate with Vault.
	Type *configv1.VaultAuthenticationType `json:"type,omitempty"`
	// appRole defines the configuration for AppRole authentication.
	// This field must be set when type is AppRole, and must be unset otherwise.
	AppRole *VaultAppRoleAuthenticationApplyConfiguration `json:"appRole,omitempty"`
}

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

// 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 *VaultAuthenticationApplyConfiguration) WithType(value configv1.VaultAuthenticationType) *VaultAuthenticationApplyConfiguration {
	b.Type = &value
	return b
}

// WithAppRole sets the AppRole 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 AppRole field is set to the value of the last call.
func (b *VaultAuthenticationApplyConfiguration) WithAppRole(value *VaultAppRoleAuthenticationApplyConfiguration) *VaultAuthenticationApplyConfiguration {
	b.AppRole = value
	return b
}
