games  v1
turn_based_match_participant.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_TURN_BASED_MATCH_PARTICIPANT_H_
31 #define GOOGLE_GAMES_API_TURN_BASED_MATCH_PARTICIPANT_H_
32 
33 #include <string>
34 #include "googleapis/base/macros.h"
35 #include "googleapis/client/data/jsoncpp_data.h"
36 #include "googleapis/strings/stringpiece.h"
37 
38 #include "google/games_api/anonymous_player.h"
39 #include "google/games_api/player.h"
40 
41 namespace Json {
42 class Value;
43 } // namespace Json
44 
45 namespace google_games_api {
46 using namespace googleapis;
47 
53 class TurnBasedMatchParticipant : public client::JsonCppData {
54  public:
60  static TurnBasedMatchParticipant* New();
61 
67  explicit TurnBasedMatchParticipant(const Json::Value& storage);
68 
74  explicit TurnBasedMatchParticipant(Json::Value* storage);
75 
79  virtual ~TurnBasedMatchParticipant();
80 
86  const StringPiece GetTypeName() const {
87  return StringPiece("google_games_api::TurnBasedMatchParticipant");
88  }
89 
95  bool has_auto_matched() const {
96  return Storage().isMember("autoMatched");
97  }
98 
103  MutableStorage()->removeMember("autoMatched");
104  }
105 
106 
110  bool get_auto_matched() const {
111  const Json::Value& storage = Storage("autoMatched");
112  return client::JsonValueToCppValueHelper<bool >(storage);
113  }
114 
122  void set_auto_matched(bool value) {
123  client::SetJsonValueFromCppValueHelper<bool >(
124  value, MutableStorage("autoMatched"));
125  }
126 
132  bool has_auto_matched_player() const {
133  return Storage().isMember("autoMatchedPlayer");
134  }
135 
140  MutableStorage()->removeMember("autoMatchedPlayer");
141  }
142 
143 
148  const AnonymousPlayer get_auto_matched_player() const;
149 
159  AnonymousPlayer mutable_autoMatchedPlayer();
160 
166  bool has_id() const {
167  return Storage().isMember("id");
168  }
169 
173  void clear_id() {
174  MutableStorage()->removeMember("id");
175  }
176 
177 
181  const StringPiece get_id() const {
182  const Json::Value& v = Storage("id");
183  if (v == Json::Value::null) return StringPiece("");
184  return StringPiece(v.asCString());
185  }
186 
195  void set_id(const StringPiece& value) {
196  *MutableStorage("id") = value.data();
197  }
198 
204  bool has_kind() const {
205  return Storage().isMember("kind");
206  }
207 
211  void clear_kind() {
212  MutableStorage()->removeMember("kind");
213  }
214 
215 
219  const StringPiece get_kind() const {
220  const Json::Value& v = Storage("kind");
221  if (v == Json::Value::null) return StringPiece("");
222  return StringPiece(v.asCString());
223  }
224 
233  void set_kind(const StringPiece& value) {
234  *MutableStorage("kind") = value.data();
235  }
236 
242  bool has_player() const {
243  return Storage().isMember("player");
244  }
245 
249  void clear_player() {
250  MutableStorage()->removeMember("player");
251  }
252 
253 
257  const Player get_player() const;
258 
268  Player mutable_player();
269 
275  bool has_status() const {
276  return Storage().isMember("status");
277  }
278 
282  void clear_status() {
283  MutableStorage()->removeMember("status");
284  }
285 
286 
290  const StringPiece get_status() const {
291  const Json::Value& v = Storage("status");
292  if (v == Json::Value::null) return StringPiece("");
293  return StringPiece(v.asCString());
294  }
295 
325  void set_status(const StringPiece& value) {
326  *MutableStorage("status") = value.data();
327  }
328 
329  private:
330  void operator=(const TurnBasedMatchParticipant&);
331 }; // TurnBasedMatchParticipant
332 } // namespace google_games_api
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
Definition: player.h:54
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