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

package v1

// RecreateDeploymentStrategyParamsApplyConfiguration represents a declarative configuration of the RecreateDeploymentStrategyParams type for use
// with apply.
//
// RecreateDeploymentStrategyParams are the input to the Recreate deployment
// strategy.
type RecreateDeploymentStrategyParamsApplyConfiguration struct {
	// timeoutSeconds is the time to wait for updates before giving up. If the
	// value is nil, a default will be used.
	TimeoutSeconds *int64 `json:"timeoutSeconds,omitempty"`
	// pre is a lifecycle hook which is executed before the strategy manipulates
	// the deployment. All LifecycleHookFailurePolicy values are supported.
	Pre *LifecycleHookApplyConfiguration `json:"pre,omitempty"`
	// mid is a lifecycle hook which is executed while the deployment is scaled down to zero before the first new
	// pod is created. All LifecycleHookFailurePolicy values are supported.
	Mid *LifecycleHookApplyConfiguration `json:"mid,omitempty"`
	// post is a lifecycle hook which is executed after the strategy has
	// finished all deployment logic. All LifecycleHookFailurePolicy values are supported.
	Post *LifecycleHookApplyConfiguration `json:"post,omitempty"`
}

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

// WithTimeoutSeconds sets the TimeoutSeconds 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 TimeoutSeconds field is set to the value of the last call.
func (b *RecreateDeploymentStrategyParamsApplyConfiguration) WithTimeoutSeconds(value int64) *RecreateDeploymentStrategyParamsApplyConfiguration {
	b.TimeoutSeconds = &value
	return b
}

// WithPre sets the Pre 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 Pre field is set to the value of the last call.
func (b *RecreateDeploymentStrategyParamsApplyConfiguration) WithPre(value *LifecycleHookApplyConfiguration) *RecreateDeploymentStrategyParamsApplyConfiguration {
	b.Pre = value
	return b
}

// WithMid sets the Mid 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 Mid field is set to the value of the last call.
func (b *RecreateDeploymentStrategyParamsApplyConfiguration) WithMid(value *LifecycleHookApplyConfiguration) *RecreateDeploymentStrategyParamsApplyConfiguration {
	b.Mid = value
	return b
}

// WithPost sets the Post 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 Post field is set to the value of the last call.
func (b *RecreateDeploymentStrategyParamsApplyConfiguration) WithPost(value *LifecycleHookApplyConfiguration) *RecreateDeploymentStrategyParamsApplyConfiguration {
	b.Post = value
	return b
}
