bigquery  v2
job_statistics2.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_STATISTICS2_H_
31 #define GOOGLE_BIGQUERY_API_JOB_STATISTICS2_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/big_query_model_training.h"
40 #include "google/bigquery_api/explain_query_stage.h"
41 #include "google/bigquery_api/query_parameter.h"
42 #include "google/bigquery_api/query_timeline_sample.h"
43 #include "google/bigquery_api/routine_reference.h"
44 #include "google/bigquery_api/table_reference.h"
45 #include "google/bigquery_api/table_schema.h"
46 
47 namespace Json {
48 class Value;
49 } // namespace Json
50 
51 namespace google_bigquery_api {
52 using namespace googleapis;
53 
59 class JobStatistics2 : public client::JsonCppData {
60  public:
66  class JobStatistics2ReservationUsage : public client::JsonCppData {
67  public:
73  static JobStatistics2ReservationUsage* New();
74 
80  explicit JobStatistics2ReservationUsage(const Json::Value& storage);
81 
87  explicit JobStatistics2ReservationUsage(Json::Value* storage);
88 
93 
99  const StringPiece GetTypeName() const {
100  return StringPiece("google_bigquery_api::JobStatistics2ReservationUsage");
101  }
102 
108  bool has_name() const {
109  return Storage().isMember("name");
110  }
111 
115  void clear_name() {
116  MutableStorage()->removeMember("name");
117  }
118 
119 
123  const StringPiece get_name() const {
124  const Json::Value& v = Storage("name");
125  if (v == Json::Value::null) return StringPiece("");
126  return StringPiece(v.asCString());
127  }
128 
137  void set_name(const StringPiece& value) {
138  *MutableStorage("name") = value.data();
139  }
140 
146  bool has_slot_ms() const {
147  return Storage().isMember("slotMs");
148  }
149 
153  void clear_slot_ms() {
154  MutableStorage()->removeMember("slotMs");
155  }
156 
157 
161  int64 get_slot_ms() const {
162  const Json::Value& storage = Storage("slotMs");
163  return client::JsonValueToCppValueHelper<int64 >(storage);
164  }
165 
173  void set_slot_ms(int64 value) {
174  client::SetJsonValueFromCppValueHelper<int64 >(
175  value, MutableStorage("slotMs"));
176  }
177 
178  private:
179  void operator=(const JobStatistics2ReservationUsage&);
180  }; // JobStatistics2ReservationUsage
186  static JobStatistics2* New();
187 
193  explicit JobStatistics2(const Json::Value& storage);
194 
200  explicit JobStatistics2(Json::Value* storage);
201 
205  virtual ~JobStatistics2();
206 
212  const StringPiece GetTypeName() const {
213  return StringPiece("google_bigquery_api::JobStatistics2");
214  }
215 
221  bool has_billing_tier() const {
222  return Storage().isMember("billingTier");
223  }
224 
229  MutableStorage()->removeMember("billingTier");
230  }
231 
232 
236  int32 get_billing_tier() const {
237  const Json::Value& storage = Storage("billingTier");
238  return client::JsonValueToCppValueHelper<int32 >(storage);
239  }
240 
248  void set_billing_tier(int32 value) {
249  client::SetJsonValueFromCppValueHelper<int32 >(
250  value, MutableStorage("billingTier"));
251  }
252 
258  bool has_cache_hit() const {
259  return Storage().isMember("cacheHit");
260  }
261 
266  MutableStorage()->removeMember("cacheHit");
267  }
268 
269 
273  bool get_cache_hit() const {
274  const Json::Value& storage = Storage("cacheHit");
275  return client::JsonValueToCppValueHelper<bool >(storage);
276  }
277 
285  void set_cache_hit(bool value) {
286  client::SetJsonValueFromCppValueHelper<bool >(
287  value, MutableStorage("cacheHit"));
288  }
289 
296  return Storage().isMember("ddlOperationPerformed");
297  }
298 
303  MutableStorage()->removeMember("ddlOperationPerformed");
304  }
305 
306 
310  const StringPiece get_ddl_operation_performed() const {
311  const Json::Value& v = Storage("ddlOperationPerformed");
312  if (v == Json::Value::null) return StringPiece("");
313  return StringPiece(v.asCString());
314  }
315 
330  void set_ddl_operation_performed(const StringPiece& value) {
331  *MutableStorage("ddlOperationPerformed") = value.data();
332  }
333 
339  bool has_ddl_target_routine() const {
340  return Storage().isMember("ddlTargetRoutine");
341  }
342 
347  MutableStorage()->removeMember("ddlTargetRoutine");
348  }
349 
350 
355  const RoutineReference get_ddl_target_routine() const;
356 
366  RoutineReference mutable_ddlTargetRoutine();
367 
373  bool has_ddl_target_table() const {
374  return Storage().isMember("ddlTargetTable");
375  }
376 
381  MutableStorage()->removeMember("ddlTargetTable");
382  }
383 
384 
389  const TableReference get_ddl_target_table() const;
390 
399  TableReference mutable_ddlTargetTable();
400 
408  return Storage().isMember("estimatedBytesProcessed");
409  }
410 
415  MutableStorage()->removeMember("estimatedBytesProcessed");
416  }
417 
418 
423  const Json::Value& storage = Storage("estimatedBytesProcessed");
424  return client::JsonValueToCppValueHelper<int64 >(storage);
425  }
426 
434  void set_estimated_bytes_processed(int64 value) {
435  client::SetJsonValueFromCppValueHelper<int64 >(
436  value, MutableStorage("estimatedBytesProcessed"));
437  }
438 
444  bool has_model_training() const {
445  return Storage().isMember("modelTraining");
446  }
447 
452  MutableStorage()->removeMember("modelTraining");
453  }
454 
455 
459  const BigQueryModelTraining get_model_training() const;
460 
469  BigQueryModelTraining mutable_modelTraining();
470 
479  return Storage().isMember("modelTrainingCurrentIteration");
480  }
481 
486  MutableStorage()->removeMember("modelTrainingCurrentIteration");
487  }
488 
489 
495  const Json::Value& storage = Storage("modelTrainingCurrentIteration");
496  return client::JsonValueToCppValueHelper<int32 >(storage);
497  }
498 
507  client::SetJsonValueFromCppValueHelper<int32 >(
508  value, MutableStorage("modelTrainingCurrentIteration"));
509  }
510 
519  return Storage().isMember("modelTrainingExpectedTotalIteration");
520  }
521 
526  MutableStorage()->removeMember("modelTrainingExpectedTotalIteration");
527  }
528 
529 
535  const Json::Value& storage = Storage("modelTrainingExpectedTotalIteration");
536  return client::JsonValueToCppValueHelper<int64 >(storage);
537  }
538 
547  client::SetJsonValueFromCppValueHelper<int64 >(
548  value, MutableStorage("modelTrainingExpectedTotalIteration"));
549  }
550 
557  return Storage().isMember("numDmlAffectedRows");
558  }
559 
564  MutableStorage()->removeMember("numDmlAffectedRows");
565  }
566 
567 
572  const Json::Value& storage = Storage("numDmlAffectedRows");
573  return client::JsonValueToCppValueHelper<int64 >(storage);
574  }
575 
584  void set_num_dml_affected_rows(int64 value) {
585  client::SetJsonValueFromCppValueHelper<int64 >(
586  value, MutableStorage("numDmlAffectedRows"));
587  }
588 
594  bool has_query_plan() const {
595  return Storage().isMember("queryPlan");
596  }
597 
602  MutableStorage()->removeMember("queryPlan");
603  }
604 
605 
609  const client::JsonCppArray<ExplainQueryStage > get_query_plan() const;
610 
619  client::JsonCppArray<ExplainQueryStage > mutable_queryPlan();
620 
626  bool has_referenced_routines() const {
627  return Storage().isMember("referencedRoutines");
628  }
629 
634  MutableStorage()->removeMember("referencedRoutines");
635  }
636 
637 
642  const client::JsonCppArray<RoutineReference > get_referenced_routines() const;
643 
653  client::JsonCppArray<RoutineReference > mutable_referencedRoutines();
654 
660  bool has_referenced_tables() const {
661  return Storage().isMember("referencedTables");
662  }
663 
668  MutableStorage()->removeMember("referencedTables");
669  }
670 
671 
676  const client::JsonCppArray<TableReference > get_referenced_tables() const;
677 
687  client::JsonCppArray<TableReference > mutable_referencedTables();
688 
694  bool has_reservation_usage() const {
695  return Storage().isMember("reservationUsage");
696  }
697 
702  MutableStorage()->removeMember("reservationUsage");
703  }
704 
705 
710  const client::JsonCppArray<JobStatistics2ReservationUsage > get_reservation_usage() const {
711  const Json::Value& storage = Storage("reservationUsage");
712  return client::JsonValueToCppValueHelper<client::JsonCppArray<JobStatistics2ReservationUsage > >(storage);
713  }
714 
723  client::JsonCppArray<JobStatistics2ReservationUsage > mutable_reservationUsage() {
724  Json::Value* storage = MutableStorage("reservationUsage");
725  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<JobStatistics2ReservationUsage > >(storage);
726  }
727 
733  bool has_schema() const {
734  return Storage().isMember("schema");
735  }
736 
740  void clear_schema() {
741  MutableStorage()->removeMember("schema");
742  }
743 
744 
748  const TableSchema get_schema() const;
749 
758  TableSchema mutable_schema();
759 
765  bool has_statement_type() const {
766  return Storage().isMember("statementType");
767  }
768 
773  MutableStorage()->removeMember("statementType");
774  }
775 
776 
780  const StringPiece get_statement_type() const {
781  const Json::Value& v = Storage("statementType");
782  if (v == Json::Value::null) return StringPiece("");
783  return StringPiece(v.asCString());
784  }
785 
810  void set_statement_type(const StringPiece& value) {
811  *MutableStorage("statementType") = value.data();
812  }
813 
819  bool has_timeline() const {
820  return Storage().isMember("timeline");
821  }
822 
826  void clear_timeline() {
827  MutableStorage()->removeMember("timeline");
828  }
829 
830 
834  const client::JsonCppArray<QueryTimelineSample > get_timeline() const;
835 
844  client::JsonCppArray<QueryTimelineSample > mutable_timeline();
845 
851  bool has_total_bytes_billed() const {
852  return Storage().isMember("totalBytesBilled");
853  }
854 
859  MutableStorage()->removeMember("totalBytesBilled");
860  }
861 
862 
866  int64 get_total_bytes_billed() const {
867  const Json::Value& storage = Storage("totalBytesBilled");
868  return client::JsonValueToCppValueHelper<int64 >(storage);
869  }
870 
878  void set_total_bytes_billed(int64 value) {
879  client::SetJsonValueFromCppValueHelper<int64 >(
880  value, MutableStorage("totalBytesBilled"));
881  }
882 
889  return Storage().isMember("totalBytesProcessed");
890  }
891 
896  MutableStorage()->removeMember("totalBytesProcessed");
897  }
898 
899 
904  const Json::Value& storage = Storage("totalBytesProcessed");
905  return client::JsonValueToCppValueHelper<int64 >(storage);
906  }
907 
915  void set_total_bytes_processed(int64 value) {
916  client::SetJsonValueFromCppValueHelper<int64 >(
917  value, MutableStorage("totalBytesProcessed"));
918  }
919 
928  return Storage().isMember("totalBytesProcessedAccuracy");
929  }
930 
935  MutableStorage()->removeMember("totalBytesProcessedAccuracy");
936  }
937 
938 
942  const StringPiece get_total_bytes_processed_accuracy() const {
943  const Json::Value& v = Storage("totalBytesProcessedAccuracy");
944  if (v == Json::Value::null) return StringPiece("");
945  return StringPiece(v.asCString());
946  }
947 
959  void set_total_bytes_processed_accuracy(const StringPiece& value) {
960  *MutableStorage("totalBytesProcessedAccuracy") = value.data();
961  }
962 
970  return Storage().isMember("totalPartitionsProcessed");
971  }
972 
977  MutableStorage()->removeMember("totalPartitionsProcessed");
978  }
979 
980 
985  const Json::Value& storage = Storage("totalPartitionsProcessed");
986  return client::JsonValueToCppValueHelper<int64 >(storage);
987  }
988 
997  void set_total_partitions_processed(int64 value) {
998  client::SetJsonValueFromCppValueHelper<int64 >(
999  value, MutableStorage("totalPartitionsProcessed"));
1000  }
1001 
1007  bool has_total_slot_ms() const {
1008  return Storage().isMember("totalSlotMs");
1009  }
1010 
1015  MutableStorage()->removeMember("totalSlotMs");
1016  }
1017 
1018 
1022  int64 get_total_slot_ms() const {
1023  const Json::Value& storage = Storage("totalSlotMs");
1024  return client::JsonValueToCppValueHelper<int64 >(storage);
1025  }
1026 
1034  void set_total_slot_ms(int64 value) {
1035  client::SetJsonValueFromCppValueHelper<int64 >(
1036  value, MutableStorage("totalSlotMs"));
1037  }
1038 
1047  return Storage().isMember("undeclaredQueryParameters");
1048  }
1049 
1054  MutableStorage()->removeMember("undeclaredQueryParameters");
1055  }
1056 
1057 
1062  const client::JsonCppArray<QueryParameter > get_undeclared_query_parameters() const;
1063 
1073  client::JsonCppArray<QueryParameter > mutable_undeclaredQueryParameters();
1074 
1075  private:
1076  void operator=(const JobStatistics2&);
1077 }; // JobStatistics2
1078 } // namespace google_bigquery_api
1079 #endif // GOOGLE_BIGQUERY_API_JOB_STATISTICS2_H_
const StringPiece GetTypeName() const
Definition: job_statistics2.h:99
void set_estimated_bytes_processed(int64 value)
Definition: job_statistics2.h:434
bool has_name() const
Definition: job_statistics2.h:108
const StringPiece GetTypeName() const
Definition: job_statistics2.h:212
bool has_statement_type() const
Definition: job_statistics2.h:765
void clear_total_partitions_processed()
Definition: job_statistics2.h:976
void set_ddl_operation_performed(const StringPiece &value)
Definition: job_statistics2.h:330
const StringPiece get_total_bytes_processed_accuracy() const
Definition: job_statistics2.h:942
void clear_total_bytes_processed_accuracy()
Definition: job_statistics2.h:934
bool has_billing_tier() const
Definition: job_statistics2.h:221
void set_cache_hit(bool value)
Definition: job_statistics2.h:285
int64 get_total_bytes_billed() const
Definition: job_statistics2.h:866
bool has_referenced_tables() const
Definition: job_statistics2.h:660
int64 get_num_dml_affected_rows() const
Definition: job_statistics2.h:571
void set_total_slot_ms(int64 value)
Definition: job_statistics2.h:1034
bool has_ddl_target_routine() const
Definition: job_statistics2.h:339
bool has_reservation_usage() const
Definition: job_statistics2.h:694
int32 get_model_training_current_iteration() const
Definition: job_statistics2.h:494
bool has_ddl_operation_performed() const
Definition: job_statistics2.h:295
int64 get_slot_ms() const
Definition: job_statistics2.h:161
void clear_reservation_usage()
Definition: job_statistics2.h:701
void set_model_training_current_iteration(int32 value)
Definition: job_statistics2.h:506
const StringPiece get_statement_type() const
Definition: job_statistics2.h:780
void set_slot_ms(int64 value)
Definition: job_statistics2.h:173
void clear_cache_hit()
Definition: job_statistics2.h:265
Definition: table_schema.h:51
bool has_model_training_expected_total_iteration() const
Definition: job_statistics2.h:518
bool has_total_bytes_processed_accuracy() const
Definition: job_statistics2.h:927
Definition: aggregate_classification_metrics.cc:39
bool has_estimated_bytes_processed() const
Definition: job_statistics2.h:407
Definition: routine_reference.h:50
bool has_cache_hit() const
Definition: job_statistics2.h:258
bool has_referenced_routines() const
Definition: job_statistics2.h:626
bool has_query_plan() const
Definition: job_statistics2.h:594
client::JsonCppArray< JobStatistics2ReservationUsage > mutable_reservationUsage()
Definition: job_statistics2.h:723
const client::JsonCppArray< JobStatistics2ReservationUsage > get_reservation_usage() const
Definition: job_statistics2.h:710
void clear_total_slot_ms()
Definition: job_statistics2.h:1014
void clear_schema()
Definition: job_statistics2.h:740
void clear_billing_tier()
Definition: job_statistics2.h:228
void set_total_bytes_billed(int64 value)
Definition: job_statistics2.h:878
void set_num_dml_affected_rows(int64 value)
Definition: job_statistics2.h:584
int64 get_model_training_expected_total_iteration() const
Definition: job_statistics2.h:534
Definition: job_statistics2.h:59
bool has_model_training() const
Definition: job_statistics2.h:444
bool has_total_bytes_billed() const
Definition: job_statistics2.h:851
bool get_cache_hit() const
Definition: job_statistics2.h:273
const StringPiece get_ddl_operation_performed() const
Definition: job_statistics2.h:310
int64 get_total_slot_ms() const
Definition: job_statistics2.h:1022
void clear_statement_type()
Definition: job_statistics2.h:772
void set_total_bytes_processed_accuracy(const StringPiece &value)
Definition: job_statistics2.h:959
void set_total_bytes_processed(int64 value)
Definition: job_statistics2.h:915
Definition: aggregate_classification_metrics.h:37
int32 get_billing_tier() const
Definition: job_statistics2.h:236
void clear_total_bytes_billed()
Definition: job_statistics2.h:858
void clear_query_plan()
Definition: job_statistics2.h:601
void set_total_partitions_processed(int64 value)
Definition: job_statistics2.h:997
void clear_referenced_tables()
Definition: job_statistics2.h:667
void set_model_training_expected_total_iteration(int64 value)
Definition: job_statistics2.h:546
void clear_total_bytes_processed()
Definition: job_statistics2.h:895
Definition: table_reference.h:50
void clear_ddl_target_table()
Definition: job_statistics2.h:380
Definition: big_query_model_training.h:50
void clear_referenced_routines()
Definition: job_statistics2.h:633
int64 get_total_bytes_processed() const
Definition: job_statistics2.h:903
bool has_total_slot_ms() const
Definition: job_statistics2.h:1007
void clear_model_training_current_iteration()
Definition: job_statistics2.h:485
void clear_ddl_target_routine()
Definition: job_statistics2.h:346
bool has_num_dml_affected_rows() const
Definition: job_statistics2.h:556
int64 get_estimated_bytes_processed() const
Definition: job_statistics2.h:422
bool has_undeclared_query_parameters() const
Definition: job_statistics2.h:1046
bool has_timeline() const
Definition: job_statistics2.h:819
const StringPiece get_name() const
Definition: job_statistics2.h:123
bool has_total_partitions_processed() const
Definition: job_statistics2.h:969
void set_name(const StringPiece &value)
Definition: job_statistics2.h:137
void set_billing_tier(int32 value)
Definition: job_statistics2.h:248
bool has_ddl_target_table() const
Definition: job_statistics2.h:373
bool has_total_bytes_processed() const
Definition: job_statistics2.h:888
void clear_ddl_operation_performed()
Definition: job_statistics2.h:302
void clear_timeline()
Definition: job_statistics2.h:826
void clear_num_dml_affected_rows()
Definition: job_statistics2.h:563
void clear_undeclared_query_parameters()
Definition: job_statistics2.h:1053
void clear_model_training()
Definition: job_statistics2.h:451
int64 get_total_partitions_processed() const
Definition: job_statistics2.h:984
void set_statement_type(const StringPiece &value)
Definition: job_statistics2.h:810
bool has_model_training_current_iteration() const
Definition: job_statistics2.h:478
void clear_estimated_bytes_processed()
Definition: job_statistics2.h:414
void clear_model_training_expected_total_iteration()
Definition: job_statistics2.h:525
bool has_slot_ms() const
Definition: job_statistics2.h:146
bool has_schema() const
Definition: job_statistics2.h:733