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

package v1

// ImagePolicyFulcioCAWithRekorRootOfTrustApplyConfiguration represents a declarative configuration of the ImagePolicyFulcioCAWithRekorRootOfTrust type for use
// with apply.
//
// ImagePolicyFulcioCAWithRekorRootOfTrust defines the root of trust based on the Fulcio certificate and the Rekor public key.
type ImagePolicyFulcioCAWithRekorRootOfTrustApplyConfiguration struct {
	// fulcioCAData is a required field contains inline base64-encoded data for the PEM format fulcio CA.
	// fulcioCAData must be at most 8192 characters.
	FulcioCAData []byte `json:"fulcioCAData,omitempty"`
	// rekorKeyData is a required field contains inline base64-encoded data for the PEM format from the Rekor public key.
	// rekorKeyData must be at most 8192 characters.
	RekorKeyData []byte `json:"rekorKeyData,omitempty"`
	// fulcioSubject is a required field specifies OIDC issuer and the email of the Fulcio authentication configuration.
	FulcioSubject *PolicyFulcioSubjectApplyConfiguration `json:"fulcioSubject,omitempty"`
}

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

// WithFulcioCAData adds the given value to the FulcioCAData 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 FulcioCAData field.
func (b *ImagePolicyFulcioCAWithRekorRootOfTrustApplyConfiguration) WithFulcioCAData(values ...byte) *ImagePolicyFulcioCAWithRekorRootOfTrustApplyConfiguration {
	for i := range values {
		b.FulcioCAData = append(b.FulcioCAData, values[i])
	}
	return b
}

// WithRekorKeyData adds the given value to the RekorKeyData 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 RekorKeyData field.
func (b *ImagePolicyFulcioCAWithRekorRootOfTrustApplyConfiguration) WithRekorKeyData(values ...byte) *ImagePolicyFulcioCAWithRekorRootOfTrustApplyConfiguration {
	for i := range values {
		b.RekorKeyData = append(b.RekorKeyData, values[i])
	}
	return b
}

// WithFulcioSubject sets the FulcioSubject 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 FulcioSubject field is set to the value of the last call.
func (b *ImagePolicyFulcioCAWithRekorRootOfTrustApplyConfiguration) WithFulcioSubject(value *PolicyFulcioSubjectApplyConfiguration) *ImagePolicyFulcioCAWithRekorRootOfTrustApplyConfiguration {
	b.FulcioSubject = value
	return b
}
