30 #ifndef GOOGLE_ANALYTICS_API_PROFILE_H_ 31 #define GOOGLE_ANALYTICS_API_PROFILE_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 Profile :
public client::JsonCppData {
93 return StringPiece(
"google_analytics_api::ProfileChildLink");
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();
213 return StringPiece(
"google_analytics_api::ProfileParentLink");
222 return Storage().isMember(
"href");
229 MutableStorage()->removeMember(
"href");
237 const Json::Value& v = Storage(
"href");
238 if (v == Json::Value::null)
return StringPiece(
"");
239 return StringPiece(v.asCString());
250 *MutableStorage(
"href") = value.data();
259 return Storage().isMember(
"type");
266 MutableStorage()->removeMember(
"type");
274 const Json::Value& v = Storage(
"type");
275 if (v == Json::Value::null)
return StringPiece(
"");
276 return StringPiece(v.asCString());
287 *MutableStorage(
"type") = value.data();
332 return StringPiece(
"google_analytics_api::ProfilePermissions");
341 return Storage().isMember(
"effective");
348 MutableStorage()->removeMember(
"effective");
356 const Json::Value& storage = Storage(
"effective");
357 return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
371 Json::Value* storage = MutableStorage(
"effective");
372 return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
390 explicit Profile(
const Json::Value& storage);
397 explicit Profile(Json::Value* storage);
410 return StringPiece(
"google_analytics_api::Profile");
419 return Storage().isMember(
"accountId");
426 MutableStorage()->removeMember(
"accountId");
434 const Json::Value& v = Storage(
"accountId");
435 if (v == Json::Value::null)
return StringPiece(
"");
436 return StringPiece(v.asCString());
447 *MutableStorage(
"accountId") = value.data();
456 return Storage().isMember(
"botFilteringEnabled");
463 MutableStorage()->removeMember(
"botFilteringEnabled");
471 const Json::Value& storage = Storage(
"botFilteringEnabled");
472 return client::JsonValueToCppValueHelper<bool >(storage);
483 client::SetJsonValueFromCppValueHelper<bool >(
484 value, MutableStorage(
"botFilteringEnabled"));
493 return Storage().isMember(
"childLink");
500 MutableStorage()->removeMember(
"childLink");
508 const Json::Value& storage = Storage(
"childLink");
509 return client::JsonValueToCppValueHelper<ProfileChildLink >(storage);
522 Json::Value* storage = MutableStorage(
"childLink");
523 return client::JsonValueToMutableCppValueHelper<ProfileChildLink >(storage);
532 return Storage().isMember(
"created");
539 MutableStorage()->removeMember(
"created");
547 const Json::Value& storage = Storage(
"created");
548 return client::JsonValueToCppValueHelper<client::DateTime >(storage);
559 client::SetJsonValueFromCppValueHelper<client::DateTime >(
560 value, MutableStorage(
"created"));
569 return Storage().isMember(
"currency");
576 MutableStorage()->removeMember(
"currency");
584 const Json::Value& v = Storage(
"currency");
585 if (v == Json::Value::null)
return StringPiece(
"");
586 return StringPiece(v.asCString());
602 *MutableStorage(
"currency") = value.data();
611 return Storage().isMember(
"defaultPage");
618 MutableStorage()->removeMember(
"defaultPage");
626 const Json::Value& v = Storage(
"defaultPage");
627 if (v == Json::Value::null)
return StringPiece(
"");
628 return StringPiece(v.asCString());
639 *MutableStorage(
"defaultPage") = value.data();
648 return Storage().isMember(
"eCommerceTracking");
655 MutableStorage()->removeMember(
"eCommerceTracking");
663 const Json::Value& storage = Storage(
"eCommerceTracking");
664 return client::JsonValueToCppValueHelper<bool >(storage);
675 client::SetJsonValueFromCppValueHelper<bool >(
676 value, MutableStorage(
"eCommerceTracking"));
687 return Storage().isMember(
"enhancedECommerceTracking");
694 MutableStorage()->removeMember(
"enhancedECommerceTracking");
702 const Json::Value& storage = Storage(
"enhancedECommerceTracking");
703 return client::JsonValueToCppValueHelper<bool >(storage);
716 client::SetJsonValueFromCppValueHelper<bool >(
717 value, MutableStorage(
"enhancedECommerceTracking"));
727 return Storage().isMember(
"excludeQueryParameters");
734 MutableStorage()->removeMember(
"excludeQueryParameters");
742 const Json::Value& v = Storage(
"excludeQueryParameters");
743 if (v == Json::Value::null)
return StringPiece(
"");
744 return StringPiece(v.asCString());
755 *MutableStorage(
"excludeQueryParameters") = value.data();
764 return Storage().isMember(
"id");
771 MutableStorage()->removeMember(
"id");
779 const Json::Value& v = Storage(
"id");
780 if (v == Json::Value::null)
return StringPiece(
"");
781 return StringPiece(v.asCString());
792 *MutableStorage(
"id") = value.data();
801 return Storage().isMember(
"internalWebPropertyId");
808 MutableStorage()->removeMember(
"internalWebPropertyId");
816 const Json::Value& v = Storage(
"internalWebPropertyId");
817 if (v == Json::Value::null)
return StringPiece(
"");
818 return StringPiece(v.asCString());
829 *MutableStorage(
"internalWebPropertyId") = value.data();
838 return Storage().isMember(
"kind");
845 MutableStorage()->removeMember(
"kind");
853 const Json::Value& v = Storage(
"kind");
854 if (v == Json::Value::null)
return StringPiece(
"");
855 return StringPiece(v.asCString());
866 *MutableStorage(
"kind") = value.data();
875 return Storage().isMember(
"name");
882 MutableStorage()->removeMember(
"name");
890 const Json::Value& v = Storage(
"name");
891 if (v == Json::Value::null)
return StringPiece(
"");
892 return StringPiece(v.asCString());
903 *MutableStorage(
"name") = value.data();
912 return Storage().isMember(
"parentLink");
919 MutableStorage()->removeMember(
"parentLink");
927 const Json::Value& storage = Storage(
"parentLink");
928 return client::JsonValueToCppValueHelper<ProfileParentLink >(storage);
941 Json::Value* storage = MutableStorage(
"parentLink");
942 return client::JsonValueToMutableCppValueHelper<ProfileParentLink >(storage);
951 return Storage().isMember(
"permissions");
958 MutableStorage()->removeMember(
"permissions");
966 const Json::Value& storage = Storage(
"permissions");
967 return client::JsonValueToCppValueHelper<ProfilePermissions >(storage);
979 Json::Value* storage = MutableStorage(
"permissions");
980 return client::JsonValueToMutableCppValueHelper<ProfilePermissions >(storage);
989 return Storage().isMember(
"selfLink");
996 MutableStorage()->removeMember(
"selfLink");
1004 const Json::Value& v = Storage(
"selfLink");
1005 if (v == Json::Value::null)
return StringPiece(
"");
1006 return StringPiece(v.asCString());
1017 *MutableStorage(
"selfLink") = value.data();
1028 return Storage().isMember(
"siteSearchCategoryParameters");
1035 MutableStorage()->removeMember(
"siteSearchCategoryParameters");
1043 const Json::Value& v = Storage(
"siteSearchCategoryParameters");
1044 if (v == Json::Value::null)
return StringPiece(
"");
1045 return StringPiece(v.asCString());
1056 *MutableStorage(
"siteSearchCategoryParameters") = value.data();
1067 return Storage().isMember(
"siteSearchQueryParameters");
1074 MutableStorage()->removeMember(
"siteSearchQueryParameters");
1082 const Json::Value& v = Storage(
"siteSearchQueryParameters");
1083 if (v == Json::Value::null)
return StringPiece(
"");
1084 return StringPiece(v.asCString());
1095 *MutableStorage(
"siteSearchQueryParameters") = value.data();
1104 return Storage().isMember(
"starred");
1111 MutableStorage()->removeMember(
"starred");
1119 const Json::Value& storage = Storage(
"starred");
1120 return client::JsonValueToCppValueHelper<bool >(storage);
1131 client::SetJsonValueFromCppValueHelper<bool >(
1132 value, MutableStorage(
"starred"));
1143 return Storage().isMember(
"stripSiteSearchCategoryParameters");
1150 MutableStorage()->removeMember(
"stripSiteSearchCategoryParameters");
1159 const Json::Value& storage = Storage(
"stripSiteSearchCategoryParameters");
1160 return client::JsonValueToCppValueHelper<bool >(storage);
1172 client::SetJsonValueFromCppValueHelper<bool >(
1173 value, MutableStorage(
"stripSiteSearchCategoryParameters"));
1184 return Storage().isMember(
"stripSiteSearchQueryParameters");
1191 MutableStorage()->removeMember(
"stripSiteSearchQueryParameters");
1200 const Json::Value& storage = Storage(
"stripSiteSearchQueryParameters");
1201 return client::JsonValueToCppValueHelper<bool >(storage);
1213 client::SetJsonValueFromCppValueHelper<bool >(
1214 value, MutableStorage(
"stripSiteSearchQueryParameters"));
1223 return Storage().isMember(
"timezone");
1230 MutableStorage()->removeMember(
"timezone");
1238 const Json::Value& v = Storage(
"timezone");
1239 if (v == Json::Value::null)
return StringPiece(
"");
1240 return StringPiece(v.asCString());
1252 *MutableStorage(
"timezone") = value.data();
1261 return Storage().isMember(
"type");
1268 MutableStorage()->removeMember(
"type");
1276 const Json::Value& v = Storage(
"type");
1277 if (v == Json::Value::null)
return StringPiece(
"");
1278 return StringPiece(v.asCString());
1289 *MutableStorage(
"type") = value.data();
1298 return Storage().isMember(
"updated");
1305 MutableStorage()->removeMember(
"updated");
1313 const Json::Value& storage = Storage(
"updated");
1314 return client::JsonValueToCppValueHelper<client::DateTime >(storage);
1325 client::SetJsonValueFromCppValueHelper<client::DateTime >(
1326 value, MutableStorage(
"updated"));
1335 return Storage().isMember(
"webPropertyId");
1342 MutableStorage()->removeMember(
"webPropertyId");
1350 const Json::Value& v = Storage(
"webPropertyId");
1351 if (v == Json::Value::null)
return StringPiece(
"");
1352 return StringPiece(v.asCString());
1364 *MutableStorage(
"webPropertyId") = value.data();
1373 return Storage().isMember(
"websiteUrl");
1380 MutableStorage()->removeMember(
"websiteUrl");
1388 const Json::Value& v = Storage(
"websiteUrl");
1389 if (v == Json::Value::null)
return StringPiece(
"");
1390 return StringPiece(v.asCString());
1401 *MutableStorage(
"websiteUrl") = value.data();
1405 void operator=(
const Profile&);
1408 #endif // GOOGLE_ANALYTICS_API_PROFILE_H_ void set_type(const StringPiece &value)
Definition: profile.h:286
bool has_website_url() const
Definition: profile.h:1372
void clear_updated()
Definition: profile.h:1304
void set_default_page(const StringPiece &value)
Definition: profile.h:638
bool has_type() const
Definition: profile.h:258
void clear_parent_link()
Definition: profile.h:918
bool get_enhanced_ec_ommerce_tracking() const
Definition: profile.h:701
const StringPiece get_kind() const
Definition: profile.h:852
const StringPiece get_name() const
Definition: profile.h:889
const StringPiece get_internal_web_property_id() const
Definition: profile.h:815
const ProfileChildLink get_child_link() const
Definition: profile.h:507
void set_type(const StringPiece &value)
Definition: profile.h:1288
void set_site_search_query_parameters(const StringPiece &value)
Definition: profile.h:1094
bool has_parent_link() const
Definition: profile.h:911
const StringPiece get_type() const
Definition: profile.h:273
void clear_exclude_query_parameters()
Definition: profile.h:733
void set_href(const StringPiece &value)
Definition: profile.h:249
bool get_strip_site_search_query_parameters() const
Definition: profile.h:1199
void clear_type()
Definition: profile.h:1267
void set_bot_filtering_enabled(bool value)
Definition: profile.h:482
Definition: profile.h:179
void clear_effective()
Definition: profile.h:347
const client::JsonCppArray< string > get_effective() const
Definition: profile.h:355
bool has_href() const
Definition: profile.h:221
void clear_site_search_query_parameters()
Definition: profile.h:1073
bool get_bot_filtering_enabled() const
Definition: profile.h:470
void clear_site_search_category_parameters()
Definition: profile.h:1034
bool has_internal_web_property_id() const
Definition: profile.h:800
void set_strip_site_search_category_parameters(bool value)
Definition: profile.h:1171
void clear_internal_web_property_id()
Definition: profile.h:807
const StringPiece GetTypeName() const
Definition: profile.h:331
void set_starred(bool value)
Definition: profile.h:1130
void clear_enhanced_ec_ommerce_tracking()
Definition: profile.h:693
const StringPiece get_web_property_id() const
Definition: profile.h:1349
const StringPiece get_type() const
Definition: profile.h:1275
ProfilePermissions mutable_permissions()
Definition: profile.h:978
const StringPiece get_account_id() const
Definition: profile.h:433
bool has_web_property_id() const
Definition: profile.h:1334
bool has_bot_filtering_enabled() const
Definition: profile.h:455
bool has_strip_site_search_query_parameters() const
Definition: profile.h:1183
bool get_e_commerce_tracking() const
Definition: profile.h:662
bool get_strip_site_search_category_parameters() const
Definition: profile.h:1158
bool has_name() const
Definition: profile.h:874
const StringPiece get_currency() const
Definition: profile.h:583
void set_self_link(const StringPiece &value)
Definition: profile.h:1016
bool has_enhanced_ec_ommerce_tracking() const
Definition: profile.h:686
const StringPiece get_type() const
Definition: profile.h:153
const StringPiece get_site_search_query_parameters() const
Definition: profile.h:1081
void set_e_commerce_tracking(bool value)
Definition: profile.h:674
ProfileChildLink mutable_childLink()
Definition: profile.h:521
bool get_starred() const
Definition: profile.h:1118
bool has_e_commerce_tracking() const
Definition: profile.h:647
void clear_e_commerce_tracking()
Definition: profile.h:654
void clear_starred()
Definition: profile.h:1110
client::DateTime get_updated() const
Definition: profile.h:1312
const ProfileParentLink get_parent_link() const
Definition: profile.h:926
bool has_timezone() const
Definition: profile.h:1222
bool has_default_page() const
Definition: profile.h:610
const StringPiece get_id() const
Definition: profile.h:778
void set_account_id(const StringPiece &value)
Definition: profile.h:446
bool has_type() const
Definition: profile.h:138
void clear_timezone()
Definition: profile.h:1229
bool has_child_link() const
Definition: profile.h:492
void set_kind(const StringPiece &value)
Definition: profile.h:865
void set_internal_web_property_id(const StringPiece &value)
Definition: profile.h:828
void set_created(client::DateTime value)
Definition: profile.h:558
void clear_permissions()
Definition: profile.h:957
bool has_currency() const
Definition: profile.h:568
const StringPiece get_href() const
Definition: profile.h:236
void clear_account_id()
Definition: profile.h:425
bool has_site_search_category_parameters() const
Definition: profile.h:1027
void set_id(const StringPiece &value)
Definition: profile.h:791
bool has_updated() const
Definition: profile.h:1297
void clear_child_link()
Definition: profile.h:499
void clear_type()
Definition: profile.h:265
bool has_id() const
Definition: profile.h:763
void clear_self_link()
Definition: profile.h:995
client::JsonCppArray< string > mutable_effective()
Definition: profile.h:370
bool has_effective() const
Definition: profile.h:340
void set_enhanced_ec_ommerce_tracking(bool value)
Definition: profile.h:715
Definition: account.cc:41
bool has_account_id() const
Definition: profile.h:418
Definition: profile.h:298
void set_updated(client::DateTime value)
Definition: profile.h:1324
void clear_bot_filtering_enabled()
Definition: profile.h:462
const StringPiece GetTypeName() const
Definition: profile.h:409
bool has_exclude_query_parameters() const
Definition: profile.h:726
void set_exclude_query_parameters(const StringPiece &value)
Definition: profile.h:754
bool has_starred() const
Definition: profile.h:1103
void clear_href()
Definition: profile.h:108
const StringPiece get_site_search_category_parameters() const
Definition: profile.h:1042
bool has_kind() const
Definition: profile.h:837
const ProfilePermissions get_permissions() const
Definition: profile.h:965
const StringPiece GetTypeName() const
Definition: profile.h:212
bool has_strip_site_search_category_parameters() const
Definition: profile.h:1142
void clear_type()
Definition: profile.h:145
bool has_href() const
Definition: profile.h:101
void clear_id()
Definition: profile.h:770
void clear_name()
Definition: profile.h:881
const StringPiece GetTypeName() const
Definition: profile.h:92
void clear_strip_site_search_category_parameters()
Definition: profile.h:1149
bool has_type() const
Definition: profile.h:1260
client::DateTime get_created() const
Definition: profile.h:546
const StringPiece get_self_link() const
Definition: profile.h:1003
const StringPiece get_website_url() const
Definition: profile.h:1387
bool has_created() const
Definition: profile.h:531
void set_href(const StringPiece &value)
Definition: profile.h:129
void set_website_url(const StringPiece &value)
Definition: profile.h:1400
void set_strip_site_search_query_parameters(bool value)
Definition: profile.h:1212
ProfileParentLink mutable_parentLink()
Definition: profile.h:940
void clear_href()
Definition: profile.h:228
void set_web_property_id(const StringPiece &value)
Definition: profile.h:1363
bool has_permissions() const
Definition: profile.h:950
const StringPiece get_default_page() const
Definition: profile.h:625
void set_timezone(const StringPiece &value)
Definition: profile.h:1251
const StringPiece get_href() const
Definition: profile.h:116
const StringPiece get_exclude_query_parameters() const
Definition: profile.h:741
void clear_web_property_id()
Definition: profile.h:1341
void clear_currency()
Definition: profile.h:575
void clear_default_page()
Definition: profile.h:617
void set_type(const StringPiece &value)
Definition: profile.h:166
bool has_site_search_query_parameters() const
Definition: profile.h:1066
void set_site_search_category_parameters(const StringPiece &value)
Definition: profile.h:1055
const StringPiece get_timezone() const
Definition: profile.h:1237
void set_name(const StringPiece &value)
Definition: profile.h:902
void clear_strip_site_search_query_parameters()
Definition: profile.h:1190
void clear_created()
Definition: profile.h:538
void set_currency(const StringPiece &value)
Definition: profile.h:601
bool has_self_link() const
Definition: profile.h:988
void clear_kind()
Definition: profile.h:844
void clear_website_url()
Definition: profile.h:1379