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

package v1alpha1

import (
	configv1alpha1 "github.com/openshift/api/config/v1alpha1"
)

// AuthorizationConfigApplyConfiguration represents a declarative configuration of the AuthorizationConfig type for use
// with apply.
//
// AuthorizationConfig defines the authentication method for Alertmanager connections.
type AuthorizationConfigApplyConfiguration struct {
	// type specifies the authentication type to use.
	// Valid value is "BearerToken" (bearer token authentication).
	// When set to BearerToken, the bearerToken field must be specified.
	Type *configv1alpha1.AuthorizationType `json:"type,omitempty"`
	// bearerToken defines the secret reference containing the bearer token.
	// Required when type is "BearerToken", and forbidden otherwise.
	// The secret must exist in the openshift-monitoring namespace.
	BearerToken *SecretKeySelectorApplyConfiguration `json:"bearerToken,omitempty"`
}

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

// 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 *AuthorizationConfigApplyConfiguration) WithType(value configv1alpha1.AuthorizationType) *AuthorizationConfigApplyConfiguration {
	b.Type = &value
	return b
}

// WithBearerToken sets the BearerToken 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 BearerToken field is set to the value of the last call.
func (b *AuthorizationConfigApplyConfiguration) WithBearerToken(value *SecretKeySelectorApplyConfiguration) *AuthorizationConfigApplyConfiguration {
	b.BearerToken = value
	return b
}
