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

package v1

// StaticIPAMConfigApplyConfiguration represents a declarative configuration of the StaticIPAMConfig type for use
// with apply.
//
// StaticIPAMConfig contains configurations for static IPAM (IP Address Management)
type StaticIPAMConfigApplyConfiguration struct {
	// addresses configures IP address for the interface
	Addresses []StaticIPAMAddressesApplyConfiguration `json:"addresses,omitempty"`
	// routes configures IP routes for the interface
	Routes []StaticIPAMRoutesApplyConfiguration `json:"routes,omitempty"`
	// dns configures DNS for the interface
	DNS *StaticIPAMDNSApplyConfiguration `json:"dns,omitempty"`
}

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

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

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

// WithDNS sets the DNS 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 DNS field is set to the value of the last call.
func (b *StaticIPAMConfigApplyConfiguration) WithDNS(value *StaticIPAMDNSApplyConfiguration) *StaticIPAMConfigApplyConfiguration {
	b.DNS = value
	return b
}
