blogger  v2
user.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_USER_H_
31 #define GOOGLE_BLOGGER_API_USER_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 User : public client::JsonCppData {
51  public:
57  class UserBlogs : public client::JsonCppData {
58  public:
64  static UserBlogs* New();
65 
71  explicit UserBlogs(const Json::Value& storage);
72 
78  explicit UserBlogs(Json::Value* storage);
79 
83  virtual ~UserBlogs();
84 
90  const StringPiece GetTypeName() const {
91  return StringPiece("google_blogger_api::UserBlogs");
92  }
93 
99  bool has_self_link() const {
100  return Storage().isMember("selfLink");
101  }
102 
107  MutableStorage()->removeMember("selfLink");
108  }
109 
110 
114  const StringPiece get_self_link() const {
115  const Json::Value& v = Storage("selfLink");
116  if (v == Json::Value::null) return StringPiece("");
117  return StringPiece(v.asCString());
118  }
119 
127  void set_self_link(const StringPiece& value) {
128  *MutableStorage("selfLink") = value.data();
129  }
130 
131  private:
132  void operator=(const UserBlogs&);
133  }; // UserBlogs
139  class UserLocale : public client::JsonCppData {
140  public:
146  static UserLocale* New();
147 
153  explicit UserLocale(const Json::Value& storage);
154 
160  explicit UserLocale(Json::Value* storage);
161 
165  virtual ~UserLocale();
166 
172  const StringPiece GetTypeName() const {
173  return StringPiece("google_blogger_api::UserLocale");
174  }
175 
181  bool has_country() const {
182  return Storage().isMember("country");
183  }
184 
188  void clear_country() {
189  MutableStorage()->removeMember("country");
190  }
191 
192 
196  const StringPiece get_country() const {
197  const Json::Value& v = Storage("country");
198  if (v == Json::Value::null) return StringPiece("");
199  return StringPiece(v.asCString());
200  }
201 
209  void set_country(const StringPiece& value) {
210  *MutableStorage("country") = value.data();
211  }
212 
218  bool has_language() const {
219  return Storage().isMember("language");
220  }
221 
225  void clear_language() {
226  MutableStorage()->removeMember("language");
227  }
228 
229 
233  const StringPiece get_language() const {
234  const Json::Value& v = Storage("language");
235  if (v == Json::Value::null) return StringPiece("");
236  return StringPiece(v.asCString());
237  }
238 
246  void set_language(const StringPiece& value) {
247  *MutableStorage("language") = value.data();
248  }
249 
255  bool has_variant() const {
256  return Storage().isMember("variant");
257  }
258 
262  void clear_variant() {
263  MutableStorage()->removeMember("variant");
264  }
265 
266 
270  const StringPiece get_variant() const {
271  const Json::Value& v = Storage("variant");
272  if (v == Json::Value::null) return StringPiece("");
273  return StringPiece(v.asCString());
274  }
275 
283  void set_variant(const StringPiece& value) {
284  *MutableStorage("variant") = value.data();
285  }
286 
287  private:
288  void operator=(const UserLocale&);
289  }; // UserLocale
295  static User* New();
296 
302  explicit User(const Json::Value& storage);
303 
309  explicit User(Json::Value* storage);
310 
314  virtual ~User();
315 
321  const StringPiece GetTypeName() const {
322  return StringPiece("google_blogger_api::User");
323  }
324 
330  bool has_about() const {
331  return Storage().isMember("about");
332  }
333 
337  void clear_about() {
338  MutableStorage()->removeMember("about");
339  }
340 
341 
345  const StringPiece get_about() const {
346  const Json::Value& v = Storage("about");
347  if (v == Json::Value::null) return StringPiece("");
348  return StringPiece(v.asCString());
349  }
350 
358  void set_about(const StringPiece& value) {
359  *MutableStorage("about") = value.data();
360  }
361 
367  bool has_blogs() const {
368  return Storage().isMember("blogs");
369  }
370 
374  void clear_blogs() {
375  MutableStorage()->removeMember("blogs");
376  }
377 
378 
382  const UserBlogs get_blogs() const {
383  const Json::Value& storage = Storage("blogs");
384  return client::JsonValueToCppValueHelper<UserBlogs >(storage);
385  }
386 
395  Json::Value* storage = MutableStorage("blogs");
396  return client::JsonValueToMutableCppValueHelper<UserBlogs >(storage);
397  }
398 
404  bool has_created() const {
405  return Storage().isMember("created");
406  }
407 
411  void clear_created() {
412  MutableStorage()->removeMember("created");
413  }
414 
415 
419  const StringPiece get_created() const {
420  const Json::Value& v = Storage("created");
421  if (v == Json::Value::null) return StringPiece("");
422  return StringPiece(v.asCString());
423  }
424 
432  void set_created(const StringPiece& value) {
433  *MutableStorage("created") = value.data();
434  }
435 
441  bool has_display_name() const {
442  return Storage().isMember("displayName");
443  }
444 
449  MutableStorage()->removeMember("displayName");
450  }
451 
452 
456  const StringPiece get_display_name() const {
457  const Json::Value& v = Storage("displayName");
458  if (v == Json::Value::null) return StringPiece("");
459  return StringPiece(v.asCString());
460  }
461 
469  void set_display_name(const StringPiece& value) {
470  *MutableStorage("displayName") = value.data();
471  }
472 
478  bool has_id() const {
479  return Storage().isMember("id");
480  }
481 
485  void clear_id() {
486  MutableStorage()->removeMember("id");
487  }
488 
489 
493  const StringPiece get_id() const {
494  const Json::Value& v = Storage("id");
495  if (v == Json::Value::null) return StringPiece("");
496  return StringPiece(v.asCString());
497  }
498 
506  void set_id(const StringPiece& value) {
507  *MutableStorage("id") = value.data();
508  }
509 
515  bool has_kind() const {
516  return Storage().isMember("kind");
517  }
518 
522  void clear_kind() {
523  MutableStorage()->removeMember("kind");
524  }
525 
526 
530  const StringPiece get_kind() const {
531  const Json::Value& v = Storage("kind");
532  if (v == Json::Value::null) return StringPiece("");
533  return StringPiece(v.asCString());
534  }
535 
543  void set_kind(const StringPiece& value) {
544  *MutableStorage("kind") = value.data();
545  }
546 
552  bool has_locale() const {
553  return Storage().isMember("locale");
554  }
555 
559  void clear_locale() {
560  MutableStorage()->removeMember("locale");
561  }
562 
563 
567  const UserLocale get_locale() const {
568  const Json::Value& storage = Storage("locale");
569  return client::JsonValueToCppValueHelper<UserLocale >(storage);
570  }
571 
580  Json::Value* storage = MutableStorage("locale");
581  return client::JsonValueToMutableCppValueHelper<UserLocale >(storage);
582  }
583 
589  bool has_self_link() const {
590  return Storage().isMember("selfLink");
591  }
592 
597  MutableStorage()->removeMember("selfLink");
598  }
599 
600 
604  const StringPiece get_self_link() const {
605  const Json::Value& v = Storage("selfLink");
606  if (v == Json::Value::null) return StringPiece("");
607  return StringPiece(v.asCString());
608  }
609 
617  void set_self_link(const StringPiece& value) {
618  *MutableStorage("selfLink") = value.data();
619  }
620 
626  bool has_url() const {
627  return Storage().isMember("url");
628  }
629 
633  void clear_url() {
634  MutableStorage()->removeMember("url");
635  }
636 
637 
641  const StringPiece get_url() const {
642  const Json::Value& v = Storage("url");
643  if (v == Json::Value::null) return StringPiece("");
644  return StringPiece(v.asCString());
645  }
646 
654  void set_url(const StringPiece& value) {
655  *MutableStorage("url") = value.data();
656  }
657 
658  private:
659  void operator=(const User&);
660 }; // User
661 } // namespace google_blogger_api
662 #endif // GOOGLE_BLOGGER_API_USER_H_
void clear_locale()
Definition: user.h:559
const StringPiece get_country() const
Definition: user.h:196
const StringPiece GetTypeName() const
Definition: user.h:321
const UserLocale get_locale() const
Definition: user.h:567
void set_self_link(const StringPiece &value)
Definition: user.h:127
bool has_about() const
Definition: user.h:330
const StringPiece get_display_name() const
Definition: user.h:456
void clear_variant()
Definition: user.h:262
void clear_language()
Definition: user.h:225
void set_display_name(const StringPiece &value)
Definition: user.h:469
void clear_self_link()
Definition: user.h:106
bool has_id() const
Definition: user.h:478
const StringPiece get_language() const
Definition: user.h:233
const StringPiece get_created() const
Definition: user.h:419
bool has_blogs() const
Definition: user.h:367
UserBlogs mutable_blogs()
Definition: user.h:394
void clear_display_name()
Definition: user.h:448
const StringPiece get_kind() const
Definition: user.h:530
bool has_url() const
Definition: user.h:626
const StringPiece GetTypeName() const
Definition: user.h:90
bool has_country() const
Definition: user.h:181
const UserBlogs get_blogs() const
Definition: user.h:382
void clear_country()
Definition: user.h:188
const StringPiece get_id() const
Definition: user.h:493
void set_country(const StringPiece &value)
Definition: user.h:209
bool has_language() const
Definition: user.h:218
void set_variant(const StringPiece &value)
Definition: user.h:283
const StringPiece get_self_link() const
Definition: user.h:114
const StringPiece get_variant() const
Definition: user.h:270
bool has_locale() const
Definition: user.h:552
Definition: user.h:50
bool has_self_link() const
Definition: user.h:589
bool has_variant() const
Definition: user.h:255
bool has_display_name() const
Definition: user.h:441
void set_created(const StringPiece &value)
Definition: user.h:432
void clear_kind()
Definition: user.h:522
Definition: blog.cc:44
void clear_url()
Definition: user.h:633
const StringPiece get_url() const
Definition: user.h:641
const StringPiece GetTypeName() const
Definition: user.h:172
void set_url(const StringPiece &value)
Definition: user.h:654
bool has_self_link() const
Definition: user.h:99
Definition: blog.h:41
void set_self_link(const StringPiece &value)
Definition: user.h:617
void clear_about()
Definition: user.h:337
const StringPiece get_self_link() const
Definition: user.h:604
bool has_kind() const
Definition: user.h:515
UserLocale mutable_locale()
Definition: user.h:579
void set_about(const StringPiece &value)
Definition: user.h:358
void clear_self_link()
Definition: user.h:596
void set_id(const StringPiece &value)
Definition: user.h:506
void clear_blogs()
Definition: user.h:374
const StringPiece get_about() const
Definition: user.h:345
void clear_id()
Definition: user.h:485
void set_kind(const StringPiece &value)
Definition: user.h:543
bool has_created() const
Definition: user.h:404
void set_language(const StringPiece &value)
Definition: user.h:246
void clear_created()
Definition: user.h:411