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

package v1

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

// NodeStatusApplyConfiguration represents an declarative configuration of the NodeStatus type for use
// with apply.
type NodeStatusApplyConfiguration struct {
	NodeName                 *string  `json:"nodeName,omitempty"`
	CurrentRevision          *int32   `json:"currentRevision,omitempty"`
	TargetRevision           *int32   `json:"targetRevision,omitempty"`
	LastFailedRevision       *int32   `json:"lastFailedRevision,omitempty"`
	LastFailedTime           *v1.Time `json:"lastFailedTime,omitempty"`
	LastFailedReason         *string  `json:"lastFailedReason,omitempty"`
	LastFailedCount          *int     `json:"lastFailedCount,omitempty"`
	LastFallbackCount        *int     `json:"lastFallbackCount,omitempty"`
	LastFailedRevisionErrors []string `json:"lastFailedRevisionErrors,omitempty"`
}

// NodeStatusApplyConfiguration constructs an declarative configuration of the NodeStatus type for use with
// apply.
func NodeStatus() *NodeStatusApplyConfiguration {
	return &NodeStatusApplyConfiguration{}
}

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

// WithCurrentRevision sets the CurrentRevision 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 CurrentRevision field is set to the value of the last call.
func (b *NodeStatusApplyConfiguration) WithCurrentRevision(value int32) *NodeStatusApplyConfiguration {
	b.CurrentRevision = &value
	return b
}

// WithTargetRevision sets the TargetRevision 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 TargetRevision field is set to the value of the last call.
func (b *NodeStatusApplyConfiguration) WithTargetRevision(value int32) *NodeStatusApplyConfiguration {
	b.TargetRevision = &value
	return b
}

// WithLastFailedRevision sets the LastFailedRevision 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 LastFailedRevision field is set to the value of the last call.
func (b *NodeStatusApplyConfiguration) WithLastFailedRevision(value int32) *NodeStatusApplyConfiguration {
	b.LastFailedRevision = &value
	return b
}

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

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

// WithLastFailedCount sets the LastFailedCount 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 LastFailedCount field is set to the value of the last call.
func (b *NodeStatusApplyConfiguration) WithLastFailedCount(value int) *NodeStatusApplyConfiguration {
	b.LastFailedCount = &value
	return b
}

// WithLastFallbackCount sets the LastFallbackCount 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 LastFallbackCount field is set to the value of the last call.
func (b *NodeStatusApplyConfiguration) WithLastFallbackCount(value int) *NodeStatusApplyConfiguration {
	b.LastFallbackCount = &value
	return b
}

// WithLastFailedRevisionErrors adds the given value to the LastFailedRevisionErrors field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the LastFailedRevisionErrors field.
func (b *NodeStatusApplyConfiguration) WithLastFailedRevisionErrors(values ...string) *NodeStatusApplyConfiguration {
	for i := range values {
		b.LastFailedRevisionErrors = append(b.LastFailedRevisionErrors, values[i])
	}
	return b
}
