blogger  v3
comment.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-02-15, 10:57:39 UTC
18 // C++ generator version: 0.1.4
19 
20 // ----------------------------------------------------------------------------
21 // NOTE: This file is generated from Google APIs Discovery Service.
22 // Service:
23 // Blogger API (blogger/v3)
24 // Generated from:
25 // Version: v3
26 // Revision: 69
27 // Generated by:
28 // Tool: google-apis-code-generator 1.5.1
29 // C++: 0.1.4
30 #ifndef GOOGLE_BLOGGER_API_COMMENT_H_
31 #define GOOGLE_BLOGGER_API_COMMENT_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 namespace Json {
40 class Value;
41 } // namespace Json
42 
43 namespace google_blogger_api {
44 using namespace googleapis;
45 
51 class Comment : public client::JsonCppData {
52  public:
58  class CommentAuthor : public client::JsonCppData {
59  public:
65  class CommentAuthorImage : public client::JsonCppData {
66  public:
72  static CommentAuthorImage* New();
73 
79  explicit CommentAuthorImage(const Json::Value& storage);
80 
86  explicit CommentAuthorImage(Json::Value* storage);
87 
91  virtual ~CommentAuthorImage();
92 
98  const StringPiece GetTypeName() const {
99  return StringPiece("google_blogger_api::CommentAuthorImage");
100  }
101 
107  bool has_url() const {
108  return Storage().isMember("url");
109  }
110 
114  void clear_url() {
115  MutableStorage()->removeMember("url");
116  }
117 
118 
122  const StringPiece get_url() const {
123  const Json::Value& v = Storage("url");
124  if (v == Json::Value::null) return StringPiece("");
125  return StringPiece(v.asCString());
126  }
127 
135  void set_url(const StringPiece& value) {
136  *MutableStorage("url") = value.data();
137  }
138 
139  private:
140  void operator=(const CommentAuthorImage&);
141  }; // CommentAuthorImage
147  static CommentAuthor* New();
148 
154  explicit CommentAuthor(const Json::Value& storage);
155 
161  explicit CommentAuthor(Json::Value* storage);
162 
166  virtual ~CommentAuthor();
167 
173  const StringPiece GetTypeName() const {
174  return StringPiece("google_blogger_api::CommentAuthor");
175  }
176 
182  bool has_display_name() const {
183  return Storage().isMember("displayName");
184  }
185 
190  MutableStorage()->removeMember("displayName");
191  }
192 
193 
197  const StringPiece get_display_name() const {
198  const Json::Value& v = Storage("displayName");
199  if (v == Json::Value::null) return StringPiece("");
200  return StringPiece(v.asCString());
201  }
202 
210  void set_display_name(const StringPiece& value) {
211  *MutableStorage("displayName") = value.data();
212  }
213 
219  bool has_id() const {
220  return Storage().isMember("id");
221  }
222 
226  void clear_id() {
227  MutableStorage()->removeMember("id");
228  }
229 
230 
234  const StringPiece get_id() const {
235  const Json::Value& v = Storage("id");
236  if (v == Json::Value::null) return StringPiece("");
237  return StringPiece(v.asCString());
238  }
239 
247  void set_id(const StringPiece& value) {
248  *MutableStorage("id") = value.data();
249  }
250 
256  bool has_image() const {
257  return Storage().isMember("image");
258  }
259 
263  void clear_image() {
264  MutableStorage()->removeMember("image");
265  }
266 
267 
272  const Json::Value& storage = Storage("image");
273  return client::JsonValueToCppValueHelper<CommentAuthorImage >(storage);
274  }
275 
284  Json::Value* storage = MutableStorage("image");
285  return client::JsonValueToMutableCppValueHelper<CommentAuthorImage >(storage);
286  }
287 
293  bool has_url() const {
294  return Storage().isMember("url");
295  }
296 
300  void clear_url() {
301  MutableStorage()->removeMember("url");
302  }
303 
304 
308  const StringPiece get_url() const {
309  const Json::Value& v = Storage("url");
310  if (v == Json::Value::null) return StringPiece("");
311  return StringPiece(v.asCString());
312  }
313 
321  void set_url(const StringPiece& value) {
322  *MutableStorage("url") = value.data();
323  }
324 
325  private:
326  void operator=(const CommentAuthor&);
327  }; // CommentAuthor
333  class CommentBlog : public client::JsonCppData {
334  public:
340  static CommentBlog* New();
341 
347  explicit CommentBlog(const Json::Value& storage);
348 
354  explicit CommentBlog(Json::Value* storage);
355 
359  virtual ~CommentBlog();
360 
366  const StringPiece GetTypeName() const {
367  return StringPiece("google_blogger_api::CommentBlog");
368  }
369 
375  bool has_id() const {
376  return Storage().isMember("id");
377  }
378 
382  void clear_id() {
383  MutableStorage()->removeMember("id");
384  }
385 
386 
390  const StringPiece get_id() const {
391  const Json::Value& v = Storage("id");
392  if (v == Json::Value::null) return StringPiece("");
393  return StringPiece(v.asCString());
394  }
395 
403  void set_id(const StringPiece& value) {
404  *MutableStorage("id") = value.data();
405  }
406 
407  private:
408  void operator=(const CommentBlog&);
409  }; // CommentBlog
415  class CommentInReplyTo : public client::JsonCppData {
416  public:
422  static CommentInReplyTo* New();
423 
429  explicit CommentInReplyTo(const Json::Value& storage);
430 
436  explicit CommentInReplyTo(Json::Value* storage);
437 
441  virtual ~CommentInReplyTo();
442 
448  const StringPiece GetTypeName() const {
449  return StringPiece("google_blogger_api::CommentInReplyTo");
450  }
451 
457  bool has_id() const {
458  return Storage().isMember("id");
459  }
460 
464  void clear_id() {
465  MutableStorage()->removeMember("id");
466  }
467 
468 
472  const StringPiece get_id() const {
473  const Json::Value& v = Storage("id");
474  if (v == Json::Value::null) return StringPiece("");
475  return StringPiece(v.asCString());
476  }
477 
485  void set_id(const StringPiece& value) {
486  *MutableStorage("id") = value.data();
487  }
488 
489  private:
490  void operator=(const CommentInReplyTo&);
491  }; // CommentInReplyTo
497  class CommentPost : public client::JsonCppData {
498  public:
504  static CommentPost* New();
505 
511  explicit CommentPost(const Json::Value& storage);
512 
518  explicit CommentPost(Json::Value* storage);
519 
523  virtual ~CommentPost();
524 
530  const StringPiece GetTypeName() const {
531  return StringPiece("google_blogger_api::CommentPost");
532  }
533 
539  bool has_id() const {
540  return Storage().isMember("id");
541  }
542 
546  void clear_id() {
547  MutableStorage()->removeMember("id");
548  }
549 
550 
554  const StringPiece get_id() const {
555  const Json::Value& v = Storage("id");
556  if (v == Json::Value::null) return StringPiece("");
557  return StringPiece(v.asCString());
558  }
559 
567  void set_id(const StringPiece& value) {
568  *MutableStorage("id") = value.data();
569  }
570 
571  private:
572  void operator=(const CommentPost&);
573  }; // CommentPost
579  static Comment* New();
580 
586  explicit Comment(const Json::Value& storage);
587 
593  explicit Comment(Json::Value* storage);
594 
598  virtual ~Comment();
599 
605  const StringPiece GetTypeName() const {
606  return StringPiece("google_blogger_api::Comment");
607  }
608 
614  bool has_author() const {
615  return Storage().isMember("author");
616  }
617 
621  void clear_author() {
622  MutableStorage()->removeMember("author");
623  }
624 
625 
629  const CommentAuthor get_author() const {
630  const Json::Value& storage = Storage("author");
631  return client::JsonValueToCppValueHelper<CommentAuthor >(storage);
632  }
633 
642  Json::Value* storage = MutableStorage("author");
643  return client::JsonValueToMutableCppValueHelper<CommentAuthor >(storage);
644  }
645 
651  bool has_blog() const {
652  return Storage().isMember("blog");
653  }
654 
658  void clear_blog() {
659  MutableStorage()->removeMember("blog");
660  }
661 
662 
666  const CommentBlog get_blog() const {
667  const Json::Value& storage = Storage("blog");
668  return client::JsonValueToCppValueHelper<CommentBlog >(storage);
669  }
670 
679  Json::Value* storage = MutableStorage("blog");
680  return client::JsonValueToMutableCppValueHelper<CommentBlog >(storage);
681  }
682 
688  bool has_content() const {
689  return Storage().isMember("content");
690  }
691 
695  void clear_content() {
696  MutableStorage()->removeMember("content");
697  }
698 
699 
703  const StringPiece get_content() const {
704  const Json::Value& v = Storage("content");
705  if (v == Json::Value::null) return StringPiece("");
706  return StringPiece(v.asCString());
707  }
708 
716  void set_content(const StringPiece& value) {
717  *MutableStorage("content") = value.data();
718  }
719 
725  bool has_id() const {
726  return Storage().isMember("id");
727  }
728 
732  void clear_id() {
733  MutableStorage()->removeMember("id");
734  }
735 
736 
740  const StringPiece get_id() const {
741  const Json::Value& v = Storage("id");
742  if (v == Json::Value::null) return StringPiece("");
743  return StringPiece(v.asCString());
744  }
745 
753  void set_id(const StringPiece& value) {
754  *MutableStorage("id") = value.data();
755  }
756 
762  bool has_in_reply_to() const {
763  return Storage().isMember("inReplyTo");
764  }
765 
770  MutableStorage()->removeMember("inReplyTo");
771  }
772 
773 
778  const Json::Value& storage = Storage("inReplyTo");
779  return client::JsonValueToCppValueHelper<CommentInReplyTo >(storage);
780  }
781 
791  Json::Value* storage = MutableStorage("inReplyTo");
792  return client::JsonValueToMutableCppValueHelper<CommentInReplyTo >(storage);
793  }
794 
800  bool has_kind() const {
801  return Storage().isMember("kind");
802  }
803 
807  void clear_kind() {
808  MutableStorage()->removeMember("kind");
809  }
810 
811 
815  const StringPiece get_kind() const {
816  const Json::Value& v = Storage("kind");
817  if (v == Json::Value::null) return StringPiece("");
818  return StringPiece(v.asCString());
819  }
820 
828  void set_kind(const StringPiece& value) {
829  *MutableStorage("kind") = value.data();
830  }
831 
837  bool has_post() const {
838  return Storage().isMember("post");
839  }
840 
844  void clear_post() {
845  MutableStorage()->removeMember("post");
846  }
847 
848 
852  const CommentPost get_post() const {
853  const Json::Value& storage = Storage("post");
854  return client::JsonValueToCppValueHelper<CommentPost >(storage);
855  }
856 
865  Json::Value* storage = MutableStorage("post");
866  return client::JsonValueToMutableCppValueHelper<CommentPost >(storage);
867  }
868 
874  bool has_published() const {
875  return Storage().isMember("published");
876  }
877 
882  MutableStorage()->removeMember("published");
883  }
884 
885 
889  client::DateTime get_published() const {
890  const Json::Value& storage = Storage("published");
891  return client::JsonValueToCppValueHelper<client::DateTime >(storage);
892  }
893 
901  void set_published(client::DateTime value) {
902  client::SetJsonValueFromCppValueHelper<client::DateTime >(
903  value, MutableStorage("published"));
904  }
905 
911  bool has_self_link() const {
912  return Storage().isMember("selfLink");
913  }
914 
919  MutableStorage()->removeMember("selfLink");
920  }
921 
922 
926  const StringPiece get_self_link() const {
927  const Json::Value& v = Storage("selfLink");
928  if (v == Json::Value::null) return StringPiece("");
929  return StringPiece(v.asCString());
930  }
931 
939  void set_self_link(const StringPiece& value) {
940  *MutableStorage("selfLink") = value.data();
941  }
942 
948  bool has_status() const {
949  return Storage().isMember("status");
950  }
951 
955  void clear_status() {
956  MutableStorage()->removeMember("status");
957  }
958 
959 
963  const StringPiece get_status() const {
964  const Json::Value& v = Storage("status");
965  if (v == Json::Value::null) return StringPiece("");
966  return StringPiece(v.asCString());
967  }
968 
976  void set_status(const StringPiece& value) {
977  *MutableStorage("status") = value.data();
978  }
979 
985  bool has_updated() const {
986  return Storage().isMember("updated");
987  }
988 
992  void clear_updated() {
993  MutableStorage()->removeMember("updated");
994  }
995 
996 
1000  client::DateTime get_updated() const {
1001  const Json::Value& storage = Storage("updated");
1002  return client::JsonValueToCppValueHelper<client::DateTime >(storage);
1003  }
1004 
1012  void set_updated(client::DateTime value) {
1013  client::SetJsonValueFromCppValueHelper<client::DateTime >(
1014  value, MutableStorage("updated"));
1015  }
1016 
1017  private:
1018  void operator=(const Comment&);
1019 }; // Comment
1020 } // namespace google_blogger_api
1021 #endif // GOOGLE_BLOGGER_API_COMMENT_H_
void clear_id()
Definition: comment.h:732
void set_id(const StringPiece &value)
Definition: comment.h:403
void clear_blog()
Definition: comment.h:658
bool has_id() const
Definition: comment.h:219
void set_id(const StringPiece &value)
Definition: comment.h:247
void set_id(const StringPiece &value)
Definition: comment.h:567
void clear_content()
Definition: comment.h:695
void set_kind(const StringPiece &value)
Definition: comment.h:828
void clear_id()
Definition: comment.h:546
void clear_self_link()
Definition: comment.h:918
const StringPiece GetTypeName() const
Definition: comment.h:605
void set_url(const StringPiece &value)
Definition: comment.h:321
const StringPiece get_id() const
Definition: comment.h:390
CommentAuthor mutable_author()
Definition: comment.h:641
void clear_image()
Definition: comment.h:263
void set_id(const StringPiece &value)
Definition: comment.h:753
const StringPiece get_url() const
Definition: comment.h:308
const StringPiece GetTypeName() const
Definition: comment.h:98
const StringPiece get_id() const
Definition: comment.h:472
bool has_kind() const
Definition: comment.h:800
bool has_id() const
Definition: comment.h:539
void clear_kind()
Definition: comment.h:807
void clear_id()
Definition: comment.h:464
bool has_id() const
Definition: comment.h:457
bool has_display_name() const
Definition: comment.h:182
const StringPiece get_self_link() const
Definition: comment.h:926
bool has_status() const
Definition: comment.h:948
bool has_id() const
Definition: comment.h:375
void clear_id()
Definition: comment.h:226
bool has_updated() const
Definition: comment.h:985
void clear_author()
Definition: comment.h:621
void set_published(client::DateTime value)
Definition: comment.h:901
CommentBlog mutable_blog()
Definition: comment.h:678
CommentInReplyTo mutable_inReplyTo()
Definition: comment.h:790
void clear_id()
Definition: comment.h:382
const CommentBlog get_blog() const
Definition: comment.h:666
void clear_published()
Definition: comment.h:881
void set_status(const StringPiece &value)
Definition: comment.h:976
client::DateTime get_published() const
Definition: comment.h:889
void set_content(const StringPiece &value)
Definition: comment.h:716
void clear_display_name()
Definition: comment.h:189
Definition: blog.cc:44
void clear_updated()
Definition: comment.h:992
bool has_id() const
Definition: comment.h:725
bool has_url() const
Definition: comment.h:293
const StringPiece GetTypeName() const
Definition: comment.h:448
Definition: blog.h:42
bool has_content() const
Definition: comment.h:688
bool has_post() const
Definition: comment.h:837
const CommentPost get_post() const
Definition: comment.h:852
void clear_url()
Definition: comment.h:300
const StringPiece GetTypeName() const
Definition: comment.h:173
const StringPiece get_id() const
Definition: comment.h:554
bool has_image() const
Definition: comment.h:256
void set_id(const StringPiece &value)
Definition: comment.h:485
const StringPiece get_kind() const
Definition: comment.h:815
void clear_status()
Definition: comment.h:955
bool has_blog() const
Definition: comment.h:651
bool has_published() const
Definition: comment.h:874
const StringPiece get_id() const
Definition: comment.h:234
client::DateTime get_updated() const
Definition: comment.h:1000
bool has_self_link() const
Definition: comment.h:911
void set_display_name(const StringPiece &value)
Definition: comment.h:210
const StringPiece GetTypeName() const
Definition: comment.h:530
const StringPiece get_url() const
Definition: comment.h:122
const StringPiece GetTypeName() const
Definition: comment.h:366
bool has_author() const
Definition: comment.h:614
void clear_in_reply_to()
Definition: comment.h:769
const StringPiece get_id() const
Definition: comment.h:740
CommentPost mutable_post()
Definition: comment.h:864
void set_updated(client::DateTime value)
Definition: comment.h:1012
const StringPiece get_display_name() const
Definition: comment.h:197
bool has_in_reply_to() const
Definition: comment.h:762
const CommentAuthor get_author() const
Definition: comment.h:629
Definition: comment.h:51
void set_url(const StringPiece &value)
Definition: comment.h:135
const CommentAuthorImage get_image() const
Definition: comment.h:271
void set_self_link(const StringPiece &value)
Definition: comment.h:939
void clear_post()
Definition: comment.h:844
const StringPiece get_content() const
Definition: comment.h:703
const CommentInReplyTo get_in_reply_to() const
Definition: comment.h:777
const StringPiece get_status() const
Definition: comment.h:963
CommentAuthorImage mutable_image()
Definition: comment.h:283