blogger  v3
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-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_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/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 User : public client::JsonCppData {
52  public:
58  class UserBlogs : public client::JsonCppData {
59  public:
65  static UserBlogs* New();
66 
72  explicit UserBlogs(const Json::Value& storage);
73 
79  explicit UserBlogs(Json::Value* storage);
80 
84  virtual ~UserBlogs();
85 
91  const StringPiece GetTypeName() const {
92  return StringPiece("google_blogger_api::UserBlogs");
93  }
94 
100  bool has_self_link() const {
101  return Storage().isMember("selfLink");
102  }
103 
108  MutableStorage()->removeMember("selfLink");
109  }
110 
111 
115  const StringPiece get_self_link() const {
116  const Json::Value& v = Storage("selfLink");
117  if (v == Json::Value::null) return StringPiece("");
118  return StringPiece(v.asCString());
119  }
120 
128  void set_self_link(const StringPiece& value) {
129  *MutableStorage("selfLink") = value.data();
130  }
131 
132  private:
133  void operator=(const UserBlogs&);
134  }; // UserBlogs
140  class UserLocale : public client::JsonCppData {
141  public:
147  static UserLocale* New();
148 
154  explicit UserLocale(const Json::Value& storage);
155 
161  explicit UserLocale(Json::Value* storage);
162 
166  virtual ~UserLocale();
167 
173  const StringPiece GetTypeName() const {
174  return StringPiece("google_blogger_api::UserLocale");
175  }
176 
182  bool has_country() const {
183  return Storage().isMember("country");
184  }
185 
189  void clear_country() {
190  MutableStorage()->removeMember("country");
191  }
192 
193 
197  const StringPiece get_country() const {
198  const Json::Value& v = Storage("country");
199  if (v == Json::Value::null) return StringPiece("");
200  return StringPiece(v.asCString());
201  }
202 
210  void set_country(const StringPiece& value) {
211  *MutableStorage("country") = value.data();
212  }
213 
219  bool has_language() const {
220  return Storage().isMember("language");
221  }
222 
226  void clear_language() {
227  MutableStorage()->removeMember("language");
228  }
229 
230 
234  const StringPiece get_language() const {
235  const Json::Value& v = Storage("language");
236  if (v == Json::Value::null) return StringPiece("");
237  return StringPiece(v.asCString());
238  }
239 
247  void set_language(const StringPiece& value) {
248  *MutableStorage("language") = value.data();
249  }
250 
256  bool has_variant() const {
257  return Storage().isMember("variant");
258  }
259 
263  void clear_variant() {
264  MutableStorage()->removeMember("variant");
265  }
266 
267 
271  const StringPiece get_variant() const {
272  const Json::Value& v = Storage("variant");
273  if (v == Json::Value::null) return StringPiece("");
274  return StringPiece(v.asCString());
275  }
276 
284  void set_variant(const StringPiece& value) {
285  *MutableStorage("variant") = value.data();
286  }
287 
288  private:
289  void operator=(const UserLocale&);
290  }; // UserLocale
296  static User* New();
297 
303  explicit User(const Json::Value& storage);
304 
310  explicit User(Json::Value* storage);
311 
315  virtual ~User();
316 
322  const StringPiece GetTypeName() const {
323  return StringPiece("google_blogger_api::User");
324  }
325 
331  bool has_about() const {
332  return Storage().isMember("about");
333  }
334 
338  void clear_about() {
339  MutableStorage()->removeMember("about");
340  }
341 
342 
346  const StringPiece get_about() const {
347  const Json::Value& v = Storage("about");
348  if (v == Json::Value::null) return StringPiece("");
349  return StringPiece(v.asCString());
350  }
351 
359  void set_about(const StringPiece& value) {
360  *MutableStorage("about") = value.data();
361  }
362 
368  bool has_blogs() const {
369  return Storage().isMember("blogs");
370  }
371 
375  void clear_blogs() {
376  MutableStorage()->removeMember("blogs");
377  }
378 
379 
383  const UserBlogs get_blogs() const {
384  const Json::Value& storage = Storage("blogs");
385  return client::JsonValueToCppValueHelper<UserBlogs >(storage);
386  }
387 
396  Json::Value* storage = MutableStorage("blogs");
397  return client::JsonValueToMutableCppValueHelper<UserBlogs >(storage);
398  }
399 
405  bool has_created() const {
406  return Storage().isMember("created");
407  }
408 
412  void clear_created() {
413  MutableStorage()->removeMember("created");
414  }
415 
416 
420  client::DateTime get_created() const {
421  const Json::Value& storage = Storage("created");
422  return client::JsonValueToCppValueHelper<client::DateTime >(storage);
423  }
424 
432  void set_created(client::DateTime value) {
433  client::SetJsonValueFromCppValueHelper<client::DateTime >(
434  value, MutableStorage("created"));
435  }
436 
442  bool has_display_name() const {
443  return Storage().isMember("displayName");
444  }
445 
450  MutableStorage()->removeMember("displayName");
451  }
452 
453 
457  const StringPiece get_display_name() const {
458  const Json::Value& v = Storage("displayName");
459  if (v == Json::Value::null) return StringPiece("");
460  return StringPiece(v.asCString());
461  }
462 
470  void set_display_name(const StringPiece& value) {
471  *MutableStorage("displayName") = value.data();
472  }
473 
479  bool has_id() const {
480  return Storage().isMember("id");
481  }
482 
486  void clear_id() {
487  MutableStorage()->removeMember("id");
488  }
489 
490 
494  const StringPiece get_id() const {
495  const Json::Value& v = Storage("id");
496  if (v == Json::Value::null) return StringPiece("");
497  return StringPiece(v.asCString());
498  }
499 
507  void set_id(const StringPiece& value) {
508  *MutableStorage("id") = value.data();
509  }
510 
516  bool has_kind() const {
517  return Storage().isMember("kind");
518  }
519 
523  void clear_kind() {
524  MutableStorage()->removeMember("kind");
525  }
526 
527 
531  const StringPiece get_kind() const {
532  const Json::Value& v = Storage("kind");
533  if (v == Json::Value::null) return StringPiece("");
534  return StringPiece(v.asCString());
535  }
536 
544  void set_kind(const StringPiece& value) {
545  *MutableStorage("kind") = value.data();
546  }
547 
553  bool has_locale() const {
554  return Storage().isMember("locale");
555  }
556 
560  void clear_locale() {
561  MutableStorage()->removeMember("locale");
562  }
563 
564 
568  const UserLocale get_locale() const {
569  const Json::Value& storage = Storage("locale");
570  return client::JsonValueToCppValueHelper<UserLocale >(storage);
571  }
572 
581  Json::Value* storage = MutableStorage("locale");
582  return client::JsonValueToMutableCppValueHelper<UserLocale >(storage);
583  }
584 
590  bool has_self_link() const {
591  return Storage().isMember("selfLink");
592  }
593 
598  MutableStorage()->removeMember("selfLink");
599  }
600 
601 
605  const StringPiece get_self_link() const {
606  const Json::Value& v = Storage("selfLink");
607  if (v == Json::Value::null) return StringPiece("");
608  return StringPiece(v.asCString());
609  }
610 
618  void set_self_link(const StringPiece& value) {
619  *MutableStorage("selfLink") = value.data();
620  }
621 
627  bool has_url() const {
628  return Storage().isMember("url");
629  }
630 
634  void clear_url() {
635  MutableStorage()->removeMember("url");
636  }
637 
638 
642  const StringPiece get_url() const {
643  const Json::Value& v = Storage("url");
644  if (v == Json::Value::null) return StringPiece("");
645  return StringPiece(v.asCString());
646  }
647 
655  void set_url(const StringPiece& value) {
656  *MutableStorage("url") = value.data();
657  }
658 
659  private:
660  void operator=(const User&);
661 }; // User
662 } // namespace google_blogger_api
663 #endif // GOOGLE_BLOGGER_API_USER_H_
void clear_locale()
Definition: user.h:560
const StringPiece get_country() const
Definition: user.h:197
const StringPiece GetTypeName() const
Definition: user.h:322
const UserLocale get_locale() const
Definition: user.h:568
void set_self_link(const StringPiece &value)
Definition: user.h:128
bool has_about() const
Definition: user.h:331
const StringPiece get_display_name() const
Definition: user.h:457
void clear_variant()
Definition: user.h:263
void clear_language()
Definition: user.h:226
void set_display_name(const StringPiece &value)
Definition: user.h:470
void clear_self_link()
Definition: user.h:107
bool has_id() const
Definition: user.h:479
const StringPiece get_language() const
Definition: user.h:234
bool has_blogs() const
Definition: user.h:368
UserBlogs mutable_blogs()
Definition: user.h:395
void clear_display_name()
Definition: user.h:449
const StringPiece get_kind() const
Definition: user.h:531
bool has_url() const
Definition: user.h:627
const StringPiece GetTypeName() const
Definition: user.h:91
bool has_country() const
Definition: user.h:182
const UserBlogs get_blogs() const
Definition: user.h:383
void clear_country()
Definition: user.h:189
const StringPiece get_id() const
Definition: user.h:494
void set_country(const StringPiece &value)
Definition: user.h:210
bool has_language() const
Definition: user.h:219
void set_variant(const StringPiece &value)
Definition: user.h:284
const StringPiece get_self_link() const
Definition: user.h:115
const StringPiece get_variant() const
Definition: user.h:271
bool has_locale() const
Definition: user.h:553
Definition: user.h:51
bool has_self_link() const
Definition: user.h:590
bool has_variant() const
Definition: user.h:256
bool has_display_name() const
Definition: user.h:442
void clear_kind()
Definition: user.h:523
Definition: blog.cc:44
void clear_url()
Definition: user.h:634
const StringPiece get_url() const
Definition: user.h:642
const StringPiece GetTypeName() const
Definition: user.h:173
void set_url(const StringPiece &value)
Definition: user.h:655
bool has_self_link() const
Definition: user.h:100
Definition: blog.h:42
void set_self_link(const StringPiece &value)
Definition: user.h:618
void clear_about()
Definition: user.h:338
const StringPiece get_self_link() const
Definition: user.h:605
bool has_kind() const
Definition: user.h:516
UserLocale mutable_locale()
Definition: user.h:580
void set_about(const StringPiece &value)
Definition: user.h:359
void clear_self_link()
Definition: user.h:597
void set_id(const StringPiece &value)
Definition: user.h:507
void clear_blogs()
Definition: user.h:375
client::DateTime get_created() const
Definition: user.h:420
const StringPiece get_about() const
Definition: user.h:346
void clear_id()
Definition: user.h:486
void set_created(client::DateTime value)
Definition: user.h:432
void set_kind(const StringPiece &value)
Definition: user.h:544
bool has_created() const
Definition: user.h:405
void set_language(const StringPiece &value)
Definition: user.h:247
void clear_created()
Definition: user.h:412