-
Notifications
You must be signed in to change notification settings - Fork 8
/
model_limits.go
523 lines (442 loc) · 18 KB
/
model_limits.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
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
/*
Apicurio Registry API [v2]
Apicurio Registry is a datastore for standard event schemas and API designs. Apicurio Registry enables developers to manage and share the structure of their data using a REST interface. For example, client applications can dynamically push or pull the latest updates to or from the registry without needing to redeploy. Apicurio Registry also enables developers to create rules that govern how registry content can evolve over time. For example, this includes rules for content validation and version compatibility. The Apicurio Registry REST API enables client applications to manage the artifacts in the registry. This API provides create, read, update, and delete operations for schema and API artifacts, rules, versions, and metadata. The supported artifact types include: - Apache Avro schema - AsyncAPI specification - Google protocol buffers - GraphQL schema - JSON Schema - Kafka Connect schema - OpenAPI specification - Web Services Description Language - XML Schema Definition **Important**: The Apicurio Registry REST API is available from `https://MY-REGISTRY-URL/apis/registry/v2` by default. Therefore you must prefix all API operation paths with `../apis/registry/v2` in this case. For example: `../apis/registry/v2/ids/globalIds/{globalId}`.
API version: 2.4.x
Contact: [email protected]
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package registryclient
import (
"encoding/json"
)
// checks if the Limits type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &Limits{}
// Limits List of limitations on used resources, that are applied on the current instance of Registry. Keys represent the resource type and are suffixed by the corresponding unit. Values are integers. Only non-negative values are allowed, with the exception of -1, which means that the limit is not applied.
type Limits struct {
MaxTotalSchemasCount *int64 `json:"maxTotalSchemasCount,omitempty"`
MaxSchemaSizeBytes *int64 `json:"maxSchemaSizeBytes,omitempty"`
MaxArtifactsCount *int64 `json:"maxArtifactsCount,omitempty"`
MaxVersionsPerArtifactCount *int64 `json:"maxVersionsPerArtifactCount,omitempty"`
MaxArtifactPropertiesCount *int64 `json:"maxArtifactPropertiesCount,omitempty"`
MaxPropertyKeySizeBytes *int64 `json:"maxPropertyKeySizeBytes,omitempty"`
MaxPropertyValueSizeBytes *int64 `json:"maxPropertyValueSizeBytes,omitempty"`
MaxArtifactLabelsCount *int64 `json:"maxArtifactLabelsCount,omitempty"`
MaxLabelSizeBytes *int64 `json:"maxLabelSizeBytes,omitempty"`
MaxArtifactNameLengthChars *int64 `json:"maxArtifactNameLengthChars,omitempty"`
MaxArtifactDescriptionLengthChars *int64 `json:"maxArtifactDescriptionLengthChars,omitempty"`
MaxRequestsPerSecondCount *int64 `json:"maxRequestsPerSecondCount,omitempty"`
}
// NewLimits instantiates a new Limits 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 NewLimits() *Limits {
this := Limits{}
return &this
}
// NewLimitsWithDefaults instantiates a new Limits 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 NewLimitsWithDefaults() *Limits {
this := Limits{}
return &this
}
// GetMaxTotalSchemasCount returns the MaxTotalSchemasCount field value if set, zero value otherwise.
func (o *Limits) GetMaxTotalSchemasCount() int64 {
if o == nil || IsNil(o.MaxTotalSchemasCount) {
var ret int64
return ret
}
return *o.MaxTotalSchemasCount
}
// GetMaxTotalSchemasCountOk returns a tuple with the MaxTotalSchemasCount field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Limits) GetMaxTotalSchemasCountOk() (*int64, bool) {
if o == nil || IsNil(o.MaxTotalSchemasCount) {
return nil, false
}
return o.MaxTotalSchemasCount, true
}
// HasMaxTotalSchemasCount returns a boolean if a field has been set.
func (o *Limits) HasMaxTotalSchemasCount() bool {
if o != nil && !IsNil(o.MaxTotalSchemasCount) {
return true
}
return false
}
// SetMaxTotalSchemasCount gets a reference to the given int64 and assigns it to the MaxTotalSchemasCount field.
func (o *Limits) SetMaxTotalSchemasCount(v int64) {
o.MaxTotalSchemasCount = &v
}
// GetMaxSchemaSizeBytes returns the MaxSchemaSizeBytes field value if set, zero value otherwise.
func (o *Limits) GetMaxSchemaSizeBytes() int64 {
if o == nil || IsNil(o.MaxSchemaSizeBytes) {
var ret int64
return ret
}
return *o.MaxSchemaSizeBytes
}
// GetMaxSchemaSizeBytesOk returns a tuple with the MaxSchemaSizeBytes field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Limits) GetMaxSchemaSizeBytesOk() (*int64, bool) {
if o == nil || IsNil(o.MaxSchemaSizeBytes) {
return nil, false
}
return o.MaxSchemaSizeBytes, true
}
// HasMaxSchemaSizeBytes returns a boolean if a field has been set.
func (o *Limits) HasMaxSchemaSizeBytes() bool {
if o != nil && !IsNil(o.MaxSchemaSizeBytes) {
return true
}
return false
}
// SetMaxSchemaSizeBytes gets a reference to the given int64 and assigns it to the MaxSchemaSizeBytes field.
func (o *Limits) SetMaxSchemaSizeBytes(v int64) {
o.MaxSchemaSizeBytes = &v
}
// GetMaxArtifactsCount returns the MaxArtifactsCount field value if set, zero value otherwise.
func (o *Limits) GetMaxArtifactsCount() int64 {
if o == nil || IsNil(o.MaxArtifactsCount) {
var ret int64
return ret
}
return *o.MaxArtifactsCount
}
// GetMaxArtifactsCountOk returns a tuple with the MaxArtifactsCount field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Limits) GetMaxArtifactsCountOk() (*int64, bool) {
if o == nil || IsNil(o.MaxArtifactsCount) {
return nil, false
}
return o.MaxArtifactsCount, true
}
// HasMaxArtifactsCount returns a boolean if a field has been set.
func (o *Limits) HasMaxArtifactsCount() bool {
if o != nil && !IsNil(o.MaxArtifactsCount) {
return true
}
return false
}
// SetMaxArtifactsCount gets a reference to the given int64 and assigns it to the MaxArtifactsCount field.
func (o *Limits) SetMaxArtifactsCount(v int64) {
o.MaxArtifactsCount = &v
}
// GetMaxVersionsPerArtifactCount returns the MaxVersionsPerArtifactCount field value if set, zero value otherwise.
func (o *Limits) GetMaxVersionsPerArtifactCount() int64 {
if o == nil || IsNil(o.MaxVersionsPerArtifactCount) {
var ret int64
return ret
}
return *o.MaxVersionsPerArtifactCount
}
// GetMaxVersionsPerArtifactCountOk returns a tuple with the MaxVersionsPerArtifactCount field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Limits) GetMaxVersionsPerArtifactCountOk() (*int64, bool) {
if o == nil || IsNil(o.MaxVersionsPerArtifactCount) {
return nil, false
}
return o.MaxVersionsPerArtifactCount, true
}
// HasMaxVersionsPerArtifactCount returns a boolean if a field has been set.
func (o *Limits) HasMaxVersionsPerArtifactCount() bool {
if o != nil && !IsNil(o.MaxVersionsPerArtifactCount) {
return true
}
return false
}
// SetMaxVersionsPerArtifactCount gets a reference to the given int64 and assigns it to the MaxVersionsPerArtifactCount field.
func (o *Limits) SetMaxVersionsPerArtifactCount(v int64) {
o.MaxVersionsPerArtifactCount = &v
}
// GetMaxArtifactPropertiesCount returns the MaxArtifactPropertiesCount field value if set, zero value otherwise.
func (o *Limits) GetMaxArtifactPropertiesCount() int64 {
if o == nil || IsNil(o.MaxArtifactPropertiesCount) {
var ret int64
return ret
}
return *o.MaxArtifactPropertiesCount
}
// GetMaxArtifactPropertiesCountOk returns a tuple with the MaxArtifactPropertiesCount field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Limits) GetMaxArtifactPropertiesCountOk() (*int64, bool) {
if o == nil || IsNil(o.MaxArtifactPropertiesCount) {
return nil, false
}
return o.MaxArtifactPropertiesCount, true
}
// HasMaxArtifactPropertiesCount returns a boolean if a field has been set.
func (o *Limits) HasMaxArtifactPropertiesCount() bool {
if o != nil && !IsNil(o.MaxArtifactPropertiesCount) {
return true
}
return false
}
// SetMaxArtifactPropertiesCount gets a reference to the given int64 and assigns it to the MaxArtifactPropertiesCount field.
func (o *Limits) SetMaxArtifactPropertiesCount(v int64) {
o.MaxArtifactPropertiesCount = &v
}
// GetMaxPropertyKeySizeBytes returns the MaxPropertyKeySizeBytes field value if set, zero value otherwise.
func (o *Limits) GetMaxPropertyKeySizeBytes() int64 {
if o == nil || IsNil(o.MaxPropertyKeySizeBytes) {
var ret int64
return ret
}
return *o.MaxPropertyKeySizeBytes
}
// GetMaxPropertyKeySizeBytesOk returns a tuple with the MaxPropertyKeySizeBytes field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Limits) GetMaxPropertyKeySizeBytesOk() (*int64, bool) {
if o == nil || IsNil(o.MaxPropertyKeySizeBytes) {
return nil, false
}
return o.MaxPropertyKeySizeBytes, true
}
// HasMaxPropertyKeySizeBytes returns a boolean if a field has been set.
func (o *Limits) HasMaxPropertyKeySizeBytes() bool {
if o != nil && !IsNil(o.MaxPropertyKeySizeBytes) {
return true
}
return false
}
// SetMaxPropertyKeySizeBytes gets a reference to the given int64 and assigns it to the MaxPropertyKeySizeBytes field.
func (o *Limits) SetMaxPropertyKeySizeBytes(v int64) {
o.MaxPropertyKeySizeBytes = &v
}
// GetMaxPropertyValueSizeBytes returns the MaxPropertyValueSizeBytes field value if set, zero value otherwise.
func (o *Limits) GetMaxPropertyValueSizeBytes() int64 {
if o == nil || IsNil(o.MaxPropertyValueSizeBytes) {
var ret int64
return ret
}
return *o.MaxPropertyValueSizeBytes
}
// GetMaxPropertyValueSizeBytesOk returns a tuple with the MaxPropertyValueSizeBytes field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Limits) GetMaxPropertyValueSizeBytesOk() (*int64, bool) {
if o == nil || IsNil(o.MaxPropertyValueSizeBytes) {
return nil, false
}
return o.MaxPropertyValueSizeBytes, true
}
// HasMaxPropertyValueSizeBytes returns a boolean if a field has been set.
func (o *Limits) HasMaxPropertyValueSizeBytes() bool {
if o != nil && !IsNil(o.MaxPropertyValueSizeBytes) {
return true
}
return false
}
// SetMaxPropertyValueSizeBytes gets a reference to the given int64 and assigns it to the MaxPropertyValueSizeBytes field.
func (o *Limits) SetMaxPropertyValueSizeBytes(v int64) {
o.MaxPropertyValueSizeBytes = &v
}
// GetMaxArtifactLabelsCount returns the MaxArtifactLabelsCount field value if set, zero value otherwise.
func (o *Limits) GetMaxArtifactLabelsCount() int64 {
if o == nil || IsNil(o.MaxArtifactLabelsCount) {
var ret int64
return ret
}
return *o.MaxArtifactLabelsCount
}
// GetMaxArtifactLabelsCountOk returns a tuple with the MaxArtifactLabelsCount field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Limits) GetMaxArtifactLabelsCountOk() (*int64, bool) {
if o == nil || IsNil(o.MaxArtifactLabelsCount) {
return nil, false
}
return o.MaxArtifactLabelsCount, true
}
// HasMaxArtifactLabelsCount returns a boolean if a field has been set.
func (o *Limits) HasMaxArtifactLabelsCount() bool {
if o != nil && !IsNil(o.MaxArtifactLabelsCount) {
return true
}
return false
}
// SetMaxArtifactLabelsCount gets a reference to the given int64 and assigns it to the MaxArtifactLabelsCount field.
func (o *Limits) SetMaxArtifactLabelsCount(v int64) {
o.MaxArtifactLabelsCount = &v
}
// GetMaxLabelSizeBytes returns the MaxLabelSizeBytes field value if set, zero value otherwise.
func (o *Limits) GetMaxLabelSizeBytes() int64 {
if o == nil || IsNil(o.MaxLabelSizeBytes) {
var ret int64
return ret
}
return *o.MaxLabelSizeBytes
}
// GetMaxLabelSizeBytesOk returns a tuple with the MaxLabelSizeBytes field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Limits) GetMaxLabelSizeBytesOk() (*int64, bool) {
if o == nil || IsNil(o.MaxLabelSizeBytes) {
return nil, false
}
return o.MaxLabelSizeBytes, true
}
// HasMaxLabelSizeBytes returns a boolean if a field has been set.
func (o *Limits) HasMaxLabelSizeBytes() bool {
if o != nil && !IsNil(o.MaxLabelSizeBytes) {
return true
}
return false
}
// SetMaxLabelSizeBytes gets a reference to the given int64 and assigns it to the MaxLabelSizeBytes field.
func (o *Limits) SetMaxLabelSizeBytes(v int64) {
o.MaxLabelSizeBytes = &v
}
// GetMaxArtifactNameLengthChars returns the MaxArtifactNameLengthChars field value if set, zero value otherwise.
func (o *Limits) GetMaxArtifactNameLengthChars() int64 {
if o == nil || IsNil(o.MaxArtifactNameLengthChars) {
var ret int64
return ret
}
return *o.MaxArtifactNameLengthChars
}
// GetMaxArtifactNameLengthCharsOk returns a tuple with the MaxArtifactNameLengthChars field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Limits) GetMaxArtifactNameLengthCharsOk() (*int64, bool) {
if o == nil || IsNil(o.MaxArtifactNameLengthChars) {
return nil, false
}
return o.MaxArtifactNameLengthChars, true
}
// HasMaxArtifactNameLengthChars returns a boolean if a field has been set.
func (o *Limits) HasMaxArtifactNameLengthChars() bool {
if o != nil && !IsNil(o.MaxArtifactNameLengthChars) {
return true
}
return false
}
// SetMaxArtifactNameLengthChars gets a reference to the given int64 and assigns it to the MaxArtifactNameLengthChars field.
func (o *Limits) SetMaxArtifactNameLengthChars(v int64) {
o.MaxArtifactNameLengthChars = &v
}
// GetMaxArtifactDescriptionLengthChars returns the MaxArtifactDescriptionLengthChars field value if set, zero value otherwise.
func (o *Limits) GetMaxArtifactDescriptionLengthChars() int64 {
if o == nil || IsNil(o.MaxArtifactDescriptionLengthChars) {
var ret int64
return ret
}
return *o.MaxArtifactDescriptionLengthChars
}
// GetMaxArtifactDescriptionLengthCharsOk returns a tuple with the MaxArtifactDescriptionLengthChars field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Limits) GetMaxArtifactDescriptionLengthCharsOk() (*int64, bool) {
if o == nil || IsNil(o.MaxArtifactDescriptionLengthChars) {
return nil, false
}
return o.MaxArtifactDescriptionLengthChars, true
}
// HasMaxArtifactDescriptionLengthChars returns a boolean if a field has been set.
func (o *Limits) HasMaxArtifactDescriptionLengthChars() bool {
if o != nil && !IsNil(o.MaxArtifactDescriptionLengthChars) {
return true
}
return false
}
// SetMaxArtifactDescriptionLengthChars gets a reference to the given int64 and assigns it to the MaxArtifactDescriptionLengthChars field.
func (o *Limits) SetMaxArtifactDescriptionLengthChars(v int64) {
o.MaxArtifactDescriptionLengthChars = &v
}
// GetMaxRequestsPerSecondCount returns the MaxRequestsPerSecondCount field value if set, zero value otherwise.
func (o *Limits) GetMaxRequestsPerSecondCount() int64 {
if o == nil || IsNil(o.MaxRequestsPerSecondCount) {
var ret int64
return ret
}
return *o.MaxRequestsPerSecondCount
}
// GetMaxRequestsPerSecondCountOk returns a tuple with the MaxRequestsPerSecondCount field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Limits) GetMaxRequestsPerSecondCountOk() (*int64, bool) {
if o == nil || IsNil(o.MaxRequestsPerSecondCount) {
return nil, false
}
return o.MaxRequestsPerSecondCount, true
}
// HasMaxRequestsPerSecondCount returns a boolean if a field has been set.
func (o *Limits) HasMaxRequestsPerSecondCount() bool {
if o != nil && !IsNil(o.MaxRequestsPerSecondCount) {
return true
}
return false
}
// SetMaxRequestsPerSecondCount gets a reference to the given int64 and assigns it to the MaxRequestsPerSecondCount field.
func (o *Limits) SetMaxRequestsPerSecondCount(v int64) {
o.MaxRequestsPerSecondCount = &v
}
func (o Limits) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o Limits) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.MaxTotalSchemasCount) {
toSerialize["maxTotalSchemasCount"] = o.MaxTotalSchemasCount
}
if !IsNil(o.MaxSchemaSizeBytes) {
toSerialize["maxSchemaSizeBytes"] = o.MaxSchemaSizeBytes
}
if !IsNil(o.MaxArtifactsCount) {
toSerialize["maxArtifactsCount"] = o.MaxArtifactsCount
}
if !IsNil(o.MaxVersionsPerArtifactCount) {
toSerialize["maxVersionsPerArtifactCount"] = o.MaxVersionsPerArtifactCount
}
if !IsNil(o.MaxArtifactPropertiesCount) {
toSerialize["maxArtifactPropertiesCount"] = o.MaxArtifactPropertiesCount
}
if !IsNil(o.MaxPropertyKeySizeBytes) {
toSerialize["maxPropertyKeySizeBytes"] = o.MaxPropertyKeySizeBytes
}
if !IsNil(o.MaxPropertyValueSizeBytes) {
toSerialize["maxPropertyValueSizeBytes"] = o.MaxPropertyValueSizeBytes
}
if !IsNil(o.MaxArtifactLabelsCount) {
toSerialize["maxArtifactLabelsCount"] = o.MaxArtifactLabelsCount
}
if !IsNil(o.MaxLabelSizeBytes) {
toSerialize["maxLabelSizeBytes"] = o.MaxLabelSizeBytes
}
if !IsNil(o.MaxArtifactNameLengthChars) {
toSerialize["maxArtifactNameLengthChars"] = o.MaxArtifactNameLengthChars
}
if !IsNil(o.MaxArtifactDescriptionLengthChars) {
toSerialize["maxArtifactDescriptionLengthChars"] = o.MaxArtifactDescriptionLengthChars
}
if !IsNil(o.MaxRequestsPerSecondCount) {
toSerialize["maxRequestsPerSecondCount"] = o.MaxRequestsPerSecondCount
}
return toSerialize, nil
}
type NullableLimits struct {
value *Limits
isSet bool
}
func (v NullableLimits) Get() *Limits {
return v.value
}
func (v *NullableLimits) Set(val *Limits) {
v.value = val
v.isSet = true
}
func (v NullableLimits) IsSet() bool {
return v.isSet
}
func (v *NullableLimits) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableLimits(val *Limits) *NullableLimits {
return &NullableLimits{value: val, isSet: true}
}
func (v NullableLimits) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableLimits) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}