books  v1
offers.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_OFFERS_H_
31 #define GOOGLE_BOOKS_API_OFFERS_H_
32 
33 #include <string>
34 #include "googleapis/base/macros.h"
35 #include "googleapis/client/data/jsoncpp_data.h"
36 #include "googleapis/strings/stringpiece.h"
37 
38 namespace Json {
39 class Value;
40 } // namespace Json
41 
42 namespace google_books_api {
43 using namespace googleapis;
44 
50 class Offers : public client::JsonCppData {
51  public:
57  class OffersItems : public client::JsonCppData {
58  public:
64  class OffersItemsItems : public client::JsonCppData {
65  public:
71  static OffersItemsItems* New();
72 
78  explicit OffersItemsItems(const Json::Value& storage);
79 
85  explicit OffersItemsItems(Json::Value* storage);
86 
90  virtual ~OffersItemsItems();
91 
97  const StringPiece GetTypeName() const {
98  return StringPiece("google_books_api::OffersItemsItems");
99  }
100 
106  bool has_author() const {
107  return Storage().isMember("author");
108  }
109 
113  void clear_author() {
114  MutableStorage()->removeMember("author");
115  }
116 
117 
121  const StringPiece get_author() const {
122  const Json::Value& v = Storage("author");
123  if (v == Json::Value::null) return StringPiece("");
124  return StringPiece(v.asCString());
125  }
126 
131  void set_author(const StringPiece& value) {
132  *MutableStorage("author") = value.data();
133  }
134 
142  return Storage().isMember("canonicalVolumeLink");
143  }
144 
149  MutableStorage()->removeMember("canonicalVolumeLink");
150  }
151 
152 
156  const StringPiece get_canonical_volume_link() const {
157  const Json::Value& v = Storage("canonicalVolumeLink");
158  if (v == Json::Value::null) return StringPiece("");
159  return StringPiece(v.asCString());
160  }
161 
166  void set_canonical_volume_link(const StringPiece& value) {
167  *MutableStorage("canonicalVolumeLink") = value.data();
168  }
169 
175  bool has_cover_url() const {
176  return Storage().isMember("coverUrl");
177  }
178 
183  MutableStorage()->removeMember("coverUrl");
184  }
185 
186 
190  const StringPiece get_cover_url() const {
191  const Json::Value& v = Storage("coverUrl");
192  if (v == Json::Value::null) return StringPiece("");
193  return StringPiece(v.asCString());
194  }
195 
200  void set_cover_url(const StringPiece& value) {
201  *MutableStorage("coverUrl") = value.data();
202  }
203 
209  bool has_description() const {
210  return Storage().isMember("description");
211  }
212 
217  MutableStorage()->removeMember("description");
218  }
219 
220 
224  const StringPiece get_description() const {
225  const Json::Value& v = Storage("description");
226  if (v == Json::Value::null) return StringPiece("");
227  return StringPiece(v.asCString());
228  }
229 
234  void set_description(const StringPiece& value) {
235  *MutableStorage("description") = value.data();
236  }
237 
243  bool has_title() const {
244  return Storage().isMember("title");
245  }
246 
250  void clear_title() {
251  MutableStorage()->removeMember("title");
252  }
253 
254 
258  const StringPiece get_title() const {
259  const Json::Value& v = Storage("title");
260  if (v == Json::Value::null) return StringPiece("");
261  return StringPiece(v.asCString());
262  }
263 
268  void set_title(const StringPiece& value) {
269  *MutableStorage("title") = value.data();
270  }
271 
277  bool has_volume_id() const {
278  return Storage().isMember("volumeId");
279  }
280 
285  MutableStorage()->removeMember("volumeId");
286  }
287 
288 
292  const StringPiece get_volume_id() const {
293  const Json::Value& v = Storage("volumeId");
294  if (v == Json::Value::null) return StringPiece("");
295  return StringPiece(v.asCString());
296  }
297 
302  void set_volume_id(const StringPiece& value) {
303  *MutableStorage("volumeId") = value.data();
304  }
305 
306  private:
307  void operator=(const OffersItemsItems&);
308  }; // OffersItemsItems
314  static OffersItems* New();
315 
321  explicit OffersItems(const Json::Value& storage);
322 
328  explicit OffersItems(Json::Value* storage);
329 
333  virtual ~OffersItems();
334 
340  const StringPiece GetTypeName() const {
341  return StringPiece("google_books_api::OffersItems");
342  }
343 
349  bool has_art_url() const {
350  return Storage().isMember("artUrl");
351  }
352 
356  void clear_art_url() {
357  MutableStorage()->removeMember("artUrl");
358  }
359 
360 
364  const StringPiece get_art_url() const {
365  const Json::Value& v = Storage("artUrl");
366  if (v == Json::Value::null) return StringPiece("");
367  return StringPiece(v.asCString());
368  }
369 
374  void set_art_url(const StringPiece& value) {
375  *MutableStorage("artUrl") = value.data();
376  }
377 
383  bool has_gservices_key() const {
384  return Storage().isMember("gservicesKey");
385  }
386 
391  MutableStorage()->removeMember("gservicesKey");
392  }
393 
394 
398  const StringPiece get_gservices_key() const {
399  const Json::Value& v = Storage("gservicesKey");
400  if (v == Json::Value::null) return StringPiece("");
401  return StringPiece(v.asCString());
402  }
403 
408  void set_gservices_key(const StringPiece& value) {
409  *MutableStorage("gservicesKey") = value.data();
410  }
411 
417  bool has_id() const {
418  return Storage().isMember("id");
419  }
420 
424  void clear_id() {
425  MutableStorage()->removeMember("id");
426  }
427 
428 
432  const StringPiece get_id() const {
433  const Json::Value& v = Storage("id");
434  if (v == Json::Value::null) return StringPiece("");
435  return StringPiece(v.asCString());
436  }
437 
442  void set_id(const StringPiece& value) {
443  *MutableStorage("id") = value.data();
444  }
445 
451  bool has_items() const {
452  return Storage().isMember("items");
453  }
454 
458  void clear_items() {
459  MutableStorage()->removeMember("items");
460  }
461 
462 
466  const client::JsonCppArray<OffersItemsItems > get_items() const {
467  const Json::Value& storage = Storage("items");
468  return client::JsonValueToCppValueHelper<client::JsonCppArray<OffersItemsItems > >(storage);
469  }
470 
475  client::JsonCppArray<OffersItemsItems > mutable_items() {
476  Json::Value* storage = MutableStorage("items");
477  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<OffersItemsItems > >(storage);
478  }
479 
480  private:
481  void operator=(const OffersItems&);
482  }; // OffersItems
488  static Offers* New();
489 
495  explicit Offers(const Json::Value& storage);
496 
502  explicit Offers(Json::Value* storage);
503 
507  virtual ~Offers();
508 
514  const StringPiece GetTypeName() const {
515  return StringPiece("google_books_api::Offers");
516  }
517 
523  bool has_items() const {
524  return Storage().isMember("items");
525  }
526 
530  void clear_items() {
531  MutableStorage()->removeMember("items");
532  }
533 
534 
538  const client::JsonCppArray<OffersItems > get_items() const {
539  const Json::Value& storage = Storage("items");
540  return client::JsonValueToCppValueHelper<client::JsonCppArray<OffersItems > >(storage);
541  }
542 
550  client::JsonCppArray<OffersItems > mutable_items() {
551  Json::Value* storage = MutableStorage("items");
552  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<OffersItems > >(storage);
553  }
554 
560  bool has_kind() const {
561  return Storage().isMember("kind");
562  }
563 
567  void clear_kind() {
568  MutableStorage()->removeMember("kind");
569  }
570 
571 
575  const StringPiece get_kind() const {
576  const Json::Value& v = Storage("kind");
577  if (v == Json::Value::null) return StringPiece("");
578  return StringPiece(v.asCString());
579  }
580 
588  void set_kind(const StringPiece& value) {
589  *MutableStorage("kind") = value.data();
590  }
591 
592  private:
593  void operator=(const Offers&);
594 }; // Offers
595 } // namespace google_books_api
596 #endif // GOOGLE_BOOKS_API_OFFERS_H_
const StringPiece get_volume_id() const
Definition: offers.h:292
void set_author(const StringPiece &value)
Definition: offers.h:131
bool has_title() const
Definition: offers.h:243
const client::JsonCppArray< OffersItemsItems > get_items() const
Definition: offers.h:466
void clear_gservices_key()
Definition: offers.h:390
bool has_volume_id() const
Definition: offers.h:277
void set_art_url(const StringPiece &value)
Definition: offers.h:374
const StringPiece get_title() const
Definition: offers.h:258
const StringPiece GetTypeName() const
Definition: offers.h:340
const StringPiece get_gservices_key() const
Definition: offers.h:398
const StringPiece get_author() const
Definition: offers.h:121
client::JsonCppArray< OffersItems > mutable_items()
Definition: offers.h:550
void set_gservices_key(const StringPiece &value)
Definition: offers.h:408
bool has_art_url() const
Definition: offers.h:349
void set_volume_id(const StringPiece &value)
Definition: offers.h:302
const StringPiece get_id() const
Definition: offers.h:432
void set_canonical_volume_link(const StringPiece &value)
Definition: offers.h:166
bool has_cover_url() const
Definition: offers.h:175
const StringPiece get_art_url() const
Definition: offers.h:364
void clear_canonical_volume_link()
Definition: offers.h:148
void set_description(const StringPiece &value)
Definition: offers.h:234
const client::JsonCppArray< OffersItems > get_items() const
Definition: offers.h:538
client::JsonCppArray< OffersItemsItems > mutable_items()
Definition: offers.h:475
bool has_id() const
Definition: offers.h:417
const StringPiece get_description() const
Definition: offers.h:224
void clear_id()
Definition: offers.h:424
Definition: annotation.h:42
const StringPiece get_canonical_volume_link() const
Definition: offers.h:156
const StringPiece GetTypeName() const
Definition: offers.h:97
bool has_canonical_volume_link() const
Definition: offers.h:141
void set_cover_url(const StringPiece &value)
Definition: offers.h:200
void set_title(const StringPiece &value)
Definition: offers.h:268
void set_kind(const StringPiece &value)
Definition: offers.h:588
Definition: annotation.cc:44
const StringPiece GetTypeName() const
Definition: offers.h:514
void clear_art_url()
Definition: offers.h:356
Definition: offers.h:50
void clear_items()
Definition: offers.h:530
const StringPiece get_kind() const
Definition: offers.h:575
bool has_description() const
Definition: offers.h:209
void set_id(const StringPiece &value)
Definition: offers.h:442
void clear_kind()
Definition: offers.h:567
bool has_author() const
Definition: offers.h:106
bool has_items() const
Definition: offers.h:451
bool has_items() const
Definition: offers.h:523
const StringPiece get_cover_url() const
Definition: offers.h:190
bool has_gservices_key() const
Definition: offers.h:383
bool has_kind() const
Definition: offers.h:560
void clear_items()
Definition: offers.h:458