OLD | NEW |
(Empty) | |
| 1 // This is a generated file (see the discoveryapis_generator project). |
| 2 |
| 3 library googleapis.firebasedynamiclinks.v1; |
| 4 |
| 5 import 'dart:core' as core; |
| 6 import 'dart:async' as async; |
| 7 import 'dart:convert' as convert; |
| 8 |
| 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
| 10 import 'package:http/http.dart' as http; |
| 11 |
| 12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show |
| 13 ApiRequestError, DetailedApiRequestError; |
| 14 |
| 15 const core.String USER_AGENT = 'dart-api-client firebasedynamiclinks/v1'; |
| 16 |
| 17 /** |
| 18 * Firebase Dynamic Links API enables third party developers to programmatically |
| 19 * create and manage Dynamic Links. |
| 20 */ |
| 21 class FirebasedynamiclinksApi { |
| 22 /** View and administer all your Firebase data and settings */ |
| 23 static const FirebaseScope = "https://www.googleapis.com/auth/firebase"; |
| 24 |
| 25 |
| 26 final commons.ApiRequester _requester; |
| 27 |
| 28 ShortLinksResourceApi get shortLinks => new ShortLinksResourceApi(_requester); |
| 29 |
| 30 FirebasedynamiclinksApi(http.Client client, {core.String rootUrl: "https://fir
ebasedynamiclinks.googleapis.com/", core.String servicePath: ""}) : |
| 31 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); |
| 32 } |
| 33 |
| 34 |
| 35 class ShortLinksResourceApi { |
| 36 final commons.ApiRequester _requester; |
| 37 |
| 38 ShortLinksResourceApi(commons.ApiRequester client) : |
| 39 _requester = client; |
| 40 |
| 41 /** |
| 42 * Creates a short Dynamic Link given either a valid long Dynamic Link or |
| 43 * details such as Dynamic Link domain, Android and iOS app information. |
| 44 * The created short Dynamic Link will not expire. |
| 45 * |
| 46 * Repeated calls with the same long Dynamic Link or Dynamic Link information |
| 47 * will produce the same short Dynamic Link. |
| 48 * |
| 49 * The Dynamic Link domain in the request must be owned by requester's |
| 50 * Firebase project. |
| 51 * |
| 52 * [request] - The metadata request object. |
| 53 * |
| 54 * Request parameters: |
| 55 * |
| 56 * Completes with a [CreateShortDynamicLinkResponse]. |
| 57 * |
| 58 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 59 * error. |
| 60 * |
| 61 * If the used [http.Client] completes with an error when making a REST call, |
| 62 * this method will complete with the same error. |
| 63 */ |
| 64 async.Future<CreateShortDynamicLinkResponse> create(CreateShortDynamicLinkRequ
est request) { |
| 65 var _url = null; |
| 66 var _queryParams = new core.Map(); |
| 67 var _uploadMedia = null; |
| 68 var _uploadOptions = null; |
| 69 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 70 var _body = null; |
| 71 |
| 72 if (request != null) { |
| 73 _body = convert.JSON.encode((request).toJson()); |
| 74 } |
| 75 |
| 76 _url = 'v1/shortLinks'; |
| 77 |
| 78 var _response = _requester.request(_url, |
| 79 "POST", |
| 80 body: _body, |
| 81 queryParams: _queryParams, |
| 82 uploadOptions: _uploadOptions, |
| 83 uploadMedia: _uploadMedia, |
| 84 downloadOptions: _downloadOptions); |
| 85 return _response.then((data) => new CreateShortDynamicLinkResponse.fromJson(
data)); |
| 86 } |
| 87 |
| 88 } |
| 89 |
| 90 |
| 91 |
| 92 /** Tracking parameters supported by Dynamic Link. */ |
| 93 class AnalyticsInfo { |
| 94 /** Google Play Campaign Measurements. */ |
| 95 GooglePlayAnalytics googlePlayAnalytics; |
| 96 /** iTunes Connect App Analytics. */ |
| 97 ITunesConnectAnalytics itunesConnectAnalytics; |
| 98 |
| 99 AnalyticsInfo(); |
| 100 |
| 101 AnalyticsInfo.fromJson(core.Map _json) { |
| 102 if (_json.containsKey("googlePlayAnalytics")) { |
| 103 googlePlayAnalytics = new GooglePlayAnalytics.fromJson(_json["googlePlayAn
alytics"]); |
| 104 } |
| 105 if (_json.containsKey("itunesConnectAnalytics")) { |
| 106 itunesConnectAnalytics = new ITunesConnectAnalytics.fromJson(_json["itunes
ConnectAnalytics"]); |
| 107 } |
| 108 } |
| 109 |
| 110 core.Map toJson() { |
| 111 var _json = new core.Map(); |
| 112 if (googlePlayAnalytics != null) { |
| 113 _json["googlePlayAnalytics"] = (googlePlayAnalytics).toJson(); |
| 114 } |
| 115 if (itunesConnectAnalytics != null) { |
| 116 _json["itunesConnectAnalytics"] = (itunesConnectAnalytics).toJson(); |
| 117 } |
| 118 return _json; |
| 119 } |
| 120 } |
| 121 |
| 122 /** Android related attributes to the Dynamic Link. */ |
| 123 class AndroidInfo { |
| 124 /** Link to open on Android if the app is not installed. */ |
| 125 core.String androidFallbackLink; |
| 126 /** If specified, this overrides the ‘link’ parameter on Android. */ |
| 127 core.String androidLink; |
| 128 /** |
| 129 * Minimum version code for the Android app. If the installed app’s version |
| 130 * code is lower, then the user is taken to the Play Store. |
| 131 */ |
| 132 core.String androidMinPackageVersionCode; |
| 133 /** Android package name of the app. */ |
| 134 core.String androidPackageName; |
| 135 |
| 136 AndroidInfo(); |
| 137 |
| 138 AndroidInfo.fromJson(core.Map _json) { |
| 139 if (_json.containsKey("androidFallbackLink")) { |
| 140 androidFallbackLink = _json["androidFallbackLink"]; |
| 141 } |
| 142 if (_json.containsKey("androidLink")) { |
| 143 androidLink = _json["androidLink"]; |
| 144 } |
| 145 if (_json.containsKey("androidMinPackageVersionCode")) { |
| 146 androidMinPackageVersionCode = _json["androidMinPackageVersionCode"]; |
| 147 } |
| 148 if (_json.containsKey("androidPackageName")) { |
| 149 androidPackageName = _json["androidPackageName"]; |
| 150 } |
| 151 } |
| 152 |
| 153 core.Map toJson() { |
| 154 var _json = new core.Map(); |
| 155 if (androidFallbackLink != null) { |
| 156 _json["androidFallbackLink"] = androidFallbackLink; |
| 157 } |
| 158 if (androidLink != null) { |
| 159 _json["androidLink"] = androidLink; |
| 160 } |
| 161 if (androidMinPackageVersionCode != null) { |
| 162 _json["androidMinPackageVersionCode"] = androidMinPackageVersionCode; |
| 163 } |
| 164 if (androidPackageName != null) { |
| 165 _json["androidPackageName"] = androidPackageName; |
| 166 } |
| 167 return _json; |
| 168 } |
| 169 } |
| 170 |
| 171 /** Request to create a short Dynamic Link. */ |
| 172 class CreateShortDynamicLinkRequest { |
| 173 /** |
| 174 * Information about the Dynamic Link to be shortened. |
| 175 * [Learn |
| 176 * more](https://firebase.google.com/docs/dynamic-links/android#create-a-dynam
ic-link-programmatically). |
| 177 */ |
| 178 DynamicLinkInfo dynamicLinkInfo; |
| 179 /** |
| 180 * Full long Dynamic Link URL with desired query parameters specified. |
| 181 * For example, |
| 182 * "https://sample.app.goo.gl/?link=http://www.google.com&apn=com.sample", |
| 183 * [Learn |
| 184 * more](https://firebase.google.com/docs/dynamic-links/android#create-a-dynam
ic-link-programmatically). |
| 185 */ |
| 186 core.String longDynamicLink; |
| 187 /** Short Dynamic Link suffix. Optional. */ |
| 188 Suffix suffix; |
| 189 |
| 190 CreateShortDynamicLinkRequest(); |
| 191 |
| 192 CreateShortDynamicLinkRequest.fromJson(core.Map _json) { |
| 193 if (_json.containsKey("dynamicLinkInfo")) { |
| 194 dynamicLinkInfo = new DynamicLinkInfo.fromJson(_json["dynamicLinkInfo"]); |
| 195 } |
| 196 if (_json.containsKey("longDynamicLink")) { |
| 197 longDynamicLink = _json["longDynamicLink"]; |
| 198 } |
| 199 if (_json.containsKey("suffix")) { |
| 200 suffix = new Suffix.fromJson(_json["suffix"]); |
| 201 } |
| 202 } |
| 203 |
| 204 core.Map toJson() { |
| 205 var _json = new core.Map(); |
| 206 if (dynamicLinkInfo != null) { |
| 207 _json["dynamicLinkInfo"] = (dynamicLinkInfo).toJson(); |
| 208 } |
| 209 if (longDynamicLink != null) { |
| 210 _json["longDynamicLink"] = longDynamicLink; |
| 211 } |
| 212 if (suffix != null) { |
| 213 _json["suffix"] = (suffix).toJson(); |
| 214 } |
| 215 return _json; |
| 216 } |
| 217 } |
| 218 |
| 219 /** Response to create a short Dynamic Link. */ |
| 220 class CreateShortDynamicLinkResponse { |
| 221 /** Preivew link to show the link flow chart. */ |
| 222 core.String previewLink; |
| 223 /** Short Dynamic Link value. e.g. https://abcd.app.goo.gl/wxyz */ |
| 224 core.String shortLink; |
| 225 /** Information about potential warnings on link creation. */ |
| 226 core.List<DynamicLinkWarning> warning; |
| 227 |
| 228 CreateShortDynamicLinkResponse(); |
| 229 |
| 230 CreateShortDynamicLinkResponse.fromJson(core.Map _json) { |
| 231 if (_json.containsKey("previewLink")) { |
| 232 previewLink = _json["previewLink"]; |
| 233 } |
| 234 if (_json.containsKey("shortLink")) { |
| 235 shortLink = _json["shortLink"]; |
| 236 } |
| 237 if (_json.containsKey("warning")) { |
| 238 warning = _json["warning"].map((value) => new DynamicLinkWarning.fromJson(
value)).toList(); |
| 239 } |
| 240 } |
| 241 |
| 242 core.Map toJson() { |
| 243 var _json = new core.Map(); |
| 244 if (previewLink != null) { |
| 245 _json["previewLink"] = previewLink; |
| 246 } |
| 247 if (shortLink != null) { |
| 248 _json["shortLink"] = shortLink; |
| 249 } |
| 250 if (warning != null) { |
| 251 _json["warning"] = warning.map((value) => (value).toJson()).toList(); |
| 252 } |
| 253 return _json; |
| 254 } |
| 255 } |
| 256 |
| 257 /** Information about a Dynamic Link. */ |
| 258 class DynamicLinkInfo { |
| 259 /** |
| 260 * Parameters used for tracking. See all tracking parameters in the |
| 261 * [documentation](https://firebase.google.com/docs/dynamic-links/android#crea
te-a-dynamic-link-programmatically). |
| 262 */ |
| 263 AnalyticsInfo analyticsInfo; |
| 264 /** |
| 265 * Android related information. See Android related parameters in the |
| 266 * [documentation](https://firebase.google.com/docs/dynamic-links/android#crea
te-a-dynamic-link-programmatically). |
| 267 */ |
| 268 AndroidInfo androidInfo; |
| 269 /** |
| 270 * Dynamic Links domain that the project owns, e.g. abcd.app.goo.gl |
| 271 * [Learn |
| 272 * more](https://firebase.google.com/docs/dynamic-links/android#set-up-firebas
e-and-the-dynamic-links-sdk) |
| 273 * on how to set up Dynamic Link domain associated with your Firebase project. |
| 274 * |
| 275 * Required. |
| 276 */ |
| 277 core.String dynamicLinkDomain; |
| 278 /** |
| 279 * iOS related information. See iOS related parameters in the |
| 280 * [documentation](https://firebase.google.com/docs/dynamic-links/ios#create-a
-dynamic-link-programmatically). |
| 281 */ |
| 282 IosInfo iosInfo; |
| 283 /** |
| 284 * Declares that the Dynamic Link is used in an advertisement. |
| 285 * See the 'ad' parameter in the |
| 286 * [documentation](https://firebase.google.com/docs/dynamic-links/android#crea
te-a-dynamic-link-programmatically). |
| 287 */ |
| 288 core.bool isAd; |
| 289 /** |
| 290 * The link your app will open, You can specify any URL your app can handle. |
| 291 * This link must be a well-formatted URL, be properly URL-encoded, and use |
| 292 * the HTTP or HTTPS scheme. See 'link' parameters in the |
| 293 * [documentation](https://firebase.google.com/docs/dynamic-links/android#crea
te-a-dynamic-link-programmatically). |
| 294 * |
| 295 * Required. |
| 296 */ |
| 297 core.String link; |
| 298 /** |
| 299 * Parameters for social meta tag params. |
| 300 * Used to set meta tag data for link previews on social sites. |
| 301 */ |
| 302 SocialMetaTagInfo socialMetaTagInfo; |
| 303 |
| 304 DynamicLinkInfo(); |
| 305 |
| 306 DynamicLinkInfo.fromJson(core.Map _json) { |
| 307 if (_json.containsKey("analyticsInfo")) { |
| 308 analyticsInfo = new AnalyticsInfo.fromJson(_json["analyticsInfo"]); |
| 309 } |
| 310 if (_json.containsKey("androidInfo")) { |
| 311 androidInfo = new AndroidInfo.fromJson(_json["androidInfo"]); |
| 312 } |
| 313 if (_json.containsKey("dynamicLinkDomain")) { |
| 314 dynamicLinkDomain = _json["dynamicLinkDomain"]; |
| 315 } |
| 316 if (_json.containsKey("iosInfo")) { |
| 317 iosInfo = new IosInfo.fromJson(_json["iosInfo"]); |
| 318 } |
| 319 if (_json.containsKey("isAd")) { |
| 320 isAd = _json["isAd"]; |
| 321 } |
| 322 if (_json.containsKey("link")) { |
| 323 link = _json["link"]; |
| 324 } |
| 325 if (_json.containsKey("socialMetaTagInfo")) { |
| 326 socialMetaTagInfo = new SocialMetaTagInfo.fromJson(_json["socialMetaTagInf
o"]); |
| 327 } |
| 328 } |
| 329 |
| 330 core.Map toJson() { |
| 331 var _json = new core.Map(); |
| 332 if (analyticsInfo != null) { |
| 333 _json["analyticsInfo"] = (analyticsInfo).toJson(); |
| 334 } |
| 335 if (androidInfo != null) { |
| 336 _json["androidInfo"] = (androidInfo).toJson(); |
| 337 } |
| 338 if (dynamicLinkDomain != null) { |
| 339 _json["dynamicLinkDomain"] = dynamicLinkDomain; |
| 340 } |
| 341 if (iosInfo != null) { |
| 342 _json["iosInfo"] = (iosInfo).toJson(); |
| 343 } |
| 344 if (isAd != null) { |
| 345 _json["isAd"] = isAd; |
| 346 } |
| 347 if (link != null) { |
| 348 _json["link"] = link; |
| 349 } |
| 350 if (socialMetaTagInfo != null) { |
| 351 _json["socialMetaTagInfo"] = (socialMetaTagInfo).toJson(); |
| 352 } |
| 353 return _json; |
| 354 } |
| 355 } |
| 356 |
| 357 /** Dynamic Links warning messages. */ |
| 358 class DynamicLinkWarning { |
| 359 /** |
| 360 * The warning code. |
| 361 * Possible string values are: |
| 362 * - "CODE_UNSPECIFIED" : Unknown code. |
| 363 * - "NOT_IN_PROJECT_ANDROID_PACKAGE_NAME" : The Android package does not |
| 364 * match any in developer's DevConsole project. |
| 365 * - "NOT_INTEGER_ANDROID_PACKAGE_MIN_VERSION" : The Android minimum version |
| 366 * code has to be a valid integer. |
| 367 * - "UNNECESSARY_ANDROID_PACKAGE_MIN_VERSION" : Android package min version |
| 368 * param is not needed, e.g. when |
| 369 * 'apn' is missing. |
| 370 * - "NOT_URI_ANDROID_LINK" : Android link is not a valid URI. |
| 371 * - "UNNECESSARY_ANDROID_LINK" : Android link param is not needed, e.g. when |
| 372 * param 'al' and 'link' have |
| 373 * the same value.. |
| 374 * - "NOT_URI_ANDROID_FALLBACK_LINK" : Android fallback link is not a valid |
| 375 * URI. |
| 376 * - "BAD_URI_SCHEME_ANDROID_FALLBACK_LINK" : Android fallback link has an |
| 377 * invalid (non http/https) URI scheme. |
| 378 * - "NOT_IN_PROJECT_IOS_BUNDLE_ID" : The iOS bundle ID does not match any in |
| 379 * developer's DevConsole project. |
| 380 * - "NOT_IN_PROJECT_IPAD_BUNDLE_ID" : The iPad bundle ID does not match any |
| 381 * in developer's DevConsole project. |
| 382 * - "UNNECESSARY_IOS_URL_SCHEME" : iOS URL scheme is not needed, e.g. when |
| 383 * 'ibi' are 'ipbi' are all missing. |
| 384 * - "NOT_NUMERIC_IOS_APP_STORE_ID" : iOS app store ID format is incorrect, |
| 385 * e.g. not numeric. |
| 386 * - "UNNECESSARY_IOS_APP_STORE_ID" : iOS app store ID is not needed. |
| 387 * - "NOT_URI_IOS_FALLBACK_LINK" : iOS fallback link is not a valid URI. |
| 388 * - "BAD_URI_SCHEME_IOS_FALLBACK_LINK" : iOS fallback link has an invalid |
| 389 * (non http/https) URI scheme. |
| 390 * - "NOT_URI_IPAD_FALLBACK_LINK" : iPad fallback link is not a valid URI. |
| 391 * - "BAD_URI_SCHEME_IPAD_FALLBACK_LINK" : iPad fallback link has an invalid |
| 392 * (non http/https) URI scheme. |
| 393 * - "BAD_DEBUG_PARAM" : Debug param format is incorrect. |
| 394 * - "BAD_AD_PARAM" : isAd param format is incorrect. |
| 395 * - "DEPRECATED_PARAM" : Indicates a certain param is deprecated. |
| 396 * - "UNRECOGNIZED_PARAM" : Indicates certain paramater is not recognized. |
| 397 * - "TOO_LONG_PARAM" : Indicates certain paramater is too long. |
| 398 * - "NOT_URI_SOCIAL_IMAGE_LINK" : Social meta tag image link is not a valid |
| 399 * URI. |
| 400 * - "BAD_URI_SCHEME_SOCIAL_IMAGE_LINK" : Social meta tag image link has an |
| 401 * invalid (non http/https) URI scheme. |
| 402 * - "NOT_URI_SOCIAL_URL" |
| 403 * - "BAD_URI_SCHEME_SOCIAL_URL" |
| 404 * - "LINK_LENGTH_TOO_LONG" : Dynamic Link URL length is too long. |
| 405 * - "LINK_WITH_FRAGMENTS" : Dynamic Link URL contains fragments. |
| 406 * - "NOT_MATCHING_IOS_BUNDLE_ID_AND_STORE_ID" : The iOS bundle ID does not |
| 407 * match with the given iOS store ID. |
| 408 */ |
| 409 core.String warningCode; |
| 410 /** The warning message to help developers improve their requests. */ |
| 411 core.String warningMessage; |
| 412 |
| 413 DynamicLinkWarning(); |
| 414 |
| 415 DynamicLinkWarning.fromJson(core.Map _json) { |
| 416 if (_json.containsKey("warningCode")) { |
| 417 warningCode = _json["warningCode"]; |
| 418 } |
| 419 if (_json.containsKey("warningMessage")) { |
| 420 warningMessage = _json["warningMessage"]; |
| 421 } |
| 422 } |
| 423 |
| 424 core.Map toJson() { |
| 425 var _json = new core.Map(); |
| 426 if (warningCode != null) { |
| 427 _json["warningCode"] = warningCode; |
| 428 } |
| 429 if (warningMessage != null) { |
| 430 _json["warningMessage"] = warningMessage; |
| 431 } |
| 432 return _json; |
| 433 } |
| 434 } |
| 435 |
| 436 /** |
| 437 * Parameters for Google Play Campaign Measurements. |
| 438 * [Learn |
| 439 * more](https://developers.google.com/analytics/devguides/collection/android/v4
/campaigns#campaign-params) |
| 440 */ |
| 441 class GooglePlayAnalytics { |
| 442 /** |
| 443 * [AdWords autotagging |
| 444 * parameter](https://support.google.com/analytics/answer/1033981?hl=en); |
| 445 * used to measure Google AdWords ads. This value is generated dynamically |
| 446 * and should never be modified. |
| 447 */ |
| 448 core.String gclid; |
| 449 /** |
| 450 * Campaign name; used for keyword analysis to identify a specific product |
| 451 * promotion or strategic campaign. |
| 452 */ |
| 453 core.String utmCampaign; |
| 454 /** |
| 455 * Campaign content; used for A/B testing and content-targeted ads to |
| 456 * differentiate ads or links that point to the same URL. |
| 457 */ |
| 458 core.String utmContent; |
| 459 /** |
| 460 * Campaign medium; used to identify a medium such as email or cost-per-click. |
| 461 */ |
| 462 core.String utmMedium; |
| 463 /** |
| 464 * Campaign source; used to identify a search engine, newsletter, or other |
| 465 * source. |
| 466 */ |
| 467 core.String utmSource; |
| 468 /** Campaign term; used with paid search to supply the keywords for ads. */ |
| 469 core.String utmTerm; |
| 470 |
| 471 GooglePlayAnalytics(); |
| 472 |
| 473 GooglePlayAnalytics.fromJson(core.Map _json) { |
| 474 if (_json.containsKey("gclid")) { |
| 475 gclid = _json["gclid"]; |
| 476 } |
| 477 if (_json.containsKey("utmCampaign")) { |
| 478 utmCampaign = _json["utmCampaign"]; |
| 479 } |
| 480 if (_json.containsKey("utmContent")) { |
| 481 utmContent = _json["utmContent"]; |
| 482 } |
| 483 if (_json.containsKey("utmMedium")) { |
| 484 utmMedium = _json["utmMedium"]; |
| 485 } |
| 486 if (_json.containsKey("utmSource")) { |
| 487 utmSource = _json["utmSource"]; |
| 488 } |
| 489 if (_json.containsKey("utmTerm")) { |
| 490 utmTerm = _json["utmTerm"]; |
| 491 } |
| 492 } |
| 493 |
| 494 core.Map toJson() { |
| 495 var _json = new core.Map(); |
| 496 if (gclid != null) { |
| 497 _json["gclid"] = gclid; |
| 498 } |
| 499 if (utmCampaign != null) { |
| 500 _json["utmCampaign"] = utmCampaign; |
| 501 } |
| 502 if (utmContent != null) { |
| 503 _json["utmContent"] = utmContent; |
| 504 } |
| 505 if (utmMedium != null) { |
| 506 _json["utmMedium"] = utmMedium; |
| 507 } |
| 508 if (utmSource != null) { |
| 509 _json["utmSource"] = utmSource; |
| 510 } |
| 511 if (utmTerm != null) { |
| 512 _json["utmTerm"] = utmTerm; |
| 513 } |
| 514 return _json; |
| 515 } |
| 516 } |
| 517 |
| 518 /** Parameters for iTunes Connect App Analytics. */ |
| 519 class ITunesConnectAnalytics { |
| 520 /** Affiliate token used to create affiliate-coded links. */ |
| 521 core.String at; |
| 522 /** |
| 523 * Campaign text that developers can optionally add to any link in order to |
| 524 * track sales from a specific marketing campaign. |
| 525 */ |
| 526 core.String ct; |
| 527 /** iTune media types, including music, podcasts, audiobooks and so on. */ |
| 528 core.String mt; |
| 529 /** |
| 530 * Provider token that enables analytics for Dynamic Links from within iTunes |
| 531 * Connect. |
| 532 */ |
| 533 core.String pt; |
| 534 |
| 535 ITunesConnectAnalytics(); |
| 536 |
| 537 ITunesConnectAnalytics.fromJson(core.Map _json) { |
| 538 if (_json.containsKey("at")) { |
| 539 at = _json["at"]; |
| 540 } |
| 541 if (_json.containsKey("ct")) { |
| 542 ct = _json["ct"]; |
| 543 } |
| 544 if (_json.containsKey("mt")) { |
| 545 mt = _json["mt"]; |
| 546 } |
| 547 if (_json.containsKey("pt")) { |
| 548 pt = _json["pt"]; |
| 549 } |
| 550 } |
| 551 |
| 552 core.Map toJson() { |
| 553 var _json = new core.Map(); |
| 554 if (at != null) { |
| 555 _json["at"] = at; |
| 556 } |
| 557 if (ct != null) { |
| 558 _json["ct"] = ct; |
| 559 } |
| 560 if (mt != null) { |
| 561 _json["mt"] = mt; |
| 562 } |
| 563 if (pt != null) { |
| 564 _json["pt"] = pt; |
| 565 } |
| 566 return _json; |
| 567 } |
| 568 } |
| 569 |
| 570 /** iOS related attributes to the Dynamic Link.. */ |
| 571 class IosInfo { |
| 572 /** iOS App Store ID. */ |
| 573 core.String iosAppStoreId; |
| 574 /** iOS bundle ID of the app. */ |
| 575 core.String iosBundleId; |
| 576 /** |
| 577 * Custom (destination) scheme to use for iOS. By default, we’ll use the |
| 578 * bundle ID as the custom scheme. Developer can override this behavior using |
| 579 * this param. |
| 580 */ |
| 581 core.String iosCustomScheme; |
| 582 /** Link to open on iOS if the app is not installed. */ |
| 583 core.String iosFallbackLink; |
| 584 /** iPad bundle ID of the app. */ |
| 585 core.String iosIpadBundleId; |
| 586 /** If specified, this overrides the ios_fallback_link value on iPads. */ |
| 587 core.String iosIpadFallbackLink; |
| 588 |
| 589 IosInfo(); |
| 590 |
| 591 IosInfo.fromJson(core.Map _json) { |
| 592 if (_json.containsKey("iosAppStoreId")) { |
| 593 iosAppStoreId = _json["iosAppStoreId"]; |
| 594 } |
| 595 if (_json.containsKey("iosBundleId")) { |
| 596 iosBundleId = _json["iosBundleId"]; |
| 597 } |
| 598 if (_json.containsKey("iosCustomScheme")) { |
| 599 iosCustomScheme = _json["iosCustomScheme"]; |
| 600 } |
| 601 if (_json.containsKey("iosFallbackLink")) { |
| 602 iosFallbackLink = _json["iosFallbackLink"]; |
| 603 } |
| 604 if (_json.containsKey("iosIpadBundleId")) { |
| 605 iosIpadBundleId = _json["iosIpadBundleId"]; |
| 606 } |
| 607 if (_json.containsKey("iosIpadFallbackLink")) { |
| 608 iosIpadFallbackLink = _json["iosIpadFallbackLink"]; |
| 609 } |
| 610 } |
| 611 |
| 612 core.Map toJson() { |
| 613 var _json = new core.Map(); |
| 614 if (iosAppStoreId != null) { |
| 615 _json["iosAppStoreId"] = iosAppStoreId; |
| 616 } |
| 617 if (iosBundleId != null) { |
| 618 _json["iosBundleId"] = iosBundleId; |
| 619 } |
| 620 if (iosCustomScheme != null) { |
| 621 _json["iosCustomScheme"] = iosCustomScheme; |
| 622 } |
| 623 if (iosFallbackLink != null) { |
| 624 _json["iosFallbackLink"] = iosFallbackLink; |
| 625 } |
| 626 if (iosIpadBundleId != null) { |
| 627 _json["iosIpadBundleId"] = iosIpadBundleId; |
| 628 } |
| 629 if (iosIpadFallbackLink != null) { |
| 630 _json["iosIpadFallbackLink"] = iosIpadFallbackLink; |
| 631 } |
| 632 return _json; |
| 633 } |
| 634 } |
| 635 |
| 636 /** |
| 637 * Parameters for social meta tag params. |
| 638 * Used to set meta tag data for link previews on social sites. |
| 639 */ |
| 640 class SocialMetaTagInfo { |
| 641 /** A short description of the link. Optional. */ |
| 642 core.String socialDescription; |
| 643 /** An image url string. Optional. */ |
| 644 core.String socialImageLink; |
| 645 /** Title to be displayed. Optional. */ |
| 646 core.String socialTitle; |
| 647 |
| 648 SocialMetaTagInfo(); |
| 649 |
| 650 SocialMetaTagInfo.fromJson(core.Map _json) { |
| 651 if (_json.containsKey("socialDescription")) { |
| 652 socialDescription = _json["socialDescription"]; |
| 653 } |
| 654 if (_json.containsKey("socialImageLink")) { |
| 655 socialImageLink = _json["socialImageLink"]; |
| 656 } |
| 657 if (_json.containsKey("socialTitle")) { |
| 658 socialTitle = _json["socialTitle"]; |
| 659 } |
| 660 } |
| 661 |
| 662 core.Map toJson() { |
| 663 var _json = new core.Map(); |
| 664 if (socialDescription != null) { |
| 665 _json["socialDescription"] = socialDescription; |
| 666 } |
| 667 if (socialImageLink != null) { |
| 668 _json["socialImageLink"] = socialImageLink; |
| 669 } |
| 670 if (socialTitle != null) { |
| 671 _json["socialTitle"] = socialTitle; |
| 672 } |
| 673 return _json; |
| 674 } |
| 675 } |
| 676 |
| 677 /** Short Dynamic Link suffix. */ |
| 678 class Suffix { |
| 679 /** |
| 680 * Suffix option. |
| 681 * Possible string values are: |
| 682 * - "OPTION_UNSPECIFIED" : The suffix option is not specified, performs as |
| 683 * NOT_GUESSABLE . |
| 684 * - "UNGUESSABLE" : Short Dynamic Link suffix is a base62 [0-9A-Za-z] encoded |
| 685 * string of |
| 686 * a random generated 96 bit random number, which has a length of 17 chars. |
| 687 * For example, "nlAR8U4SlKRZw1cb2". |
| 688 * It prevents other people from guessing and crawling short Dynamic Links |
| 689 * that contain personal identifiable information. |
| 690 * - "SHORT" : Short Dynamic Link suffix is a base62 [0-9A-Za-z] string |
| 691 * starting with a |
| 692 * length of 4 chars. the length will increase when all the space is |
| 693 * occupied. |
| 694 */ |
| 695 core.String option; |
| 696 |
| 697 Suffix(); |
| 698 |
| 699 Suffix.fromJson(core.Map _json) { |
| 700 if (_json.containsKey("option")) { |
| 701 option = _json["option"]; |
| 702 } |
| 703 } |
| 704 |
| 705 core.Map toJson() { |
| 706 var _json = new core.Map(); |
| 707 if (option != null) { |
| 708 _json["option"] = option; |
| 709 } |
| 710 return _json; |
| 711 } |
| 712 } |
OLD | NEW |