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

package v1

// TokenClaimValidationCELRuleApplyConfiguration represents a declarative configuration of the TokenClaimValidationCELRule type for use
// with apply.
type TokenClaimValidationCELRuleApplyConfiguration struct {
	// expression is a CEL expression evaluated against token claims.
	// expression is required, must be at least 1 character in length and must not exceed 1024 characters.
	// The expression must return a boolean value where 'true' signals a valid token and 'false' an invalid one.
	Expression *string `json:"expression,omitempty"`
	// message is a required human-readable message to be logged by the Kubernetes API server if the CEL expression defined in 'expression' fails.
	// message must be at least 1 character in length and must not exceed 256 characters.
	Message *string `json:"message,omitempty"`
}

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

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

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