bigquery  v2
table.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_TABLE_H_
31 #define GOOGLE_BIGQUERY_API_TABLE_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/clustering.h"
40 #include "google/bigquery_api/encryption_configuration.h"
41 #include "google/bigquery_api/external_data_configuration.h"
42 #include "google/bigquery_api/materialized_view_definition.h"
43 #include "google/bigquery_api/model_definition.h"
44 #include "google/bigquery_api/range_partitioning.h"
45 #include "google/bigquery_api/streamingbuffer.h"
46 #include "google/bigquery_api/table_reference.h"
47 #include "google/bigquery_api/table_schema.h"
48 #include "google/bigquery_api/time_partitioning.h"
49 #include "google/bigquery_api/view_definition.h"
50 
51 namespace Json {
52 class Value;
53 } // namespace Json
54 
55 namespace google_bigquery_api {
56 using namespace googleapis;
57 
63 class Table : public client::JsonCppData {
64  public:
70  static Table* New();
71 
77  explicit Table(const Json::Value& storage);
78 
84  explicit Table(Json::Value* storage);
85 
89  virtual ~Table();
90 
96  const StringPiece GetTypeName() const {
97  return StringPiece("google_bigquery_api::Table");
98  }
99 
105  bool has_clustering() const {
106  return Storage().isMember("clustering");
107  }
108 
113  MutableStorage()->removeMember("clustering");
114  }
115 
116 
120  const Clustering get_clustering() const;
121 
132  Clustering mutable_clustering();
133 
139  bool has_creation_time() const {
140  return Storage().isMember("creationTime");
141  }
142 
147  MutableStorage()->removeMember("creationTime");
148  }
149 
150 
154  int64 get_creation_time() const {
155  const Json::Value& storage = Storage("creationTime");
156  return client::JsonValueToCppValueHelper<int64 >(storage);
157  }
158 
167  void set_creation_time(int64 value) {
168  client::SetJsonValueFromCppValueHelper<int64 >(
169  value, MutableStorage("creationTime"));
170  }
171 
177  bool has_description() const {
178  return Storage().isMember("description");
179  }
180 
185  MutableStorage()->removeMember("description");
186  }
187 
188 
192  const StringPiece get_description() const {
193  const Json::Value& v = Storage("description");
194  if (v == Json::Value::null) return StringPiece("");
195  return StringPiece(v.asCString());
196  }
197 
205  void set_description(const StringPiece& value) {
206  *MutableStorage("description") = value.data();
207  }
208 
216  return Storage().isMember("encryptionConfiguration");
217  }
218 
223  MutableStorage()->removeMember("encryptionConfiguration");
224  }
225 
226 
231  const EncryptionConfiguration get_encryption_configuration() const;
232 
241  EncryptionConfiguration mutable_encryptionConfiguration();
242 
248  bool has_etag() const {
249  return Storage().isMember("etag");
250  }
251 
255  void clear_etag() {
256  MutableStorage()->removeMember("etag");
257  }
258 
259 
263  const StringPiece get_etag() const {
264  const Json::Value& v = Storage("etag");
265  if (v == Json::Value::null) return StringPiece("");
266  return StringPiece(v.asCString());
267  }
268 
279  void set_etag(const StringPiece& value) {
280  *MutableStorage("etag") = value.data();
281  }
282 
288  bool has_expiration_time() const {
289  return Storage().isMember("expirationTime");
290  }
291 
296  MutableStorage()->removeMember("expirationTime");
297  }
298 
299 
303  int64 get_expiration_time() const {
304  const Json::Value& storage = Storage("expirationTime");
305  return client::JsonValueToCppValueHelper<int64 >(storage);
306  }
307 
319  void set_expiration_time(int64 value) {
320  client::SetJsonValueFromCppValueHelper<int64 >(
321  value, MutableStorage("expirationTime"));
322  }
323 
332  return Storage().isMember("externalDataConfiguration");
333  }
334 
339  MutableStorage()->removeMember("externalDataConfiguration");
340  }
341 
342 
347  const ExternalDataConfiguration get_external_data_configuration() const;
348 
359  ExternalDataConfiguration mutable_externalDataConfiguration();
360 
366  bool has_friendly_name() const {
367  return Storage().isMember("friendlyName");
368  }
369 
374  MutableStorage()->removeMember("friendlyName");
375  }
376 
377 
381  const StringPiece get_friendly_name() const {
382  const Json::Value& v = Storage("friendlyName");
383  if (v == Json::Value::null) return StringPiece("");
384  return StringPiece(v.asCString());
385  }
386 
394  void set_friendly_name(const StringPiece& value) {
395  *MutableStorage("friendlyName") = value.data();
396  }
397 
403  bool has_id() const {
404  return Storage().isMember("id");
405  }
406 
410  void clear_id() {
411  MutableStorage()->removeMember("id");
412  }
413 
414 
418  const StringPiece get_id() const {
419  const Json::Value& v = Storage("id");
420  if (v == Json::Value::null) return StringPiece("");
421  return StringPiece(v.asCString());
422  }
423 
431  void set_id(const StringPiece& value) {
432  *MutableStorage("id") = value.data();
433  }
434 
440  bool has_kind() const {
441  return Storage().isMember("kind");
442  }
443 
447  void clear_kind() {
448  MutableStorage()->removeMember("kind");
449  }
450 
451 
455  const StringPiece get_kind() const {
456  const Json::Value& v = Storage("kind");
457  if (v == Json::Value::null) return StringPiece("");
458  return StringPiece(v.asCString());
459  }
460 
468  void set_kind(const StringPiece& value) {
469  *MutableStorage("kind") = value.data();
470  }
471 
477  bool has_labels() const {
478  return Storage().isMember("labels");
479  }
480 
484  void clear_labels() {
485  MutableStorage()->removeMember("labels");
486  }
487 
488 
492  const client::JsonCppAssociativeArray<string > get_labels() const {
493  const Json::Value& storage = Storage("labels");
494  return client::JsonValueToCppValueHelper<client::JsonCppAssociativeArray<string > >(storage);
495  }
496 
509  client::JsonCppAssociativeArray<string > mutable_labels() {
510  Json::Value* storage = MutableStorage("labels");
511  return client::JsonValueToMutableCppValueHelper<client::JsonCppAssociativeArray<string > >(storage);
512  }
513 
519  bool has_last_modified_time() const {
520  return Storage().isMember("lastModifiedTime");
521  }
522 
527  MutableStorage()->removeMember("lastModifiedTime");
528  }
529 
530 
534  uint64 get_last_modified_time() const {
535  const Json::Value& storage = Storage("lastModifiedTime");
536  return client::JsonValueToCppValueHelper<uint64 >(storage);
537  }
538 
547  void set_last_modified_time(uint64 value) {
548  client::SetJsonValueFromCppValueHelper<uint64 >(
549  value, MutableStorage("lastModifiedTime"));
550  }
551 
557  bool has_location() const {
558  return Storage().isMember("location");
559  }
560 
564  void clear_location() {
565  MutableStorage()->removeMember("location");
566  }
567 
568 
572  const StringPiece get_location() const {
573  const Json::Value& v = Storage("location");
574  if (v == Json::Value::null) return StringPiece("");
575  return StringPiece(v.asCString());
576  }
577 
586  void set_location(const StringPiece& value) {
587  *MutableStorage("location") = value.data();
588  }
589 
595  bool has_materialized_view() const {
596  return Storage().isMember("materializedView");
597  }
598 
603  MutableStorage()->removeMember("materializedView");
604  }
605 
606 
611  const MaterializedViewDefinition get_materialized_view() const;
612 
621  MaterializedViewDefinition mutable_materializedView();
622 
628  bool has_model() const {
629  return Storage().isMember("model");
630  }
631 
635  void clear_model() {
636  MutableStorage()->removeMember("model");
637  }
638 
639 
643  const ModelDefinition get_model() const;
644 
654  ModelDefinition mutable_model();
655 
661  bool has_num_bytes() const {
662  return Storage().isMember("numBytes");
663  }
664 
669  MutableStorage()->removeMember("numBytes");
670  }
671 
672 
676  int64 get_num_bytes() const {
677  const Json::Value& storage = Storage("numBytes");
678  return client::JsonValueToCppValueHelper<int64 >(storage);
679  }
680 
689  void set_num_bytes(int64 value) {
690  client::SetJsonValueFromCppValueHelper<int64 >(
691  value, MutableStorage("numBytes"));
692  }
693 
699  bool has_num_long_term_bytes() const {
700  return Storage().isMember("numLongTermBytes");
701  }
702 
707  MutableStorage()->removeMember("numLongTermBytes");
708  }
709 
710 
714  int64 get_num_long_term_bytes() const {
715  const Json::Value& storage = Storage("numLongTermBytes");
716  return client::JsonValueToCppValueHelper<int64 >(storage);
717  }
718 
727  void set_num_long_term_bytes(int64 value) {
728  client::SetJsonValueFromCppValueHelper<int64 >(
729  value, MutableStorage("numLongTermBytes"));
730  }
731 
737  bool has_num_physical_bytes() const {
738  return Storage().isMember("numPhysicalBytes");
739  }
740 
745  MutableStorage()->removeMember("numPhysicalBytes");
746  }
747 
748 
752  int64 get_num_physical_bytes() const {
753  const Json::Value& storage = Storage("numPhysicalBytes");
754  return client::JsonValueToCppValueHelper<int64 >(storage);
755  }
756 
766  void set_num_physical_bytes(int64 value) {
767  client::SetJsonValueFromCppValueHelper<int64 >(
768  value, MutableStorage("numPhysicalBytes"));
769  }
770 
776  bool has_num_rows() const {
777  return Storage().isMember("numRows");
778  }
779 
783  void clear_num_rows() {
784  MutableStorage()->removeMember("numRows");
785  }
786 
787 
791  uint64 get_num_rows() const {
792  const Json::Value& storage = Storage("numRows");
793  return client::JsonValueToCppValueHelper<uint64 >(storage);
794  }
795 
804  void set_num_rows(uint64 value) {
805  client::SetJsonValueFromCppValueHelper<uint64 >(
806  value, MutableStorage("numRows"));
807  }
808 
814  bool has_range_partitioning() const {
815  return Storage().isMember("rangePartitioning");
816  }
817 
822  MutableStorage()->removeMember("rangePartitioning");
823  }
824 
825 
830  const RangePartitioning get_range_partitioning() const;
831 
841  RangePartitioning mutable_rangePartitioning();
842 
850  return Storage().isMember("requirePartitionFilter");
851  }
852 
857  MutableStorage()->removeMember("requirePartitionFilter");
858  }
859 
860 
865  const Json::Value& storage = Storage("requirePartitionFilter");
866  return client::JsonValueToCppValueHelper<bool >(storage);
867  }
868 
877  void set_require_partition_filter(bool value) {
878  client::SetJsonValueFromCppValueHelper<bool >(
879  value, MutableStorage("requirePartitionFilter"));
880  }
881 
887  bool has_schema() const {
888  return Storage().isMember("schema");
889  }
890 
894  void clear_schema() {
895  MutableStorage()->removeMember("schema");
896  }
897 
898 
902  const TableSchema get_schema() const;
903 
911  TableSchema mutable_schema();
912 
918  bool has_self_link() const {
919  return Storage().isMember("selfLink");
920  }
921 
926  MutableStorage()->removeMember("selfLink");
927  }
928 
929 
933  const StringPiece get_self_link() const {
934  const Json::Value& v = Storage("selfLink");
935  if (v == Json::Value::null) return StringPiece("");
936  return StringPiece(v.asCString());
937  }
938 
946  void set_self_link(const StringPiece& value) {
947  *MutableStorage("selfLink") = value.data();
948  }
949 
955  bool has_streaming_buffer() const {
956  return Storage().isMember("streamingBuffer");
957  }
958 
963  MutableStorage()->removeMember("streamingBuffer");
964  }
965 
966 
971  const Streamingbuffer get_streaming_buffer() const;
972 
983  Streamingbuffer mutable_streamingBuffer();
984 
990  bool has_table_reference() const {
991  return Storage().isMember("tableReference");
992  }
993 
998  MutableStorage()->removeMember("tableReference");
999  }
1000 
1001 
1006  const TableReference get_table_reference() const;
1007 
1016  TableReference mutable_tableReference();
1017 
1023  bool has_time_partitioning() const {
1024  return Storage().isMember("timePartitioning");
1025  }
1026 
1031  MutableStorage()->removeMember("timePartitioning");
1032  }
1033 
1034 
1039  const TimePartitioning get_time_partitioning() const;
1040 
1050  TimePartitioning mutable_timePartitioning();
1051 
1057  bool has_type() const {
1058  return Storage().isMember("type");
1059  }
1060 
1064  void clear_type() {
1065  MutableStorage()->removeMember("type");
1066  }
1067 
1068 
1072  const StringPiece get_type() const {
1073  const Json::Value& v = Storage("type");
1074  if (v == Json::Value::null) return StringPiece("");
1075  return StringPiece(v.asCString());
1076  }
1077 
1089  void set_type(const StringPiece& value) {
1090  *MutableStorage("type") = value.data();
1091  }
1092 
1098  bool has_view() const {
1099  return Storage().isMember("view");
1100  }
1101 
1105  void clear_view() {
1106  MutableStorage()->removeMember("view");
1107  }
1108 
1109 
1113  const ViewDefinition get_view() const;
1114 
1122  ViewDefinition mutable_view();
1123 
1124  private:
1125  void operator=(const Table&);
1126 }; // Table
1127 } // namespace google_bigquery_api
1128 #endif // GOOGLE_BIGQUERY_API_TABLE_H_
bool has_last_modified_time() const
Definition: table.h:519
void clear_external_data_configuration()
Definition: table.h:338
Definition: time_partitioning.h:51
Definition: materialized_view_definition.h:51
bool has_self_link() const
Definition: table.h:918
void set_last_modified_time(uint64 value)
Definition: table.h:547
Definition: view_definition.h:52
Definition: streamingbuffer.h:50
void set_num_long_term_bytes(int64 value)
Definition: table.h:727
void clear_labels()
Definition: table.h:484
Definition: encryption_configuration.h:50
int64 get_num_bytes() const
Definition: table.h:676
bool has_creation_time() const
Definition: table.h:139
void set_require_partition_filter(bool value)
Definition: table.h:877
void clear_range_partitioning()
Definition: table.h:821
void clear_num_rows()
Definition: table.h:783
void clear_materialized_view()
Definition: table.h:602
void clear_time_partitioning()
Definition: table.h:1030
bool has_etag() const
Definition: table.h:248
bool has_require_partition_filter() const
Definition: table.h:849
void set_creation_time(int64 value)
Definition: table.h:167
bool has_streaming_buffer() const
Definition: table.h:955
Definition: external_data_configuration.h:57
const StringPiece get_friendly_name() const
Definition: table.h:381
void clear_creation_time()
Definition: table.h:146
void clear_model()
Definition: table.h:635
void clear_num_long_term_bytes()
Definition: table.h:706
bool has_num_bytes() const
Definition: table.h:661
void clear_num_bytes()
Definition: table.h:668
Definition: table_schema.h:51
const StringPiece GetTypeName() const
Definition: table.h:96
Definition: aggregate_classification_metrics.cc:39
void clear_friendly_name()
Definition: table.h:373
bool has_id() const
Definition: table.h:403
int64 get_num_physical_bytes() const
Definition: table.h:752
Definition: clustering.h:50
bool get_require_partition_filter() const
Definition: table.h:864
void clear_streaming_buffer()
Definition: table.h:962
Definition: model_definition.h:52
void clear_schema()
Definition: table.h:894
void clear_type()
Definition: table.h:1064
Definition: table.h:63
Definition: range_partitioning.h:51
const StringPiece get_location() const
Definition: table.h:572
bool has_num_long_term_bytes() const
Definition: table.h:699
const StringPiece get_self_link() const
Definition: table.h:933
const StringPiece get_description() const
Definition: table.h:192
void set_self_link(const StringPiece &value)
Definition: table.h:946
void clear_etag()
Definition: table.h:255
void set_num_physical_bytes(int64 value)
Definition: table.h:766
bool has_friendly_name() const
Definition: table.h:366
client::JsonCppAssociativeArray< string > mutable_labels()
Definition: table.h:509
void clear_self_link()
Definition: table.h:925
void set_etag(const StringPiece &value)
Definition: table.h:279
Definition: aggregate_classification_metrics.h:37
void clear_kind()
Definition: table.h:447
bool has_num_rows() const
Definition: table.h:776
uint64 get_last_modified_time() const
Definition: table.h:534
void clear_expiration_time()
Definition: table.h:295
void set_num_bytes(int64 value)
Definition: table.h:689
bool has_kind() const
Definition: table.h:440
bool has_time_partitioning() const
Definition: table.h:1023
void clear_table_reference()
Definition: table.h:997
void clear_view()
Definition: table.h:1105
bool has_num_physical_bytes() const
Definition: table.h:737
Definition: table_reference.h:50
void set_kind(const StringPiece &value)
Definition: table.h:468
void clear_last_modified_time()
Definition: table.h:526
void clear_clustering()
Definition: table.h:112
void clear_num_physical_bytes()
Definition: table.h:744
bool has_model() const
Definition: table.h:628
void set_type(const StringPiece &value)
Definition: table.h:1089
int64 get_expiration_time() const
Definition: table.h:303
void set_friendly_name(const StringPiece &value)
Definition: table.h:394
bool has_description() const
Definition: table.h:177
bool has_location() const
Definition: table.h:557
const StringPiece get_id() const
Definition: table.h:418
bool has_table_reference() const
Definition: table.h:990
void clear_id()
Definition: table.h:410
bool has_range_partitioning() const
Definition: table.h:814
const StringPiece get_kind() const
Definition: table.h:455
void set_description(const StringPiece &value)
Definition: table.h:205
bool has_clustering() const
Definition: table.h:105
bool has_external_data_configuration() const
Definition: table.h:331
const StringPiece get_type() const
Definition: table.h:1072
uint64 get_num_rows() const
Definition: table.h:791
bool has_expiration_time() const
Definition: table.h:288
void set_id(const StringPiece &value)
Definition: table.h:431
void clear_description()
Definition: table.h:184
void clear_encryption_configuration()
Definition: table.h:222
void clear_require_partition_filter()
Definition: table.h:856
bool has_view() const
Definition: table.h:1098
int64 get_num_long_term_bytes() const
Definition: table.h:714
bool has_materialized_view() const
Definition: table.h:595
void set_num_rows(uint64 value)
Definition: table.h:804
bool has_encryption_configuration() const
Definition: table.h:215
bool has_labels() const
Definition: table.h:477
const StringPiece get_etag() const
Definition: table.h:263
bool has_type() const
Definition: table.h:1057
void clear_location()
Definition: table.h:564
void set_location(const StringPiece &value)
Definition: table.h:586
const client::JsonCppAssociativeArray< string > get_labels() const
Definition: table.h:492
void set_expiration_time(int64 value)
Definition: table.h:319
bool has_schema() const
Definition: table.h:887
int64 get_creation_time() const
Definition: table.h:154