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

package v1beta1

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

// UnhealthyConditionApplyConfiguration represents a declarative configuration of the UnhealthyCondition type for use
// with apply.
//
// UnhealthyCondition represents a Node condition type and value with a timeout
// specified as a duration.  When the named condition has been in the given
// status for at least the timeout value, a node is considered unhealthy.
type UnhealthyConditionApplyConfiguration struct {
	Type   *v1.NodeConditionType `json:"type,omitempty"`
	Status *v1.ConditionStatus   `json:"status,omitempty"`
	// Expects an unsigned duration string of decimal numbers each with optional
	// fraction and a unit suffix, eg "300ms", "1.5h" or "2h45m".
	// Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
	Timeout *metav1.Duration `json:"timeout,omitempty"`
}

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

// 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 *UnhealthyConditionApplyConfiguration) WithType(value v1.NodeConditionType) *UnhealthyConditionApplyConfiguration {
	b.Type = &value
	return b
}

// WithStatus sets the Status 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 Status field is set to the value of the last call.
func (b *UnhealthyConditionApplyConfiguration) WithStatus(value v1.ConditionStatus) *UnhealthyConditionApplyConfiguration {
	b.Status = &value
	return b
}

// WithTimeout sets the Timeout 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 Timeout field is set to the value of the last call.
func (b *UnhealthyConditionApplyConfiguration) WithTimeout(value metav1.Duration) *UnhealthyConditionApplyConfiguration {
	b.Timeout = &value
	return b
}
