bigquery  v2
table_list.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_LIST_H_
31 #define GOOGLE_BIGQUERY_API_TABLE_LIST_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/range_partitioning.h"
41 #include "google/bigquery_api/table_reference.h"
42 #include "google/bigquery_api/time_partitioning.h"
43 
44 namespace Json {
45 class Value;
46 } // namespace Json
47 
48 namespace google_bigquery_api {
49 using namespace googleapis;
50 
56 class TableList : public client::JsonCppData {
57  public:
63  class TableListTables : public client::JsonCppData {
64  public:
70  class TableListTablesView : public client::JsonCppData {
71  public:
77  static TableListTablesView* New();
78 
84  explicit TableListTablesView(const Json::Value& storage);
85 
91  explicit TableListTablesView(Json::Value* storage);
92 
96  virtual ~TableListTablesView();
97 
103  const StringPiece GetTypeName() const {
104  return StringPiece("google_bigquery_api::TableListTablesView");
105  }
106 
112  bool has_use_legacy_sql() const {
113  return Storage().isMember("useLegacySql");
114  }
115 
120  MutableStorage()->removeMember("useLegacySql");
121  }
122 
123 
127  bool get_use_legacy_sql() const {
128  const Json::Value& storage = Storage("useLegacySql");
129  return client::JsonValueToCppValueHelper<bool >(storage);
130  }
131 
140  void set_use_legacy_sql(bool value) {
141  client::SetJsonValueFromCppValueHelper<bool >(
142  value, MutableStorage("useLegacySql"));
143  }
144 
145  private:
146  void operator=(const TableListTablesView&);
147  }; // TableListTablesView
153  static TableListTables* New();
154 
160  explicit TableListTables(const Json::Value& storage);
161 
167  explicit TableListTables(Json::Value* storage);
168 
172  virtual ~TableListTables();
173 
179  const StringPiece GetTypeName() const {
180  return StringPiece("google_bigquery_api::TableListTables");
181  }
182 
188  bool has_clustering() const {
189  return Storage().isMember("clustering");
190  }
191 
196  MutableStorage()->removeMember("clustering");
197  }
198 
199 
203  const Clustering get_clustering() const;
204 
213  Clustering mutable_clustering();
214 
220  bool has_creation_time() const {
221  return Storage().isMember("creationTime");
222  }
223 
228  MutableStorage()->removeMember("creationTime");
229  }
230 
231 
235  int64 get_creation_time() const {
236  const Json::Value& storage = Storage("creationTime");
237  return client::JsonValueToCppValueHelper<int64 >(storage);
238  }
239 
247  void set_creation_time(int64 value) {
248  client::SetJsonValueFromCppValueHelper<int64 >(
249  value, MutableStorage("creationTime"));
250  }
251 
257  bool has_expiration_time() const {
258  return Storage().isMember("expirationTime");
259  }
260 
265  MutableStorage()->removeMember("expirationTime");
266  }
267 
268 
272  int64 get_expiration_time() const {
273  const Json::Value& storage = Storage("expirationTime");
274  return client::JsonValueToCppValueHelper<int64 >(storage);
275  }
276 
286  void set_expiration_time(int64 value) {
287  client::SetJsonValueFromCppValueHelper<int64 >(
288  value, MutableStorage("expirationTime"));
289  }
290 
296  bool has_friendly_name() const {
297  return Storage().isMember("friendlyName");
298  }
299 
304  MutableStorage()->removeMember("friendlyName");
305  }
306 
307 
311  const StringPiece get_friendly_name() const {
312  const Json::Value& v = Storage("friendlyName");
313  if (v == Json::Value::null) return StringPiece("");
314  return StringPiece(v.asCString());
315  }
316 
324  void set_friendly_name(const StringPiece& value) {
325  *MutableStorage("friendlyName") = value.data();
326  }
327 
333  bool has_id() const {
334  return Storage().isMember("id");
335  }
336 
340  void clear_id() {
341  MutableStorage()->removeMember("id");
342  }
343 
344 
348  const StringPiece get_id() const {
349  const Json::Value& v = Storage("id");
350  if (v == Json::Value::null) return StringPiece("");
351  return StringPiece(v.asCString());
352  }
353 
361  void set_id(const StringPiece& value) {
362  *MutableStorage("id") = value.data();
363  }
364 
370  bool has_kind() const {
371  return Storage().isMember("kind");
372  }
373 
377  void clear_kind() {
378  MutableStorage()->removeMember("kind");
379  }
380 
381 
385  const StringPiece get_kind() const {
386  const Json::Value& v = Storage("kind");
387  if (v == Json::Value::null) return StringPiece("");
388  return StringPiece(v.asCString());
389  }
390 
398  void set_kind(const StringPiece& value) {
399  *MutableStorage("kind") = value.data();
400  }
401 
407  bool has_labels() const {
408  return Storage().isMember("labels");
409  }
410 
414  void clear_labels() {
415  MutableStorage()->removeMember("labels");
416  }
417 
418 
422  const client::JsonCppAssociativeArray<string > get_labels() const {
423  const Json::Value& storage = Storage("labels");
424  return client::JsonValueToCppValueHelper<client::JsonCppAssociativeArray<string > >(storage);
425  }
426 
436  client::JsonCppAssociativeArray<string > mutable_labels() {
437  Json::Value* storage = MutableStorage("labels");
438  return client::JsonValueToMutableCppValueHelper<client::JsonCppAssociativeArray<string > >(storage);
439  }
440 
446  bool has_range_partitioning() const {
447  return Storage().isMember("rangePartitioning");
448  }
449 
454  MutableStorage()->removeMember("rangePartitioning");
455  }
456 
457 
462  const RangePartitioning get_range_partitioning() const;
463 
472  RangePartitioning mutable_rangePartitioning();
473 
479  bool has_table_reference() const {
480  return Storage().isMember("tableReference");
481  }
482 
487  MutableStorage()->removeMember("tableReference");
488  }
489 
490 
495  const TableReference get_table_reference() const;
496 
505  TableReference mutable_tableReference();
506 
512  bool has_time_partitioning() const {
513  return Storage().isMember("timePartitioning");
514  }
515 
520  MutableStorage()->removeMember("timePartitioning");
521  }
522 
523 
528  const TimePartitioning get_time_partitioning() const;
529 
538  TimePartitioning mutable_timePartitioning();
539 
545  bool has_type() const {
546  return Storage().isMember("type");
547  }
548 
552  void clear_type() {
553  MutableStorage()->removeMember("type");
554  }
555 
556 
560  const StringPiece get_type() const {
561  const Json::Value& v = Storage("type");
562  if (v == Json::Value::null) return StringPiece("");
563  return StringPiece(v.asCString());
564  }
565 
573  void set_type(const StringPiece& value) {
574  *MutableStorage("type") = value.data();
575  }
576 
582  bool has_view() const {
583  return Storage().isMember("view");
584  }
585 
589  void clear_view() {
590  MutableStorage()->removeMember("view");
591  }
592 
593 
598  const Json::Value& storage = Storage("view");
599  return client::JsonValueToCppValueHelper<TableListTablesView >(storage);
600  }
601 
610  Json::Value* storage = MutableStorage("view");
611  return client::JsonValueToMutableCppValueHelper<TableListTablesView >(storage);
612  }
613 
614  private:
615  void operator=(const TableListTables&);
616  }; // TableListTables
622  static TableList* New();
623 
629  explicit TableList(const Json::Value& storage);
630 
636  explicit TableList(Json::Value* storage);
637 
641  virtual ~TableList();
642 
648  const StringPiece GetTypeName() const {
649  return StringPiece("google_bigquery_api::TableList");
650  }
651 
657  bool has_etag() const {
658  return Storage().isMember("etag");
659  }
660 
664  void clear_etag() {
665  MutableStorage()->removeMember("etag");
666  }
667 
668 
672  const StringPiece get_etag() const {
673  const Json::Value& v = Storage("etag");
674  if (v == Json::Value::null) return StringPiece("");
675  return StringPiece(v.asCString());
676  }
677 
685  void set_etag(const StringPiece& value) {
686  *MutableStorage("etag") = value.data();
687  }
688 
694  bool has_kind() const {
695  return Storage().isMember("kind");
696  }
697 
701  void clear_kind() {
702  MutableStorage()->removeMember("kind");
703  }
704 
705 
709  const StringPiece get_kind() const {
710  const Json::Value& v = Storage("kind");
711  if (v == Json::Value::null) return StringPiece("");
712  return StringPiece(v.asCString());
713  }
714 
722  void set_kind(const StringPiece& value) {
723  *MutableStorage("kind") = value.data();
724  }
725 
731  bool has_next_page_token() const {
732  return Storage().isMember("nextPageToken");
733  }
734 
739  MutableStorage()->removeMember("nextPageToken");
740  }
741 
742 
746  const StringPiece get_next_page_token() const {
747  const Json::Value& v = Storage("nextPageToken");
748  if (v == Json::Value::null) return StringPiece("");
749  return StringPiece(v.asCString());
750  }
751 
759  void set_next_page_token(const StringPiece& value) {
760  *MutableStorage("nextPageToken") = value.data();
761  }
762 
768  bool has_tables() const {
769  return Storage().isMember("tables");
770  }
771 
775  void clear_tables() {
776  MutableStorage()->removeMember("tables");
777  }
778 
779 
783  const client::JsonCppArray<TableListTables > get_tables() const {
784  const Json::Value& storage = Storage("tables");
785  return client::JsonValueToCppValueHelper<client::JsonCppArray<TableListTables > >(storage);
786  }
787 
795  client::JsonCppArray<TableListTables > mutable_tables() {
796  Json::Value* storage = MutableStorage("tables");
797  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<TableListTables > >(storage);
798  }
799 
805  bool has_total_items() const {
806  return Storage().isMember("totalItems");
807  }
808 
813  MutableStorage()->removeMember("totalItems");
814  }
815 
816 
820  int32 get_total_items() const {
821  const Json::Value& storage = Storage("totalItems");
822  return client::JsonValueToCppValueHelper<int32 >(storage);
823  }
824 
832  void set_total_items(int32 value) {
833  client::SetJsonValueFromCppValueHelper<int32 >(
834  value, MutableStorage("totalItems"));
835  }
836 
837  private:
838  void operator=(const TableList&);
839 }; // TableList
840 } // namespace google_bigquery_api
841 #endif // GOOGLE_BIGQUERY_API_TABLE_LIST_H_
void set_use_legacy_sql(bool value)
Definition: table_list.h:140
void clear_clustering()
Definition: table_list.h:195
bool has_kind() const
Definition: table_list.h:370
Definition: time_partitioning.h:51
const client::JsonCppArray< TableListTables > get_tables() const
Definition: table_list.h:783
void clear_id()
Definition: table_list.h:340
const StringPiece GetTypeName() const
Definition: table_list.h:179
void set_etag(const StringPiece &value)
Definition: table_list.h:685
bool has_total_items() const
Definition: table_list.h:805
bool has_clustering() const
Definition: table_list.h:188
bool has_use_legacy_sql() const
Definition: table_list.h:112
void set_kind(const StringPiece &value)
Definition: table_list.h:398
client::JsonCppArray< TableListTables > mutable_tables()
Definition: table_list.h:795
client::JsonCppAssociativeArray< string > mutable_labels()
Definition: table_list.h:436
bool has_time_partitioning() const
Definition: table_list.h:512
bool has_table_reference() const
Definition: table_list.h:479
void set_friendly_name(const StringPiece &value)
Definition: table_list.h:324
bool has_kind() const
Definition: table_list.h:694
void clear_time_partitioning()
Definition: table_list.h:519
const StringPiece GetTypeName() const
Definition: table_list.h:648
void clear_friendly_name()
Definition: table_list.h:303
Definition: aggregate_classification_metrics.cc:39
void clear_table_reference()
Definition: table_list.h:486
void set_kind(const StringPiece &value)
Definition: table_list.h:722
void set_type(const StringPiece &value)
Definition: table_list.h:573
const StringPiece get_type() const
Definition: table_list.h:560
Definition: clustering.h:50
const StringPiece get_kind() const
Definition: table_list.h:385
void clear_expiration_time()
Definition: table_list.h:264
bool has_view() const
Definition: table_list.h:582
void clear_etag()
Definition: table_list.h:664
Definition: table_list.h:56
bool has_friendly_name() const
Definition: table_list.h:296
Definition: range_partitioning.h:51
void clear_tables()
Definition: table_list.h:775
bool get_use_legacy_sql() const
Definition: table_list.h:127
bool has_etag() const
Definition: table_list.h:657
void clear_type()
Definition: table_list.h:552
int32 get_total_items() const
Definition: table_list.h:820
const TableListTablesView get_view() const
Definition: table_list.h:597
void clear_creation_time()
Definition: table_list.h:227
Definition: aggregate_classification_metrics.h:37
bool has_next_page_token() const
Definition: table_list.h:731
const StringPiece get_friendly_name() const
Definition: table_list.h:311
void set_total_items(int32 value)
Definition: table_list.h:832
bool has_range_partitioning() const
Definition: table_list.h:446
void clear_next_page_token()
Definition: table_list.h:738
Definition: table_reference.h:50
const StringPiece get_id() const
Definition: table_list.h:348
const StringPiece get_kind() const
Definition: table_list.h:709
bool has_creation_time() const
Definition: table_list.h:220
void clear_view()
Definition: table_list.h:589
int64 get_creation_time() const
Definition: table_list.h:235
bool has_id() const
Definition: table_list.h:333
void set_next_page_token(const StringPiece &value)
Definition: table_list.h:759
const StringPiece GetTypeName() const
Definition: table_list.h:103
const StringPiece get_next_page_token() const
Definition: table_list.h:746
bool has_tables() const
Definition: table_list.h:768
void clear_kind()
Definition: table_list.h:701
bool has_labels() const
Definition: table_list.h:407
bool has_type() const
Definition: table_list.h:545
void clear_labels()
Definition: table_list.h:414
void clear_kind()
Definition: table_list.h:377
void set_expiration_time(int64 value)
Definition: table_list.h:286
const client::JsonCppAssociativeArray< string > get_labels() const
Definition: table_list.h:422
bool has_expiration_time() const
Definition: table_list.h:257
const StringPiece get_etag() const
Definition: table_list.h:672
void set_creation_time(int64 value)
Definition: table_list.h:247
void clear_range_partitioning()
Definition: table_list.h:453
TableListTablesView mutable_view()
Definition: table_list.h:609
void clear_total_items()
Definition: table_list.h:812
void set_id(const StringPiece &value)
Definition: table_list.h:361
int64 get_expiration_time() const
Definition: table_list.h:272