drive  v2
app.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-19, 05:24: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 // Drive API (drive/v2)
24 // Generated from:
25 // Version: v2
26 // Revision: 393
27 // Generated by:
28 // Tool: google-apis-code-generator 1.5.1
29 // C++: 0.1.4
30 #ifndef GOOGLE_DRIVE_API_APP_H_
31 #define GOOGLE_DRIVE_API_APP_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 namespace Json {
40 class Value;
41 } // namespace Json
42 
43 namespace google_drive_api {
44 using namespace googleapis;
45 
53 class App : public client::JsonCppData {
54  public:
60  class AppIcons : public client::JsonCppData {
61  public:
67  static AppIcons* New();
68 
74  explicit AppIcons(const Json::Value& storage);
75 
81  explicit AppIcons(Json::Value* storage);
82 
86  virtual ~AppIcons();
87 
93  const StringPiece GetTypeName() const {
94  return StringPiece("google_drive_api::AppIcons");
95  }
96 
102  bool has_category() const {
103  return Storage().isMember("category");
104  }
105 
109  void clear_category() {
110  MutableStorage()->removeMember("category");
111  }
112 
113 
117  const StringPiece get_category() const {
118  const Json::Value& v = Storage("category");
119  if (v == Json::Value::null) return StringPiece("");
120  return StringPiece(v.asCString());
121  }
122 
139  void set_category(const StringPiece& value) {
140  *MutableStorage("category") = value.data();
141  }
142 
148  bool has_icon_url() const {
149  return Storage().isMember("iconUrl");
150  }
151 
155  void clear_icon_url() {
156  MutableStorage()->removeMember("iconUrl");
157  }
158 
159 
163  const StringPiece get_icon_url() const {
164  const Json::Value& v = Storage("iconUrl");
165  if (v == Json::Value::null) return StringPiece("");
166  return StringPiece(v.asCString());
167  }
168 
176  void set_icon_url(const StringPiece& value) {
177  *MutableStorage("iconUrl") = value.data();
178  }
179 
185  bool has_size() const {
186  return Storage().isMember("size");
187  }
188 
192  void clear_size() {
193  MutableStorage()->removeMember("size");
194  }
195 
196 
200  int32 get_size() const {
201  const Json::Value& storage = Storage("size");
202  return client::JsonValueToCppValueHelper<int32 >(storage);
203  }
204 
212  void set_size(int32 value) {
213  client::SetJsonValueFromCppValueHelper<int32 >(
214  value, MutableStorage("size"));
215  }
216 
217  private:
218  void operator=(const AppIcons&);
219  }; // AppIcons
225  static App* New();
226 
232  explicit App(const Json::Value& storage);
233 
239  explicit App(Json::Value* storage);
240 
244  virtual ~App();
245 
251  const StringPiece GetTypeName() const {
252  return StringPiece("google_drive_api::App");
253  }
254 
260  bool has_authorized() const {
261  return Storage().isMember("authorized");
262  }
263 
268  MutableStorage()->removeMember("authorized");
269  }
270 
271 
275  bool get_authorized() const {
276  const Json::Value& storage = Storage("authorized");
277  return client::JsonValueToCppValueHelper<bool >(storage);
278  }
279 
287  void set_authorized(bool value) {
288  client::SetJsonValueFromCppValueHelper<bool >(
289  value, MutableStorage("authorized"));
290  }
291 
299  return Storage().isMember("createInFolderTemplate");
300  }
301 
306  MutableStorage()->removeMember("createInFolderTemplate");
307  }
308 
309 
313  const StringPiece get_create_in_folder_template() const {
314  const Json::Value& v = Storage("createInFolderTemplate");
315  if (v == Json::Value::null) return StringPiece("");
316  return StringPiece(v.asCString());
317  }
318 
328  void set_create_in_folder_template(const StringPiece& value) {
329  *MutableStorage("createInFolderTemplate") = value.data();
330  }
331 
337  bool has_create_url() const {
338  return Storage().isMember("createUrl");
339  }
340 
345  MutableStorage()->removeMember("createUrl");
346  }
347 
348 
352  const StringPiece get_create_url() const {
353  const Json::Value& v = Storage("createUrl");
354  if (v == Json::Value::null) return StringPiece("");
355  return StringPiece(v.asCString());
356  }
357 
365  void set_create_url(const StringPiece& value) {
366  *MutableStorage("createUrl") = value.data();
367  }
368 
375  return Storage().isMember("hasDriveWideScope");
376  }
377 
382  MutableStorage()->removeMember("hasDriveWideScope");
383  }
384 
385 
390  const Json::Value& storage = Storage("hasDriveWideScope");
391  return client::JsonValueToCppValueHelper<bool >(storage);
392  }
393 
402  void set_has_drive_wide_scope(bool value) {
403  client::SetJsonValueFromCppValueHelper<bool >(
404  value, MutableStorage("hasDriveWideScope"));
405  }
406 
412  bool has_icons() const {
413  return Storage().isMember("icons");
414  }
415 
419  void clear_icons() {
420  MutableStorage()->removeMember("icons");
421  }
422 
423 
427  const client::JsonCppArray<AppIcons > get_icons() const {
428  const Json::Value& storage = Storage("icons");
429  return client::JsonValueToCppValueHelper<client::JsonCppArray<AppIcons > >(storage);
430  }
431 
439  client::JsonCppArray<AppIcons > mutable_icons() {
440  Json::Value* storage = MutableStorage("icons");
441  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<AppIcons > >(storage);
442  }
443 
449  bool has_id() const {
450  return Storage().isMember("id");
451  }
452 
456  void clear_id() {
457  MutableStorage()->removeMember("id");
458  }
459 
460 
464  const StringPiece get_id() const {
465  const Json::Value& v = Storage("id");
466  if (v == Json::Value::null) return StringPiece("");
467  return StringPiece(v.asCString());
468  }
469 
477  void set_id(const StringPiece& value) {
478  *MutableStorage("id") = value.data();
479  }
480 
486  bool has_installed() const {
487  return Storage().isMember("installed");
488  }
489 
494  MutableStorage()->removeMember("installed");
495  }
496 
497 
501  bool get_installed() const {
502  const Json::Value& storage = Storage("installed");
503  return client::JsonValueToCppValueHelper<bool >(storage);
504  }
505 
513  void set_installed(bool value) {
514  client::SetJsonValueFromCppValueHelper<bool >(
515  value, MutableStorage("installed"));
516  }
517 
523  bool has_kind() const {
524  return Storage().isMember("kind");
525  }
526 
530  void clear_kind() {
531  MutableStorage()->removeMember("kind");
532  }
533 
534 
538  const StringPiece get_kind() const {
539  const Json::Value& v = Storage("kind");
540  if (v == Json::Value::null) return StringPiece("");
541  return StringPiece(v.asCString());
542  }
543 
551  void set_kind(const StringPiece& value) {
552  *MutableStorage("kind") = value.data();
553  }
554 
560  bool has_long_description() const {
561  return Storage().isMember("longDescription");
562  }
563 
568  MutableStorage()->removeMember("longDescription");
569  }
570 
571 
575  const StringPiece get_long_description() const {
576  const Json::Value& v = Storage("longDescription");
577  if (v == Json::Value::null) return StringPiece("");
578  return StringPiece(v.asCString());
579  }
580 
588  void set_long_description(const StringPiece& value) {
589  *MutableStorage("longDescription") = value.data();
590  }
591 
597  bool has_name() const {
598  return Storage().isMember("name");
599  }
600 
604  void clear_name() {
605  MutableStorage()->removeMember("name");
606  }
607 
608 
612  const StringPiece get_name() const {
613  const Json::Value& v = Storage("name");
614  if (v == Json::Value::null) return StringPiece("");
615  return StringPiece(v.asCString());
616  }
617 
625  void set_name(const StringPiece& value) {
626  *MutableStorage("name") = value.data();
627  }
628 
634  bool has_object_type() const {
635  return Storage().isMember("objectType");
636  }
637 
642  MutableStorage()->removeMember("objectType");
643  }
644 
645 
649  const StringPiece get_object_type() const {
650  const Json::Value& v = Storage("objectType");
651  if (v == Json::Value::null) return StringPiece("");
652  return StringPiece(v.asCString());
653  }
654 
663  void set_object_type(const StringPiece& value) {
664  *MutableStorage("objectType") = value.data();
665  }
666 
672  bool has_open_url_template() const {
673  return Storage().isMember("openUrlTemplate");
674  }
675 
680  MutableStorage()->removeMember("openUrlTemplate");
681  }
682 
683 
687  const StringPiece get_open_url_template() const {
688  const Json::Value& v = Storage("openUrlTemplate");
689  if (v == Json::Value::null) return StringPiece("");
690  return StringPiece(v.asCString());
691  }
692 
702  void set_open_url_template(const StringPiece& value) {
703  *MutableStorage("openUrlTemplate") = value.data();
704  }
705 
712  return Storage().isMember("primaryFileExtensions");
713  }
714 
719  MutableStorage()->removeMember("primaryFileExtensions");
720  }
721 
722 
727  const client::JsonCppArray<string > get_primary_file_extensions() const {
728  const Json::Value& storage = Storage("primaryFileExtensions");
729  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
730  }
731 
740  client::JsonCppArray<string > mutable_primaryFileExtensions() {
741  Json::Value* storage = MutableStorage("primaryFileExtensions");
742  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
743  }
744 
750  bool has_primary_mime_types() const {
751  return Storage().isMember("primaryMimeTypes");
752  }
753 
758  MutableStorage()->removeMember("primaryMimeTypes");
759  }
760 
761 
766  const client::JsonCppArray<string > get_primary_mime_types() const {
767  const Json::Value& storage = Storage("primaryMimeTypes");
768  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
769  }
770 
779  client::JsonCppArray<string > mutable_primaryMimeTypes() {
780  Json::Value* storage = MutableStorage("primaryMimeTypes");
781  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
782  }
783 
789  bool has_product_id() const {
790  return Storage().isMember("productId");
791  }
792 
797  MutableStorage()->removeMember("productId");
798  }
799 
800 
804  const StringPiece get_product_id() const {
805  const Json::Value& v = Storage("productId");
806  if (v == Json::Value::null) return StringPiece("");
807  return StringPiece(v.asCString());
808  }
809 
817  void set_product_id(const StringPiece& value) {
818  *MutableStorage("productId") = value.data();
819  }
820 
826  bool has_product_url() const {
827  return Storage().isMember("productUrl");
828  }
829 
834  MutableStorage()->removeMember("productUrl");
835  }
836 
837 
841  const StringPiece get_product_url() const {
842  const Json::Value& v = Storage("productUrl");
843  if (v == Json::Value::null) return StringPiece("");
844  return StringPiece(v.asCString());
845  }
846 
854  void set_product_url(const StringPiece& value) {
855  *MutableStorage("productUrl") = value.data();
856  }
857 
865  return Storage().isMember("secondaryFileExtensions");
866  }
867 
872  MutableStorage()->removeMember("secondaryFileExtensions");
873  }
874 
875 
880  const client::JsonCppArray<string > get_secondary_file_extensions() const {
881  const Json::Value& storage = Storage("secondaryFileExtensions");
882  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
883  }
884 
893  client::JsonCppArray<string > mutable_secondaryFileExtensions() {
894  Json::Value* storage = MutableStorage("secondaryFileExtensions");
895  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
896  }
897 
904  return Storage().isMember("secondaryMimeTypes");
905  }
906 
911  MutableStorage()->removeMember("secondaryMimeTypes");
912  }
913 
914 
919  const client::JsonCppArray<string > get_secondary_mime_types() const {
920  const Json::Value& storage = Storage("secondaryMimeTypes");
921  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
922  }
923 
932  client::JsonCppArray<string > mutable_secondaryMimeTypes() {
933  Json::Value* storage = MutableStorage("secondaryMimeTypes");
934  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
935  }
936 
942  bool has_short_description() const {
943  return Storage().isMember("shortDescription");
944  }
945 
950  MutableStorage()->removeMember("shortDescription");
951  }
952 
953 
957  const StringPiece get_short_description() const {
958  const Json::Value& v = Storage("shortDescription");
959  if (v == Json::Value::null) return StringPiece("");
960  return StringPiece(v.asCString());
961  }
962 
970  void set_short_description(const StringPiece& value) {
971  *MutableStorage("shortDescription") = value.data();
972  }
973 
979  bool has_supports_create() const {
980  return Storage().isMember("supportsCreate");
981  }
982 
987  MutableStorage()->removeMember("supportsCreate");
988  }
989 
990 
994  bool get_supports_create() const {
995  const Json::Value& storage = Storage("supportsCreate");
996  return client::JsonValueToCppValueHelper<bool >(storage);
997  }
998 
1006  void set_supports_create(bool value) {
1007  client::SetJsonValueFromCppValueHelper<bool >(
1008  value, MutableStorage("supportsCreate"));
1009  }
1010 
1016  bool has_supports_import() const {
1017  return Storage().isMember("supportsImport");
1018  }
1019 
1024  MutableStorage()->removeMember("supportsImport");
1025  }
1026 
1027 
1031  bool get_supports_import() const {
1032  const Json::Value& storage = Storage("supportsImport");
1033  return client::JsonValueToCppValueHelper<bool >(storage);
1034  }
1035 
1043  void set_supports_import(bool value) {
1044  client::SetJsonValueFromCppValueHelper<bool >(
1045  value, MutableStorage("supportsImport"));
1046  }
1047 
1054  return Storage().isMember("supportsMultiOpen");
1055  }
1056 
1061  MutableStorage()->removeMember("supportsMultiOpen");
1062  }
1063 
1064 
1069  const Json::Value& storage = Storage("supportsMultiOpen");
1070  return client::JsonValueToCppValueHelper<bool >(storage);
1071  }
1072 
1080  void set_supports_multi_open(bool value) {
1081  client::SetJsonValueFromCppValueHelper<bool >(
1082  value, MutableStorage("supportsMultiOpen"));
1083  }
1084 
1091  return Storage().isMember("supportsOfflineCreate");
1092  }
1093 
1098  MutableStorage()->removeMember("supportsOfflineCreate");
1099  }
1100 
1101 
1106  const Json::Value& storage = Storage("supportsOfflineCreate");
1107  return client::JsonValueToCppValueHelper<bool >(storage);
1108  }
1109 
1117  void set_supports_offline_create(bool value) {
1118  client::SetJsonValueFromCppValueHelper<bool >(
1119  value, MutableStorage("supportsOfflineCreate"));
1120  }
1121 
1127  bool has_use_by_default() const {
1128  return Storage().isMember("useByDefault");
1129  }
1130 
1135  MutableStorage()->removeMember("useByDefault");
1136  }
1137 
1138 
1142  bool get_use_by_default() const {
1143  const Json::Value& storage = Storage("useByDefault");
1144  return client::JsonValueToCppValueHelper<bool >(storage);
1145  }
1146 
1155  void set_use_by_default(bool value) {
1156  client::SetJsonValueFromCppValueHelper<bool >(
1157  value, MutableStorage("useByDefault"));
1158  }
1159 
1160  private:
1161  void operator=(const App&);
1162 }; // App
1163 } // namespace google_drive_api
1164 #endif // GOOGLE_DRIVE_API_APP_H_
bool has_primary_file_extensions() const
Definition: app.h:711
client::JsonCppArray< string > mutable_primaryMimeTypes()
Definition: app.h:779
client::JsonCppArray< string > mutable_secondaryFileExtensions()
Definition: app.h:893
void set_has_drive_wide_scope(bool value)
Definition: app.h:402
client::JsonCppArray< string > mutable_secondaryMimeTypes()
Definition: app.h:932
bool has_supports_multi_open() const
Definition: app.h:1053
bool has_icons() const
Definition: app.h:412
void set_short_description(const StringPiece &value)
Definition: app.h:970
void clear_product_url()
Definition: app.h:833
void clear_supports_offline_create()
Definition: app.h:1097
bool has_product_url() const
Definition: app.h:826
void set_long_description(const StringPiece &value)
Definition: app.h:588
void clear_product_id()
Definition: app.h:796
void clear_id()
Definition: app.h:456
void clear_kind()
Definition: app.h:530
bool get_installed() const
Definition: app.h:501
void clear_supports_import()
Definition: app.h:1023
bool get_supports_multi_open() const
Definition: app.h:1068
void clear_open_url_template()
Definition: app.h:679
const StringPiece get_create_url() const
Definition: app.h:352
bool get_has_drive_wide_scope() const
Definition: app.h:389
const StringPiece GetTypeName() const
Definition: app.h:251
bool has_secondary_mime_types() const
Definition: app.h:903
const StringPiece get_product_url() const
Definition: app.h:841
bool has_object_type() const
Definition: app.h:634
void set_installed(bool value)
Definition: app.h:513
bool has_supports_import() const
Definition: app.h:1016
void set_supports_offline_create(bool value)
Definition: app.h:1117
bool has_primary_mime_types() const
Definition: app.h:750
bool has_short_description() const
Definition: app.h:942
void set_supports_import(bool value)
Definition: app.h:1043
bool has_authorized() const
Definition: app.h:260
void clear_object_type()
Definition: app.h:641
void clear_supports_multi_open()
Definition: app.h:1060
bool has_long_description() const
Definition: app.h:560
void clear_size()
Definition: app.h:192
Definition: app.h:53
bool has_id() const
Definition: app.h:449
const client::JsonCppArray< string > get_primary_file_extensions() const
Definition: app.h:727
void set_icon_url(const StringPiece &value)
Definition: app.h:176
const StringPiece get_object_type() const
Definition: app.h:649
bool has_supports_create() const
Definition: app.h:979
const StringPiece GetTypeName() const
Definition: app.h:93
const client::JsonCppArray< string > get_secondary_file_extensions() const
Definition: app.h:880
bool has_installed() const
Definition: app.h:486
void set_kind(const StringPiece &value)
Definition: app.h:551
void set_create_in_folder_template(const StringPiece &value)
Definition: app.h:328
bool has_product_id() const
Definition: app.h:789
int32 get_size() const
Definition: app.h:200
void set_product_url(const StringPiece &value)
Definition: app.h:854
bool get_authorized() const
Definition: app.h:275
bool get_supports_offline_create() const
Definition: app.h:1105
bool has_open_url_template() const
Definition: app.h:672
Definition: about.h:41
bool has_icon_url() const
Definition: app.h:148
const StringPiece get_id() const
Definition: app.h:464
const StringPiece get_product_id() const
Definition: app.h:804
client::JsonCppArray< string > mutable_primaryFileExtensions()
Definition: app.h:740
const client::JsonCppArray< string > get_secondary_mime_types() const
Definition: app.h:919
client::JsonCppArray< AppIcons > mutable_icons()
Definition: app.h:439
void clear_create_url()
Definition: app.h:344
void set_create_url(const StringPiece &value)
Definition: app.h:365
bool get_use_by_default() const
Definition: app.h:1142
void clear_use_by_default()
Definition: app.h:1134
bool get_supports_import() const
Definition: app.h:1031
void clear_supports_create()
Definition: app.h:986
void clear_icon_url()
Definition: app.h:155
bool has_name() const
Definition: app.h:597
void clear_long_description()
Definition: app.h:567
void set_authorized(bool value)
Definition: app.h:287
bool has_supports_offline_create() const
Definition: app.h:1090
void set_product_id(const StringPiece &value)
Definition: app.h:817
const client::JsonCppArray< AppIcons > get_icons() const
Definition: app.h:427
void set_id(const StringPiece &value)
Definition: app.h:477
void clear_name()
Definition: app.h:604
const client::JsonCppArray< string > get_primary_mime_types() const
Definition: app.h:766
void clear_has_drive_wide_scope()
Definition: app.h:381
bool has_size() const
Definition: app.h:185
const StringPiece get_short_description() const
Definition: app.h:957
void clear_primary_mime_types()
Definition: app.h:757
const StringPiece get_long_description() const
Definition: app.h:575
void clear_category()
Definition: app.h:109
void set_size(int32 value)
Definition: app.h:212
void set_open_url_template(const StringPiece &value)
Definition: app.h:702
void set_category(const StringPiece &value)
Definition: app.h:139
bool has_create_in_folder_template() const
Definition: app.h:298
bool has_secondary_file_extensions() const
Definition: app.h:864
void set_use_by_default(bool value)
Definition: app.h:1155
const StringPiece get_open_url_template() const
Definition: app.h:687
void clear_icons()
Definition: app.h:419
const StringPiece get_kind() const
Definition: app.h:538
const StringPiece get_category() const
Definition: app.h:117
bool has_category() const
Definition: app.h:102
void clear_secondary_file_extensions()
Definition: app.h:871
bool get_supports_create() const
Definition: app.h:994
const StringPiece get_create_in_folder_template() const
Definition: app.h:313
void clear_short_description()
Definition: app.h:949
Definition: about.cc:43
void clear_authorized()
Definition: app.h:267
bool has_kind() const
Definition: app.h:523
bool has_create_url() const
Definition: app.h:337
void clear_secondary_mime_types()
Definition: app.h:910
void clear_create_in_folder_template()
Definition: app.h:305
void clear_primary_file_extensions()
Definition: app.h:718
void set_object_type(const StringPiece &value)
Definition: app.h:663
const StringPiece get_name() const
Definition: app.h:612
bool has_has_drive_wide_scope() const
Definition: app.h:374
const StringPiece get_icon_url() const
Definition: app.h:163
bool has_use_by_default() const
Definition: app.h:1127
void set_supports_create(bool value)
Definition: app.h:1006
void set_supports_multi_open(bool value)
Definition: app.h:1080
void set_name(const StringPiece &value)
Definition: app.h:625
void clear_installed()
Definition: app.h:493