games  v1
room_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_ROOM_PARTICIPANT_H_
31 #define GOOGLE_GAMES_API_ROOM_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 #include "google/games_api/room_client_address.h"
41 
42 namespace Json {
43 class Value;
44 } // namespace Json
45 
46 namespace google_games_api {
47 using namespace googleapis;
48 
54 class RoomParticipant : public client::JsonCppData {
55  public:
61  static RoomParticipant* New();
62 
68  explicit RoomParticipant(const Json::Value& storage);
69 
75  explicit RoomParticipant(Json::Value* storage);
76 
80  virtual ~RoomParticipant();
81 
87  const StringPiece GetTypeName() const {
88  return StringPiece("google_games_api::RoomParticipant");
89  }
90 
96  bool has_auto_matched() const {
97  return Storage().isMember("autoMatched");
98  }
99 
104  MutableStorage()->removeMember("autoMatched");
105  }
106 
107 
111  bool get_auto_matched() const {
112  const Json::Value& storage = Storage("autoMatched");
113  return client::JsonValueToCppValueHelper<bool >(storage);
114  }
115 
123  void set_auto_matched(bool value) {
124  client::SetJsonValueFromCppValueHelper<bool >(
125  value, MutableStorage("autoMatched"));
126  }
127 
133  bool has_auto_matched_player() const {
134  return Storage().isMember("autoMatchedPlayer");
135  }
136 
141  MutableStorage()->removeMember("autoMatchedPlayer");
142  }
143 
144 
149  const AnonymousPlayer get_auto_matched_player() const;
150 
160  AnonymousPlayer mutable_autoMatchedPlayer();
161 
167  bool has_capabilities() const {
168  return Storage().isMember("capabilities");
169  }
170 
175  MutableStorage()->removeMember("capabilities");
176  }
177 
178 
182  const client::JsonCppArray<string > get_capabilities() const {
183  const Json::Value& storage = Storage("capabilities");
184  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
185  }
186 
196  client::JsonCppArray<string > mutable_capabilities() {
197  Json::Value* storage = MutableStorage("capabilities");
198  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
199  }
200 
206  bool has_client_address() const {
207  return Storage().isMember("clientAddress");
208  }
209 
214  MutableStorage()->removeMember("clientAddress");
215  }
216 
217 
221  const RoomClientAddress get_client_address() const;
222 
231  RoomClientAddress mutable_clientAddress();
232 
238  bool has_connected() const {
239  return Storage().isMember("connected");
240  }
241 
246  MutableStorage()->removeMember("connected");
247  }
248 
249 
253  bool get_connected() const {
254  const Json::Value& storage = Storage("connected");
255  return client::JsonValueToCppValueHelper<bool >(storage);
256  }
257 
266  void set_connected(bool value) {
267  client::SetJsonValueFromCppValueHelper<bool >(
268  value, MutableStorage("connected"));
269  }
270 
276  bool has_id() const {
277  return Storage().isMember("id");
278  }
279 
283  void clear_id() {
284  MutableStorage()->removeMember("id");
285  }
286 
287 
291  const StringPiece get_id() const {
292  const Json::Value& v = Storage("id");
293  if (v == Json::Value::null) return StringPiece("");
294  return StringPiece(v.asCString());
295  }
296 
305  void set_id(const StringPiece& value) {
306  *MutableStorage("id") = value.data();
307  }
308 
314  bool has_kind() const {
315  return Storage().isMember("kind");
316  }
317 
321  void clear_kind() {
322  MutableStorage()->removeMember("kind");
323  }
324 
325 
329  const StringPiece get_kind() const {
330  const Json::Value& v = Storage("kind");
331  if (v == Json::Value::null) return StringPiece("");
332  return StringPiece(v.asCString());
333  }
334 
343  void set_kind(const StringPiece& value) {
344  *MutableStorage("kind") = value.data();
345  }
346 
352  bool has_leave_reason() const {
353  return Storage().isMember("leaveReason");
354  }
355 
360  MutableStorage()->removeMember("leaveReason");
361  }
362 
363 
367  const StringPiece get_leave_reason() const {
368  const Json::Value& v = Storage("leaveReason");
369  if (v == Json::Value::null) return StringPiece("");
370  return StringPiece(v.asCString());
371  }
372 
401  void set_leave_reason(const StringPiece& value) {
402  *MutableStorage("leaveReason") = value.data();
403  }
404 
410  bool has_player() const {
411  return Storage().isMember("player");
412  }
413 
417  void clear_player() {
418  MutableStorage()->removeMember("player");
419  }
420 
421 
425  const Player get_player() const;
426 
436  Player mutable_player();
437 
443  bool has_status() const {
444  return Storage().isMember("status");
445  }
446 
450  void clear_status() {
451  MutableStorage()->removeMember("status");
452  }
453 
454 
458  const StringPiece get_status() const {
459  const Json::Value& v = Storage("status");
460  if (v == Json::Value::null) return StringPiece("");
461  return StringPiece(v.asCString());
462  }
463 
485  void set_status(const StringPiece& value) {
486  *MutableStorage("status") = value.data();
487  }
488 
489  private:
490  void operator=(const RoomParticipant&);
491 }; // RoomParticipant
492 } // namespace google_games_api
493 #endif // GOOGLE_GAMES_API_ROOM_PARTICIPANT_H_
bool has_client_address() const
Definition: room_participant.h:206
Definition: anonymous_player.h:50
Definition: room_participant.h:54
Definition: player.h:54
bool has_kind() const
Definition: room_participant.h:314
const StringPiece get_kind() const
Definition: room_participant.h:329
Definition: room_client_address.h:50
bool has_id() const
Definition: room_participant.h:276
bool has_player() const
Definition: room_participant.h:410
bool has_connected() const
Definition: room_participant.h:238
void set_kind(const StringPiece &value)
Definition: room_participant.h:343
const StringPiece GetTypeName() const
Definition: room_participant.h:87
void clear_leave_reason()
Definition: room_participant.h:359
void clear_connected()
Definition: room_participant.h:245
bool has_capabilities() const
Definition: room_participant.h:167
void clear_id()
Definition: room_participant.h:283
const StringPiece get_status() const
Definition: room_participant.h:458
void set_id(const StringPiece &value)
Definition: room_participant.h:305
bool has_auto_matched_player() const
Definition: room_participant.h:133
const StringPiece get_id() const
Definition: room_participant.h:291
bool has_status() const
Definition: room_participant.h:443
void clear_auto_matched_player()
Definition: room_participant.h:140
Definition: achievement_definition.cc:41
Definition: achievement_definition.h:39
void clear_status()
Definition: room_participant.h:450
bool get_connected() const
Definition: room_participant.h:253
void clear_kind()
Definition: room_participant.h:321
void set_leave_reason(const StringPiece &value)
Definition: room_participant.h:401
bool has_auto_matched() const
Definition: room_participant.h:96
void set_auto_matched(bool value)
Definition: room_participant.h:123
const StringPiece get_leave_reason() const
Definition: room_participant.h:367
void clear_capabilities()
Definition: room_participant.h:174
void clear_player()
Definition: room_participant.h:417
client::JsonCppArray< string > mutable_capabilities()
Definition: room_participant.h:196
const client::JsonCppArray< string > get_capabilities() const
Definition: room_participant.h:182
void clear_auto_matched()
Definition: room_participant.h:103
void set_status(const StringPiece &value)
Definition: room_participant.h:485
bool get_auto_matched() const
Definition: room_participant.h:111
bool has_leave_reason() const
Definition: room_participant.h:352
void set_connected(bool value)
Definition: room_participant.h:266
void clear_client_address()
Definition: room_participant.h:213