blogger  v2
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-04-13, 16:03:23 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 v3 (blogger/v2)
24 // Generated from:
25 // Version: v2
26 // Revision: 77
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/strings/stringpiece.h"
37 
38 namespace Json {
39 class Value;
40 } // namespace Json
41 
42 namespace google_blogger_api {
43 using namespace googleapis;
44 
50 class Comment : public client::JsonCppData {
51  public:
57  class CommentAuthor : public client::JsonCppData {
58  public:
64  class CommentAuthorImage : public client::JsonCppData {
65  public:
71  static CommentAuthorImage* New();
72 
78  explicit CommentAuthorImage(const Json::Value& storage);
79 
85  explicit CommentAuthorImage(Json::Value* storage);
86 
90  virtual ~CommentAuthorImage();
91 
97  const StringPiece GetTypeName() const {
98  return StringPiece("google_blogger_api::CommentAuthorImage");
99  }
100 
106  bool has_url() const {
107  return Storage().isMember("url");
108  }
109 
113  void clear_url() {
114  MutableStorage()->removeMember("url");
115  }
116 
117 
121  const StringPiece get_url() const {
122  const Json::Value& v = Storage("url");
123  if (v == Json::Value::null) return StringPiece("");
124  return StringPiece(v.asCString());
125  }
126 
134  void set_url(const StringPiece& value) {
135  *MutableStorage("url") = value.data();
136  }
137 
138  private:
139  void operator=(const CommentAuthorImage&);
140  }; // CommentAuthorImage
146  static CommentAuthor* New();
147 
153  explicit CommentAuthor(const Json::Value& storage);
154 
160  explicit CommentAuthor(Json::Value* storage);
161 
165  virtual ~CommentAuthor();
166 
172  const StringPiece GetTypeName() const {
173  return StringPiece("google_blogger_api::CommentAuthor");
174  }
175 
181  bool has_display_name() const {
182  return Storage().isMember("displayName");
183  }
184 
189  MutableStorage()->removeMember("displayName");
190  }
191 
192 
196  const StringPiece get_display_name() const {
197  const Json::Value& v = Storage("displayName");
198  if (v == Json::Value::null) return StringPiece("");
199  return StringPiece(v.asCString());
200  }
201 
209  void set_display_name(const StringPiece& value) {
210  *MutableStorage("displayName") = value.data();
211  }
212 
218  bool has_id() const {
219  return Storage().isMember("id");
220  }
221 
225  void clear_id() {
226  MutableStorage()->removeMember("id");
227  }
228 
229 
233  const StringPiece get_id() const {
234  const Json::Value& v = Storage("id");
235  if (v == Json::Value::null) return StringPiece("");
236  return StringPiece(v.asCString());
237  }
238 
246  void set_id(const StringPiece& value) {
247  *MutableStorage("id") = value.data();
248  }
249 
255  bool has_image() const {
256  return Storage().isMember("image");
257  }
258 
262  void clear_image() {
263  MutableStorage()->removeMember("image");
264  }
265 
266 
271  const Json::Value& storage = Storage("image");
272  return client::JsonValueToCppValueHelper<CommentAuthorImage >(storage);
273  }
274 
283  Json::Value* storage = MutableStorage("image");
284  return client::JsonValueToMutableCppValueHelper<CommentAuthorImage >(storage);
285  }
286 
292  bool has_url() const {
293  return Storage().isMember("url");
294  }
295 
299  void clear_url() {
300  MutableStorage()->removeMember("url");
301  }
302 
303 
307  const StringPiece get_url() const {
308  const Json::Value& v = Storage("url");
309  if (v == Json::Value::null) return StringPiece("");
310  return StringPiece(v.asCString());
311  }
312 
320  void set_url(const StringPiece& value) {
321  *MutableStorage("url") = value.data();
322  }
323 
324  private:
325  void operator=(const CommentAuthor&);
326  }; // CommentAuthor
332  class CommentBlog : public client::JsonCppData {
333  public:
339  static CommentBlog* New();
340 
346  explicit CommentBlog(const Json::Value& storage);
347 
353  explicit CommentBlog(Json::Value* storage);
354 
358  virtual ~CommentBlog();
359 
365  const StringPiece GetTypeName() const {
366  return StringPiece("google_blogger_api::CommentBlog");
367  }
368 
374  bool has_id() const {
375  return Storage().isMember("id");
376  }
377 
381  void clear_id() {
382  MutableStorage()->removeMember("id");
383  }
384 
385 
389  const StringPiece get_id() const {
390  const Json::Value& v = Storage("id");
391  if (v == Json::Value::null) return StringPiece("");
392  return StringPiece(v.asCString());
393  }
394 
402  void set_id(const StringPiece& value) {
403  *MutableStorage("id") = value.data();
404  }
405 
406  private:
407  void operator=(const CommentBlog&);
408  }; // CommentBlog
414  class CommentInReplyTo : public client::JsonCppData {
415  public:
421  static CommentInReplyTo* New();
422 
428  explicit CommentInReplyTo(const Json::Value& storage);
429 
435  explicit CommentInReplyTo(Json::Value* storage);
436 
440  virtual ~CommentInReplyTo();
441 
447  const StringPiece GetTypeName() const {
448  return StringPiece("google_blogger_api::CommentInReplyTo");
449  }
450 
456  bool has_id() const {
457  return Storage().isMember("id");
458  }
459 
463  void clear_id() {
464  MutableStorage()->removeMember("id");
465  }
466 
467 
471  const StringPiece get_id() const {
472  const Json::Value& v = Storage("id");
473  if (v == Json::Value::null) return StringPiece("");
474  return StringPiece(v.asCString());
475  }
476 
484  void set_id(const StringPiece& value) {
485  *MutableStorage("id") = value.data();
486  }
487 
488  private:
489  void operator=(const CommentInReplyTo&);
490  }; // CommentInReplyTo
496  class CommentPost : public client::JsonCppData {
497  public:
503  static CommentPost* New();
504 
510  explicit CommentPost(const Json::Value& storage);
511 
517  explicit CommentPost(Json::Value* storage);
518 
522  virtual ~CommentPost();
523 
529  const StringPiece GetTypeName() const {
530  return StringPiece("google_blogger_api::CommentPost");
531  }
532 
538  bool has_id() const {
539  return Storage().isMember("id");
540  }
541 
545  void clear_id() {
546  MutableStorage()->removeMember("id");
547  }
548 
549 
553  const StringPiece get_id() const {
554  const Json::Value& v = Storage("id");
555  if (v == Json::Value::null) return StringPiece("");
556  return StringPiece(v.asCString());
557  }
558 
566  void set_id(const StringPiece& value) {
567  *MutableStorage("id") = value.data();
568  }
569 
570  private:
571  void operator=(const CommentPost&);
572  }; // CommentPost
578  static Comment* New();
579 
585  explicit Comment(const Json::Value& storage);
586 
592  explicit Comment(Json::Value* storage);
593 
597  virtual ~Comment();
598 
604  const StringPiece GetTypeName() const {
605  return StringPiece("google_blogger_api::Comment");
606  }
607 
613  bool has_author() const {
614  return Storage().isMember("author");
615  }
616 
620  void clear_author() {
621  MutableStorage()->removeMember("author");
622  }
623 
624 
628  const CommentAuthor get_author() const {
629  const Json::Value& storage = Storage("author");
630  return client::JsonValueToCppValueHelper<CommentAuthor >(storage);
631  }
632 
641  Json::Value* storage = MutableStorage("author");
642  return client::JsonValueToMutableCppValueHelper<CommentAuthor >(storage);
643  }
644 
650  bool has_blog() const {
651  return Storage().isMember("blog");
652  }
653 
657  void clear_blog() {
658  MutableStorage()->removeMember("blog");
659  }
660 
661 
665  const CommentBlog get_blog() const {
666  const Json::Value& storage = Storage("blog");
667  return client::JsonValueToCppValueHelper<CommentBlog >(storage);
668  }
669 
678  Json::Value* storage = MutableStorage("blog");
679  return client::JsonValueToMutableCppValueHelper<CommentBlog >(storage);
680  }
681 
687  bool has_content() const {
688  return Storage().isMember("content");
689  }
690 
694  void clear_content() {
695  MutableStorage()->removeMember("content");
696  }
697 
698 
702  const StringPiece get_content() const {
703  const Json::Value& v = Storage("content");
704  if (v == Json::Value::null) return StringPiece("");
705  return StringPiece(v.asCString());
706  }
707 
715  void set_content(const StringPiece& value) {
716  *MutableStorage("content") = value.data();
717  }
718 
724  bool has_id() const {
725  return Storage().isMember("id");
726  }
727 
731  void clear_id() {
732  MutableStorage()->removeMember("id");
733  }
734 
735 
739  const StringPiece get_id() const {
740  const Json::Value& v = Storage("id");
741  if (v == Json::Value::null) return StringPiece("");
742  return StringPiece(v.asCString());
743  }
744 
752  void set_id(const StringPiece& value) {
753  *MutableStorage("id") = value.data();
754  }
755 
761  bool has_in_reply_to() const {
762  return Storage().isMember("inReplyTo");
763  }
764 
769  MutableStorage()->removeMember("inReplyTo");
770  }
771 
772 
777  const Json::Value& storage = Storage("inReplyTo");
778  return client::JsonValueToCppValueHelper<CommentInReplyTo >(storage);
779  }
780 
790  Json::Value* storage = MutableStorage("inReplyTo");
791  return client::JsonValueToMutableCppValueHelper<CommentInReplyTo >(storage);
792  }
793 
799  bool has_kind() const {
800  return Storage().isMember("kind");
801  }
802 
806  void clear_kind() {
807  MutableStorage()->removeMember("kind");
808  }
809 
810 
814  const StringPiece get_kind() const {
815  const Json::Value& v = Storage("kind");
816  if (v == Json::Value::null) return StringPiece("");
817  return StringPiece(v.asCString());
818  }
819 
827  void set_kind(const StringPiece& value) {
828  *MutableStorage("kind") = value.data();
829  }
830 
836  bool has_post() const {
837  return Storage().isMember("post");
838  }
839 
843  void clear_post() {
844  MutableStorage()->removeMember("post");
845  }
846 
847 
851  const CommentPost get_post() const {
852  const Json::Value& storage = Storage("post");
853  return client::JsonValueToCppValueHelper<CommentPost >(storage);
854  }
855 
864  Json::Value* storage = MutableStorage("post");
865  return client::JsonValueToMutableCppValueHelper<CommentPost >(storage);
866  }
867 
873  bool has_published() const {
874  return Storage().isMember("published");
875  }
876 
881  MutableStorage()->removeMember("published");
882  }
883 
884 
888  const StringPiece get_published() const {
889  const Json::Value& v = Storage("published");
890  if (v == Json::Value::null) return StringPiece("");
891  return StringPiece(v.asCString());
892  }
893 
901  void set_published(const StringPiece& value) {
902  *MutableStorage("published") = value.data();
903  }
904 
910  bool has_self_link() const {
911  return Storage().isMember("selfLink");
912  }
913 
918  MutableStorage()->removeMember("selfLink");
919  }
920 
921 
925  const StringPiece get_self_link() const {
926  const Json::Value& v = Storage("selfLink");
927  if (v == Json::Value::null) return StringPiece("");
928  return StringPiece(v.asCString());
929  }
930 
938  void set_self_link(const StringPiece& value) {
939  *MutableStorage("selfLink") = value.data();
940  }
941 
947  bool has_status() const {
948  return Storage().isMember("status");
949  }
950 
954  void clear_status() {
955  MutableStorage()->removeMember("status");
956  }
957 
958 
962  const StringPiece get_status() const {
963  const Json::Value& v = Storage("status");
964  if (v == Json::Value::null) return StringPiece("");
965  return StringPiece(v.asCString());
966  }
967 
975  void set_status(const StringPiece& value) {
976  *MutableStorage("status") = value.data();
977  }
978 
984  bool has_updated() const {
985  return Storage().isMember("updated");
986  }
987 
991  void clear_updated() {
992  MutableStorage()->removeMember("updated");
993  }
994 
995 
999  const StringPiece get_updated() const {
1000  const Json::Value& v = Storage("updated");
1001  if (v == Json::Value::null) return StringPiece("");
1002  return StringPiece(v.asCString());
1003  }
1004 
1012  void set_updated(const StringPiece& value) {
1013  *MutableStorage("updated") = value.data();
1014  }
1015 
1016  private:
1017  void operator=(const Comment&);
1018 }; // Comment
1019 } // namespace google_blogger_api
1020 #endif // GOOGLE_BLOGGER_API_COMMENT_H_
void clear_id()
Definition: comment.h:731
void set_id(const StringPiece &value)
Definition: comment.h:402
void clear_blog()
Definition: comment.h:657
bool has_id() const
Definition: comment.h:218
void set_id(const StringPiece &value)
Definition: comment.h:246
void set_id(const StringPiece &value)
Definition: comment.h:566
void clear_content()
Definition: comment.h:694
void set_kind(const StringPiece &value)
Definition: comment.h:827
void clear_id()
Definition: comment.h:545
void clear_self_link()
Definition: comment.h:917
const StringPiece GetTypeName() const
Definition: comment.h:604
void set_url(const StringPiece &value)
Definition: comment.h:320
const StringPiece get_updated() const
Definition: comment.h:999
const StringPiece get_id() const
Definition: comment.h:389
const StringPiece get_published() const
Definition: comment.h:888
CommentAuthor mutable_author()
Definition: comment.h:640
void clear_image()
Definition: comment.h:262
void set_id(const StringPiece &value)
Definition: comment.h:752
const StringPiece get_url() const
Definition: comment.h:307
const StringPiece GetTypeName() const
Definition: comment.h:97
const StringPiece get_id() const
Definition: comment.h:471
bool has_kind() const
Definition: comment.h:799
bool has_id() const
Definition: comment.h:538
void clear_kind()
Definition: comment.h:806
void clear_id()
Definition: comment.h:463
bool has_id() const
Definition: comment.h:456
bool has_display_name() const
Definition: comment.h:181
const StringPiece get_self_link() const
Definition: comment.h:925
bool has_status() const
Definition: comment.h:947
bool has_id() const
Definition: comment.h:374
void clear_id()
Definition: comment.h:225
bool has_updated() const
Definition: comment.h:984
void clear_author()
Definition: comment.h:620
void set_updated(const StringPiece &value)
Definition: comment.h:1012
CommentBlog mutable_blog()
Definition: comment.h:677
CommentInReplyTo mutable_inReplyTo()
Definition: comment.h:789
void clear_id()
Definition: comment.h:381
const CommentBlog get_blog() const
Definition: comment.h:665
void clear_published()
Definition: comment.h:880
void set_status(const StringPiece &value)
Definition: comment.h:975
void set_content(const StringPiece &value)
Definition: comment.h:715
void clear_display_name()
Definition: comment.h:188
Definition: blog.cc:44
void clear_updated()
Definition: comment.h:991
bool has_id() const
Definition: comment.h:724
bool has_url() const
Definition: comment.h:292
const StringPiece GetTypeName() const
Definition: comment.h:447
Definition: blog.h:41
bool has_content() const
Definition: comment.h:687
bool has_post() const
Definition: comment.h:836
const CommentPost get_post() const
Definition: comment.h:851
void clear_url()
Definition: comment.h:299
const StringPiece GetTypeName() const
Definition: comment.h:172
const StringPiece get_id() const
Definition: comment.h:553
bool has_image() const
Definition: comment.h:255
void set_id(const StringPiece &value)
Definition: comment.h:484
const StringPiece get_kind() const
Definition: comment.h:814
void clear_status()
Definition: comment.h:954
bool has_blog() const
Definition: comment.h:650
bool has_published() const
Definition: comment.h:873
const StringPiece get_id() const
Definition: comment.h:233
bool has_self_link() const
Definition: comment.h:910
void set_display_name(const StringPiece &value)
Definition: comment.h:209
const StringPiece GetTypeName() const
Definition: comment.h:529
const StringPiece get_url() const
Definition: comment.h:121
const StringPiece GetTypeName() const
Definition: comment.h:365
void set_published(const StringPiece &value)
Definition: comment.h:901
bool has_author() const
Definition: comment.h:613
void clear_in_reply_to()
Definition: comment.h:768
const StringPiece get_id() const
Definition: comment.h:739
CommentPost mutable_post()
Definition: comment.h:863
const StringPiece get_display_name() const
Definition: comment.h:196
bool has_in_reply_to() const
Definition: comment.h:761
const CommentAuthor get_author() const
Definition: comment.h:628
Definition: comment.h:50
void set_url(const StringPiece &value)
Definition: comment.h:134
const CommentAuthorImage get_image() const
Definition: comment.h:270
void set_self_link(const StringPiece &value)
Definition: comment.h:938
void clear_post()
Definition: comment.h:843
const StringPiece get_content() const
Definition: comment.h:702
const CommentInReplyTo get_in_reply_to() const
Definition: comment.h:776
const StringPiece get_status() const
Definition: comment.h:962
CommentAuthorImage mutable_image()
Definition: comment.h:282