/
model_query_response.go
337 lines (285 loc) · 9.39 KB
/
model_query_response.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
/*
* REST API
*
* Rockset's REST API allows for creating and managing all resources in Rockset. Each supported endpoint is documented below. All requests must be authorized with a Rockset API key, which can be created in the [Rockset console](https://console.rockset.com). The API key must be provided as `ApiKey <api_key>` in the `Authorization` request header. For example: ``` Authorization: ApiKey aB35kDjg93J5nsf4GjwMeErAVd832F7ad4vhsW1S02kfZiab42sTsfW5Sxt25asT ``` All endpoints are only accessible via https. Build something awesome!
*
* API version: v1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package openapi
import (
"encoding/json"
)
// QueryResponse struct for QueryResponse
type QueryResponse struct {
// unique id for this query
QueryId *string `json:"query_id,omitempty"`
// list of collections queried by the query
Collections *[]string `json:"collections,omitempty"`
// list of objects returned by the query
Results *[]map[string]interface{} `json:"results,omitempty"`
Stats *QueryResponseStats `json:"stats,omitempty"`
// warnings received from the query
Warnings *[]string `json:"warnings,omitempty"`
// errors encountered while streaming the query
QueryErrors *[]QueryError `json:"query_errors,omitempty"`
// meta information about each column in the result set
ColumnFields *[]QueryFieldType `json:"column_fields,omitempty"`
}
// NewQueryResponse instantiates a new QueryResponse 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 NewQueryResponse() *QueryResponse {
this := QueryResponse{}
return &this
}
// NewQueryResponseWithDefaults instantiates a new QueryResponse 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 NewQueryResponseWithDefaults() *QueryResponse {
this := QueryResponse{}
return &this
}
// GetQueryId returns the QueryId field value if set, zero value otherwise.
func (o *QueryResponse) GetQueryId() string {
if o == nil || o.QueryId == nil {
var ret string
return ret
}
return *o.QueryId
}
// GetQueryIdOk returns a tuple with the QueryId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *QueryResponse) GetQueryIdOk() (*string, bool) {
if o == nil || o.QueryId == nil {
return nil, false
}
return o.QueryId, true
}
// HasQueryId returns a boolean if a field has been set.
func (o *QueryResponse) HasQueryId() bool {
if o != nil && o.QueryId != nil {
return true
}
return false
}
// SetQueryId gets a reference to the given string and assigns it to the QueryId field.
func (o *QueryResponse) SetQueryId(v string) {
o.QueryId = &v
}
// GetCollections returns the Collections field value if set, zero value otherwise.
func (o *QueryResponse) GetCollections() []string {
if o == nil || o.Collections == nil {
var ret []string
return ret
}
return *o.Collections
}
// GetCollectionsOk returns a tuple with the Collections field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *QueryResponse) GetCollectionsOk() (*[]string, bool) {
if o == nil || o.Collections == nil {
return nil, false
}
return o.Collections, true
}
// HasCollections returns a boolean if a field has been set.
func (o *QueryResponse) HasCollections() bool {
if o != nil && o.Collections != nil {
return true
}
return false
}
// SetCollections gets a reference to the given []string and assigns it to the Collections field.
func (o *QueryResponse) SetCollections(v []string) {
o.Collections = &v
}
// GetResults returns the Results field value if set, zero value otherwise.
func (o *QueryResponse) GetResults() []map[string]interface{} {
if o == nil || o.Results == nil {
var ret []map[string]interface{}
return ret
}
return *o.Results
}
// GetResultsOk returns a tuple with the Results field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *QueryResponse) GetResultsOk() (*[]map[string]interface{}, bool) {
if o == nil || o.Results == nil {
return nil, false
}
return o.Results, true
}
// HasResults returns a boolean if a field has been set.
func (o *QueryResponse) HasResults() bool {
if o != nil && o.Results != nil {
return true
}
return false
}
// SetResults gets a reference to the given []map[string]interface{} and assigns it to the Results field.
func (o *QueryResponse) SetResults(v []map[string]interface{}) {
o.Results = &v
}
// GetStats returns the Stats field value if set, zero value otherwise.
func (o *QueryResponse) GetStats() QueryResponseStats {
if o == nil || o.Stats == nil {
var ret QueryResponseStats
return ret
}
return *o.Stats
}
// GetStatsOk returns a tuple with the Stats field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *QueryResponse) GetStatsOk() (*QueryResponseStats, bool) {
if o == nil || o.Stats == nil {
return nil, false
}
return o.Stats, true
}
// HasStats returns a boolean if a field has been set.
func (o *QueryResponse) HasStats() bool {
if o != nil && o.Stats != nil {
return true
}
return false
}
// SetStats gets a reference to the given QueryResponseStats and assigns it to the Stats field.
func (o *QueryResponse) SetStats(v QueryResponseStats) {
o.Stats = &v
}
// GetWarnings returns the Warnings field value if set, zero value otherwise.
func (o *QueryResponse) GetWarnings() []string {
if o == nil || o.Warnings == nil {
var ret []string
return ret
}
return *o.Warnings
}
// GetWarningsOk returns a tuple with the Warnings field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *QueryResponse) GetWarningsOk() (*[]string, bool) {
if o == nil || o.Warnings == nil {
return nil, false
}
return o.Warnings, true
}
// HasWarnings returns a boolean if a field has been set.
func (o *QueryResponse) HasWarnings() bool {
if o != nil && o.Warnings != nil {
return true
}
return false
}
// SetWarnings gets a reference to the given []string and assigns it to the Warnings field.
func (o *QueryResponse) SetWarnings(v []string) {
o.Warnings = &v
}
// GetQueryErrors returns the QueryErrors field value if set, zero value otherwise.
func (o *QueryResponse) GetQueryErrors() []QueryError {
if o == nil || o.QueryErrors == nil {
var ret []QueryError
return ret
}
return *o.QueryErrors
}
// GetQueryErrorsOk returns a tuple with the QueryErrors field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *QueryResponse) GetQueryErrorsOk() (*[]QueryError, bool) {
if o == nil || o.QueryErrors == nil {
return nil, false
}
return o.QueryErrors, true
}
// HasQueryErrors returns a boolean if a field has been set.
func (o *QueryResponse) HasQueryErrors() bool {
if o != nil && o.QueryErrors != nil {
return true
}
return false
}
// SetQueryErrors gets a reference to the given []QueryError and assigns it to the QueryErrors field.
func (o *QueryResponse) SetQueryErrors(v []QueryError) {
o.QueryErrors = &v
}
// GetColumnFields returns the ColumnFields field value if set, zero value otherwise.
func (o *QueryResponse) GetColumnFields() []QueryFieldType {
if o == nil || o.ColumnFields == nil {
var ret []QueryFieldType
return ret
}
return *o.ColumnFields
}
// GetColumnFieldsOk returns a tuple with the ColumnFields field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *QueryResponse) GetColumnFieldsOk() (*[]QueryFieldType, bool) {
if o == nil || o.ColumnFields == nil {
return nil, false
}
return o.ColumnFields, true
}
// HasColumnFields returns a boolean if a field has been set.
func (o *QueryResponse) HasColumnFields() bool {
if o != nil && o.ColumnFields != nil {
return true
}
return false
}
// SetColumnFields gets a reference to the given []QueryFieldType and assigns it to the ColumnFields field.
func (o *QueryResponse) SetColumnFields(v []QueryFieldType) {
o.ColumnFields = &v
}
func (o QueryResponse) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.QueryId != nil {
toSerialize["query_id"] = o.QueryId
}
if o.Collections != nil {
toSerialize["collections"] = o.Collections
}
if o.Results != nil {
toSerialize["results"] = o.Results
}
if o.Stats != nil {
toSerialize["stats"] = o.Stats
}
if o.Warnings != nil {
toSerialize["warnings"] = o.Warnings
}
if o.QueryErrors != nil {
toSerialize["query_errors"] = o.QueryErrors
}
if o.ColumnFields != nil {
toSerialize["column_fields"] = o.ColumnFields
}
return json.Marshal(toSerialize)
}
type NullableQueryResponse struct {
value *QueryResponse
isSet bool
}
func (v NullableQueryResponse) Get() *QueryResponse {
return v.value
}
func (v *NullableQueryResponse) Set(val *QueryResponse) {
v.value = val
v.isSet = true
}
func (v NullableQueryResponse) IsSet() bool {
return v.isSet
}
func (v *NullableQueryResponse) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableQueryResponse(val *QueryResponse) *NullableQueryResponse {
return &NullableQueryResponse{value: val, isSet: true}
}
func (v NullableQueryResponse) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableQueryResponse) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}