-
Notifications
You must be signed in to change notification settings - Fork 4
/
model_quotas.go
439 lines (370 loc) · 11.9 KB
/
model_quotas.go
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
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
/*
Koyeb Rest API
The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests.
API version: 1.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package koyeb
import (
"encoding/json"
)
// Quotas struct for Quotas
type Quotas struct {
Apps *string `json:"apps,omitempty"`
Services *string `json:"services,omitempty"`
Domains *string `json:"domains,omitempty"`
ServicesByApp *string `json:"services_by_app,omitempty"`
ServiceProvisioningConcurrency *string `json:"service_provisioning_concurrency,omitempty"`
MemoryMb *string `json:"memory_mb,omitempty"`
InstanceTypes []string `json:"instance_types,omitempty"`
Regions []string `json:"regions,omitempty"`
MaxOrganizationMembers *string `json:"max_organization_members,omitempty"`
MaxInstancesByType *map[string]string `json:"max_instances_by_type,omitempty"`
}
// NewQuotas instantiates a new Quotas 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 NewQuotas() *Quotas {
this := Quotas{}
return &this
}
// NewQuotasWithDefaults instantiates a new Quotas 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 NewQuotasWithDefaults() *Quotas {
this := Quotas{}
return &this
}
// GetApps returns the Apps field value if set, zero value otherwise.
func (o *Quotas) GetApps() string {
if o == nil || isNil(o.Apps) {
var ret string
return ret
}
return *o.Apps
}
// GetAppsOk returns a tuple with the Apps field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Quotas) GetAppsOk() (*string, bool) {
if o == nil || isNil(o.Apps) {
return nil, false
}
return o.Apps, true
}
// HasApps returns a boolean if a field has been set.
func (o *Quotas) HasApps() bool {
if o != nil && !isNil(o.Apps) {
return true
}
return false
}
// SetApps gets a reference to the given string and assigns it to the Apps field.
func (o *Quotas) SetApps(v string) {
o.Apps = &v
}
// GetServices returns the Services field value if set, zero value otherwise.
func (o *Quotas) GetServices() string {
if o == nil || isNil(o.Services) {
var ret string
return ret
}
return *o.Services
}
// GetServicesOk returns a tuple with the Services field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Quotas) GetServicesOk() (*string, bool) {
if o == nil || isNil(o.Services) {
return nil, false
}
return o.Services, true
}
// HasServices returns a boolean if a field has been set.
func (o *Quotas) HasServices() bool {
if o != nil && !isNil(o.Services) {
return true
}
return false
}
// SetServices gets a reference to the given string and assigns it to the Services field.
func (o *Quotas) SetServices(v string) {
o.Services = &v
}
// GetDomains returns the Domains field value if set, zero value otherwise.
func (o *Quotas) GetDomains() string {
if o == nil || isNil(o.Domains) {
var ret string
return ret
}
return *o.Domains
}
// GetDomainsOk returns a tuple with the Domains field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Quotas) GetDomainsOk() (*string, bool) {
if o == nil || isNil(o.Domains) {
return nil, false
}
return o.Domains, true
}
// HasDomains returns a boolean if a field has been set.
func (o *Quotas) HasDomains() bool {
if o != nil && !isNil(o.Domains) {
return true
}
return false
}
// SetDomains gets a reference to the given string and assigns it to the Domains field.
func (o *Quotas) SetDomains(v string) {
o.Domains = &v
}
// GetServicesByApp returns the ServicesByApp field value if set, zero value otherwise.
func (o *Quotas) GetServicesByApp() string {
if o == nil || isNil(o.ServicesByApp) {
var ret string
return ret
}
return *o.ServicesByApp
}
// GetServicesByAppOk returns a tuple with the ServicesByApp field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Quotas) GetServicesByAppOk() (*string, bool) {
if o == nil || isNil(o.ServicesByApp) {
return nil, false
}
return o.ServicesByApp, true
}
// HasServicesByApp returns a boolean if a field has been set.
func (o *Quotas) HasServicesByApp() bool {
if o != nil && !isNil(o.ServicesByApp) {
return true
}
return false
}
// SetServicesByApp gets a reference to the given string and assigns it to the ServicesByApp field.
func (o *Quotas) SetServicesByApp(v string) {
o.ServicesByApp = &v
}
// GetServiceProvisioningConcurrency returns the ServiceProvisioningConcurrency field value if set, zero value otherwise.
func (o *Quotas) GetServiceProvisioningConcurrency() string {
if o == nil || isNil(o.ServiceProvisioningConcurrency) {
var ret string
return ret
}
return *o.ServiceProvisioningConcurrency
}
// GetServiceProvisioningConcurrencyOk returns a tuple with the ServiceProvisioningConcurrency field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Quotas) GetServiceProvisioningConcurrencyOk() (*string, bool) {
if o == nil || isNil(o.ServiceProvisioningConcurrency) {
return nil, false
}
return o.ServiceProvisioningConcurrency, true
}
// HasServiceProvisioningConcurrency returns a boolean if a field has been set.
func (o *Quotas) HasServiceProvisioningConcurrency() bool {
if o != nil && !isNil(o.ServiceProvisioningConcurrency) {
return true
}
return false
}
// SetServiceProvisioningConcurrency gets a reference to the given string and assigns it to the ServiceProvisioningConcurrency field.
func (o *Quotas) SetServiceProvisioningConcurrency(v string) {
o.ServiceProvisioningConcurrency = &v
}
// GetMemoryMb returns the MemoryMb field value if set, zero value otherwise.
func (o *Quotas) GetMemoryMb() string {
if o == nil || isNil(o.MemoryMb) {
var ret string
return ret
}
return *o.MemoryMb
}
// GetMemoryMbOk returns a tuple with the MemoryMb field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Quotas) GetMemoryMbOk() (*string, bool) {
if o == nil || isNil(o.MemoryMb) {
return nil, false
}
return o.MemoryMb, true
}
// HasMemoryMb returns a boolean if a field has been set.
func (o *Quotas) HasMemoryMb() bool {
if o != nil && !isNil(o.MemoryMb) {
return true
}
return false
}
// SetMemoryMb gets a reference to the given string and assigns it to the MemoryMb field.
func (o *Quotas) SetMemoryMb(v string) {
o.MemoryMb = &v
}
// GetInstanceTypes returns the InstanceTypes field value if set, zero value otherwise.
func (o *Quotas) GetInstanceTypes() []string {
if o == nil || isNil(o.InstanceTypes) {
var ret []string
return ret
}
return o.InstanceTypes
}
// GetInstanceTypesOk returns a tuple with the InstanceTypes field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Quotas) GetInstanceTypesOk() ([]string, bool) {
if o == nil || isNil(o.InstanceTypes) {
return nil, false
}
return o.InstanceTypes, true
}
// HasInstanceTypes returns a boolean if a field has been set.
func (o *Quotas) HasInstanceTypes() bool {
if o != nil && !isNil(o.InstanceTypes) {
return true
}
return false
}
// SetInstanceTypes gets a reference to the given []string and assigns it to the InstanceTypes field.
func (o *Quotas) SetInstanceTypes(v []string) {
o.InstanceTypes = v
}
// GetRegions returns the Regions field value if set, zero value otherwise.
func (o *Quotas) GetRegions() []string {
if o == nil || isNil(o.Regions) {
var ret []string
return ret
}
return o.Regions
}
// GetRegionsOk returns a tuple with the Regions field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Quotas) GetRegionsOk() ([]string, bool) {
if o == nil || isNil(o.Regions) {
return nil, false
}
return o.Regions, true
}
// HasRegions returns a boolean if a field has been set.
func (o *Quotas) HasRegions() bool {
if o != nil && !isNil(o.Regions) {
return true
}
return false
}
// SetRegions gets a reference to the given []string and assigns it to the Regions field.
func (o *Quotas) SetRegions(v []string) {
o.Regions = v
}
// GetMaxOrganizationMembers returns the MaxOrganizationMembers field value if set, zero value otherwise.
func (o *Quotas) GetMaxOrganizationMembers() string {
if o == nil || isNil(o.MaxOrganizationMembers) {
var ret string
return ret
}
return *o.MaxOrganizationMembers
}
// GetMaxOrganizationMembersOk returns a tuple with the MaxOrganizationMembers field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Quotas) GetMaxOrganizationMembersOk() (*string, bool) {
if o == nil || isNil(o.MaxOrganizationMembers) {
return nil, false
}
return o.MaxOrganizationMembers, true
}
// HasMaxOrganizationMembers returns a boolean if a field has been set.
func (o *Quotas) HasMaxOrganizationMembers() bool {
if o != nil && !isNil(o.MaxOrganizationMembers) {
return true
}
return false
}
// SetMaxOrganizationMembers gets a reference to the given string and assigns it to the MaxOrganizationMembers field.
func (o *Quotas) SetMaxOrganizationMembers(v string) {
o.MaxOrganizationMembers = &v
}
// GetMaxInstancesByType returns the MaxInstancesByType field value if set, zero value otherwise.
func (o *Quotas) GetMaxInstancesByType() map[string]string {
if o == nil || isNil(o.MaxInstancesByType) {
var ret map[string]string
return ret
}
return *o.MaxInstancesByType
}
// GetMaxInstancesByTypeOk returns a tuple with the MaxInstancesByType field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Quotas) GetMaxInstancesByTypeOk() (*map[string]string, bool) {
if o == nil || isNil(o.MaxInstancesByType) {
return nil, false
}
return o.MaxInstancesByType, true
}
// HasMaxInstancesByType returns a boolean if a field has been set.
func (o *Quotas) HasMaxInstancesByType() bool {
if o != nil && !isNil(o.MaxInstancesByType) {
return true
}
return false
}
// SetMaxInstancesByType gets a reference to the given map[string]string and assigns it to the MaxInstancesByType field.
func (o *Quotas) SetMaxInstancesByType(v map[string]string) {
o.MaxInstancesByType = &v
}
func (o Quotas) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if !isNil(o.Apps) {
toSerialize["apps"] = o.Apps
}
if !isNil(o.Services) {
toSerialize["services"] = o.Services
}
if !isNil(o.Domains) {
toSerialize["domains"] = o.Domains
}
if !isNil(o.ServicesByApp) {
toSerialize["services_by_app"] = o.ServicesByApp
}
if !isNil(o.ServiceProvisioningConcurrency) {
toSerialize["service_provisioning_concurrency"] = o.ServiceProvisioningConcurrency
}
if !isNil(o.MemoryMb) {
toSerialize["memory_mb"] = o.MemoryMb
}
if !isNil(o.InstanceTypes) {
toSerialize["instance_types"] = o.InstanceTypes
}
if !isNil(o.Regions) {
toSerialize["regions"] = o.Regions
}
if !isNil(o.MaxOrganizationMembers) {
toSerialize["max_organization_members"] = o.MaxOrganizationMembers
}
if !isNil(o.MaxInstancesByType) {
toSerialize["max_instances_by_type"] = o.MaxInstancesByType
}
return json.Marshal(toSerialize)
}
type NullableQuotas struct {
value *Quotas
isSet bool
}
func (v NullableQuotas) Get() *Quotas {
return v.value
}
func (v *NullableQuotas) Set(val *Quotas) {
v.value = val
v.isSet = true
}
func (v NullableQuotas) IsSet() bool {
return v.isSet
}
func (v *NullableQuotas) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableQuotas(val *Quotas) *NullableQuotas {
return &NullableQuotas{value: val, isSet: true}
}
func (v NullableQuotas) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableQuotas) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}