blogger  v2
blog.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_BLOG_H_
31 #define GOOGLE_BLOGGER_API_BLOG_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 #include "google/blogger_api/post.h"
40 
41 namespace Json {
42 class Value;
43 } // namespace Json
44 
45 namespace google_blogger_api {
46 using namespace googleapis;
47 
53 class Blog : public client::JsonCppData {
54  public:
60  class BlogLocale : public client::JsonCppData {
61  public:
67  static BlogLocale* New();
68 
74  explicit BlogLocale(const Json::Value& storage);
75 
81  explicit BlogLocale(Json::Value* storage);
82 
86  virtual ~BlogLocale();
87 
93  const StringPiece GetTypeName() const {
94  return StringPiece("google_blogger_api::BlogLocale");
95  }
96 
102  bool has_country() const {
103  return Storage().isMember("country");
104  }
105 
109  void clear_country() {
110  MutableStorage()->removeMember("country");
111  }
112 
113 
117  const StringPiece get_country() const {
118  const Json::Value& v = Storage("country");
119  if (v == Json::Value::null) return StringPiece("");
120  return StringPiece(v.asCString());
121  }
122 
130  void set_country(const StringPiece& value) {
131  *MutableStorage("country") = value.data();
132  }
133 
139  bool has_language() const {
140  return Storage().isMember("language");
141  }
142 
146  void clear_language() {
147  MutableStorage()->removeMember("language");
148  }
149 
150 
154  const StringPiece get_language() const {
155  const Json::Value& v = Storage("language");
156  if (v == Json::Value::null) return StringPiece("");
157  return StringPiece(v.asCString());
158  }
159 
167  void set_language(const StringPiece& value) {
168  *MutableStorage("language") = value.data();
169  }
170 
176  bool has_variant() const {
177  return Storage().isMember("variant");
178  }
179 
183  void clear_variant() {
184  MutableStorage()->removeMember("variant");
185  }
186 
187 
191  const StringPiece get_variant() const {
192  const Json::Value& v = Storage("variant");
193  if (v == Json::Value::null) return StringPiece("");
194  return StringPiece(v.asCString());
195  }
196 
204  void set_variant(const StringPiece& value) {
205  *MutableStorage("variant") = value.data();
206  }
207 
208  private:
209  void operator=(const BlogLocale&);
210  }; // BlogLocale
216  class BlogPages : public client::JsonCppData {
217  public:
223  static BlogPages* New();
224 
230  explicit BlogPages(const Json::Value& storage);
231 
237  explicit BlogPages(Json::Value* storage);
238 
242  virtual ~BlogPages();
243 
249  const StringPiece GetTypeName() const {
250  return StringPiece("google_blogger_api::BlogPages");
251  }
252 
258  bool has_self_link() const {
259  return Storage().isMember("selfLink");
260  }
261 
266  MutableStorage()->removeMember("selfLink");
267  }
268 
269 
273  const StringPiece get_self_link() const {
274  const Json::Value& v = Storage("selfLink");
275  if (v == Json::Value::null) return StringPiece("");
276  return StringPiece(v.asCString());
277  }
278 
286  void set_self_link(const StringPiece& value) {
287  *MutableStorage("selfLink") = value.data();
288  }
289 
295  bool has_total_items() const {
296  return Storage().isMember("totalItems");
297  }
298 
303  MutableStorage()->removeMember("totalItems");
304  }
305 
306 
310  int32 get_total_items() const {
311  const Json::Value& storage = Storage("totalItems");
312  return client::JsonValueToCppValueHelper<int32 >(storage);
313  }
314 
322  void set_total_items(int32 value) {
323  client::SetJsonValueFromCppValueHelper<int32 >(
324  value, MutableStorage("totalItems"));
325  }
326 
327  private:
328  void operator=(const BlogPages&);
329  }; // BlogPages
335  class BlogPosts : public client::JsonCppData {
336  public:
342  static BlogPosts* New();
343 
349  explicit BlogPosts(const Json::Value& storage);
350 
356  explicit BlogPosts(Json::Value* storage);
357 
361  virtual ~BlogPosts();
362 
368  const StringPiece GetTypeName() const {
369  return StringPiece("google_blogger_api::BlogPosts");
370  }
371 
377  bool has_items() const {
378  return Storage().isMember("items");
379  }
380 
384  void clear_items() {
385  MutableStorage()->removeMember("items");
386  }
387 
388 
392  const client::JsonCppArray<Post > get_items() const;
393 
401  client::JsonCppArray<Post > mutable_items();
402 
408  bool has_self_link() const {
409  return Storage().isMember("selfLink");
410  }
411 
416  MutableStorage()->removeMember("selfLink");
417  }
418 
419 
423  const StringPiece get_self_link() const {
424  const Json::Value& v = Storage("selfLink");
425  if (v == Json::Value::null) return StringPiece("");
426  return StringPiece(v.asCString());
427  }
428 
436  void set_self_link(const StringPiece& value) {
437  *MutableStorage("selfLink") = value.data();
438  }
439 
445  bool has_total_items() const {
446  return Storage().isMember("totalItems");
447  }
448 
453  MutableStorage()->removeMember("totalItems");
454  }
455 
456 
460  int32 get_total_items() const {
461  const Json::Value& storage = Storage("totalItems");
462  return client::JsonValueToCppValueHelper<int32 >(storage);
463  }
464 
472  void set_total_items(int32 value) {
473  client::SetJsonValueFromCppValueHelper<int32 >(
474  value, MutableStorage("totalItems"));
475  }
476 
477  private:
478  void operator=(const BlogPosts&);
479  }; // BlogPosts
485  static Blog* New();
486 
492  explicit Blog(const Json::Value& storage);
493 
499  explicit Blog(Json::Value* storage);
500 
504  virtual ~Blog();
505 
511  const StringPiece GetTypeName() const {
512  return StringPiece("google_blogger_api::Blog");
513  }
514 
520  bool has_custom_meta_data() const {
521  return Storage().isMember("customMetaData");
522  }
523 
528  MutableStorage()->removeMember("customMetaData");
529  }
530 
531 
535  const StringPiece get_custom_meta_data() const {
536  const Json::Value& v = Storage("customMetaData");
537  if (v == Json::Value::null) return StringPiece("");
538  return StringPiece(v.asCString());
539  }
540 
548  void set_custom_meta_data(const StringPiece& value) {
549  *MutableStorage("customMetaData") = value.data();
550  }
551 
557  bool has_description() const {
558  return Storage().isMember("description");
559  }
560 
565  MutableStorage()->removeMember("description");
566  }
567 
568 
572  const StringPiece get_description() const {
573  const Json::Value& v = Storage("description");
574  if (v == Json::Value::null) return StringPiece("");
575  return StringPiece(v.asCString());
576  }
577 
585  void set_description(const StringPiece& value) {
586  *MutableStorage("description") = value.data();
587  }
588 
594  bool has_id() const {
595  return Storage().isMember("id");
596  }
597 
601  void clear_id() {
602  MutableStorage()->removeMember("id");
603  }
604 
605 
609  const StringPiece get_id() const {
610  const Json::Value& v = Storage("id");
611  if (v == Json::Value::null) return StringPiece("");
612  return StringPiece(v.asCString());
613  }
614 
622  void set_id(const StringPiece& value) {
623  *MutableStorage("id") = value.data();
624  }
625 
631  bool has_kind() const {
632  return Storage().isMember("kind");
633  }
634 
638  void clear_kind() {
639  MutableStorage()->removeMember("kind");
640  }
641 
642 
646  const StringPiece get_kind() const {
647  const Json::Value& v = Storage("kind");
648  if (v == Json::Value::null) return StringPiece("");
649  return StringPiece(v.asCString());
650  }
651 
659  void set_kind(const StringPiece& value) {
660  *MutableStorage("kind") = value.data();
661  }
662 
668  bool has_locale() const {
669  return Storage().isMember("locale");
670  }
671 
675  void clear_locale() {
676  MutableStorage()->removeMember("locale");
677  }
678 
679 
683  const BlogLocale get_locale() const {
684  const Json::Value& storage = Storage("locale");
685  return client::JsonValueToCppValueHelper<BlogLocale >(storage);
686  }
687 
696  Json::Value* storage = MutableStorage("locale");
697  return client::JsonValueToMutableCppValueHelper<BlogLocale >(storage);
698  }
699 
705  bool has_name() const {
706  return Storage().isMember("name");
707  }
708 
712  void clear_name() {
713  MutableStorage()->removeMember("name");
714  }
715 
716 
720  const StringPiece get_name() const {
721  const Json::Value& v = Storage("name");
722  if (v == Json::Value::null) return StringPiece("");
723  return StringPiece(v.asCString());
724  }
725 
733  void set_name(const StringPiece& value) {
734  *MutableStorage("name") = value.data();
735  }
736 
742  bool has_pages() const {
743  return Storage().isMember("pages");
744  }
745 
749  void clear_pages() {
750  MutableStorage()->removeMember("pages");
751  }
752 
753 
757  const BlogPages get_pages() const {
758  const Json::Value& storage = Storage("pages");
759  return client::JsonValueToCppValueHelper<BlogPages >(storage);
760  }
761 
770  Json::Value* storage = MutableStorage("pages");
771  return client::JsonValueToMutableCppValueHelper<BlogPages >(storage);
772  }
773 
779  bool has_posts() const {
780  return Storage().isMember("posts");
781  }
782 
786  void clear_posts() {
787  MutableStorage()->removeMember("posts");
788  }
789 
790 
794  const BlogPosts get_posts() const {
795  const Json::Value& storage = Storage("posts");
796  return client::JsonValueToCppValueHelper<BlogPosts >(storage);
797  }
798 
807  Json::Value* storage = MutableStorage("posts");
808  return client::JsonValueToMutableCppValueHelper<BlogPosts >(storage);
809  }
810 
816  bool has_published() const {
817  return Storage().isMember("published");
818  }
819 
824  MutableStorage()->removeMember("published");
825  }
826 
827 
831  const StringPiece get_published() const {
832  const Json::Value& v = Storage("published");
833  if (v == Json::Value::null) return StringPiece("");
834  return StringPiece(v.asCString());
835  }
836 
844  void set_published(const StringPiece& value) {
845  *MutableStorage("published") = value.data();
846  }
847 
853  bool has_self_link() const {
854  return Storage().isMember("selfLink");
855  }
856 
861  MutableStorage()->removeMember("selfLink");
862  }
863 
864 
868  const StringPiece get_self_link() const {
869  const Json::Value& v = Storage("selfLink");
870  if (v == Json::Value::null) return StringPiece("");
871  return StringPiece(v.asCString());
872  }
873 
881  void set_self_link(const StringPiece& value) {
882  *MutableStorage("selfLink") = value.data();
883  }
884 
890  bool has_status() const {
891  return Storage().isMember("status");
892  }
893 
897  void clear_status() {
898  MutableStorage()->removeMember("status");
899  }
900 
901 
905  const StringPiece get_status() const {
906  const Json::Value& v = Storage("status");
907  if (v == Json::Value::null) return StringPiece("");
908  return StringPiece(v.asCString());
909  }
910 
918  void set_status(const StringPiece& value) {
919  *MutableStorage("status") = value.data();
920  }
921 
927  bool has_updated() const {
928  return Storage().isMember("updated");
929  }
930 
934  void clear_updated() {
935  MutableStorage()->removeMember("updated");
936  }
937 
938 
942  const StringPiece get_updated() const {
943  const Json::Value& v = Storage("updated");
944  if (v == Json::Value::null) return StringPiece("");
945  return StringPiece(v.asCString());
946  }
947 
955  void set_updated(const StringPiece& value) {
956  *MutableStorage("updated") = value.data();
957  }
958 
964  bool has_url() const {
965  return Storage().isMember("url");
966  }
967 
971  void clear_url() {
972  MutableStorage()->removeMember("url");
973  }
974 
975 
979  const StringPiece get_url() const {
980  const Json::Value& v = Storage("url");
981  if (v == Json::Value::null) return StringPiece("");
982  return StringPiece(v.asCString());
983  }
984 
992  void set_url(const StringPiece& value) {
993  *MutableStorage("url") = value.data();
994  }
995 
996  private:
997  void operator=(const Blog&);
998 }; // Blog
999 } // namespace google_blogger_api
1000 #endif // GOOGLE_BLOGGER_API_BLOG_H_
void clear_locale()
Definition: blog.h:675
void set_custom_meta_data(const StringPiece &value)
Definition: blog.h:548
void set_updated(const StringPiece &value)
Definition: blog.h:955
void set_total_items(int32 value)
Definition: blog.h:472
void clear_items()
Definition: blog.h:384
bool has_url() const
Definition: blog.h:964
void clear_url()
Definition: blog.h:971
void clear_pages()
Definition: blog.h:749
const StringPiece get_kind() const
Definition: blog.h:646
BlogPosts mutable_posts()
Definition: blog.h:806
const StringPiece get_published() const
Definition: blog.h:831
const StringPiece GetTypeName() const
Definition: blog.h:368
void clear_status()
Definition: blog.h:897
const StringPiece get_updated() const
Definition: blog.h:942
void set_kind(const StringPiece &value)
Definition: blog.h:659
bool has_published() const
Definition: blog.h:816
bool has_description() const
Definition: blog.h:557
bool has_self_link() const
Definition: blog.h:408
BlogPages mutable_pages()
Definition: blog.h:769
bool has_locale() const
Definition: blog.h:668
bool has_self_link() const
Definition: blog.h:853
void set_self_link(const StringPiece &value)
Definition: blog.h:436
void clear_total_items()
Definition: blog.h:302
const StringPiece GetTypeName() const
Definition: blog.h:93
void clear_description()
Definition: blog.h:564
void clear_custom_meta_data()
Definition: blog.h:527
bool has_total_items() const
Definition: blog.h:295
bool has_language() const
Definition: blog.h:139
const StringPiece get_language() const
Definition: blog.h:154
void clear_country()
Definition: blog.h:109
const StringPiece get_id() const
Definition: blog.h:609
bool has_id() const
Definition: blog.h:594
void set_description(const StringPiece &value)
Definition: blog.h:585
const StringPiece get_self_link() const
Definition: blog.h:273
void clear_self_link()
Definition: blog.h:415
void clear_language()
Definition: blog.h:146
int32 get_total_items() const
Definition: blog.h:460
void clear_id()
Definition: blog.h:601
const StringPiece GetTypeName() const
Definition: blog.h:249
void clear_posts()
Definition: blog.h:786
void clear_updated()
Definition: blog.h:934
void clear_published()
Definition: blog.h:823
const StringPiece get_description() const
Definition: blog.h:572
void set_variant(const StringPiece &value)
Definition: blog.h:204
bool has_self_link() const
Definition: blog.h:258
void clear_self_link()
Definition: blog.h:860
Definition: blog.cc:44
bool has_total_items() const
Definition: blog.h:445
const StringPiece get_variant() const
Definition: blog.h:191
bool has_custom_meta_data() const
Definition: blog.h:520
Definition: blog.h:41
bool has_status() const
Definition: blog.h:890
BlogLocale mutable_locale()
Definition: blog.h:695
void set_language(const StringPiece &value)
Definition: blog.h:167
void set_self_link(const StringPiece &value)
Definition: blog.h:881
const BlogPages get_pages() const
Definition: blog.h:757
bool has_updated() const
Definition: blog.h:927
bool has_items() const
Definition: blog.h:377
void set_status(const StringPiece &value)
Definition: blog.h:918
void clear_kind()
Definition: blog.h:638
void set_total_items(int32 value)
Definition: blog.h:322
int32 get_total_items() const
Definition: blog.h:310
void set_country(const StringPiece &value)
Definition: blog.h:130
bool has_posts() const
Definition: blog.h:779
void clear_variant()
Definition: blog.h:183
void set_url(const StringPiece &value)
Definition: blog.h:992
bool has_name() const
Definition: blog.h:705
bool has_kind() const
Definition: blog.h:631
const StringPiece get_country() const
Definition: blog.h:117
const StringPiece GetTypeName() const
Definition: blog.h:511
void set_id(const StringPiece &value)
Definition: blog.h:622
const BlogPosts get_posts() const
Definition: blog.h:794
void set_self_link(const StringPiece &value)
Definition: blog.h:286
const StringPiece get_url() const
Definition: blog.h:979
Definition: blog.h:53
void clear_self_link()
Definition: blog.h:265
bool has_country() const
Definition: blog.h:102
bool has_pages() const
Definition: blog.h:742
const StringPiece get_self_link() const
Definition: blog.h:868
const StringPiece get_status() const
Definition: blog.h:905
const StringPiece get_self_link() const
Definition: blog.h:423
void set_name(const StringPiece &value)
Definition: blog.h:733
void set_published(const StringPiece &value)
Definition: blog.h:844
bool has_variant() const
Definition: blog.h:176
void clear_name()
Definition: blog.h:712
const BlogLocale get_locale() const
Definition: blog.h:683
void clear_total_items()
Definition: blog.h:452
const StringPiece get_custom_meta_data() const
Definition: blog.h:535
const StringPiece get_name() const
Definition: blog.h:720