games  v1
achievement_definition.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_ACHIEVEMENT_DEFINITION_H_
31 #define GOOGLE_GAMES_API_ACHIEVEMENT_DEFINITION_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 AchievementDefinition : public client::JsonCppData {
52  public:
58  static AchievementDefinition* New();
59 
65  explicit AchievementDefinition(const Json::Value& storage);
66 
72  explicit AchievementDefinition(Json::Value* storage);
73 
77  virtual ~AchievementDefinition();
78 
84  const StringPiece GetTypeName() const {
85  return StringPiece("google_games_api::AchievementDefinition");
86  }
87 
93  bool has_achievement_type() const {
94  return Storage().isMember("achievementType");
95  }
96 
101  MutableStorage()->removeMember("achievementType");
102  }
103 
104 
108  const StringPiece get_achievement_type() const {
109  const Json::Value& v = Storage("achievementType");
110  if (v == Json::Value::null) return StringPiece("");
111  return StringPiece(v.asCString());
112  }
113 
129  void set_achievement_type(const StringPiece& value) {
130  *MutableStorage("achievementType") = value.data();
131  }
132 
138  bool has_description() const {
139  return Storage().isMember("description");
140  }
141 
146  MutableStorage()->removeMember("description");
147  }
148 
149 
153  const StringPiece get_description() const {
154  const Json::Value& v = Storage("description");
155  if (v == Json::Value::null) return StringPiece("");
156  return StringPiece(v.asCString());
157  }
158 
166  void set_description(const StringPiece& value) {
167  *MutableStorage("description") = value.data();
168  }
169 
175  bool has_experience_points() const {
176  return Storage().isMember("experiencePoints");
177  }
178 
183  MutableStorage()->removeMember("experiencePoints");
184  }
185 
186 
190  int64 get_experience_points() const {
191  const Json::Value& storage = Storage("experiencePoints");
192  return client::JsonValueToCppValueHelper<int64 >(storage);
193  }
194 
202  void set_experience_points(int64 value) {
203  client::SetJsonValueFromCppValueHelper<int64 >(
204  value, MutableStorage("experiencePoints"));
205  }
206 
213  return Storage().isMember("formattedTotalSteps");
214  }
215 
220  MutableStorage()->removeMember("formattedTotalSteps");
221  }
222 
223 
227  const StringPiece get_formatted_total_steps() const {
228  const Json::Value& v = Storage("formattedTotalSteps");
229  if (v == Json::Value::null) return StringPiece("");
230  return StringPiece(v.asCString());
231  }
232 
240  void set_formatted_total_steps(const StringPiece& value) {
241  *MutableStorage("formattedTotalSteps") = value.data();
242  }
243 
249  bool has_id() const {
250  return Storage().isMember("id");
251  }
252 
256  void clear_id() {
257  MutableStorage()->removeMember("id");
258  }
259 
260 
264  const StringPiece get_id() const {
265  const Json::Value& v = Storage("id");
266  if (v == Json::Value::null) return StringPiece("");
267  return StringPiece(v.asCString());
268  }
269 
277  void set_id(const StringPiece& value) {
278  *MutableStorage("id") = value.data();
279  }
280 
286  bool has_initial_state() const {
287  return Storage().isMember("initialState");
288  }
289 
294  MutableStorage()->removeMember("initialState");
295  }
296 
297 
301  const StringPiece get_initial_state() const {
302  const Json::Value& v = Storage("initialState");
303  if (v == Json::Value::null) return StringPiece("");
304  return StringPiece(v.asCString());
305  }
306 
324  void set_initial_state(const StringPiece& value) {
325  *MutableStorage("initialState") = value.data();
326  }
327 
335  return Storage().isMember("isRevealedIconUrlDefault");
336  }
337 
342  MutableStorage()->removeMember("isRevealedIconUrlDefault");
343  }
344 
345 
350  const Json::Value& storage = Storage("isRevealedIconUrlDefault");
351  return client::JsonValueToCppValueHelper<bool >(storage);
352  }
353 
363  client::SetJsonValueFromCppValueHelper<bool >(
364  value, MutableStorage("isRevealedIconUrlDefault"));
365  }
366 
374  return Storage().isMember("isUnlockedIconUrlDefault");
375  }
376 
381  MutableStorage()->removeMember("isUnlockedIconUrlDefault");
382  }
383 
384 
389  const Json::Value& storage = Storage("isUnlockedIconUrlDefault");
390  return client::JsonValueToCppValueHelper<bool >(storage);
391  }
392 
402  client::SetJsonValueFromCppValueHelper<bool >(
403  value, MutableStorage("isUnlockedIconUrlDefault"));
404  }
405 
411  bool has_kind() const {
412  return Storage().isMember("kind");
413  }
414 
418  void clear_kind() {
419  MutableStorage()->removeMember("kind");
420  }
421 
422 
426  const StringPiece get_kind() const {
427  const Json::Value& v = Storage("kind");
428  if (v == Json::Value::null) return StringPiece("");
429  return StringPiece(v.asCString());
430  }
431 
440  void set_kind(const StringPiece& value) {
441  *MutableStorage("kind") = value.data();
442  }
443 
449  bool has_name() const {
450  return Storage().isMember("name");
451  }
452 
456  void clear_name() {
457  MutableStorage()->removeMember("name");
458  }
459 
460 
464  const StringPiece get_name() const {
465  const Json::Value& v = Storage("name");
466  if (v == Json::Value::null) return StringPiece("");
467  return StringPiece(v.asCString());
468  }
469 
477  void set_name(const StringPiece& value) {
478  *MutableStorage("name") = value.data();
479  }
480 
486  bool has_revealed_icon_url() const {
487  return Storage().isMember("revealedIconUrl");
488  }
489 
494  MutableStorage()->removeMember("revealedIconUrl");
495  }
496 
497 
501  const StringPiece get_revealed_icon_url() const {
502  const Json::Value& v = Storage("revealedIconUrl");
503  if (v == Json::Value::null) return StringPiece("");
504  return StringPiece(v.asCString());
505  }
506 
514  void set_revealed_icon_url(const StringPiece& value) {
515  *MutableStorage("revealedIconUrl") = value.data();
516  }
517 
523  bool has_total_steps() const {
524  return Storage().isMember("totalSteps");
525  }
526 
531  MutableStorage()->removeMember("totalSteps");
532  }
533 
534 
538  int32 get_total_steps() const {
539  const Json::Value& storage = Storage("totalSteps");
540  return client::JsonValueToCppValueHelper<int32 >(storage);
541  }
542 
550  void set_total_steps(int32 value) {
551  client::SetJsonValueFromCppValueHelper<int32 >(
552  value, MutableStorage("totalSteps"));
553  }
554 
560  bool has_unlocked_icon_url() const {
561  return Storage().isMember("unlockedIconUrl");
562  }
563 
568  MutableStorage()->removeMember("unlockedIconUrl");
569  }
570 
571 
575  const StringPiece get_unlocked_icon_url() const {
576  const Json::Value& v = Storage("unlockedIconUrl");
577  if (v == Json::Value::null) return StringPiece("");
578  return StringPiece(v.asCString());
579  }
580 
588  void set_unlocked_icon_url(const StringPiece& value) {
589  *MutableStorage("unlockedIconUrl") = value.data();
590  }
591 
592  private:
593  void operator=(const AchievementDefinition&);
594 }; // AchievementDefinition
595 } // namespace google_games_api
596 #endif // GOOGLE_GAMES_API_ACHIEVEMENT_DEFINITION_H_
bool has_is_revealed_icon_url_default() const
Definition: achievement_definition.h:334
bool has_experience_points() const
Definition: achievement_definition.h:175
bool has_formatted_total_steps() const
Definition: achievement_definition.h:212
void clear_initial_state()
Definition: achievement_definition.h:293
const StringPiece get_initial_state() const
Definition: achievement_definition.h:301
void clear_id()
Definition: achievement_definition.h:256
void set_unlocked_icon_url(const StringPiece &value)
Definition: achievement_definition.h:588
bool has_total_steps() const
Definition: achievement_definition.h:523
void clear_formatted_total_steps()
Definition: achievement_definition.h:219
void set_id(const StringPiece &value)
Definition: achievement_definition.h:277
void set_is_revealed_icon_url_default(bool value)
Definition: achievement_definition.h:362
bool has_kind() const
Definition: achievement_definition.h:411
void clear_is_unlocked_icon_url_default()
Definition: achievement_definition.h:380
const StringPiece get_description() const
Definition: achievement_definition.h:153
void clear_is_revealed_icon_url_default()
Definition: achievement_definition.h:341
int64 get_experience_points() const
Definition: achievement_definition.h:190
bool has_is_unlocked_icon_url_default() const
Definition: achievement_definition.h:373
bool has_initial_state() const
Definition: achievement_definition.h:286
const StringPiece get_revealed_icon_url() const
Definition: achievement_definition.h:501
void clear_unlocked_icon_url()
Definition: achievement_definition.h:567
void clear_total_steps()
Definition: achievement_definition.h:530
void set_name(const StringPiece &value)
Definition: achievement_definition.h:477
Definition: achievement_definition.h:51
bool has_revealed_icon_url() const
Definition: achievement_definition.h:486
const StringPiece GetTypeName() const
Definition: achievement_definition.h:84
const StringPiece get_formatted_total_steps() const
Definition: achievement_definition.h:227
bool get_is_unlocked_icon_url_default() const
Definition: achievement_definition.h:388
void clear_revealed_icon_url()
Definition: achievement_definition.h:493
Definition: achievement_definition.cc:41
void clear_experience_points()
Definition: achievement_definition.h:182
Definition: achievement_definition.h:39
bool has_description() const
Definition: achievement_definition.h:138
bool has_achievement_type() const
Definition: achievement_definition.h:93
const StringPiece get_id() const
Definition: achievement_definition.h:264
void clear_name()
Definition: achievement_definition.h:456
void set_description(const StringPiece &value)
Definition: achievement_definition.h:166
const StringPiece get_unlocked_icon_url() const
Definition: achievement_definition.h:575
bool has_unlocked_icon_url() const
Definition: achievement_definition.h:560
void set_is_unlocked_icon_url_default(bool value)
Definition: achievement_definition.h:401
bool has_id() const
Definition: achievement_definition.h:249
void set_revealed_icon_url(const StringPiece &value)
Definition: achievement_definition.h:514
void set_experience_points(int64 value)
Definition: achievement_definition.h:202
const StringPiece get_name() const
Definition: achievement_definition.h:464
const StringPiece get_achievement_type() const
Definition: achievement_definition.h:108
void set_achievement_type(const StringPiece &value)
Definition: achievement_definition.h:129
int32 get_total_steps() const
Definition: achievement_definition.h:538
void clear_achievement_type()
Definition: achievement_definition.h:100
void clear_kind()
Definition: achievement_definition.h:418
void set_total_steps(int32 value)
Definition: achievement_definition.h:550
void set_formatted_total_steps(const StringPiece &value)
Definition: achievement_definition.h:240
bool has_name() const
Definition: achievement_definition.h:449
const StringPiece get_kind() const
Definition: achievement_definition.h:426
void set_initial_state(const StringPiece &value)
Definition: achievement_definition.h:324
bool get_is_revealed_icon_url_default() const
Definition: achievement_definition.h:349
void set_kind(const StringPiece &value)
Definition: achievement_definition.h:440
void clear_description()
Definition: achievement_definition.h:145