games  v1
snapshot.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_SNAPSHOT_H_
31 #define GOOGLE_GAMES_API_SNAPSHOT_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/snapshot_image.h"
40 
41 namespace Json {
42 class Value;
43 } // namespace Json
44 
45 namespace google_games_api {
46 using namespace googleapis;
47 
53 class Snapshot : public client::JsonCppData {
54  public:
60  static Snapshot* New();
61 
67  explicit Snapshot(const Json::Value& storage);
68 
74  explicit Snapshot(Json::Value* storage);
75 
79  virtual ~Snapshot();
80 
86  const StringPiece GetTypeName() const {
87  return StringPiece("google_games_api::Snapshot");
88  }
89 
95  bool has_cover_image() const {
96  return Storage().isMember("coverImage");
97  }
98 
103  MutableStorage()->removeMember("coverImage");
104  }
105 
106 
110  const SnapshotImage get_cover_image() const;
111 
120  SnapshotImage mutable_coverImage();
121 
127  bool has_description() const {
128  return Storage().isMember("description");
129  }
130 
135  MutableStorage()->removeMember("description");
136  }
137 
138 
142  const StringPiece get_description() const {
143  const Json::Value& v = Storage("description");
144  if (v == Json::Value::null) return StringPiece("");
145  return StringPiece(v.asCString());
146  }
147 
155  void set_description(const StringPiece& value) {
156  *MutableStorage("description") = value.data();
157  }
158 
164  bool has_drive_id() const {
165  return Storage().isMember("driveId");
166  }
167 
171  void clear_drive_id() {
172  MutableStorage()->removeMember("driveId");
173  }
174 
175 
179  const StringPiece get_drive_id() const {
180  const Json::Value& v = Storage("driveId");
181  if (v == Json::Value::null) return StringPiece("");
182  return StringPiece(v.asCString());
183  }
184 
194  void set_drive_id(const StringPiece& value) {
195  *MutableStorage("driveId") = value.data();
196  }
197 
203  bool has_duration_millis() const {
204  return Storage().isMember("durationMillis");
205  }
206 
211  MutableStorage()->removeMember("durationMillis");
212  }
213 
214 
218  int64 get_duration_millis() const {
219  const Json::Value& storage = Storage("durationMillis");
220  return client::JsonValueToCppValueHelper<int64 >(storage);
221  }
222 
230  void set_duration_millis(int64 value) {
231  client::SetJsonValueFromCppValueHelper<int64 >(
232  value, MutableStorage("durationMillis"));
233  }
234 
240  bool has_id() const {
241  return Storage().isMember("id");
242  }
243 
247  void clear_id() {
248  MutableStorage()->removeMember("id");
249  }
250 
251 
255  const StringPiece get_id() const {
256  const Json::Value& v = Storage("id");
257  if (v == Json::Value::null) return StringPiece("");
258  return StringPiece(v.asCString());
259  }
260 
268  void set_id(const StringPiece& value) {
269  *MutableStorage("id") = value.data();
270  }
271 
277  bool has_kind() const {
278  return Storage().isMember("kind");
279  }
280 
284  void clear_kind() {
285  MutableStorage()->removeMember("kind");
286  }
287 
288 
292  const StringPiece get_kind() const {
293  const Json::Value& v = Storage("kind");
294  if (v == Json::Value::null) return StringPiece("");
295  return StringPiece(v.asCString());
296  }
297 
306  void set_kind(const StringPiece& value) {
307  *MutableStorage("kind") = value.data();
308  }
309 
316  return Storage().isMember("lastModifiedMillis");
317  }
318 
323  MutableStorage()->removeMember("lastModifiedMillis");
324  }
325 
326 
330  int64 get_last_modified_millis() const {
331  const Json::Value& storage = Storage("lastModifiedMillis");
332  return client::JsonValueToCppValueHelper<int64 >(storage);
333  }
334 
343  void set_last_modified_millis(int64 value) {
344  client::SetJsonValueFromCppValueHelper<int64 >(
345  value, MutableStorage("lastModifiedMillis"));
346  }
347 
353  bool has_progress_value() const {
354  return Storage().isMember("progressValue");
355  }
356 
361  MutableStorage()->removeMember("progressValue");
362  }
363 
364 
368  int64 get_progress_value() const {
369  const Json::Value& storage = Storage("progressValue");
370  return client::JsonValueToCppValueHelper<int64 >(storage);
371  }
372 
381  void set_progress_value(int64 value) {
382  client::SetJsonValueFromCppValueHelper<int64 >(
383  value, MutableStorage("progressValue"));
384  }
385 
391  bool has_title() const {
392  return Storage().isMember("title");
393  }
394 
398  void clear_title() {
399  MutableStorage()->removeMember("title");
400  }
401 
402 
406  const StringPiece get_title() const {
407  const Json::Value& v = Storage("title");
408  if (v == Json::Value::null) return StringPiece("");
409  return StringPiece(v.asCString());
410  }
411 
419  void set_title(const StringPiece& value) {
420  *MutableStorage("title") = value.data();
421  }
422 
428  bool has_type() const {
429  return Storage().isMember("type");
430  }
431 
435  void clear_type() {
436  MutableStorage()->removeMember("type");
437  }
438 
439 
443  const StringPiece get_type() const {
444  const Json::Value& v = Storage("type");
445  if (v == Json::Value::null) return StringPiece("");
446  return StringPiece(v.asCString());
447  }
448 
458  void set_type(const StringPiece& value) {
459  *MutableStorage("type") = value.data();
460  }
461 
467  bool has_unique_name() const {
468  return Storage().isMember("uniqueName");
469  }
470 
475  MutableStorage()->removeMember("uniqueName");
476  }
477 
478 
482  const StringPiece get_unique_name() const {
483  const Json::Value& v = Storage("uniqueName");
484  if (v == Json::Value::null) return StringPiece("");
485  return StringPiece(v.asCString());
486  }
487 
495  void set_unique_name(const StringPiece& value) {
496  *MutableStorage("uniqueName") = value.data();
497  }
498 
499  private:
500  void operator=(const Snapshot&);
501 }; // Snapshot
502 } // namespace google_games_api
503 #endif // GOOGLE_GAMES_API_SNAPSHOT_H_
int64 get_last_modified_millis() const
Definition: snapshot.h:330
const StringPiece get_unique_name() const
Definition: snapshot.h:482
void clear_progress_value()
Definition: snapshot.h:360
bool has_unique_name() const
Definition: snapshot.h:467
void clear_duration_millis()
Definition: snapshot.h:210
void clear_cover_image()
Definition: snapshot.h:102
const StringPiece get_id() const
Definition: snapshot.h:255
const StringPiece get_type() const
Definition: snapshot.h:443
void clear_type()
Definition: snapshot.h:435
void clear_unique_name()
Definition: snapshot.h:474
void set_description(const StringPiece &value)
Definition: snapshot.h:155
void set_unique_name(const StringPiece &value)
Definition: snapshot.h:495
int64 get_progress_value() const
Definition: snapshot.h:368
bool has_cover_image() const
Definition: snapshot.h:95
void set_duration_millis(int64 value)
Definition: snapshot.h:230
void clear_id()
Definition: snapshot.h:247
bool has_description() const
Definition: snapshot.h:127
bool has_type() const
Definition: snapshot.h:428
void set_kind(const StringPiece &value)
Definition: snapshot.h:306
bool has_title() const
Definition: snapshot.h:391
void set_type(const StringPiece &value)
Definition: snapshot.h:458
void set_drive_id(const StringPiece &value)
Definition: snapshot.h:194
Definition: achievement_definition.cc:41
Definition: snapshot.h:53
Definition: achievement_definition.h:39
void clear_drive_id()
Definition: snapshot.h:171
void set_last_modified_millis(int64 value)
Definition: snapshot.h:343
bool has_id() const
Definition: snapshot.h:240
const StringPiece GetTypeName() const
Definition: snapshot.h:86
void clear_description()
Definition: snapshot.h:134
bool has_drive_id() const
Definition: snapshot.h:164
void set_progress_value(int64 value)
Definition: snapshot.h:381
void clear_kind()
Definition: snapshot.h:284
const StringPiece get_drive_id() const
Definition: snapshot.h:179
const StringPiece get_title() const
Definition: snapshot.h:406
Definition: snapshot_image.h:51
const StringPiece get_description() const
Definition: snapshot.h:142
void clear_last_modified_millis()
Definition: snapshot.h:322
void set_id(const StringPiece &value)
Definition: snapshot.h:268
void set_title(const StringPiece &value)
Definition: snapshot.h:419
const StringPiece get_kind() const
Definition: snapshot.h:292
bool has_kind() const
Definition: snapshot.h:277
bool has_progress_value() const
Definition: snapshot.h:353
int64 get_duration_millis() const
Definition: snapshot.h:218
void clear_title()
Definition: snapshot.h:398
bool has_duration_millis() const
Definition: snapshot.h:203
bool has_last_modified_millis() const
Definition: snapshot.h:315