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

package v1

import (
	operatorv1 "github.com/openshift/api/operator/v1"
)

// GatewayConfigApplyConfiguration represents a declarative configuration of the GatewayConfig type for use
// with apply.
//
// GatewayConfig holds node gateway-related parsed config file parameters and command-line overrides
type GatewayConfigApplyConfiguration struct {
	// routingViaHost allows pod egress traffic to exit via the ovn-k8s-mp0 management port
	// into the host before sending it out. If this is not set, traffic will always egress directly
	// from OVN to outside without touching the host stack. Setting this to true means hardware
	// offload will not be supported. Default is false if GatewayConfig is specified.
	RoutingViaHost *bool `json:"routingViaHost,omitempty"`
	// ipForwarding controls IP forwarding for all traffic on OVN-Kubernetes managed interfaces (such as br-ex).
	// By default this is set to Restricted, and Kubernetes related traffic is still forwarded appropriately, but other
	// IP traffic will not be routed by the OCP node. If there is a desire to allow the host to forward traffic across
	// OVN-Kubernetes managed interfaces, then set this field to "Global".
	// The supported values are "Restricted" and "Global".
	IPForwarding *operatorv1.IPForwardingMode `json:"ipForwarding,omitempty"`
	// ipv4 allows users to configure IP settings for IPv4 connections. When omitted, this means no opinion and the default
	// configuration is used. Check individual members fields within ipv4 for details of default values.
	IPv4 *IPv4GatewayConfigApplyConfiguration `json:"ipv4,omitempty"`
	// ipv6 allows users to configure IP settings for IPv6 connections. When omitted, this means no opinion and the default
	// configuration is used. Check individual members fields within ipv6 for details of default values.
	IPv6 *IPv6GatewayConfigApplyConfiguration `json:"ipv6,omitempty"`
}

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

// WithRoutingViaHost sets the RoutingViaHost 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 RoutingViaHost field is set to the value of the last call.
func (b *GatewayConfigApplyConfiguration) WithRoutingViaHost(value bool) *GatewayConfigApplyConfiguration {
	b.RoutingViaHost = &value
	return b
}

// WithIPForwarding sets the IPForwarding 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 IPForwarding field is set to the value of the last call.
func (b *GatewayConfigApplyConfiguration) WithIPForwarding(value operatorv1.IPForwardingMode) *GatewayConfigApplyConfiguration {
	b.IPForwarding = &value
	return b
}

// WithIPv4 sets the IPv4 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 IPv4 field is set to the value of the last call.
func (b *GatewayConfigApplyConfiguration) WithIPv4(value *IPv4GatewayConfigApplyConfiguration) *GatewayConfigApplyConfiguration {
	b.IPv4 = value
	return b
}

// WithIPv6 sets the IPv6 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 IPv6 field is set to the value of the last call.
func (b *GatewayConfigApplyConfiguration) WithIPv6(value *IPv6GatewayConfigApplyConfiguration) *GatewayConfigApplyConfiguration {
	b.IPv6 = value
	return b
}
