30 #ifndef GOOGLE_GAMES_API_ACHIEVEMENT_DEFINITION_H_ 31 #define GOOGLE_GAMES_API_ACHIEVEMENT_DEFINITION_H_ 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" 85 return StringPiece(
"google_games_api::AchievementDefinition");
94 return Storage().isMember(
"achievementType");
101 MutableStorage()->removeMember(
"achievementType");
109 const Json::Value& v = Storage(
"achievementType");
110 if (v == Json::Value::null)
return StringPiece(
"");
111 return StringPiece(v.asCString());
130 *MutableStorage(
"achievementType") = value.data();
139 return Storage().isMember(
"description");
146 MutableStorage()->removeMember(
"description");
154 const Json::Value& v = Storage(
"description");
155 if (v == Json::Value::null)
return StringPiece(
"");
156 return StringPiece(v.asCString());
167 *MutableStorage(
"description") = value.data();
176 return Storage().isMember(
"experiencePoints");
183 MutableStorage()->removeMember(
"experiencePoints");
191 const Json::Value& storage = Storage(
"experiencePoints");
192 return client::JsonValueToCppValueHelper<int64 >(storage);
203 client::SetJsonValueFromCppValueHelper<int64 >(
204 value, MutableStorage(
"experiencePoints"));
213 return Storage().isMember(
"formattedTotalSteps");
220 MutableStorage()->removeMember(
"formattedTotalSteps");
228 const Json::Value& v = Storage(
"formattedTotalSteps");
229 if (v == Json::Value::null)
return StringPiece(
"");
230 return StringPiece(v.asCString());
241 *MutableStorage(
"formattedTotalSteps") = value.data();
250 return Storage().isMember(
"id");
257 MutableStorage()->removeMember(
"id");
265 const Json::Value& v = Storage(
"id");
266 if (v == Json::Value::null)
return StringPiece(
"");
267 return StringPiece(v.asCString());
278 *MutableStorage(
"id") = value.data();
287 return Storage().isMember(
"initialState");
294 MutableStorage()->removeMember(
"initialState");
302 const Json::Value& v = Storage(
"initialState");
303 if (v == Json::Value::null)
return StringPiece(
"");
304 return StringPiece(v.asCString());
325 *MutableStorage(
"initialState") = value.data();
335 return Storage().isMember(
"isRevealedIconUrlDefault");
342 MutableStorage()->removeMember(
"isRevealedIconUrlDefault");
350 const Json::Value& storage = Storage(
"isRevealedIconUrlDefault");
351 return client::JsonValueToCppValueHelper<bool >(storage);
363 client::SetJsonValueFromCppValueHelper<bool >(
364 value, MutableStorage(
"isRevealedIconUrlDefault"));
374 return Storage().isMember(
"isUnlockedIconUrlDefault");
381 MutableStorage()->removeMember(
"isUnlockedIconUrlDefault");
389 const Json::Value& storage = Storage(
"isUnlockedIconUrlDefault");
390 return client::JsonValueToCppValueHelper<bool >(storage);
402 client::SetJsonValueFromCppValueHelper<bool >(
403 value, MutableStorage(
"isUnlockedIconUrlDefault"));
412 return Storage().isMember(
"kind");
419 MutableStorage()->removeMember(
"kind");
427 const Json::Value& v = Storage(
"kind");
428 if (v == Json::Value::null)
return StringPiece(
"");
429 return StringPiece(v.asCString());
441 *MutableStorage(
"kind") = value.data();
450 return Storage().isMember(
"name");
457 MutableStorage()->removeMember(
"name");
465 const Json::Value& v = Storage(
"name");
466 if (v == Json::Value::null)
return StringPiece(
"");
467 return StringPiece(v.asCString());
478 *MutableStorage(
"name") = value.data();
487 return Storage().isMember(
"revealedIconUrl");
494 MutableStorage()->removeMember(
"revealedIconUrl");
502 const Json::Value& v = Storage(
"revealedIconUrl");
503 if (v == Json::Value::null)
return StringPiece(
"");
504 return StringPiece(v.asCString());
515 *MutableStorage(
"revealedIconUrl") = value.data();
524 return Storage().isMember(
"totalSteps");
531 MutableStorage()->removeMember(
"totalSteps");
539 const Json::Value& storage = Storage(
"totalSteps");
540 return client::JsonValueToCppValueHelper<int32 >(storage);
551 client::SetJsonValueFromCppValueHelper<int32 >(
552 value, MutableStorage(
"totalSteps"));
561 return Storage().isMember(
"unlockedIconUrl");
568 MutableStorage()->removeMember(
"unlockedIconUrl");
576 const Json::Value& v = Storage(
"unlockedIconUrl");
577 if (v == Json::Value::null)
return StringPiece(
"");
578 return StringPiece(v.asCString());
589 *MutableStorage(
"unlockedIconUrl") = value.data();
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