bigquery  v2
job_statistics.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_JOB_STATISTICS_H_
31 #define GOOGLE_BIGQUERY_API_JOB_STATISTICS_H_
32 
33 #include <string>
34 #include "googleapis/base/integral_types.h"
35 #include "googleapis/base/macros.h"
36 #include "googleapis/client/data/jsoncpp_data.h"
37 #include "googleapis/strings/stringpiece.h"
38 
39 #include "google/bigquery_api/job_statistics2.h"
40 #include "google/bigquery_api/job_statistics3.h"
41 #include "google/bigquery_api/job_statistics4.h"
42 #include "google/bigquery_api/script_statistics.h"
43 
44 namespace Json {
45 class Value;
46 } // namespace Json
47 
48 namespace google_bigquery_api {
49 using namespace googleapis;
50 
56 class JobStatistics : public client::JsonCppData {
57  public:
63  class JobStatisticsReservationUsage : public client::JsonCppData {
64  public:
70  static JobStatisticsReservationUsage* New();
71 
77  explicit JobStatisticsReservationUsage(const Json::Value& storage);
78 
84  explicit JobStatisticsReservationUsage(Json::Value* storage);
85 
90 
96  const StringPiece GetTypeName() const {
97  return StringPiece("google_bigquery_api::JobStatisticsReservationUsage");
98  }
99 
105  bool has_name() const {
106  return Storage().isMember("name");
107  }
108 
112  void clear_name() {
113  MutableStorage()->removeMember("name");
114  }
115 
116 
120  const StringPiece get_name() const {
121  const Json::Value& v = Storage("name");
122  if (v == Json::Value::null) return StringPiece("");
123  return StringPiece(v.asCString());
124  }
125 
134  void set_name(const StringPiece& value) {
135  *MutableStorage("name") = value.data();
136  }
137 
143  bool has_slot_ms() const {
144  return Storage().isMember("slotMs");
145  }
146 
150  void clear_slot_ms() {
151  MutableStorage()->removeMember("slotMs");
152  }
153 
154 
158  int64 get_slot_ms() const {
159  const Json::Value& storage = Storage("slotMs");
160  return client::JsonValueToCppValueHelper<int64 >(storage);
161  }
162 
170  void set_slot_ms(int64 value) {
171  client::SetJsonValueFromCppValueHelper<int64 >(
172  value, MutableStorage("slotMs"));
173  }
174 
175  private:
176  void operator=(const JobStatisticsReservationUsage&);
177  }; // JobStatisticsReservationUsage
183  static JobStatistics* New();
184 
190  explicit JobStatistics(const Json::Value& storage);
191 
197  explicit JobStatistics(Json::Value* storage);
198 
202  virtual ~JobStatistics();
203 
209  const StringPiece GetTypeName() const {
210  return StringPiece("google_bigquery_api::JobStatistics");
211  }
212 
218  bool has_completion_ratio() const {
219  return Storage().isMember("completionRatio");
220  }
221 
226  MutableStorage()->removeMember("completionRatio");
227  }
228 
229 
233  double get_completion_ratio() const {
234  const Json::Value& storage = Storage("completionRatio");
235  return client::JsonValueToCppValueHelper<double >(storage);
236  }
237 
246  void set_completion_ratio(double value) {
247  client::SetJsonValueFromCppValueHelper<double >(
248  value, MutableStorage("completionRatio"));
249  }
250 
256  bool has_creation_time() const {
257  return Storage().isMember("creationTime");
258  }
259 
264  MutableStorage()->removeMember("creationTime");
265  }
266 
267 
271  int64 get_creation_time() const {
272  const Json::Value& storage = Storage("creationTime");
273  return client::JsonValueToCppValueHelper<int64 >(storage);
274  }
275 
284  void set_creation_time(int64 value) {
285  client::SetJsonValueFromCppValueHelper<int64 >(
286  value, MutableStorage("creationTime"));
287  }
288 
294  bool has_end_time() const {
295  return Storage().isMember("endTime");
296  }
297 
301  void clear_end_time() {
302  MutableStorage()->removeMember("endTime");
303  }
304 
305 
309  int64 get_end_time() const {
310  const Json::Value& storage = Storage("endTime");
311  return client::JsonValueToCppValueHelper<int64 >(storage);
312  }
313 
322  void set_end_time(int64 value) {
323  client::SetJsonValueFromCppValueHelper<int64 >(
324  value, MutableStorage("endTime"));
325  }
326 
332  bool has_extract() const {
333  return Storage().isMember("extract");
334  }
335 
339  void clear_extract() {
340  MutableStorage()->removeMember("extract");
341  }
342 
343 
347  const JobStatistics4 get_extract() const;
348 
356  JobStatistics4 mutable_extract();
357 
363  bool has_load() const {
364  return Storage().isMember("load");
365  }
366 
370  void clear_load() {
371  MutableStorage()->removeMember("load");
372  }
373 
374 
378  const JobStatistics3 get_load() const;
379 
387  JobStatistics3 mutable_load();
388 
394  bool has_num_child_jobs() const {
395  return Storage().isMember("numChildJobs");
396  }
397 
402  MutableStorage()->removeMember("numChildJobs");
403  }
404 
405 
409  int64 get_num_child_jobs() const {
410  const Json::Value& storage = Storage("numChildJobs");
411  return client::JsonValueToCppValueHelper<int64 >(storage);
412  }
413 
421  void set_num_child_jobs(int64 value) {
422  client::SetJsonValueFromCppValueHelper<int64 >(
423  value, MutableStorage("numChildJobs"));
424  }
425 
431  bool has_parent_job_id() const {
432  return Storage().isMember("parentJobId");
433  }
434 
439  MutableStorage()->removeMember("parentJobId");
440  }
441 
442 
446  const StringPiece get_parent_job_id() const {
447  const Json::Value& v = Storage("parentJobId");
448  if (v == Json::Value::null) return StringPiece("");
449  return StringPiece(v.asCString());
450  }
451 
459  void set_parent_job_id(const StringPiece& value) {
460  *MutableStorage("parentJobId") = value.data();
461  }
462 
468  bool has_query() const {
469  return Storage().isMember("query");
470  }
471 
475  void clear_query() {
476  MutableStorage()->removeMember("query");
477  }
478 
479 
483  const JobStatistics2 get_query() const;
484 
492  JobStatistics2 mutable_query();
493 
499  bool has_quota_deferments() const {
500  return Storage().isMember("quotaDeferments");
501  }
502 
507  MutableStorage()->removeMember("quotaDeferments");
508  }
509 
510 
515  const client::JsonCppArray<string > get_quota_deferments() const {
516  const Json::Value& storage = Storage("quotaDeferments");
517  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
518  }
519 
528  client::JsonCppArray<string > mutable_quotaDeferments() {
529  Json::Value* storage = MutableStorage("quotaDeferments");
530  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
531  }
532 
538  bool has_reservation_usage() const {
539  return Storage().isMember("reservationUsage");
540  }
541 
546  MutableStorage()->removeMember("reservationUsage");
547  }
548 
549 
554  const client::JsonCppArray<JobStatisticsReservationUsage > get_reservation_usage() const {
555  const Json::Value& storage = Storage("reservationUsage");
556  return client::JsonValueToCppValueHelper<client::JsonCppArray<JobStatisticsReservationUsage > >(storage);
557  }
558 
567  client::JsonCppArray<JobStatisticsReservationUsage > mutable_reservationUsage() {
568  Json::Value* storage = MutableStorage("reservationUsage");
569  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<JobStatisticsReservationUsage > >(storage);
570  }
571 
577  bool has_reservation_id() const {
578  return Storage().isMember("reservation_id");
579  }
580 
585  MutableStorage()->removeMember("reservation_id");
586  }
587 
588 
592  const StringPiece get_reservation_id() const {
593  const Json::Value& v = Storage("reservation_id");
594  if (v == Json::Value::null) return StringPiece("");
595  return StringPiece(v.asCString());
596  }
597 
607  void set_reservation_id(const StringPiece& value) {
608  *MutableStorage("reservation_id") = value.data();
609  }
610 
616  bool has_script_statistics() const {
617  return Storage().isMember("scriptStatistics");
618  }
619 
624  MutableStorage()->removeMember("scriptStatistics");
625  }
626 
627 
632  const ScriptStatistics get_script_statistics() const;
633 
642  ScriptStatistics mutable_scriptStatistics();
643 
649  bool has_start_time() const {
650  return Storage().isMember("startTime");
651  }
652 
657  MutableStorage()->removeMember("startTime");
658  }
659 
660 
664  int64 get_start_time() const {
665  const Json::Value& storage = Storage("startTime");
666  return client::JsonValueToCppValueHelper<int64 >(storage);
667  }
668 
678  void set_start_time(int64 value) {
679  client::SetJsonValueFromCppValueHelper<int64 >(
680  value, MutableStorage("startTime"));
681  }
682 
689  return Storage().isMember("totalBytesProcessed");
690  }
691 
696  MutableStorage()->removeMember("totalBytesProcessed");
697  }
698 
699 
704  const Json::Value& storage = Storage("totalBytesProcessed");
705  return client::JsonValueToCppValueHelper<int64 >(storage);
706  }
707 
716  void set_total_bytes_processed(int64 value) {
717  client::SetJsonValueFromCppValueHelper<int64 >(
718  value, MutableStorage("totalBytesProcessed"));
719  }
720 
726  bool has_total_slot_ms() const {
727  return Storage().isMember("totalSlotMs");
728  }
729 
734  MutableStorage()->removeMember("totalSlotMs");
735  }
736 
737 
741  int64 get_total_slot_ms() const {
742  const Json::Value& storage = Storage("totalSlotMs");
743  return client::JsonValueToCppValueHelper<int64 >(storage);
744  }
745 
753  void set_total_slot_ms(int64 value) {
754  client::SetJsonValueFromCppValueHelper<int64 >(
755  value, MutableStorage("totalSlotMs"));
756  }
757 
758  private:
759  void operator=(const JobStatistics&);
760 }; // JobStatistics
761 } // namespace google_bigquery_api
762 #endif // GOOGLE_BIGQUERY_API_JOB_STATISTICS_H_
const StringPiece get_name() const
Definition: job_statistics.h:120
void set_start_time(int64 value)
Definition: job_statistics.h:678
bool has_load() const
Definition: job_statistics.h:363
const client::JsonCppArray< string > get_quota_deferments() const
Definition: job_statistics.h:515
const StringPiece GetTypeName() const
Definition: job_statistics.h:209
void set_slot_ms(int64 value)
Definition: job_statistics.h:170
void set_num_child_jobs(int64 value)
Definition: job_statistics.h:421
bool has_start_time() const
Definition: job_statistics.h:649
void clear_query()
Definition: job_statistics.h:475
int64 get_start_time() const
Definition: job_statistics.h:664
void set_total_slot_ms(int64 value)
Definition: job_statistics.h:753
void clear_reservation_usage()
Definition: job_statistics.h:545
int64 get_slot_ms() const
Definition: job_statistics.h:158
void set_parent_job_id(const StringPiece &value)
Definition: job_statistics.h:459
int64 get_total_bytes_processed() const
Definition: job_statistics.h:703
void set_end_time(int64 value)
Definition: job_statistics.h:322
Definition: job_statistics.h:56
const client::JsonCppArray< JobStatisticsReservationUsage > get_reservation_usage() const
Definition: job_statistics.h:554
bool has_total_bytes_processed() const
Definition: job_statistics.h:688
Definition: aggregate_classification_metrics.cc:39
bool has_slot_ms() const
Definition: job_statistics.h:143
void clear_extract()
Definition: job_statistics.h:339
void clear_start_time()
Definition: job_statistics.h:656
void clear_completion_ratio()
Definition: job_statistics.h:225
const StringPiece GetTypeName() const
Definition: job_statistics.h:96
bool has_reservation_usage() const
Definition: job_statistics.h:538
bool has_script_statistics() const
Definition: job_statistics.h:616
bool has_query() const
Definition: job_statistics.h:468
bool has_num_child_jobs() const
Definition: job_statistics.h:394
void clear_parent_job_id()
Definition: job_statistics.h:438
bool has_extract() const
Definition: job_statistics.h:332
void clear_total_bytes_processed()
Definition: job_statistics.h:695
bool has_parent_job_id() const
Definition: job_statistics.h:431
void set_total_bytes_processed(int64 value)
Definition: job_statistics.h:716
void clear_load()
Definition: job_statistics.h:370
Definition: job_statistics2.h:59
int64 get_total_slot_ms() const
Definition: job_statistics.h:741
Definition: aggregate_classification_metrics.h:37
bool has_name() const
Definition: job_statistics.h:105
void clear_total_slot_ms()
Definition: job_statistics.h:733
int64 get_num_child_jobs() const
Definition: job_statistics.h:409
client::JsonCppArray< string > mutable_quotaDeferments()
Definition: job_statistics.h:528
const StringPiece get_reservation_id() const
Definition: job_statistics.h:592
client::JsonCppArray< JobStatisticsReservationUsage > mutable_reservationUsage()
Definition: job_statistics.h:567
double get_completion_ratio() const
Definition: job_statistics.h:233
bool has_end_time() const
Definition: job_statistics.h:294
void clear_reservation_id()
Definition: job_statistics.h:584
bool has_quota_deferments() const
Definition: job_statistics.h:499
void set_reservation_id(const StringPiece &value)
Definition: job_statistics.h:607
Definition: script_statistics.h:52
Definition: job_statistics4.h:50
void clear_quota_deferments()
Definition: job_statistics.h:506
void set_name(const StringPiece &value)
Definition: job_statistics.h:134
bool has_creation_time() const
Definition: job_statistics.h:256
const StringPiece get_parent_job_id() const
Definition: job_statistics.h:446
void clear_creation_time()
Definition: job_statistics.h:263
int64 get_end_time() const
Definition: job_statistics.h:309
void clear_num_child_jobs()
Definition: job_statistics.h:401
void clear_script_statistics()
Definition: job_statistics.h:623
bool has_reservation_id() const
Definition: job_statistics.h:577
void set_creation_time(int64 value)
Definition: job_statistics.h:284
bool has_completion_ratio() const
Definition: job_statistics.h:218
void clear_end_time()
Definition: job_statistics.h:301
int64 get_creation_time() const
Definition: job_statistics.h:271
bool has_total_slot_ms() const
Definition: job_statistics.h:726
void set_completion_ratio(double value)
Definition: job_statistics.h:246
Definition: job_statistics3.h:50