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

package v1

// HybridOverlayConfigApplyConfiguration represents a declarative configuration of the HybridOverlayConfig type for use
// with apply.
type HybridOverlayConfigApplyConfiguration struct {
	// hybridClusterNetwork defines a network space given to nodes on an additional overlay network.
	HybridClusterNetwork []ClusterNetworkEntryApplyConfiguration `json:"hybridClusterNetwork,omitempty"`
	// hybridOverlayVXLANPort defines the VXLAN port number to be used by the additional overlay network.
	// Default is 4789
	HybridOverlayVXLANPort *uint32 `json:"hybridOverlayVXLANPort,omitempty"`
}

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

// WithHybridClusterNetwork adds the given value to the HybridClusterNetwork 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 HybridClusterNetwork field.
func (b *HybridOverlayConfigApplyConfiguration) WithHybridClusterNetwork(values ...*ClusterNetworkEntryApplyConfiguration) *HybridOverlayConfigApplyConfiguration {
	for i := range values {
		if values[i] == nil {
			panic("nil value passed to WithHybridClusterNetwork")
		}
		b.HybridClusterNetwork = append(b.HybridClusterNetwork, *values[i])
	}
	return b
}

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