/*
Copyright The Kubernetes Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

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

package v1alpha1

import (
	v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// ResponderStatusApplyConfiguration represents a declarative configuration of the ResponderStatus type for use
// with apply.
//
// ResponderStatus represents the last observed status of the eviction process of the responder.
// It should be only updated by the designated responder whose name is .name field.
type ResponderStatusApplyConfiguration struct {
	// name allows you to identify the responder reacting to the Eviction.
	//
	// It must be a valid domain-prefixed key (such as "acme.io/foo").
	// This field is initialized by Kubernetes and must be unique for each responder.
	// This field is required.
	Name *string `json:"name,omitempty"`
	// startTime tracks the time at which this responder was designated as active and should start
	// processing the eviction request.
	// It should reflect the present time when set.
	// This field is initialized by Kubernetes when this responder becomes active.
	// This field becomes immutable once set.
	StartTime *v1.Time `json:"startTime,omitempty"`
	// heartbeatTime is the last time at which the eviction process was reported to be in progress
	// by the responder.
	// It should reflect the present time when set.
	// Responders should avoid heartbeats more frequent than 20 seconds to avoid overloading the
	// control-plane.
	HeartbeatTime *v1.Time `json:"heartbeatTime,omitempty"`
	// expectedCompletionTime is the time at which the eviction process step is expected to end for the
	// responder.
	// The time cannot be set to the past.
	// May be omitted if no estimate can be made.
	ExpectedCompletionTime *v1.Time `json:"expectedCompletionTime,omitempty"`
	// completionTime tracks the time at which the Responder stopped processing the eviction request.
	// Completion means that the responders has either fully or partially completed the
	// eviction process, which may have resulted in target eviction (e.g. pod termination).
	// It should reflect the present time when set.
	// This field becomes immutable once set.
	CompletionTime *v1.Time `json:"completionTime,omitempty"`
	// message provides human-readable details about the state of the responder and the eviction
	// process.
	// Maximum length is 4000 characters.
	Message *string `json:"message,omitempty"`
}

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

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

// WithStartTime sets the StartTime 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 StartTime field is set to the value of the last call.
func (b *ResponderStatusApplyConfiguration) WithStartTime(value v1.Time) *ResponderStatusApplyConfiguration {
	b.StartTime = &value
	return b
}

// WithHeartbeatTime sets the HeartbeatTime 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 HeartbeatTime field is set to the value of the last call.
func (b *ResponderStatusApplyConfiguration) WithHeartbeatTime(value v1.Time) *ResponderStatusApplyConfiguration {
	b.HeartbeatTime = &value
	return b
}

// WithExpectedCompletionTime sets the ExpectedCompletionTime 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 ExpectedCompletionTime field is set to the value of the last call.
func (b *ResponderStatusApplyConfiguration) WithExpectedCompletionTime(value v1.Time) *ResponderStatusApplyConfiguration {
	b.ExpectedCompletionTime = &value
	return b
}

// WithCompletionTime sets the CompletionTime 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 CompletionTime field is set to the value of the last call.
func (b *ResponderStatusApplyConfiguration) WithCompletionTime(value v1.Time) *ResponderStatusApplyConfiguration {
	b.CompletionTime = &value
	return b
}

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