games  v1
player_experience_info.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_EXPERIENCE_INFO_H_
31 #define GOOGLE_GAMES_API_PLAYER_EXPERIENCE_INFO_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/games_api/player_level.h"
40 
41 namespace Json {
42 class Value;
43 } // namespace Json
44 
45 namespace google_games_api {
46 using namespace googleapis;
47 
53 class PlayerExperienceInfo : public client::JsonCppData {
54  public:
60  static PlayerExperienceInfo* New();
61 
67  explicit PlayerExperienceInfo(const Json::Value& storage);
68 
74  explicit PlayerExperienceInfo(Json::Value* storage);
75 
79  virtual ~PlayerExperienceInfo();
80 
86  const StringPiece GetTypeName() const {
87  return StringPiece("google_games_api::PlayerExperienceInfo");
88  }
89 
97  return Storage().isMember("currentExperiencePoints");
98  }
99 
104  MutableStorage()->removeMember("currentExperiencePoints");
105  }
106 
107 
112  const Json::Value& storage = Storage("currentExperiencePoints");
113  return client::JsonValueToCppValueHelper<int64 >(storage);
114  }
115 
123  void set_current_experience_points(int64 value) {
124  client::SetJsonValueFromCppValueHelper<int64 >(
125  value, MutableStorage("currentExperiencePoints"));
126  }
127 
133  bool has_current_level() const {
134  return Storage().isMember("currentLevel");
135  }
136 
141  MutableStorage()->removeMember("currentLevel");
142  }
143 
144 
148  const PlayerLevel get_current_level() const;
149 
158  PlayerLevel mutable_currentLevel();
159 
165  bool has_kind() const {
166  return Storage().isMember("kind");
167  }
168 
172  void clear_kind() {
173  MutableStorage()->removeMember("kind");
174  }
175 
176 
180  const StringPiece get_kind() const {
181  const Json::Value& v = Storage("kind");
182  if (v == Json::Value::null) return StringPiece("");
183  return StringPiece(v.asCString());
184  }
185 
194  void set_kind(const StringPiece& value) {
195  *MutableStorage("kind") = value.data();
196  }
197 
206  return Storage().isMember("lastLevelUpTimestampMillis");
207  }
208 
213  MutableStorage()->removeMember("lastLevelUpTimestampMillis");
214  }
215 
216 
221  const Json::Value& storage = Storage("lastLevelUpTimestampMillis");
222  return client::JsonValueToCppValueHelper<int64 >(storage);
223  }
224 
234  client::SetJsonValueFromCppValueHelper<int64 >(
235  value, MutableStorage("lastLevelUpTimestampMillis"));
236  }
237 
243  bool has_next_level() const {
244  return Storage().isMember("nextLevel");
245  }
246 
251  MutableStorage()->removeMember("nextLevel");
252  }
253 
254 
258  const PlayerLevel get_next_level() const;
259 
269  PlayerLevel mutable_nextLevel();
270 
271  private:
272  void operator=(const PlayerExperienceInfo&);
273 }; // PlayerExperienceInfo
274 } // namespace google_games_api
275 #endif // GOOGLE_GAMES_API_PLAYER_EXPERIENCE_INFO_H_
bool has_current_experience_points() const
Definition: player_experience_info.h:96
bool has_next_level() const
Definition: player_experience_info.h:243
int64 get_last_level_up_timestamp_millis() const
Definition: player_experience_info.h:220
void set_kind(const StringPiece &value)
Definition: player_experience_info.h:194
Definition: player_level.h:51
void clear_kind()
Definition: player_experience_info.h:172
Definition: player_experience_info.h:53
void clear_current_level()
Definition: player_experience_info.h:140
void clear_last_level_up_timestamp_millis()
Definition: player_experience_info.h:212
void set_last_level_up_timestamp_millis(int64 value)
Definition: player_experience_info.h:233
int64 get_current_experience_points() const
Definition: player_experience_info.h:111
bool has_last_level_up_timestamp_millis() const
Definition: player_experience_info.h:205
void clear_next_level()
Definition: player_experience_info.h:250
Definition: achievement_definition.cc:41
Definition: achievement_definition.h:39
const StringPiece GetTypeName() const
Definition: player_experience_info.h:86
bool has_kind() const
Definition: player_experience_info.h:165
void set_current_experience_points(int64 value)
Definition: player_experience_info.h:123
const StringPiece get_kind() const
Definition: player_experience_info.h:180
void clear_current_experience_points()
Definition: player_experience_info.h:103
bool has_current_level() const
Definition: player_experience_info.h:133