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EAAwB,SAAUlG,EAAQuE,GAC1C,IAAI4F,EAAU,SAAUC,EAAQ3B,GAAO,OAAOzB,OAAOqD,KAAKD,GAAQE,MAAK,SAAUC,GAAK,OAAOA,EAAEC,gBAAkB/B,EAAI+B,aAAe,GAAI,EACpIC,EAAoB,SAAUC,GAC9B,IAAIC,EAAaD,EAOjB,OANIC,EAAWC,QAAQ,MAAQ,IAC3BD,EAAaA,EAAWE,MAAM,KAAK,IAEnCF,EAAWC,QAAQ,MAAQ,IAC3BD,EAAaA,EAAWE,MAAM,KAAK,IAEhCF,CACX,EACIG,EAAYX,EAAQnK,EAAO6D,QAAS,oBACxC,YAAkBlI,IAAdmP,EACOL,EAAkBzK,EAAO6D,QAAQiH,SAE1BnP,IAAd4I,EAAKqC,KACE6D,EAAkBlG,EAAKqC,WAEXjL,IAAnB4I,EAAK,UACEkG,EAAkBlG,EAAK,WAE3B,EACX,C","sources":["webpack://smapac/./node_modules/@aws-sdk/chunked-blob-reader/dist/es/index.js","webpack://smapac/./node_modules/@aws-sdk/client-cognito-identity/dist/es/endpoints.js","webpack://smapac/./node_modules/@aws-sdk/client-cognito-identity/dist/es/runtimeConfig.shared.js","webpack://smapac/./node_modules/@aws-sdk/client-cognito-identity/dist/es/runtimeConfig.browser.js","webpack://smapac/./node_modules/@aws-sdk/client-cognito-identity/dist/es/CognitoIdentityClient.js","webpack://smapac/./node_modules/@aws-sdk/client-cognito-identity/dist/es/commands/GetCredentialsForIdentityCommand.js","webpack://smapac/./node_modules/@aws-sdk/client-cognito-identity/dist/es/commands/GetIdCommand.js","webpack://smapac/./node_modules/@aws-sdk/client-cognito-identity/dist/es/models/models_0.js","webpack://smapac/./node_modules/@aws-sdk/client-cognito-identity/dist/es/protocols/Aws_json1_1.js"],"sourcesContent":["export function blobReader(blob, onChunk, chunkSize) {\n    if (chunkSize === void 0) { chunkSize = 1024 * 1024; }\n    return new Promise(function (resolve, reject) {\n        var fileReader = new FileReader();\n        fileReader.addEventListener(\"error\", reject);\n        fileReader.addEventListener(\"abort\", reject);\n        var size = blob.size;\n        var totalBytesRead = 0;\n        function read() {\n            if (totalBytesRead >= size) {\n                resolve();\n                return;\n            }\n            fileReader.readAsArrayBuffer(blob.slice(totalBytesRead, Math.min(size, totalBytesRead + chunkSize)));\n        }\n        fileReader.addEventListener(\"load\", function (event) {\n            var result = event.target.result;\n            onChunk(new Uint8Array(result));\n            totalBytesRead += result.byteLength;\n            // read the next block\n            read();\n        });\n        // kick off the read\n        read();\n    });\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsTUFBTSxVQUFVLFVBQVUsQ0FDeEIsSUFBVSxFQUNWLE9BQW9DLEVBQ3BDLFNBQStCO0lBQS9CLDBCQUFBLEVBQUEsWUFBb0IsSUFBSSxHQUFHLElBQUk7SUFFL0IsT0FBTyxJQUFJLE9BQU8sQ0FBQyxVQUFDLE9BQU8sRUFBRSxNQUFNO1FBQ2pDLElBQU0sVUFBVSxHQUFHLElBQUksVUFBVSxFQUFFLENBQUM7UUFFcEMsVUFBVSxDQUFDLGdCQUFnQixDQUFDLE9BQU8sRUFBRSxNQUFNLENBQUMsQ0FBQztRQUM3QyxVQUFVLENBQUMsZ0JBQWdCLENBQUMsT0FBTyxFQUFFLE1BQU0sQ0FBQyxDQUFDO1FBRTdDLElBQU0sSUFBSSxHQUFHLElBQUksQ0FBQyxJQUFJLENBQUM7UUFDdkIsSUFBSSxjQUFjLEdBQUcsQ0FBQyxDQUFDO1FBRXZCLFNBQVMsSUFBSTtZQUNYLElBQUksY0FBYyxJQUFJLElBQUksRUFBRTtnQkFDMUIsT0FBTyxFQUFFLENBQUM7Z0JBQ1YsT0FBTzthQUNSO1lBQ0QsVUFBVSxDQUFDLGlCQUFpQixDQUFDLElB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XQgdG90YWxCeXRlc1JlYWQgPSAwO1xuXG4gICAgZnVuY3Rpb24gcmVhZCgpIHtcbiAgICAgIGlmICh0b3RhbEJ5dGVzUmVhZCA+PSBzaXplKSB7XG4gICAgICAgIHJlc29sdmUoKTtcbiAgICAgICAgcmV0dXJuO1xuICAgICAgfVxuICAgICAgZmlsZVJlYWRlci5yZWFkQXNBcnJheUJ1ZmZlcihibG9iLnNsaWNlKHRvdGFsQnl0ZXNSZWFkLCBNYXRoLm1pbihzaXplLCB0b3RhbEJ5dGVzUmVhZCArIGNodW5rU2l6ZSkpKTtcbiAgICB9XG5cbiAgICBmaWxlUmVhZGVyLmFkZEV2ZW50TGlzdGVuZXIoXCJsb2FkXCIsIChldmVudCkgPT4ge1xuICAgICAgY29uc3QgcmVzdWx0ID0gPEFycmF5QnVmZmVyPihldmVudC50YXJnZXQgYXMgYW55KS5yZXN1bHQ7XG4gICAgICBvbkNodW5rKG5ldyBVaW50OEFycmF5KHJlc3VsdCkpO1xuICAgICAgdG90YWxCeXRlc1JlYWQgKz0gcmVzdWx0LmJ5dGVMZW5ndGg7XG4gICAgICAvLyByZWFkIHRoZSBuZXh0IGJsb2NrXG4gICAgICByZWFkKCk7XG4gICAgfSk7XG5cbiAgICAvLyBraWNrIG9mZiB0aGUgcmVhZFxuICAgIHJlYWQoKTtcbiAgfSk7XG59XG4iXX0=","import { __assign } from \"tslib\";\n// Partition default templates\nvar AWS_TEMPLATE = \"cognito-identity.{region}.amazonaws.com\";\nvar AWS_CN_TEMPLATE = \"cognito-identity.{region}.amazonaws.com.cn\";\nvar AWS_ISO_TEMPLATE = \"cognito-identity.{region}.c2s.ic.gov\";\nvar AWS_ISO_B_TEMPLATE = \"cognito-identity.{region}.sc2s.sgov.gov\";\nvar AWS_US_GOV_TEMPLATE = \"cognito-identity.{region}.amazonaws.com\";\n// Partition regions\nvar AWS_REGIONS = new Set([\n    \"af-south-1\",\n    \"ap-east-1\",\n    \"ap-northeast-1\",\n    \"ap-northeast-2\",\n    \"ap-south-1\",\n    \"ap-southeast-1\",\n    \"ap-southeast-2\",\n    \"ca-central-1\",\n    \"eu-central-1\",\n    \"eu-north-1\",\n    \"eu-south-1\",\n    \"eu-west-1\",\n    \"eu-west-2\",\n    \"eu-west-3\",\n    \"me-south-1\",\n    \"sa-east-1\",\n    \"us-east-1\",\n    \"us-east-2\",\n    \"us-west-1\",\n    \"us-west-2\",\n]);\nvar AWS_CN_REGIONS = new Set([\"cn-north-1\", \"cn-northwest-1\"]);\nvar AWS_ISO_REGIONS = new Set([\"us-iso-east-1\"]);\nvar AWS_ISO_B_REGIONS = new Set([\"us-isob-east-1\"]);\nvar AWS_US_GOV_REGIONS = new Set([\"us-gov-east-1\", \"us-gov-west-1\"]);\nexport var defaultRegionInfoProvider = function (region, options) {\n    var regionInfo = undefined;\n    switch (region) {\n        // First, try to match exact region names.\n        case \"ap-northeast-1\":\n            regionInfo = {\n                hostname: \"cognito-identity.ap-northeast-1.amazonaws.com\",\n                partition: \"aws\",\n            };\n            break;\n        case \"ap-northeast-2\":\n            regionInfo = {\n                hostname: \"cognito-identity.ap-northeast-2.amazonaws.com\",\n                partition: \"aws\",\n            };\n            break;\n        case \"ap-south-1\":\n            regionInfo = {\n                hostname: \"cognito-identity.ap-south-1.amazonaws.com\",\n                partition: \"aws\",\n            };\n            break;\n        case \"ap-southeast-1\":\n            regionInfo = {\n                hostname: \"cognito-identity.ap-southeast-1.amazonaws.com\",\n                partition: \"aws\",\n            };\n            break;\n        case \"ap-southeast-2\":\n            regionInfo = {\n                hostname: \"cognito-identity.ap-southeast-2.amazonaws.com\",\n                partition: \"aws\",\n            };\n            break;\n        case \"ca-central-1\":\n            regionInfo = {\n                hostname: \"cognito-identity.ca-central-1.amazonaws.com\",\n                partition: \"aws\",\n            };\n            break;\n        case \"cn-north-1\":\n            regionInfo = {\n                hostname: \"cognito-identity.cn-north-1.amazonaws.com.cn\",\n                partition: \"aws-cn\",\n            };\n            break;\n        case \"eu-central-1\":\n            regionInfo = {\n                hostname: \"cognito-identity.eu-central-1.amazonaws.com\",\n                partition: \"aws\",\n            };\n            break;\n        case \"eu-north-1\":\n            regionInfo = {\n                hostname: \"cognito-identity.eu-north-1.amazonaws.com\",\n                partition: \"aws\",\n            };\n            break;\n        case \"eu-west-1\":\n            regionInfo = {\n                hostname: \"cognito-identity.eu-west-1.amazonaws.com\",\n                partition: \"aws\",\n            };\n            break;\n        case \"eu-west-2\":\n            regionInfo = {\n                hostname: \"cognito-identity.eu-west-2.amazonaws.com\",\n                partition: \"aws\",\n            };\n            break;\n        case \"eu-west-3\":\n            regionInfo = {\n                hostname: \"cognito-identity.eu-west-3.amazonaws.com\",\n                partition: \"aws\",\n            };\n            break;\n        case \"fips-us-east-1\":\n            regionInfo = {\n                hostname: \"cognito-identity-fips.us-east-1.amazonaws.com\",\n                partition: \"aws\",\n                signingRegion: \"us-east-1\",\n            };\n            break;\n        case \"fips-us-east-2\":\n            regionInfo = {\n                hostname: \"cognito-identity-fips.us-east-2.amazonaws.com\",\n                partition: \"aws\",\n                signingRegion: \"us-east-2\",\n            };\n            break;\n        case \"fips-us-gov-west-1\":\n            regionInfo = {\n                hostname: \"cognito-identity-fips.us-gov-west-1.amazonaws.com\",\n                partition: \"aws-us-gov\",\n                signingRegion: \"us-gov-west-1\",\n            };\n            break;\n        case \"fips-us-west-2\":\n            regionInfo = {\n                hostname: \"cognito-identity-fips.us-west-2.amazonaws.com\",\n                partition: \"aws\",\n                signingRegion: \"us-west-2\",\n            };\n            break;\n        case \"sa-east-1\":\n            regionInfo = {\n                hostname: \"cognito-identity.sa-east-1.amazonaws.com\",\n                partition: \"aws\",\n            };\n            break;\n        case \"us-east-1\":\n            regionInfo = {\n                hostname: \"cognito-identity.us-east-1.amazonaws.com\",\n                partition: \"aws\",\n            };\n            break;\n        case \"us-east-2\":\n            regionInfo = {\n                hostname: \"cognito-identity.us-east-2.amazonaws.com\",\n                partition: \"aws\",\n            };\n            break;\n        case \"us-gov-west-1\":\n            regionInfo = {\n                hostname: \"cognito-identity.us-gov-west-1.amazonaws.com\",\n                partition: \"aws-us-gov\",\n            };\n            break;\n        case \"us-west-1\":\n            regionInfo = {\n                hostname: \"cognito-identity.us-west-1.amazonaws.com\",\n                partition: \"aws\",\n            };\n            break;\n        case \"us-west-2\":\n            regionInfo = {\n                hostname: \"cognito-identity.us-west-2.amazonaws.com\",\n                partition: \"aws\",\n            };\n            break;\n        // Next, try to match partition endpoints.\n        default:\n            if (AWS_REGIONS.has(region)) {\n                regionInfo = {\n                    hostname: AWS_TEMPLATE.replace(\"{region}\", region),\n                    partition: \"aws\",\n                };\n            }\n            if (AWS_CN_REGIONS.has(region)) {\n                regionInfo = {\n                    hostname: AWS_CN_TEMPLATE.replace(\"{region}\", region),\n                    partition: \"aws-cn\",\n                };\n            }\n            if (AWS_ISO_REGIONS.has(region)) {\n                regionInfo = {\n                    hostname: AWS_ISO_TEMPLATE.replace(\"{region}\", region),\n                    partition: \"aws-iso\",\n                };\n            }\n            if (AWS_ISO_B_REGIONS.has(region)) {\n                regionInfo = {\n                    hostname: AWS_ISO_B_TEMPLATE.replace(\"{region}\", region),\n                    partition: \"aws-iso-b\",\n                };\n            }\n            if (AWS_US_GOV_REGIONS.has(region)) {\n                regionInfo = {\n                    hostname: AWS_US_GOV_TEMPLATE.replace(\"{region}\", region),\n                    partition: \"aws-us-gov\",\n                };\n            }\n            // Finally, assume it's an AWS partition endpoint.\n            if (regionInfo === undefined) {\n                regionInfo = {\n                    hostname: AWS_TEMPLATE.replace(\"{region}\", region),\n                    partition: \"aws\",\n                };\n            }\n    }\n    return Promise.resolve(__assign({ signingService: \"cognito-identity\" }, regionInfo));\n};\n//# sourceMappingURL=endpoints.js.map","import { defaultRegionInfoProvider } from \"./endpoints\";\nimport { parseUrl } from \"@aws-sdk/url-parser\";\n/**\n * @internal\n */\nexport var ClientSharedValues = {\n    apiVersion: \"2014-06-30\",\n    disableHostPrefix: false,\n    logger: {},\n    regionInfoProvider: defaultRegionInfoProvider,\n    serviceId: \"Cognito Identity\",\n    urlParser: parseUrl,\n};\n//# sourceMappingURL=runtimeConfig.shared.js.map","import { __assign } from \"tslib\";\nimport packageInfo from \"./package.json\";\nimport { Sha256 } from \"@aws-crypto/sha256-browser\";\nimport { FetchHttpHandler, streamCollector } from \"@aws-sdk/fetch-http-handler\";\nimport { invalidProvider } from \"@aws-sdk/invalid-dependency\";\nimport { DEFAULT_MAX_ATTEMPTS } from \"@aws-sdk/middleware-retry\";\nimport { fromBase64, toBase64 } from \"@aws-sdk/util-base64-browser\";\nimport { calculateBodyLength } from \"@aws-sdk/util-body-length-browser\";\nimport { defaultUserAgent } from \"@aws-sdk/util-user-agent-browser\";\nimport { fromUtf8, toUtf8 } from \"@aws-sdk/util-utf8-browser\";\nimport { ClientSharedValues } from \"./runtimeConfig.shared\";\n/**\n * @internal\n */\nexport var ClientDefaultValues = __assign(__assign({}, ClientSharedValues), { runtime: \"browser\", base64Decoder: fromBase64, base64Encoder: toBase64, bodyLengthChecker: calculateBodyLength, credentialDefaultProvider: function (_) { return function () { return Promise.reject(new Error(\"Credential is missing\")); }; }, defaultUserAgentProvider: defaultUserAgent({\n        serviceId: ClientSharedValues.serviceId,\n        clientVersion: packageInfo.version,\n    }), maxAttempts: DEFAULT_MAX_ATTEMPTS, region: invalidProvider(\"Region is missing\"), requestHandler: new FetchHttpHandler(), sha256: Sha256, streamCollector: streamCollector, utf8Decoder: fromUtf8, utf8Encoder: toUtf8 });\n//# sourceMappingURL=runtimeConfig.browser.js.map","import { __assign, __extends } from \"tslib\";\nimport { ClientDefaultValues as __ClientDefaultValues } from \"./runtimeConfig\";\nimport { resolveEndpointsConfig, resolveRegionConfig, } from \"@aws-sdk/config-resolver\";\nimport { getContentLengthPlugin } from \"@aws-sdk/middleware-content-length\";\nimport { getHostHeaderPlugin, resolveHostHeaderConfig, } from \"@aws-sdk/middleware-host-header\";\nimport { getLoggerPlugin } from \"@aws-sdk/middleware-logger\";\nimport { getRetryPlugin, resolveRetryConfig } from \"@aws-sdk/middleware-retry\";\nimport { resolveAwsAuthConfig } from \"@aws-sdk/middleware-signing\";\nimport { getUserAgentPlugin, resolveUserAgentConfig, } from \"@aws-sdk/middleware-user-agent\";\nimport { Client as __Client, } from \"@aws-sdk/smithy-client\";\n/**\n * <fullname>Amazon Cognito Federated Identities</fullname>\n *          <p>Amazon Cognito Federated Identities is a web service that delivers scoped temporary\n *          credentials to mobile devices and other untrusted environments. It uniquely identifies a\n *          device and supplies the user with a consistent identity over the lifetime of an\n *          application.</p>\n *          <p>Using Amazon Cognito Federated Identities, you can enable authentication with one or\n *          more third-party identity providers (Facebook, Google, or Login with Amazon) or an Amazon\n *          Cognito user pool, and you can also choose to support unauthenticated access from your app.\n *          Cognito delivers a unique identifier for each user and acts as an OpenID token provider\n *          trusted by AWS Security Token Service (STS) to access temporary, limited-privilege AWS\n *          credentials.</p>\n *          <p>For a description of the authentication flow from the Amazon Cognito Developer Guide\n *          see <a href=\"https://docs.aws.amazon.com/cognito/latest/developerguide/authentication-flow.html\">Authentication Flow</a>.</p>\n *          <p>For more information see <a href=\"https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-identity.html\">Amazon Cognito Federated Identities</a>.</p>\n */\nvar CognitoIdentityClient = /** @class */ (function (_super) {\n    __extends(CognitoIdentityClient, _super);\n    function CognitoIdentityClient(configuration) {\n        var _this = this;\n        var _config_0 = __assign(__assign({}, __ClientDefaultValues), configuration);\n        var _config_1 = resolveRegionConfig(_config_0);\n        var _config_2 = resolveEndpointsConfig(_config_1);\n        var _config_3 = resolveAwsAuthConfig(_config_2);\n        var _config_4 = resolveRetryConfig(_config_3);\n        var _config_5 = resolveHostHeaderConfig(_config_4);\n        var _config_6 = resolveUserAgentConfig(_config_5);\n        _this = _super.call(this, _config_6) || this;\n        _this.config = _config_6;\n        _this.middlewareStack.use(getRetryPlugin(_this.config));\n        _this.middlewareStack.use(getContentLengthPlugin(_this.config));\n        _this.middlewareStack.use(getHostHeaderPlugin(_this.config));\n        _this.middlewareStack.use(getLoggerPlugin(_this.config));\n        _this.middlewareStack.use(getUserAgentPlugin(_this.config));\n        return _this;\n    }\n    CognitoIdentityClient.prototype.destroy = function () {\n        _super.prototype.destroy.call(this);\n    };\n    return CognitoIdentityClient;\n}(__Client));\nexport { CognitoIdentityClient };\n//# sourceMappingURL=CognitoIdentityClient.js.map","import { __extends } from \"tslib\";\nimport { GetCredentialsForIdentityInput, GetCredentialsForIdentityResponse } from \"../models/models_0\";\nimport { deserializeAws_json1_1GetCredentialsForIdentityCommand, serializeAws_json1_1GetCredentialsForIdentityCommand, } from \"../protocols/Aws_json1_1\";\nimport { getSerdePlugin } from \"@aws-sdk/middleware-serde\";\nimport { Command as $Command } from \"@aws-sdk/smithy-client\";\n/**\n * <p>Returns credentials for the provided identity ID. Any provided logins will be\n *          validated against supported login providers. If the token is for\n *          cognito-identity.amazonaws.com, it will be passed through to AWS Security Token Service\n *          with the appropriate role for the token.</p>\n *          <p>This is a public API. You do not need any credentials to call this API.</p>\n */\nvar GetCredentialsForIdentityCommand = /** @class */ (function (_super) {\n    __extends(GetCredentialsForIdentityCommand, _super);\n    // Start section: command_properties\n    // End section: command_properties\n    function GetCredentialsForIdentityCommand(input) {\n        var _this = \n        // Start section: command_constructor\n        _super.call(this) || this;\n        _this.input = input;\n        return _this;\n        // End section: command_constructor\n    }\n    /**\n     * @internal\n     */\n    GetCredentialsForIdentityCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {\n        this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));\n        var stack = clientStack.concat(this.middlewareStack);\n        var logger = configuration.logger;\n        var clientName = \"CognitoIdentityClient\";\n        var commandName = \"GetCredentialsForIdentityCommand\";\n        var handlerExecutionContext = {\n            logger: logger,\n            clientName: clientName,\n            commandName: commandName,\n            inputFilterSensitiveLog: GetCredentialsForIdentityInput.filterSensitiveLog,\n            outputFilterSensitiveLog: GetCredentialsForIdentityResponse.filterSensitiveLog,\n        };\n        var requestHandler = configuration.requestHandler;\n        return stack.resolve(function (request) {\n            return requestHandler.handle(request.request, options || {});\n        }, handlerExecutionContext);\n    };\n    GetCredentialsForIdentityCommand.prototype.serialize = function (input, context) {\n        return serializeAws_json1_1GetCredentialsForIdentityCommand(input, context);\n    };\n    GetCredentialsForIdentityCommand.prototype.deserialize = function (output, context) {\n        return deserializeAws_json1_1GetCredentialsForIdentityCommand(output, context);\n    };\n    return GetCredentialsForIdentityCommand;\n}($Command));\nexport { GetCredentialsForIdentityCommand };\n//# sourceMappingURL=GetCredentialsForIdentityCommand.js.map","import { __extends } from \"tslib\";\nimport { GetIdInput, GetIdResponse } from \"../models/models_0\";\nimport { deserializeAws_json1_1GetIdCommand, serializeAws_json1_1GetIdCommand } from \"../protocols/Aws_json1_1\";\nimport { getSerdePlugin } from \"@aws-sdk/middleware-serde\";\nimport { Command as $Command } from \"@aws-sdk/smithy-client\";\n/**\n * <p>Generates (or retrieves) a Cognito ID. Supplying multiple logins will create an\n *          implicit linked account.</p>\n *          <p>This is a public API. You do not need any credentials to call this API.</p>\n */\nvar GetIdCommand = /** @class */ (function (_super) {\n    __extends(GetIdCommand, _super);\n    // Start section: command_properties\n    // End section: command_properties\n    function GetIdCommand(input) {\n        var _this = \n        // Start section: command_constructor\n        _super.call(this) || this;\n        _this.input = input;\n        return _this;\n        // End section: command_constructor\n    }\n    /**\n     * @internal\n     */\n    GetIdCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {\n        this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));\n        var stack = clientStack.concat(this.middlewareStack);\n        var logger = configuration.logger;\n        var clientName = \"CognitoIdentityClient\";\n        var commandName = \"GetIdCommand\";\n        var handlerExecutionContext = {\n            logger: logger,\n            clientName: clientName,\n            commandName: commandName,\n            inputFilterSensitiveLog: GetIdInput.filterSensitiveLog,\n            outputFilterSensitiveLog: GetIdResponse.filterSensitiveLog,\n        };\n        var requestHandler = configuration.requestHandler;\n        return stack.resolve(function (request) {\n            return requestHandler.handle(request.request, options || {});\n        }, handlerExecutionContext);\n    };\n    GetIdCommand.prototype.serialize = function (input, context) {\n        return serializeAws_json1_1GetIdCommand(input, context);\n    };\n    GetIdCommand.prototype.deserialize = function (output, context) {\n        return deserializeAws_json1_1GetIdCommand(output, context);\n    };\n    return GetIdCommand;\n}($Command));\nexport { GetIdCommand };\n//# sourceMappingURL=GetIdCommand.js.map","import { __assign } from \"tslib\";\nexport var AmbiguousRoleResolutionType;\n(function (AmbiguousRoleResolutionType) {\n    AmbiguousRoleResolutionType[\"AUTHENTICATED_ROLE\"] = \"AuthenticatedRole\";\n    AmbiguousRoleResolutionType[\"DENY\"] = \"Deny\";\n})(AmbiguousRoleResolutionType || (AmbiguousRoleResolutionType = {}));\nexport var CognitoIdentityProvider;\n(function (CognitoIdentityProvider) {\n    CognitoIdentityProvider.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(CognitoIdentityProvider || (CognitoIdentityProvider = {}));\nexport var CreateIdentityPoolInput;\n(function (CreateIdentityPoolInput) {\n    CreateIdentityPoolInput.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(CreateIdentityPoolInput || (CreateIdentityPoolInput = {}));\nexport var IdentityPool;\n(function (IdentityPool) {\n    IdentityPool.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(IdentityPool || (IdentityPool = {}));\nexport var InternalErrorException;\n(function (InternalErrorException) {\n    InternalErrorException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(InternalErrorException || (InternalErrorException = {}));\nexport var InvalidParameterException;\n(function (InvalidParameterException) {\n    InvalidParameterException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(InvalidParameterException || (InvalidParameterException = {}));\nexport var LimitExceededException;\n(function (LimitExceededException) {\n    LimitExceededException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(LimitExceededException || (LimitExceededException = {}));\nexport var NotAuthorizedException;\n(function (NotAuthorizedException) {\n    NotAuthorizedException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(NotAuthorizedException || (NotAuthorizedException = {}));\nexport var ResourceConflictException;\n(function (ResourceConflictException) {\n    ResourceConflictException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(ResourceConflictException || (ResourceConflictException = {}));\nexport var TooManyRequestsException;\n(function (TooManyRequestsException) {\n    TooManyRequestsException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(TooManyRequestsException || (TooManyRequestsException = {}));\nexport var DeleteIdentitiesInput;\n(function (DeleteIdentitiesInput) {\n    DeleteIdentitiesInput.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(DeleteIdentitiesInput || (DeleteIdentitiesInput = {}));\nexport var ErrorCode;\n(function (ErrorCode) {\n    ErrorCode[\"ACCESS_DENIED\"] = \"AccessDenied\";\n    ErrorCode[\"INTERNAL_SERVER_ERROR\"] = \"InternalServerError\";\n})(ErrorCode || (ErrorCode = {}));\nexport var UnprocessedIdentityId;\n(function (UnprocessedIdentityId) {\n    UnprocessedIdentityId.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(UnprocessedIdentityId || (UnprocessedIdentityId = {}));\nexport var DeleteIdentitiesResponse;\n(function (DeleteIdentitiesResponse) {\n    DeleteIdentitiesResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(DeleteIdentitiesResponse || (DeleteIdentitiesResponse = {}));\nexport var DeleteIdentityPoolInput;\n(function (DeleteIdentityPoolInput) {\n    DeleteIdentityPoolInput.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(DeleteIdentityPoolInput || (DeleteIdentityPoolInput = {}));\nexport var ResourceNotFoundException;\n(function (ResourceNotFoundException) {\n    ResourceNotFoundException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(ResourceNotFoundException || (ResourceNotFoundException = {}));\nexport var DescribeIdentityInput;\n(function (DescribeIdentityInput) {\n    DescribeIdentityInput.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(DescribeIdentityInput || (DescribeIdentityInput = {}));\nexport var IdentityDescription;\n(function (IdentityDescription) {\n    IdentityDescription.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(IdentityDescription || (IdentityDescription = {}));\nexport var DescribeIdentityPoolInput;\n(function (DescribeIdentityPoolInput) {\n    DescribeIdentityPoolInput.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(DescribeIdentityPoolInput || (DescribeIdentityPoolInput = {}));\nexport var ExternalServiceException;\n(function (ExternalServiceException) {\n    ExternalServiceException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(ExternalServiceException || (ExternalServiceException = {}));\nexport var GetCredentialsForIdentityInput;\n(function (GetCredentialsForIdentityInput) {\n    GetCredentialsForIdentityInput.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(GetCredentialsForIdentityInput || (GetCredentialsForIdentityInput = {}));\nexport var Credentials;\n(function (Credentials) {\n    Credentials.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(Credentials || (Credentials = {}));\nexport var GetCredentialsForIdentityResponse;\n(function (GetCredentialsForIdentityResponse) {\n    GetCredentialsForIdentityResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(GetCredentialsForIdentityResponse || (GetCredentialsForIdentityResponse = {}));\nexport var InvalidIdentityPoolConfigurationException;\n(function (InvalidIdentityPoolConfigurationException) {\n    InvalidIdentityPoolConfigurationException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(InvalidIdentityPoolConfigurationException || (InvalidIdentityPoolConfigurationException = {}));\nexport var GetIdInput;\n(function (GetIdInput) {\n    GetIdInput.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(GetIdInput || (GetIdInput = {}));\nexport var GetIdResponse;\n(function (GetIdResponse) {\n    GetIdResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(GetIdResponse || (GetIdResponse = {}));\nexport var GetIdentityPoolRolesInput;\n(function (GetIdentityPoolRolesInput) {\n    GetIdentityPoolRolesInput.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(GetIdentityPoolRolesInput || (GetIdentityPoolRolesInput = {}));\nexport var MappingRuleMatchType;\n(function (MappingRuleMatchType) {\n    MappingRuleMatchType[\"CONTAINS\"] = \"Contains\";\n    MappingRuleMatchType[\"EQUALS\"] = \"Equals\";\n    MappingRuleMatchType[\"NOT_EQUAL\"] = \"NotEqual\";\n    MappingRuleMatchType[\"STARTS_WITH\"] = \"StartsWith\";\n})(MappingRuleMatchType || (MappingRuleMatchType = {}));\nexport var MappingRule;\n(function (MappingRule) {\n    MappingRule.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(MappingRule || (MappingRule = {}));\nexport var RulesConfigurationType;\n(function (RulesConfigurationType) {\n    RulesConfigurationType.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(RulesConfigurationType || (RulesConfigurationType = {}));\nexport var RoleMappingType;\n(function (RoleMappingType) {\n    RoleMappingType[\"RULES\"] = \"Rules\";\n    RoleMappingType[\"TOKEN\"] = \"Token\";\n})(RoleMappingType || (RoleMappingType = {}));\nexport var RoleMapping;\n(function (RoleMapping) {\n    RoleMapping.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(RoleMapping || (RoleMapping = {}));\nexport var GetIdentityPoolRolesResponse;\n(function (GetIdentityPoolRolesResponse) {\n    GetIdentityPoolRolesResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(GetIdentityPoolRolesResponse || (GetIdentityPoolRolesResponse = {}));\nexport var GetOpenIdTokenInput;\n(function (GetOpenIdTokenInput) {\n    GetOpenIdTokenInput.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(GetOpenIdTokenInput || (GetOpenIdTokenInput = {}));\nexport var GetOpenIdTokenResponse;\n(function (GetOpenIdTokenResponse) {\n    GetOpenIdTokenResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(GetOpenIdTokenResponse || (GetOpenIdTokenResponse = {}));\nexport var DeveloperUserAlreadyRegisteredException;\n(function (DeveloperUserAlreadyRegisteredException) {\n    DeveloperUserAlreadyRegisteredException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(DeveloperUserAlreadyRegisteredException || (DeveloperUserAlreadyRegisteredException = {}));\nexport var GetOpenIdTokenForDeveloperIdentityInput;\n(function (GetOpenIdTokenForDeveloperIdentityInput) {\n    GetOpenIdTokenForDeveloperIdentityInput.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(GetOpenIdTokenForDeveloperIdentityInput || (GetOpenIdTokenForDeveloperIdentityInput = {}));\nexport var GetOpenIdTokenForDeveloperIdentityResponse;\n(function (GetOpenIdTokenForDeveloperIdentityResponse) {\n    GetOpenIdTokenForDeveloperIdentityResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(GetOpenIdTokenForDeveloperIdentityResponse || (GetOpenIdTokenForDeveloperIdentityResponse = {}));\nexport var ListIdentitiesInput;\n(function (ListIdentitiesInput) {\n    ListIdentitiesInput.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(ListIdentitiesInput || (ListIdentitiesInput = {}));\nexport var ListIdentitiesResponse;\n(function (ListIdentitiesResponse) {\n    ListIdentitiesResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(ListIdentitiesResponse || (ListIdentitiesResponse = {}));\nexport var ListIdentityPoolsInput;\n(function (ListIdentityPoolsInput) {\n    ListIdentityPoolsInput.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(ListIdentityPoolsInput || (ListIdentityPoolsInput = {}));\nexport var IdentityPoolShortDescription;\n(function (IdentityPoolShortDescription) {\n    IdentityPoolShortDescription.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(IdentityPoolShortDescription || (IdentityPoolShortDescription = {}));\nexport var ListIdentityPoolsResponse;\n(function (ListIdentityPoolsResponse) {\n    ListIdentityPoolsResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(ListIdentityPoolsResponse || (ListIdentityPoolsResponse = {}));\nexport var ListTagsForResourceInput;\n(function (ListTagsForResourceInput) {\n    ListTagsForResourceInput.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(ListTagsForResourceInput || (ListTagsForResourceInput = {}));\nexport var ListTagsForResourceResponse;\n(function (ListTagsForResourceResponse) {\n    ListTagsForResourceResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(ListTagsForResourceResponse || (ListTagsForResourceResponse = {}));\nexport var LookupDeveloperIdentityInput;\n(function (LookupDeveloperIdentityInput) {\n    LookupDeveloperIdentityInput.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(LookupDeveloperIdentityInput || (LookupDeveloperIdentityInput = {}));\nexport var LookupDeveloperIdentityResponse;\n(function (LookupDeveloperIdentityResponse) {\n    LookupDeveloperIdentityResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(LookupDeveloperIdentityResponse || (LookupDeveloperIdentityResponse = {}));\nexport var MergeDeveloperIdentitiesInput;\n(function (MergeDeveloperIdentitiesInput) {\n    MergeDeveloperIdentitiesInput.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(MergeDeveloperIdentitiesInput || (MergeDeveloperIdentitiesInput = {}));\nexport var MergeDeveloperIdentitiesResponse;\n(function (MergeDeveloperIdentitiesResponse) {\n    MergeDeveloperIdentitiesResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(MergeDeveloperIdentitiesResponse || (MergeDeveloperIdentitiesResponse = {}));\nexport var ConcurrentModificationException;\n(function (ConcurrentModificationException) {\n    ConcurrentModificationException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(ConcurrentModificationException || (ConcurrentModificationException = {}));\nexport var SetIdentityPoolRolesInput;\n(function (SetIdentityPoolRolesInput) {\n    SetIdentityPoolRolesInput.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(SetIdentityPoolRolesInput || (SetIdentityPoolRolesInput = {}));\nexport var TagResourceInput;\n(function (TagResourceInput) {\n    TagResourceInput.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(TagResourceInput || (TagResourceInput = {}));\nexport var TagResourceResponse;\n(function (TagResourceResponse) {\n    TagResourceResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(TagResourceResponse || (TagResourceResponse = {}));\nexport var UnlinkDeveloperIdentityInput;\n(function (UnlinkDeveloperIdentityInput) {\n    UnlinkDeveloperIdentityInput.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(UnlinkDeveloperIdentityInput || (UnlinkDeveloperIdentityInput = {}));\nexport var UnlinkIdentityInput;\n(function (UnlinkIdentityInput) {\n    UnlinkIdentityInput.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(UnlinkIdentityInput || (UnlinkIdentityInput = {}));\nexport var UntagResourceInput;\n(function (UntagResourceInput) {\n    UntagResourceInput.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(UntagResourceInput || (UntagResourceInput = {}));\nexport var UntagResourceResponse;\n(function (UntagResourceResponse) {\n    UntagResourceResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };\n})(UntagResourceResponse || (UntagResourceResponse = {}));\n//# sourceMappingURL=models_0.js.map","import { __assign, __awaiter, __generator, __read } from \"tslib\";\nimport { HttpRequest as __HttpRequest } from \"@aws-sdk/protocol-http\";\nexport var serializeAws_json1_1CreateIdentityPoolCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var headers, body;\n    return __generator(this, function (_a) {\n        headers = {\n            \"content-type\": \"application/x-amz-json-1.1\",\n            \"x-amz-target\": \"AWSCognitoIdentityService.CreateIdentityPool\",\n        };\n        body = JSON.stringify(serializeAws_json1_1CreateIdentityPoolInput(input, context));\n        return [2 /*return*/, buildHttpRpcRequest(context, headers, \"/\", undefined, body)];\n    });\n}); };\nexport var serializeAws_json1_1DeleteIdentitiesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var headers, body;\n    return __generator(this, function (_a) {\n        headers = {\n            \"content-type\": \"application/x-amz-json-1.1\",\n            \"x-amz-target\": \"AWSCognitoIdentityService.DeleteIdentities\",\n        };\n        body = JSON.stringify(serializeAws_json1_1DeleteIdentitiesInput(input, context));\n        return [2 /*return*/, buildHttpRpcRequest(context, headers, \"/\", undefined, body)];\n    });\n}); };\nexport var serializeAws_json1_1DeleteIdentityPoolCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var headers, body;\n    return __generator(this, function (_a) {\n        headers = {\n            \"content-type\": \"application/x-amz-json-1.1\",\n            \"x-amz-target\": \"AWSCognitoIdentityService.DeleteIdentityPool\",\n        };\n        body = JSON.stringify(serializeAws_json1_1DeleteIdentityPoolInput(input, context));\n        return [2 /*return*/, buildHttpRpcRequest(context, headers, \"/\", undefined, body)];\n    });\n}); };\nexport var serializeAws_json1_1DescribeIdentityCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var headers, body;\n    return __generator(this, function (_a) {\n        headers = {\n            \"content-type\": \"application/x-amz-json-1.1\",\n            \"x-amz-target\": \"AWSCognitoIdentityService.DescribeIdentity\",\n        };\n        body = JSON.stringify(serializeAws_json1_1DescribeIdentityInput(input, context));\n        return [2 /*return*/, buildHttpRpcRequest(context, headers, \"/\", undefined, body)];\n    });\n}); };\nexport var serializeAws_json1_1DescribeIdentityPoolCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var headers, body;\n    return __generator(this, function (_a) {\n        headers = {\n            \"content-type\": \"application/x-amz-json-1.1\",\n            \"x-amz-target\": \"AWSCognitoIdentityService.DescribeIdentityPool\",\n        };\n        body = JSON.stringify(serializeAws_json1_1DescribeIdentityPoolInput(input, context));\n        return [2 /*return*/, buildHttpRpcRequest(context, headers, \"/\", undefined, body)];\n    });\n}); };\nexport var serializeAws_json1_1GetCredentialsForIdentityCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var headers, body;\n    return __generator(this, function (_a) {\n        headers = {\n            \"content-type\": \"application/x-amz-json-1.1\",\n            \"x-amz-target\": \"AWSCognitoIdentityService.GetCredentialsForIdentity\",\n        };\n        body = JSON.stringify(serializeAws_json1_1GetCredentialsForIdentityInput(input, context));\n        return [2 /*return*/, buildHttpRpcRequest(context, headers, \"/\", undefined, body)];\n    });\n}); };\nexport var serializeAws_json1_1GetIdCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var headers, body;\n    return __generator(this, function (_a) {\n        headers = {\n            \"content-type\": \"application/x-amz-json-1.1\",\n            \"x-amz-target\": \"AWSCognitoIdentityService.GetId\",\n        };\n        body = JSON.stringify(serializeAws_json1_1GetIdInput(input, context));\n        return [2 /*return*/, buildHttpRpcRequest(context, headers, \"/\", undefined, body)];\n    });\n}); };\nexport var serializeAws_json1_1GetIdentityPoolRolesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var headers, body;\n    return __generator(this, function (_a) {\n        headers = {\n            \"content-type\": \"application/x-amz-json-1.1\",\n            \"x-amz-target\": \"AWSCognitoIdentityService.GetIdentityPoolRoles\",\n        };\n        body = JSON.stringify(serializeAws_json1_1GetIdentityPoolRolesInput(input, context));\n        return [2 /*return*/, buildHttpRpcRequest(context, headers, \"/\", undefined, body)];\n    });\n}); };\nexport var serializeAws_json1_1GetOpenIdTokenCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var headers, body;\n    return __generator(this, function (_a) {\n        headers = {\n            \"content-type\": \"application/x-amz-json-1.1\",\n            \"x-amz-target\": \"AWSCognitoIdentityService.GetOpenIdToken\",\n        };\n        body = JSON.stringify(serializeAws_json1_1GetOpenIdTokenInput(input, context));\n        return [2 /*return*/, buildHttpRpcRequest(context, headers, \"/\", undefined, body)];\n    });\n}); };\nexport var serializeAws_json1_1GetOpenIdTokenForDeveloperIdentityCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var headers, body;\n    return __generator(this, function (_a) {\n        headers = {\n            \"content-type\": \"application/x-amz-json-1.1\",\n            \"x-amz-target\": \"AWSCognitoIdentityService.GetOpenIdTokenForDeveloperIdentity\",\n        };\n        body = JSON.stringify(serializeAws_json1_1GetOpenIdTokenForDeveloperIdentityInput(input, context));\n        return [2 /*return*/, buildHttpRpcRequest(context, headers, \"/\", undefined, body)];\n    });\n}); };\nexport var serializeAws_json1_1ListIdentitiesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var headers, body;\n    return __generator(this, function (_a) {\n        headers = {\n            \"content-type\": \"application/x-amz-json-1.1\",\n            \"x-amz-target\": \"AWSCognitoIdentityService.ListIdentities\",\n        };\n        body = JSON.stringify(serializeAws_json1_1ListIdentitiesInput(input, context));\n        return [2 /*return*/, buildHttpRpcRequest(context, headers, \"/\", undefined, body)];\n    });\n}); };\nexport var serializeAws_json1_1ListIdentityPoolsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var headers, body;\n    return __generator(this, function (_a) {\n        headers = {\n            \"content-type\": \"application/x-amz-json-1.1\",\n            \"x-amz-target\": \"AWSCognitoIdentityService.ListIdentityPools\",\n        };\n        body = JSON.stringify(serializeAws_json1_1ListIdentityPoolsInput(input, context));\n        return [2 /*return*/, buildHttpRpcRequest(context, headers, \"/\", undefined, body)];\n    });\n}); };\nexport var serializeAws_json1_1ListTagsForResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var headers, body;\n    return __generator(this, function (_a) {\n        headers = {\n            \"content-type\": \"application/x-amz-json-1.1\",\n            \"x-amz-target\": \"AWSCognitoIdentityService.ListTagsForResource\",\n        };\n        body = JSON.stringify(serializeAws_json1_1ListTagsForResourceInput(input, context));\n        return [2 /*return*/, buildHttpRpcRequest(context, headers, \"/\", undefined, body)];\n    });\n}); };\nexport var serializeAws_json1_1LookupDeveloperIdentityCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var headers, body;\n    return __generator(this, function (_a) {\n        headers = {\n            \"content-type\": \"application/x-amz-json-1.1\",\n            \"x-amz-target\": \"AWSCognitoIdentityService.LookupDeveloperIdentity\",\n        };\n        body = JSON.stringify(serializeAws_json1_1LookupDeveloperIdentityInput(input, context));\n        return [2 /*return*/, buildHttpRpcRequest(context, headers, \"/\", undefined, body)];\n    });\n}); };\nexport var serializeAws_json1_1MergeDeveloperIdentitiesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var headers, body;\n    return __generator(this, function (_a) {\n        headers = {\n            \"content-type\": \"application/x-amz-json-1.1\",\n            \"x-amz-target\": \"AWSCognitoIdentityService.MergeDeveloperIdentities\",\n        };\n        body = JSON.stringify(serializeAws_json1_1MergeDeveloperIdentitiesInput(input, context));\n        return [2 /*return*/, buildHttpRpcRequest(context, headers, \"/\", undefined, body)];\n    });\n}); };\nexport var serializeAws_json1_1SetIdentityPoolRolesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var headers, body;\n    return __generator(this, function (_a) {\n        headers = {\n            \"content-type\": \"application/x-amz-json-1.1\",\n            \"x-amz-target\": \"AWSCognitoIdentityService.SetIdentityPoolRoles\",\n        };\n        body = JSON.stringify(serializeAws_json1_1SetIdentityPoolRolesInput(input, context));\n        return [2 /*return*/, buildHttpRpcRequest(context, headers, \"/\", undefined, body)];\n    });\n}); };\nexport var serializeAws_json1_1TagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var headers, body;\n    return __generator(this, function (_a) {\n        headers = {\n            \"content-type\": \"application/x-amz-json-1.1\",\n            \"x-amz-target\": \"AWSCognitoIdentityService.TagResource\",\n        };\n        body = JSON.stringify(serializeAws_json1_1TagResourceInput(input, context));\n        return [2 /*return*/, buildHttpRpcRequest(context, headers, \"/\", undefined, body)];\n    });\n}); };\nexport var serializeAws_json1_1UnlinkDeveloperIdentityCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var headers, body;\n    return __generator(this, function (_a) {\n        headers = {\n            \"content-type\": \"application/x-amz-json-1.1\",\n            \"x-amz-target\": \"AWSCognitoIdentityService.UnlinkDeveloperIdentity\",\n        };\n        body = JSON.stringify(serializeAws_json1_1UnlinkDeveloperIdentityInput(input, context));\n        return [2 /*return*/, buildHttpRpcRequest(context, headers, \"/\", undefined, body)];\n    });\n}); };\nexport var serializeAws_json1_1UnlinkIdentityCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var headers, body;\n    return __generator(this, function (_a) {\n        headers = {\n            \"content-type\": \"application/x-amz-json-1.1\",\n            \"x-amz-target\": \"AWSCognitoIdentityService.UnlinkIdentity\",\n        };\n        body = JSON.stringify(serializeAws_json1_1UnlinkIdentityInput(input, context));\n        return [2 /*return*/, buildHttpRpcRequest(context, headers, \"/\", undefined, body)];\n    });\n}); };\nexport var serializeAws_json1_1UntagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var headers, body;\n    return __generator(this, function (_a) {\n        headers = {\n            \"content-type\": \"application/x-amz-json-1.1\",\n            \"x-amz-target\": \"AWSCognitoIdentityService.UntagResource\",\n        };\n        body = JSON.stringify(serializeAws_json1_1UntagResourceInput(input, context));\n        return [2 /*return*/, buildHttpRpcRequest(context, headers, \"/\", undefined, body)];\n    });\n}); };\nexport var serializeAws_json1_1UpdateIdentityPoolCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var headers, body;\n    return __generator(this, function (_a) {\n        headers = {\n            \"content-type\": \"application/x-amz-json-1.1\",\n            \"x-amz-target\": \"AWSCognitoIdentityService.UpdateIdentityPool\",\n        };\n        body = JSON.stringify(serializeAws_json1_1IdentityPool(input, context));\n        return [2 /*return*/, buildHttpRpcRequest(context, headers, \"/\", undefined, body)];\n    });\n}); };\nexport var deserializeAws_json1_1CreateIdentityPoolCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var data, contents, response;\n    return __generator(this, function (_a) {\n        switch (_a.label) {\n            case 0:\n                if (output.statusCode >= 300) {\n                    return [2 /*return*/, deserializeAws_json1_1CreateIdentityPoolCommandError(output, context)];\n                }\n                return [4 /*yield*/, parseBody(output.body, context)];\n            case 1:\n                data = _a.sent();\n                contents = {};\n                contents = deserializeAws_json1_1IdentityPool(data, context);\n                response = __assign({ $metadata: deserializeMetadata(output) }, contents);\n                return [2 /*return*/, Promise.resolve(response)];\n        }\n    });\n}); };\nvar deserializeAws_json1_1CreateIdentityPoolCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, parsedBody, message;\n    var _j;\n    return __generator(this, function (_k) {\n        switch (_k.label) {\n            case 0:\n                _a = [__assign({}, output)];\n                _j = {};\n                return [4 /*yield*/, parseBody(output.body, context)];\n            case 1:\n                parsedOutput = __assign.apply(void 0, _a.concat([(_j.body = _k.sent(), _j)]));\n                errorCode = \"UnknownError\";\n                errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n                _b = errorCode;\n                switch (_b) {\n                    case \"InternalErrorException\": return [3 /*break*/, 2];\n                    case \"com.amazonaws.cognitoidentity#InternalErrorException\": return [3 /*break*/, 2];\n                    case \"InvalidParameterException\": return [3 /*break*/, 4];\n                    case \"com.amazonaws.cognitoidentity#InvalidParameterException\": return [3 /*break*/, 4];\n                    case \"LimitExceededException\": return [3 /*break*/, 6];\n                    case \"com.amazonaws.cognitoidentity#LimitExceededException\": return [3 /*break*/, 6];\n                    case \"NotAuthorizedException\": return [3 /*break*/, 8];\n                    case \"com.amazonaws.cognitoidentity#NotAuthorizedException\": return [3 /*break*/, 8];\n                    case \"ResourceConflictException\": return [3 /*break*/, 10];\n                    case \"com.amazonaws.cognitoidentity#ResourceConflictException\": return [3 /*break*/, 10];\n                    case \"TooManyRequestsException\": return [3 /*break*/, 12];\n                    case \"com.amazonaws.cognitoidentity#TooManyRequestsException\": return [3 /*break*/, 12];\n                }\n                return [3 /*break*/, 14];\n            case 2:\n                _c = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)];\n            case 3:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 15];\n            case 4:\n                _d = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];\n            case 5:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 15];\n            case 6:\n                _e = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)];\n            case 7:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 15];\n            case 8:\n                _f = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)];\n            case 9:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 15];\n            case 10:\n                _g = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1ResourceConflictExceptionResponse(parsedOutput, context)];\n            case 11:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 15];\n            case 12:\n                _h = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];\n            case 13:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 15];\n            case 14:\n                parsedBody = parsedOutput.body;\n                errorCode = parsedBody.code || parsedBody.Code || errorCode;\n                response = __assign(__assign({}, parsedBody), { name: \"\" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: \"client\", $metadata: deserializeMetadata(output) });\n                _k.label = 15;\n            case 15:\n                message = response.message || response.Message || errorCode;\n                response.message = message;\n                delete response.Message;\n                return [2 /*return*/, Promise.reject(Object.assign(new Error(message), response))];\n        }\n    });\n}); };\nexport var deserializeAws_json1_1DeleteIdentitiesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var data, contents, response;\n    return __generator(this, function (_a) {\n        switch (_a.label) {\n            case 0:\n                if (output.statusCode >= 300) {\n                    return [2 /*return*/, deserializeAws_json1_1DeleteIdentitiesCommandError(output, context)];\n                }\n                return [4 /*yield*/, parseBody(output.body, context)];\n            case 1:\n                data = _a.sent();\n                contents = {};\n                contents = deserializeAws_json1_1DeleteIdentitiesResponse(data, context);\n                response = __assign({ $metadata: deserializeMetadata(output) }, contents);\n                return [2 /*return*/, Promise.resolve(response)];\n        }\n    });\n}); };\nvar deserializeAws_json1_1DeleteIdentitiesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, parsedBody, message;\n    var _f;\n    return __generator(this, function (_g) {\n        switch (_g.label) {\n            case 0:\n                _a = [__assign({}, output)];\n                _f = {};\n                return [4 /*yield*/, parseBody(output.body, context)];\n            case 1:\n                parsedOutput = __assign.apply(void 0, _a.concat([(_f.body = _g.sent(), _f)]));\n                errorCode = \"UnknownError\";\n                errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n                _b = errorCode;\n                switch (_b) {\n                    case \"InternalErrorException\": return [3 /*break*/, 2];\n                    case \"com.amazonaws.cognitoidentity#InternalErrorException\": return [3 /*break*/, 2];\n                    case \"InvalidParameterException\": return [3 /*break*/, 4];\n                    case \"com.amazonaws.cognitoidentity#InvalidParameterException\": return [3 /*break*/, 4];\n                    case \"TooManyRequestsException\": return [3 /*break*/, 6];\n                    case \"com.amazonaws.cognitoidentity#TooManyRequestsException\": return [3 /*break*/, 6];\n                }\n                return [3 /*break*/, 8];\n            case 2:\n                _c = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)];\n            case 3:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 9];\n            case 4:\n                _d = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];\n            case 5:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 9];\n            case 6:\n                _e = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];\n            case 7:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 9];\n            case 8:\n                parsedBody = parsedOutput.body;\n                errorCode = parsedBody.code || parsedBody.Code || errorCode;\n                response = __assign(__assign({}, parsedBody), { name: \"\" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: \"client\", $metadata: deserializeMetadata(output) });\n                _g.label = 9;\n            case 9:\n                message = response.message || response.Message || errorCode;\n                response.message = message;\n                delete response.Message;\n                return [2 /*return*/, Promise.reject(Object.assign(new Error(message), response))];\n        }\n    });\n}); };\nexport var deserializeAws_json1_1DeleteIdentityPoolCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var response;\n    return __generator(this, function (_a) {\n        switch (_a.label) {\n            case 0:\n                if (output.statusCode >= 300) {\n                    return [2 /*return*/, deserializeAws_json1_1DeleteIdentityPoolCommandError(output, context)];\n                }\n                return [4 /*yield*/, collectBody(output.body, context)];\n            case 1:\n                _a.sent();\n                response = {\n                    $metadata: deserializeMetadata(output),\n                };\n                return [2 /*return*/, Promise.resolve(response)];\n        }\n    });\n}); };\nvar deserializeAws_json1_1DeleteIdentityPoolCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;\n    var _h;\n    return __generator(this, function (_j) {\n        switch (_j.label) {\n            case 0:\n                _a = [__assign({}, output)];\n                _h = {};\n                return [4 /*yield*/, parseBody(output.body, context)];\n            case 1:\n                parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));\n                errorCode = \"UnknownError\";\n                errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n                _b = errorCode;\n                switch (_b) {\n                    case \"InternalErrorException\": return [3 /*break*/, 2];\n                    case \"com.amazonaws.cognitoidentity#InternalErrorException\": return [3 /*break*/, 2];\n                    case \"InvalidParameterException\": return [3 /*break*/, 4];\n                    case \"com.amazonaws.cognitoidentity#InvalidParameterException\": return [3 /*break*/, 4];\n                    case \"NotAuthorizedException\": return [3 /*break*/, 6];\n                    case \"com.amazonaws.cognitoidentity#NotAuthorizedException\": return [3 /*break*/, 6];\n                    case \"ResourceNotFoundException\": return [3 /*break*/, 8];\n                    case \"com.amazonaws.cognitoidentity#ResourceNotFoundException\": return [3 /*break*/, 8];\n                    case \"TooManyRequestsException\": return [3 /*break*/, 10];\n                    case \"com.amazonaws.cognitoidentity#TooManyRequestsException\": return [3 /*break*/, 10];\n                }\n                return [3 /*break*/, 12];\n            case 2:\n                _c = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)];\n            case 3:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 13];\n            case 4:\n                _d = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];\n            case 5:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 13];\n            case 6:\n                _e = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)];\n            case 7:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 13];\n            case 8:\n                _f = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];\n            case 9:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 13];\n            case 10:\n                _g = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];\n            case 11:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 13];\n            case 12:\n                parsedBody = parsedOutput.body;\n                errorCode = parsedBody.code || parsedBody.Code || errorCode;\n                response = __assign(__assign({}, parsedBody), { name: \"\" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: \"client\", $metadata: deserializeMetadata(output) });\n                _j.label = 13;\n            case 13:\n                message = response.message || response.Message || errorCode;\n                response.message = message;\n                delete response.Message;\n                return [2 /*return*/, Promise.reject(Object.assign(new Error(message), response))];\n        }\n    });\n}); };\nexport var deserializeAws_json1_1DescribeIdentityCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var data, contents, response;\n    return __generator(this, function (_a) {\n        switch (_a.label) {\n            case 0:\n                if (output.statusCode >= 300) {\n                    return [2 /*return*/, deserializeAws_json1_1DescribeIdentityCommandError(output, context)];\n                }\n                return [4 /*yield*/, parseBody(output.body, context)];\n            case 1:\n                data = _a.sent();\n                contents = {};\n                contents = deserializeAws_json1_1IdentityDescription(data, context);\n                response = __assign({ $metadata: deserializeMetadata(output) }, contents);\n                return [2 /*return*/, Promise.resolve(response)];\n        }\n    });\n}); };\nvar deserializeAws_json1_1DescribeIdentityCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;\n    var _h;\n    return __generator(this, function (_j) {\n        switch (_j.label) {\n            case 0:\n                _a = [__assign({}, output)];\n                _h = {};\n                return [4 /*yield*/, parseBody(output.body, context)];\n            case 1:\n                parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));\n                errorCode = \"UnknownError\";\n                errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n                _b = errorCode;\n                switch (_b) {\n                    case \"InternalErrorException\": return [3 /*break*/, 2];\n                    case \"com.amazonaws.cognitoidentity#InternalErrorException\": return [3 /*break*/, 2];\n                    case \"InvalidParameterException\": return [3 /*break*/, 4];\n                    case \"com.amazonaws.cognitoidentity#InvalidParameterException\": return [3 /*break*/, 4];\n                    case \"NotAuthorizedException\": return [3 /*break*/, 6];\n                    case \"com.amazonaws.cognitoidentity#NotAuthorizedException\": return [3 /*break*/, 6];\n                    case \"ResourceNotFoundException\": return [3 /*break*/, 8];\n                    case \"com.amazonaws.cognitoidentity#ResourceNotFoundException\": return [3 /*break*/, 8];\n                    case \"TooManyRequestsException\": return [3 /*break*/, 10];\n                    case \"com.amazonaws.cognitoidentity#TooManyRequestsException\": return [3 /*break*/, 10];\n                }\n                return [3 /*break*/, 12];\n            case 2:\n                _c = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)];\n            case 3:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 13];\n            case 4:\n                _d = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];\n            case 5:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 13];\n            case 6:\n                _e = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)];\n            case 7:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 13];\n            case 8:\n                _f = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];\n            case 9:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 13];\n            case 10:\n                _g = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];\n            case 11:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 13];\n            case 12:\n                parsedBody = parsedOutput.body;\n                errorCode = parsedBody.code || parsedBody.Code || errorCode;\n                response = __assign(__assign({}, parsedBody), { name: \"\" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: \"client\", $metadata: deserializeMetadata(output) });\n                _j.label = 13;\n            case 13:\n                message = response.message || response.Message || errorCode;\n                response.message = message;\n                delete response.Message;\n                return [2 /*return*/, Promise.reject(Object.assign(new Error(message), response))];\n        }\n    });\n}); };\nexport var deserializeAws_json1_1DescribeIdentityPoolCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var data, contents, response;\n    return __generator(this, function (_a) {\n        switch (_a.label) {\n            case 0:\n                if (output.statusCode >= 300) {\n                    return [2 /*return*/, deserializeAws_json1_1DescribeIdentityPoolCommandError(output, context)];\n                }\n                return [4 /*yield*/, parseBody(output.body, context)];\n            case 1:\n                data = _a.sent();\n                contents = {};\n                contents = deserializeAws_json1_1IdentityPool(data, context);\n                response = __assign({ $metadata: deserializeMetadata(output) }, contents);\n                return [2 /*return*/, Promise.resolve(response)];\n        }\n    });\n}); };\nvar deserializeAws_json1_1DescribeIdentityPoolCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;\n    var _h;\n    return __generator(this, function (_j) {\n        switch (_j.label) {\n            case 0:\n                _a = [__assign({}, output)];\n                _h = {};\n                return [4 /*yield*/, parseBody(output.body, context)];\n            case 1:\n                parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));\n                errorCode = \"UnknownError\";\n                errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n                _b = errorCode;\n                switch (_b) {\n                    case \"InternalErrorException\": return [3 /*break*/, 2];\n                    case \"com.amazonaws.cognitoidentity#InternalErrorException\": return [3 /*break*/, 2];\n                    case \"InvalidParameterException\": return [3 /*break*/, 4];\n                    case \"com.amazonaws.cognitoidentity#InvalidParameterException\": return [3 /*break*/, 4];\n                    case \"NotAuthorizedException\": return [3 /*break*/, 6];\n                    case \"com.amazonaws.cognitoidentity#NotAuthorizedException\": return [3 /*break*/, 6];\n                    case \"ResourceNotFoundException\": return [3 /*break*/, 8];\n                    case \"com.amazonaws.cognitoidentity#ResourceNotFoundException\": return [3 /*break*/, 8];\n                    case \"TooManyRequestsException\": return [3 /*break*/, 10];\n                    case \"com.amazonaws.cognitoidentity#TooManyRequestsException\": return [3 /*break*/, 10];\n                }\n                return [3 /*break*/, 12];\n            case 2:\n                _c = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)];\n            case 3:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 13];\n            case 4:\n                _d = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];\n            case 5:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 13];\n            case 6:\n                _e = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)];\n            case 7:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 13];\n            case 8:\n                _f = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];\n            case 9:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 13];\n            case 10:\n                _g = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];\n            case 11:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 13];\n            case 12:\n                parsedBody = parsedOutput.body;\n                errorCode = parsedBody.code || parsedBody.Code || errorCode;\n                response = __assign(__assign({}, parsedBody), { name: \"\" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: \"client\", $metadata: deserializeMetadata(output) });\n                _j.label = 13;\n            case 13:\n                message = response.message || response.Message || errorCode;\n                response.message = message;\n                delete response.Message;\n                return [2 /*return*/, Promise.reject(Object.assign(new Error(message), response))];\n        }\n    });\n}); };\nexport var deserializeAws_json1_1GetCredentialsForIdentityCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var data, contents, response;\n    return __generator(this, function (_a) {\n        switch (_a.label) {\n            case 0:\n                if (output.statusCode >= 300) {\n                    return [2 /*return*/, deserializeAws_json1_1GetCredentialsForIdentityCommandError(output, context)];\n                }\n                return [4 /*yield*/, parseBody(output.body, context)];\n            case 1:\n                data = _a.sent();\n                contents = {};\n                contents = deserializeAws_json1_1GetCredentialsForIdentityResponse(data, context);\n                response = __assign({ $metadata: deserializeMetadata(output) }, contents);\n                return [2 /*return*/, Promise.resolve(response)];\n        }\n    });\n}); };\nvar deserializeAws_json1_1GetCredentialsForIdentityCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, _j, _k, parsedBody, message;\n    var _l;\n    return __generator(this, function (_m) {\n        switch (_m.label) {\n            case 0:\n                _a = [__assign({}, output)];\n                _l = {};\n                return [4 /*yield*/, parseBody(output.body, context)];\n            case 1:\n                parsedOutput = __assign.apply(void 0, _a.concat([(_l.body = _m.sent(), _l)]));\n                errorCode = \"UnknownError\";\n                errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n                _b = errorCode;\n                switch (_b) {\n                    case \"ExternalServiceException\": return [3 /*break*/, 2];\n                    case \"com.amazonaws.cognitoidentity#ExternalServiceException\": return [3 /*break*/, 2];\n                    case \"InternalErrorException\": return [3 /*break*/, 4];\n                    case \"com.amazonaws.cognitoidentity#InternalErrorException\": return [3 /*break*/, 4];\n                    case \"InvalidIdentityPoolConfigurationException\": return [3 /*break*/, 6];\n                    case \"com.amazonaws.cognitoidentity#InvalidIdentityPoolConfigurationException\": return [3 /*break*/, 6];\n                    case \"InvalidParameterException\": return [3 /*break*/, 8];\n                    case \"com.amazonaws.cognitoidentity#InvalidParameterException\": return [3 /*break*/, 8];\n                    case \"NotAuthorizedException\": return [3 /*break*/, 10];\n                    case \"com.amazonaws.cognitoidentity#NotAuthorizedException\": return [3 /*break*/, 10];\n                    case \"ResourceConflictException\": return [3 /*break*/, 12];\n                    case \"com.amazonaws.cognitoidentity#ResourceConflictException\": return [3 /*break*/, 12];\n                    case \"ResourceNotFoundException\": return [3 /*break*/, 14];\n                    case \"com.amazonaws.cognitoidentity#ResourceNotFoundException\": return [3 /*break*/, 14];\n                    case \"TooManyRequestsException\": return [3 /*break*/, 16];\n                    case \"com.amazonaws.cognitoidentity#TooManyRequestsException\": return [3 /*break*/, 16];\n                }\n                return [3 /*break*/, 18];\n            case 2:\n                _c = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1ExternalServiceExceptionResponse(parsedOutput, context)];\n            case 3:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 19];\n            case 4:\n                _d = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)];\n            case 5:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 19];\n            case 6:\n                _e = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1InvalidIdentityPoolConfigurationExceptionResponse(parsedOutput, context)];\n            case 7:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 19];\n            case 8:\n                _f = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];\n            case 9:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 19];\n            case 10:\n                _g = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)];\n            case 11:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 19];\n            case 12:\n                _h = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1ResourceConflictExceptionResponse(parsedOutput, context)];\n            case 13:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 19];\n            case 14:\n                _j = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];\n            case 15:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 19];\n            case 16:\n                _k = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];\n            case 17:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _k.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 19];\n            case 18:\n                parsedBody = parsedOutput.body;\n                errorCode = parsedBody.code || parsedBody.Code || errorCode;\n                response = __assign(__assign({}, parsedBody), { name: \"\" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: \"client\", $metadata: deserializeMetadata(output) });\n                _m.label = 19;\n            case 19:\n                message = response.message || response.Message || errorCode;\n                response.message = message;\n                delete response.Message;\n                return [2 /*return*/, Promise.reject(Object.assign(new Error(message), response))];\n        }\n    });\n}); };\nexport var deserializeAws_json1_1GetIdCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var data, contents, response;\n    return __generator(this, function (_a) {\n        switch (_a.label) {\n            case 0:\n                if (output.statusCode >= 300) {\n                    return [2 /*return*/, deserializeAws_json1_1GetIdCommandError(output, context)];\n                }\n                return [4 /*yield*/, parseBody(output.body, context)];\n            case 1:\n                data = _a.sent();\n                contents = {};\n                contents = deserializeAws_json1_1GetIdResponse(data, context);\n                response = __assign({ $metadata: deserializeMetadata(output) }, contents);\n                return [2 /*return*/, Promise.resolve(response)];\n        }\n    });\n}); };\nvar deserializeAws_json1_1GetIdCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, _j, _k, parsedBody, message;\n    var _l;\n    return __generator(this, function (_m) {\n        switch (_m.label) {\n            case 0:\n                _a = [__assign({}, output)];\n                _l = {};\n                return [4 /*yield*/, parseBody(output.body, context)];\n            case 1:\n                parsedOutput = __assign.apply(void 0, _a.concat([(_l.body = _m.sent(), _l)]));\n                errorCode = \"UnknownError\";\n                errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n                _b = errorCode;\n                switch (_b) {\n                    case \"ExternalServiceException\": return [3 /*break*/, 2];\n                    case \"com.amazonaws.cognitoidentity#ExternalServiceException\": return [3 /*break*/, 2];\n                    case \"InternalErrorException\": return [3 /*break*/, 4];\n                    case \"com.amazonaws.cognitoidentity#InternalErrorException\": return [3 /*break*/, 4];\n                    case \"InvalidParameterException\": return [3 /*break*/, 6];\n                    case \"com.amazonaws.cognitoidentity#InvalidParameterException\": return [3 /*break*/, 6];\n                    case \"LimitExceededException\": return [3 /*break*/, 8];\n                    case \"com.amazonaws.cognitoidentity#LimitExceededException\": return [3 /*break*/, 8];\n                    case \"NotAuthorizedException\": return [3 /*break*/, 10];\n                    case \"com.amazonaws.cognitoidentity#NotAuthorizedException\": return [3 /*break*/, 10];\n                    case \"ResourceConflictException\": return [3 /*break*/, 12];\n                    case \"com.amazonaws.cognitoidentity#ResourceConflictException\": return [3 /*break*/, 12];\n                    case \"ResourceNotFoundException\": return [3 /*break*/, 14];\n                    case \"com.amazonaws.cognitoidentity#ResourceNotFoundException\": return [3 /*break*/, 14];\n                    case \"TooManyRequestsException\": return [3 /*break*/, 16];\n                    case \"com.amazonaws.cognitoidentity#TooManyRequestsException\": return [3 /*break*/, 16];\n                }\n                return [3 /*break*/, 18];\n            case 2:\n                _c = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1ExternalServiceExceptionResponse(parsedOutput, context)];\n            case 3:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 19];\n            case 4:\n                _d = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)];\n            case 5:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 19];\n            case 6:\n                _e = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];\n            case 7:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 19];\n            case 8:\n                _f = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)];\n            case 9:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 19];\n            case 10:\n                _g = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)];\n            case 11:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 19];\n            case 12:\n                _h = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1ResourceConflictExceptionResponse(parsedOutput, context)];\n            case 13:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 19];\n            case 14:\n                _j = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];\n            case 15:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 19];\n            case 16:\n                _k = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];\n            case 17:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _k.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 19];\n            case 18:\n                parsedBody = parsedOutput.body;\n                errorCode = parsedBody.code || parsedBody.Code || errorCode;\n                response = __assign(__assign({}, parsedBody), { name: \"\" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: \"client\", $metadata: deserializeMetadata(output) });\n                _m.label = 19;\n            case 19:\n                message = response.message || response.Message || errorCode;\n                response.message = message;\n                delete response.Message;\n                return [2 /*return*/, Promise.reject(Object.assign(new Error(message), response))];\n        }\n    });\n}); };\nexport var deserializeAws_json1_1GetIdentityPoolRolesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var data, contents, response;\n    return __generator(this, function (_a) {\n        switch (_a.label) {\n            case 0:\n                if (output.statusCode >= 300) {\n                    return [2 /*return*/, deserializeAws_json1_1GetIdentityPoolRolesCommandError(output, context)];\n                }\n                return [4 /*yield*/, parseBody(output.body, context)];\n            case 1:\n                data = _a.sent();\n                contents = {};\n                contents = deserializeAws_json1_1GetIdentityPoolRolesResponse(data, context);\n                response = __assign({ $metadata: deserializeMetadata(output) }, contents);\n                return [2 /*return*/, Promise.resolve(response)];\n        }\n    });\n}); };\nvar deserializeAws_json1_1GetIdentityPoolRolesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, parsedBody, message;\n    var _j;\n    return __generator(this, function (_k) {\n        switch (_k.label) {\n            case 0:\n                _a = [__assign({}, output)];\n                _j = {};\n                return [4 /*yield*/, parseBody(output.body, context)];\n            case 1:\n                parsedOutput = __assign.apply(void 0, _a.concat([(_j.body = _k.sent(), _j)]));\n                errorCode = \"UnknownError\";\n                errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n                _b = errorCode;\n                switch (_b) {\n                    case \"InternalErrorException\": return [3 /*break*/, 2];\n                    case \"com.amazonaws.cognitoidentity#InternalErrorException\": return [3 /*break*/, 2];\n                    case \"InvalidParameterException\": return [3 /*break*/, 4];\n                    case \"com.amazonaws.cognitoidentity#InvalidParameterException\": return [3 /*break*/, 4];\n                    case \"NotAuthorizedException\": return [3 /*break*/, 6];\n                    case \"com.amazonaws.cognitoidentity#NotAuthorizedException\": return [3 /*break*/, 6];\n                    case \"ResourceConflictException\": return [3 /*break*/, 8];\n                    case \"com.amazonaws.cognitoidentity#ResourceConflictException\": return [3 /*break*/, 8];\n                    case \"ResourceNotFoundException\": return [3 /*break*/, 10];\n                    case \"com.amazonaws.cognitoidentity#ResourceNotFoundException\": return [3 /*break*/, 10];\n                    case \"TooManyRequestsException\": return [3 /*break*/, 12];\n                    case \"com.amazonaws.cognitoidentity#TooManyRequestsException\": return [3 /*break*/, 12];\n                }\n                return [3 /*break*/, 14];\n            case 2:\n                _c = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)];\n            case 3:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 15];\n            case 4:\n                _d = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];\n            case 5:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 15];\n            case 6:\n                _e = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)];\n            case 7:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 15];\n            case 8:\n                _f = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1ResourceConflictExceptionResponse(parsedOutput, context)];\n            case 9:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 15];\n            case 10:\n                _g = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];\n            case 11:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 15];\n            case 12:\n                _h = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];\n            case 13:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 15];\n            case 14:\n                parsedBody = parsedOutput.body;\n                errorCode = parsedBody.code || parsedBody.Code || errorCode;\n                response = __assign(__assign({}, parsedBody), { name: \"\" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: \"client\", $metadata: deserializeMetadata(output) });\n                _k.label = 15;\n            case 15:\n                message = response.message || response.Message || errorCode;\n                response.message = message;\n                delete response.Message;\n                return [2 /*return*/, Promise.reject(Object.assign(new Error(message), response))];\n        }\n    });\n}); };\nexport var deserializeAws_json1_1GetOpenIdTokenCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var data, contents, response;\n    return __generator(this, function (_a) {\n        switch (_a.label) {\n            case 0:\n                if (output.statusCode >= 300) {\n                    return [2 /*return*/, deserializeAws_json1_1GetOpenIdTokenCommandError(output, context)];\n                }\n                return [4 /*yield*/, parseBody(output.body, context)];\n            case 1:\n                data = _a.sent();\n                contents = {};\n                contents = deserializeAws_json1_1GetOpenIdTokenResponse(data, context);\n                response = __assign({ $metadata: deserializeMetadata(output) }, contents);\n                return [2 /*return*/, Promise.resolve(response)];\n        }\n    });\n}); };\nvar deserializeAws_json1_1GetOpenIdTokenCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, _j, parsedBody, message;\n    var _k;\n    return __generator(this, function (_l) {\n        switch (_l.label) {\n            case 0:\n                _a = [__assign({}, output)];\n                _k = {};\n                return [4 /*yield*/, parseBody(output.body, context)];\n            case 1:\n                parsedOutput = __assign.apply(void 0, _a.concat([(_k.body = _l.sent(), _k)]));\n                errorCode = \"UnknownError\";\n                errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n                _b = errorCode;\n                switch (_b) {\n                    case \"ExternalServiceException\": return [3 /*break*/, 2];\n                    case \"com.amazonaws.cognitoidentity#ExternalServiceException\": return [3 /*break*/, 2];\n                    case \"InternalErrorException\": return [3 /*break*/, 4];\n                    case \"com.amazonaws.cognitoidentity#InternalErrorException\": return [3 /*break*/, 4];\n                    case \"InvalidParameterException\": return [3 /*break*/, 6];\n                    case \"com.amazonaws.cognitoidentity#InvalidParameterException\": return [3 /*break*/, 6];\n                    case \"NotAuthorizedException\": return [3 /*break*/, 8];\n                    case \"com.amazonaws.cognitoidentity#NotAuthorizedException\": return [3 /*break*/, 8];\n                    case \"ResourceConflictException\": return [3 /*break*/, 10];\n                    case \"com.amazonaws.cognitoidentity#ResourceConflictException\": return [3 /*break*/, 10];\n                    case \"ResourceNotFoundException\": return [3 /*break*/, 12];\n                    case \"com.amazonaws.cognitoidentity#ResourceNotFoundException\": return [3 /*break*/, 12];\n                    case \"TooManyRequestsException\": return [3 /*break*/, 14];\n                    case \"com.amazonaws.cognitoidentity#TooManyRequestsException\": return [3 /*break*/, 14];\n                }\n                return [3 /*break*/, 16];\n            case 2:\n                _c = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1ExternalServiceExceptionResponse(parsedOutput, context)];\n            case 3:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 17];\n            case 4:\n                _d = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)];\n            case 5:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 17];\n            case 6:\n                _e = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];\n            case 7:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 17];\n            case 8:\n                _f = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)];\n            case 9:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 17];\n            case 10:\n                _g = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1ResourceConflictExceptionResponse(parsedOutput, context)];\n            case 11:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 17];\n            case 12:\n                _h = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];\n            case 13:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 17];\n            case 14:\n                _j = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];\n            case 15:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 17];\n            case 16:\n                parsedBody = parsedOutput.body;\n                errorCode = parsedBody.code || parsedBody.Code || errorCode;\n                response = __assign(__assign({}, parsedBody), { name: \"\" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: \"client\", $metadata: deserializeMetadata(output) });\n                _l.label = 17;\n            case 17:\n                message = response.message || response.Message || errorCode;\n                response.message = message;\n                delete response.Message;\n                return [2 /*return*/, Promise.reject(Object.assign(new Error(message), response))];\n        }\n    });\n}); };\nexport var deserializeAws_json1_1GetOpenIdTokenForDeveloperIdentityCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var data, contents, response;\n    return __generator(this, function (_a) {\n        switch (_a.label) {\n            case 0:\n                if (output.statusCode >= 300) {\n                    return [2 /*return*/, deserializeAws_json1_1GetOpenIdTokenForDeveloperIdentityCommandError(output, context)];\n                }\n                return [4 /*yield*/, parseBody(output.body, context)];\n            case 1:\n                data = _a.sent();\n                contents = {};\n                contents = deserializeAws_json1_1GetOpenIdTokenForDeveloperIdentityResponse(data, context);\n                response = __assign({ $metadata: deserializeMetadata(output) }, contents);\n                return [2 /*return*/, Promise.resolve(response)];\n        }\n    });\n}); };\nvar deserializeAws_json1_1GetOpenIdTokenForDeveloperIdentityCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, _j, parsedBody, message;\n    var _k;\n    return __generator(this, function (_l) {\n        switch (_l.label) {\n            case 0:\n                _a = [__assign({}, output)];\n                _k = {};\n                return [4 /*yield*/, parseBody(output.body, context)];\n            case 1:\n                parsedOutput = __assign.apply(void 0, _a.concat([(_k.body = _l.sent(), _k)]));\n                errorCode = \"UnknownError\";\n                errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n                _b = errorCode;\n                switch (_b) {\n                    case \"DeveloperUserAlreadyRegisteredException\": return [3 /*break*/, 2];\n                    case \"com.amazonaws.cognitoidentity#DeveloperUserAlreadyRegisteredException\": return [3 /*break*/, 2];\n                    case \"InternalErrorException\": return [3 /*break*/, 4];\n                    case \"com.amazonaws.cognitoidentity#InternalErrorException\": return [3 /*break*/, 4];\n                    case \"InvalidParameterException\": return [3 /*break*/, 6];\n                    case \"com.amazonaws.cognitoidentity#InvalidParameterException\": return [3 /*break*/, 6];\n                    case \"NotAuthorizedException\": return [3 /*break*/, 8];\n                    case \"com.amazonaws.cognitoidentity#NotAuthorizedException\": return [3 /*break*/, 8];\n                    case \"ResourceConflictException\": return [3 /*break*/, 10];\n                    case \"com.amazonaws.cognitoidentity#ResourceConflictException\": return [3 /*break*/, 10];\n                    case \"ResourceNotFoundException\": return [3 /*break*/, 12];\n                    case \"com.amazonaws.cognitoidentity#ResourceNotFoundException\": return [3 /*break*/, 12];\n                    case \"TooManyRequestsException\": return [3 /*break*/, 14];\n                    case \"com.amazonaws.cognitoidentity#TooManyRequestsException\": return [3 /*break*/, 14];\n                }\n                return [3 /*break*/, 16];\n            case 2:\n                _c = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1DeveloperUserAlreadyRegisteredExceptionResponse(parsedOutput, context)];\n            case 3:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 17];\n            case 4:\n                _d = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)];\n            case 5:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 17];\n            case 6:\n                _e = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];\n            case 7:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 17];\n            case 8:\n                _f = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)];\n            case 9:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 17];\n            case 10:\n                _g = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1ResourceConflictExceptionResponse(parsedOutput, context)];\n            case 11:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 17];\n            case 12:\n                _h = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];\n            case 13:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 17];\n            case 14:\n                _j = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];\n            case 15:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 17];\n            case 16:\n                parsedBody = parsedOutput.body;\n                errorCode = parsedBody.code || parsedBody.Code || errorCode;\n                response = __assign(__assign({}, parsedBody), { name: \"\" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: \"client\", $metadata: deserializeMetadata(output) });\n                _l.label = 17;\n            case 17:\n                message = response.message || response.Message || errorCode;\n                response.message = message;\n                delete response.Message;\n                return [2 /*return*/, Promise.reject(Object.assign(new Error(message), response))];\n        }\n    });\n}); };\nexport var deserializeAws_json1_1ListIdentitiesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var data, contents, response;\n    return __generator(this, function (_a) {\n        switch (_a.label) {\n            case 0:\n                if (output.statusCode >= 300) {\n                    return [2 /*return*/, deserializeAws_json1_1ListIdentitiesCommandError(output, context)];\n                }\n                return [4 /*yield*/, parseBody(output.body, context)];\n            case 1:\n                data = _a.sent();\n                contents = {};\n                contents = deserializeAws_json1_1ListIdentitiesResponse(data, context);\n                response = __assign({ $metadata: deserializeMetadata(output) }, contents);\n                return [2 /*return*/, Promise.resolve(response)];\n        }\n    });\n}); };\nvar deserializeAws_json1_1ListIdentitiesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;\n    var _h;\n    return __generator(this, function (_j) {\n        switch (_j.label) {\n            case 0:\n                _a = [__assign({}, output)];\n                _h = {};\n                return [4 /*yield*/, parseBody(output.body, context)];\n            case 1:\n                parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));\n                errorCode = \"UnknownError\";\n                errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n                _b = errorCode;\n                switch (_b) {\n                    case \"InternalErrorException\": return [3 /*break*/, 2];\n                    case \"com.amazonaws.cognitoidentity#InternalErrorException\": return [3 /*break*/, 2];\n                    case \"InvalidParameterException\": return [3 /*break*/, 4];\n                    case \"com.amazonaws.cognitoidentity#InvalidParameterException\": return [3 /*break*/, 4];\n                    case \"NotAuthorizedException\": return [3 /*break*/, 6];\n                    case \"com.amazonaws.cognitoidentity#NotAuthorizedException\": return [3 /*break*/, 6];\n                    case \"ResourceNotFoundException\": return [3 /*break*/, 8];\n                    case \"com.amazonaws.cognitoidentity#ResourceNotFoundException\": return [3 /*break*/, 8];\n                    case \"TooManyRequestsException\": return [3 /*break*/, 10];\n                    case \"com.amazonaws.cognitoidentity#TooManyRequestsException\": return [3 /*break*/, 10];\n                }\n                return [3 /*break*/, 12];\n            case 2:\n                _c = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)];\n            case 3:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 13];\n            case 4:\n                _d = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];\n            case 5:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 13];\n            case 6:\n                _e = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)];\n            case 7:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 13];\n            case 8:\n                _f = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];\n            case 9:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 13];\n            case 10:\n                _g = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];\n            case 11:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 13];\n            case 12:\n                parsedBody = parsedOutput.body;\n                errorCode = parsedBody.code || parsedBody.Code || errorCode;\n                response = __assign(__assign({}, parsedBody), { name: \"\" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: \"client\", $metadata: deserializeMetadata(output) });\n                _j.label = 13;\n            case 13:\n                message = response.message || response.Message || errorCode;\n                response.message = message;\n                delete response.Message;\n                return [2 /*return*/, Promise.reject(Object.assign(new Error(message), response))];\n        }\n    });\n}); };\nexport var deserializeAws_json1_1ListIdentityPoolsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var data, contents, response;\n    return __generator(this, function (_a) {\n        switch (_a.label) {\n            case 0:\n                if (output.statusCode >= 300) {\n                    return [2 /*return*/, deserializeAws_json1_1ListIdentityPoolsCommandError(output, context)];\n                }\n                return [4 /*yield*/, parseBody(output.body, context)];\n            case 1:\n                data = _a.sent();\n                contents = {};\n                contents = deserializeAws_json1_1ListIdentityPoolsResponse(data, context);\n                response = __assign({ $metadata: deserializeMetadata(output) }, contents);\n                return [2 /*return*/, Promise.resolve(response)];\n        }\n    });\n}); };\nvar deserializeAws_json1_1ListIdentityPoolsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;\n    var _h;\n    return __generator(this, function (_j) {\n        switch (_j.label) {\n            case 0:\n                _a = [__assign({}, output)];\n                _h = {};\n                return [4 /*yield*/, parseBody(output.body, context)];\n            case 1:\n                parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));\n                errorCode = \"UnknownError\";\n                errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n                _b = errorCode;\n                switch (_b) {\n                    case \"InternalErrorException\": return [3 /*break*/, 2];\n                    case \"com.amazonaws.cognitoidentity#InternalErrorException\": return [3 /*break*/, 2];\n                    case \"InvalidParameterException\": return [3 /*break*/, 4];\n                    case \"com.amazonaws.cognitoidentity#InvalidParameterException\": return [3 /*break*/, 4];\n                    case \"NotAuthorizedException\": return [3 /*break*/, 6];\n                    case \"com.amazonaws.cognitoidentity#NotAuthorizedException\": return [3 /*break*/, 6];\n                    case \"ResourceNotFoundException\": return [3 /*break*/, 8];\n                    case \"com.amazonaws.cognitoidentity#ResourceNotFoundException\": return [3 /*break*/, 8];\n                    case \"TooManyRequestsException\": return [3 /*break*/, 10];\n                    case \"com.amazonaws.cognitoidentity#TooManyRequestsException\": return [3 /*break*/, 10];\n                }\n                return [3 /*break*/, 12];\n            case 2:\n                _c = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)];\n            case 3:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 13];\n            case 4:\n                _d = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];\n            case 5:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 13];\n            case 6:\n                _e = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)];\n            case 7:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 13];\n            case 8:\n                _f = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];\n            case 9:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 13];\n            case 10:\n                _g = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];\n            case 11:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 13];\n            case 12:\n                parsedBody = parsedOutput.body;\n                errorCode = parsedBody.code || parsedBody.Code || errorCode;\n                response = __assign(__assign({}, parsedBody), { name: \"\" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: \"client\", $metadata: deserializeMetadata(output) });\n                _j.label = 13;\n            case 13:\n                message = response.message || response.Message || errorCode;\n                response.message = message;\n                delete response.Message;\n                return [2 /*return*/, Promise.reject(Object.assign(new Error(message), response))];\n        }\n    });\n}); };\nexport var deserializeAws_json1_1ListTagsForResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var data, contents, response;\n    return __generator(this, function (_a) {\n        switch (_a.label) {\n            case 0:\n                if (output.statusCode >= 300) {\n                    return [2 /*return*/, deserializeAws_json1_1ListTagsForResourceCommandError(output, context)];\n                }\n                return [4 /*yield*/, parseBody(output.body, context)];\n            case 1:\n                data = _a.sent();\n                contents = {};\n                contents = deserializeAws_json1_1ListTagsForResourceResponse(data, context);\n                response = __assign({ $metadata: deserializeMetadata(output) }, contents);\n                return [2 /*return*/, Promise.resolve(response)];\n        }\n    });\n}); };\nvar deserializeAws_json1_1ListTagsForResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;\n    var _h;\n    return __generator(this, function (_j) {\n        switch (_j.label) {\n            case 0:\n                _a = [__assign({}, output)];\n                _h = {};\n                return [4 /*yield*/, parseBody(output.body, context)];\n            case 1:\n                parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));\n                errorCode = \"UnknownError\";\n                errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n                _b = errorCode;\n                switch (_b) {\n                    case \"InternalErrorException\": return [3 /*break*/, 2];\n                    case \"com.amazonaws.cognitoidentity#InternalErrorException\": return [3 /*break*/, 2];\n                    case \"InvalidParameterException\": return [3 /*break*/, 4];\n                    case \"com.amazonaws.cognitoidentity#InvalidParameterException\": return [3 /*break*/, 4];\n                    case \"NotAuthorizedException\": return [3 /*break*/, 6];\n                    case \"com.amazonaws.cognitoidentity#NotAuthorizedException\": return [3 /*break*/, 6];\n                    case \"ResourceNotFoundException\": return [3 /*break*/, 8];\n                    case \"com.amazonaws.cognitoidentity#ResourceNotFoundException\": return [3 /*break*/, 8];\n                    case \"TooManyRequestsException\": return [3 /*break*/, 10];\n                    case \"com.amazonaws.cognitoidentity#TooManyRequestsException\": return [3 /*break*/, 10];\n                }\n                return [3 /*break*/, 12];\n            case 2:\n                _c = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)];\n            case 3:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 13];\n            case 4:\n                _d = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];\n            case 5:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 13];\n            case 6:\n                _e = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)];\n            case 7:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 13];\n            case 8:\n                _f = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];\n            case 9:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 13];\n            case 10:\n                _g = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];\n            case 11:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 13];\n            case 12:\n                parsedBody = parsedOutput.body;\n                errorCode = parsedBody.code || parsedBody.Code || errorCode;\n                response = __assign(__assign({}, parsedBody), { name: \"\" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: \"client\", $metadata: deserializeMetadata(output) });\n                _j.label = 13;\n            case 13:\n                message = response.message || response.Message || errorCode;\n                response.message = message;\n                delete response.Message;\n                return [2 /*return*/, Promise.reject(Object.assign(new Error(message), response))];\n        }\n    });\n}); };\nexport var deserializeAws_json1_1LookupDeveloperIdentityCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var data, contents, response;\n    return __generator(this, function (_a) {\n        switch (_a.label) {\n            case 0:\n                if (output.statusCode >= 300) {\n                    return [2 /*return*/, deserializeAws_json1_1LookupDeveloperIdentityCommandError(output, context)];\n                }\n                return [4 /*yield*/, parseBody(output.body, context)];\n            case 1:\n                data = _a.sent();\n                contents = {};\n                contents = deserializeAws_json1_1LookupDeveloperIdentityResponse(data, context);\n                response = __assign({ $metadata: deserializeMetadata(output) }, contents);\n                return [2 /*return*/, Promise.resolve(response)];\n        }\n    });\n}); };\nvar deserializeAws_json1_1LookupDeveloperIdentityCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, parsedBody, message;\n    var _j;\n    return __generator(this, function (_k) {\n        switch (_k.label) {\n            case 0:\n                _a = [__assign({}, output)];\n                _j = {};\n                return [4 /*yield*/, parseBody(output.body, context)];\n            case 1:\n                parsedOutput = __assign.apply(void 0, _a.concat([(_j.body = _k.sent(), _j)]));\n                errorCode = \"UnknownError\";\n                errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n                _b = errorCode;\n                switch (_b) {\n                    case \"InternalErrorException\": return [3 /*break*/, 2];\n                    case \"com.amazonaws.cognitoidentity#InternalErrorException\": return [3 /*break*/, 2];\n                    case \"InvalidParameterException\": return [3 /*break*/, 4];\n                    case \"com.amazonaws.cognitoidentity#InvalidParameterException\": return [3 /*break*/, 4];\n                    case \"NotAuthorizedException\": return [3 /*break*/, 6];\n                    case \"com.amazonaws.cognitoidentity#NotAuthorizedException\": return [3 /*break*/, 6];\n                    case \"ResourceConflictException\": return [3 /*break*/, 8];\n                    case \"com.amazonaws.cognitoidentity#ResourceConflictException\": return [3 /*break*/, 8];\n                    case \"ResourceNotFoundException\": return [3 /*break*/, 10];\n                    case \"com.amazonaws.cognitoidentity#ResourceNotFoundException\": return [3 /*break*/, 10];\n                    case \"TooManyRequestsException\": return [3 /*break*/, 12];\n                    case \"com.amazonaws.cognitoidentity#TooManyRequestsException\": return [3 /*break*/, 12];\n                }\n                return [3 /*break*/, 14];\n            case 2:\n                _c = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)];\n            case 3:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 15];\n            case 4:\n                _d = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];\n            case 5:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 15];\n            case 6:\n                _e = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)];\n            case 7:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 15];\n            case 8:\n                _f = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1ResourceConflictExceptionResponse(parsedOutput, context)];\n            case 9:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 15];\n            case 10:\n                _g = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];\n            case 11:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 15];\n            case 12:\n                _h = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];\n            case 13:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 15];\n            case 14:\n                parsedBody = parsedOutput.body;\n                errorCode = parsedBody.code || parsedBody.Code || errorCode;\n                response = __assign(__assign({}, parsedBody), { name: \"\" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: \"client\", $metadata: deserializeMetadata(output) });\n                _k.label = 15;\n            case 15:\n                message = response.message || response.Message || errorCode;\n                response.message = message;\n                delete response.Message;\n                return [2 /*return*/, Promise.reject(Object.assign(new Error(message), response))];\n        }\n    });\n}); };\nexport var deserializeAws_json1_1MergeDeveloperIdentitiesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var data, contents, response;\n    return __generator(this, function (_a) {\n        switch (_a.label) {\n            case 0:\n                if (output.statusCode >= 300) {\n                    return [2 /*return*/, deserializeAws_json1_1MergeDeveloperIdentitiesCommandError(output, context)];\n                }\n                return [4 /*yield*/, parseBody(output.body, context)];\n            case 1:\n                data = _a.sent();\n                contents = {};\n                contents = deserializeAws_json1_1MergeDeveloperIdentitiesResponse(data, context);\n                response = __assign({ $metadata: deserializeMetadata(output) }, contents);\n                return [2 /*return*/, Promise.resolve(response)];\n        }\n    });\n}); };\nvar deserializeAws_json1_1MergeDeveloperIdentitiesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, parsedBody, message;\n    var _j;\n    return __generator(this, function (_k) {\n        switch (_k.label) {\n            case 0:\n                _a = [__assign({}, output)];\n                _j = {};\n                return [4 /*yield*/, parseBody(output.body, context)];\n            case 1:\n                parsedOutput = __assign.apply(void 0, _a.concat([(_j.body = _k.sent(), _j)]));\n                errorCode = \"UnknownError\";\n                errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n                _b = errorCode;\n                switch (_b) {\n                    case \"InternalErrorException\": return [3 /*break*/, 2];\n                    case \"com.amazonaws.cognitoidentity#InternalErrorException\": return [3 /*break*/, 2];\n                    case \"InvalidParameterException\": return [3 /*break*/, 4];\n                    case \"com.amazonaws.cognitoidentity#InvalidParameterException\": return [3 /*break*/, 4];\n                    case \"NotAuthorizedException\": return [3 /*break*/, 6];\n                    case \"com.amazonaws.cognitoidentity#NotAuthorizedException\": return [3 /*break*/, 6];\n                    case \"ResourceConflictException\": return [3 /*break*/, 8];\n                    case \"com.amazonaws.cognitoidentity#ResourceConflictException\": return [3 /*break*/, 8];\n                    case \"ResourceNotFoundException\": return [3 /*break*/, 10];\n                    case \"com.amazonaws.cognitoidentity#ResourceNotFoundException\": return [3 /*break*/, 10];\n                    case \"TooManyRequestsException\": return [3 /*break*/, 12];\n                    case \"com.amazonaws.cognitoidentity#TooManyRequestsException\": return [3 /*break*/, 12];\n                }\n                return [3 /*break*/, 14];\n            case 2:\n                _c = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)];\n            case 3:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 15];\n            case 4:\n                _d = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];\n            case 5:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 15];\n            case 6:\n                _e = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)];\n            case 7:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 15];\n            case 8:\n                _f = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1ResourceConflictExceptionResponse(parsedOutput, context)];\n            case 9:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 15];\n            case 10:\n                _g = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];\n            case 11:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 15];\n            case 12:\n                _h = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];\n            case 13:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 15];\n            case 14:\n                parsedBody = parsedOutput.body;\n                errorCode = parsedBody.code || parsedBody.Code || errorCode;\n                response = __assign(__assign({}, parsedBody), { name: \"\" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: \"client\", $metadata: deserializeMetadata(output) });\n                _k.label = 15;\n            case 15:\n                message = response.message || response.Message || errorCode;\n                response.message = message;\n                delete response.Message;\n                return [2 /*return*/, Promise.reject(Object.assign(new Error(message), response))];\n        }\n    });\n}); };\nexport var deserializeAws_json1_1SetIdentityPoolRolesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var response;\n    return __generator(this, function (_a) {\n        switch (_a.label) {\n            case 0:\n                if (output.statusCode >= 300) {\n                    return [2 /*return*/, deserializeAws_json1_1SetIdentityPoolRolesCommandError(output, context)];\n                }\n                return [4 /*yield*/, collectBody(output.body, context)];\n            case 1:\n                _a.sent();\n                response = {\n                    $metadata: deserializeMetadata(output),\n                };\n                return [2 /*return*/, Promise.resolve(response)];\n        }\n    });\n}); };\nvar deserializeAws_json1_1SetIdentityPoolRolesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, _j, parsedBody, message;\n    var _k;\n    return __generator(this, function (_l) {\n        switch (_l.label) {\n            case 0:\n                _a = [__assign({}, output)];\n                _k = {};\n                return [4 /*yield*/, parseBody(output.body, context)];\n            case 1:\n                parsedOutput = __assign.apply(void 0, _a.concat([(_k.body = _l.sent(), _k)]));\n                errorCode = \"UnknownError\";\n                errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n                _b = errorCode;\n                switch (_b) {\n                    case \"ConcurrentModificationException\": return [3 /*break*/, 2];\n                    case \"com.amazonaws.cognitoidentity#ConcurrentModificationException\": return [3 /*break*/, 2];\n                    case \"InternalErrorException\": return [3 /*break*/, 4];\n                    case \"com.amazonaws.cognitoidentity#InternalErrorException\": return [3 /*break*/, 4];\n                    case \"InvalidParameterException\": return [3 /*break*/, 6];\n                    case \"com.amazonaws.cognitoidentity#InvalidParameterException\": return [3 /*break*/, 6];\n                    case \"NotAuthorizedException\": return [3 /*break*/, 8];\n                    case \"com.amazonaws.cognitoidentity#NotAuthorizedException\": return [3 /*break*/, 8];\n                    case \"ResourceConflictException\": return [3 /*break*/, 10];\n                    case \"com.amazonaws.cognitoidentity#ResourceConflictException\": return [3 /*break*/, 10];\n                    case \"ResourceNotFoundException\": return [3 /*break*/, 12];\n                    case \"com.amazonaws.cognitoidentity#ResourceNotFoundException\": return [3 /*break*/, 12];\n                    case \"TooManyRequestsException\": return [3 /*break*/, 14];\n                    case \"com.amazonaws.cognitoidentity#TooManyRequestsException\": return [3 /*break*/, 14];\n                }\n                return [3 /*break*/, 16];\n            case 2:\n                _c = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1ConcurrentModificationExceptionResponse(parsedOutput, context)];\n            case 3:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 17];\n            case 4:\n                _d = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)];\n            case 5:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 17];\n            case 6:\n                _e = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];\n            case 7:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 17];\n            case 8:\n                _f = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)];\n            case 9:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 17];\n            case 10:\n                _g = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1ResourceConflictExceptionResponse(parsedOutput, context)];\n            case 11:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 17];\n            case 12:\n                _h = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];\n            case 13:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 17];\n            case 14:\n                _j = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];\n            case 15:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 17];\n            case 16:\n                parsedBody = parsedOutput.body;\n                errorCode = parsedBody.code || parsedBody.Code || errorCode;\n                response = __assign(__assign({}, parsedBody), { name: \"\" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: \"client\", $metadata: deserializeMetadata(output) });\n                _l.label = 17;\n            case 17:\n                message = response.message || response.Message || errorCode;\n                response.message = message;\n                delete response.Message;\n                return [2 /*return*/, Promise.reject(Object.assign(new Error(message), response))];\n        }\n    });\n}); };\nexport var deserializeAws_json1_1TagResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var data, contents, response;\n    return __generator(this, function (_a) {\n        switch (_a.label) {\n            case 0:\n                if (output.statusCode >= 300) {\n                    return [2 /*return*/, deserializeAws_json1_1TagResourceCommandError(output, context)];\n                }\n                return [4 /*yield*/, parseBody(output.body, context)];\n            case 1:\n                data = _a.sent();\n                contents = {};\n                contents = deserializeAws_json1_1TagResourceResponse(data, context);\n                response = __assign({ $metadata: deserializeMetadata(output) }, contents);\n                return [2 /*return*/, Promise.resolve(response)];\n        }\n    });\n}); };\nvar deserializeAws_json1_1TagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;\n    var _h;\n    return __generator(this, function (_j) {\n        switch (_j.label) {\n            case 0:\n                _a = [__assign({}, output)];\n                _h = {};\n                return [4 /*yield*/, parseBody(output.body, context)];\n            case 1:\n                parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));\n                errorCode = \"UnknownError\";\n                errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n                _b = errorCode;\n                switch (_b) {\n                    case \"InternalErrorException\": return [3 /*break*/, 2];\n                    case \"com.amazonaws.cognitoidentity#InternalErrorException\": return [3 /*break*/, 2];\n                    case \"InvalidParameterException\": return [3 /*break*/, 4];\n                    case \"com.amazonaws.cognitoidentity#InvalidParameterException\": return [3 /*break*/, 4];\n                    case \"NotAuthorizedException\": return [3 /*break*/, 6];\n                    case \"com.amazonaws.cognitoidentity#NotAuthorizedException\": return [3 /*break*/, 6];\n                    case \"ResourceNotFoundException\": return [3 /*break*/, 8];\n                    case \"com.amazonaws.cognitoidentity#ResourceNotFoundException\": return [3 /*break*/, 8];\n                    case \"TooManyRequestsException\": return [3 /*break*/, 10];\n                    case \"com.amazonaws.cognitoidentity#TooManyRequestsException\": return [3 /*break*/, 10];\n                }\n                return [3 /*break*/, 12];\n            case 2:\n                _c = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)];\n            case 3:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 13];\n            case 4:\n                _d = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];\n            case 5:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 13];\n            case 6:\n                _e = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)];\n            case 7:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 13];\n            case 8:\n                _f = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];\n            case 9:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 13];\n            case 10:\n                _g = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];\n            case 11:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 13];\n            case 12:\n                parsedBody = parsedOutput.body;\n                errorCode = parsedBody.code || parsedBody.Code || errorCode;\n                response = __assign(__assign({}, parsedBody), { name: \"\" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: \"client\", $metadata: deserializeMetadata(output) });\n                _j.label = 13;\n            case 13:\n                message = response.message || response.Message || errorCode;\n                response.message = message;\n                delete response.Message;\n                return [2 /*return*/, Promise.reject(Object.assign(new Error(message), response))];\n        }\n    });\n}); };\nexport var deserializeAws_json1_1UnlinkDeveloperIdentityCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var response;\n    return __generator(this, function (_a) {\n        switch (_a.label) {\n            case 0:\n                if (output.statusCode >= 300) {\n                    return [2 /*return*/, deserializeAws_json1_1UnlinkDeveloperIdentityCommandError(output, context)];\n                }\n                return [4 /*yield*/, collectBody(output.body, context)];\n            case 1:\n                _a.sent();\n                response = {\n                    $metadata: deserializeMetadata(output),\n                };\n                return [2 /*return*/, Promise.resolve(response)];\n        }\n    });\n}); };\nvar deserializeAws_json1_1UnlinkDeveloperIdentityCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, parsedBody, message;\n    var _j;\n    return __generator(this, function (_k) {\n        switch (_k.label) {\n            case 0:\n                _a = [__assign({}, output)];\n                _j = {};\n                return [4 /*yield*/, parseBody(output.body, context)];\n            case 1:\n                parsedOutput = __assign.apply(void 0, _a.concat([(_j.body = _k.sent(), _j)]));\n                errorCode = \"UnknownError\";\n                errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n                _b = errorCode;\n                switch (_b) {\n                    case \"InternalErrorException\": return [3 /*break*/, 2];\n                    case \"com.amazonaws.cognitoidentity#InternalErrorException\": return [3 /*break*/, 2];\n                    case \"InvalidParameterException\": return [3 /*break*/, 4];\n                    case \"com.amazonaws.cognitoidentity#InvalidParameterException\": return [3 /*break*/, 4];\n                    case \"NotAuthorizedException\": return [3 /*break*/, 6];\n                    case \"com.amazonaws.cognitoidentity#NotAuthorizedException\": return [3 /*break*/, 6];\n                    case \"ResourceConflictException\": return [3 /*break*/, 8];\n                    case \"com.amazonaws.cognitoidentity#ResourceConflictException\": return [3 /*break*/, 8];\n                    case \"ResourceNotFoundException\": return [3 /*break*/, 10];\n                    case \"com.amazonaws.cognitoidentity#ResourceNotFoundException\": return [3 /*break*/, 10];\n                    case \"TooManyRequestsException\": return [3 /*break*/, 12];\n                    case \"com.amazonaws.cognitoidentity#TooManyRequestsException\": return [3 /*break*/, 12];\n                }\n                return [3 /*break*/, 14];\n            case 2:\n                _c = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)];\n            case 3:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 15];\n            case 4:\n                _d = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];\n            case 5:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 15];\n            case 6:\n                _e = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)];\n            case 7:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 15];\n            case 8:\n                _f = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1ResourceConflictExceptionResponse(parsedOutput, context)];\n            case 9:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 15];\n            case 10:\n                _g = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];\n            case 11:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 15];\n            case 12:\n                _h = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];\n            case 13:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 15];\n            case 14:\n                parsedBody = parsedOutput.body;\n                errorCode = parsedBody.code || parsedBody.Code || errorCode;\n                response = __assign(__assign({}, parsedBody), { name: \"\" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: \"client\", $metadata: deserializeMetadata(output) });\n                _k.label = 15;\n            case 15:\n                message = response.message || response.Message || errorCode;\n                response.message = message;\n                delete response.Message;\n                return [2 /*return*/, Promise.reject(Object.assign(new Error(message), response))];\n        }\n    });\n}); };\nexport var deserializeAws_json1_1UnlinkIdentityCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var response;\n    return __generator(this, function (_a) {\n        switch (_a.label) {\n            case 0:\n                if (output.statusCode >= 300) {\n                    return [2 /*return*/, deserializeAws_json1_1UnlinkIdentityCommandError(output, context)];\n                }\n                return [4 /*yield*/, collectBody(output.body, context)];\n            case 1:\n                _a.sent();\n                response = {\n                    $metadata: deserializeMetadata(output),\n                };\n                return [2 /*return*/, Promise.resolve(response)];\n        }\n    });\n}); };\nvar deserializeAws_json1_1UnlinkIdentityCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, _j, parsedBody, message;\n    var _k;\n    return __generator(this, function (_l) {\n        switch (_l.label) {\n            case 0:\n                _a = [__assign({}, output)];\n                _k = {};\n                return [4 /*yield*/, parseBody(output.body, context)];\n            case 1:\n                parsedOutput = __assign.apply(void 0, _a.concat([(_k.body = _l.sent(), _k)]));\n                errorCode = \"UnknownError\";\n                errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n                _b = errorCode;\n                switch (_b) {\n                    case \"ExternalServiceException\": return [3 /*break*/, 2];\n                    case \"com.amazonaws.cognitoidentity#ExternalServiceException\": return [3 /*break*/, 2];\n                    case \"InternalErrorException\": return [3 /*break*/, 4];\n                    case \"com.amazonaws.cognitoidentity#InternalErrorException\": return [3 /*break*/, 4];\n                    case \"InvalidParameterException\": return [3 /*break*/, 6];\n                    case \"com.amazonaws.cognitoidentity#InvalidParameterException\": return [3 /*break*/, 6];\n                    case \"NotAuthorizedException\": return [3 /*break*/, 8];\n                    case \"com.amazonaws.cognitoidentity#NotAuthorizedException\": return [3 /*break*/, 8];\n                    case \"ResourceConflictException\": return [3 /*break*/, 10];\n                    case \"com.amazonaws.cognitoidentity#ResourceConflictException\": return [3 /*break*/, 10];\n                    case \"ResourceNotFoundException\": return [3 /*break*/, 12];\n                    case \"com.amazonaws.cognitoidentity#ResourceNotFoundException\": return [3 /*break*/, 12];\n                    case \"TooManyRequestsException\": return [3 /*break*/, 14];\n                    case \"com.amazonaws.cognitoidentity#TooManyRequestsException\": return [3 /*break*/, 14];\n                }\n                return [3 /*break*/, 16];\n            case 2:\n                _c = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1ExternalServiceExceptionResponse(parsedOutput, context)];\n            case 3:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 17];\n            case 4:\n                _d = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)];\n            case 5:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 17];\n            case 6:\n                _e = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];\n            case 7:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 17];\n            case 8:\n                _f = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)];\n            case 9:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 17];\n            case 10:\n                _g = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1ResourceConflictExceptionResponse(parsedOutput, context)];\n            case 11:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 17];\n            case 12:\n                _h = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];\n            case 13:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 17];\n            case 14:\n                _j = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];\n            case 15:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 17];\n            case 16:\n                parsedBody = parsedOutput.body;\n                errorCode = parsedBody.code || parsedBody.Code || errorCode;\n                response = __assign(__assign({}, parsedBody), { name: \"\" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: \"client\", $metadata: deserializeMetadata(output) });\n                _l.label = 17;\n            case 17:\n                message = response.message || response.Message || errorCode;\n                response.message = message;\n                delete response.Message;\n                return [2 /*return*/, Promise.reject(Object.assign(new Error(message), response))];\n        }\n    });\n}); };\nexport var deserializeAws_json1_1UntagResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var data, contents, response;\n    return __generator(this, function (_a) {\n        switch (_a.label) {\n            case 0:\n                if (output.statusCode >= 300) {\n                    return [2 /*return*/, deserializeAws_json1_1UntagResourceCommandError(output, context)];\n                }\n                return [4 /*yield*/, parseBody(output.body, context)];\n            case 1:\n                data = _a.sent();\n                contents = {};\n                contents = deserializeAws_json1_1UntagResourceResponse(data, context);\n                response = __assign({ $metadata: deserializeMetadata(output) }, contents);\n                return [2 /*return*/, Promise.resolve(response)];\n        }\n    });\n}); };\nvar deserializeAws_json1_1UntagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;\n    var _h;\n    return __generator(this, function (_j) {\n        switch (_j.label) {\n            case 0:\n                _a = [__assign({}, output)];\n                _h = {};\n                return [4 /*yield*/, parseBody(output.body, context)];\n            case 1:\n                parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));\n                errorCode = \"UnknownError\";\n                errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n                _b = errorCode;\n                switch (_b) {\n                    case \"InternalErrorException\": return [3 /*break*/, 2];\n                    case \"com.amazonaws.cognitoidentity#InternalErrorException\": return [3 /*break*/, 2];\n                    case \"InvalidParameterException\": return [3 /*break*/, 4];\n                    case \"com.amazonaws.cognitoidentity#InvalidParameterException\": return [3 /*break*/, 4];\n                    case \"NotAuthorizedException\": return [3 /*break*/, 6];\n                    case \"com.amazonaws.cognitoidentity#NotAuthorizedException\": return [3 /*break*/, 6];\n                    case \"ResourceNotFoundException\": return [3 /*break*/, 8];\n                    case \"com.amazonaws.cognitoidentity#ResourceNotFoundException\": return [3 /*break*/, 8];\n                    case \"TooManyRequestsException\": return [3 /*break*/, 10];\n                    case \"com.amazonaws.cognitoidentity#TooManyRequestsException\": return [3 /*break*/, 10];\n                }\n                return [3 /*break*/, 12];\n            case 2:\n                _c = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)];\n            case 3:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 13];\n            case 4:\n                _d = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];\n            case 5:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 13];\n            case 6:\n                _e = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)];\n            case 7:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 13];\n            case 8:\n                _f = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];\n            case 9:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 13];\n            case 10:\n                _g = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];\n            case 11:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 13];\n            case 12:\n                parsedBody = parsedOutput.body;\n                errorCode = parsedBody.code || parsedBody.Code || errorCode;\n                response = __assign(__assign({}, parsedBody), { name: \"\" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: \"client\", $metadata: deserializeMetadata(output) });\n                _j.label = 13;\n            case 13:\n                message = response.message || response.Message || errorCode;\n                response.message = message;\n                delete response.Message;\n                return [2 /*return*/, Promise.reject(Object.assign(new Error(message), response))];\n        }\n    });\n}); };\nexport var deserializeAws_json1_1UpdateIdentityPoolCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var data, contents, response;\n    return __generator(this, function (_a) {\n        switch (_a.label) {\n            case 0:\n                if (output.statusCode >= 300) {\n                    return [2 /*return*/, deserializeAws_json1_1UpdateIdentityPoolCommandError(output, context)];\n                }\n                return [4 /*yield*/, parseBody(output.body, context)];\n            case 1:\n                data = _a.sent();\n                contents = {};\n                contents = deserializeAws_json1_1IdentityPool(data, context);\n                response = __assign({ $metadata: deserializeMetadata(output) }, contents);\n                return [2 /*return*/, Promise.resolve(response)];\n        }\n    });\n}); };\nvar deserializeAws_json1_1UpdateIdentityPoolCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, _j, _k, parsedBody, message;\n    var _l;\n    return __generator(this, function (_m) {\n        switch (_m.label) {\n            case 0:\n                _a = [__assign({}, output)];\n                _l = {};\n                return [4 /*yield*/, parseBody(output.body, context)];\n            case 1:\n                parsedOutput = __assign.apply(void 0, _a.concat([(_l.body = _m.sent(), _l)]));\n                errorCode = \"UnknownError\";\n                errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n                _b = errorCode;\n                switch (_b) {\n                    case \"ConcurrentModificationException\": return [3 /*break*/, 2];\n                    case \"com.amazonaws.cognitoidentity#ConcurrentModificationException\": return [3 /*break*/, 2];\n                    case \"InternalErrorException\": return [3 /*break*/, 4];\n                    case \"com.amazonaws.cognitoidentity#InternalErrorException\": return [3 /*break*/, 4];\n                    case \"InvalidParameterException\": return [3 /*break*/, 6];\n                    case \"com.amazonaws.cognitoidentity#InvalidParameterException\": return [3 /*break*/, 6];\n                    case \"LimitExceededException\": return [3 /*break*/, 8];\n                    case \"com.amazonaws.cognitoidentity#LimitExceededException\": return [3 /*break*/, 8];\n                    case \"NotAuthorizedException\": return [3 /*break*/, 10];\n                    case \"com.amazonaws.cognitoidentity#NotAuthorizedException\": return [3 /*break*/, 10];\n                    case \"ResourceConflictException\": return [3 /*break*/, 12];\n                    case \"com.amazonaws.cognitoidentity#ResourceConflictException\": return [3 /*break*/, 12];\n                    case \"ResourceNotFoundException\": return [3 /*break*/, 14];\n                    case \"com.amazonaws.cognitoidentity#ResourceNotFoundException\": return [3 /*break*/, 14];\n                    case \"TooManyRequestsException\": return [3 /*break*/, 16];\n                    case \"com.amazonaws.cognitoidentity#TooManyRequestsException\": return [3 /*break*/, 16];\n                }\n                return [3 /*break*/, 18];\n            case 2:\n                _c = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1ConcurrentModificationExceptionResponse(parsedOutput, context)];\n            case 3:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 19];\n            case 4:\n                _d = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)];\n            case 5:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 19];\n            case 6:\n                _e = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];\n            case 7:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 19];\n            case 8:\n                _f = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)];\n            case 9:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 19];\n            case 10:\n                _g = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)];\n            case 11:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 19];\n            case 12:\n                _h = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1ResourceConflictExceptionResponse(parsedOutput, context)];\n            case 13:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 19];\n            case 14:\n                _j = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];\n            case 15:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 19];\n            case 16:\n                _k = [{}];\n                return [4 /*yield*/, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];\n            case 17:\n                response = __assign.apply(void 0, [__assign.apply(void 0, _k.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);\n                return [3 /*break*/, 19];\n            case 18:\n                parsedBody = parsedOutput.body;\n                errorCode = parsedBody.code || parsedBody.Code || errorCode;\n                response = __assign(__assign({}, parsedBody), { name: \"\" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: \"client\", $metadata: deserializeMetadata(output) });\n                _m.label = 19;\n            case 19:\n                message = response.message || response.Message || errorCode;\n                response.message = message;\n                delete response.Message;\n                return [2 /*return*/, Promise.reject(Object.assign(new Error(message), response))];\n        }\n    });\n}); };\nvar deserializeAws_json1_1ConcurrentModificationExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var body, deserialized, contents;\n    return __generator(this, function (_a) {\n        body = parsedOutput.body;\n        deserialized = deserializeAws_json1_1ConcurrentModificationException(body, context);\n        contents = __assign({ name: \"ConcurrentModificationException\", $fault: \"client\", $metadata: deserializeMetadata(parsedOutput) }, deserialized);\n        return [2 /*return*/, contents];\n    });\n}); };\nvar deserializeAws_json1_1DeveloperUserAlreadyRegisteredExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var body, deserialized, contents;\n    return __generator(this, function (_a) {\n        body = parsedOutput.body;\n        deserialized = deserializeAws_json1_1DeveloperUserAlreadyRegisteredException(body, context);\n        contents = __assign({ name: \"DeveloperUserAlreadyRegisteredException\", $fault: \"client\", $metadata: deserializeMetadata(parsedOutput) }, deserialized);\n        return [2 /*return*/, contents];\n    });\n}); };\nvar deserializeAws_json1_1ExternalServiceExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var body, deserialized, contents;\n    return __generator(this, function (_a) {\n        body = parsedOutput.body;\n        deserialized = deserializeAws_json1_1ExternalServiceException(body, context);\n        contents = __assign({ name: \"ExternalServiceException\", $fault: \"client\", $metadata: deserializeMetadata(parsedOutput) }, deserialized);\n        return [2 /*return*/, contents];\n    });\n}); };\nvar deserializeAws_json1_1InternalErrorExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var body, deserialized, contents;\n    return __generator(this, function (_a) {\n        body = parsedOutput.body;\n        deserialized = deserializeAws_json1_1InternalErrorException(body, context);\n        contents = __assign({ name: \"InternalErrorException\", $fault: \"server\", $metadata: deserializeMetadata(parsedOutput) }, deserialized);\n        return [2 /*return*/, contents];\n    });\n}); };\nvar deserializeAws_json1_1InvalidIdentityPoolConfigurationExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var body, deserialized, contents;\n    return __generator(this, function (_a) {\n        body = parsedOutput.body;\n        deserialized = deserializeAws_json1_1InvalidIdentityPoolConfigurationException(body, context);\n        contents = __assign({ name: \"InvalidIdentityPoolConfigurationException\", $fault: \"client\", $metadata: deserializeMetadata(parsedOutput) }, deserialized);\n        return [2 /*return*/, contents];\n    });\n}); };\nvar deserializeAws_json1_1InvalidParameterExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var body, deserialized, contents;\n    return __generator(this, function (_a) {\n        body = parsedOutput.body;\n        deserialized = deserializeAws_json1_1InvalidParameterException(body, context);\n        contents = __assign({ name: \"InvalidParameterException\", $fault: \"client\", $metadata: deserializeMetadata(parsedOutput) }, deserialized);\n        return [2 /*return*/, contents];\n    });\n}); };\nvar deserializeAws_json1_1LimitExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var body, deserialized, contents;\n    return __generator(this, function (_a) {\n        body = parsedOutput.body;\n        deserialized = deserializeAws_json1_1LimitExceededException(body, context);\n        contents = __assign({ name: \"LimitExceededException\", $fault: \"client\", $metadata: deserializeMetadata(parsedOutput) }, deserialized);\n        return [2 /*return*/, contents];\n    });\n}); };\nvar deserializeAws_json1_1NotAuthorizedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var body, deserialized, contents;\n    return __generator(this, function (_a) {\n        body = parsedOutput.body;\n        deserialized = deserializeAws_json1_1NotAuthorizedException(body, context);\n        contents = __assign({ name: \"NotAuthorizedException\", $fault: \"client\", $metadata: deserializeMetadata(parsedOutput) }, deserialized);\n        return [2 /*return*/, contents];\n    });\n}); };\nvar deserializeAws_json1_1ResourceConflictExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var body, deserialized, contents;\n    return __generator(this, function (_a) {\n        body = parsedOutput.body;\n        deserialized = deserializeAws_json1_1ResourceConflictException(body, context);\n        contents = __assign({ name: \"ResourceConflictException\", $fault: \"client\", $metadata: deserializeMetadata(parsedOutput) }, deserialized);\n        return [2 /*return*/, contents];\n    });\n}); };\nvar deserializeAws_json1_1ResourceNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var body, deserialized, contents;\n    return __generator(this, function (_a) {\n        body = parsedOutput.body;\n        deserialized = deserializeAws_json1_1ResourceNotFoundException(body, context);\n        contents = __assign({ name: \"ResourceNotFoundException\", $fault: \"client\", $metadata: deserializeMetadata(parsedOutput) }, deserialized);\n        return [2 /*return*/, contents];\n    });\n}); };\nvar deserializeAws_json1_1TooManyRequestsExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {\n    var body, deserialized, contents;\n    return __generator(this, function (_a) {\n        body = parsedOutput.body;\n        deserialized = deserializeAws_json1_1TooManyRequestsException(body, context);\n        contents = __assign({ name: \"TooManyRequestsException\", $fault: \"client\", $metadata: deserializeMetadata(parsedOutput) }, deserialized);\n        return [2 /*return*/, contents];\n    });\n}); };\nvar serializeAws_json1_1CognitoIdentityProvider = function (input, context) {\n    return __assign(__assign(__assign({}, (input.ClientId !== undefined && input.ClientId !== null && { ClientId: input.ClientId })), (input.ProviderName !== undefined && input.ProviderName !== null && { ProviderName: input.ProviderName })), (input.ServerSideTokenCheck !== undefined &&\n        input.ServerSideTokenCheck !== null && { ServerSideTokenCheck: input.ServerSideTokenCheck }));\n};\nvar serializeAws_json1_1CognitoIdentityProviderList = function (input, context) {\n    return input\n        .filter(function (e) { return e != null; })\n        .map(function (entry) {\n        if (entry === null) {\n            return null;\n        }\n        return serializeAws_json1_1CognitoIdentityProvider(entry, context);\n    });\n};\nvar serializeAws_json1_1CreateIdentityPoolInput = function (input, context) {\n    return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.AllowClassicFlow !== undefined &&\n        input.AllowClassicFlow !== null && { AllowClassicFlow: input.AllowClassicFlow })), (input.AllowUnauthenticatedIdentities !== undefined &&\n        input.AllowUnauthenticatedIdentities !== null && {\n        AllowUnauthenticatedIdentities: input.AllowUnauthenticatedIdentities,\n    })), (input.CognitoIdentityProviders !== undefined &&\n        input.CognitoIdentityProviders !== null && {\n        CognitoIdentityProviders: serializeAws_json1_1CognitoIdentityProviderList(input.CognitoIdentityProviders, context),\n    })), (input.DeveloperProviderName !== undefined &&\n        input.DeveloperProviderName !== null && { DeveloperProviderName: input.DeveloperProviderName })), (input.IdentityPoolName !== undefined &&\n        input.IdentityPoolName !== null && { IdentityPoolName: input.IdentityPoolName })), (input.IdentityPoolTags !== undefined &&\n        input.IdentityPoolTags !== null && {\n        IdentityPoolTags: serializeAws_json1_1IdentityPoolTagsType(input.IdentityPoolTags, context),\n    })), (input.OpenIdConnectProviderARNs !== undefined &&\n        input.OpenIdConnectProviderARNs !== null && {\n        OpenIdConnectProviderARNs: serializeAws_json1_1OIDCProviderList(input.OpenIdConnectProviderARNs, context),\n    })), (input.SamlProviderARNs !== undefined &&\n        input.SamlProviderARNs !== null && {\n        SamlProviderARNs: serializeAws_json1_1SAMLProviderList(input.SamlProviderARNs, context),\n    })), (input.SupportedLoginProviders !== undefined &&\n        input.SupportedLoginProviders !== null && {\n        SupportedLoginProviders: serializeAws_json1_1IdentityProviders(input.SupportedLoginProviders, context),\n    }));\n};\nvar serializeAws_json1_1DeleteIdentitiesInput = function (input, context) {\n    return __assign({}, (input.IdentityIdsToDelete !== undefined &&\n        input.IdentityIdsToDelete !== null && {\n        IdentityIdsToDelete: serializeAws_json1_1IdentityIdList(input.IdentityIdsToDelete, context),\n    }));\n};\nvar serializeAws_json1_1DeleteIdentityPoolInput = function (input, context) {\n    return __assign({}, (input.IdentityPoolId !== undefined &&\n        input.IdentityPoolId !== null && { IdentityPoolId: input.IdentityPoolId }));\n};\nvar serializeAws_json1_1DescribeIdentityInput = function (input, context) {\n    return __assign({}, (input.IdentityId !== undefined && input.IdentityId !== null && { IdentityId: input.IdentityId }));\n};\nvar serializeAws_json1_1DescribeIdentityPoolInput = function (input, context) {\n    return __assign({}, (input.IdentityPoolId !== undefined &&\n        input.IdentityPoolId !== null && { IdentityPoolId: input.IdentityPoolId }));\n};\nvar serializeAws_json1_1GetCredentialsForIdentityInput = function (input, context) {\n    return __assign(__assign(__assign({}, (input.CustomRoleArn !== undefined && input.CustomRoleArn !== null && { CustomRoleArn: input.CustomRoleArn })), (input.IdentityId !== undefined && input.IdentityId !== null && { IdentityId: input.IdentityId })), (input.Logins !== undefined &&\n        input.Logins !== null && { Logins: serializeAws_json1_1LoginsMap(input.Logins, context) }));\n};\nvar serializeAws_json1_1GetIdentityPoolRolesInput = function (input, context) {\n    return __assign({}, (input.IdentityPoolId !== undefined &&\n        input.IdentityPoolId !== null && { IdentityPoolId: input.IdentityPoolId }));\n};\nvar serializeAws_json1_1GetIdInput = function (input, context) {\n    return __assign(__assign(__assign({}, (input.AccountId !== undefined && input.AccountId !== null && { AccountId: input.AccountId })), (input.IdentityPoolId !== undefined &&\n        input.IdentityPoolId !== null && { IdentityPoolId: input.IdentityPoolId })), (input.Logins !== undefined &&\n        input.Logins !== null && { Logins: serializeAws_json1_1LoginsMap(input.Logins, context) }));\n};\nvar serializeAws_json1_1GetOpenIdTokenForDeveloperIdentityInput = function (input, context) {\n    return __assign(__assign(__assign(__assign({}, (input.IdentityId !== undefined && input.IdentityId !== null && { IdentityId: input.IdentityId })), (input.IdentityPoolId !== undefined &&\n        input.IdentityPoolId !== null && { IdentityPoolId: input.IdentityPoolId })), (input.Logins !== undefined &&\n        input.Logins !== null && { Logins: serializeAws_json1_1LoginsMap(input.Logins, context) })), (input.TokenDuration !== undefined && input.TokenDuration !== null && { TokenDuration: input.TokenDuration }));\n};\nvar serializeAws_json1_1GetOpenIdTokenInput = function (input, context) {\n    return __assign(__assign({}, (input.IdentityId !== undefined && input.IdentityId !== null && { IdentityId: input.IdentityId })), (input.Logins !== undefined &&\n        input.Logins !== null && { Logins: serializeAws_json1_1LoginsMap(input.Logins, context) }));\n};\nvar serializeAws_json1_1IdentityIdList = function (input, context) {\n    return input\n        .filter(function (e) { return e != null; })\n        .map(function (entry) {\n        if (entry === null) {\n            return null;\n        }\n        return entry;\n    });\n};\nvar serializeAws_json1_1IdentityPool = function (input, context) {\n    return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.AllowClassicFlow !== undefined &&\n        input.AllowClassicFlow !== null && { AllowClassicFlow: input.AllowClassicFlow })), (input.AllowUnauthenticatedIdentities !== undefined &&\n        input.AllowUnauthenticatedIdentities !== null && {\n        AllowUnauthenticatedIdentities: input.AllowUnauthenticatedIdentities,\n    })), (input.CognitoIdentityProviders !== undefined &&\n        input.CognitoIdentityProviders !== null && {\n        CognitoIdentityProviders: serializeAws_json1_1CognitoIdentityProviderList(input.CognitoIdentityProviders, context),\n    })), (input.DeveloperProviderName !== undefined &&\n        input.DeveloperProviderName !== null && { DeveloperProviderName: input.DeveloperProviderName })), (input.IdentityPoolId !== undefined &&\n        input.IdentityPoolId !== null && { IdentityPoolId: input.IdentityPoolId })), (input.IdentityPoolName !== undefined &&\n        input.IdentityPoolName !== null && { IdentityPoolName: input.IdentityPoolName })), (input.IdentityPoolTags !== undefined &&\n        input.IdentityPoolTags !== null && {\n        IdentityPoolTags: serializeAws_json1_1IdentityPoolTagsType(input.IdentityPoolTags, context),\n    })), (input.OpenIdConnectProviderARNs !== undefined &&\n        input.OpenIdConnectProviderARNs !== null && {\n        OpenIdConnectProviderARNs: serializeAws_json1_1OIDCProviderList(input.OpenIdConnectProviderARNs, context),\n    })), (input.SamlProviderARNs !== undefined &&\n        input.SamlProviderARNs !== null && {\n        SamlProviderARNs: serializeAws_json1_1SAMLProviderList(input.SamlProviderARNs, context),\n    })), (input.SupportedLoginProviders !== undefined &&\n        input.SupportedLoginProviders !== null && {\n        SupportedLoginProviders: serializeAws_json1_1IdentityProviders(input.SupportedLoginProviders, context),\n    }));\n};\nvar serializeAws_json1_1IdentityPoolTagsListType = function (input, context) {\n    return input\n        .filter(function (e) { return e != null; })\n        .map(function (entry) {\n        if (entry === null) {\n            return null;\n        }\n        return entry;\n    });\n};\nvar serializeAws_json1_1IdentityPoolTagsType = function (input, context) {\n    return Object.entries(input).reduce(function (acc, _a) {\n        var _b;\n        var _c = __read(_a, 2), key = _c[0], value = _c[1];\n        if (value === null) {\n            return acc;\n        }\n        return __assign(__assign({}, acc), (_b = {}, _b[key] = value, _b));\n    }, {});\n};\nvar serializeAws_json1_1IdentityProviders = function (input, context) {\n    return Object.entries(input).reduce(function (acc, _a) {\n        var _b;\n        var _c = __read(_a, 2), key = _c[0], value = _c[1];\n        if (value === null) {\n            return acc;\n        }\n        return __assign(__assign({}, acc), (_b = {}, _b[key] = value, _b));\n    }, {});\n};\nvar serializeAws_json1_1ListIdentitiesInput = function (input, context) {\n    return __assign(__assign(__assign(__assign({}, (input.HideDisabled !== undefined && input.HideDisabled !== null && { HideDisabled: input.HideDisabled })), (input.IdentityPoolId !== undefined &&\n        input.IdentityPoolId !== null && { IdentityPoolId: input.IdentityPoolId })), (input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults })), (input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }));\n};\nvar serializeAws_json1_1ListIdentityPoolsInput = function (input, context) {\n    return __assign(__assign({}, (input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults })), (input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }));\n};\nvar serializeAws_json1_1ListTagsForResourceInput = function (input, context) {\n    return __assign({}, (input.ResourceArn !== undefined && input.ResourceArn !== null && { ResourceArn: input.ResourceArn }));\n};\nvar serializeAws_json1_1LoginsList = function (input, context) {\n    return input\n        .filter(function (e) { return e != null; })\n        .map(function (entry) {\n        if (entry === null) {\n            return null;\n        }\n        return entry;\n    });\n};\nvar serializeAws_json1_1LoginsMap = function (input, context) {\n    return Object.entries(input).reduce(function (acc, _a) {\n        var _b;\n        var _c = __read(_a, 2), key = _c[0], value = _c[1];\n        if (value === null) {\n            return acc;\n        }\n        return __assign(__assign({}, acc), (_b = {}, _b[key] = value, _b));\n    }, {});\n};\nvar serializeAws_json1_1LookupDeveloperIdentityInput = function (input, context) {\n    return __assign(__assign(__assign(__assign(__assign({}, (input.DeveloperUserIdentifier !== undefined &&\n        input.DeveloperUserIdentifier !== null && { DeveloperUserIdentifier: input.DeveloperUserIdentifier })), (input.IdentityId !== undefined && input.IdentityId !== null && { IdentityId: input.IdentityId })), (input.IdentityPoolId !== undefined &&\n        input.IdentityPoolId !== null && { IdentityPoolId: input.IdentityPoolId })), (input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults })), (input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }));\n};\nvar serializeAws_json1_1MappingRule = function (input, context) {\n    return __assign(__assign(__assign(__assign({}, (input.Claim !== undefined && input.Claim !== null && { Claim: input.Claim })), (input.MatchType !== undefined && input.MatchType !== null && { MatchType: input.MatchType })), (input.RoleARN !== undefined && input.RoleARN !== null && { RoleARN: input.RoleARN })), (input.Value !== undefined && input.Value !== null && { Value: input.Value }));\n};\nvar serializeAws_json1_1MappingRulesList = function (input, context) {\n    return input\n        .filter(function (e) { return e != null; })\n        .map(function (entry) {\n        if (entry === null) {\n            return null;\n        }\n        return serializeAws_json1_1MappingRule(entry, context);\n    });\n};\nvar serializeAws_json1_1MergeDeveloperIdentitiesInput = function (input, context) {\n    return __assign(__assign(__assign(__assign({}, (input.DestinationUserIdentifier !== undefined &&\n        input.DestinationUserIdentifier !== null && { DestinationUserIdentifier: input.DestinationUserIdentifier })), (input.DeveloperProviderName !== undefined &&\n        input.DeveloperProviderName !== null && { DeveloperProviderName: input.DeveloperProviderName })), (input.IdentityPoolId !== undefined &&\n        input.IdentityPoolId !== null && { IdentityPoolId: input.IdentityPoolId })), (input.SourceUserIdentifier !== undefined &&\n        input.SourceUserIdentifier !== null && { SourceUserIdentifier: input.SourceUserIdentifier }));\n};\nvar serializeAws_json1_1OIDCProviderList = function (input, context) {\n    return input\n        .filter(function (e) { return e != null; })\n        .map(function (entry) {\n        if (entry === null) {\n            return null;\n        }\n        return entry;\n    });\n};\nvar serializeAws_json1_1RoleMapping = function (input, context) {\n    return __assign(__assign(__assign({}, (input.AmbiguousRoleResolution !== undefined &&\n        input.AmbiguousRoleResolution !== null && { AmbiguousRoleResolution: input.AmbiguousRoleResolution })), (input.RulesConfiguration !== undefined &&\n        input.RulesConfiguration !== null && {\n        RulesConfiguration: serializeAws_json1_1RulesConfigurationType(input.RulesConfiguration, context),\n    })), (input.Type !== undefined && input.Type !== null && { Type: input.Type }));\n};\nvar serializeAws_json1_1RoleMappingMap = function (input, context) {\n    return Object.entries(input).reduce(function (acc, _a) {\n        var _b;\n        var _c = __read(_a, 2), key = _c[0], value = _c[1];\n        if (value === null) {\n            return acc;\n        }\n        return __assign(__assign({}, acc), (_b = {}, _b[key] = serializeAws_json1_1RoleMapping(value, context), _b));\n    }, {});\n};\nvar serializeAws_json1_1RolesMap = function (input, context) {\n    return Object.entries(input).reduce(function (acc, _a) {\n        var _b;\n        var _c = __read(_a, 2), key = _c[0], value = _c[1];\n        if (value === null) {\n            return acc;\n        }\n        return __assign(__assign({}, acc), (_b = {}, _b[key] = value, _b));\n    }, {});\n};\nvar serializeAws_json1_1RulesConfigurationType = function (input, context) {\n    return __assign({}, (input.Rules !== undefined &&\n        input.Rules !== null && { Rules: serializeAws_json1_1MappingRulesList(input.Rules, context) }));\n};\nvar serializeAws_json1_1SAMLProviderList = function (input, context) {\n    return input\n        .filter(function (e) { return e != null; })\n        .map(function (entry) {\n        if (entry === null) {\n            return null;\n        }\n        return entry;\n    });\n};\nvar serializeAws_json1_1SetIdentityPoolRolesInput = function (input, context) {\n    return __assign(__assign(__assign({}, (input.IdentityPoolId !== undefined &&\n        input.IdentityPoolId !== null && { IdentityPoolId: input.IdentityPoolId })), (input.RoleMappings !== undefined &&\n        input.RoleMappings !== null && { RoleMappings: serializeAws_json1_1RoleMappingMap(input.RoleMappings, context) })), (input.Roles !== undefined &&\n        input.Roles !== null && { Roles: serializeAws_json1_1RolesMap(input.Roles, context) }));\n};\nvar serializeAws_json1_1TagResourceInput = function (input, context) {\n    return __assign(__assign({}, (input.ResourceArn !== undefined && input.ResourceArn !== null && { ResourceArn: input.ResourceArn })), (input.Tags !== undefined &&\n        input.Tags !== null && { Tags: serializeAws_json1_1IdentityPoolTagsType(input.Tags, context) }));\n};\nvar serializeAws_json1_1UnlinkDeveloperIdentityInput = function (input, context) {\n    return __assign(__assign(__assign(__assign({}, (input.DeveloperProviderName !== undefined &&\n        input.DeveloperProviderName !== null && { DeveloperProviderName: input.DeveloperProviderName })), (input.DeveloperUserIdentifier !== undefined &&\n        input.DeveloperUserIdentifier !== null && { DeveloperUserIdentifier: input.DeveloperUserIdentifier })), (input.IdentityId !== undefined && input.IdentityId !== null && { IdentityId: input.IdentityId })), (input.IdentityPoolId !== undefined &&\n        input.IdentityPoolId !== null && { IdentityPoolId: input.IdentityPoolId }));\n};\nvar serializeAws_json1_1UnlinkIdentityInput = function (input, context) {\n    return __assign(__assign(__assign({}, (input.IdentityId !== undefined && input.IdentityId !== null && { IdentityId: input.IdentityId })), (input.Logins !== undefined &&\n        input.Logins !== null && { Logins: serializeAws_json1_1LoginsMap(input.Logins, context) })), (input.LoginsToRemove !== undefined &&\n        input.LoginsToRemove !== null && {\n        LoginsToRemove: serializeAws_json1_1LoginsList(input.LoginsToRemove, context),\n    }));\n};\nvar serializeAws_json1_1UntagResourceInput = function (input, context) {\n    return __assign(__assign({}, (input.ResourceArn !== undefined && input.ResourceArn !== null && { ResourceArn: input.ResourceArn })), (input.TagKeys !== undefined &&\n        input.TagKeys !== null && { TagKeys: serializeAws_json1_1IdentityPoolTagsListType(input.TagKeys, context) }));\n};\nvar deserializeAws_json1_1CognitoIdentityProvider = function (output, context) {\n    return {\n        ClientId: output.ClientId !== undefined && output.ClientId !== null ? output.ClientId : undefined,\n        ProviderName: output.ProviderName !== undefined && output.ProviderName !== null ? output.ProviderName : undefined,\n        ServerSideTokenCheck: output.ServerSideTokenCheck !== undefined && output.ServerSideTokenCheck !== null\n            ? output.ServerSideTokenCheck\n            : undefined,\n    };\n};\nvar deserializeAws_json1_1CognitoIdentityProviderList = function (output, context) {\n    return (output || [])\n        .filter(function (e) { return e != null; })\n        .map(function (entry) {\n        if (entry === null) {\n            return null;\n        }\n        return deserializeAws_json1_1CognitoIdentityProvider(entry, context);\n    });\n};\nvar deserializeAws_json1_1ConcurrentModificationException = function (output, context) {\n    return {\n        message: output.message !== undefined && output.message !== null ? output.message : undefined,\n    };\n};\nvar deserializeAws_json1_1Credentials = function (output, context) {\n    return {\n        AccessKeyId: output.AccessKeyId !== undefined && output.AccessKeyId !== null ? output.AccessKeyId : undefined,\n        Expiration: output.Expiration !== undefined && output.Expiration !== null\n            ? new Date(Math.round(output.Expiration * 1000))\n            : undefined,\n        SecretKey: output.SecretKey !== undefined && output.SecretKey !== null ? output.SecretKey : undefined,\n        SessionToken: output.SessionToken !== undefined && output.SessionToken !== null ? output.SessionToken : undefined,\n    };\n};\nvar deserializeAws_json1_1DeleteIdentitiesResponse = function (output, context) {\n    return {\n        UnprocessedIdentityIds: output.UnprocessedIdentityIds !== undefined && output.UnprocessedIdentityIds !== null\n            ? deserializeAws_json1_1UnprocessedIdentityIdList(output.UnprocessedIdentityIds, context)\n            : undefined,\n    };\n};\nvar deserializeAws_json1_1DeveloperUserAlreadyRegisteredException = function (output, context) {\n    return {\n        message: output.message !== undefined && output.message !== null ? output.message : undefined,\n    };\n};\nvar deserializeAws_json1_1DeveloperUserIdentifierList = function (output, context) {\n    return (output || [])\n        .filter(function (e) { return e != null; })\n        .map(function (entry) {\n        if (entry === null) {\n            return null;\n        }\n        return entry;\n    });\n};\nvar deserializeAws_json1_1ExternalServiceException = function (output, context) {\n    return {\n        message: output.message !== undefined && output.message !== null ? output.message : undefined,\n    };\n};\nvar deserializeAws_json1_1GetCredentialsForIdentityResponse = function (output, context) {\n    return {\n        Credentials: output.Credentials !== undefined && output.Credentials !== null\n            ? deserializeAws_json1_1Credentials(output.Credentials, context)\n            : undefined,\n        IdentityId: output.IdentityId !== undefined && output.IdentityId !== null ? output.IdentityId : undefined,\n    };\n};\nvar deserializeAws_json1_1GetIdentityPoolRolesResponse = function (output, context) {\n    return {\n        IdentityPoolId: output.IdentityPoolId !== undefined && output.IdentityPoolId !== null ? output.IdentityPoolId : undefined,\n        RoleMappings: output.RoleMappings !== undefined && output.RoleMappings !== null\n            ? deserializeAws_json1_1RoleMappingMap(output.RoleMappings, context)\n            : undefined,\n        Roles: output.Roles !== undefined && output.Roles !== null\n            ? deserializeAws_json1_1RolesMap(output.Roles, context)\n            : undefined,\n    };\n};\nvar deserializeAws_json1_1GetIdResponse = function (output, context) {\n    return {\n        IdentityId: output.IdentityId !== undefined && output.IdentityId !== null ? output.IdentityId : undefined,\n    };\n};\nvar deserializeAws_json1_1GetOpenIdTokenForDeveloperIdentityResponse = function (output, context) {\n    return {\n        IdentityId: output.IdentityId !== undefined && output.IdentityId !== null ? output.IdentityId : undefined,\n        Token: output.Token !== undefined && output.Token !== null ? output.Token : undefined,\n    };\n};\nvar deserializeAws_json1_1GetOpenIdTokenResponse = function (output, context) {\n    return {\n        IdentityId: output.IdentityId !== undefined && output.IdentityId !== null ? output.IdentityId : undefined,\n        Token: output.Token !== undefined && output.Token !== null ? output.Token : undefined,\n    };\n};\nvar deserializeAws_json1_1IdentitiesList = function (output, context) {\n    return (output || [])\n        .filter(function (e) { return e != null; })\n        .map(function (entry) {\n        if (entry === null) {\n            return null;\n        }\n        return deserializeAws_json1_1IdentityDescription(entry, context);\n    });\n};\nvar deserializeAws_json1_1IdentityDescription = function (output, context) {\n    return {\n        CreationDate: output.CreationDate !== undefined && output.CreationDate !== null\n            ? new Date(Math.round(output.CreationDate * 1000))\n            : undefined,\n        IdentityId: output.IdentityId !== undefined && output.IdentityId !== null ? output.IdentityId : undefined,\n        LastModifiedDate: output.LastModifiedDate !== undefined && output.LastModifiedDate !== null\n            ? new Date(Math.round(output.LastModifiedDate * 1000))\n            : undefined,\n        Logins: output.Logins !== undefined && output.Logins !== null\n            ? deserializeAws_json1_1LoginsList(output.Logins, context)\n            : undefined,\n    };\n};\nvar deserializeAws_json1_1IdentityPool = function (output, context) {\n    return {\n        AllowClassicFlow: output.AllowClassicFlow !== undefined && output.AllowClassicFlow !== null ? output.AllowClassicFlow : undefined,\n        AllowUnauthenticatedIdentities: output.AllowUnauthenticatedIdentities !== undefined && output.AllowUnauthenticatedIdentities !== null\n            ? output.AllowUnauthenticatedIdentities\n            : undefined,\n        CognitoIdentityProviders: output.CognitoIdentityProviders !== undefined && output.CognitoIdentityProviders !== null\n            ? deserializeAws_json1_1CognitoIdentityProviderList(output.CognitoIdentityProviders, context)\n            : undefined,\n        DeveloperProviderName: output.DeveloperProviderName !== undefined && output.DeveloperProviderName !== null\n            ? output.DeveloperProviderName\n            : undefined,\n        IdentityPoolId: output.IdentityPoolId !== undefined && output.IdentityPoolId !== null ? output.IdentityPoolId : undefined,\n        IdentityPoolName: output.IdentityPoolName !== undefined && output.IdentityPoolName !== null ? output.IdentityPoolName : undefined,\n        IdentityPoolTags: output.IdentityPoolTags !== undefined && output.IdentityPoolTags !== null\n            ? deserializeAws_json1_1IdentityPoolTagsType(output.IdentityPoolTags, context)\n            : undefined,\n        OpenIdConnectProviderARNs: output.OpenIdConnectProviderARNs !== undefined && output.OpenIdConnectProviderARNs !== null\n            ? deserializeAws_json1_1OIDCProviderList(output.OpenIdConnectProviderARNs, context)\n            : undefined,\n        SamlProviderARNs: output.SamlProviderARNs !== undefined && output.SamlProviderARNs !== null\n            ? deserializeAws_json1_1SAMLProviderList(output.SamlProviderARNs, context)\n            : undefined,\n        SupportedLoginProviders: output.SupportedLoginProviders !== undefined && output.SupportedLoginProviders !== null\n            ? deserializeAws_json1_1IdentityProviders(output.SupportedLoginProviders, context)\n            : undefined,\n    };\n};\nvar deserializeAws_json1_1IdentityPoolShortDescription = function (output, context) {\n    return {\n        IdentityPoolId: output.IdentityPoolId !== undefined && output.IdentityPoolId !== null ? output.IdentityPoolId : undefined,\n        IdentityPoolName: output.IdentityPoolName !== undefined && output.IdentityPoolName !== null ? output.IdentityPoolName : undefined,\n    };\n};\nvar deserializeAws_json1_1IdentityPoolsList = function (output, context) {\n    return (output || [])\n        .filter(function (e) { return e != null; })\n        .map(function (entry) {\n        if (entry === null) {\n            return null;\n        }\n        return deserializeAws_json1_1IdentityPoolShortDescription(entry, context);\n    });\n};\nvar deserializeAws_json1_1IdentityPoolTagsType = function (output, context) {\n    return Object.entries(output).reduce(function (acc, _a) {\n        var _b;\n        var _c = __read(_a, 2), key = _c[0], value = _c[1];\n        if (value === null) {\n            return acc;\n        }\n        return __assign(__assign({}, acc), (_b = {}, _b[key] = value, _b));\n    }, {});\n};\nvar deserializeAws_json1_1IdentityProviders = function (output, context) {\n    return Object.entries(output).reduce(function (acc, _a) {\n        var _b;\n        var _c = __read(_a, 2), key = _c[0], value = _c[1];\n        if (value === null) {\n            return acc;\n        }\n        return __assign(__assign({}, acc), (_b = {}, _b[key] = value, _b));\n    }, {});\n};\nvar deserializeAws_json1_1InternalErrorException = function (output, context) {\n    return {\n        message: output.message !== undefined && output.message !== null ? output.message : undefined,\n    };\n};\nvar deserializeAws_json1_1InvalidIdentityPoolConfigurationException = function (output, context) {\n    return {\n        message: output.message !== undefined && output.message !== null ? output.message : undefined,\n    };\n};\nvar deserializeAws_json1_1InvalidParameterException = function (output, context) {\n    return {\n        message: output.message !== undefined && output.message !== null ? output.message : undefined,\n    };\n};\nvar deserializeAws_json1_1LimitExceededException = function (output, context) {\n    return {\n        message: output.message !== undefined && output.message !== null ? output.message : undefined,\n    };\n};\nvar deserializeAws_json1_1ListIdentitiesResponse = function (output, context) {\n    return {\n        Identities: output.Identities !== undefined && output.Identities !== null\n            ? deserializeAws_json1_1IdentitiesList(output.Identities, context)\n            : undefined,\n        IdentityPoolId: output.IdentityPoolId !== undefined && output.IdentityPoolId !== null ? output.IdentityPoolId : undefined,\n        NextToken: output.NextToken !== undefined && output.NextToken !== null ? output.NextToken : undefined,\n    };\n};\nvar deserializeAws_json1_1ListIdentityPoolsResponse = function (output, context) {\n    return {\n        IdentityPools: output.IdentityPools !== undefined && output.IdentityPools !== null\n            ? deserializeAws_json1_1IdentityPoolsList(output.IdentityPools, context)\n            : undefined,\n        NextToken: output.NextToken !== undefined && output.NextToken !== null ? output.NextToken : undefined,\n    };\n};\nvar deserializeAws_json1_1ListTagsForResourceResponse = function (output, context) {\n    return {\n        Tags: output.Tags !== undefined && output.Tags !== null\n            ? deserializeAws_json1_1IdentityPoolTagsType(output.Tags, context)\n            : undefined,\n    };\n};\nvar deserializeAws_json1_1LoginsList = function (output, context) {\n    return (output || [])\n        .filter(function (e) { return e != null; })\n        .map(function (entry) {\n        if (entry === null) {\n            return null;\n        }\n        return entry;\n    });\n};\nvar deserializeAws_json1_1LookupDeveloperIdentityResponse = function (output, context) {\n    return {\n        DeveloperUserIdentifierList: output.DeveloperUserIdentifierList !== undefined && output.DeveloperUserIdentifierList !== null\n            ? deserializeAws_json1_1DeveloperUserIdentifierList(output.DeveloperUserIdentifierList, context)\n            : undefined,\n        IdentityId: output.IdentityId !== undefined && output.IdentityId !== null ? output.IdentityId : undefined,\n        NextToken: output.NextToken !== undefined && output.NextToken !== null ? output.NextToken : undefined,\n    };\n};\nvar deserializeAws_json1_1MappingRule = function (output, context) {\n    return {\n        Claim: output.Claim !== undefined && output.Claim !== null ? output.Claim : undefined,\n        MatchType: output.MatchType !== undefined && output.MatchType !== null ? output.MatchType : undefined,\n        RoleARN: output.RoleARN !== undefined && output.RoleARN !== null ? output.RoleARN : undefined,\n        Value: output.Value !== undefined && output.Value !== null ? output.Value : undefined,\n    };\n};\nvar deserializeAws_json1_1MappingRulesList = function (output, context) {\n    return (output || [])\n        .filter(function (e) { return e != null; })\n        .map(function (entry) {\n        if (entry === null) {\n            return null;\n        }\n        return deserializeAws_json1_1MappingRule(entry, context);\n    });\n};\nvar deserializeAws_json1_1MergeDeveloperIdentitiesResponse = function (output, context) {\n    return {\n        IdentityId: output.IdentityId !== undefined && output.IdentityId !== null ? output.IdentityId : undefined,\n    };\n};\nvar deserializeAws_json1_1NotAuthorizedException = function (output, context) {\n    return {\n        message: output.message !== undefined && output.message !== null ? output.message : undefined,\n    };\n};\nvar deserializeAws_json1_1OIDCProviderList = function (output, context) {\n    return (output || [])\n        .filter(function (e) { return e != null; })\n        .map(function (entry) {\n        if (entry === null) {\n            return null;\n        }\n        return entry;\n    });\n};\nvar deserializeAws_json1_1ResourceConflictException = function (output, context) {\n    return {\n        message: output.message !== undefined && output.message !== null ? output.message : undefined,\n    };\n};\nvar deserializeAws_json1_1ResourceNotFoundException = function (output, context) {\n    return {\n        message: output.message !== undefined && output.message !== null ? output.message : undefined,\n    };\n};\nvar deserializeAws_json1_1RoleMapping = function (output, context) {\n    return {\n        AmbiguousRoleResolution: output.AmbiguousRoleResolution !== undefined && output.AmbiguousRoleResolution !== null\n            ? output.AmbiguousRoleResolution\n            : undefined,\n        RulesConfiguration: output.RulesConfiguration !== undefined && output.RulesConfiguration !== null\n            ? deserializeAws_json1_1RulesConfigurationType(output.RulesConfiguration, context)\n            : undefined,\n        Type: output.Type !== undefined && output.Type !== null ? output.Type : undefined,\n    };\n};\nvar deserializeAws_json1_1RoleMappingMap = function (output, context) {\n    return Object.entries(output).reduce(function (acc, _a) {\n        var _b;\n        var _c = __read(_a, 2), key = _c[0], value = _c[1];\n        if (value === null) {\n            return acc;\n        }\n        return __assign(__assign({}, acc), (_b = {}, _b[key] = deserializeAws_json1_1RoleMapping(value, context), _b));\n    }, {});\n};\nvar deserializeAws_json1_1RolesMap = function (output, context) {\n    return Object.entries(output).reduce(function (acc, _a) {\n        var _b;\n        var _c = __read(_a, 2), key = _c[0], value = _c[1];\n        if (value === null) {\n            return acc;\n        }\n        return __assign(__assign({}, acc), (_b = {}, _b[key] = value, _b));\n    }, {});\n};\nvar deserializeAws_json1_1RulesConfigurationType = function (output, context) {\n    return {\n        Rules: output.Rules !== undefined && output.Rules !== null\n            ? deserializeAws_json1_1MappingRulesList(output.Rules, context)\n            : undefined,\n    };\n};\nvar deserializeAws_json1_1SAMLProviderList = function (output, context) {\n    return (output || [])\n        .filter(function (e) { return e != null; })\n        .map(function (entry) {\n        if (entry === null) {\n            return null;\n        }\n        return entry;\n    });\n};\nvar deserializeAws_json1_1TagResourceResponse = function (output, context) {\n    return {};\n};\nvar deserializeAws_json1_1TooManyRequestsException = function (output, context) {\n    return {\n        message: output.message !== undefined && output.message !== null ? output.message : undefined,\n    };\n};\nvar deserializeAws_json1_1UnprocessedIdentityId = function (output, context) {\n    return {\n        ErrorCode: output.ErrorCode !== undefined && output.ErrorCode !== null ? output.ErrorCode : undefined,\n        IdentityId: output.IdentityId !== undefined && output.IdentityId !== null ? output.IdentityId : undefined,\n    };\n};\nvar deserializeAws_json1_1UnprocessedIdentityIdList = function (output, context) {\n    return (output || [])\n        .filter(function (e) { return e != null; })\n        .map(function (entry) {\n        if (entry === null) {\n            return null;\n        }\n        return deserializeAws_json1_1UnprocessedIdentityId(entry, context);\n    });\n};\nvar deserializeAws_json1_1UntagResourceResponse = function (output, context) {\n    return {};\n};\nvar deserializeMetadata = function (output) {\n    var _a;\n    return ({\n        httpStatusCode: output.statusCode,\n        requestId: (_a = output.headers[\"x-amzn-requestid\"]) !== null && _a !== void 0 ? _a : output.headers[\"x-amzn-request-id\"],\n        extendedRequestId: output.headers[\"x-amz-id-2\"],\n        cfId: output.headers[\"x-amz-cf-id\"],\n    });\n};\n// Collect low-level response body stream to Uint8Array.\nvar collectBody = function (streamBody, context) {\n    if (streamBody === void 0) { streamBody = new Uint8Array(); }\n    if (streamBody instanceof Uint8Array) {\n        return Promise.resolve(streamBody);\n    }\n    return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());\n};\n// Encode Uint8Array data into string with utf-8.\nvar collectBodyString = function (streamBody, context) {\n    return collectBody(streamBody, context).then(function (body) { return context.utf8Encoder(body); });\n};\nvar buildHttpRpcRequest = function (context, headers, path, resolvedHostname, body) { return __awaiter(void 0, void 0, void 0, function () {\n    var _a, hostname, _b, protocol, port, contents;\n    return __generator(this, function (_c) {\n        switch (_c.label) {\n            case 0: return [4 /*yield*/, context.endpoint()];\n            case 1:\n                _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? \"https\" : _b, port = _a.port;\n                contents = {\n                    protocol: protocol,\n                    hostname: hostname,\n                    port: port,\n                    method: \"POST\",\n                    path: path,\n                    headers: headers,\n                };\n                if (resolvedHostname !== undefined) {\n                    contents.hostname = resolvedHostname;\n                }\n                if (body !== undefined) {\n                    contents.body = body;\n                }\n                return [2 /*return*/, new __HttpRequest(contents)];\n        }\n    });\n}); };\nvar parseBody = function (streamBody, context) {\n    return collectBodyString(streamBody, context).then(function (encoded) {\n        if (encoded.length) {\n            return JSON.parse(encoded);\n        }\n        return {};\n    });\n};\n/**\n * Load an error code for the aws.rest-json-1.1 protocol.\n */\nvar loadRestJsonErrorCode = function (output, data) {\n    var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };\n    var sanitizeErrorCode = function (rawValue) {\n        var cleanValue = rawValue;\n        if (cleanValue.indexOf(\":\") >= 0) {\n            cleanValue = cleanValue.split(\":\")[0];\n        }\n        if (cleanValue.indexOf(\"#\") >= 0) {\n            cleanValue = cleanValue.split(\"#\")[1];\n        }\n        return cleanValue;\n    };\n    var headerKey = findKey(output.headers, \"x-amzn-errortype\");\n    if (headerKey !== undefined) {\n        return sanitizeErrorCode(output.headers[headerKey]);\n    }\n    if (data.code !== undefined) {\n        return sanitizeErrorCode(data.code);\n    }\n    if (data[\"__type\"] !== undefined) {\n        return sanitizeErrorCode(data[\"__type\"]);\n    }\n    return \"\";\n};\n//# sourceMappingURL=Aws_json1_1.js.map"],"names":["blobReader","blob","onChunk","chunkSize","Promise","resolve","reject","fileReader","FileReader","addEventListener","size","totalBytesRead","read","readAsArrayBuffer","slice","Math","min","event","result","target","Uint8Array","byteLength","AWS_TEMPLATE","AWS_CN_TEMPLATE","AWS_ISO_TEMPLATE","AWS_ISO_B_TEMPLATE","AWS_US_GOV_TEMPLATE","AWS_REGIONS","Set","AWS_CN_REGIONS","AWS_ISO_REGIONS","AWS_ISO_B_REGIONS","AWS_US_GOV_REGIONS","defaultRegionInfoProvider","region","options","regionInfo","undefined","hostname","partition","signingRegion","has","replace","signingService","ClientSharedValues","apiVersion","disableHostPrefix","logger","regionInfoProvider","serviceId","urlParser","ClientDefaultValues","runtime","base64Decoder","base64Encoder","bodyLengthChecker","credentialDefaultProvider","_","Error","defaultUserAgentProvider","clientVersion","maxAttempts","invalidProvider","requestHandler","sha256","Sha256","streamCollector","utf8Decoder","fromUtf8","utf8Encoder","toUtf8","CognitoIdentityClient","_super","configuration","_this","this","_config_0","_config_1","_config_2","_config_3","_config_4","_config_5","_config_6","call","config","middlewareStack","use","prototype","destroy","GetCredentialsForIdentityCommand","input","resolveMiddleware","clientStack","serialize","deserialize","stack","concat","clientName","commandName","handlerExecutionContext","inputFilterSensitiveLog","filterSensitiveLog","outputFilterSensitiveLog","request","handle","context","output","GetIdCommand","AmbiguousRoleResolutionType","CognitoIdentityProvider","CreateIdentityPoolInput","IdentityPool","InternalErrorException","InvalidParameterException","LimitExceededException","NotAuthorizedException","ResourceConflictException","TooManyRequestsException","DeleteIdentitiesInput","ErrorCode","UnprocessedIdentityId","DeleteIdentitiesResponse","DeleteIdentityPoolInput","ResourceNotFoundException","DescribeIdentityInput","IdentityDescription","DescribeIdentityPoolInput","ExternalServiceException","GetCredentialsForIdentityInput","Credentials","GetCredentialsForIdentityResponse","InvalidIdentityPoolConfigurationException","GetIdInput","GetIdResponse","GetIdentityPoolRolesInput","MappingRuleMatchType","MappingRule","RulesConfigurationType","RoleMappingType","RoleMapping","GetIdentityPoolRolesResponse","GetOpenIdTokenInput","GetOpenIdTokenResponse","DeveloperUserAlreadyRegisteredException","GetOpenIdTokenForDeveloperIdentityInput","GetOpenIdTokenForDeveloperIdentityResponse","ListIdentitiesInput","ListIdentitiesResponse","ListIdentityPoolsInput","IdentityPoolShortDescription","ListIdentityPoolsResponse","ListTagsForResourceInput","ListTagsForResourceResponse","LookupDeveloperIdentityInput","LookupDeveloperIdentityResponse","MergeDeveloperIdentitiesInput","MergeDeveloperIdentitiesResponse","ConcurrentModificationException","SetIdentityPoolRolesInput","TagResourceInput","TagResourceResponse","UnlinkDeveloperIdentityInput","UnlinkIdentityInput","UntagResourceInput","UntagResourceResponse","obj","serializeAws_json1_1GetCredentialsForIdentityCommand","headers","body","_a","JSON","stringify","serializeAws_json1_1GetCredentialsForIdentityInput","buildHttpRpcRequest","serializeAws_json1_1GetIdCommand","serializeAws_json1_1GetIdInput","deserializeAws_json1_1GetCredentialsForIdentityCommand","data","contents","response","label","statusCode","deserializeAws_json1_1GetCredentialsForIdentityCommandError","parseBody","sent","deserializeAws_json1_1GetCredentialsForIdentityResponse","$metadata","deserializeMetadata","parsedOutput","errorCode","_b","_c","_d","_e","_f","_g","_h","_j","_k","parsedBody","message","_l","_m","apply","loadRestJsonErrorCode","deserializeAws_json1_1ExternalServiceExceptionResponse","name","deserializeAws_json1_1InternalErrorExceptionResponse","deserializeAws_json1_1InvalidIdentityPoolConfigurationExceptionResponse","deserializeAws_json1_1InvalidParameterExceptionResponse","deserializeAws_json1_1NotAuthorizedExceptionResponse","deserializeAws_json1_1ResourceConflictExceptionResponse","deserializeAws_json1_1ResourceNotFoundExceptionResponse","deserializeAws_json1_1TooManyRequestsExceptionResponse","code","Code","Message","$fault","Object","assign","deserializeAws_json1_1GetIdCommand","deserializeAws_json1_1GetIdCommandError","deserializeAws_json1_1GetIdResponse","deserializeAws_json1_1LimitExceededExceptionResponse","deserialized","deserializeAws_json1_1ExternalServiceException","deserializeAws_json1_1InternalErrorException","deserializeAws_json1_1InvalidIdentityPoolConfigurationException","deserializeAws_json1_1InvalidParameterException","deserializeAws_json1_1LimitExceededException","deserializeAws_json1_1NotAuthorizedException","deserializeAws_json1_1ResourceConflictException","deserializeAws_json1_1ResourceNotFoundException","deserializeAws_json1_1TooManyRequestsException","CustomRoleArn","IdentityId","Logins","serializeAws_json1_1LoginsMap","AccountId","IdentityPoolId","entries","reduce","acc","key","value","deserializeAws_json1_1Credentials","AccessKeyId","Expiration","Date","round","SecretKey","SessionToken","httpStatusCode","requestId","extendedRequestId","cfId","collectBody","streamBody","collectBodyString","then","path","resolvedHostname","protocol","port","endpoint","method","encoded","length","parse","findKey","object","keys","find","k","toLowerCase","sanitizeErrorCode","rawValue","cleanValue","indexOf","split","headerKey"],"sourceRoot":""}