// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1 // StaticIPAMConfigApplyConfiguration represents an declarative configuration of the StaticIPAMConfig type for use // with apply. type StaticIPAMConfigApplyConfiguration struct { Addresses []StaticIPAMAddressesApplyConfiguration `json:"addresses,omitempty"` Routes []StaticIPAMRoutesApplyConfiguration `json:"routes,omitempty"` DNS *StaticIPAMDNSApplyConfiguration `json:"dns,omitempty"` } // StaticIPAMConfigApplyConfiguration constructs an 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 }