blogger  v3
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-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_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/client/util/date_time.h"
38 #include "googleapis/strings/stringpiece.h"
39 
40 #include "google/blogger_api/post.h"
41 
42 namespace Json {
43 class Value;
44 } // namespace Json
45 
46 namespace google_blogger_api {
47 using namespace googleapis;
48 
54 class Blog : public client::JsonCppData {
55  public:
61  class BlogLocale : public client::JsonCppData {
62  public:
68  static BlogLocale* New();
69 
75  explicit BlogLocale(const Json::Value& storage);
76 
82  explicit BlogLocale(Json::Value* storage);
83 
87  virtual ~BlogLocale();
88 
94  const StringPiece GetTypeName() const {
95  return StringPiece("google_blogger_api::BlogLocale");
96  }
97 
103  bool has_country() const {
104  return Storage().isMember("country");
105  }
106 
110  void clear_country() {
111  MutableStorage()->removeMember("country");
112  }
113 
114 
118  const StringPiece get_country() const {
119  const Json::Value& v = Storage("country");
120  if (v == Json::Value::null) return StringPiece("");
121  return StringPiece(v.asCString());
122  }
123 
131  void set_country(const StringPiece& value) {
132  *MutableStorage("country") = value.data();
133  }
134 
140  bool has_language() const {
141  return Storage().isMember("language");
142  }
143 
147  void clear_language() {
148  MutableStorage()->removeMember("language");
149  }
150 
151 
155  const StringPiece get_language() const {
156  const Json::Value& v = Storage("language");
157  if (v == Json::Value::null) return StringPiece("");
158  return StringPiece(v.asCString());
159  }
160 
168  void set_language(const StringPiece& value) {
169  *MutableStorage("language") = value.data();
170  }
171 
177  bool has_variant() const {
178  return Storage().isMember("variant");
179  }
180 
184  void clear_variant() {
185  MutableStorage()->removeMember("variant");
186  }
187 
188 
192  const StringPiece get_variant() const {
193  const Json::Value& v = Storage("variant");
194  if (v == Json::Value::null) return StringPiece("");
195  return StringPiece(v.asCString());
196  }
197 
205  void set_variant(const StringPiece& value) {
206  *MutableStorage("variant") = value.data();
207  }
208 
209  private:
210  void operator=(const BlogLocale&);
211  }; // BlogLocale
217  class BlogPages : public client::JsonCppData {
218  public:
224  static BlogPages* New();
225 
231  explicit BlogPages(const Json::Value& storage);
232 
238  explicit BlogPages(Json::Value* storage);
239 
243  virtual ~BlogPages();
244 
250  const StringPiece GetTypeName() const {
251  return StringPiece("google_blogger_api::BlogPages");
252  }
253 
259  bool has_self_link() const {
260  return Storage().isMember("selfLink");
261  }
262 
267  MutableStorage()->removeMember("selfLink");
268  }
269 
270 
274  const StringPiece get_self_link() const {
275  const Json::Value& v = Storage("selfLink");
276  if (v == Json::Value::null) return StringPiece("");
277  return StringPiece(v.asCString());
278  }
279 
287  void set_self_link(const StringPiece& value) {
288  *MutableStorage("selfLink") = value.data();
289  }
290 
296  bool has_total_items() const {
297  return Storage().isMember("totalItems");
298  }
299 
304  MutableStorage()->removeMember("totalItems");
305  }
306 
307 
311  int32 get_total_items() const {
312  const Json::Value& storage = Storage("totalItems");
313  return client::JsonValueToCppValueHelper<int32 >(storage);
314  }
315 
323  void set_total_items(int32 value) {
324  client::SetJsonValueFromCppValueHelper<int32 >(
325  value, MutableStorage("totalItems"));
326  }
327 
328  private:
329  void operator=(const BlogPages&);
330  }; // BlogPages
336  class BlogPosts : public client::JsonCppData {
337  public:
343  static BlogPosts* New();
344 
350  explicit BlogPosts(const Json::Value& storage);
351 
357  explicit BlogPosts(Json::Value* storage);
358 
362  virtual ~BlogPosts();
363 
369  const StringPiece GetTypeName() const {
370  return StringPiece("google_blogger_api::BlogPosts");
371  }
372 
378  bool has_items() const {
379  return Storage().isMember("items");
380  }
381 
385  void clear_items() {
386  MutableStorage()->removeMember("items");
387  }
388 
389 
393  const client::JsonCppArray<Post > get_items() const;
394 
402  client::JsonCppArray<Post > mutable_items();
403 
409  bool has_self_link() const {
410  return Storage().isMember("selfLink");
411  }
412 
417  MutableStorage()->removeMember("selfLink");
418  }
419 
420 
424  const StringPiece get_self_link() const {
425  const Json::Value& v = Storage("selfLink");
426  if (v == Json::Value::null) return StringPiece("");
427  return StringPiece(v.asCString());
428  }
429 
437  void set_self_link(const StringPiece& value) {
438  *MutableStorage("selfLink") = value.data();
439  }
440 
446  bool has_total_items() const {
447  return Storage().isMember("totalItems");
448  }
449 
454  MutableStorage()->removeMember("totalItems");
455  }
456 
457 
461  int32 get_total_items() const {
462  const Json::Value& storage = Storage("totalItems");
463  return client::JsonValueToCppValueHelper<int32 >(storage);
464  }
465 
473  void set_total_items(int32 value) {
474  client::SetJsonValueFromCppValueHelper<int32 >(
475  value, MutableStorage("totalItems"));
476  }
477 
478  private:
479  void operator=(const BlogPosts&);
480  }; // BlogPosts
486  static Blog* New();
487 
493  explicit Blog(const Json::Value& storage);
494 
500  explicit Blog(Json::Value* storage);
501 
505  virtual ~Blog();
506 
512  const StringPiece GetTypeName() const {
513  return StringPiece("google_blogger_api::Blog");
514  }
515 
521  bool has_custom_meta_data() const {
522  return Storage().isMember("customMetaData");
523  }
524 
529  MutableStorage()->removeMember("customMetaData");
530  }
531 
532 
536  const StringPiece get_custom_meta_data() const {
537  const Json::Value& v = Storage("customMetaData");
538  if (v == Json::Value::null) return StringPiece("");
539  return StringPiece(v.asCString());
540  }
541 
549  void set_custom_meta_data(const StringPiece& value) {
550  *MutableStorage("customMetaData") = value.data();
551  }
552 
558  bool has_description() const {
559  return Storage().isMember("description");
560  }
561 
566  MutableStorage()->removeMember("description");
567  }
568 
569 
573  const StringPiece get_description() const {
574  const Json::Value& v = Storage("description");
575  if (v == Json::Value::null) return StringPiece("");
576  return StringPiece(v.asCString());
577  }
578 
586  void set_description(const StringPiece& value) {
587  *MutableStorage("description") = value.data();
588  }
589 
595  bool has_id() const {
596  return Storage().isMember("id");
597  }
598 
602  void clear_id() {
603  MutableStorage()->removeMember("id");
604  }
605 
606 
610  const StringPiece get_id() const {
611  const Json::Value& v = Storage("id");
612  if (v == Json::Value::null) return StringPiece("");
613  return StringPiece(v.asCString());
614  }
615 
623  void set_id(const StringPiece& value) {
624  *MutableStorage("id") = value.data();
625  }
626 
632  bool has_kind() const {
633  return Storage().isMember("kind");
634  }
635 
639  void clear_kind() {
640  MutableStorage()->removeMember("kind");
641  }
642 
643 
647  const StringPiece get_kind() const {
648  const Json::Value& v = Storage("kind");
649  if (v == Json::Value::null) return StringPiece("");
650  return StringPiece(v.asCString());
651  }
652 
660  void set_kind(const StringPiece& value) {
661  *MutableStorage("kind") = value.data();
662  }
663 
669  bool has_locale() const {
670  return Storage().isMember("locale");
671  }
672 
676  void clear_locale() {
677  MutableStorage()->removeMember("locale");
678  }
679 
680 
684  const BlogLocale get_locale() const {
685  const Json::Value& storage = Storage("locale");
686  return client::JsonValueToCppValueHelper<BlogLocale >(storage);
687  }
688 
697  Json::Value* storage = MutableStorage("locale");
698  return client::JsonValueToMutableCppValueHelper<BlogLocale >(storage);
699  }
700 
706  bool has_name() const {
707  return Storage().isMember("name");
708  }
709 
713  void clear_name() {
714  MutableStorage()->removeMember("name");
715  }
716 
717 
721  const StringPiece get_name() const {
722  const Json::Value& v = Storage("name");
723  if (v == Json::Value::null) return StringPiece("");
724  return StringPiece(v.asCString());
725  }
726 
734  void set_name(const StringPiece& value) {
735  *MutableStorage("name") = value.data();
736  }
737 
743  bool has_pages() const {
744  return Storage().isMember("pages");
745  }
746 
750  void clear_pages() {
751  MutableStorage()->removeMember("pages");
752  }
753 
754 
758  const BlogPages get_pages() const {
759  const Json::Value& storage = Storage("pages");
760  return client::JsonValueToCppValueHelper<BlogPages >(storage);
761  }
762 
771  Json::Value* storage = MutableStorage("pages");
772  return client::JsonValueToMutableCppValueHelper<BlogPages >(storage);
773  }
774 
780  bool has_posts() const {
781  return Storage().isMember("posts");
782  }
783 
787  void clear_posts() {
788  MutableStorage()->removeMember("posts");
789  }
790 
791 
795  const BlogPosts get_posts() const {
796  const Json::Value& storage = Storage("posts");
797  return client::JsonValueToCppValueHelper<BlogPosts >(storage);
798  }
799 
808  Json::Value* storage = MutableStorage("posts");
809  return client::JsonValueToMutableCppValueHelper<BlogPosts >(storage);
810  }
811 
817  bool has_published() const {
818  return Storage().isMember("published");
819  }
820 
825  MutableStorage()->removeMember("published");
826  }
827 
828 
832  client::DateTime get_published() const {
833  const Json::Value& storage = Storage("published");
834  return client::JsonValueToCppValueHelper<client::DateTime >(storage);
835  }
836 
844  void set_published(client::DateTime value) {
845  client::SetJsonValueFromCppValueHelper<client::DateTime >(
846  value, MutableStorage("published"));
847  }
848 
854  bool has_self_link() const {
855  return Storage().isMember("selfLink");
856  }
857 
862  MutableStorage()->removeMember("selfLink");
863  }
864 
865 
869  const StringPiece get_self_link() const {
870  const Json::Value& v = Storage("selfLink");
871  if (v == Json::Value::null) return StringPiece("");
872  return StringPiece(v.asCString());
873  }
874 
882  void set_self_link(const StringPiece& value) {
883  *MutableStorage("selfLink") = value.data();
884  }
885 
891  bool has_status() const {
892  return Storage().isMember("status");
893  }
894 
898  void clear_status() {
899  MutableStorage()->removeMember("status");
900  }
901 
902 
906  const StringPiece get_status() const {
907  const Json::Value& v = Storage("status");
908  if (v == Json::Value::null) return StringPiece("");
909  return StringPiece(v.asCString());
910  }
911 
919  void set_status(const StringPiece& value) {
920  *MutableStorage("status") = value.data();
921  }
922 
928  bool has_updated() const {
929  return Storage().isMember("updated");
930  }
931 
935  void clear_updated() {
936  MutableStorage()->removeMember("updated");
937  }
938 
939 
943  client::DateTime get_updated() const {
944  const Json::Value& storage = Storage("updated");
945  return client::JsonValueToCppValueHelper<client::DateTime >(storage);
946  }
947 
955  void set_updated(client::DateTime value) {
956  client::SetJsonValueFromCppValueHelper<client::DateTime >(
957  value, MutableStorage("updated"));
958  }
959 
965  bool has_url() const {
966  return Storage().isMember("url");
967  }
968 
972  void clear_url() {
973  MutableStorage()->removeMember("url");
974  }
975 
976 
980  const StringPiece get_url() const {
981  const Json::Value& v = Storage("url");
982  if (v == Json::Value::null) return StringPiece("");
983  return StringPiece(v.asCString());
984  }
985 
993  void set_url(const StringPiece& value) {
994  *MutableStorage("url") = value.data();
995  }
996 
997  private:
998  void operator=(const Blog&);
999 }; // Blog
1000 } // namespace google_blogger_api
1001 #endif // GOOGLE_BLOGGER_API_BLOG_H_
void clear_locale()
Definition: blog.h:676
void set_published(client::DateTime value)
Definition: blog.h:844
void set_custom_meta_data(const StringPiece &value)
Definition: blog.h:549
void set_total_items(int32 value)
Definition: blog.h:473
void clear_items()
Definition: blog.h:385
bool has_url() const
Definition: blog.h:965
void clear_url()
Definition: blog.h:972
void clear_pages()
Definition: blog.h:750
const StringPiece get_kind() const
Definition: blog.h:647
BlogPosts mutable_posts()
Definition: blog.h:807
const StringPiece GetTypeName() const
Definition: blog.h:369
void clear_status()
Definition: blog.h:898
void set_kind(const StringPiece &value)
Definition: blog.h:660
client::DateTime get_published() const
Definition: blog.h:832
bool has_published() const
Definition: blog.h:817
bool has_description() const
Definition: blog.h:558
bool has_self_link() const
Definition: blog.h:409
BlogPages mutable_pages()
Definition: blog.h:770
bool has_locale() const
Definition: blog.h:669
bool has_self_link() const
Definition: blog.h:854
void set_self_link(const StringPiece &value)
Definition: blog.h:437
void clear_total_items()
Definition: blog.h:303
const StringPiece GetTypeName() const
Definition: blog.h:94
void clear_description()
Definition: blog.h:565
void clear_custom_meta_data()
Definition: blog.h:528
bool has_total_items() const
Definition: blog.h:296
bool has_language() const
Definition: blog.h:140
const StringPiece get_language() const
Definition: blog.h:155
void set_updated(client::DateTime value)
Definition: blog.h:955
void clear_country()
Definition: blog.h:110
const StringPiece get_id() const
Definition: blog.h:610
bool has_id() const
Definition: blog.h:595
void set_description(const StringPiece &value)
Definition: blog.h:586
const StringPiece get_self_link() const
Definition: blog.h:274
void clear_self_link()
Definition: blog.h:416
void clear_language()
Definition: blog.h:147
int32 get_total_items() const
Definition: blog.h:461
void clear_id()
Definition: blog.h:602
const StringPiece GetTypeName() const
Definition: blog.h:250
void clear_posts()
Definition: blog.h:787
void clear_updated()
Definition: blog.h:935
void clear_published()
Definition: blog.h:824
const StringPiece get_description() const
Definition: blog.h:573
void set_variant(const StringPiece &value)
Definition: blog.h:205
bool has_self_link() const
Definition: blog.h:259
void clear_self_link()
Definition: blog.h:861
Definition: blog.cc:44
bool has_total_items() const
Definition: blog.h:446
const StringPiece get_variant() const
Definition: blog.h:192
bool has_custom_meta_data() const
Definition: blog.h:521
Definition: blog.h:42
bool has_status() const
Definition: blog.h:891
BlogLocale mutable_locale()
Definition: blog.h:696
void set_language(const StringPiece &value)
Definition: blog.h:168
void set_self_link(const StringPiece &value)
Definition: blog.h:882
const BlogPages get_pages() const
Definition: blog.h:758
bool has_updated() const
Definition: blog.h:928
bool has_items() const
Definition: blog.h:378
void set_status(const StringPiece &value)
Definition: blog.h:919
void clear_kind()
Definition: blog.h:639
void set_total_items(int32 value)
Definition: blog.h:323
int32 get_total_items() const
Definition: blog.h:311
void set_country(const StringPiece &value)
Definition: blog.h:131
bool has_posts() const
Definition: blog.h:780
void clear_variant()
Definition: blog.h:184
void set_url(const StringPiece &value)
Definition: blog.h:993
bool has_name() const
Definition: blog.h:706
bool has_kind() const
Definition: blog.h:632
const StringPiece get_country() const
Definition: blog.h:118
const StringPiece GetTypeName() const
Definition: blog.h:512
void set_id(const StringPiece &value)
Definition: blog.h:623
const BlogPosts get_posts() const
Definition: blog.h:795
void set_self_link(const StringPiece &value)
Definition: blog.h:287
const StringPiece get_url() const
Definition: blog.h:980
Definition: blog.h:54
void clear_self_link()
Definition: blog.h:266
bool has_country() const
Definition: blog.h:103
bool has_pages() const
Definition: blog.h:743
const StringPiece get_self_link() const
Definition: blog.h:869
const StringPiece get_status() const
Definition: blog.h:906
const StringPiece get_self_link() const
Definition: blog.h:424
void set_name(const StringPiece &value)
Definition: blog.h:734
bool has_variant() const
Definition: blog.h:177
client::DateTime get_updated() const
Definition: blog.h:943
void clear_name()
Definition: blog.h:713
const BlogLocale get_locale() const
Definition: blog.h:684
void clear_total_items()
Definition: blog.h:453
const StringPiece get_custom_meta_data() const
Definition: blog.h:536
const StringPiece get_name() const
Definition: blog.h:721