fitness  v1
data_source.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_DATA_SOURCE_H_
31 #define GOOGLE_FITNESS_API_DATA_SOURCE_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 #include "google/fitness_api/application.h"
39 #include "google/fitness_api/data_type.h"
40 #include "google/fitness_api/device.h"
41 
42 namespace Json {
43 class Value;
44 } // namespace Json
45 
46 namespace google_fitness_api {
47 using namespace googleapis;
48 
68 class DataSource : public client::JsonCppData {
69  public:
75  static DataSource* New();
76 
82  explicit DataSource(const Json::Value& storage);
83 
89  explicit DataSource(Json::Value* storage);
90 
94  virtual ~DataSource();
95 
101  const StringPiece GetTypeName() const {
102  return StringPiece("google_fitness_api::DataSource");
103  }
104 
110  bool has_application() const {
111  return Storage().isMember("application");
112  }
113 
118  MutableStorage()->removeMember("application");
119  }
120 
121 
125  const Application get_application() const;
126 
135  Application mutable_application();
136 
143  return Storage().isMember("dataQualityStandard");
144  }
145 
150  MutableStorage()->removeMember("dataQualityStandard");
151  }
152 
153 
158  const client::JsonCppArray<string > get_data_quality_standard() const {
159  const Json::Value& storage = Storage("dataQualityStandard");
160  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
161  }
162 
173  client::JsonCppArray<string > mutable_dataQualityStandard() {
174  Json::Value* storage = MutableStorage("dataQualityStandard");
175  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
176  }
177 
183  bool has_data_stream_id() const {
184  return Storage().isMember("dataStreamId");
185  }
186 
191  MutableStorage()->removeMember("dataStreamId");
192  }
193 
194 
198  const StringPiece get_data_stream_id() const {
199  const Json::Value& v = Storage("dataStreamId");
200  if (v == Json::Value::null) return StringPiece("");
201  return StringPiece(v.asCString());
202  }
203 
243  void set_data_stream_id(const StringPiece& value) {
244  *MutableStorage("dataStreamId") = value.data();
245  }
246 
252  bool has_data_stream_name() const {
253  return Storage().isMember("dataStreamName");
254  }
255 
260  MutableStorage()->removeMember("dataStreamName");
261  }
262 
263 
267  const StringPiece get_data_stream_name() const {
268  const Json::Value& v = Storage("dataStreamName");
269  if (v == Json::Value::null) return StringPiece("");
270  return StringPiece(v.asCString());
271  }
272 
284  void set_data_stream_name(const StringPiece& value) {
285  *MutableStorage("dataStreamName") = value.data();
286  }
287 
293  bool has_data_type() const {
294  return Storage().isMember("dataType");
295  }
296 
301  MutableStorage()->removeMember("dataType");
302  }
303 
304 
308  const DataType get_data_type() const;
309 
319  DataType mutable_dataType();
320 
326  bool has_device() const {
327  return Storage().isMember("device");
328  }
329 
333  void clear_device() {
334  MutableStorage()->removeMember("device");
335  }
336 
337 
341  const Device get_device() const;
342 
351  Device mutable_device();
352 
358  bool has_name() const {
359  return Storage().isMember("name");
360  }
361 
365  void clear_name() {
366  MutableStorage()->removeMember("name");
367  }
368 
369 
373  const StringPiece get_name() const {
374  const Json::Value& v = Storage("name");
375  if (v == Json::Value::null) return StringPiece("");
376  return StringPiece(v.asCString());
377  }
378 
386  void set_name(const StringPiece& value) {
387  *MutableStorage("name") = value.data();
388  }
389 
395  bool has_type() const {
396  return Storage().isMember("type");
397  }
398 
402  void clear_type() {
403  MutableStorage()->removeMember("type");
404  }
405 
406 
410  const StringPiece get_type() const {
411  const Json::Value& v = Storage("type");
412  if (v == Json::Value::null) return StringPiece("");
413  return StringPiece(v.asCString());
414  }
415 
424  void set_type(const StringPiece& value) {
425  *MutableStorage("type") = value.data();
426  }
427 
428  private:
429  void operator=(const DataSource&);
430 }; // DataSource
431 } // namespace google_fitness_api
432 #endif // GOOGLE_FITNESS_API_DATA_SOURCE_H_
bool has_data_stream_name() const
Definition: data_source.h:252
Definition: application.h:50
bool has_device() const
Definition: data_source.h:326
bool has_type() const
Definition: data_source.h:395
bool has_name() const
Definition: data_source.h:358
const StringPiece get_name() const
Definition: data_source.h:373
Definition: device.h:61
void clear_data_quality_standard()
Definition: data_source.h:149
const StringPiece GetTypeName() const
Definition: data_source.h:101
void clear_application()
Definition: data_source.h:117
void clear_data_stream_name()
Definition: data_source.h:259
void clear_data_type()
Definition: data_source.h:300
const client::JsonCppArray< string > get_data_quality_standard() const
Definition: data_source.h:158
const StringPiece get_data_stream_name() const
Definition: data_source.h:267
bool has_application() const
Definition: data_source.h:110
void set_data_stream_name(const StringPiece &value)
Definition: data_source.h:284
void set_type(const StringPiece &value)
Definition: data_source.h:424
void clear_data_stream_id()
Definition: data_source.h:190
bool has_data_type() const
Definition: data_source.h:293
void set_data_stream_id(const StringPiece &value)
Definition: data_source.h:243
Definition: aggregate_bucket.h:42
const StringPiece get_type() const
Definition: data_source.h:410
bool has_data_stream_id() const
Definition: data_source.h:183
void clear_type()
Definition: data_source.h:402
Definition: data_type.h:52
bool has_data_quality_standard() const
Definition: data_source.h:142
void clear_device()
Definition: data_source.h:333
Definition: data_source.h:68
void clear_name()
Definition: data_source.h:365
Definition: aggregate_bucket.cc:44
client::JsonCppArray< string > mutable_dataQualityStandard()
Definition: data_source.h:173
void set_name(const StringPiece &value)
Definition: data_source.h:386
const StringPiece get_data_stream_id() const
Definition: data_source.h:198