bigquery  v2
dataset.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_DATASET_H_
31 #define GOOGLE_BIGQUERY_API_DATASET_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/dataset_reference.h"
40 #include "google/bigquery_api/encryption_configuration.h"
41 #include "google/bigquery_api/table_reference.h"
42 
43 namespace Json {
44 class Value;
45 } // namespace Json
46 
47 namespace google_bigquery_api {
48 using namespace googleapis;
49 
55 class Dataset : public client::JsonCppData {
56  public:
62  class DatasetAccess : public client::JsonCppData {
63  public:
69  static DatasetAccess* New();
70 
76  explicit DatasetAccess(const Json::Value& storage);
77 
83  explicit DatasetAccess(Json::Value* storage);
84 
88  virtual ~DatasetAccess();
89 
95  const StringPiece GetTypeName() const {
96  return StringPiece("google_bigquery_api::DatasetAccess");
97  }
98 
104  bool has_domain() const {
105  return Storage().isMember("domain");
106  }
107 
111  void clear_domain() {
112  MutableStorage()->removeMember("domain");
113  }
114 
115 
119  const StringPiece get_domain() const {
120  const Json::Value& v = Storage("domain");
121  if (v == Json::Value::null) return StringPiece("");
122  return StringPiece(v.asCString());
123  }
124 
134  void set_domain(const StringPiece& value) {
135  *MutableStorage("domain") = value.data();
136  }
137 
143  bool has_group_by_email() const {
144  return Storage().isMember("groupByEmail");
145  }
146 
151  MutableStorage()->removeMember("groupByEmail");
152  }
153 
154 
158  const StringPiece get_group_by_email() const {
159  const Json::Value& v = Storage("groupByEmail");
160  if (v == Json::Value::null) return StringPiece("");
161  return StringPiece(v.asCString());
162  }
163 
172  void set_group_by_email(const StringPiece& value) {
173  *MutableStorage("groupByEmail") = value.data();
174  }
175 
181  bool has_iam_member() const {
182  return Storage().isMember("iamMember");
183  }
184 
189  MutableStorage()->removeMember("iamMember");
190  }
191 
192 
196  const StringPiece get_iam_member() const {
197  const Json::Value& v = Storage("iamMember");
198  if (v == Json::Value::null) return StringPiece("");
199  return StringPiece(v.asCString());
200  }
201 
210  void set_iam_member(const StringPiece& value) {
211  *MutableStorage("iamMember") = value.data();
212  }
213 
219  bool has_role() const {
220  return Storage().isMember("role");
221  }
222 
226  void clear_role() {
227  MutableStorage()->removeMember("role");
228  }
229 
230 
234  const StringPiece get_role() const {
235  const Json::Value& v = Storage("role");
236  if (v == Json::Value::null) return StringPiece("");
237  return StringPiece(v.asCString());
238  }
239 
253  void set_role(const StringPiece& value) {
254  *MutableStorage("role") = value.data();
255  }
256 
262  bool has_special_group() const {
263  return Storage().isMember("specialGroup");
264  }
265 
270  MutableStorage()->removeMember("specialGroup");
271  }
272 
273 
277  const StringPiece get_special_group() const {
278  const Json::Value& v = Storage("specialGroup");
279  if (v == Json::Value::null) return StringPiece("");
280  return StringPiece(v.asCString());
281  }
282 
294  void set_special_group(const StringPiece& value) {
295  *MutableStorage("specialGroup") = value.data();
296  }
297 
303  bool has_user_by_email() const {
304  return Storage().isMember("userByEmail");
305  }
306 
311  MutableStorage()->removeMember("userByEmail");
312  }
313 
314 
318  const StringPiece get_user_by_email() const {
319  const Json::Value& v = Storage("userByEmail");
320  if (v == Json::Value::null) return StringPiece("");
321  return StringPiece(v.asCString());
322  }
323 
333  void set_user_by_email(const StringPiece& value) {
334  *MutableStorage("userByEmail") = value.data();
335  }
336 
342  bool has_view() const {
343  return Storage().isMember("view");
344  }
345 
349  void clear_view() {
350  MutableStorage()->removeMember("view");
351  }
352 
353 
357  const TableReference get_view() const;
358 
370  TableReference mutable_view();
371 
372  private:
373  void operator=(const DatasetAccess&);
374  }; // DatasetAccess
380  static Dataset* New();
381 
387  explicit Dataset(const Json::Value& storage);
388 
394  explicit Dataset(Json::Value* storage);
395 
399  virtual ~Dataset();
400 
406  const StringPiece GetTypeName() const {
407  return StringPiece("google_bigquery_api::Dataset");
408  }
409 
415  bool has_access() const {
416  return Storage().isMember("access");
417  }
418 
422  void clear_access() {
423  MutableStorage()->removeMember("access");
424  }
425 
426 
430  const client::JsonCppArray<DatasetAccess > get_access() const {
431  const Json::Value& storage = Storage("access");
432  return client::JsonValueToCppValueHelper<client::JsonCppArray<DatasetAccess > >(storage);
433  }
434 
449  client::JsonCppArray<DatasetAccess > mutable_access() {
450  Json::Value* storage = MutableStorage("access");
451  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<DatasetAccess > >(storage);
452  }
453 
459  bool has_creation_time() const {
460  return Storage().isMember("creationTime");
461  }
462 
467  MutableStorage()->removeMember("creationTime");
468  }
469 
470 
474  int64 get_creation_time() const {
475  const Json::Value& storage = Storage("creationTime");
476  return client::JsonValueToCppValueHelper<int64 >(storage);
477  }
478 
487  void set_creation_time(int64 value) {
488  client::SetJsonValueFromCppValueHelper<int64 >(
489  value, MutableStorage("creationTime"));
490  }
491 
497  bool has_dataset_reference() const {
498  return Storage().isMember("datasetReference");
499  }
500 
505  MutableStorage()->removeMember("datasetReference");
506  }
507 
508 
513  const DatasetReference get_dataset_reference() const;
514 
523  DatasetReference mutable_datasetReference();
524 
533  return Storage().isMember("defaultEncryptionConfiguration");
534  }
535 
540  MutableStorage()->removeMember("defaultEncryptionConfiguration");
541  }
542 
543 
548  const EncryptionConfiguration get_default_encryption_configuration() const;
549 
555  EncryptionConfiguration mutable_defaultEncryptionConfiguration();
556 
565  return Storage().isMember("defaultPartitionExpirationMs");
566  }
567 
572  MutableStorage()->removeMember("defaultPartitionExpirationMs");
573  }
574 
575 
580  const Json::Value& storage = Storage("defaultPartitionExpirationMs");
581  return client::JsonValueToCppValueHelper<int64 >(storage);
582  }
583 
603  client::SetJsonValueFromCppValueHelper<int64 >(
604  value, MutableStorage("defaultPartitionExpirationMs"));
605  }
606 
614  return Storage().isMember("defaultTableExpirationMs");
615  }
616 
621  MutableStorage()->removeMember("defaultTableExpirationMs");
622  }
623 
624 
629  const Json::Value& storage = Storage("defaultTableExpirationMs");
630  return client::JsonValueToCppValueHelper<int64 >(storage);
631  }
632 
650  client::SetJsonValueFromCppValueHelper<int64 >(
651  value, MutableStorage("defaultTableExpirationMs"));
652  }
653 
659  bool has_description() const {
660  return Storage().isMember("description");
661  }
662 
667  MutableStorage()->removeMember("description");
668  }
669 
670 
674  const StringPiece get_description() const {
675  const Json::Value& v = Storage("description");
676  if (v == Json::Value::null) return StringPiece("");
677  return StringPiece(v.asCString());
678  }
679 
687  void set_description(const StringPiece& value) {
688  *MutableStorage("description") = value.data();
689  }
690 
696  bool has_etag() const {
697  return Storage().isMember("etag");
698  }
699 
703  void clear_etag() {
704  MutableStorage()->removeMember("etag");
705  }
706 
707 
711  const StringPiece get_etag() const {
712  const Json::Value& v = Storage("etag");
713  if (v == Json::Value::null) return StringPiece("");
714  return StringPiece(v.asCString());
715  }
716 
724  void set_etag(const StringPiece& value) {
725  *MutableStorage("etag") = value.data();
726  }
727 
733  bool has_friendly_name() const {
734  return Storage().isMember("friendlyName");
735  }
736 
741  MutableStorage()->removeMember("friendlyName");
742  }
743 
744 
748  const StringPiece get_friendly_name() const {
749  const Json::Value& v = Storage("friendlyName");
750  if (v == Json::Value::null) return StringPiece("");
751  return StringPiece(v.asCString());
752  }
753 
761  void set_friendly_name(const StringPiece& value) {
762  *MutableStorage("friendlyName") = value.data();
763  }
764 
770  bool has_id() const {
771  return Storage().isMember("id");
772  }
773 
777  void clear_id() {
778  MutableStorage()->removeMember("id");
779  }
780 
781 
785  const StringPiece get_id() const {
786  const Json::Value& v = Storage("id");
787  if (v == Json::Value::null) return StringPiece("");
788  return StringPiece(v.asCString());
789  }
790 
801  void set_id(const StringPiece& value) {
802  *MutableStorage("id") = value.data();
803  }
804 
810  bool has_kind() const {
811  return Storage().isMember("kind");
812  }
813 
817  void clear_kind() {
818  MutableStorage()->removeMember("kind");
819  }
820 
821 
825  const StringPiece get_kind() const {
826  const Json::Value& v = Storage("kind");
827  if (v == Json::Value::null) return StringPiece("");
828  return StringPiece(v.asCString());
829  }
830 
838  void set_kind(const StringPiece& value) {
839  *MutableStorage("kind") = value.data();
840  }
841 
847  bool has_labels() const {
848  return Storage().isMember("labels");
849  }
850 
854  void clear_labels() {
855  MutableStorage()->removeMember("labels");
856  }
857 
858 
862  const client::JsonCppAssociativeArray<string > get_labels() const {
863  const Json::Value& storage = Storage("labels");
864  return client::JsonValueToCppValueHelper<client::JsonCppAssociativeArray<string > >(storage);
865  }
866 
876  client::JsonCppAssociativeArray<string > mutable_labels() {
877  Json::Value* storage = MutableStorage("labels");
878  return client::JsonValueToMutableCppValueHelper<client::JsonCppAssociativeArray<string > >(storage);
879  }
880 
886  bool has_last_modified_time() const {
887  return Storage().isMember("lastModifiedTime");
888  }
889 
894  MutableStorage()->removeMember("lastModifiedTime");
895  }
896 
897 
901  int64 get_last_modified_time() const {
902  const Json::Value& storage = Storage("lastModifiedTime");
903  return client::JsonValueToCppValueHelper<int64 >(storage);
904  }
905 
914  void set_last_modified_time(int64 value) {
915  client::SetJsonValueFromCppValueHelper<int64 >(
916  value, MutableStorage("lastModifiedTime"));
917  }
918 
924  bool has_location() const {
925  return Storage().isMember("location");
926  }
927 
931  void clear_location() {
932  MutableStorage()->removeMember("location");
933  }
934 
935 
939  const StringPiece get_location() const {
940  const Json::Value& v = Storage("location");
941  if (v == Json::Value::null) return StringPiece("");
942  return StringPiece(v.asCString());
943  }
944 
953  void set_location(const StringPiece& value) {
954  *MutableStorage("location") = value.data();
955  }
956 
962  bool has_self_link() const {
963  return Storage().isMember("selfLink");
964  }
965 
970  MutableStorage()->removeMember("selfLink");
971  }
972 
973 
977  const StringPiece get_self_link() const {
978  const Json::Value& v = Storage("selfLink");
979  if (v == Json::Value::null) return StringPiece("");
980  return StringPiece(v.asCString());
981  }
982 
991  void set_self_link(const StringPiece& value) {
992  *MutableStorage("selfLink") = value.data();
993  }
994 
995  private:
996  void operator=(const Dataset&);
997 }; // Dataset
998 } // namespace google_bigquery_api
999 #endif // GOOGLE_BIGQUERY_API_DATASET_H_
bool has_id() const
Definition: dataset.h:770
int64 get_last_modified_time() const
Definition: dataset.h:901
void set_group_by_email(const StringPiece &value)
Definition: dataset.h:172
const StringPiece get_special_group() const
Definition: dataset.h:277
void clear_role()
Definition: dataset.h:226
void set_creation_time(int64 value)
Definition: dataset.h:487
void clear_description()
Definition: dataset.h:666
Definition: encryption_configuration.h:50
bool has_default_table_expiration_ms() const
Definition: dataset.h:613
bool has_default_partition_expiration_ms() const
Definition: dataset.h:564
bool has_location() const
Definition: dataset.h:924
void set_kind(const StringPiece &value)
Definition: dataset.h:838
const StringPiece get_user_by_email() const
Definition: dataset.h:318
const StringPiece get_id() const
Definition: dataset.h:785
bool has_etag() const
Definition: dataset.h:696
Definition: dataset_reference.h:50
bool has_labels() const
Definition: dataset.h:847
void clear_location()
Definition: dataset.h:931
void clear_self_link()
Definition: dataset.h:969
void clear_domain()
Definition: dataset.h:111
void clear_kind()
Definition: dataset.h:817
void clear_special_group()
Definition: dataset.h:269
const StringPiece get_domain() const
Definition: dataset.h:119
void set_etag(const StringPiece &value)
Definition: dataset.h:724
bool has_last_modified_time() const
Definition: dataset.h:886
void set_iam_member(const StringPiece &value)
Definition: dataset.h:210
const StringPiece get_group_by_email() const
Definition: dataset.h:158
bool has_role() const
Definition: dataset.h:219
void clear_creation_time()
Definition: dataset.h:466
Definition: aggregate_classification_metrics.cc:39
void clear_etag()
Definition: dataset.h:703
void clear_default_partition_expiration_ms()
Definition: dataset.h:571
void clear_view()
Definition: dataset.h:349
bool has_domain() const
Definition: dataset.h:104
void clear_id()
Definition: dataset.h:777
const StringPiece get_iam_member() const
Definition: dataset.h:196
const StringPiece get_friendly_name() const
Definition: dataset.h:748
void set_id(const StringPiece &value)
Definition: dataset.h:801
void set_last_modified_time(int64 value)
Definition: dataset.h:914
const StringPiece get_self_link() const
Definition: dataset.h:977
void set_role(const StringPiece &value)
Definition: dataset.h:253
bool has_group_by_email() const
Definition: dataset.h:143
bool has_friendly_name() const
Definition: dataset.h:733
bool has_dataset_reference() const
Definition: dataset.h:497
bool has_iam_member() const
Definition: dataset.h:181
void clear_access()
Definition: dataset.h:422
bool has_access() const
Definition: dataset.h:415
void clear_group_by_email()
Definition: dataset.h:150
bool has_view() const
Definition: dataset.h:342
bool has_user_by_email() const
Definition: dataset.h:303
void clear_default_encryption_configuration()
Definition: dataset.h:539
void set_default_table_expiration_ms(int64 value)
Definition: dataset.h:649
Definition: aggregate_classification_metrics.h:37
void set_special_group(const StringPiece &value)
Definition: dataset.h:294
const StringPiece get_role() const
Definition: dataset.h:234
const StringPiece get_kind() const
Definition: dataset.h:825
const StringPiece GetTypeName() const
Definition: dataset.h:95
bool has_self_link() const
Definition: dataset.h:962
bool has_default_encryption_configuration() const
Definition: dataset.h:532
Definition: dataset.h:55
void set_description(const StringPiece &value)
Definition: dataset.h:687
void clear_user_by_email()
Definition: dataset.h:310
Definition: table_reference.h:50
void set_friendly_name(const StringPiece &value)
Definition: dataset.h:761
bool has_kind() const
Definition: dataset.h:810
void clear_default_table_expiration_ms()
Definition: dataset.h:620
client::JsonCppArray< DatasetAccess > mutable_access()
Definition: dataset.h:449
const StringPiece get_description() const
Definition: dataset.h:674
bool has_creation_time() const
Definition: dataset.h:459
void set_user_by_email(const StringPiece &value)
Definition: dataset.h:333
int64 get_default_partition_expiration_ms() const
Definition: dataset.h:579
client::JsonCppAssociativeArray< string > mutable_labels()
Definition: dataset.h:876
const StringPiece get_location() const
Definition: dataset.h:939
void set_self_link(const StringPiece &value)
Definition: dataset.h:991
const client::JsonCppArray< DatasetAccess > get_access() const
Definition: dataset.h:430
const StringPiece get_etag() const
Definition: dataset.h:711
void clear_last_modified_time()
Definition: dataset.h:893
int64 get_creation_time() const
Definition: dataset.h:474
void set_default_partition_expiration_ms(int64 value)
Definition: dataset.h:602
void clear_friendly_name()
Definition: dataset.h:740
void clear_dataset_reference()
Definition: dataset.h:504
void set_domain(const StringPiece &value)
Definition: dataset.h:134
void clear_iam_member()
Definition: dataset.h:188
void set_location(const StringPiece &value)
Definition: dataset.h:953
void clear_labels()
Definition: dataset.h:854
const client::JsonCppAssociativeArray< string > get_labels() const
Definition: dataset.h:862
bool has_special_group() const
Definition: dataset.h:262
const StringPiece GetTypeName() const
Definition: dataset.h:406
bool has_description() const
Definition: dataset.h:659
int64 get_default_table_expiration_ms() const
Definition: dataset.h:628