// 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"
)

// BPFConntrackTimeoutsApplyConfiguration represents a declarative configuration of the BPFConntrackTimeouts type for use
// with apply.
type BPFConntrackTimeoutsApplyConfiguration struct {
	// CreationGracePeriod gives a generic grace period to new connections
	// before they are considered for cleanup [Default: 10s].
	CreationGracePeriod *projectcalicov3.BPFConntrackTimeout `json:"creationGracePeriod,omitempty"`
	// TCPSynSent controls how long it takes before considering this entry for
	// cleanup after the last SYN without a response. If set to 'Auto', the
	// value from nf_conntrack_tcp_timeout_syn_sent is used. If nil, Calico uses
	// its own default value. [Default: 20s].
	TCPSynSent *projectcalicov3.BPFConntrackTimeout `json:"tcpSynSent,omitempty"`
	// TCPEstablished controls how long it takes before considering this entry for
	// cleanup after the connection became idle. If set to 'Auto', the
	// value from nf_conntrack_tcp_timeout_established is used. If nil, Calico uses
	// its own default value. [Default: 1h].
	TCPEstablished *projectcalicov3.BPFConntrackTimeout `json:"tcpEstablished,omitempty"`
	// TCPFinsSeen controls how long it takes before considering this entry for
	// cleanup after the connection was closed gracefully. If set to 'Auto', the
	// value from nf_conntrack_tcp_timeout_time_wait is used. If nil, Calico uses
	// its own default value. [Default: Auto].
	TCPFinsSeen *projectcalicov3.BPFConntrackTimeout `json:"tcpFinsSeen,omitempty"`
	// TCPResetSeen controls how long it takes before considering this entry for
	// cleanup after the connection was aborted. If nil, Calico uses its own
	// default value. [Default: 40s].
	TCPResetSeen *projectcalicov3.BPFConntrackTimeout `json:"tcpResetSeen,omitempty"`
	// UDPTimeout controls how long it takes before considering this entry for
	// cleanup after the connection became idle. If nil, Calico uses its own
	// default value. [Default: 60s].
	UDPTimeout *projectcalicov3.BPFConntrackTimeout `json:"udpTimeout,omitempty"`
	// GenericTimeout controls how long it takes before considering this
	// entry for cleanup after the connection became idle. If set to 'Auto', the
	// value from nf_conntrack_generic_timeout is used. If nil, Calico uses its
	// own default value. [Default: 10m].
	GenericTimeout *projectcalicov3.BPFConntrackTimeout `json:"genericTimeout,omitempty"`
	// ICMPTimeout controls how long it takes before considering this
	// entry for cleanup after the connection became idle. If set to 'Auto', the
	// value from nf_conntrack_icmp_timeout is used. If nil, Calico uses its
	// own default value. [Default: 5s].
	ICMPTimeout *projectcalicov3.BPFConntrackTimeout `json:"icmpTimeout,omitempty"`
}

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

// WithCreationGracePeriod sets the CreationGracePeriod 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 CreationGracePeriod field is set to the value of the last call.
func (b *BPFConntrackTimeoutsApplyConfiguration) WithCreationGracePeriod(value projectcalicov3.BPFConntrackTimeout) *BPFConntrackTimeoutsApplyConfiguration {
	b.CreationGracePeriod = &value
	return b
}

// WithTCPSynSent sets the TCPSynSent 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 TCPSynSent field is set to the value of the last call.
func (b *BPFConntrackTimeoutsApplyConfiguration) WithTCPSynSent(value projectcalicov3.BPFConntrackTimeout) *BPFConntrackTimeoutsApplyConfiguration {
	b.TCPSynSent = &value
	return b
}

// WithTCPEstablished sets the TCPEstablished 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 TCPEstablished field is set to the value of the last call.
func (b *BPFConntrackTimeoutsApplyConfiguration) WithTCPEstablished(value projectcalicov3.BPFConntrackTimeout) *BPFConntrackTimeoutsApplyConfiguration {
	b.TCPEstablished = &value
	return b
}

// WithTCPFinsSeen sets the TCPFinsSeen 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 TCPFinsSeen field is set to the value of the last call.
func (b *BPFConntrackTimeoutsApplyConfiguration) WithTCPFinsSeen(value projectcalicov3.BPFConntrackTimeout) *BPFConntrackTimeoutsApplyConfiguration {
	b.TCPFinsSeen = &value
	return b
}

// WithTCPResetSeen sets the TCPResetSeen 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 TCPResetSeen field is set to the value of the last call.
func (b *BPFConntrackTimeoutsApplyConfiguration) WithTCPResetSeen(value projectcalicov3.BPFConntrackTimeout) *BPFConntrackTimeoutsApplyConfiguration {
	b.TCPResetSeen = &value
	return b
}

// WithUDPTimeout sets the UDPTimeout 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 UDPTimeout field is set to the value of the last call.
func (b *BPFConntrackTimeoutsApplyConfiguration) WithUDPTimeout(value projectcalicov3.BPFConntrackTimeout) *BPFConntrackTimeoutsApplyConfiguration {
	b.UDPTimeout = &value
	return b
}

// WithGenericTimeout sets the GenericTimeout 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 GenericTimeout field is set to the value of the last call.
func (b *BPFConntrackTimeoutsApplyConfiguration) WithGenericTimeout(value projectcalicov3.BPFConntrackTimeout) *BPFConntrackTimeoutsApplyConfiguration {
	b.GenericTimeout = &value
	return b
}

// WithICMPTimeout sets the ICMPTimeout 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 ICMPTimeout field is set to the value of the last call.
func (b *BPFConntrackTimeoutsApplyConfiguration) WithICMPTimeout(value projectcalicov3.BPFConntrackTimeout) *BPFConntrackTimeoutsApplyConfiguration {
	b.ICMPTimeout = &value
	return b
}
