games  v1
room_create_request.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_CREATE_REQUEST_H_
31 #define GOOGLE_GAMES_API_ROOM_CREATE_REQUEST_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/network_diagnostics.h"
40 #include "google/games_api/room_auto_matching_criteria.h"
41 #include "google/games_api/room_client_address.h"
42 
43 namespace Json {
44 class Value;
45 } // namespace Json
46 
47 namespace google_games_api {
48 using namespace googleapis;
49 
55 class RoomCreateRequest : public client::JsonCppData {
56  public:
62  static RoomCreateRequest* New();
63 
69  explicit RoomCreateRequest(const Json::Value& storage);
70 
76  explicit RoomCreateRequest(Json::Value* storage);
77 
81  virtual ~RoomCreateRequest();
82 
88  const StringPiece GetTypeName() const {
89  return StringPiece("google_games_api::RoomCreateRequest");
90  }
91 
98  return Storage().isMember("autoMatchingCriteria");
99  }
100 
105  MutableStorage()->removeMember("autoMatchingCriteria");
106  }
107 
108 
113  const RoomAutoMatchingCriteria get_auto_matching_criteria() const;
114 
123  RoomAutoMatchingCriteria mutable_autoMatchingCriteria();
124 
130  bool has_capabilities() const {
131  return Storage().isMember("capabilities");
132  }
133 
138  MutableStorage()->removeMember("capabilities");
139  }
140 
141 
145  const client::JsonCppArray<string > get_capabilities() const {
146  const Json::Value& storage = Storage("capabilities");
147  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
148  }
149 
158  client::JsonCppArray<string > mutable_capabilities() {
159  Json::Value* storage = MutableStorage("capabilities");
160  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
161  }
162 
168  bool has_client_address() const {
169  return Storage().isMember("clientAddress");
170  }
171 
176  MutableStorage()->removeMember("clientAddress");
177  }
178 
179 
183  const RoomClientAddress get_client_address() const;
184 
193  RoomClientAddress mutable_clientAddress();
194 
200  bool has_invited_player_ids() const {
201  return Storage().isMember("invitedPlayerIds");
202  }
203 
208  MutableStorage()->removeMember("invitedPlayerIds");
209  }
210 
211 
216  const client::JsonCppArray<string > get_invited_player_ids() const {
217  const Json::Value& storage = Storage("invitedPlayerIds");
218  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
219  }
220 
229  client::JsonCppArray<string > mutable_invitedPlayerIds() {
230  Json::Value* storage = MutableStorage("invitedPlayerIds");
231  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
232  }
233 
239  bool has_kind() const {
240  return Storage().isMember("kind");
241  }
242 
246  void clear_kind() {
247  MutableStorage()->removeMember("kind");
248  }
249 
250 
254  const StringPiece get_kind() const {
255  const Json::Value& v = Storage("kind");
256  if (v == Json::Value::null) return StringPiece("");
257  return StringPiece(v.asCString());
258  }
259 
268  void set_kind(const StringPiece& value) {
269  *MutableStorage("kind") = value.data();
270  }
271 
277  bool has_network_diagnostics() const {
278  return Storage().isMember("networkDiagnostics");
279  }
280 
285  MutableStorage()->removeMember("networkDiagnostics");
286  }
287 
288 
293  const NetworkDiagnostics get_network_diagnostics() const;
294 
303  NetworkDiagnostics mutable_networkDiagnostics();
304 
310  bool has_request_id() const {
311  return Storage().isMember("requestId");
312  }
313 
318  MutableStorage()->removeMember("requestId");
319  }
320 
321 
325  int64 get_request_id() const {
326  const Json::Value& storage = Storage("requestId");
327  return client::JsonValueToCppValueHelper<int64 >(storage);
328  }
329 
338  void set_request_id(int64 value) {
339  client::SetJsonValueFromCppValueHelper<int64 >(
340  value, MutableStorage("requestId"));
341  }
342 
348  bool has_variant() const {
349  return Storage().isMember("variant");
350  }
351 
355  void clear_variant() {
356  MutableStorage()->removeMember("variant");
357  }
358 
359 
363  int32 get_variant() const {
364  const Json::Value& storage = Storage("variant");
365  return client::JsonValueToCppValueHelper<int32 >(storage);
366  }
367 
377  void set_variant(int32 value) {
378  client::SetJsonValueFromCppValueHelper<int32 >(
379  value, MutableStorage("variant"));
380  }
381 
382  private:
383  void operator=(const RoomCreateRequest&);
384 }; // RoomCreateRequest
385 } // namespace google_games_api
386 #endif // GOOGLE_GAMES_API_ROOM_CREATE_REQUEST_H_
const client::JsonCppArray< string > get_capabilities() const
Definition: room_create_request.h:145
void clear_auto_matching_criteria()
Definition: room_create_request.h:104
Definition: room_client_address.h:50
void set_variant(int32 value)
Definition: room_create_request.h:377
Definition: room_create_request.h:55
void clear_capabilities()
Definition: room_create_request.h:137
const StringPiece GetTypeName() const
Definition: room_create_request.h:88
bool has_invited_player_ids() const
Definition: room_create_request.h:200
void set_request_id(int64 value)
Definition: room_create_request.h:338
const StringPiece get_kind() const
Definition: room_create_request.h:254
bool has_client_address() const
Definition: room_create_request.h:168
bool has_auto_matching_criteria() const
Definition: room_create_request.h:97
bool has_request_id() const
Definition: room_create_request.h:310
void clear_client_address()
Definition: room_create_request.h:175
bool has_network_diagnostics() const
Definition: room_create_request.h:277
void clear_kind()
Definition: room_create_request.h:246
bool has_kind() const
Definition: room_create_request.h:239
void clear_variant()
Definition: room_create_request.h:355
Definition: achievement_definition.cc:41
Definition: achievement_definition.h:39
void clear_network_diagnostics()
Definition: room_create_request.h:284
client::JsonCppArray< string > mutable_capabilities()
Definition: room_create_request.h:158
void clear_invited_player_ids()
Definition: room_create_request.h:207
void clear_request_id()
Definition: room_create_request.h:317
bool has_variant() const
Definition: room_create_request.h:348
int64 get_request_id() const
Definition: room_create_request.h:325
client::JsonCppArray< string > mutable_invitedPlayerIds()
Definition: room_create_request.h:229
Definition: network_diagnostics.h:51
void set_kind(const StringPiece &value)
Definition: room_create_request.h:268
const client::JsonCppArray< string > get_invited_player_ids() const
Definition: room_create_request.h:216
bool has_capabilities() const
Definition: room_create_request.h:130
Definition: room_auto_matching_criteria.h:51
int32 get_variant() const
Definition: room_create_request.h:363