30 #ifndef GOOGLE_FITNESS_API_AGGREGATE_BUCKET_H_ 31 #define GOOGLE_FITNESS_API_AGGREGATE_BUCKET_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/strings/stringpiece.h" 39 #include "google/fitness_api/dataset.h" 40 #include "google/fitness_api/session.h" 88 return StringPiece(
"google_fitness_api::AggregateBucket");
97 return Storage().isMember(
"activity");
104 MutableStorage()->removeMember(
"activity");
112 const Json::Value& storage = Storage(
"activity");
113 return client::JsonValueToCppValueHelper<int32 >(storage);
124 client::SetJsonValueFromCppValueHelper<int32 >(
125 value, MutableStorage(
"activity"));
134 return Storage().isMember(
"dataset");
141 MutableStorage()->removeMember(
"dataset");
148 const client::JsonCppArray<Dataset > get_dataset()
const;
157 client::JsonCppArray<Dataset > mutable_dataset();
165 return Storage().isMember(
"endTimeMillis");
172 MutableStorage()->removeMember(
"endTimeMillis");
180 const Json::Value& storage = Storage(
"endTimeMillis");
181 return client::JsonValueToCppValueHelper<int64 >(storage);
193 client::SetJsonValueFromCppValueHelper<int64 >(
194 value, MutableStorage(
"endTimeMillis"));
203 return Storage().isMember(
"session");
210 MutableStorage()->removeMember(
"session");
217 const Session get_session()
const;
234 return Storage().isMember(
"startTimeMillis");
241 MutableStorage()->removeMember(
"startTimeMillis");
249 const Json::Value& storage = Storage(
"startTimeMillis");
250 return client::JsonValueToCppValueHelper<int64 >(storage);
262 client::SetJsonValueFromCppValueHelper<int64 >(
263 value, MutableStorage(
"startTimeMillis"));
272 return Storage().isMember(
"type");
279 MutableStorage()->removeMember(
"type");
287 const Json::Value& v = Storage(
"type");
288 if (v == Json::Value::null)
return StringPiece(
"");
289 return StringPiece(v.asCString());
301 *MutableStorage(
"type") = value.data();
308 #endif // GOOGLE_FITNESS_API_AGGREGATE_BUCKET_H_ void clear_end_time_millis()
Definition: aggregate_bucket.h:171
bool has_activity() const
Definition: aggregate_bucket.h:96
bool has_start_time_millis() const
Definition: aggregate_bucket.h:233
void clear_type()
Definition: aggregate_bucket.h:278
bool has_dataset() const
Definition: aggregate_bucket.h:133
void clear_activity()
Definition: aggregate_bucket.h:103
const StringPiece get_type() const
Definition: aggregate_bucket.h:286
Definition: aggregate_bucket.h:54
void set_type(const StringPiece &value)
Definition: aggregate_bucket.h:300
int32 get_activity() const
Definition: aggregate_bucket.h:111
void clear_dataset()
Definition: aggregate_bucket.h:140
void clear_session()
Definition: aggregate_bucket.h:209
Definition: aggregate_bucket.h:42
bool has_session() const
Definition: aggregate_bucket.h:202
void clear_start_time_millis()
Definition: aggregate_bucket.h:240
int64 get_start_time_millis() const
Definition: aggregate_bucket.h:248
void set_start_time_millis(int64 value)
Definition: aggregate_bucket.h:261
bool has_end_time_millis() const
Definition: aggregate_bucket.h:164
bool has_type() const
Definition: aggregate_bucket.h:271
int64 get_end_time_millis() const
Definition: aggregate_bucket.h:179
void set_end_time_millis(int64 value)
Definition: aggregate_bucket.h:192
Definition: aggregate_bucket.cc:44
void set_activity(int32 value)
Definition: aggregate_bucket.h:123
const StringPiece GetTypeName() const
Definition: aggregate_bucket.h:87