30 #ifndef GOOGLE_ANALYTICS_API_CUSTOM_METRIC_H_ 31 #define GOOGLE_ANALYTICS_API_CUSTOM_METRIC_H_ 34 #include "googleapis/base/integral_types.h" 35 #include "googleapis/base/macros.h" 36 #include "googleapis/client/data/jsoncpp_data.h" 37 #include "googleapis/client/util/date_time.h" 38 #include "googleapis/strings/stringpiece.h" 94 return StringPiece(
"google_analytics_api::CustomMetricParentLink");
103 return Storage().isMember(
"href");
110 MutableStorage()->removeMember(
"href");
118 const Json::Value& v = Storage(
"href");
119 if (v == Json::Value::null)
return StringPiece(
"");
120 return StringPiece(v.asCString());
131 *MutableStorage(
"href") = value.data();
140 return Storage().isMember(
"type");
147 MutableStorage()->removeMember(
"type");
155 const Json::Value& v = Storage(
"type");
156 if (v == Json::Value::null)
return StringPiece(
"");
157 return StringPiece(v.asCString());
168 *MutableStorage(
"type") = value.data();
206 return StringPiece(
"google_analytics_api::CustomMetric");
215 return Storage().isMember(
"accountId");
222 MutableStorage()->removeMember(
"accountId");
230 const Json::Value& v = Storage(
"accountId");
231 if (v == Json::Value::null)
return StringPiece(
"");
232 return StringPiece(v.asCString());
243 *MutableStorage(
"accountId") = value.data();
252 return Storage().isMember(
"active");
259 MutableStorage()->removeMember(
"active");
267 const Json::Value& storage = Storage(
"active");
268 return client::JsonValueToCppValueHelper<bool >(storage);
279 client::SetJsonValueFromCppValueHelper<bool >(
280 value, MutableStorage(
"active"));
289 return Storage().isMember(
"created");
296 MutableStorage()->removeMember(
"created");
304 const Json::Value& storage = Storage(
"created");
305 return client::JsonValueToCppValueHelper<client::DateTime >(storage);
316 client::SetJsonValueFromCppValueHelper<client::DateTime >(
317 value, MutableStorage(
"created"));
326 return Storage().isMember(
"id");
333 MutableStorage()->removeMember(
"id");
341 const Json::Value& v = Storage(
"id");
342 if (v == Json::Value::null)
return StringPiece(
"");
343 return StringPiece(v.asCString());
354 *MutableStorage(
"id") = value.data();
363 return Storage().isMember(
"index");
370 MutableStorage()->removeMember(
"index");
378 const Json::Value& storage = Storage(
"index");
379 return client::JsonValueToCppValueHelper<int32 >(storage);
390 client::SetJsonValueFromCppValueHelper<int32 >(
391 value, MutableStorage(
"index"));
400 return Storage().isMember(
"kind");
407 MutableStorage()->removeMember(
"kind");
415 const Json::Value& v = Storage(
"kind");
416 if (v == Json::Value::null)
return StringPiece(
"");
417 return StringPiece(v.asCString());
429 *MutableStorage(
"kind") = value.data();
438 return Storage().isMember(
"max_value");
445 MutableStorage()->removeMember(
"max_value");
453 const Json::Value& v = Storage(
"max_value");
454 if (v == Json::Value::null)
return StringPiece(
"");
455 return StringPiece(v.asCString());
466 *MutableStorage(
"max_value") = value.data();
475 return Storage().isMember(
"min_value");
482 MutableStorage()->removeMember(
"min_value");
490 const Json::Value& v = Storage(
"min_value");
491 if (v == Json::Value::null)
return StringPiece(
"");
492 return StringPiece(v.asCString());
503 *MutableStorage(
"min_value") = value.data();
512 return Storage().isMember(
"name");
519 MutableStorage()->removeMember(
"name");
527 const Json::Value& v = Storage(
"name");
528 if (v == Json::Value::null)
return StringPiece(
"");
529 return StringPiece(v.asCString());
540 *MutableStorage(
"name") = value.data();
549 return Storage().isMember(
"parentLink");
556 MutableStorage()->removeMember(
"parentLink");
564 const Json::Value& storage = Storage(
"parentLink");
565 return client::JsonValueToCppValueHelper<CustomMetricParentLink >(storage);
578 Json::Value* storage = MutableStorage(
"parentLink");
579 return client::JsonValueToMutableCppValueHelper<CustomMetricParentLink >(storage);
588 return Storage().isMember(
"scope");
595 MutableStorage()->removeMember(
"scope");
603 const Json::Value& v = Storage(
"scope");
604 if (v == Json::Value::null)
return StringPiece(
"");
605 return StringPiece(v.asCString());
616 *MutableStorage(
"scope") = value.data();
625 return Storage().isMember(
"selfLink");
632 MutableStorage()->removeMember(
"selfLink");
640 const Json::Value& v = Storage(
"selfLink");
641 if (v == Json::Value::null)
return StringPiece(
"");
642 return StringPiece(v.asCString());
653 *MutableStorage(
"selfLink") = value.data();
662 return Storage().isMember(
"type");
669 MutableStorage()->removeMember(
"type");
677 const Json::Value& v = Storage(
"type");
678 if (v == Json::Value::null)
return StringPiece(
"");
679 return StringPiece(v.asCString());
690 *MutableStorage(
"type") = value.data();
699 return Storage().isMember(
"updated");
706 MutableStorage()->removeMember(
"updated");
714 const Json::Value& storage = Storage(
"updated");
715 return client::JsonValueToCppValueHelper<client::DateTime >(storage);
726 client::SetJsonValueFromCppValueHelper<client::DateTime >(
727 value, MutableStorage(
"updated"));
736 return Storage().isMember(
"webPropertyId");
743 MutableStorage()->removeMember(
"webPropertyId");
751 const Json::Value& v = Storage(
"webPropertyId");
752 if (v == Json::Value::null)
return StringPiece(
"");
753 return StringPiece(v.asCString());
764 *MutableStorage(
"webPropertyId") = value.data();
771 #endif // GOOGLE_ANALYTICS_API_CUSTOM_METRIC_H_ bool has_scope() const
Definition: custom_metric.h:587
bool has_name() const
Definition: custom_metric.h:511
bool has_active() const
Definition: custom_metric.h:251
void set_self_link(const StringPiece &value)
Definition: custom_metric.h:652
const StringPiece get_kind() const
Definition: custom_metric.h:414
void clear_web_property_id()
Definition: custom_metric.h:742
void clear_max_value()
Definition: custom_metric.h:444
bool has_self_link() const
Definition: custom_metric.h:624
bool has_parent_link() const
Definition: custom_metric.h:548
const StringPiece get_min_value() const
Definition: custom_metric.h:489
void set_kind(const StringPiece &value)
Definition: custom_metric.h:428
const StringPiece get_account_id() const
Definition: custom_metric.h:229
void set_type(const StringPiece &value)
Definition: custom_metric.h:689
void clear_account_id()
Definition: custom_metric.h:221
Definition: custom_metric.h:60
void clear_parent_link()
Definition: custom_metric.h:555
const StringPiece GetTypeName() const
Definition: custom_metric.h:205
void set_max_value(const StringPiece &value)
Definition: custom_metric.h:465
void set_scope(const StringPiece &value)
Definition: custom_metric.h:615
bool has_account_id() const
Definition: custom_metric.h:214
client::DateTime get_created() const
Definition: custom_metric.h:303
void set_web_property_id(const StringPiece &value)
Definition: custom_metric.h:763
bool has_id() const
Definition: custom_metric.h:325
const StringPiece get_max_value() const
Definition: custom_metric.h:452
void set_min_value(const StringPiece &value)
Definition: custom_metric.h:502
void set_updated(client::DateTime value)
Definition: custom_metric.h:725
void set_index(int32 value)
Definition: custom_metric.h:389
const StringPiece get_type() const
Definition: custom_metric.h:676
bool has_created() const
Definition: custom_metric.h:288
void clear_kind()
Definition: custom_metric.h:406
bool get_active() const
Definition: custom_metric.h:266
void set_type(const StringPiece &value)
Definition: custom_metric.h:167
const StringPiece get_web_property_id() const
Definition: custom_metric.h:750
const CustomMetricParentLink get_parent_link() const
Definition: custom_metric.h:563
client::DateTime get_updated() const
Definition: custom_metric.h:713
const StringPiece get_href() const
Definition: custom_metric.h:117
bool has_min_value() const
Definition: custom_metric.h:474
void set_id(const StringPiece &value)
Definition: custom_metric.h:353
const StringPiece GetTypeName() const
Definition: custom_metric.h:93
const StringPiece get_self_link() const
Definition: custom_metric.h:639
int32 get_index() const
Definition: custom_metric.h:377
CustomMetricParentLink mutable_parentLink()
Definition: custom_metric.h:577
bool has_href() const
Definition: custom_metric.h:102
void set_name(const StringPiece &value)
Definition: custom_metric.h:539
bool has_index() const
Definition: custom_metric.h:362
bool has_type() const
Definition: custom_metric.h:139
const StringPiece get_scope() const
Definition: custom_metric.h:602
void clear_id()
Definition: custom_metric.h:332
Definition: custom_metric.h:52
Definition: account.cc:41
void set_created(client::DateTime value)
Definition: custom_metric.h:315
void clear_type()
Definition: custom_metric.h:668
const StringPiece get_type() const
Definition: custom_metric.h:154
void clear_self_link()
Definition: custom_metric.h:631
bool has_kind() const
Definition: custom_metric.h:399
void clear_updated()
Definition: custom_metric.h:705
void clear_type()
Definition: custom_metric.h:146
void set_href(const StringPiece &value)
Definition: custom_metric.h:130
void clear_active()
Definition: custom_metric.h:258
bool has_type() const
Definition: custom_metric.h:661
void clear_name()
Definition: custom_metric.h:518
const StringPiece get_id() const
Definition: custom_metric.h:340
void set_active(bool value)
Definition: custom_metric.h:278
void clear_min_value()
Definition: custom_metric.h:481
void clear_index()
Definition: custom_metric.h:369
void set_account_id(const StringPiece &value)
Definition: custom_metric.h:242
void clear_scope()
Definition: custom_metric.h:594
bool has_web_property_id() const
Definition: custom_metric.h:735
bool has_updated() const
Definition: custom_metric.h:698
void clear_created()
Definition: custom_metric.h:295
const StringPiece get_name() const
Definition: custom_metric.h:526
void clear_href()
Definition: custom_metric.h:109
bool has_max_value() const
Definition: custom_metric.h:437