fitness  v1
aggregate_request.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-03-28, 03:09:04 UTC
18 // C++ generator version: 0.1.4
19 
20 // ----------------------------------------------------------------------------
21 // NOTE: This file is generated from Google APIs Discovery Service.
22 // Service:
23 // Fitness (fitness/v1)
24 // Generated from:
25 // Version: v1
26 // Revision: 130
27 // Generated by:
28 // Tool: google-apis-code-generator 1.5.1
29 // C++: 0.1.4
30 #ifndef GOOGLE_FITNESS_API_AGGREGATE_REQUEST_H_
31 #define GOOGLE_FITNESS_API_AGGREGATE_REQUEST_H_
32 
33 #include <string>
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"
38 
39 #include "google/fitness_api/aggregate_by.h"
40 #include "google/fitness_api/bucket_by_activity.h"
41 #include "google/fitness_api/bucket_by_session.h"
42 #include "google/fitness_api/bucket_by_time.h"
43 
44 namespace Json {
45 class Value;
46 } // namespace Json
47 
48 namespace google_fitness_api {
49 using namespace googleapis;
50 
56 class AggregateRequest : public client::JsonCppData {
57  public:
63  static AggregateRequest* New();
64 
70  explicit AggregateRequest(const Json::Value& storage);
71 
77  explicit AggregateRequest(Json::Value* storage);
78 
82  virtual ~AggregateRequest();
83 
89  const StringPiece GetTypeName() const {
90  return StringPiece("google_fitness_api::AggregateRequest");
91  }
92 
98  bool has_aggregate_by() const {
99  return Storage().isMember("aggregateBy");
100  }
101 
106  MutableStorage()->removeMember("aggregateBy");
107  }
108 
109 
113  const client::JsonCppArray<AggregateBy > get_aggregate_by() const;
114 
126  client::JsonCppArray<AggregateBy > mutable_aggregateBy();
127 
135  return Storage().isMember("bucketByActivitySegment");
136  }
137 
142  MutableStorage()->removeMember("bucketByActivitySegment");
143  }
144 
145 
150  const BucketByActivity get_bucket_by_activity_segment() const;
151 
163  BucketByActivity mutable_bucketByActivitySegment();
164 
171  return Storage().isMember("bucketByActivityType");
172  }
173 
178  MutableStorage()->removeMember("bucketByActivityType");
179  }
180 
181 
186  const BucketByActivity get_bucket_by_activity_type() const;
187 
201  BucketByActivity mutable_bucketByActivityType();
202 
208  bool has_bucket_by_session() const {
209  return Storage().isMember("bucketBySession");
210  }
211 
216  MutableStorage()->removeMember("bucketBySession");
217  }
218 
219 
224  const BucketBySession get_bucket_by_session() const;
225 
236  BucketBySession mutable_bucketBySession();
237 
243  bool has_bucket_by_time() const {
244  return Storage().isMember("bucketByTime");
245  }
246 
251  MutableStorage()->removeMember("bucketByTime");
252  }
253 
254 
258  const BucketByTime get_bucket_by_time() const;
259 
269  BucketByTime mutable_bucketByTime();
270 
276  bool has_end_time_millis() const {
277  return Storage().isMember("endTimeMillis");
278  }
279 
284  MutableStorage()->removeMember("endTimeMillis");
285  }
286 
287 
291  int64 get_end_time_millis() const {
292  const Json::Value& storage = Storage("endTimeMillis");
293  return client::JsonValueToCppValueHelper<int64 >(storage);
294  }
295 
304  void set_end_time_millis(int64 value) {
305  client::SetJsonValueFromCppValueHelper<int64 >(
306  value, MutableStorage("endTimeMillis"));
307  }
308 
317  return Storage().isMember("filteredDataQualityStandard");
318  }
319 
324  MutableStorage()->removeMember("filteredDataQualityStandard");
325  }
326 
327 
332  const client::JsonCppArray<string > get_filtered_data_quality_standard() const {
333  const Json::Value& storage = Storage("filteredDataQualityStandard");
334  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
335  }
336 
345  client::JsonCppArray<string > mutable_filteredDataQualityStandard() {
346  Json::Value* storage = MutableStorage("filteredDataQualityStandard");
347  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
348  }
349 
355  bool has_start_time_millis() const {
356  return Storage().isMember("startTimeMillis");
357  }
358 
363  MutableStorage()->removeMember("startTimeMillis");
364  }
365 
366 
370  int64 get_start_time_millis() const {
371  const Json::Value& storage = Storage("startTimeMillis");
372  return client::JsonValueToCppValueHelper<int64 >(storage);
373  }
374 
383  void set_start_time_millis(int64 value) {
384  client::SetJsonValueFromCppValueHelper<int64 >(
385  value, MutableStorage("startTimeMillis"));
386  }
387 
388  private:
389  void operator=(const AggregateRequest&);
390 }; // AggregateRequest
391 } // namespace google_fitness_api
392 #endif // GOOGLE_FITNESS_API_AGGREGATE_REQUEST_H_
Definition: bucket_by_time.h:52
Definition: aggregate_request.h:56
void clear_bucket_by_session()
Definition: aggregate_request.h:215
void set_end_time_millis(int64 value)
Definition: aggregate_request.h:304
void set_start_time_millis(int64 value)
Definition: aggregate_request.h:383
void clear_bucket_by_activity_segment()
Definition: aggregate_request.h:141
bool has_end_time_millis() const
Definition: aggregate_request.h:276
int64 get_end_time_millis() const
Definition: aggregate_request.h:291
void clear_filtered_data_quality_standard()
Definition: aggregate_request.h:323
void clear_start_time_millis()
Definition: aggregate_request.h:362
bool has_bucket_by_activity_segment() const
Definition: aggregate_request.h:134
bool has_bucket_by_time() const
Definition: aggregate_request.h:243
int64 get_start_time_millis() const
Definition: aggregate_request.h:370
bool has_bucket_by_activity_type() const
Definition: aggregate_request.h:170
Definition: bucket_by_activity.h:51
void clear_bucket_by_activity_type()
Definition: aggregate_request.h:177
void clear_bucket_by_time()
Definition: aggregate_request.h:250
void clear_end_time_millis()
Definition: aggregate_request.h:283
bool has_bucket_by_session() const
Definition: aggregate_request.h:208
bool has_aggregate_by() const
Definition: aggregate_request.h:98
bool has_filtered_data_quality_standard() const
Definition: aggregate_request.h:316
client::JsonCppArray< string > mutable_filteredDataQualityStandard()
Definition: aggregate_request.h:345
Definition: bucket_by_session.h:50
Definition: aggregate_bucket.h:42
void clear_aggregate_by()
Definition: aggregate_request.h:105
const StringPiece GetTypeName() const
Definition: aggregate_request.h:89
Definition: aggregate_bucket.cc:44
const client::JsonCppArray< string > get_filtered_data_quality_standard() const
Definition: aggregate_request.h:332
bool has_start_time_millis() const
Definition: aggregate_request.h:355