identitytoolkit  v3
verify_custom_token_response.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-04-06, 12:09:29 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 Identity Toolkit API (identitytoolkit/v3)
24 // Generated from:
25 // Version: v3
26 // Revision: 368
27 // Generated by:
28 // Tool: google-apis-code-generator 1.5.1
29 // C++: 0.1.4
30 #ifndef GOOGLE_IDENTITYTOOLKIT_API_VERIFY_CUSTOM_TOKEN_RESPONSE_H_
31 #define GOOGLE_IDENTITYTOOLKIT_API_VERIFY_CUSTOM_TOKEN_RESPONSE_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 namespace Json {
40 class Value;
41 } // namespace Json
42 
44 using namespace googleapis;
45 
51 class VerifyCustomTokenResponse : public client::JsonCppData {
52  public:
58  static VerifyCustomTokenResponse* New();
59 
65  explicit VerifyCustomTokenResponse(const Json::Value& storage);
66 
72  explicit VerifyCustomTokenResponse(Json::Value* storage);
73 
77  virtual ~VerifyCustomTokenResponse();
78 
84  const StringPiece GetTypeName() const {
85  return StringPiece("google_identitytoolkit_api::VerifyCustomTokenResponse");
86  }
87 
93  bool has_expires_in() const {
94  return Storage().isMember("expiresIn");
95  }
96 
101  MutableStorage()->removeMember("expiresIn");
102  }
103 
104 
108  int64 get_expires_in() const {
109  const Json::Value& storage = Storage("expiresIn");
110  return client::JsonValueToCppValueHelper<int64 >(storage);
111  }
112 
121  void set_expires_in(int64 value) {
122  client::SetJsonValueFromCppValueHelper<int64 >(
123  value, MutableStorage("expiresIn"));
124  }
125 
131  bool has_id_token() const {
132  return Storage().isMember("idToken");
133  }
134 
138  void clear_id_token() {
139  MutableStorage()->removeMember("idToken");
140  }
141 
142 
146  const StringPiece get_id_token() const {
147  const Json::Value& v = Storage("idToken");
148  if (v == Json::Value::null) return StringPiece("");
149  return StringPiece(v.asCString());
150  }
151 
159  void set_id_token(const StringPiece& value) {
160  *MutableStorage("idToken") = value.data();
161  }
162 
168  bool has_is_new_user() const {
169  return Storage().isMember("isNewUser");
170  }
171 
176  MutableStorage()->removeMember("isNewUser");
177  }
178 
179 
183  bool get_is_new_user() const {
184  const Json::Value& storage = Storage("isNewUser");
185  return client::JsonValueToCppValueHelper<bool >(storage);
186  }
187 
195  void set_is_new_user(bool value) {
196  client::SetJsonValueFromCppValueHelper<bool >(
197  value, MutableStorage("isNewUser"));
198  }
199 
205  bool has_kind() const {
206  return Storage().isMember("kind");
207  }
208 
212  void clear_kind() {
213  MutableStorage()->removeMember("kind");
214  }
215 
216 
220  const StringPiece get_kind() const {
221  const Json::Value& v = Storage("kind");
222  if (v == Json::Value::null) return StringPiece("");
223  return StringPiece(v.asCString());
224  }
225 
233  void set_kind(const StringPiece& value) {
234  *MutableStorage("kind") = value.data();
235  }
236 
242  bool has_refresh_token() const {
243  return Storage().isMember("refreshToken");
244  }
245 
250  MutableStorage()->removeMember("refreshToken");
251  }
252 
253 
257  const StringPiece get_refresh_token() const {
258  const Json::Value& v = Storage("refreshToken");
259  if (v == Json::Value::null) return StringPiece("");
260  return StringPiece(v.asCString());
261  }
262 
270  void set_refresh_token(const StringPiece& value) {
271  *MutableStorage("refreshToken") = value.data();
272  }
273 
274  private:
275  void operator=(const VerifyCustomTokenResponse&);
276 }; // VerifyCustomTokenResponse
277 } // namespace google_identitytoolkit_api
278 #endif // GOOGLE_IDENTITYTOOLKIT_API_VERIFY_CUSTOM_TOKEN_RESPONSE_H_
void set_id_token(const StringPiece &value)
Definition: verify_custom_token_response.h:159
void set_kind(const StringPiece &value)
Definition: verify_custom_token_response.h:233
void clear_refresh_token()
Definition: verify_custom_token_response.h:249
Definition: verify_custom_token_response.h:51
void set_expires_in(int64 value)
Definition: verify_custom_token_response.h:121
int64 get_expires_in() const
Definition: verify_custom_token_response.h:108
Definition: create_auth_uri_response.cc:40
const StringPiece get_id_token() const
Definition: verify_custom_token_response.h:146
void clear_id_token()
Definition: verify_custom_token_response.h:138
void clear_expires_in()
Definition: verify_custom_token_response.h:100
void clear_is_new_user()
Definition: verify_custom_token_response.h:175
Definition: create_auth_uri_response.h:38
bool has_is_new_user() const
Definition: verify_custom_token_response.h:168
bool has_kind() const
Definition: verify_custom_token_response.h:205
bool has_expires_in() const
Definition: verify_custom_token_response.h:93
bool has_id_token() const
Definition: verify_custom_token_response.h:131
void clear_kind()
Definition: verify_custom_token_response.h:212
const StringPiece GetTypeName() const
Definition: verify_custom_token_response.h:84
const StringPiece get_kind() const
Definition: verify_custom_token_response.h:220
const StringPiece get_refresh_token() const
Definition: verify_custom_token_response.h:257
bool has_refresh_token() const
Definition: verify_custom_token_response.h:242
void set_refresh_token(const StringPiece &value)
Definition: verify_custom_token_response.h:270
bool get_is_new_user() const
Definition: verify_custom_token_response.h:183
void set_is_new_user(bool value)
Definition: verify_custom_token_response.h:195