games  v1
room_p2_ps_tatus.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_P2_PS_TATUS_H_
31 #define GOOGLE_GAMES_API_ROOM_P2_PS_TATUS_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 namespace Json {
40 class Value;
41 } // namespace Json
42 
43 namespace google_games_api {
44 using namespace googleapis;
45 
51 class RoomP2PStatus : public client::JsonCppData {
52  public:
58  static RoomP2PStatus* New();
59 
65  explicit RoomP2PStatus(const Json::Value& storage);
66 
72  explicit RoomP2PStatus(Json::Value* storage);
73 
77  virtual ~RoomP2PStatus();
78 
84  const StringPiece GetTypeName() const {
85  return StringPiece("google_games_api::RoomP2PStatus");
86  }
87 
96  return Storage().isMember("connectionSetupLatencyMillis");
97  }
98 
103  MutableStorage()->removeMember("connectionSetupLatencyMillis");
104  }
105 
106 
111  const Json::Value& storage = Storage("connectionSetupLatencyMillis");
112  return client::JsonValueToCppValueHelper<int32 >(storage);
113  }
114 
124  client::SetJsonValueFromCppValueHelper<int32 >(
125  value, MutableStorage("connectionSetupLatencyMillis"));
126  }
127 
133  bool has_error() const {
134  return Storage().isMember("error");
135  }
136 
140  void clear_error() {
141  MutableStorage()->removeMember("error");
142  }
143 
144 
148  const StringPiece get_error() const {
149  const Json::Value& v = Storage("error");
150  if (v == Json::Value::null) return StringPiece("");
151  return StringPiece(v.asCString());
152  }
153 
172  void set_error(const StringPiece& value) {
173  *MutableStorage("error") = value.data();
174  }
175 
181  bool has_error_reason() const {
182  return Storage().isMember("error_reason");
183  }
184 
189  MutableStorage()->removeMember("error_reason");
190  }
191 
192 
196  const StringPiece get_error_reason() const {
197  const Json::Value& v = Storage("error_reason");
198  if (v == Json::Value::null) return StringPiece("");
199  return StringPiece(v.asCString());
200  }
201 
209  void set_error_reason(const StringPiece& value) {
210  *MutableStorage("error_reason") = value.data();
211  }
212 
218  bool has_kind() const {
219  return Storage().isMember("kind");
220  }
221 
225  void clear_kind() {
226  MutableStorage()->removeMember("kind");
227  }
228 
229 
233  const StringPiece get_kind() const {
234  const Json::Value& v = Storage("kind");
235  if (v == Json::Value::null) return StringPiece("");
236  return StringPiece(v.asCString());
237  }
238 
247  void set_kind(const StringPiece& value) {
248  *MutableStorage("kind") = value.data();
249  }
250 
256  bool has_participant_id() const {
257  return Storage().isMember("participantId");
258  }
259 
264  MutableStorage()->removeMember("participantId");
265  }
266 
267 
271  const StringPiece get_participant_id() const {
272  const Json::Value& v = Storage("participantId");
273  if (v == Json::Value::null) return StringPiece("");
274  return StringPiece(v.asCString());
275  }
276 
284  void set_participant_id(const StringPiece& value) {
285  *MutableStorage("participantId") = value.data();
286  }
287 
293  bool has_status() const {
294  return Storage().isMember("status");
295  }
296 
300  void clear_status() {
301  MutableStorage()->removeMember("status");
302  }
303 
304 
308  const StringPiece get_status() const {
309  const Json::Value& v = Storage("status");
310  if (v == Json::Value::null) return StringPiece("");
311  return StringPiece(v.asCString());
312  }
313 
329  void set_status(const StringPiece& value) {
330  *MutableStorage("status") = value.data();
331  }
332 
341  return Storage().isMember("unreliableRoundtripLatencyMillis");
342  }
343 
348  MutableStorage()->removeMember("unreliableRoundtripLatencyMillis");
349  }
350 
351 
357  const Json::Value& storage = Storage("unreliableRoundtripLatencyMillis");
358  return client::JsonValueToCppValueHelper<int32 >(storage);
359  }
360 
370  client::SetJsonValueFromCppValueHelper<int32 >(
371  value, MutableStorage("unreliableRoundtripLatencyMillis"));
372  }
373 
374  private:
375  void operator=(const RoomP2PStatus&);
376 }; // RoomP2PStatus
377 } // namespace google_games_api
378 #endif // GOOGLE_GAMES_API_ROOM_P2_PS_TATUS_H_
void set_status(const StringPiece &value)
Definition: room_p2_ps_tatus.h:329
void clear_status()
Definition: room_p2_ps_tatus.h:300
bool has_status() const
Definition: room_p2_ps_tatus.h:293
bool has_participant_id() const
Definition: room_p2_ps_tatus.h:256
void set_kind(const StringPiece &value)
Definition: room_p2_ps_tatus.h:247
const StringPiece get_kind() const
Definition: room_p2_ps_tatus.h:233
bool has_connection_setup_latency_millis() const
Definition: room_p2_ps_tatus.h:95
bool has_kind() const
Definition: room_p2_ps_tatus.h:218
const StringPiece get_participant_id() const
Definition: room_p2_ps_tatus.h:271
void clear_connection_setup_latency_millis()
Definition: room_p2_ps_tatus.h:102
const StringPiece get_error() const
Definition: room_p2_ps_tatus.h:148
bool has_error() const
Definition: room_p2_ps_tatus.h:133
Definition: achievement_definition.cc:41
const StringPiece get_status() const
Definition: room_p2_ps_tatus.h:308
Definition: achievement_definition.h:39
const StringPiece get_error_reason() const
Definition: room_p2_ps_tatus.h:196
void set_error_reason(const StringPiece &value)
Definition: room_p2_ps_tatus.h:209
void clear_error_reason()
Definition: room_p2_ps_tatus.h:188
int32 get_unreliable_roundtrip_latency_millis() const
Definition: room_p2_ps_tatus.h:356
void clear_error()
Definition: room_p2_ps_tatus.h:140
const StringPiece GetTypeName() const
Definition: room_p2_ps_tatus.h:84
void clear_unreliable_roundtrip_latency_millis()
Definition: room_p2_ps_tatus.h:347
void clear_participant_id()
Definition: room_p2_ps_tatus.h:263
void set_error(const StringPiece &value)
Definition: room_p2_ps_tatus.h:172
int32 get_connection_setup_latency_millis() const
Definition: room_p2_ps_tatus.h:110
bool has_unreliable_roundtrip_latency_millis() const
Definition: room_p2_ps_tatus.h:340
void set_unreliable_roundtrip_latency_millis(int32 value)
Definition: room_p2_ps_tatus.h:369
void set_participant_id(const StringPiece &value)
Definition: room_p2_ps_tatus.h:284
void set_connection_setup_latency_millis(int32 value)
Definition: room_p2_ps_tatus.h:123
bool has_error_reason() const
Definition: room_p2_ps_tatus.h:181
void clear_kind()
Definition: room_p2_ps_tatus.h:225
Definition: room_p2_ps_tatus.h:51