fitness  v1
bucket_by_time_period.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_BUCKET_BY_TIME_PERIOD_H_
31 #define GOOGLE_FITNESS_API_BUCKET_BY_TIME_PERIOD_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 namespace Json {
40 class Value;
41 } // namespace Json
42 
43 namespace google_fitness_api {
44 using namespace googleapis;
45 
51 class BucketByTimePeriod : public client::JsonCppData {
52  public:
58  static BucketByTimePeriod* New();
59 
65  explicit BucketByTimePeriod(const Json::Value& storage);
66 
72  explicit BucketByTimePeriod(Json::Value* storage);
73 
77  virtual ~BucketByTimePeriod();
78 
84  const StringPiece GetTypeName() const {
85  return StringPiece("google_fitness_api::BucketByTimePeriod");
86  }
87 
93  bool has_time_zone_id() const {
94  return Storage().isMember("timeZoneId");
95  }
96 
101  MutableStorage()->removeMember("timeZoneId");
102  }
103 
104 
108  const StringPiece get_time_zone_id() const {
109  const Json::Value& v = Storage("timeZoneId");
110  if (v == Json::Value::null) return StringPiece("");
111  return StringPiece(v.asCString());
112  }
113 
121  void set_time_zone_id(const StringPiece& value) {
122  *MutableStorage("timeZoneId") = value.data();
123  }
124 
130  bool has_type() const {
131  return Storage().isMember("type");
132  }
133 
137  void clear_type() {
138  MutableStorage()->removeMember("type");
139  }
140 
141 
145  const StringPiece get_type() const {
146  const Json::Value& v = Storage("type");
147  if (v == Json::Value::null) return StringPiece("");
148  return StringPiece(v.asCString());
149  }
150 
155  void set_type(const StringPiece& value) {
156  *MutableStorage("type") = value.data();
157  }
158 
164  bool has_value() const {
165  return Storage().isMember("value");
166  }
167 
171  void clear_value() {
172  MutableStorage()->removeMember("value");
173  }
174 
175 
179  int32 get_value() const {
180  const Json::Value& storage = Storage("value");
181  return client::JsonValueToCppValueHelper<int32 >(storage);
182  }
183 
188  void set_value(int32 value) {
189  client::SetJsonValueFromCppValueHelper<int32 >(
190  value, MutableStorage("value"));
191  }
192 
193  private:
194  void operator=(const BucketByTimePeriod&);
195 }; // BucketByTimePeriod
196 } // namespace google_fitness_api
197 #endif // GOOGLE_FITNESS_API_BUCKET_BY_TIME_PERIOD_H_
void clear_time_zone_id()
Definition: bucket_by_time_period.h:100
const StringPiece GetTypeName() const
Definition: bucket_by_time_period.h:84
void set_type(const StringPiece &value)
Definition: bucket_by_time_period.h:155
void clear_value()
Definition: bucket_by_time_period.h:171
void clear_type()
Definition: bucket_by_time_period.h:137
void set_time_zone_id(const StringPiece &value)
Definition: bucket_by_time_period.h:121
const StringPiece get_type() const
Definition: bucket_by_time_period.h:145
void set_value(int32 value)
Definition: bucket_by_time_period.h:188
Definition: aggregate_bucket.h:42
bool has_time_zone_id() const
Definition: bucket_by_time_period.h:93
const StringPiece get_time_zone_id() const
Definition: bucket_by_time_period.h:108
Definition: bucket_by_time_period.h:51
int32 get_value() const
Definition: bucket_by_time_period.h:179
bool has_type() const
Definition: bucket_by_time_period.h:130
bool has_value() const
Definition: bucket_by_time_period.h:164
Definition: aggregate_bucket.cc:44