games  v1
turn_based_match_turn.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_TURN_H_
31 #define GOOGLE_GAMES_API_TURN_BASED_MATCH_TURN_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/participant_result.h"
40 #include "google/games_api/turn_based_match_data_request.h"
41 
42 namespace Json {
43 class Value;
44 } // namespace Json
45 
46 namespace google_games_api {
47 using namespace googleapis;
48 
54 class TurnBasedMatchTurn : public client::JsonCppData {
55  public:
61  static TurnBasedMatchTurn* New();
62 
68  explicit TurnBasedMatchTurn(const Json::Value& storage);
69 
75  explicit TurnBasedMatchTurn(Json::Value* storage);
76 
80  virtual ~TurnBasedMatchTurn();
81 
87  const StringPiece GetTypeName() const {
88  return StringPiece("google_games_api::TurnBasedMatchTurn");
89  }
90 
96  bool has_data() const {
97  return Storage().isMember("data");
98  }
99 
103  void clear_data() {
104  MutableStorage()->removeMember("data");
105  }
106 
107 
111  const TurnBasedMatchDataRequest get_data() const;
112 
120  TurnBasedMatchDataRequest mutable_data();
121 
127  bool has_kind() const {
128  return Storage().isMember("kind");
129  }
130 
134  void clear_kind() {
135  MutableStorage()->removeMember("kind");
136  }
137 
138 
142  const StringPiece get_kind() const {
143  const Json::Value& v = Storage("kind");
144  if (v == Json::Value::null) return StringPiece("");
145  return StringPiece(v.asCString());
146  }
147 
156  void set_kind(const StringPiece& value) {
157  *MutableStorage("kind") = value.data();
158  }
159 
165  bool has_match_version() const {
166  return Storage().isMember("matchVersion");
167  }
168 
173  MutableStorage()->removeMember("matchVersion");
174  }
175 
176 
180  int32 get_match_version() const {
181  const Json::Value& storage = Storage("matchVersion");
182  return client::JsonValueToCppValueHelper<int32 >(storage);
183  }
184 
193  void set_match_version(int32 value) {
194  client::SetJsonValueFromCppValueHelper<int32 >(
195  value, MutableStorage("matchVersion"));
196  }
197 
204  return Storage().isMember("pendingParticipantId");
205  }
206 
211  MutableStorage()->removeMember("pendingParticipantId");
212  }
213 
214 
218  const StringPiece get_pending_participant_id() const {
219  const Json::Value& v = Storage("pendingParticipantId");
220  if (v == Json::Value::null) return StringPiece("");
221  return StringPiece(v.asCString());
222  }
223 
235  void set_pending_participant_id(const StringPiece& value) {
236  *MutableStorage("pendingParticipantId") = value.data();
237  }
238 
244  bool has_results() const {
245  return Storage().isMember("results");
246  }
247 
251  void clear_results() {
252  MutableStorage()->removeMember("results");
253  }
254 
255 
259  const client::JsonCppArray<ParticipantResult > get_results() const;
260 
268  client::JsonCppArray<ParticipantResult > mutable_results();
269 
270  private:
271  void operator=(const TurnBasedMatchTurn&);
272 }; // TurnBasedMatchTurn
273 } // namespace google_games_api
274 #endif // GOOGLE_GAMES_API_TURN_BASED_MATCH_TURN_H_
void set_pending_participant_id(const StringPiece &value)
Definition: turn_based_match_turn.h:235
void set_kind(const StringPiece &value)
Definition: turn_based_match_turn.h:156
void set_match_version(int32 value)
Definition: turn_based_match_turn.h:193
void clear_match_version()
Definition: turn_based_match_turn.h:172
bool has_kind() const
Definition: turn_based_match_turn.h:127
void clear_results()
Definition: turn_based_match_turn.h:251
bool has_results() const
Definition: turn_based_match_turn.h:244
Definition: turn_based_match_data_request.h:50
void clear_pending_participant_id()
Definition: turn_based_match_turn.h:210
void clear_kind()
Definition: turn_based_match_turn.h:134
void clear_data()
Definition: turn_based_match_turn.h:103
bool has_data() const
Definition: turn_based_match_turn.h:96
Definition: achievement_definition.cc:41
Definition: achievement_definition.h:39
const StringPiece GetTypeName() const
Definition: turn_based_match_turn.h:87
bool has_match_version() const
Definition: turn_based_match_turn.h:165
bool has_pending_participant_id() const
Definition: turn_based_match_turn.h:203
Definition: turn_based_match_turn.h:54
const StringPiece get_pending_participant_id() const
Definition: turn_based_match_turn.h:218
int32 get_match_version() const
Definition: turn_based_match_turn.h:180
const StringPiece get_kind() const
Definition: turn_based_match_turn.h:142