-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodel_scan_stats.go
383 lines (315 loc) · 9.2 KB
/
model_scan_stats.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
/*
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"
"bytes"
"fmt"
)
// checks if the ScanStats type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ScanStats{}
// ScanStats struct for ScanStats
type ScanStats struct {
CompressedSize int64 `json:"compressed_size"`
Files int64 `json:"files"`
IdxScanSize int64 `json:"idx_scan_size"`
IdxTook int64 `json:"idx_took"`
OriginalSize int64 `json:"original_size"`
QuerierDiskCachedFiles int64 `json:"querier_disk_cached_files"`
QuerierFiles int64 `json:"querier_files"`
QuerierMemoryCachedFiles int64 `json:"querier_memory_cached_files"`
Records int64 `json:"records"`
}
type _ScanStats ScanStats
// NewScanStats instantiates a new ScanStats 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 NewScanStats(compressedSize int64, files int64, idxScanSize int64, idxTook int64, originalSize int64, querierDiskCachedFiles int64, querierFiles int64, querierMemoryCachedFiles int64, records int64) *ScanStats {
this := ScanStats{}
this.CompressedSize = compressedSize
this.Files = files
this.IdxScanSize = idxScanSize
this.IdxTook = idxTook
this.OriginalSize = originalSize
this.QuerierDiskCachedFiles = querierDiskCachedFiles
this.QuerierFiles = querierFiles
this.QuerierMemoryCachedFiles = querierMemoryCachedFiles
this.Records = records
return &this
}
// NewScanStatsWithDefaults instantiates a new ScanStats 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 NewScanStatsWithDefaults() *ScanStats {
this := ScanStats{}
return &this
}
// GetCompressedSize returns the CompressedSize field value
func (o *ScanStats) GetCompressedSize() int64 {
if o == nil {
var ret int64
return ret
}
return o.CompressedSize
}
// GetCompressedSizeOk returns a tuple with the CompressedSize field value
// and a boolean to check if the value has been set.
func (o *ScanStats) GetCompressedSizeOk() (*int64, bool) {
if o == nil {
return nil, false
}
return &o.CompressedSize, true
}
// SetCompressedSize sets field value
func (o *ScanStats) SetCompressedSize(v int64) {
o.CompressedSize = v
}
// GetFiles returns the Files field value
func (o *ScanStats) GetFiles() int64 {
if o == nil {
var ret int64
return ret
}
return o.Files
}
// GetFilesOk returns a tuple with the Files field value
// and a boolean to check if the value has been set.
func (o *ScanStats) GetFilesOk() (*int64, bool) {
if o == nil {
return nil, false
}
return &o.Files, true
}
// SetFiles sets field value
func (o *ScanStats) SetFiles(v int64) {
o.Files = v
}
// GetIdxScanSize returns the IdxScanSize field value
func (o *ScanStats) GetIdxScanSize() int64 {
if o == nil {
var ret int64
return ret
}
return o.IdxScanSize
}
// GetIdxScanSizeOk returns a tuple with the IdxScanSize field value
// and a boolean to check if the value has been set.
func (o *ScanStats) GetIdxScanSizeOk() (*int64, bool) {
if o == nil {
return nil, false
}
return &o.IdxScanSize, true
}
// SetIdxScanSize sets field value
func (o *ScanStats) SetIdxScanSize(v int64) {
o.IdxScanSize = v
}
// GetIdxTook returns the IdxTook field value
func (o *ScanStats) GetIdxTook() int64 {
if o == nil {
var ret int64
return ret
}
return o.IdxTook
}
// GetIdxTookOk returns a tuple with the IdxTook field value
// and a boolean to check if the value has been set.
func (o *ScanStats) GetIdxTookOk() (*int64, bool) {
if o == nil {
return nil, false
}
return &o.IdxTook, true
}
// SetIdxTook sets field value
func (o *ScanStats) SetIdxTook(v int64) {
o.IdxTook = v
}
// GetOriginalSize returns the OriginalSize field value
func (o *ScanStats) GetOriginalSize() int64 {
if o == nil {
var ret int64
return ret
}
return o.OriginalSize
}
// GetOriginalSizeOk returns a tuple with the OriginalSize field value
// and a boolean to check if the value has been set.
func (o *ScanStats) GetOriginalSizeOk() (*int64, bool) {
if o == nil {
return nil, false
}
return &o.OriginalSize, true
}
// SetOriginalSize sets field value
func (o *ScanStats) SetOriginalSize(v int64) {
o.OriginalSize = v
}
// GetQuerierDiskCachedFiles returns the QuerierDiskCachedFiles field value
func (o *ScanStats) GetQuerierDiskCachedFiles() int64 {
if o == nil {
var ret int64
return ret
}
return o.QuerierDiskCachedFiles
}
// GetQuerierDiskCachedFilesOk returns a tuple with the QuerierDiskCachedFiles field value
// and a boolean to check if the value has been set.
func (o *ScanStats) GetQuerierDiskCachedFilesOk() (*int64, bool) {
if o == nil {
return nil, false
}
return &o.QuerierDiskCachedFiles, true
}
// SetQuerierDiskCachedFiles sets field value
func (o *ScanStats) SetQuerierDiskCachedFiles(v int64) {
o.QuerierDiskCachedFiles = v
}
// GetQuerierFiles returns the QuerierFiles field value
func (o *ScanStats) GetQuerierFiles() int64 {
if o == nil {
var ret int64
return ret
}
return o.QuerierFiles
}
// GetQuerierFilesOk returns a tuple with the QuerierFiles field value
// and a boolean to check if the value has been set.
func (o *ScanStats) GetQuerierFilesOk() (*int64, bool) {
if o == nil {
return nil, false
}
return &o.QuerierFiles, true
}
// SetQuerierFiles sets field value
func (o *ScanStats) SetQuerierFiles(v int64) {
o.QuerierFiles = v
}
// GetQuerierMemoryCachedFiles returns the QuerierMemoryCachedFiles field value
func (o *ScanStats) GetQuerierMemoryCachedFiles() int64 {
if o == nil {
var ret int64
return ret
}
return o.QuerierMemoryCachedFiles
}
// GetQuerierMemoryCachedFilesOk returns a tuple with the QuerierMemoryCachedFiles field value
// and a boolean to check if the value has been set.
func (o *ScanStats) GetQuerierMemoryCachedFilesOk() (*int64, bool) {
if o == nil {
return nil, false
}
return &o.QuerierMemoryCachedFiles, true
}
// SetQuerierMemoryCachedFiles sets field value
func (o *ScanStats) SetQuerierMemoryCachedFiles(v int64) {
o.QuerierMemoryCachedFiles = v
}
// GetRecords returns the Records field value
func (o *ScanStats) GetRecords() int64 {
if o == nil {
var ret int64
return ret
}
return o.Records
}
// GetRecordsOk returns a tuple with the Records field value
// and a boolean to check if the value has been set.
func (o *ScanStats) GetRecordsOk() (*int64, bool) {
if o == nil {
return nil, false
}
return &o.Records, true
}
// SetRecords sets field value
func (o *ScanStats) SetRecords(v int64) {
o.Records = v
}
func (o ScanStats) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ScanStats) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["compressed_size"] = o.CompressedSize
toSerialize["files"] = o.Files
toSerialize["idx_scan_size"] = o.IdxScanSize
toSerialize["idx_took"] = o.IdxTook
toSerialize["original_size"] = o.OriginalSize
toSerialize["querier_disk_cached_files"] = o.QuerierDiskCachedFiles
toSerialize["querier_files"] = o.QuerierFiles
toSerialize["querier_memory_cached_files"] = o.QuerierMemoryCachedFiles
toSerialize["records"] = o.Records
return toSerialize, nil
}
func (o *ScanStats) UnmarshalJSON(data []byte) (err error) {
// This validates that all required properties are included in the JSON object
// by unmarshalling the object into a generic map with string keys and checking
// that every required field exists as a key in the generic map.
requiredProperties := []string{
"compressed_size",
"files",
"idx_scan_size",
"idx_took",
"original_size",
"querier_disk_cached_files",
"querier_files",
"querier_memory_cached_files",
"records",
}
allProperties := make(map[string]interface{})
err = json.Unmarshal(data, &allProperties)
if err != nil {
return err;
}
for _, requiredProperty := range(requiredProperties) {
if _, exists := allProperties[requiredProperty]; !exists {
return fmt.Errorf("no value given for required property %v", requiredProperty)
}
}
varScanStats := _ScanStats{}
decoder := json.NewDecoder(bytes.NewReader(data))
decoder.DisallowUnknownFields()
err = decoder.Decode(&varScanStats)
if err != nil {
return err
}
*o = ScanStats(varScanStats)
return err
}
type NullableScanStats struct {
value *ScanStats
isSet bool
}
func (v NullableScanStats) Get() *ScanStats {
return v.value
}
func (v *NullableScanStats) Set(val *ScanStats) {
v.value = val
v.isSet = true
}
func (v NullableScanStats) IsSet() bool {
return v.isSet
}
func (v *NullableScanStats) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableScanStats(val *ScanStats) *NullableScanStats {
return &NullableScanStats{value: val, isSet: true}
}
func (v NullableScanStats) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableScanStats) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}