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

package v1

// GCPKMSKeyReferenceApplyConfiguration represents a declarative configuration of the GCPKMSKeyReference type for use
// with apply.
//
// GCPKMSKeyReference gathers required fields for looking up a GCP KMS Key
type GCPKMSKeyReferenceApplyConfiguration struct {
	// name is the name of the customer-managed encryption key to be used for disk encryption.
	// The value should correspond to an existing KMS key and should
	// consist of only alphanumeric characters, hyphens (-) and underscores (_),
	// and be at most 63 characters in length.
	Name *string `json:"name,omitempty"`
	// keyRing is the name of the KMS Key Ring which the KMS Key belongs to.
	// The value should correspond to an existing KMS key ring and should
	// consist of only alphanumeric characters, hyphens (-) and underscores (_),
	// and be at most 63 characters in length.
	KeyRing *string `json:"keyRing,omitempty"`
	// projectID is the ID of the Project in which the KMS Key Ring exists.
	// It must be 6 to 30 lowercase letters, digits, or hyphens.
	// It must start with a letter. Trailing hyphens are prohibited.
	ProjectID *string `json:"projectID,omitempty"`
	// location is the GCP location in which the Key Ring exists.
	// The value must match an existing GCP location, or "global".
	// Defaults to global, if not set.
	Location *string `json:"location,omitempty"`
}

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

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

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

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

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