-
Notifications
You must be signed in to change notification settings - Fork 5
/
model_meta_zinc_query.go
478 lines (404 loc) · 12 KB
/
model_meta_zinc_query.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
/*
Zinc Search engine API
Zinc Search engine API documents https://docs.zincsearch.com
API version: 0.3.3
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package client
import (
"encoding/json"
)
// MetaZincQuery struct for MetaZincQuery
type MetaZincQuery struct {
// true, false, [\"field1\", \"field2.*\"]
Source []string `json:"_source,omitempty"`
Aggs *map[string]MetaAggregations `json:"aggs,omitempty"`
Explain *bool `json:"explain,omitempty"`
// [\"field1\", \"field2.*\", {\"field\": \"fieldName\", \"format\": \"epoch_millis\"}]
Fields []string `json:"fields,omitempty"`
From *int32 `json:"from,omitempty"`
Highlight *MetaHighlight `json:"highlight,omitempty"`
Query *MetaQuery `json:"query,omitempty"`
Size *int32 `json:"size,omitempty"`
// \"_sorce\", [\"+Year\",\"-Year\", {\"Year\": \"desc\"}, \"Date\": {\"order\": \"asc\"\", \"format\": \"yyyy-MM-dd\"}}\"}]
Sort []string `json:"sort,omitempty"`
Timeout *int32 `json:"timeout,omitempty"`
TrackTotalHits *bool `json:"track_total_hits,omitempty"`
}
// NewMetaZincQuery instantiates a new MetaZincQuery 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 NewMetaZincQuery() *MetaZincQuery {
this := MetaZincQuery{}
return &this
}
// NewMetaZincQueryWithDefaults instantiates a new MetaZincQuery 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 NewMetaZincQueryWithDefaults() *MetaZincQuery {
this := MetaZincQuery{}
return &this
}
// GetSource returns the Source field value if set, zero value otherwise.
func (o *MetaZincQuery) GetSource() []string {
if o == nil || o.Source == nil {
var ret []string
return ret
}
return o.Source
}
// GetSourceOk returns a tuple with the Source field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MetaZincQuery) GetSourceOk() ([]string, bool) {
if o == nil || o.Source == nil {
return nil, false
}
return o.Source, true
}
// HasSource returns a boolean if a field has been set.
func (o *MetaZincQuery) HasSource() bool {
if o != nil && o.Source != nil {
return true
}
return false
}
// SetSource gets a reference to the given []string and assigns it to the Source field.
func (o *MetaZincQuery) SetSource(v []string) {
o.Source = v
}
// GetAggs returns the Aggs field value if set, zero value otherwise.
func (o *MetaZincQuery) GetAggs() map[string]MetaAggregations {
if o == nil || o.Aggs == nil {
var ret map[string]MetaAggregations
return ret
}
return *o.Aggs
}
// GetAggsOk returns a tuple with the Aggs field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MetaZincQuery) GetAggsOk() (*map[string]MetaAggregations, bool) {
if o == nil || o.Aggs == nil {
return nil, false
}
return o.Aggs, true
}
// HasAggs returns a boolean if a field has been set.
func (o *MetaZincQuery) HasAggs() bool {
if o != nil && o.Aggs != nil {
return true
}
return false
}
// SetAggs gets a reference to the given map[string]MetaAggregations and assigns it to the Aggs field.
func (o *MetaZincQuery) SetAggs(v map[string]MetaAggregations) {
o.Aggs = &v
}
// GetExplain returns the Explain field value if set, zero value otherwise.
func (o *MetaZincQuery) GetExplain() bool {
if o == nil || o.Explain == nil {
var ret bool
return ret
}
return *o.Explain
}
// GetExplainOk returns a tuple with the Explain field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MetaZincQuery) GetExplainOk() (*bool, bool) {
if o == nil || o.Explain == nil {
return nil, false
}
return o.Explain, true
}
// HasExplain returns a boolean if a field has been set.
func (o *MetaZincQuery) HasExplain() bool {
if o != nil && o.Explain != nil {
return true
}
return false
}
// SetExplain gets a reference to the given bool and assigns it to the Explain field.
func (o *MetaZincQuery) SetExplain(v bool) {
o.Explain = &v
}
// GetFields returns the Fields field value if set, zero value otherwise.
func (o *MetaZincQuery) GetFields() []string {
if o == nil || o.Fields == nil {
var ret []string
return ret
}
return o.Fields
}
// GetFieldsOk returns a tuple with the Fields field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MetaZincQuery) GetFieldsOk() ([]string, bool) {
if o == nil || o.Fields == nil {
return nil, false
}
return o.Fields, true
}
// HasFields returns a boolean if a field has been set.
func (o *MetaZincQuery) HasFields() bool {
if o != nil && o.Fields != nil {
return true
}
return false
}
// SetFields gets a reference to the given []string and assigns it to the Fields field.
func (o *MetaZincQuery) SetFields(v []string) {
o.Fields = v
}
// GetFrom returns the From field value if set, zero value otherwise.
func (o *MetaZincQuery) GetFrom() int32 {
if o == nil || o.From == nil {
var ret int32
return ret
}
return *o.From
}
// GetFromOk returns a tuple with the From field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MetaZincQuery) GetFromOk() (*int32, bool) {
if o == nil || o.From == nil {
return nil, false
}
return o.From, true
}
// HasFrom returns a boolean if a field has been set.
func (o *MetaZincQuery) HasFrom() bool {
if o != nil && o.From != nil {
return true
}
return false
}
// SetFrom gets a reference to the given int32 and assigns it to the From field.
func (o *MetaZincQuery) SetFrom(v int32) {
o.From = &v
}
// GetHighlight returns the Highlight field value if set, zero value otherwise.
func (o *MetaZincQuery) GetHighlight() MetaHighlight {
if o == nil || o.Highlight == nil {
var ret MetaHighlight
return ret
}
return *o.Highlight
}
// GetHighlightOk returns a tuple with the Highlight field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MetaZincQuery) GetHighlightOk() (*MetaHighlight, bool) {
if o == nil || o.Highlight == nil {
return nil, false
}
return o.Highlight, true
}
// HasHighlight returns a boolean if a field has been set.
func (o *MetaZincQuery) HasHighlight() bool {
if o != nil && o.Highlight != nil {
return true
}
return false
}
// SetHighlight gets a reference to the given MetaHighlight and assigns it to the Highlight field.
func (o *MetaZincQuery) SetHighlight(v MetaHighlight) {
o.Highlight = &v
}
// GetQuery returns the Query field value if set, zero value otherwise.
func (o *MetaZincQuery) GetQuery() MetaQuery {
if o == nil || o.Query == nil {
var ret MetaQuery
return ret
}
return *o.Query
}
// GetQueryOk returns a tuple with the Query field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MetaZincQuery) GetQueryOk() (*MetaQuery, bool) {
if o == nil || o.Query == nil {
return nil, false
}
return o.Query, true
}
// HasQuery returns a boolean if a field has been set.
func (o *MetaZincQuery) HasQuery() bool {
if o != nil && o.Query != nil {
return true
}
return false
}
// SetQuery gets a reference to the given MetaQuery and assigns it to the Query field.
func (o *MetaZincQuery) SetQuery(v MetaQuery) {
o.Query = &v
}
// GetSize returns the Size field value if set, zero value otherwise.
func (o *MetaZincQuery) GetSize() int32 {
if o == nil || o.Size == nil {
var ret int32
return ret
}
return *o.Size
}
// GetSizeOk returns a tuple with the Size field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MetaZincQuery) GetSizeOk() (*int32, bool) {
if o == nil || o.Size == nil {
return nil, false
}
return o.Size, true
}
// HasSize returns a boolean if a field has been set.
func (o *MetaZincQuery) HasSize() bool {
if o != nil && o.Size != nil {
return true
}
return false
}
// SetSize gets a reference to the given int32 and assigns it to the Size field.
func (o *MetaZincQuery) SetSize(v int32) {
o.Size = &v
}
// GetSort returns the Sort field value if set, zero value otherwise.
func (o *MetaZincQuery) GetSort() []string {
if o == nil || o.Sort == nil {
var ret []string
return ret
}
return o.Sort
}
// GetSortOk returns a tuple with the Sort field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MetaZincQuery) GetSortOk() ([]string, bool) {
if o == nil || o.Sort == nil {
return nil, false
}
return o.Sort, true
}
// HasSort returns a boolean if a field has been set.
func (o *MetaZincQuery) HasSort() bool {
if o != nil && o.Sort != nil {
return true
}
return false
}
// SetSort gets a reference to the given []string and assigns it to the Sort field.
func (o *MetaZincQuery) SetSort(v []string) {
o.Sort = v
}
// GetTimeout returns the Timeout field value if set, zero value otherwise.
func (o *MetaZincQuery) GetTimeout() int32 {
if o == nil || o.Timeout == nil {
var ret int32
return ret
}
return *o.Timeout
}
// GetTimeoutOk returns a tuple with the Timeout field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MetaZincQuery) GetTimeoutOk() (*int32, bool) {
if o == nil || o.Timeout == nil {
return nil, false
}
return o.Timeout, true
}
// HasTimeout returns a boolean if a field has been set.
func (o *MetaZincQuery) HasTimeout() bool {
if o != nil && o.Timeout != nil {
return true
}
return false
}
// SetTimeout gets a reference to the given int32 and assigns it to the Timeout field.
func (o *MetaZincQuery) SetTimeout(v int32) {
o.Timeout = &v
}
// GetTrackTotalHits returns the TrackTotalHits field value if set, zero value otherwise.
func (o *MetaZincQuery) GetTrackTotalHits() bool {
if o == nil || o.TrackTotalHits == nil {
var ret bool
return ret
}
return *o.TrackTotalHits
}
// GetTrackTotalHitsOk returns a tuple with the TrackTotalHits field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MetaZincQuery) GetTrackTotalHitsOk() (*bool, bool) {
if o == nil || o.TrackTotalHits == nil {
return nil, false
}
return o.TrackTotalHits, true
}
// HasTrackTotalHits returns a boolean if a field has been set.
func (o *MetaZincQuery) HasTrackTotalHits() bool {
if o != nil && o.TrackTotalHits != nil {
return true
}
return false
}
// SetTrackTotalHits gets a reference to the given bool and assigns it to the TrackTotalHits field.
func (o *MetaZincQuery) SetTrackTotalHits(v bool) {
o.TrackTotalHits = &v
}
func (o MetaZincQuery) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.Source != nil {
toSerialize["_source"] = o.Source
}
if o.Aggs != nil {
toSerialize["aggs"] = o.Aggs
}
if o.Explain != nil {
toSerialize["explain"] = o.Explain
}
if o.Fields != nil {
toSerialize["fields"] = o.Fields
}
if o.From != nil {
toSerialize["from"] = o.From
}
if o.Highlight != nil {
toSerialize["highlight"] = o.Highlight
}
if o.Query != nil {
toSerialize["query"] = o.Query
}
if o.Size != nil {
toSerialize["size"] = o.Size
}
if o.Sort != nil {
toSerialize["sort"] = o.Sort
}
if o.Timeout != nil {
toSerialize["timeout"] = o.Timeout
}
if o.TrackTotalHits != nil {
toSerialize["track_total_hits"] = o.TrackTotalHits
}
return json.Marshal(toSerialize)
}
type NullableMetaZincQuery struct {
value *MetaZincQuery
isSet bool
}
func (v NullableMetaZincQuery) Get() *MetaZincQuery {
return v.value
}
func (v *NullableMetaZincQuery) Set(val *MetaZincQuery) {
v.value = val
v.isSet = true
}
func (v NullableMetaZincQuery) IsSet() bool {
return v.isSet
}
func (v *NullableMetaZincQuery) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableMetaZincQuery(val *MetaZincQuery) *NullableMetaZincQuery {
return &NullableMetaZincQuery{value: val, isSet: true}
}
func (v NullableMetaZincQuery) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableMetaZincQuery) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}