30 #ifndef GOOGLE_GAMES_API_TURN_BASED_MATCH_PARTICIPANT_H_ 31 #define GOOGLE_GAMES_API_TURN_BASED_MATCH_PARTICIPANT_H_ 34 #include "googleapis/base/macros.h" 35 #include "googleapis/client/data/jsoncpp_data.h" 36 #include "googleapis/strings/stringpiece.h" 38 #include "google/games_api/anonymous_player.h" 39 #include "google/games_api/player.h" 87 return StringPiece(
"google_games_api::TurnBasedMatchParticipant");
96 return Storage().isMember(
"autoMatched");
103 MutableStorage()->removeMember(
"autoMatched");
111 const Json::Value& storage = Storage(
"autoMatched");
112 return client::JsonValueToCppValueHelper<bool >(storage);
123 client::SetJsonValueFromCppValueHelper<bool >(
124 value, MutableStorage(
"autoMatched"));
133 return Storage().isMember(
"autoMatchedPlayer");
140 MutableStorage()->removeMember(
"autoMatchedPlayer");
167 return Storage().isMember(
"id");
174 MutableStorage()->removeMember(
"id");
182 const Json::Value& v = Storage(
"id");
183 if (v == Json::Value::null)
return StringPiece(
"");
184 return StringPiece(v.asCString());
196 *MutableStorage(
"id") = value.data();
205 return Storage().isMember(
"kind");
212 MutableStorage()->removeMember(
"kind");
220 const Json::Value& v = Storage(
"kind");
221 if (v == Json::Value::null)
return StringPiece(
"");
222 return StringPiece(v.asCString());
234 *MutableStorage(
"kind") = value.data();
243 return Storage().isMember(
"player");
250 MutableStorage()->removeMember(
"player");
257 const Player get_player()
const;
276 return Storage().isMember(
"status");
283 MutableStorage()->removeMember(
"status");
291 const Json::Value& v = Storage(
"status");
292 if (v == Json::Value::null)
return StringPiece(
"");
293 return StringPiece(v.asCString());
326 *MutableStorage(
"status") = value.data();
333 #endif // GOOGLE_GAMES_API_TURN_BASED_MATCH_PARTICIPANT_H_ bool has_auto_matched() const
Definition: turn_based_match_participant.h:95
void clear_auto_matched_player()
Definition: turn_based_match_participant.h:139
Definition: anonymous_player.h:50
const StringPiece GetTypeName() const
Definition: turn_based_match_participant.h:86
void set_status(const StringPiece &value)
Definition: turn_based_match_participant.h:325
const StringPiece get_kind() const
Definition: turn_based_match_participant.h:219
void set_id(const StringPiece &value)
Definition: turn_based_match_participant.h:195
bool has_player() const
Definition: turn_based_match_participant.h:242
void clear_status()
Definition: turn_based_match_participant.h:282
void clear_kind()
Definition: turn_based_match_participant.h:211
Definition: turn_based_match_participant.h:53
Definition: achievement_definition.cc:41
void clear_player()
Definition: turn_based_match_participant.h:249
const StringPiece get_status() const
Definition: turn_based_match_participant.h:290
Definition: achievement_definition.h:39
const StringPiece get_id() const
Definition: turn_based_match_participant.h:181
void clear_id()
Definition: turn_based_match_participant.h:173
bool get_auto_matched() const
Definition: turn_based_match_participant.h:110
void clear_auto_matched()
Definition: turn_based_match_participant.h:102
bool has_status() const
Definition: turn_based_match_participant.h:275
bool has_id() const
Definition: turn_based_match_participant.h:166
void set_auto_matched(bool value)
Definition: turn_based_match_participant.h:122
bool has_auto_matched_player() const
Definition: turn_based_match_participant.h:132
bool has_kind() const
Definition: turn_based_match_participant.h:204
void set_kind(const StringPiece &value)
Definition: turn_based_match_participant.h:233