games  v1
turn_based_match_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_TURN_BASED_MATCH_CREATE_REQUEST_H_
31 #define GOOGLE_GAMES_API_TURN_BASED_MATCH_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/turn_based_auto_matching_criteria.h"
40 
41 namespace Json {
42 class Value;
43 } // namespace Json
44 
45 namespace google_games_api {
46 using namespace googleapis;
47 
53 class TurnBasedMatchCreateRequest : public client::JsonCppData {
54  public:
60  static TurnBasedMatchCreateRequest* New();
61 
67  explicit TurnBasedMatchCreateRequest(const Json::Value& storage);
68 
74  explicit TurnBasedMatchCreateRequest(Json::Value* storage);
75 
79  virtual ~TurnBasedMatchCreateRequest();
80 
86  const StringPiece GetTypeName() const {
87  return StringPiece("google_games_api::TurnBasedMatchCreateRequest");
88  }
89 
96  return Storage().isMember("autoMatchingCriteria");
97  }
98 
103  MutableStorage()->removeMember("autoMatchingCriteria");
104  }
105 
106 
111  const TurnBasedAutoMatchingCriteria get_auto_matching_criteria() const;
112 
121  TurnBasedAutoMatchingCriteria mutable_autoMatchingCriteria();
122 
128  bool has_invited_player_ids() const {
129  return Storage().isMember("invitedPlayerIds");
130  }
131 
136  MutableStorage()->removeMember("invitedPlayerIds");
137  }
138 
139 
144  const client::JsonCppArray<string > get_invited_player_ids() const {
145  const Json::Value& storage = Storage("invitedPlayerIds");
146  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
147  }
148 
157  client::JsonCppArray<string > mutable_invitedPlayerIds() {
158  Json::Value* storage = MutableStorage("invitedPlayerIds");
159  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
160  }
161 
167  bool has_kind() const {
168  return Storage().isMember("kind");
169  }
170 
174  void clear_kind() {
175  MutableStorage()->removeMember("kind");
176  }
177 
178 
182  const StringPiece get_kind() const {
183  const Json::Value& v = Storage("kind");
184  if (v == Json::Value::null) return StringPiece("");
185  return StringPiece(v.asCString());
186  }
187 
196  void set_kind(const StringPiece& value) {
197  *MutableStorage("kind") = value.data();
198  }
199 
205  bool has_request_id() const {
206  return Storage().isMember("requestId");
207  }
208 
213  MutableStorage()->removeMember("requestId");
214  }
215 
216 
220  int64 get_request_id() const {
221  const Json::Value& storage = Storage("requestId");
222  return client::JsonValueToCppValueHelper<int64 >(storage);
223  }
224 
233  void set_request_id(int64 value) {
234  client::SetJsonValueFromCppValueHelper<int64 >(
235  value, MutableStorage("requestId"));
236  }
237 
243  bool has_variant() const {
244  return Storage().isMember("variant");
245  }
246 
250  void clear_variant() {
251  MutableStorage()->removeMember("variant");
252  }
253 
254 
258  int32 get_variant() const {
259  const Json::Value& storage = Storage("variant");
260  return client::JsonValueToCppValueHelper<int32 >(storage);
261  }
262 
272  void set_variant(int32 value) {
273  client::SetJsonValueFromCppValueHelper<int32 >(
274  value, MutableStorage("variant"));
275  }
276 
277  private:
278  void operator=(const TurnBasedMatchCreateRequest&);
279 }; // TurnBasedMatchCreateRequest
280 } // namespace google_games_api
281 #endif // GOOGLE_GAMES_API_TURN_BASED_MATCH_CREATE_REQUEST_H_
void clear_auto_matching_criteria()
Definition: turn_based_match_create_request.h:102
void clear_kind()
Definition: turn_based_match_create_request.h:174
void clear_invited_player_ids()
Definition: turn_based_match_create_request.h:135
bool has_invited_player_ids() const
Definition: turn_based_match_create_request.h:128
client::JsonCppArray< string > mutable_invitedPlayerIds()
Definition: turn_based_match_create_request.h:157
Definition: turn_based_auto_matching_criteria.h:51
const StringPiece get_kind() const
Definition: turn_based_match_create_request.h:182
const StringPiece GetTypeName() const
Definition: turn_based_match_create_request.h:86
bool has_request_id() const
Definition: turn_based_match_create_request.h:205
void set_request_id(int64 value)
Definition: turn_based_match_create_request.h:233
Definition: achievement_definition.cc:41
bool has_kind() const
Definition: turn_based_match_create_request.h:167
void set_kind(const StringPiece &value)
Definition: turn_based_match_create_request.h:196
Definition: achievement_definition.h:39
const client::JsonCppArray< string > get_invited_player_ids() const
Definition: turn_based_match_create_request.h:144
bool has_variant() const
Definition: turn_based_match_create_request.h:243
void clear_variant()
Definition: turn_based_match_create_request.h:250
int32 get_variant() const
Definition: turn_based_match_create_request.h:258
bool has_auto_matching_criteria() const
Definition: turn_based_match_create_request.h:95
int64 get_request_id() const
Definition: turn_based_match_create_request.h:220
void clear_request_id()
Definition: turn_based_match_create_request.h:212
void set_variant(int32 value)
Definition: turn_based_match_create_request.h:272
Definition: turn_based_match_create_request.h:53