fitness  v1
device.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_DEVICE_H_
31 #define GOOGLE_FITNESS_API_DEVICE_H_
32 
33 #include <string>
34 #include "googleapis/base/macros.h"
35 #include "googleapis/client/data/jsoncpp_data.h"
36 #include "googleapis/strings/stringpiece.h"
37 
38 namespace Json {
39 class Value;
40 } // namespace Json
41 
42 namespace google_fitness_api {
43 using namespace googleapis;
44 
61 class Device : public client::JsonCppData {
62  public:
68  static Device* New();
69 
75  explicit Device(const Json::Value& storage);
76 
82  explicit Device(Json::Value* storage);
83 
87  virtual ~Device();
88 
94  const StringPiece GetTypeName() const {
95  return StringPiece("google_fitness_api::Device");
96  }
97 
103  bool has_manufacturer() const {
104  return Storage().isMember("manufacturer");
105  }
106 
111  MutableStorage()->removeMember("manufacturer");
112  }
113 
114 
118  const StringPiece get_manufacturer() const {
119  const Json::Value& v = Storage("manufacturer");
120  if (v == Json::Value::null) return StringPiece("");
121  return StringPiece(v.asCString());
122  }
123 
131  void set_manufacturer(const StringPiece& value) {
132  *MutableStorage("manufacturer") = value.data();
133  }
134 
140  bool has_model() const {
141  return Storage().isMember("model");
142  }
143 
147  void clear_model() {
148  MutableStorage()->removeMember("model");
149  }
150 
151 
155  const StringPiece get_model() const {
156  const Json::Value& v = Storage("model");
157  if (v == Json::Value::null) return StringPiece("");
158  return StringPiece(v.asCString());
159  }
160 
168  void set_model(const StringPiece& value) {
169  *MutableStorage("model") = value.data();
170  }
171 
177  bool has_type() const {
178  return Storage().isMember("type");
179  }
180 
184  void clear_type() {
185  MutableStorage()->removeMember("type");
186  }
187 
188 
192  const StringPiece get_type() const {
193  const Json::Value& v = Storage("type");
194  if (v == Json::Value::null) return StringPiece("");
195  return StringPiece(v.asCString());
196  }
197 
205  void set_type(const StringPiece& value) {
206  *MutableStorage("type") = value.data();
207  }
208 
214  bool has_uid() const {
215  return Storage().isMember("uid");
216  }
217 
221  void clear_uid() {
222  MutableStorage()->removeMember("uid");
223  }
224 
225 
229  const StringPiece get_uid() const {
230  const Json::Value& v = Storage("uid");
231  if (v == Json::Value::null) return StringPiece("");
232  return StringPiece(v.asCString());
233  }
234 
248  void set_uid(const StringPiece& value) {
249  *MutableStorage("uid") = value.data();
250  }
251 
257  bool has_version() const {
258  return Storage().isMember("version");
259  }
260 
264  void clear_version() {
265  MutableStorage()->removeMember("version");
266  }
267 
268 
272  const StringPiece get_version() const {
273  const Json::Value& v = Storage("version");
274  if (v == Json::Value::null) return StringPiece("");
275  return StringPiece(v.asCString());
276  }
277 
285  void set_version(const StringPiece& value) {
286  *MutableStorage("version") = value.data();
287  }
288 
289  private:
290  void operator=(const Device&);
291 }; // Device
292 } // namespace google_fitness_api
293 #endif // GOOGLE_FITNESS_API_DEVICE_H_
void clear_model()
Definition: device.h:147
Definition: device.h:61
bool has_version() const
Definition: device.h:257
void clear_type()
Definition: device.h:184
const StringPiece get_manufacturer() const
Definition: device.h:118
const StringPiece get_model() const
Definition: device.h:155
const StringPiece get_uid() const
Definition: device.h:229
void clear_uid()
Definition: device.h:221
const StringPiece get_type() const
Definition: device.h:192
void set_manufacturer(const StringPiece &value)
Definition: device.h:131
void clear_manufacturer()
Definition: device.h:110
void clear_version()
Definition: device.h:264
const StringPiece GetTypeName() const
Definition: device.h:94
void set_version(const StringPiece &value)
Definition: device.h:285
bool has_manufacturer() const
Definition: device.h:103
Definition: aggregate_bucket.h:42
bool has_type() const
Definition: device.h:177
bool has_uid() const
Definition: device.h:214
bool has_model() const
Definition: device.h:140
const StringPiece get_version() const
Definition: device.h:272
void set_type(const StringPiece &value)
Definition: device.h:205
void set_model(const StringPiece &value)
Definition: device.h:168
void set_uid(const StringPiece &value)
Definition: device.h:248
Definition: aggregate_bucket.cc:44