fitness  v1
dataset.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_DATASET_H_
31 #define GOOGLE_FITNESS_API_DATASET_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/data_point.h"
40 
41 namespace Json {
42 class Value;
43 } // namespace Json
44 
45 namespace google_fitness_api {
46 using namespace googleapis;
47 
55 class Dataset : public client::JsonCppData {
56  public:
62  static Dataset* New();
63 
69  explicit Dataset(const Json::Value& storage);
70 
76  explicit Dataset(Json::Value* storage);
77 
81  virtual ~Dataset();
82 
88  const StringPiece GetTypeName() const {
89  return StringPiece("google_fitness_api::Dataset");
90  }
91 
97  bool has_data_source_id() const {
98  return Storage().isMember("dataSourceId");
99  }
100 
105  MutableStorage()->removeMember("dataSourceId");
106  }
107 
108 
112  const StringPiece get_data_source_id() const {
113  const Json::Value& v = Storage("dataSourceId");
114  if (v == Json::Value::null) return StringPiece("");
115  return StringPiece(v.asCString());
116  }
117 
126  void set_data_source_id(const StringPiece& value) {
127  *MutableStorage("dataSourceId") = value.data();
128  }
129 
135  bool has_max_end_time_ns() const {
136  return Storage().isMember("maxEndTimeNs");
137  }
138 
143  MutableStorage()->removeMember("maxEndTimeNs");
144  }
145 
146 
150  int64 get_max_end_time_ns() const {
151  const Json::Value& storage = Storage("maxEndTimeNs");
152  return client::JsonValueToCppValueHelper<int64 >(storage);
153  }
154 
164  void set_max_end_time_ns(int64 value) {
165  client::SetJsonValueFromCppValueHelper<int64 >(
166  value, MutableStorage("maxEndTimeNs"));
167  }
168 
174  bool has_min_start_time_ns() const {
175  return Storage().isMember("minStartTimeNs");
176  }
177 
182  MutableStorage()->removeMember("minStartTimeNs");
183  }
184 
185 
189  int64 get_min_start_time_ns() const {
190  const Json::Value& storage = Storage("minStartTimeNs");
191  return client::JsonValueToCppValueHelper<int64 >(storage);
192  }
193 
203  void set_min_start_time_ns(int64 value) {
204  client::SetJsonValueFromCppValueHelper<int64 >(
205  value, MutableStorage("minStartTimeNs"));
206  }
207 
213  bool has_next_page_token() const {
214  return Storage().isMember("nextPageToken");
215  }
216 
221  MutableStorage()->removeMember("nextPageToken");
222  }
223 
224 
228  const StringPiece get_next_page_token() const {
229  const Json::Value& v = Storage("nextPageToken");
230  if (v == Json::Value::null) return StringPiece("");
231  return StringPiece(v.asCString());
232  }
233 
244  void set_next_page_token(const StringPiece& value) {
245  *MutableStorage("nextPageToken") = value.data();
246  }
247 
253  bool has_point() const {
254  return Storage().isMember("point");
255  }
256 
260  void clear_point() {
261  MutableStorage()->removeMember("point");
262  }
263 
264 
268  const client::JsonCppArray<DataPoint > get_point() const;
269 
280  client::JsonCppArray<DataPoint > mutable_point();
281 
282  private:
283  void operator=(const Dataset&);
284 }; // Dataset
285 } // namespace google_fitness_api
286 #endif // GOOGLE_FITNESS_API_DATASET_H_
int64 get_max_end_time_ns() const
Definition: dataset.h:150
bool has_next_page_token() const
Definition: dataset.h:213
void set_min_start_time_ns(int64 value)
Definition: dataset.h:203
void clear_point()
Definition: dataset.h:260
bool has_min_start_time_ns() const
Definition: dataset.h:174
bool has_data_source_id() const
Definition: dataset.h:97
void clear_max_end_time_ns()
Definition: dataset.h:142
const StringPiece get_next_page_token() const
Definition: dataset.h:228
const StringPiece GetTypeName() const
Definition: dataset.h:88
Definition: aggregate_bucket.h:42
void clear_next_page_token()
Definition: dataset.h:220
void set_max_end_time_ns(int64 value)
Definition: dataset.h:164
void set_data_source_id(const StringPiece &value)
Definition: dataset.h:126
int64 get_min_start_time_ns() const
Definition: dataset.h:189
void set_next_page_token(const StringPiece &value)
Definition: dataset.h:244
void clear_min_start_time_ns()
Definition: dataset.h:181
Definition: dataset.h:55
void clear_data_source_id()
Definition: dataset.h:104
Definition: aggregate_bucket.cc:44
bool has_max_end_time_ns() const
Definition: dataset.h:135
bool has_point() const
Definition: dataset.h:253
const StringPiece get_data_source_id() const
Definition: dataset.h:112