games  v1
room_status.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_STATUS_H_
31 #define GOOGLE_GAMES_API_ROOM_STATUS_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 #include "google/games_api/room_auto_match_status.h"
40 #include "google/games_api/room_participant.h"
41 
42 namespace Json {
43 class Value;
44 } // namespace Json
45 
46 namespace google_games_api {
47 using namespace googleapis;
48 
54 class RoomStatus : public client::JsonCppData {
55  public:
61  static RoomStatus* New();
62 
68  explicit RoomStatus(const Json::Value& storage);
69 
75  explicit RoomStatus(Json::Value* storage);
76 
80  virtual ~RoomStatus();
81 
87  const StringPiece GetTypeName() const {
88  return StringPiece("google_games_api::RoomStatus");
89  }
90 
96  bool has_auto_matching_status() const {
97  return Storage().isMember("autoMatchingStatus");
98  }
99 
104  MutableStorage()->removeMember("autoMatchingStatus");
105  }
106 
107 
112  const RoomAutoMatchStatus get_auto_matching_status() const;
113 
123  RoomAutoMatchStatus mutable_autoMatchingStatus();
124 
130  bool has_kind() const {
131  return Storage().isMember("kind");
132  }
133 
137  void clear_kind() {
138  MutableStorage()->removeMember("kind");
139  }
140 
141 
145  const StringPiece get_kind() const {
146  const Json::Value& v = Storage("kind");
147  if (v == Json::Value::null) return StringPiece("");
148  return StringPiece(v.asCString());
149  }
150 
159  void set_kind(const StringPiece& value) {
160  *MutableStorage("kind") = value.data();
161  }
162 
168  bool has_participants() const {
169  return Storage().isMember("participants");
170  }
171 
176  MutableStorage()->removeMember("participants");
177  }
178 
179 
183  const client::JsonCppArray<RoomParticipant > get_participants() const;
184 
194  client::JsonCppArray<RoomParticipant > mutable_participants();
195 
201  bool has_room_id() const {
202  return Storage().isMember("roomId");
203  }
204 
208  void clear_room_id() {
209  MutableStorage()->removeMember("roomId");
210  }
211 
212 
216  const StringPiece get_room_id() const {
217  const Json::Value& v = Storage("roomId");
218  if (v == Json::Value::null) return StringPiece("");
219  return StringPiece(v.asCString());
220  }
221 
229  void set_room_id(const StringPiece& value) {
230  *MutableStorage("roomId") = value.data();
231  }
232 
238  bool has_status() const {
239  return Storage().isMember("status");
240  }
241 
245  void clear_status() {
246  MutableStorage()->removeMember("status");
247  }
248 
249 
253  const StringPiece get_status() const {
254  const Json::Value& v = Storage("status");
255  if (v == Json::Value::null) return StringPiece("");
256  return StringPiece(v.asCString());
257  }
258 
281  void set_status(const StringPiece& value) {
282  *MutableStorage("status") = value.data();
283  }
284 
290  bool has_status_version() const {
291  return Storage().isMember("statusVersion");
292  }
293 
298  MutableStorage()->removeMember("statusVersion");
299  }
300 
301 
305  int32 get_status_version() const {
306  const Json::Value& storage = Storage("statusVersion");
307  return client::JsonValueToCppValueHelper<int32 >(storage);
308  }
309 
318  void set_status_version(int32 value) {
319  client::SetJsonValueFromCppValueHelper<int32 >(
320  value, MutableStorage("statusVersion"));
321  }
322 
323  private:
324  void operator=(const RoomStatus&);
325 }; // RoomStatus
326 } // namespace google_games_api
327 #endif // GOOGLE_GAMES_API_ROOM_STATUS_H_
const StringPiece get_status() const
Definition: room_status.h:253
void set_status(const StringPiece &value)
Definition: room_status.h:281
void set_kind(const StringPiece &value)
Definition: room_status.h:159
bool has_auto_matching_status() const
Definition: room_status.h:96
Definition: room_auto_match_status.h:51
void set_room_id(const StringPiece &value)
Definition: room_status.h:229
const StringPiece GetTypeName() const
Definition: room_status.h:87
const StringPiece get_kind() const
Definition: room_status.h:145
bool has_status() const
Definition: room_status.h:238
void clear_kind()
Definition: room_status.h:137
Definition: room_status.h:54
const StringPiece get_room_id() const
Definition: room_status.h:216
void clear_participants()
Definition: room_status.h:175
void clear_auto_matching_status()
Definition: room_status.h:103
bool has_participants() const
Definition: room_status.h:168
Definition: achievement_definition.cc:41
Definition: achievement_definition.h:39
void clear_room_id()
Definition: room_status.h:208
void set_status_version(int32 value)
Definition: room_status.h:318
int32 get_status_version() const
Definition: room_status.h:305
bool has_room_id() const
Definition: room_status.h:201
bool has_kind() const
Definition: room_status.h:130
void clear_status()
Definition: room_status.h:245
void clear_status_version()
Definition: room_status.h:297
bool has_status_version() const
Definition: room_status.h:290