-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodel_fly_http_healthcheck.go
More file actions
349 lines (293 loc) · 9.59 KB
/
model_fly_http_healthcheck.go
File metadata and controls
349 lines (293 loc) · 9.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
/*
Machines API
This site hosts documentation generated from the Fly.io Machines API OpenAPI specification. Visit our complete [Machines API docs](https://fly.io/docs/machines/api/) for how to get started, more information about each endpoint, parameter descriptions, and examples.
API version: 1.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package machines
import (
"encoding/json"
)
// checks if the FlyHTTPHealthcheck type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &FlyHTTPHealthcheck{}
// FlyHTTPHealthcheck struct for FlyHTTPHealthcheck
type FlyHTTPHealthcheck struct {
// Additional headers to send with the request
Headers []FlyMachineHTTPHeader `json:"headers,omitempty"`
// The HTTP method to use to when making the request
Method *string `json:"method,omitempty"`
// The path to send the request to
Path *string `json:"path,omitempty"`
// The port to connect to, often the same as internal_port
Port *int64 `json:"port,omitempty"`
// Whether to use http or https
Scheme *FlyContainerHealthcheckScheme `json:"scheme,omitempty"`
// If the protocol is https, the hostname to use for TLS certificate validation
TlsServerName *string `json:"tls_server_name,omitempty"`
// If the protocol is https, whether or not to verify the TLS certificate
TlsSkipVerify *bool `json:"tls_skip_verify,omitempty"`
}
// NewFlyHTTPHealthcheck instantiates a new FlyHTTPHealthcheck object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewFlyHTTPHealthcheck() *FlyHTTPHealthcheck {
this := FlyHTTPHealthcheck{}
return &this
}
// NewFlyHTTPHealthcheckWithDefaults instantiates a new FlyHTTPHealthcheck object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewFlyHTTPHealthcheckWithDefaults() *FlyHTTPHealthcheck {
this := FlyHTTPHealthcheck{}
return &this
}
// GetHeaders returns the Headers field value if set, zero value otherwise.
func (o *FlyHTTPHealthcheck) GetHeaders() []FlyMachineHTTPHeader {
if o == nil || IsNil(o.Headers) {
var ret []FlyMachineHTTPHeader
return ret
}
return o.Headers
}
// GetHeadersOk returns a tuple with the Headers field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FlyHTTPHealthcheck) GetHeadersOk() ([]FlyMachineHTTPHeader, bool) {
if o == nil || IsNil(o.Headers) {
return nil, false
}
return o.Headers, true
}
// HasHeaders returns a boolean if a field has been set.
func (o *FlyHTTPHealthcheck) HasHeaders() bool {
if o != nil && !IsNil(o.Headers) {
return true
}
return false
}
// SetHeaders gets a reference to the given []FlyMachineHTTPHeader and assigns it to the Headers field.
func (o *FlyHTTPHealthcheck) SetHeaders(v []FlyMachineHTTPHeader) {
o.Headers = v
}
// GetMethod returns the Method field value if set, zero value otherwise.
func (o *FlyHTTPHealthcheck) GetMethod() string {
if o == nil || IsNil(o.Method) {
var ret string
return ret
}
return *o.Method
}
// GetMethodOk returns a tuple with the Method field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FlyHTTPHealthcheck) GetMethodOk() (*string, bool) {
if o == nil || IsNil(o.Method) {
return nil, false
}
return o.Method, true
}
// HasMethod returns a boolean if a field has been set.
func (o *FlyHTTPHealthcheck) HasMethod() bool {
if o != nil && !IsNil(o.Method) {
return true
}
return false
}
// SetMethod gets a reference to the given string and assigns it to the Method field.
func (o *FlyHTTPHealthcheck) SetMethod(v string) {
o.Method = &v
}
// GetPath returns the Path field value if set, zero value otherwise.
func (o *FlyHTTPHealthcheck) GetPath() string {
if o == nil || IsNil(o.Path) {
var ret string
return ret
}
return *o.Path
}
// GetPathOk returns a tuple with the Path field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FlyHTTPHealthcheck) GetPathOk() (*string, bool) {
if o == nil || IsNil(o.Path) {
return nil, false
}
return o.Path, true
}
// HasPath returns a boolean if a field has been set.
func (o *FlyHTTPHealthcheck) HasPath() bool {
if o != nil && !IsNil(o.Path) {
return true
}
return false
}
// SetPath gets a reference to the given string and assigns it to the Path field.
func (o *FlyHTTPHealthcheck) SetPath(v string) {
o.Path = &v
}
// GetPort returns the Port field value if set, zero value otherwise.
func (o *FlyHTTPHealthcheck) GetPort() int64 {
if o == nil || IsNil(o.Port) {
var ret int64
return ret
}
return *o.Port
}
// GetPortOk returns a tuple with the Port field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FlyHTTPHealthcheck) GetPortOk() (*int64, bool) {
if o == nil || IsNil(o.Port) {
return nil, false
}
return o.Port, true
}
// HasPort returns a boolean if a field has been set.
func (o *FlyHTTPHealthcheck) HasPort() bool {
if o != nil && !IsNil(o.Port) {
return true
}
return false
}
// SetPort gets a reference to the given int64 and assigns it to the Port field.
func (o *FlyHTTPHealthcheck) SetPort(v int64) {
o.Port = &v
}
// GetScheme returns the Scheme field value if set, zero value otherwise.
func (o *FlyHTTPHealthcheck) GetScheme() FlyContainerHealthcheckScheme {
if o == nil || IsNil(o.Scheme) {
var ret FlyContainerHealthcheckScheme
return ret
}
return *o.Scheme
}
// GetSchemeOk returns a tuple with the Scheme field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FlyHTTPHealthcheck) GetSchemeOk() (*FlyContainerHealthcheckScheme, bool) {
if o == nil || IsNil(o.Scheme) {
return nil, false
}
return o.Scheme, true
}
// HasScheme returns a boolean if a field has been set.
func (o *FlyHTTPHealthcheck) HasScheme() bool {
if o != nil && !IsNil(o.Scheme) {
return true
}
return false
}
// SetScheme gets a reference to the given FlyContainerHealthcheckScheme and assigns it to the Scheme field.
func (o *FlyHTTPHealthcheck) SetScheme(v FlyContainerHealthcheckScheme) {
o.Scheme = &v
}
// GetTlsServerName returns the TlsServerName field value if set, zero value otherwise.
func (o *FlyHTTPHealthcheck) GetTlsServerName() string {
if o == nil || IsNil(o.TlsServerName) {
var ret string
return ret
}
return *o.TlsServerName
}
// GetTlsServerNameOk returns a tuple with the TlsServerName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FlyHTTPHealthcheck) GetTlsServerNameOk() (*string, bool) {
if o == nil || IsNil(o.TlsServerName) {
return nil, false
}
return o.TlsServerName, true
}
// HasTlsServerName returns a boolean if a field has been set.
func (o *FlyHTTPHealthcheck) HasTlsServerName() bool {
if o != nil && !IsNil(o.TlsServerName) {
return true
}
return false
}
// SetTlsServerName gets a reference to the given string and assigns it to the TlsServerName field.
func (o *FlyHTTPHealthcheck) SetTlsServerName(v string) {
o.TlsServerName = &v
}
// GetTlsSkipVerify returns the TlsSkipVerify field value if set, zero value otherwise.
func (o *FlyHTTPHealthcheck) GetTlsSkipVerify() bool {
if o == nil || IsNil(o.TlsSkipVerify) {
var ret bool
return ret
}
return *o.TlsSkipVerify
}
// GetTlsSkipVerifyOk returns a tuple with the TlsSkipVerify field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FlyHTTPHealthcheck) GetTlsSkipVerifyOk() (*bool, bool) {
if o == nil || IsNil(o.TlsSkipVerify) {
return nil, false
}
return o.TlsSkipVerify, true
}
// HasTlsSkipVerify returns a boolean if a field has been set.
func (o *FlyHTTPHealthcheck) HasTlsSkipVerify() bool {
if o != nil && !IsNil(o.TlsSkipVerify) {
return true
}
return false
}
// SetTlsSkipVerify gets a reference to the given bool and assigns it to the TlsSkipVerify field.
func (o *FlyHTTPHealthcheck) SetTlsSkipVerify(v bool) {
o.TlsSkipVerify = &v
}
func (o FlyHTTPHealthcheck) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o FlyHTTPHealthcheck) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Headers) {
toSerialize["headers"] = o.Headers
}
if !IsNil(o.Method) {
toSerialize["method"] = o.Method
}
if !IsNil(o.Path) {
toSerialize["path"] = o.Path
}
if !IsNil(o.Port) {
toSerialize["port"] = o.Port
}
if !IsNil(o.Scheme) {
toSerialize["scheme"] = o.Scheme
}
if !IsNil(o.TlsServerName) {
toSerialize["tls_server_name"] = o.TlsServerName
}
if !IsNil(o.TlsSkipVerify) {
toSerialize["tls_skip_verify"] = o.TlsSkipVerify
}
return toSerialize, nil
}
type NullableFlyHTTPHealthcheck struct {
value *FlyHTTPHealthcheck
isSet bool
}
func (v NullableFlyHTTPHealthcheck) Get() *FlyHTTPHealthcheck {
return v.value
}
func (v *NullableFlyHTTPHealthcheck) Set(val *FlyHTTPHealthcheck) {
v.value = val
v.isSet = true
}
func (v NullableFlyHTTPHealthcheck) IsSet() bool {
return v.isSet
}
func (v *NullableFlyHTTPHealthcheck) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableFlyHTTPHealthcheck(val *FlyHTTPHealthcheck) *NullableFlyHTTPHealthcheck {
return &NullableFlyHTTPHealthcheck{value: val, isSet: true}
}
func (v NullableFlyHTTPHealthcheck) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableFlyHTTPHealthcheck) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}