bigquery  v2
query_timeline_sample.h
1 // Copyright 2010 Google Inc.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); you may not
4 // use this file except in compliance with the License. You may obtain a copy of
5 // the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11 // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12 // License for the specific language governing permissions and limitations under
13 // the License.
14 
15 // This code was generated by google-apis-code-generator 1.5.1
16 // Build date: 2018-10-08 17:45:39 UTC
17 // on: 2020-03-07, 23:51:40 UTC
18 // C++ generator version: 0.1.4
19 
20 // ----------------------------------------------------------------------------
21 // NOTE: This file is generated from Google APIs Discovery Service.
22 // Service:
23 // BigQuery API (bigquery/v2)
24 // Generated from:
25 // Version: v2
26 // Revision: 459
27 // Generated by:
28 // Tool: google-apis-code-generator 1.5.1
29 // C++: 0.1.4
30 #ifndef GOOGLE_BIGQUERY_API_QUERY_TIMELINE_SAMPLE_H_
31 #define GOOGLE_BIGQUERY_API_QUERY_TIMELINE_SAMPLE_H_
32 
33 #include "googleapis/base/integral_types.h"
34 #include "googleapis/base/macros.h"
35 #include "googleapis/client/data/jsoncpp_data.h"
36 #include "googleapis/strings/stringpiece.h"
37 
38 namespace Json {
39 class Value;
40 } // namespace Json
41 
42 namespace google_bigquery_api {
43 using namespace googleapis;
44 
50 class QueryTimelineSample : public client::JsonCppData {
51  public:
57  static QueryTimelineSample* New();
58 
64  explicit QueryTimelineSample(const Json::Value& storage);
65 
71  explicit QueryTimelineSample(Json::Value* storage);
72 
76  virtual ~QueryTimelineSample();
77 
83  const StringPiece GetTypeName() const {
84  return StringPiece("google_bigquery_api::QueryTimelineSample");
85  }
86 
92  bool has_active_units() const {
93  return Storage().isMember("activeUnits");
94  }
95 
100  MutableStorage()->removeMember("activeUnits");
101  }
102 
103 
107  int64 get_active_units() const {
108  const Json::Value& storage = Storage("activeUnits");
109  return client::JsonValueToCppValueHelper<int64 >(storage);
110  }
111 
121  void set_active_units(int64 value) {
122  client::SetJsonValueFromCppValueHelper<int64 >(
123  value, MutableStorage("activeUnits"));
124  }
125 
131  bool has_completed_units() const {
132  return Storage().isMember("completedUnits");
133  }
134 
139  MutableStorage()->removeMember("completedUnits");
140  }
141 
142 
146  int64 get_completed_units() const {
147  const Json::Value& storage = Storage("completedUnits");
148  return client::JsonValueToCppValueHelper<int64 >(storage);
149  }
150 
158  void set_completed_units(int64 value) {
159  client::SetJsonValueFromCppValueHelper<int64 >(
160  value, MutableStorage("completedUnits"));
161  }
162 
168  bool has_elapsed_ms() const {
169  return Storage().isMember("elapsedMs");
170  }
171 
176  MutableStorage()->removeMember("elapsedMs");
177  }
178 
179 
183  int64 get_elapsed_ms() const {
184  const Json::Value& storage = Storage("elapsedMs");
185  return client::JsonValueToCppValueHelper<int64 >(storage);
186  }
187 
195  void set_elapsed_ms(int64 value) {
196  client::SetJsonValueFromCppValueHelper<int64 >(
197  value, MutableStorage("elapsedMs"));
198  }
199 
205  bool has_pending_units() const {
206  return Storage().isMember("pendingUnits");
207  }
208 
213  MutableStorage()->removeMember("pendingUnits");
214  }
215 
216 
220  int64 get_pending_units() const {
221  const Json::Value& storage = Storage("pendingUnits");
222  return client::JsonValueToCppValueHelper<int64 >(storage);
223  }
224 
232  void set_pending_units(int64 value) {
233  client::SetJsonValueFromCppValueHelper<int64 >(
234  value, MutableStorage("pendingUnits"));
235  }
236 
242  bool has_total_slot_ms() const {
243  return Storage().isMember("totalSlotMs");
244  }
245 
250  MutableStorage()->removeMember("totalSlotMs");
251  }
252 
253 
257  int64 get_total_slot_ms() const {
258  const Json::Value& storage = Storage("totalSlotMs");
259  return client::JsonValueToCppValueHelper<int64 >(storage);
260  }
261 
269  void set_total_slot_ms(int64 value) {
270  client::SetJsonValueFromCppValueHelper<int64 >(
271  value, MutableStorage("totalSlotMs"));
272  }
273 
274  private:
275  void operator=(const QueryTimelineSample&);
276 }; // QueryTimelineSample
277 } // namespace google_bigquery_api
278 #endif // GOOGLE_BIGQUERY_API_QUERY_TIMELINE_SAMPLE_H_
int64 get_total_slot_ms() const
Definition: query_timeline_sample.h:257
int64 get_active_units() const
Definition: query_timeline_sample.h:107
bool has_completed_units() const
Definition: query_timeline_sample.h:131
void set_pending_units(int64 value)
Definition: query_timeline_sample.h:232
void clear_completed_units()
Definition: query_timeline_sample.h:138
void set_total_slot_ms(int64 value)
Definition: query_timeline_sample.h:269
const StringPiece GetTypeName() const
Definition: query_timeline_sample.h:83
void set_elapsed_ms(int64 value)
Definition: query_timeline_sample.h:195
void set_completed_units(int64 value)
Definition: query_timeline_sample.h:158
Definition: aggregate_classification_metrics.cc:39
void clear_pending_units()
Definition: query_timeline_sample.h:212
int64 get_completed_units() const
Definition: query_timeline_sample.h:146
Definition: aggregate_classification_metrics.h:37
void set_active_units(int64 value)
Definition: query_timeline_sample.h:121
void clear_active_units()
Definition: query_timeline_sample.h:99
int64 get_pending_units() const
Definition: query_timeline_sample.h:220
bool has_total_slot_ms() const
Definition: query_timeline_sample.h:242
bool has_pending_units() const
Definition: query_timeline_sample.h:205
bool has_elapsed_ms() const
Definition: query_timeline_sample.h:168
bool has_active_units() const
Definition: query_timeline_sample.h:92
Definition: query_timeline_sample.h:50
void clear_total_slot_ms()
Definition: query_timeline_sample.h:249
int64 get_elapsed_ms() const
Definition: query_timeline_sample.h:183
void clear_elapsed_ms()
Definition: query_timeline_sample.h:175