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

package v1

import (
	configv1 "github.com/openshift/api/config/v1"
)

// NetworkDiagnosticsApplyConfiguration represents a declarative configuration of the NetworkDiagnostics type for use
// with apply.
//
// NetworkDiagnostics defines network diagnostics configuration
type NetworkDiagnosticsApplyConfiguration struct {
	// mode controls the network diagnostics mode
	//
	// When omitted, this means the user has no opinion and the platform is left
	// to choose reasonable defaults. These defaults are subject to change over time.
	// The current default is All.
	Mode *configv1.NetworkDiagnosticsMode `json:"mode,omitempty"`
	// sourcePlacement controls the scheduling of network diagnostics source deployment
	//
	// See NetworkDiagnosticsSourcePlacement for more details about default values.
	SourcePlacement *NetworkDiagnosticsSourcePlacementApplyConfiguration `json:"sourcePlacement,omitempty"`
	// targetPlacement controls the scheduling of network diagnostics target daemonset
	//
	// See NetworkDiagnosticsTargetPlacement for more details about default values.
	TargetPlacement *NetworkDiagnosticsTargetPlacementApplyConfiguration `json:"targetPlacement,omitempty"`
}

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

// WithMode sets the Mode 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 Mode field is set to the value of the last call.
func (b *NetworkDiagnosticsApplyConfiguration) WithMode(value configv1.NetworkDiagnosticsMode) *NetworkDiagnosticsApplyConfiguration {
	b.Mode = &value
	return b
}

// WithSourcePlacement sets the SourcePlacement 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 SourcePlacement field is set to the value of the last call.
func (b *NetworkDiagnosticsApplyConfiguration) WithSourcePlacement(value *NetworkDiagnosticsSourcePlacementApplyConfiguration) *NetworkDiagnosticsApplyConfiguration {
	b.SourcePlacement = value
	return b
}

// WithTargetPlacement sets the TargetPlacement 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 TargetPlacement field is set to the value of the last call.
func (b *NetworkDiagnosticsApplyConfiguration) WithTargetPlacement(value *NetworkDiagnosticsTargetPlacementApplyConfiguration) *NetworkDiagnosticsApplyConfiguration {
	b.TargetPlacement = value
	return b
}
