games  v1
push_token_id.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_PUSH_TOKEN_ID_H_
31 #define GOOGLE_GAMES_API_PUSH_TOKEN_ID_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 namespace Json {
39 class Value;
40 } // namespace Json
41 
42 namespace google_games_api {
43 using namespace googleapis;
44 
50 class PushTokenId : public client::JsonCppData {
51  public:
57  class PushTokenIdIos : public client::JsonCppData {
58  public:
64  static PushTokenIdIos* New();
65 
71  explicit PushTokenIdIos(const Json::Value& storage);
72 
78  explicit PushTokenIdIos(Json::Value* storage);
79 
83  virtual ~PushTokenIdIos();
84 
90  const StringPiece GetTypeName() const {
91  return StringPiece("google_games_api::PushTokenIdIos");
92  }
93 
99  bool has_apns_device_token() const {
100  return Storage().isMember("apns_device_token");
101  }
102 
107  MutableStorage()->removeMember("apns_device_token");
108  }
109 
110 
114  const StringPiece get_apns_device_token() const {
115  const Json::Value& v = Storage("apns_device_token");
116  if (v == Json::Value::null) return StringPiece("");
117  return StringPiece(v.asCString());
118  }
119 
128  void set_apns_device_token(const StringPiece& value) {
129  *MutableStorage("apns_device_token") = value.data();
130  }
131 
137  bool has_apns_environment() const {
138  return Storage().isMember("apns_environment");
139  }
140 
145  MutableStorage()->removeMember("apns_environment");
146  }
147 
148 
152  const StringPiece get_apns_environment() const {
153  const Json::Value& v = Storage("apns_environment");
154  if (v == Json::Value::null) return StringPiece("");
155  return StringPiece(v.asCString());
156  }
157 
166  void set_apns_environment(const StringPiece& value) {
167  *MutableStorage("apns_environment") = value.data();
168  }
169 
170  private:
171  void operator=(const PushTokenIdIos&);
172  }; // PushTokenIdIos
178  static PushTokenId* New();
179 
185  explicit PushTokenId(const Json::Value& storage);
186 
192  explicit PushTokenId(Json::Value* storage);
193 
197  virtual ~PushTokenId();
198 
204  const StringPiece GetTypeName() const {
205  return StringPiece("google_games_api::PushTokenId");
206  }
207 
213  bool has_ios() const {
214  return Storage().isMember("ios");
215  }
216 
220  void clear_ios() {
221  MutableStorage()->removeMember("ios");
222  }
223 
224 
228  const PushTokenIdIos get_ios() const {
229  const Json::Value& storage = Storage("ios");
230  return client::JsonValueToCppValueHelper<PushTokenIdIos >(storage);
231  }
232 
241  Json::Value* storage = MutableStorage("ios");
242  return client::JsonValueToMutableCppValueHelper<PushTokenIdIos >(storage);
243  }
244 
250  bool has_kind() const {
251  return Storage().isMember("kind");
252  }
253 
257  void clear_kind() {
258  MutableStorage()->removeMember("kind");
259  }
260 
261 
265  const StringPiece get_kind() const {
266  const Json::Value& v = Storage("kind");
267  if (v == Json::Value::null) return StringPiece("");
268  return StringPiece(v.asCString());
269  }
270 
279  void set_kind(const StringPiece& value) {
280  *MutableStorage("kind") = value.data();
281  }
282 
283  private:
284  void operator=(const PushTokenId&);
285 }; // PushTokenId
286 } // namespace google_games_api
287 #endif // GOOGLE_GAMES_API_PUSH_TOKEN_ID_H_
bool has_apns_environment() const
Definition: push_token_id.h:137
const StringPiece get_apns_environment() const
Definition: push_token_id.h:152
void set_apns_environment(const StringPiece &value)
Definition: push_token_id.h:166
void clear_kind()
Definition: push_token_id.h:257
bool has_kind() const
Definition: push_token_id.h:250
Definition: push_token_id.h:57
const StringPiece GetTypeName() const
Definition: push_token_id.h:90
const StringPiece get_kind() const
Definition: push_token_id.h:265
const StringPiece get_apns_device_token() const
Definition: push_token_id.h:114
void set_kind(const StringPiece &value)
Definition: push_token_id.h:279
void clear_apns_device_token()
Definition: push_token_id.h:106
Definition: achievement_definition.cc:41
Definition: achievement_definition.h:39
bool has_ios() const
Definition: push_token_id.h:213
const PushTokenIdIos get_ios() const
Definition: push_token_id.h:228
Definition: push_token_id.h:50
void clear_ios()
Definition: push_token_id.h:220
const StringPiece GetTypeName() const
Definition: push_token_id.h:204
PushTokenIdIos mutable_ios()
Definition: push_token_id.h:240
bool has_apns_device_token() const
Definition: push_token_id.h:99
void set_apns_device_token(const StringPiece &value)
Definition: push_token_id.h:128
void clear_apns_environment()
Definition: push_token_id.h:144