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

package v1alpha1

// PublicKeyApplyConfiguration represents a declarative configuration of the PublicKey type for use
// with apply.
type PublicKeyApplyConfiguration struct {
	KeyData      []byte `json:"keyData,omitempty"`
	RekorKeyData []byte `json:"rekorKeyData,omitempty"`
}

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

// 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 *PublicKeyApplyConfiguration) WithKeyData(values ...byte) *PublicKeyApplyConfiguration {
	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 *PublicKeyApplyConfiguration) WithRekorKeyData(values ...byte) *PublicKeyApplyConfiguration {
	for i := range values {
		b.RekorKeyData = append(b.RekorKeyData, values[i])
	}
	return b
}
