{"version":3,"file":"static/chunks/967cf101-175799e6e81c4111.js","mappings":"+TAywCO,IAAAA,qDAAA,MAAAC,EAAAC,SAQPC,EAPA,IAAYC,SAAAA,CAAA,CAAAC,SAAAA,EAAA,QAAAC,KAAAA,CAAA,CAAAC,KAAAC,CAAA,EAAqD,MAAAN,EAAAO,QAAA,GAIjEC,EAAA,GAA0BF,GAAAG,SAAA,KAAAH,EAAAI,KAAA,OAAAJ,GAAA,GAAiE,4CAE3FE,EAAmB,GAAAG,EAAAC,EAAA,EAAcJ,EAAAT,EAAA,gBAAAA,EAAAc,SAAA,eAAsE,IAEvGZ,EAAAa,KAAAC,SAAA,EACA,GAAAhB,MAAAA,EAAAiB,YAAA,GAA4CA,aAAAC,+BAAAlB,EAAAiB,YAAA,CAAAhB,EAAA,CAA2E,CACvH,GAAAD,MAAAA,EAAAmB,UAAA,GAA0CA,WAAAC,kCAAApB,EAAAmB,UAAA,CAAAlB,EAAA,CAA0E,CACpH,GAAAD,MAAAA,EAAAqB,eAAA,GACAA,gBAAAC,sCAAAtB,EAAAqB,eAAA,CAAApB,EACA,CAAS,CACT,GAAAD,MAAAA,EAAAuB,QAAA,GAAwCA,SAAAvB,EAAAuB,QAAA,CAA0B,CAClE,GAAAvB,MAAAA,EAAAwB,UAAA,GAA0CA,WAAAxB,EAAAwB,UAAA,CAA8B,CACxE,GAAAxB,MAAAA,EAAAyB,IAAA,GAAoCA,KAAAzB,EAAAyB,IAAA,CAAkB,GAEtD,IAAUtB,SAAAuB,CAAA,EAA6B,MAAAzB,EAAAO,QAAA,GACvC,GAAAP,CAAA,IAAAA,EAAA0B,iBAAA,GACAD,EAAA,UAAAA,EACA,CAAa,GAAAE,EAAAC,CAAA,EAAiBH,IAC9B,+EAGA,WAAeI,EAAAC,CAAa,EAC5B3B,SAAAA,EACAD,SAAAuB,EACArB,KAAAA,EACA2B,OAAA,OACAC,QA7BA,CACA,iCACA,EA4BA3B,KAAAG,EACAP,KAAAA,CACA,EACA,EAi4EOgC,uDAAA,MAAAC,EAAAlC,KACP,GAAAkC,MAAAA,EAAAC,UAAA,EAAAD,EAAAC,UAAA,MACA,OAAAC,4DAAAF,EAAAlC,GAEA,IAAAqC,EAAAC,EAAA,CACAC,UAAAC,oBAAAN,EACA,GACAO,EAAiB,GAAA9B,EAAA+B,EAAA,EAAgB,GAAA/B,EAAAgC,EAAA,EAAc,MAAAC,UAAAV,EAAAjC,IAAA,CAAAD,IAAA,QAO/C,OANA,MAAAyC,EAAAI,OAAA,EACAR,CAAAA,EAAAQ,OAAA,CAAAC,gDAAAL,EAAAI,OAAA,CAAA7C,EAAA,EAEA,MAAAyC,EAAAM,OAAA,EACAV,CAAAA,EAAAU,OAAA,CAAAC,uDAAAP,EAAAM,OAAA,CAAA/C,EAAA,EAEAqC,CACA,EACAD,4DAAA,MAAAF,EAAAlC,KACA,IAAAiD,EAAA,CACA,GAAAf,CAAA,CACAjC,KAAA,MAAAiD,eAAAhB,EAAAjC,IAAA,CAAAD,EACA,EACAmD,EAAAC,sBAAAlB,EAAAe,EAAAhD,IAAA,EACA,OAAAkD,GACA,4BACA,mDACA,YAAAE,sDAAAJ,EAAAjD,EACA,+BACA,qDACA,YAAAsD,wDAAAL,EAAAjD,EACA,iCACA,uDACA,YAAAuD,0DAAAN,EAAAjD,EACA,2BACA,iDACA,YAAAwD,oDAAAP,EAAAjD,EACA,2BACA,iDACA,YAAAyD,oDAAAR,EAAAjD,EACA,SACA,IAAA0D,EAAAT,EAAAhD,IAAA,CACY,GAAAU,EAAAgD,EAAA,EAAiB,CAC7BzB,OAAAA,EACAwB,WAAAA,EACAE,cAA+BC,EAAAC,CAAe,CAC9CX,UAAAA,CACA,EACA,CACA,EAoVAb,EAAY3B,EAAAoD,EAAK,CACjBV,sDAAA,MAAAJ,EAAAjD,KACA,IAAAqC,EAAAC,EAAA,IACAG,EAAAQ,EAAAhD,IAAA,OACAwC,EAAAuB,OAAA,EACA3B,CAAAA,EAAA4B,OAAA,CAA2B,GAAAtD,EAAAuD,EAAA,EAAczB,EAAAuB,OAAA,GAEzC,IAAAG,EAAA,IAA0BC,EAAAC,EAAqB,EAC/C9B,UAAAC,oBAAAS,GACA,GAAAZ,CAAA,GAEA,MAAW,GAAA1B,EAAA2D,EAAA,EAA0BH,EAAAlB,EAAAhD,IAAA,CACrC,EAaAqD,wDAAA,MAAAL,EAAAjD,KACA,IAAAqC,EAAAC,EAAA,IACAG,EAAAQ,EAAAhD,IAAA,OACAwC,EAAAuB,OAAA,EACA3B,CAAAA,EAAA4B,OAAA,CAA2B,GAAAtD,EAAAuD,EAAA,EAAczB,EAAAuB,OAAA,GAEzC,IAAAG,EAAA,IAA0BC,EAAAG,EAAuB,EACjDhC,UAAAC,oBAAAS,GACA,GAAAZ,CAAA,GAEA,MAAW,GAAA1B,EAAA2D,EAAA,EAA0BH,EAAAlB,EAAAhD,IAAA,CACrC,EACAsD,0DAAA,MAAAN,EAAAjD,KACA,IAAAqC,EAAAC,EAAA,IACAG,EAAAQ,EAAAhD,IAAA,OACAwC,EAAAuB,OAAA,EACA3B,CAAAA,EAAA4B,OAAA,CAA2B,GAAAtD,EAAAuD,EAAA,EAAczB,EAAAuB,OAAA,GAEzC,IAAAG,EAAA,IAA0BC,EAAAI,EAAyB,EACnDjC,UAAAC,oBAAAS,GACA,GAAAZ,CAAA,GAEA,MAAW,GAAA1B,EAAA2D,EAAA,EAA0BH,EAAAlB,EAAAhD,IAAA,CACrC,EAaAuD,oDAAA,MAAAP,EAAAjD,KACA,IAAAqC,EAAAC,EAAA,IACAG,EAAAQ,EAAAhD,IAAA,OACAwC,EAAAuB,OAAA,EACA3B,CAAAA,EAAA4B,OAAA,CAA2B,GAAAtD,EAAAuD,EAAA,EAAczB,EAAAuB,OAAA,GAEzC,IAAAG,EAAA,IAA0BC,EAAAK,EAAmB,EAC7ClC,UAAAC,oBAAAS,GACA,GAAAZ,CAAA,GAEA,MAAW,GAAA1B,EAAA2D,EAAA,EAA0BH,EAAAlB,EAAAhD,IAAA,CACrC,EACAwD,oDAAA,MAAAR,EAAAjD,KACA,IAAAqC,EAAAC,EAAA,IACAG,EAAAQ,EAAAhD,IAAA,OACAwC,EAAAiC,SAAA,EACArC,CAAAA,EAAAsC,SAAA,CAAAC,qDAAAnC,EAAAiC,SAAA,CAAA1E,EAAA,EAEA,MAAAyC,EAAAuB,OAAA,EACA3B,CAAAA,EAAA4B,OAAA,CAA2B,GAAAtD,EAAAuD,EAAA,EAAczB,EAAAuB,OAAA,GAEzC,MAAAvB,EAAAoC,MAAA,EACAxC,CAAAA,EAAAyC,MAAA,CAA0B,GAAAnE,EAAAuD,EAAA,EAAczB,EAAAoC,MAAA,GAExC,IAAAV,EAAA,IAA0BC,EAAAW,EAAmB,EAC7CxC,UAAAC,oBAAAS,GACA,GAAAZ,CAAA,GAEA,MAAW,GAAA1B,EAAA2D,EAAA,EAA0BH,EAAAlB,EAAAhD,IAAA,CACrC,EAcAkB,kCAAA,CAAApB,EAAAC,IACAD,EACAiF,MAAA,IAAAC,MAAAA,GACA3C,GAAA,IACe,GAAA3B,EAAAuE,EAAA,EAAgBC,IAuB/B9D,sCAAA,CAAAtB,EAAAC,IACAD,EACAiF,MAAA,IAAAC,MAAAA,GACA3C,GAAA,IACA6C,GAiEAlE,+BAAA,CAAAlB,EAAAC,IACAD,EACAiF,MAAA,IAAAC,MAAAA,GACA3C,GAAA,IACe,GAAA3B,EAAAuE,EAAA,EAAgBC,IAqM/BC,oCAAA,CAAAlD,EAAAlC,KACA,IAAAqF,EAAA,CAAAnD,GAAA,IACA8C,MAAA,IAAAC,MAAAA,GACA3C,GAAA,IACA,OAAA6C,EACA,KAEe,GAAAxE,EAAA2E,EAAA,EAAoBH,IAEnC,OAAAE,CACA,EAwBAE,wCAAA,CAAArD,EAAAlC,KACA,IAAAqF,EAAA,CAAAnD,GAAA,IACA8C,MAAA,IAAAC,MAAAA,GACA3C,GAAA,IACA,OAAA6C,EACA,KAEe,GAAAxE,EAAAuD,EAAA,EAAciB,IAE7B,OAAAE,CACA,EAsPAG,8BAAA,CAAAtD,EAAAlC,IACA,EACAyF,cAAuB,GAAA9E,EAAAuD,EAAA,EAAchC,EAAAuD,aAAA,EACrCC,QAAiB,GAAA/E,EAAAuD,EAAA,EAAchC,EAAAwD,OAAA,EAC/BC,SAAAzD,MAAAA,EAAAyD,QAAA,CAAAC,sCAAA1D,EAAAyD,QAAA,CAAA3F,GAAA6F,KAAAA,EACAC,aAAsB,GAAAnF,EAAAoF,EAAA,EAAe7D,EAAA4D,YAAA,EACrCE,MAAe,GAAArF,EAAAuD,EAAA,EAAchC,EAAA8D,KAAA,EAC7BC,aAAsB,GAAAtF,EAAAuD,EAAA,EAAchC,EAAA+D,YAAA,EACpCC,aAAsB,GAAAvF,EAAAuD,EAAA,EAAchC,EAAAgE,YAAA,EACpCC,WAAoB,GAAAxF,EAAAuD,EAAA,EAAchC,EAAAiE,UAAA,EAClCC,OAAgB,GAAAzF,EAAAuD,EAAA,EAAchC,EAAAkE,MAAA,EAC9BC,OAAgB,GAAA1F,EAAAuD,EAAA,EAAchC,EAAAmE,MAAA,EAC9BC,UAAmB,GAAA3F,EAAAuD,EAAA,EAAchC,EAAAoE,SAAA,EACjCC,SAAArE,MAAAA,EAAAqE,QAAA,CAAAC,iCAAAtE,EAAAqE,QAAA,CAAAvG,GAAA6F,KAAAA,EACAY,WAAoB,GAAA9F,EAAAuD,EAAA,EAAchC,EAAAuE,UAAA,EAClCC,SAAkB,GAAA/F,EAAAuD,EAAA,EAAchC,EAAAwE,QAAA,CAChC,GAEAd,sCAAA,CAAA1D,EAAAlC,IACA,EACA2G,MAAAzE,MAAAA,EAAAyE,KAAA,CAAAC,iCAAA1E,EAAAyE,KAAA,CAAA3G,GAAA6F,KAAAA,CACA,GAEAe,iCAAA,CAAA1E,EAAAlC,KACA,IAAAqF,EAAA,CAAAnD,GAAA,IACA8C,MAAA,IAAAC,MAAAA,GACA3C,GAAA,IACA,OAAA6C,EACA,KAEe,GAAAxE,EAAA2E,EAAA,EAAoBH,IAEnC,OAAAE,CACA,EAkGAwB,4CAAA,CAAA3E,EAAAlC,IACA,EACA8G,SAAkB,GAAAnG,EAAA2E,EAAA,EAAoBpD,EAAA4E,QAAA,EACtCC,MAAA7E,MAAAA,EAAA6E,KAAA,CAAAvB,8BAAAtD,EAAA6E,KAAA,CAAA/G,GAAA6F,KAAAA,EACAmB,QAAiB,GAAArG,EAAAuD,EAAA,EAAchC,EAAA8E,OAAA,EAC/BC,UAAmB,GAAAtG,EAAA2E,EAAA,EAAoBpD,EAAA+E,SAAA,CACvC,GAEAnE,gDAAA,CAAAZ,EAAAlC,KACA,IAAAqF,EAAA,CAAAnD,GAAA,IACA8C,MAAA,IAAAC,MAAAA,GACA3C,GAAA,IACA,OAAA6C,EACA,KAEA0B,4CAAA1B,EAAAnF,IAEA,OAAAqF,CACA,EAsBArC,uDAAA,CAAAd,EAAAlC,IACA,EACAgB,aAAAkB,MAAAA,EAAAlB,YAAA,CAAA4F,iCAAA1E,EAAAlB,YAAA,CAAAhB,GAAA6F,KAAAA,EACAqB,WAAoB,GAAAvG,EAAAuD,EAAA,EAAchC,EAAAgF,UAAA,EAClChG,WAAAgB,MAAAA,EAAAhB,UAAA,CAAAkE,oCAAAlD,EAAAhB,UAAA,CAAAlB,GAAA6F,KAAAA,EACAzE,gBAAAc,MAAAA,EAAAd,eAAA,CACAmE,wCAAArD,EAAAd,eAAA,CAAApB,GACA6F,KAAAA,EACAvE,SAAkB,GAAAX,EAAAuD,EAAA,EAAchC,EAAAZ,QAAA,EAChCC,WAAoB,GAAAZ,EAAAwG,EAAA,EAAajF,EAAAX,UAAA,EACjC6F,WAAAlF,MAAAA,EAAAkF,UAAA,CAAAhC,oCAAAlD,EAAAkF,UAAA,CAAApH,GAAA6F,KAAAA,EACArE,KAAc,GAAAb,EAAAuD,EAAA,EAAchC,EAAAV,IAAA,CAC5B,GAiCAgF,iCAAA,CAAAtE,EAAAlC,IACA,EACAqH,KAAc,GAAA1G,EAAAuD,EAAA,EAAchC,EAAAmF,IAAA,EAC5BC,OAAgB,GAAA3G,EAAAwG,EAAA,EAAajF,EAAAoF,MAAA,CAC7B,GAEAC,iDAAA,CAAArF,EAAAlC,IACA,EACAiE,QAAiB,GAAAtD,EAAAuD,EAAA,EAAchC,EAAA8B,OAAA,EAC/BqD,KAAc,GAAA1G,EAAAuD,EAAA,EAAchC,EAAAsF,IAAA,CAC5B,GAEA5C,qDAAA,CAAA1C,EAAAlC,KACA,IAAAqF,EAAA,CAAAnD,GAAA,IACA8C,MAAA,IAAAC,MAAAA,GACA3C,GAAA,IACA,OAAA6C,EACA,KAEAoC,iDAAApC,EAAAnF,IAEA,OAAAqF,CACA,EACA7C,oBAAA,KACAiF,eAAAvF,EAAAC,UAAA,CACAuF,UAAAxF,EAAAF,OAAA,sBAAAE,EAAAF,OAAA,uBAAAE,EAAAF,OAAA,qBACA2F,kBAAAzF,EAAAF,OAAA,eACA4F,KAAA1F,EAAAF,OAAA,gBACA,EACA6F,YAAA,CAAAC,EAAA,IAAAC,UAAA,CAAA/H,IACA,aAAA+H,WACAC,QAAAC,OAAA,CAAAH,GAEA9H,EAAAkI,eAAA,CAAAJ,IAAAE,QAAAC,OAAA,KAAAF,YAEAI,kBAAA,CAAAL,EAAA9H,IAAA6H,YAAAC,EAAA9H,GAAAoI,IAAA,IAAApI,EAAAqI,WAAA,CAAApI,IAMA2C,UAAA,CAAAkF,EAAA9H,IAAAmI,kBAAAL,EAAA9H,GAAAoI,IAAA,IACA,EAAAE,MAAA,CACAxH,KAAAyH,KAAA,CAAAC,GAEA,IAEAtF,eAAA,MAAAuF,EAAAzI,KACA,IAAA0I,EAAA,MAAA9F,UAAA6F,EAAAzI,GAEA,OADA0I,EAAA1E,OAAA,CAAA0E,EAAA1E,OAAA,EAAA0E,EAAAzE,OAAA,CACAyE,CACA,EACAtF,sBAAA,CAAAlB,EAAAO,KAEA,IAAAkG,kBAAA,IACA,IAAAC,EAAAC,EAaA,MAZA,iBAAAD,GACAA,CAAAA,EAAAA,EAAAE,QAAA,IAEAF,EAAAG,OAAA,UACAH,CAAAA,EAAAA,EAAAI,KAAA,UAEAJ,EAAAG,OAAA,UACAH,CAAAA,EAAAA,EAAAI,KAAA,UAEAJ,EAAAG,OAAA,UACAH,CAAAA,EAAAA,EAAAI,KAAA,UAEAJ,CACA,EACAK,EAjBAC,OAAAC,IAAA,CAiBAjH,EAAAF,OAAA,EAjBAoH,IAAA,IAAAC,qBAAAA,EAAAC,WAAA,WAkBA,KAAAzD,IAAAoD,EACAN,kBAAAzG,EAAAF,OAAA,CAAAiH,EAAA,EAEAxG,KAAAoD,IAAApD,EAAA8G,IAAA,CACAZ,kBAAAlG,EAAA8G,IAAA,EAEA9G,KAAAoD,IAAApD,EAAA,OACAkG,kBAAAlG,EAAA,cAEA","sources":["webpack://_N_E/./node_modules/@aws-sdk/client-location/dist-es/protocols/Aws_restJson1.js","webpack://_N_E/"],"sourcesContent":["import { HttpRequest as __HttpRequest, isValidHostname as __isValidHostname, } from \"@aws-sdk/protocol-http\";\nimport { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, map as __map, parseRfc3339DateTime as __parseRfc3339DateTime, resolvedPath as __resolvedPath, serializeFloat as __serializeFloat, throwDefaultError, } from \"@aws-sdk/smithy-client\";\nimport { LocationServiceException as __BaseException } from \"../models/LocationServiceException\";\nimport { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from \"../models/models_0\";\nexport const serializeAws_restJson1AssociateTrackerConsumerCommand = async (input, context) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const headers = {\n \"content-type\": \"application/json\",\n };\n let resolvedPath = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` +\n \"/tracking/v0/trackers/{TrackerName}/consumers\";\n resolvedPath = __resolvedPath(resolvedPath, input, \"TrackerName\", () => input.TrackerName, \"{TrackerName}\", false);\n let body;\n body = JSON.stringify({\n ...(input.ConsumerArn != null && { ConsumerArn: input.ConsumerArn }),\n });\n let { hostname: resolvedHostname } = await context.endpoint();\n if (context.disableHostPrefix !== true) {\n resolvedHostname = \"tracking.\" + resolvedHostname;\n if (!__isValidHostname(resolvedHostname)) {\n throw new Error(\"ValidationError: prefixed hostname must be hostname compatible.\");\n }\n }\n return new __HttpRequest({\n protocol,\n hostname: resolvedHostname,\n port,\n method: \"POST\",\n headers,\n path: resolvedPath,\n body,\n });\n};\nexport const serializeAws_restJson1BatchDeleteDevicePositionHistoryCommand = async (input, context) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const headers = {\n \"content-type\": \"application/json\",\n };\n let resolvedPath = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` +\n \"/tracking/v0/trackers/{TrackerName}/delete-positions\";\n resolvedPath = __resolvedPath(resolvedPath, input, \"TrackerName\", () => input.TrackerName, \"{TrackerName}\", false);\n let body;\n body = JSON.stringify({\n ...(input.DeviceIds != null && { DeviceIds: serializeAws_restJson1DeviceIdsList(input.DeviceIds, context) }),\n });\n let { hostname: resolvedHostname } = await context.endpoint();\n if (context.disableHostPrefix !== true) {\n resolvedHostname = \"tracking.\" + resolvedHostname;\n if (!__isValidHostname(resolvedHostname)) {\n throw new Error(\"ValidationError: prefixed hostname must be hostname compatible.\");\n }\n }\n return new __HttpRequest({\n protocol,\n hostname: resolvedHostname,\n port,\n method: \"POST\",\n headers,\n path: resolvedPath,\n body,\n });\n};\nexport const serializeAws_restJson1BatchDeleteGeofenceCommand = async (input, context) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const headers = {\n \"content-type\": \"application/json\",\n };\n let resolvedPath = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` +\n \"/geofencing/v0/collections/{CollectionName}/delete-geofences\";\n resolvedPath = __resolvedPath(resolvedPath, input, \"CollectionName\", () => input.CollectionName, \"{CollectionName}\", false);\n let body;\n body = JSON.stringify({\n ...(input.GeofenceIds != null && { GeofenceIds: serializeAws_restJson1IdList(input.GeofenceIds, context) }),\n });\n let { hostname: resolvedHostname } = await context.endpoint();\n if (context.disableHostPrefix !== true) {\n resolvedHostname = \"geofencing.\" + resolvedHostname;\n if (!__isValidHostname(resolvedHostname)) {\n throw new Error(\"ValidationError: prefixed hostname must be hostname compatible.\");\n }\n }\n return new __HttpRequest({\n protocol,\n hostname: resolvedHostname,\n port,\n method: \"POST\",\n headers,\n path: resolvedPath,\n body,\n });\n};\nexport const serializeAws_restJson1BatchEvaluateGeofencesCommand = async (input, context) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const headers = {\n \"content-type\": \"application/json\",\n };\n let resolvedPath = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` +\n \"/geofencing/v0/collections/{CollectionName}/positions\";\n resolvedPath = __resolvedPath(resolvedPath, input, \"CollectionName\", () => input.CollectionName, \"{CollectionName}\", false);\n let body;\n body = JSON.stringify({\n ...(input.DevicePositionUpdates != null && {\n DevicePositionUpdates: serializeAws_restJson1DevicePositionUpdateList(input.DevicePositionUpdates, context),\n }),\n });\n let { hostname: resolvedHostname } = await context.endpoint();\n if (context.disableHostPrefix !== true) {\n resolvedHostname = \"geofencing.\" + resolvedHostname;\n if (!__isValidHostname(resolvedHostname)) {\n throw new Error(\"ValidationError: prefixed hostname must be hostname compatible.\");\n }\n }\n return new __HttpRequest({\n protocol,\n hostname: resolvedHostname,\n port,\n method: \"POST\",\n headers,\n path: resolvedPath,\n body,\n });\n};\nexport const serializeAws_restJson1BatchGetDevicePositionCommand = async (input, context) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const headers = {\n \"content-type\": \"application/json\",\n };\n let resolvedPath = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` +\n \"/tracking/v0/trackers/{TrackerName}/get-positions\";\n resolvedPath = __resolvedPath(resolvedPath, input, \"TrackerName\", () => input.TrackerName, \"{TrackerName}\", false);\n let body;\n body = JSON.stringify({\n ...(input.DeviceIds != null && { DeviceIds: serializeAws_restJson1IdList(input.DeviceIds, context) }),\n });\n let { hostname: resolvedHostname } = await context.endpoint();\n if (context.disableHostPrefix !== true) {\n resolvedHostname = \"tracking.\" + resolvedHostname;\n if (!__isValidHostname(resolvedHostname)) {\n throw new Error(\"ValidationError: prefixed hostname must be hostname compatible.\");\n }\n }\n return new __HttpRequest({\n protocol,\n hostname: resolvedHostname,\n port,\n method: \"POST\",\n headers,\n path: resolvedPath,\n body,\n });\n};\nexport const serializeAws_restJson1BatchPutGeofenceCommand = async (input, context) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const headers = {\n \"content-type\": \"application/json\",\n };\n let resolvedPath = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` +\n \"/geofencing/v0/collections/{CollectionName}/put-geofences\";\n resolvedPath = __resolvedPath(resolvedPath, input, \"CollectionName\", () => input.CollectionName, \"{CollectionName}\", false);\n let body;\n body = JSON.stringify({\n ...(input.Entries != null && {\n Entries: serializeAws_restJson1BatchPutGeofenceRequestEntryList(input.Entries, context),\n }),\n });\n let { hostname: resolvedHostname } = await context.endpoint();\n if (context.disableHostPrefix !== true) {\n resolvedHostname = \"geofencing.\" + resolvedHostname;\n if (!__isValidHostname(resolvedHostname)) {\n throw new Error(\"ValidationError: prefixed hostname must be hostname compatible.\");\n }\n }\n return new __HttpRequest({\n protocol,\n hostname: resolvedHostname,\n port,\n method: \"POST\",\n headers,\n path: resolvedPath,\n body,\n });\n};\nexport const serializeAws_restJson1BatchUpdateDevicePositionCommand = async (input, context) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const headers = {\n \"content-type\": \"application/json\",\n };\n let resolvedPath = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` +\n \"/tracking/v0/trackers/{TrackerName}/positions\";\n resolvedPath = __resolvedPath(resolvedPath, input, \"TrackerName\", () => input.TrackerName, \"{TrackerName}\", false);\n let body;\n body = JSON.stringify({\n ...(input.Updates != null && { Updates: serializeAws_restJson1DevicePositionUpdateList(input.Updates, context) }),\n });\n let { hostname: resolvedHostname } = await context.endpoint();\n if (context.disableHostPrefix !== true) {\n resolvedHostname = \"tracking.\" + resolvedHostname;\n if (!__isValidHostname(resolvedHostname)) {\n throw new Error(\"ValidationError: prefixed hostname must be hostname compatible.\");\n }\n }\n return new __HttpRequest({\n protocol,\n hostname: resolvedHostname,\n port,\n method: \"POST\",\n headers,\n path: resolvedPath,\n body,\n });\n};\nexport const serializeAws_restJson1CalculateRouteCommand = async (input, context) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const headers = {\n \"content-type\": \"application/json\",\n };\n let resolvedPath = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` +\n \"/routes/v0/calculators/{CalculatorName}/calculate/route\";\n resolvedPath = __resolvedPath(resolvedPath, input, \"CalculatorName\", () => input.CalculatorName, \"{CalculatorName}\", false);\n let body;\n body = JSON.stringify({\n ...(input.CarModeOptions != null && {\n CarModeOptions: serializeAws_restJson1CalculateRouteCarModeOptions(input.CarModeOptions, context),\n }),\n ...(input.DepartNow != null && { DepartNow: input.DepartNow }),\n ...(input.DeparturePosition != null && {\n DeparturePosition: serializeAws_restJson1Position(input.DeparturePosition, context),\n }),\n ...(input.DepartureTime != null && { DepartureTime: input.DepartureTime.toISOString().split(\".\")[0] + \"Z\" }),\n ...(input.DestinationPosition != null && {\n DestinationPosition: serializeAws_restJson1Position(input.DestinationPosition, context),\n }),\n ...(input.DistanceUnit != null && { DistanceUnit: input.DistanceUnit }),\n ...(input.IncludeLegGeometry != null && { IncludeLegGeometry: input.IncludeLegGeometry }),\n ...(input.TravelMode != null && { TravelMode: input.TravelMode }),\n ...(input.TruckModeOptions != null && {\n TruckModeOptions: serializeAws_restJson1CalculateRouteTruckModeOptions(input.TruckModeOptions, context),\n }),\n ...(input.WaypointPositions != null && {\n WaypointPositions: serializeAws_restJson1WaypointPositionList(input.WaypointPositions, context),\n }),\n });\n let { hostname: resolvedHostname } = await context.endpoint();\n if (context.disableHostPrefix !== true) {\n resolvedHostname = \"routes.\" + resolvedHostname;\n if (!__isValidHostname(resolvedHostname)) {\n throw new Error(\"ValidationError: prefixed hostname must be hostname compatible.\");\n }\n }\n return new __HttpRequest({\n protocol,\n hostname: resolvedHostname,\n port,\n method: \"POST\",\n headers,\n path: resolvedPath,\n body,\n });\n};\nexport const serializeAws_restJson1CalculateRouteMatrixCommand = async (input, context) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const headers = {\n \"content-type\": \"application/json\",\n };\n let resolvedPath = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` +\n \"/routes/v0/calculators/{CalculatorName}/calculate/route-matrix\";\n resolvedPath = __resolvedPath(resolvedPath, input, \"CalculatorName\", () => input.CalculatorName, \"{CalculatorName}\", false);\n let body;\n body = JSON.stringify({\n ...(input.CarModeOptions != null && {\n CarModeOptions: serializeAws_restJson1CalculateRouteCarModeOptions(input.CarModeOptions, context),\n }),\n ...(input.DepartNow != null && { DepartNow: input.DepartNow }),\n ...(input.DeparturePositions != null && {\n DeparturePositions: serializeAws_restJson1PositionList(input.DeparturePositions, context),\n }),\n ...(input.DepartureTime != null && { DepartureTime: input.DepartureTime.toISOString().split(\".\")[0] + \"Z\" }),\n ...(input.DestinationPositions != null && {\n DestinationPositions: serializeAws_restJson1PositionList(input.DestinationPositions, context),\n }),\n ...(input.DistanceUnit != null && { DistanceUnit: input.DistanceUnit }),\n ...(input.TravelMode != null && { TravelMode: input.TravelMode }),\n ...(input.TruckModeOptions != null && {\n TruckModeOptions: serializeAws_restJson1CalculateRouteTruckModeOptions(input.TruckModeOptions, context),\n }),\n });\n let { hostname: resolvedHostname } = await context.endpoint();\n if (context.disableHostPrefix !== true) {\n resolvedHostname = \"routes.\" + resolvedHostname;\n if (!__isValidHostname(resolvedHostname)) {\n throw new Error(\"ValidationError: prefixed hostname must be hostname compatible.\");\n }\n }\n return new __HttpRequest({\n protocol,\n hostname: resolvedHostname,\n port,\n method: \"POST\",\n headers,\n path: resolvedPath,\n body,\n });\n};\nexport const serializeAws_restJson1CreateGeofenceCollectionCommand = async (input, context) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const headers = {\n \"content-type\": \"application/json\",\n };\n const resolvedPath = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` + \"/geofencing/v0/collections\";\n let body;\n body = JSON.stringify({\n ...(input.CollectionName != null && { CollectionName: input.CollectionName }),\n ...(input.Description != null && { Description: input.Description }),\n ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }),\n ...(input.PricingPlan != null && { PricingPlan: input.PricingPlan }),\n ...(input.PricingPlanDataSource != null && { PricingPlanDataSource: input.PricingPlanDataSource }),\n ...(input.Tags != null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }),\n });\n let { hostname: resolvedHostname } = await context.endpoint();\n if (context.disableHostPrefix !== true) {\n resolvedHostname = \"geofencing.\" + resolvedHostname;\n if (!__isValidHostname(resolvedHostname)) {\n throw new Error(\"ValidationError: prefixed hostname must be hostname compatible.\");\n }\n }\n return new __HttpRequest({\n protocol,\n hostname: resolvedHostname,\n port,\n method: \"POST\",\n headers,\n path: resolvedPath,\n body,\n });\n};\nexport const serializeAws_restJson1CreateMapCommand = async (input, context) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const headers = {\n \"content-type\": \"application/json\",\n };\n const resolvedPath = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` + \"/maps/v0/maps\";\n let body;\n body = JSON.stringify({\n ...(input.Configuration != null && {\n Configuration: serializeAws_restJson1MapConfiguration(input.Configuration, context),\n }),\n ...(input.Description != null && { Description: input.Description }),\n ...(input.MapName != null && { MapName: input.MapName }),\n ...(input.PricingPlan != null && { PricingPlan: input.PricingPlan }),\n ...(input.Tags != null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }),\n });\n let { hostname: resolvedHostname } = await context.endpoint();\n if (context.disableHostPrefix !== true) {\n resolvedHostname = \"maps.\" + resolvedHostname;\n if (!__isValidHostname(resolvedHostname)) {\n throw new Error(\"ValidationError: prefixed hostname must be hostname compatible.\");\n }\n }\n return new __HttpRequest({\n protocol,\n hostname: resolvedHostname,\n port,\n method: \"POST\",\n headers,\n path: resolvedPath,\n body,\n });\n};\nexport const serializeAws_restJson1CreatePlaceIndexCommand = async (input, context) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const headers = {\n \"content-type\": \"application/json\",\n };\n const resolvedPath = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` + \"/places/v0/indexes\";\n let body;\n body = JSON.stringify({\n ...(input.DataSource != null && { DataSource: input.DataSource }),\n ...(input.DataSourceConfiguration != null && {\n DataSourceConfiguration: serializeAws_restJson1DataSourceConfiguration(input.DataSourceConfiguration, context),\n }),\n ...(input.Description != null && { Description: input.Description }),\n ...(input.IndexName != null && { IndexName: input.IndexName }),\n ...(input.PricingPlan != null && { PricingPlan: input.PricingPlan }),\n ...(input.Tags != null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }),\n });\n let { hostname: resolvedHostname } = await context.endpoint();\n if (context.disableHostPrefix !== true) {\n resolvedHostname = \"places.\" + resolvedHostname;\n if (!__isValidHostname(resolvedHostname)) {\n throw new Error(\"ValidationError: prefixed hostname must be hostname compatible.\");\n }\n }\n return new __HttpRequest({\n protocol,\n hostname: resolvedHostname,\n port,\n method: \"POST\",\n headers,\n path: resolvedPath,\n body,\n });\n};\nexport const serializeAws_restJson1CreateRouteCalculatorCommand = async (input, context) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const headers = {\n \"content-type\": \"application/json\",\n };\n const resolvedPath = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` + \"/routes/v0/calculators\";\n let body;\n body = JSON.stringify({\n ...(input.CalculatorName != null && { CalculatorName: input.CalculatorName }),\n ...(input.DataSource != null && { DataSource: input.DataSource }),\n ...(input.Description != null && { Description: input.Description }),\n ...(input.PricingPlan != null && { PricingPlan: input.PricingPlan }),\n ...(input.Tags != null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }),\n });\n let { hostname: resolvedHostname } = await context.endpoint();\n if (context.disableHostPrefix !== true) {\n resolvedHostname = \"routes.\" + resolvedHostname;\n if (!__isValidHostname(resolvedHostname)) {\n throw new Error(\"ValidationError: prefixed hostname must be hostname compatible.\");\n }\n }\n return new __HttpRequest({\n protocol,\n hostname: resolvedHostname,\n port,\n method: \"POST\",\n headers,\n path: resolvedPath,\n body,\n });\n};\nexport const serializeAws_restJson1CreateTrackerCommand = async (input, context) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const headers = {\n \"content-type\": \"application/json\",\n };\n const resolvedPath = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` + \"/tracking/v0/trackers\";\n let body;\n body = JSON.stringify({\n ...(input.Description != null && { Description: input.Description }),\n ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }),\n ...(input.PositionFiltering != null && { PositionFiltering: input.PositionFiltering }),\n ...(input.PricingPlan != null && { PricingPlan: input.PricingPlan }),\n ...(input.PricingPlanDataSource != null && { PricingPlanDataSource: input.PricingPlanDataSource }),\n ...(input.Tags != null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }),\n ...(input.TrackerName != null && { TrackerName: input.TrackerName }),\n });\n let { hostname: resolvedHostname } = await context.endpoint();\n if (context.disableHostPrefix !== true) {\n resolvedHostname = \"tracking.\" + resolvedHostname;\n if (!__isValidHostname(resolvedHostname)) {\n throw new Error(\"ValidationError: prefixed hostname must be hostname compatible.\");\n }\n }\n return new __HttpRequest({\n protocol,\n hostname: resolvedHostname,\n port,\n method: \"POST\",\n headers,\n path: resolvedPath,\n body,\n });\n};\nexport const serializeAws_restJson1DeleteGeofenceCollectionCommand = async (input, context) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const headers = {};\n let resolvedPath = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` +\n \"/geofencing/v0/collections/{CollectionName}\";\n resolvedPath = __resolvedPath(resolvedPath, input, \"CollectionName\", () => input.CollectionName, \"{CollectionName}\", false);\n let body;\n let { hostname: resolvedHostname } = await context.endpoint();\n if (context.disableHostPrefix !== true) {\n resolvedHostname = \"geofencing.\" + resolvedHostname;\n if (!__isValidHostname(resolvedHostname)) {\n throw new Error(\"ValidationError: prefixed hostname must be hostname compatible.\");\n }\n }\n return new __HttpRequest({\n protocol,\n hostname: resolvedHostname,\n port,\n method: \"DELETE\",\n headers,\n path: resolvedPath,\n body,\n });\n};\nexport const serializeAws_restJson1DeleteMapCommand = async (input, context) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const headers = {};\n let resolvedPath = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` + \"/maps/v0/maps/{MapName}\";\n resolvedPath = __resolvedPath(resolvedPath, input, \"MapName\", () => input.MapName, \"{MapName}\", false);\n let body;\n let { hostname: resolvedHostname } = await context.endpoint();\n if (context.disableHostPrefix !== true) {\n resolvedHostname = \"maps.\" + resolvedHostname;\n if (!__isValidHostname(resolvedHostname)) {\n throw new Error(\"ValidationError: prefixed hostname must be hostname compatible.\");\n }\n }\n return new __HttpRequest({\n protocol,\n hostname: resolvedHostname,\n port,\n method: \"DELETE\",\n headers,\n path: resolvedPath,\n body,\n });\n};\nexport const serializeAws_restJson1DeletePlaceIndexCommand = async (input, context) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const headers = {};\n let resolvedPath = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` + \"/places/v0/indexes/{IndexName}\";\n resolvedPath = __resolvedPath(resolvedPath, input, \"IndexName\", () => input.IndexName, \"{IndexName}\", false);\n let body;\n let { hostname: resolvedHostname } = await context.endpoint();\n if (context.disableHostPrefix !== true) {\n resolvedHostname = \"places.\" + resolvedHostname;\n if (!__isValidHostname(resolvedHostname)) {\n throw new Error(\"ValidationError: prefixed hostname must be hostname compatible.\");\n }\n }\n return new __HttpRequest({\n protocol,\n hostname: resolvedHostname,\n port,\n method: \"DELETE\",\n headers,\n path: resolvedPath,\n body,\n });\n};\nexport const serializeAws_restJson1DeleteRouteCalculatorCommand = async (input, context) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const headers = {};\n let resolvedPath = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` + \"/routes/v0/calculators/{CalculatorName}\";\n resolvedPath = __resolvedPath(resolvedPath, input, \"CalculatorName\", () => input.CalculatorName, \"{CalculatorName}\", false);\n let body;\n let { hostname: resolvedHostname } = await context.endpoint();\n if (context.disableHostPrefix !== true) {\n resolvedHostname = \"routes.\" + resolvedHostname;\n if (!__isValidHostname(resolvedHostname)) {\n throw new Error(\"ValidationError: prefixed hostname must be hostname compatible.\");\n }\n }\n return new __HttpRequest({\n protocol,\n hostname: resolvedHostname,\n port,\n method: \"DELETE\",\n headers,\n path: resolvedPath,\n body,\n });\n};\nexport const serializeAws_restJson1DeleteTrackerCommand = async (input, context) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const headers = {};\n let resolvedPath = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` + \"/tracking/v0/trackers/{TrackerName}\";\n resolvedPath = __resolvedPath(resolvedPath, input, \"TrackerName\", () => input.TrackerName, \"{TrackerName}\", false);\n let body;\n let { hostname: resolvedHostname } = await context.endpoint();\n if (context.disableHostPrefix !== true) {\n resolvedHostname = \"tracking.\" + resolvedHostname;\n if (!__isValidHostname(resolvedHostname)) {\n throw new Error(\"ValidationError: prefixed hostname must be hostname compatible.\");\n }\n }\n return new __HttpRequest({\n protocol,\n hostname: resolvedHostname,\n port,\n method: \"DELETE\",\n headers,\n path: resolvedPath,\n body,\n });\n};\nexport const serializeAws_restJson1DescribeGeofenceCollectionCommand = async (input, context) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const headers = {};\n let resolvedPath = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` +\n \"/geofencing/v0/collections/{CollectionName}\";\n resolvedPath = __resolvedPath(resolvedPath, input, \"CollectionName\", () => input.CollectionName, \"{CollectionName}\", false);\n let body;\n let { hostname: resolvedHostname } = await context.endpoint();\n if (context.disableHostPrefix !== true) {\n resolvedHostname = \"geofencing.\" + resolvedHostname;\n if (!__isValidHostname(resolvedHostname)) {\n throw new Error(\"ValidationError: prefixed hostname must be hostname compatible.\");\n }\n }\n return new __HttpRequest({\n protocol,\n hostname: resolvedHostname,\n port,\n method: \"GET\",\n headers,\n path: resolvedPath,\n body,\n });\n};\nexport const serializeAws_restJson1DescribeMapCommand = async (input, context) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const headers = {};\n let resolvedPath = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` + \"/maps/v0/maps/{MapName}\";\n resolvedPath = __resolvedPath(resolvedPath, input, \"MapName\", () => input.MapName, \"{MapName}\", false);\n let body;\n let { hostname: resolvedHostname } = await context.endpoint();\n if (context.disableHostPrefix !== true) {\n resolvedHostname = \"maps.\" + resolvedHostname;\n if (!__isValidHostname(resolvedHostname)) {\n throw new Error(\"ValidationError: prefixed hostname must be hostname compatible.\");\n }\n }\n return new __HttpRequest({\n protocol,\n hostname: resolvedHostname,\n port,\n method: \"GET\",\n headers,\n path: resolvedPath,\n body,\n });\n};\nexport const serializeAws_restJson1DescribePlaceIndexCommand = async (input, context) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const headers = {};\n let resolvedPath = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` + \"/places/v0/indexes/{IndexName}\";\n resolvedPath = __resolvedPath(resolvedPath, input, \"IndexName\", () => input.IndexName, \"{IndexName}\", false);\n let body;\n let { hostname: resolvedHostname } = await context.endpoint();\n if (context.disableHostPrefix !== true) {\n resolvedHostname = \"places.\" + resolvedHostname;\n if (!__isValidHostname(resolvedHostname)) {\n throw new Error(\"ValidationError: prefixed hostname must be hostname compatible.\");\n }\n }\n return new __HttpRequest({\n protocol,\n hostname: resolvedHostname,\n port,\n method: \"GET\",\n headers,\n path: resolvedPath,\n body,\n });\n};\nexport const serializeAws_restJson1DescribeRouteCalculatorCommand = async (input, context) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const headers = {};\n let resolvedPath = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` + \"/routes/v0/calculators/{CalculatorName}\";\n resolvedPath = __resolvedPath(resolvedPath, input, \"CalculatorName\", () => input.CalculatorName, \"{CalculatorName}\", false);\n let body;\n let { hostname: resolvedHostname } = await context.endpoint();\n if (context.disableHostPrefix !== true) {\n resolvedHostname = \"routes.\" + resolvedHostname;\n if (!__isValidHostname(resolvedHostname)) {\n throw new Error(\"ValidationError: prefixed hostname must be hostname compatible.\");\n }\n }\n return new __HttpRequest({\n protocol,\n hostname: resolvedHostname,\n port,\n method: \"GET\",\n headers,\n path: resolvedPath,\n body,\n });\n};\nexport const serializeAws_restJson1DescribeTrackerCommand = async (input, context) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const headers = {};\n let resolvedPath = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` + \"/tracking/v0/trackers/{TrackerName}\";\n resolvedPath = __resolvedPath(resolvedPath, input, \"TrackerName\", () => input.TrackerName, \"{TrackerName}\", false);\n let body;\n let { hostname: resolvedHostname } = await context.endpoint();\n if (context.disableHostPrefix !== true) {\n resolvedHostname = \"tracking.\" + resolvedHostname;\n if (!__isValidHostname(resolvedHostname)) {\n throw new Error(\"ValidationError: prefixed hostname must be hostname compatible.\");\n }\n }\n return new __HttpRequest({\n protocol,\n hostname: resolvedHostname,\n port,\n method: \"GET\",\n headers,\n path: resolvedPath,\n body,\n });\n};\nexport const serializeAws_restJson1DisassociateTrackerConsumerCommand = async (input, context) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const headers = {};\n let resolvedPath = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` +\n \"/tracking/v0/trackers/{TrackerName}/consumers/{ConsumerArn}\";\n resolvedPath = __resolvedPath(resolvedPath, input, \"TrackerName\", () => input.TrackerName, \"{TrackerName}\", false);\n resolvedPath = __resolvedPath(resolvedPath, input, \"ConsumerArn\", () => input.ConsumerArn, \"{ConsumerArn}\", false);\n let body;\n let { hostname: resolvedHostname } = await context.endpoint();\n if (context.disableHostPrefix !== true) {\n resolvedHostname = \"tracking.\" + resolvedHostname;\n if (!__isValidHostname(resolvedHostname)) {\n throw new Error(\"ValidationError: prefixed hostname must be hostname compatible.\");\n }\n }\n return new __HttpRequest({\n protocol,\n hostname: resolvedHostname,\n port,\n method: \"DELETE\",\n headers,\n path: resolvedPath,\n body,\n });\n};\nexport const serializeAws_restJson1GetDevicePositionCommand = async (input, context) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const headers = {};\n let resolvedPath = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` +\n \"/tracking/v0/trackers/{TrackerName}/devices/{DeviceId}/positions/latest\";\n resolvedPath = __resolvedPath(resolvedPath, input, \"TrackerName\", () => input.TrackerName, \"{TrackerName}\", false);\n resolvedPath = __resolvedPath(resolvedPath, input, \"DeviceId\", () => input.DeviceId, \"{DeviceId}\", false);\n let body;\n let { hostname: resolvedHostname } = await context.endpoint();\n if (context.disableHostPrefix !== true) {\n resolvedHostname = \"tracking.\" + resolvedHostname;\n if (!__isValidHostname(resolvedHostname)) {\n throw new Error(\"ValidationError: prefixed hostname must be hostname compatible.\");\n }\n }\n return new __HttpRequest({\n protocol,\n hostname: resolvedHostname,\n port,\n method: \"GET\",\n headers,\n path: resolvedPath,\n body,\n });\n};\nexport const serializeAws_restJson1GetDevicePositionHistoryCommand = async (input, context) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const headers = {\n \"content-type\": \"application/json\",\n };\n let resolvedPath = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` +\n \"/tracking/v0/trackers/{TrackerName}/devices/{DeviceId}/list-positions\";\n resolvedPath = __resolvedPath(resolvedPath, input, \"TrackerName\", () => input.TrackerName, \"{TrackerName}\", false);\n resolvedPath = __resolvedPath(resolvedPath, input, \"DeviceId\", () => input.DeviceId, \"{DeviceId}\", false);\n let body;\n body = JSON.stringify({\n ...(input.EndTimeExclusive != null && {\n EndTimeExclusive: input.EndTimeExclusive.toISOString().split(\".\")[0] + \"Z\",\n }),\n ...(input.MaxResults != null && { MaxResults: input.MaxResults }),\n ...(input.NextToken != null && { NextToken: input.NextToken }),\n ...(input.StartTimeInclusive != null && {\n StartTimeInclusive: input.StartTimeInclusive.toISOString().split(\".\")[0] + \"Z\",\n }),\n });\n let { hostname: resolvedHostname } = await context.endpoint();\n if (context.disableHostPrefix !== true) {\n resolvedHostname = \"tracking.\" + resolvedHostname;\n if (!__isValidHostname(resolvedHostname)) {\n throw new Error(\"ValidationError: prefixed hostname must be hostname compatible.\");\n }\n }\n return new __HttpRequest({\n protocol,\n hostname: resolvedHostname,\n port,\n method: \"POST\",\n headers,\n path: resolvedPath,\n body,\n });\n};\nexport const serializeAws_restJson1GetGeofenceCommand = async (input, context) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const headers = {};\n let resolvedPath = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` +\n \"/geofencing/v0/collections/{CollectionName}/geofences/{GeofenceId}\";\n resolvedPath = __resolvedPath(resolvedPath, input, \"CollectionName\", () => input.CollectionName, \"{CollectionName}\", false);\n resolvedPath = __resolvedPath(resolvedPath, input, \"GeofenceId\", () => input.GeofenceId, \"{GeofenceId}\", false);\n let body;\n let { hostname: resolvedHostname } = await context.endpoint();\n if (context.disableHostPrefix !== true) {\n resolvedHostname = \"geofencing.\" + resolvedHostname;\n if (!__isValidHostname(resolvedHostname)) {\n throw new Error(\"ValidationError: prefixed hostname must be hostname compatible.\");\n }\n }\n return new __HttpRequest({\n protocol,\n hostname: resolvedHostname,\n port,\n method: \"GET\",\n headers,\n path: resolvedPath,\n body,\n });\n};\nexport const serializeAws_restJson1GetMapGlyphsCommand = async (input, context) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const headers = {};\n let resolvedPath = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` +\n \"/maps/v0/maps/{MapName}/glyphs/{FontStack}/{FontUnicodeRange}\";\n resolvedPath = __resolvedPath(resolvedPath, input, \"MapName\", () => input.MapName, \"{MapName}\", false);\n resolvedPath = __resolvedPath(resolvedPath, input, \"FontStack\", () => input.FontStack, \"{FontStack}\", false);\n resolvedPath = __resolvedPath(resolvedPath, input, \"FontUnicodeRange\", () => input.FontUnicodeRange, \"{FontUnicodeRange}\", false);\n let body;\n let { hostname: resolvedHostname } = await context.endpoint();\n if (context.disableHostPrefix !== true) {\n resolvedHostname = \"maps.\" + resolvedHostname;\n if (!__isValidHostname(resolvedHostname)) {\n throw new Error(\"ValidationError: prefixed hostname must be hostname compatible.\");\n }\n }\n return new __HttpRequest({\n protocol,\n hostname: resolvedHostname,\n port,\n method: \"GET\",\n headers,\n path: resolvedPath,\n body,\n });\n};\nexport const serializeAws_restJson1GetMapSpritesCommand = async (input, context) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const headers = {};\n let resolvedPath = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` +\n \"/maps/v0/maps/{MapName}/sprites/{FileName}\";\n resolvedPath = __resolvedPath(resolvedPath, input, \"MapName\", () => input.MapName, \"{MapName}\", false);\n resolvedPath = __resolvedPath(resolvedPath, input, \"FileName\", () => input.FileName, \"{FileName}\", false);\n let body;\n let { hostname: resolvedHostname } = await context.endpoint();\n if (context.disableHostPrefix !== true) {\n resolvedHostname = \"maps.\" + resolvedHostname;\n if (!__isValidHostname(resolvedHostname)) {\n throw new Error(\"ValidationError: prefixed hostname must be hostname compatible.\");\n }\n }\n return new __HttpRequest({\n protocol,\n hostname: resolvedHostname,\n port,\n method: \"GET\",\n headers,\n path: resolvedPath,\n body,\n });\n};\nexport const serializeAws_restJson1GetMapStyleDescriptorCommand = async (input, context) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const headers = {};\n let resolvedPath = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` + \"/maps/v0/maps/{MapName}/style-descriptor\";\n resolvedPath = __resolvedPath(resolvedPath, input, \"MapName\", () => input.MapName, \"{MapName}\", false);\n let body;\n let { hostname: resolvedHostname } = await context.endpoint();\n if (context.disableHostPrefix !== true) {\n resolvedHostname = \"maps.\" + resolvedHostname;\n if (!__isValidHostname(resolvedHostname)) {\n throw new Error(\"ValidationError: prefixed hostname must be hostname compatible.\");\n }\n }\n return new __HttpRequest({\n protocol,\n hostname: resolvedHostname,\n port,\n method: \"GET\",\n headers,\n path: resolvedPath,\n body,\n });\n};\nexport const serializeAws_restJson1GetMapTileCommand = async (input, context) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const headers = {};\n let resolvedPath = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` + \"/maps/v0/maps/{MapName}/tiles/{Z}/{X}/{Y}\";\n resolvedPath = __resolvedPath(resolvedPath, input, \"MapName\", () => input.MapName, \"{MapName}\", false);\n resolvedPath = __resolvedPath(resolvedPath, input, \"Z\", () => input.Z, \"{Z}\", false);\n resolvedPath = __resolvedPath(resolvedPath, input, \"X\", () => input.X, \"{X}\", false);\n resolvedPath = __resolvedPath(resolvedPath, input, \"Y\", () => input.Y, \"{Y}\", false);\n let body;\n let { hostname: resolvedHostname } = await context.endpoint();\n if (context.disableHostPrefix !== true) {\n resolvedHostname = \"maps.\" + resolvedHostname;\n if (!__isValidHostname(resolvedHostname)) {\n throw new Error(\"ValidationError: prefixed hostname must be hostname compatible.\");\n }\n }\n return new __HttpRequest({\n protocol,\n hostname: resolvedHostname,\n port,\n method: \"GET\",\n headers,\n path: resolvedPath,\n body,\n });\n};\nexport const serializeAws_restJson1GetPlaceCommand = async (input, context) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const headers = {};\n let resolvedPath = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` +\n \"/places/v0/indexes/{IndexName}/places/{PlaceId}\";\n resolvedPath = __resolvedPath(resolvedPath, input, \"IndexName\", () => input.IndexName, \"{IndexName}\", false);\n resolvedPath = __resolvedPath(resolvedPath, input, \"PlaceId\", () => input.PlaceId, \"{PlaceId}\", false);\n const query = map({\n language: [, input.Language],\n });\n let body;\n let { hostname: resolvedHostname } = await context.endpoint();\n if (context.disableHostPrefix !== true) {\n resolvedHostname = \"places.\" + resolvedHostname;\n if (!__isValidHostname(resolvedHostname)) {\n throw new Error(\"ValidationError: prefixed hostname must be hostname compatible.\");\n }\n }\n return new __HttpRequest({\n protocol,\n hostname: resolvedHostname,\n port,\n method: \"GET\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\nexport const serializeAws_restJson1ListDevicePositionsCommand = async (input, context) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const headers = {\n \"content-type\": \"application/json\",\n };\n let resolvedPath = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` +\n \"/tracking/v0/trackers/{TrackerName}/list-positions\";\n resolvedPath = __resolvedPath(resolvedPath, input, \"TrackerName\", () => input.TrackerName, \"{TrackerName}\", false);\n let body;\n body = JSON.stringify({\n ...(input.MaxResults != null && { MaxResults: input.MaxResults }),\n ...(input.NextToken != null && { NextToken: input.NextToken }),\n });\n let { hostname: resolvedHostname } = await context.endpoint();\n if (context.disableHostPrefix !== true) {\n resolvedHostname = \"tracking.\" + resolvedHostname;\n if (!__isValidHostname(resolvedHostname)) {\n throw new Error(\"ValidationError: prefixed hostname must be hostname compatible.\");\n }\n }\n return new __HttpRequest({\n protocol,\n hostname: resolvedHostname,\n port,\n method: \"POST\",\n headers,\n path: resolvedPath,\n body,\n });\n};\nexport const serializeAws_restJson1ListGeofenceCollectionsCommand = async (input, context) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const headers = {\n \"content-type\": \"application/json\",\n };\n const resolvedPath = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` + \"/geofencing/v0/list-collections\";\n let body;\n body = JSON.stringify({\n ...(input.MaxResults != null && { MaxResults: input.MaxResults }),\n ...(input.NextToken != null && { NextToken: input.NextToken }),\n });\n let { hostname: resolvedHostname } = await context.endpoint();\n if (context.disableHostPrefix !== true) {\n resolvedHostname = \"geofencing.\" + resolvedHostname;\n if (!__isValidHostname(resolvedHostname)) {\n throw new Error(\"ValidationError: prefixed hostname must be hostname compatible.\");\n }\n }\n return new __HttpRequest({\n protocol,\n hostname: resolvedHostname,\n port,\n method: \"POST\",\n headers,\n path: resolvedPath,\n body,\n });\n};\nexport const serializeAws_restJson1ListGeofencesCommand = async (input, context) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const headers = {\n \"content-type\": \"application/json\",\n };\n let resolvedPath = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` +\n \"/geofencing/v0/collections/{CollectionName}/list-geofences\";\n resolvedPath = __resolvedPath(resolvedPath, input, \"CollectionName\", () => input.CollectionName, \"{CollectionName}\", false);\n let body;\n body = JSON.stringify({\n ...(input.MaxResults != null && { MaxResults: input.MaxResults }),\n ...(input.NextToken != null && { NextToken: input.NextToken }),\n });\n let { hostname: resolvedHostname } = await context.endpoint();\n if (context.disableHostPrefix !== true) {\n resolvedHostname = \"geofencing.\" + resolvedHostname;\n if (!__isValidHostname(resolvedHostname)) {\n throw new Error(\"ValidationError: prefixed hostname must be hostname compatible.\");\n }\n }\n return new __HttpRequest({\n protocol,\n hostname: resolvedHostname,\n port,\n method: \"POST\",\n headers,\n path: resolvedPath,\n body,\n });\n};\nexport const serializeAws_restJson1ListMapsCommand = async (input, context) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const headers = {\n \"content-type\": \"application/json\",\n };\n const resolvedPath = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` + \"/maps/v0/list-maps\";\n let body;\n body = JSON.stringify({\n ...(input.MaxResults != null && { MaxResults: input.MaxResults }),\n ...(input.NextToken != null && { NextToken: input.NextToken }),\n });\n let { hostname: resolvedHostname } = await context.endpoint();\n if (context.disableHostPrefix !== true) {\n resolvedHostname = \"maps.\" + resolvedHostname;\n if (!__isValidHostname(resolvedHostname)) {\n throw new Error(\"ValidationError: prefixed hostname must be hostname compatible.\");\n }\n }\n return new __HttpRequest({\n protocol,\n hostname: resolvedHostname,\n port,\n method: \"POST\",\n headers,\n path: resolvedPath,\n body,\n });\n};\nexport const serializeAws_restJson1ListPlaceIndexesCommand = async (input, context) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const headers = {\n \"content-type\": \"application/json\",\n };\n const resolvedPath = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` + \"/places/v0/list-indexes\";\n let body;\n body = JSON.stringify({\n ...(input.MaxResults != null && { MaxResults: input.MaxResults }),\n ...(input.NextToken != null && { NextToken: input.NextToken }),\n });\n let { hostname: resolvedHostname } = await context.endpoint();\n if (context.disableHostPrefix !== true) {\n resolvedHostname = \"places.\" + resolvedHostname;\n if (!__isValidHostname(resolvedHostname)) {\n throw new Error(\"ValidationError: prefixed hostname must be hostname compatible.\");\n }\n }\n return new __HttpRequest({\n protocol,\n hostname: resolvedHostname,\n port,\n method: \"POST\",\n headers,\n path: resolvedPath,\n body,\n });\n};\nexport const serializeAws_restJson1ListRouteCalculatorsCommand = async (input, context) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const headers = {\n \"content-type\": \"application/json\",\n };\n const resolvedPath = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` + \"/routes/v0/list-calculators\";\n let body;\n body = JSON.stringify({\n ...(input.MaxResults != null && { MaxResults: input.MaxResults }),\n ...(input.NextToken != null && { NextToken: input.NextToken }),\n });\n let { hostname: resolvedHostname } = await context.endpoint();\n if (context.disableHostPrefix !== true) {\n resolvedHostname = \"routes.\" + resolvedHostname;\n if (!__isValidHostname(resolvedHostname)) {\n throw new Error(\"ValidationError: prefixed hostname must be hostname compatible.\");\n }\n }\n return new __HttpRequest({\n protocol,\n hostname: resolvedHostname,\n port,\n method: \"POST\",\n headers,\n path: resolvedPath,\n body,\n });\n};\nexport const serializeAws_restJson1ListTagsForResourceCommand = async (input, context) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const headers = {};\n let resolvedPath = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` + \"/tags/{ResourceArn}\";\n resolvedPath = __resolvedPath(resolvedPath, input, \"ResourceArn\", () => input.ResourceArn, \"{ResourceArn}\", false);\n let body;\n let { hostname: resolvedHostname } = await context.endpoint();\n if (context.disableHostPrefix !== true) {\n resolvedHostname = \"metadata.\" + resolvedHostname;\n if (!__isValidHostname(resolvedHostname)) {\n throw new Error(\"ValidationError: prefixed hostname must be hostname compatible.\");\n }\n }\n return new __HttpRequest({\n protocol,\n hostname: resolvedHostname,\n port,\n method: \"GET\",\n headers,\n path: resolvedPath,\n body,\n });\n};\nexport const serializeAws_restJson1ListTrackerConsumersCommand = async (input, context) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const headers = {\n \"content-type\": \"application/json\",\n };\n let resolvedPath = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` +\n \"/tracking/v0/trackers/{TrackerName}/list-consumers\";\n resolvedPath = __resolvedPath(resolvedPath, input, \"TrackerName\", () => input.TrackerName, \"{TrackerName}\", false);\n let body;\n body = JSON.stringify({\n ...(input.MaxResults != null && { MaxResults: input.MaxResults }),\n ...(input.NextToken != null && { NextToken: input.NextToken }),\n });\n let { hostname: resolvedHostname } = await context.endpoint();\n if (context.disableHostPrefix !== true) {\n resolvedHostname = \"tracking.\" + resolvedHostname;\n if (!__isValidHostname(resolvedHostname)) {\n throw new Error(\"ValidationError: prefixed hostname must be hostname compatible.\");\n }\n }\n return new __HttpRequest({\n protocol,\n hostname: resolvedHostname,\n port,\n method: \"POST\",\n headers,\n path: resolvedPath,\n body,\n });\n};\nexport const serializeAws_restJson1ListTrackersCommand = async (input, context) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const headers = {\n \"content-type\": \"application/json\",\n };\n const resolvedPath = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` + \"/tracking/v0/list-trackers\";\n let body;\n body = JSON.stringify({\n ...(input.MaxResults != null && { MaxResults: input.MaxResults }),\n ...(input.NextToken != null && { NextToken: input.NextToken }),\n });\n let { hostname: resolvedHostname } = await context.endpoint();\n if (context.disableHostPrefix !== true) {\n resolvedHostname = \"tracking.\" + resolvedHostname;\n if (!__isValidHostname(resolvedHostname)) {\n throw new Error(\"ValidationError: prefixed hostname must be hostname compatible.\");\n }\n }\n return new __HttpRequest({\n protocol,\n hostname: resolvedHostname,\n port,\n method: \"POST\",\n headers,\n path: resolvedPath,\n body,\n });\n};\nexport const serializeAws_restJson1PutGeofenceCommand = async (input, context) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const headers = {\n \"content-type\": \"application/json\",\n };\n let resolvedPath = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` +\n \"/geofencing/v0/collections/{CollectionName}/geofences/{GeofenceId}\";\n resolvedPath = __resolvedPath(resolvedPath, input, \"CollectionName\", () => input.CollectionName, \"{CollectionName}\", false);\n resolvedPath = __resolvedPath(resolvedPath, input, \"GeofenceId\", () => input.GeofenceId, \"{GeofenceId}\", false);\n let body;\n body = JSON.stringify({\n ...(input.Geometry != null && { Geometry: serializeAws_restJson1GeofenceGeometry(input.Geometry, context) }),\n });\n let { hostname: resolvedHostname } = await context.endpoint();\n if (context.disableHostPrefix !== true) {\n resolvedHostname = \"geofencing.\" + resolvedHostname;\n if (!__isValidHostname(resolvedHostname)) {\n throw new Error(\"ValidationError: prefixed hostname must be hostname compatible.\");\n }\n }\n return new __HttpRequest({\n protocol,\n hostname: resolvedHostname,\n port,\n method: \"PUT\",\n headers,\n path: resolvedPath,\n body,\n });\n};\nexport const serializeAws_restJson1SearchPlaceIndexForPositionCommand = async (input, context) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const headers = {\n \"content-type\": \"application/json\",\n };\n let resolvedPath = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` +\n \"/places/v0/indexes/{IndexName}/search/position\";\n resolvedPath = __resolvedPath(resolvedPath, input, \"IndexName\", () => input.IndexName, \"{IndexName}\", false);\n let body;\n body = JSON.stringify({\n ...(input.Language != null && { Language: input.Language }),\n ...(input.MaxResults != null && { MaxResults: input.MaxResults }),\n ...(input.Position != null && { Position: serializeAws_restJson1Position(input.Position, context) }),\n });\n let { hostname: resolvedHostname } = await context.endpoint();\n if (context.disableHostPrefix !== true) {\n resolvedHostname = \"places.\" + resolvedHostname;\n if (!__isValidHostname(resolvedHostname)) {\n throw new Error(\"ValidationError: prefixed hostname must be hostname compatible.\");\n }\n }\n return new __HttpRequest({\n protocol,\n hostname: resolvedHostname,\n port,\n method: \"POST\",\n headers,\n path: resolvedPath,\n body,\n });\n};\nexport const serializeAws_restJson1SearchPlaceIndexForSuggestionsCommand = async (input, context) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const headers = {\n \"content-type\": \"application/json\",\n };\n let resolvedPath = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` +\n \"/places/v0/indexes/{IndexName}/search/suggestions\";\n resolvedPath = __resolvedPath(resolvedPath, input, \"IndexName\", () => input.IndexName, \"{IndexName}\", false);\n let body;\n body = JSON.stringify({\n ...(input.BiasPosition != null && { BiasPosition: serializeAws_restJson1Position(input.BiasPosition, context) }),\n ...(input.FilterBBox != null && { FilterBBox: serializeAws_restJson1BoundingBox(input.FilterBBox, context) }),\n ...(input.FilterCountries != null && {\n FilterCountries: serializeAws_restJson1CountryCodeList(input.FilterCountries, context),\n }),\n ...(input.Language != null && { Language: input.Language }),\n ...(input.MaxResults != null && { MaxResults: input.MaxResults }),\n ...(input.Text != null && { Text: input.Text }),\n });\n let { hostname: resolvedHostname } = await context.endpoint();\n if (context.disableHostPrefix !== true) {\n resolvedHostname = \"places.\" + resolvedHostname;\n if (!__isValidHostname(resolvedHostname)) {\n throw new Error(\"ValidationError: prefixed hostname must be hostname compatible.\");\n }\n }\n return new __HttpRequest({\n protocol,\n hostname: resolvedHostname,\n port,\n method: \"POST\",\n headers,\n path: resolvedPath,\n body,\n });\n};\nexport const serializeAws_restJson1SearchPlaceIndexForTextCommand = async (input, context) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const headers = {\n \"content-type\": \"application/json\",\n };\n let resolvedPath = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` +\n \"/places/v0/indexes/{IndexName}/search/text\";\n resolvedPath = __resolvedPath(resolvedPath, input, \"IndexName\", () => input.IndexName, \"{IndexName}\", false);\n let body;\n body = JSON.stringify({\n ...(input.BiasPosition != null && { BiasPosition: serializeAws_restJson1Position(input.BiasPosition, context) }),\n ...(input.FilterBBox != null && { FilterBBox: serializeAws_restJson1BoundingBox(input.FilterBBox, context) }),\n ...(input.FilterCountries != null && {\n FilterCountries: serializeAws_restJson1CountryCodeList(input.FilterCountries, context),\n }),\n ...(input.Language != null && { Language: input.Language }),\n ...(input.MaxResults != null && { MaxResults: input.MaxResults }),\n ...(input.Text != null && { Text: input.Text }),\n });\n let { hostname: resolvedHostname } = await context.endpoint();\n if (context.disableHostPrefix !== true) {\n resolvedHostname = \"places.\" + resolvedHostname;\n if (!__isValidHostname(resolvedHostname)) {\n throw new Error(\"ValidationError: prefixed hostname must be hostname compatible.\");\n }\n }\n return new __HttpRequest({\n protocol,\n hostname: resolvedHostname,\n port,\n method: \"POST\",\n headers,\n path: resolvedPath,\n body,\n });\n};\nexport const serializeAws_restJson1TagResourceCommand = async (input, context) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const headers = {\n \"content-type\": \"application/json\",\n };\n let resolvedPath = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` + \"/tags/{ResourceArn}\";\n resolvedPath = __resolvedPath(resolvedPath, input, \"ResourceArn\", () => input.ResourceArn, \"{ResourceArn}\", false);\n let body;\n body = JSON.stringify({\n ...(input.Tags != null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }),\n });\n let { hostname: resolvedHostname } = await context.endpoint();\n if (context.disableHostPrefix !== true) {\n resolvedHostname = \"metadata.\" + resolvedHostname;\n if (!__isValidHostname(resolvedHostname)) {\n throw new Error(\"ValidationError: prefixed hostname must be hostname compatible.\");\n }\n }\n return new __HttpRequest({\n protocol,\n hostname: resolvedHostname,\n port,\n method: \"POST\",\n headers,\n path: resolvedPath,\n body,\n });\n};\nexport const serializeAws_restJson1UntagResourceCommand = async (input, context) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const headers = {};\n let resolvedPath = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` + \"/tags/{ResourceArn}\";\n resolvedPath = __resolvedPath(resolvedPath, input, \"ResourceArn\", () => input.ResourceArn, \"{ResourceArn}\", false);\n const query = map({\n tagKeys: [() => input.TagKeys !== void 0, () => (input.TagKeys || []).map((_entry) => _entry)],\n });\n let body;\n let { hostname: resolvedHostname } = await context.endpoint();\n if (context.disableHostPrefix !== true) {\n resolvedHostname = \"metadata.\" + resolvedHostname;\n if (!__isValidHostname(resolvedHostname)) {\n throw new Error(\"ValidationError: prefixed hostname must be hostname compatible.\");\n }\n }\n return new __HttpRequest({\n protocol,\n hostname: resolvedHostname,\n port,\n method: \"DELETE\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\nexport const serializeAws_restJson1UpdateGeofenceCollectionCommand = async (input, context) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const headers = {\n \"content-type\": \"application/json\",\n };\n let resolvedPath = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` +\n \"/geofencing/v0/collections/{CollectionName}\";\n resolvedPath = __resolvedPath(resolvedPath, input, \"CollectionName\", () => input.CollectionName, \"{CollectionName}\", false);\n let body;\n body = JSON.stringify({\n ...(input.Description != null && { Description: input.Description }),\n ...(input.PricingPlan != null && { PricingPlan: input.PricingPlan }),\n ...(input.PricingPlanDataSource != null && { PricingPlanDataSource: input.PricingPlanDataSource }),\n });\n let { hostname: resolvedHostname } = await context.endpoint();\n if (context.disableHostPrefix !== true) {\n resolvedHostname = \"geofencing.\" + resolvedHostname;\n if (!__isValidHostname(resolvedHostname)) {\n throw new Error(\"ValidationError: prefixed hostname must be hostname compatible.\");\n }\n }\n return new __HttpRequest({\n protocol,\n hostname: resolvedHostname,\n port,\n method: \"PATCH\",\n headers,\n path: resolvedPath,\n body,\n });\n};\nexport const serializeAws_restJson1UpdateMapCommand = async (input, context) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const headers = {\n \"content-type\": \"application/json\",\n };\n let resolvedPath = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` + \"/maps/v0/maps/{MapName}\";\n resolvedPath = __resolvedPath(resolvedPath, input, \"MapName\", () => input.MapName, \"{MapName}\", false);\n let body;\n body = JSON.stringify({\n ...(input.Description != null && { Description: input.Description }),\n ...(input.PricingPlan != null && { PricingPlan: input.PricingPlan }),\n });\n let { hostname: resolvedHostname } = await context.endpoint();\n if (context.disableHostPrefix !== true) {\n resolvedHostname = \"maps.\" + resolvedHostname;\n if (!__isValidHostname(resolvedHostname)) {\n throw new Error(\"ValidationError: prefixed hostname must be hostname compatible.\");\n }\n }\n return new __HttpRequest({\n protocol,\n hostname: resolvedHostname,\n port,\n method: \"PATCH\",\n headers,\n path: resolvedPath,\n body,\n });\n};\nexport const serializeAws_restJson1UpdatePlaceIndexCommand = async (input, context) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const headers = {\n \"content-type\": \"application/json\",\n };\n let resolvedPath = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` + \"/places/v0/indexes/{IndexName}\";\n resolvedPath = __resolvedPath(resolvedPath, input, \"IndexName\", () => input.IndexName, \"{IndexName}\", false);\n let body;\n body = JSON.stringify({\n ...(input.DataSourceConfiguration != null && {\n DataSourceConfiguration: serializeAws_restJson1DataSourceConfiguration(input.DataSourceConfiguration, context),\n }),\n ...(input.Description != null && { Description: input.Description }),\n ...(input.PricingPlan != null && { PricingPlan: input.PricingPlan }),\n });\n let { hostname: resolvedHostname } = await context.endpoint();\n if (context.disableHostPrefix !== true) {\n resolvedHostname = \"places.\" + resolvedHostname;\n if (!__isValidHostname(resolvedHostname)) {\n throw new Error(\"ValidationError: prefixed hostname must be hostname compatible.\");\n }\n }\n return new __HttpRequest({\n protocol,\n hostname: resolvedHostname,\n port,\n method: \"PATCH\",\n headers,\n path: resolvedPath,\n body,\n });\n};\nexport const serializeAws_restJson1UpdateRouteCalculatorCommand = async (input, context) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const headers = {\n \"content-type\": \"application/json\",\n };\n let resolvedPath = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` + \"/routes/v0/calculators/{CalculatorName}\";\n resolvedPath = __resolvedPath(resolvedPath, input, \"CalculatorName\", () => input.CalculatorName, \"{CalculatorName}\", false);\n let body;\n body = JSON.stringify({\n ...(input.Description != null && { Description: input.Description }),\n ...(input.PricingPlan != null && { PricingPlan: input.PricingPlan }),\n });\n let { hostname: resolvedHostname } = await context.endpoint();\n if (context.disableHostPrefix !== true) {\n resolvedHostname = \"routes.\" + resolvedHostname;\n if (!__isValidHostname(resolvedHostname)) {\n throw new Error(\"ValidationError: prefixed hostname must be hostname compatible.\");\n }\n }\n return new __HttpRequest({\n protocol,\n hostname: resolvedHostname,\n port,\n method: \"PATCH\",\n headers,\n path: resolvedPath,\n body,\n });\n};\nexport const serializeAws_restJson1UpdateTrackerCommand = async (input, context) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const headers = {\n \"content-type\": \"application/json\",\n };\n let resolvedPath = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` + \"/tracking/v0/trackers/{TrackerName}\";\n resolvedPath = __resolvedPath(resolvedPath, input, \"TrackerName\", () => input.TrackerName, \"{TrackerName}\", false);\n let body;\n body = JSON.stringify({\n ...(input.Description != null && { Description: input.Description }),\n ...(input.PositionFiltering != null && { PositionFiltering: input.PositionFiltering }),\n ...(input.PricingPlan != null && { PricingPlan: input.PricingPlan }),\n ...(input.PricingPlanDataSource != null && { PricingPlanDataSource: input.PricingPlanDataSource }),\n });\n let { hostname: resolvedHostname } = await context.endpoint();\n if (context.disableHostPrefix !== true) {\n resolvedHostname = \"tracking.\" + resolvedHostname;\n if (!__isValidHostname(resolvedHostname)) {\n throw new Error(\"ValidationError: prefixed hostname must be hostname compatible.\");\n }\n }\n return new __HttpRequest({\n protocol,\n hostname: resolvedHostname,\n port,\n method: \"PATCH\",\n headers,\n path: resolvedPath,\n body,\n });\n};\nexport const deserializeAws_restJson1AssociateTrackerConsumerCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restJson1AssociateTrackerConsumerCommandError(output, context);\n }\n const contents = map({\n $metadata: deserializeMetadata(output),\n });\n await collectBody(output.body, context);\n return contents;\n};\nconst deserializeAws_restJson1AssociateTrackerConsumerCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseErrorBody(output.body, context),\n };\n const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.location#AccessDeniedException\":\n throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);\n case \"ConflictException\":\n case \"com.amazonaws.location#ConflictException\":\n throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);\n case \"InternalServerException\":\n case \"com.amazonaws.location#InternalServerException\":\n throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);\n case \"ResourceNotFoundException\":\n case \"com.amazonaws.location#ResourceNotFoundException\":\n throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);\n case \"ServiceQuotaExceededException\":\n case \"com.amazonaws.location#ServiceQuotaExceededException\":\n throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);\n case \"ThrottlingException\":\n case \"com.amazonaws.location#ThrottlingException\":\n throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);\n case \"ValidationException\":\n case \"com.amazonaws.location#ValidationException\":\n throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n throwDefaultError({\n output,\n parsedBody,\n exceptionCtor: __BaseException,\n errorCode,\n });\n }\n};\nexport const deserializeAws_restJson1BatchDeleteDevicePositionHistoryCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restJson1BatchDeleteDevicePositionHistoryCommandError(output, context);\n }\n const contents = map({\n $metadata: deserializeMetadata(output),\n });\n const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), \"body\");\n if (data.Errors != null) {\n contents.Errors = deserializeAws_restJson1BatchDeleteDevicePositionHistoryErrorList(data.Errors, context);\n }\n return contents;\n};\nconst deserializeAws_restJson1BatchDeleteDevicePositionHistoryCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseErrorBody(output.body, context),\n };\n const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.location#AccessDeniedException\":\n throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);\n case \"InternalServerException\":\n case \"com.amazonaws.location#InternalServerException\":\n throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);\n case \"ResourceNotFoundException\":\n case \"com.amazonaws.location#ResourceNotFoundException\":\n throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);\n case \"ThrottlingException\":\n case \"com.amazonaws.location#ThrottlingException\":\n throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);\n case \"ValidationException\":\n case \"com.amazonaws.location#ValidationException\":\n throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n throwDefaultError({\n output,\n parsedBody,\n exceptionCtor: __BaseException,\n errorCode,\n });\n }\n};\nexport const deserializeAws_restJson1BatchDeleteGeofenceCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restJson1BatchDeleteGeofenceCommandError(output, context);\n }\n const contents = map({\n $metadata: deserializeMetadata(output),\n });\n const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), \"body\");\n if (data.Errors != null) {\n contents.Errors = deserializeAws_restJson1BatchDeleteGeofenceErrorList(data.Errors, context);\n }\n return contents;\n};\nconst deserializeAws_restJson1BatchDeleteGeofenceCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseErrorBody(output.body, context),\n };\n const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.location#AccessDeniedException\":\n throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);\n case \"InternalServerException\":\n case \"com.amazonaws.location#InternalServerException\":\n throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);\n case \"ResourceNotFoundException\":\n case \"com.amazonaws.location#ResourceNotFoundException\":\n throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);\n case \"ThrottlingException\":\n case \"com.amazonaws.location#ThrottlingException\":\n throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);\n case \"ValidationException\":\n case \"com.amazonaws.location#ValidationException\":\n throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n throwDefaultError({\n output,\n parsedBody,\n exceptionCtor: __BaseException,\n errorCode,\n });\n }\n};\nexport const deserializeAws_restJson1BatchEvaluateGeofencesCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restJson1BatchEvaluateGeofencesCommandError(output, context);\n }\n const contents = map({\n $metadata: deserializeMetadata(output),\n });\n const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), \"body\");\n if (data.Errors != null) {\n contents.Errors = deserializeAws_restJson1BatchEvaluateGeofencesErrorList(data.Errors, context);\n }\n return contents;\n};\nconst deserializeAws_restJson1BatchEvaluateGeofencesCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseErrorBody(output.body, context),\n };\n const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.location#AccessDeniedException\":\n throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);\n case \"InternalServerException\":\n case \"com.amazonaws.location#InternalServerException\":\n throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);\n case \"ResourceNotFoundException\":\n case \"com.amazonaws.location#ResourceNotFoundException\":\n throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);\n case \"ThrottlingException\":\n case \"com.amazonaws.location#ThrottlingException\":\n throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);\n case \"ValidationException\":\n case \"com.amazonaws.location#ValidationException\":\n throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n throwDefaultError({\n output,\n parsedBody,\n exceptionCtor: __BaseException,\n errorCode,\n });\n }\n};\nexport const deserializeAws_restJson1BatchGetDevicePositionCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restJson1BatchGetDevicePositionCommandError(output, context);\n }\n const contents = map({\n $metadata: deserializeMetadata(output),\n });\n const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), \"body\");\n if (data.DevicePositions != null) {\n contents.DevicePositions = deserializeAws_restJson1DevicePositionList(data.DevicePositions, context);\n }\n if (data.Errors != null) {\n contents.Errors = deserializeAws_restJson1BatchGetDevicePositionErrorList(data.Errors, context);\n }\n return contents;\n};\nconst deserializeAws_restJson1BatchGetDevicePositionCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseErrorBody(output.body, context),\n };\n const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.location#AccessDeniedException\":\n throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);\n case \"InternalServerException\":\n case \"com.amazonaws.location#InternalServerException\":\n throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);\n case \"ResourceNotFoundException\":\n case \"com.amazonaws.location#ResourceNotFoundException\":\n throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);\n case \"ThrottlingException\":\n case \"com.amazonaws.location#ThrottlingException\":\n throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);\n case \"ValidationException\":\n case \"com.amazonaws.location#ValidationException\":\n throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n throwDefaultError({\n output,\n parsedBody,\n exceptionCtor: __BaseException,\n errorCode,\n });\n }\n};\nexport const deserializeAws_restJson1BatchPutGeofenceCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restJson1BatchPutGeofenceCommandError(output, context);\n }\n const contents = map({\n $metadata: deserializeMetadata(output),\n });\n const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), \"body\");\n if (data.Errors != null) {\n contents.Errors = deserializeAws_restJson1BatchPutGeofenceErrorList(data.Errors, context);\n }\n if (data.Successes != null) {\n contents.Successes = deserializeAws_restJson1BatchPutGeofenceSuccessList(data.Successes, context);\n }\n return contents;\n};\nconst deserializeAws_restJson1BatchPutGeofenceCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseErrorBody(output.body, context),\n };\n const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.location#AccessDeniedException\":\n throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);\n case \"InternalServerException\":\n case \"com.amazonaws.location#InternalServerException\":\n throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);\n case \"ResourceNotFoundException\":\n case \"com.amazonaws.location#ResourceNotFoundException\":\n throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);\n case \"ThrottlingException\":\n case \"com.amazonaws.location#ThrottlingException\":\n throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);\n case \"ValidationException\":\n case \"com.amazonaws.location#ValidationException\":\n throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n throwDefaultError({\n output,\n parsedBody,\n exceptionCtor: __BaseException,\n errorCode,\n });\n }\n};\nexport const deserializeAws_restJson1BatchUpdateDevicePositionCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restJson1BatchUpdateDevicePositionCommandError(output, context);\n }\n const contents = map({\n $metadata: deserializeMetadata(output),\n });\n const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), \"body\");\n if (data.Errors != null) {\n contents.Errors = deserializeAws_restJson1BatchUpdateDevicePositionErrorList(data.Errors, context);\n }\n return contents;\n};\nconst deserializeAws_restJson1BatchUpdateDevicePositionCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseErrorBody(output.body, context),\n };\n const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.location#AccessDeniedException\":\n throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);\n case \"InternalServerException\":\n case \"com.amazonaws.location#InternalServerException\":\n throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);\n case \"ResourceNotFoundException\":\n case \"com.amazonaws.location#ResourceNotFoundException\":\n throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);\n case \"ThrottlingException\":\n case \"com.amazonaws.location#ThrottlingException\":\n throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);\n case \"ValidationException\":\n case \"com.amazonaws.location#ValidationException\":\n throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n throwDefaultError({\n output,\n parsedBody,\n exceptionCtor: __BaseException,\n errorCode,\n });\n }\n};\nexport const deserializeAws_restJson1CalculateRouteCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restJson1CalculateRouteCommandError(output, context);\n }\n const contents = map({\n $metadata: deserializeMetadata(output),\n });\n const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), \"body\");\n if (data.Legs != null) {\n contents.Legs = deserializeAws_restJson1LegList(data.Legs, context);\n }\n if (data.Summary != null) {\n contents.Summary = deserializeAws_restJson1CalculateRouteSummary(data.Summary, context);\n }\n return contents;\n};\nconst deserializeAws_restJson1CalculateRouteCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseErrorBody(output.body, context),\n };\n const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.location#AccessDeniedException\":\n throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);\n case \"InternalServerException\":\n case \"com.amazonaws.location#InternalServerException\":\n throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);\n case \"ResourceNotFoundException\":\n case \"com.amazonaws.location#ResourceNotFoundException\":\n throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);\n case \"ThrottlingException\":\n case \"com.amazonaws.location#ThrottlingException\":\n throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);\n case \"ValidationException\":\n case \"com.amazonaws.location#ValidationException\":\n throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n throwDefaultError({\n output,\n parsedBody,\n exceptionCtor: __BaseException,\n errorCode,\n });\n }\n};\nexport const deserializeAws_restJson1CalculateRouteMatrixCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restJson1CalculateRouteMatrixCommandError(output, context);\n }\n const contents = map({\n $metadata: deserializeMetadata(output),\n });\n const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), \"body\");\n if (data.RouteMatrix != null) {\n contents.RouteMatrix = deserializeAws_restJson1RouteMatrix(data.RouteMatrix, context);\n }\n if (data.SnappedDeparturePositions != null) {\n contents.SnappedDeparturePositions = deserializeAws_restJson1PositionList(data.SnappedDeparturePositions, context);\n }\n if (data.SnappedDestinationPositions != null) {\n contents.SnappedDestinationPositions = deserializeAws_restJson1PositionList(data.SnappedDestinationPositions, context);\n }\n if (data.Summary != null) {\n contents.Summary = deserializeAws_restJson1CalculateRouteMatrixSummary(data.Summary, context);\n }\n return contents;\n};\nconst deserializeAws_restJson1CalculateRouteMatrixCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseErrorBody(output.body, context),\n };\n const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.location#AccessDeniedException\":\n throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);\n case \"InternalServerException\":\n case \"com.amazonaws.location#InternalServerException\":\n throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);\n case \"ResourceNotFoundException\":\n case \"com.amazonaws.location#ResourceNotFoundException\":\n throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);\n case \"ThrottlingException\":\n case \"com.amazonaws.location#ThrottlingException\":\n throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);\n case \"ValidationException\":\n case \"com.amazonaws.location#ValidationException\":\n throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n throwDefaultError({\n output,\n parsedBody,\n exceptionCtor: __BaseException,\n errorCode,\n });\n }\n};\nexport const deserializeAws_restJson1CreateGeofenceCollectionCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restJson1CreateGeofenceCollectionCommandError(output, context);\n }\n const contents = map({\n $metadata: deserializeMetadata(output),\n });\n const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), \"body\");\n if (data.CollectionArn != null) {\n contents.CollectionArn = __expectString(data.CollectionArn);\n }\n if (data.CollectionName != null) {\n contents.CollectionName = __expectString(data.CollectionName);\n }\n if (data.CreateTime != null) {\n contents.CreateTime = __expectNonNull(__parseRfc3339DateTime(data.CreateTime));\n }\n return contents;\n};\nconst deserializeAws_restJson1CreateGeofenceCollectionCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseErrorBody(output.body, context),\n };\n const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.location#AccessDeniedException\":\n throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);\n case \"ConflictException\":\n case \"com.amazonaws.location#ConflictException\":\n throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);\n case \"InternalServerException\":\n case \"com.amazonaws.location#InternalServerException\":\n throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);\n case \"ThrottlingException\":\n case \"com.amazonaws.location#ThrottlingException\":\n throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);\n case \"ValidationException\":\n case \"com.amazonaws.location#ValidationException\":\n throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n throwDefaultError({\n output,\n parsedBody,\n exceptionCtor: __BaseException,\n errorCode,\n });\n }\n};\nexport const deserializeAws_restJson1CreateMapCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restJson1CreateMapCommandError(output, context);\n }\n const contents = map({\n $metadata: deserializeMetadata(output),\n });\n const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), \"body\");\n if (data.CreateTime != null) {\n contents.CreateTime = __expectNonNull(__parseRfc3339DateTime(data.CreateTime));\n }\n if (data.MapArn != null) {\n contents.MapArn = __expectString(data.MapArn);\n }\n if (data.MapName != null) {\n contents.MapName = __expectString(data.MapName);\n }\n return contents;\n};\nconst deserializeAws_restJson1CreateMapCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseErrorBody(output.body, context),\n };\n const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.location#AccessDeniedException\":\n throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);\n case \"ConflictException\":\n case \"com.amazonaws.location#ConflictException\":\n throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);\n case \"InternalServerException\":\n case \"com.amazonaws.location#InternalServerException\":\n throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);\n case \"ThrottlingException\":\n case \"com.amazonaws.location#ThrottlingException\":\n throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);\n case \"ValidationException\":\n case \"com.amazonaws.location#ValidationException\":\n throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n throwDefaultError({\n output,\n parsedBody,\n exceptionCtor: __BaseException,\n errorCode,\n });\n }\n};\nexport const deserializeAws_restJson1CreatePlaceIndexCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restJson1CreatePlaceIndexCommandError(output, context);\n }\n const contents = map({\n $metadata: deserializeMetadata(output),\n });\n const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), \"body\");\n if (data.CreateTime != null) {\n contents.CreateTime = __expectNonNull(__parseRfc3339DateTime(data.CreateTime));\n }\n if (data.IndexArn != null) {\n contents.IndexArn = __expectString(data.IndexArn);\n }\n if (data.IndexName != null) {\n contents.IndexName = __expectString(data.IndexName);\n }\n return contents;\n};\nconst deserializeAws_restJson1CreatePlaceIndexCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseErrorBody(output.body, context),\n };\n const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.location#AccessDeniedException\":\n throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);\n case \"ConflictException\":\n case \"com.amazonaws.location#ConflictException\":\n throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);\n case \"InternalServerException\":\n case \"com.amazonaws.location#InternalServerException\":\n throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);\n case \"ThrottlingException\":\n case \"com.amazonaws.location#ThrottlingException\":\n throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);\n case \"ValidationException\":\n case \"com.amazonaws.location#ValidationException\":\n throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n throwDefaultError({\n output,\n parsedBody,\n exceptionCtor: __BaseException,\n errorCode,\n });\n }\n};\nexport const deserializeAws_restJson1CreateRouteCalculatorCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restJson1CreateRouteCalculatorCommandError(output, context);\n }\n const contents = map({\n $metadata: deserializeMetadata(output),\n });\n const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), \"body\");\n if (data.CalculatorArn != null) {\n contents.CalculatorArn = __expectString(data.CalculatorArn);\n }\n if (data.CalculatorName != null) {\n contents.CalculatorName = __expectString(data.CalculatorName);\n }\n if (data.CreateTime != null) {\n contents.CreateTime = __expectNonNull(__parseRfc3339DateTime(data.CreateTime));\n }\n return contents;\n};\nconst deserializeAws_restJson1CreateRouteCalculatorCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseErrorBody(output.body, context),\n };\n const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.location#AccessDeniedException\":\n throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);\n case \"ConflictException\":\n case \"com.amazonaws.location#ConflictException\":\n throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);\n case \"InternalServerException\":\n case \"com.amazonaws.location#InternalServerException\":\n throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);\n case \"ThrottlingException\":\n case \"com.amazonaws.location#ThrottlingException\":\n throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);\n case \"ValidationException\":\n case \"com.amazonaws.location#ValidationException\":\n throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n throwDefaultError({\n output,\n parsedBody,\n exceptionCtor: __BaseException,\n errorCode,\n });\n }\n};\nexport const deserializeAws_restJson1CreateTrackerCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restJson1CreateTrackerCommandError(output, context);\n }\n const contents = map({\n $metadata: deserializeMetadata(output),\n });\n const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), \"body\");\n if (data.CreateTime != null) {\n contents.CreateTime = __expectNonNull(__parseRfc3339DateTime(data.CreateTime));\n }\n if (data.TrackerArn != null) {\n contents.TrackerArn = __expectString(data.TrackerArn);\n }\n if (data.TrackerName != null) {\n contents.TrackerName = __expectString(data.TrackerName);\n }\n return contents;\n};\nconst deserializeAws_restJson1CreateTrackerCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseErrorBody(output.body, context),\n };\n const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.location#AccessDeniedException\":\n throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);\n case \"ConflictException\":\n case \"com.amazonaws.location#ConflictException\":\n throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);\n case \"InternalServerException\":\n case \"com.amazonaws.location#InternalServerException\":\n throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);\n case \"ThrottlingException\":\n case \"com.amazonaws.location#ThrottlingException\":\n throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);\n case \"ValidationException\":\n case \"com.amazonaws.location#ValidationException\":\n throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n throwDefaultError({\n output,\n parsedBody,\n exceptionCtor: __BaseException,\n errorCode,\n });\n }\n};\nexport const deserializeAws_restJson1DeleteGeofenceCollectionCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restJson1DeleteGeofenceCollectionCommandError(output, context);\n }\n const contents = map({\n $metadata: deserializeMetadata(output),\n });\n await collectBody(output.body, context);\n return contents;\n};\nconst deserializeAws_restJson1DeleteGeofenceCollectionCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseErrorBody(output.body, context),\n };\n const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.location#AccessDeniedException\":\n throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);\n case \"InternalServerException\":\n case \"com.amazonaws.location#InternalServerException\":\n throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);\n case \"ResourceNotFoundException\":\n case \"com.amazonaws.location#ResourceNotFoundException\":\n throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);\n case \"ThrottlingException\":\n case \"com.amazonaws.location#ThrottlingException\":\n throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);\n case \"ValidationException\":\n case \"com.amazonaws.location#ValidationException\":\n throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n throwDefaultError({\n output,\n parsedBody,\n exceptionCtor: __BaseException,\n errorCode,\n });\n }\n};\nexport const deserializeAws_restJson1DeleteMapCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restJson1DeleteMapCommandError(output, context);\n }\n const contents = map({\n $metadata: deserializeMetadata(output),\n });\n await collectBody(output.body, context);\n return contents;\n};\nconst deserializeAws_restJson1DeleteMapCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseErrorBody(output.body, context),\n };\n const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.location#AccessDeniedException\":\n throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);\n case \"InternalServerException\":\n case \"com.amazonaws.location#InternalServerException\":\n throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);\n case \"ResourceNotFoundException\":\n case \"com.amazonaws.location#ResourceNotFoundException\":\n throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);\n case \"ThrottlingException\":\n case \"com.amazonaws.location#ThrottlingException\":\n throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);\n case \"ValidationException\":\n case \"com.amazonaws.location#ValidationException\":\n throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n throwDefaultError({\n output,\n parsedBody,\n exceptionCtor: __BaseException,\n errorCode,\n });\n }\n};\nexport const deserializeAws_restJson1DeletePlaceIndexCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restJson1DeletePlaceIndexCommandError(output, context);\n }\n const contents = map({\n $metadata: deserializeMetadata(output),\n });\n await collectBody(output.body, context);\n return contents;\n};\nconst deserializeAws_restJson1DeletePlaceIndexCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseErrorBody(output.body, context),\n };\n const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.location#AccessDeniedException\":\n throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);\n case \"InternalServerException\":\n case \"com.amazonaws.location#InternalServerException\":\n throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);\n case \"ResourceNotFoundException\":\n case \"com.amazonaws.location#ResourceNotFoundException\":\n throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);\n case \"ThrottlingException\":\n case \"com.amazonaws.location#ThrottlingException\":\n throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);\n case \"ValidationException\":\n case \"com.amazonaws.location#ValidationException\":\n throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n throwDefaultError({\n output,\n parsedBody,\n exceptionCtor: __BaseException,\n errorCode,\n });\n }\n};\nexport const deserializeAws_restJson1DeleteRouteCalculatorCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restJson1DeleteRouteCalculatorCommandError(output, context);\n }\n const contents = map({\n $metadata: deserializeMetadata(output),\n });\n await collectBody(output.body, context);\n return contents;\n};\nconst deserializeAws_restJson1DeleteRouteCalculatorCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseErrorBody(output.body, context),\n };\n const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.location#AccessDeniedException\":\n throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);\n case \"InternalServerException\":\n case \"com.amazonaws.location#InternalServerException\":\n throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);\n case \"ResourceNotFoundException\":\n case \"com.amazonaws.location#ResourceNotFoundException\":\n throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);\n case \"ThrottlingException\":\n case \"com.amazonaws.location#ThrottlingException\":\n throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);\n case \"ValidationException\":\n case \"com.amazonaws.location#ValidationException\":\n throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n throwDefaultError({\n output,\n parsedBody,\n exceptionCtor: __BaseException,\n errorCode,\n });\n }\n};\nexport const deserializeAws_restJson1DeleteTrackerCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restJson1DeleteTrackerCommandError(output, context);\n }\n const contents = map({\n $metadata: deserializeMetadata(output),\n });\n await collectBody(output.body, context);\n return contents;\n};\nconst deserializeAws_restJson1DeleteTrackerCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseErrorBody(output.body, context),\n };\n const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.location#AccessDeniedException\":\n throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);\n case \"InternalServerException\":\n case \"com.amazonaws.location#InternalServerException\":\n throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);\n case \"ResourceNotFoundException\":\n case \"com.amazonaws.location#ResourceNotFoundException\":\n throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);\n case \"ThrottlingException\":\n case \"com.amazonaws.location#ThrottlingException\":\n throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);\n case \"ValidationException\":\n case \"com.amazonaws.location#ValidationException\":\n throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n throwDefaultError({\n output,\n parsedBody,\n exceptionCtor: __BaseException,\n errorCode,\n });\n }\n};\nexport const deserializeAws_restJson1DescribeGeofenceCollectionCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restJson1DescribeGeofenceCollectionCommandError(output, context);\n }\n const contents = map({\n $metadata: deserializeMetadata(output),\n });\n const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), \"body\");\n if (data.CollectionArn != null) {\n contents.CollectionArn = __expectString(data.CollectionArn);\n }\n if (data.CollectionName != null) {\n contents.CollectionName = __expectString(data.CollectionName);\n }\n if (data.CreateTime != null) {\n contents.CreateTime = __expectNonNull(__parseRfc3339DateTime(data.CreateTime));\n }\n if (data.Description != null) {\n contents.Description = __expectString(data.Description);\n }\n if (data.KmsKeyId != null) {\n contents.KmsKeyId = __expectString(data.KmsKeyId);\n }\n if (data.PricingPlan != null) {\n contents.PricingPlan = __expectString(data.PricingPlan);\n }\n if (data.PricingPlanDataSource != null) {\n contents.PricingPlanDataSource = __expectString(data.PricingPlanDataSource);\n }\n if (data.Tags != null) {\n contents.Tags = deserializeAws_restJson1TagMap(data.Tags, context);\n }\n if (data.UpdateTime != null) {\n contents.UpdateTime = __expectNonNull(__parseRfc3339DateTime(data.UpdateTime));\n }\n return contents;\n};\nconst deserializeAws_restJson1DescribeGeofenceCollectionCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseErrorBody(output.body, context),\n };\n const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.location#AccessDeniedException\":\n throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);\n case \"InternalServerException\":\n case \"com.amazonaws.location#InternalServerException\":\n throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);\n case \"ResourceNotFoundException\":\n case \"com.amazonaws.location#ResourceNotFoundException\":\n throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);\n case \"ThrottlingException\":\n case \"com.amazonaws.location#ThrottlingException\":\n throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);\n case \"ValidationException\":\n case \"com.amazonaws.location#ValidationException\":\n throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n throwDefaultError({\n output,\n parsedBody,\n exceptionCtor: __BaseException,\n errorCode,\n });\n }\n};\nexport const deserializeAws_restJson1DescribeMapCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restJson1DescribeMapCommandError(output, context);\n }\n const contents = map({\n $metadata: deserializeMetadata(output),\n });\n const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), \"body\");\n if (data.Configuration != null) {\n contents.Configuration = deserializeAws_restJson1MapConfiguration(data.Configuration, context);\n }\n if (data.CreateTime != null) {\n contents.CreateTime = __expectNonNull(__parseRfc3339DateTime(data.CreateTime));\n }\n if (data.DataSource != null) {\n contents.DataSource = __expectString(data.DataSource);\n }\n if (data.Description != null) {\n contents.Description = __expectString(data.Description);\n }\n if (data.MapArn != null) {\n contents.MapArn = __expectString(data.MapArn);\n }\n if (data.MapName != null) {\n contents.MapName = __expectString(data.MapName);\n }\n if (data.PricingPlan != null) {\n contents.PricingPlan = __expectString(data.PricingPlan);\n }\n if (data.Tags != null) {\n contents.Tags = deserializeAws_restJson1TagMap(data.Tags, context);\n }\n if (data.UpdateTime != null) {\n contents.UpdateTime = __expectNonNull(__parseRfc3339DateTime(data.UpdateTime));\n }\n return contents;\n};\nconst deserializeAws_restJson1DescribeMapCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseErrorBody(output.body, context),\n };\n const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.location#AccessDeniedException\":\n throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);\n case \"InternalServerException\":\n case \"com.amazonaws.location#InternalServerException\":\n throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);\n case \"ResourceNotFoundException\":\n case \"com.amazonaws.location#ResourceNotFoundException\":\n throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);\n case \"ThrottlingException\":\n case \"com.amazonaws.location#ThrottlingException\":\n throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);\n case \"ValidationException\":\n case \"com.amazonaws.location#ValidationException\":\n throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n throwDefaultError({\n output,\n parsedBody,\n exceptionCtor: __BaseException,\n errorCode,\n });\n }\n};\nexport const deserializeAws_restJson1DescribePlaceIndexCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restJson1DescribePlaceIndexCommandError(output, context);\n }\n const contents = map({\n $metadata: deserializeMetadata(output),\n });\n const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), \"body\");\n if (data.CreateTime != null) {\n contents.CreateTime = __expectNonNull(__parseRfc3339DateTime(data.CreateTime));\n }\n if (data.DataSource != null) {\n contents.DataSource = __expectString(data.DataSource);\n }\n if (data.DataSourceConfiguration != null) {\n contents.DataSourceConfiguration = deserializeAws_restJson1DataSourceConfiguration(data.DataSourceConfiguration, context);\n }\n if (data.Description != null) {\n contents.Description = __expectString(data.Description);\n }\n if (data.IndexArn != null) {\n contents.IndexArn = __expectString(data.IndexArn);\n }\n if (data.IndexName != null) {\n contents.IndexName = __expectString(data.IndexName);\n }\n if (data.PricingPlan != null) {\n contents.PricingPlan = __expectString(data.PricingPlan);\n }\n if (data.Tags != null) {\n contents.Tags = deserializeAws_restJson1TagMap(data.Tags, context);\n }\n if (data.UpdateTime != null) {\n contents.UpdateTime = __expectNonNull(__parseRfc3339DateTime(data.UpdateTime));\n }\n return contents;\n};\nconst deserializeAws_restJson1DescribePlaceIndexCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseErrorBody(output.body, context),\n };\n const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.location#AccessDeniedException\":\n throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);\n case \"InternalServerException\":\n case \"com.amazonaws.location#InternalServerException\":\n throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);\n case \"ResourceNotFoundException\":\n case \"com.amazonaws.location#ResourceNotFoundException\":\n throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);\n case \"ThrottlingException\":\n case \"com.amazonaws.location#ThrottlingException\":\n throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);\n case \"ValidationException\":\n case \"com.amazonaws.location#ValidationException\":\n throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n throwDefaultError({\n output,\n parsedBody,\n exceptionCtor: __BaseException,\n errorCode,\n });\n }\n};\nexport const deserializeAws_restJson1DescribeRouteCalculatorCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restJson1DescribeRouteCalculatorCommandError(output, context);\n }\n const contents = map({\n $metadata: deserializeMetadata(output),\n });\n const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), \"body\");\n if (data.CalculatorArn != null) {\n contents.CalculatorArn = __expectString(data.CalculatorArn);\n }\n if (data.CalculatorName != null) {\n contents.CalculatorName = __expectString(data.CalculatorName);\n }\n if (data.CreateTime != null) {\n contents.CreateTime = __expectNonNull(__parseRfc3339DateTime(data.CreateTime));\n }\n if (data.DataSource != null) {\n contents.DataSource = __expectString(data.DataSource);\n }\n if (data.Description != null) {\n contents.Description = __expectString(data.Description);\n }\n if (data.PricingPlan != null) {\n contents.PricingPlan = __expectString(data.PricingPlan);\n }\n if (data.Tags != null) {\n contents.Tags = deserializeAws_restJson1TagMap(data.Tags, context);\n }\n if (data.UpdateTime != null) {\n contents.UpdateTime = __expectNonNull(__parseRfc3339DateTime(data.UpdateTime));\n }\n return contents;\n};\nconst deserializeAws_restJson1DescribeRouteCalculatorCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseErrorBody(output.body, context),\n };\n const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.location#AccessDeniedException\":\n throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);\n case \"InternalServerException\":\n case \"com.amazonaws.location#InternalServerException\":\n throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);\n case \"ResourceNotFoundException\":\n case \"com.amazonaws.location#ResourceNotFoundException\":\n throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);\n case \"ThrottlingException\":\n case \"com.amazonaws.location#ThrottlingException\":\n throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);\n case \"ValidationException\":\n case \"com.amazonaws.location#ValidationException\":\n throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n throwDefaultError({\n output,\n parsedBody,\n exceptionCtor: __BaseException,\n errorCode,\n });\n }\n};\nexport const deserializeAws_restJson1DescribeTrackerCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restJson1DescribeTrackerCommandError(output, context);\n }\n const contents = map({\n $metadata: deserializeMetadata(output),\n });\n const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), \"body\");\n if (data.CreateTime != null) {\n contents.CreateTime = __expectNonNull(__parseRfc3339DateTime(data.CreateTime));\n }\n if (data.Description != null) {\n contents.Description = __expectString(data.Description);\n }\n if (data.KmsKeyId != null) {\n contents.KmsKeyId = __expectString(data.KmsKeyId);\n }\n if (data.PositionFiltering != null) {\n contents.PositionFiltering = __expectString(data.PositionFiltering);\n }\n if (data.PricingPlan != null) {\n contents.PricingPlan = __expectString(data.PricingPlan);\n }\n if (data.PricingPlanDataSource != null) {\n contents.PricingPlanDataSource = __expectString(data.PricingPlanDataSource);\n }\n if (data.Tags != null) {\n contents.Tags = deserializeAws_restJson1TagMap(data.Tags, context);\n }\n if (data.TrackerArn != null) {\n contents.TrackerArn = __expectString(data.TrackerArn);\n }\n if (data.TrackerName != null) {\n contents.TrackerName = __expectString(data.TrackerName);\n }\n if (data.UpdateTime != null) {\n contents.UpdateTime = __expectNonNull(__parseRfc3339DateTime(data.UpdateTime));\n }\n return contents;\n};\nconst deserializeAws_restJson1DescribeTrackerCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseErrorBody(output.body, context),\n };\n const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.location#AccessDeniedException\":\n throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);\n case \"InternalServerException\":\n case \"com.amazonaws.location#InternalServerException\":\n throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);\n case \"ResourceNotFoundException\":\n case \"com.amazonaws.location#ResourceNotFoundException\":\n throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);\n case \"ThrottlingException\":\n case \"com.amazonaws.location#ThrottlingException\":\n throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);\n case \"ValidationException\":\n case \"com.amazonaws.location#ValidationException\":\n throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n throwDefaultError({\n output,\n parsedBody,\n exceptionCtor: __BaseException,\n errorCode,\n });\n }\n};\nexport const deserializeAws_restJson1DisassociateTrackerConsumerCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restJson1DisassociateTrackerConsumerCommandError(output, context);\n }\n const contents = map({\n $metadata: deserializeMetadata(output),\n });\n await collectBody(output.body, context);\n return contents;\n};\nconst deserializeAws_restJson1DisassociateTrackerConsumerCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseErrorBody(output.body, context),\n };\n const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.location#AccessDeniedException\":\n throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);\n case \"InternalServerException\":\n case \"com.amazonaws.location#InternalServerException\":\n throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);\n case \"ResourceNotFoundException\":\n case \"com.amazonaws.location#ResourceNotFoundException\":\n throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);\n case \"ThrottlingException\":\n case \"com.amazonaws.location#ThrottlingException\":\n throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);\n case \"ValidationException\":\n case \"com.amazonaws.location#ValidationException\":\n throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n throwDefaultError({\n output,\n parsedBody,\n exceptionCtor: __BaseException,\n errorCode,\n });\n }\n};\nexport const deserializeAws_restJson1GetDevicePositionCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restJson1GetDevicePositionCommandError(output, context);\n }\n const contents = map({\n $metadata: deserializeMetadata(output),\n });\n const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), \"body\");\n if (data.Accuracy != null) {\n contents.Accuracy = deserializeAws_restJson1PositionalAccuracy(data.Accuracy, context);\n }\n if (data.DeviceId != null) {\n contents.DeviceId = __expectString(data.DeviceId);\n }\n if (data.Position != null) {\n contents.Position = deserializeAws_restJson1Position(data.Position, context);\n }\n if (data.PositionProperties != null) {\n contents.PositionProperties = deserializeAws_restJson1PropertyMap(data.PositionProperties, context);\n }\n if (data.ReceivedTime != null) {\n contents.ReceivedTime = __expectNonNull(__parseRfc3339DateTime(data.ReceivedTime));\n }\n if (data.SampleTime != null) {\n contents.SampleTime = __expectNonNull(__parseRfc3339DateTime(data.SampleTime));\n }\n return contents;\n};\nconst deserializeAws_restJson1GetDevicePositionCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseErrorBody(output.body, context),\n };\n const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.location#AccessDeniedException\":\n throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);\n case \"InternalServerException\":\n case \"com.amazonaws.location#InternalServerException\":\n throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);\n case \"ResourceNotFoundException\":\n case \"com.amazonaws.location#ResourceNotFoundException\":\n throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);\n case \"ThrottlingException\":\n case \"com.amazonaws.location#ThrottlingException\":\n throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);\n case \"ValidationException\":\n case \"com.amazonaws.location#ValidationException\":\n throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n throwDefaultError({\n output,\n parsedBody,\n exceptionCtor: __BaseException,\n errorCode,\n });\n }\n};\nexport const deserializeAws_restJson1GetDevicePositionHistoryCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restJson1GetDevicePositionHistoryCommandError(output, context);\n }\n const contents = map({\n $metadata: deserializeMetadata(output),\n });\n const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), \"body\");\n if (data.DevicePositions != null) {\n contents.DevicePositions = deserializeAws_restJson1DevicePositionList(data.DevicePositions, context);\n }\n if (data.NextToken != null) {\n contents.NextToken = __expectString(data.NextToken);\n }\n return contents;\n};\nconst deserializeAws_restJson1GetDevicePositionHistoryCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseErrorBody(output.body, context),\n };\n const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.location#AccessDeniedException\":\n throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);\n case \"InternalServerException\":\n case \"com.amazonaws.location#InternalServerException\":\n throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);\n case \"ResourceNotFoundException\":\n case \"com.amazonaws.location#ResourceNotFoundException\":\n throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);\n case \"ThrottlingException\":\n case \"com.amazonaws.location#ThrottlingException\":\n throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);\n case \"ValidationException\":\n case \"com.amazonaws.location#ValidationException\":\n throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n throwDefaultError({\n output,\n parsedBody,\n exceptionCtor: __BaseException,\n errorCode,\n });\n }\n};\nexport const deserializeAws_restJson1GetGeofenceCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restJson1GetGeofenceCommandError(output, context);\n }\n const contents = map({\n $metadata: deserializeMetadata(output),\n });\n const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), \"body\");\n if (data.CreateTime != null) {\n contents.CreateTime = __expectNonNull(__parseRfc3339DateTime(data.CreateTime));\n }\n if (data.GeofenceId != null) {\n contents.GeofenceId = __expectString(data.GeofenceId);\n }\n if (data.Geometry != null) {\n contents.Geometry = deserializeAws_restJson1GeofenceGeometry(data.Geometry, context);\n }\n if (data.Status != null) {\n contents.Status = __expectString(data.Status);\n }\n if (data.UpdateTime != null) {\n contents.UpdateTime = __expectNonNull(__parseRfc3339DateTime(data.UpdateTime));\n }\n return contents;\n};\nconst deserializeAws_restJson1GetGeofenceCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseErrorBody(output.body, context),\n };\n const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.location#AccessDeniedException\":\n throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);\n case \"InternalServerException\":\n case \"com.amazonaws.location#InternalServerException\":\n throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);\n case \"ResourceNotFoundException\":\n case \"com.amazonaws.location#ResourceNotFoundException\":\n throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);\n case \"ThrottlingException\":\n case \"com.amazonaws.location#ThrottlingException\":\n throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);\n case \"ValidationException\":\n case \"com.amazonaws.location#ValidationException\":\n throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n throwDefaultError({\n output,\n parsedBody,\n exceptionCtor: __BaseException,\n errorCode,\n });\n }\n};\nexport const deserializeAws_restJson1GetMapGlyphsCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restJson1GetMapGlyphsCommandError(output, context);\n }\n const contents = map({\n $metadata: deserializeMetadata(output),\n ContentType: [, output.headers[\"content-type\"]],\n });\n const data = await collectBody(output.body, context);\n contents.Blob = data;\n return contents;\n};\nconst deserializeAws_restJson1GetMapGlyphsCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseErrorBody(output.body, context),\n };\n const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.location#AccessDeniedException\":\n throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);\n case \"InternalServerException\":\n case \"com.amazonaws.location#InternalServerException\":\n throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);\n case \"ResourceNotFoundException\":\n case \"com.amazonaws.location#ResourceNotFoundException\":\n throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);\n case \"ThrottlingException\":\n case \"com.amazonaws.location#ThrottlingException\":\n throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);\n case \"ValidationException\":\n case \"com.amazonaws.location#ValidationException\":\n throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n throwDefaultError({\n output,\n parsedBody,\n exceptionCtor: __BaseException,\n errorCode,\n });\n }\n};\nexport const deserializeAws_restJson1GetMapSpritesCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restJson1GetMapSpritesCommandError(output, context);\n }\n const contents = map({\n $metadata: deserializeMetadata(output),\n ContentType: [, output.headers[\"content-type\"]],\n });\n const data = await collectBody(output.body, context);\n contents.Blob = data;\n return contents;\n};\nconst deserializeAws_restJson1GetMapSpritesCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseErrorBody(output.body, context),\n };\n const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.location#AccessDeniedException\":\n throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);\n case \"InternalServerException\":\n case \"com.amazonaws.location#InternalServerException\":\n throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);\n case \"ResourceNotFoundException\":\n case \"com.amazonaws.location#ResourceNotFoundException\":\n throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);\n case \"ThrottlingException\":\n case \"com.amazonaws.location#ThrottlingException\":\n throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);\n case \"ValidationException\":\n case \"com.amazonaws.location#ValidationException\":\n throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n throwDefaultError({\n output,\n parsedBody,\n exceptionCtor: __BaseException,\n errorCode,\n });\n }\n};\nexport const deserializeAws_restJson1GetMapStyleDescriptorCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restJson1GetMapStyleDescriptorCommandError(output, context);\n }\n const contents = map({\n $metadata: deserializeMetadata(output),\n ContentType: [, output.headers[\"content-type\"]],\n });\n const data = await collectBody(output.body, context);\n contents.Blob = data;\n return contents;\n};\nconst deserializeAws_restJson1GetMapStyleDescriptorCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseErrorBody(output.body, context),\n };\n const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.location#AccessDeniedException\":\n throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);\n case \"InternalServerException\":\n case \"com.amazonaws.location#InternalServerException\":\n throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);\n case \"ResourceNotFoundException\":\n case \"com.amazonaws.location#ResourceNotFoundException\":\n throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);\n case \"ThrottlingException\":\n case \"com.amazonaws.location#ThrottlingException\":\n throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);\n case \"ValidationException\":\n case \"com.amazonaws.location#ValidationException\":\n throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n throwDefaultError({\n output,\n parsedBody,\n exceptionCtor: __BaseException,\n errorCode,\n });\n }\n};\nexport const deserializeAws_restJson1GetMapTileCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restJson1GetMapTileCommandError(output, context);\n }\n const contents = map({\n $metadata: deserializeMetadata(output),\n ContentType: [, output.headers[\"content-type\"]],\n });\n const data = await collectBody(output.body, context);\n contents.Blob = data;\n return contents;\n};\nconst deserializeAws_restJson1GetMapTileCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseErrorBody(output.body, context),\n };\n const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.location#AccessDeniedException\":\n throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);\n case \"InternalServerException\":\n case \"com.amazonaws.location#InternalServerException\":\n throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);\n case \"ResourceNotFoundException\":\n case \"com.amazonaws.location#ResourceNotFoundException\":\n throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);\n case \"ThrottlingException\":\n case \"com.amazonaws.location#ThrottlingException\":\n throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);\n case \"ValidationException\":\n case \"com.amazonaws.location#ValidationException\":\n throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n throwDefaultError({\n output,\n parsedBody,\n exceptionCtor: __BaseException,\n errorCode,\n });\n }\n};\nexport const deserializeAws_restJson1GetPlaceCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restJson1GetPlaceCommandError(output, context);\n }\n const contents = map({\n $metadata: deserializeMetadata(output),\n });\n const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), \"body\");\n if (data.Place != null) {\n contents.Place = deserializeAws_restJson1Place(data.Place, context);\n }\n return contents;\n};\nconst deserializeAws_restJson1GetPlaceCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseErrorBody(output.body, context),\n };\n const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.location#AccessDeniedException\":\n throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);\n case \"InternalServerException\":\n case \"com.amazonaws.location#InternalServerException\":\n throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);\n case \"ResourceNotFoundException\":\n case \"com.amazonaws.location#ResourceNotFoundException\":\n throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);\n case \"ThrottlingException\":\n case \"com.amazonaws.location#ThrottlingException\":\n throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);\n case \"ValidationException\":\n case \"com.amazonaws.location#ValidationException\":\n throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n throwDefaultError({\n output,\n parsedBody,\n exceptionCtor: __BaseException,\n errorCode,\n });\n }\n};\nexport const deserializeAws_restJson1ListDevicePositionsCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restJson1ListDevicePositionsCommandError(output, context);\n }\n const contents = map({\n $metadata: deserializeMetadata(output),\n });\n const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), \"body\");\n if (data.Entries != null) {\n contents.Entries = deserializeAws_restJson1ListDevicePositionsResponseEntryList(data.Entries, context);\n }\n if (data.NextToken != null) {\n contents.NextToken = __expectString(data.NextToken);\n }\n return contents;\n};\nconst deserializeAws_restJson1ListDevicePositionsCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseErrorBody(output.body, context),\n };\n const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.location#AccessDeniedException\":\n throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);\n case \"InternalServerException\":\n case \"com.amazonaws.location#InternalServerException\":\n throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);\n case \"ThrottlingException\":\n case \"com.amazonaws.location#ThrottlingException\":\n throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);\n case \"ValidationException\":\n case \"com.amazonaws.location#ValidationException\":\n throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n throwDefaultError({\n output,\n parsedBody,\n exceptionCtor: __BaseException,\n errorCode,\n });\n }\n};\nexport const deserializeAws_restJson1ListGeofenceCollectionsCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restJson1ListGeofenceCollectionsCommandError(output, context);\n }\n const contents = map({\n $metadata: deserializeMetadata(output),\n });\n const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), \"body\");\n if (data.Entries != null) {\n contents.Entries = deserializeAws_restJson1ListGeofenceCollectionsResponseEntryList(data.Entries, context);\n }\n if (data.NextToken != null) {\n contents.NextToken = __expectString(data.NextToken);\n }\n return contents;\n};\nconst deserializeAws_restJson1ListGeofenceCollectionsCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseErrorBody(output.body, context),\n };\n const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.location#AccessDeniedException\":\n throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);\n case \"InternalServerException\":\n case \"com.amazonaws.location#InternalServerException\":\n throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);\n case \"ThrottlingException\":\n case \"com.amazonaws.location#ThrottlingException\":\n throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);\n case \"ValidationException\":\n case \"com.amazonaws.location#ValidationException\":\n throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n throwDefaultError({\n output,\n parsedBody,\n exceptionCtor: __BaseException,\n errorCode,\n });\n }\n};\nexport const deserializeAws_restJson1ListGeofencesCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restJson1ListGeofencesCommandError(output, context);\n }\n const contents = map({\n $metadata: deserializeMetadata(output),\n });\n const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), \"body\");\n if (data.Entries != null) {\n contents.Entries = deserializeAws_restJson1ListGeofenceResponseEntryList(data.Entries, context);\n }\n if (data.NextToken != null) {\n contents.NextToken = __expectString(data.NextToken);\n }\n return contents;\n};\nconst deserializeAws_restJson1ListGeofencesCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseErrorBody(output.body, context),\n };\n const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.location#AccessDeniedException\":\n throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);\n case \"InternalServerException\":\n case \"com.amazonaws.location#InternalServerException\":\n throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);\n case \"ResourceNotFoundException\":\n case \"com.amazonaws.location#ResourceNotFoundException\":\n throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);\n case \"ThrottlingException\":\n case \"com.amazonaws.location#ThrottlingException\":\n throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);\n case \"ValidationException\":\n case \"com.amazonaws.location#ValidationException\":\n throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n throwDefaultError({\n output,\n parsedBody,\n exceptionCtor: __BaseException,\n errorCode,\n });\n }\n};\nexport const deserializeAws_restJson1ListMapsCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restJson1ListMapsCommandError(output, context);\n }\n const contents = map({\n $metadata: deserializeMetadata(output),\n });\n const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), \"body\");\n if (data.Entries != null) {\n contents.Entries = deserializeAws_restJson1ListMapsResponseEntryList(data.Entries, context);\n }\n if (data.NextToken != null) {\n contents.NextToken = __expectString(data.NextToken);\n }\n return contents;\n};\nconst deserializeAws_restJson1ListMapsCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseErrorBody(output.body, context),\n };\n const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.location#AccessDeniedException\":\n throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);\n case \"InternalServerException\":\n case \"com.amazonaws.location#InternalServerException\":\n throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);\n case \"ThrottlingException\":\n case \"com.amazonaws.location#ThrottlingException\":\n throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);\n case \"ValidationException\":\n case \"com.amazonaws.location#ValidationException\":\n throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n throwDefaultError({\n output,\n parsedBody,\n exceptionCtor: __BaseException,\n errorCode,\n });\n }\n};\nexport const deserializeAws_restJson1ListPlaceIndexesCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restJson1ListPlaceIndexesCommandError(output, context);\n }\n const contents = map({\n $metadata: deserializeMetadata(output),\n });\n const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), \"body\");\n if (data.Entries != null) {\n contents.Entries = deserializeAws_restJson1ListPlaceIndexesResponseEntryList(data.Entries, context);\n }\n if (data.NextToken != null) {\n contents.NextToken = __expectString(data.NextToken);\n }\n return contents;\n};\nconst deserializeAws_restJson1ListPlaceIndexesCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseErrorBody(output.body, context),\n };\n const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.location#AccessDeniedException\":\n throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);\n case \"InternalServerException\":\n case \"com.amazonaws.location#InternalServerException\":\n throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);\n case \"ThrottlingException\":\n case \"com.amazonaws.location#ThrottlingException\":\n throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);\n case \"ValidationException\":\n case \"com.amazonaws.location#ValidationException\":\n throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n throwDefaultError({\n output,\n parsedBody,\n exceptionCtor: __BaseException,\n errorCode,\n });\n }\n};\nexport const deserializeAws_restJson1ListRouteCalculatorsCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restJson1ListRouteCalculatorsCommandError(output, context);\n }\n const contents = map({\n $metadata: deserializeMetadata(output),\n });\n const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), \"body\");\n if (data.Entries != null) {\n contents.Entries = deserializeAws_restJson1ListRouteCalculatorsResponseEntryList(data.Entries, context);\n }\n if (data.NextToken != null) {\n contents.NextToken = __expectString(data.NextToken);\n }\n return contents;\n};\nconst deserializeAws_restJson1ListRouteCalculatorsCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseErrorBody(output.body, context),\n };\n const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.location#AccessDeniedException\":\n throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);\n case \"InternalServerException\":\n case \"com.amazonaws.location#InternalServerException\":\n throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);\n case \"ThrottlingException\":\n case \"com.amazonaws.location#ThrottlingException\":\n throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);\n case \"ValidationException\":\n case \"com.amazonaws.location#ValidationException\":\n throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n throwDefaultError({\n output,\n parsedBody,\n exceptionCtor: __BaseException,\n errorCode,\n });\n }\n};\nexport const deserializeAws_restJson1ListTagsForResourceCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restJson1ListTagsForResourceCommandError(output, context);\n }\n const contents = map({\n $metadata: deserializeMetadata(output),\n });\n const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), \"body\");\n if (data.Tags != null) {\n contents.Tags = deserializeAws_restJson1TagMap(data.Tags, context);\n }\n return contents;\n};\nconst deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseErrorBody(output.body, context),\n };\n const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.location#AccessDeniedException\":\n throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);\n case \"InternalServerException\":\n case \"com.amazonaws.location#InternalServerException\":\n throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);\n case \"ResourceNotFoundException\":\n case \"com.amazonaws.location#ResourceNotFoundException\":\n throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);\n case \"ThrottlingException\":\n case \"com.amazonaws.location#ThrottlingException\":\n throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);\n case \"ValidationException\":\n case \"com.amazonaws.location#ValidationException\":\n throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n throwDefaultError({\n output,\n parsedBody,\n exceptionCtor: __BaseException,\n errorCode,\n });\n }\n};\nexport const deserializeAws_restJson1ListTrackerConsumersCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restJson1ListTrackerConsumersCommandError(output, context);\n }\n const contents = map({\n $metadata: deserializeMetadata(output),\n });\n const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), \"body\");\n if (data.ConsumerArns != null) {\n contents.ConsumerArns = deserializeAws_restJson1ArnList(data.ConsumerArns, context);\n }\n if (data.NextToken != null) {\n contents.NextToken = __expectString(data.NextToken);\n }\n return contents;\n};\nconst deserializeAws_restJson1ListTrackerConsumersCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseErrorBody(output.body, context),\n };\n const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.location#AccessDeniedException\":\n throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);\n case \"InternalServerException\":\n case \"com.amazonaws.location#InternalServerException\":\n throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);\n case \"ResourceNotFoundException\":\n case \"com.amazonaws.location#ResourceNotFoundException\":\n throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);\n case \"ThrottlingException\":\n case \"com.amazonaws.location#ThrottlingException\":\n throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);\n case \"ValidationException\":\n case \"com.amazonaws.location#ValidationException\":\n throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n throwDefaultError({\n output,\n parsedBody,\n exceptionCtor: __BaseException,\n errorCode,\n });\n }\n};\nexport const deserializeAws_restJson1ListTrackersCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restJson1ListTrackersCommandError(output, context);\n }\n const contents = map({\n $metadata: deserializeMetadata(output),\n });\n const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), \"body\");\n if (data.Entries != null) {\n contents.Entries = deserializeAws_restJson1ListTrackersResponseEntryList(data.Entries, context);\n }\n if (data.NextToken != null) {\n contents.NextToken = __expectString(data.NextToken);\n }\n return contents;\n};\nconst deserializeAws_restJson1ListTrackersCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseErrorBody(output.body, context),\n };\n const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.location#AccessDeniedException\":\n throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);\n case \"InternalServerException\":\n case \"com.amazonaws.location#InternalServerException\":\n throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);\n case \"ThrottlingException\":\n case \"com.amazonaws.location#ThrottlingException\":\n throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);\n case \"ValidationException\":\n case \"com.amazonaws.location#ValidationException\":\n throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n throwDefaultError({\n output,\n parsedBody,\n exceptionCtor: __BaseException,\n errorCode,\n });\n }\n};\nexport const deserializeAws_restJson1PutGeofenceCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restJson1PutGeofenceCommandError(output, context);\n }\n const contents = map({\n $metadata: deserializeMetadata(output),\n });\n const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), \"body\");\n if (data.CreateTime != null) {\n contents.CreateTime = __expectNonNull(__parseRfc3339DateTime(data.CreateTime));\n }\n if (data.GeofenceId != null) {\n contents.GeofenceId = __expectString(data.GeofenceId);\n }\n if (data.UpdateTime != null) {\n contents.UpdateTime = __expectNonNull(__parseRfc3339DateTime(data.UpdateTime));\n }\n return contents;\n};\nconst deserializeAws_restJson1PutGeofenceCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseErrorBody(output.body, context),\n };\n const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.location#AccessDeniedException\":\n throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);\n case \"ConflictException\":\n case \"com.amazonaws.location#ConflictException\":\n throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);\n case \"InternalServerException\":\n case \"com.amazonaws.location#InternalServerException\":\n throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);\n case \"ResourceNotFoundException\":\n case \"com.amazonaws.location#ResourceNotFoundException\":\n throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);\n case \"ThrottlingException\":\n case \"com.amazonaws.location#ThrottlingException\":\n throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);\n case \"ValidationException\":\n case \"com.amazonaws.location#ValidationException\":\n throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n throwDefaultError({\n output,\n parsedBody,\n exceptionCtor: __BaseException,\n errorCode,\n });\n }\n};\nexport const deserializeAws_restJson1SearchPlaceIndexForPositionCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restJson1SearchPlaceIndexForPositionCommandError(output, context);\n }\n const contents = map({\n $metadata: deserializeMetadata(output),\n });\n const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), \"body\");\n if (data.Results != null) {\n contents.Results = deserializeAws_restJson1SearchForPositionResultList(data.Results, context);\n }\n if (data.Summary != null) {\n contents.Summary = deserializeAws_restJson1SearchPlaceIndexForPositionSummary(data.Summary, context);\n }\n return contents;\n};\nconst deserializeAws_restJson1SearchPlaceIndexForPositionCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseErrorBody(output.body, context),\n };\n const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.location#AccessDeniedException\":\n throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);\n case \"InternalServerException\":\n case \"com.amazonaws.location#InternalServerException\":\n throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);\n case \"ResourceNotFoundException\":\n case \"com.amazonaws.location#ResourceNotFoundException\":\n throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);\n case \"ThrottlingException\":\n case \"com.amazonaws.location#ThrottlingException\":\n throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);\n case \"ValidationException\":\n case \"com.amazonaws.location#ValidationException\":\n throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n throwDefaultError({\n output,\n parsedBody,\n exceptionCtor: __BaseException,\n errorCode,\n });\n }\n};\nexport const deserializeAws_restJson1SearchPlaceIndexForSuggestionsCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restJson1SearchPlaceIndexForSuggestionsCommandError(output, context);\n }\n const contents = map({\n $metadata: deserializeMetadata(output),\n });\n const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), \"body\");\n if (data.Results != null) {\n contents.Results = deserializeAws_restJson1SearchForSuggestionsResultList(data.Results, context);\n }\n if (data.Summary != null) {\n contents.Summary = deserializeAws_restJson1SearchPlaceIndexForSuggestionsSummary(data.Summary, context);\n }\n return contents;\n};\nconst deserializeAws_restJson1SearchPlaceIndexForSuggestionsCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseErrorBody(output.body, context),\n };\n const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.location#AccessDeniedException\":\n throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);\n case \"InternalServerException\":\n case \"com.amazonaws.location#InternalServerException\":\n throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);\n case \"ResourceNotFoundException\":\n case \"com.amazonaws.location#ResourceNotFoundException\":\n throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);\n case \"ThrottlingException\":\n case \"com.amazonaws.location#ThrottlingException\":\n throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);\n case \"ValidationException\":\n case \"com.amazonaws.location#ValidationException\":\n throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n throwDefaultError({\n output,\n parsedBody,\n exceptionCtor: __BaseException,\n errorCode,\n });\n }\n};\nexport const deserializeAws_restJson1SearchPlaceIndexForTextCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restJson1SearchPlaceIndexForTextCommandError(output, context);\n }\n const contents = map({\n $metadata: deserializeMetadata(output),\n });\n const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), \"body\");\n if (data.Results != null) {\n contents.Results = deserializeAws_restJson1SearchForTextResultList(data.Results, context);\n }\n if (data.Summary != null) {\n contents.Summary = deserializeAws_restJson1SearchPlaceIndexForTextSummary(data.Summary, context);\n }\n return contents;\n};\nconst deserializeAws_restJson1SearchPlaceIndexForTextCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseErrorBody(output.body, context),\n };\n const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.location#AccessDeniedException\":\n throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);\n case \"InternalServerException\":\n case \"com.amazonaws.location#InternalServerException\":\n throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);\n case \"ResourceNotFoundException\":\n case \"com.amazonaws.location#ResourceNotFoundException\":\n throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);\n case \"ThrottlingException\":\n case \"com.amazonaws.location#ThrottlingException\":\n throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);\n case \"ValidationException\":\n case \"com.amazonaws.location#ValidationException\":\n throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n throwDefaultError({\n output,\n parsedBody,\n exceptionCtor: __BaseException,\n errorCode,\n });\n }\n};\nexport const deserializeAws_restJson1TagResourceCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restJson1TagResourceCommandError(output, context);\n }\n const contents = map({\n $metadata: deserializeMetadata(output),\n });\n await collectBody(output.body, context);\n return contents;\n};\nconst deserializeAws_restJson1TagResourceCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseErrorBody(output.body, context),\n };\n const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.location#AccessDeniedException\":\n throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);\n case \"InternalServerException\":\n case \"com.amazonaws.location#InternalServerException\":\n throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);\n case \"ResourceNotFoundException\":\n case \"com.amazonaws.location#ResourceNotFoundException\":\n throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);\n case \"ThrottlingException\":\n case \"com.amazonaws.location#ThrottlingException\":\n throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);\n case \"ValidationException\":\n case \"com.amazonaws.location#ValidationException\":\n throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n throwDefaultError({\n output,\n parsedBody,\n exceptionCtor: __BaseException,\n errorCode,\n });\n }\n};\nexport const deserializeAws_restJson1UntagResourceCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restJson1UntagResourceCommandError(output, context);\n }\n const contents = map({\n $metadata: deserializeMetadata(output),\n });\n await collectBody(output.body, context);\n return contents;\n};\nconst deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseErrorBody(output.body, context),\n };\n const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.location#AccessDeniedException\":\n throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);\n case \"InternalServerException\":\n case \"com.amazonaws.location#InternalServerException\":\n throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);\n case \"ResourceNotFoundException\":\n case \"com.amazonaws.location#ResourceNotFoundException\":\n throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);\n case \"ThrottlingException\":\n case \"com.amazonaws.location#ThrottlingException\":\n throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);\n case \"ValidationException\":\n case \"com.amazonaws.location#ValidationException\":\n throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n throwDefaultError({\n output,\n parsedBody,\n exceptionCtor: __BaseException,\n errorCode,\n });\n }\n};\nexport const deserializeAws_restJson1UpdateGeofenceCollectionCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restJson1UpdateGeofenceCollectionCommandError(output, context);\n }\n const contents = map({\n $metadata: deserializeMetadata(output),\n });\n const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), \"body\");\n if (data.CollectionArn != null) {\n contents.CollectionArn = __expectString(data.CollectionArn);\n }\n if (data.CollectionName != null) {\n contents.CollectionName = __expectString(data.CollectionName);\n }\n if (data.UpdateTime != null) {\n contents.UpdateTime = __expectNonNull(__parseRfc3339DateTime(data.UpdateTime));\n }\n return contents;\n};\nconst deserializeAws_restJson1UpdateGeofenceCollectionCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseErrorBody(output.body, context),\n };\n const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.location#AccessDeniedException\":\n throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);\n case \"InternalServerException\":\n case \"com.amazonaws.location#InternalServerException\":\n throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);\n case \"ResourceNotFoundException\":\n case \"com.amazonaws.location#ResourceNotFoundException\":\n throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);\n case \"ThrottlingException\":\n case \"com.amazonaws.location#ThrottlingException\":\n throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);\n case \"ValidationException\":\n case \"com.amazonaws.location#ValidationException\":\n throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n throwDefaultError({\n output,\n parsedBody,\n exceptionCtor: __BaseException,\n errorCode,\n });\n }\n};\nexport const deserializeAws_restJson1UpdateMapCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restJson1UpdateMapCommandError(output, context);\n }\n const contents = map({\n $metadata: deserializeMetadata(output),\n });\n const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), \"body\");\n if (data.MapArn != null) {\n contents.MapArn = __expectString(data.MapArn);\n }\n if (data.MapName != null) {\n contents.MapName = __expectString(data.MapName);\n }\n if (data.UpdateTime != null) {\n contents.UpdateTime = __expectNonNull(__parseRfc3339DateTime(data.UpdateTime));\n }\n return contents;\n};\nconst deserializeAws_restJson1UpdateMapCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseErrorBody(output.body, context),\n };\n const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.location#AccessDeniedException\":\n throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);\n case \"InternalServerException\":\n case \"com.amazonaws.location#InternalServerException\":\n throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);\n case \"ResourceNotFoundException\":\n case \"com.amazonaws.location#ResourceNotFoundException\":\n throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);\n case \"ThrottlingException\":\n case \"com.amazonaws.location#ThrottlingException\":\n throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);\n case \"ValidationException\":\n case \"com.amazonaws.location#ValidationException\":\n throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n throwDefaultError({\n output,\n parsedBody,\n exceptionCtor: __BaseException,\n errorCode,\n });\n }\n};\nexport const deserializeAws_restJson1UpdatePlaceIndexCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restJson1UpdatePlaceIndexCommandError(output, context);\n }\n const contents = map({\n $metadata: deserializeMetadata(output),\n });\n const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), \"body\");\n if (data.IndexArn != null) {\n contents.IndexArn = __expectString(data.IndexArn);\n }\n if (data.IndexName != null) {\n contents.IndexName = __expectString(data.IndexName);\n }\n if (data.UpdateTime != null) {\n contents.UpdateTime = __expectNonNull(__parseRfc3339DateTime(data.UpdateTime));\n }\n return contents;\n};\nconst deserializeAws_restJson1UpdatePlaceIndexCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseErrorBody(output.body, context),\n };\n const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.location#AccessDeniedException\":\n throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);\n case \"InternalServerException\":\n case \"com.amazonaws.location#InternalServerException\":\n throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);\n case \"ResourceNotFoundException\":\n case \"com.amazonaws.location#ResourceNotFoundException\":\n throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);\n case \"ThrottlingException\":\n case \"com.amazonaws.location#ThrottlingException\":\n throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);\n case \"ValidationException\":\n case \"com.amazonaws.location#ValidationException\":\n throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n throwDefaultError({\n output,\n parsedBody,\n exceptionCtor: __BaseException,\n errorCode,\n });\n }\n};\nexport const deserializeAws_restJson1UpdateRouteCalculatorCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restJson1UpdateRouteCalculatorCommandError(output, context);\n }\n const contents = map({\n $metadata: deserializeMetadata(output),\n });\n const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), \"body\");\n if (data.CalculatorArn != null) {\n contents.CalculatorArn = __expectString(data.CalculatorArn);\n }\n if (data.CalculatorName != null) {\n contents.CalculatorName = __expectString(data.CalculatorName);\n }\n if (data.UpdateTime != null) {\n contents.UpdateTime = __expectNonNull(__parseRfc3339DateTime(data.UpdateTime));\n }\n return contents;\n};\nconst deserializeAws_restJson1UpdateRouteCalculatorCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseErrorBody(output.body, context),\n };\n const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.location#AccessDeniedException\":\n throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);\n case \"InternalServerException\":\n case \"com.amazonaws.location#InternalServerException\":\n throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);\n case \"ResourceNotFoundException\":\n case \"com.amazonaws.location#ResourceNotFoundException\":\n throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);\n case \"ThrottlingException\":\n case \"com.amazonaws.location#ThrottlingException\":\n throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);\n case \"ValidationException\":\n case \"com.amazonaws.location#ValidationException\":\n throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n throwDefaultError({\n output,\n parsedBody,\n exceptionCtor: __BaseException,\n errorCode,\n });\n }\n};\nexport const deserializeAws_restJson1UpdateTrackerCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restJson1UpdateTrackerCommandError(output, context);\n }\n const contents = map({\n $metadata: deserializeMetadata(output),\n });\n const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), \"body\");\n if (data.TrackerArn != null) {\n contents.TrackerArn = __expectString(data.TrackerArn);\n }\n if (data.TrackerName != null) {\n contents.TrackerName = __expectString(data.TrackerName);\n }\n if (data.UpdateTime != null) {\n contents.UpdateTime = __expectNonNull(__parseRfc3339DateTime(data.UpdateTime));\n }\n return contents;\n};\nconst deserializeAws_restJson1UpdateTrackerCommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseErrorBody(output.body, context),\n };\n const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.location#AccessDeniedException\":\n throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);\n case \"InternalServerException\":\n case \"com.amazonaws.location#InternalServerException\":\n throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);\n case \"ResourceNotFoundException\":\n case \"com.amazonaws.location#ResourceNotFoundException\":\n throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);\n case \"ThrottlingException\":\n case \"com.amazonaws.location#ThrottlingException\":\n throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);\n case \"ValidationException\":\n case \"com.amazonaws.location#ValidationException\":\n throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n throwDefaultError({\n output,\n parsedBody,\n exceptionCtor: __BaseException,\n errorCode,\n });\n }\n};\nconst map = __map;\nconst deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutput, context) => {\n const contents = map({});\n const data = parsedOutput.body;\n if (data.message != null) {\n contents.Message = __expectString(data.message);\n }\n const exception = new AccessDeniedException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents,\n });\n return __decorateServiceException(exception, parsedOutput.body);\n};\nconst deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, context) => {\n const contents = map({});\n const data = parsedOutput.body;\n if (data.message != null) {\n contents.Message = __expectString(data.message);\n }\n const exception = new ConflictException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents,\n });\n return __decorateServiceException(exception, parsedOutput.body);\n};\nconst deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOutput, context) => {\n const contents = map({});\n const data = parsedOutput.body;\n if (data.message != null) {\n contents.Message = __expectString(data.message);\n }\n const exception = new InternalServerException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents,\n });\n return __decorateServiceException(exception, parsedOutput.body);\n};\nconst deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {\n const contents = map({});\n const data = parsedOutput.body;\n if (data.message != null) {\n contents.Message = __expectString(data.message);\n }\n const exception = new ResourceNotFoundException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents,\n });\n return __decorateServiceException(exception, parsedOutput.body);\n};\nconst deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = async (parsedOutput, context) => {\n const contents = map({});\n const data = parsedOutput.body;\n if (data.message != null) {\n contents.Message = __expectString(data.message);\n }\n const exception = new ServiceQuotaExceededException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents,\n });\n return __decorateServiceException(exception, parsedOutput.body);\n};\nconst deserializeAws_restJson1ThrottlingExceptionResponse = async (parsedOutput, context) => {\n const contents = map({});\n const data = parsedOutput.body;\n if (data.message != null) {\n contents.Message = __expectString(data.message);\n }\n const exception = new ThrottlingException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents,\n });\n return __decorateServiceException(exception, parsedOutput.body);\n};\nconst deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput, context) => {\n const contents = map({});\n const data = parsedOutput.body;\n if (data.fieldList != null) {\n contents.FieldList = deserializeAws_restJson1ValidationExceptionFieldList(data.fieldList, context);\n }\n if (data.message != null) {\n contents.Message = __expectString(data.message);\n }\n if (data.reason != null) {\n contents.Reason = __expectString(data.reason);\n }\n const exception = new ValidationException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents,\n });\n return __decorateServiceException(exception, parsedOutput.body);\n};\nconst serializeAws_restJson1BatchPutGeofenceRequestEntry = (input, context) => {\n return {\n ...(input.GeofenceId != null && { GeofenceId: input.GeofenceId }),\n ...(input.Geometry != null && { Geometry: serializeAws_restJson1GeofenceGeometry(input.Geometry, context) }),\n };\n};\nconst serializeAws_restJson1BatchPutGeofenceRequestEntryList = (input, context) => {\n return input\n .filter((e) => e != null)\n .map((entry) => {\n return serializeAws_restJson1BatchPutGeofenceRequestEntry(entry, context);\n });\n};\nconst serializeAws_restJson1BoundingBox = (input, context) => {\n return input\n .filter((e) => e != null)\n .map((entry) => {\n return __serializeFloat(entry);\n });\n};\nconst serializeAws_restJson1CalculateRouteCarModeOptions = (input, context) => {\n return {\n ...(input.AvoidFerries != null && { AvoidFerries: input.AvoidFerries }),\n ...(input.AvoidTolls != null && { AvoidTolls: input.AvoidTolls }),\n };\n};\nconst serializeAws_restJson1CalculateRouteTruckModeOptions = (input, context) => {\n return {\n ...(input.AvoidFerries != null && { AvoidFerries: input.AvoidFerries }),\n ...(input.AvoidTolls != null && { AvoidTolls: input.AvoidTolls }),\n ...(input.Dimensions != null && { Dimensions: serializeAws_restJson1TruckDimensions(input.Dimensions, context) }),\n ...(input.Weight != null && { Weight: serializeAws_restJson1TruckWeight(input.Weight, context) }),\n };\n};\nconst serializeAws_restJson1Circle = (input, context) => {\n return {\n ...(input.Center != null && { Center: serializeAws_restJson1Position(input.Center, context) }),\n ...(input.Radius != null && { Radius: __serializeFloat(input.Radius) }),\n };\n};\nconst serializeAws_restJson1CountryCodeList = (input, context) => {\n return input\n .filter((e) => e != null)\n .map((entry) => {\n return entry;\n });\n};\nconst serializeAws_restJson1DataSourceConfiguration = (input, context) => {\n return {\n ...(input.IntendedUse != null && { IntendedUse: input.IntendedUse }),\n };\n};\nconst serializeAws_restJson1DeviceIdsList = (input, context) => {\n return input\n .filter((e) => e != null)\n .map((entry) => {\n return entry;\n });\n};\nconst serializeAws_restJson1DevicePositionUpdate = (input, context) => {\n return {\n ...(input.Accuracy != null && { Accuracy: serializeAws_restJson1PositionalAccuracy(input.Accuracy, context) }),\n ...(input.DeviceId != null && { DeviceId: input.DeviceId }),\n ...(input.Position != null && { Position: serializeAws_restJson1Position(input.Position, context) }),\n ...(input.PositionProperties != null && {\n PositionProperties: serializeAws_restJson1PropertyMap(input.PositionProperties, context),\n }),\n ...(input.SampleTime != null && { SampleTime: input.SampleTime.toISOString().split(\".\")[0] + \"Z\" }),\n };\n};\nconst serializeAws_restJson1DevicePositionUpdateList = (input, context) => {\n return input\n .filter((e) => e != null)\n .map((entry) => {\n return serializeAws_restJson1DevicePositionUpdate(entry, context);\n });\n};\nconst serializeAws_restJson1GeofenceGeometry = (input, context) => {\n return {\n ...(input.Circle != null && { Circle: serializeAws_restJson1Circle(input.Circle, context) }),\n ...(input.Polygon != null && { Polygon: serializeAws_restJson1LinearRings(input.Polygon, context) }),\n };\n};\nconst serializeAws_restJson1IdList = (input, context) => {\n return input\n .filter((e) => e != null)\n .map((entry) => {\n return entry;\n });\n};\nconst serializeAws_restJson1LinearRing = (input, context) => {\n return input\n .filter((e) => e != null)\n .map((entry) => {\n return serializeAws_restJson1Position(entry, context);\n });\n};\nconst serializeAws_restJson1LinearRings = (input, context) => {\n return input\n .filter((e) => e != null)\n .map((entry) => {\n return serializeAws_restJson1LinearRing(entry, context);\n });\n};\nconst serializeAws_restJson1MapConfiguration = (input, context) => {\n return {\n ...(input.Style != null && { Style: input.Style }),\n };\n};\nconst serializeAws_restJson1Position = (input, context) => {\n return input\n .filter((e) => e != null)\n .map((entry) => {\n return __serializeFloat(entry);\n });\n};\nconst serializeAws_restJson1PositionalAccuracy = (input, context) => {\n return {\n ...(input.Horizontal != null && { Horizontal: __serializeFloat(input.Horizontal) }),\n };\n};\nconst serializeAws_restJson1PositionList = (input, context) => {\n return input\n .filter((e) => e != null)\n .map((entry) => {\n return serializeAws_restJson1Position(entry, context);\n });\n};\nconst serializeAws_restJson1PropertyMap = (input, context) => {\n return Object.entries(input).reduce((acc, [key, value]) => {\n if (value === null) {\n return acc;\n }\n return {\n ...acc,\n [key]: value,\n };\n }, {});\n};\nconst serializeAws_restJson1TagMap = (input, context) => {\n return Object.entries(input).reduce((acc, [key, value]) => {\n if (value === null) {\n return acc;\n }\n return {\n ...acc,\n [key]: value,\n };\n }, {});\n};\nconst serializeAws_restJson1TruckDimensions = (input, context) => {\n return {\n ...(input.Height != null && { Height: __serializeFloat(input.Height) }),\n ...(input.Length != null && { Length: __serializeFloat(input.Length) }),\n ...(input.Unit != null && { Unit: input.Unit }),\n ...(input.Width != null && { Width: __serializeFloat(input.Width) }),\n };\n};\nconst serializeAws_restJson1TruckWeight = (input, context) => {\n return {\n ...(input.Total != null && { Total: __serializeFloat(input.Total) }),\n ...(input.Unit != null && { Unit: input.Unit }),\n };\n};\nconst serializeAws_restJson1WaypointPositionList = (input, context) => {\n return input\n .filter((e) => e != null)\n .map((entry) => {\n return serializeAws_restJson1Position(entry, context);\n });\n};\nconst deserializeAws_restJson1ArnList = (output, context) => {\n const retVal = (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return __expectString(entry);\n });\n return retVal;\n};\nconst deserializeAws_restJson1BatchDeleteDevicePositionHistoryError = (output, context) => {\n return {\n DeviceId: __expectString(output.DeviceId),\n Error: output.Error != null ? deserializeAws_restJson1BatchItemError(output.Error, context) : undefined,\n };\n};\nconst deserializeAws_restJson1BatchDeleteDevicePositionHistoryErrorList = (output, context) => {\n const retVal = (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_restJson1BatchDeleteDevicePositionHistoryError(entry, context);\n });\n return retVal;\n};\nconst deserializeAws_restJson1BatchDeleteGeofenceError = (output, context) => {\n return {\n Error: output.Error != null ? deserializeAws_restJson1BatchItemError(output.Error, context) : undefined,\n GeofenceId: __expectString(output.GeofenceId),\n };\n};\nconst deserializeAws_restJson1BatchDeleteGeofenceErrorList = (output, context) => {\n const retVal = (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_restJson1BatchDeleteGeofenceError(entry, context);\n });\n return retVal;\n};\nconst deserializeAws_restJson1BatchEvaluateGeofencesError = (output, context) => {\n return {\n DeviceId: __expectString(output.DeviceId),\n Error: output.Error != null ? deserializeAws_restJson1BatchItemError(output.Error, context) : undefined,\n SampleTime: output.SampleTime != null ? __expectNonNull(__parseRfc3339DateTime(output.SampleTime)) : undefined,\n };\n};\nconst deserializeAws_restJson1BatchEvaluateGeofencesErrorList = (output, context) => {\n const retVal = (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_restJson1BatchEvaluateGeofencesError(entry, context);\n });\n return retVal;\n};\nconst deserializeAws_restJson1BatchGetDevicePositionError = (output, context) => {\n return {\n DeviceId: __expectString(output.DeviceId),\n Error: output.Error != null ? deserializeAws_restJson1BatchItemError(output.Error, context) : undefined,\n };\n};\nconst deserializeAws_restJson1BatchGetDevicePositionErrorList = (output, context) => {\n const retVal = (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_restJson1BatchGetDevicePositionError(entry, context);\n });\n return retVal;\n};\nconst deserializeAws_restJson1BatchItemError = (output, context) => {\n return {\n Code: __expectString(output.Code),\n Message: __expectString(output.Message),\n };\n};\nconst deserializeAws_restJson1BatchPutGeofenceError = (output, context) => {\n return {\n Error: output.Error != null ? deserializeAws_restJson1BatchItemError(output.Error, context) : undefined,\n GeofenceId: __expectString(output.GeofenceId),\n };\n};\nconst deserializeAws_restJson1BatchPutGeofenceErrorList = (output, context) => {\n const retVal = (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_restJson1BatchPutGeofenceError(entry, context);\n });\n return retVal;\n};\nconst deserializeAws_restJson1BatchPutGeofenceSuccess = (output, context) => {\n return {\n CreateTime: output.CreateTime != null ? __expectNonNull(__parseRfc3339DateTime(output.CreateTime)) : undefined,\n GeofenceId: __expectString(output.GeofenceId),\n UpdateTime: output.UpdateTime != null ? __expectNonNull(__parseRfc3339DateTime(output.UpdateTime)) : undefined,\n };\n};\nconst deserializeAws_restJson1BatchPutGeofenceSuccessList = (output, context) => {\n const retVal = (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_restJson1BatchPutGeofenceSuccess(entry, context);\n });\n return retVal;\n};\nconst deserializeAws_restJson1BatchUpdateDevicePositionError = (output, context) => {\n return {\n DeviceId: __expectString(output.DeviceId),\n Error: output.Error != null ? deserializeAws_restJson1BatchItemError(output.Error, context) : undefined,\n SampleTime: output.SampleTime != null ? __expectNonNull(__parseRfc3339DateTime(output.SampleTime)) : undefined,\n };\n};\nconst deserializeAws_restJson1BatchUpdateDevicePositionErrorList = (output, context) => {\n const retVal = (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_restJson1BatchUpdateDevicePositionError(entry, context);\n });\n return retVal;\n};\nconst deserializeAws_restJson1BoundingBox = (output, context) => {\n const retVal = (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return __limitedParseDouble(entry);\n });\n return retVal;\n};\nconst deserializeAws_restJson1CalculateRouteMatrixSummary = (output, context) => {\n return {\n DataSource: __expectString(output.DataSource),\n DistanceUnit: __expectString(output.DistanceUnit),\n ErrorCount: __expectInt32(output.ErrorCount),\n RouteCount: __expectInt32(output.RouteCount),\n };\n};\nconst deserializeAws_restJson1CalculateRouteSummary = (output, context) => {\n return {\n DataSource: __expectString(output.DataSource),\n Distance: __limitedParseDouble(output.Distance),\n DistanceUnit: __expectString(output.DistanceUnit),\n DurationSeconds: __limitedParseDouble(output.DurationSeconds),\n RouteBBox: output.RouteBBox != null ? deserializeAws_restJson1BoundingBox(output.RouteBBox, context) : undefined,\n };\n};\nconst deserializeAws_restJson1Circle = (output, context) => {\n return {\n Center: output.Center != null ? deserializeAws_restJson1Position(output.Center, context) : undefined,\n Radius: __limitedParseDouble(output.Radius),\n };\n};\nconst deserializeAws_restJson1CountryCodeList = (output, context) => {\n const retVal = (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return __expectString(entry);\n });\n return retVal;\n};\nconst deserializeAws_restJson1DataSourceConfiguration = (output, context) => {\n return {\n IntendedUse: __expectString(output.IntendedUse),\n };\n};\nconst deserializeAws_restJson1DevicePosition = (output, context) => {\n return {\n Accuracy: output.Accuracy != null ? deserializeAws_restJson1PositionalAccuracy(output.Accuracy, context) : undefined,\n DeviceId: __expectString(output.DeviceId),\n Position: output.Position != null ? deserializeAws_restJson1Position(output.Position, context) : undefined,\n PositionProperties: output.PositionProperties != null\n ? deserializeAws_restJson1PropertyMap(output.PositionProperties, context)\n : undefined,\n ReceivedTime: output.ReceivedTime != null ? __expectNonNull(__parseRfc3339DateTime(output.ReceivedTime)) : undefined,\n SampleTime: output.SampleTime != null ? __expectNonNull(__parseRfc3339DateTime(output.SampleTime)) : undefined,\n };\n};\nconst deserializeAws_restJson1DevicePositionList = (output, context) => {\n const retVal = (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_restJson1DevicePosition(entry, context);\n });\n return retVal;\n};\nconst deserializeAws_restJson1GeofenceGeometry = (output, context) => {\n return {\n Circle: output.Circle != null ? deserializeAws_restJson1Circle(output.Circle, context) : undefined,\n Polygon: output.Polygon != null ? deserializeAws_restJson1LinearRings(output.Polygon, context) : undefined,\n };\n};\nconst deserializeAws_restJson1Leg = (output, context) => {\n return {\n Distance: __limitedParseDouble(output.Distance),\n DurationSeconds: __limitedParseDouble(output.DurationSeconds),\n EndPosition: output.EndPosition != null ? deserializeAws_restJson1Position(output.EndPosition, context) : undefined,\n Geometry: output.Geometry != null ? deserializeAws_restJson1LegGeometry(output.Geometry, context) : undefined,\n StartPosition: output.StartPosition != null ? deserializeAws_restJson1Position(output.StartPosition, context) : undefined,\n Steps: output.Steps != null ? deserializeAws_restJson1StepList(output.Steps, context) : undefined,\n };\n};\nconst deserializeAws_restJson1LegGeometry = (output, context) => {\n return {\n LineString: output.LineString != null ? deserializeAws_restJson1LineString(output.LineString, context) : undefined,\n };\n};\nconst deserializeAws_restJson1LegList = (output, context) => {\n const retVal = (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_restJson1Leg(entry, context);\n });\n return retVal;\n};\nconst deserializeAws_restJson1LinearRing = (output, context) => {\n const retVal = (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_restJson1Position(entry, context);\n });\n return retVal;\n};\nconst deserializeAws_restJson1LinearRings = (output, context) => {\n const retVal = (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_restJson1LinearRing(entry, context);\n });\n return retVal;\n};\nconst deserializeAws_restJson1LineString = (output, context) => {\n const retVal = (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_restJson1Position(entry, context);\n });\n return retVal;\n};\nconst deserializeAws_restJson1ListDevicePositionsResponseEntry = (output, context) => {\n return {\n Accuracy: output.Accuracy != null ? deserializeAws_restJson1PositionalAccuracy(output.Accuracy, context) : undefined,\n DeviceId: __expectString(output.DeviceId),\n Position: output.Position != null ? deserializeAws_restJson1Position(output.Position, context) : undefined,\n PositionProperties: output.PositionProperties != null\n ? deserializeAws_restJson1PropertyMap(output.PositionProperties, context)\n : undefined,\n SampleTime: output.SampleTime != null ? __expectNonNull(__parseRfc3339DateTime(output.SampleTime)) : undefined,\n };\n};\nconst deserializeAws_restJson1ListDevicePositionsResponseEntryList = (output, context) => {\n const retVal = (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_restJson1ListDevicePositionsResponseEntry(entry, context);\n });\n return retVal;\n};\nconst deserializeAws_restJson1ListGeofenceCollectionsResponseEntry = (output, context) => {\n return {\n CollectionName: __expectString(output.CollectionName),\n CreateTime: output.CreateTime != null ? __expectNonNull(__parseRfc3339DateTime(output.CreateTime)) : undefined,\n Description: __expectString(output.Description),\n PricingPlan: __expectString(output.PricingPlan),\n PricingPlanDataSource: __expectString(output.PricingPlanDataSource),\n UpdateTime: output.UpdateTime != null ? __expectNonNull(__parseRfc3339DateTime(output.UpdateTime)) : undefined,\n };\n};\nconst deserializeAws_restJson1ListGeofenceCollectionsResponseEntryList = (output, context) => {\n const retVal = (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_restJson1ListGeofenceCollectionsResponseEntry(entry, context);\n });\n return retVal;\n};\nconst deserializeAws_restJson1ListGeofenceResponseEntry = (output, context) => {\n return {\n CreateTime: output.CreateTime != null ? __expectNonNull(__parseRfc3339DateTime(output.CreateTime)) : undefined,\n GeofenceId: __expectString(output.GeofenceId),\n Geometry: output.Geometry != null ? deserializeAws_restJson1GeofenceGeometry(output.Geometry, context) : undefined,\n Status: __expectString(output.Status),\n UpdateTime: output.UpdateTime != null ? __expectNonNull(__parseRfc3339DateTime(output.UpdateTime)) : undefined,\n };\n};\nconst deserializeAws_restJson1ListGeofenceResponseEntryList = (output, context) => {\n const retVal = (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_restJson1ListGeofenceResponseEntry(entry, context);\n });\n return retVal;\n};\nconst deserializeAws_restJson1ListMapsResponseEntry = (output, context) => {\n return {\n CreateTime: output.CreateTime != null ? __expectNonNull(__parseRfc3339DateTime(output.CreateTime)) : undefined,\n DataSource: __expectString(output.DataSource),\n Description: __expectString(output.Description),\n MapName: __expectString(output.MapName),\n PricingPlan: __expectString(output.PricingPlan),\n UpdateTime: output.UpdateTime != null ? __expectNonNull(__parseRfc3339DateTime(output.UpdateTime)) : undefined,\n };\n};\nconst deserializeAws_restJson1ListMapsResponseEntryList = (output, context) => {\n const retVal = (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_restJson1ListMapsResponseEntry(entry, context);\n });\n return retVal;\n};\nconst deserializeAws_restJson1ListPlaceIndexesResponseEntry = (output, context) => {\n return {\n CreateTime: output.CreateTime != null ? __expectNonNull(__parseRfc3339DateTime(output.CreateTime)) : undefined,\n DataSource: __expectString(output.DataSource),\n Description: __expectString(output.Description),\n IndexName: __expectString(output.IndexName),\n PricingPlan: __expectString(output.PricingPlan),\n UpdateTime: output.UpdateTime != null ? __expectNonNull(__parseRfc3339DateTime(output.UpdateTime)) : undefined,\n };\n};\nconst deserializeAws_restJson1ListPlaceIndexesResponseEntryList = (output, context) => {\n const retVal = (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_restJson1ListPlaceIndexesResponseEntry(entry, context);\n });\n return retVal;\n};\nconst deserializeAws_restJson1ListRouteCalculatorsResponseEntry = (output, context) => {\n return {\n CalculatorName: __expectString(output.CalculatorName),\n CreateTime: output.CreateTime != null ? __expectNonNull(__parseRfc3339DateTime(output.CreateTime)) : undefined,\n DataSource: __expectString(output.DataSource),\n Description: __expectString(output.Description),\n PricingPlan: __expectString(output.PricingPlan),\n UpdateTime: output.UpdateTime != null ? __expectNonNull(__parseRfc3339DateTime(output.UpdateTime)) : undefined,\n };\n};\nconst deserializeAws_restJson1ListRouteCalculatorsResponseEntryList = (output, context) => {\n const retVal = (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_restJson1ListRouteCalculatorsResponseEntry(entry, context);\n });\n return retVal;\n};\nconst deserializeAws_restJson1ListTrackersResponseEntry = (output, context) => {\n return {\n CreateTime: output.CreateTime != null ? __expectNonNull(__parseRfc3339DateTime(output.CreateTime)) : undefined,\n Description: __expectString(output.Description),\n PricingPlan: __expectString(output.PricingPlan),\n PricingPlanDataSource: __expectString(output.PricingPlanDataSource),\n TrackerName: __expectString(output.TrackerName),\n UpdateTime: output.UpdateTime != null ? __expectNonNull(__parseRfc3339DateTime(output.UpdateTime)) : undefined,\n };\n};\nconst deserializeAws_restJson1ListTrackersResponseEntryList = (output, context) => {\n const retVal = (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_restJson1ListTrackersResponseEntry(entry, context);\n });\n return retVal;\n};\nconst deserializeAws_restJson1MapConfiguration = (output, context) => {\n return {\n Style: __expectString(output.Style),\n };\n};\nconst deserializeAws_restJson1Place = (output, context) => {\n return {\n AddressNumber: __expectString(output.AddressNumber),\n Country: __expectString(output.Country),\n Geometry: output.Geometry != null ? deserializeAws_restJson1PlaceGeometry(output.Geometry, context) : undefined,\n Interpolated: __expectBoolean(output.Interpolated),\n Label: __expectString(output.Label),\n Municipality: __expectString(output.Municipality),\n Neighborhood: __expectString(output.Neighborhood),\n PostalCode: __expectString(output.PostalCode),\n Region: __expectString(output.Region),\n Street: __expectString(output.Street),\n SubRegion: __expectString(output.SubRegion),\n TimeZone: output.TimeZone != null ? deserializeAws_restJson1TimeZone(output.TimeZone, context) : undefined,\n UnitNumber: __expectString(output.UnitNumber),\n UnitType: __expectString(output.UnitType),\n };\n};\nconst deserializeAws_restJson1PlaceGeometry = (output, context) => {\n return {\n Point: output.Point != null ? deserializeAws_restJson1Position(output.Point, context) : undefined,\n };\n};\nconst deserializeAws_restJson1Position = (output, context) => {\n const retVal = (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return __limitedParseDouble(entry);\n });\n return retVal;\n};\nconst deserializeAws_restJson1PositionalAccuracy = (output, context) => {\n return {\n Horizontal: __limitedParseDouble(output.Horizontal),\n };\n};\nconst deserializeAws_restJson1PositionList = (output, context) => {\n const retVal = (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_restJson1Position(entry, context);\n });\n return retVal;\n};\nconst deserializeAws_restJson1PropertyMap = (output, context) => {\n return Object.entries(output).reduce((acc, [key, value]) => {\n if (value === null) {\n return acc;\n }\n return {\n ...acc,\n [key]: __expectString(value),\n };\n }, {});\n};\nconst deserializeAws_restJson1RouteMatrix = (output, context) => {\n const retVal = (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_restJson1RouteMatrixRow(entry, context);\n });\n return retVal;\n};\nconst deserializeAws_restJson1RouteMatrixEntry = (output, context) => {\n return {\n Distance: __limitedParseDouble(output.Distance),\n DurationSeconds: __limitedParseDouble(output.DurationSeconds),\n Error: output.Error != null ? deserializeAws_restJson1RouteMatrixEntryError(output.Error, context) : undefined,\n };\n};\nconst deserializeAws_restJson1RouteMatrixEntryError = (output, context) => {\n return {\n Code: __expectString(output.Code),\n Message: __expectString(output.Message),\n };\n};\nconst deserializeAws_restJson1RouteMatrixRow = (output, context) => {\n const retVal = (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_restJson1RouteMatrixEntry(entry, context);\n });\n return retVal;\n};\nconst deserializeAws_restJson1SearchForPositionResult = (output, context) => {\n return {\n Distance: __limitedParseDouble(output.Distance),\n Place: output.Place != null ? deserializeAws_restJson1Place(output.Place, context) : undefined,\n PlaceId: __expectString(output.PlaceId),\n };\n};\nconst deserializeAws_restJson1SearchForPositionResultList = (output, context) => {\n const retVal = (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_restJson1SearchForPositionResult(entry, context);\n });\n return retVal;\n};\nconst deserializeAws_restJson1SearchForSuggestionsResult = (output, context) => {\n return {\n PlaceId: __expectString(output.PlaceId),\n Text: __expectString(output.Text),\n };\n};\nconst deserializeAws_restJson1SearchForSuggestionsResultList = (output, context) => {\n const retVal = (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_restJson1SearchForSuggestionsResult(entry, context);\n });\n return retVal;\n};\nconst deserializeAws_restJson1SearchForTextResult = (output, context) => {\n return {\n Distance: __limitedParseDouble(output.Distance),\n Place: output.Place != null ? deserializeAws_restJson1Place(output.Place, context) : undefined,\n PlaceId: __expectString(output.PlaceId),\n Relevance: __limitedParseDouble(output.Relevance),\n };\n};\nconst deserializeAws_restJson1SearchForTextResultList = (output, context) => {\n const retVal = (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_restJson1SearchForTextResult(entry, context);\n });\n return retVal;\n};\nconst deserializeAws_restJson1SearchPlaceIndexForPositionSummary = (output, context) => {\n return {\n DataSource: __expectString(output.DataSource),\n Language: __expectString(output.Language),\n MaxResults: __expectInt32(output.MaxResults),\n Position: output.Position != null ? deserializeAws_restJson1Position(output.Position, context) : undefined,\n };\n};\nconst deserializeAws_restJson1SearchPlaceIndexForSuggestionsSummary = (output, context) => {\n return {\n BiasPosition: output.BiasPosition != null ? deserializeAws_restJson1Position(output.BiasPosition, context) : undefined,\n DataSource: __expectString(output.DataSource),\n FilterBBox: output.FilterBBox != null ? deserializeAws_restJson1BoundingBox(output.FilterBBox, context) : undefined,\n FilterCountries: output.FilterCountries != null\n ? deserializeAws_restJson1CountryCodeList(output.FilterCountries, context)\n : undefined,\n Language: __expectString(output.Language),\n MaxResults: __expectInt32(output.MaxResults),\n Text: __expectString(output.Text),\n };\n};\nconst deserializeAws_restJson1SearchPlaceIndexForTextSummary = (output, context) => {\n return {\n BiasPosition: output.BiasPosition != null ? deserializeAws_restJson1Position(output.BiasPosition, context) : undefined,\n DataSource: __expectString(output.DataSource),\n FilterBBox: output.FilterBBox != null ? deserializeAws_restJson1BoundingBox(output.FilterBBox, context) : undefined,\n FilterCountries: output.FilterCountries != null\n ? deserializeAws_restJson1CountryCodeList(output.FilterCountries, context)\n : undefined,\n Language: __expectString(output.Language),\n MaxResults: __expectInt32(output.MaxResults),\n ResultBBox: output.ResultBBox != null ? deserializeAws_restJson1BoundingBox(output.ResultBBox, context) : undefined,\n Text: __expectString(output.Text),\n };\n};\nconst deserializeAws_restJson1Step = (output, context) => {\n return {\n Distance: __limitedParseDouble(output.Distance),\n DurationSeconds: __limitedParseDouble(output.DurationSeconds),\n EndPosition: output.EndPosition != null ? deserializeAws_restJson1Position(output.EndPosition, context) : undefined,\n GeometryOffset: __expectInt32(output.GeometryOffset),\n StartPosition: output.StartPosition != null ? deserializeAws_restJson1Position(output.StartPosition, context) : undefined,\n };\n};\nconst deserializeAws_restJson1StepList = (output, context) => {\n const retVal = (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_restJson1Step(entry, context);\n });\n return retVal;\n};\nconst deserializeAws_restJson1TagMap = (output, context) => {\n return Object.entries(output).reduce((acc, [key, value]) => {\n if (value === null) {\n return acc;\n }\n return {\n ...acc,\n [key]: __expectString(value),\n };\n }, {});\n};\nconst deserializeAws_restJson1TimeZone = (output, context) => {\n return {\n Name: __expectString(output.Name),\n Offset: __expectInt32(output.Offset),\n };\n};\nconst deserializeAws_restJson1ValidationExceptionField = (output, context) => {\n return {\n Message: __expectString(output.message),\n Name: __expectString(output.name),\n };\n};\nconst deserializeAws_restJson1ValidationExceptionFieldList = (output, context) => {\n const retVal = (output || [])\n .filter((e) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null;\n }\n return deserializeAws_restJson1ValidationExceptionField(entry, context);\n });\n return retVal;\n};\nconst deserializeMetadata = (output) => ({\n httpStatusCode: output.statusCode,\n requestId: output.headers[\"x-amzn-requestid\"] ?? output.headers[\"x-amzn-request-id\"] ?? output.headers[\"x-amz-request-id\"],\n extendedRequestId: output.headers[\"x-amz-id-2\"],\n cfId: output.headers[\"x-amz-cf-id\"],\n});\nconst collectBody = (streamBody = new Uint8Array(), context) => {\n if (streamBody instanceof Uint8Array) {\n return Promise.resolve(streamBody);\n }\n return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());\n};\nconst collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));\nconst isSerializableHeaderValue = (value) => value !== undefined &&\n value !== null &&\n value !== \"\" &&\n (!Object.getOwnPropertyNames(value).includes(\"length\") || value.length != 0) &&\n (!Object.getOwnPropertyNames(value).includes(\"size\") || value.size != 0);\nconst parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {\n if (encoded.length) {\n return JSON.parse(encoded);\n }\n return {};\n});\nconst parseErrorBody = async (errorBody, context) => {\n const value = await parseBody(errorBody, context);\n value.message = value.message ?? value.Message;\n return value;\n};\nconst loadRestJsonErrorCode = (output, data) => {\n const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());\n const sanitizeErrorCode = (rawValue) => {\n let cleanValue = rawValue;\n if (typeof cleanValue === \"number\") {\n cleanValue = cleanValue.toString();\n }\n if (cleanValue.indexOf(\",\") >= 0) {\n cleanValue = cleanValue.split(\",\")[0];\n }\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 const 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};\n"],"names":["serializeAws_restJson1SearchPlaceIndexForTextCommand","input","context","body","hostname","protocol","port","path","basePath","endpoint","resolvedPath","endsWith","slice","_aws_sdk_smithy_client__WEBPACK_IMPORTED_MODULE_0__","Is","IndexName","JSON","stringify","BiasPosition","serializeAws_restJson1Position","FilterBBox","serializeAws_restJson1BoundingBox","FilterCountries","serializeAws_restJson1CountryCodeList","Language","MaxResults","Text","resolvedHostname","disableHostPrefix","_aws_sdk_protocol_http__WEBPACK_IMPORTED_MODULE_1__","L","_aws_sdk_protocol_http__WEBPACK_IMPORTED_MODULE_2__","a","method","headers","deserializeAws_restJson1SearchPlaceIndexForTextCommand","output","statusCode","deserializeAws_restJson1SearchPlaceIndexForTextCommandError","contents","map","$metadata","deserializeMetadata","data","CE","Wh","parseBody","Results","deserializeAws_restJson1SearchForTextResultList","Summary","deserializeAws_restJson1SearchPlaceIndexForTextSummary","parsedOutput","parseErrorBody","errorCode","loadRestJsonErrorCode","deserializeAws_restJson1AccessDeniedExceptionResponse","deserializeAws_restJson1InternalServerExceptionResponse","deserializeAws_restJson1ResourceNotFoundExceptionResponse","deserializeAws_restJson1ThrottlingExceptionResponse","deserializeAws_restJson1ValidationExceptionResponse","parsedBody","oR","exceptionCtor","_models_LocationServiceException__WEBPACK_IMPORTED_MODULE_3__","S","UI","message","Message","pY","exception","_models_models_0__WEBPACK_IMPORTED_MODULE_4__","Nm","to","Py","P$","yy","fieldList","FieldList","deserializeAws_restJson1ValidationExceptionFieldList","reason","Reason","nV","filter","e","vw","entry","deserializeAws_restJson1BoundingBox","retVal","mr","deserializeAws_restJson1CountryCodeList","deserializeAws_restJson1Place","AddressNumber","Country","Geometry","deserializeAws_restJson1PlaceGeometry","undefined","Interpolated","zE","Label","Municipality","Neighborhood","PostalCode","Region","Street","SubRegion","TimeZone","deserializeAws_restJson1TimeZone","UnitNumber","UnitType","Point","deserializeAws_restJson1Position","deserializeAws_restJson1SearchForTextResult","Distance","Place","PlaceId","Relevance","DataSource","u$","ResultBBox","Name","Offset","deserializeAws_restJson1ValidationExceptionField","name","httpStatusCode","requestId","extendedRequestId","cfId","collectBody","streamBody","Uint8Array","Promise","resolve","streamCollector","collectBodyString","then","utf8Encoder","length","parse","encoded","errorBody","value","sanitizeErrorCode","cleanValue","rawValue","toString","indexOf","split","headerKey","Object","keys","find","k","toLowerCase","code"],"sourceRoot":""}