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

package v1

import (
	operatorv1 "github.com/openshift/api/operator/v1"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// OperatorConditionApplyConfiguration represents a declarative configuration of the OperatorCondition type for use
// with apply.
//
// OperatorCondition is just the standard condition fields.
type OperatorConditionApplyConfiguration struct {
	// type of condition in CamelCase or in foo.example.com/CamelCase.
	// ---
	// Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be
	// useful (see .node.status.conditions), the ability to deconflict is important.
	// The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
	Type *string `json:"type,omitempty"`
	// status of the condition, one of True, False, Unknown.
	Status *operatorv1.ConditionStatus `json:"status,omitempty"`
	// lastTransitionTime is the last time the condition transitioned from one status to another.
	// This should be when the underlying condition changed.  If that is not known, then using the time when the API field changed is acceptable.
	LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"`
	Reason             *string      `json:"reason,omitempty"`
	Message            *string      `json:"message,omitempty"`
}

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

// 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 *OperatorConditionApplyConfiguration) WithType(value string) *OperatorConditionApplyConfiguration {
	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 *OperatorConditionApplyConfiguration) WithStatus(value operatorv1.ConditionStatus) *OperatorConditionApplyConfiguration {
	b.Status = &value
	return b
}

// WithLastTransitionTime sets the LastTransitionTime 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 LastTransitionTime field is set to the value of the last call.
func (b *OperatorConditionApplyConfiguration) WithLastTransitionTime(value metav1.Time) *OperatorConditionApplyConfiguration {
	b.LastTransitionTime = &value
	return b
}

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