diff options
Diffstat (limited to 'pkg/bindings/network/types_create_options.go')
-rw-r--r-- | pkg/bindings/network/types_create_options.go | 130 |
1 files changed, 58 insertions, 72 deletions
diff --git a/pkg/bindings/network/types_create_options.go b/pkg/bindings/network/types_create_options.go index 5746a5b1f..1b1afebc1 100644 --- a/pkg/bindings/network/types_create_options.go +++ b/pkg/bindings/network/types_create_options.go @@ -1,3 +1,4 @@ +// Code generated by go generate; DO NOT EDIT. package network import ( @@ -7,192 +8,177 @@ import ( "github.com/containers/podman/v3/pkg/bindings/internal/util" ) -/* -This file is generated automatically by go generate. Do not edit. -*/ - -// Changed +// Changed returns true if named field has been set func (o *CreateOptions) Changed(fieldName string) bool { return util.Changed(o, fieldName) } -// ToParams +// ToParams formats struct fields to be passed to API service func (o *CreateOptions) ToParams() (url.Values, error) { return util.ToParams(o) } -// WithDisableDNS +// WithDisableDNS set field DisableDNS to given value func (o *CreateOptions) WithDisableDNS(value bool) *CreateOptions { - v := &value - o.DisableDNS = v + o.DisableDNS = &value return o } -// GetDisableDNS +// GetDisableDNS returns value of field DisableDNS func (o *CreateOptions) GetDisableDNS() bool { - var disableDNS bool if o.DisableDNS == nil { - return disableDNS + var z bool + return z } return *o.DisableDNS } -// WithDriver +// WithDriver set field Driver to given value func (o *CreateOptions) WithDriver(value string) *CreateOptions { - v := &value - o.Driver = v + o.Driver = &value return o } -// GetDriver +// GetDriver returns value of field Driver func (o *CreateOptions) GetDriver() string { - var driver string if o.Driver == nil { - return driver + var z string + return z } return *o.Driver } -// WithGateway +// WithGateway set field Gateway to given value func (o *CreateOptions) WithGateway(value net.IP) *CreateOptions { - v := &value - o.Gateway = v + o.Gateway = &value return o } -// GetGateway +// GetGateway returns value of field Gateway func (o *CreateOptions) GetGateway() net.IP { - var gateway net.IP if o.Gateway == nil { - return gateway + var z net.IP + return z } return *o.Gateway } -// WithInternal +// WithInternal set field Internal to given value func (o *CreateOptions) WithInternal(value bool) *CreateOptions { - v := &value - o.Internal = v + o.Internal = &value return o } -// GetInternal +// GetInternal returns value of field Internal func (o *CreateOptions) GetInternal() bool { - var internal bool if o.Internal == nil { - return internal + var z bool + return z } return *o.Internal } -// WithLabels +// WithLabels set field Labels to given value func (o *CreateOptions) WithLabels(value map[string]string) *CreateOptions { - v := value - o.Labels = v + o.Labels = value return o } -// GetLabels +// GetLabels returns value of field Labels func (o *CreateOptions) GetLabels() map[string]string { - var labels map[string]string if o.Labels == nil { - return labels + var z map[string]string + return z } return o.Labels } -// WithMacVLAN +// WithMacVLAN set field MacVLAN to given value func (o *CreateOptions) WithMacVLAN(value string) *CreateOptions { - v := &value - o.MacVLAN = v + o.MacVLAN = &value return o } -// GetMacVLAN +// GetMacVLAN returns value of field MacVLAN func (o *CreateOptions) GetMacVLAN() string { - var macVLAN string if o.MacVLAN == nil { - return macVLAN + var z string + return z } return *o.MacVLAN } -// WithIPRange +// WithIPRange set field IPRange to given value func (o *CreateOptions) WithIPRange(value net.IPNet) *CreateOptions { - v := &value - o.IPRange = v + o.IPRange = &value return o } -// GetIPRange +// GetIPRange returns value of field IPRange func (o *CreateOptions) GetIPRange() net.IPNet { - var iPRange net.IPNet if o.IPRange == nil { - return iPRange + var z net.IPNet + return z } return *o.IPRange } -// WithSubnet +// WithSubnet set field Subnet to given value func (o *CreateOptions) WithSubnet(value net.IPNet) *CreateOptions { - v := &value - o.Subnet = v + o.Subnet = &value return o } -// GetSubnet +// GetSubnet returns value of field Subnet func (o *CreateOptions) GetSubnet() net.IPNet { - var subnet net.IPNet if o.Subnet == nil { - return subnet + var z net.IPNet + return z } return *o.Subnet } -// WithIPv6 +// WithIPv6 set field IPv6 to given value func (o *CreateOptions) WithIPv6(value bool) *CreateOptions { - v := &value - o.IPv6 = v + o.IPv6 = &value return o } -// GetIPv6 +// GetIPv6 returns value of field IPv6 func (o *CreateOptions) GetIPv6() bool { - var iPv6 bool if o.IPv6 == nil { - return iPv6 + var z bool + return z } return *o.IPv6 } -// WithOptions +// WithOptions set field Options to given value func (o *CreateOptions) WithOptions(value map[string]string) *CreateOptions { - v := value - o.Options = v + o.Options = value return o } -// GetOptions +// GetOptions returns value of field Options func (o *CreateOptions) GetOptions() map[string]string { - var options map[string]string if o.Options == nil { - return options + var z map[string]string + return z } return o.Options } -// WithName +// WithName set field Name to given value func (o *CreateOptions) WithName(value string) *CreateOptions { - v := &value - o.Name = v + o.Name = &value return o } -// GetName +// GetName returns value of field Name func (o *CreateOptions) GetName() string { - var name string if o.Name == nil { - return name + var z string + return z } return *o.Name } |