books  v1
review.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_REVIEW_H_
31 #define GOOGLE_BOOKS_API_REVIEW_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 Review : public client::JsonCppData {
51  public:
57  class ReviewAuthor : public client::JsonCppData {
58  public:
64  static ReviewAuthor* New();
65 
71  explicit ReviewAuthor(const Json::Value& storage);
72 
78  explicit ReviewAuthor(Json::Value* storage);
79 
83  virtual ~ReviewAuthor();
84 
90  const StringPiece GetTypeName() const {
91  return StringPiece("google_books_api::ReviewAuthor");
92  }
93 
99  bool has_display_name() const {
100  return Storage().isMember("displayName");
101  }
102 
107  MutableStorage()->removeMember("displayName");
108  }
109 
110 
114  const StringPiece get_display_name() const {
115  const Json::Value& v = Storage("displayName");
116  if (v == Json::Value::null) return StringPiece("");
117  return StringPiece(v.asCString());
118  }
119 
127  void set_display_name(const StringPiece& value) {
128  *MutableStorage("displayName") = value.data();
129  }
130 
131  private:
132  void operator=(const ReviewAuthor&);
133  }; // ReviewAuthor
140  class ReviewSource : public client::JsonCppData {
141  public:
147  static ReviewSource* New();
148 
154  explicit ReviewSource(const Json::Value& storage);
155 
161  explicit ReviewSource(Json::Value* storage);
162 
166  virtual ~ReviewSource();
167 
173  const StringPiece GetTypeName() const {
174  return StringPiece("google_books_api::ReviewSource");
175  }
176 
182  bool has_description() const {
183  return Storage().isMember("description");
184  }
185 
190  MutableStorage()->removeMember("description");
191  }
192 
193 
197  const StringPiece get_description() const {
198  const Json::Value& v = Storage("description");
199  if (v == Json::Value::null) return StringPiece("");
200  return StringPiece(v.asCString());
201  }
202 
210  void set_description(const StringPiece& value) {
211  *MutableStorage("description") = value.data();
212  }
213 
219  bool has_extra_description() const {
220  return Storage().isMember("extraDescription");
221  }
222 
227  MutableStorage()->removeMember("extraDescription");
228  }
229 
230 
234  const StringPiece get_extra_description() const {
235  const Json::Value& v = Storage("extraDescription");
236  if (v == Json::Value::null) return StringPiece("");
237  return StringPiece(v.asCString());
238  }
239 
247  void set_extra_description(const StringPiece& value) {
248  *MutableStorage("extraDescription") = value.data();
249  }
250 
256  bool has_url() const {
257  return Storage().isMember("url");
258  }
259 
263  void clear_url() {
264  MutableStorage()->removeMember("url");
265  }
266 
267 
271  const StringPiece get_url() const {
272  const Json::Value& v = Storage("url");
273  if (v == Json::Value::null) return StringPiece("");
274  return StringPiece(v.asCString());
275  }
276 
284  void set_url(const StringPiece& value) {
285  *MutableStorage("url") = value.data();
286  }
287 
288  private:
289  void operator=(const ReviewSource&);
290  }; // ReviewSource
296  static Review* New();
297 
303  explicit Review(const Json::Value& storage);
304 
310  explicit Review(Json::Value* storage);
311 
315  virtual ~Review();
316 
322  const StringPiece GetTypeName() const {
323  return StringPiece("google_books_api::Review");
324  }
325 
331  bool has_author() const {
332  return Storage().isMember("author");
333  }
334 
338  void clear_author() {
339  MutableStorage()->removeMember("author");
340  }
341 
342 
346  const ReviewAuthor get_author() const {
347  const Json::Value& storage = Storage("author");
348  return client::JsonValueToCppValueHelper<ReviewAuthor >(storage);
349  }
350 
359  Json::Value* storage = MutableStorage("author");
360  return client::JsonValueToMutableCppValueHelper<ReviewAuthor >(storage);
361  }
362 
368  bool has_content() const {
369  return Storage().isMember("content");
370  }
371 
375  void clear_content() {
376  MutableStorage()->removeMember("content");
377  }
378 
379 
383  const StringPiece get_content() const {
384  const Json::Value& v = Storage("content");
385  if (v == Json::Value::null) return StringPiece("");
386  return StringPiece(v.asCString());
387  }
388 
396  void set_content(const StringPiece& value) {
397  *MutableStorage("content") = value.data();
398  }
399 
405  bool has_date() const {
406  return Storage().isMember("date");
407  }
408 
412  void clear_date() {
413  MutableStorage()->removeMember("date");
414  }
415 
416 
420  const StringPiece get_date() const {
421  const Json::Value& v = Storage("date");
422  if (v == Json::Value::null) return StringPiece("");
423  return StringPiece(v.asCString());
424  }
425 
433  void set_date(const StringPiece& value) {
434  *MutableStorage("date") = value.data();
435  }
436 
442  bool has_full_text_url() const {
443  return Storage().isMember("fullTextUrl");
444  }
445 
450  MutableStorage()->removeMember("fullTextUrl");
451  }
452 
453 
457  const StringPiece get_full_text_url() const {
458  const Json::Value& v = Storage("fullTextUrl");
459  if (v == Json::Value::null) return StringPiece("");
460  return StringPiece(v.asCString());
461  }
462 
470  void set_full_text_url(const StringPiece& value) {
471  *MutableStorage("fullTextUrl") = value.data();
472  }
473 
479  bool has_kind() const {
480  return Storage().isMember("kind");
481  }
482 
486  void clear_kind() {
487  MutableStorage()->removeMember("kind");
488  }
489 
490 
494  const StringPiece get_kind() const {
495  const Json::Value& v = Storage("kind");
496  if (v == Json::Value::null) return StringPiece("");
497  return StringPiece(v.asCString());
498  }
499 
507  void set_kind(const StringPiece& value) {
508  *MutableStorage("kind") = value.data();
509  }
510 
516  bool has_rating() const {
517  return Storage().isMember("rating");
518  }
519 
523  void clear_rating() {
524  MutableStorage()->removeMember("rating");
525  }
526 
527 
531  const StringPiece get_rating() const {
532  const Json::Value& v = Storage("rating");
533  if (v == Json::Value::null) return StringPiece("");
534  return StringPiece(v.asCString());
535  }
536 
545  void set_rating(const StringPiece& value) {
546  *MutableStorage("rating") = value.data();
547  }
548 
554  bool has_source() const {
555  return Storage().isMember("source");
556  }
557 
561  void clear_source() {
562  MutableStorage()->removeMember("source");
563  }
564 
565 
569  const ReviewSource get_source() const {
570  const Json::Value& storage = Storage("source");
571  return client::JsonValueToCppValueHelper<ReviewSource >(storage);
572  }
573 
583  Json::Value* storage = MutableStorage("source");
584  return client::JsonValueToMutableCppValueHelper<ReviewSource >(storage);
585  }
586 
592  bool has_title() const {
593  return Storage().isMember("title");
594  }
595 
599  void clear_title() {
600  MutableStorage()->removeMember("title");
601  }
602 
603 
607  const StringPiece get_title() const {
608  const Json::Value& v = Storage("title");
609  if (v == Json::Value::null) return StringPiece("");
610  return StringPiece(v.asCString());
611  }
612 
620  void set_title(const StringPiece& value) {
621  *MutableStorage("title") = value.data();
622  }
623 
629  bool has_type() const {
630  return Storage().isMember("type");
631  }
632 
636  void clear_type() {
637  MutableStorage()->removeMember("type");
638  }
639 
640 
644  const StringPiece get_type() const {
645  const Json::Value& v = Storage("type");
646  if (v == Json::Value::null) return StringPiece("");
647  return StringPiece(v.asCString());
648  }
649 
658  void set_type(const StringPiece& value) {
659  *MutableStorage("type") = value.data();
660  }
661 
667  bool has_volume_id() const {
668  return Storage().isMember("volumeId");
669  }
670 
675  MutableStorage()->removeMember("volumeId");
676  }
677 
678 
682  const StringPiece get_volume_id() const {
683  const Json::Value& v = Storage("volumeId");
684  if (v == Json::Value::null) return StringPiece("");
685  return StringPiece(v.asCString());
686  }
687 
695  void set_volume_id(const StringPiece& value) {
696  *MutableStorage("volumeId") = value.data();
697  }
698 
699  private:
700  void operator=(const Review&);
701 }; // Review
702 } // namespace google_books_api
703 #endif // GOOGLE_BOOKS_API_REVIEW_H_
bool has_description() const
Definition: review.h:182
const StringPiece GetTypeName() const
Definition: review.h:90
const StringPiece get_content() const
Definition: review.h:383
void clear_volume_id()
Definition: review.h:674
void clear_type()
Definition: review.h:636
const StringPiece get_rating() const
Definition: review.h:531
void clear_kind()
Definition: review.h:486
void set_display_name(const StringPiece &value)
Definition: review.h:127
const StringPiece get_date() const
Definition: review.h:420
bool has_kind() const
Definition: review.h:479
bool has_extra_description() const
Definition: review.h:219
void set_extra_description(const StringPiece &value)
Definition: review.h:247
ReviewSource mutable_source()
Definition: review.h:582
const StringPiece get_type() const
Definition: review.h:644
bool has_rating() const
Definition: review.h:516
void clear_title()
Definition: review.h:599
const StringPiece get_volume_id() const
Definition: review.h:682
bool has_date() const
Definition: review.h:405
void clear_content()
Definition: review.h:375
void set_description(const StringPiece &value)
Definition: review.h:210
const StringPiece get_display_name() const
Definition: review.h:114
void clear_extra_description()
Definition: review.h:226
void set_full_text_url(const StringPiece &value)
Definition: review.h:470
void clear_display_name()
Definition: review.h:106
bool has_url() const
Definition: review.h:256
bool has_volume_id() const
Definition: review.h:667
void set_kind(const StringPiece &value)
Definition: review.h:507
bool has_full_text_url() const
Definition: review.h:442
bool has_author() const
Definition: review.h:331
void set_rating(const StringPiece &value)
Definition: review.h:545
const StringPiece GetTypeName() const
Definition: review.h:322
Definition: annotation.h:42
const StringPiece get_url() const
Definition: review.h:271
Definition: review.h:50
void clear_date()
Definition: review.h:412
const StringPiece get_description() const
Definition: review.h:197
const ReviewSource get_source() const
Definition: review.h:569
const StringPiece get_full_text_url() const
Definition: review.h:457
void set_url(const StringPiece &value)
Definition: review.h:284
Definition: annotation.cc:44
void clear_full_text_url()
Definition: review.h:449
bool has_content() const
Definition: review.h:368
const StringPiece get_extra_description() const
Definition: review.h:234
const StringPiece GetTypeName() const
Definition: review.h:173
bool has_display_name() const
Definition: review.h:99
void clear_author()
Definition: review.h:338
const StringPiece get_title() const
Definition: review.h:607
void clear_url()
Definition: review.h:263
bool has_title() const
Definition: review.h:592
void clear_description()
Definition: review.h:189
void clear_rating()
Definition: review.h:523
void set_title(const StringPiece &value)
Definition: review.h:620
void set_date(const StringPiece &value)
Definition: review.h:433
void clear_source()
Definition: review.h:561
void set_content(const StringPiece &value)
Definition: review.h:396
void set_volume_id(const StringPiece &value)
Definition: review.h:695
ReviewAuthor mutable_author()
Definition: review.h:358
bool has_source() const
Definition: review.h:554
bool has_type() const
Definition: review.h:629
const ReviewAuthor get_author() const
Definition: review.h:346
void set_type(const StringPiece &value)
Definition: review.h:658
const StringPiece get_kind() const
Definition: review.h:494