books  v1
volumeannotation.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_VOLUMEANNOTATION_H_
31 #define GOOGLE_BOOKS_API_VOLUMEANNOTATION_H_
32 
33 #include <string>
34 #include "googleapis/base/macros.h"
35 #include "googleapis/client/data/jsoncpp_data.h"
36 #include "googleapis/client/util/date_time.h"
37 #include "googleapis/strings/stringpiece.h"
38 
39 #include "google/books_api/books_annotations_range.h"
40 
41 namespace Json {
42 class Value;
43 } // namespace Json
44 
45 namespace google_books_api {
46 using namespace googleapis;
47 
53 class Volumeannotation : public client::JsonCppData {
54  public:
60  class VolumeannotationContentRanges : public client::JsonCppData {
61  public:
67  static VolumeannotationContentRanges* New();
68 
74  explicit VolumeannotationContentRanges(const Json::Value& storage);
75 
81  explicit VolumeannotationContentRanges(Json::Value* storage);
82 
87 
93  const StringPiece GetTypeName() const {
94  return StringPiece("google_books_api::VolumeannotationContentRanges");
95  }
96 
102  bool has_cfi_range() const {
103  return Storage().isMember("cfiRange");
104  }
105 
110  MutableStorage()->removeMember("cfiRange");
111  }
112 
113 
117  const BooksAnnotationsRange get_cfi_range() const;
118 
127  BooksAnnotationsRange mutable_cfiRange();
128 
134  bool has_content_version() const {
135  return Storage().isMember("contentVersion");
136  }
137 
142  MutableStorage()->removeMember("contentVersion");
143  }
144 
145 
149  const StringPiece get_content_version() const {
150  const Json::Value& v = Storage("contentVersion");
151  if (v == Json::Value::null) return StringPiece("");
152  return StringPiece(v.asCString());
153  }
154 
162  void set_content_version(const StringPiece& value) {
163  *MutableStorage("contentVersion") = value.data();
164  }
165 
171  bool has_gb_image_range() const {
172  return Storage().isMember("gbImageRange");
173  }
174 
179  MutableStorage()->removeMember("gbImageRange");
180  }
181 
182 
187  const BooksAnnotationsRange get_gb_image_range() const;
188 
197  BooksAnnotationsRange mutable_gbImageRange();
198 
204  bool has_gb_text_range() const {
205  return Storage().isMember("gbTextRange");
206  }
207 
212  MutableStorage()->removeMember("gbTextRange");
213  }
214 
215 
219  const BooksAnnotationsRange get_gb_text_range() const;
220 
229  BooksAnnotationsRange mutable_gbTextRange();
230 
231  private:
232  void operator=(const VolumeannotationContentRanges&);
233  }; // VolumeannotationContentRanges
239  static Volumeannotation* New();
240 
246  explicit Volumeannotation(const Json::Value& storage);
247 
253  explicit Volumeannotation(Json::Value* storage);
254 
258  virtual ~Volumeannotation();
259 
265  const StringPiece GetTypeName() const {
266  return StringPiece("google_books_api::Volumeannotation");
267  }
268 
274  bool has_annotation_data_id() const {
275  return Storage().isMember("annotationDataId");
276  }
277 
282  MutableStorage()->removeMember("annotationDataId");
283  }
284 
285 
289  const StringPiece get_annotation_data_id() const {
290  const Json::Value& v = Storage("annotationDataId");
291  if (v == Json::Value::null) return StringPiece("");
292  return StringPiece(v.asCString());
293  }
294 
302  void set_annotation_data_id(const StringPiece& value) {
303  *MutableStorage("annotationDataId") = value.data();
304  }
305 
312  return Storage().isMember("annotationDataLink");
313  }
314 
319  MutableStorage()->removeMember("annotationDataLink");
320  }
321 
322 
326  const StringPiece get_annotation_data_link() const {
327  const Json::Value& v = Storage("annotationDataLink");
328  if (v == Json::Value::null) return StringPiece("");
329  return StringPiece(v.asCString());
330  }
331 
339  void set_annotation_data_link(const StringPiece& value) {
340  *MutableStorage("annotationDataLink") = value.data();
341  }
342 
348  bool has_annotation_type() const {
349  return Storage().isMember("annotationType");
350  }
351 
356  MutableStorage()->removeMember("annotationType");
357  }
358 
359 
363  const StringPiece get_annotation_type() const {
364  const Json::Value& v = Storage("annotationType");
365  if (v == Json::Value::null) return StringPiece("");
366  return StringPiece(v.asCString());
367  }
368 
376  void set_annotation_type(const StringPiece& value) {
377  *MutableStorage("annotationType") = value.data();
378  }
379 
385  bool has_content_ranges() const {
386  return Storage().isMember("contentRanges");
387  }
388 
393  MutableStorage()->removeMember("contentRanges");
394  }
395 
396 
401  const Json::Value& storage = Storage("contentRanges");
402  return client::JsonValueToCppValueHelper<VolumeannotationContentRanges >(storage);
403  }
404 
414  Json::Value* storage = MutableStorage("contentRanges");
415  return client::JsonValueToMutableCppValueHelper<VolumeannotationContentRanges >(storage);
416  }
417 
423  bool has_data() const {
424  return Storage().isMember("data");
425  }
426 
430  void clear_data() {
431  MutableStorage()->removeMember("data");
432  }
433 
434 
438  const StringPiece get_data() const {
439  const Json::Value& v = Storage("data");
440  if (v == Json::Value::null) return StringPiece("");
441  return StringPiece(v.asCString());
442  }
443 
451  void set_data(const StringPiece& value) {
452  *MutableStorage("data") = value.data();
453  }
454 
460  bool has_deleted() const {
461  return Storage().isMember("deleted");
462  }
463 
467  void clear_deleted() {
468  MutableStorage()->removeMember("deleted");
469  }
470 
471 
475  bool get_deleted() const {
476  const Json::Value& storage = Storage("deleted");
477  return client::JsonValueToCppValueHelper<bool >(storage);
478  }
479 
487  void set_deleted(bool value) {
488  client::SetJsonValueFromCppValueHelper<bool >(
489  value, MutableStorage("deleted"));
490  }
491 
497  bool has_id() const {
498  return Storage().isMember("id");
499  }
500 
504  void clear_id() {
505  MutableStorage()->removeMember("id");
506  }
507 
508 
512  const StringPiece get_id() const {
513  const Json::Value& v = Storage("id");
514  if (v == Json::Value::null) return StringPiece("");
515  return StringPiece(v.asCString());
516  }
517 
525  void set_id(const StringPiece& value) {
526  *MutableStorage("id") = value.data();
527  }
528 
534  bool has_kind() const {
535  return Storage().isMember("kind");
536  }
537 
541  void clear_kind() {
542  MutableStorage()->removeMember("kind");
543  }
544 
545 
549  const StringPiece get_kind() const {
550  const Json::Value& v = Storage("kind");
551  if (v == Json::Value::null) return StringPiece("");
552  return StringPiece(v.asCString());
553  }
554 
562  void set_kind(const StringPiece& value) {
563  *MutableStorage("kind") = value.data();
564  }
565 
571  bool has_layer_id() const {
572  return Storage().isMember("layerId");
573  }
574 
578  void clear_layer_id() {
579  MutableStorage()->removeMember("layerId");
580  }
581 
582 
586  const StringPiece get_layer_id() const {
587  const Json::Value& v = Storage("layerId");
588  if (v == Json::Value::null) return StringPiece("");
589  return StringPiece(v.asCString());
590  }
591 
599  void set_layer_id(const StringPiece& value) {
600  *MutableStorage("layerId") = value.data();
601  }
602 
608  bool has_page_ids() const {
609  return Storage().isMember("pageIds");
610  }
611 
615  void clear_page_ids() {
616  MutableStorage()->removeMember("pageIds");
617  }
618 
619 
623  const client::JsonCppArray<string > get_page_ids() const {
624  const Json::Value& storage = Storage("pageIds");
625  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
626  }
627 
635  client::JsonCppArray<string > mutable_pageIds() {
636  Json::Value* storage = MutableStorage("pageIds");
637  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
638  }
639 
645  bool has_selected_text() const {
646  return Storage().isMember("selectedText");
647  }
648 
653  MutableStorage()->removeMember("selectedText");
654  }
655 
656 
660  const StringPiece get_selected_text() const {
661  const Json::Value& v = Storage("selectedText");
662  if (v == Json::Value::null) return StringPiece("");
663  return StringPiece(v.asCString());
664  }
665 
673  void set_selected_text(const StringPiece& value) {
674  *MutableStorage("selectedText") = value.data();
675  }
676 
682  bool has_self_link() const {
683  return Storage().isMember("selfLink");
684  }
685 
690  MutableStorage()->removeMember("selfLink");
691  }
692 
693 
697  const StringPiece get_self_link() const {
698  const Json::Value& v = Storage("selfLink");
699  if (v == Json::Value::null) return StringPiece("");
700  return StringPiece(v.asCString());
701  }
702 
710  void set_self_link(const StringPiece& value) {
711  *MutableStorage("selfLink") = value.data();
712  }
713 
719  bool has_updated() const {
720  return Storage().isMember("updated");
721  }
722 
726  void clear_updated() {
727  MutableStorage()->removeMember("updated");
728  }
729 
730 
734  client::DateTime get_updated() const {
735  const Json::Value& storage = Storage("updated");
736  return client::JsonValueToCppValueHelper<client::DateTime >(storage);
737  }
738 
747  void set_updated(client::DateTime value) {
748  client::SetJsonValueFromCppValueHelper<client::DateTime >(
749  value, MutableStorage("updated"));
750  }
751 
757  bool has_volume_id() const {
758  return Storage().isMember("volumeId");
759  }
760 
765  MutableStorage()->removeMember("volumeId");
766  }
767 
768 
772  const StringPiece get_volume_id() const {
773  const Json::Value& v = Storage("volumeId");
774  if (v == Json::Value::null) return StringPiece("");
775  return StringPiece(v.asCString());
776  }
777 
785  void set_volume_id(const StringPiece& value) {
786  *MutableStorage("volumeId") = value.data();
787  }
788 
789  private:
790  void operator=(const Volumeannotation&);
791 }; // Volumeannotation
792 } // namespace google_books_api
793 #endif // GOOGLE_BOOKS_API_VOLUMEANNOTATION_H_
bool has_content_version() const
Definition: volumeannotation.h:134
const StringPiece get_data() const
Definition: volumeannotation.h:438
bool has_selected_text() const
Definition: volumeannotation.h:645
void set_id(const StringPiece &value)
Definition: volumeannotation.h:525
void clear_annotation_data_link()
Definition: volumeannotation.h:318
void clear_selected_text()
Definition: volumeannotation.h:652
bool has_gb_image_range() const
Definition: volumeannotation.h:171
void clear_id()
Definition: volumeannotation.h:504
void clear_data()
Definition: volumeannotation.h:430
void set_selected_text(const StringPiece &value)
Definition: volumeannotation.h:673
client::JsonCppArray< string > mutable_pageIds()
Definition: volumeannotation.h:635
void clear_updated()
Definition: volumeannotation.h:726
const StringPiece get_layer_id() const
Definition: volumeannotation.h:586
void set_annotation_type(const StringPiece &value)
Definition: volumeannotation.h:376
void set_layer_id(const StringPiece &value)
Definition: volumeannotation.h:599
void clear_cfi_range()
Definition: volumeannotation.h:109
bool has_cfi_range() const
Definition: volumeannotation.h:102
bool has_layer_id() const
Definition: volumeannotation.h:571
void set_annotation_data_id(const StringPiece &value)
Definition: volumeannotation.h:302
bool has_kind() const
Definition: volumeannotation.h:534
bool has_deleted() const
Definition: volumeannotation.h:460
void set_self_link(const StringPiece &value)
Definition: volumeannotation.h:710
const StringPiece GetTypeName() const
Definition: volumeannotation.h:265
client::DateTime get_updated() const
Definition: volumeannotation.h:734
const StringPiece get_kind() const
Definition: volumeannotation.h:549
void set_deleted(bool value)
Definition: volumeannotation.h:487
bool has_annotation_data_link() const
Definition: volumeannotation.h:311
const StringPiece get_content_version() const
Definition: volumeannotation.h:149
Definition: books_annotations_range.h:50
void clear_deleted()
Definition: volumeannotation.h:467
void clear_layer_id()
Definition: volumeannotation.h:578
void set_data(const StringPiece &value)
Definition: volumeannotation.h:451
bool get_deleted() const
Definition: volumeannotation.h:475
bool has_volume_id() const
Definition: volumeannotation.h:757
bool has_self_link() const
Definition: volumeannotation.h:682
bool has_annotation_data_id() const
Definition: volumeannotation.h:274
const VolumeannotationContentRanges get_content_ranges() const
Definition: volumeannotation.h:400
void clear_gb_text_range()
Definition: volumeannotation.h:211
Definition: annotation.h:42
void clear_kind()
Definition: volumeannotation.h:541
VolumeannotationContentRanges mutable_contentRanges()
Definition: volumeannotation.h:413
const client::JsonCppArray< string > get_page_ids() const
Definition: volumeannotation.h:623
void clear_annotation_type()
Definition: volumeannotation.h:355
bool has_content_ranges() const
Definition: volumeannotation.h:385
Definition: volumeannotation.h:53
void clear_content_version()
Definition: volumeannotation.h:141
void clear_annotation_data_id()
Definition: volumeannotation.h:281
bool has_gb_text_range() const
Definition: volumeannotation.h:204
bool has_id() const
Definition: volumeannotation.h:497
Definition: annotation.cc:44
const StringPiece GetTypeName() const
Definition: volumeannotation.h:93
void set_content_version(const StringPiece &value)
Definition: volumeannotation.h:162
const StringPiece get_annotation_data_link() const
Definition: volumeannotation.h:326
const StringPiece get_annotation_data_id() const
Definition: volumeannotation.h:289
const StringPiece get_id() const
Definition: volumeannotation.h:512
void clear_volume_id()
Definition: volumeannotation.h:764
void clear_content_ranges()
Definition: volumeannotation.h:392
void set_kind(const StringPiece &value)
Definition: volumeannotation.h:562
void set_updated(client::DateTime value)
Definition: volumeannotation.h:747
const StringPiece get_annotation_type() const
Definition: volumeannotation.h:363
bool has_page_ids() const
Definition: volumeannotation.h:608
void clear_self_link()
Definition: volumeannotation.h:689
void set_annotation_data_link(const StringPiece &value)
Definition: volumeannotation.h:339
const StringPiece get_selected_text() const
Definition: volumeannotation.h:660
void clear_gb_image_range()
Definition: volumeannotation.h:178
void set_volume_id(const StringPiece &value)
Definition: volumeannotation.h:785
void clear_page_ids()
Definition: volumeannotation.h:615
bool has_data() const
Definition: volumeannotation.h:423
bool has_updated() const
Definition: volumeannotation.h:719
const StringPiece get_volume_id() const
Definition: volumeannotation.h:772
bool has_annotation_type() const
Definition: volumeannotation.h:348
const StringPiece get_self_link() const
Definition: volumeannotation.h:697