drive  v2
change.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_CHANGE_H_
31 #define GOOGLE_DRIVE_API_CHANGE_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/drive.h"
41 #include "google/drive_api/file.h"
42 #include "google/drive_api/team_drive.h"
43 
44 namespace Json {
45 class Value;
46 } // namespace Json
47 
48 namespace google_drive_api {
49 using namespace googleapis;
50 
56 class Change : public client::JsonCppData {
57  public:
63  static Change* New();
64 
70  explicit Change(const Json::Value& storage);
71 
77  explicit Change(Json::Value* storage);
78 
82  virtual ~Change();
83 
89  const StringPiece GetTypeName() const {
90  return StringPiece("google_drive_api::Change");
91  }
92 
98  bool has_change_type() const {
99  return Storage().isMember("changeType");
100  }
101 
106  MutableStorage()->removeMember("changeType");
107  }
108 
109 
113  const StringPiece get_change_type() const {
114  const Json::Value& v = Storage("changeType");
115  if (v == Json::Value::null) return StringPiece("");
116  return StringPiece(v.asCString());
117  }
118 
126  void set_change_type(const StringPiece& value) {
127  *MutableStorage("changeType") = value.data();
128  }
129 
135  bool has_deleted() const {
136  return Storage().isMember("deleted");
137  }
138 
142  void clear_deleted() {
143  MutableStorage()->removeMember("deleted");
144  }
145 
146 
150  bool get_deleted() const {
151  const Json::Value& storage = Storage("deleted");
152  return client::JsonValueToCppValueHelper<bool >(storage);
153  }
154 
163  void set_deleted(bool value) {
164  client::SetJsonValueFromCppValueHelper<bool >(
165  value, MutableStorage("deleted"));
166  }
167 
173  bool has_drive() const {
174  return Storage().isMember("drive");
175  }
176 
180  void clear_drive() {
181  MutableStorage()->removeMember("drive");
182  }
183 
184 
188  const Drive get_drive() const;
189 
199  Drive mutable_drive();
200 
206  bool has_drive_id() const {
207  return Storage().isMember("driveId");
208  }
209 
213  void clear_drive_id() {
214  MutableStorage()->removeMember("driveId");
215  }
216 
217 
221  const StringPiece get_drive_id() const {
222  const Json::Value& v = Storage("driveId");
223  if (v == Json::Value::null) return StringPiece("");
224  return StringPiece(v.asCString());
225  }
226 
234  void set_drive_id(const StringPiece& value) {
235  *MutableStorage("driveId") = value.data();
236  }
237 
243  bool has_file() const {
244  return Storage().isMember("file");
245  }
246 
250  void clear_file() {
251  MutableStorage()->removeMember("file");
252  }
253 
254 
258  const File get_file() const;
259 
268  File mutable_file();
269 
275  bool has_file_id() const {
276  return Storage().isMember("fileId");
277  }
278 
282  void clear_file_id() {
283  MutableStorage()->removeMember("fileId");
284  }
285 
286 
290  const StringPiece get_file_id() const {
291  const Json::Value& v = Storage("fileId");
292  if (v == Json::Value::null) return StringPiece("");
293  return StringPiece(v.asCString());
294  }
295 
303  void set_file_id(const StringPiece& value) {
304  *MutableStorage("fileId") = value.data();
305  }
306 
312  bool has_id() const {
313  return Storage().isMember("id");
314  }
315 
319  void clear_id() {
320  MutableStorage()->removeMember("id");
321  }
322 
323 
327  int64 get_id() const {
328  const Json::Value& storage = Storage("id");
329  return client::JsonValueToCppValueHelper<int64 >(storage);
330  }
331 
339  void set_id(int64 value) {
340  client::SetJsonValueFromCppValueHelper<int64 >(
341  value, MutableStorage("id"));
342  }
343 
349  bool has_kind() const {
350  return Storage().isMember("kind");
351  }
352 
356  void clear_kind() {
357  MutableStorage()->removeMember("kind");
358  }
359 
360 
364  const StringPiece get_kind() const {
365  const Json::Value& v = Storage("kind");
366  if (v == Json::Value::null) return StringPiece("");
367  return StringPiece(v.asCString());
368  }
369 
377  void set_kind(const StringPiece& value) {
378  *MutableStorage("kind") = value.data();
379  }
380 
386  bool has_modification_date() const {
387  return Storage().isMember("modificationDate");
388  }
389 
394  MutableStorage()->removeMember("modificationDate");
395  }
396 
397 
401  client::DateTime get_modification_date() const {
402  const Json::Value& storage = Storage("modificationDate");
403  return client::JsonValueToCppValueHelper<client::DateTime >(storage);
404  }
405 
413  void set_modification_date(client::DateTime value) {
414  client::SetJsonValueFromCppValueHelper<client::DateTime >(
415  value, MutableStorage("modificationDate"));
416  }
417 
423  bool has_self_link() const {
424  return Storage().isMember("selfLink");
425  }
426 
431  MutableStorage()->removeMember("selfLink");
432  }
433 
434 
438  const StringPiece get_self_link() const {
439  const Json::Value& v = Storage("selfLink");
440  if (v == Json::Value::null) return StringPiece("");
441  return StringPiece(v.asCString());
442  }
443 
451  void set_self_link(const StringPiece& value) {
452  *MutableStorage("selfLink") = value.data();
453  }
454 
460  bool has_team_drive() const {
461  return Storage().isMember("teamDrive");
462  }
463 
468  MutableStorage()->removeMember("teamDrive");
469  }
470 
471 
475  const TeamDrive get_team_drive() const;
476 
487  TeamDrive mutable_teamDrive();
488 
494  bool has_team_drive_id() const {
495  return Storage().isMember("teamDriveId");
496  }
497 
502  MutableStorage()->removeMember("teamDriveId");
503  }
504 
505 
509  const StringPiece get_team_drive_id() const {
510  const Json::Value& v = Storage("teamDriveId");
511  if (v == Json::Value::null) return StringPiece("");
512  return StringPiece(v.asCString());
513  }
514 
524  void set_team_drive_id(const StringPiece& value) {
525  *MutableStorage("teamDriveId") = value.data();
526  }
527 
533  bool has_type() const {
534  return Storage().isMember("type");
535  }
536 
540  void clear_type() {
541  MutableStorage()->removeMember("type");
542  }
543 
544 
548  const StringPiece get_type() const {
549  const Json::Value& v = Storage("type");
550  if (v == Json::Value::null) return StringPiece("");
551  return StringPiece(v.asCString());
552  }
553 
563  void set_type(const StringPiece& value) {
564  *MutableStorage("type") = value.data();
565  }
566 
567  private:
568  void operator=(const Change&);
569 }; // Change
570 } // namespace google_drive_api
571 #endif // GOOGLE_DRIVE_API_CHANGE_H_
void set_change_type(const StringPiece &value)
Definition: change.h:126
void set_drive_id(const StringPiece &value)
Definition: change.h:234
void clear_file()
Definition: change.h:250
const StringPiece get_team_drive_id() const
Definition: change.h:509
bool has_change_type() const
Definition: change.h:98
bool has_file_id() const
Definition: change.h:275
const StringPiece get_change_type() const
Definition: change.h:113
Definition: team_drive.h:51
void set_modification_date(client::DateTime value)
Definition: change.h:413
void clear_kind()
Definition: change.h:356
bool has_drive_id() const
Definition: change.h:206
Definition: drive.h:51
Definition: change.h:56
bool has_type() const
Definition: change.h:533
const StringPiece GetTypeName() const
Definition: change.h:89
bool has_drive() const
Definition: change.h:173
void set_kind(const StringPiece &value)
Definition: change.h:377
bool has_id() const
Definition: change.h:312
const StringPiece get_type() const
Definition: change.h:548
Definition: file.h:57
const StringPiece get_file_id() const
Definition: change.h:290
void clear_team_drive_id()
Definition: change.h:501
void clear_team_drive()
Definition: change.h:467
bool has_team_drive() const
Definition: change.h:460
bool has_modification_date() const
Definition: change.h:386
void set_type(const StringPiece &value)
Definition: change.h:563
void set_file_id(const StringPiece &value)
Definition: change.h:303
const StringPiece get_self_link() const
Definition: change.h:438
bool has_file() const
Definition: change.h:243
bool has_team_drive_id() const
Definition: change.h:494
bool has_kind() const
Definition: change.h:349
Definition: about.h:41
void clear_drive_id()
Definition: change.h:213
void clear_file_id()
Definition: change.h:282
client::DateTime get_modification_date() const
Definition: change.h:401
void clear_change_type()
Definition: change.h:105
bool has_self_link() const
Definition: change.h:423
void clear_deleted()
Definition: change.h:142
const StringPiece get_drive_id() const
Definition: change.h:221
void set_self_link(const StringPiece &value)
Definition: change.h:451
void set_team_drive_id(const StringPiece &value)
Definition: change.h:524
bool get_deleted() const
Definition: change.h:150
void clear_modification_date()
Definition: change.h:393
bool has_deleted() const
Definition: change.h:135
void set_deleted(bool value)
Definition: change.h:163
void set_id(int64 value)
Definition: change.h:339
void clear_id()
Definition: change.h:319
void clear_type()
Definition: change.h:540
const StringPiece get_kind() const
Definition: change.h:364
Definition: about.cc:43
void clear_drive()
Definition: change.h:180
void clear_self_link()
Definition: change.h:430
int64 get_id() const
Definition: change.h:327