games  v1
event_definition.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_EVENT_DEFINITION_H_
31 #define GOOGLE_GAMES_API_EVENT_DEFINITION_H_
32 
33 #include <string>
34 #include "googleapis/base/macros.h"
35 #include "googleapis/client/data/jsoncpp_data.h"
36 #include "googleapis/strings/stringpiece.h"
37 
38 #include "google/games_api/event_child.h"
39 
40 namespace Json {
41 class Value;
42 } // namespace Json
43 
44 namespace google_games_api {
45 using namespace googleapis;
46 
52 class EventDefinition : public client::JsonCppData {
53  public:
59  static EventDefinition* New();
60 
66  explicit EventDefinition(const Json::Value& storage);
67 
73  explicit EventDefinition(Json::Value* storage);
74 
78  virtual ~EventDefinition();
79 
85  const StringPiece GetTypeName() const {
86  return StringPiece("google_games_api::EventDefinition");
87  }
88 
94  bool has_child_events() const {
95  return Storage().isMember("childEvents");
96  }
97 
102  MutableStorage()->removeMember("childEvents");
103  }
104 
105 
109  const client::JsonCppArray<EventChild > get_child_events() const;
110 
119  client::JsonCppArray<EventChild > mutable_childEvents();
120 
126  bool has_description() const {
127  return Storage().isMember("description");
128  }
129 
134  MutableStorage()->removeMember("description");
135  }
136 
137 
141  const StringPiece get_description() const {
142  const Json::Value& v = Storage("description");
143  if (v == Json::Value::null) return StringPiece("");
144  return StringPiece(v.asCString());
145  }
146 
154  void set_description(const StringPiece& value) {
155  *MutableStorage("description") = value.data();
156  }
157 
163  bool has_display_name() const {
164  return Storage().isMember("displayName");
165  }
166 
171  MutableStorage()->removeMember("displayName");
172  }
173 
174 
178  const StringPiece get_display_name() const {
179  const Json::Value& v = Storage("displayName");
180  if (v == Json::Value::null) return StringPiece("");
181  return StringPiece(v.asCString());
182  }
183 
191  void set_display_name(const StringPiece& value) {
192  *MutableStorage("displayName") = value.data();
193  }
194 
200  bool has_id() const {
201  return Storage().isMember("id");
202  }
203 
207  void clear_id() {
208  MutableStorage()->removeMember("id");
209  }
210 
211 
215  const StringPiece get_id() const {
216  const Json::Value& v = Storage("id");
217  if (v == Json::Value::null) return StringPiece("");
218  return StringPiece(v.asCString());
219  }
220 
228  void set_id(const StringPiece& value) {
229  *MutableStorage("id") = value.data();
230  }
231 
237  bool has_image_url() const {
238  return Storage().isMember("imageUrl");
239  }
240 
245  MutableStorage()->removeMember("imageUrl");
246  }
247 
248 
252  const StringPiece get_image_url() const {
253  const Json::Value& v = Storage("imageUrl");
254  if (v == Json::Value::null) return StringPiece("");
255  return StringPiece(v.asCString());
256  }
257 
265  void set_image_url(const StringPiece& value) {
266  *MutableStorage("imageUrl") = value.data();
267  }
268 
275  return Storage().isMember("isDefaultImageUrl");
276  }
277 
282  MutableStorage()->removeMember("isDefaultImageUrl");
283  }
284 
285 
290  const Json::Value& storage = Storage("isDefaultImageUrl");
291  return client::JsonValueToCppValueHelper<bool >(storage);
292  }
293 
302  void set_is_default_image_url(bool value) {
303  client::SetJsonValueFromCppValueHelper<bool >(
304  value, MutableStorage("isDefaultImageUrl"));
305  }
306 
312  bool has_kind() const {
313  return Storage().isMember("kind");
314  }
315 
319  void clear_kind() {
320  MutableStorage()->removeMember("kind");
321  }
322 
323 
327  const StringPiece get_kind() const {
328  const Json::Value& v = Storage("kind");
329  if (v == Json::Value::null) return StringPiece("");
330  return StringPiece(v.asCString());
331  }
332 
341  void set_kind(const StringPiece& value) {
342  *MutableStorage("kind") = value.data();
343  }
344 
350  bool has_visibility() const {
351  return Storage().isMember("visibility");
352  }
353 
358  MutableStorage()->removeMember("visibility");
359  }
360 
361 
365  const StringPiece get_visibility() const {
366  const Json::Value& v = Storage("visibility");
367  if (v == Json::Value::null) return StringPiece("");
368  return StringPiece(v.asCString());
369  }
370 
387  void set_visibility(const StringPiece& value) {
388  *MutableStorage("visibility") = value.data();
389  }
390 
391  private:
392  void operator=(const EventDefinition&);
393 }; // EventDefinition
394 } // namespace google_games_api
395 #endif // GOOGLE_GAMES_API_EVENT_DEFINITION_H_
void clear_visibility()
Definition: event_definition.h:357
bool has_is_default_image_url() const
Definition: event_definition.h:274
void set_visibility(const StringPiece &value)
Definition: event_definition.h:387
void clear_display_name()
Definition: event_definition.h:170
void set_is_default_image_url(bool value)
Definition: event_definition.h:302
void set_kind(const StringPiece &value)
Definition: event_definition.h:341
bool has_id() const
Definition: event_definition.h:200
void clear_is_default_image_url()
Definition: event_definition.h:281
const StringPiece get_image_url() const
Definition: event_definition.h:252
bool has_visibility() const
Definition: event_definition.h:350
bool has_display_name() const
Definition: event_definition.h:163
const StringPiece get_id() const
Definition: event_definition.h:215
Definition: event_definition.h:52
bool has_description() const
Definition: event_definition.h:126
void clear_kind()
Definition: event_definition.h:319
void set_display_name(const StringPiece &value)
Definition: event_definition.h:191
void clear_id()
Definition: event_definition.h:207
Definition: achievement_definition.cc:41
void set_image_url(const StringPiece &value)
Definition: event_definition.h:265
void set_description(const StringPiece &value)
Definition: event_definition.h:154
Definition: achievement_definition.h:39
bool get_is_default_image_url() const
Definition: event_definition.h:289
const StringPiece get_description() const
Definition: event_definition.h:141
bool has_kind() const
Definition: event_definition.h:312
const StringPiece get_visibility() const
Definition: event_definition.h:365
const StringPiece get_kind() const
Definition: event_definition.h:327
void set_id(const StringPiece &value)
Definition: event_definition.h:228
bool has_child_events() const
Definition: event_definition.h:94
const StringPiece GetTypeName() const
Definition: event_definition.h:85
bool has_image_url() const
Definition: event_definition.h:237
void clear_child_events()
Definition: event_definition.h:101
void clear_image_url()
Definition: event_definition.h:244
void clear_description()
Definition: event_definition.h:133
const StringPiece get_display_name() const
Definition: event_definition.h:178