games  v1
player_achievement.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-07, 08:12:42 UTC
18 // C++ generator version: 0.1.4
19 
20 // ----------------------------------------------------------------------------
21 // NOTE: This file is generated from Google APIs Discovery Service.
22 // Service:
23 // Google Play Game Services API (games/v1)
24 // Generated from:
25 // Version: v1
26 // Revision: 358
27 // Generated by:
28 // Tool: google-apis-code-generator 1.5.1
29 // C++: 0.1.4
30 #ifndef GOOGLE_GAMES_API_PLAYER_ACHIEVEMENT_H_
31 #define GOOGLE_GAMES_API_PLAYER_ACHIEVEMENT_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_games_api {
44 using namespace googleapis;
45 
51 class PlayerAchievement : public client::JsonCppData {
52  public:
58  static PlayerAchievement* New();
59 
65  explicit PlayerAchievement(const Json::Value& storage);
66 
72  explicit PlayerAchievement(Json::Value* storage);
73 
77  virtual ~PlayerAchievement();
78 
84  const StringPiece GetTypeName() const {
85  return StringPiece("google_games_api::PlayerAchievement");
86  }
87 
93  bool has_achievement_state() const {
94  return Storage().isMember("achievementState");
95  }
96 
101  MutableStorage()->removeMember("achievementState");
102  }
103 
104 
108  const StringPiece get_achievement_state() const {
109  const Json::Value& v = Storage("achievementState");
110  if (v == Json::Value::null) return StringPiece("");
111  return StringPiece(v.asCString());
112  }
113 
131  void set_achievement_state(const StringPiece& value) {
132  *MutableStorage("achievementState") = value.data();
133  }
134 
140  bool has_current_steps() const {
141  return Storage().isMember("currentSteps");
142  }
143 
148  MutableStorage()->removeMember("currentSteps");
149  }
150 
151 
155  int32 get_current_steps() const {
156  const Json::Value& storage = Storage("currentSteps");
157  return client::JsonValueToCppValueHelper<int32 >(storage);
158  }
159 
167  void set_current_steps(int32 value) {
168  client::SetJsonValueFromCppValueHelper<int32 >(
169  value, MutableStorage("currentSteps"));
170  }
171 
177  bool has_experience_points() const {
178  return Storage().isMember("experiencePoints");
179  }
180 
185  MutableStorage()->removeMember("experiencePoints");
186  }
187 
188 
192  int64 get_experience_points() const {
193  const Json::Value& storage = Storage("experiencePoints");
194  return client::JsonValueToCppValueHelper<int64 >(storage);
195  }
196 
206  void set_experience_points(int64 value) {
207  client::SetJsonValueFromCppValueHelper<int64 >(
208  value, MutableStorage("experiencePoints"));
209  }
210 
219  return Storage().isMember("formattedCurrentStepsString");
220  }
221 
226  MutableStorage()->removeMember("formattedCurrentStepsString");
227  }
228 
229 
233  const StringPiece get_formatted_current_steps_string() const {
234  const Json::Value& v = Storage("formattedCurrentStepsString");
235  if (v == Json::Value::null) return StringPiece("");
236  return StringPiece(v.asCString());
237  }
238 
246  void set_formatted_current_steps_string(const StringPiece& value) {
247  *MutableStorage("formattedCurrentStepsString") = value.data();
248  }
249 
255  bool has_id() const {
256  return Storage().isMember("id");
257  }
258 
262  void clear_id() {
263  MutableStorage()->removeMember("id");
264  }
265 
266 
270  const StringPiece get_id() const {
271  const Json::Value& v = Storage("id");
272  if (v == Json::Value::null) return StringPiece("");
273  return StringPiece(v.asCString());
274  }
275 
283  void set_id(const StringPiece& value) {
284  *MutableStorage("id") = value.data();
285  }
286 
292  bool has_kind() const {
293  return Storage().isMember("kind");
294  }
295 
299  void clear_kind() {
300  MutableStorage()->removeMember("kind");
301  }
302 
303 
307  const StringPiece get_kind() const {
308  const Json::Value& v = Storage("kind");
309  if (v == Json::Value::null) return StringPiece("");
310  return StringPiece(v.asCString());
311  }
312 
321  void set_kind(const StringPiece& value) {
322  *MutableStorage("kind") = value.data();
323  }
324 
331  return Storage().isMember("lastUpdatedTimestamp");
332  }
333 
338  MutableStorage()->removeMember("lastUpdatedTimestamp");
339  }
340 
341 
346  const Json::Value& storage = Storage("lastUpdatedTimestamp");
347  return client::JsonValueToCppValueHelper<int64 >(storage);
348  }
349 
357  void set_last_updated_timestamp(int64 value) {
358  client::SetJsonValueFromCppValueHelper<int64 >(
359  value, MutableStorage("lastUpdatedTimestamp"));
360  }
361 
362  private:
363  void operator=(const PlayerAchievement&);
364 }; // PlayerAchievement
365 } // namespace google_games_api
366 #endif // GOOGLE_GAMES_API_PLAYER_ACHIEVEMENT_H_
bool has_formatted_current_steps_string() const
Definition: player_achievement.h:218
const StringPiece get_id() const
Definition: player_achievement.h:270
void set_id(const StringPiece &value)
Definition: player_achievement.h:283
void set_last_updated_timestamp(int64 value)
Definition: player_achievement.h:357
void clear_achievement_state()
Definition: player_achievement.h:100
bool has_experience_points() const
Definition: player_achievement.h:177
int64 get_experience_points() const
Definition: player_achievement.h:192
void clear_formatted_current_steps_string()
Definition: player_achievement.h:225
void set_kind(const StringPiece &value)
Definition: player_achievement.h:321
void set_current_steps(int32 value)
Definition: player_achievement.h:167
int32 get_current_steps() const
Definition: player_achievement.h:155
const StringPiece get_formatted_current_steps_string() const
Definition: player_achievement.h:233
Definition: player_achievement.h:51
void clear_kind()
Definition: player_achievement.h:299
void clear_id()
Definition: player_achievement.h:262
bool has_last_updated_timestamp() const
Definition: player_achievement.h:330
Definition: achievement_definition.cc:41
Definition: achievement_definition.h:39
void set_achievement_state(const StringPiece &value)
Definition: player_achievement.h:131
const StringPiece get_achievement_state() const
Definition: player_achievement.h:108
const StringPiece GetTypeName() const
Definition: player_achievement.h:84
bool has_achievement_state() const
Definition: player_achievement.h:93
void clear_current_steps()
Definition: player_achievement.h:147
void set_experience_points(int64 value)
Definition: player_achievement.h:206
bool has_kind() const
Definition: player_achievement.h:292
void clear_last_updated_timestamp()
Definition: player_achievement.h:337
bool has_id() const
Definition: player_achievement.h:255
bool has_current_steps() const
Definition: player_achievement.h:140
void clear_experience_points()
Definition: player_achievement.h:184
const StringPiece get_kind() const
Definition: player_achievement.h:307
void set_formatted_current_steps_string(const StringPiece &value)
Definition: player_achievement.h:246
int64 get_last_updated_timestamp() const
Definition: player_achievement.h:345