games  v1
turn_based_match.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_H_
31 #define GOOGLE_GAMES_API_TURN_BASED_MATCH_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_auto_matching_criteria.h"
41 #include "google/games_api/turn_based_match_data.h"
42 #include "google/games_api/turn_based_match_modification.h"
43 #include "google/games_api/turn_based_match_participant.h"
44 
45 namespace Json {
46 class Value;
47 } // namespace Json
48 
49 namespace google_games_api {
50 using namespace googleapis;
51 
57 class TurnBasedMatch : public client::JsonCppData {
58  public:
64  static TurnBasedMatch* New();
65 
71  explicit TurnBasedMatch(const Json::Value& storage);
72 
78  explicit TurnBasedMatch(Json::Value* storage);
79 
83  virtual ~TurnBasedMatch();
84 
90  const StringPiece GetTypeName() const {
91  return StringPiece("google_games_api::TurnBasedMatch");
92  }
93 
99  bool has_application_id() const {
100  return Storage().isMember("applicationId");
101  }
102 
107  MutableStorage()->removeMember("applicationId");
108  }
109 
110 
114  const StringPiece get_application_id() const {
115  const Json::Value& v = Storage("applicationId");
116  if (v == Json::Value::null) return StringPiece("");
117  return StringPiece(v.asCString());
118  }
119 
127  void set_application_id(const StringPiece& value) {
128  *MutableStorage("applicationId") = value.data();
129  }
130 
137  return Storage().isMember("autoMatchingCriteria");
138  }
139 
144  MutableStorage()->removeMember("autoMatchingCriteria");
145  }
146 
147 
152  const TurnBasedAutoMatchingCriteria get_auto_matching_criteria() const;
153 
162  TurnBasedAutoMatchingCriteria mutable_autoMatchingCriteria();
163 
169  bool has_creation_details() const {
170  return Storage().isMember("creationDetails");
171  }
172 
177  MutableStorage()->removeMember("creationDetails");
178  }
179 
180 
185  const TurnBasedMatchModification get_creation_details() const;
186 
195  TurnBasedMatchModification mutable_creationDetails();
196 
202  bool has_data() const {
203  return Storage().isMember("data");
204  }
205 
209  void clear_data() {
210  MutableStorage()->removeMember("data");
211  }
212 
213 
217  const TurnBasedMatchData get_data() const;
218 
226  TurnBasedMatchData mutable_data();
227 
233  bool has_description() const {
234  return Storage().isMember("description");
235  }
236 
241  MutableStorage()->removeMember("description");
242  }
243 
244 
248  const StringPiece get_description() const {
249  const Json::Value& v = Storage("description");
250  if (v == Json::Value::null) return StringPiece("");
251  return StringPiece(v.asCString());
252  }
253 
263  void set_description(const StringPiece& value) {
264  *MutableStorage("description") = value.data();
265  }
266 
272  bool has_inviter_id() const {
273  return Storage().isMember("inviterId");
274  }
275 
280  MutableStorage()->removeMember("inviterId");
281  }
282 
283 
287  const StringPiece get_inviter_id() const {
288  const Json::Value& v = Storage("inviterId");
289  if (v == Json::Value::null) return StringPiece("");
290  return StringPiece(v.asCString());
291  }
292 
301  void set_inviter_id(const StringPiece& value) {
302  *MutableStorage("inviterId") = value.data();
303  }
304 
310  bool has_kind() const {
311  return Storage().isMember("kind");
312  }
313 
317  void clear_kind() {
318  MutableStorage()->removeMember("kind");
319  }
320 
321 
325  const StringPiece get_kind() const {
326  const Json::Value& v = Storage("kind");
327  if (v == Json::Value::null) return StringPiece("");
328  return StringPiece(v.asCString());
329  }
330 
339  void set_kind(const StringPiece& value) {
340  *MutableStorage("kind") = value.data();
341  }
342 
348  bool has_last_update_details() const {
349  return Storage().isMember("lastUpdateDetails");
350  }
351 
356  MutableStorage()->removeMember("lastUpdateDetails");
357  }
358 
359 
364  const TurnBasedMatchModification get_last_update_details() const;
365 
374  TurnBasedMatchModification mutable_lastUpdateDetails();
375 
381  bool has_match_id() const {
382  return Storage().isMember("matchId");
383  }
384 
388  void clear_match_id() {
389  MutableStorage()->removeMember("matchId");
390  }
391 
392 
396  const StringPiece get_match_id() const {
397  const Json::Value& v = Storage("matchId");
398  if (v == Json::Value::null) return StringPiece("");
399  return StringPiece(v.asCString());
400  }
401 
409  void set_match_id(const StringPiece& value) {
410  *MutableStorage("matchId") = value.data();
411  }
412 
418  bool has_match_number() const {
419  return Storage().isMember("matchNumber");
420  }
421 
426  MutableStorage()->removeMember("matchNumber");
427  }
428 
429 
433  int32 get_match_number() const {
434  const Json::Value& storage = Storage("matchNumber");
435  return client::JsonValueToCppValueHelper<int32 >(storage);
436  }
437 
446  void set_match_number(int32 value) {
447  client::SetJsonValueFromCppValueHelper<int32 >(
448  value, MutableStorage("matchNumber"));
449  }
450 
456  bool has_match_version() const {
457  return Storage().isMember("matchVersion");
458  }
459 
464  MutableStorage()->removeMember("matchVersion");
465  }
466 
467 
471  int32 get_match_version() const {
472  const Json::Value& storage = Storage("matchVersion");
473  return client::JsonValueToCppValueHelper<int32 >(storage);
474  }
475 
484  void set_match_version(int32 value) {
485  client::SetJsonValueFromCppValueHelper<int32 >(
486  value, MutableStorage("matchVersion"));
487  }
488 
494  bool has_participants() const {
495  return Storage().isMember("participants");
496  }
497 
502  MutableStorage()->removeMember("participants");
503  }
504 
505 
509  const client::JsonCppArray<TurnBasedMatchParticipant > get_participants() const;
510 
520  client::JsonCppArray<TurnBasedMatchParticipant > mutable_participants();
521 
528  return Storage().isMember("pendingParticipantId");
529  }
530 
535  MutableStorage()->removeMember("pendingParticipantId");
536  }
537 
538 
542  const StringPiece get_pending_participant_id() const {
543  const Json::Value& v = Storage("pendingParticipantId");
544  if (v == Json::Value::null) return StringPiece("");
545  return StringPiece(v.asCString());
546  }
547 
555  void set_pending_participant_id(const StringPiece& value) {
556  *MutableStorage("pendingParticipantId") = value.data();
557  }
558 
564  bool has_previous_match_data() const {
565  return Storage().isMember("previousMatchData");
566  }
567 
572  MutableStorage()->removeMember("previousMatchData");
573  }
574 
575 
580  const TurnBasedMatchData get_previous_match_data() const;
581 
591  TurnBasedMatchData mutable_previousMatchData();
592 
598  bool has_rematch_id() const {
599  return Storage().isMember("rematchId");
600  }
601 
606  MutableStorage()->removeMember("rematchId");
607  }
608 
609 
613  const StringPiece get_rematch_id() const {
614  const Json::Value& v = Storage("rematchId");
615  if (v == Json::Value::null) return StringPiece("");
616  return StringPiece(v.asCString());
617  }
618 
627  void set_rematch_id(const StringPiece& value) {
628  *MutableStorage("rematchId") = value.data();
629  }
630 
636  bool has_results() const {
637  return Storage().isMember("results");
638  }
639 
643  void clear_results() {
644  MutableStorage()->removeMember("results");
645  }
646 
647 
651  const client::JsonCppArray<ParticipantResult > get_results() const;
652 
660  client::JsonCppArray<ParticipantResult > mutable_results();
661 
667  bool has_status() const {
668  return Storage().isMember("status");
669  }
670 
674  void clear_status() {
675  MutableStorage()->removeMember("status");
676  }
677 
678 
682  const StringPiece get_status() const {
683  const Json::Value& v = Storage("status");
684  if (v == Json::Value::null) return StringPiece("");
685  return StringPiece(v.asCString());
686  }
687 
713  void set_status(const StringPiece& value) {
714  *MutableStorage("status") = value.data();
715  }
716 
722  bool has_user_match_status() const {
723  return Storage().isMember("userMatchStatus");
724  }
725 
730  MutableStorage()->removeMember("userMatchStatus");
731  }
732 
733 
737  const StringPiece get_user_match_status() const {
738  const Json::Value& v = Storage("userMatchStatus");
739  if (v == Json::Value::null) return StringPiece("");
740  return StringPiece(v.asCString());
741  }
742 
764  void set_user_match_status(const StringPiece& value) {
765  *MutableStorage("userMatchStatus") = value.data();
766  }
767 
773  bool has_variant() const {
774  return Storage().isMember("variant");
775  }
776 
780  void clear_variant() {
781  MutableStorage()->removeMember("variant");
782  }
783 
784 
788  int32 get_variant() const {
789  const Json::Value& storage = Storage("variant");
790  return client::JsonValueToCppValueHelper<int32 >(storage);
791  }
792 
801  void set_variant(int32 value) {
802  client::SetJsonValueFromCppValueHelper<int32 >(
803  value, MutableStorage("variant"));
804  }
805 
811  bool has_with_participant_id() const {
812  return Storage().isMember("withParticipantId");
813  }
814 
819  MutableStorage()->removeMember("withParticipantId");
820  }
821 
822 
826  const StringPiece get_with_participant_id() const {
827  const Json::Value& v = Storage("withParticipantId");
828  if (v == Json::Value::null) return StringPiece("");
829  return StringPiece(v.asCString());
830  }
831 
840  void set_with_participant_id(const StringPiece& value) {
841  *MutableStorage("withParticipantId") = value.data();
842  }
843 
844  private:
845  void operator=(const TurnBasedMatch&);
846 }; // TurnBasedMatch
847 } // namespace google_games_api
848 #endif // GOOGLE_GAMES_API_TURN_BASED_MATCH_H_
void clear_results()
Definition: turn_based_match.h:643
bool has_inviter_id() const
Definition: turn_based_match.h:272
bool has_match_number() const
Definition: turn_based_match.h:418
bool has_rematch_id() const
Definition: turn_based_match.h:598
bool has_results() const
Definition: turn_based_match.h:636
const StringPiece get_with_participant_id() const
Definition: turn_based_match.h:826
int32 get_match_version() const
Definition: turn_based_match.h:471
bool has_participants() const
Definition: turn_based_match.h:494
void clear_previous_match_data()
Definition: turn_based_match.h:571
int32 get_variant() const
Definition: turn_based_match.h:788
void clear_application_id()
Definition: turn_based_match.h:106
bool has_user_match_status() const
Definition: turn_based_match.h:722
void clear_variant()
Definition: turn_based_match.h:780
bool has_data() const
Definition: turn_based_match.h:202
void clear_user_match_status()
Definition: turn_based_match.h:729
Definition: turn_based_auto_matching_criteria.h:51
void clear_description()
Definition: turn_based_match.h:240
bool has_application_id() const
Definition: turn_based_match.h:99
void set_status(const StringPiece &value)
Definition: turn_based_match.h:713
Definition: turn_based_match.h:57
Definition: turn_based_match_modification.h:51
void set_variant(int32 value)
Definition: turn_based_match.h:801
void set_with_participant_id(const StringPiece &value)
Definition: turn_based_match.h:840
bool has_match_version() const
Definition: turn_based_match.h:456
bool has_match_id() const
Definition: turn_based_match.h:381
void clear_kind()
Definition: turn_based_match.h:317
bool has_status() const
Definition: turn_based_match.h:667
void clear_creation_details()
Definition: turn_based_match.h:176
const StringPiece get_pending_participant_id() const
Definition: turn_based_match.h:542
void clear_inviter_id()
Definition: turn_based_match.h:279
bool has_auto_matching_criteria() const
Definition: turn_based_match.h:136
void clear_participants()
Definition: turn_based_match.h:501
void clear_match_number()
Definition: turn_based_match.h:425
const StringPiece get_description() const
Definition: turn_based_match.h:248
void set_application_id(const StringPiece &value)
Definition: turn_based_match.h:127
void clear_match_version()
Definition: turn_based_match.h:463
void set_match_id(const StringPiece &value)
Definition: turn_based_match.h:409
void set_match_number(int32 value)
Definition: turn_based_match.h:446
void set_kind(const StringPiece &value)
Definition: turn_based_match.h:339
const StringPiece get_application_id() const
Definition: turn_based_match.h:114
void clear_match_id()
Definition: turn_based_match.h:388
Definition: achievement_definition.cc:41
Definition: achievement_definition.h:39
void clear_last_update_details()
Definition: turn_based_match.h:355
void clear_pending_participant_id()
Definition: turn_based_match.h:534
bool has_description() const
Definition: turn_based_match.h:233
const StringPiece get_rematch_id() const
Definition: turn_based_match.h:613
const StringPiece get_user_match_status() const
Definition: turn_based_match.h:737
bool has_variant() const
Definition: turn_based_match.h:773
const StringPiece get_kind() const
Definition: turn_based_match.h:325
bool has_last_update_details() const
Definition: turn_based_match.h:348
void set_user_match_status(const StringPiece &value)
Definition: turn_based_match.h:764
const StringPiece get_status() const
Definition: turn_based_match.h:682
void clear_status()
Definition: turn_based_match.h:674
bool has_with_participant_id() const
Definition: turn_based_match.h:811
void set_match_version(int32 value)
Definition: turn_based_match.h:484
const StringPiece GetTypeName() const
Definition: turn_based_match.h:90
void set_rematch_id(const StringPiece &value)
Definition: turn_based_match.h:627
void set_description(const StringPiece &value)
Definition: turn_based_match.h:263
bool has_creation_details() const
Definition: turn_based_match.h:169
const StringPiece get_match_id() const
Definition: turn_based_match.h:396
int32 get_match_number() const
Definition: turn_based_match.h:433
const StringPiece get_inviter_id() const
Definition: turn_based_match.h:287
void set_pending_participant_id(const StringPiece &value)
Definition: turn_based_match.h:555
bool has_kind() const
Definition: turn_based_match.h:310
void set_inviter_id(const StringPiece &value)
Definition: turn_based_match.h:301
bool has_previous_match_data() const
Definition: turn_based_match.h:564
bool has_pending_participant_id() const
Definition: turn_based_match.h:527
Definition: turn_based_match_data.h:50
void clear_with_participant_id()
Definition: turn_based_match.h:818
void clear_data()
Definition: turn_based_match.h:209
void clear_auto_matching_criteria()
Definition: turn_based_match.h:143
void clear_rematch_id()
Definition: turn_based_match.h:605