@aws-sdk/client-datasync 3.34.0 → 3.37.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (402) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/{dist/cjs → dist-cjs}/DataSync.js +1 -11
  3. package/{dist/cjs → dist-cjs}/DataSyncClient.js +8 -23
  4. package/{dist/cjs → dist-cjs}/commands/CancelTaskExecutionCommand.js +2 -34
  5. package/dist-cjs/commands/CreateAgentCommand.js +36 -0
  6. package/{dist/cjs → dist-cjs}/commands/CreateLocationEfsCommand.js +2 -27
  7. package/{dist/cjs → dist-cjs}/commands/CreateLocationFsxWindowsCommand.js +2 -27
  8. package/{dist/cjs → dist-cjs}/commands/CreateLocationNfsCommand.js +2 -28
  9. package/{dist/cjs → dist-cjs}/commands/CreateLocationObjectStorageCommand.js +2 -28
  10. package/{dist/cjs → dist-cjs}/commands/CreateLocationS3Command.js +2 -33
  11. package/{dist/cjs → dist-cjs}/commands/CreateLocationSmbCommand.js +2 -28
  12. package/dist-cjs/commands/CreateTaskCommand.js +36 -0
  13. package/{dist/cjs → dist-cjs}/commands/DeleteAgentCommand.js +2 -30
  14. package/{dist/cjs → dist-cjs}/commands/DeleteLocationCommand.js +2 -27
  15. package/{dist/cjs → dist-cjs}/commands/DeleteTaskCommand.js +2 -27
  16. package/{dist/cjs → dist-cjs}/commands/DescribeAgentCommand.js +2 -29
  17. package/{dist/cjs → dist-cjs}/commands/DescribeLocationEfsCommand.js +2 -27
  18. package/{dist/cjs → dist-cjs}/commands/DescribeLocationFsxWindowsCommand.js +2 -28
  19. package/{dist/cjs → dist-cjs}/commands/DescribeLocationNfsCommand.js +2 -27
  20. package/{dist/cjs → dist-cjs}/commands/DescribeLocationObjectStorageCommand.js +2 -28
  21. package/{dist/cjs → dist-cjs}/commands/DescribeLocationS3Command.js +2 -27
  22. package/{dist/cjs → dist-cjs}/commands/DescribeLocationSmbCommand.js +2 -27
  23. package/{dist/cjs → dist-cjs}/commands/DescribeTaskCommand.js +2 -27
  24. package/{dist/cjs → dist-cjs}/commands/DescribeTaskExecutionCommand.js +2 -27
  25. package/dist-cjs/commands/ListAgentsCommand.js +36 -0
  26. package/{dist/cjs → dist-cjs}/commands/ListLocationsCommand.js +2 -30
  27. package/{dist/cjs → dist-cjs}/commands/ListTagsForResourceCommand.js +2 -27
  28. package/{dist/cjs → dist-cjs}/commands/ListTaskExecutionsCommand.js +2 -27
  29. package/{dist/cjs → dist-cjs}/commands/ListTasksCommand.js +2 -27
  30. package/{dist/cjs → dist-cjs}/commands/StartTaskExecutionCommand.js +2 -35
  31. package/{dist/cjs → dist-cjs}/commands/TagResourceCommand.js +2 -27
  32. package/{dist/cjs → dist-cjs}/commands/UntagResourceCommand.js +2 -27
  33. package/{dist/cjs → dist-cjs}/commands/UpdateAgentCommand.js +2 -27
  34. package/{dist/cjs → dist-cjs}/commands/UpdateLocationNfsCommand.js +2 -28
  35. package/{dist/cjs → dist-cjs}/commands/UpdateLocationObjectStorageCommand.js +2 -29
  36. package/{dist/cjs → dist-cjs}/commands/UpdateLocationSmbCommand.js +2 -29
  37. package/{dist/cjs → dist-cjs}/commands/UpdateTaskCommand.js +2 -27
  38. package/dist-cjs/commands/UpdateTaskExecutionCommand.js +36 -0
  39. package/{dist/cjs → dist-cjs}/endpoints.js +1 -2
  40. package/{dist/cjs → dist-cjs}/index.js +0 -1
  41. package/{dist/cjs → dist-cjs}/models/index.js +0 -1
  42. package/{dist/cjs → dist-cjs}/models/models_0.js +0 -268
  43. package/{dist/cjs → dist-cjs}/pagination/Interfaces.js +0 -1
  44. package/{dist/cjs → dist-cjs}/pagination/ListAgentsPaginator.js +1 -12
  45. package/{dist/cjs → dist-cjs}/pagination/ListLocationsPaginator.js +1 -12
  46. package/{dist/cjs → dist-cjs}/pagination/ListTagsForResourcePaginator.js +1 -12
  47. package/{dist/cjs → dist-cjs}/pagination/ListTaskExecutionsPaginator.js +1 -12
  48. package/{dist/cjs → dist-cjs}/pagination/ListTasksPaginator.js +1 -12
  49. package/{dist/cjs → dist-cjs}/protocols/Aws_json1_1.js +0 -6
  50. package/{dist/cjs → dist-cjs}/runtimeConfig.browser.js +1 -5
  51. package/{dist/cjs → dist-cjs}/runtimeConfig.js +1 -5
  52. package/{dist/cjs → dist-cjs}/runtimeConfig.native.js +0 -4
  53. package/{dist/cjs → dist-cjs}/runtimeConfig.shared.js +1 -5
  54. package/{dist/es → dist-es}/DataSync.js +1 -2
  55. package/{dist/es → dist-es}/DataSyncClient.js +1 -2
  56. package/{dist/es → dist-es}/commands/CancelTaskExecutionCommand.js +2 -3
  57. package/{dist/es → dist-es}/commands/CreateAgentCommand.js +2 -3
  58. package/{dist/es → dist-es}/commands/CreateLocationEfsCommand.js +2 -3
  59. package/{dist/es → dist-es}/commands/CreateLocationFsxWindowsCommand.js +2 -3
  60. package/{dist/es → dist-es}/commands/CreateLocationNfsCommand.js +2 -3
  61. package/{dist/es → dist-es}/commands/CreateLocationObjectStorageCommand.js +2 -3
  62. package/{dist/es → dist-es}/commands/CreateLocationS3Command.js +2 -3
  63. package/{dist/es → dist-es}/commands/CreateLocationSmbCommand.js +2 -3
  64. package/{dist/es → dist-es}/commands/CreateTaskCommand.js +2 -3
  65. package/{dist/es → dist-es}/commands/DeleteAgentCommand.js +2 -3
  66. package/{dist/es → dist-es}/commands/DeleteLocationCommand.js +2 -3
  67. package/{dist/es → dist-es}/commands/DeleteTaskCommand.js +2 -3
  68. package/{dist/es → dist-es}/commands/DescribeAgentCommand.js +2 -3
  69. package/{dist/es → dist-es}/commands/DescribeLocationEfsCommand.js +2 -3
  70. package/{dist/es → dist-es}/commands/DescribeLocationFsxWindowsCommand.js +2 -3
  71. package/{dist/es → dist-es}/commands/DescribeLocationNfsCommand.js +2 -3
  72. package/{dist/es → dist-es}/commands/DescribeLocationObjectStorageCommand.js +2 -3
  73. package/{dist/es → dist-es}/commands/DescribeLocationS3Command.js +2 -3
  74. package/{dist/es → dist-es}/commands/DescribeLocationSmbCommand.js +2 -3
  75. package/{dist/es → dist-es}/commands/DescribeTaskCommand.js +2 -3
  76. package/{dist/es → dist-es}/commands/DescribeTaskExecutionCommand.js +2 -3
  77. package/{dist/es → dist-es}/commands/ListAgentsCommand.js +2 -3
  78. package/{dist/es → dist-es}/commands/ListLocationsCommand.js +2 -3
  79. package/{dist/es → dist-es}/commands/ListTagsForResourceCommand.js +2 -3
  80. package/{dist/es → dist-es}/commands/ListTaskExecutionsCommand.js +2 -3
  81. package/{dist/es → dist-es}/commands/ListTasksCommand.js +2 -3
  82. package/{dist/es → dist-es}/commands/StartTaskExecutionCommand.js +2 -3
  83. package/{dist/es → dist-es}/commands/TagResourceCommand.js +2 -3
  84. package/{dist/es → dist-es}/commands/UntagResourceCommand.js +2 -3
  85. package/{dist/es → dist-es}/commands/UpdateAgentCommand.js +2 -3
  86. package/{dist/es → dist-es}/commands/UpdateLocationNfsCommand.js +2 -3
  87. package/{dist/es → dist-es}/commands/UpdateLocationObjectStorageCommand.js +2 -3
  88. package/{dist/es → dist-es}/commands/UpdateLocationSmbCommand.js +2 -3
  89. package/{dist/es → dist-es}/commands/UpdateTaskCommand.js +2 -3
  90. package/{dist/es → dist-es}/commands/UpdateTaskExecutionCommand.js +2 -3
  91. package/{dist/es → dist-es}/endpoints.js +1 -2
  92. package/{dist/types/index.d.ts → dist-es/index.js} +0 -0
  93. package/{dist/types/models/index.d.ts → dist-es/models/index.js} +0 -0
  94. package/{dist/es → dist-es}/models/models_0.js +0 -1
  95. package/dist-es/pagination/Interfaces.js +1 -0
  96. package/{dist/es → dist-es}/pagination/ListAgentsPaginator.js +1 -2
  97. package/{dist/es → dist-es}/pagination/ListLocationsPaginator.js +1 -2
  98. package/{dist/es → dist-es}/pagination/ListTagsForResourcePaginator.js +1 -2
  99. package/{dist/es → dist-es}/pagination/ListTaskExecutionsPaginator.js +1 -2
  100. package/{dist/es → dist-es}/pagination/ListTasksPaginator.js +1 -2
  101. package/{dist/es → dist-es}/protocols/Aws_json1_1.js +0 -1
  102. package/{dist/es → dist-es}/runtimeConfig.browser.js +1 -2
  103. package/{dist/es → dist-es}/runtimeConfig.js +1 -2
  104. package/{dist/es → dist-es}/runtimeConfig.native.js +0 -1
  105. package/{dist/es → dist-es}/runtimeConfig.shared.js +1 -2
  106. package/{dist/types → dist-types}/DataSync.d.ts +2 -2
  107. package/{dist/types → dist-types}/DataSyncClient.d.ts +8 -8
  108. package/{dist/types → dist-types}/commands/CancelTaskExecutionCommand.d.ts +2 -2
  109. package/{dist/types → dist-types}/commands/CreateAgentCommand.d.ts +2 -2
  110. package/{dist/types → dist-types}/commands/CreateLocationEfsCommand.d.ts +2 -2
  111. package/{dist/types → dist-types}/commands/CreateLocationFsxWindowsCommand.d.ts +2 -2
  112. package/{dist/types → dist-types}/commands/CreateLocationNfsCommand.d.ts +2 -2
  113. package/{dist/types → dist-types}/commands/CreateLocationObjectStorageCommand.d.ts +2 -2
  114. package/{dist/types → dist-types}/commands/CreateLocationS3Command.d.ts +2 -2
  115. package/{dist/types → dist-types}/commands/CreateLocationSmbCommand.d.ts +2 -2
  116. package/{dist/types → dist-types}/commands/CreateTaskCommand.d.ts +2 -2
  117. package/{dist/types → dist-types}/commands/DeleteAgentCommand.d.ts +2 -2
  118. package/{dist/types → dist-types}/commands/DeleteLocationCommand.d.ts +2 -2
  119. package/{dist/types → dist-types}/commands/DeleteTaskCommand.d.ts +2 -2
  120. package/{dist/types → dist-types}/commands/DescribeAgentCommand.d.ts +2 -2
  121. package/{dist/types → dist-types}/commands/DescribeLocationEfsCommand.d.ts +2 -2
  122. package/{dist/types → dist-types}/commands/DescribeLocationFsxWindowsCommand.d.ts +2 -2
  123. package/{dist/types → dist-types}/commands/DescribeLocationNfsCommand.d.ts +2 -2
  124. package/{dist/types → dist-types}/commands/DescribeLocationObjectStorageCommand.d.ts +2 -2
  125. package/{dist/types → dist-types}/commands/DescribeLocationS3Command.d.ts +2 -2
  126. package/{dist/types → dist-types}/commands/DescribeLocationSmbCommand.d.ts +2 -2
  127. package/{dist/types → dist-types}/commands/DescribeTaskCommand.d.ts +2 -2
  128. package/{dist/types → dist-types}/commands/DescribeTaskExecutionCommand.d.ts +2 -2
  129. package/{dist/types → dist-types}/commands/ListAgentsCommand.d.ts +2 -2
  130. package/{dist/types → dist-types}/commands/ListLocationsCommand.d.ts +2 -2
  131. package/{dist/types → dist-types}/commands/ListTagsForResourceCommand.d.ts +2 -2
  132. package/{dist/types → dist-types}/commands/ListTaskExecutionsCommand.d.ts +2 -2
  133. package/{dist/types → dist-types}/commands/ListTasksCommand.d.ts +2 -2
  134. package/{dist/types → dist-types}/commands/StartTaskExecutionCommand.d.ts +2 -2
  135. package/{dist/types → dist-types}/commands/TagResourceCommand.d.ts +2 -2
  136. package/{dist/types → dist-types}/commands/UntagResourceCommand.d.ts +2 -2
  137. package/{dist/types → dist-types}/commands/UpdateAgentCommand.d.ts +2 -2
  138. package/{dist/types → dist-types}/commands/UpdateLocationNfsCommand.d.ts +2 -2
  139. package/{dist/types → dist-types}/commands/UpdateLocationObjectStorageCommand.d.ts +2 -2
  140. package/{dist/types → dist-types}/commands/UpdateLocationSmbCommand.d.ts +2 -2
  141. package/{dist/types → dist-types}/commands/UpdateTaskCommand.d.ts +2 -2
  142. package/{dist/types → dist-types}/commands/UpdateTaskExecutionCommand.d.ts +2 -2
  143. package/{dist/types → dist-types}/endpoints.d.ts +0 -0
  144. package/{index.ts → dist-types/index.d.ts} +0 -0
  145. package/{models/index.ts → dist-types/models/index.d.ts} +0 -0
  146. package/{dist/types → dist-types}/models/models_0.d.ts +0 -0
  147. package/{dist/types → dist-types}/pagination/Interfaces.d.ts +1 -1
  148. package/{dist/types → dist-types}/pagination/ListAgentsPaginator.d.ts +1 -1
  149. package/{dist/types → dist-types}/pagination/ListLocationsPaginator.d.ts +1 -1
  150. package/{dist/types → dist-types}/pagination/ListTagsForResourcePaginator.d.ts +1 -1
  151. package/{dist/types → dist-types}/pagination/ListTaskExecutionsPaginator.d.ts +1 -1
  152. package/{dist/types → dist-types}/pagination/ListTasksPaginator.d.ts +1 -1
  153. package/{dist/types → dist-types}/protocols/Aws_json1_1.d.ts +2 -2
  154. package/{dist/types → dist-types}/runtimeConfig.browser.d.ts +0 -0
  155. package/{dist/types → dist-types}/runtimeConfig.d.ts +1 -1
  156. package/{dist/types → dist-types}/runtimeConfig.native.d.ts +0 -0
  157. package/{dist/types → dist-types}/runtimeConfig.shared.d.ts +0 -0
  158. package/{dist/types → dist-types}/ts3.4/DataSync.d.ts +38 -203
  159. package/{dist/types → dist-types}/ts3.4/DataSyncClient.d.ts +32 -103
  160. package/dist-types/ts3.4/commands/CancelTaskExecutionCommand.d.ts +17 -0
  161. package/dist-types/ts3.4/commands/CreateAgentCommand.d.ts +17 -0
  162. package/{dist/types → dist-types}/ts3.4/commands/CreateLocationEfsCommand.d.ts +4 -22
  163. package/{dist/types → dist-types}/ts3.4/commands/CreateLocationFsxWindowsCommand.d.ts +4 -22
  164. package/dist-types/ts3.4/commands/CreateLocationNfsCommand.d.ts +17 -0
  165. package/dist-types/ts3.4/commands/CreateLocationObjectStorageCommand.d.ts +17 -0
  166. package/dist-types/ts3.4/commands/CreateLocationS3Command.d.ts +17 -0
  167. package/dist-types/ts3.4/commands/CreateLocationSmbCommand.d.ts +17 -0
  168. package/dist-types/ts3.4/commands/CreateTaskCommand.d.ts +17 -0
  169. package/dist-types/ts3.4/commands/DeleteAgentCommand.d.ts +17 -0
  170. package/dist-types/ts3.4/commands/DeleteLocationCommand.d.ts +17 -0
  171. package/dist-types/ts3.4/commands/DeleteTaskCommand.d.ts +17 -0
  172. package/dist-types/ts3.4/commands/DescribeAgentCommand.d.ts +17 -0
  173. package/{dist/types → dist-types}/ts3.4/commands/DescribeLocationEfsCommand.d.ts +4 -22
  174. package/{dist/types → dist-types}/ts3.4/commands/DescribeLocationFsxWindowsCommand.d.ts +4 -23
  175. package/{dist/types → dist-types}/ts3.4/commands/DescribeLocationNfsCommand.d.ts +4 -22
  176. package/dist-types/ts3.4/commands/DescribeLocationObjectStorageCommand.d.ts +17 -0
  177. package/{dist/types → dist-types}/ts3.4/commands/DescribeLocationS3Command.d.ts +4 -22
  178. package/{dist/types → dist-types}/ts3.4/commands/DescribeLocationSmbCommand.d.ts +4 -22
  179. package/{dist/types → dist-types}/ts3.4/commands/DescribeTaskCommand.d.ts +4 -22
  180. package/{dist/types → dist-types}/ts3.4/commands/DescribeTaskExecutionCommand.d.ts +4 -22
  181. package/dist-types/ts3.4/commands/ListAgentsCommand.d.ts +17 -0
  182. package/dist-types/ts3.4/commands/ListLocationsCommand.d.ts +17 -0
  183. package/{dist/types → dist-types}/ts3.4/commands/ListTagsForResourceCommand.d.ts +4 -22
  184. package/{dist/types → dist-types}/ts3.4/commands/ListTaskExecutionsCommand.d.ts +4 -22
  185. package/dist-types/ts3.4/commands/ListTasksCommand.d.ts +17 -0
  186. package/dist-types/ts3.4/commands/StartTaskExecutionCommand.d.ts +17 -0
  187. package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +17 -0
  188. package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +17 -0
  189. package/dist-types/ts3.4/commands/UpdateAgentCommand.d.ts +17 -0
  190. package/dist-types/ts3.4/commands/UpdateLocationNfsCommand.d.ts +17 -0
  191. package/dist-types/ts3.4/commands/UpdateLocationObjectStorageCommand.d.ts +17 -0
  192. package/dist-types/ts3.4/commands/UpdateLocationSmbCommand.d.ts +17 -0
  193. package/dist-types/ts3.4/commands/UpdateTaskCommand.d.ts +17 -0
  194. package/dist-types/ts3.4/commands/UpdateTaskExecutionCommand.d.ts +17 -0
  195. package/{dist/types → dist-types}/ts3.4/endpoints.d.ts +0 -0
  196. package/{dist/types → dist-types}/ts3.4/index.d.ts +0 -0
  197. package/{dist/types → dist-types}/ts3.4/models/index.d.ts +0 -0
  198. package/dist-types/ts3.4/models/models_0.d.ts +1271 -0
  199. package/{dist/types → dist-types}/ts3.4/pagination/Interfaces.d.ts +1 -1
  200. package/{dist/types → dist-types}/ts3.4/pagination/ListAgentsPaginator.d.ts +1 -1
  201. package/{dist/types → dist-types}/ts3.4/pagination/ListLocationsPaginator.d.ts +1 -1
  202. package/{dist/types → dist-types}/ts3.4/pagination/ListTagsForResourcePaginator.d.ts +1 -1
  203. package/{dist/types → dist-types}/ts3.4/pagination/ListTaskExecutionsPaginator.d.ts +1 -1
  204. package/{dist/types → dist-types}/ts3.4/pagination/ListTasksPaginator.d.ts +1 -1
  205. package/{dist/types → dist-types}/ts3.4/protocols/Aws_json1_1.d.ts +2 -2
  206. package/{dist/types → dist-types}/ts3.4/runtimeConfig.browser.d.ts +1 -3
  207. package/{dist/types → dist-types}/ts3.4/runtimeConfig.d.ts +2 -4
  208. package/{dist/types → dist-types}/ts3.4/runtimeConfig.native.d.ts +1 -3
  209. package/{dist/types → dist-types}/ts3.4/runtimeConfig.shared.d.ts +1 -3
  210. package/package.json +45 -42
  211. package/DataSync.ts +0 -1302
  212. package/DataSyncClient.ts +0 -382
  213. package/commands/CancelTaskExecutionCommand.ts +0 -101
  214. package/commands/CreateAgentCommand.ts +0 -108
  215. package/commands/CreateLocationEfsCommand.ts +0 -94
  216. package/commands/CreateLocationFsxWindowsCommand.ts +0 -94
  217. package/commands/CreateLocationNfsCommand.ts +0 -95
  218. package/commands/CreateLocationObjectStorageCommand.ts +0 -100
  219. package/commands/CreateLocationS3Command.ts +0 -100
  220. package/commands/CreateLocationSmbCommand.ts +0 -95
  221. package/commands/CreateTaskCommand.ts +0 -112
  222. package/commands/DeleteAgentCommand.ts +0 -97
  223. package/commands/DeleteLocationCommand.ts +0 -94
  224. package/commands/DeleteTaskCommand.ts +0 -94
  225. package/commands/DescribeAgentCommand.ts +0 -96
  226. package/commands/DescribeLocationEfsCommand.ts +0 -94
  227. package/commands/DescribeLocationFsxWindowsCommand.ts +0 -98
  228. package/commands/DescribeLocationNfsCommand.ts +0 -94
  229. package/commands/DescribeLocationObjectStorageCommand.ts +0 -100
  230. package/commands/DescribeLocationS3Command.ts +0 -94
  231. package/commands/DescribeLocationSmbCommand.ts +0 -94
  232. package/commands/DescribeTaskCommand.ts +0 -94
  233. package/commands/DescribeTaskExecutionCommand.ts +0 -94
  234. package/commands/ListAgentsCommand.ts +0 -101
  235. package/commands/ListLocationsCommand.ts +0 -97
  236. package/commands/ListTagsForResourceCommand.ts +0 -94
  237. package/commands/ListTaskExecutionsCommand.ts +0 -94
  238. package/commands/ListTasksCommand.ts +0 -91
  239. package/commands/StartTaskExecutionCommand.ts +0 -102
  240. package/commands/TagResourceCommand.ts +0 -94
  241. package/commands/UntagResourceCommand.ts +0 -94
  242. package/commands/UpdateAgentCommand.ts +0 -94
  243. package/commands/UpdateLocationNfsCommand.ts +0 -95
  244. package/commands/UpdateLocationObjectStorageCommand.ts +0 -101
  245. package/commands/UpdateLocationSmbCommand.ts +0 -96
  246. package/commands/UpdateTaskCommand.ts +0 -94
  247. package/commands/UpdateTaskExecutionCommand.ts +0 -103
  248. package/dist/cjs/DataSync.js.map +0 -1
  249. package/dist/cjs/DataSyncClient.js.map +0 -1
  250. package/dist/cjs/commands/CancelTaskExecutionCommand.js.map +0 -1
  251. package/dist/cjs/commands/CreateAgentCommand.js +0 -75
  252. package/dist/cjs/commands/CreateAgentCommand.js.map +0 -1
  253. package/dist/cjs/commands/CreateLocationEfsCommand.js.map +0 -1
  254. package/dist/cjs/commands/CreateLocationFsxWindowsCommand.js.map +0 -1
  255. package/dist/cjs/commands/CreateLocationNfsCommand.js.map +0 -1
  256. package/dist/cjs/commands/CreateLocationObjectStorageCommand.js.map +0 -1
  257. package/dist/cjs/commands/CreateLocationS3Command.js.map +0 -1
  258. package/dist/cjs/commands/CreateLocationSmbCommand.js.map +0 -1
  259. package/dist/cjs/commands/CreateTaskCommand.js +0 -79
  260. package/dist/cjs/commands/CreateTaskCommand.js.map +0 -1
  261. package/dist/cjs/commands/DeleteAgentCommand.js.map +0 -1
  262. package/dist/cjs/commands/DeleteLocationCommand.js.map +0 -1
  263. package/dist/cjs/commands/DeleteTaskCommand.js.map +0 -1
  264. package/dist/cjs/commands/DescribeAgentCommand.js.map +0 -1
  265. package/dist/cjs/commands/DescribeLocationEfsCommand.js.map +0 -1
  266. package/dist/cjs/commands/DescribeLocationFsxWindowsCommand.js.map +0 -1
  267. package/dist/cjs/commands/DescribeLocationNfsCommand.js.map +0 -1
  268. package/dist/cjs/commands/DescribeLocationObjectStorageCommand.js.map +0 -1
  269. package/dist/cjs/commands/DescribeLocationS3Command.js.map +0 -1
  270. package/dist/cjs/commands/DescribeLocationSmbCommand.js.map +0 -1
  271. package/dist/cjs/commands/DescribeTaskCommand.js.map +0 -1
  272. package/dist/cjs/commands/DescribeTaskExecutionCommand.js.map +0 -1
  273. package/dist/cjs/commands/ListAgentsCommand.js +0 -68
  274. package/dist/cjs/commands/ListAgentsCommand.js.map +0 -1
  275. package/dist/cjs/commands/ListLocationsCommand.js.map +0 -1
  276. package/dist/cjs/commands/ListTagsForResourceCommand.js.map +0 -1
  277. package/dist/cjs/commands/ListTaskExecutionsCommand.js.map +0 -1
  278. package/dist/cjs/commands/ListTasksCommand.js.map +0 -1
  279. package/dist/cjs/commands/StartTaskExecutionCommand.js.map +0 -1
  280. package/dist/cjs/commands/TagResourceCommand.js.map +0 -1
  281. package/dist/cjs/commands/UntagResourceCommand.js.map +0 -1
  282. package/dist/cjs/commands/UpdateAgentCommand.js.map +0 -1
  283. package/dist/cjs/commands/UpdateLocationNfsCommand.js.map +0 -1
  284. package/dist/cjs/commands/UpdateLocationObjectStorageCommand.js.map +0 -1
  285. package/dist/cjs/commands/UpdateLocationSmbCommand.js.map +0 -1
  286. package/dist/cjs/commands/UpdateTaskCommand.js.map +0 -1
  287. package/dist/cjs/commands/UpdateTaskExecutionCommand.js +0 -70
  288. package/dist/cjs/commands/UpdateTaskExecutionCommand.js.map +0 -1
  289. package/dist/cjs/endpoints.js.map +0 -1
  290. package/dist/cjs/index.js.map +0 -1
  291. package/dist/cjs/models/index.js.map +0 -1
  292. package/dist/cjs/models/models_0.js.map +0 -1
  293. package/dist/cjs/package.json +0 -91
  294. package/dist/cjs/pagination/Interfaces.js.map +0 -1
  295. package/dist/cjs/pagination/ListAgentsPaginator.js.map +0 -1
  296. package/dist/cjs/pagination/ListLocationsPaginator.js.map +0 -1
  297. package/dist/cjs/pagination/ListTagsForResourcePaginator.js.map +0 -1
  298. package/dist/cjs/pagination/ListTaskExecutionsPaginator.js.map +0 -1
  299. package/dist/cjs/pagination/ListTasksPaginator.js.map +0 -1
  300. package/dist/cjs/protocols/Aws_json1_1.js.map +0 -1
  301. package/dist/cjs/runtimeConfig.browser.js.map +0 -1
  302. package/dist/cjs/runtimeConfig.js.map +0 -1
  303. package/dist/cjs/runtimeConfig.native.js.map +0 -1
  304. package/dist/cjs/runtimeConfig.shared.js.map +0 -1
  305. package/dist/es/DataSync.js.map +0 -1
  306. package/dist/es/DataSyncClient.js.map +0 -1
  307. package/dist/es/commands/CancelTaskExecutionCommand.js.map +0 -1
  308. package/dist/es/commands/CreateAgentCommand.js.map +0 -1
  309. package/dist/es/commands/CreateLocationEfsCommand.js.map +0 -1
  310. package/dist/es/commands/CreateLocationFsxWindowsCommand.js.map +0 -1
  311. package/dist/es/commands/CreateLocationNfsCommand.js.map +0 -1
  312. package/dist/es/commands/CreateLocationObjectStorageCommand.js.map +0 -1
  313. package/dist/es/commands/CreateLocationS3Command.js.map +0 -1
  314. package/dist/es/commands/CreateLocationSmbCommand.js.map +0 -1
  315. package/dist/es/commands/CreateTaskCommand.js.map +0 -1
  316. package/dist/es/commands/DeleteAgentCommand.js.map +0 -1
  317. package/dist/es/commands/DeleteLocationCommand.js.map +0 -1
  318. package/dist/es/commands/DeleteTaskCommand.js.map +0 -1
  319. package/dist/es/commands/DescribeAgentCommand.js.map +0 -1
  320. package/dist/es/commands/DescribeLocationEfsCommand.js.map +0 -1
  321. package/dist/es/commands/DescribeLocationFsxWindowsCommand.js.map +0 -1
  322. package/dist/es/commands/DescribeLocationNfsCommand.js.map +0 -1
  323. package/dist/es/commands/DescribeLocationObjectStorageCommand.js.map +0 -1
  324. package/dist/es/commands/DescribeLocationS3Command.js.map +0 -1
  325. package/dist/es/commands/DescribeLocationSmbCommand.js.map +0 -1
  326. package/dist/es/commands/DescribeTaskCommand.js.map +0 -1
  327. package/dist/es/commands/DescribeTaskExecutionCommand.js.map +0 -1
  328. package/dist/es/commands/ListAgentsCommand.js.map +0 -1
  329. package/dist/es/commands/ListLocationsCommand.js.map +0 -1
  330. package/dist/es/commands/ListTagsForResourceCommand.js.map +0 -1
  331. package/dist/es/commands/ListTaskExecutionsCommand.js.map +0 -1
  332. package/dist/es/commands/ListTasksCommand.js.map +0 -1
  333. package/dist/es/commands/StartTaskExecutionCommand.js.map +0 -1
  334. package/dist/es/commands/TagResourceCommand.js.map +0 -1
  335. package/dist/es/commands/UntagResourceCommand.js.map +0 -1
  336. package/dist/es/commands/UpdateAgentCommand.js.map +0 -1
  337. package/dist/es/commands/UpdateLocationNfsCommand.js.map +0 -1
  338. package/dist/es/commands/UpdateLocationObjectStorageCommand.js.map +0 -1
  339. package/dist/es/commands/UpdateLocationSmbCommand.js.map +0 -1
  340. package/dist/es/commands/UpdateTaskCommand.js.map +0 -1
  341. package/dist/es/commands/UpdateTaskExecutionCommand.js.map +0 -1
  342. package/dist/es/endpoints.js.map +0 -1
  343. package/dist/es/index.js +0 -45
  344. package/dist/es/index.js.map +0 -1
  345. package/dist/es/models/index.js +0 -2
  346. package/dist/es/models/index.js.map +0 -1
  347. package/dist/es/models/models_0.js.map +0 -1
  348. package/dist/es/package.json +0 -91
  349. package/dist/es/pagination/Interfaces.js +0 -2
  350. package/dist/es/pagination/Interfaces.js.map +0 -1
  351. package/dist/es/pagination/ListAgentsPaginator.js.map +0 -1
  352. package/dist/es/pagination/ListLocationsPaginator.js.map +0 -1
  353. package/dist/es/pagination/ListTagsForResourcePaginator.js.map +0 -1
  354. package/dist/es/pagination/ListTaskExecutionsPaginator.js.map +0 -1
  355. package/dist/es/pagination/ListTasksPaginator.js.map +0 -1
  356. package/dist/es/protocols/Aws_json1_1.js.map +0 -1
  357. package/dist/es/runtimeConfig.browser.js.map +0 -1
  358. package/dist/es/runtimeConfig.js.map +0 -1
  359. package/dist/es/runtimeConfig.native.js.map +0 -1
  360. package/dist/es/runtimeConfig.shared.js.map +0 -1
  361. package/dist/types/ts3.4/commands/CancelTaskExecutionCommand.d.ts +0 -42
  362. package/dist/types/ts3.4/commands/CreateAgentCommand.d.ts +0 -49
  363. package/dist/types/ts3.4/commands/CreateLocationNfsCommand.d.ts +0 -36
  364. package/dist/types/ts3.4/commands/CreateLocationObjectStorageCommand.d.ts +0 -36
  365. package/dist/types/ts3.4/commands/CreateLocationS3Command.d.ts +0 -41
  366. package/dist/types/ts3.4/commands/CreateLocationSmbCommand.d.ts +0 -36
  367. package/dist/types/ts3.4/commands/CreateTaskCommand.d.ts +0 -53
  368. package/dist/types/ts3.4/commands/DeleteAgentCommand.d.ts +0 -38
  369. package/dist/types/ts3.4/commands/DeleteLocationCommand.d.ts +0 -35
  370. package/dist/types/ts3.4/commands/DeleteTaskCommand.d.ts +0 -35
  371. package/dist/types/ts3.4/commands/DescribeAgentCommand.d.ts +0 -37
  372. package/dist/types/ts3.4/commands/DescribeLocationObjectStorageCommand.d.ts +0 -36
  373. package/dist/types/ts3.4/commands/ListAgentsCommand.d.ts +0 -42
  374. package/dist/types/ts3.4/commands/ListLocationsCommand.d.ts +0 -38
  375. package/dist/types/ts3.4/commands/ListTasksCommand.d.ts +0 -35
  376. package/dist/types/ts3.4/commands/StartTaskExecutionCommand.d.ts +0 -43
  377. package/dist/types/ts3.4/commands/TagResourceCommand.d.ts +0 -35
  378. package/dist/types/ts3.4/commands/UntagResourceCommand.d.ts +0 -35
  379. package/dist/types/ts3.4/commands/UpdateAgentCommand.d.ts +0 -35
  380. package/dist/types/ts3.4/commands/UpdateLocationNfsCommand.d.ts +0 -36
  381. package/dist/types/ts3.4/commands/UpdateLocationObjectStorageCommand.d.ts +0 -37
  382. package/dist/types/ts3.4/commands/UpdateLocationSmbCommand.d.ts +0 -37
  383. package/dist/types/ts3.4/commands/UpdateTaskCommand.d.ts +0 -35
  384. package/dist/types/ts3.4/commands/UpdateTaskExecutionCommand.d.ts +0 -44
  385. package/dist/types/ts3.4/models/models_0.d.ts +0 -2774
  386. package/endpoints.ts +0 -91
  387. package/jest.config.js +0 -4
  388. package/models/models_0.ts +0 -3336
  389. package/pagination/Interfaces.ts +0 -7
  390. package/pagination/ListAgentsPaginator.ts +0 -54
  391. package/pagination/ListLocationsPaginator.ts +0 -58
  392. package/pagination/ListTagsForResourcePaginator.ts +0 -58
  393. package/pagination/ListTaskExecutionsPaginator.ts +0 -58
  394. package/pagination/ListTasksPaginator.ts +0 -54
  395. package/protocols/Aws_json1_1.ts +0 -4257
  396. package/runtimeConfig.browser.ts +0 -40
  397. package/runtimeConfig.native.ts +0 -16
  398. package/runtimeConfig.shared.ts +0 -16
  399. package/runtimeConfig.ts +0 -45
  400. package/tsconfig.es.json +0 -10
  401. package/tsconfig.json +0 -31
  402. package/tsconfig.types.json +0 -8
