games  v1
application.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_APPLICATION_H_
31 #define GOOGLE_GAMES_API_APPLICATION_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/application_category.h"
40 #include "google/games_api/image_asset.h"
41 #include "google/games_api/instance.h"
42 
43 namespace Json {
44 class Value;
45 } // namespace Json
46 
47 namespace google_games_api {
48 using namespace googleapis;
49 
55 class Application : public client::JsonCppData {
56  public:
62  static Application* New();
63 
69  explicit Application(const Json::Value& storage);
70 
76  explicit Application(Json::Value* storage);
77 
81  virtual ~Application();
82 
88  const StringPiece GetTypeName() const {
89  return StringPiece("google_games_api::Application");
90  }
91 
97  bool has_achievement_count() const {
98  return Storage().isMember("achievement_count");
99  }
100 
105  MutableStorage()->removeMember("achievement_count");
106  }
107 
108 
112  int32 get_achievement_count() const {
113  const Json::Value& storage = Storage("achievement_count");
114  return client::JsonValueToCppValueHelper<int32 >(storage);
115  }
116 
124  void set_achievement_count(int32 value) {
125  client::SetJsonValueFromCppValueHelper<int32 >(
126  value, MutableStorage("achievement_count"));
127  }
128 
134  bool has_assets() const {
135  return Storage().isMember("assets");
136  }
137 
141  void clear_assets() {
142  MutableStorage()->removeMember("assets");
143  }
144 
145 
149  const client::JsonCppArray<ImageAsset > get_assets() const;
150 
158  client::JsonCppArray<ImageAsset > mutable_assets();
159 
165  bool has_author() const {
166  return Storage().isMember("author");
167  }
168 
172  void clear_author() {
173  MutableStorage()->removeMember("author");
174  }
175 
176 
180  const StringPiece get_author() const {
181  const Json::Value& v = Storage("author");
182  if (v == Json::Value::null) return StringPiece("");
183  return StringPiece(v.asCString());
184  }
185 
193  void set_author(const StringPiece& value) {
194  *MutableStorage("author") = value.data();
195  }
196 
202  bool has_category() const {
203  return Storage().isMember("category");
204  }
205 
209  void clear_category() {
210  MutableStorage()->removeMember("category");
211  }
212 
213 
217  const ApplicationCategory get_category() const;
218 
227  ApplicationCategory mutable_category();
228 
234  bool has_description() const {
235  return Storage().isMember("description");
236  }
237 
242  MutableStorage()->removeMember("description");
243  }
244 
245 
249  const StringPiece get_description() const {
250  const Json::Value& v = Storage("description");
251  if (v == Json::Value::null) return StringPiece("");
252  return StringPiece(v.asCString());
253  }
254 
262  void set_description(const StringPiece& value) {
263  *MutableStorage("description") = value.data();
264  }
265 
271  bool has_enabled_features() const {
272  return Storage().isMember("enabledFeatures");
273  }
274 
279  MutableStorage()->removeMember("enabledFeatures");
280  }
281 
282 
287  const client::JsonCppArray<string > get_enabled_features() const {
288  const Json::Value& storage = Storage("enabledFeatures");
289  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
290  }
291 
302  client::JsonCppArray<string > mutable_enabledFeatures() {
303  Json::Value* storage = MutableStorage("enabledFeatures");
304  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
305  }
306 
312  bool has_id() const {
313  return Storage().isMember("id");
314  }
315 
319  void clear_id() {
320  MutableStorage()->removeMember("id");
321  }
322 
323 
327  const StringPiece get_id() const {
328  const Json::Value& v = Storage("id");
329  if (v == Json::Value::null) return StringPiece("");
330  return StringPiece(v.asCString());
331  }
332 
340  void set_id(const StringPiece& value) {
341  *MutableStorage("id") = value.data();
342  }
343 
349  bool has_instances() const {
350  return Storage().isMember("instances");
351  }
352 
357  MutableStorage()->removeMember("instances");
358  }
359 
360 
364  const client::JsonCppArray<Instance > get_instances() const;
365 
374  client::JsonCppArray<Instance > mutable_instances();
375 
381  bool has_kind() const {
382  return Storage().isMember("kind");
383  }
384 
388  void clear_kind() {
389  MutableStorage()->removeMember("kind");
390  }
391 
392 
396  const StringPiece get_kind() const {
397  const Json::Value& v = Storage("kind");
398  if (v == Json::Value::null) return StringPiece("");
399  return StringPiece(v.asCString());
400  }
401 
410  void set_kind(const StringPiece& value) {
411  *MutableStorage("kind") = value.data();
412  }
413 
420  return Storage().isMember("lastUpdatedTimestamp");
421  }
422 
427  MutableStorage()->removeMember("lastUpdatedTimestamp");
428  }
429 
430 
435  const Json::Value& storage = Storage("lastUpdatedTimestamp");
436  return client::JsonValueToCppValueHelper<int64 >(storage);
437  }
438 
446  void set_last_updated_timestamp(int64 value) {
447  client::SetJsonValueFromCppValueHelper<int64 >(
448  value, MutableStorage("lastUpdatedTimestamp"));
449  }
450 
456  bool has_leaderboard_count() const {
457  return Storage().isMember("leaderboard_count");
458  }
459 
464  MutableStorage()->removeMember("leaderboard_count");
465  }
466 
467 
471  int32 get_leaderboard_count() const {
472  const Json::Value& storage = Storage("leaderboard_count");
473  return client::JsonValueToCppValueHelper<int32 >(storage);
474  }
475 
483  void set_leaderboard_count(int32 value) {
484  client::SetJsonValueFromCppValueHelper<int32 >(
485  value, MutableStorage("leaderboard_count"));
486  }
487 
493  bool has_name() const {
494  return Storage().isMember("name");
495  }
496 
500  void clear_name() {
501  MutableStorage()->removeMember("name");
502  }
503 
504 
508  const StringPiece get_name() const {
509  const Json::Value& v = Storage("name");
510  if (v == Json::Value::null) return StringPiece("");
511  return StringPiece(v.asCString());
512  }
513 
521  void set_name(const StringPiece& value) {
522  *MutableStorage("name") = value.data();
523  }
524 
530  bool has_theme_color() const {
531  return Storage().isMember("themeColor");
532  }
533 
538  MutableStorage()->removeMember("themeColor");
539  }
540 
541 
545  const StringPiece get_theme_color() const {
546  const Json::Value& v = Storage("themeColor");
547  if (v == Json::Value::null) return StringPiece("");
548  return StringPiece(v.asCString());
549  }
550 
559  void set_theme_color(const StringPiece& value) {
560  *MutableStorage("themeColor") = value.data();
561  }
562 
563  private:
564  void operator=(const Application&);
565 }; // Application
566 } // namespace google_games_api
567 #endif // GOOGLE_GAMES_API_APPLICATION_H_
void set_achievement_count(int32 value)
Definition: application.h:124
bool has_name() const
Definition: application.h:493
void clear_kind()
Definition: application.h:388
void set_id(const StringPiece &value)
Definition: application.h:340
bool has_kind() const
Definition: application.h:381
bool has_assets() const
Definition: application.h:134
const StringPiece get_kind() const
Definition: application.h:396
void clear_description()
Definition: application.h:241
void set_description(const StringPiece &value)
Definition: application.h:262
int32 get_leaderboard_count() const
Definition: application.h:471
bool has_leaderboard_count() const
Definition: application.h:456
const client::JsonCppArray< string > get_enabled_features() const
Definition: application.h:287
const StringPiece get_theme_color() const
Definition: application.h:545
const StringPiece GetTypeName() const
Definition: application.h:88
const StringPiece get_name() const
Definition: application.h:508
void clear_achievement_count()
Definition: application.h:104
void clear_leaderboard_count()
Definition: application.h:463
Definition: application_category.h:50
void clear_assets()
Definition: application.h:141
bool has_last_updated_timestamp() const
Definition: application.h:419
Definition: achievement_definition.cc:41
bool has_id() const
Definition: application.h:312
int32 get_achievement_count() const
Definition: application.h:112
Definition: achievement_definition.h:39
void clear_theme_color()
Definition: application.h:537
void clear_category()
Definition: application.h:209
bool has_theme_color() const
Definition: application.h:530
void clear_id()
Definition: application.h:319
const StringPiece get_id() const
Definition: application.h:327
Definition: application.h:55
void clear_last_updated_timestamp()
Definition: application.h:426
bool has_achievement_count() const
Definition: application.h:97
bool has_category() const
Definition: application.h:202
bool has_description() const
Definition: application.h:234
void clear_enabled_features()
Definition: application.h:278
const StringPiece get_author() const
Definition: application.h:180
void set_last_updated_timestamp(int64 value)
Definition: application.h:446
void set_kind(const StringPiece &value)
Definition: application.h:410
void clear_author()
Definition: application.h:172
void set_theme_color(const StringPiece &value)
Definition: application.h:559
void set_name(const StringPiece &value)
Definition: application.h:521
client::JsonCppArray< string > mutable_enabledFeatures()
Definition: application.h:302
bool has_instances() const
Definition: application.h:349
void clear_name()
Definition: application.h:500
void clear_instances()
Definition: application.h:356
int64 get_last_updated_timestamp() const
Definition: application.h:434
void set_author(const StringPiece &value)
Definition: application.h:193
bool has_author() const
Definition: application.h:165
void set_leaderboard_count(int32 value)
Definition: application.h:483
bool has_enabled_features() const
Definition: application.h:271
const StringPiece get_description() const
Definition: application.h:249