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

package v1

// ImagePolicyPublicKeyRootOfTrustApplyConfiguration represents a declarative configuration of the ImagePolicyPublicKeyRootOfTrust type for use
// with apply.
//
// ImagePolicyPublicKeyRootOfTrust defines the root of trust based on a sigstore public key.
type ImagePolicyPublicKeyRootOfTrustApplyConfiguration struct {
	// keyData is a required field contains inline base64-encoded data for the PEM format public key.
	// keyData must be at most 8192 characters.
	KeyData []byte `json:"keyData,omitempty"`
	// rekorKeyData is an optional 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"`
}

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

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