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

package v1

// KMSPreflightCheckApplyConfiguration represents a declarative configuration of the KMSPreflightCheck type for use
// with apply.
//
// KMSPreflightCheck describes a preflight validation request and its result.
type KMSPreflightCheckApplyConfiguration struct {
	// observedConfigHash is a hash of the KMS provider configuration and
	// its referenced resources that has been observed and requires preflight
	// validation before a new encryption key can be created.
	// The value must be exactly 8 characters.
	ObservedConfigHash *string `json:"observedConfigHash,omitempty"`
	// result contains the outcome of the most recent preflight check.
	// Preflight is considered passed when result.status is Succeeded and
	// result.configHash matches observedConfigHash.
	// When omitted, no preflight check result has been reported yet.
	Result *KMSPreflightResultApplyConfiguration `json:"result,omitempty"`
}

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

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

// WithResult sets the Result 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 Result field is set to the value of the last call.
func (b *KMSPreflightCheckApplyConfiguration) WithResult(value *KMSPreflightResultApplyConfiguration) *KMSPreflightCheckApplyConfiguration {
	b.Result = value
	return b
}
