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

package v1

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

// NetworkMigrationApplyConfiguration represents a declarative configuration of the NetworkMigration type for use
// with apply.
//
// NetworkMigration represents the cluster network migration configuration.
type NetworkMigrationApplyConfiguration struct {
	// mtu contains the MTU migration configuration. Set this to allow changing
	// the MTU values for the default network. If unset, the operation of
	// changing the MTU for the default network will be rejected.
	MTU *MTUMigrationApplyConfiguration `json:"mtu,omitempty"`
	// networkType was previously used when changing the default network type.
	// DEPRECATED: network type migration is no longer supported, and setting
	// this to a non-empty value will result in the network operator rejecting
	// the configuration.
	NetworkType *string `json:"networkType,omitempty"`
	// features was previously used to configure which network plugin features
	// would be migrated in a network type migration.
	// DEPRECATED: network type migration is no longer supported, and setting
	// this to a non-empty value will result in the network operator rejecting
	// the configuration.
	Features *FeaturesMigrationApplyConfiguration `json:"features,omitempty"`
	// mode indicates the mode of network type migration.
	// DEPRECATED: network type migration is no longer supported, and setting
	// this to a non-empty value will result in the network operator rejecting
	// the configuration.
	Mode *operatorv1.NetworkMigrationMode `json:"mode,omitempty"`
}

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

// WithMTU sets the MTU 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 MTU field is set to the value of the last call.
func (b *NetworkMigrationApplyConfiguration) WithMTU(value *MTUMigrationApplyConfiguration) *NetworkMigrationApplyConfiguration {
	b.MTU = value
	return b
}

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

// WithFeatures sets the Features 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 Features field is set to the value of the last call.
func (b *NetworkMigrationApplyConfiguration) WithFeatures(value *FeaturesMigrationApplyConfiguration) *NetworkMigrationApplyConfiguration {
	b.Features = value
	return b
}

// 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 *NetworkMigrationApplyConfiguration) WithMode(value operatorv1.NetworkMigrationMode) *NetworkMigrationApplyConfiguration {
	b.Mode = &value
	return b
}
