books  v1
notification.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_NOTIFICATION_H_
31 #define GOOGLE_BOOKS_API_NOTIFICATION_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/strings/stringpiece.h"
38 
39 namespace Json {
40 class Value;
41 } // namespace Json
42 
43 namespace google_books_api {
44 using namespace googleapis;
45 
51 class Notification : public client::JsonCppData {
52  public:
58  static Notification* New();
59 
65  explicit Notification(const Json::Value& storage);
66 
72  explicit Notification(Json::Value* storage);
73 
77  virtual ~Notification();
78 
84  const StringPiece GetTypeName() const {
85  return StringPiece("google_books_api::Notification");
86  }
87 
93  bool has_body() const {
94  return Storage().isMember("body");
95  }
96 
100  void clear_body() {
101  MutableStorage()->removeMember("body");
102  }
103 
104 
108  const StringPiece get_body() const {
109  const Json::Value& v = Storage("body");
110  if (v == Json::Value::null) return StringPiece("");
111  return StringPiece(v.asCString());
112  }
113 
118  void set_body(const StringPiece& value) {
119  *MutableStorage("body") = value.data();
120  }
121 
127  bool has_crm_experiment_ids() const {
128  return Storage().isMember("crmExperimentIds");
129  }
130 
135  MutableStorage()->removeMember("crmExperimentIds");
136  }
137 
138 
143  const client::JsonCppArray<int64 > get_crm_experiment_ids() const {
144  const Json::Value& storage = Storage("crmExperimentIds");
145  return client::JsonValueToCppValueHelper<client::JsonCppArray<int64 > >(storage);
146  }
147 
156  client::JsonCppArray<int64 > mutable_crmExperimentIds() {
157  Json::Value* storage = MutableStorage("crmExperimentIds");
158  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<int64 > >(storage);
159  }
160 
166  bool has_doc_id() const {
167  return Storage().isMember("doc_id");
168  }
169 
173  void clear_doc_id() {
174  MutableStorage()->removeMember("doc_id");
175  }
176 
177 
181  const StringPiece get_doc_id() const {
182  const Json::Value& v = Storage("doc_id");
183  if (v == Json::Value::null) return StringPiece("");
184  return StringPiece(v.asCString());
185  }
186 
191  void set_doc_id(const StringPiece& value) {
192  *MutableStorage("doc_id") = value.data();
193  }
194 
200  bool has_doc_type() const {
201  return Storage().isMember("doc_type");
202  }
203 
207  void clear_doc_type() {
208  MutableStorage()->removeMember("doc_type");
209  }
210 
211 
215  const StringPiece get_doc_type() const {
216  const Json::Value& v = Storage("doc_type");
217  if (v == Json::Value::null) return StringPiece("");
218  return StringPiece(v.asCString());
219  }
220 
225  void set_doc_type(const StringPiece& value) {
226  *MutableStorage("doc_type") = value.data();
227  }
228 
236  return Storage().isMember("dont_show_notification");
237  }
238 
243  MutableStorage()->removeMember("dont_show_notification");
244  }
245 
246 
251  const Json::Value& storage = Storage("dont_show_notification");
252  return client::JsonValueToCppValueHelper<bool >(storage);
253  }
254 
259  void set_dont_show_notification(bool value) {
260  client::SetJsonValueFromCppValueHelper<bool >(
261  value, MutableStorage("dont_show_notification"));
262  }
263 
269  bool has_icon_url() const {
270  return Storage().isMember("iconUrl");
271  }
272 
276  void clear_icon_url() {
277  MutableStorage()->removeMember("iconUrl");
278  }
279 
280 
284  const StringPiece get_icon_url() const {
285  const Json::Value& v = Storage("iconUrl");
286  if (v == Json::Value::null) return StringPiece("");
287  return StringPiece(v.asCString());
288  }
289 
294  void set_icon_url(const StringPiece& value) {
295  *MutableStorage("iconUrl") = value.data();
296  }
297 
303  bool has_is_document_mature() const {
304  return Storage().isMember("is_document_mature");
305  }
306 
311  MutableStorage()->removeMember("is_document_mature");
312  }
313 
314 
318  bool get_is_document_mature() const {
319  const Json::Value& storage = Storage("is_document_mature");
320  return client::JsonValueToCppValueHelper<bool >(storage);
321  }
322 
327  void set_is_document_mature(bool value) {
328  client::SetJsonValueFromCppValueHelper<bool >(
329  value, MutableStorage("is_document_mature"));
330  }
331 
337  bool has_kind() const {
338  return Storage().isMember("kind");
339  }
340 
344  void clear_kind() {
345  MutableStorage()->removeMember("kind");
346  }
347 
348 
352  const StringPiece get_kind() const {
353  const Json::Value& v = Storage("kind");
354  if (v == Json::Value::null) return StringPiece("");
355  return StringPiece(v.asCString());
356  }
357 
365  void set_kind(const StringPiece& value) {
366  *MutableStorage("kind") = value.data();
367  }
368 
374  bool has_notification_group() const {
375  return Storage().isMember("notificationGroup");
376  }
377 
382  MutableStorage()->removeMember("notificationGroup");
383  }
384 
385 
389  const StringPiece get_notification_group() const {
390  const Json::Value& v = Storage("notificationGroup");
391  if (v == Json::Value::null) return StringPiece("");
392  return StringPiece(v.asCString());
393  }
394 
399  void set_notification_group(const StringPiece& value) {
400  *MutableStorage("notificationGroup") = value.data();
401  }
402 
408  bool has_notification_type() const {
409  return Storage().isMember("notification_type");
410  }
411 
416  MutableStorage()->removeMember("notification_type");
417  }
418 
419 
423  const StringPiece get_notification_type() const {
424  const Json::Value& v = Storage("notification_type");
425  if (v == Json::Value::null) return StringPiece("");
426  return StringPiece(v.asCString());
427  }
428 
433  void set_notification_type(const StringPiece& value) {
434  *MutableStorage("notification_type") = value.data();
435  }
436 
442  bool has_pcampaign_id() const {
443  return Storage().isMember("pcampaign_id");
444  }
445 
450  MutableStorage()->removeMember("pcampaign_id");
451  }
452 
453 
457  const StringPiece get_pcampaign_id() const {
458  const Json::Value& v = Storage("pcampaign_id");
459  if (v == Json::Value::null) return StringPiece("");
460  return StringPiece(v.asCString());
461  }
462 
467  void set_pcampaign_id(const StringPiece& value) {
468  *MutableStorage("pcampaign_id") = value.data();
469  }
470 
476  bool has_reason() const {
477  return Storage().isMember("reason");
478  }
479 
483  void clear_reason() {
484  MutableStorage()->removeMember("reason");
485  }
486 
487 
491  const StringPiece get_reason() const {
492  const Json::Value& v = Storage("reason");
493  if (v == Json::Value::null) return StringPiece("");
494  return StringPiece(v.asCString());
495  }
496 
501  void set_reason(const StringPiece& value) {
502  *MutableStorage("reason") = value.data();
503  }
504 
513  return Storage().isMember("show_notification_settings_action");
514  }
515 
520  MutableStorage()->removeMember("show_notification_settings_action");
521  }
522 
523 
529  const Json::Value& storage = Storage("show_notification_settings_action");
530  return client::JsonValueToCppValueHelper<bool >(storage);
531  }
532 
538  client::SetJsonValueFromCppValueHelper<bool >(
539  value, MutableStorage("show_notification_settings_action"));
540  }
541 
547  bool has_target_url() const {
548  return Storage().isMember("targetUrl");
549  }
550 
555  MutableStorage()->removeMember("targetUrl");
556  }
557 
558 
562  const StringPiece get_target_url() const {
563  const Json::Value& v = Storage("targetUrl");
564  if (v == Json::Value::null) return StringPiece("");
565  return StringPiece(v.asCString());
566  }
567 
572  void set_target_url(const StringPiece& value) {
573  *MutableStorage("targetUrl") = value.data();
574  }
575 
581  bool has_time_to_expire_ms() const {
582  return Storage().isMember("timeToExpireMs");
583  }
584 
589  MutableStorage()->removeMember("timeToExpireMs");
590  }
591 
592 
596  int64 get_time_to_expire_ms() const {
597  const Json::Value& storage = Storage("timeToExpireMs");
598  return client::JsonValueToCppValueHelper<int64 >(storage);
599  }
600 
605  void set_time_to_expire_ms(int64 value) {
606  client::SetJsonValueFromCppValueHelper<int64 >(
607  value, MutableStorage("timeToExpireMs"));
608  }
609 
615  bool has_title() const {
616  return Storage().isMember("title");
617  }
618 
622  void clear_title() {
623  MutableStorage()->removeMember("title");
624  }
625 
626 
630  const StringPiece get_title() const {
631  const Json::Value& v = Storage("title");
632  if (v == Json::Value::null) return StringPiece("");
633  return StringPiece(v.asCString());
634  }
635 
640  void set_title(const StringPiece& value) {
641  *MutableStorage("title") = value.data();
642  }
643 
644  private:
645  void operator=(const Notification&);
646 }; // Notification
647 } // namespace google_books_api
648 #endif // GOOGLE_BOOKS_API_NOTIFICATION_H_
void clear_is_document_mature()
Definition: notification.h:310
bool has_crm_experiment_ids() const
Definition: notification.h:127
void clear_pcampaign_id()
Definition: notification.h:449
const StringPiece get_reason() const
Definition: notification.h:491
bool has_body() const
Definition: notification.h:93
bool has_is_document_mature() const
Definition: notification.h:303
void clear_title()
Definition: notification.h:622
void clear_reason()
Definition: notification.h:483
bool has_notification_group() const
Definition: notification.h:374
void set_notification_type(const StringPiece &value)
Definition: notification.h:433
void set_show_notification_settings_action(bool value)
Definition: notification.h:537
void clear_show_notification_settings_action()
Definition: notification.h:519
bool get_show_notification_settings_action() const
Definition: notification.h:528
const StringPiece get_target_url() const
Definition: notification.h:562
const StringPiece get_doc_id() const
Definition: notification.h:181
void clear_notification_group()
Definition: notification.h:381
void set_icon_url(const StringPiece &value)
Definition: notification.h:294
const StringPiece get_kind() const
Definition: notification.h:352
void set_kind(const StringPiece &value)
Definition: notification.h:365
const StringPiece GetTypeName() const
Definition: notification.h:84
void set_title(const StringPiece &value)
Definition: notification.h:640
bool has_doc_type() const
Definition: notification.h:200
void set_notification_group(const StringPiece &value)
Definition: notification.h:399
void clear_dont_show_notification()
Definition: notification.h:242
bool has_time_to_expire_ms() const
Definition: notification.h:581
void clear_time_to_expire_ms()
Definition: notification.h:588
void set_dont_show_notification(bool value)
Definition: notification.h:259
void set_body(const StringPiece &value)
Definition: notification.h:118
const StringPiece get_doc_type() const
Definition: notification.h:215
bool get_dont_show_notification() const
Definition: notification.h:250
void clear_doc_type()
Definition: notification.h:207
bool has_notification_type() const
Definition: notification.h:408
void clear_kind()
Definition: notification.h:344
bool has_pcampaign_id() const
Definition: notification.h:442
Definition: annotation.h:42
void clear_target_url()
Definition: notification.h:554
const StringPiece get_body() const
Definition: notification.h:108
void set_pcampaign_id(const StringPiece &value)
Definition: notification.h:467
void set_time_to_expire_ms(int64 value)
Definition: notification.h:605
void clear_notification_type()
Definition: notification.h:415
const StringPiece get_notification_type() const
Definition: notification.h:423
int64 get_time_to_expire_ms() const
Definition: notification.h:596
void set_doc_id(const StringPiece &value)
Definition: notification.h:191
bool has_reason() const
Definition: notification.h:476
Definition: annotation.cc:44
bool has_title() const
Definition: notification.h:615
const client::JsonCppArray< int64 > get_crm_experiment_ids() const
Definition: notification.h:143
bool has_target_url() const
Definition: notification.h:547
bool has_icon_url() const
Definition: notification.h:269
const StringPiece get_icon_url() const
Definition: notification.h:284
const StringPiece get_pcampaign_id() const
Definition: notification.h:457
void set_reason(const StringPiece &value)
Definition: notification.h:501
void clear_body()
Definition: notification.h:100
bool has_doc_id() const
Definition: notification.h:166
const StringPiece get_title() const
Definition: notification.h:630
void clear_doc_id()
Definition: notification.h:173
void clear_icon_url()
Definition: notification.h:276
bool has_kind() const
Definition: notification.h:337
Definition: notification.h:51
void clear_crm_experiment_ids()
Definition: notification.h:134
bool has_dont_show_notification() const
Definition: notification.h:235
bool has_show_notification_settings_action() const
Definition: notification.h:512
void set_target_url(const StringPiece &value)
Definition: notification.h:572
client::JsonCppArray< int64 > mutable_crmExperimentIds()
Definition: notification.h:156
void set_doc_type(const StringPiece &value)
Definition: notification.h:225
const StringPiece get_notification_group() const
Definition: notification.h:389
void set_is_document_mature(bool value)
Definition: notification.h:327
bool get_is_document_mature() const
Definition: notification.h:318