github.com/containers/podman/v4@v4.9.4/pkg/bindings/generate/types_systemd_options.go (about) 1 // Code generated by go generate; DO NOT EDIT. 2 package generate 3 4 import ( 5 "net/url" 6 7 "github.com/containers/podman/v4/pkg/bindings/internal/util" 8 ) 9 10 // Changed returns true if named field has been set 11 func (o *SystemdOptions) Changed(fieldName string) bool { 12 return util.Changed(o, fieldName) 13 } 14 15 // ToParams formats struct fields to be passed to API service 16 func (o *SystemdOptions) ToParams() (url.Values, error) { 17 return util.ToParams(o) 18 } 19 20 // WithUseName set field UseName to given value 21 func (o *SystemdOptions) WithUseName(value bool) *SystemdOptions { 22 o.UseName = &value 23 return o 24 } 25 26 // GetUseName returns value of field UseName 27 func (o *SystemdOptions) GetUseName() bool { 28 if o.UseName == nil { 29 var z bool 30 return z 31 } 32 return *o.UseName 33 } 34 35 // WithNew set field New to given value 36 func (o *SystemdOptions) WithNew(value bool) *SystemdOptions { 37 o.New = &value 38 return o 39 } 40 41 // GetNew returns value of field New 42 func (o *SystemdOptions) GetNew() bool { 43 if o.New == nil { 44 var z bool 45 return z 46 } 47 return *o.New 48 } 49 50 // WithNoHeader set field NoHeader to given value 51 func (o *SystemdOptions) WithNoHeader(value bool) *SystemdOptions { 52 o.NoHeader = &value 53 return o 54 } 55 56 // GetNoHeader returns value of field NoHeader 57 func (o *SystemdOptions) GetNoHeader() bool { 58 if o.NoHeader == nil { 59 var z bool 60 return z 61 } 62 return *o.NoHeader 63 } 64 65 // WithTemplateUnitFile set field TemplateUnitFile to given value 66 func (o *SystemdOptions) WithTemplateUnitFile(value bool) *SystemdOptions { 67 o.TemplateUnitFile = &value 68 return o 69 } 70 71 // GetTemplateUnitFile returns value of field TemplateUnitFile 72 func (o *SystemdOptions) GetTemplateUnitFile() bool { 73 if o.TemplateUnitFile == nil { 74 var z bool 75 return z 76 } 77 return *o.TemplateUnitFile 78 } 79 80 // WithRestartPolicy set field RestartPolicy to given value 81 func (o *SystemdOptions) WithRestartPolicy(value string) *SystemdOptions { 82 o.RestartPolicy = &value 83 return o 84 } 85 86 // GetRestartPolicy returns value of field RestartPolicy 87 func (o *SystemdOptions) GetRestartPolicy() string { 88 if o.RestartPolicy == nil { 89 var z string 90 return z 91 } 92 return *o.RestartPolicy 93 } 94 95 // WithRestartSec set field RestartSec to given value 96 func (o *SystemdOptions) WithRestartSec(value uint) *SystemdOptions { 97 o.RestartSec = &value 98 return o 99 } 100 101 // GetRestartSec returns value of field RestartSec 102 func (o *SystemdOptions) GetRestartSec() uint { 103 if o.RestartSec == nil { 104 var z uint 105 return z 106 } 107 return *o.RestartSec 108 } 109 110 // WithStartTimeout set field StartTimeout to given value 111 func (o *SystemdOptions) WithStartTimeout(value uint) *SystemdOptions { 112 o.StartTimeout = &value 113 return o 114 } 115 116 // GetStartTimeout returns value of field StartTimeout 117 func (o *SystemdOptions) GetStartTimeout() uint { 118 if o.StartTimeout == nil { 119 var z uint 120 return z 121 } 122 return *o.StartTimeout 123 } 124 125 // WithStopTimeout set field StopTimeout to given value 126 func (o *SystemdOptions) WithStopTimeout(value uint) *SystemdOptions { 127 o.StopTimeout = &value 128 return o 129 } 130 131 // GetStopTimeout returns value of field StopTimeout 132 func (o *SystemdOptions) GetStopTimeout() uint { 133 if o.StopTimeout == nil { 134 var z uint 135 return z 136 } 137 return *o.StopTimeout 138 } 139 140 // WithContainerPrefix set field ContainerPrefix to given value 141 func (o *SystemdOptions) WithContainerPrefix(value string) *SystemdOptions { 142 o.ContainerPrefix = &value 143 return o 144 } 145 146 // GetContainerPrefix returns value of field ContainerPrefix 147 func (o *SystemdOptions) GetContainerPrefix() string { 148 if o.ContainerPrefix == nil { 149 var z string 150 return z 151 } 152 return *o.ContainerPrefix 153 } 154 155 // WithPodPrefix set field PodPrefix to given value 156 func (o *SystemdOptions) WithPodPrefix(value string) *SystemdOptions { 157 o.PodPrefix = &value 158 return o 159 } 160 161 // GetPodPrefix returns value of field PodPrefix 162 func (o *SystemdOptions) GetPodPrefix() string { 163 if o.PodPrefix == nil { 164 var z string 165 return z 166 } 167 return *o.PodPrefix 168 } 169 170 // WithSeparator set field Separator to given value 171 func (o *SystemdOptions) WithSeparator(value string) *SystemdOptions { 172 o.Separator = &value 173 return o 174 } 175 176 // GetSeparator returns value of field Separator 177 func (o *SystemdOptions) GetSeparator() string { 178 if o.Separator == nil { 179 var z string 180 return z 181 } 182 return *o.Separator 183 } 184 185 // WithWants set field Wants to given value 186 func (o *SystemdOptions) WithWants(value []string) *SystemdOptions { 187 o.Wants = &value 188 return o 189 } 190 191 // GetWants returns value of field Wants 192 func (o *SystemdOptions) GetWants() []string { 193 if o.Wants == nil { 194 var z []string 195 return z 196 } 197 return *o.Wants 198 } 199 200 // WithAfter set field After to given value 201 func (o *SystemdOptions) WithAfter(value []string) *SystemdOptions { 202 o.After = &value 203 return o 204 } 205 206 // GetAfter returns value of field After 207 func (o *SystemdOptions) GetAfter() []string { 208 if o.After == nil { 209 var z []string 210 return z 211 } 212 return *o.After 213 } 214 215 // WithRequires set field Requires to given value 216 func (o *SystemdOptions) WithRequires(value []string) *SystemdOptions { 217 o.Requires = &value 218 return o 219 } 220 221 // GetRequires returns value of field Requires 222 func (o *SystemdOptions) GetRequires() []string { 223 if o.Requires == nil { 224 var z []string 225 return z 226 } 227 return *o.Requires 228 } 229 230 // WithAdditionalEnvVariables set field AdditionalEnvVariables to given value 231 func (o *SystemdOptions) WithAdditionalEnvVariables(value []string) *SystemdOptions { 232 o.AdditionalEnvVariables = &value 233 return o 234 } 235 236 // GetAdditionalEnvVariables returns value of field AdditionalEnvVariables 237 func (o *SystemdOptions) GetAdditionalEnvVariables() []string { 238 if o.AdditionalEnvVariables == nil { 239 var z []string 240 return z 241 } 242 return *o.AdditionalEnvVariables 243 }