-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodel_stream_settings.go
616 lines (523 loc) · 18.8 KB
/
model_stream_settings.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
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
/*
openobserve
OpenObserve API documents [https://openobserve.ai/docs/](https://openobserve.ai/docs/)
API version: 0.14.5
Contact: hello@zinclabs.io
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package openapi
import (
"encoding/json"
)
// checks if the StreamSettings type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &StreamSettings{}
// StreamSettings struct for StreamSettings
type StreamSettings struct {
ApproxPartition *bool `json:"approx_partition,omitempty"`
BloomFilterFields []string `json:"bloom_filter_fields,omitempty"`
DataRetention *int64 `json:"data_retention,omitempty"`
DefinedSchemaFields []string `json:"defined_schema_fields,omitempty"`
DistinctValueFields []CustomFieldsOption `json:"distinct_value_fields,omitempty"`
ExtendedRetentionDays []any `json:"extended_retention_days,omitempty"`
FlattenLevel NullableInt64 `json:"flatten_level,omitempty"`
FullTextSearchKeys []string `json:"full_text_search_keys,omitempty"`
IndexFields []string `json:"index_fields,omitempty"`
IndexUpdatedAt *int64 `json:"index_updated_at,omitempty"`
MaxQueryRange *int64 `json:"max_query_range,omitempty"`
PartitionKeys []StreamPartition `json:"partition_keys,omitempty"`
PartitionTimeLevel NullablePartitionTimeLevel `json:"partition_time_level,omitempty"`
StoreOriginalData *bool `json:"store_original_data,omitempty"`
}
// NewStreamSettings instantiates a new StreamSettings 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 NewStreamSettings() *StreamSettings {
this := StreamSettings{}
return &this
}
// NewStreamSettingsWithDefaults instantiates a new StreamSettings 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 NewStreamSettingsWithDefaults() *StreamSettings {
this := StreamSettings{}
return &this
}
// GetApproxPartition returns the ApproxPartition field value if set, zero value otherwise.
func (o *StreamSettings) GetApproxPartition() bool {
if o == nil || IsNil(o.ApproxPartition) {
var ret bool
return ret
}
return *o.ApproxPartition
}
// GetApproxPartitionOk returns a tuple with the ApproxPartition field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *StreamSettings) GetApproxPartitionOk() (*bool, bool) {
if o == nil || IsNil(o.ApproxPartition) {
return nil, false
}
return o.ApproxPartition, true
}
// HasApproxPartition returns a boolean if a field has been set.
func (o *StreamSettings) HasApproxPartition() bool {
if o != nil && !IsNil(o.ApproxPartition) {
return true
}
return false
}
// SetApproxPartition gets a reference to the given bool and assigns it to the ApproxPartition field.
func (o *StreamSettings) SetApproxPartition(v bool) {
o.ApproxPartition = &v
}
// GetBloomFilterFields returns the BloomFilterFields field value if set, zero value otherwise.
func (o *StreamSettings) GetBloomFilterFields() []string {
if o == nil || IsNil(o.BloomFilterFields) {
var ret []string
return ret
}
return o.BloomFilterFields
}
// GetBloomFilterFieldsOk returns a tuple with the BloomFilterFields field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *StreamSettings) GetBloomFilterFieldsOk() ([]string, bool) {
if o == nil || IsNil(o.BloomFilterFields) {
return nil, false
}
return o.BloomFilterFields, true
}
// HasBloomFilterFields returns a boolean if a field has been set.
func (o *StreamSettings) HasBloomFilterFields() bool {
if o != nil && !IsNil(o.BloomFilterFields) {
return true
}
return false
}
// SetBloomFilterFields gets a reference to the given []string and assigns it to the BloomFilterFields field.
func (o *StreamSettings) SetBloomFilterFields(v []string) {
o.BloomFilterFields = v
}
// GetDataRetention returns the DataRetention field value if set, zero value otherwise.
func (o *StreamSettings) GetDataRetention() int64 {
if o == nil || IsNil(o.DataRetention) {
var ret int64
return ret
}
return *o.DataRetention
}
// GetDataRetentionOk returns a tuple with the DataRetention field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *StreamSettings) GetDataRetentionOk() (*int64, bool) {
if o == nil || IsNil(o.DataRetention) {
return nil, false
}
return o.DataRetention, true
}
// HasDataRetention returns a boolean if a field has been set.
func (o *StreamSettings) HasDataRetention() bool {
if o != nil && !IsNil(o.DataRetention) {
return true
}
return false
}
// SetDataRetention gets a reference to the given int64 and assigns it to the DataRetention field.
func (o *StreamSettings) SetDataRetention(v int64) {
o.DataRetention = &v
}
// GetDefinedSchemaFields returns the DefinedSchemaFields field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *StreamSettings) GetDefinedSchemaFields() []string {
if o == nil {
var ret []string
return ret
}
return o.DefinedSchemaFields
}
// GetDefinedSchemaFieldsOk returns a tuple with the DefinedSchemaFields field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *StreamSettings) GetDefinedSchemaFieldsOk() ([]string, bool) {
if o == nil || IsNil(o.DefinedSchemaFields) {
return nil, false
}
return o.DefinedSchemaFields, true
}
// HasDefinedSchemaFields returns a boolean if a field has been set.
func (o *StreamSettings) HasDefinedSchemaFields() bool {
if o != nil && !IsNil(o.DefinedSchemaFields) {
return true
}
return false
}
// SetDefinedSchemaFields gets a reference to the given []string and assigns it to the DefinedSchemaFields field.
func (o *StreamSettings) SetDefinedSchemaFields(v []string) {
o.DefinedSchemaFields = v
}
// GetDistinctValueFields returns the DistinctValueFields field value if set, zero value otherwise.
func (o *StreamSettings) GetDistinctValueFields() []CustomFieldsOption {
if o == nil || IsNil(o.DistinctValueFields) {
var ret []CustomFieldsOption
return ret
}
return o.DistinctValueFields
}
// GetDistinctValueFieldsOk returns a tuple with the DistinctValueFields field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *StreamSettings) GetDistinctValueFieldsOk() ([]CustomFieldsOption, bool) {
if o == nil || IsNil(o.DistinctValueFields) {
return nil, false
}
return o.DistinctValueFields, true
}
// HasDistinctValueFields returns a boolean if a field has been set.
func (o *StreamSettings) HasDistinctValueFields() bool {
if o != nil && !IsNil(o.DistinctValueFields) {
return true
}
return false
}
// SetDistinctValueFields gets a reference to the given []CustomFieldsOption and assigns it to the DistinctValueFields field.
func (o *StreamSettings) SetDistinctValueFields(v []CustomFieldsOption) {
o.DistinctValueFields = v
}
// GetExtendedRetentionDays returns the ExtendedRetentionDays field value if set, zero value otherwise.
func (o *StreamSettings) GetExtendedRetentionDays() []any {
if o == nil || IsNil(o.ExtendedRetentionDays) {
var ret []any
return ret
}
return o.ExtendedRetentionDays
}
// GetExtendedRetentionDaysOk returns a tuple with the ExtendedRetentionDays field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *StreamSettings) GetExtendedRetentionDaysOk() ([]any, bool) {
if o == nil || IsNil(o.ExtendedRetentionDays) {
return nil, false
}
return o.ExtendedRetentionDays, true
}
// HasExtendedRetentionDays returns a boolean if a field has been set.
func (o *StreamSettings) HasExtendedRetentionDays() bool {
if o != nil && !IsNil(o.ExtendedRetentionDays) {
return true
}
return false
}
// SetExtendedRetentionDays gets a reference to the given []any and assigns it to the ExtendedRetentionDays field.
func (o *StreamSettings) SetExtendedRetentionDays(v []any) {
o.ExtendedRetentionDays = v
}
// GetFlattenLevel returns the FlattenLevel field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *StreamSettings) GetFlattenLevel() int64 {
if o == nil || IsNil(o.FlattenLevel.Get()) {
var ret int64
return ret
}
return *o.FlattenLevel.Get()
}
// GetFlattenLevelOk returns a tuple with the FlattenLevel field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *StreamSettings) GetFlattenLevelOk() (*int64, bool) {
if o == nil {
return nil, false
}
return o.FlattenLevel.Get(), o.FlattenLevel.IsSet()
}
// HasFlattenLevel returns a boolean if a field has been set.
func (o *StreamSettings) HasFlattenLevel() bool {
if o != nil && o.FlattenLevel.IsSet() {
return true
}
return false
}
// SetFlattenLevel gets a reference to the given NullableInt64 and assigns it to the FlattenLevel field.
func (o *StreamSettings) SetFlattenLevel(v int64) {
o.FlattenLevel.Set(&v)
}
// SetFlattenLevelNil sets the value for FlattenLevel to be an explicit nil
func (o *StreamSettings) SetFlattenLevelNil() {
o.FlattenLevel.Set(nil)
}
// UnsetFlattenLevel ensures that no value is present for FlattenLevel, not even an explicit nil
func (o *StreamSettings) UnsetFlattenLevel() {
o.FlattenLevel.Unset()
}
// GetFullTextSearchKeys returns the FullTextSearchKeys field value if set, zero value otherwise.
func (o *StreamSettings) GetFullTextSearchKeys() []string {
if o == nil || IsNil(o.FullTextSearchKeys) {
var ret []string
return ret
}
return o.FullTextSearchKeys
}
// GetFullTextSearchKeysOk returns a tuple with the FullTextSearchKeys field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *StreamSettings) GetFullTextSearchKeysOk() ([]string, bool) {
if o == nil || IsNil(o.FullTextSearchKeys) {
return nil, false
}
return o.FullTextSearchKeys, true
}
// HasFullTextSearchKeys returns a boolean if a field has been set.
func (o *StreamSettings) HasFullTextSearchKeys() bool {
if o != nil && !IsNil(o.FullTextSearchKeys) {
return true
}
return false
}
// SetFullTextSearchKeys gets a reference to the given []string and assigns it to the FullTextSearchKeys field.
func (o *StreamSettings) SetFullTextSearchKeys(v []string) {
o.FullTextSearchKeys = v
}
// GetIndexFields returns the IndexFields field value if set, zero value otherwise.
func (o *StreamSettings) GetIndexFields() []string {
if o == nil || IsNil(o.IndexFields) {
var ret []string
return ret
}
return o.IndexFields
}
// GetIndexFieldsOk returns a tuple with the IndexFields field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *StreamSettings) GetIndexFieldsOk() ([]string, bool) {
if o == nil || IsNil(o.IndexFields) {
return nil, false
}
return o.IndexFields, true
}
// HasIndexFields returns a boolean if a field has been set.
func (o *StreamSettings) HasIndexFields() bool {
if o != nil && !IsNil(o.IndexFields) {
return true
}
return false
}
// SetIndexFields gets a reference to the given []string and assigns it to the IndexFields field.
func (o *StreamSettings) SetIndexFields(v []string) {
o.IndexFields = v
}
// GetIndexUpdatedAt returns the IndexUpdatedAt field value if set, zero value otherwise.
func (o *StreamSettings) GetIndexUpdatedAt() int64 {
if o == nil || IsNil(o.IndexUpdatedAt) {
var ret int64
return ret
}
return *o.IndexUpdatedAt
}
// GetIndexUpdatedAtOk returns a tuple with the IndexUpdatedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *StreamSettings) GetIndexUpdatedAtOk() (*int64, bool) {
if o == nil || IsNil(o.IndexUpdatedAt) {
return nil, false
}
return o.IndexUpdatedAt, true
}
// HasIndexUpdatedAt returns a boolean if a field has been set.
func (o *StreamSettings) HasIndexUpdatedAt() bool {
if o != nil && !IsNil(o.IndexUpdatedAt) {
return true
}
return false
}
// SetIndexUpdatedAt gets a reference to the given int64 and assigns it to the IndexUpdatedAt field.
func (o *StreamSettings) SetIndexUpdatedAt(v int64) {
o.IndexUpdatedAt = &v
}
// GetMaxQueryRange returns the MaxQueryRange field value if set, zero value otherwise.
func (o *StreamSettings) GetMaxQueryRange() int64 {
if o == nil || IsNil(o.MaxQueryRange) {
var ret int64
return ret
}
return *o.MaxQueryRange
}
// GetMaxQueryRangeOk returns a tuple with the MaxQueryRange field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *StreamSettings) GetMaxQueryRangeOk() (*int64, bool) {
if o == nil || IsNil(o.MaxQueryRange) {
return nil, false
}
return o.MaxQueryRange, true
}
// HasMaxQueryRange returns a boolean if a field has been set.
func (o *StreamSettings) HasMaxQueryRange() bool {
if o != nil && !IsNil(o.MaxQueryRange) {
return true
}
return false
}
// SetMaxQueryRange gets a reference to the given int64 and assigns it to the MaxQueryRange field.
func (o *StreamSettings) SetMaxQueryRange(v int64) {
o.MaxQueryRange = &v
}
// GetPartitionKeys returns the PartitionKeys field value if set, zero value otherwise.
func (o *StreamSettings) GetPartitionKeys() []StreamPartition {
if o == nil || IsNil(o.PartitionKeys) {
var ret []StreamPartition
return ret
}
return o.PartitionKeys
}
// GetPartitionKeysOk returns a tuple with the PartitionKeys field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *StreamSettings) GetPartitionKeysOk() ([]StreamPartition, bool) {
if o == nil || IsNil(o.PartitionKeys) {
return nil, false
}
return o.PartitionKeys, true
}
// HasPartitionKeys returns a boolean if a field has been set.
func (o *StreamSettings) HasPartitionKeys() bool {
if o != nil && !IsNil(o.PartitionKeys) {
return true
}
return false
}
// SetPartitionKeys gets a reference to the given []StreamPartition and assigns it to the PartitionKeys field.
func (o *StreamSettings) SetPartitionKeys(v []StreamPartition) {
o.PartitionKeys = v
}
// GetPartitionTimeLevel returns the PartitionTimeLevel field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *StreamSettings) GetPartitionTimeLevel() PartitionTimeLevel {
if o == nil || IsNil(o.PartitionTimeLevel.Get()) {
var ret PartitionTimeLevel
return ret
}
return *o.PartitionTimeLevel.Get()
}
// GetPartitionTimeLevelOk returns a tuple with the PartitionTimeLevel field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *StreamSettings) GetPartitionTimeLevelOk() (*PartitionTimeLevel, bool) {
if o == nil {
return nil, false
}
return o.PartitionTimeLevel.Get(), o.PartitionTimeLevel.IsSet()
}
// HasPartitionTimeLevel returns a boolean if a field has been set.
func (o *StreamSettings) HasPartitionTimeLevel() bool {
if o != nil && o.PartitionTimeLevel.IsSet() {
return true
}
return false
}
// SetPartitionTimeLevel gets a reference to the given NullablePartitionTimeLevel and assigns it to the PartitionTimeLevel field.
func (o *StreamSettings) SetPartitionTimeLevel(v PartitionTimeLevel) {
o.PartitionTimeLevel.Set(&v)
}
// SetPartitionTimeLevelNil sets the value for PartitionTimeLevel to be an explicit nil
func (o *StreamSettings) SetPartitionTimeLevelNil() {
o.PartitionTimeLevel.Set(nil)
}
// UnsetPartitionTimeLevel ensures that no value is present for PartitionTimeLevel, not even an explicit nil
func (o *StreamSettings) UnsetPartitionTimeLevel() {
o.PartitionTimeLevel.Unset()
}
// GetStoreOriginalData returns the StoreOriginalData field value if set, zero value otherwise.
func (o *StreamSettings) GetStoreOriginalData() bool {
if o == nil || IsNil(o.StoreOriginalData) {
var ret bool
return ret
}
return *o.StoreOriginalData
}
// GetStoreOriginalDataOk returns a tuple with the StoreOriginalData field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *StreamSettings) GetStoreOriginalDataOk() (*bool, bool) {
if o == nil || IsNil(o.StoreOriginalData) {
return nil, false
}
return o.StoreOriginalData, true
}
// HasStoreOriginalData returns a boolean if a field has been set.
func (o *StreamSettings) HasStoreOriginalData() bool {
if o != nil && !IsNil(o.StoreOriginalData) {
return true
}
return false
}
// SetStoreOriginalData gets a reference to the given bool and assigns it to the StoreOriginalData field.
func (o *StreamSettings) SetStoreOriginalData(v bool) {
o.StoreOriginalData = &v
}
func (o StreamSettings) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o StreamSettings) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.ApproxPartition) {
toSerialize["approx_partition"] = o.ApproxPartition
}
if !IsNil(o.BloomFilterFields) {
toSerialize["bloom_filter_fields"] = o.BloomFilterFields
}
if !IsNil(o.DataRetention) {
toSerialize["data_retention"] = o.DataRetention
}
if o.DefinedSchemaFields != nil {
toSerialize["defined_schema_fields"] = o.DefinedSchemaFields
}
if !IsNil(o.DistinctValueFields) {
toSerialize["distinct_value_fields"] = o.DistinctValueFields
}
if !IsNil(o.ExtendedRetentionDays) {
toSerialize["extended_retention_days"] = o.ExtendedRetentionDays
}
if o.FlattenLevel.IsSet() {
toSerialize["flatten_level"] = o.FlattenLevel.Get()
}
if !IsNil(o.FullTextSearchKeys) {
toSerialize["full_text_search_keys"] = o.FullTextSearchKeys
}
if !IsNil(o.IndexFields) {
toSerialize["index_fields"] = o.IndexFields
}
if !IsNil(o.IndexUpdatedAt) {
toSerialize["index_updated_at"] = o.IndexUpdatedAt
}
if !IsNil(o.MaxQueryRange) {
toSerialize["max_query_range"] = o.MaxQueryRange
}
if !IsNil(o.PartitionKeys) {
toSerialize["partition_keys"] = o.PartitionKeys
}
if o.PartitionTimeLevel.IsSet() {
toSerialize["partition_time_level"] = o.PartitionTimeLevel.Get()
}
if !IsNil(o.StoreOriginalData) {
toSerialize["store_original_data"] = o.StoreOriginalData
}
return toSerialize, nil
}
type NullableStreamSettings struct {
value *StreamSettings
isSet bool
}
func (v NullableStreamSettings) Get() *StreamSettings {
return v.value
}
func (v *NullableStreamSettings) Set(val *StreamSettings) {
v.value = val
v.isSet = true
}
func (v NullableStreamSettings) IsSet() bool {
return v.isSet
}
func (v *NullableStreamSettings) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableStreamSettings(val *StreamSettings) *NullableStreamSettings {
return &NullableStreamSettings{value: val, isSet: true}
}
func (v NullableStreamSettings) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableStreamSettings) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}