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

package v1

// SourcedClaimMappingApplyConfiguration represents a declarative configuration of the SourcedClaimMapping type for use
// with apply.
//
// SourcedClaimMapping configures the mapping behavior for a single external claim
// from the response the apiserver received from the external claim source.
type SourcedClaimMappingApplyConfiguration struct {
	// name is a required name of the claim that
	// will be produced and made available during
	// the claim-to-identity mapping process.
	// name must consist of only lowercase alpha characters and underscores ('_').
	// name must be at least 1 character and must not exceed 256 characters in length.
	Name *string `json:"name,omitempty"`
	// expression is a required CEL expression that
	// will produce a value to be assigned to the claim.
	// The full response body from the request to the
	// external claim source is provided via the
	// `response.body` variable.
	//
	// The contents of the `response.body` variable varies based on the response received
	// from the external source. It is the responsibility of those configuring
	// this expression to understand what is returned from the external source.
	//
	// expression must be at least 1 character and must not exceed 1024 characters in length.
	Expression *string `json:"expression,omitempty"`
}

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

// 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 *SourcedClaimMappingApplyConfiguration) WithName(value string) *SourcedClaimMappingApplyConfiguration {
	b.Name = &value
	return b
}

// 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 *SourcedClaimMappingApplyConfiguration) WithExpression(value string) *SourcedClaimMappingApplyConfiguration {
	b.Expression = &value
	return b
}