@@ -1,4257 +0,0 @@
1
- import {
2
- CancelTaskExecutionCommandInput,
3
- CancelTaskExecutionCommandOutput,
4
- } from "../commands/CancelTaskExecutionCommand";
5
- import { CreateAgentCommandInput, CreateAgentCommandOutput } from "../commands/CreateAgentCommand";
6
- import { CreateLocationEfsCommandInput, CreateLocationEfsCommandOutput } from "../commands/CreateLocationEfsCommand";
7
- import {
8
- CreateLocationFsxWindowsCommandInput,
9
- CreateLocationFsxWindowsCommandOutput,
10
- } from "../commands/CreateLocationFsxWindowsCommand";
11
- import { CreateLocationNfsCommandInput, CreateLocationNfsCommandOutput } from "../commands/CreateLocationNfsCommand";
12
- import {
13
- CreateLocationObjectStorageCommandInput,
14
- CreateLocationObjectStorageCommandOutput,
15
- } from "../commands/CreateLocationObjectStorageCommand";
16
- import { CreateLocationS3CommandInput, CreateLocationS3CommandOutput } from "../commands/CreateLocationS3Command";
17
- import { CreateLocationSmbCommandInput, CreateLocationSmbCommandOutput } from "../commands/CreateLocationSmbCommand";
18
- import { CreateTaskCommandInput, CreateTaskCommandOutput } from "../commands/CreateTaskCommand";
19
- import { DeleteAgentCommandInput, DeleteAgentCommandOutput } from "../commands/DeleteAgentCommand";
20
- import { DeleteLocationCommandInput, DeleteLocationCommandOutput } from "../commands/DeleteLocationCommand";
21
- import { DeleteTaskCommandInput, DeleteTaskCommandOutput } from "../commands/DeleteTaskCommand";
22
- import { DescribeAgentCommandInput, DescribeAgentCommandOutput } from "../commands/DescribeAgentCommand";
23
- import {
24
- DescribeLocationEfsCommandInput,
25
- DescribeLocationEfsCommandOutput,
26
- } from "../commands/DescribeLocationEfsCommand";
27
- import {
28
- DescribeLocationFsxWindowsCommandInput,
29
- DescribeLocationFsxWindowsCommandOutput,
30
- } from "../commands/DescribeLocationFsxWindowsCommand";
31
- import {
32
- DescribeLocationNfsCommandInput,
33
- DescribeLocationNfsCommandOutput,
34
- } from "../commands/DescribeLocationNfsCommand";
35
- import {
36
- DescribeLocationObjectStorageCommandInput,
37
- DescribeLocationObjectStorageCommandOutput,
38
- } from "../commands/DescribeLocationObjectStorageCommand";
39
- import { DescribeLocationS3CommandInput, DescribeLocationS3CommandOutput } from "../commands/DescribeLocationS3Command";
40
- import {
41
- DescribeLocationSmbCommandInput,
42
- DescribeLocationSmbCommandOutput,
43
- } from "../commands/DescribeLocationSmbCommand";
44
- import { DescribeTaskCommandInput, DescribeTaskCommandOutput } from "../commands/DescribeTaskCommand";
45
- import {
46
- DescribeTaskExecutionCommandInput,
47
- DescribeTaskExecutionCommandOutput,
48
- } from "../commands/DescribeTaskExecutionCommand";
49
- import { ListAgentsCommandInput, ListAgentsCommandOutput } from "../commands/ListAgentsCommand";
50
- import { ListLocationsCommandInput, ListLocationsCommandOutput } from "../commands/ListLocationsCommand";
51
- import {
52
- ListTagsForResourceCommandInput,
53
- ListTagsForResourceCommandOutput,
54
- } from "../commands/ListTagsForResourceCommand";
55
- import { ListTaskExecutionsCommandInput, ListTaskExecutionsCommandOutput } from "../commands/ListTaskExecutionsCommand";
56
- import { ListTasksCommandInput, ListTasksCommandOutput } from "../commands/ListTasksCommand";
57
- import { StartTaskExecutionCommandInput, StartTaskExecutionCommandOutput } from "../commands/StartTaskExecutionCommand";
58
- import { TagResourceCommandInput, TagResourceCommandOutput } from "../commands/TagResourceCommand";
59
- import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand";
60
- import { UpdateAgentCommandInput, UpdateAgentCommandOutput } from "../commands/UpdateAgentCommand";
61
- import { UpdateLocationNfsCommandInput, UpdateLocationNfsCommandOutput } from "../commands/UpdateLocationNfsCommand";
62
- import {
63
- UpdateLocationObjectStorageCommandInput,
64
- UpdateLocationObjectStorageCommandOutput,
65
- } from "../commands/UpdateLocationObjectStorageCommand";
66
- import { UpdateLocationSmbCommandInput, UpdateLocationSmbCommandOutput } from "../commands/UpdateLocationSmbCommand";
67
- import { UpdateTaskCommandInput, UpdateTaskCommandOutput } from "../commands/UpdateTaskCommand";
68
- import {
69
- UpdateTaskExecutionCommandInput,
70
- UpdateTaskExecutionCommandOutput,
71
- } from "../commands/UpdateTaskExecutionCommand";
72
- import {
73
- AgentListEntry,
74
- CancelTaskExecutionRequest,
75
- CancelTaskExecutionResponse,
76
- CreateAgentRequest,
77
- CreateAgentResponse,
78
- CreateLocationEfsRequest,
79
- CreateLocationEfsResponse,
80
- CreateLocationFsxWindowsRequest,
81
- CreateLocationFsxWindowsResponse,
82
- CreateLocationNfsRequest,
83
- CreateLocationNfsResponse,
84
- CreateLocationObjectStorageRequest,
85
- CreateLocationObjectStorageResponse,
86
- CreateLocationS3Request,
87
- CreateLocationS3Response,
88
- CreateLocationSmbRequest,
89
- CreateLocationSmbResponse,
90
- CreateTaskRequest,
91
- CreateTaskResponse,
92
- DeleteAgentRequest,
93
- DeleteAgentResponse,
94
- DeleteLocationRequest,
95
- DeleteLocationResponse,
96
- DeleteTaskRequest,
97
- DeleteTaskResponse,
98
- DescribeAgentRequest,
99
- DescribeAgentResponse,
100
- DescribeLocationEfsRequest,
101
- DescribeLocationEfsResponse,
102
- DescribeLocationFsxWindowsRequest,
103
- DescribeLocationFsxWindowsResponse,
104
- DescribeLocationNfsRequest,
105
- DescribeLocationNfsResponse,
106
- DescribeLocationObjectStorageRequest,
107
- DescribeLocationObjectStorageResponse,
108
- DescribeLocationS3Request,
109
- DescribeLocationS3Response,
110
- DescribeLocationSmbRequest,
111
- DescribeLocationSmbResponse,
112
- DescribeTaskExecutionRequest,
113
- DescribeTaskExecutionResponse,
114
- DescribeTaskRequest,
115
- DescribeTaskResponse,
116
- Ec2Config,
117
- FilterRule,
118
- InternalException,
119
- InvalidRequestException,
120
- ListAgentsRequest,
121
- ListAgentsResponse,
122
- ListLocationsRequest,
123
- ListLocationsResponse,
124
- ListTagsForResourceRequest,
125
- ListTagsForResourceResponse,
126
- ListTaskExecutionsRequest,
127
- ListTaskExecutionsResponse,
128
- ListTasksRequest,
129
- ListTasksResponse,
130
- LocationFilter,
131
- LocationListEntry,
132
- NfsMountOptions,
133
- OnPremConfig,
134
- Options,
135
- PrivateLinkConfig,
136
- S3Config,
137
- SmbMountOptions,
138
- StartTaskExecutionRequest,
139
- StartTaskExecutionResponse,
140
- TagListEntry,
141
- TagResourceRequest,
142
- TagResourceResponse,
143
- TaskExecutionListEntry,
144
- TaskExecutionResultDetail,
145
- TaskFilter,
146
- TaskListEntry,
147
- TaskSchedule,
148
- UntagResourceRequest,
149
- UntagResourceResponse,
150
- UpdateAgentRequest,
151
- UpdateAgentResponse,
152
- UpdateLocationNfsRequest,
153
- UpdateLocationNfsResponse,
154
- UpdateLocationObjectStorageRequest,
155
- UpdateLocationObjectStorageResponse,
156
- UpdateLocationSmbRequest,
157
- UpdateLocationSmbResponse,
158
- UpdateTaskExecutionRequest,
159
- UpdateTaskExecutionResponse,
160
- UpdateTaskRequest,
161
- UpdateTaskResponse,
162
- } from "../models/models_0";
163
- import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
164
- import {
165
- expectInt32 as __expectInt32,
166
- expectLong as __expectLong,
167
- expectNonNull as __expectNonNull,
168
- expectNumber as __expectNumber,
169
- expectString as __expectString,
170
- parseEpochTimestamp as __parseEpochTimestamp,
171
- } from "@aws-sdk/smithy-client";
172
- import {
173
- Endpoint as __Endpoint,
174
- HeaderBag as __HeaderBag,
175
- MetadataBearer as __MetadataBearer,
176
- ResponseMetadata as __ResponseMetadata,
177
- SerdeContext as __SerdeContext,
178
- SmithyException as __SmithyException,
179
- } from "@aws-sdk/types";
180
-
181
- export const serializeAws_json1_1CancelTaskExecutionCommand = async (
182
- input: CancelTaskExecutionCommandInput,
183
- context: __SerdeContext
184
- ): Promise<__HttpRequest> => {
185
- const headers: __HeaderBag = {
186
- "content-type": "application/x-amz-json-1.1",
187
- "x-amz-target": "FmrsService.CancelTaskExecution",
188
- };
189
- let body: any;
190
- body = JSON.stringify(serializeAws_json1_1CancelTaskExecutionRequest(input, context));
191
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
192
- };
193
-
194
- export const serializeAws_json1_1CreateAgentCommand = async (
195
- input: CreateAgentCommandInput,
196
- context: __SerdeContext
197
- ): Promise<__HttpRequest> => {
198
- const headers: __HeaderBag = {
199
- "content-type": "application/x-amz-json-1.1",
200
- "x-amz-target": "FmrsService.CreateAgent",
201
- };
202
- let body: any;
203
- body = JSON.stringify(serializeAws_json1_1CreateAgentRequest(input, context));
204
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
205
- };
206
-
207
- export const serializeAws_json1_1CreateLocationEfsCommand = async (
208
- input: CreateLocationEfsCommandInput,
209
- context: __SerdeContext
210
- ): Promise<__HttpRequest> => {
211
- const headers: __HeaderBag = {
212
- "content-type": "application/x-amz-json-1.1",
213
- "x-amz-target": "FmrsService.CreateLocationEfs",
214
- };
215
- let body: any;
216
- body = JSON.stringify(serializeAws_json1_1CreateLocationEfsRequest(input, context));
217
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
218
- };
219
-
220
- export const serializeAws_json1_1CreateLocationFsxWindowsCommand = async (
221
- input: CreateLocationFsxWindowsCommandInput,
222
- context: __SerdeContext
223
- ): Promise<__HttpRequest> => {
224
- const headers: __HeaderBag = {
225
- "content-type": "application/x-amz-json-1.1",
226
- "x-amz-target": "FmrsService.CreateLocationFsxWindows",
227
- };
228
- let body: any;
229
- body = JSON.stringify(serializeAws_json1_1CreateLocationFsxWindowsRequest(input, context));
230
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
231
- };
232
-
233
- export const serializeAws_json1_1CreateLocationNfsCommand = async (
234
- input: CreateLocationNfsCommandInput,
235
- context: __SerdeContext
236
- ): Promise<__HttpRequest> => {
237
- const headers: __HeaderBag = {
238
- "content-type": "application/x-amz-json-1.1",
239
- "x-amz-target": "FmrsService.CreateLocationNfs",
240
- };
241
- let body: any;
242
- body = JSON.stringify(serializeAws_json1_1CreateLocationNfsRequest(input, context));
243
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
244
- };
245
-
246
- export const serializeAws_json1_1CreateLocationObjectStorageCommand = async (
247
- input: CreateLocationObjectStorageCommandInput,
248
- context: __SerdeContext
249
- ): Promise<__HttpRequest> => {
250
- const headers: __HeaderBag = {
251
- "content-type": "application/x-amz-json-1.1",
252
- "x-amz-target": "FmrsService.CreateLocationObjectStorage",
253
- };
254
- let body: any;
255
- body = JSON.stringify(serializeAws_json1_1CreateLocationObjectStorageRequest(input, context));
256
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
257
- };
258
-
259
- export const serializeAws_json1_1CreateLocationS3Command = async (
260
- input: CreateLocationS3CommandInput,
261
- context: __SerdeContext
262
- ): Promise<__HttpRequest> => {
263
- const headers: __HeaderBag = {
264
- "content-type": "application/x-amz-json-1.1",
265
- "x-amz-target": "FmrsService.CreateLocationS3",
266
- };
267
- let body: any;
268
- body = JSON.stringify(serializeAws_json1_1CreateLocationS3Request(input, context));
269
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
270
- };
271
-
272
- export const serializeAws_json1_1CreateLocationSmbCommand = async (
273
- input: CreateLocationSmbCommandInput,
274
- context: __SerdeContext
275
- ): Promise<__HttpRequest> => {
276
- const headers: __HeaderBag = {
277
- "content-type": "application/x-amz-json-1.1",
278
- "x-amz-target": "FmrsService.CreateLocationSmb",
279
- };
280
- let body: any;
281
- body = JSON.stringify(serializeAws_json1_1CreateLocationSmbRequest(input, context));
282
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
283
- };
284
-
285
- export const serializeAws_json1_1CreateTaskCommand = async (
286
- input: CreateTaskCommandInput,
287
- context: __SerdeContext
288
- ): Promise<__HttpRequest> => {
289
- const headers: __HeaderBag = {
290
- "content-type": "application/x-amz-json-1.1",
291
- "x-amz-target": "FmrsService.CreateTask",
292
- };
293
- let body: any;
294
- body = JSON.stringify(serializeAws_json1_1CreateTaskRequest(input, context));
295
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
296
- };
297
-
298
- export const serializeAws_json1_1DeleteAgentCommand = async (
299
- input: DeleteAgentCommandInput,
300
- context: __SerdeContext
301
- ): Promise<__HttpRequest> => {
302
- const headers: __HeaderBag = {
303
- "content-type": "application/x-amz-json-1.1",
304
- "x-amz-target": "FmrsService.DeleteAgent",
305
- };
306
- let body: any;
307
- body = JSON.stringify(serializeAws_json1_1DeleteAgentRequest(input, context));
308
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
309
- };
310
-
311
- export const serializeAws_json1_1DeleteLocationCommand = async (
312
- input: DeleteLocationCommandInput,
313
- context: __SerdeContext
314
- ): Promise<__HttpRequest> => {
315
- const headers: __HeaderBag = {
316
- "content-type": "application/x-amz-json-1.1",
317
- "x-amz-target": "FmrsService.DeleteLocation",
318
- };
319
- let body: any;
320
- body = JSON.stringify(serializeAws_json1_1DeleteLocationRequest(input, context));
321
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
322
- };
323
-
324
- export const serializeAws_json1_1DeleteTaskCommand = async (
325
- input: DeleteTaskCommandInput,
326
- context: __SerdeContext
327
- ): Promise<__HttpRequest> => {
328
- const headers: __HeaderBag = {
329
- "content-type": "application/x-amz-json-1.1",
330
- "x-amz-target": "FmrsService.DeleteTask",
331
- };
332
- let body: any;
333
- body = JSON.stringify(serializeAws_json1_1DeleteTaskRequest(input, context));
334
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
335
- };
336
-
337
- export const serializeAws_json1_1DescribeAgentCommand = async (
338
- input: DescribeAgentCommandInput,
339
- context: __SerdeContext
340
- ): Promise<__HttpRequest> => {
341
- const headers: __HeaderBag = {
342
- "content-type": "application/x-amz-json-1.1",
343
- "x-amz-target": "FmrsService.DescribeAgent",
344
- };
345
- let body: any;
346
- body = JSON.stringify(serializeAws_json1_1DescribeAgentRequest(input, context));
347
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
348
- };
349
-
350
- export const serializeAws_json1_1DescribeLocationEfsCommand = async (
351
- input: DescribeLocationEfsCommandInput,
352
- context: __SerdeContext
353
- ): Promise<__HttpRequest> => {
354
- const headers: __HeaderBag = {
355
- "content-type": "application/x-amz-json-1.1",
356
- "x-amz-target": "FmrsService.DescribeLocationEfs",
357
- };
358
- let body: any;
359
- body = JSON.stringify(serializeAws_json1_1DescribeLocationEfsRequest(input, context));
360
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
361
- };
362
-
363
- export const serializeAws_json1_1DescribeLocationFsxWindowsCommand = async (
364
- input: DescribeLocationFsxWindowsCommandInput,
365
- context: __SerdeContext
366
- ): Promise<__HttpRequest> => {
367
- const headers: __HeaderBag = {
368
- "content-type": "application/x-amz-json-1.1",
369
- "x-amz-target": "FmrsService.DescribeLocationFsxWindows",
370
- };
371
- let body: any;
372
- body = JSON.stringify(serializeAws_json1_1DescribeLocationFsxWindowsRequest(input, context));
373
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
374
- };
375
-
376
- export const serializeAws_json1_1DescribeLocationNfsCommand = async (
377
- input: DescribeLocationNfsCommandInput,
378
- context: __SerdeContext
379
- ): Promise<__HttpRequest> => {
380
- const headers: __HeaderBag = {
381
- "content-type": "application/x-amz-json-1.1",
382
- "x-amz-target": "FmrsService.DescribeLocationNfs",
383
- };
384
- let body: any;
385
- body = JSON.stringify(serializeAws_json1_1DescribeLocationNfsRequest(input, context));
386
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
387
- };
388
-
389
- export const serializeAws_json1_1DescribeLocationObjectStorageCommand = async (
390
- input: DescribeLocationObjectStorageCommandInput,
391
- context: __SerdeContext
392
- ): Promise<__HttpRequest> => {
393
- const headers: __HeaderBag = {
394
- "content-type": "application/x-amz-json-1.1",
395
- "x-amz-target": "FmrsService.DescribeLocationObjectStorage",
396
- };
397
- let body: any;
398
- body = JSON.stringify(serializeAws_json1_1DescribeLocationObjectStorageRequest(input, context));
399
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
400
- };
401
-
402
- export const serializeAws_json1_1DescribeLocationS3Command = async (
403
- input: DescribeLocationS3CommandInput,
404
- context: __SerdeContext
405
- ): Promise<__HttpRequest> => {
406
- const headers: __HeaderBag = {
407
- "content-type": "application/x-amz-json-1.1",
408
- "x-amz-target": "FmrsService.DescribeLocationS3",
409
- };
410
- let body: any;
411
- body = JSON.stringify(serializeAws_json1_1DescribeLocationS3Request(input, context));
412
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
413
- };
414
-
415
- export const serializeAws_json1_1DescribeLocationSmbCommand = async (
416
- input: DescribeLocationSmbCommandInput,
417
- context: __SerdeContext
418
- ): Promise<__HttpRequest> => {
419
- const headers: __HeaderBag = {
420
- "content-type": "application/x-amz-json-1.1",
421
- "x-amz-target": "FmrsService.DescribeLocationSmb",
422
- };
423
- let body: any;
424
- body = JSON.stringify(serializeAws_json1_1DescribeLocationSmbRequest(input, context));
425
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
426
- };
427
-
428
- export const serializeAws_json1_1DescribeTaskCommand = async (
429
- input: DescribeTaskCommandInput,
430
- context: __SerdeContext
431
- ): Promise<__HttpRequest> => {
432
- const headers: __HeaderBag = {
433
- "content-type": "application/x-amz-json-1.1",
434
- "x-amz-target": "FmrsService.DescribeTask",
435
- };
436
- let body: any;
437
- body = JSON.stringify(serializeAws_json1_1DescribeTaskRequest(input, context));
438
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
439
- };
440
-
441
- export const serializeAws_json1_1DescribeTaskExecutionCommand = async (
442
- input: DescribeTaskExecutionCommandInput,
443
- context: __SerdeContext
444
- ): Promise<__HttpRequest> => {
445
- const headers: __HeaderBag = {
446
- "content-type": "application/x-amz-json-1.1",
447
- "x-amz-target": "FmrsService.DescribeTaskExecution",
448
- };
449
- let body: any;
450
- body = JSON.stringify(serializeAws_json1_1DescribeTaskExecutionRequest(input, context));
451
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
452
- };
453
-
454
- export const serializeAws_json1_1ListAgentsCommand = async (
455
- input: ListAgentsCommandInput,
456
- context: __SerdeContext
457
- ): Promise<__HttpRequest> => {
458
- const headers: __HeaderBag = {
459
- "content-type": "application/x-amz-json-1.1",
460
- "x-amz-target": "FmrsService.ListAgents",
461
- };
462
- let body: any;
463
- body = JSON.stringify(serializeAws_json1_1ListAgentsRequest(input, context));
464
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
465
- };
466
-
467
- export const serializeAws_json1_1ListLocationsCommand = async (
468
- input: ListLocationsCommandInput,
469
- context: __SerdeContext
470
- ): Promise<__HttpRequest> => {
471
- const headers: __HeaderBag = {
472
- "content-type": "application/x-amz-json-1.1",
473
- "x-amz-target": "FmrsService.ListLocations",
474
- };
475
- let body: any;
476
- body = JSON.stringify(serializeAws_json1_1ListLocationsRequest(input, context));
477
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
478
- };
479
-
480
- export const serializeAws_json1_1ListTagsForResourceCommand = async (
481
- input: ListTagsForResourceCommandInput,
482
- context: __SerdeContext
483
- ): Promise<__HttpRequest> => {
484
- const headers: __HeaderBag = {
485
- "content-type": "application/x-amz-json-1.1",
486
- "x-amz-target": "FmrsService.ListTagsForResource",
487
- };
488
- let body: any;
489
- body = JSON.stringify(serializeAws_json1_1ListTagsForResourceRequest(input, context));
490
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
491
- };
492
-
493
- export const serializeAws_json1_1ListTaskExecutionsCommand = async (
494
- input: ListTaskExecutionsCommandInput,
495
- context: __SerdeContext
496
- ): Promise<__HttpRequest> => {
497
- const headers: __HeaderBag = {
498
- "content-type": "application/x-amz-json-1.1",
499
- "x-amz-target": "FmrsService.ListTaskExecutions",
500
- };
501
- let body: any;
502
- body = JSON.stringify(serializeAws_json1_1ListTaskExecutionsRequest(input, context));
503
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
504
- };
505
-
506
- export const serializeAws_json1_1ListTasksCommand = async (
507
- input: ListTasksCommandInput,
508
- context: __SerdeContext
509
- ): Promise<__HttpRequest> => {
510
- const headers: __HeaderBag = {
511
- "content-type": "application/x-amz-json-1.1",
512
- "x-amz-target": "FmrsService.ListTasks",
513
- };
514
- let body: any;
515
- body = JSON.stringify(serializeAws_json1_1ListTasksRequest(input, context));
516
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
517
- };
518
-
519
- export const serializeAws_json1_1StartTaskExecutionCommand = async (
520
- input: StartTaskExecutionCommandInput,
521
- context: __SerdeContext
522
- ): Promise<__HttpRequest> => {
523
- const headers: __HeaderBag = {
524
- "content-type": "application/x-amz-json-1.1",
525
- "x-amz-target": "FmrsService.StartTaskExecution",
526
- };
527
- let body: any;
528
- body = JSON.stringify(serializeAws_json1_1StartTaskExecutionRequest(input, context));
529
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
530
- };
531
-
532
- export const serializeAws_json1_1TagResourceCommand = async (
533
- input: TagResourceCommandInput,
534
- context: __SerdeContext
535
- ): Promise<__HttpRequest> => {
536
- const headers: __HeaderBag = {
537
- "content-type": "application/x-amz-json-1.1",
538
- "x-amz-target": "FmrsService.TagResource",
539
- };
540
- let body: any;
541
- body = JSON.stringify(serializeAws_json1_1TagResourceRequest(input, context));
542
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
543
- };
544
-
545
- export const serializeAws_json1_1UntagResourceCommand = async (
546
- input: UntagResourceCommandInput,
547
- context: __SerdeContext
548
- ): Promise<__HttpRequest> => {
549
- const headers: __HeaderBag = {
550
- "content-type": "application/x-amz-json-1.1",
551
- "x-amz-target": "FmrsService.UntagResource",
552
- };
553
- let body: any;
554
- body = JSON.stringify(serializeAws_json1_1UntagResourceRequest(input, context));
555
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
556
- };
557
-
558
- export const serializeAws_json1_1UpdateAgentCommand = async (
559
- input: UpdateAgentCommandInput,
560
- context: __SerdeContext
561
- ): Promise<__HttpRequest> => {
562
- const headers: __HeaderBag = {
563
- "content-type": "application/x-amz-json-1.1",
564
- "x-amz-target": "FmrsService.UpdateAgent",
565
- };
566
- let body: any;
567
- body = JSON.stringify(serializeAws_json1_1UpdateAgentRequest(input, context));
568
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
569
- };
570
-
571
- export const serializeAws_json1_1UpdateLocationNfsCommand = async (
572
- input: UpdateLocationNfsCommandInput,
573
- context: __SerdeContext
574
- ): Promise<__HttpRequest> => {
575
- const headers: __HeaderBag = {
576
- "content-type": "application/x-amz-json-1.1",
577
- "x-amz-target": "FmrsService.UpdateLocationNfs",
578
- };
579
- let body: any;
580
- body = JSON.stringify(serializeAws_json1_1UpdateLocationNfsRequest(input, context));
581
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
582
- };
583
-
584
- export const serializeAws_json1_1UpdateLocationObjectStorageCommand = async (
585
- input: UpdateLocationObjectStorageCommandInput,
586
- context: __SerdeContext
587
- ): Promise<__HttpRequest> => {
588
- const headers: __HeaderBag = {
589
- "content-type": "application/x-amz-json-1.1",
590
- "x-amz-target": "FmrsService.UpdateLocationObjectStorage",
591
- };
592
- let body: any;
593
- body = JSON.stringify(serializeAws_json1_1UpdateLocationObjectStorageRequest(input, context));
594
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
595
- };
596
-
597
- export const serializeAws_json1_1UpdateLocationSmbCommand = async (
598
- input: UpdateLocationSmbCommandInput,
599
- context: __SerdeContext
600
- ): Promise<__HttpRequest> => {
601
- const headers: __HeaderBag = {
602
- "content-type": "application/x-amz-json-1.1",
603
- "x-amz-target": "FmrsService.UpdateLocationSmb",
604
- };
605
- let body: any;
606
- body = JSON.stringify(serializeAws_json1_1UpdateLocationSmbRequest(input, context));
607
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
608
- };
609
-
610
- export const serializeAws_json1_1UpdateTaskCommand = async (
611
- input: UpdateTaskCommandInput,
612
- context: __SerdeContext
613
- ): Promise<__HttpRequest> => {
614
- const headers: __HeaderBag = {
615
- "content-type": "application/x-amz-json-1.1",
616
- "x-amz-target": "FmrsService.UpdateTask",
617
- };
618
- let body: any;
619
- body = JSON.stringify(serializeAws_json1_1UpdateTaskRequest(input, context));
620
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
621
- };
622
-
623
- export const serializeAws_json1_1UpdateTaskExecutionCommand = async (
624
- input: UpdateTaskExecutionCommandInput,
625
- context: __SerdeContext
626
- ): Promise<__HttpRequest> => {
627
- const headers: __HeaderBag = {
628
- "content-type": "application/x-amz-json-1.1",
629
- "x-amz-target": "FmrsService.UpdateTaskExecution",
630
- };
631
- let body: any;
632
- body = JSON.stringify(serializeAws_json1_1UpdateTaskExecutionRequest(input, context));
633
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
634
- };
635
-
636
- export const deserializeAws_json1_1CancelTaskExecutionCommand = async (
637
- output: __HttpResponse,
638
- context: __SerdeContext
639
- ): Promise<CancelTaskExecutionCommandOutput> => {
640
- if (output.statusCode >= 300) {
641
- return deserializeAws_json1_1CancelTaskExecutionCommandError(output, context);
642
- }
643
- const data: any = await parseBody(output.body, context);
644
- let contents: any = {};
645
- contents = deserializeAws_json1_1CancelTaskExecutionResponse(data, context);
646
- const response: CancelTaskExecutionCommandOutput = {
647
- $metadata: deserializeMetadata(output),
648
- ...contents,
649
- };
650
- return Promise.resolve(response);
651
- };
652
-
653
- const deserializeAws_json1_1CancelTaskExecutionCommandError = async (
654
- output: __HttpResponse,
655
- context: __SerdeContext
656
- ): Promise<CancelTaskExecutionCommandOutput> => {
657
- const parsedOutput: any = {
658
- ...output,
659
- body: await parseBody(output.body, context),
660
- };
661
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
662
- let errorCode: string = "UnknownError";
663
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
664
- switch (errorCode) {
665
- case "InternalException":
666
- case "com.amazonaws.datasync#InternalException":
667
- response = {
668
- ...(await deserializeAws_json1_1InternalExceptionResponse(parsedOutput, context)),
669
- name: errorCode,
670
- $metadata: deserializeMetadata(output),
671
- };
672
- break;
673
- case "InvalidRequestException":
674
- case "com.amazonaws.datasync#InvalidRequestException":
675
- response = {
676
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
677
- name: errorCode,
678
- $metadata: deserializeMetadata(output),
679
- };
680
- break;
681
- default:
682
- const parsedBody = parsedOutput.body;
683
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
684
- response = {
685
- ...parsedBody,
686
- name: `${errorCode}`,
687
- message: parsedBody.message || parsedBody.Message || errorCode,
688
- $fault: "client",
689
- $metadata: deserializeMetadata(output),
690
- } as any;
691
- }
692
- const message = response.message || response.Message || errorCode;
693
- response.message = message;
694
- delete response.Message;
695
- return Promise.reject(Object.assign(new Error(message), response));
696
- };
697
-
698
- export const deserializeAws_json1_1CreateAgentCommand = async (
699
- output: __HttpResponse,
700
- context: __SerdeContext
701
- ): Promise<CreateAgentCommandOutput> => {
702
- if (output.statusCode >= 300) {
703
- return deserializeAws_json1_1CreateAgentCommandError(output, context);
704
- }
705
- const data: any = await parseBody(output.body, context);
706
- let contents: any = {};
707
- contents = deserializeAws_json1_1CreateAgentResponse(data, context);
708
- const response: CreateAgentCommandOutput = {
709
- $metadata: deserializeMetadata(output),
710
- ...contents,
711
- };
712
- return Promise.resolve(response);
713
- };
714
-
715
- const deserializeAws_json1_1CreateAgentCommandError = async (
716
- output: __HttpResponse,
717
- context: __SerdeContext
718
- ): Promise<CreateAgentCommandOutput> => {
719
- const parsedOutput: any = {
720
- ...output,
721
- body: await parseBody(output.body, context),
722
- };
723
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
724
- let errorCode: string = "UnknownError";
725
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
726
- switch (errorCode) {
727
- case "InternalException":
728
- case "com.amazonaws.datasync#InternalException":
729
- response = {
730
- ...(await deserializeAws_json1_1InternalExceptionResponse(parsedOutput, context)),
731
- name: errorCode,
732
- $metadata: deserializeMetadata(output),
733
- };
734
- break;
735
- case "InvalidRequestException":
736
- case "com.amazonaws.datasync#InvalidRequestException":
737
- response = {
738
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
739
- name: errorCode,
740
- $metadata: deserializeMetadata(output),
741
- };
742
- break;
743
- default:
744
- const parsedBody = parsedOutput.body;
745
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
746
- response = {
747
- ...parsedBody,
748
- name: `${errorCode}`,
749
- message: parsedBody.message || parsedBody.Message || errorCode,
750
- $fault: "client",
751
- $metadata: deserializeMetadata(output),
752
- } as any;
753
- }
754
- const message = response.message || response.Message || errorCode;
755
- response.message = message;
756
- delete response.Message;
757
- return Promise.reject(Object.assign(new Error(message), response));
758
- };
759
-
760
- export const deserializeAws_json1_1CreateLocationEfsCommand = async (
761
- output: __HttpResponse,
762
- context: __SerdeContext
763
- ): Promise<CreateLocationEfsCommandOutput> => {
764
- if (output.statusCode >= 300) {
765
- return deserializeAws_json1_1CreateLocationEfsCommandError(output, context);
766
- }
767
- const data: any = await parseBody(output.body, context);
768
- let contents: any = {};
769
- contents = deserializeAws_json1_1CreateLocationEfsResponse(data, context);
770
- const response: CreateLocationEfsCommandOutput = {
771
- $metadata: deserializeMetadata(output),
772
- ...contents,
773
- };
774
- return Promise.resolve(response);
775
- };
776
-
777
- const deserializeAws_json1_1CreateLocationEfsCommandError = async (
778
- output: __HttpResponse,
779
- context: __SerdeContext
780
- ): Promise<CreateLocationEfsCommandOutput> => {
781
- const parsedOutput: any = {
782
- ...output,
783
- body: await parseBody(output.body, context),
784
- };
785
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
786
- let errorCode: string = "UnknownError";
787
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
788
- switch (errorCode) {
789
- case "InternalException":
790
- case "com.amazonaws.datasync#InternalException":
791
- response = {
792
- ...(await deserializeAws_json1_1InternalExceptionResponse(parsedOutput, context)),
793
- name: errorCode,
794
- $metadata: deserializeMetadata(output),
795
- };
796
- break;
797
- case "InvalidRequestException":
798
- case "com.amazonaws.datasync#InvalidRequestException":
799
- response = {
800
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
801
- name: errorCode,
802
- $metadata: deserializeMetadata(output),
803
- };
804
- break;
805
- default:
806
- const parsedBody = parsedOutput.body;
807
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
808
- response = {
809
- ...parsedBody,
810
- name: `${errorCode}`,
811
- message: parsedBody.message || parsedBody.Message || errorCode,
812
- $fault: "client",
813
- $metadata: deserializeMetadata(output),
814
- } as any;
815
- }
816
- const message = response.message || response.Message || errorCode;
817
- response.message = message;
818
- delete response.Message;
819
- return Promise.reject(Object.assign(new Error(message), response));
820
- };
821
-
822
- export const deserializeAws_json1_1CreateLocationFsxWindowsCommand = async (
823
- output: __HttpResponse,
824
- context: __SerdeContext
825
- ): Promise<CreateLocationFsxWindowsCommandOutput> => {
826
- if (output.statusCode >= 300) {
827
- return deserializeAws_json1_1CreateLocationFsxWindowsCommandError(output, context);
828
- }
829
- const data: any = await parseBody(output.body, context);
830
- let contents: any = {};
831
- contents = deserializeAws_json1_1CreateLocationFsxWindowsResponse(data, context);
832
- const response: CreateLocationFsxWindowsCommandOutput = {
833
- $metadata: deserializeMetadata(output),
834
- ...contents,
835
- };
836
- return Promise.resolve(response);
837
- };
838
-
839
- const deserializeAws_json1_1CreateLocationFsxWindowsCommandError = async (
840
- output: __HttpResponse,
841
- context: __SerdeContext
842
- ): Promise<CreateLocationFsxWindowsCommandOutput> => {
843
- const parsedOutput: any = {
844
- ...output,
845
- body: await parseBody(output.body, context),
846
- };
847
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
848
- let errorCode: string = "UnknownError";
849
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
850
- switch (errorCode) {
851
- case "InternalException":
852
- case "com.amazonaws.datasync#InternalException":
853
- response = {
854
- ...(await deserializeAws_json1_1InternalExceptionResponse(parsedOutput, context)),
855
- name: errorCode,
856
- $metadata: deserializeMetadata(output),
857
- };
858
- break;
859
- case "InvalidRequestException":
860
- case "com.amazonaws.datasync#InvalidRequestException":
861
- response = {
862
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
863
- name: errorCode,
864
- $metadata: deserializeMetadata(output),
865
- };
866
- break;
867
- default:
868
- const parsedBody = parsedOutput.body;
869
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
870
- response = {
871
- ...parsedBody,
872
- name: `${errorCode}`,
873
- message: parsedBody.message || parsedBody.Message || errorCode,
874
- $fault: "client",
875
- $metadata: deserializeMetadata(output),
876
- } as any;
877
- }
878
- const message = response.message || response.Message || errorCode;
879
- response.message = message;
880
- delete response.Message;
881
- return Promise.reject(Object.assign(new Error(message), response));
882
- };
883
-
884
- export const deserializeAws_json1_1CreateLocationNfsCommand = async (
885
- output: __HttpResponse,
886
- context: __SerdeContext
887
- ): Promise<CreateLocationNfsCommandOutput> => {
888
- if (output.statusCode >= 300) {
889
- return deserializeAws_json1_1CreateLocationNfsCommandError(output, context);
890
- }
891
- const data: any = await parseBody(output.body, context);
892
- let contents: any = {};
893
- contents = deserializeAws_json1_1CreateLocationNfsResponse(data, context);
894
- const response: CreateLocationNfsCommandOutput = {
895
- $metadata: deserializeMetadata(output),
896
- ...contents,
897
- };
898
- return Promise.resolve(response);
899
- };
900
-
901
- const deserializeAws_json1_1CreateLocationNfsCommandError = async (
902
- output: __HttpResponse,
903
- context: __SerdeContext
904
- ): Promise<CreateLocationNfsCommandOutput> => {
905
- const parsedOutput: any = {
906
- ...output,
907
- body: await parseBody(output.body, context),
908
- };
909
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
910
- let errorCode: string = "UnknownError";
911
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
912
- switch (errorCode) {
913
- case "InternalException":
914
- case "com.amazonaws.datasync#InternalException":
915
- response = {
916
- ...(await deserializeAws_json1_1InternalExceptionResponse(parsedOutput, context)),
917
- name: errorCode,
918
- $metadata: deserializeMetadata(output),
919
- };
920
- break;
921
- case "InvalidRequestException":
922
- case "com.amazonaws.datasync#InvalidRequestException":
923
- response = {
924
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
925
- name: errorCode,
926
- $metadata: deserializeMetadata(output),
927
- };
928
- break;
929
- default:
930
- const parsedBody = parsedOutput.body;
931
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
932
- response = {
933
- ...parsedBody,
934
- name: `${errorCode}`,
935
- message: parsedBody.message || parsedBody.Message || errorCode,
936
- $fault: "client",
937
- $metadata: deserializeMetadata(output),
938
- } as any;
939
- }
940
- const message = response.message || response.Message || errorCode;
941
- response.message = message;
942
- delete response.Message;
943
- return Promise.reject(Object.assign(new Error(message), response));
944
- };
945
-
946
- export const deserializeAws_json1_1CreateLocationObjectStorageCommand = async (
947
- output: __HttpResponse,
948
- context: __SerdeContext
949
- ): Promise<CreateLocationObjectStorageCommandOutput> => {
950
- if (output.statusCode >= 300) {
951
- return deserializeAws_json1_1CreateLocationObjectStorageCommandError(output, context);
952
- }
953
- const data: any = await parseBody(output.body, context);
954
- let contents: any = {};
955
- contents = deserializeAws_json1_1CreateLocationObjectStorageResponse(data, context);
956
- const response: CreateLocationObjectStorageCommandOutput = {
957
- $metadata: deserializeMetadata(output),
958
- ...contents,
959
- };
960
- return Promise.resolve(response);
961
- };
962
-
963
- const deserializeAws_json1_1CreateLocationObjectStorageCommandError = async (
964
- output: __HttpResponse,
965
- context: __SerdeContext
966
- ): Promise<CreateLocationObjectStorageCommandOutput> => {
967
- const parsedOutput: any = {
968
- ...output,
969
- body: await parseBody(output.body, context),
970
- };
971
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
972
- let errorCode: string = "UnknownError";
973
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
974
- switch (errorCode) {
975
- case "InternalException":
976
- case "com.amazonaws.datasync#InternalException":
977
- response = {
978
- ...(await deserializeAws_json1_1InternalExceptionResponse(parsedOutput, context)),
979
- name: errorCode,
980
- $metadata: deserializeMetadata(output),
981
- };
982
- break;
983
- case "InvalidRequestException":
984
- case "com.amazonaws.datasync#InvalidRequestException":
985
- response = {
986
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
987
- name: errorCode,
988
- $metadata: deserializeMetadata(output),
989
- };
990
- break;
991
- default:
992
- const parsedBody = parsedOutput.body;
993
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
994
- response = {
995
- ...parsedBody,
996
- name: `${errorCode}`,
997
- message: parsedBody.message || parsedBody.Message || errorCode,
998
- $fault: "client",
999
- $metadata: deserializeMetadata(output),
1000
- } as any;
1001
- }
1002
- const message = response.message || response.Message || errorCode;
1003
- response.message = message;
1004
- delete response.Message;
1005
- return Promise.reject(Object.assign(new Error(message), response));
1006
- };
1007
-
1008
- export const deserializeAws_json1_1CreateLocationS3Command = async (
1009
- output: __HttpResponse,
1010
- context: __SerdeContext
1011
- ): Promise<CreateLocationS3CommandOutput> => {
1012
- if (output.statusCode >= 300) {
1013
- return deserializeAws_json1_1CreateLocationS3CommandError(output, context);
1014
- }
1015
- const data: any = await parseBody(output.body, context);
1016
- let contents: any = {};
1017
- contents = deserializeAws_json1_1CreateLocationS3Response(data, context);
1018
- const response: CreateLocationS3CommandOutput = {
1019
- $metadata: deserializeMetadata(output),
1020
- ...contents,
1021
- };
1022
- return Promise.resolve(response);
1023
- };
1024
-
1025
- const deserializeAws_json1_1CreateLocationS3CommandError = async (
1026
- output: __HttpResponse,
1027
- context: __SerdeContext
1028
- ): Promise<CreateLocationS3CommandOutput> => {
1029
- const parsedOutput: any = {
1030
- ...output,
1031
- body: await parseBody(output.body, context),
1032
- };
1033
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1034
- let errorCode: string = "UnknownError";
1035
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1036
- switch (errorCode) {
1037
- case "InternalException":
1038
- case "com.amazonaws.datasync#InternalException":
1039
- response = {
1040
- ...(await deserializeAws_json1_1InternalExceptionResponse(parsedOutput, context)),
1041
- name: errorCode,
1042
- $metadata: deserializeMetadata(output),
1043
- };
1044
- break;
1045
- case "InvalidRequestException":
1046
- case "com.amazonaws.datasync#InvalidRequestException":
1047
- response = {
1048
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
1049
- name: errorCode,
1050
- $metadata: deserializeMetadata(output),
1051
- };
1052
- break;
1053
- default:
1054
- const parsedBody = parsedOutput.body;
1055
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1056
- response = {
1057
- ...parsedBody,
1058
- name: `${errorCode}`,
1059
- message: parsedBody.message || parsedBody.Message || errorCode,
1060
- $fault: "client",
1061
- $metadata: deserializeMetadata(output),
1062
- } as any;
1063
- }
1064
- const message = response.message || response.Message || errorCode;
1065
- response.message = message;
1066
- delete response.Message;
1067
- return Promise.reject(Object.assign(new Error(message), response));
1068
- };
1069
-
1070
- export const deserializeAws_json1_1CreateLocationSmbCommand = async (
1071
- output: __HttpResponse,
1072
- context: __SerdeContext
1073
- ): Promise<CreateLocationSmbCommandOutput> => {
1074
- if (output.statusCode >= 300) {
1075
- return deserializeAws_json1_1CreateLocationSmbCommandError(output, context);
1076
- }
1077
- const data: any = await parseBody(output.body, context);
1078
- let contents: any = {};
1079
- contents = deserializeAws_json1_1CreateLocationSmbResponse(data, context);
1080
- const response: CreateLocationSmbCommandOutput = {
1081
- $metadata: deserializeMetadata(output),
1082
- ...contents,
1083
- };
1084
- return Promise.resolve(response);
1085
- };
1086
-
1087
- const deserializeAws_json1_1CreateLocationSmbCommandError = async (
1088
- output: __HttpResponse,
1089
- context: __SerdeContext
1090
- ): Promise<CreateLocationSmbCommandOutput> => {
1091
- const parsedOutput: any = {
1092
- ...output,
1093
- body: await parseBody(output.body, context),
1094
- };
1095
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1096
- let errorCode: string = "UnknownError";
1097
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1098
- switch (errorCode) {
1099
- case "InternalException":
1100
- case "com.amazonaws.datasync#InternalException":
1101
- response = {
1102
- ...(await deserializeAws_json1_1InternalExceptionResponse(parsedOutput, context)),
1103
- name: errorCode,
1104
- $metadata: deserializeMetadata(output),
1105
- };
1106
- break;
1107
- case "InvalidRequestException":
1108
- case "com.amazonaws.datasync#InvalidRequestException":
1109
- response = {
1110
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
1111
- name: errorCode,
1112
- $metadata: deserializeMetadata(output),
1113
- };
1114
- break;
1115
- default:
1116
- const parsedBody = parsedOutput.body;
1117
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1118
- response = {
1119
- ...parsedBody,
1120
- name: `${errorCode}`,
1121
- message: parsedBody.message || parsedBody.Message || errorCode,
1122
- $fault: "client",
1123
- $metadata: deserializeMetadata(output),
1124
- } as any;
1125
- }
1126
- const message = response.message || response.Message || errorCode;
1127
- response.message = message;
1128
- delete response.Message;
1129
- return Promise.reject(Object.assign(new Error(message), response));
1130
- };
1131
-
1132
- export const deserializeAws_json1_1CreateTaskCommand = async (
1133
- output: __HttpResponse,
1134
- context: __SerdeContext
1135
- ): Promise<CreateTaskCommandOutput> => {
1136
- if (output.statusCode >= 300) {
1137
- return deserializeAws_json1_1CreateTaskCommandError(output, context);
1138
- }
1139
- const data: any = await parseBody(output.body, context);
1140
- let contents: any = {};
1141
- contents = deserializeAws_json1_1CreateTaskResponse(data, context);
1142
- const response: CreateTaskCommandOutput = {
1143
- $metadata: deserializeMetadata(output),
1144
- ...contents,
1145
- };
1146
- return Promise.resolve(response);
1147
- };
1148
-
1149
- const deserializeAws_json1_1CreateTaskCommandError = async (
1150
- output: __HttpResponse,
1151
- context: __SerdeContext
1152
- ): Promise<CreateTaskCommandOutput> => {
1153
- const parsedOutput: any = {
1154
- ...output,
1155
- body: await parseBody(output.body, context),
1156
- };
1157
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1158
- let errorCode: string = "UnknownError";
1159
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1160
- switch (errorCode) {
1161
- case "InternalException":
1162
- case "com.amazonaws.datasync#InternalException":
1163
- response = {
1164
- ...(await deserializeAws_json1_1InternalExceptionResponse(parsedOutput, context)),
1165
- name: errorCode,
1166
- $metadata: deserializeMetadata(output),
1167
- };
1168
- break;
1169
- case "InvalidRequestException":
1170
- case "com.amazonaws.datasync#InvalidRequestException":
1171
- response = {
1172
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
1173
- name: errorCode,
1174
- $metadata: deserializeMetadata(output),
1175
- };
1176
- break;
1177
- default:
1178
- const parsedBody = parsedOutput.body;
1179
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1180
- response = {
1181
- ...parsedBody,
1182
- name: `${errorCode}`,
1183
- message: parsedBody.message || parsedBody.Message || errorCode,
1184
- $fault: "client",
1185
- $metadata: deserializeMetadata(output),
1186
- } as any;
1187
- }
1188
- const message = response.message || response.Message || errorCode;
1189
- response.message = message;
1190
- delete response.Message;
1191
- return Promise.reject(Object.assign(new Error(message), response));
1192
- };
1193
-
1194
- export const deserializeAws_json1_1DeleteAgentCommand = async (
1195
- output: __HttpResponse,
1196
- context: __SerdeContext
1197
- ): Promise<DeleteAgentCommandOutput> => {
1198
- if (output.statusCode >= 300) {
1199
- return deserializeAws_json1_1DeleteAgentCommandError(output, context);
1200
- }
1201
- const data: any = await parseBody(output.body, context);
1202
- let contents: any = {};
1203
- contents = deserializeAws_json1_1DeleteAgentResponse(data, context);
1204
- const response: DeleteAgentCommandOutput = {
1205
- $metadata: deserializeMetadata(output),
1206
- ...contents,
1207
- };
1208
- return Promise.resolve(response);
1209
- };
1210
-
1211
- const deserializeAws_json1_1DeleteAgentCommandError = async (
1212
- output: __HttpResponse,
1213
- context: __SerdeContext
1214
- ): Promise<DeleteAgentCommandOutput> => {
1215
- const parsedOutput: any = {
1216
- ...output,
1217
- body: await parseBody(output.body, context),
1218
- };
1219
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1220
- let errorCode: string = "UnknownError";
1221
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1222
- switch (errorCode) {
1223
- case "InternalException":
1224
- case "com.amazonaws.datasync#InternalException":
1225
- response = {
1226
- ...(await deserializeAws_json1_1InternalExceptionResponse(parsedOutput, context)),
1227
- name: errorCode,
1228
- $metadata: deserializeMetadata(output),
1229
- };
1230
- break;
1231
- case "InvalidRequestException":
1232
- case "com.amazonaws.datasync#InvalidRequestException":
1233
- response = {
1234
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
1235
- name: errorCode,
1236
- $metadata: deserializeMetadata(output),
1237
- };
1238
- break;
1239
- default:
1240
- const parsedBody = parsedOutput.body;
1241
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1242
- response = {
1243
- ...parsedBody,
1244
- name: `${errorCode}`,
1245
- message: parsedBody.message || parsedBody.Message || errorCode,
1246
- $fault: "client",
1247
- $metadata: deserializeMetadata(output),
1248
- } as any;
1249
- }
1250
- const message = response.message || response.Message || errorCode;
1251
- response.message = message;
1252
- delete response.Message;
1253
- return Promise.reject(Object.assign(new Error(message), response));
1254
- };
1255
-
1256
- export const deserializeAws_json1_1DeleteLocationCommand = async (
1257
- output: __HttpResponse,
1258
- context: __SerdeContext
1259
- ): Promise<DeleteLocationCommandOutput> => {
1260
- if (output.statusCode >= 300) {
1261
- return deserializeAws_json1_1DeleteLocationCommandError(output, context);
1262
- }
1263
- const data: any = await parseBody(output.body, context);
1264
- let contents: any = {};
1265
- contents = deserializeAws_json1_1DeleteLocationResponse(data, context);
1266
- const response: DeleteLocationCommandOutput = {
1267
- $metadata: deserializeMetadata(output),
1268
- ...contents,
1269
- };
1270
- return Promise.resolve(response);
1271
- };
1272
-
1273
- const deserializeAws_json1_1DeleteLocationCommandError = async (
1274
- output: __HttpResponse,
1275
- context: __SerdeContext
1276
- ): Promise<DeleteLocationCommandOutput> => {
1277
- const parsedOutput: any = {
1278
- ...output,
1279
- body: await parseBody(output.body, context),
1280
- };
1281
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1282
- let errorCode: string = "UnknownError";
1283
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1284
- switch (errorCode) {
1285
- case "InternalException":
1286
- case "com.amazonaws.datasync#InternalException":
1287
- response = {
1288
- ...(await deserializeAws_json1_1InternalExceptionResponse(parsedOutput, context)),
1289
- name: errorCode,
1290
- $metadata: deserializeMetadata(output),
1291
- };
1292
- break;
1293
- case "InvalidRequestException":
1294
- case "com.amazonaws.datasync#InvalidRequestException":
1295
- response = {
1296
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
1297
- name: errorCode,
1298
- $metadata: deserializeMetadata(output),
1299
- };
1300
- break;
1301
- default:
1302
- const parsedBody = parsedOutput.body;
1303
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1304
- response = {
1305
- ...parsedBody,
1306
- name: `${errorCode}`,
1307
- message: parsedBody.message || parsedBody.Message || errorCode,
1308
- $fault: "client",
1309
- $metadata: deserializeMetadata(output),
1310
- } as any;
1311
- }
1312
- const message = response.message || response.Message || errorCode;
1313
- response.message = message;
1314
- delete response.Message;
1315
- return Promise.reject(Object.assign(new Error(message), response));
1316
- };
1317
-
1318
- export const deserializeAws_json1_1DeleteTaskCommand = async (
1319
- output: __HttpResponse,
1320
- context: __SerdeContext
1321
- ): Promise<DeleteTaskCommandOutput> => {
1322
- if (output.statusCode >= 300) {
1323
- return deserializeAws_json1_1DeleteTaskCommandError(output, context);
1324
- }
1325
- const data: any = await parseBody(output.body, context);
1326
- let contents: any = {};
1327
- contents = deserializeAws_json1_1DeleteTaskResponse(data, context);
1328
- const response: DeleteTaskCommandOutput = {
1329
- $metadata: deserializeMetadata(output),
1330
- ...contents,
1331
- };
1332
- return Promise.resolve(response);
1333
- };
1334
-
1335
- const deserializeAws_json1_1DeleteTaskCommandError = async (
1336
- output: __HttpResponse,
1337
- context: __SerdeContext
1338
- ): Promise<DeleteTaskCommandOutput> => {
1339
- const parsedOutput: any = {
1340
- ...output,
1341
- body: await parseBody(output.body, context),
1342
- };
1343
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1344
- let errorCode: string = "UnknownError";
1345
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1346
- switch (errorCode) {
1347
- case "InternalException":
1348
- case "com.amazonaws.datasync#InternalException":
1349
- response = {
1350
- ...(await deserializeAws_json1_1InternalExceptionResponse(parsedOutput, context)),
1351
- name: errorCode,
1352
- $metadata: deserializeMetadata(output),
1353
- };
1354
- break;
1355
- case "InvalidRequestException":
1356
- case "com.amazonaws.datasync#InvalidRequestException":
1357
- response = {
1358
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
1359
- name: errorCode,
1360
- $metadata: deserializeMetadata(output),
1361
- };
1362
- break;
1363
- default:
1364
- const parsedBody = parsedOutput.body;
1365
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1366
- response = {
1367
- ...parsedBody,
1368
- name: `${errorCode}`,
1369
- message: parsedBody.message || parsedBody.Message || errorCode,
1370
- $fault: "client",
1371
- $metadata: deserializeMetadata(output),
1372
- } as any;
1373
- }
1374
- const message = response.message || response.Message || errorCode;
1375
- response.message = message;
1376
- delete response.Message;
1377
- return Promise.reject(Object.assign(new Error(message), response));
1378
- };
1379
-
1380
- export const deserializeAws_json1_1DescribeAgentCommand = async (
1381
- output: __HttpResponse,
1382
- context: __SerdeContext
1383
- ): Promise<DescribeAgentCommandOutput> => {
1384
- if (output.statusCode >= 300) {
1385
- return deserializeAws_json1_1DescribeAgentCommandError(output, context);
1386
- }
1387
- const data: any = await parseBody(output.body, context);
1388
- let contents: any = {};
1389
- contents = deserializeAws_json1_1DescribeAgentResponse(data, context);
1390
- const response: DescribeAgentCommandOutput = {
1391
- $metadata: deserializeMetadata(output),
1392
- ...contents,
1393
- };
1394
- return Promise.resolve(response);
1395
- };
1396
-
1397
- const deserializeAws_json1_1DescribeAgentCommandError = async (
1398
- output: __HttpResponse,
1399
- context: __SerdeContext
1400
- ): Promise<DescribeAgentCommandOutput> => {
1401
- const parsedOutput: any = {
1402
- ...output,
1403
- body: await parseBody(output.body, context),
1404
- };
1405
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1406
- let errorCode: string = "UnknownError";
1407
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1408
- switch (errorCode) {
1409
- case "InternalException":
1410
- case "com.amazonaws.datasync#InternalException":
1411
- response = {
1412
- ...(await deserializeAws_json1_1InternalExceptionResponse(parsedOutput, context)),
1413
- name: errorCode,
1414
- $metadata: deserializeMetadata(output),
1415
- };
1416
- break;
1417
- case "InvalidRequestException":
1418
- case "com.amazonaws.datasync#InvalidRequestException":
1419
- response = {
1420
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
1421
- name: errorCode,
1422
- $metadata: deserializeMetadata(output),
1423
- };
1424
- break;
1425
- default:
1426
- const parsedBody = parsedOutput.body;
1427
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1428
- response = {
1429
- ...parsedBody,
1430
- name: `${errorCode}`,
1431
- message: parsedBody.message || parsedBody.Message || errorCode,
1432
- $fault: "client",
1433
- $metadata: deserializeMetadata(output),
1434
- } as any;
1435
- }
1436
- const message = response.message || response.Message || errorCode;
1437
- response.message = message;
1438
- delete response.Message;
1439
- return Promise.reject(Object.assign(new Error(message), response));
1440
- };
1441
-
1442
- export const deserializeAws_json1_1DescribeLocationEfsCommand = async (
1443
- output: __HttpResponse,
1444
- context: __SerdeContext
1445
- ): Promise<DescribeLocationEfsCommandOutput> => {
1446
- if (output.statusCode >= 300) {
1447
- return deserializeAws_json1_1DescribeLocationEfsCommandError(output, context);
1448
- }
1449
- const data: any = await parseBody(output.body, context);
1450
- let contents: any = {};
1451
- contents = deserializeAws_json1_1DescribeLocationEfsResponse(data, context);
1452
- const response: DescribeLocationEfsCommandOutput = {
1453
- $metadata: deserializeMetadata(output),
1454
- ...contents,
1455
- };
1456
- return Promise.resolve(response);
1457
- };
1458
-
1459
- const deserializeAws_json1_1DescribeLocationEfsCommandError = async (
1460
- output: __HttpResponse,
1461
- context: __SerdeContext
1462
- ): Promise<DescribeLocationEfsCommandOutput> => {
1463
- const parsedOutput: any = {
1464
- ...output,
1465
- body: await parseBody(output.body, context),
1466
- };
1467
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1468
- let errorCode: string = "UnknownError";
1469
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1470
- switch (errorCode) {
1471
- case "InternalException":
1472
- case "com.amazonaws.datasync#InternalException":
1473
- response = {
1474
- ...(await deserializeAws_json1_1InternalExceptionResponse(parsedOutput, context)),
1475
- name: errorCode,
1476
- $metadata: deserializeMetadata(output),
1477
- };
1478
- break;
1479
- case "InvalidRequestException":
1480
- case "com.amazonaws.datasync#InvalidRequestException":
1481
- response = {
1482
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
1483
- name: errorCode,
1484
- $metadata: deserializeMetadata(output),
1485
- };
1486
- break;
1487
- default:
1488
- const parsedBody = parsedOutput.body;
1489
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1490
- response = {
1491
- ...parsedBody,
1492
- name: `${errorCode}`,
1493
- message: parsedBody.message || parsedBody.Message || errorCode,
1494
- $fault: "client",
1495
- $metadata: deserializeMetadata(output),
1496
- } as any;
1497
- }
1498
- const message = response.message || response.Message || errorCode;
1499
- response.message = message;
1500
- delete response.Message;
1501
- return Promise.reject(Object.assign(new Error(message), response));
1502
- };
1503
-
1504
- export const deserializeAws_json1_1DescribeLocationFsxWindowsCommand = async (
1505
- output: __HttpResponse,
1506
- context: __SerdeContext
1507
- ): Promise<DescribeLocationFsxWindowsCommandOutput> => {
1508
- if (output.statusCode >= 300) {
1509
- return deserializeAws_json1_1DescribeLocationFsxWindowsCommandError(output, context);
1510
- }
1511
- const data: any = await parseBody(output.body, context);
1512
- let contents: any = {};
1513
- contents = deserializeAws_json1_1DescribeLocationFsxWindowsResponse(data, context);
1514
- const response: DescribeLocationFsxWindowsCommandOutput = {
1515
- $metadata: deserializeMetadata(output),
1516
- ...contents,
1517
- };
1518
- return Promise.resolve(response);
1519
- };
1520
-
1521
- const deserializeAws_json1_1DescribeLocationFsxWindowsCommandError = async (
1522
- output: __HttpResponse,
1523
- context: __SerdeContext
1524
- ): Promise<DescribeLocationFsxWindowsCommandOutput> => {
1525
- const parsedOutput: any = {
1526
- ...output,
1527
- body: await parseBody(output.body, context),
1528
- };
1529
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1530
- let errorCode: string = "UnknownError";
1531
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1532
- switch (errorCode) {
1533
- case "InternalException":
1534
- case "com.amazonaws.datasync#InternalException":
1535
- response = {
1536
- ...(await deserializeAws_json1_1InternalExceptionResponse(parsedOutput, context)),
1537
- name: errorCode,
1538
- $metadata: deserializeMetadata(output),
1539
- };
1540
- break;
1541
- case "InvalidRequestException":
1542
- case "com.amazonaws.datasync#InvalidRequestException":
1543
- response = {
1544
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
1545
- name: errorCode,
1546
- $metadata: deserializeMetadata(output),
1547
- };
1548
- break;
1549
- default:
1550
- const parsedBody = parsedOutput.body;
1551
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1552
- response = {
1553
- ...parsedBody,
1554
- name: `${errorCode}`,
1555
- message: parsedBody.message || parsedBody.Message || errorCode,
1556
- $fault: "client",
1557
- $metadata: deserializeMetadata(output),
1558
- } as any;
1559
- }
1560
- const message = response.message || response.Message || errorCode;
1561
- response.message = message;
1562
- delete response.Message;
1563
- return Promise.reject(Object.assign(new Error(message), response));
1564
- };
1565
-
1566
- export const deserializeAws_json1_1DescribeLocationNfsCommand = async (
1567
- output: __HttpResponse,
1568
- context: __SerdeContext
1569
- ): Promise<DescribeLocationNfsCommandOutput> => {
1570
- if (output.statusCode >= 300) {
1571
- return deserializeAws_json1_1DescribeLocationNfsCommandError(output, context);
1572
- }
1573
- const data: any = await parseBody(output.body, context);
1574
- let contents: any = {};
1575
- contents = deserializeAws_json1_1DescribeLocationNfsResponse(data, context);
1576
- const response: DescribeLocationNfsCommandOutput = {
1577
- $metadata: deserializeMetadata(output),
1578
- ...contents,
1579
- };
1580
- return Promise.resolve(response);
1581
- };
1582
-
1583
- const deserializeAws_json1_1DescribeLocationNfsCommandError = async (
1584
- output: __HttpResponse,
1585
- context: __SerdeContext
1586
- ): Promise<DescribeLocationNfsCommandOutput> => {
1587
- const parsedOutput: any = {
1588
- ...output,
1589
- body: await parseBody(output.body, context),
1590
- };
1591
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1592
- let errorCode: string = "UnknownError";
1593
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1594
- switch (errorCode) {
1595
- case "InternalException":
1596
- case "com.amazonaws.datasync#InternalException":
1597
- response = {
1598
- ...(await deserializeAws_json1_1InternalExceptionResponse(parsedOutput, context)),
1599
- name: errorCode,
1600
- $metadata: deserializeMetadata(output),
1601
- };
1602
- break;
1603
- case "InvalidRequestException":
1604
- case "com.amazonaws.datasync#InvalidRequestException":
1605
- response = {
1606
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
1607
- name: errorCode,
1608
- $metadata: deserializeMetadata(output),
1609
- };
1610
- break;
1611
- default:
1612
- const parsedBody = parsedOutput.body;
1613
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1614
- response = {
1615
- ...parsedBody,
1616
- name: `${errorCode}`,
1617
- message: parsedBody.message || parsedBody.Message || errorCode,
1618
- $fault: "client",
1619
- $metadata: deserializeMetadata(output),
1620
- } as any;
1621
- }
1622
- const message = response.message || response.Message || errorCode;
1623
- response.message = message;
1624
- delete response.Message;
1625
- return Promise.reject(Object.assign(new Error(message), response));
1626
- };
1627
-
1628
- export const deserializeAws_json1_1DescribeLocationObjectStorageCommand = async (
1629
- output: __HttpResponse,
1630
- context: __SerdeContext
1631
- ): Promise<DescribeLocationObjectStorageCommandOutput> => {
1632
- if (output.statusCode >= 300) {
1633
- return deserializeAws_json1_1DescribeLocationObjectStorageCommandError(output, context);
1634
- }
1635
- const data: any = await parseBody(output.body, context);
1636
- let contents: any = {};
1637
- contents = deserializeAws_json1_1DescribeLocationObjectStorageResponse(data, context);
1638
- const response: DescribeLocationObjectStorageCommandOutput = {
1639
- $metadata: deserializeMetadata(output),
1640
- ...contents,
1641
- };
1642
- return Promise.resolve(response);
1643
- };
1644
-
1645
- const deserializeAws_json1_1DescribeLocationObjectStorageCommandError = async (
1646
- output: __HttpResponse,
1647
- context: __SerdeContext
1648
- ): Promise<DescribeLocationObjectStorageCommandOutput> => {
1649
- const parsedOutput: any = {
1650
- ...output,
1651
- body: await parseBody(output.body, context),
1652
- };
1653
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1654
- let errorCode: string = "UnknownError";
1655
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1656
- switch (errorCode) {
1657
- case "InternalException":
1658
- case "com.amazonaws.datasync#InternalException":
1659
- response = {
1660
- ...(await deserializeAws_json1_1InternalExceptionResponse(parsedOutput, context)),
1661
- name: errorCode,
1662
- $metadata: deserializeMetadata(output),
1663
- };
1664
- break;
1665
- case "InvalidRequestException":
1666
- case "com.amazonaws.datasync#InvalidRequestException":
1667
- response = {
1668
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
1669
- name: errorCode,
1670
- $metadata: deserializeMetadata(output),
1671
- };
1672
- break;
1673
- default:
1674
- const parsedBody = parsedOutput.body;
1675
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1676
- response = {
1677
- ...parsedBody,
1678
- name: `${errorCode}`,
1679
- message: parsedBody.message || parsedBody.Message || errorCode,
1680
- $fault: "client",
1681
- $metadata: deserializeMetadata(output),
1682
- } as any;
1683
- }
1684
- const message = response.message || response.Message || errorCode;
1685
- response.message = message;
1686
- delete response.Message;
1687
- return Promise.reject(Object.assign(new Error(message), response));
1688
- };
1689
-
1690
- export const deserializeAws_json1_1DescribeLocationS3Command = async (
1691
- output: __HttpResponse,
1692
- context: __SerdeContext
1693
- ): Promise<DescribeLocationS3CommandOutput> => {
1694
- if (output.statusCode >= 300) {
1695
- return deserializeAws_json1_1DescribeLocationS3CommandError(output, context);
1696
- }
1697
- const data: any = await parseBody(output.body, context);
1698
- let contents: any = {};
1699
- contents = deserializeAws_json1_1DescribeLocationS3Response(data, context);
1700
- const response: DescribeLocationS3CommandOutput = {
1701
- $metadata: deserializeMetadata(output),
1702
- ...contents,
1703
- };
1704
- return Promise.resolve(response);
1705
- };
1706
-
1707
- const deserializeAws_json1_1DescribeLocationS3CommandError = async (
1708
- output: __HttpResponse,
1709
- context: __SerdeContext
1710
- ): Promise<DescribeLocationS3CommandOutput> => {
1711
- const parsedOutput: any = {
1712
- ...output,
1713
- body: await parseBody(output.body, context),
1714
- };
1715
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1716
- let errorCode: string = "UnknownError";
1717
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1718
- switch (errorCode) {
1719
- case "InternalException":
1720
- case "com.amazonaws.datasync#InternalException":
1721
- response = {
1722
- ...(await deserializeAws_json1_1InternalExceptionResponse(parsedOutput, context)),
1723
- name: errorCode,
1724
- $metadata: deserializeMetadata(output),
1725
- };
1726
- break;
1727
- case "InvalidRequestException":
1728
- case "com.amazonaws.datasync#InvalidRequestException":
1729
- response = {
1730
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
1731
- name: errorCode,
1732
- $metadata: deserializeMetadata(output),
1733
- };
1734
- break;
1735
- default:
1736
- const parsedBody = parsedOutput.body;
1737
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1738
- response = {
1739
- ...parsedBody,
1740
- name: `${errorCode}`,
1741
- message: parsedBody.message || parsedBody.Message || errorCode,
1742
- $fault: "client",
1743
- $metadata: deserializeMetadata(output),
1744
- } as any;
1745
- }
1746
- const message = response.message || response.Message || errorCode;
1747
- response.message = message;
1748
- delete response.Message;
1749
- return Promise.reject(Object.assign(new Error(message), response));
1750
- };
1751
-
1752
- export const deserializeAws_json1_1DescribeLocationSmbCommand = async (
1753
- output: __HttpResponse,
1754
- context: __SerdeContext
1755
- ): Promise<DescribeLocationSmbCommandOutput> => {
1756
- if (output.statusCode >= 300) {
1757
- return deserializeAws_json1_1DescribeLocationSmbCommandError(output, context);
1758
- }
1759
- const data: any = await parseBody(output.body, context);
1760
- let contents: any = {};
1761
- contents = deserializeAws_json1_1DescribeLocationSmbResponse(data, context);
1762
- const response: DescribeLocationSmbCommandOutput = {
1763
- $metadata: deserializeMetadata(output),
1764
- ...contents,
1765
- };
1766
- return Promise.resolve(response);
1767
- };
1768
-
1769
- const deserializeAws_json1_1DescribeLocationSmbCommandError = async (
1770
- output: __HttpResponse,
1771
- context: __SerdeContext
1772
- ): Promise<DescribeLocationSmbCommandOutput> => {
1773
- const parsedOutput: any = {
1774
- ...output,
1775
- body: await parseBody(output.body, context),
1776
- };
1777
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1778
- let errorCode: string = "UnknownError";
1779
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1780
- switch (errorCode) {
1781
- case "InternalException":
1782
- case "com.amazonaws.datasync#InternalException":
1783
- response = {
1784
- ...(await deserializeAws_json1_1InternalExceptionResponse(parsedOutput, context)),
1785
- name: errorCode,
1786
- $metadata: deserializeMetadata(output),
1787
- };
1788
- break;
1789
- case "InvalidRequestException":
1790
- case "com.amazonaws.datasync#InvalidRequestException":
1791
- response = {
1792
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
1793
- name: errorCode,
1794
- $metadata: deserializeMetadata(output),
1795
- };
1796
- break;
1797
- default:
1798
- const parsedBody = parsedOutput.body;
1799
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1800
- response = {
1801
- ...parsedBody,
1802
- name: `${errorCode}`,
1803
- message: parsedBody.message || parsedBody.Message || errorCode,
1804
- $fault: "client",
1805
- $metadata: deserializeMetadata(output),
1806
- } as any;
1807
- }
1808
- const message = response.message || response.Message || errorCode;
1809
- response.message = message;
1810
- delete response.Message;
1811
- return Promise.reject(Object.assign(new Error(message), response));
1812
- };
1813
-
1814
- export const deserializeAws_json1_1DescribeTaskCommand = async (
1815
- output: __HttpResponse,
1816
- context: __SerdeContext
1817
- ): Promise<DescribeTaskCommandOutput> => {
1818
- if (output.statusCode >= 300) {
1819
- return deserializeAws_json1_1DescribeTaskCommandError(output, context);
1820
- }
1821
- const data: any = await parseBody(output.body, context);
1822
- let contents: any = {};
1823
- contents = deserializeAws_json1_1DescribeTaskResponse(data, context);
1824
- const response: DescribeTaskCommandOutput = {
1825
- $metadata: deserializeMetadata(output),
1826
- ...contents,
1827
- };
1828
- return Promise.resolve(response);
1829
- };
1830
-
1831
- const deserializeAws_json1_1DescribeTaskCommandError = async (
1832
- output: __HttpResponse,
1833
- context: __SerdeContext
1834
- ): Promise<DescribeTaskCommandOutput> => {
1835
- const parsedOutput: any = {
1836
- ...output,
1837
- body: await parseBody(output.body, context),
1838
- };
1839
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1840
- let errorCode: string = "UnknownError";
1841
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1842
- switch (errorCode) {
1843
- case "InternalException":
1844
- case "com.amazonaws.datasync#InternalException":
1845
- response = {
1846
- ...(await deserializeAws_json1_1InternalExceptionResponse(parsedOutput, context)),
1847
- name: errorCode,
1848
- $metadata: deserializeMetadata(output),
1849
- };
1850
- break;
1851
- case "InvalidRequestException":
1852
- case "com.amazonaws.datasync#InvalidRequestException":
1853
- response = {
1854
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
1855
- name: errorCode,
1856
- $metadata: deserializeMetadata(output),
1857
- };
1858
- break;
1859
- default:
1860
- const parsedBody = parsedOutput.body;
1861
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1862
- response = {
1863
- ...parsedBody,
1864
- name: `${errorCode}`,
1865
- message: parsedBody.message || parsedBody.Message || errorCode,
1866
- $fault: "client",
1867
- $metadata: deserializeMetadata(output),
1868
- } as any;
1869
- }
1870
- const message = response.message || response.Message || errorCode;
1871
- response.message = message;
1872
- delete response.Message;
1873
- return Promise.reject(Object.assign(new Error(message), response));
1874
- };
1875
-
1876
- export const deserializeAws_json1_1DescribeTaskExecutionCommand = async (
1877
- output: __HttpResponse,
1878
- context: __SerdeContext
1879
- ): Promise<DescribeTaskExecutionCommandOutput> => {
1880
- if (output.statusCode >= 300) {
1881
- return deserializeAws_json1_1DescribeTaskExecutionCommandError(output, context);
1882
- }
1883
- const data: any = await parseBody(output.body, context);
1884
- let contents: any = {};
1885
- contents = deserializeAws_json1_1DescribeTaskExecutionResponse(data, context);
1886
- const response: DescribeTaskExecutionCommandOutput = {
1887
- $metadata: deserializeMetadata(output),
1888
- ...contents,
1889
- };
1890
- return Promise.resolve(response);
1891
- };
1892
-
1893
- const deserializeAws_json1_1DescribeTaskExecutionCommandError = async (
1894
- output: __HttpResponse,
1895
- context: __SerdeContext
1896
- ): Promise<DescribeTaskExecutionCommandOutput> => {
1897
- const parsedOutput: any = {
1898
- ...output,
1899
- body: await parseBody(output.body, context),
1900
- };
1901
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1902
- let errorCode: string = "UnknownError";
1903
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1904
- switch (errorCode) {
1905
- case "InternalException":
1906
- case "com.amazonaws.datasync#InternalException":
1907
- response = {
1908
- ...(await deserializeAws_json1_1InternalExceptionResponse(parsedOutput, context)),
1909
- name: errorCode,
1910
- $metadata: deserializeMetadata(output),
1911
- };
1912
- break;
1913
- case "InvalidRequestException":
1914
- case "com.amazonaws.datasync#InvalidRequestException":
1915
- response = {
1916
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
1917
- name: errorCode,
1918
- $metadata: deserializeMetadata(output),
1919
- };
1920
- break;
1921
- default:
1922
- const parsedBody = parsedOutput.body;
1923
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1924
- response = {
1925
- ...parsedBody,
1926
- name: `${errorCode}`,
1927
- message: parsedBody.message || parsedBody.Message || errorCode,
1928
- $fault: "client",
1929
- $metadata: deserializeMetadata(output),
1930
- } as any;
1931
- }
1932
- const message = response.message || response.Message || errorCode;
1933
- response.message = message;
1934
- delete response.Message;
1935
- return Promise.reject(Object.assign(new Error(message), response));
1936
- };
1937
-
1938
- export const deserializeAws_json1_1ListAgentsCommand = async (
1939
- output: __HttpResponse,
1940
- context: __SerdeContext
1941
- ): Promise<ListAgentsCommandOutput> => {
1942
- if (output.statusCode >= 300) {
1943
- return deserializeAws_json1_1ListAgentsCommandError(output, context);
1944
- }
1945
- const data: any = await parseBody(output.body, context);
1946
- let contents: any = {};
1947
- contents = deserializeAws_json1_1ListAgentsResponse(data, context);
1948
- const response: ListAgentsCommandOutput = {
1949
- $metadata: deserializeMetadata(output),
1950
- ...contents,
1951
- };
1952
- return Promise.resolve(response);
1953
- };
1954
-
1955
- const deserializeAws_json1_1ListAgentsCommandError = async (
1956
- output: __HttpResponse,
1957
- context: __SerdeContext
1958
- ): Promise<ListAgentsCommandOutput> => {
1959
- const parsedOutput: any = {
1960
- ...output,
1961
- body: await parseBody(output.body, context),
1962
- };
1963
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1964
- let errorCode: string = "UnknownError";
1965
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1966
- switch (errorCode) {
1967
- case "InternalException":
1968
- case "com.amazonaws.datasync#InternalException":
1969
- response = {
1970
- ...(await deserializeAws_json1_1InternalExceptionResponse(parsedOutput, context)),
1971
- name: errorCode,
1972
- $metadata: deserializeMetadata(output),
1973
- };
1974
- break;
1975
- case "InvalidRequestException":
1976
- case "com.amazonaws.datasync#InvalidRequestException":
1977
- response = {
1978
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
1979
- name: errorCode,
1980
- $metadata: deserializeMetadata(output),
1981
- };
1982
- break;
1983
- default:
1984
- const parsedBody = parsedOutput.body;
1985
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1986
- response = {
1987
- ...parsedBody,
1988
- name: `${errorCode}`,
1989
- message: parsedBody.message || parsedBody.Message || errorCode,
1990
- $fault: "client",
1991
- $metadata: deserializeMetadata(output),
1992
- } as any;
1993
- }
1994
- const message = response.message || response.Message || errorCode;
1995
- response.message = message;
1996
- delete response.Message;
1997
- return Promise.reject(Object.assign(new Error(message), response));
1998
- };
1999
-
2000
- export const deserializeAws_json1_1ListLocationsCommand = async (
2001
- output: __HttpResponse,
2002
- context: __SerdeContext
2003
- ): Promise<ListLocationsCommandOutput> => {
2004
- if (output.statusCode >= 300) {
2005
- return deserializeAws_json1_1ListLocationsCommandError(output, context);
2006
- }
2007
- const data: any = await parseBody(output.body, context);
2008
- let contents: any = {};
2009
- contents = deserializeAws_json1_1ListLocationsResponse(data, context);
2010
- const response: ListLocationsCommandOutput = {
2011
- $metadata: deserializeMetadata(output),
2012
- ...contents,
2013
- };
2014
- return Promise.resolve(response);
2015
- };
2016
-
2017
- const deserializeAws_json1_1ListLocationsCommandError = async (
2018
- output: __HttpResponse,
2019
- context: __SerdeContext
2020
- ): Promise<ListLocationsCommandOutput> => {
2021
- const parsedOutput: any = {
2022
- ...output,
2023
- body: await parseBody(output.body, context),
2024
- };
2025
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
2026
- let errorCode: string = "UnknownError";
2027
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2028
- switch (errorCode) {
2029
- case "InternalException":
2030
- case "com.amazonaws.datasync#InternalException":
2031
- response = {
2032
- ...(await deserializeAws_json1_1InternalExceptionResponse(parsedOutput, context)),
2033
- name: errorCode,
2034
- $metadata: deserializeMetadata(output),
2035
- };
2036
- break;
2037
- case "InvalidRequestException":
2038
- case "com.amazonaws.datasync#InvalidRequestException":
2039
- response = {
2040
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
2041
- name: errorCode,
2042
- $metadata: deserializeMetadata(output),
2043
- };
2044
- break;
2045
- default:
2046
- const parsedBody = parsedOutput.body;
2047
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2048
- response = {
2049
- ...parsedBody,
2050
- name: `${errorCode}`,
2051
- message: parsedBody.message || parsedBody.Message || errorCode,
2052
- $fault: "client",
2053
- $metadata: deserializeMetadata(output),
2054
- } as any;
2055
- }
2056
- const message = response.message || response.Message || errorCode;
2057
- response.message = message;
2058
- delete response.Message;
2059
- return Promise.reject(Object.assign(new Error(message), response));
2060
- };
2061
-
2062
- export const deserializeAws_json1_1ListTagsForResourceCommand = async (
2063
- output: __HttpResponse,
2064
- context: __SerdeContext
2065
- ): Promise<ListTagsForResourceCommandOutput> => {
2066
- if (output.statusCode >= 300) {
2067
- return deserializeAws_json1_1ListTagsForResourceCommandError(output, context);
2068
- }
2069
- const data: any = await parseBody(output.body, context);
2070
- let contents: any = {};
2071
- contents = deserializeAws_json1_1ListTagsForResourceResponse(data, context);
2072
- const response: ListTagsForResourceCommandOutput = {
2073
- $metadata: deserializeMetadata(output),
2074
- ...contents,
2075
- };
2076
- return Promise.resolve(response);
2077
- };
2078
-
2079
- const deserializeAws_json1_1ListTagsForResourceCommandError = async (
2080
- output: __HttpResponse,
2081
- context: __SerdeContext
2082
- ): Promise<ListTagsForResourceCommandOutput> => {
2083
- const parsedOutput: any = {
2084
- ...output,
2085
- body: await parseBody(output.body, context),
2086
- };
2087
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
2088
- let errorCode: string = "UnknownError";
2089
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2090
- switch (errorCode) {
2091
- case "InternalException":
2092
- case "com.amazonaws.datasync#InternalException":
2093
- response = {
2094
- ...(await deserializeAws_json1_1InternalExceptionResponse(parsedOutput, context)),
2095
- name: errorCode,
2096
- $metadata: deserializeMetadata(output),
2097
- };
2098
- break;
2099
- case "InvalidRequestException":
2100
- case "com.amazonaws.datasync#InvalidRequestException":
2101
- response = {
2102
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
2103
- name: errorCode,
2104
- $metadata: deserializeMetadata(output),
2105
- };
2106
- break;
2107
- default:
2108
- const parsedBody = parsedOutput.body;
2109
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2110
- response = {
2111
- ...parsedBody,
2112
- name: `${errorCode}`,
2113
- message: parsedBody.message || parsedBody.Message || errorCode,
2114
- $fault: "client",
2115
- $metadata: deserializeMetadata(output),
2116
- } as any;
2117
- }
2118
- const message = response.message || response.Message || errorCode;
2119
- response.message = message;
2120
- delete response.Message;
2121
- return Promise.reject(Object.assign(new Error(message), response));
2122
- };
2123
-
2124
- export const deserializeAws_json1_1ListTaskExecutionsCommand = async (
2125
- output: __HttpResponse,
2126
- context: __SerdeContext
2127
- ): Promise<ListTaskExecutionsCommandOutput> => {
2128
- if (output.statusCode >= 300) {
2129
- return deserializeAws_json1_1ListTaskExecutionsCommandError(output, context);
2130
- }
2131
- const data: any = await parseBody(output.body, context);
2132
- let contents: any = {};
2133
- contents = deserializeAws_json1_1ListTaskExecutionsResponse(data, context);
2134
- const response: ListTaskExecutionsCommandOutput = {
2135
- $metadata: deserializeMetadata(output),
2136
- ...contents,
2137
- };
2138
- return Promise.resolve(response);
2139
- };
2140
-
2141
- const deserializeAws_json1_1ListTaskExecutionsCommandError = async (
2142
- output: __HttpResponse,
2143
- context: __SerdeContext
2144
- ): Promise<ListTaskExecutionsCommandOutput> => {
2145
- const parsedOutput: any = {
2146
- ...output,
2147
- body: await parseBody(output.body, context),
2148
- };
2149
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
2150
- let errorCode: string = "UnknownError";
2151
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2152
- switch (errorCode) {
2153
- case "InternalException":
2154
- case "com.amazonaws.datasync#InternalException":
2155
- response = {
2156
- ...(await deserializeAws_json1_1InternalExceptionResponse(parsedOutput, context)),
2157
- name: errorCode,
2158
- $metadata: deserializeMetadata(output),
2159
- };
2160
- break;
2161
- case "InvalidRequestException":
2162
- case "com.amazonaws.datasync#InvalidRequestException":
2163
- response = {
2164
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
2165
- name: errorCode,
2166
- $metadata: deserializeMetadata(output),
2167
- };
2168
- break;
2169
- default:
2170
- const parsedBody = parsedOutput.body;
2171
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2172
- response = {
2173
- ...parsedBody,
2174
- name: `${errorCode}`,
2175
- message: parsedBody.message || parsedBody.Message || errorCode,
2176
- $fault: "client",
2177
- $metadata: deserializeMetadata(output),
2178
- } as any;
2179
- }
2180
- const message = response.message || response.Message || errorCode;
2181
- response.message = message;
2182
- delete response.Message;
2183
- return Promise.reject(Object.assign(new Error(message), response));
2184
- };
2185
-
2186
- export const deserializeAws_json1_1ListTasksCommand = async (
2187
- output: __HttpResponse,
2188
- context: __SerdeContext
2189
- ): Promise<ListTasksCommandOutput> => {
2190
- if (output.statusCode >= 300) {
2191
- return deserializeAws_json1_1ListTasksCommandError(output, context);
2192
- }
2193
- const data: any = await parseBody(output.body, context);
2194
- let contents: any = {};
2195
- contents = deserializeAws_json1_1ListTasksResponse(data, context);
2196
- const response: ListTasksCommandOutput = {
2197
- $metadata: deserializeMetadata(output),
2198
- ...contents,
2199
- };
2200
- return Promise.resolve(response);
2201
- };
2202
-
2203
- const deserializeAws_json1_1ListTasksCommandError = async (
2204
- output: __HttpResponse,
2205
- context: __SerdeContext
2206
- ): Promise<ListTasksCommandOutput> => {
2207
- const parsedOutput: any = {
2208
- ...output,
2209
- body: await parseBody(output.body, context),
2210
- };
2211
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
2212
- let errorCode: string = "UnknownError";
2213
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2214
- switch (errorCode) {
2215
- case "InternalException":
2216
- case "com.amazonaws.datasync#InternalException":
2217
- response = {
2218
- ...(await deserializeAws_json1_1InternalExceptionResponse(parsedOutput, context)),
2219
- name: errorCode,
2220
- $metadata: deserializeMetadata(output),
2221
- };
2222
- break;
2223
- case "InvalidRequestException":
2224
- case "com.amazonaws.datasync#InvalidRequestException":
2225
- response = {
2226
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
2227
- name: errorCode,
2228
- $metadata: deserializeMetadata(output),
2229
- };
2230
- break;
2231
- default:
2232
- const parsedBody = parsedOutput.body;
2233
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2234
- response = {
2235
- ...parsedBody,
2236
- name: `${errorCode}`,
2237
- message: parsedBody.message || parsedBody.Message || errorCode,
2238
- $fault: "client",
2239
- $metadata: deserializeMetadata(output),
2240
- } as any;
2241
- }
2242
- const message = response.message || response.Message || errorCode;
2243
- response.message = message;
2244
- delete response.Message;
2245
- return Promise.reject(Object.assign(new Error(message), response));
2246
- };
2247
-
2248
- export const deserializeAws_json1_1StartTaskExecutionCommand = async (
2249
- output: __HttpResponse,
2250
- context: __SerdeContext
2251
- ): Promise<StartTaskExecutionCommandOutput> => {
2252
- if (output.statusCode >= 300) {
2253
- return deserializeAws_json1_1StartTaskExecutionCommandError(output, context);
2254
- }
2255
- const data: any = await parseBody(output.body, context);
2256
- let contents: any = {};
2257
- contents = deserializeAws_json1_1StartTaskExecutionResponse(data, context);
2258
- const response: StartTaskExecutionCommandOutput = {
2259
- $metadata: deserializeMetadata(output),
2260
- ...contents,
2261
- };
2262
- return Promise.resolve(response);
2263
- };
2264
-
2265
- const deserializeAws_json1_1StartTaskExecutionCommandError = async (
2266
- output: __HttpResponse,
2267
- context: __SerdeContext
2268
- ): Promise<StartTaskExecutionCommandOutput> => {
2269
- const parsedOutput: any = {
2270
- ...output,
2271
- body: await parseBody(output.body, context),
2272
- };
2273
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
2274
- let errorCode: string = "UnknownError";
2275
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2276
- switch (errorCode) {
2277
- case "InternalException":
2278
- case "com.amazonaws.datasync#InternalException":
2279
- response = {
2280
- ...(await deserializeAws_json1_1InternalExceptionResponse(parsedOutput, context)),
2281
- name: errorCode,
2282
- $metadata: deserializeMetadata(output),
2283
- };
2284
- break;
2285
- case "InvalidRequestException":
2286
- case "com.amazonaws.datasync#InvalidRequestException":
2287
- response = {
2288
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
2289
- name: errorCode,
2290
- $metadata: deserializeMetadata(output),
2291
- };
2292
- break;
2293
- default:
2294
- const parsedBody = parsedOutput.body;
2295
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2296
- response = {
2297
- ...parsedBody,
2298
- name: `${errorCode}`,
2299
- message: parsedBody.message || parsedBody.Message || errorCode,
2300
- $fault: "client",
2301
- $metadata: deserializeMetadata(output),
2302
- } as any;
2303
- }
2304
- const message = response.message || response.Message || errorCode;
2305
- response.message = message;
2306
- delete response.Message;
2307
- return Promise.reject(Object.assign(new Error(message), response));
2308
- };
2309
-
2310
- export const deserializeAws_json1_1TagResourceCommand = async (
2311
- output: __HttpResponse,
2312
- context: __SerdeContext
2313
- ): Promise<TagResourceCommandOutput> => {
2314
- if (output.statusCode >= 300) {
2315
- return deserializeAws_json1_1TagResourceCommandError(output, context);
2316
- }
2317
- const data: any = await parseBody(output.body, context);
2318
- let contents: any = {};
2319
- contents = deserializeAws_json1_1TagResourceResponse(data, context);
2320
- const response: TagResourceCommandOutput = {
2321
- $metadata: deserializeMetadata(output),
2322
- ...contents,
2323
- };
2324
- return Promise.resolve(response);
2325
- };
2326
-
2327
- const deserializeAws_json1_1TagResourceCommandError = async (
2328
- output: __HttpResponse,
2329
- context: __SerdeContext
2330
- ): Promise<TagResourceCommandOutput> => {
2331
- const parsedOutput: any = {
2332
- ...output,
2333
- body: await parseBody(output.body, context),
2334
- };
2335
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
2336
- let errorCode: string = "UnknownError";
2337
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2338
- switch (errorCode) {
2339
- case "InternalException":
2340
- case "com.amazonaws.datasync#InternalException":
2341
- response = {
2342
- ...(await deserializeAws_json1_1InternalExceptionResponse(parsedOutput, context)),
2343
- name: errorCode,
2344
- $metadata: deserializeMetadata(output),
2345
- };
2346
- break;
2347
- case "InvalidRequestException":
2348
- case "com.amazonaws.datasync#InvalidRequestException":
2349
- response = {
2350
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
2351
- name: errorCode,
2352
- $metadata: deserializeMetadata(output),
2353
- };
2354
- break;
2355
- default:
2356
- const parsedBody = parsedOutput.body;
2357
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2358
- response = {
2359
- ...parsedBody,
2360
- name: `${errorCode}`,
2361
- message: parsedBody.message || parsedBody.Message || errorCode,
2362
- $fault: "client",
2363
- $metadata: deserializeMetadata(output),
2364
- } as any;
2365
- }
2366
- const message = response.message || response.Message || errorCode;
2367
- response.message = message;
2368
- delete response.Message;
2369
- return Promise.reject(Object.assign(new Error(message), response));
2370
- };
2371
-
2372
- export const deserializeAws_json1_1UntagResourceCommand = async (
2373
- output: __HttpResponse,
2374
- context: __SerdeContext
2375
- ): Promise<UntagResourceCommandOutput> => {
2376
- if (output.statusCode >= 300) {
2377
- return deserializeAws_json1_1UntagResourceCommandError(output, context);
2378
- }
2379
- const data: any = await parseBody(output.body, context);
2380
- let contents: any = {};
2381
- contents = deserializeAws_json1_1UntagResourceResponse(data, context);
2382
- const response: UntagResourceCommandOutput = {
2383
- $metadata: deserializeMetadata(output),
2384
- ...contents,
2385
- };
2386
- return Promise.resolve(response);
2387
- };
2388
-
2389
- const deserializeAws_json1_1UntagResourceCommandError = async (
2390
- output: __HttpResponse,
2391
- context: __SerdeContext
2392
- ): Promise<UntagResourceCommandOutput> => {
2393
- const parsedOutput: any = {
2394
- ...output,
2395
- body: await parseBody(output.body, context),
2396
- };
2397
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
2398
- let errorCode: string = "UnknownError";
2399
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2400
- switch (errorCode) {
2401
- case "InternalException":
2402
- case "com.amazonaws.datasync#InternalException":
2403
- response = {
2404
- ...(await deserializeAws_json1_1InternalExceptionResponse(parsedOutput, context)),
2405
- name: errorCode,
2406
- $metadata: deserializeMetadata(output),
2407
- };
2408
- break;
2409
- case "InvalidRequestException":
2410
- case "com.amazonaws.datasync#InvalidRequestException":
2411
- response = {
2412
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
2413
- name: errorCode,
2414
- $metadata: deserializeMetadata(output),
2415
- };
2416
- break;
2417
- default:
2418
- const parsedBody = parsedOutput.body;
2419
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2420
- response = {
2421
- ...parsedBody,
2422
- name: `${errorCode}`,
2423
- message: parsedBody.message || parsedBody.Message || errorCode,
2424
- $fault: "client",
2425
- $metadata: deserializeMetadata(output),
2426
- } as any;
2427
- }
2428
- const message = response.message || response.Message || errorCode;
2429
- response.message = message;
2430
- delete response.Message;
2431
- return Promise.reject(Object.assign(new Error(message), response));
2432
- };
2433
-
2434
- export const deserializeAws_json1_1UpdateAgentCommand = async (
2435
- output: __HttpResponse,
2436
- context: __SerdeContext
2437
- ): Promise<UpdateAgentCommandOutput> => {
2438
- if (output.statusCode >= 300) {
2439
- return deserializeAws_json1_1UpdateAgentCommandError(output, context);
2440
- }
2441
- const data: any = await parseBody(output.body, context);
2442
- let contents: any = {};
2443
- contents = deserializeAws_json1_1UpdateAgentResponse(data, context);
2444
- const response: UpdateAgentCommandOutput = {
2445
- $metadata: deserializeMetadata(output),
2446
- ...contents,
2447
- };
2448
- return Promise.resolve(response);
2449
- };
2450
-
2451
- const deserializeAws_json1_1UpdateAgentCommandError = async (
2452
- output: __HttpResponse,
2453
- context: __SerdeContext
2454
- ): Promise<UpdateAgentCommandOutput> => {
2455
- const parsedOutput: any = {
2456
- ...output,
2457
- body: await parseBody(output.body, context),
2458
- };
2459
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
2460
- let errorCode: string = "UnknownError";
2461
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2462
- switch (errorCode) {
2463
- case "InternalException":
2464
- case "com.amazonaws.datasync#InternalException":
2465
- response = {
2466
- ...(await deserializeAws_json1_1InternalExceptionResponse(parsedOutput, context)),
2467
- name: errorCode,
2468
- $metadata: deserializeMetadata(output),
2469
- };
2470
- break;
2471
- case "InvalidRequestException":
2472
- case "com.amazonaws.datasync#InvalidRequestException":
2473
- response = {
2474
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
2475
- name: errorCode,
2476
- $metadata: deserializeMetadata(output),
2477
- };
2478
- break;
2479
- default:
2480
- const parsedBody = parsedOutput.body;
2481
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2482
- response = {
2483
- ...parsedBody,
2484
- name: `${errorCode}`,
2485
- message: parsedBody.message || parsedBody.Message || errorCode,
2486
- $fault: "client",
2487
- $metadata: deserializeMetadata(output),
2488
- } as any;
2489
- }
2490
- const message = response.message || response.Message || errorCode;
2491
- response.message = message;
2492
- delete response.Message;
2493
- return Promise.reject(Object.assign(new Error(message), response));
2494
- };
2495
-
2496
- export const deserializeAws_json1_1UpdateLocationNfsCommand = async (
2497
- output: __HttpResponse,
2498
- context: __SerdeContext
2499
- ): Promise<UpdateLocationNfsCommandOutput> => {
2500
- if (output.statusCode >= 300) {
2501
- return deserializeAws_json1_1UpdateLocationNfsCommandError(output, context);
2502
- }
2503
- const data: any = await parseBody(output.body, context);
2504
- let contents: any = {};
2505
- contents = deserializeAws_json1_1UpdateLocationNfsResponse(data, context);
2506
- const response: UpdateLocationNfsCommandOutput = {
2507
- $metadata: deserializeMetadata(output),
2508
- ...contents,
2509
- };
2510
- return Promise.resolve(response);
2511
- };
2512
-
2513
- const deserializeAws_json1_1UpdateLocationNfsCommandError = async (
2514
- output: __HttpResponse,
2515
- context: __SerdeContext
2516
- ): Promise<UpdateLocationNfsCommandOutput> => {
2517
- const parsedOutput: any = {
2518
- ...output,
2519
- body: await parseBody(output.body, context),
2520
- };
2521
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
2522
- let errorCode: string = "UnknownError";
2523
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2524
- switch (errorCode) {
2525
- case "InternalException":
2526
- case "com.amazonaws.datasync#InternalException":
2527
- response = {
2528
- ...(await deserializeAws_json1_1InternalExceptionResponse(parsedOutput, context)),
2529
- name: errorCode,
2530
- $metadata: deserializeMetadata(output),
2531
- };
2532
- break;
2533
- case "InvalidRequestException":
2534
- case "com.amazonaws.datasync#InvalidRequestException":
2535
- response = {
2536
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
2537
- name: errorCode,
2538
- $metadata: deserializeMetadata(output),
2539
- };
2540
- break;
2541
- default:
2542
- const parsedBody = parsedOutput.body;
2543
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2544
- response = {
2545
- ...parsedBody,
2546
- name: `${errorCode}`,
2547
- message: parsedBody.message || parsedBody.Message || errorCode,
2548
- $fault: "client",
2549
- $metadata: deserializeMetadata(output),
2550
- } as any;
2551
- }
2552
- const message = response.message || response.Message || errorCode;
2553
- response.message = message;
2554
- delete response.Message;
2555
- return Promise.reject(Object.assign(new Error(message), response));
2556
- };
2557
-
2558
- export const deserializeAws_json1_1UpdateLocationObjectStorageCommand = async (
2559
- output: __HttpResponse,
2560
- context: __SerdeContext
2561
- ): Promise<UpdateLocationObjectStorageCommandOutput> => {
2562
- if (output.statusCode >= 300) {
2563
- return deserializeAws_json1_1UpdateLocationObjectStorageCommandError(output, context);
2564
- }
2565
- const data: any = await parseBody(output.body, context);
2566
- let contents: any = {};
2567
- contents = deserializeAws_json1_1UpdateLocationObjectStorageResponse(data, context);
2568
- const response: UpdateLocationObjectStorageCommandOutput = {
2569
- $metadata: deserializeMetadata(output),
2570
- ...contents,
2571
- };
2572
- return Promise.resolve(response);
2573
- };
2574
-
2575
- const deserializeAws_json1_1UpdateLocationObjectStorageCommandError = async (
2576
- output: __HttpResponse,
2577
- context: __SerdeContext
2578
- ): Promise<UpdateLocationObjectStorageCommandOutput> => {
2579
- const parsedOutput: any = {
2580
- ...output,
2581
- body: await parseBody(output.body, context),
2582
- };
2583
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
2584
- let errorCode: string = "UnknownError";
2585
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2586
- switch (errorCode) {
2587
- case "InternalException":
2588
- case "com.amazonaws.datasync#InternalException":
2589
- response = {
2590
- ...(await deserializeAws_json1_1InternalExceptionResponse(parsedOutput, context)),
2591
- name: errorCode,
2592
- $metadata: deserializeMetadata(output),
2593
- };
2594
- break;
2595
- case "InvalidRequestException":
2596
- case "com.amazonaws.datasync#InvalidRequestException":
2597
- response = {
2598
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
2599
- name: errorCode,
2600
- $metadata: deserializeMetadata(output),
2601
- };
2602
- break;
2603
- default:
2604
- const parsedBody = parsedOutput.body;
2605
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2606
- response = {
2607
- ...parsedBody,
2608
- name: `${errorCode}`,
2609
- message: parsedBody.message || parsedBody.Message || errorCode,
2610
- $fault: "client",
2611
- $metadata: deserializeMetadata(output),
2612
- } as any;
2613
- }
2614
- const message = response.message || response.Message || errorCode;
2615
- response.message = message;
2616
- delete response.Message;
2617
- return Promise.reject(Object.assign(new Error(message), response));
2618
- };
2619
-
2620
- export const deserializeAws_json1_1UpdateLocationSmbCommand = async (
2621
- output: __HttpResponse,
2622
- context: __SerdeContext
2623
- ): Promise<UpdateLocationSmbCommandOutput> => {
2624
- if (output.statusCode >= 300) {
2625
- return deserializeAws_json1_1UpdateLocationSmbCommandError(output, context);
2626
- }
2627
- const data: any = await parseBody(output.body, context);
2628
- let contents: any = {};
2629
- contents = deserializeAws_json1_1UpdateLocationSmbResponse(data, context);
2630
- const response: UpdateLocationSmbCommandOutput = {
2631
- $metadata: deserializeMetadata(output),
2632
- ...contents,
2633
- };
2634
- return Promise.resolve(response);
2635
- };
2636
-
2637
- const deserializeAws_json1_1UpdateLocationSmbCommandError = async (
2638
- output: __HttpResponse,
2639
- context: __SerdeContext
2640
- ): Promise<UpdateLocationSmbCommandOutput> => {
2641
- const parsedOutput: any = {
2642
- ...output,
2643
- body: await parseBody(output.body, context),
2644
- };
2645
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
2646
- let errorCode: string = "UnknownError";
2647
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2648
- switch (errorCode) {
2649
- case "InternalException":
2650
- case "com.amazonaws.datasync#InternalException":
2651
- response = {
2652
- ...(await deserializeAws_json1_1InternalExceptionResponse(parsedOutput, context)),
2653
- name: errorCode,
2654
- $metadata: deserializeMetadata(output),
2655
- };
2656
- break;
2657
- case "InvalidRequestException":
2658
- case "com.amazonaws.datasync#InvalidRequestException":
2659
- response = {
2660
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
2661
- name: errorCode,
2662
- $metadata: deserializeMetadata(output),
2663
- };
2664
- break;
2665
- default:
2666
- const parsedBody = parsedOutput.body;
2667
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2668
- response = {
2669
- ...parsedBody,
2670
- name: `${errorCode}`,
2671
- message: parsedBody.message || parsedBody.Message || errorCode,
2672
- $fault: "client",
2673
- $metadata: deserializeMetadata(output),
2674
- } as any;
2675
- }
2676
- const message = response.message || response.Message || errorCode;
2677
- response.message = message;
2678
- delete response.Message;
2679
- return Promise.reject(Object.assign(new Error(message), response));
2680
- };
2681
-
2682
- export const deserializeAws_json1_1UpdateTaskCommand = async (
2683
- output: __HttpResponse,
2684
- context: __SerdeContext
2685
- ): Promise<UpdateTaskCommandOutput> => {
2686
- if (output.statusCode >= 300) {
2687
- return deserializeAws_json1_1UpdateTaskCommandError(output, context);
2688
- }
2689
- const data: any = await parseBody(output.body, context);
2690
- let contents: any = {};
2691
- contents = deserializeAws_json1_1UpdateTaskResponse(data, context);
2692
- const response: UpdateTaskCommandOutput = {
2693
- $metadata: deserializeMetadata(output),
2694
- ...contents,
2695
- };
2696
- return Promise.resolve(response);
2697
- };
2698
-
2699
- const deserializeAws_json1_1UpdateTaskCommandError = async (
2700
- output: __HttpResponse,
2701
- context: __SerdeContext
2702
- ): Promise<UpdateTaskCommandOutput> => {
2703
- const parsedOutput: any = {
2704
- ...output,
2705
- body: await parseBody(output.body, context),
2706
- };
2707
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
2708
- let errorCode: string = "UnknownError";
2709
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2710
- switch (errorCode) {
2711
- case "InternalException":
2712
- case "com.amazonaws.datasync#InternalException":
2713
- response = {
2714
- ...(await deserializeAws_json1_1InternalExceptionResponse(parsedOutput, context)),
2715
- name: errorCode,
2716
- $metadata: deserializeMetadata(output),
2717
- };
2718
- break;
2719
- case "InvalidRequestException":
2720
- case "com.amazonaws.datasync#InvalidRequestException":
2721
- response = {
2722
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
2723
- name: errorCode,
2724
- $metadata: deserializeMetadata(output),
2725
- };
2726
- break;
2727
- default:
2728
- const parsedBody = parsedOutput.body;
2729
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2730
- response = {
2731
- ...parsedBody,
2732
- name: `${errorCode}`,
2733
- message: parsedBody.message || parsedBody.Message || errorCode,
2734
- $fault: "client",
2735
- $metadata: deserializeMetadata(output),
2736
- } as any;
2737
- }
2738
- const message = response.message || response.Message || errorCode;
2739
- response.message = message;
2740
- delete response.Message;
2741
- return Promise.reject(Object.assign(new Error(message), response));
2742
- };
2743
-
2744
- export const deserializeAws_json1_1UpdateTaskExecutionCommand = async (
2745
- output: __HttpResponse,
2746
- context: __SerdeContext
2747
- ): Promise<UpdateTaskExecutionCommandOutput> => {
2748
- if (output.statusCode >= 300) {
2749
- return deserializeAws_json1_1UpdateTaskExecutionCommandError(output, context);
2750
- }
2751
- const data: any = await parseBody(output.body, context);
2752
- let contents: any = {};
2753
- contents = deserializeAws_json1_1UpdateTaskExecutionResponse(data, context);
2754
- const response: UpdateTaskExecutionCommandOutput = {
2755
- $metadata: deserializeMetadata(output),
2756
- ...contents,
2757
- };
2758
- return Promise.resolve(response);
2759
- };
2760
-
2761
- const deserializeAws_json1_1UpdateTaskExecutionCommandError = async (
2762
- output: __HttpResponse,
2763
- context: __SerdeContext
2764
- ): Promise<UpdateTaskExecutionCommandOutput> => {
2765
- const parsedOutput: any = {
2766
- ...output,
2767
- body: await parseBody(output.body, context),
2768
- };
2769
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
2770
- let errorCode: string = "UnknownError";
2771
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2772
- switch (errorCode) {
2773
- case "InternalException":
2774
- case "com.amazonaws.datasync#InternalException":
2775
- response = {
2776
- ...(await deserializeAws_json1_1InternalExceptionResponse(parsedOutput, context)),
2777
- name: errorCode,
2778
- $metadata: deserializeMetadata(output),
2779
- };
2780
- break;
2781
- case "InvalidRequestException":
2782
- case "com.amazonaws.datasync#InvalidRequestException":
2783
- response = {
2784
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
2785
- name: errorCode,
2786
- $metadata: deserializeMetadata(output),
2787
- };
2788
- break;
2789
- default:
2790
- const parsedBody = parsedOutput.body;
2791
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2792
- response = {
2793
- ...parsedBody,
2794
- name: `${errorCode}`,
2795
- message: parsedBody.message || parsedBody.Message || errorCode,
2796
- $fault: "client",
2797
- $metadata: deserializeMetadata(output),
2798
- } as any;
2799
- }
2800
- const message = response.message || response.Message || errorCode;
2801
- response.message = message;
2802
- delete response.Message;
2803
- return Promise.reject(Object.assign(new Error(message), response));
2804
- };
2805
-
2806
- const deserializeAws_json1_1InternalExceptionResponse = async (
2807
- parsedOutput: any,
2808
- context: __SerdeContext
2809
- ): Promise<InternalException> => {
2810
- const body = parsedOutput.body;
2811
- const deserialized: any = deserializeAws_json1_1InternalException(body, context);
2812
- const contents: InternalException = {
2813
- name: "InternalException",
2814
- $fault: "server",
2815
- $metadata: deserializeMetadata(parsedOutput),
2816
- ...deserialized,
2817
- };
2818
- return contents;
2819
- };
2820
-
2821
- const deserializeAws_json1_1InvalidRequestExceptionResponse = async (
2822
- parsedOutput: any,
2823
- context: __SerdeContext
2824
- ): Promise<InvalidRequestException> => {
2825
- const body = parsedOutput.body;
2826
- const deserialized: any = deserializeAws_json1_1InvalidRequestException(body, context);
2827
- const contents: InvalidRequestException = {
2828
- name: "InvalidRequestException",
2829
- $fault: "client",
2830
- $metadata: deserializeMetadata(parsedOutput),
2831
- ...deserialized,
2832
- };
2833
- return contents;
2834
- };
2835
-
2836
- const serializeAws_json1_1AgentArnList = (input: string[], context: __SerdeContext): any => {
2837
- return input
2838
- .filter((e: any) => e != null)
2839
- .map((entry) => {
2840
- if (entry === null) {
2841
- return null as any;
2842
- }
2843
- return entry;
2844
- });
2845
- };
2846
-
2847
- const serializeAws_json1_1CancelTaskExecutionRequest = (
2848
- input: CancelTaskExecutionRequest,
2849
- context: __SerdeContext
2850
- ): any => {
2851
- return {
2852
- ...(input.TaskExecutionArn !== undefined &&
2853
- input.TaskExecutionArn !== null && { TaskExecutionArn: input.TaskExecutionArn }),
2854
- };
2855
- };
2856
-
2857
- const serializeAws_json1_1CreateAgentRequest = (input: CreateAgentRequest, context: __SerdeContext): any => {
2858
- return {
2859
- ...(input.ActivationKey !== undefined && input.ActivationKey !== null && { ActivationKey: input.ActivationKey }),
2860
- ...(input.AgentName !== undefined && input.AgentName !== null && { AgentName: input.AgentName }),
2861
- ...(input.SecurityGroupArns !== undefined &&
2862
- input.SecurityGroupArns !== null && {
2863
- SecurityGroupArns: serializeAws_json1_1PLSecurityGroupArnList(input.SecurityGroupArns, context),
2864
- }),
2865
- ...(input.SubnetArns !== undefined &&
2866
- input.SubnetArns !== null && { SubnetArns: serializeAws_json1_1PLSubnetArnList(input.SubnetArns, context) }),
2867
- ...(input.Tags !== undefined &&
2868
- input.Tags !== null && { Tags: serializeAws_json1_1InputTagList(input.Tags, context) }),
2869
- ...(input.VpcEndpointId !== undefined && input.VpcEndpointId !== null && { VpcEndpointId: input.VpcEndpointId }),
2870
- };
2871
- };
2872
-
2873
- const serializeAws_json1_1CreateLocationEfsRequest = (
2874
- input: CreateLocationEfsRequest,
2875
- context: __SerdeContext
2876
- ): any => {
2877
- return {
2878
- ...(input.Ec2Config !== undefined &&
2879
- input.Ec2Config !== null && { Ec2Config: serializeAws_json1_1Ec2Config(input.Ec2Config, context) }),
2880
- ...(input.EfsFilesystemArn !== undefined &&
2881
- input.EfsFilesystemArn !== null && { EfsFilesystemArn: input.EfsFilesystemArn }),
2882
- ...(input.Subdirectory !== undefined && input.Subdirectory !== null && { Subdirectory: input.Subdirectory }),
2883
- ...(input.Tags !== undefined &&
2884
- input.Tags !== null && { Tags: serializeAws_json1_1InputTagList(input.Tags, context) }),
2885
- };
2886
- };
2887
-
2888
- const serializeAws_json1_1CreateLocationFsxWindowsRequest = (
2889
- input: CreateLocationFsxWindowsRequest,
2890
- context: __SerdeContext
2891
- ): any => {
2892
- return {
2893
- ...(input.Domain !== undefined && input.Domain !== null && { Domain: input.Domain }),
2894
- ...(input.FsxFilesystemArn !== undefined &&
2895
- input.FsxFilesystemArn !== null && { FsxFilesystemArn: input.FsxFilesystemArn }),
2896
- ...(input.Password !== undefined && input.Password !== null && { Password: input.Password }),
2897
- ...(input.SecurityGroupArns !== undefined &&
2898
- input.SecurityGroupArns !== null && {
2899
- SecurityGroupArns: serializeAws_json1_1Ec2SecurityGroupArnList(input.SecurityGroupArns, context),
2900
- }),
2901
- ...(input.Subdirectory !== undefined && input.Subdirectory !== null && { Subdirectory: input.Subdirectory }),
2902
- ...(input.Tags !== undefined &&
2903
- input.Tags !== null && { Tags: serializeAws_json1_1InputTagList(input.Tags, context) }),
2904
- ...(input.User !== undefined && input.User !== null && { User: input.User }),
2905
- };
2906
- };
2907
-
2908
- const serializeAws_json1_1CreateLocationNfsRequest = (
2909
- input: CreateLocationNfsRequest,
2910
- context: __SerdeContext
2911
- ): any => {
2912
- return {
2913
- ...(input.MountOptions !== undefined &&
2914
- input.MountOptions !== null && {
2915
- MountOptions: serializeAws_json1_1NfsMountOptions(input.MountOptions, context),
2916
- }),
2917
- ...(input.OnPremConfig !== undefined &&
2918
- input.OnPremConfig !== null && { OnPremConfig: serializeAws_json1_1OnPremConfig(input.OnPremConfig, context) }),
2919
- ...(input.ServerHostname !== undefined &&
2920
- input.ServerHostname !== null && { ServerHostname: input.ServerHostname }),
2921
- ...(input.Subdirectory !== undefined && input.Subdirectory !== null && { Subdirectory: input.Subdirectory }),
2922
- ...(input.Tags !== undefined &&
2923
- input.Tags !== null && { Tags: serializeAws_json1_1InputTagList(input.Tags, context) }),
2924
- };
2925
- };
2926
-
2927
- const serializeAws_json1_1CreateLocationObjectStorageRequest = (
2928
- input: CreateLocationObjectStorageRequest,
2929
- context: __SerdeContext
2930
- ): any => {
2931
- return {
2932
- ...(input.AccessKey !== undefined && input.AccessKey !== null && { AccessKey: input.AccessKey }),
2933
- ...(input.AgentArns !== undefined &&
2934
- input.AgentArns !== null && { AgentArns: serializeAws_json1_1AgentArnList(input.AgentArns, context) }),
2935
- ...(input.BucketName !== undefined && input.BucketName !== null && { BucketName: input.BucketName }),
2936
- ...(input.SecretKey !== undefined && input.SecretKey !== null && { SecretKey: input.SecretKey }),
2937
- ...(input.ServerHostname !== undefined &&
2938
- input.ServerHostname !== null && { ServerHostname: input.ServerHostname }),
2939
- ...(input.ServerPort !== undefined && input.ServerPort !== null && { ServerPort: input.ServerPort }),
2940
- ...(input.ServerProtocol !== undefined &&
2941
- input.ServerProtocol !== null && { ServerProtocol: input.ServerProtocol }),
2942
- ...(input.Subdirectory !== undefined && input.Subdirectory !== null && { Subdirectory: input.Subdirectory }),
2943
- ...(input.Tags !== undefined &&
2944
- input.Tags !== null && { Tags: serializeAws_json1_1InputTagList(input.Tags, context) }),
2945
- };
2946
- };
2947
-
2948
- const serializeAws_json1_1CreateLocationS3Request = (input: CreateLocationS3Request, context: __SerdeContext): any => {
2949
- return {
2950
- ...(input.AgentArns !== undefined &&
2951
- input.AgentArns !== null && { AgentArns: serializeAws_json1_1AgentArnList(input.AgentArns, context) }),
2952
- ...(input.S3BucketArn !== undefined && input.S3BucketArn !== null && { S3BucketArn: input.S3BucketArn }),
2953
- ...(input.S3Config !== undefined &&
2954
- input.S3Config !== null && { S3Config: serializeAws_json1_1S3Config(input.S3Config, context) }),
2955
- ...(input.S3StorageClass !== undefined &&
2956
- input.S3StorageClass !== null && { S3StorageClass: input.S3StorageClass }),
2957
- ...(input.Subdirectory !== undefined && input.Subdirectory !== null && { Subdirectory: input.Subdirectory }),
2958
- ...(input.Tags !== undefined &&
2959
- input.Tags !== null && { Tags: serializeAws_json1_1InputTagList(input.Tags, context) }),
2960
- };
2961
- };
2962
-
2963
- const serializeAws_json1_1CreateLocationSmbRequest = (
2964
- input: CreateLocationSmbRequest,
2965
- context: __SerdeContext
2966
- ): any => {
2967
- return {
2968
- ...(input.AgentArns !== undefined &&
2969
- input.AgentArns !== null && { AgentArns: serializeAws_json1_1AgentArnList(input.AgentArns, context) }),
2970
- ...(input.Domain !== undefined && input.Domain !== null && { Domain: input.Domain }),
2971
- ...(input.MountOptions !== undefined &&
2972
- input.MountOptions !== null && {
2973
- MountOptions: serializeAws_json1_1SmbMountOptions(input.MountOptions, context),
2974
- }),
2975
- ...(input.Password !== undefined && input.Password !== null && { Password: input.Password }),
2976
- ...(input.ServerHostname !== undefined &&
2977
- input.ServerHostname !== null && { ServerHostname: input.ServerHostname }),
2978
- ...(input.Subdirectory !== undefined && input.Subdirectory !== null && { Subdirectory: input.Subdirectory }),
2979
- ...(input.Tags !== undefined &&
2980
- input.Tags !== null && { Tags: serializeAws_json1_1InputTagList(input.Tags, context) }),
2981
- ...(input.User !== undefined && input.User !== null && { User: input.User }),
2982
- };
2983
- };
2984
-
2985
- const serializeAws_json1_1CreateTaskRequest = (input: CreateTaskRequest, context: __SerdeContext): any => {
2986
- return {
2987
- ...(input.CloudWatchLogGroupArn !== undefined &&
2988
- input.CloudWatchLogGroupArn !== null && { CloudWatchLogGroupArn: input.CloudWatchLogGroupArn }),
2989
- ...(input.DestinationLocationArn !== undefined &&
2990
- input.DestinationLocationArn !== null && { DestinationLocationArn: input.DestinationLocationArn }),
2991
- ...(input.Excludes !== undefined &&
2992
- input.Excludes !== null && { Excludes: serializeAws_json1_1FilterList(input.Excludes, context) }),
2993
- ...(input.Includes !== undefined &&
2994
- input.Includes !== null && { Includes: serializeAws_json1_1FilterList(input.Includes, context) }),
2995
- ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
2996
- ...(input.Options !== undefined &&
2997
- input.Options !== null && { Options: serializeAws_json1_1Options(input.Options, context) }),
2998
- ...(input.Schedule !== undefined &&
2999
- input.Schedule !== null && { Schedule: serializeAws_json1_1TaskSchedule(input.Schedule, context) }),
3000
- ...(input.SourceLocationArn !== undefined &&
3001
- input.SourceLocationArn !== null && { SourceLocationArn: input.SourceLocationArn }),
3002
- ...(input.Tags !== undefined &&
3003
- input.Tags !== null && { Tags: serializeAws_json1_1InputTagList(input.Tags, context) }),
3004
- };
3005
- };
3006
-
3007
- const serializeAws_json1_1DeleteAgentRequest = (input: DeleteAgentRequest, context: __SerdeContext): any => {
3008
- return {
3009
- ...(input.AgentArn !== undefined && input.AgentArn !== null && { AgentArn: input.AgentArn }),
3010
- };
3011
- };
3012
-
3013
- const serializeAws_json1_1DeleteLocationRequest = (input: DeleteLocationRequest, context: __SerdeContext): any => {
3014
- return {
3015
- ...(input.LocationArn !== undefined && input.LocationArn !== null && { LocationArn: input.LocationArn }),
3016
- };
3017
- };
3018
-
3019
- const serializeAws_json1_1DeleteTaskRequest = (input: DeleteTaskRequest, context: __SerdeContext): any => {
3020
- return {
3021
- ...(input.TaskArn !== undefined && input.TaskArn !== null && { TaskArn: input.TaskArn }),
3022
- };
3023
- };
3024
-
3025
- const serializeAws_json1_1DescribeAgentRequest = (input: DescribeAgentRequest, context: __SerdeContext): any => {
3026
- return {
3027
- ...(input.AgentArn !== undefined && input.AgentArn !== null && { AgentArn: input.AgentArn }),
3028
- };
3029
- };
3030
-
3031
- const serializeAws_json1_1DescribeLocationEfsRequest = (
3032
- input: DescribeLocationEfsRequest,
3033
- context: __SerdeContext
3034
- ): any => {
3035
- return {
3036
- ...(input.LocationArn !== undefined && input.LocationArn !== null && { LocationArn: input.LocationArn }),
3037
- };
3038
- };
3039
-
3040
- const serializeAws_json1_1DescribeLocationFsxWindowsRequest = (
3041
- input: DescribeLocationFsxWindowsRequest,
3042
- context: __SerdeContext
3043
- ): any => {
3044
- return {
3045
- ...(input.LocationArn !== undefined && input.LocationArn !== null && { LocationArn: input.LocationArn }),
3046
- };
3047
- };
3048
-
3049
- const serializeAws_json1_1DescribeLocationNfsRequest = (
3050
- input: DescribeLocationNfsRequest,
3051
- context: __SerdeContext
3052
- ): any => {
3053
- return {
3054
- ...(input.LocationArn !== undefined && input.LocationArn !== null && { LocationArn: input.LocationArn }),
3055
- };
3056
- };
3057
-
3058
- const serializeAws_json1_1DescribeLocationObjectStorageRequest = (
3059
- input: DescribeLocationObjectStorageRequest,
3060
- context: __SerdeContext
3061
- ): any => {
3062
- return {
3063
- ...(input.LocationArn !== undefined && input.LocationArn !== null && { LocationArn: input.LocationArn }),
3064
- };
3065
- };
3066
-
3067
- const serializeAws_json1_1DescribeLocationS3Request = (
3068
- input: DescribeLocationS3Request,
3069
- context: __SerdeContext
3070
- ): any => {
3071
- return {
3072
- ...(input.LocationArn !== undefined && input.LocationArn !== null && { LocationArn: input.LocationArn }),
3073
- };
3074
- };
3075
-
3076
- const serializeAws_json1_1DescribeLocationSmbRequest = (
3077
- input: DescribeLocationSmbRequest,
3078
- context: __SerdeContext
3079
- ): any => {
3080
- return {
3081
- ...(input.LocationArn !== undefined && input.LocationArn !== null && { LocationArn: input.LocationArn }),
3082
- };
3083
- };
3084
-
3085
- const serializeAws_json1_1DescribeTaskExecutionRequest = (
3086
- input: DescribeTaskExecutionRequest,
3087
- context: __SerdeContext
3088
- ): any => {
3089
- return {
3090
- ...(input.TaskExecutionArn !== undefined &&
3091
- input.TaskExecutionArn !== null && { TaskExecutionArn: input.TaskExecutionArn }),
3092
- };
3093
- };
3094
-
3095
- const serializeAws_json1_1DescribeTaskRequest = (input: DescribeTaskRequest, context: __SerdeContext): any => {
3096
- return {
3097
- ...(input.TaskArn !== undefined && input.TaskArn !== null && { TaskArn: input.TaskArn }),
3098
- };
3099
- };
3100
-
3101
- const serializeAws_json1_1Ec2Config = (input: Ec2Config, context: __SerdeContext): any => {
3102
- return {
3103
- ...(input.SecurityGroupArns !== undefined &&
3104
- input.SecurityGroupArns !== null && {
3105
- SecurityGroupArns: serializeAws_json1_1Ec2SecurityGroupArnList(input.SecurityGroupArns, context),
3106
- }),
3107
- ...(input.SubnetArn !== undefined && input.SubnetArn !== null && { SubnetArn: input.SubnetArn }),
3108
- };
3109
- };
3110
-
3111
- const serializeAws_json1_1Ec2SecurityGroupArnList = (input: string[], context: __SerdeContext): any => {
3112
- return input
3113
- .filter((e: any) => e != null)
3114
- .map((entry) => {
3115
- if (entry === null) {
3116
- return null as any;
3117
- }
3118
- return entry;
3119
- });
3120
- };
3121
-
3122
- const serializeAws_json1_1FilterList = (input: FilterRule[], context: __SerdeContext): any => {
3123
- return input
3124
- .filter((e: any) => e != null)
3125
- .map((entry) => {
3126
- if (entry === null) {
3127
- return null as any;
3128
- }
3129
- return serializeAws_json1_1FilterRule(entry, context);
3130
- });
3131
- };
3132
-
3133
- const serializeAws_json1_1FilterRule = (input: FilterRule, context: __SerdeContext): any => {
3134
- return {
3135
- ...(input.FilterType !== undefined && input.FilterType !== null && { FilterType: input.FilterType }),
3136
- ...(input.Value !== undefined && input.Value !== null && { Value: input.Value }),
3137
- };
3138
- };
3139
-
3140
- const serializeAws_json1_1FilterValues = (input: string[], context: __SerdeContext): any => {
3141
- return input
3142
- .filter((e: any) => e != null)
3143
- .map((entry) => {
3144
- if (entry === null) {
3145
- return null as any;
3146
- }
3147
- return entry;
3148
- });
3149
- };
3150
-
3151
- const serializeAws_json1_1InputTagList = (input: TagListEntry[], context: __SerdeContext): any => {
3152
- return input
3153
- .filter((e: any) => e != null)
3154
- .map((entry) => {
3155
- if (entry === null) {
3156
- return null as any;
3157
- }
3158
- return serializeAws_json1_1TagListEntry(entry, context);
3159
- });
3160
- };
3161
-
3162
- const serializeAws_json1_1ListAgentsRequest = (input: ListAgentsRequest, context: __SerdeContext): any => {
3163
- return {
3164
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
3165
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
3166
- };
3167
- };
3168
-
3169
- const serializeAws_json1_1ListLocationsRequest = (input: ListLocationsRequest, context: __SerdeContext): any => {
3170
- return {
3171
- ...(input.Filters !== undefined &&
3172
- input.Filters !== null && { Filters: serializeAws_json1_1LocationFilters(input.Filters, context) }),
3173
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
3174
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
3175
- };
3176
- };
3177
-
3178
- const serializeAws_json1_1ListTagsForResourceRequest = (
3179
- input: ListTagsForResourceRequest,
3180
- context: __SerdeContext
3181
- ): any => {
3182
- return {
3183
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
3184
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
3185
- ...(input.ResourceArn !== undefined && input.ResourceArn !== null && { ResourceArn: input.ResourceArn }),
3186
- };
3187
- };
3188
-
3189
- const serializeAws_json1_1ListTaskExecutionsRequest = (
3190
- input: ListTaskExecutionsRequest,
3191
- context: __SerdeContext
3192
- ): any => {
3193
- return {
3194
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
3195
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
3196
- ...(input.TaskArn !== undefined && input.TaskArn !== null && { TaskArn: input.TaskArn }),
3197
- };
3198
- };
3199
-
3200
- const serializeAws_json1_1ListTasksRequest = (input: ListTasksRequest, context: __SerdeContext): any => {
3201
- return {
3202
- ...(input.Filters !== undefined &&
3203
- input.Filters !== null && { Filters: serializeAws_json1_1TaskFilters(input.Filters, context) }),
3204
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
3205
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
3206
- };
3207
- };
3208
-
3209
- const serializeAws_json1_1LocationFilter = (input: LocationFilter, context: __SerdeContext): any => {
3210
- return {
3211
- ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
3212
- ...(input.Operator !== undefined && input.Operator !== null && { Operator: input.Operator }),
3213
- ...(input.Values !== undefined &&
3214
- input.Values !== null && { Values: serializeAws_json1_1FilterValues(input.Values, context) }),
3215
- };
3216
- };
3217
-
3218
- const serializeAws_json1_1LocationFilters = (input: LocationFilter[], context: __SerdeContext): any => {
3219
- return input
3220
- .filter((e: any) => e != null)
3221
- .map((entry) => {
3222
- if (entry === null) {
3223
- return null as any;
3224
- }
3225
- return serializeAws_json1_1LocationFilter(entry, context);
3226
- });
3227
- };
3228
-
3229
- const serializeAws_json1_1NfsMountOptions = (input: NfsMountOptions, context: __SerdeContext): any => {
3230
- return {
3231
- ...(input.Version !== undefined && input.Version !== null && { Version: input.Version }),
3232
- };
3233
- };
3234
-
3235
- const serializeAws_json1_1OnPremConfig = (input: OnPremConfig, context: __SerdeContext): any => {
3236
- return {
3237
- ...(input.AgentArns !== undefined &&
3238
- input.AgentArns !== null && { AgentArns: serializeAws_json1_1AgentArnList(input.AgentArns, context) }),
3239
- };
3240
- };
3241
-
3242
- const serializeAws_json1_1Options = (input: Options, context: __SerdeContext): any => {
3243
- return {
3244
- ...(input.Atime !== undefined && input.Atime !== null && { Atime: input.Atime }),
3245
- ...(input.BytesPerSecond !== undefined &&
3246
- input.BytesPerSecond !== null && { BytesPerSecond: input.BytesPerSecond }),
3247
- ...(input.Gid !== undefined && input.Gid !== null && { Gid: input.Gid }),
3248
- ...(input.LogLevel !== undefined && input.LogLevel !== null && { LogLevel: input.LogLevel }),
3249
- ...(input.Mtime !== undefined && input.Mtime !== null && { Mtime: input.Mtime }),
3250
- ...(input.OverwriteMode !== undefined && input.OverwriteMode !== null && { OverwriteMode: input.OverwriteMode }),
3251
- ...(input.PosixPermissions !== undefined &&
3252
- input.PosixPermissions !== null && { PosixPermissions: input.PosixPermissions }),
3253
- ...(input.PreserveDeletedFiles !== undefined &&
3254
- input.PreserveDeletedFiles !== null && { PreserveDeletedFiles: input.PreserveDeletedFiles }),
3255
- ...(input.PreserveDevices !== undefined &&
3256
- input.PreserveDevices !== null && { PreserveDevices: input.PreserveDevices }),
3257
- ...(input.SecurityDescriptorCopyFlags !== undefined &&
3258
- input.SecurityDescriptorCopyFlags !== null && { SecurityDescriptorCopyFlags: input.SecurityDescriptorCopyFlags }),
3259
- ...(input.TaskQueueing !== undefined && input.TaskQueueing !== null && { TaskQueueing: input.TaskQueueing }),
3260
- ...(input.TransferMode !== undefined && input.TransferMode !== null && { TransferMode: input.TransferMode }),
3261
- ...(input.Uid !== undefined && input.Uid !== null && { Uid: input.Uid }),
3262
- ...(input.VerifyMode !== undefined && input.VerifyMode !== null && { VerifyMode: input.VerifyMode }),
3263
- };
3264
- };
3265
-
3266
- const serializeAws_json1_1PLSecurityGroupArnList = (input: string[], context: __SerdeContext): any => {
3267
- return input
3268
- .filter((e: any) => e != null)
3269
- .map((entry) => {
3270
- if (entry === null) {
3271
- return null as any;
3272
- }
3273
- return entry;
3274
- });
3275
- };
3276
-
3277
- const serializeAws_json1_1PLSubnetArnList = (input: string[], context: __SerdeContext): any => {
3278
- return input
3279
- .filter((e: any) => e != null)
3280
- .map((entry) => {
3281
- if (entry === null) {
3282
- return null as any;
3283
- }
3284
- return entry;
3285
- });
3286
- };
3287
-
3288
- const serializeAws_json1_1S3Config = (input: S3Config, context: __SerdeContext): any => {
3289
- return {
3290
- ...(input.BucketAccessRoleArn !== undefined &&
3291
- input.BucketAccessRoleArn !== null && { BucketAccessRoleArn: input.BucketAccessRoleArn }),
3292
- };
3293
- };
3294
-
3295
- const serializeAws_json1_1SmbMountOptions = (input: SmbMountOptions, context: __SerdeContext): any => {
3296
- return {
3297
- ...(input.Version !== undefined && input.Version !== null && { Version: input.Version }),
3298
- };
3299
- };
3300
-
3301
- const serializeAws_json1_1StartTaskExecutionRequest = (
3302
- input: StartTaskExecutionRequest,
3303
- context: __SerdeContext
3304
- ): any => {
3305
- return {
3306
- ...(input.Excludes !== undefined &&
3307
- input.Excludes !== null && { Excludes: serializeAws_json1_1FilterList(input.Excludes, context) }),
3308
- ...(input.Includes !== undefined &&
3309
- input.Includes !== null && { Includes: serializeAws_json1_1FilterList(input.Includes, context) }),
3310
- ...(input.OverrideOptions !== undefined &&
3311
- input.OverrideOptions !== null && {
3312
- OverrideOptions: serializeAws_json1_1Options(input.OverrideOptions, context),
3313
- }),
3314
- ...(input.TaskArn !== undefined && input.TaskArn !== null && { TaskArn: input.TaskArn }),
3315
- };
3316
- };
3317
-
3318
- const serializeAws_json1_1TagKeyList = (input: string[], context: __SerdeContext): any => {
3319
- return input
3320
- .filter((e: any) => e != null)
3321
- .map((entry) => {
3322
- if (entry === null) {
3323
- return null as any;
3324
- }
3325
- return entry;
3326
- });
3327
- };
3328
-
3329
- const serializeAws_json1_1TagListEntry = (input: TagListEntry, context: __SerdeContext): any => {
3330
- return {
3331
- ...(input.Key !== undefined && input.Key !== null && { Key: input.Key }),
3332
- ...(input.Value !== undefined && input.Value !== null && { Value: input.Value }),
3333
- };
3334
- };
3335
-
3336
- const serializeAws_json1_1TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => {
3337
- return {
3338
- ...(input.ResourceArn !== undefined && input.ResourceArn !== null && { ResourceArn: input.ResourceArn }),
3339
- ...(input.Tags !== undefined &&
3340
- input.Tags !== null && { Tags: serializeAws_json1_1InputTagList(input.Tags, context) }),
3341
- };
3342
- };
3343
-
3344
- const serializeAws_json1_1TaskFilter = (input: TaskFilter, context: __SerdeContext): any => {
3345
- return {
3346
- ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
3347
- ...(input.Operator !== undefined && input.Operator !== null && { Operator: input.Operator }),
3348
- ...(input.Values !== undefined &&
3349
- input.Values !== null && { Values: serializeAws_json1_1FilterValues(input.Values, context) }),
3350
- };
3351
- };
3352
-
3353
- const serializeAws_json1_1TaskFilters = (input: TaskFilter[], context: __SerdeContext): any => {
3354
- return input
3355
- .filter((e: any) => e != null)
3356
- .map((entry) => {
3357
- if (entry === null) {
3358
- return null as any;
3359
- }
3360
- return serializeAws_json1_1TaskFilter(entry, context);
3361
- });
3362
- };
3363
-
3364
- const serializeAws_json1_1TaskSchedule = (input: TaskSchedule, context: __SerdeContext): any => {
3365
- return {
3366
- ...(input.ScheduleExpression !== undefined &&
3367
- input.ScheduleExpression !== null && { ScheduleExpression: input.ScheduleExpression }),
3368
- };
3369
- };
3370
-
3371
- const serializeAws_json1_1UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => {
3372
- return {
3373
- ...(input.Keys !== undefined &&
3374
- input.Keys !== null && { Keys: serializeAws_json1_1TagKeyList(input.Keys, context) }),
3375
- ...(input.ResourceArn !== undefined && input.ResourceArn !== null && { ResourceArn: input.ResourceArn }),
3376
- };
3377
- };
3378
-
3379
- const serializeAws_json1_1UpdateAgentRequest = (input: UpdateAgentRequest, context: __SerdeContext): any => {
3380
- return {
3381
- ...(input.AgentArn !== undefined && input.AgentArn !== null && { AgentArn: input.AgentArn }),
3382
- ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
3383
- };
3384
- };
3385
-
3386
- const serializeAws_json1_1UpdateLocationNfsRequest = (
3387
- input: UpdateLocationNfsRequest,
3388
- context: __SerdeContext
3389
- ): any => {
3390
- return {
3391
- ...(input.LocationArn !== undefined && input.LocationArn !== null && { LocationArn: input.LocationArn }),
3392
- ...(input.MountOptions !== undefined &&
3393
- input.MountOptions !== null && {
3394
- MountOptions: serializeAws_json1_1NfsMountOptions(input.MountOptions, context),
3395
- }),
3396
- ...(input.OnPremConfig !== undefined &&
3397
- input.OnPremConfig !== null && { OnPremConfig: serializeAws_json1_1OnPremConfig(input.OnPremConfig, context) }),
3398
- ...(input.Subdirectory !== undefined && input.Subdirectory !== null && { Subdirectory: input.Subdirectory }),
3399
- };
3400
- };
3401
-
3402
- const serializeAws_json1_1UpdateLocationObjectStorageRequest = (
3403
- input: UpdateLocationObjectStorageRequest,
3404
- context: __SerdeContext
3405
- ): any => {
3406
- return {
3407
- ...(input.AccessKey !== undefined && input.AccessKey !== null && { AccessKey: input.AccessKey }),
3408
- ...(input.AgentArns !== undefined &&
3409
- input.AgentArns !== null && { AgentArns: serializeAws_json1_1AgentArnList(input.AgentArns, context) }),
3410
- ...(input.LocationArn !== undefined && input.LocationArn !== null && { LocationArn: input.LocationArn }),
3411
- ...(input.SecretKey !== undefined && input.SecretKey !== null && { SecretKey: input.SecretKey }),
3412
- ...(input.ServerPort !== undefined && input.ServerPort !== null && { ServerPort: input.ServerPort }),
3413
- ...(input.ServerProtocol !== undefined &&
3414
- input.ServerProtocol !== null && { ServerProtocol: input.ServerProtocol }),
3415
- ...(input.Subdirectory !== undefined && input.Subdirectory !== null && { Subdirectory: input.Subdirectory }),
3416
- };
3417
- };
3418
-
3419
- const serializeAws_json1_1UpdateLocationSmbRequest = (
3420
- input: UpdateLocationSmbRequest,
3421
- context: __SerdeContext
3422
- ): any => {
3423
- return {
3424
- ...(input.AgentArns !== undefined &&
3425
- input.AgentArns !== null && { AgentArns: serializeAws_json1_1AgentArnList(input.AgentArns, context) }),
3426
- ...(input.Domain !== undefined && input.Domain !== null && { Domain: input.Domain }),
3427
- ...(input.LocationArn !== undefined && input.LocationArn !== null && { LocationArn: input.LocationArn }),
3428
- ...(input.MountOptions !== undefined &&
3429
- input.MountOptions !== null && {
3430
- MountOptions: serializeAws_json1_1SmbMountOptions(input.MountOptions, context),
3431
- }),
3432
- ...(input.Password !== undefined && input.Password !== null && { Password: input.Password }),
3433
- ...(input.Subdirectory !== undefined && input.Subdirectory !== null && { Subdirectory: input.Subdirectory }),
3434
- ...(input.User !== undefined && input.User !== null && { User: input.User }),
3435
- };
3436
- };
3437
-
3438
- const serializeAws_json1_1UpdateTaskExecutionRequest = (
3439
- input: UpdateTaskExecutionRequest,
3440
- context: __SerdeContext
3441
- ): any => {
3442
- return {
3443
- ...(input.Options !== undefined &&
3444
- input.Options !== null && { Options: serializeAws_json1_1Options(input.Options, context) }),
3445
- ...(input.TaskExecutionArn !== undefined &&
3446
- input.TaskExecutionArn !== null && { TaskExecutionArn: input.TaskExecutionArn }),
3447
- };
3448
- };
3449
-
3450
- const serializeAws_json1_1UpdateTaskRequest = (input: UpdateTaskRequest, context: __SerdeContext): any => {
3451
- return {
3452
- ...(input.CloudWatchLogGroupArn !== undefined &&
3453
- input.CloudWatchLogGroupArn !== null && { CloudWatchLogGroupArn: input.CloudWatchLogGroupArn }),
3454
- ...(input.Excludes !== undefined &&
3455
- input.Excludes !== null && { Excludes: serializeAws_json1_1FilterList(input.Excludes, context) }),
3456
- ...(input.Includes !== undefined &&
3457
- input.Includes !== null && { Includes: serializeAws_json1_1FilterList(input.Includes, context) }),
3458
- ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
3459
- ...(input.Options !== undefined &&
3460
- input.Options !== null && { Options: serializeAws_json1_1Options(input.Options, context) }),
3461
- ...(input.Schedule !== undefined &&
3462
- input.Schedule !== null && { Schedule: serializeAws_json1_1TaskSchedule(input.Schedule, context) }),
3463
- ...(input.TaskArn !== undefined && input.TaskArn !== null && { TaskArn: input.TaskArn }),
3464
- };
3465
- };
3466
-
3467
- const deserializeAws_json1_1AgentArnList = (output: any, context: __SerdeContext): string[] => {
3468
- return (output || [])
3469
- .filter((e: any) => e != null)
3470
- .map((entry: any) => {
3471
- if (entry === null) {
3472
- return null as any;
3473
- }
3474
- return __expectString(entry) as any;
3475
- });
3476
- };
3477
-
3478
- const deserializeAws_json1_1AgentList = (output: any, context: __SerdeContext): AgentListEntry[] => {
3479
- return (output || [])
3480
- .filter((e: any) => e != null)
3481
- .map((entry: any) => {
3482
- if (entry === null) {
3483
- return null as any;
3484
- }
3485
- return deserializeAws_json1_1AgentListEntry(entry, context);
3486
- });
3487
- };
3488
-
3489
- const deserializeAws_json1_1AgentListEntry = (output: any, context: __SerdeContext): AgentListEntry => {
3490
- return {
3491
- AgentArn: __expectString(output.AgentArn),
3492
- Name: __expectString(output.Name),
3493
- Status: __expectString(output.Status),
3494
- } as any;
3495
- };
3496
-
3497
- const deserializeAws_json1_1CancelTaskExecutionResponse = (
3498
- output: any,
3499
- context: __SerdeContext
3500
- ): CancelTaskExecutionResponse => {
3501
- return {} as any;
3502
- };
3503
-
3504
- const deserializeAws_json1_1CreateAgentResponse = (output: any, context: __SerdeContext): CreateAgentResponse => {
3505
- return {
3506
- AgentArn: __expectString(output.AgentArn),
3507
- } as any;
3508
- };
3509
-
3510
- const deserializeAws_json1_1CreateLocationEfsResponse = (
3511
- output: any,
3512
- context: __SerdeContext
3513
- ): CreateLocationEfsResponse => {
3514
- return {
3515
- LocationArn: __expectString(output.LocationArn),
3516
- } as any;
3517
- };
3518
-
3519
- const deserializeAws_json1_1CreateLocationFsxWindowsResponse = (
3520
- output: any,
3521
- context: __SerdeContext
3522
- ): CreateLocationFsxWindowsResponse => {
3523
- return {
3524
- LocationArn: __expectString(output.LocationArn),
3525
- } as any;
3526
- };
3527
-
3528
- const deserializeAws_json1_1CreateLocationNfsResponse = (
3529
- output: any,
3530
- context: __SerdeContext
3531
- ): CreateLocationNfsResponse => {
3532
- return {
3533
- LocationArn: __expectString(output.LocationArn),
3534
- } as any;
3535
- };
3536
-
3537
- const deserializeAws_json1_1CreateLocationObjectStorageResponse = (
3538
- output: any,
3539
- context: __SerdeContext
3540
- ): CreateLocationObjectStorageResponse => {
3541
- return {
3542
- LocationArn: __expectString(output.LocationArn),
3543
- } as any;
3544
- };
3545
-
3546
- const deserializeAws_json1_1CreateLocationS3Response = (
3547
- output: any,
3548
- context: __SerdeContext
3549
- ): CreateLocationS3Response => {
3550
- return {
3551
- LocationArn: __expectString(output.LocationArn),
3552
- } as any;
3553
- };
3554
-
3555
- const deserializeAws_json1_1CreateLocationSmbResponse = (
3556
- output: any,
3557
- context: __SerdeContext
3558
- ): CreateLocationSmbResponse => {
3559
- return {
3560
- LocationArn: __expectString(output.LocationArn),
3561
- } as any;
3562
- };
3563
-
3564
- const deserializeAws_json1_1CreateTaskResponse = (output: any, context: __SerdeContext): CreateTaskResponse => {
3565
- return {
3566
- TaskArn: __expectString(output.TaskArn),
3567
- } as any;
3568
- };
3569
-
3570
- const deserializeAws_json1_1DeleteAgentResponse = (output: any, context: __SerdeContext): DeleteAgentResponse => {
3571
- return {} as any;
3572
- };
3573
-
3574
- const deserializeAws_json1_1DeleteLocationResponse = (output: any, context: __SerdeContext): DeleteLocationResponse => {
3575
- return {} as any;
3576
- };
3577
-
3578
- const deserializeAws_json1_1DeleteTaskResponse = (output: any, context: __SerdeContext): DeleteTaskResponse => {
3579
- return {} as any;
3580
- };
3581
-
3582
- const deserializeAws_json1_1DescribeAgentResponse = (output: any, context: __SerdeContext): DescribeAgentResponse => {
3583
- return {
3584
- AgentArn: __expectString(output.AgentArn),
3585
- CreationTime:
3586
- output.CreationTime !== undefined && output.CreationTime !== null
3587
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime)))
3588
- : undefined,
3589
- EndpointType: __expectString(output.EndpointType),
3590
- LastConnectionTime:
3591
- output.LastConnectionTime !== undefined && output.LastConnectionTime !== null
3592
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastConnectionTime)))
3593
- : undefined,
3594
- Name: __expectString(output.Name),
3595
- PrivateLinkConfig:
3596
- output.PrivateLinkConfig !== undefined && output.PrivateLinkConfig !== null
3597
- ? deserializeAws_json1_1PrivateLinkConfig(output.PrivateLinkConfig, context)
3598
- : undefined,
3599
- Status: __expectString(output.Status),
3600
- } as any;
3601
- };
3602
-
3603
- const deserializeAws_json1_1DescribeLocationEfsResponse = (
3604
- output: any,
3605
- context: __SerdeContext
3606
- ): DescribeLocationEfsResponse => {
3607
- return {
3608
- CreationTime:
3609
- output.CreationTime !== undefined && output.CreationTime !== null
3610
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime)))
3611
- : undefined,
3612
- Ec2Config:
3613
- output.Ec2Config !== undefined && output.Ec2Config !== null
3614
- ? deserializeAws_json1_1Ec2Config(output.Ec2Config, context)
3615
- : undefined,
3616
- LocationArn: __expectString(output.LocationArn),
3617
- LocationUri: __expectString(output.LocationUri),
3618
- } as any;
3619
- };
3620
-
3621
- const deserializeAws_json1_1DescribeLocationFsxWindowsResponse = (
3622
- output: any,
3623
- context: __SerdeContext
3624
- ): DescribeLocationFsxWindowsResponse => {
3625
- return {
3626
- CreationTime:
3627
- output.CreationTime !== undefined && output.CreationTime !== null
3628
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime)))
3629
- : undefined,
3630
- Domain: __expectString(output.Domain),
3631
- LocationArn: __expectString(output.LocationArn),
3632
- LocationUri: __expectString(output.LocationUri),
3633
- SecurityGroupArns:
3634
- output.SecurityGroupArns !== undefined && output.SecurityGroupArns !== null
3635
- ? deserializeAws_json1_1Ec2SecurityGroupArnList(output.SecurityGroupArns, context)
3636
- : undefined,
3637
- User: __expectString(output.User),
3638
- } as any;
3639
- };
3640
-
3641
- const deserializeAws_json1_1DescribeLocationNfsResponse = (
3642
- output: any,
3643
- context: __SerdeContext
3644
- ): DescribeLocationNfsResponse => {
3645
- return {
3646
- CreationTime:
3647
- output.CreationTime !== undefined && output.CreationTime !== null
3648
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime)))
3649
- : undefined,
3650
- LocationArn: __expectString(output.LocationArn),
3651
- LocationUri: __expectString(output.LocationUri),
3652
- MountOptions:
3653
- output.MountOptions !== undefined && output.MountOptions !== null
3654
- ? deserializeAws_json1_1NfsMountOptions(output.MountOptions, context)
3655
- : undefined,
3656
- OnPremConfig:
3657
- output.OnPremConfig !== undefined && output.OnPremConfig !== null
3658
- ? deserializeAws_json1_1OnPremConfig(output.OnPremConfig, context)
3659
- : undefined,
3660
- } as any;
3661
- };
3662
-
3663
- const deserializeAws_json1_1DescribeLocationObjectStorageResponse = (
3664
- output: any,
3665
- context: __SerdeContext
3666
- ): DescribeLocationObjectStorageResponse => {
3667
- return {
3668
- AccessKey: __expectString(output.AccessKey),
3669
- AgentArns:
3670
- output.AgentArns !== undefined && output.AgentArns !== null
3671
- ? deserializeAws_json1_1AgentArnList(output.AgentArns, context)
3672
- : undefined,
3673
- CreationTime:
3674
- output.CreationTime !== undefined && output.CreationTime !== null
3675
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime)))
3676
- : undefined,
3677
- LocationArn: __expectString(output.LocationArn),
3678
- LocationUri: __expectString(output.LocationUri),
3679
- ServerPort: __expectInt32(output.ServerPort),
3680
- ServerProtocol: __expectString(output.ServerProtocol),
3681
- } as any;
3682
- };
3683
-
3684
- const deserializeAws_json1_1DescribeLocationS3Response = (
3685
- output: any,
3686
- context: __SerdeContext
3687
- ): DescribeLocationS3Response => {
3688
- return {
3689
- AgentArns:
3690
- output.AgentArns !== undefined && output.AgentArns !== null
3691
- ? deserializeAws_json1_1AgentArnList(output.AgentArns, context)
3692
- : undefined,
3693
- CreationTime:
3694
- output.CreationTime !== undefined && output.CreationTime !== null
3695
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime)))
3696
- : undefined,
3697
- LocationArn: __expectString(output.LocationArn),
3698
- LocationUri: __expectString(output.LocationUri),
3699
- S3Config:
3700
- output.S3Config !== undefined && output.S3Config !== null
3701
- ? deserializeAws_json1_1S3Config(output.S3Config, context)
3702
- : undefined,
3703
- S3StorageClass: __expectString(output.S3StorageClass),
3704
- } as any;
3705
- };
3706
-
3707
- const deserializeAws_json1_1DescribeLocationSmbResponse = (
3708
- output: any,
3709
- context: __SerdeContext
3710
- ): DescribeLocationSmbResponse => {
3711
- return {
3712
- AgentArns:
3713
- output.AgentArns !== undefined && output.AgentArns !== null
3714
- ? deserializeAws_json1_1AgentArnList(output.AgentArns, context)
3715
- : undefined,
3716
- CreationTime:
3717
- output.CreationTime !== undefined && output.CreationTime !== null
3718
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime)))
3719
- : undefined,
3720
- Domain: __expectString(output.Domain),
3721
- LocationArn: __expectString(output.LocationArn),
3722
- LocationUri: __expectString(output.LocationUri),
3723
- MountOptions:
3724
- output.MountOptions !== undefined && output.MountOptions !== null
3725
- ? deserializeAws_json1_1SmbMountOptions(output.MountOptions, context)
3726
- : undefined,
3727
- User: __expectString(output.User),
3728
- } as any;
3729
- };
3730
-
3731
- const deserializeAws_json1_1DescribeTaskExecutionResponse = (
3732
- output: any,
3733
- context: __SerdeContext
3734
- ): DescribeTaskExecutionResponse => {
3735
- return {
3736
- BytesTransferred: __expectLong(output.BytesTransferred),
3737
- BytesWritten: __expectLong(output.BytesWritten),
3738
- EstimatedBytesToTransfer: __expectLong(output.EstimatedBytesToTransfer),
3739
- EstimatedFilesToTransfer: __expectLong(output.EstimatedFilesToTransfer),
3740
- Excludes:
3741
- output.Excludes !== undefined && output.Excludes !== null
3742
- ? deserializeAws_json1_1FilterList(output.Excludes, context)
3743
- : undefined,
3744
- FilesTransferred: __expectLong(output.FilesTransferred),
3745
- Includes:
3746
- output.Includes !== undefined && output.Includes !== null
3747
- ? deserializeAws_json1_1FilterList(output.Includes, context)
3748
- : undefined,
3749
- Options:
3750
- output.Options !== undefined && output.Options !== null
3751
- ? deserializeAws_json1_1Options(output.Options, context)
3752
- : undefined,
3753
- Result:
3754
- output.Result !== undefined && output.Result !== null
3755
- ? deserializeAws_json1_1TaskExecutionResultDetail(output.Result, context)
3756
- : undefined,
3757
- StartTime:
3758
- output.StartTime !== undefined && output.StartTime !== null
3759
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime)))
3760
- : undefined,
3761
- Status: __expectString(output.Status),
3762
- TaskExecutionArn: __expectString(output.TaskExecutionArn),
3763
- } as any;
3764
- };
3765
-
3766
- const deserializeAws_json1_1DescribeTaskResponse = (output: any, context: __SerdeContext): DescribeTaskResponse => {
3767
- return {
3768
- CloudWatchLogGroupArn: __expectString(output.CloudWatchLogGroupArn),
3769
- CreationTime:
3770
- output.CreationTime !== undefined && output.CreationTime !== null
3771
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime)))
3772
- : undefined,
3773
- CurrentTaskExecutionArn: __expectString(output.CurrentTaskExecutionArn),
3774
- DestinationLocationArn: __expectString(output.DestinationLocationArn),
3775
- DestinationNetworkInterfaceArns:
3776
- output.DestinationNetworkInterfaceArns !== undefined && output.DestinationNetworkInterfaceArns !== null
3777
- ? deserializeAws_json1_1DestinationNetworkInterfaceArns(output.DestinationNetworkInterfaceArns, context)
3778
- : undefined,
3779
- ErrorCode: __expectString(output.ErrorCode),
3780
- ErrorDetail: __expectString(output.ErrorDetail),
3781
- Excludes:
3782
- output.Excludes !== undefined && output.Excludes !== null
3783
- ? deserializeAws_json1_1FilterList(output.Excludes, context)
3784
- : undefined,
3785
- Includes:
3786
- output.Includes !== undefined && output.Includes !== null
3787
- ? deserializeAws_json1_1FilterList(output.Includes, context)
3788
- : undefined,
3789
- Name: __expectString(output.Name),
3790
- Options:
3791
- output.Options !== undefined && output.Options !== null
3792
- ? deserializeAws_json1_1Options(output.Options, context)
3793
- : undefined,
3794
- Schedule:
3795
- output.Schedule !== undefined && output.Schedule !== null
3796
- ? deserializeAws_json1_1TaskSchedule(output.Schedule, context)
3797
- : undefined,
3798
- SourceLocationArn: __expectString(output.SourceLocationArn),
3799
- SourceNetworkInterfaceArns:
3800
- output.SourceNetworkInterfaceArns !== undefined && output.SourceNetworkInterfaceArns !== null
3801
- ? deserializeAws_json1_1SourceNetworkInterfaceArns(output.SourceNetworkInterfaceArns, context)
3802
- : undefined,
3803
- Status: __expectString(output.Status),
3804
- TaskArn: __expectString(output.TaskArn),
3805
- } as any;
3806
- };
3807
-
3808
- const deserializeAws_json1_1DestinationNetworkInterfaceArns = (output: any, context: __SerdeContext): string[] => {
3809
- return (output || [])
3810
- .filter((e: any) => e != null)
3811
- .map((entry: any) => {
3812
- if (entry === null) {
3813
- return null as any;
3814
- }
3815
- return __expectString(entry) as any;
3816
- });
3817
- };
3818
-
3819
- const deserializeAws_json1_1Ec2Config = (output: any, context: __SerdeContext): Ec2Config => {
3820
- return {
3821
- SecurityGroupArns:
3822
- output.SecurityGroupArns !== undefined && output.SecurityGroupArns !== null
3823
- ? deserializeAws_json1_1Ec2SecurityGroupArnList(output.SecurityGroupArns, context)
3824
- : undefined,
3825
- SubnetArn: __expectString(output.SubnetArn),
3826
- } as any;
3827
- };
3828
-
3829
- const deserializeAws_json1_1Ec2SecurityGroupArnList = (output: any, context: __SerdeContext): string[] => {
3830
- return (output || [])
3831
- .filter((e: any) => e != null)
3832
- .map((entry: any) => {
3833
- if (entry === null) {
3834
- return null as any;
3835
- }
3836
- return __expectString(entry) as any;
3837
- });
3838
- };
3839
-
3840
- const deserializeAws_json1_1FilterList = (output: any, context: __SerdeContext): FilterRule[] => {
3841
- return (output || [])
3842
- .filter((e: any) => e != null)
3843
- .map((entry: any) => {
3844
- if (entry === null) {
3845
- return null as any;
3846
- }
3847
- return deserializeAws_json1_1FilterRule(entry, context);
3848
- });
3849
- };
3850
-
3851
- const deserializeAws_json1_1FilterRule = (output: any, context: __SerdeContext): FilterRule => {
3852
- return {
3853
- FilterType: __expectString(output.FilterType),
3854
- Value: __expectString(output.Value),
3855
- } as any;
3856
- };
3857
-
3858
- const deserializeAws_json1_1InternalException = (output: any, context: __SerdeContext): InternalException => {
3859
- return {
3860
- errorCode: __expectString(output.errorCode),
3861
- message: __expectString(output.message),
3862
- } as any;
3863
- };
3864
-
3865
- const deserializeAws_json1_1InvalidRequestException = (
3866
- output: any,
3867
- context: __SerdeContext
3868
- ): InvalidRequestException => {
3869
- return {
3870
- errorCode: __expectString(output.errorCode),
3871
- message: __expectString(output.message),
3872
- } as any;
3873
- };
3874
-
3875
- const deserializeAws_json1_1ListAgentsResponse = (output: any, context: __SerdeContext): ListAgentsResponse => {
3876
- return {
3877
- Agents:
3878
- output.Agents !== undefined && output.Agents !== null
3879
- ? deserializeAws_json1_1AgentList(output.Agents, context)
3880
- : undefined,
3881
- NextToken: __expectString(output.NextToken),
3882
- } as any;
3883
- };
3884
-
3885
- const deserializeAws_json1_1ListLocationsResponse = (output: any, context: __SerdeContext): ListLocationsResponse => {
3886
- return {
3887
- Locations:
3888
- output.Locations !== undefined && output.Locations !== null
3889
- ? deserializeAws_json1_1LocationList(output.Locations, context)
3890
- : undefined,
3891
- NextToken: __expectString(output.NextToken),
3892
- } as any;
3893
- };
3894
-
3895
- const deserializeAws_json1_1ListTagsForResourceResponse = (
3896
- output: any,
3897
- context: __SerdeContext
3898
- ): ListTagsForResourceResponse => {
3899
- return {
3900
- NextToken: __expectString(output.NextToken),
3901
- Tags:
3902
- output.Tags !== undefined && output.Tags !== null
3903
- ? deserializeAws_json1_1OutputTagList(output.Tags, context)
3904
- : undefined,
3905
- } as any;
3906
- };
3907
-
3908
- const deserializeAws_json1_1ListTaskExecutionsResponse = (
3909
- output: any,
3910
- context: __SerdeContext
3911
- ): ListTaskExecutionsResponse => {
3912
- return {
3913
- NextToken: __expectString(output.NextToken),
3914
- TaskExecutions:
3915
- output.TaskExecutions !== undefined && output.TaskExecutions !== null
3916
- ? deserializeAws_json1_1TaskExecutionList(output.TaskExecutions, context)
3917
- : undefined,
3918
- } as any;
3919
- };
3920
-
3921
- const deserializeAws_json1_1ListTasksResponse = (output: any, context: __SerdeContext): ListTasksResponse => {
3922
- return {
3923
- NextToken: __expectString(output.NextToken),
3924
- Tasks:
3925
- output.Tasks !== undefined && output.Tasks !== null
3926
- ? deserializeAws_json1_1TaskList(output.Tasks, context)
3927
- : undefined,
3928
- } as any;
3929
- };
3930
-
3931
- const deserializeAws_json1_1LocationList = (output: any, context: __SerdeContext): LocationListEntry[] => {
3932
- return (output || [])
3933
- .filter((e: any) => e != null)
3934
- .map((entry: any) => {
3935
- if (entry === null) {
3936
- return null as any;
3937
- }
3938
- return deserializeAws_json1_1LocationListEntry(entry, context);
3939
- });
3940
- };
3941
-
3942
- const deserializeAws_json1_1LocationListEntry = (output: any, context: __SerdeContext): LocationListEntry => {
3943
- return {
3944
- LocationArn: __expectString(output.LocationArn),
3945
- LocationUri: __expectString(output.LocationUri),
3946
- } as any;
3947
- };
3948
-
3949
- const deserializeAws_json1_1NfsMountOptions = (output: any, context: __SerdeContext): NfsMountOptions => {
3950
- return {
3951
- Version: __expectString(output.Version),
3952
- } as any;
3953
- };
3954
-
3955
- const deserializeAws_json1_1OnPremConfig = (output: any, context: __SerdeContext): OnPremConfig => {
3956
- return {
3957
- AgentArns:
3958
- output.AgentArns !== undefined && output.AgentArns !== null
3959
- ? deserializeAws_json1_1AgentArnList(output.AgentArns, context)
3960
- : undefined,
3961
- } as any;
3962
- };
3963
-
3964
- const deserializeAws_json1_1Options = (output: any, context: __SerdeContext): Options => {
3965
- return {
3966
- Atime: __expectString(output.Atime),
3967
- BytesPerSecond: __expectLong(output.BytesPerSecond),
3968
- Gid: __expectString(output.Gid),
3969
- LogLevel: __expectString(output.LogLevel),
3970
- Mtime: __expectString(output.Mtime),
3971
- OverwriteMode: __expectString(output.OverwriteMode),
3972
- PosixPermissions: __expectString(output.PosixPermissions),
3973
- PreserveDeletedFiles: __expectString(output.PreserveDeletedFiles),
3974
- PreserveDevices: __expectString(output.PreserveDevices),
3975
- SecurityDescriptorCopyFlags: __expectString(output.SecurityDescriptorCopyFlags),
3976
- TaskQueueing: __expectString(output.TaskQueueing),
3977
- TransferMode: __expectString(output.TransferMode),
3978
- Uid: __expectString(output.Uid),
3979
- VerifyMode: __expectString(output.VerifyMode),
3980
- } as any;
3981
- };
3982
-
3983
- const deserializeAws_json1_1OutputTagList = (output: any, context: __SerdeContext): TagListEntry[] => {
3984
- return (output || [])
3985
- .filter((e: any) => e != null)
3986
- .map((entry: any) => {
3987
- if (entry === null) {
3988
- return null as any;
3989
- }
3990
- return deserializeAws_json1_1TagListEntry(entry, context);
3991
- });
3992
- };
3993
-
3994
- const deserializeAws_json1_1PLSecurityGroupArnList = (output: any, context: __SerdeContext): string[] => {
3995
- return (output || [])
3996
- .filter((e: any) => e != null)
3997
- .map((entry: any) => {
3998
- if (entry === null) {
3999
- return null as any;
4000
- }
4001
- return __expectString(entry) as any;
4002
- });
4003
- };
4004
-
4005
- const deserializeAws_json1_1PLSubnetArnList = (output: any, context: __SerdeContext): string[] => {
4006
- return (output || [])
4007
- .filter((e: any) => e != null)
4008
- .map((entry: any) => {
4009
- if (entry === null) {
4010
- return null as any;
4011
- }
4012
- return __expectString(entry) as any;
4013
- });
4014
- };
4015
-
4016
- const deserializeAws_json1_1PrivateLinkConfig = (output: any, context: __SerdeContext): PrivateLinkConfig => {
4017
- return {
4018
- PrivateLinkEndpoint: __expectString(output.PrivateLinkEndpoint),
4019
- SecurityGroupArns:
4020
- output.SecurityGroupArns !== undefined && output.SecurityGroupArns !== null
4021
- ? deserializeAws_json1_1PLSecurityGroupArnList(output.SecurityGroupArns, context)
4022
- : undefined,
4023
- SubnetArns:
4024
- output.SubnetArns !== undefined && output.SubnetArns !== null
4025
- ? deserializeAws_json1_1PLSubnetArnList(output.SubnetArns, context)
4026
- : undefined,
4027
- VpcEndpointId: __expectString(output.VpcEndpointId),
4028
- } as any;
4029
- };
4030
-
4031
- const deserializeAws_json1_1S3Config = (output: any, context: __SerdeContext): S3Config => {
4032
- return {
4033
- BucketAccessRoleArn: __expectString(output.BucketAccessRoleArn),
4034
- } as any;
4035
- };
4036
-
4037
- const deserializeAws_json1_1SmbMountOptions = (output: any, context: __SerdeContext): SmbMountOptions => {
4038
- return {
4039
- Version: __expectString(output.Version),
4040
- } as any;
4041
- };
4042
-
4043
- const deserializeAws_json1_1SourceNetworkInterfaceArns = (output: any, context: __SerdeContext): string[] => {
4044
- return (output || [])
4045
- .filter((e: any) => e != null)
4046
- .map((entry: any) => {
4047
- if (entry === null) {
4048
- return null as any;
4049
- }
4050
- return __expectString(entry) as any;
4051
- });
4052
- };
4053
-
4054
- const deserializeAws_json1_1StartTaskExecutionResponse = (
4055
- output: any,
4056
- context: __SerdeContext
4057
- ): StartTaskExecutionResponse => {
4058
- return {
4059
- TaskExecutionArn: __expectString(output.TaskExecutionArn),
4060
- } as any;
4061
- };
4062
-
4063
- const deserializeAws_json1_1TagListEntry = (output: any, context: __SerdeContext): TagListEntry => {
4064
- return {
4065
- Key: __expectString(output.Key),
4066
- Value: __expectString(output.Value),
4067
- } as any;
4068
- };
4069
-
4070
- const deserializeAws_json1_1TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => {
4071
- return {} as any;
4072
- };
4073
-
4074
- const deserializeAws_json1_1TaskExecutionList = (output: any, context: __SerdeContext): TaskExecutionListEntry[] => {
4075
- return (output || [])
4076
- .filter((e: any) => e != null)
4077
- .map((entry: any) => {
4078
- if (entry === null) {
4079
- return null as any;
4080
- }
4081
- return deserializeAws_json1_1TaskExecutionListEntry(entry, context);
4082
- });
4083
- };
4084
-
4085
- const deserializeAws_json1_1TaskExecutionListEntry = (output: any, context: __SerdeContext): TaskExecutionListEntry => {
4086
- return {
4087
- Status: __expectString(output.Status),
4088
- TaskExecutionArn: __expectString(output.TaskExecutionArn),
4089
- } as any;
4090
- };
4091
-
4092
- const deserializeAws_json1_1TaskExecutionResultDetail = (
4093
- output: any,
4094
- context: __SerdeContext
4095
- ): TaskExecutionResultDetail => {
4096
- return {
4097
- ErrorCode: __expectString(output.ErrorCode),
4098
- ErrorDetail: __expectString(output.ErrorDetail),
4099
- PrepareDuration: __expectLong(output.PrepareDuration),
4100
- PrepareStatus: __expectString(output.PrepareStatus),
4101
- TotalDuration: __expectLong(output.TotalDuration),
4102
- TransferDuration: __expectLong(output.TransferDuration),
4103
- TransferStatus: __expectString(output.TransferStatus),
4104
- VerifyDuration: __expectLong(output.VerifyDuration),
4105
- VerifyStatus: __expectString(output.VerifyStatus),
4106
- } as any;
4107
- };
4108
-
4109
- const deserializeAws_json1_1TaskList = (output: any, context: __SerdeContext): TaskListEntry[] => {
4110
- return (output || [])
4111
- .filter((e: any) => e != null)
4112
- .map((entry: any) => {
4113
- if (entry === null) {
4114
- return null as any;
4115
- }
4116
- return deserializeAws_json1_1TaskListEntry(entry, context);
4117
- });
4118
- };
4119
-
4120
- const deserializeAws_json1_1TaskListEntry = (output: any, context: __SerdeContext): TaskListEntry => {
4121
- return {
4122
- Name: __expectString(output.Name),
4123
- Status: __expectString(output.Status),
4124
- TaskArn: __expectString(output.TaskArn),
4125
- } as any;
4126
- };
4127
-
4128
- const deserializeAws_json1_1TaskSchedule = (output: any, context: __SerdeContext): TaskSchedule => {
4129
- return {
4130
- ScheduleExpression: __expectString(output.ScheduleExpression),
4131
- } as any;
4132
- };
4133
-
4134
- const deserializeAws_json1_1UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => {
4135
- return {} as any;
4136
- };
4137
-
4138
- const deserializeAws_json1_1UpdateAgentResponse = (output: any, context: __SerdeContext): UpdateAgentResponse => {
4139
- return {} as any;
4140
- };
4141
-
4142
- const deserializeAws_json1_1UpdateLocationNfsResponse = (
4143
- output: any,
4144
- context: __SerdeContext
4145
- ): UpdateLocationNfsResponse => {
4146
- return {} as any;
4147
- };
4148
-
4149
- const deserializeAws_json1_1UpdateLocationObjectStorageResponse = (
4150
- output: any,
4151
- context: __SerdeContext
4152
- ): UpdateLocationObjectStorageResponse => {
4153
- return {} as any;
4154
- };
4155
-
4156
- const deserializeAws_json1_1UpdateLocationSmbResponse = (
4157
- output: any,
4158
- context: __SerdeContext
4159
- ): UpdateLocationSmbResponse => {
4160
- return {} as any;
4161
- };
4162
-
4163
- const deserializeAws_json1_1UpdateTaskExecutionResponse = (
4164
- output: any,
4165
- context: __SerdeContext
4166
- ): UpdateTaskExecutionResponse => {
4167
- return {} as any;
4168
- };
4169
-
4170
- const deserializeAws_json1_1UpdateTaskResponse = (output: any, context: __SerdeContext): UpdateTaskResponse => {
4171
- return {} as any;
4172
- };
4173
-
4174
- const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({
4175
- httpStatusCode: output.statusCode,
4176
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
4177
- extendedRequestId: output.headers["x-amz-id-2"],
4178
- cfId: output.headers["x-amz-cf-id"],
4179
- });
4180
-
4181
- // Collect low-level response body stream to Uint8Array.
4182
- const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext): Promise<Uint8Array> => {
4183
- if (streamBody instanceof Uint8Array) {
4184
- return Promise.resolve(streamBody);
4185
- }
4186
- return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
4187
- };
4188
-
4189
- // Encode Uint8Array data into string with utf-8.
4190
- const collectBodyString = (streamBody: any, context: __SerdeContext): Promise<string> =>
4191
- collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
4192
-
4193
- const buildHttpRpcRequest = async (
4194
- context: __SerdeContext,
4195
- headers: __HeaderBag,
4196
- path: string,
4197
- resolvedHostname: string | undefined,
4198
- body: any
4199
- ): Promise<__HttpRequest> => {
4200
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
4201
- const contents: any = {
4202
- protocol,
4203
- hostname,
4204
- port,
4205
- method: "POST",
4206
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
4207
- headers,
4208
- };
4209
- if (resolvedHostname !== undefined) {
4210
- contents.hostname = resolvedHostname;
4211
- }
4212
- if (body !== undefined) {
4213
- contents.body = body;
4214
- }
4215
- return new __HttpRequest(contents);
4216
- };
4217
-
4218
- const parseBody = (streamBody: any, context: __SerdeContext): any =>
4219
- collectBodyString(streamBody, context).then((encoded) => {
4220
- if (encoded.length) {
4221
- return JSON.parse(encoded);
4222
- }
4223
- return {};
4224
- });
4225
-
4226
- /**
4227
- * Load an error code for the aws.rest-json-1.1 protocol.
4228
- */
4229
- const loadRestJsonErrorCode = (output: __HttpResponse, data: any): string => {
4230
- const findKey = (object: any, key: string) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
4231
-
4232
- const sanitizeErrorCode = (rawValue: string): string => {
4233
- let cleanValue = rawValue;
4234
- if (cleanValue.indexOf(":") >= 0) {
4235
- cleanValue = cleanValue.split(":")[0];
4236
- }
4237
- if (cleanValue.indexOf("#") >= 0) {
4238
- cleanValue = cleanValue.split("#")[1];
4239
- }
4240
- return cleanValue;
4241
- };
4242
-
4243
- const headerKey = findKey(output.headers, "x-amzn-errortype");
4244
- if (headerKey !== undefined) {
4245
- return sanitizeErrorCode(output.headers[headerKey]);
4246
- }
4247
-
4248
- if (data.code !== undefined) {
4249
- return sanitizeErrorCode(data.code);
4250
- }
4251
-
4252
- if (data["__type"] !== undefined) {
4253
- return sanitizeErrorCode(data["__type"]);
4254
- }
4255
-
4256
- return "";
4257
- };