drive  v2
revision.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_REVISION_H_
31 #define GOOGLE_DRIVE_API_REVISION_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/client/util/date_time.h"
38 #include "googleapis/strings/stringpiece.h"
39 
40 #include "google/drive_api/user.h"
41 
42 namespace Json {
43 class Value;
44 } // namespace Json
45 
46 namespace google_drive_api {
47 using namespace googleapis;
48 
54 class Revision : public client::JsonCppData {
55  public:
61  static Revision* New();
62 
68  explicit Revision(const Json::Value& storage);
69 
75  explicit Revision(Json::Value* storage);
76 
80  virtual ~Revision();
81 
87  const StringPiece GetTypeName() const {
88  return StringPiece("google_drive_api::Revision");
89  }
90 
96  bool has_download_url() const {
97  return Storage().isMember("downloadUrl");
98  }
99 
104  MutableStorage()->removeMember("downloadUrl");
105  }
106 
107 
111  const StringPiece get_download_url() const {
112  const Json::Value& v = Storage("downloadUrl");
113  if (v == Json::Value::null) return StringPiece("");
114  return StringPiece(v.asCString());
115  }
116 
121  void set_download_url(const StringPiece& value) {
122  *MutableStorage("downloadUrl") = value.data();
123  }
124 
130  bool has_etag() const {
131  return Storage().isMember("etag");
132  }
133 
137  void clear_etag() {
138  MutableStorage()->removeMember("etag");
139  }
140 
141 
145  const StringPiece get_etag() const {
146  const Json::Value& v = Storage("etag");
147  if (v == Json::Value::null) return StringPiece("");
148  return StringPiece(v.asCString());
149  }
150 
158  void set_etag(const StringPiece& value) {
159  *MutableStorage("etag") = value.data();
160  }
161 
167  bool has_export_links() const {
168  return Storage().isMember("exportLinks");
169  }
170 
175  MutableStorage()->removeMember("exportLinks");
176  }
177 
178 
182  const client::JsonCppAssociativeArray<string > get_export_links() const {
183  const Json::Value& storage = Storage("exportLinks");
184  return client::JsonValueToCppValueHelper<client::JsonCppAssociativeArray<string > >(storage);
185  }
186 
195  client::JsonCppAssociativeArray<string > mutable_exportLinks() {
196  Json::Value* storage = MutableStorage("exportLinks");
197  return client::JsonValueToMutableCppValueHelper<client::JsonCppAssociativeArray<string > >(storage);
198  }
199 
205  bool has_file_size() const {
206  return Storage().isMember("fileSize");
207  }
208 
213  MutableStorage()->removeMember("fileSize");
214  }
215 
216 
220  int64 get_file_size() const {
221  const Json::Value& storage = Storage("fileSize");
222  return client::JsonValueToCppValueHelper<int64 >(storage);
223  }
224 
233  void set_file_size(int64 value) {
234  client::SetJsonValueFromCppValueHelper<int64 >(
235  value, MutableStorage("fileSize"));
236  }
237 
243  bool has_id() const {
244  return Storage().isMember("id");
245  }
246 
250  void clear_id() {
251  MutableStorage()->removeMember("id");
252  }
253 
254 
258  const StringPiece get_id() const {
259  const Json::Value& v = Storage("id");
260  if (v == Json::Value::null) return StringPiece("");
261  return StringPiece(v.asCString());
262  }
263 
271  void set_id(const StringPiece& value) {
272  *MutableStorage("id") = value.data();
273  }
274 
280  bool has_kind() const {
281  return Storage().isMember("kind");
282  }
283 
287  void clear_kind() {
288  MutableStorage()->removeMember("kind");
289  }
290 
291 
295  const StringPiece get_kind() const {
296  const Json::Value& v = Storage("kind");
297  if (v == Json::Value::null) return StringPiece("");
298  return StringPiece(v.asCString());
299  }
300 
308  void set_kind(const StringPiece& value) {
309  *MutableStorage("kind") = value.data();
310  }
311 
317  bool has_last_modifying_user() const {
318  return Storage().isMember("lastModifyingUser");
319  }
320 
325  MutableStorage()->removeMember("lastModifyingUser");
326  }
327 
328 
333  const User get_last_modifying_user() const;
334 
343  User mutable_lastModifyingUser();
344 
351  return Storage().isMember("lastModifyingUserName");
352  }
353 
358  MutableStorage()->removeMember("lastModifyingUserName");
359  }
360 
361 
365  const StringPiece get_last_modifying_user_name() const {
366  const Json::Value& v = Storage("lastModifyingUserName");
367  if (v == Json::Value::null) return StringPiece("");
368  return StringPiece(v.asCString());
369  }
370 
378  void set_last_modifying_user_name(const StringPiece& value) {
379  *MutableStorage("lastModifyingUserName") = value.data();
380  }
381 
387  bool has_md5_checksum() const {
388  return Storage().isMember("md5Checksum");
389  }
390 
395  MutableStorage()->removeMember("md5Checksum");
396  }
397 
398 
402  const StringPiece get_md5_checksum() const {
403  const Json::Value& v = Storage("md5Checksum");
404  if (v == Json::Value::null) return StringPiece("");
405  return StringPiece(v.asCString());
406  }
407 
416  void set_md5_checksum(const StringPiece& value) {
417  *MutableStorage("md5Checksum") = value.data();
418  }
419 
425  bool has_mime_type() const {
426  return Storage().isMember("mimeType");
427  }
428 
433  MutableStorage()->removeMember("mimeType");
434  }
435 
436 
440  const StringPiece get_mime_type() const {
441  const Json::Value& v = Storage("mimeType");
442  if (v == Json::Value::null) return StringPiece("");
443  return StringPiece(v.asCString());
444  }
445 
453  void set_mime_type(const StringPiece& value) {
454  *MutableStorage("mimeType") = value.data();
455  }
456 
462  bool has_modified_date() const {
463  return Storage().isMember("modifiedDate");
464  }
465 
470  MutableStorage()->removeMember("modifiedDate");
471  }
472 
473 
477  client::DateTime get_modified_date() const {
478  const Json::Value& storage = Storage("modifiedDate");
479  return client::JsonValueToCppValueHelper<client::DateTime >(storage);
480  }
481 
489  void set_modified_date(client::DateTime value) {
490  client::SetJsonValueFromCppValueHelper<client::DateTime >(
491  value, MutableStorage("modifiedDate"));
492  }
493 
499  bool has_original_filename() const {
500  return Storage().isMember("originalFilename");
501  }
502 
507  MutableStorage()->removeMember("originalFilename");
508  }
509 
510 
514  const StringPiece get_original_filename() const {
515  const Json::Value& v = Storage("originalFilename");
516  if (v == Json::Value::null) return StringPiece("");
517  return StringPiece(v.asCString());
518  }
519 
528  void set_original_filename(const StringPiece& value) {
529  *MutableStorage("originalFilename") = value.data();
530  }
531 
537  bool has_pinned() const {
538  return Storage().isMember("pinned");
539  }
540 
544  void clear_pinned() {
545  MutableStorage()->removeMember("pinned");
546  }
547 
548 
552  bool get_pinned() const {
553  const Json::Value& storage = Storage("pinned");
554  return client::JsonValueToCppValueHelper<bool >(storage);
555  }
556 
569  void set_pinned(bool value) {
570  client::SetJsonValueFromCppValueHelper<bool >(
571  value, MutableStorage("pinned"));
572  }
573 
579  bool has_publish_auto() const {
580  return Storage().isMember("publishAuto");
581  }
582 
587  MutableStorage()->removeMember("publishAuto");
588  }
589 
590 
594  bool get_publish_auto() const {
595  const Json::Value& storage = Storage("publishAuto");
596  return client::JsonValueToCppValueHelper<bool >(storage);
597  }
598 
607  void set_publish_auto(bool value) {
608  client::SetJsonValueFromCppValueHelper<bool >(
609  value, MutableStorage("publishAuto"));
610  }
611 
617  bool has_published() const {
618  return Storage().isMember("published");
619  }
620 
625  MutableStorage()->removeMember("published");
626  }
627 
628 
632  bool get_published() const {
633  const Json::Value& storage = Storage("published");
634  return client::JsonValueToCppValueHelper<bool >(storage);
635  }
636 
645  void set_published(bool value) {
646  client::SetJsonValueFromCppValueHelper<bool >(
647  value, MutableStorage("published"));
648  }
649 
655  bool has_published_link() const {
656  return Storage().isMember("publishedLink");
657  }
658 
663  MutableStorage()->removeMember("publishedLink");
664  }
665 
666 
670  const StringPiece get_published_link() const {
671  const Json::Value& v = Storage("publishedLink");
672  if (v == Json::Value::null) return StringPiece("");
673  return StringPiece(v.asCString());
674  }
675 
683  void set_published_link(const StringPiece& value) {
684  *MutableStorage("publishedLink") = value.data();
685  }
686 
694  return Storage().isMember("publishedOutsideDomain");
695  }
696 
701  MutableStorage()->removeMember("publishedOutsideDomain");
702  }
703 
704 
709  const Json::Value& storage = Storage("publishedOutsideDomain");
710  return client::JsonValueToCppValueHelper<bool >(storage);
711  }
712 
721  void set_published_outside_domain(bool value) {
722  client::SetJsonValueFromCppValueHelper<bool >(
723  value, MutableStorage("publishedOutsideDomain"));
724  }
725 
731  bool has_self_link() const {
732  return Storage().isMember("selfLink");
733  }
734 
739  MutableStorage()->removeMember("selfLink");
740  }
741 
742 
746  const StringPiece get_self_link() const {
747  const Json::Value& v = Storage("selfLink");
748  if (v == Json::Value::null) return StringPiece("");
749  return StringPiece(v.asCString());
750  }
751 
759  void set_self_link(const StringPiece& value) {
760  *MutableStorage("selfLink") = value.data();
761  }
762 
763  private:
764  void operator=(const Revision&);
765 }; // Revision
766 } // namespace google_drive_api
767 #endif // GOOGLE_DRIVE_API_REVISION_H_
void clear_published()
Definition: revision.h:624
void set_published_link(const StringPiece &value)
Definition: revision.h:683
void set_modified_date(client::DateTime value)
Definition: revision.h:489
void set_published_outside_domain(bool value)
Definition: revision.h:721
void clear_id()
Definition: revision.h:250
void clear_pinned()
Definition: revision.h:544
client::JsonCppAssociativeArray< string > mutable_exportLinks()
Definition: revision.h:195
void clear_export_links()
Definition: revision.h:174
bool get_published() const
Definition: revision.h:632
bool has_published() const
Definition: revision.h:617
void set_file_size(int64 value)
Definition: revision.h:233
int64 get_file_size() const
Definition: revision.h:220
bool has_md5_checksum() const
Definition: revision.h:387
bool has_modified_date() const
Definition: revision.h:462
const StringPiece get_published_link() const
Definition: revision.h:670
void set_original_filename(const StringPiece &value)
Definition: revision.h:528
void set_publish_auto(bool value)
Definition: revision.h:607
bool has_mime_type() const
Definition: revision.h:425
bool has_published_link() const
Definition: revision.h:655
Definition: user.h:50
bool get_pinned() const
Definition: revision.h:552
bool has_download_url() const
Definition: revision.h:96
bool has_last_modifying_user() const
Definition: revision.h:317
const StringPiece get_self_link() const
Definition: revision.h:746
void clear_self_link()
Definition: revision.h:738
void clear_original_filename()
Definition: revision.h:506
void set_last_modifying_user_name(const StringPiece &value)
Definition: revision.h:378
bool has_self_link() const
Definition: revision.h:731
void clear_mime_type()
Definition: revision.h:432
const StringPiece GetTypeName() const
Definition: revision.h:87
bool has_publish_auto() const
Definition: revision.h:579
void set_mime_type(const StringPiece &value)
Definition: revision.h:453
const StringPiece get_md5_checksum() const
Definition: revision.h:402
bool get_publish_auto() const
Definition: revision.h:594
void set_kind(const StringPiece &value)
Definition: revision.h:308
const StringPiece get_id() const
Definition: revision.h:258
void clear_md5_checksum()
Definition: revision.h:394
bool get_published_outside_domain() const
Definition: revision.h:708
void set_md5_checksum(const StringPiece &value)
Definition: revision.h:416
bool has_kind() const
Definition: revision.h:280
const StringPiece get_etag() const
Definition: revision.h:145
bool has_pinned() const
Definition: revision.h:537
void clear_etag()
Definition: revision.h:137
void clear_last_modifying_user_name()
Definition: revision.h:357
void set_download_url(const StringPiece &value)
Definition: revision.h:121
Definition: about.h:41
bool has_file_size() const
Definition: revision.h:205
void clear_published_link()
Definition: revision.h:662
bool has_published_outside_domain() const
Definition: revision.h:693
void set_published(bool value)
Definition: revision.h:645
void set_etag(const StringPiece &value)
Definition: revision.h:158
const client::JsonCppAssociativeArray< string > get_export_links() const
Definition: revision.h:182
const StringPiece get_kind() const
Definition: revision.h:295
void set_id(const StringPiece &value)
Definition: revision.h:271
void clear_published_outside_domain()
Definition: revision.h:700
const StringPiece get_mime_type() const
Definition: revision.h:440
bool has_id() const
Definition: revision.h:243
const StringPiece get_original_filename() const
Definition: revision.h:514
bool has_export_links() const
Definition: revision.h:167
const StringPiece get_download_url() const
Definition: revision.h:111
void clear_last_modifying_user()
Definition: revision.h:324
void clear_modified_date()
Definition: revision.h:469
bool has_etag() const
Definition: revision.h:130
Definition: revision.h:54
void clear_publish_auto()
Definition: revision.h:586
void set_self_link(const StringPiece &value)
Definition: revision.h:759
client::DateTime get_modified_date() const
Definition: revision.h:477
bool has_original_filename() const
Definition: revision.h:499
void clear_download_url()
Definition: revision.h:103
const StringPiece get_last_modifying_user_name() const
Definition: revision.h:365
void set_pinned(bool value)
Definition: revision.h:569
Definition: about.cc:43
bool has_last_modifying_user_name() const
Definition: revision.h:350
void clear_kind()
Definition: revision.h:287
void clear_file_size()
Definition: revision.h:212