| OLD | NEW |
| 1 // This is a generated file (see the discoveryapis_generator project). | 1 // This is a generated file (see the discoveryapis_generator project). |
| 2 | 2 |
| 3 library googleapis.oauth2.v2; | 3 library googleapis.oauth2.v2; |
| 4 | 4 |
| 5 import 'dart:core' as core; | 5 import 'dart:core' as core; |
| 6 import 'dart:async' as async; | 6 import 'dart:async' as async; |
| 7 import 'dart:convert' as convert; | 7 import 'dart:convert' as convert; |
| 8 | 8 |
| 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; | 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
| 10 import 'package:http/http.dart' as http; | 10 import 'package:http/http.dart' as http; |
| 11 | 11 |
| 12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show | 12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' |
| 13 ApiRequestError, DetailedApiRequestError; | 13 show ApiRequestError, DetailedApiRequestError; |
| 14 | 14 |
| 15 const core.String USER_AGENT = 'dart-api-client oauth2/v2'; | 15 const core.String USER_AGENT = 'dart-api-client oauth2/v2'; |
| 16 | 16 |
| 17 /** Obtains end-user authorization grants for use with other Google APIs. */ | 17 /// Obtains end-user authorization grants for use with other Google APIs. |
| 18 class Oauth2Api { | 18 class Oauth2Api { |
| 19 /** Know the list of people in your circles, your age range, and language */ | 19 /// Know the list of people in your circles, your age range, and language |
| 20 static const PlusLoginScope = "https://www.googleapis.com/auth/plus.login"; | 20 static const PlusLoginScope = "https://www.googleapis.com/auth/plus.login"; |
| 21 | 21 |
| 22 /** Know who you are on Google */ | 22 /// Know who you are on Google |
| 23 static const PlusMeScope = "https://www.googleapis.com/auth/plus.me"; | 23 static const PlusMeScope = "https://www.googleapis.com/auth/plus.me"; |
| 24 | 24 |
| 25 /** View your email address */ | 25 /// View your email address |
| 26 static const UserinfoEmailScope = "https://www.googleapis.com/auth/userinfo.em
ail"; | 26 static const UserinfoEmailScope = |
| 27 "https://www.googleapis.com/auth/userinfo.email"; |
| 27 | 28 |
| 28 /** View your basic profile info */ | 29 /// View your basic profile info |
| 29 static const UserinfoProfileScope = "https://www.googleapis.com/auth/userinfo.
profile"; | 30 static const UserinfoProfileScope = |
| 30 | 31 "https://www.googleapis.com/auth/userinfo.profile"; |
| 31 | 32 |
| 32 final commons.ApiRequester _requester; | 33 final commons.ApiRequester _requester; |
| 33 | 34 |
| 34 UserinfoResourceApi get userinfo => new UserinfoResourceApi(_requester); | 35 UserinfoResourceApi get userinfo => new UserinfoResourceApi(_requester); |
| 35 | 36 |
| 36 Oauth2Api(http.Client client, {core.String rootUrl: "https://www.googleapis.co
m/", core.String servicePath: ""}) : | 37 Oauth2Api(http.Client client, |
| 37 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); | 38 {core.String rootUrl: "https://www.googleapis.com/", |
| 39 core.String servicePath: ""}) |
| 40 : _requester = |
| 41 new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT); |
| 38 | 42 |
| 39 /** | 43 /// Request parameters: |
| 40 * Request parameters: | 44 /// |
| 41 * | 45 /// Completes with a [Jwk]. |
| 42 * Completes with a [Jwk]. | 46 /// |
| 43 * | 47 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 44 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 48 /// an error. |
| 45 * error. | 49 /// |
| 46 * | 50 /// If the used [http.Client] completes with an error when making a REST |
| 47 * If the used [http.Client] completes with an error when making a REST call, | 51 /// call, this method will complete with the same error. |
| 48 * this method will complete with the same error. | |
| 49 */ | |
| 50 async.Future<Jwk> getCertForOpenIdConnect() { | 52 async.Future<Jwk> getCertForOpenIdConnect() { |
| 51 var _url = null; | 53 var _url = null; |
| 52 var _queryParams = new core.Map(); | 54 var _queryParams = new core.Map(); |
| 53 var _uploadMedia = null; | 55 var _uploadMedia = null; |
| 54 var _uploadOptions = null; | 56 var _uploadOptions = null; |
| 55 var _downloadOptions = commons.DownloadOptions.Metadata; | 57 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 56 var _body = null; | 58 var _body = null; |
| 57 | 59 |
| 58 | |
| 59 _url = 'oauth2/v2/certs'; | 60 _url = 'oauth2/v2/certs'; |
| 60 | 61 |
| 61 var _response = _requester.request(_url, | 62 var _response = _requester.request(_url, "GET", |
| 62 "GET", | 63 body: _body, |
| 63 body: _body, | 64 queryParams: _queryParams, |
| 64 queryParams: _queryParams, | 65 uploadOptions: _uploadOptions, |
| 65 uploadOptions: _uploadOptions, | 66 uploadMedia: _uploadMedia, |
| 66 uploadMedia: _uploadMedia, | 67 downloadOptions: _downloadOptions); |
| 67 downloadOptions: _downloadOptions); | |
| 68 return _response.then((data) => new Jwk.fromJson(data)); | 68 return _response.then((data) => new Jwk.fromJson(data)); |
| 69 } | 69 } |
| 70 | 70 |
| 71 /** | 71 /// Request parameters: |
| 72 * Request parameters: | 72 /// |
| 73 * | 73 /// [accessToken] - null |
| 74 * [accessToken] - null | 74 /// |
| 75 * | 75 /// [idToken] - null |
| 76 * [idToken] - null | 76 /// |
| 77 * | 77 /// [tokenHandle] - null |
| 78 * [tokenHandle] - null | 78 /// |
| 79 * | 79 /// Completes with a [Tokeninfo]. |
| 80 * Completes with a [Tokeninfo]. | 80 /// |
| 81 * | 81 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 82 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 82 /// an error. |
| 83 * error. | 83 /// |
| 84 * | 84 /// If the used [http.Client] completes with an error when making a REST |
| 85 * If the used [http.Client] completes with an error when making a REST call, | 85 /// call, this method will complete with the same error. |
| 86 * this method will complete with the same error. | 86 async.Future<Tokeninfo> tokeninfo( |
| 87 */ | 87 {core.String accessToken, core.String idToken, core.String tokenHandle}) { |
| 88 async.Future<Tokeninfo> tokeninfo({core.String accessToken, core.String idToke
n, core.String tokenHandle}) { | |
| 89 var _url = null; | 88 var _url = null; |
| 90 var _queryParams = new core.Map(); | 89 var _queryParams = new core.Map(); |
| 91 var _uploadMedia = null; | 90 var _uploadMedia = null; |
| 92 var _uploadOptions = null; | 91 var _uploadOptions = null; |
| 93 var _downloadOptions = commons.DownloadOptions.Metadata; | 92 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 94 var _body = null; | 93 var _body = null; |
| 95 | 94 |
| 96 if (accessToken != null) { | 95 if (accessToken != null) { |
| 97 _queryParams["access_token"] = [accessToken]; | 96 _queryParams["access_token"] = [accessToken]; |
| 98 } | 97 } |
| 99 if (idToken != null) { | 98 if (idToken != null) { |
| 100 _queryParams["id_token"] = [idToken]; | 99 _queryParams["id_token"] = [idToken]; |
| 101 } | 100 } |
| 102 if (tokenHandle != null) { | 101 if (tokenHandle != null) { |
| 103 _queryParams["token_handle"] = [tokenHandle]; | 102 _queryParams["token_handle"] = [tokenHandle]; |
| 104 } | 103 } |
| 105 | 104 |
| 106 _url = 'oauth2/v2/tokeninfo'; | 105 _url = 'oauth2/v2/tokeninfo'; |
| 107 | 106 |
| 108 var _response = _requester.request(_url, | 107 var _response = _requester.request(_url, "POST", |
| 109 "POST", | 108 body: _body, |
| 110 body: _body, | 109 queryParams: _queryParams, |
| 111 queryParams: _queryParams, | 110 uploadOptions: _uploadOptions, |
| 112 uploadOptions: _uploadOptions, | 111 uploadMedia: _uploadMedia, |
| 113 uploadMedia: _uploadMedia, | 112 downloadOptions: _downloadOptions); |
| 114 downloadOptions: _downloadOptions); | |
| 115 return _response.then((data) => new Tokeninfo.fromJson(data)); | 113 return _response.then((data) => new Tokeninfo.fromJson(data)); |
| 116 } | 114 } |
| 117 | |
| 118 } | 115 } |
| 119 | 116 |
| 120 | |
| 121 class UserinfoResourceApi { | 117 class UserinfoResourceApi { |
| 122 final commons.ApiRequester _requester; | 118 final commons.ApiRequester _requester; |
| 123 | 119 |
| 124 UserinfoV2ResourceApi get v2 => new UserinfoV2ResourceApi(_requester); | 120 UserinfoV2ResourceApi get v2 => new UserinfoV2ResourceApi(_requester); |
| 125 | 121 |
| 126 UserinfoResourceApi(commons.ApiRequester client) : | 122 UserinfoResourceApi(commons.ApiRequester client) : _requester = client; |
| 127 _requester = client; | |
| 128 | 123 |
| 129 /** | 124 /// Request parameters: |
| 130 * Request parameters: | 125 /// |
| 131 * | 126 /// Completes with a [Userinfoplus]. |
| 132 * Completes with a [Userinfoplus]. | 127 /// |
| 133 * | 128 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 134 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 129 /// an error. |
| 135 * error. | 130 /// |
| 136 * | 131 /// If the used [http.Client] completes with an error when making a REST |
| 137 * If the used [http.Client] completes with an error when making a REST call, | 132 /// call, this method will complete with the same error. |
| 138 * this method will complete with the same error. | |
| 139 */ | |
| 140 async.Future<Userinfoplus> get() { | 133 async.Future<Userinfoplus> get() { |
| 141 var _url = null; | 134 var _url = null; |
| 142 var _queryParams = new core.Map(); | 135 var _queryParams = new core.Map(); |
| 143 var _uploadMedia = null; | 136 var _uploadMedia = null; |
| 144 var _uploadOptions = null; | 137 var _uploadOptions = null; |
| 145 var _downloadOptions = commons.DownloadOptions.Metadata; | 138 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 146 var _body = null; | 139 var _body = null; |
| 147 | 140 |
| 148 | |
| 149 _url = 'oauth2/v2/userinfo'; | 141 _url = 'oauth2/v2/userinfo'; |
| 150 | 142 |
| 151 var _response = _requester.request(_url, | 143 var _response = _requester.request(_url, "GET", |
| 152 "GET", | 144 body: _body, |
| 153 body: _body, | 145 queryParams: _queryParams, |
| 154 queryParams: _queryParams, | 146 uploadOptions: _uploadOptions, |
| 155 uploadOptions: _uploadOptions, | 147 uploadMedia: _uploadMedia, |
| 156 uploadMedia: _uploadMedia, | 148 downloadOptions: _downloadOptions); |
| 157 downloadOptions: _downloadOptions); | |
| 158 return _response.then((data) => new Userinfoplus.fromJson(data)); | 149 return _response.then((data) => new Userinfoplus.fromJson(data)); |
| 159 } | 150 } |
| 160 | |
| 161 } | 151 } |
| 162 | 152 |
| 163 | |
| 164 class UserinfoV2ResourceApi { | 153 class UserinfoV2ResourceApi { |
| 165 final commons.ApiRequester _requester; | 154 final commons.ApiRequester _requester; |
| 166 | 155 |
| 167 UserinfoV2MeResourceApi get me => new UserinfoV2MeResourceApi(_requester); | 156 UserinfoV2MeResourceApi get me => new UserinfoV2MeResourceApi(_requester); |
| 168 | 157 |
| 169 UserinfoV2ResourceApi(commons.ApiRequester client) : | 158 UserinfoV2ResourceApi(commons.ApiRequester client) : _requester = client; |
| 170 _requester = client; | |
| 171 } | 159 } |
| 172 | 160 |
| 173 | |
| 174 class UserinfoV2MeResourceApi { | 161 class UserinfoV2MeResourceApi { |
| 175 final commons.ApiRequester _requester; | 162 final commons.ApiRequester _requester; |
| 176 | 163 |
| 177 UserinfoV2MeResourceApi(commons.ApiRequester client) : | 164 UserinfoV2MeResourceApi(commons.ApiRequester client) : _requester = client; |
| 178 _requester = client; | |
| 179 | 165 |
| 180 /** | 166 /// Request parameters: |
| 181 * Request parameters: | 167 /// |
| 182 * | 168 /// Completes with a [Userinfoplus]. |
| 183 * Completes with a [Userinfoplus]. | 169 /// |
| 184 * | 170 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 185 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 171 /// an error. |
| 186 * error. | 172 /// |
| 187 * | 173 /// If the used [http.Client] completes with an error when making a REST |
| 188 * If the used [http.Client] completes with an error when making a REST call, | 174 /// call, this method will complete with the same error. |
| 189 * this method will complete with the same error. | |
| 190 */ | |
| 191 async.Future<Userinfoplus> get() { | 175 async.Future<Userinfoplus> get() { |
| 192 var _url = null; | 176 var _url = null; |
| 193 var _queryParams = new core.Map(); | 177 var _queryParams = new core.Map(); |
| 194 var _uploadMedia = null; | 178 var _uploadMedia = null; |
| 195 var _uploadOptions = null; | 179 var _uploadOptions = null; |
| 196 var _downloadOptions = commons.DownloadOptions.Metadata; | 180 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 197 var _body = null; | 181 var _body = null; |
| 198 | 182 |
| 199 | |
| 200 _url = 'userinfo/v2/me'; | 183 _url = 'userinfo/v2/me'; |
| 201 | 184 |
| 202 var _response = _requester.request(_url, | 185 var _response = _requester.request(_url, "GET", |
| 203 "GET", | 186 body: _body, |
| 204 body: _body, | 187 queryParams: _queryParams, |
| 205 queryParams: _queryParams, | 188 uploadOptions: _uploadOptions, |
| 206 uploadOptions: _uploadOptions, | 189 uploadMedia: _uploadMedia, |
| 207 uploadMedia: _uploadMedia, | 190 downloadOptions: _downloadOptions); |
| 208 downloadOptions: _downloadOptions); | |
| 209 return _response.then((data) => new Userinfoplus.fromJson(data)); | 191 return _response.then((data) => new Userinfoplus.fromJson(data)); |
| 210 } | 192 } |
| 211 | |
| 212 } | 193 } |
| 213 | 194 |
| 214 | |
| 215 | |
| 216 class JwkKeys { | 195 class JwkKeys { |
| 217 core.String alg; | 196 core.String alg; |
| 218 core.String e; | 197 core.String e; |
| 219 core.String kid; | 198 core.String kid; |
| 220 core.String kty; | 199 core.String kty; |
| 221 core.String n; | 200 core.String n; |
| 222 core.String use; | 201 core.String use; |
| 223 | 202 |
| 224 JwkKeys(); | 203 JwkKeys(); |
| 225 | 204 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 238 } | 217 } |
| 239 if (_json.containsKey("n")) { | 218 if (_json.containsKey("n")) { |
| 240 n = _json["n"]; | 219 n = _json["n"]; |
| 241 } | 220 } |
| 242 if (_json.containsKey("use")) { | 221 if (_json.containsKey("use")) { |
| 243 use = _json["use"]; | 222 use = _json["use"]; |
| 244 } | 223 } |
| 245 } | 224 } |
| 246 | 225 |
| 247 core.Map<core.String, core.Object> toJson() { | 226 core.Map<core.String, core.Object> toJson() { |
| 248 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 227 final core.Map<core.String, core.Object> _json = |
| 228 new core.Map<core.String, core.Object>(); |
| 249 if (alg != null) { | 229 if (alg != null) { |
| 250 _json["alg"] = alg; | 230 _json["alg"] = alg; |
| 251 } | 231 } |
| 252 if (e != null) { | 232 if (e != null) { |
| 253 _json["e"] = e; | 233 _json["e"] = e; |
| 254 } | 234 } |
| 255 if (kid != null) { | 235 if (kid != null) { |
| 256 _json["kid"] = kid; | 236 _json["kid"] = kid; |
| 257 } | 237 } |
| 258 if (kty != null) { | 238 if (kty != null) { |
| (...skipping 14 matching lines...) Expand all Loading... |
| 273 | 253 |
| 274 Jwk(); | 254 Jwk(); |
| 275 | 255 |
| 276 Jwk.fromJson(core.Map _json) { | 256 Jwk.fromJson(core.Map _json) { |
| 277 if (_json.containsKey("keys")) { | 257 if (_json.containsKey("keys")) { |
| 278 keys = _json["keys"].map((value) => new JwkKeys.fromJson(value)).toList(); | 258 keys = _json["keys"].map((value) => new JwkKeys.fromJson(value)).toList(); |
| 279 } | 259 } |
| 280 } | 260 } |
| 281 | 261 |
| 282 core.Map<core.String, core.Object> toJson() { | 262 core.Map<core.String, core.Object> toJson() { |
| 283 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 263 final core.Map<core.String, core.Object> _json = |
| 264 new core.Map<core.String, core.Object>(); |
| 284 if (keys != null) { | 265 if (keys != null) { |
| 285 _json["keys"] = keys.map((value) => (value).toJson()).toList(); | 266 _json["keys"] = keys.map((value) => (value).toJson()).toList(); |
| 286 } | 267 } |
| 287 return _json; | 268 return _json; |
| 288 } | 269 } |
| 289 } | 270 } |
| 290 | 271 |
| 291 class Tokeninfo { | 272 class Tokeninfo { |
| 292 /** The access type granted with this token. It can be offline or online. */ | 273 /// The access type granted with this token. It can be offline or online. |
| 293 core.String accessType; | 274 core.String accessType; |
| 294 /** | 275 |
| 295 * Who is the intended audience for this token. In general the same as | 276 /// Who is the intended audience for this token. In general the same as |
| 296 * issued_to. | 277 /// issued_to. |
| 297 */ | |
| 298 core.String audience; | 278 core.String audience; |
| 299 /** | 279 |
| 300 * The email address of the user. Present only if the email scope is present | 280 /// The email address of the user. Present only if the email scope is present |
| 301 * in the request. | 281 /// in the request. |
| 302 */ | |
| 303 core.String email; | 282 core.String email; |
| 304 /** The expiry time of the token, as number of seconds left until expiry. */ | 283 |
| 284 /// The expiry time of the token, as number of seconds left until expiry. |
| 305 core.int expiresIn; | 285 core.int expiresIn; |
| 306 /** To whom was the token issued to. In general the same as audience. */ | 286 |
| 287 /// To whom was the token issued to. In general the same as audience. |
| 307 core.String issuedTo; | 288 core.String issuedTo; |
| 308 /** The space separated list of scopes granted to this token. */ | 289 |
| 290 /// The space separated list of scopes granted to this token. |
| 309 core.String scope; | 291 core.String scope; |
| 310 /** The token handle associated with this token. */ | 292 |
| 293 /// The token handle associated with this token. |
| 311 core.String tokenHandle; | 294 core.String tokenHandle; |
| 312 /** The obfuscated user id. */ | 295 |
| 296 /// The obfuscated user id. |
| 313 core.String userId; | 297 core.String userId; |
| 314 /** | 298 |
| 315 * Boolean flag which is true if the email address is verified. Present only | 299 /// Boolean flag which is true if the email address is verified. Present only |
| 316 * if the email scope is present in the request. | 300 /// if the email scope is present in the request. |
| 317 */ | |
| 318 core.bool verifiedEmail; | 301 core.bool verifiedEmail; |
| 319 | 302 |
| 320 Tokeninfo(); | 303 Tokeninfo(); |
| 321 | 304 |
| 322 Tokeninfo.fromJson(core.Map _json) { | 305 Tokeninfo.fromJson(core.Map _json) { |
| 323 if (_json.containsKey("access_type")) { | 306 if (_json.containsKey("access_type")) { |
| 324 accessType = _json["access_type"]; | 307 accessType = _json["access_type"]; |
| 325 } | 308 } |
| 326 if (_json.containsKey("audience")) { | 309 if (_json.containsKey("audience")) { |
| 327 audience = _json["audience"]; | 310 audience = _json["audience"]; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 343 } | 326 } |
| 344 if (_json.containsKey("user_id")) { | 327 if (_json.containsKey("user_id")) { |
| 345 userId = _json["user_id"]; | 328 userId = _json["user_id"]; |
| 346 } | 329 } |
| 347 if (_json.containsKey("verified_email")) { | 330 if (_json.containsKey("verified_email")) { |
| 348 verifiedEmail = _json["verified_email"]; | 331 verifiedEmail = _json["verified_email"]; |
| 349 } | 332 } |
| 350 } | 333 } |
| 351 | 334 |
| 352 core.Map<core.String, core.Object> toJson() { | 335 core.Map<core.String, core.Object> toJson() { |
| 353 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 336 final core.Map<core.String, core.Object> _json = |
| 337 new core.Map<core.String, core.Object>(); |
| 354 if (accessType != null) { | 338 if (accessType != null) { |
| 355 _json["access_type"] = accessType; | 339 _json["access_type"] = accessType; |
| 356 } | 340 } |
| 357 if (audience != null) { | 341 if (audience != null) { |
| 358 _json["audience"] = audience; | 342 _json["audience"] = audience; |
| 359 } | 343 } |
| 360 if (email != null) { | 344 if (email != null) { |
| 361 _json["email"] = email; | 345 _json["email"] = email; |
| 362 } | 346 } |
| 363 if (expiresIn != null) { | 347 if (expiresIn != null) { |
| (...skipping 12 matching lines...) Expand all Loading... |
| 376 _json["user_id"] = userId; | 360 _json["user_id"] = userId; |
| 377 } | 361 } |
| 378 if (verifiedEmail != null) { | 362 if (verifiedEmail != null) { |
| 379 _json["verified_email"] = verifiedEmail; | 363 _json["verified_email"] = verifiedEmail; |
| 380 } | 364 } |
| 381 return _json; | 365 return _json; |
| 382 } | 366 } |
| 383 } | 367 } |
| 384 | 368 |
| 385 class Userinfoplus { | 369 class Userinfoplus { |
| 386 /** The user's email address. */ | 370 /// The user's email address. |
| 387 core.String email; | 371 core.String email; |
| 388 /** The user's last name. */ | 372 |
| 373 /// The user's last name. |
| 389 core.String familyName; | 374 core.String familyName; |
| 390 /** The user's gender. */ | 375 |
| 376 /// The user's gender. |
| 391 core.String gender; | 377 core.String gender; |
| 392 /** The user's first name. */ | 378 |
| 379 /// The user's first name. |
| 393 core.String givenName; | 380 core.String givenName; |
| 394 /** The hosted domain e.g. example.com if the user is Google apps user. */ | 381 |
| 382 /// The hosted domain e.g. example.com if the user is Google apps user. |
| 395 core.String hd; | 383 core.String hd; |
| 396 /** The obfuscated ID of the user. */ | 384 |
| 385 /// The obfuscated ID of the user. |
| 397 core.String id; | 386 core.String id; |
| 398 /** URL of the profile page. */ | 387 |
| 388 /// URL of the profile page. |
| 399 core.String link; | 389 core.String link; |
| 400 /** The user's preferred locale. */ | 390 |
| 391 /// The user's preferred locale. |
| 401 core.String locale; | 392 core.String locale; |
| 402 /** The user's full name. */ | 393 |
| 394 /// The user's full name. |
| 403 core.String name; | 395 core.String name; |
| 404 /** URL of the user's picture image. */ | 396 |
| 397 /// URL of the user's picture image. |
| 405 core.String picture; | 398 core.String picture; |
| 406 /** | 399 |
| 407 * Boolean flag which is true if the email address is verified. Always | 400 /// Boolean flag which is true if the email address is verified. Always |
| 408 * verified because we only return the user's primary email address. | 401 /// verified because we only return the user's primary email address. |
| 409 */ | |
| 410 core.bool verifiedEmail; | 402 core.bool verifiedEmail; |
| 411 | 403 |
| 412 Userinfoplus(); | 404 Userinfoplus(); |
| 413 | 405 |
| 414 Userinfoplus.fromJson(core.Map _json) { | 406 Userinfoplus.fromJson(core.Map _json) { |
| 415 if (_json.containsKey("email")) { | 407 if (_json.containsKey("email")) { |
| 416 email = _json["email"]; | 408 email = _json["email"]; |
| 417 } | 409 } |
| 418 if (_json.containsKey("family_name")) { | 410 if (_json.containsKey("family_name")) { |
| 419 familyName = _json["family_name"]; | 411 familyName = _json["family_name"]; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 441 } | 433 } |
| 442 if (_json.containsKey("picture")) { | 434 if (_json.containsKey("picture")) { |
| 443 picture = _json["picture"]; | 435 picture = _json["picture"]; |
| 444 } | 436 } |
| 445 if (_json.containsKey("verified_email")) { | 437 if (_json.containsKey("verified_email")) { |
| 446 verifiedEmail = _json["verified_email"]; | 438 verifiedEmail = _json["verified_email"]; |
| 447 } | 439 } |
| 448 } | 440 } |
| 449 | 441 |
| 450 core.Map<core.String, core.Object> toJson() { | 442 core.Map<core.String, core.Object> toJson() { |
| 451 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 443 final core.Map<core.String, core.Object> _json = |
| 444 new core.Map<core.String, core.Object>(); |
| 452 if (email != null) { | 445 if (email != null) { |
| 453 _json["email"] = email; | 446 _json["email"] = email; |
| 454 } | 447 } |
| 455 if (familyName != null) { | 448 if (familyName != null) { |
| 456 _json["family_name"] = familyName; | 449 _json["family_name"] = familyName; |
| 457 } | 450 } |
| 458 if (gender != null) { | 451 if (gender != null) { |
| 459 _json["gender"] = gender; | 452 _json["gender"] = gender; |
| 460 } | 453 } |
| 461 if (givenName != null) { | 454 if (givenName != null) { |
| (...skipping 16 matching lines...) Expand all Loading... |
| 478 } | 471 } |
| 479 if (picture != null) { | 472 if (picture != null) { |
| 480 _json["picture"] = picture; | 473 _json["picture"] = picture; |
| 481 } | 474 } |
| 482 if (verifiedEmail != null) { | 475 if (verifiedEmail != null) { |
| 483 _json["verified_email"] = verifiedEmail; | 476 _json["verified_email"] = verifiedEmail; |
| 484 } | 477 } |
| 485 return _json; | 478 return _json; |
| 486 } | 479 } |
| 487 } | 480 } |
| OLD | NEW |