30 #ifndef GOOGLE_ANALYTICS_API_ACCOUNT_H_ 31 #define GOOGLE_ANALYTICS_API_ACCOUNT_H_ 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" 51 class Account :
public client::JsonCppData {
93 return StringPiece(
"google_analytics_api::AccountChildLink");
102 return Storage().isMember(
"href");
109 MutableStorage()->removeMember(
"href");
117 const Json::Value& v = Storage(
"href");
118 if (v == Json::Value::null)
return StringPiece(
"");
119 return StringPiece(v.asCString());
130 *MutableStorage(
"href") = value.data();
139 return Storage().isMember(
"type");
146 MutableStorage()->removeMember(
"type");
154 const Json::Value& v = Storage(
"type");
155 if (v == Json::Value::null)
return StringPiece(
"");
156 return StringPiece(v.asCString());
167 *MutableStorage(
"type") = value.data();
212 return StringPiece(
"google_analytics_api::AccountPermissions");
221 return Storage().isMember(
"effective");
228 MutableStorage()->removeMember(
"effective");
236 const Json::Value& storage = Storage(
"effective");
237 return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
250 Json::Value* storage = MutableStorage(
"effective");
251 return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
269 explicit Account(
const Json::Value& storage);
276 explicit Account(Json::Value* storage);
289 return StringPiece(
"google_analytics_api::Account");
298 return Storage().isMember(
"childLink");
305 MutableStorage()->removeMember(
"childLink");
313 const Json::Value& storage = Storage(
"childLink");
314 return client::JsonValueToCppValueHelper<AccountChildLink >(storage);
327 Json::Value* storage = MutableStorage(
"childLink");
328 return client::JsonValueToMutableCppValueHelper<AccountChildLink >(storage);
337 return Storage().isMember(
"created");
344 MutableStorage()->removeMember(
"created");
352 const Json::Value& storage = Storage(
"created");
353 return client::JsonValueToCppValueHelper<client::DateTime >(storage);
364 client::SetJsonValueFromCppValueHelper<client::DateTime >(
365 value, MutableStorage(
"created"));
374 return Storage().isMember(
"id");
381 MutableStorage()->removeMember(
"id");
389 const Json::Value& v = Storage(
"id");
390 if (v == Json::Value::null)
return StringPiece(
"");
391 return StringPiece(v.asCString());
402 *MutableStorage(
"id") = value.data();
411 return Storage().isMember(
"kind");
418 MutableStorage()->removeMember(
"kind");
426 const Json::Value& v = Storage(
"kind");
427 if (v == Json::Value::null)
return StringPiece(
"");
428 return StringPiece(v.asCString());
439 *MutableStorage(
"kind") = value.data();
448 return Storage().isMember(
"name");
455 MutableStorage()->removeMember(
"name");
463 const Json::Value& v = Storage(
"name");
464 if (v == Json::Value::null)
return StringPiece(
"");
465 return StringPiece(v.asCString());
476 *MutableStorage(
"name") = value.data();
485 return Storage().isMember(
"permissions");
492 MutableStorage()->removeMember(
"permissions");
500 const Json::Value& storage = Storage(
"permissions");
501 return client::JsonValueToCppValueHelper<AccountPermissions >(storage);
513 Json::Value* storage = MutableStorage(
"permissions");
514 return client::JsonValueToMutableCppValueHelper<AccountPermissions >(storage);
523 return Storage().isMember(
"selfLink");
530 MutableStorage()->removeMember(
"selfLink");
538 const Json::Value& v = Storage(
"selfLink");
539 if (v == Json::Value::null)
return StringPiece(
"");
540 return StringPiece(v.asCString());
551 *MutableStorage(
"selfLink") = value.data();
560 return Storage().isMember(
"starred");
567 MutableStorage()->removeMember(
"starred");
575 const Json::Value& storage = Storage(
"starred");
576 return client::JsonValueToCppValueHelper<bool >(storage);
587 client::SetJsonValueFromCppValueHelper<bool >(
588 value, MutableStorage(
"starred"));
597 return Storage().isMember(
"updated");
604 MutableStorage()->removeMember(
"updated");
612 const Json::Value& storage = Storage(
"updated");
613 return client::JsonValueToCppValueHelper<client::DateTime >(storage);
624 client::SetJsonValueFromCppValueHelper<client::DateTime >(
625 value, MutableStorage(
"updated"));
629 void operator=(
const Account&);
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
void clear_href()
Definition: account.h:108
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 set_type(const StringPiece &value)
Definition: account.h:166
bool has_type() const
Definition: account.h:138
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 clear_type()
Definition: account.h:145
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
const StringPiece GetTypeName() const
Definition: account.h:92
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.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
const StringPiece get_type() const
Definition: account.h:153
AccountChildLink mutable_childLink()
Definition: account.h:326
AccountPermissions mutable_permissions()
Definition: account.h:512
Definition: account.h:178
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
bool has_href() const
Definition: account.h:101
void clear_starred()
Definition: account.h:566
client::DateTime get_updated() const
Definition: account.h:611
bool has_updated() const
Definition: account.h:596
void set_href(const StringPiece &value)
Definition: account.h:129
const StringPiece get_href() const
Definition: account.h:116