// Copyright (c) 2026 Tigera, Inc. All rights reserved.

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

package v3

import (
	projectcalicov3 "github.com/projectcalico/api/pkg/apis/projectcalico/v3"
)

// CalicoNodeStatusSpecApplyConfiguration represents a declarative configuration of the CalicoNodeStatusSpec type for use
// with apply.
//
// CalicoNodeStatusSpec contains the specification for a CalicoNodeStatus resource.
type CalicoNodeStatusSpecApplyConfiguration struct {
	// The node name identifies the Calico node instance for node status.
	Node *string `json:"node,omitempty"`
	// Classes declares the types of information to monitor for this calico/node,
	// and allows for selective status reporting about certain subsets of information.
	Classes []projectcalicov3.NodeStatusClassType `json:"classes,omitempty"`
	// UpdatePeriodSeconds is the period at which CalicoNodeStatus should be updated.
	// Set to 0 to disable CalicoNodeStatus refresh. Maximum update period is one day.
	UpdatePeriodSeconds *uint32 `json:"updatePeriodSeconds,omitempty"`
}

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

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

// WithClasses adds the given value to the Classes 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 Classes field.
func (b *CalicoNodeStatusSpecApplyConfiguration) WithClasses(values ...projectcalicov3.NodeStatusClassType) *CalicoNodeStatusSpecApplyConfiguration {
	for i := range values {
		b.Classes = append(b.Classes, values[i])
	}
	return b
}

// WithUpdatePeriodSeconds sets the UpdatePeriodSeconds 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 UpdatePeriodSeconds field is set to the value of the last call.
func (b *CalicoNodeStatusSpecApplyConfiguration) WithUpdatePeriodSeconds(value uint32) *CalicoNodeStatusSpecApplyConfiguration {
	b.UpdatePeriodSeconds = &value
	return b
}
