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

package v1

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

// SimpleMacvlanConfigApplyConfiguration represents a declarative configuration of the SimpleMacvlanConfig type for use
// with apply.
//
// SimpleMacvlanConfig contains configurations for macvlan interface.
type SimpleMacvlanConfigApplyConfiguration struct {
	// master is the host interface to create the macvlan interface from.
	// If not specified, it will be default route interface
	Master *string `json:"master,omitempty"`
	// ipamConfig configures IPAM module will be used for IP Address Management (IPAM).
	IPAMConfig *IPAMConfigApplyConfiguration `json:"ipamConfig,omitempty"`
	// mode is the macvlan mode: bridge, private, vepa, passthru. The default is bridge
	Mode *operatorv1.MacvlanMode `json:"mode,omitempty"`
	// mtu is the mtu to use for the macvlan interface. if unset, host's
	// kernel will select the value.
	MTU *uint32 `json:"mtu,omitempty"`
}

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

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

// WithIPAMConfig sets the IPAMConfig 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 IPAMConfig field is set to the value of the last call.
func (b *SimpleMacvlanConfigApplyConfiguration) WithIPAMConfig(value *IPAMConfigApplyConfiguration) *SimpleMacvlanConfigApplyConfiguration {
	b.IPAMConfig = 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 *SimpleMacvlanConfigApplyConfiguration) WithMode(value operatorv1.MacvlanMode) *SimpleMacvlanConfigApplyConfiguration {
	b.Mode = &value
	return b
}

// 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 *SimpleMacvlanConfigApplyConfiguration) WithMTU(value uint32) *SimpleMacvlanConfigApplyConfiguration {
	b.MTU = &value
	return b
}
