-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodel_fly_http_options.go
More file actions
270 lines (224 loc) · 7.35 KB
/
model_fly_http_options.go
File metadata and controls
270 lines (224 loc) · 7.35 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
/*
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 FlyHTTPOptions type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &FlyHTTPOptions{}
// FlyHTTPOptions struct for FlyHTTPOptions
type FlyHTTPOptions struct {
Compress *bool `json:"compress,omitempty"`
H2Backend *bool `json:"h2_backend,omitempty"`
HeadersReadTimeout *int64 `json:"headers_read_timeout,omitempty"`
IdleTimeout *int64 `json:"idle_timeout,omitempty"`
Response *FlyHTTPResponseOptions `json:"response,omitempty"`
}
// NewFlyHTTPOptions instantiates a new FlyHTTPOptions 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 NewFlyHTTPOptions() *FlyHTTPOptions {
this := FlyHTTPOptions{}
return &this
}
// NewFlyHTTPOptionsWithDefaults instantiates a new FlyHTTPOptions 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 NewFlyHTTPOptionsWithDefaults() *FlyHTTPOptions {
this := FlyHTTPOptions{}
return &this
}
// GetCompress returns the Compress field value if set, zero value otherwise.
func (o *FlyHTTPOptions) GetCompress() bool {
if o == nil || IsNil(o.Compress) {
var ret bool
return ret
}
return *o.Compress
}
// GetCompressOk returns a tuple with the Compress field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FlyHTTPOptions) GetCompressOk() (*bool, bool) {
if o == nil || IsNil(o.Compress) {
return nil, false
}
return o.Compress, true
}
// HasCompress returns a boolean if a field has been set.
func (o *FlyHTTPOptions) HasCompress() bool {
if o != nil && !IsNil(o.Compress) {
return true
}
return false
}
// SetCompress gets a reference to the given bool and assigns it to the Compress field.
func (o *FlyHTTPOptions) SetCompress(v bool) {
o.Compress = &v
}
// GetH2Backend returns the H2Backend field value if set, zero value otherwise.
func (o *FlyHTTPOptions) GetH2Backend() bool {
if o == nil || IsNil(o.H2Backend) {
var ret bool
return ret
}
return *o.H2Backend
}
// GetH2BackendOk returns a tuple with the H2Backend field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FlyHTTPOptions) GetH2BackendOk() (*bool, bool) {
if o == nil || IsNil(o.H2Backend) {
return nil, false
}
return o.H2Backend, true
}
// HasH2Backend returns a boolean if a field has been set.
func (o *FlyHTTPOptions) HasH2Backend() bool {
if o != nil && !IsNil(o.H2Backend) {
return true
}
return false
}
// SetH2Backend gets a reference to the given bool and assigns it to the H2Backend field.
func (o *FlyHTTPOptions) SetH2Backend(v bool) {
o.H2Backend = &v
}
// GetHeadersReadTimeout returns the HeadersReadTimeout field value if set, zero value otherwise.
func (o *FlyHTTPOptions) GetHeadersReadTimeout() int64 {
if o == nil || IsNil(o.HeadersReadTimeout) {
var ret int64
return ret
}
return *o.HeadersReadTimeout
}
// GetHeadersReadTimeoutOk returns a tuple with the HeadersReadTimeout field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FlyHTTPOptions) GetHeadersReadTimeoutOk() (*int64, bool) {
if o == nil || IsNil(o.HeadersReadTimeout) {
return nil, false
}
return o.HeadersReadTimeout, true
}
// HasHeadersReadTimeout returns a boolean if a field has been set.
func (o *FlyHTTPOptions) HasHeadersReadTimeout() bool {
if o != nil && !IsNil(o.HeadersReadTimeout) {
return true
}
return false
}
// SetHeadersReadTimeout gets a reference to the given int64 and assigns it to the HeadersReadTimeout field.
func (o *FlyHTTPOptions) SetHeadersReadTimeout(v int64) {
o.HeadersReadTimeout = &v
}
// GetIdleTimeout returns the IdleTimeout field value if set, zero value otherwise.
func (o *FlyHTTPOptions) GetIdleTimeout() int64 {
if o == nil || IsNil(o.IdleTimeout) {
var ret int64
return ret
}
return *o.IdleTimeout
}
// GetIdleTimeoutOk returns a tuple with the IdleTimeout field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FlyHTTPOptions) GetIdleTimeoutOk() (*int64, bool) {
if o == nil || IsNil(o.IdleTimeout) {
return nil, false
}
return o.IdleTimeout, true
}
// HasIdleTimeout returns a boolean if a field has been set.
func (o *FlyHTTPOptions) HasIdleTimeout() bool {
if o != nil && !IsNil(o.IdleTimeout) {
return true
}
return false
}
// SetIdleTimeout gets a reference to the given int64 and assigns it to the IdleTimeout field.
func (o *FlyHTTPOptions) SetIdleTimeout(v int64) {
o.IdleTimeout = &v
}
// GetResponse returns the Response field value if set, zero value otherwise.
func (o *FlyHTTPOptions) GetResponse() FlyHTTPResponseOptions {
if o == nil || IsNil(o.Response) {
var ret FlyHTTPResponseOptions
return ret
}
return *o.Response
}
// GetResponseOk returns a tuple with the Response field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FlyHTTPOptions) GetResponseOk() (*FlyHTTPResponseOptions, bool) {
if o == nil || IsNil(o.Response) {
return nil, false
}
return o.Response, true
}
// HasResponse returns a boolean if a field has been set.
func (o *FlyHTTPOptions) HasResponse() bool {
if o != nil && !IsNil(o.Response) {
return true
}
return false
}
// SetResponse gets a reference to the given FlyHTTPResponseOptions and assigns it to the Response field.
func (o *FlyHTTPOptions) SetResponse(v FlyHTTPResponseOptions) {
o.Response = &v
}
func (o FlyHTTPOptions) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o FlyHTTPOptions) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Compress) {
toSerialize["compress"] = o.Compress
}
if !IsNil(o.H2Backend) {
toSerialize["h2_backend"] = o.H2Backend
}
if !IsNil(o.HeadersReadTimeout) {
toSerialize["headers_read_timeout"] = o.HeadersReadTimeout
}
if !IsNil(o.IdleTimeout) {
toSerialize["idle_timeout"] = o.IdleTimeout
}
if !IsNil(o.Response) {
toSerialize["response"] = o.Response
}
return toSerialize, nil
}
type NullableFlyHTTPOptions struct {
value *FlyHTTPOptions
isSet bool
}
func (v NullableFlyHTTPOptions) Get() *FlyHTTPOptions {
return v.value
}
func (v *NullableFlyHTTPOptions) Set(val *FlyHTTPOptions) {
v.value = val
v.isSet = true
}
func (v NullableFlyHTTPOptions) IsSet() bool {
return v.isSet
}
func (v *NullableFlyHTTPOptions) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableFlyHTTPOptions(val *FlyHTTPOptions) *NullableFlyHTTPOptions {
return &NullableFlyHTTPOptions{value: val, isSet: true}
}
func (v NullableFlyHTTPOptions) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableFlyHTTPOptions) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}