books  v1
bookshelf.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-14, 18:51:48 UTC
18 // C++ generator version: 0.1.4
19 
20 // ----------------------------------------------------------------------------
21 // NOTE: This file is generated from Google APIs Discovery Service.
22 // Service:
23 // Books API (books/v1)
24 // Generated from:
25 // Version: v1
26 // Revision: 114
27 // Generated by:
28 // Tool: google-apis-code-generator 1.5.1
29 // C++: 0.1.4
30 #ifndef GOOGLE_BOOKS_API_BOOKSHELF_H_
31 #define GOOGLE_BOOKS_API_BOOKSHELF_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 namespace Json {
41 class Value;
42 } // namespace Json
43 
44 namespace google_books_api {
45 using namespace googleapis;
46 
52 class Bookshelf : public client::JsonCppData {
53  public:
59  static Bookshelf* New();
60 
66  explicit Bookshelf(const Json::Value& storage);
67 
73  explicit Bookshelf(Json::Value* storage);
74 
78  virtual ~Bookshelf();
79 
85  const StringPiece GetTypeName() const {
86  return StringPiece("google_books_api::Bookshelf");
87  }
88 
94  bool has_access() const {
95  return Storage().isMember("access");
96  }
97 
101  void clear_access() {
102  MutableStorage()->removeMember("access");
103  }
104 
105 
109  const StringPiece get_access() const {
110  const Json::Value& v = Storage("access");
111  if (v == Json::Value::null) return StringPiece("");
112  return StringPiece(v.asCString());
113  }
114 
122  void set_access(const StringPiece& value) {
123  *MutableStorage("access") = value.data();
124  }
125 
131  bool has_created() const {
132  return Storage().isMember("created");
133  }
134 
138  void clear_created() {
139  MutableStorage()->removeMember("created");
140  }
141 
142 
146  client::DateTime get_created() const {
147  const Json::Value& storage = Storage("created");
148  return client::JsonValueToCppValueHelper<client::DateTime >(storage);
149  }
150 
159  void set_created(client::DateTime value) {
160  client::SetJsonValueFromCppValueHelper<client::DateTime >(
161  value, MutableStorage("created"));
162  }
163 
169  bool has_description() const {
170  return Storage().isMember("description");
171  }
172 
177  MutableStorage()->removeMember("description");
178  }
179 
180 
184  const StringPiece get_description() const {
185  const Json::Value& v = Storage("description");
186  if (v == Json::Value::null) return StringPiece("");
187  return StringPiece(v.asCString());
188  }
189 
197  void set_description(const StringPiece& value) {
198  *MutableStorage("description") = value.data();
199  }
200 
206  bool has_id() const {
207  return Storage().isMember("id");
208  }
209 
213  void clear_id() {
214  MutableStorage()->removeMember("id");
215  }
216 
217 
221  int32 get_id() const {
222  const Json::Value& storage = Storage("id");
223  return client::JsonValueToCppValueHelper<int32 >(storage);
224  }
225 
233  void set_id(int32 value) {
234  client::SetJsonValueFromCppValueHelper<int32 >(
235  value, MutableStorage("id"));
236  }
237 
243  bool has_kind() const {
244  return Storage().isMember("kind");
245  }
246 
250  void clear_kind() {
251  MutableStorage()->removeMember("kind");
252  }
253 
254 
258  const StringPiece get_kind() const {
259  const Json::Value& v = Storage("kind");
260  if (v == Json::Value::null) return StringPiece("");
261  return StringPiece(v.asCString());
262  }
263 
271  void set_kind(const StringPiece& value) {
272  *MutableStorage("kind") = value.data();
273  }
274 
280  bool has_self_link() const {
281  return Storage().isMember("selfLink");
282  }
283 
288  MutableStorage()->removeMember("selfLink");
289  }
290 
291 
295  const StringPiece get_self_link() const {
296  const Json::Value& v = Storage("selfLink");
297  if (v == Json::Value::null) return StringPiece("");
298  return StringPiece(v.asCString());
299  }
300 
308  void set_self_link(const StringPiece& value) {
309  *MutableStorage("selfLink") = value.data();
310  }
311 
317  bool has_title() const {
318  return Storage().isMember("title");
319  }
320 
324  void clear_title() {
325  MutableStorage()->removeMember("title");
326  }
327 
328 
332  const StringPiece get_title() const {
333  const Json::Value& v = Storage("title");
334  if (v == Json::Value::null) return StringPiece("");
335  return StringPiece(v.asCString());
336  }
337 
345  void set_title(const StringPiece& value) {
346  *MutableStorage("title") = value.data();
347  }
348 
354  bool has_updated() const {
355  return Storage().isMember("updated");
356  }
357 
361  void clear_updated() {
362  MutableStorage()->removeMember("updated");
363  }
364 
365 
369  client::DateTime get_updated() const {
370  const Json::Value& storage = Storage("updated");
371  return client::JsonValueToCppValueHelper<client::DateTime >(storage);
372  }
373 
382  void set_updated(client::DateTime value) {
383  client::SetJsonValueFromCppValueHelper<client::DateTime >(
384  value, MutableStorage("updated"));
385  }
386 
392  bool has_volume_count() const {
393  return Storage().isMember("volumeCount");
394  }
395 
400  MutableStorage()->removeMember("volumeCount");
401  }
402 
403 
407  int32 get_volume_count() const {
408  const Json::Value& storage = Storage("volumeCount");
409  return client::JsonValueToCppValueHelper<int32 >(storage);
410  }
411 
419  void set_volume_count(int32 value) {
420  client::SetJsonValueFromCppValueHelper<int32 >(
421  value, MutableStorage("volumeCount"));
422  }
423 
430  return Storage().isMember("volumesLastUpdated");
431  }
432 
437  MutableStorage()->removeMember("volumesLastUpdated");
438  }
439 
440 
444  client::DateTime get_volumes_last_updated() const {
445  const Json::Value& storage = Storage("volumesLastUpdated");
446  return client::JsonValueToCppValueHelper<client::DateTime >(storage);
447  }
448 
457  void set_volumes_last_updated(client::DateTime value) {
458  client::SetJsonValueFromCppValueHelper<client::DateTime >(
459  value, MutableStorage("volumesLastUpdated"));
460  }
461 
462  private:
463  void operator=(const Bookshelf&);
464 }; // Bookshelf
465 } // namespace google_books_api
466 #endif // GOOGLE_BOOKS_API_BOOKSHELF_H_
void set_created(client::DateTime value)
Definition: bookshelf.h:159
bool has_updated() const
Definition: bookshelf.h:354
bool has_volumes_last_updated() const
Definition: bookshelf.h:429
const StringPiece get_title() const
Definition: bookshelf.h:332
client::DateTime get_updated() const
Definition: bookshelf.h:369
void set_volumes_last_updated(client::DateTime value)
Definition: bookshelf.h:457
void clear_volumes_last_updated()
Definition: bookshelf.h:436
void set_updated(client::DateTime value)
Definition: bookshelf.h:382
void clear_self_link()
Definition: bookshelf.h:287
const StringPiece get_description() const
Definition: bookshelf.h:184
void set_description(const StringPiece &value)
Definition: bookshelf.h:197
bool has_description() const
Definition: bookshelf.h:169
void set_title(const StringPiece &value)
Definition: bookshelf.h:345
void clear_access()
Definition: bookshelf.h:101
const StringPiece GetTypeName() const
Definition: bookshelf.h:85
void clear_kind()
Definition: bookshelf.h:250
const StringPiece get_kind() const
Definition: bookshelf.h:258
void set_volume_count(int32 value)
Definition: bookshelf.h:419
Definition: bookshelf.h:52
client::DateTime get_created() const
Definition: bookshelf.h:146
bool has_id() const
Definition: bookshelf.h:206
void clear_description()
Definition: bookshelf.h:176
void set_access(const StringPiece &value)
Definition: bookshelf.h:122
void set_self_link(const StringPiece &value)
Definition: bookshelf.h:308
const StringPiece get_self_link() const
Definition: bookshelf.h:295
void set_id(int32 value)
Definition: bookshelf.h:233
void clear_volume_count()
Definition: bookshelf.h:399
bool has_self_link() const
Definition: bookshelf.h:280
Definition: annotation.h:42
const StringPiece get_access() const
Definition: bookshelf.h:109
void clear_created()
Definition: bookshelf.h:138
void clear_title()
Definition: bookshelf.h:324
void clear_updated()
Definition: bookshelf.h:361
client::DateTime get_volumes_last_updated() const
Definition: bookshelf.h:444
int32 get_id() const
Definition: bookshelf.h:221
Definition: annotation.cc:44
bool has_created() const
Definition: bookshelf.h:131
bool has_kind() const
Definition: bookshelf.h:243
void clear_id()
Definition: bookshelf.h:213
bool has_access() const
Definition: bookshelf.h:94
bool has_volume_count() const
Definition: bookshelf.h:392
bool has_title() const
Definition: bookshelf.h:317
void set_kind(const StringPiece &value)
Definition: bookshelf.h:271
int32 get_volume_count() const
Definition: bookshelf.h:407