games  v1
turn_based_match_results.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_RESULTS_H_
31 #define GOOGLE_GAMES_API_TURN_BASED_MATCH_RESULTS_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 TurnBasedMatchResults : public client::JsonCppData {
55  public:
61  static TurnBasedMatchResults* New();
62 
68  explicit TurnBasedMatchResults(const Json::Value& storage);
69 
75  explicit TurnBasedMatchResults(Json::Value* storage);
76 
80  virtual ~TurnBasedMatchResults();
81 
87  const StringPiece GetTypeName() const {
88  return StringPiece("google_games_api::TurnBasedMatchResults");
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 
192  void set_match_version(int32 value) {
193  client::SetJsonValueFromCppValueHelper<int32 >(
194  value, MutableStorage("matchVersion"));
195  }
196 
202  bool has_results() const {
203  return Storage().isMember("results");
204  }
205 
209  void clear_results() {
210  MutableStorage()->removeMember("results");
211  }
212 
213 
217  const client::JsonCppArray<ParticipantResult > get_results() const;
218 
226  client::JsonCppArray<ParticipantResult > mutable_results();
227 
228  private:
229  void operator=(const TurnBasedMatchResults&);
230 }; // TurnBasedMatchResults
231 } // namespace google_games_api
232 #endif // GOOGLE_GAMES_API_TURN_BASED_MATCH_RESULTS_H_
void clear_match_version()
Definition: turn_based_match_results.h:172
void set_kind(const StringPiece &value)
Definition: turn_based_match_results.h:156
const StringPiece get_kind() const
Definition: turn_based_match_results.h:142
Definition: turn_based_match_results.h:54
bool has_results() const
Definition: turn_based_match_results.h:202
Definition: turn_based_match_data_request.h:50
void clear_kind()
Definition: turn_based_match_results.h:134
int32 get_match_version() const
Definition: turn_based_match_results.h:180
bool has_data() const
Definition: turn_based_match_results.h:96
Definition: achievement_definition.cc:41
Definition: achievement_definition.h:39
bool has_match_version() const
Definition: turn_based_match_results.h:165
bool has_kind() const
Definition: turn_based_match_results.h:127
void clear_data()
Definition: turn_based_match_results.h:103
const StringPiece GetTypeName() const
Definition: turn_based_match_results.h:87
void clear_results()
Definition: turn_based_match_results.h:209
void set_match_version(int32 value)
Definition: turn_based_match_results.h:192