drive  v2
change_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-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_LIST_H_
31 #define GOOGLE_DRIVE_API_CHANGE_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/drive_api/change.h"
40 
41 namespace Json {
42 class Value;
43 } // namespace Json
44 
45 namespace google_drive_api {
46 using namespace googleapis;
47 
53 class ChangeList : public client::JsonCppData {
54  public:
60  static ChangeList* New();
61 
67  explicit ChangeList(const Json::Value& storage);
68 
74  explicit ChangeList(Json::Value* storage);
75 
79  virtual ~ChangeList();
80 
86  const StringPiece GetTypeName() const {
87  return StringPiece("google_drive_api::ChangeList");
88  }
89 
95  bool has_etag() const {
96  return Storage().isMember("etag");
97  }
98 
102  void clear_etag() {
103  MutableStorage()->removeMember("etag");
104  }
105 
106 
110  const StringPiece get_etag() const {
111  const Json::Value& v = Storage("etag");
112  if (v == Json::Value::null) return StringPiece("");
113  return StringPiece(v.asCString());
114  }
115 
123  void set_etag(const StringPiece& value) {
124  *MutableStorage("etag") = value.data();
125  }
126 
132  bool has_items() const {
133  return Storage().isMember("items");
134  }
135 
139  void clear_items() {
140  MutableStorage()->removeMember("items");
141  }
142 
143 
147  const client::JsonCppArray<Change > get_items() const;
148 
157  client::JsonCppArray<Change > mutable_items();
158 
164  bool has_kind() const {
165  return Storage().isMember("kind");
166  }
167 
171  void clear_kind() {
172  MutableStorage()->removeMember("kind");
173  }
174 
175 
179  const StringPiece get_kind() const {
180  const Json::Value& v = Storage("kind");
181  if (v == Json::Value::null) return StringPiece("");
182  return StringPiece(v.asCString());
183  }
184 
192  void set_kind(const StringPiece& value) {
193  *MutableStorage("kind") = value.data();
194  }
195 
201  bool has_largest_change_id() const {
202  return Storage().isMember("largestChangeId");
203  }
204 
209  MutableStorage()->removeMember("largestChangeId");
210  }
211 
212 
216  int64 get_largest_change_id() const {
217  const Json::Value& storage = Storage("largestChangeId");
218  return client::JsonValueToCppValueHelper<int64 >(storage);
219  }
220 
228  void set_largest_change_id(int64 value) {
229  client::SetJsonValueFromCppValueHelper<int64 >(
230  value, MutableStorage("largestChangeId"));
231  }
232 
239  return Storage().isMember("newStartPageToken");
240  }
241 
246  MutableStorage()->removeMember("newStartPageToken");
247  }
248 
249 
253  const StringPiece get_new_start_page_token() const {
254  const Json::Value& v = Storage("newStartPageToken");
255  if (v == Json::Value::null) return StringPiece("");
256  return StringPiece(v.asCString());
257  }
258 
267  void set_new_start_page_token(const StringPiece& value) {
268  *MutableStorage("newStartPageToken") = value.data();
269  }
270 
276  bool has_next_link() const {
277  return Storage().isMember("nextLink");
278  }
279 
284  MutableStorage()->removeMember("nextLink");
285  }
286 
287 
291  const StringPiece get_next_link() const {
292  const Json::Value& v = Storage("nextLink");
293  if (v == Json::Value::null) return StringPiece("");
294  return StringPiece(v.asCString());
295  }
296 
304  void set_next_link(const StringPiece& value) {
305  *MutableStorage("nextLink") = value.data();
306  }
307 
313  bool has_next_page_token() const {
314  return Storage().isMember("nextPageToken");
315  }
316 
321  MutableStorage()->removeMember("nextPageToken");
322  }
323 
324 
328  const StringPiece get_next_page_token() const {
329  const Json::Value& v = Storage("nextPageToken");
330  if (v == Json::Value::null) return StringPiece("");
331  return StringPiece(v.asCString());
332  }
333 
344  void set_next_page_token(const StringPiece& value) {
345  *MutableStorage("nextPageToken") = value.data();
346  }
347 
353  bool has_self_link() const {
354  return Storage().isMember("selfLink");
355  }
356 
361  MutableStorage()->removeMember("selfLink");
362  }
363 
364 
368  const StringPiece get_self_link() const {
369  const Json::Value& v = Storage("selfLink");
370  if (v == Json::Value::null) return StringPiece("");
371  return StringPiece(v.asCString());
372  }
373 
381  void set_self_link(const StringPiece& value) {
382  *MutableStorage("selfLink") = value.data();
383  }
384 
385  private:
386  void operator=(const ChangeList&);
387 }; // ChangeList
388 } // namespace google_drive_api
389 #endif // GOOGLE_DRIVE_API_CHANGE_LIST_H_
bool has_next_page_token() const
Definition: change_list.h:313
bool has_next_link() const
Definition: change_list.h:276
void clear_next_page_token()
Definition: change_list.h:320
void set_next_page_token(const StringPiece &value)
Definition: change_list.h:344
void clear_etag()
Definition: change_list.h:102
void set_largest_change_id(int64 value)
Definition: change_list.h:228
void set_kind(const StringPiece &value)
Definition: change_list.h:192
void clear_items()
Definition: change_list.h:139
const StringPiece get_self_link() const
Definition: change_list.h:368
const StringPiece GetTypeName() const
Definition: change_list.h:86
bool has_items() const
Definition: change_list.h:132
const StringPiece get_etag() const
Definition: change_list.h:110
bool has_self_link() const
Definition: change_list.h:353
bool has_etag() const
Definition: change_list.h:95
void clear_largest_change_id()
Definition: change_list.h:208
void clear_kind()
Definition: change_list.h:171
Definition: change_list.h:53
const StringPiece get_next_link() const
Definition: change_list.h:291
const StringPiece get_new_start_page_token() const
Definition: change_list.h:253
void set_etag(const StringPiece &value)
Definition: change_list.h:123
bool has_largest_change_id() const
Definition: change_list.h:201
Definition: about.h:41
void clear_new_start_page_token()
Definition: change_list.h:245
bool has_new_start_page_token() const
Definition: change_list.h:238
bool has_kind() const
Definition: change_list.h:164
int64 get_largest_change_id() const
Definition: change_list.h:216
void set_next_link(const StringPiece &value)
Definition: change_list.h:304
const StringPiece get_kind() const
Definition: change_list.h:179
void set_self_link(const StringPiece &value)
Definition: change_list.h:381
void clear_self_link()
Definition: change_list.h:360
void clear_next_link()
Definition: change_list.h:283
void set_new_start_page_token(const StringPiece &value)
Definition: change_list.h:267
Definition: about.cc:43
const StringPiece get_next_page_token() const
Definition: change_list.h:328