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

package v1

import (
	operatorv1 "github.com/openshift/api/operator/v1"
)

// SecretsStoreSecretRotationApplyConfiguration represents a declarative configuration of the SecretsStoreSecretRotation type for use
// with apply.
//
// SecretsStoreSecretRotation configures the automatic secret rotation behavior
// for the Secrets Store CSI driver.
type SecretsStoreSecretRotationApplyConfiguration struct {
	// type determines the secret rotation behavior.
	// When "None", secret rotation is disabled and secrets are only fetched at
	// initial pod mount time.
	// When "Custom", secret rotation is enabled with the configuration specified
	// in the custom field.
	Type *operatorv1.SecretRotationType `json:"type,omitempty"`
	// custom holds the custom rotation configuration.
	// Only valid when type is "Custom".
	Custom *CustomSecretRotationApplyConfiguration `json:"custom,omitempty"`
}

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

// WithType sets the Type 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 Type field is set to the value of the last call.
func (b *SecretsStoreSecretRotationApplyConfiguration) WithType(value operatorv1.SecretRotationType) *SecretsStoreSecretRotationApplyConfiguration {
	b.Type = &value
	return b
}

// WithCustom sets the Custom 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 Custom field is set to the value of the last call.
func (b *SecretsStoreSecretRotationApplyConfiguration) WithCustom(value *CustomSecretRotationApplyConfiguration) *SecretsStoreSecretRotationApplyConfiguration {
	b.Custom = value
	return b
}
