books  v1
usersettings.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_USERSETTINGS_H_
31 #define GOOGLE_BOOKS_API_USERSETTINGS_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 Usersettings : public client::JsonCppData {
51  public:
57  class UsersettingsNotesExport : public client::JsonCppData {
58  public:
64  static UsersettingsNotesExport* New();
65 
71  explicit UsersettingsNotesExport(const Json::Value& storage);
72 
78  explicit UsersettingsNotesExport(Json::Value* storage);
79 
83  virtual ~UsersettingsNotesExport();
84 
90  const StringPiece GetTypeName() const {
91  return StringPiece("google_books_api::UsersettingsNotesExport");
92  }
93 
99  bool has_folder_name() const {
100  return Storage().isMember("folderName");
101  }
102 
107  MutableStorage()->removeMember("folderName");
108  }
109 
110 
114  const StringPiece get_folder_name() const {
115  const Json::Value& v = Storage("folderName");
116  if (v == Json::Value::null) return StringPiece("");
117  return StringPiece(v.asCString());
118  }
119 
124  void set_folder_name(const StringPiece& value) {
125  *MutableStorage("folderName") = value.data();
126  }
127 
133  bool has_is_enabled() const {
134  return Storage().isMember("isEnabled");
135  }
136 
141  MutableStorage()->removeMember("isEnabled");
142  }
143 
144 
148  bool get_is_enabled() const {
149  const Json::Value& storage = Storage("isEnabled");
150  return client::JsonValueToCppValueHelper<bool >(storage);
151  }
152 
157  void set_is_enabled(bool value) {
158  client::SetJsonValueFromCppValueHelper<bool >(
159  value, MutableStorage("isEnabled"));
160  }
161 
162  private:
163  void operator=(const UsersettingsNotesExport&);
164  }; // UsersettingsNotesExport
170  class UsersettingsNotification : public client::JsonCppData {
171  public:
177  class UsersettingsNotificationMatchMyInterests : public client::JsonCppData {
178  public:
185 
191  explicit UsersettingsNotificationMatchMyInterests(const Json::Value& storage);
192 
198  explicit UsersettingsNotificationMatchMyInterests(Json::Value* storage);
199 
204 
211  const StringPiece GetTypeName() const {
212  return StringPiece("google_books_api::UsersettingsNotificationMatchMyInterests");
213  }
214 
220  bool has_opted_state() const {
221  return Storage().isMember("opted_state");
222  }
223 
228  MutableStorage()->removeMember("opted_state");
229  }
230 
231 
235  const StringPiece get_opted_state() const {
236  const Json::Value& v = Storage("opted_state");
237  if (v == Json::Value::null) return StringPiece("");
238  return StringPiece(v.asCString());
239  }
240 
245  void set_opted_state(const StringPiece& value) {
246  *MutableStorage("opted_state") = value.data();
247  }
248 
249  private:
250  void operator=(const UsersettingsNotificationMatchMyInterests&);
251  }; // UsersettingsNotificationMatchMyInterests
257  class UsersettingsNotificationMoreFromAuthors : public client::JsonCppData {
258  public:
265 
271  explicit UsersettingsNotificationMoreFromAuthors(const Json::Value& storage);
272 
278  explicit UsersettingsNotificationMoreFromAuthors(Json::Value* storage);
279 
284 
291  const StringPiece GetTypeName() const {
292  return StringPiece("google_books_api::UsersettingsNotificationMoreFromAuthors");
293  }
294 
300  bool has_opted_state() const {
301  return Storage().isMember("opted_state");
302  }
303 
308  MutableStorage()->removeMember("opted_state");
309  }
310 
311 
315  const StringPiece get_opted_state() const {
316  const Json::Value& v = Storage("opted_state");
317  if (v == Json::Value::null) return StringPiece("");
318  return StringPiece(v.asCString());
319  }
320 
325  void set_opted_state(const StringPiece& value) {
326  *MutableStorage("opted_state") = value.data();
327  }
328 
329  private:
330  void operator=(const UsersettingsNotificationMoreFromAuthors&);
331  }; // UsersettingsNotificationMoreFromAuthors
337  class UsersettingsNotificationMoreFromSeries : public client::JsonCppData {
338  public:
345 
351  explicit UsersettingsNotificationMoreFromSeries(const Json::Value& storage);
352 
358  explicit UsersettingsNotificationMoreFromSeries(Json::Value* storage);
359 
364 
371  const StringPiece GetTypeName() const {
372  return StringPiece("google_books_api::UsersettingsNotificationMoreFromSeries");
373  }
374 
380  bool has_opted_state() const {
381  return Storage().isMember("opted_state");
382  }
383 
388  MutableStorage()->removeMember("opted_state");
389  }
390 
391 
395  const StringPiece get_opted_state() const {
396  const Json::Value& v = Storage("opted_state");
397  if (v == Json::Value::null) return StringPiece("");
398  return StringPiece(v.asCString());
399  }
400 
405  void set_opted_state(const StringPiece& value) {
406  *MutableStorage("opted_state") = value.data();
407  }
408 
409  private:
410  void operator=(const UsersettingsNotificationMoreFromSeries&);
411  }; // UsersettingsNotificationMoreFromSeries
417  class UsersettingsNotificationPriceDrop : public client::JsonCppData {
418  public:
424  static UsersettingsNotificationPriceDrop* New();
425 
431  explicit UsersettingsNotificationPriceDrop(const Json::Value& storage);
432 
438  explicit UsersettingsNotificationPriceDrop(Json::Value* storage);
439 
444 
451  const StringPiece GetTypeName() const {
452  return StringPiece("google_books_api::UsersettingsNotificationPriceDrop");
453  }
454 
460  bool has_opted_state() const {
461  return Storage().isMember("opted_state");
462  }
463 
468  MutableStorage()->removeMember("opted_state");
469  }
470 
471 
475  const StringPiece get_opted_state() const {
476  const Json::Value& v = Storage("opted_state");
477  if (v == Json::Value::null) return StringPiece("");
478  return StringPiece(v.asCString());
479  }
480 
485  void set_opted_state(const StringPiece& value) {
486  *MutableStorage("opted_state") = value.data();
487  }
488 
489  private:
490  void operator=(const UsersettingsNotificationPriceDrop&);
491  }; // UsersettingsNotificationPriceDrop
497  class UsersettingsNotificationRewardExpirations : public client::JsonCppData {
498  public:
505 
511  explicit UsersettingsNotificationRewardExpirations(const Json::Value& storage);
512 
518  explicit UsersettingsNotificationRewardExpirations(Json::Value* storage);
519 
524 
531  const StringPiece GetTypeName() const {
532  return StringPiece("google_books_api::UsersettingsNotificationRewardExpirations");
533  }
534 
540  bool has_opted_state() const {
541  return Storage().isMember("opted_state");
542  }
543 
548  MutableStorage()->removeMember("opted_state");
549  }
550 
551 
555  const StringPiece get_opted_state() const {
556  const Json::Value& v = Storage("opted_state");
557  if (v == Json::Value::null) return StringPiece("");
558  return StringPiece(v.asCString());
559  }
560 
565  void set_opted_state(const StringPiece& value) {
566  *MutableStorage("opted_state") = value.data();
567  }
568 
569  private:
570  void operator=(const UsersettingsNotificationRewardExpirations&);
571  }; // UsersettingsNotificationRewardExpirations
577  static UsersettingsNotification* New();
578 
584  explicit UsersettingsNotification(const Json::Value& storage);
585 
591  explicit UsersettingsNotification(Json::Value* storage);
592 
596  virtual ~UsersettingsNotification();
597 
603  const StringPiece GetTypeName() const {
604  return StringPiece("google_books_api::UsersettingsNotification");
605  }
606 
612  bool has_match_my_interests() const {
613  return Storage().isMember("matchMyInterests");
614  }
615 
620  MutableStorage()->removeMember("matchMyInterests");
621  }
622 
623 
629  const Json::Value& storage = Storage("matchMyInterests");
630  return client::JsonValueToCppValueHelper<UsersettingsNotificationMatchMyInterests >(storage);
631  }
632 
639  Json::Value* storage = MutableStorage("matchMyInterests");
640  return client::JsonValueToMutableCppValueHelper<UsersettingsNotificationMatchMyInterests >(storage);
641  }
642 
648  bool has_more_from_authors() const {
649  return Storage().isMember("moreFromAuthors");
650  }
651 
656  MutableStorage()->removeMember("moreFromAuthors");
657  }
658 
659 
665  const Json::Value& storage = Storage("moreFromAuthors");
666  return client::JsonValueToCppValueHelper<UsersettingsNotificationMoreFromAuthors >(storage);
667  }
668 
675  Json::Value* storage = MutableStorage("moreFromAuthors");
676  return client::JsonValueToMutableCppValueHelper<UsersettingsNotificationMoreFromAuthors >(storage);
677  }
678 
684  bool has_more_from_series() const {
685  return Storage().isMember("moreFromSeries");
686  }
687 
692  MutableStorage()->removeMember("moreFromSeries");
693  }
694 
695 
701  const Json::Value& storage = Storage("moreFromSeries");
702  return client::JsonValueToCppValueHelper<UsersettingsNotificationMoreFromSeries >(storage);
703  }
704 
711  Json::Value* storage = MutableStorage("moreFromSeries");
712  return client::JsonValueToMutableCppValueHelper<UsersettingsNotificationMoreFromSeries >(storage);
713  }
714 
720  bool has_price_drop() const {
721  return Storage().isMember("priceDrop");
722  }
723 
728  MutableStorage()->removeMember("priceDrop");
729  }
730 
731 
736  const Json::Value& storage = Storage("priceDrop");
737  return client::JsonValueToCppValueHelper<UsersettingsNotificationPriceDrop >(storage);
738  }
739 
746  Json::Value* storage = MutableStorage("priceDrop");
747  return client::JsonValueToMutableCppValueHelper<UsersettingsNotificationPriceDrop >(storage);
748  }
749 
755  bool has_reward_expirations() const {
756  return Storage().isMember("rewardExpirations");
757  }
758 
763  MutableStorage()->removeMember("rewardExpirations");
764  }
765 
766 
772  const Json::Value& storage = Storage("rewardExpirations");
773  return client::JsonValueToCppValueHelper<UsersettingsNotificationRewardExpirations >(storage);
774  }
775 
782  Json::Value* storage = MutableStorage("rewardExpirations");
783  return client::JsonValueToMutableCppValueHelper<UsersettingsNotificationRewardExpirations >(storage);
784  }
785 
786  private:
787  void operator=(const UsersettingsNotification&);
788  }; // UsersettingsNotification
794  static Usersettings* New();
795 
801  explicit Usersettings(const Json::Value& storage);
802 
808  explicit Usersettings(Json::Value* storage);
809 
813  virtual ~Usersettings();
814 
820  const StringPiece GetTypeName() const {
821  return StringPiece("google_books_api::Usersettings");
822  }
823 
829  bool has_kind() const {
830  return Storage().isMember("kind");
831  }
832 
836  void clear_kind() {
837  MutableStorage()->removeMember("kind");
838  }
839 
840 
844  const StringPiece get_kind() const {
845  const Json::Value& v = Storage("kind");
846  if (v == Json::Value::null) return StringPiece("");
847  return StringPiece(v.asCString());
848  }
849 
857  void set_kind(const StringPiece& value) {
858  *MutableStorage("kind") = value.data();
859  }
860 
866  bool has_notes_export() const {
867  return Storage().isMember("notesExport");
868  }
869 
874  MutableStorage()->removeMember("notesExport");
875  }
876 
877 
882  const Json::Value& storage = Storage("notesExport");
883  return client::JsonValueToCppValueHelper<UsersettingsNotesExport >(storage);
884  }
885 
895  Json::Value* storage = MutableStorage("notesExport");
896  return client::JsonValueToMutableCppValueHelper<UsersettingsNotesExport >(storage);
897  }
898 
904  bool has_notification() const {
905  return Storage().isMember("notification");
906  }
907 
912  MutableStorage()->removeMember("notification");
913  }
914 
915 
920  const Json::Value& storage = Storage("notification");
921  return client::JsonValueToCppValueHelper<UsersettingsNotification >(storage);
922  }
923 
930  Json::Value* storage = MutableStorage("notification");
931  return client::JsonValueToMutableCppValueHelper<UsersettingsNotification >(storage);
932  }
933 
934  private:
935  void operator=(const Usersettings&);
936 }; // Usersettings
937 } // namespace google_books_api
938 #endif // GOOGLE_BOOKS_API_USERSETTINGS_H_
bool has_more_from_authors() const
Definition: usersettings.h:648
void clear_notification()
Definition: usersettings.h:911
const UsersettingsNotification get_notification() const
Definition: usersettings.h:919
void clear_kind()
Definition: usersettings.h:836
UsersettingsNotificationMatchMyInterests mutable_matchMyInterests()
Definition: usersettings.h:638
const UsersettingsNotificationMoreFromAuthors get_more_from_authors() const
Definition: usersettings.h:664
bool has_price_drop() const
Definition: usersettings.h:720
const UsersettingsNotesExport get_notes_export() const
Definition: usersettings.h:881
void set_kind(const StringPiece &value)
Definition: usersettings.h:857
void clear_reward_expirations()
Definition: usersettings.h:762
const StringPiece GetTypeName() const
Definition: usersettings.h:820
const UsersettingsNotificationMoreFromSeries get_more_from_series() const
Definition: usersettings.h:700
const StringPiece GetTypeName() const
Definition: usersettings.h:90
const StringPiece get_folder_name() const
Definition: usersettings.h:114
const UsersettingsNotificationPriceDrop get_price_drop() const
Definition: usersettings.h:735
void set_opted_state(const StringPiece &value)
Definition: usersettings.h:325
UsersettingsNotesExport mutable_notesExport()
Definition: usersettings.h:894
void clear_folder_name()
Definition: usersettings.h:106
const StringPiece GetTypeName() const
Definition: usersettings.h:603
bool has_match_my_interests() const
Definition: usersettings.h:612
bool has_notes_export() const
Definition: usersettings.h:866
bool has_reward_expirations() const
Definition: usersettings.h:755
bool has_more_from_series() const
Definition: usersettings.h:684
UsersettingsNotification mutable_notification()
Definition: usersettings.h:929
void clear_price_drop()
Definition: usersettings.h:727
const StringPiece get_kind() const
Definition: usersettings.h:844
void set_is_enabled(bool value)
Definition: usersettings.h:157
void set_folder_name(const StringPiece &value)
Definition: usersettings.h:124
void set_opted_state(const StringPiece &value)
Definition: usersettings.h:485
Definition: usersettings.h:50
Definition: annotation.h:42
void set_opted_state(const StringPiece &value)
Definition: usersettings.h:405
const UsersettingsNotificationRewardExpirations get_reward_expirations() const
Definition: usersettings.h:771
Definition: annotation.cc:44
void clear_more_from_authors()
Definition: usersettings.h:655
void clear_notes_export()
Definition: usersettings.h:873
UsersettingsNotificationRewardExpirations mutable_rewardExpirations()
Definition: usersettings.h:781
bool has_kind() const
Definition: usersettings.h:829
void clear_more_from_series()
Definition: usersettings.h:691
UsersettingsNotificationPriceDrop mutable_priceDrop()
Definition: usersettings.h:745
bool get_is_enabled() const
Definition: usersettings.h:148
bool has_notification() const
Definition: usersettings.h:904
UsersettingsNotificationMoreFromAuthors mutable_moreFromAuthors()
Definition: usersettings.h:674
bool has_folder_name() const
Definition: usersettings.h:99
UsersettingsNotificationMoreFromSeries mutable_moreFromSeries()
Definition: usersettings.h:710
bool has_is_enabled() const
Definition: usersettings.h:133
void clear_is_enabled()
Definition: usersettings.h:140
void clear_match_my_interests()
Definition: usersettings.h:619
const UsersettingsNotificationMatchMyInterests get_match_my_interests() const
Definition: usersettings.h:628