games  v1
participant_result.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_PARTICIPANT_RESULT_H_
31 #define GOOGLE_GAMES_API_PARTICIPANT_RESULT_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 ParticipantResult : public client::JsonCppData {
52  public:
58  static ParticipantResult* New();
59 
65  explicit ParticipantResult(const Json::Value& storage);
66 
72  explicit ParticipantResult(Json::Value* storage);
73 
77  virtual ~ParticipantResult();
78 
84  const StringPiece GetTypeName() const {
85  return StringPiece("google_games_api::ParticipantResult");
86  }
87 
93  bool has_kind() const {
94  return Storage().isMember("kind");
95  }
96 
100  void clear_kind() {
101  MutableStorage()->removeMember("kind");
102  }
103 
104 
108  const StringPiece get_kind() const {
109  const Json::Value& v = Storage("kind");
110  if (v == Json::Value::null) return StringPiece("");
111  return StringPiece(v.asCString());
112  }
113 
122  void set_kind(const StringPiece& value) {
123  *MutableStorage("kind") = value.data();
124  }
125 
131  bool has_participant_id() const {
132  return Storage().isMember("participantId");
133  }
134 
139  MutableStorage()->removeMember("participantId");
140  }
141 
142 
146  const StringPiece get_participant_id() const {
147  const Json::Value& v = Storage("participantId");
148  if (v == Json::Value::null) return StringPiece("");
149  return StringPiece(v.asCString());
150  }
151 
159  void set_participant_id(const StringPiece& value) {
160  *MutableStorage("participantId") = value.data();
161  }
162 
168  bool has_placing() const {
169  return Storage().isMember("placing");
170  }
171 
175  void clear_placing() {
176  MutableStorage()->removeMember("placing");
177  }
178 
179 
183  int32 get_placing() const {
184  const Json::Value& storage = Storage("placing");
185  return client::JsonValueToCppValueHelper<int32 >(storage);
186  }
187 
197  void set_placing(int32 value) {
198  client::SetJsonValueFromCppValueHelper<int32 >(
199  value, MutableStorage("placing"));
200  }
201 
207  bool has_result() const {
208  return Storage().isMember("result");
209  }
210 
214  void clear_result() {
215  MutableStorage()->removeMember("result");
216  }
217 
218 
222  const StringPiece get_result() const {
223  const Json::Value& v = Storage("result");
224  if (v == Json::Value::null) return StringPiece("");
225  return StringPiece(v.asCString());
226  }
227 
252  void set_result(const StringPiece& value) {
253  *MutableStorage("result") = value.data();
254  }
255 
256  private:
257  void operator=(const ParticipantResult&);
258 }; // ParticipantResult
259 } // namespace google_games_api
260 #endif // GOOGLE_GAMES_API_PARTICIPANT_RESULT_H_
int32 get_placing() const
Definition: participant_result.h:183
const StringPiece get_kind() const
Definition: participant_result.h:108
void set_participant_id(const StringPiece &value)
Definition: participant_result.h:159
const StringPiece get_result() const
Definition: participant_result.h:222
void clear_result()
Definition: participant_result.h:214
const StringPiece get_participant_id() const
Definition: participant_result.h:146
void set_kind(const StringPiece &value)
Definition: participant_result.h:122
const StringPiece GetTypeName() const
Definition: participant_result.h:84
Definition: achievement_definition.cc:41
Definition: achievement_definition.h:39
void clear_placing()
Definition: participant_result.h:175
void clear_kind()
Definition: participant_result.h:100
bool has_result() const
Definition: participant_result.h:207
bool has_placing() const
Definition: participant_result.h:168
void set_result(const StringPiece &value)
Definition: participant_result.h:252
bool has_kind() const
Definition: participant_result.h:93
void set_placing(int32 value)
Definition: participant_result.h:197
void clear_participant_id()
Definition: participant_result.h:138
Definition: participant_result.h:51
bool has_participant_id() const
Definition: participant_result.h:131