/
model_stats.go
275 lines (229 loc) · 8.21 KB
/
model_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
/*
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"
)
// checks if the Stats type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &Stats{}
// Stats struct for Stats
type Stats struct {
// Total execution time (including time queued) of the query, in milliseconds.
ElapsedTimeMs *int64 `json:"elapsed_time_ms,omitempty"`
// Number of bytes in the query result set. Only populated if `status` is `COMPLETE`. Not populated for INSERT INTO queries.
ResultSetBytesSize *int64 `json:"result_set_bytes_size,omitempty"`
// Number of documents returned by the query. Only populated if `status` is `COMPLETE`.
ResultSetDocumentCount *int64 `json:"result_set_document_count,omitempty"`
// Number of files written by by the query. Only populated if `status` is `COMPLETE` and the query is an export query.
ResultSetFileCount *int64 `json:"result_set_file_count,omitempty"`
// Time query spent queued, in milliseconds.
ThrottledTimeMs *int64 `json:"throttled_time_ms,omitempty"`
}
// NewStats instantiates a new Stats 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 NewStats() *Stats {
this := Stats{}
return &this
}
// NewStatsWithDefaults instantiates a new Stats 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 NewStatsWithDefaults() *Stats {
this := Stats{}
return &this
}
// GetElapsedTimeMs returns the ElapsedTimeMs field value if set, zero value otherwise.
func (o *Stats) GetElapsedTimeMs() int64 {
if o == nil || IsNil(o.ElapsedTimeMs) {
var ret int64
return ret
}
return *o.ElapsedTimeMs
}
// GetElapsedTimeMsOk returns a tuple with the ElapsedTimeMs field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Stats) GetElapsedTimeMsOk() (*int64, bool) {
if o == nil || IsNil(o.ElapsedTimeMs) {
return nil, false
}
return o.ElapsedTimeMs, true
}
// HasElapsedTimeMs returns a boolean if a field has been set.
func (o *Stats) HasElapsedTimeMs() bool {
if o != nil && !IsNil(o.ElapsedTimeMs) {
return true
}
return false
}
// SetElapsedTimeMs gets a reference to the given int64 and assigns it to the ElapsedTimeMs field.
func (o *Stats) SetElapsedTimeMs(v int64) {
o.ElapsedTimeMs = &v
}
// GetResultSetBytesSize returns the ResultSetBytesSize field value if set, zero value otherwise.
func (o *Stats) GetResultSetBytesSize() int64 {
if o == nil || IsNil(o.ResultSetBytesSize) {
var ret int64
return ret
}
return *o.ResultSetBytesSize
}
// GetResultSetBytesSizeOk returns a tuple with the ResultSetBytesSize field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Stats) GetResultSetBytesSizeOk() (*int64, bool) {
if o == nil || IsNil(o.ResultSetBytesSize) {
return nil, false
}
return o.ResultSetBytesSize, true
}
// HasResultSetBytesSize returns a boolean if a field has been set.
func (o *Stats) HasResultSetBytesSize() bool {
if o != nil && !IsNil(o.ResultSetBytesSize) {
return true
}
return false
}
// SetResultSetBytesSize gets a reference to the given int64 and assigns it to the ResultSetBytesSize field.
func (o *Stats) SetResultSetBytesSize(v int64) {
o.ResultSetBytesSize = &v
}
// GetResultSetDocumentCount returns the ResultSetDocumentCount field value if set, zero value otherwise.
func (o *Stats) GetResultSetDocumentCount() int64 {
if o == nil || IsNil(o.ResultSetDocumentCount) {
var ret int64
return ret
}
return *o.ResultSetDocumentCount
}
// GetResultSetDocumentCountOk returns a tuple with the ResultSetDocumentCount field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Stats) GetResultSetDocumentCountOk() (*int64, bool) {
if o == nil || IsNil(o.ResultSetDocumentCount) {
return nil, false
}
return o.ResultSetDocumentCount, true
}
// HasResultSetDocumentCount returns a boolean if a field has been set.
func (o *Stats) HasResultSetDocumentCount() bool {
if o != nil && !IsNil(o.ResultSetDocumentCount) {
return true
}
return false
}
// SetResultSetDocumentCount gets a reference to the given int64 and assigns it to the ResultSetDocumentCount field.
func (o *Stats) SetResultSetDocumentCount(v int64) {
o.ResultSetDocumentCount = &v
}
// GetResultSetFileCount returns the ResultSetFileCount field value if set, zero value otherwise.
func (o *Stats) GetResultSetFileCount() int64 {
if o == nil || IsNil(o.ResultSetFileCount) {
var ret int64
return ret
}
return *o.ResultSetFileCount
}
// GetResultSetFileCountOk returns a tuple with the ResultSetFileCount field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Stats) GetResultSetFileCountOk() (*int64, bool) {
if o == nil || IsNil(o.ResultSetFileCount) {
return nil, false
}
return o.ResultSetFileCount, true
}
// HasResultSetFileCount returns a boolean if a field has been set.
func (o *Stats) HasResultSetFileCount() bool {
if o != nil && !IsNil(o.ResultSetFileCount) {
return true
}
return false
}
// SetResultSetFileCount gets a reference to the given int64 and assigns it to the ResultSetFileCount field.
func (o *Stats) SetResultSetFileCount(v int64) {
o.ResultSetFileCount = &v
}
// GetThrottledTimeMs returns the ThrottledTimeMs field value if set, zero value otherwise.
func (o *Stats) GetThrottledTimeMs() int64 {
if o == nil || IsNil(o.ThrottledTimeMs) {
var ret int64
return ret
}
return *o.ThrottledTimeMs
}
// GetThrottledTimeMsOk returns a tuple with the ThrottledTimeMs field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Stats) GetThrottledTimeMsOk() (*int64, bool) {
if o == nil || IsNil(o.ThrottledTimeMs) {
return nil, false
}
return o.ThrottledTimeMs, true
}
// HasThrottledTimeMs returns a boolean if a field has been set.
func (o *Stats) HasThrottledTimeMs() bool {
if o != nil && !IsNil(o.ThrottledTimeMs) {
return true
}
return false
}
// SetThrottledTimeMs gets a reference to the given int64 and assigns it to the ThrottledTimeMs field.
func (o *Stats) SetThrottledTimeMs(v int64) {
o.ThrottledTimeMs = &v
}
func (o Stats) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o Stats) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.ElapsedTimeMs) {
toSerialize["elapsed_time_ms"] = o.ElapsedTimeMs
}
if !IsNil(o.ResultSetBytesSize) {
toSerialize["result_set_bytes_size"] = o.ResultSetBytesSize
}
if !IsNil(o.ResultSetDocumentCount) {
toSerialize["result_set_document_count"] = o.ResultSetDocumentCount
}
if !IsNil(o.ResultSetFileCount) {
toSerialize["result_set_file_count"] = o.ResultSetFileCount
}
if !IsNil(o.ThrottledTimeMs) {
toSerialize["throttled_time_ms"] = o.ThrottledTimeMs
}
return toSerialize, nil
}
type NullableStats struct {
value *Stats
isSet bool
}
func (v NullableStats) Get() *Stats {
return v.value
}
func (v *NullableStats) Set(val *Stats) {
v.value = val
v.isSet = true
}
func (v NullableStats) IsSet() bool {
return v.isSet
}
func (v *NullableStats) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableStats(val *Stats) *NullableStats {
return &NullableStats{value: val, isSet: true}
}
func (v NullableStats) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableStats) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}