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

package v1

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

// TokenIssuerApplyConfiguration represents a declarative configuration of the TokenIssuer type for use
// with apply.
type TokenIssuerApplyConfiguration struct {
	URL                  *string                                   `json:"issuerURL,omitempty"`
	Audiences            []configv1.TokenAudience                  `json:"audiences,omitempty"`
	CertificateAuthority *ConfigMapNameReferenceApplyConfiguration `json:"issuerCertificateAuthority,omitempty"`
}

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

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

// WithAudiences adds the given value to the Audiences 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 Audiences field.
func (b *TokenIssuerApplyConfiguration) WithAudiences(values ...configv1.TokenAudience) *TokenIssuerApplyConfiguration {
	for i := range values {
		b.Audiences = append(b.Audiences, values[i])
	}
	return b
}

// WithCertificateAuthority sets the CertificateAuthority 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 CertificateAuthority field is set to the value of the last call.
func (b *TokenIssuerApplyConfiguration) WithCertificateAuthority(value *ConfigMapNameReferenceApplyConfiguration) *TokenIssuerApplyConfiguration {
	b.CertificateAuthority = value
	return b
}
