analytics  v3
account.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-01-30, 05:27:32 UTC
18 // C++ generator version: 0.1.4
19 
20 // ----------------------------------------------------------------------------
21 // NOTE: This file is generated from Google APIs Discovery Service.
22 // Service:
23 // Google Analytics API (analytics/v3)
24 // Generated from:
25 // Version: v3
26 // Revision: 169
27 // Generated by:
28 // Tool: google-apis-code-generator 1.5.1
29 // C++: 0.1.4
30 #ifndef GOOGLE_ANALYTICS_API_ACCOUNT_H_
31 #define GOOGLE_ANALYTICS_API_ACCOUNT_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_analytics_api {
44 using namespace googleapis;
45 
51 class Account : public client::JsonCppData {
52  public:
59  class AccountChildLink : public client::JsonCppData {
60  public:
66  static AccountChildLink* New();
67 
73  explicit AccountChildLink(const Json::Value& storage);
74 
80  explicit AccountChildLink(Json::Value* storage);
81 
85  virtual ~AccountChildLink();
86 
92  const StringPiece GetTypeName() const {
93  return StringPiece("google_analytics_api::AccountChildLink");
94  }
95 
101  bool has_href() const {
102  return Storage().isMember("href");
103  }
104 
108  void clear_href() {
109  MutableStorage()->removeMember("href");
110  }
111 
112 
116  const StringPiece get_href() const {
117  const Json::Value& v = Storage("href");
118  if (v == Json::Value::null) return StringPiece("");
119  return StringPiece(v.asCString());
120  }
121 
129  void set_href(const StringPiece& value) {
130  *MutableStorage("href") = value.data();
131  }
132 
138  bool has_type() const {
139  return Storage().isMember("type");
140  }
141 
145  void clear_type() {
146  MutableStorage()->removeMember("type");
147  }
148 
149 
153  const StringPiece get_type() const {
154  const Json::Value& v = Storage("type");
155  if (v == Json::Value::null) return StringPiece("");
156  return StringPiece(v.asCString());
157  }
158 
166  void set_type(const StringPiece& value) {
167  *MutableStorage("type") = value.data();
168  }
169 
170  private:
171  void operator=(const AccountChildLink&);
172  }; // AccountChildLink
178  class AccountPermissions : public client::JsonCppData {
179  public:
185  static AccountPermissions* New();
186 
192  explicit AccountPermissions(const Json::Value& storage);
193 
199  explicit AccountPermissions(Json::Value* storage);
200 
204  virtual ~AccountPermissions();
205 
211  const StringPiece GetTypeName() const {
212  return StringPiece("google_analytics_api::AccountPermissions");
213  }
214 
220  bool has_effective() const {
221  return Storage().isMember("effective");
222  }
223 
228  MutableStorage()->removeMember("effective");
229  }
230 
231 
235  const client::JsonCppArray<string > get_effective() const {
236  const Json::Value& storage = Storage("effective");
237  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
238  }
239 
249  client::JsonCppArray<string > mutable_effective() {
250  Json::Value* storage = MutableStorage("effective");
251  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
252  }
253 
254  private:
255  void operator=(const AccountPermissions&);
256  }; // AccountPermissions
262  static Account* New();
263 
269  explicit Account(const Json::Value& storage);
270 
276  explicit Account(Json::Value* storage);
277 
281  virtual ~Account();
282 
288  const StringPiece GetTypeName() const {
289  return StringPiece("google_analytics_api::Account");
290  }
291 
297  bool has_child_link() const {
298  return Storage().isMember("childLink");
299  }
300 
305  MutableStorage()->removeMember("childLink");
306  }
307 
308 
313  const Json::Value& storage = Storage("childLink");
314  return client::JsonValueToCppValueHelper<AccountChildLink >(storage);
315  }
316 
327  Json::Value* storage = MutableStorage("childLink");
328  return client::JsonValueToMutableCppValueHelper<AccountChildLink >(storage);
329  }
330 
336  bool has_created() const {
337  return Storage().isMember("created");
338  }
339 
343  void clear_created() {
344  MutableStorage()->removeMember("created");
345  }
346 
347 
351  client::DateTime get_created() const {
352  const Json::Value& storage = Storage("created");
353  return client::JsonValueToCppValueHelper<client::DateTime >(storage);
354  }
355 
363  void set_created(client::DateTime value) {
364  client::SetJsonValueFromCppValueHelper<client::DateTime >(
365  value, MutableStorage("created"));
366  }
367 
373  bool has_id() const {
374  return Storage().isMember("id");
375  }
376 
380  void clear_id() {
381  MutableStorage()->removeMember("id");
382  }
383 
384 
388  const StringPiece get_id() const {
389  const Json::Value& v = Storage("id");
390  if (v == Json::Value::null) return StringPiece("");
391  return StringPiece(v.asCString());
392  }
393 
401  void set_id(const StringPiece& value) {
402  *MutableStorage("id") = value.data();
403  }
404 
410  bool has_kind() const {
411  return Storage().isMember("kind");
412  }
413 
417  void clear_kind() {
418  MutableStorage()->removeMember("kind");
419  }
420 
421 
425  const StringPiece get_kind() const {
426  const Json::Value& v = Storage("kind");
427  if (v == Json::Value::null) return StringPiece("");
428  return StringPiece(v.asCString());
429  }
430 
438  void set_kind(const StringPiece& value) {
439  *MutableStorage("kind") = value.data();
440  }
441 
447  bool has_name() const {
448  return Storage().isMember("name");
449  }
450 
454  void clear_name() {
455  MutableStorage()->removeMember("name");
456  }
457 
458 
462  const StringPiece get_name() const {
463  const Json::Value& v = Storage("name");
464  if (v == Json::Value::null) return StringPiece("");
465  return StringPiece(v.asCString());
466  }
467 
475  void set_name(const StringPiece& value) {
476  *MutableStorage("name") = value.data();
477  }
478 
484  bool has_permissions() const {
485  return Storage().isMember("permissions");
486  }
487 
492  MutableStorage()->removeMember("permissions");
493  }
494 
495 
500  const Json::Value& storage = Storage("permissions");
501  return client::JsonValueToCppValueHelper<AccountPermissions >(storage);
502  }
503 
513  Json::Value* storage = MutableStorage("permissions");
514  return client::JsonValueToMutableCppValueHelper<AccountPermissions >(storage);
515  }
516 
522  bool has_self_link() const {
523  return Storage().isMember("selfLink");
524  }
525 
530  MutableStorage()->removeMember("selfLink");
531  }
532 
533 
537  const StringPiece get_self_link() const {
538  const Json::Value& v = Storage("selfLink");
539  if (v == Json::Value::null) return StringPiece("");
540  return StringPiece(v.asCString());
541  }
542 
550  void set_self_link(const StringPiece& value) {
551  *MutableStorage("selfLink") = value.data();
552  }
553 
559  bool has_starred() const {
560  return Storage().isMember("starred");
561  }
562 
566  void clear_starred() {
567  MutableStorage()->removeMember("starred");
568  }
569 
570 
574  bool get_starred() const {
575  const Json::Value& storage = Storage("starred");
576  return client::JsonValueToCppValueHelper<bool >(storage);
577  }
578 
586  void set_starred(bool value) {
587  client::SetJsonValueFromCppValueHelper<bool >(
588  value, MutableStorage("starred"));
589  }
590 
596  bool has_updated() const {
597  return Storage().isMember("updated");
598  }
599 
603  void clear_updated() {
604  MutableStorage()->removeMember("updated");
605  }
606 
607 
611  client::DateTime get_updated() const {
612  const Json::Value& storage = Storage("updated");
613  return client::JsonValueToCppValueHelper<client::DateTime >(storage);
614  }
615 
623  void set_updated(client::DateTime value) {
624  client::SetJsonValueFromCppValueHelper<client::DateTime >(
625  value, MutableStorage("updated"));
626  }
627 
628  private:
629  void operator=(const Account&);
630 }; // Account
631 } // namespace google_analytics_api
632 #endif // GOOGLE_ANALYTICS_API_ACCOUNT_H_
client::JsonCppArray< string > mutable_effective()
Definition: account.h:249
void set_kind(const StringPiece &value)
Definition: account.h:438
bool has_id() const
Definition: account.h:373
bool get_starred() const
Definition: account.h:574
const StringPiece GetTypeName() const
Definition: account.h:211
void set_created(client::DateTime value)
Definition: account.h:363
void clear_permissions()
Definition: account.h:491
bool has_self_link() const
Definition: account.h:522
bool has_effective() const
Definition: account.h:220
void set_name(const StringPiece &value)
Definition: account.h:475
void clear_created()
Definition: account.h:343
void clear_updated()
Definition: account.h:603
bool has_kind() const
Definition: account.h:410
bool has_created() const
Definition: account.h:336
void clear_effective()
Definition: account.h:227
void set_starred(bool value)
Definition: account.h:586
const client::JsonCppArray< string > get_effective() const
Definition: account.h:235
const StringPiece get_kind() const
Definition: account.h:425
void set_id(const StringPiece &value)
Definition: account.h:401
const AccountChildLink get_child_link() const
Definition: account.h:312
const StringPiece GetTypeName() const
Definition: account.h:288
Definition: account.h:51
void set_updated(client::DateTime value)
Definition: account.h:623
void clear_id()
Definition: account.h:380
client::DateTime get_created() const
Definition: account.h:351
Definition: account.h:39
Definition: account.cc:41
bool has_name() const
Definition: account.h:447
void clear_child_link()
Definition: account.h:304
const StringPiece get_name() const
Definition: account.h:462
bool has_permissions() const
Definition: account.h:484
void clear_self_link()
Definition: account.h:529
void clear_name()
Definition: account.h:454
const AccountPermissions get_permissions() const
Definition: account.h:499
bool has_starred() const
Definition: account.h:559
const StringPiece get_id() const
Definition: account.h:388
AccountChildLink mutable_childLink()
Definition: account.h:326
AccountPermissions mutable_permissions()
Definition: account.h:512
void set_self_link(const StringPiece &value)
Definition: account.h:550
bool has_child_link() const
Definition: account.h:297
const StringPiece get_self_link() const
Definition: account.h:537
void clear_kind()
Definition: account.h:417
void clear_starred()
Definition: account.h:566
client::DateTime get_updated() const
Definition: account.h:611
bool has_updated() const
Definition: account.h:596