@aws-sdk/client-greengrass 3.489.0 → 3.495.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 (104) hide show
  1. package/dist-cjs/Greengrass.js +1 -195
  2. package/dist-cjs/GreengrassClient.js +1 -43
  3. package/dist-cjs/commands/AssociateRoleToGroupCommand.js +1 -28
  4. package/dist-cjs/commands/AssociateServiceRoleToAccountCommand.js +1 -28
  5. package/dist-cjs/commands/CreateConnectorDefinitionCommand.js +1 -28
  6. package/dist-cjs/commands/CreateConnectorDefinitionVersionCommand.js +1 -28
  7. package/dist-cjs/commands/CreateCoreDefinitionCommand.js +1 -28
  8. package/dist-cjs/commands/CreateCoreDefinitionVersionCommand.js +1 -28
  9. package/dist-cjs/commands/CreateDeploymentCommand.js +1 -28
  10. package/dist-cjs/commands/CreateDeviceDefinitionCommand.js +1 -28
  11. package/dist-cjs/commands/CreateDeviceDefinitionVersionCommand.js +1 -28
  12. package/dist-cjs/commands/CreateFunctionDefinitionCommand.js +1 -28
  13. package/dist-cjs/commands/CreateFunctionDefinitionVersionCommand.js +1 -28
  14. package/dist-cjs/commands/CreateGroupCertificateAuthorityCommand.js +1 -28
  15. package/dist-cjs/commands/CreateGroupCommand.js +1 -28
  16. package/dist-cjs/commands/CreateGroupVersionCommand.js +1 -28
  17. package/dist-cjs/commands/CreateLoggerDefinitionCommand.js +1 -28
  18. package/dist-cjs/commands/CreateLoggerDefinitionVersionCommand.js +1 -28
  19. package/dist-cjs/commands/CreateResourceDefinitionCommand.js +1 -28
  20. package/dist-cjs/commands/CreateResourceDefinitionVersionCommand.js +1 -28
  21. package/dist-cjs/commands/CreateSoftwareUpdateJobCommand.js +1 -28
  22. package/dist-cjs/commands/CreateSubscriptionDefinitionCommand.js +1 -28
  23. package/dist-cjs/commands/CreateSubscriptionDefinitionVersionCommand.js +1 -28
  24. package/dist-cjs/commands/DeleteConnectorDefinitionCommand.js +1 -28
  25. package/dist-cjs/commands/DeleteCoreDefinitionCommand.js +1 -28
  26. package/dist-cjs/commands/DeleteDeviceDefinitionCommand.js +1 -28
  27. package/dist-cjs/commands/DeleteFunctionDefinitionCommand.js +1 -28
  28. package/dist-cjs/commands/DeleteGroupCommand.js +1 -28
  29. package/dist-cjs/commands/DeleteLoggerDefinitionCommand.js +1 -28
  30. package/dist-cjs/commands/DeleteResourceDefinitionCommand.js +1 -28
  31. package/dist-cjs/commands/DeleteSubscriptionDefinitionCommand.js +1 -28
  32. package/dist-cjs/commands/DisassociateRoleFromGroupCommand.js +1 -28
  33. package/dist-cjs/commands/DisassociateServiceRoleFromAccountCommand.js +1 -28
  34. package/dist-cjs/commands/GetAssociatedRoleCommand.js +1 -28
  35. package/dist-cjs/commands/GetBulkDeploymentStatusCommand.js +1 -28
  36. package/dist-cjs/commands/GetConnectivityInfoCommand.js +1 -28
  37. package/dist-cjs/commands/GetConnectorDefinitionCommand.js +1 -28
  38. package/dist-cjs/commands/GetConnectorDefinitionVersionCommand.js +1 -28
  39. package/dist-cjs/commands/GetCoreDefinitionCommand.js +1 -28
  40. package/dist-cjs/commands/GetCoreDefinitionVersionCommand.js +1 -28
  41. package/dist-cjs/commands/GetDeploymentStatusCommand.js +1 -28
  42. package/dist-cjs/commands/GetDeviceDefinitionCommand.js +1 -28
  43. package/dist-cjs/commands/GetDeviceDefinitionVersionCommand.js +1 -28
  44. package/dist-cjs/commands/GetFunctionDefinitionCommand.js +1 -28
  45. package/dist-cjs/commands/GetFunctionDefinitionVersionCommand.js +1 -28
  46. package/dist-cjs/commands/GetGroupCertificateAuthorityCommand.js +1 -28
  47. package/dist-cjs/commands/GetGroupCertificateConfigurationCommand.js +1 -28
  48. package/dist-cjs/commands/GetGroupCommand.js +1 -28
  49. package/dist-cjs/commands/GetGroupVersionCommand.js +1 -28
  50. package/dist-cjs/commands/GetLoggerDefinitionCommand.js +1 -28
  51. package/dist-cjs/commands/GetLoggerDefinitionVersionCommand.js +1 -28
  52. package/dist-cjs/commands/GetResourceDefinitionCommand.js +1 -28
  53. package/dist-cjs/commands/GetResourceDefinitionVersionCommand.js +1 -28
  54. package/dist-cjs/commands/GetServiceRoleForAccountCommand.js +1 -28
  55. package/dist-cjs/commands/GetSubscriptionDefinitionCommand.js +1 -28
  56. package/dist-cjs/commands/GetSubscriptionDefinitionVersionCommand.js +1 -28
  57. package/dist-cjs/commands/GetThingRuntimeConfigurationCommand.js +1 -28
  58. package/dist-cjs/commands/ListBulkDeploymentDetailedReportsCommand.js +1 -28
  59. package/dist-cjs/commands/ListBulkDeploymentsCommand.js +1 -28
  60. package/dist-cjs/commands/ListConnectorDefinitionVersionsCommand.js +1 -28
  61. package/dist-cjs/commands/ListConnectorDefinitionsCommand.js +1 -28
  62. package/dist-cjs/commands/ListCoreDefinitionVersionsCommand.js +1 -28
  63. package/dist-cjs/commands/ListCoreDefinitionsCommand.js +1 -28
  64. package/dist-cjs/commands/ListDeploymentsCommand.js +1 -28
  65. package/dist-cjs/commands/ListDeviceDefinitionVersionsCommand.js +1 -28
  66. package/dist-cjs/commands/ListDeviceDefinitionsCommand.js +1 -28
  67. package/dist-cjs/commands/ListFunctionDefinitionVersionsCommand.js +1 -28
  68. package/dist-cjs/commands/ListFunctionDefinitionsCommand.js +1 -28
  69. package/dist-cjs/commands/ListGroupCertificateAuthoritiesCommand.js +1 -28
  70. package/dist-cjs/commands/ListGroupVersionsCommand.js +1 -28
  71. package/dist-cjs/commands/ListGroupsCommand.js +1 -28
  72. package/dist-cjs/commands/ListLoggerDefinitionVersionsCommand.js +1 -28
  73. package/dist-cjs/commands/ListLoggerDefinitionsCommand.js +1 -28
  74. package/dist-cjs/commands/ListResourceDefinitionVersionsCommand.js +1 -28
  75. package/dist-cjs/commands/ListResourceDefinitionsCommand.js +1 -28
  76. package/dist-cjs/commands/ListSubscriptionDefinitionVersionsCommand.js +1 -28
  77. package/dist-cjs/commands/ListSubscriptionDefinitionsCommand.js +1 -28
  78. package/dist-cjs/commands/ListTagsForResourceCommand.js +1 -28
  79. package/dist-cjs/commands/ResetDeploymentsCommand.js +1 -28
  80. package/dist-cjs/commands/StartBulkDeploymentCommand.js +1 -28
  81. package/dist-cjs/commands/StopBulkDeploymentCommand.js +1 -28
  82. package/dist-cjs/commands/TagResourceCommand.js +1 -28
  83. package/dist-cjs/commands/UntagResourceCommand.js +1 -28
  84. package/dist-cjs/commands/UpdateConnectivityInfoCommand.js +1 -28
  85. package/dist-cjs/commands/UpdateConnectorDefinitionCommand.js +1 -28
  86. package/dist-cjs/commands/UpdateCoreDefinitionCommand.js +1 -28
  87. package/dist-cjs/commands/UpdateDeviceDefinitionCommand.js +1 -28
  88. package/dist-cjs/commands/UpdateFunctionDefinitionCommand.js +1 -28
  89. package/dist-cjs/commands/UpdateGroupCertificateConfigurationCommand.js +1 -28
  90. package/dist-cjs/commands/UpdateGroupCommand.js +1 -28
  91. package/dist-cjs/commands/UpdateLoggerDefinitionCommand.js +1 -28
  92. package/dist-cjs/commands/UpdateResourceDefinitionCommand.js +1 -28
  93. package/dist-cjs/commands/UpdateSubscriptionDefinitionCommand.js +1 -28
  94. package/dist-cjs/commands/UpdateThingRuntimeConfigurationCommand.js +1 -28
  95. package/dist-cjs/commands/index.js +1 -95
  96. package/dist-cjs/endpoint/EndpointParameters.js +1 -18
  97. package/dist-cjs/extensionConfiguration.js +1 -2
  98. package/dist-cjs/index.js +6624 -10
  99. package/dist-cjs/models/GreengrassServiceException.js +1 -12
  100. package/dist-cjs/models/index.js +1 -4
  101. package/dist-cjs/models/models_0.js +1 -109
  102. package/dist-cjs/protocols/Aws_restJson1.js +1 -4602
  103. package/dist-cjs/runtimeExtensions.js +1 -22
  104. package/package.json +40 -40
@@ -1,4602 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.se_GetResourceDefinitionCommand = exports.se_GetLoggerDefinitionVersionCommand = exports.se_GetLoggerDefinitionCommand = exports.se_GetGroupVersionCommand = exports.se_GetGroupCertificateConfigurationCommand = exports.se_GetGroupCertificateAuthorityCommand = exports.se_GetGroupCommand = exports.se_GetFunctionDefinitionVersionCommand = exports.se_GetFunctionDefinitionCommand = exports.se_GetDeviceDefinitionVersionCommand = exports.se_GetDeviceDefinitionCommand = exports.se_GetDeploymentStatusCommand = exports.se_GetCoreDefinitionVersionCommand = exports.se_GetCoreDefinitionCommand = exports.se_GetConnectorDefinitionVersionCommand = exports.se_GetConnectorDefinitionCommand = exports.se_GetConnectivityInfoCommand = exports.se_GetBulkDeploymentStatusCommand = exports.se_GetAssociatedRoleCommand = exports.se_DisassociateServiceRoleFromAccountCommand = exports.se_DisassociateRoleFromGroupCommand = exports.se_DeleteSubscriptionDefinitionCommand = exports.se_DeleteResourceDefinitionCommand = exports.se_DeleteLoggerDefinitionCommand = exports.se_DeleteGroupCommand = exports.se_DeleteFunctionDefinitionCommand = exports.se_DeleteDeviceDefinitionCommand = exports.se_DeleteCoreDefinitionCommand = exports.se_DeleteConnectorDefinitionCommand = exports.se_CreateSubscriptionDefinitionVersionCommand = exports.se_CreateSubscriptionDefinitionCommand = exports.se_CreateSoftwareUpdateJobCommand = exports.se_CreateResourceDefinitionVersionCommand = exports.se_CreateResourceDefinitionCommand = exports.se_CreateLoggerDefinitionVersionCommand = exports.se_CreateLoggerDefinitionCommand = exports.se_CreateGroupVersionCommand = exports.se_CreateGroupCertificateAuthorityCommand = exports.se_CreateGroupCommand = exports.se_CreateFunctionDefinitionVersionCommand = exports.se_CreateFunctionDefinitionCommand = exports.se_CreateDeviceDefinitionVersionCommand = exports.se_CreateDeviceDefinitionCommand = exports.se_CreateDeploymentCommand = exports.se_CreateCoreDefinitionVersionCommand = exports.se_CreateCoreDefinitionCommand = exports.se_CreateConnectorDefinitionVersionCommand = exports.se_CreateConnectorDefinitionCommand = exports.se_AssociateServiceRoleToAccountCommand = exports.se_AssociateRoleToGroupCommand = void 0;
4
- exports.de_CreateDeviceDefinitionCommand = exports.de_CreateDeploymentCommand = exports.de_CreateCoreDefinitionVersionCommand = exports.de_CreateCoreDefinitionCommand = exports.de_CreateConnectorDefinitionVersionCommand = exports.de_CreateConnectorDefinitionCommand = exports.de_AssociateServiceRoleToAccountCommand = exports.de_AssociateRoleToGroupCommand = exports.se_UpdateThingRuntimeConfigurationCommand = exports.se_UpdateSubscriptionDefinitionCommand = exports.se_UpdateResourceDefinitionCommand = exports.se_UpdateLoggerDefinitionCommand = exports.se_UpdateGroupCertificateConfigurationCommand = exports.se_UpdateGroupCommand = exports.se_UpdateFunctionDefinitionCommand = exports.se_UpdateDeviceDefinitionCommand = exports.se_UpdateCoreDefinitionCommand = exports.se_UpdateConnectorDefinitionCommand = exports.se_UpdateConnectivityInfoCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_StopBulkDeploymentCommand = exports.se_StartBulkDeploymentCommand = exports.se_ResetDeploymentsCommand = exports.se_ListTagsForResourceCommand = exports.se_ListSubscriptionDefinitionVersionsCommand = exports.se_ListSubscriptionDefinitionsCommand = exports.se_ListResourceDefinitionVersionsCommand = exports.se_ListResourceDefinitionsCommand = exports.se_ListLoggerDefinitionVersionsCommand = exports.se_ListLoggerDefinitionsCommand = exports.se_ListGroupVersionsCommand = exports.se_ListGroupsCommand = exports.se_ListGroupCertificateAuthoritiesCommand = exports.se_ListFunctionDefinitionVersionsCommand = exports.se_ListFunctionDefinitionsCommand = exports.se_ListDeviceDefinitionVersionsCommand = exports.se_ListDeviceDefinitionsCommand = exports.se_ListDeploymentsCommand = exports.se_ListCoreDefinitionVersionsCommand = exports.se_ListCoreDefinitionsCommand = exports.se_ListConnectorDefinitionVersionsCommand = exports.se_ListConnectorDefinitionsCommand = exports.se_ListBulkDeploymentsCommand = exports.se_ListBulkDeploymentDetailedReportsCommand = exports.se_GetThingRuntimeConfigurationCommand = exports.se_GetSubscriptionDefinitionVersionCommand = exports.se_GetSubscriptionDefinitionCommand = exports.se_GetServiceRoleForAccountCommand = exports.se_GetResourceDefinitionVersionCommand = void 0;
5
- exports.de_ListConnectorDefinitionsCommand = exports.de_ListBulkDeploymentsCommand = exports.de_ListBulkDeploymentDetailedReportsCommand = exports.de_GetThingRuntimeConfigurationCommand = exports.de_GetSubscriptionDefinitionVersionCommand = exports.de_GetSubscriptionDefinitionCommand = exports.de_GetServiceRoleForAccountCommand = exports.de_GetResourceDefinitionVersionCommand = exports.de_GetResourceDefinitionCommand = exports.de_GetLoggerDefinitionVersionCommand = exports.de_GetLoggerDefinitionCommand = exports.de_GetGroupVersionCommand = exports.de_GetGroupCertificateConfigurationCommand = exports.de_GetGroupCertificateAuthorityCommand = exports.de_GetGroupCommand = exports.de_GetFunctionDefinitionVersionCommand = exports.de_GetFunctionDefinitionCommand = exports.de_GetDeviceDefinitionVersionCommand = exports.de_GetDeviceDefinitionCommand = exports.de_GetDeploymentStatusCommand = exports.de_GetCoreDefinitionVersionCommand = exports.de_GetCoreDefinitionCommand = exports.de_GetConnectorDefinitionVersionCommand = exports.de_GetConnectorDefinitionCommand = exports.de_GetConnectivityInfoCommand = exports.de_GetBulkDeploymentStatusCommand = exports.de_GetAssociatedRoleCommand = exports.de_DisassociateServiceRoleFromAccountCommand = exports.de_DisassociateRoleFromGroupCommand = exports.de_DeleteSubscriptionDefinitionCommand = exports.de_DeleteResourceDefinitionCommand = exports.de_DeleteLoggerDefinitionCommand = exports.de_DeleteGroupCommand = exports.de_DeleteFunctionDefinitionCommand = exports.de_DeleteDeviceDefinitionCommand = exports.de_DeleteCoreDefinitionCommand = exports.de_DeleteConnectorDefinitionCommand = exports.de_CreateSubscriptionDefinitionVersionCommand = exports.de_CreateSubscriptionDefinitionCommand = exports.de_CreateSoftwareUpdateJobCommand = exports.de_CreateResourceDefinitionVersionCommand = exports.de_CreateResourceDefinitionCommand = exports.de_CreateLoggerDefinitionVersionCommand = exports.de_CreateLoggerDefinitionCommand = exports.de_CreateGroupVersionCommand = exports.de_CreateGroupCertificateAuthorityCommand = exports.de_CreateGroupCommand = exports.de_CreateFunctionDefinitionVersionCommand = exports.de_CreateFunctionDefinitionCommand = exports.de_CreateDeviceDefinitionVersionCommand = void 0;
6
- exports.de_UpdateThingRuntimeConfigurationCommand = exports.de_UpdateSubscriptionDefinitionCommand = exports.de_UpdateResourceDefinitionCommand = exports.de_UpdateLoggerDefinitionCommand = exports.de_UpdateGroupCertificateConfigurationCommand = exports.de_UpdateGroupCommand = exports.de_UpdateFunctionDefinitionCommand = exports.de_UpdateDeviceDefinitionCommand = exports.de_UpdateCoreDefinitionCommand = exports.de_UpdateConnectorDefinitionCommand = exports.de_UpdateConnectivityInfoCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_StopBulkDeploymentCommand = exports.de_StartBulkDeploymentCommand = exports.de_ResetDeploymentsCommand = exports.de_ListTagsForResourceCommand = exports.de_ListSubscriptionDefinitionVersionsCommand = exports.de_ListSubscriptionDefinitionsCommand = exports.de_ListResourceDefinitionVersionsCommand = exports.de_ListResourceDefinitionsCommand = exports.de_ListLoggerDefinitionVersionsCommand = exports.de_ListLoggerDefinitionsCommand = exports.de_ListGroupVersionsCommand = exports.de_ListGroupsCommand = exports.de_ListGroupCertificateAuthoritiesCommand = exports.de_ListFunctionDefinitionVersionsCommand = exports.de_ListFunctionDefinitionsCommand = exports.de_ListDeviceDefinitionVersionsCommand = exports.de_ListDeviceDefinitionsCommand = exports.de_ListDeploymentsCommand = exports.de_ListCoreDefinitionVersionsCommand = exports.de_ListCoreDefinitionsCommand = exports.de_ListConnectorDefinitionVersionsCommand = void 0;
7
- const core_1 = require("@smithy/core");
8
- const smithy_client_1 = require("@smithy/smithy-client");
9
- const GreengrassServiceException_1 = require("../models/GreengrassServiceException");
10
- const models_0_1 = require("../models/models_0");
11
- const se_AssociateRoleToGroupCommand = async (input, context) => {
12
- const b = (0, core_1.requestBuilder)(input, context);
13
- const headers = {
14
- "content-type": "application/json",
15
- };
16
- b.bp("/greengrass/groups/{GroupId}/role");
17
- b.p("GroupId", () => input.GroupId, "{GroupId}", false);
18
- let body;
19
- body = JSON.stringify((0, smithy_client_1.take)(input, {
20
- RoleArn: [],
21
- }));
22
- b.m("PUT").h(headers).b(body);
23
- return b.build();
24
- };
25
- exports.se_AssociateRoleToGroupCommand = se_AssociateRoleToGroupCommand;
26
- const se_AssociateServiceRoleToAccountCommand = async (input, context) => {
27
- const b = (0, core_1.requestBuilder)(input, context);
28
- const headers = {
29
- "content-type": "application/json",
30
- };
31
- b.bp("/greengrass/servicerole");
32
- let body;
33
- body = JSON.stringify((0, smithy_client_1.take)(input, {
34
- RoleArn: [],
35
- }));
36
- b.m("PUT").h(headers).b(body);
37
- return b.build();
38
- };
39
- exports.se_AssociateServiceRoleToAccountCommand = se_AssociateServiceRoleToAccountCommand;
40
- const se_CreateConnectorDefinitionCommand = async (input, context) => {
41
- const b = (0, core_1.requestBuilder)(input, context);
42
- const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
43
- "content-type": "application/json",
44
- [_xact]: input[_ACT],
45
- });
46
- b.bp("/greengrass/definition/connectors");
47
- let body;
48
- body = JSON.stringify((0, smithy_client_1.take)(input, {
49
- InitialVersion: (_) => (0, smithy_client_1._json)(_),
50
- Name: [],
51
- tags: (_) => (0, smithy_client_1._json)(_),
52
- }));
53
- b.m("POST").h(headers).b(body);
54
- return b.build();
55
- };
56
- exports.se_CreateConnectorDefinitionCommand = se_CreateConnectorDefinitionCommand;
57
- const se_CreateConnectorDefinitionVersionCommand = async (input, context) => {
58
- const b = (0, core_1.requestBuilder)(input, context);
59
- const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
60
- "content-type": "application/json",
61
- [_xact]: input[_ACT],
62
- });
63
- b.bp("/greengrass/definition/connectors/{ConnectorDefinitionId}/versions");
64
- b.p("ConnectorDefinitionId", () => input.ConnectorDefinitionId, "{ConnectorDefinitionId}", false);
65
- let body;
66
- body = JSON.stringify((0, smithy_client_1.take)(input, {
67
- Connectors: (_) => (0, smithy_client_1._json)(_),
68
- }));
69
- b.m("POST").h(headers).b(body);
70
- return b.build();
71
- };
72
- exports.se_CreateConnectorDefinitionVersionCommand = se_CreateConnectorDefinitionVersionCommand;
73
- const se_CreateCoreDefinitionCommand = async (input, context) => {
74
- const b = (0, core_1.requestBuilder)(input, context);
75
- const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
76
- "content-type": "application/json",
77
- [_xact]: input[_ACT],
78
- });
79
- b.bp("/greengrass/definition/cores");
80
- let body;
81
- body = JSON.stringify((0, smithy_client_1.take)(input, {
82
- InitialVersion: (_) => (0, smithy_client_1._json)(_),
83
- Name: [],
84
- tags: (_) => (0, smithy_client_1._json)(_),
85
- }));
86
- b.m("POST").h(headers).b(body);
87
- return b.build();
88
- };
89
- exports.se_CreateCoreDefinitionCommand = se_CreateCoreDefinitionCommand;
90
- const se_CreateCoreDefinitionVersionCommand = async (input, context) => {
91
- const b = (0, core_1.requestBuilder)(input, context);
92
- const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
93
- "content-type": "application/json",
94
- [_xact]: input[_ACT],
95
- });
96
- b.bp("/greengrass/definition/cores/{CoreDefinitionId}/versions");
97
- b.p("CoreDefinitionId", () => input.CoreDefinitionId, "{CoreDefinitionId}", false);
98
- let body;
99
- body = JSON.stringify((0, smithy_client_1.take)(input, {
100
- Cores: (_) => (0, smithy_client_1._json)(_),
101
- }));
102
- b.m("POST").h(headers).b(body);
103
- return b.build();
104
- };
105
- exports.se_CreateCoreDefinitionVersionCommand = se_CreateCoreDefinitionVersionCommand;
106
- const se_CreateDeploymentCommand = async (input, context) => {
107
- const b = (0, core_1.requestBuilder)(input, context);
108
- const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
109
- "content-type": "application/json",
110
- [_xact]: input[_ACT],
111
- });
112
- b.bp("/greengrass/groups/{GroupId}/deployments");
113
- b.p("GroupId", () => input.GroupId, "{GroupId}", false);
114
- let body;
115
- body = JSON.stringify((0, smithy_client_1.take)(input, {
116
- DeploymentId: [],
117
- DeploymentType: [],
118
- GroupVersionId: [],
119
- }));
120
- b.m("POST").h(headers).b(body);
121
- return b.build();
122
- };
123
- exports.se_CreateDeploymentCommand = se_CreateDeploymentCommand;
124
- const se_CreateDeviceDefinitionCommand = async (input, context) => {
125
- const b = (0, core_1.requestBuilder)(input, context);
126
- const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
127
- "content-type": "application/json",
128
- [_xact]: input[_ACT],
129
- });
130
- b.bp("/greengrass/definition/devices");
131
- let body;
132
- body = JSON.stringify((0, smithy_client_1.take)(input, {
133
- InitialVersion: (_) => (0, smithy_client_1._json)(_),
134
- Name: [],
135
- tags: (_) => (0, smithy_client_1._json)(_),
136
- }));
137
- b.m("POST").h(headers).b(body);
138
- return b.build();
139
- };
140
- exports.se_CreateDeviceDefinitionCommand = se_CreateDeviceDefinitionCommand;
141
- const se_CreateDeviceDefinitionVersionCommand = async (input, context) => {
142
- const b = (0, core_1.requestBuilder)(input, context);
143
- const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
144
- "content-type": "application/json",
145
- [_xact]: input[_ACT],
146
- });
147
- b.bp("/greengrass/definition/devices/{DeviceDefinitionId}/versions");
148
- b.p("DeviceDefinitionId", () => input.DeviceDefinitionId, "{DeviceDefinitionId}", false);
149
- let body;
150
- body = JSON.stringify((0, smithy_client_1.take)(input, {
151
- Devices: (_) => (0, smithy_client_1._json)(_),
152
- }));
153
- b.m("POST").h(headers).b(body);
154
- return b.build();
155
- };
156
- exports.se_CreateDeviceDefinitionVersionCommand = se_CreateDeviceDefinitionVersionCommand;
157
- const se_CreateFunctionDefinitionCommand = async (input, context) => {
158
- const b = (0, core_1.requestBuilder)(input, context);
159
- const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
160
- "content-type": "application/json",
161
- [_xact]: input[_ACT],
162
- });
163
- b.bp("/greengrass/definition/functions");
164
- let body;
165
- body = JSON.stringify((0, smithy_client_1.take)(input, {
166
- InitialVersion: (_) => (0, smithy_client_1._json)(_),
167
- Name: [],
168
- tags: (_) => (0, smithy_client_1._json)(_),
169
- }));
170
- b.m("POST").h(headers).b(body);
171
- return b.build();
172
- };
173
- exports.se_CreateFunctionDefinitionCommand = se_CreateFunctionDefinitionCommand;
174
- const se_CreateFunctionDefinitionVersionCommand = async (input, context) => {
175
- const b = (0, core_1.requestBuilder)(input, context);
176
- const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
177
- "content-type": "application/json",
178
- [_xact]: input[_ACT],
179
- });
180
- b.bp("/greengrass/definition/functions/{FunctionDefinitionId}/versions");
181
- b.p("FunctionDefinitionId", () => input.FunctionDefinitionId, "{FunctionDefinitionId}", false);
182
- let body;
183
- body = JSON.stringify((0, smithy_client_1.take)(input, {
184
- DefaultConfig: (_) => (0, smithy_client_1._json)(_),
185
- Functions: (_) => (0, smithy_client_1._json)(_),
186
- }));
187
- b.m("POST").h(headers).b(body);
188
- return b.build();
189
- };
190
- exports.se_CreateFunctionDefinitionVersionCommand = se_CreateFunctionDefinitionVersionCommand;
191
- const se_CreateGroupCommand = async (input, context) => {
192
- const b = (0, core_1.requestBuilder)(input, context);
193
- const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
194
- "content-type": "application/json",
195
- [_xact]: input[_ACT],
196
- });
197
- b.bp("/greengrass/groups");
198
- let body;
199
- body = JSON.stringify((0, smithy_client_1.take)(input, {
200
- InitialVersion: (_) => (0, smithy_client_1._json)(_),
201
- Name: [],
202
- tags: (_) => (0, smithy_client_1._json)(_),
203
- }));
204
- b.m("POST").h(headers).b(body);
205
- return b.build();
206
- };
207
- exports.se_CreateGroupCommand = se_CreateGroupCommand;
208
- const se_CreateGroupCertificateAuthorityCommand = async (input, context) => {
209
- const b = (0, core_1.requestBuilder)(input, context);
210
- const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
211
- [_xact]: input[_ACT],
212
- });
213
- b.bp("/greengrass/groups/{GroupId}/certificateauthorities");
214
- b.p("GroupId", () => input.GroupId, "{GroupId}", false);
215
- let body;
216
- b.m("POST").h(headers).b(body);
217
- return b.build();
218
- };
219
- exports.se_CreateGroupCertificateAuthorityCommand = se_CreateGroupCertificateAuthorityCommand;
220
- const se_CreateGroupVersionCommand = async (input, context) => {
221
- const b = (0, core_1.requestBuilder)(input, context);
222
- const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
223
- "content-type": "application/json",
224
- [_xact]: input[_ACT],
225
- });
226
- b.bp("/greengrass/groups/{GroupId}/versions");
227
- b.p("GroupId", () => input.GroupId, "{GroupId}", false);
228
- let body;
229
- body = JSON.stringify((0, smithy_client_1.take)(input, {
230
- ConnectorDefinitionVersionArn: [],
231
- CoreDefinitionVersionArn: [],
232
- DeviceDefinitionVersionArn: [],
233
- FunctionDefinitionVersionArn: [],
234
- LoggerDefinitionVersionArn: [],
235
- ResourceDefinitionVersionArn: [],
236
- SubscriptionDefinitionVersionArn: [],
237
- }));
238
- b.m("POST").h(headers).b(body);
239
- return b.build();
240
- };
241
- exports.se_CreateGroupVersionCommand = se_CreateGroupVersionCommand;
242
- const se_CreateLoggerDefinitionCommand = async (input, context) => {
243
- const b = (0, core_1.requestBuilder)(input, context);
244
- const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
245
- "content-type": "application/json",
246
- [_xact]: input[_ACT],
247
- });
248
- b.bp("/greengrass/definition/loggers");
249
- let body;
250
- body = JSON.stringify((0, smithy_client_1.take)(input, {
251
- InitialVersion: (_) => (0, smithy_client_1._json)(_),
252
- Name: [],
253
- tags: (_) => (0, smithy_client_1._json)(_),
254
- }));
255
- b.m("POST").h(headers).b(body);
256
- return b.build();
257
- };
258
- exports.se_CreateLoggerDefinitionCommand = se_CreateLoggerDefinitionCommand;
259
- const se_CreateLoggerDefinitionVersionCommand = async (input, context) => {
260
- const b = (0, core_1.requestBuilder)(input, context);
261
- const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
262
- "content-type": "application/json",
263
- [_xact]: input[_ACT],
264
- });
265
- b.bp("/greengrass/definition/loggers/{LoggerDefinitionId}/versions");
266
- b.p("LoggerDefinitionId", () => input.LoggerDefinitionId, "{LoggerDefinitionId}", false);
267
- let body;
268
- body = JSON.stringify((0, smithy_client_1.take)(input, {
269
- Loggers: (_) => (0, smithy_client_1._json)(_),
270
- }));
271
- b.m("POST").h(headers).b(body);
272
- return b.build();
273
- };
274
- exports.se_CreateLoggerDefinitionVersionCommand = se_CreateLoggerDefinitionVersionCommand;
275
- const se_CreateResourceDefinitionCommand = async (input, context) => {
276
- const b = (0, core_1.requestBuilder)(input, context);
277
- const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
278
- "content-type": "application/json",
279
- [_xact]: input[_ACT],
280
- });
281
- b.bp("/greengrass/definition/resources");
282
- let body;
283
- body = JSON.stringify((0, smithy_client_1.take)(input, {
284
- InitialVersion: (_) => (0, smithy_client_1._json)(_),
285
- Name: [],
286
- tags: (_) => (0, smithy_client_1._json)(_),
287
- }));
288
- b.m("POST").h(headers).b(body);
289
- return b.build();
290
- };
291
- exports.se_CreateResourceDefinitionCommand = se_CreateResourceDefinitionCommand;
292
- const se_CreateResourceDefinitionVersionCommand = async (input, context) => {
293
- const b = (0, core_1.requestBuilder)(input, context);
294
- const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
295
- "content-type": "application/json",
296
- [_xact]: input[_ACT],
297
- });
298
- b.bp("/greengrass/definition/resources/{ResourceDefinitionId}/versions");
299
- b.p("ResourceDefinitionId", () => input.ResourceDefinitionId, "{ResourceDefinitionId}", false);
300
- let body;
301
- body = JSON.stringify((0, smithy_client_1.take)(input, {
302
- Resources: (_) => (0, smithy_client_1._json)(_),
303
- }));
304
- b.m("POST").h(headers).b(body);
305
- return b.build();
306
- };
307
- exports.se_CreateResourceDefinitionVersionCommand = se_CreateResourceDefinitionVersionCommand;
308
- const se_CreateSoftwareUpdateJobCommand = async (input, context) => {
309
- const b = (0, core_1.requestBuilder)(input, context);
310
- const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
311
- "content-type": "application/json",
312
- [_xact]: input[_ACT],
313
- });
314
- b.bp("/greengrass/updates");
315
- let body;
316
- body = JSON.stringify((0, smithy_client_1.take)(input, {
317
- S3UrlSignerRole: [],
318
- SoftwareToUpdate: [],
319
- UpdateAgentLogLevel: [],
320
- UpdateTargets: (_) => (0, smithy_client_1._json)(_),
321
- UpdateTargetsArchitecture: [],
322
- UpdateTargetsOperatingSystem: [],
323
- }));
324
- b.m("POST").h(headers).b(body);
325
- return b.build();
326
- };
327
- exports.se_CreateSoftwareUpdateJobCommand = se_CreateSoftwareUpdateJobCommand;
328
- const se_CreateSubscriptionDefinitionCommand = async (input, context) => {
329
- const b = (0, core_1.requestBuilder)(input, context);
330
- const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
331
- "content-type": "application/json",
332
- [_xact]: input[_ACT],
333
- });
334
- b.bp("/greengrass/definition/subscriptions");
335
- let body;
336
- body = JSON.stringify((0, smithy_client_1.take)(input, {
337
- InitialVersion: (_) => (0, smithy_client_1._json)(_),
338
- Name: [],
339
- tags: (_) => (0, smithy_client_1._json)(_),
340
- }));
341
- b.m("POST").h(headers).b(body);
342
- return b.build();
343
- };
344
- exports.se_CreateSubscriptionDefinitionCommand = se_CreateSubscriptionDefinitionCommand;
345
- const se_CreateSubscriptionDefinitionVersionCommand = async (input, context) => {
346
- const b = (0, core_1.requestBuilder)(input, context);
347
- const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
348
- "content-type": "application/json",
349
- [_xact]: input[_ACT],
350
- });
351
- b.bp("/greengrass/definition/subscriptions/{SubscriptionDefinitionId}/versions");
352
- b.p("SubscriptionDefinitionId", () => input.SubscriptionDefinitionId, "{SubscriptionDefinitionId}", false);
353
- let body;
354
- body = JSON.stringify((0, smithy_client_1.take)(input, {
355
- Subscriptions: (_) => (0, smithy_client_1._json)(_),
356
- }));
357
- b.m("POST").h(headers).b(body);
358
- return b.build();
359
- };
360
- exports.se_CreateSubscriptionDefinitionVersionCommand = se_CreateSubscriptionDefinitionVersionCommand;
361
- const se_DeleteConnectorDefinitionCommand = async (input, context) => {
362
- const b = (0, core_1.requestBuilder)(input, context);
363
- const headers = {};
364
- b.bp("/greengrass/definition/connectors/{ConnectorDefinitionId}");
365
- b.p("ConnectorDefinitionId", () => input.ConnectorDefinitionId, "{ConnectorDefinitionId}", false);
366
- let body;
367
- b.m("DELETE").h(headers).b(body);
368
- return b.build();
369
- };
370
- exports.se_DeleteConnectorDefinitionCommand = se_DeleteConnectorDefinitionCommand;
371
- const se_DeleteCoreDefinitionCommand = async (input, context) => {
372
- const b = (0, core_1.requestBuilder)(input, context);
373
- const headers = {};
374
- b.bp("/greengrass/definition/cores/{CoreDefinitionId}");
375
- b.p("CoreDefinitionId", () => input.CoreDefinitionId, "{CoreDefinitionId}", false);
376
- let body;
377
- b.m("DELETE").h(headers).b(body);
378
- return b.build();
379
- };
380
- exports.se_DeleteCoreDefinitionCommand = se_DeleteCoreDefinitionCommand;
381
- const se_DeleteDeviceDefinitionCommand = async (input, context) => {
382
- const b = (0, core_1.requestBuilder)(input, context);
383
- const headers = {};
384
- b.bp("/greengrass/definition/devices/{DeviceDefinitionId}");
385
- b.p("DeviceDefinitionId", () => input.DeviceDefinitionId, "{DeviceDefinitionId}", false);
386
- let body;
387
- b.m("DELETE").h(headers).b(body);
388
- return b.build();
389
- };
390
- exports.se_DeleteDeviceDefinitionCommand = se_DeleteDeviceDefinitionCommand;
391
- const se_DeleteFunctionDefinitionCommand = async (input, context) => {
392
- const b = (0, core_1.requestBuilder)(input, context);
393
- const headers = {};
394
- b.bp("/greengrass/definition/functions/{FunctionDefinitionId}");
395
- b.p("FunctionDefinitionId", () => input.FunctionDefinitionId, "{FunctionDefinitionId}", false);
396
- let body;
397
- b.m("DELETE").h(headers).b(body);
398
- return b.build();
399
- };
400
- exports.se_DeleteFunctionDefinitionCommand = se_DeleteFunctionDefinitionCommand;
401
- const se_DeleteGroupCommand = async (input, context) => {
402
- const b = (0, core_1.requestBuilder)(input, context);
403
- const headers = {};
404
- b.bp("/greengrass/groups/{GroupId}");
405
- b.p("GroupId", () => input.GroupId, "{GroupId}", false);
406
- let body;
407
- b.m("DELETE").h(headers).b(body);
408
- return b.build();
409
- };
410
- exports.se_DeleteGroupCommand = se_DeleteGroupCommand;
411
- const se_DeleteLoggerDefinitionCommand = async (input, context) => {
412
- const b = (0, core_1.requestBuilder)(input, context);
413
- const headers = {};
414
- b.bp("/greengrass/definition/loggers/{LoggerDefinitionId}");
415
- b.p("LoggerDefinitionId", () => input.LoggerDefinitionId, "{LoggerDefinitionId}", false);
416
- let body;
417
- b.m("DELETE").h(headers).b(body);
418
- return b.build();
419
- };
420
- exports.se_DeleteLoggerDefinitionCommand = se_DeleteLoggerDefinitionCommand;
421
- const se_DeleteResourceDefinitionCommand = async (input, context) => {
422
- const b = (0, core_1.requestBuilder)(input, context);
423
- const headers = {};
424
- b.bp("/greengrass/definition/resources/{ResourceDefinitionId}");
425
- b.p("ResourceDefinitionId", () => input.ResourceDefinitionId, "{ResourceDefinitionId}", false);
426
- let body;
427
- b.m("DELETE").h(headers).b(body);
428
- return b.build();
429
- };
430
- exports.se_DeleteResourceDefinitionCommand = se_DeleteResourceDefinitionCommand;
431
- const se_DeleteSubscriptionDefinitionCommand = async (input, context) => {
432
- const b = (0, core_1.requestBuilder)(input, context);
433
- const headers = {};
434
- b.bp("/greengrass/definition/subscriptions/{SubscriptionDefinitionId}");
435
- b.p("SubscriptionDefinitionId", () => input.SubscriptionDefinitionId, "{SubscriptionDefinitionId}", false);
436
- let body;
437
- b.m("DELETE").h(headers).b(body);
438
- return b.build();
439
- };
440
- exports.se_DeleteSubscriptionDefinitionCommand = se_DeleteSubscriptionDefinitionCommand;
441
- const se_DisassociateRoleFromGroupCommand = async (input, context) => {
442
- const b = (0, core_1.requestBuilder)(input, context);
443
- const headers = {};
444
- b.bp("/greengrass/groups/{GroupId}/role");
445
- b.p("GroupId", () => input.GroupId, "{GroupId}", false);
446
- let body;
447
- b.m("DELETE").h(headers).b(body);
448
- return b.build();
449
- };
450
- exports.se_DisassociateRoleFromGroupCommand = se_DisassociateRoleFromGroupCommand;
451
- const se_DisassociateServiceRoleFromAccountCommand = async (input, context) => {
452
- const b = (0, core_1.requestBuilder)(input, context);
453
- const headers = {
454
- "content-type": "application/json",
455
- };
456
- b.bp("/greengrass/servicerole");
457
- let body;
458
- body = "";
459
- b.m("DELETE").h(headers).b(body);
460
- return b.build();
461
- };
462
- exports.se_DisassociateServiceRoleFromAccountCommand = se_DisassociateServiceRoleFromAccountCommand;
463
- const se_GetAssociatedRoleCommand = async (input, context) => {
464
- const b = (0, core_1.requestBuilder)(input, context);
465
- const headers = {};
466
- b.bp("/greengrass/groups/{GroupId}/role");
467
- b.p("GroupId", () => input.GroupId, "{GroupId}", false);
468
- let body;
469
- b.m("GET").h(headers).b(body);
470
- return b.build();
471
- };
472
- exports.se_GetAssociatedRoleCommand = se_GetAssociatedRoleCommand;
473
- const se_GetBulkDeploymentStatusCommand = async (input, context) => {
474
- const b = (0, core_1.requestBuilder)(input, context);
475
- const headers = {};
476
- b.bp("/greengrass/bulk/deployments/{BulkDeploymentId}/status");
477
- b.p("BulkDeploymentId", () => input.BulkDeploymentId, "{BulkDeploymentId}", false);
478
- let body;
479
- b.m("GET").h(headers).b(body);
480
- return b.build();
481
- };
482
- exports.se_GetBulkDeploymentStatusCommand = se_GetBulkDeploymentStatusCommand;
483
- const se_GetConnectivityInfoCommand = async (input, context) => {
484
- const b = (0, core_1.requestBuilder)(input, context);
485
- const headers = {};
486
- b.bp("/greengrass/things/{ThingName}/connectivityInfo");
487
- b.p("ThingName", () => input.ThingName, "{ThingName}", false);
488
- let body;
489
- b.m("GET").h(headers).b(body);
490
- return b.build();
491
- };
492
- exports.se_GetConnectivityInfoCommand = se_GetConnectivityInfoCommand;
493
- const se_GetConnectorDefinitionCommand = async (input, context) => {
494
- const b = (0, core_1.requestBuilder)(input, context);
495
- const headers = {};
496
- b.bp("/greengrass/definition/connectors/{ConnectorDefinitionId}");
497
- b.p("ConnectorDefinitionId", () => input.ConnectorDefinitionId, "{ConnectorDefinitionId}", false);
498
- let body;
499
- b.m("GET").h(headers).b(body);
500
- return b.build();
501
- };
502
- exports.se_GetConnectorDefinitionCommand = se_GetConnectorDefinitionCommand;
503
- const se_GetConnectorDefinitionVersionCommand = async (input, context) => {
504
- const b = (0, core_1.requestBuilder)(input, context);
505
- const headers = {};
506
- b.bp("/greengrass/definition/connectors/{ConnectorDefinitionId}/versions/{ConnectorDefinitionVersionId}");
507
- b.p("ConnectorDefinitionId", () => input.ConnectorDefinitionId, "{ConnectorDefinitionId}", false);
508
- b.p("ConnectorDefinitionVersionId", () => input.ConnectorDefinitionVersionId, "{ConnectorDefinitionVersionId}", false);
509
- const query = (0, smithy_client_1.map)({
510
- [_NT]: [, input[_NT]],
511
- });
512
- let body;
513
- b.m("GET").h(headers).q(query).b(body);
514
- return b.build();
515
- };
516
- exports.se_GetConnectorDefinitionVersionCommand = se_GetConnectorDefinitionVersionCommand;
517
- const se_GetCoreDefinitionCommand = async (input, context) => {
518
- const b = (0, core_1.requestBuilder)(input, context);
519
- const headers = {};
520
- b.bp("/greengrass/definition/cores/{CoreDefinitionId}");
521
- b.p("CoreDefinitionId", () => input.CoreDefinitionId, "{CoreDefinitionId}", false);
522
- let body;
523
- b.m("GET").h(headers).b(body);
524
- return b.build();
525
- };
526
- exports.se_GetCoreDefinitionCommand = se_GetCoreDefinitionCommand;
527
- const se_GetCoreDefinitionVersionCommand = async (input, context) => {
528
- const b = (0, core_1.requestBuilder)(input, context);
529
- const headers = {};
530
- b.bp("/greengrass/definition/cores/{CoreDefinitionId}/versions/{CoreDefinitionVersionId}");
531
- b.p("CoreDefinitionId", () => input.CoreDefinitionId, "{CoreDefinitionId}", false);
532
- b.p("CoreDefinitionVersionId", () => input.CoreDefinitionVersionId, "{CoreDefinitionVersionId}", false);
533
- let body;
534
- b.m("GET").h(headers).b(body);
535
- return b.build();
536
- };
537
- exports.se_GetCoreDefinitionVersionCommand = se_GetCoreDefinitionVersionCommand;
538
- const se_GetDeploymentStatusCommand = async (input, context) => {
539
- const b = (0, core_1.requestBuilder)(input, context);
540
- const headers = {};
541
- b.bp("/greengrass/groups/{GroupId}/deployments/{DeploymentId}/status");
542
- b.p("DeploymentId", () => input.DeploymentId, "{DeploymentId}", false);
543
- b.p("GroupId", () => input.GroupId, "{GroupId}", false);
544
- let body;
545
- b.m("GET").h(headers).b(body);
546
- return b.build();
547
- };
548
- exports.se_GetDeploymentStatusCommand = se_GetDeploymentStatusCommand;
549
- const se_GetDeviceDefinitionCommand = async (input, context) => {
550
- const b = (0, core_1.requestBuilder)(input, context);
551
- const headers = {};
552
- b.bp("/greengrass/definition/devices/{DeviceDefinitionId}");
553
- b.p("DeviceDefinitionId", () => input.DeviceDefinitionId, "{DeviceDefinitionId}", false);
554
- let body;
555
- b.m("GET").h(headers).b(body);
556
- return b.build();
557
- };
558
- exports.se_GetDeviceDefinitionCommand = se_GetDeviceDefinitionCommand;
559
- const se_GetDeviceDefinitionVersionCommand = async (input, context) => {
560
- const b = (0, core_1.requestBuilder)(input, context);
561
- const headers = {};
562
- b.bp("/greengrass/definition/devices/{DeviceDefinitionId}/versions/{DeviceDefinitionVersionId}");
563
- b.p("DeviceDefinitionId", () => input.DeviceDefinitionId, "{DeviceDefinitionId}", false);
564
- b.p("DeviceDefinitionVersionId", () => input.DeviceDefinitionVersionId, "{DeviceDefinitionVersionId}", false);
565
- const query = (0, smithy_client_1.map)({
566
- [_NT]: [, input[_NT]],
567
- });
568
- let body;
569
- b.m("GET").h(headers).q(query).b(body);
570
- return b.build();
571
- };
572
- exports.se_GetDeviceDefinitionVersionCommand = se_GetDeviceDefinitionVersionCommand;
573
- const se_GetFunctionDefinitionCommand = async (input, context) => {
574
- const b = (0, core_1.requestBuilder)(input, context);
575
- const headers = {};
576
- b.bp("/greengrass/definition/functions/{FunctionDefinitionId}");
577
- b.p("FunctionDefinitionId", () => input.FunctionDefinitionId, "{FunctionDefinitionId}", false);
578
- let body;
579
- b.m("GET").h(headers).b(body);
580
- return b.build();
581
- };
582
- exports.se_GetFunctionDefinitionCommand = se_GetFunctionDefinitionCommand;
583
- const se_GetFunctionDefinitionVersionCommand = async (input, context) => {
584
- const b = (0, core_1.requestBuilder)(input, context);
585
- const headers = {};
586
- b.bp("/greengrass/definition/functions/{FunctionDefinitionId}/versions/{FunctionDefinitionVersionId}");
587
- b.p("FunctionDefinitionId", () => input.FunctionDefinitionId, "{FunctionDefinitionId}", false);
588
- b.p("FunctionDefinitionVersionId", () => input.FunctionDefinitionVersionId, "{FunctionDefinitionVersionId}", false);
589
- const query = (0, smithy_client_1.map)({
590
- [_NT]: [, input[_NT]],
591
- });
592
- let body;
593
- b.m("GET").h(headers).q(query).b(body);
594
- return b.build();
595
- };
596
- exports.se_GetFunctionDefinitionVersionCommand = se_GetFunctionDefinitionVersionCommand;
597
- const se_GetGroupCommand = async (input, context) => {
598
- const b = (0, core_1.requestBuilder)(input, context);
599
- const headers = {};
600
- b.bp("/greengrass/groups/{GroupId}");
601
- b.p("GroupId", () => input.GroupId, "{GroupId}", false);
602
- let body;
603
- b.m("GET").h(headers).b(body);
604
- return b.build();
605
- };
606
- exports.se_GetGroupCommand = se_GetGroupCommand;
607
- const se_GetGroupCertificateAuthorityCommand = async (input, context) => {
608
- const b = (0, core_1.requestBuilder)(input, context);
609
- const headers = {};
610
- b.bp("/greengrass/groups/{GroupId}/certificateauthorities/{CertificateAuthorityId}");
611
- b.p("CertificateAuthorityId", () => input.CertificateAuthorityId, "{CertificateAuthorityId}", false);
612
- b.p("GroupId", () => input.GroupId, "{GroupId}", false);
613
- let body;
614
- b.m("GET").h(headers).b(body);
615
- return b.build();
616
- };
617
- exports.se_GetGroupCertificateAuthorityCommand = se_GetGroupCertificateAuthorityCommand;
618
- const se_GetGroupCertificateConfigurationCommand = async (input, context) => {
619
- const b = (0, core_1.requestBuilder)(input, context);
620
- const headers = {};
621
- b.bp("/greengrass/groups/{GroupId}/certificateauthorities/configuration/expiry");
622
- b.p("GroupId", () => input.GroupId, "{GroupId}", false);
623
- let body;
624
- b.m("GET").h(headers).b(body);
625
- return b.build();
626
- };
627
- exports.se_GetGroupCertificateConfigurationCommand = se_GetGroupCertificateConfigurationCommand;
628
- const se_GetGroupVersionCommand = async (input, context) => {
629
- const b = (0, core_1.requestBuilder)(input, context);
630
- const headers = {};
631
- b.bp("/greengrass/groups/{GroupId}/versions/{GroupVersionId}");
632
- b.p("GroupId", () => input.GroupId, "{GroupId}", false);
633
- b.p("GroupVersionId", () => input.GroupVersionId, "{GroupVersionId}", false);
634
- let body;
635
- b.m("GET").h(headers).b(body);
636
- return b.build();
637
- };
638
- exports.se_GetGroupVersionCommand = se_GetGroupVersionCommand;
639
- const se_GetLoggerDefinitionCommand = async (input, context) => {
640
- const b = (0, core_1.requestBuilder)(input, context);
641
- const headers = {};
642
- b.bp("/greengrass/definition/loggers/{LoggerDefinitionId}");
643
- b.p("LoggerDefinitionId", () => input.LoggerDefinitionId, "{LoggerDefinitionId}", false);
644
- let body;
645
- b.m("GET").h(headers).b(body);
646
- return b.build();
647
- };
648
- exports.se_GetLoggerDefinitionCommand = se_GetLoggerDefinitionCommand;
649
- const se_GetLoggerDefinitionVersionCommand = async (input, context) => {
650
- const b = (0, core_1.requestBuilder)(input, context);
651
- const headers = {};
652
- b.bp("/greengrass/definition/loggers/{LoggerDefinitionId}/versions/{LoggerDefinitionVersionId}");
653
- b.p("LoggerDefinitionId", () => input.LoggerDefinitionId, "{LoggerDefinitionId}", false);
654
- b.p("LoggerDefinitionVersionId", () => input.LoggerDefinitionVersionId, "{LoggerDefinitionVersionId}", false);
655
- const query = (0, smithy_client_1.map)({
656
- [_NT]: [, input[_NT]],
657
- });
658
- let body;
659
- b.m("GET").h(headers).q(query).b(body);
660
- return b.build();
661
- };
662
- exports.se_GetLoggerDefinitionVersionCommand = se_GetLoggerDefinitionVersionCommand;
663
- const se_GetResourceDefinitionCommand = async (input, context) => {
664
- const b = (0, core_1.requestBuilder)(input, context);
665
- const headers = {};
666
- b.bp("/greengrass/definition/resources/{ResourceDefinitionId}");
667
- b.p("ResourceDefinitionId", () => input.ResourceDefinitionId, "{ResourceDefinitionId}", false);
668
- let body;
669
- b.m("GET").h(headers).b(body);
670
- return b.build();
671
- };
672
- exports.se_GetResourceDefinitionCommand = se_GetResourceDefinitionCommand;
673
- const se_GetResourceDefinitionVersionCommand = async (input, context) => {
674
- const b = (0, core_1.requestBuilder)(input, context);
675
- const headers = {};
676
- b.bp("/greengrass/definition/resources/{ResourceDefinitionId}/versions/{ResourceDefinitionVersionId}");
677
- b.p("ResourceDefinitionId", () => input.ResourceDefinitionId, "{ResourceDefinitionId}", false);
678
- b.p("ResourceDefinitionVersionId", () => input.ResourceDefinitionVersionId, "{ResourceDefinitionVersionId}", false);
679
- let body;
680
- b.m("GET").h(headers).b(body);
681
- return b.build();
682
- };
683
- exports.se_GetResourceDefinitionVersionCommand = se_GetResourceDefinitionVersionCommand;
684
- const se_GetServiceRoleForAccountCommand = async (input, context) => {
685
- const b = (0, core_1.requestBuilder)(input, context);
686
- const headers = {
687
- "content-type": "application/json",
688
- };
689
- b.bp("/greengrass/servicerole");
690
- let body;
691
- body = "";
692
- b.m("GET").h(headers).b(body);
693
- return b.build();
694
- };
695
- exports.se_GetServiceRoleForAccountCommand = se_GetServiceRoleForAccountCommand;
696
- const se_GetSubscriptionDefinitionCommand = async (input, context) => {
697
- const b = (0, core_1.requestBuilder)(input, context);
698
- const headers = {};
699
- b.bp("/greengrass/definition/subscriptions/{SubscriptionDefinitionId}");
700
- b.p("SubscriptionDefinitionId", () => input.SubscriptionDefinitionId, "{SubscriptionDefinitionId}", false);
701
- let body;
702
- b.m("GET").h(headers).b(body);
703
- return b.build();
704
- };
705
- exports.se_GetSubscriptionDefinitionCommand = se_GetSubscriptionDefinitionCommand;
706
- const se_GetSubscriptionDefinitionVersionCommand = async (input, context) => {
707
- const b = (0, core_1.requestBuilder)(input, context);
708
- const headers = {};
709
- b.bp("/greengrass/definition/subscriptions/{SubscriptionDefinitionId}/versions/{SubscriptionDefinitionVersionId}");
710
- b.p("SubscriptionDefinitionId", () => input.SubscriptionDefinitionId, "{SubscriptionDefinitionId}", false);
711
- b.p("SubscriptionDefinitionVersionId", () => input.SubscriptionDefinitionVersionId, "{SubscriptionDefinitionVersionId}", false);
712
- const query = (0, smithy_client_1.map)({
713
- [_NT]: [, input[_NT]],
714
- });
715
- let body;
716
- b.m("GET").h(headers).q(query).b(body);
717
- return b.build();
718
- };
719
- exports.se_GetSubscriptionDefinitionVersionCommand = se_GetSubscriptionDefinitionVersionCommand;
720
- const se_GetThingRuntimeConfigurationCommand = async (input, context) => {
721
- const b = (0, core_1.requestBuilder)(input, context);
722
- const headers = {};
723
- b.bp("/greengrass/things/{ThingName}/runtimeconfig");
724
- b.p("ThingName", () => input.ThingName, "{ThingName}", false);
725
- let body;
726
- b.m("GET").h(headers).b(body);
727
- return b.build();
728
- };
729
- exports.se_GetThingRuntimeConfigurationCommand = se_GetThingRuntimeConfigurationCommand;
730
- const se_ListBulkDeploymentDetailedReportsCommand = async (input, context) => {
731
- const b = (0, core_1.requestBuilder)(input, context);
732
- const headers = {};
733
- b.bp("/greengrass/bulk/deployments/{BulkDeploymentId}/detailed-reports");
734
- b.p("BulkDeploymentId", () => input.BulkDeploymentId, "{BulkDeploymentId}", false);
735
- const query = (0, smithy_client_1.map)({
736
- [_MR]: [, input[_MR]],
737
- [_NT]: [, input[_NT]],
738
- });
739
- let body;
740
- b.m("GET").h(headers).q(query).b(body);
741
- return b.build();
742
- };
743
- exports.se_ListBulkDeploymentDetailedReportsCommand = se_ListBulkDeploymentDetailedReportsCommand;
744
- const se_ListBulkDeploymentsCommand = async (input, context) => {
745
- const b = (0, core_1.requestBuilder)(input, context);
746
- const headers = {};
747
- b.bp("/greengrass/bulk/deployments");
748
- const query = (0, smithy_client_1.map)({
749
- [_MR]: [, input[_MR]],
750
- [_NT]: [, input[_NT]],
751
- });
752
- let body;
753
- b.m("GET").h(headers).q(query).b(body);
754
- return b.build();
755
- };
756
- exports.se_ListBulkDeploymentsCommand = se_ListBulkDeploymentsCommand;
757
- const se_ListConnectorDefinitionsCommand = async (input, context) => {
758
- const b = (0, core_1.requestBuilder)(input, context);
759
- const headers = {};
760
- b.bp("/greengrass/definition/connectors");
761
- const query = (0, smithy_client_1.map)({
762
- [_MR]: [, input[_MR]],
763
- [_NT]: [, input[_NT]],
764
- });
765
- let body;
766
- b.m("GET").h(headers).q(query).b(body);
767
- return b.build();
768
- };
769
- exports.se_ListConnectorDefinitionsCommand = se_ListConnectorDefinitionsCommand;
770
- const se_ListConnectorDefinitionVersionsCommand = async (input, context) => {
771
- const b = (0, core_1.requestBuilder)(input, context);
772
- const headers = {};
773
- b.bp("/greengrass/definition/connectors/{ConnectorDefinitionId}/versions");
774
- b.p("ConnectorDefinitionId", () => input.ConnectorDefinitionId, "{ConnectorDefinitionId}", false);
775
- const query = (0, smithy_client_1.map)({
776
- [_MR]: [, input[_MR]],
777
- [_NT]: [, input[_NT]],
778
- });
779
- let body;
780
- b.m("GET").h(headers).q(query).b(body);
781
- return b.build();
782
- };
783
- exports.se_ListConnectorDefinitionVersionsCommand = se_ListConnectorDefinitionVersionsCommand;
784
- const se_ListCoreDefinitionsCommand = async (input, context) => {
785
- const b = (0, core_1.requestBuilder)(input, context);
786
- const headers = {};
787
- b.bp("/greengrass/definition/cores");
788
- const query = (0, smithy_client_1.map)({
789
- [_MR]: [, input[_MR]],
790
- [_NT]: [, input[_NT]],
791
- });
792
- let body;
793
- b.m("GET").h(headers).q(query).b(body);
794
- return b.build();
795
- };
796
- exports.se_ListCoreDefinitionsCommand = se_ListCoreDefinitionsCommand;
797
- const se_ListCoreDefinitionVersionsCommand = async (input, context) => {
798
- const b = (0, core_1.requestBuilder)(input, context);
799
- const headers = {};
800
- b.bp("/greengrass/definition/cores/{CoreDefinitionId}/versions");
801
- b.p("CoreDefinitionId", () => input.CoreDefinitionId, "{CoreDefinitionId}", false);
802
- const query = (0, smithy_client_1.map)({
803
- [_MR]: [, input[_MR]],
804
- [_NT]: [, input[_NT]],
805
- });
806
- let body;
807
- b.m("GET").h(headers).q(query).b(body);
808
- return b.build();
809
- };
810
- exports.se_ListCoreDefinitionVersionsCommand = se_ListCoreDefinitionVersionsCommand;
811
- const se_ListDeploymentsCommand = async (input, context) => {
812
- const b = (0, core_1.requestBuilder)(input, context);
813
- const headers = {};
814
- b.bp("/greengrass/groups/{GroupId}/deployments");
815
- b.p("GroupId", () => input.GroupId, "{GroupId}", false);
816
- const query = (0, smithy_client_1.map)({
817
- [_MR]: [, input[_MR]],
818
- [_NT]: [, input[_NT]],
819
- });
820
- let body;
821
- b.m("GET").h(headers).q(query).b(body);
822
- return b.build();
823
- };
824
- exports.se_ListDeploymentsCommand = se_ListDeploymentsCommand;
825
- const se_ListDeviceDefinitionsCommand = async (input, context) => {
826
- const b = (0, core_1.requestBuilder)(input, context);
827
- const headers = {};
828
- b.bp("/greengrass/definition/devices");
829
- const query = (0, smithy_client_1.map)({
830
- [_MR]: [, input[_MR]],
831
- [_NT]: [, input[_NT]],
832
- });
833
- let body;
834
- b.m("GET").h(headers).q(query).b(body);
835
- return b.build();
836
- };
837
- exports.se_ListDeviceDefinitionsCommand = se_ListDeviceDefinitionsCommand;
838
- const se_ListDeviceDefinitionVersionsCommand = async (input, context) => {
839
- const b = (0, core_1.requestBuilder)(input, context);
840
- const headers = {};
841
- b.bp("/greengrass/definition/devices/{DeviceDefinitionId}/versions");
842
- b.p("DeviceDefinitionId", () => input.DeviceDefinitionId, "{DeviceDefinitionId}", false);
843
- const query = (0, smithy_client_1.map)({
844
- [_MR]: [, input[_MR]],
845
- [_NT]: [, input[_NT]],
846
- });
847
- let body;
848
- b.m("GET").h(headers).q(query).b(body);
849
- return b.build();
850
- };
851
- exports.se_ListDeviceDefinitionVersionsCommand = se_ListDeviceDefinitionVersionsCommand;
852
- const se_ListFunctionDefinitionsCommand = async (input, context) => {
853
- const b = (0, core_1.requestBuilder)(input, context);
854
- const headers = {};
855
- b.bp("/greengrass/definition/functions");
856
- const query = (0, smithy_client_1.map)({
857
- [_MR]: [, input[_MR]],
858
- [_NT]: [, input[_NT]],
859
- });
860
- let body;
861
- b.m("GET").h(headers).q(query).b(body);
862
- return b.build();
863
- };
864
- exports.se_ListFunctionDefinitionsCommand = se_ListFunctionDefinitionsCommand;
865
- const se_ListFunctionDefinitionVersionsCommand = async (input, context) => {
866
- const b = (0, core_1.requestBuilder)(input, context);
867
- const headers = {};
868
- b.bp("/greengrass/definition/functions/{FunctionDefinitionId}/versions");
869
- b.p("FunctionDefinitionId", () => input.FunctionDefinitionId, "{FunctionDefinitionId}", false);
870
- const query = (0, smithy_client_1.map)({
871
- [_MR]: [, input[_MR]],
872
- [_NT]: [, input[_NT]],
873
- });
874
- let body;
875
- b.m("GET").h(headers).q(query).b(body);
876
- return b.build();
877
- };
878
- exports.se_ListFunctionDefinitionVersionsCommand = se_ListFunctionDefinitionVersionsCommand;
879
- const se_ListGroupCertificateAuthoritiesCommand = async (input, context) => {
880
- const b = (0, core_1.requestBuilder)(input, context);
881
- const headers = {};
882
- b.bp("/greengrass/groups/{GroupId}/certificateauthorities");
883
- b.p("GroupId", () => input.GroupId, "{GroupId}", false);
884
- let body;
885
- b.m("GET").h(headers).b(body);
886
- return b.build();
887
- };
888
- exports.se_ListGroupCertificateAuthoritiesCommand = se_ListGroupCertificateAuthoritiesCommand;
889
- const se_ListGroupsCommand = async (input, context) => {
890
- const b = (0, core_1.requestBuilder)(input, context);
891
- const headers = {};
892
- b.bp("/greengrass/groups");
893
- const query = (0, smithy_client_1.map)({
894
- [_MR]: [, input[_MR]],
895
- [_NT]: [, input[_NT]],
896
- });
897
- let body;
898
- b.m("GET").h(headers).q(query).b(body);
899
- return b.build();
900
- };
901
- exports.se_ListGroupsCommand = se_ListGroupsCommand;
902
- const se_ListGroupVersionsCommand = async (input, context) => {
903
- const b = (0, core_1.requestBuilder)(input, context);
904
- const headers = {};
905
- b.bp("/greengrass/groups/{GroupId}/versions");
906
- b.p("GroupId", () => input.GroupId, "{GroupId}", false);
907
- const query = (0, smithy_client_1.map)({
908
- [_MR]: [, input[_MR]],
909
- [_NT]: [, input[_NT]],
910
- });
911
- let body;
912
- b.m("GET").h(headers).q(query).b(body);
913
- return b.build();
914
- };
915
- exports.se_ListGroupVersionsCommand = se_ListGroupVersionsCommand;
916
- const se_ListLoggerDefinitionsCommand = async (input, context) => {
917
- const b = (0, core_1.requestBuilder)(input, context);
918
- const headers = {};
919
- b.bp("/greengrass/definition/loggers");
920
- const query = (0, smithy_client_1.map)({
921
- [_MR]: [, input[_MR]],
922
- [_NT]: [, input[_NT]],
923
- });
924
- let body;
925
- b.m("GET").h(headers).q(query).b(body);
926
- return b.build();
927
- };
928
- exports.se_ListLoggerDefinitionsCommand = se_ListLoggerDefinitionsCommand;
929
- const se_ListLoggerDefinitionVersionsCommand = async (input, context) => {
930
- const b = (0, core_1.requestBuilder)(input, context);
931
- const headers = {};
932
- b.bp("/greengrass/definition/loggers/{LoggerDefinitionId}/versions");
933
- b.p("LoggerDefinitionId", () => input.LoggerDefinitionId, "{LoggerDefinitionId}", false);
934
- const query = (0, smithy_client_1.map)({
935
- [_MR]: [, input[_MR]],
936
- [_NT]: [, input[_NT]],
937
- });
938
- let body;
939
- b.m("GET").h(headers).q(query).b(body);
940
- return b.build();
941
- };
942
- exports.se_ListLoggerDefinitionVersionsCommand = se_ListLoggerDefinitionVersionsCommand;
943
- const se_ListResourceDefinitionsCommand = async (input, context) => {
944
- const b = (0, core_1.requestBuilder)(input, context);
945
- const headers = {};
946
- b.bp("/greengrass/definition/resources");
947
- const query = (0, smithy_client_1.map)({
948
- [_MR]: [, input[_MR]],
949
- [_NT]: [, input[_NT]],
950
- });
951
- let body;
952
- b.m("GET").h(headers).q(query).b(body);
953
- return b.build();
954
- };
955
- exports.se_ListResourceDefinitionsCommand = se_ListResourceDefinitionsCommand;
956
- const se_ListResourceDefinitionVersionsCommand = async (input, context) => {
957
- const b = (0, core_1.requestBuilder)(input, context);
958
- const headers = {};
959
- b.bp("/greengrass/definition/resources/{ResourceDefinitionId}/versions");
960
- b.p("ResourceDefinitionId", () => input.ResourceDefinitionId, "{ResourceDefinitionId}", false);
961
- const query = (0, smithy_client_1.map)({
962
- [_MR]: [, input[_MR]],
963
- [_NT]: [, input[_NT]],
964
- });
965
- let body;
966
- b.m("GET").h(headers).q(query).b(body);
967
- return b.build();
968
- };
969
- exports.se_ListResourceDefinitionVersionsCommand = se_ListResourceDefinitionVersionsCommand;
970
- const se_ListSubscriptionDefinitionsCommand = async (input, context) => {
971
- const b = (0, core_1.requestBuilder)(input, context);
972
- const headers = {};
973
- b.bp("/greengrass/definition/subscriptions");
974
- const query = (0, smithy_client_1.map)({
975
- [_MR]: [, input[_MR]],
976
- [_NT]: [, input[_NT]],
977
- });
978
- let body;
979
- b.m("GET").h(headers).q(query).b(body);
980
- return b.build();
981
- };
982
- exports.se_ListSubscriptionDefinitionsCommand = se_ListSubscriptionDefinitionsCommand;
983
- const se_ListSubscriptionDefinitionVersionsCommand = async (input, context) => {
984
- const b = (0, core_1.requestBuilder)(input, context);
985
- const headers = {};
986
- b.bp("/greengrass/definition/subscriptions/{SubscriptionDefinitionId}/versions");
987
- b.p("SubscriptionDefinitionId", () => input.SubscriptionDefinitionId, "{SubscriptionDefinitionId}", false);
988
- const query = (0, smithy_client_1.map)({
989
- [_MR]: [, input[_MR]],
990
- [_NT]: [, input[_NT]],
991
- });
992
- let body;
993
- b.m("GET").h(headers).q(query).b(body);
994
- return b.build();
995
- };
996
- exports.se_ListSubscriptionDefinitionVersionsCommand = se_ListSubscriptionDefinitionVersionsCommand;
997
- const se_ListTagsForResourceCommand = async (input, context) => {
998
- const b = (0, core_1.requestBuilder)(input, context);
999
- const headers = {};
1000
- b.bp("/tags/{ResourceArn}");
1001
- b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
1002
- let body;
1003
- b.m("GET").h(headers).b(body);
1004
- return b.build();
1005
- };
1006
- exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
1007
- const se_ResetDeploymentsCommand = async (input, context) => {
1008
- const b = (0, core_1.requestBuilder)(input, context);
1009
- const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
1010
- "content-type": "application/json",
1011
- [_xact]: input[_ACT],
1012
- });
1013
- b.bp("/greengrass/groups/{GroupId}/deployments/$reset");
1014
- b.p("GroupId", () => input.GroupId, "{GroupId}", false);
1015
- let body;
1016
- body = JSON.stringify((0, smithy_client_1.take)(input, {
1017
- Force: [],
1018
- }));
1019
- b.m("POST").h(headers).b(body);
1020
- return b.build();
1021
- };
1022
- exports.se_ResetDeploymentsCommand = se_ResetDeploymentsCommand;
1023
- const se_StartBulkDeploymentCommand = async (input, context) => {
1024
- const b = (0, core_1.requestBuilder)(input, context);
1025
- const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
1026
- "content-type": "application/json",
1027
- [_xact]: input[_ACT],
1028
- });
1029
- b.bp("/greengrass/bulk/deployments");
1030
- let body;
1031
- body = JSON.stringify((0, smithy_client_1.take)(input, {
1032
- ExecutionRoleArn: [],
1033
- InputFileUri: [],
1034
- tags: (_) => (0, smithy_client_1._json)(_),
1035
- }));
1036
- b.m("POST").h(headers).b(body);
1037
- return b.build();
1038
- };
1039
- exports.se_StartBulkDeploymentCommand = se_StartBulkDeploymentCommand;
1040
- const se_StopBulkDeploymentCommand = async (input, context) => {
1041
- const b = (0, core_1.requestBuilder)(input, context);
1042
- const headers = {};
1043
- b.bp("/greengrass/bulk/deployments/{BulkDeploymentId}/$stop");
1044
- b.p("BulkDeploymentId", () => input.BulkDeploymentId, "{BulkDeploymentId}", false);
1045
- let body;
1046
- b.m("PUT").h(headers).b(body);
1047
- return b.build();
1048
- };
1049
- exports.se_StopBulkDeploymentCommand = se_StopBulkDeploymentCommand;
1050
- const se_TagResourceCommand = async (input, context) => {
1051
- const b = (0, core_1.requestBuilder)(input, context);
1052
- const headers = {
1053
- "content-type": "application/json",
1054
- };
1055
- b.bp("/tags/{ResourceArn}");
1056
- b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
1057
- let body;
1058
- body = JSON.stringify((0, smithy_client_1.take)(input, {
1059
- tags: (_) => (0, smithy_client_1._json)(_),
1060
- }));
1061
- b.m("POST").h(headers).b(body);
1062
- return b.build();
1063
- };
1064
- exports.se_TagResourceCommand = se_TagResourceCommand;
1065
- const se_UntagResourceCommand = async (input, context) => {
1066
- const b = (0, core_1.requestBuilder)(input, context);
1067
- const headers = {};
1068
- b.bp("/tags/{ResourceArn}");
1069
- b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
1070
- const query = (0, smithy_client_1.map)({
1071
- [_tK]: [
1072
- (0, smithy_client_1.expectNonNull)(input.TagKeys, `TagKeys`) != null,
1073
- () => (input[_TK] || []).map((_entry) => _entry),
1074
- ],
1075
- });
1076
- let body;
1077
- b.m("DELETE").h(headers).q(query).b(body);
1078
- return b.build();
1079
- };
1080
- exports.se_UntagResourceCommand = se_UntagResourceCommand;
1081
- const se_UpdateConnectivityInfoCommand = async (input, context) => {
1082
- const b = (0, core_1.requestBuilder)(input, context);
1083
- const headers = {
1084
- "content-type": "application/json",
1085
- };
1086
- b.bp("/greengrass/things/{ThingName}/connectivityInfo");
1087
- b.p("ThingName", () => input.ThingName, "{ThingName}", false);
1088
- let body;
1089
- body = JSON.stringify((0, smithy_client_1.take)(input, {
1090
- ConnectivityInfo: (_) => (0, smithy_client_1._json)(_),
1091
- }));
1092
- b.m("PUT").h(headers).b(body);
1093
- return b.build();
1094
- };
1095
- exports.se_UpdateConnectivityInfoCommand = se_UpdateConnectivityInfoCommand;
1096
- const se_UpdateConnectorDefinitionCommand = async (input, context) => {
1097
- const b = (0, core_1.requestBuilder)(input, context);
1098
- const headers = {
1099
- "content-type": "application/json",
1100
- };
1101
- b.bp("/greengrass/definition/connectors/{ConnectorDefinitionId}");
1102
- b.p("ConnectorDefinitionId", () => input.ConnectorDefinitionId, "{ConnectorDefinitionId}", false);
1103
- let body;
1104
- body = JSON.stringify((0, smithy_client_1.take)(input, {
1105
- Name: [],
1106
- }));
1107
- b.m("PUT").h(headers).b(body);
1108
- return b.build();
1109
- };
1110
- exports.se_UpdateConnectorDefinitionCommand = se_UpdateConnectorDefinitionCommand;
1111
- const se_UpdateCoreDefinitionCommand = async (input, context) => {
1112
- const b = (0, core_1.requestBuilder)(input, context);
1113
- const headers = {
1114
- "content-type": "application/json",
1115
- };
1116
- b.bp("/greengrass/definition/cores/{CoreDefinitionId}");
1117
- b.p("CoreDefinitionId", () => input.CoreDefinitionId, "{CoreDefinitionId}", false);
1118
- let body;
1119
- body = JSON.stringify((0, smithy_client_1.take)(input, {
1120
- Name: [],
1121
- }));
1122
- b.m("PUT").h(headers).b(body);
1123
- return b.build();
1124
- };
1125
- exports.se_UpdateCoreDefinitionCommand = se_UpdateCoreDefinitionCommand;
1126
- const se_UpdateDeviceDefinitionCommand = async (input, context) => {
1127
- const b = (0, core_1.requestBuilder)(input, context);
1128
- const headers = {
1129
- "content-type": "application/json",
1130
- };
1131
- b.bp("/greengrass/definition/devices/{DeviceDefinitionId}");
1132
- b.p("DeviceDefinitionId", () => input.DeviceDefinitionId, "{DeviceDefinitionId}", false);
1133
- let body;
1134
- body = JSON.stringify((0, smithy_client_1.take)(input, {
1135
- Name: [],
1136
- }));
1137
- b.m("PUT").h(headers).b(body);
1138
- return b.build();
1139
- };
1140
- exports.se_UpdateDeviceDefinitionCommand = se_UpdateDeviceDefinitionCommand;
1141
- const se_UpdateFunctionDefinitionCommand = async (input, context) => {
1142
- const b = (0, core_1.requestBuilder)(input, context);
1143
- const headers = {
1144
- "content-type": "application/json",
1145
- };
1146
- b.bp("/greengrass/definition/functions/{FunctionDefinitionId}");
1147
- b.p("FunctionDefinitionId", () => input.FunctionDefinitionId, "{FunctionDefinitionId}", false);
1148
- let body;
1149
- body = JSON.stringify((0, smithy_client_1.take)(input, {
1150
- Name: [],
1151
- }));
1152
- b.m("PUT").h(headers).b(body);
1153
- return b.build();
1154
- };
1155
- exports.se_UpdateFunctionDefinitionCommand = se_UpdateFunctionDefinitionCommand;
1156
- const se_UpdateGroupCommand = async (input, context) => {
1157
- const b = (0, core_1.requestBuilder)(input, context);
1158
- const headers = {
1159
- "content-type": "application/json",
1160
- };
1161
- b.bp("/greengrass/groups/{GroupId}");
1162
- b.p("GroupId", () => input.GroupId, "{GroupId}", false);
1163
- let body;
1164
- body = JSON.stringify((0, smithy_client_1.take)(input, {
1165
- Name: [],
1166
- }));
1167
- b.m("PUT").h(headers).b(body);
1168
- return b.build();
1169
- };
1170
- exports.se_UpdateGroupCommand = se_UpdateGroupCommand;
1171
- const se_UpdateGroupCertificateConfigurationCommand = async (input, context) => {
1172
- const b = (0, core_1.requestBuilder)(input, context);
1173
- const headers = {
1174
- "content-type": "application/json",
1175
- };
1176
- b.bp("/greengrass/groups/{GroupId}/certificateauthorities/configuration/expiry");
1177
- b.p("GroupId", () => input.GroupId, "{GroupId}", false);
1178
- let body;
1179
- body = JSON.stringify((0, smithy_client_1.take)(input, {
1180
- CertificateExpiryInMilliseconds: [],
1181
- }));
1182
- b.m("PUT").h(headers).b(body);
1183
- return b.build();
1184
- };
1185
- exports.se_UpdateGroupCertificateConfigurationCommand = se_UpdateGroupCertificateConfigurationCommand;
1186
- const se_UpdateLoggerDefinitionCommand = async (input, context) => {
1187
- const b = (0, core_1.requestBuilder)(input, context);
1188
- const headers = {
1189
- "content-type": "application/json",
1190
- };
1191
- b.bp("/greengrass/definition/loggers/{LoggerDefinitionId}");
1192
- b.p("LoggerDefinitionId", () => input.LoggerDefinitionId, "{LoggerDefinitionId}", false);
1193
- let body;
1194
- body = JSON.stringify((0, smithy_client_1.take)(input, {
1195
- Name: [],
1196
- }));
1197
- b.m("PUT").h(headers).b(body);
1198
- return b.build();
1199
- };
1200
- exports.se_UpdateLoggerDefinitionCommand = se_UpdateLoggerDefinitionCommand;
1201
- const se_UpdateResourceDefinitionCommand = async (input, context) => {
1202
- const b = (0, core_1.requestBuilder)(input, context);
1203
- const headers = {
1204
- "content-type": "application/json",
1205
- };
1206
- b.bp("/greengrass/definition/resources/{ResourceDefinitionId}");
1207
- b.p("ResourceDefinitionId", () => input.ResourceDefinitionId, "{ResourceDefinitionId}", false);
1208
- let body;
1209
- body = JSON.stringify((0, smithy_client_1.take)(input, {
1210
- Name: [],
1211
- }));
1212
- b.m("PUT").h(headers).b(body);
1213
- return b.build();
1214
- };
1215
- exports.se_UpdateResourceDefinitionCommand = se_UpdateResourceDefinitionCommand;
1216
- const se_UpdateSubscriptionDefinitionCommand = async (input, context) => {
1217
- const b = (0, core_1.requestBuilder)(input, context);
1218
- const headers = {
1219
- "content-type": "application/json",
1220
- };
1221
- b.bp("/greengrass/definition/subscriptions/{SubscriptionDefinitionId}");
1222
- b.p("SubscriptionDefinitionId", () => input.SubscriptionDefinitionId, "{SubscriptionDefinitionId}", false);
1223
- let body;
1224
- body = JSON.stringify((0, smithy_client_1.take)(input, {
1225
- Name: [],
1226
- }));
1227
- b.m("PUT").h(headers).b(body);
1228
- return b.build();
1229
- };
1230
- exports.se_UpdateSubscriptionDefinitionCommand = se_UpdateSubscriptionDefinitionCommand;
1231
- const se_UpdateThingRuntimeConfigurationCommand = async (input, context) => {
1232
- const b = (0, core_1.requestBuilder)(input, context);
1233
- const headers = {
1234
- "content-type": "application/json",
1235
- };
1236
- b.bp("/greengrass/things/{ThingName}/runtimeconfig");
1237
- b.p("ThingName", () => input.ThingName, "{ThingName}", false);
1238
- let body;
1239
- body = JSON.stringify((0, smithy_client_1.take)(input, {
1240
- TelemetryConfiguration: (_) => (0, smithy_client_1._json)(_),
1241
- }));
1242
- b.m("PUT").h(headers).b(body);
1243
- return b.build();
1244
- };
1245
- exports.se_UpdateThingRuntimeConfigurationCommand = se_UpdateThingRuntimeConfigurationCommand;
1246
- const de_AssociateRoleToGroupCommand = async (output, context) => {
1247
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1248
- return de_AssociateRoleToGroupCommandError(output, context);
1249
- }
1250
- const contents = (0, smithy_client_1.map)({
1251
- $metadata: deserializeMetadata(output),
1252
- });
1253
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1254
- const doc = (0, smithy_client_1.take)(data, {
1255
- AssociatedAt: smithy_client_1.expectString,
1256
- });
1257
- Object.assign(contents, doc);
1258
- return contents;
1259
- };
1260
- exports.de_AssociateRoleToGroupCommand = de_AssociateRoleToGroupCommand;
1261
- const de_AssociateRoleToGroupCommandError = async (output, context) => {
1262
- const parsedOutput = {
1263
- ...output,
1264
- body: await parseErrorBody(output.body, context),
1265
- };
1266
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1267
- switch (errorCode) {
1268
- case "BadRequestException":
1269
- case "com.amazonaws.greengrass#BadRequestException":
1270
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1271
- case "InternalServerErrorException":
1272
- case "com.amazonaws.greengrass#InternalServerErrorException":
1273
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1274
- default:
1275
- const parsedBody = parsedOutput.body;
1276
- return throwDefaultError({
1277
- output,
1278
- parsedBody,
1279
- errorCode,
1280
- });
1281
- }
1282
- };
1283
- const de_AssociateServiceRoleToAccountCommand = async (output, context) => {
1284
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1285
- return de_AssociateServiceRoleToAccountCommandError(output, context);
1286
- }
1287
- const contents = (0, smithy_client_1.map)({
1288
- $metadata: deserializeMetadata(output),
1289
- });
1290
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1291
- const doc = (0, smithy_client_1.take)(data, {
1292
- AssociatedAt: smithy_client_1.expectString,
1293
- });
1294
- Object.assign(contents, doc);
1295
- return contents;
1296
- };
1297
- exports.de_AssociateServiceRoleToAccountCommand = de_AssociateServiceRoleToAccountCommand;
1298
- const de_AssociateServiceRoleToAccountCommandError = async (output, context) => {
1299
- const parsedOutput = {
1300
- ...output,
1301
- body: await parseErrorBody(output.body, context),
1302
- };
1303
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1304
- switch (errorCode) {
1305
- case "BadRequestException":
1306
- case "com.amazonaws.greengrass#BadRequestException":
1307
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1308
- case "InternalServerErrorException":
1309
- case "com.amazonaws.greengrass#InternalServerErrorException":
1310
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1311
- default:
1312
- const parsedBody = parsedOutput.body;
1313
- return throwDefaultError({
1314
- output,
1315
- parsedBody,
1316
- errorCode,
1317
- });
1318
- }
1319
- };
1320
- const de_CreateConnectorDefinitionCommand = async (output, context) => {
1321
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1322
- return de_CreateConnectorDefinitionCommandError(output, context);
1323
- }
1324
- const contents = (0, smithy_client_1.map)({
1325
- $metadata: deserializeMetadata(output),
1326
- });
1327
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1328
- const doc = (0, smithy_client_1.take)(data, {
1329
- Arn: smithy_client_1.expectString,
1330
- CreationTimestamp: smithy_client_1.expectString,
1331
- Id: smithy_client_1.expectString,
1332
- LastUpdatedTimestamp: smithy_client_1.expectString,
1333
- LatestVersion: smithy_client_1.expectString,
1334
- LatestVersionArn: smithy_client_1.expectString,
1335
- Name: smithy_client_1.expectString,
1336
- });
1337
- Object.assign(contents, doc);
1338
- return contents;
1339
- };
1340
- exports.de_CreateConnectorDefinitionCommand = de_CreateConnectorDefinitionCommand;
1341
- const de_CreateConnectorDefinitionCommandError = async (output, context) => {
1342
- const parsedOutput = {
1343
- ...output,
1344
- body: await parseErrorBody(output.body, context),
1345
- };
1346
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1347
- switch (errorCode) {
1348
- case "BadRequestException":
1349
- case "com.amazonaws.greengrass#BadRequestException":
1350
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1351
- default:
1352
- const parsedBody = parsedOutput.body;
1353
- return throwDefaultError({
1354
- output,
1355
- parsedBody,
1356
- errorCode,
1357
- });
1358
- }
1359
- };
1360
- const de_CreateConnectorDefinitionVersionCommand = async (output, context) => {
1361
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1362
- return de_CreateConnectorDefinitionVersionCommandError(output, context);
1363
- }
1364
- const contents = (0, smithy_client_1.map)({
1365
- $metadata: deserializeMetadata(output),
1366
- });
1367
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1368
- const doc = (0, smithy_client_1.take)(data, {
1369
- Arn: smithy_client_1.expectString,
1370
- CreationTimestamp: smithy_client_1.expectString,
1371
- Id: smithy_client_1.expectString,
1372
- Version: smithy_client_1.expectString,
1373
- });
1374
- Object.assign(contents, doc);
1375
- return contents;
1376
- };
1377
- exports.de_CreateConnectorDefinitionVersionCommand = de_CreateConnectorDefinitionVersionCommand;
1378
- const de_CreateConnectorDefinitionVersionCommandError = async (output, context) => {
1379
- const parsedOutput = {
1380
- ...output,
1381
- body: await parseErrorBody(output.body, context),
1382
- };
1383
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1384
- switch (errorCode) {
1385
- case "BadRequestException":
1386
- case "com.amazonaws.greengrass#BadRequestException":
1387
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1388
- default:
1389
- const parsedBody = parsedOutput.body;
1390
- return throwDefaultError({
1391
- output,
1392
- parsedBody,
1393
- errorCode,
1394
- });
1395
- }
1396
- };
1397
- const de_CreateCoreDefinitionCommand = async (output, context) => {
1398
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1399
- return de_CreateCoreDefinitionCommandError(output, context);
1400
- }
1401
- const contents = (0, smithy_client_1.map)({
1402
- $metadata: deserializeMetadata(output),
1403
- });
1404
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1405
- const doc = (0, smithy_client_1.take)(data, {
1406
- Arn: smithy_client_1.expectString,
1407
- CreationTimestamp: smithy_client_1.expectString,
1408
- Id: smithy_client_1.expectString,
1409
- LastUpdatedTimestamp: smithy_client_1.expectString,
1410
- LatestVersion: smithy_client_1.expectString,
1411
- LatestVersionArn: smithy_client_1.expectString,
1412
- Name: smithy_client_1.expectString,
1413
- });
1414
- Object.assign(contents, doc);
1415
- return contents;
1416
- };
1417
- exports.de_CreateCoreDefinitionCommand = de_CreateCoreDefinitionCommand;
1418
- const de_CreateCoreDefinitionCommandError = async (output, context) => {
1419
- const parsedOutput = {
1420
- ...output,
1421
- body: await parseErrorBody(output.body, context),
1422
- };
1423
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1424
- switch (errorCode) {
1425
- case "BadRequestException":
1426
- case "com.amazonaws.greengrass#BadRequestException":
1427
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1428
- default:
1429
- const parsedBody = parsedOutput.body;
1430
- return throwDefaultError({
1431
- output,
1432
- parsedBody,
1433
- errorCode,
1434
- });
1435
- }
1436
- };
1437
- const de_CreateCoreDefinitionVersionCommand = async (output, context) => {
1438
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1439
- return de_CreateCoreDefinitionVersionCommandError(output, context);
1440
- }
1441
- const contents = (0, smithy_client_1.map)({
1442
- $metadata: deserializeMetadata(output),
1443
- });
1444
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1445
- const doc = (0, smithy_client_1.take)(data, {
1446
- Arn: smithy_client_1.expectString,
1447
- CreationTimestamp: smithy_client_1.expectString,
1448
- Id: smithy_client_1.expectString,
1449
- Version: smithy_client_1.expectString,
1450
- });
1451
- Object.assign(contents, doc);
1452
- return contents;
1453
- };
1454
- exports.de_CreateCoreDefinitionVersionCommand = de_CreateCoreDefinitionVersionCommand;
1455
- const de_CreateCoreDefinitionVersionCommandError = async (output, context) => {
1456
- const parsedOutput = {
1457
- ...output,
1458
- body: await parseErrorBody(output.body, context),
1459
- };
1460
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1461
- switch (errorCode) {
1462
- case "BadRequestException":
1463
- case "com.amazonaws.greengrass#BadRequestException":
1464
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1465
- default:
1466
- const parsedBody = parsedOutput.body;
1467
- return throwDefaultError({
1468
- output,
1469
- parsedBody,
1470
- errorCode,
1471
- });
1472
- }
1473
- };
1474
- const de_CreateDeploymentCommand = async (output, context) => {
1475
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1476
- return de_CreateDeploymentCommandError(output, context);
1477
- }
1478
- const contents = (0, smithy_client_1.map)({
1479
- $metadata: deserializeMetadata(output),
1480
- });
1481
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1482
- const doc = (0, smithy_client_1.take)(data, {
1483
- DeploymentArn: smithy_client_1.expectString,
1484
- DeploymentId: smithy_client_1.expectString,
1485
- });
1486
- Object.assign(contents, doc);
1487
- return contents;
1488
- };
1489
- exports.de_CreateDeploymentCommand = de_CreateDeploymentCommand;
1490
- const de_CreateDeploymentCommandError = async (output, context) => {
1491
- const parsedOutput = {
1492
- ...output,
1493
- body: await parseErrorBody(output.body, context),
1494
- };
1495
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1496
- switch (errorCode) {
1497
- case "BadRequestException":
1498
- case "com.amazonaws.greengrass#BadRequestException":
1499
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1500
- default:
1501
- const parsedBody = parsedOutput.body;
1502
- return throwDefaultError({
1503
- output,
1504
- parsedBody,
1505
- errorCode,
1506
- });
1507
- }
1508
- };
1509
- const de_CreateDeviceDefinitionCommand = async (output, context) => {
1510
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1511
- return de_CreateDeviceDefinitionCommandError(output, context);
1512
- }
1513
- const contents = (0, smithy_client_1.map)({
1514
- $metadata: deserializeMetadata(output),
1515
- });
1516
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1517
- const doc = (0, smithy_client_1.take)(data, {
1518
- Arn: smithy_client_1.expectString,
1519
- CreationTimestamp: smithy_client_1.expectString,
1520
- Id: smithy_client_1.expectString,
1521
- LastUpdatedTimestamp: smithy_client_1.expectString,
1522
- LatestVersion: smithy_client_1.expectString,
1523
- LatestVersionArn: smithy_client_1.expectString,
1524
- Name: smithy_client_1.expectString,
1525
- });
1526
- Object.assign(contents, doc);
1527
- return contents;
1528
- };
1529
- exports.de_CreateDeviceDefinitionCommand = de_CreateDeviceDefinitionCommand;
1530
- const de_CreateDeviceDefinitionCommandError = async (output, context) => {
1531
- const parsedOutput = {
1532
- ...output,
1533
- body: await parseErrorBody(output.body, context),
1534
- };
1535
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1536
- switch (errorCode) {
1537
- case "BadRequestException":
1538
- case "com.amazonaws.greengrass#BadRequestException":
1539
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1540
- default:
1541
- const parsedBody = parsedOutput.body;
1542
- return throwDefaultError({
1543
- output,
1544
- parsedBody,
1545
- errorCode,
1546
- });
1547
- }
1548
- };
1549
- const de_CreateDeviceDefinitionVersionCommand = async (output, context) => {
1550
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1551
- return de_CreateDeviceDefinitionVersionCommandError(output, context);
1552
- }
1553
- const contents = (0, smithy_client_1.map)({
1554
- $metadata: deserializeMetadata(output),
1555
- });
1556
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1557
- const doc = (0, smithy_client_1.take)(data, {
1558
- Arn: smithy_client_1.expectString,
1559
- CreationTimestamp: smithy_client_1.expectString,
1560
- Id: smithy_client_1.expectString,
1561
- Version: smithy_client_1.expectString,
1562
- });
1563
- Object.assign(contents, doc);
1564
- return contents;
1565
- };
1566
- exports.de_CreateDeviceDefinitionVersionCommand = de_CreateDeviceDefinitionVersionCommand;
1567
- const de_CreateDeviceDefinitionVersionCommandError = async (output, context) => {
1568
- const parsedOutput = {
1569
- ...output,
1570
- body: await parseErrorBody(output.body, context),
1571
- };
1572
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1573
- switch (errorCode) {
1574
- case "BadRequestException":
1575
- case "com.amazonaws.greengrass#BadRequestException":
1576
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1577
- default:
1578
- const parsedBody = parsedOutput.body;
1579
- return throwDefaultError({
1580
- output,
1581
- parsedBody,
1582
- errorCode,
1583
- });
1584
- }
1585
- };
1586
- const de_CreateFunctionDefinitionCommand = async (output, context) => {
1587
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1588
- return de_CreateFunctionDefinitionCommandError(output, context);
1589
- }
1590
- const contents = (0, smithy_client_1.map)({
1591
- $metadata: deserializeMetadata(output),
1592
- });
1593
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1594
- const doc = (0, smithy_client_1.take)(data, {
1595
- Arn: smithy_client_1.expectString,
1596
- CreationTimestamp: smithy_client_1.expectString,
1597
- Id: smithy_client_1.expectString,
1598
- LastUpdatedTimestamp: smithy_client_1.expectString,
1599
- LatestVersion: smithy_client_1.expectString,
1600
- LatestVersionArn: smithy_client_1.expectString,
1601
- Name: smithy_client_1.expectString,
1602
- });
1603
- Object.assign(contents, doc);
1604
- return contents;
1605
- };
1606
- exports.de_CreateFunctionDefinitionCommand = de_CreateFunctionDefinitionCommand;
1607
- const de_CreateFunctionDefinitionCommandError = async (output, context) => {
1608
- const parsedOutput = {
1609
- ...output,
1610
- body: await parseErrorBody(output.body, context),
1611
- };
1612
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1613
- switch (errorCode) {
1614
- case "BadRequestException":
1615
- case "com.amazonaws.greengrass#BadRequestException":
1616
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1617
- default:
1618
- const parsedBody = parsedOutput.body;
1619
- return throwDefaultError({
1620
- output,
1621
- parsedBody,
1622
- errorCode,
1623
- });
1624
- }
1625
- };
1626
- const de_CreateFunctionDefinitionVersionCommand = async (output, context) => {
1627
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1628
- return de_CreateFunctionDefinitionVersionCommandError(output, context);
1629
- }
1630
- const contents = (0, smithy_client_1.map)({
1631
- $metadata: deserializeMetadata(output),
1632
- });
1633
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1634
- const doc = (0, smithy_client_1.take)(data, {
1635
- Arn: smithy_client_1.expectString,
1636
- CreationTimestamp: smithy_client_1.expectString,
1637
- Id: smithy_client_1.expectString,
1638
- Version: smithy_client_1.expectString,
1639
- });
1640
- Object.assign(contents, doc);
1641
- return contents;
1642
- };
1643
- exports.de_CreateFunctionDefinitionVersionCommand = de_CreateFunctionDefinitionVersionCommand;
1644
- const de_CreateFunctionDefinitionVersionCommandError = async (output, context) => {
1645
- const parsedOutput = {
1646
- ...output,
1647
- body: await parseErrorBody(output.body, context),
1648
- };
1649
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1650
- switch (errorCode) {
1651
- case "BadRequestException":
1652
- case "com.amazonaws.greengrass#BadRequestException":
1653
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1654
- default:
1655
- const parsedBody = parsedOutput.body;
1656
- return throwDefaultError({
1657
- output,
1658
- parsedBody,
1659
- errorCode,
1660
- });
1661
- }
1662
- };
1663
- const de_CreateGroupCommand = async (output, context) => {
1664
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1665
- return de_CreateGroupCommandError(output, context);
1666
- }
1667
- const contents = (0, smithy_client_1.map)({
1668
- $metadata: deserializeMetadata(output),
1669
- });
1670
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1671
- const doc = (0, smithy_client_1.take)(data, {
1672
- Arn: smithy_client_1.expectString,
1673
- CreationTimestamp: smithy_client_1.expectString,
1674
- Id: smithy_client_1.expectString,
1675
- LastUpdatedTimestamp: smithy_client_1.expectString,
1676
- LatestVersion: smithy_client_1.expectString,
1677
- LatestVersionArn: smithy_client_1.expectString,
1678
- Name: smithy_client_1.expectString,
1679
- });
1680
- Object.assign(contents, doc);
1681
- return contents;
1682
- };
1683
- exports.de_CreateGroupCommand = de_CreateGroupCommand;
1684
- const de_CreateGroupCommandError = async (output, context) => {
1685
- const parsedOutput = {
1686
- ...output,
1687
- body: await parseErrorBody(output.body, context),
1688
- };
1689
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1690
- switch (errorCode) {
1691
- case "BadRequestException":
1692
- case "com.amazonaws.greengrass#BadRequestException":
1693
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1694
- default:
1695
- const parsedBody = parsedOutput.body;
1696
- return throwDefaultError({
1697
- output,
1698
- parsedBody,
1699
- errorCode,
1700
- });
1701
- }
1702
- };
1703
- const de_CreateGroupCertificateAuthorityCommand = async (output, context) => {
1704
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1705
- return de_CreateGroupCertificateAuthorityCommandError(output, context);
1706
- }
1707
- const contents = (0, smithy_client_1.map)({
1708
- $metadata: deserializeMetadata(output),
1709
- });
1710
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1711
- const doc = (0, smithy_client_1.take)(data, {
1712
- GroupCertificateAuthorityArn: smithy_client_1.expectString,
1713
- });
1714
- Object.assign(contents, doc);
1715
- return contents;
1716
- };
1717
- exports.de_CreateGroupCertificateAuthorityCommand = de_CreateGroupCertificateAuthorityCommand;
1718
- const de_CreateGroupCertificateAuthorityCommandError = async (output, context) => {
1719
- const parsedOutput = {
1720
- ...output,
1721
- body: await parseErrorBody(output.body, context),
1722
- };
1723
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1724
- switch (errorCode) {
1725
- case "BadRequestException":
1726
- case "com.amazonaws.greengrass#BadRequestException":
1727
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1728
- case "InternalServerErrorException":
1729
- case "com.amazonaws.greengrass#InternalServerErrorException":
1730
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1731
- default:
1732
- const parsedBody = parsedOutput.body;
1733
- return throwDefaultError({
1734
- output,
1735
- parsedBody,
1736
- errorCode,
1737
- });
1738
- }
1739
- };
1740
- const de_CreateGroupVersionCommand = async (output, context) => {
1741
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1742
- return de_CreateGroupVersionCommandError(output, context);
1743
- }
1744
- const contents = (0, smithy_client_1.map)({
1745
- $metadata: deserializeMetadata(output),
1746
- });
1747
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1748
- const doc = (0, smithy_client_1.take)(data, {
1749
- Arn: smithy_client_1.expectString,
1750
- CreationTimestamp: smithy_client_1.expectString,
1751
- Id: smithy_client_1.expectString,
1752
- Version: smithy_client_1.expectString,
1753
- });
1754
- Object.assign(contents, doc);
1755
- return contents;
1756
- };
1757
- exports.de_CreateGroupVersionCommand = de_CreateGroupVersionCommand;
1758
- const de_CreateGroupVersionCommandError = async (output, context) => {
1759
- const parsedOutput = {
1760
- ...output,
1761
- body: await parseErrorBody(output.body, context),
1762
- };
1763
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1764
- switch (errorCode) {
1765
- case "BadRequestException":
1766
- case "com.amazonaws.greengrass#BadRequestException":
1767
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1768
- default:
1769
- const parsedBody = parsedOutput.body;
1770
- return throwDefaultError({
1771
- output,
1772
- parsedBody,
1773
- errorCode,
1774
- });
1775
- }
1776
- };
1777
- const de_CreateLoggerDefinitionCommand = async (output, context) => {
1778
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1779
- return de_CreateLoggerDefinitionCommandError(output, context);
1780
- }
1781
- const contents = (0, smithy_client_1.map)({
1782
- $metadata: deserializeMetadata(output),
1783
- });
1784
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1785
- const doc = (0, smithy_client_1.take)(data, {
1786
- Arn: smithy_client_1.expectString,
1787
- CreationTimestamp: smithy_client_1.expectString,
1788
- Id: smithy_client_1.expectString,
1789
- LastUpdatedTimestamp: smithy_client_1.expectString,
1790
- LatestVersion: smithy_client_1.expectString,
1791
- LatestVersionArn: smithy_client_1.expectString,
1792
- Name: smithy_client_1.expectString,
1793
- });
1794
- Object.assign(contents, doc);
1795
- return contents;
1796
- };
1797
- exports.de_CreateLoggerDefinitionCommand = de_CreateLoggerDefinitionCommand;
1798
- const de_CreateLoggerDefinitionCommandError = async (output, context) => {
1799
- const parsedOutput = {
1800
- ...output,
1801
- body: await parseErrorBody(output.body, context),
1802
- };
1803
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1804
- switch (errorCode) {
1805
- case "BadRequestException":
1806
- case "com.amazonaws.greengrass#BadRequestException":
1807
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1808
- default:
1809
- const parsedBody = parsedOutput.body;
1810
- return throwDefaultError({
1811
- output,
1812
- parsedBody,
1813
- errorCode,
1814
- });
1815
- }
1816
- };
1817
- const de_CreateLoggerDefinitionVersionCommand = async (output, context) => {
1818
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1819
- return de_CreateLoggerDefinitionVersionCommandError(output, context);
1820
- }
1821
- const contents = (0, smithy_client_1.map)({
1822
- $metadata: deserializeMetadata(output),
1823
- });
1824
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1825
- const doc = (0, smithy_client_1.take)(data, {
1826
- Arn: smithy_client_1.expectString,
1827
- CreationTimestamp: smithy_client_1.expectString,
1828
- Id: smithy_client_1.expectString,
1829
- Version: smithy_client_1.expectString,
1830
- });
1831
- Object.assign(contents, doc);
1832
- return contents;
1833
- };
1834
- exports.de_CreateLoggerDefinitionVersionCommand = de_CreateLoggerDefinitionVersionCommand;
1835
- const de_CreateLoggerDefinitionVersionCommandError = async (output, context) => {
1836
- const parsedOutput = {
1837
- ...output,
1838
- body: await parseErrorBody(output.body, context),
1839
- };
1840
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1841
- switch (errorCode) {
1842
- case "BadRequestException":
1843
- case "com.amazonaws.greengrass#BadRequestException":
1844
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1845
- default:
1846
- const parsedBody = parsedOutput.body;
1847
- return throwDefaultError({
1848
- output,
1849
- parsedBody,
1850
- errorCode,
1851
- });
1852
- }
1853
- };
1854
- const de_CreateResourceDefinitionCommand = async (output, context) => {
1855
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1856
- return de_CreateResourceDefinitionCommandError(output, context);
1857
- }
1858
- const contents = (0, smithy_client_1.map)({
1859
- $metadata: deserializeMetadata(output),
1860
- });
1861
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1862
- const doc = (0, smithy_client_1.take)(data, {
1863
- Arn: smithy_client_1.expectString,
1864
- CreationTimestamp: smithy_client_1.expectString,
1865
- Id: smithy_client_1.expectString,
1866
- LastUpdatedTimestamp: smithy_client_1.expectString,
1867
- LatestVersion: smithy_client_1.expectString,
1868
- LatestVersionArn: smithy_client_1.expectString,
1869
- Name: smithy_client_1.expectString,
1870
- });
1871
- Object.assign(contents, doc);
1872
- return contents;
1873
- };
1874
- exports.de_CreateResourceDefinitionCommand = de_CreateResourceDefinitionCommand;
1875
- const de_CreateResourceDefinitionCommandError = async (output, context) => {
1876
- const parsedOutput = {
1877
- ...output,
1878
- body: await parseErrorBody(output.body, context),
1879
- };
1880
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1881
- switch (errorCode) {
1882
- case "BadRequestException":
1883
- case "com.amazonaws.greengrass#BadRequestException":
1884
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1885
- default:
1886
- const parsedBody = parsedOutput.body;
1887
- return throwDefaultError({
1888
- output,
1889
- parsedBody,
1890
- errorCode,
1891
- });
1892
- }
1893
- };
1894
- const de_CreateResourceDefinitionVersionCommand = async (output, context) => {
1895
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1896
- return de_CreateResourceDefinitionVersionCommandError(output, context);
1897
- }
1898
- const contents = (0, smithy_client_1.map)({
1899
- $metadata: deserializeMetadata(output),
1900
- });
1901
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1902
- const doc = (0, smithy_client_1.take)(data, {
1903
- Arn: smithy_client_1.expectString,
1904
- CreationTimestamp: smithy_client_1.expectString,
1905
- Id: smithy_client_1.expectString,
1906
- Version: smithy_client_1.expectString,
1907
- });
1908
- Object.assign(contents, doc);
1909
- return contents;
1910
- };
1911
- exports.de_CreateResourceDefinitionVersionCommand = de_CreateResourceDefinitionVersionCommand;
1912
- const de_CreateResourceDefinitionVersionCommandError = async (output, context) => {
1913
- const parsedOutput = {
1914
- ...output,
1915
- body: await parseErrorBody(output.body, context),
1916
- };
1917
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1918
- switch (errorCode) {
1919
- case "BadRequestException":
1920
- case "com.amazonaws.greengrass#BadRequestException":
1921
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1922
- default:
1923
- const parsedBody = parsedOutput.body;
1924
- return throwDefaultError({
1925
- output,
1926
- parsedBody,
1927
- errorCode,
1928
- });
1929
- }
1930
- };
1931
- const de_CreateSoftwareUpdateJobCommand = async (output, context) => {
1932
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1933
- return de_CreateSoftwareUpdateJobCommandError(output, context);
1934
- }
1935
- const contents = (0, smithy_client_1.map)({
1936
- $metadata: deserializeMetadata(output),
1937
- });
1938
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1939
- const doc = (0, smithy_client_1.take)(data, {
1940
- IotJobArn: smithy_client_1.expectString,
1941
- IotJobId: smithy_client_1.expectString,
1942
- PlatformSoftwareVersion: smithy_client_1.expectString,
1943
- });
1944
- Object.assign(contents, doc);
1945
- return contents;
1946
- };
1947
- exports.de_CreateSoftwareUpdateJobCommand = de_CreateSoftwareUpdateJobCommand;
1948
- const de_CreateSoftwareUpdateJobCommandError = async (output, context) => {
1949
- const parsedOutput = {
1950
- ...output,
1951
- body: await parseErrorBody(output.body, context),
1952
- };
1953
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1954
- switch (errorCode) {
1955
- case "BadRequestException":
1956
- case "com.amazonaws.greengrass#BadRequestException":
1957
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1958
- case "InternalServerErrorException":
1959
- case "com.amazonaws.greengrass#InternalServerErrorException":
1960
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1961
- default:
1962
- const parsedBody = parsedOutput.body;
1963
- return throwDefaultError({
1964
- output,
1965
- parsedBody,
1966
- errorCode,
1967
- });
1968
- }
1969
- };
1970
- const de_CreateSubscriptionDefinitionCommand = async (output, context) => {
1971
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1972
- return de_CreateSubscriptionDefinitionCommandError(output, context);
1973
- }
1974
- const contents = (0, smithy_client_1.map)({
1975
- $metadata: deserializeMetadata(output),
1976
- });
1977
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1978
- const doc = (0, smithy_client_1.take)(data, {
1979
- Arn: smithy_client_1.expectString,
1980
- CreationTimestamp: smithy_client_1.expectString,
1981
- Id: smithy_client_1.expectString,
1982
- LastUpdatedTimestamp: smithy_client_1.expectString,
1983
- LatestVersion: smithy_client_1.expectString,
1984
- LatestVersionArn: smithy_client_1.expectString,
1985
- Name: smithy_client_1.expectString,
1986
- });
1987
- Object.assign(contents, doc);
1988
- return contents;
1989
- };
1990
- exports.de_CreateSubscriptionDefinitionCommand = de_CreateSubscriptionDefinitionCommand;
1991
- const de_CreateSubscriptionDefinitionCommandError = async (output, context) => {
1992
- const parsedOutput = {
1993
- ...output,
1994
- body: await parseErrorBody(output.body, context),
1995
- };
1996
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1997
- switch (errorCode) {
1998
- case "BadRequestException":
1999
- case "com.amazonaws.greengrass#BadRequestException":
2000
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2001
- default:
2002
- const parsedBody = parsedOutput.body;
2003
- return throwDefaultError({
2004
- output,
2005
- parsedBody,
2006
- errorCode,
2007
- });
2008
- }
2009
- };
2010
- const de_CreateSubscriptionDefinitionVersionCommand = async (output, context) => {
2011
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2012
- return de_CreateSubscriptionDefinitionVersionCommandError(output, context);
2013
- }
2014
- const contents = (0, smithy_client_1.map)({
2015
- $metadata: deserializeMetadata(output),
2016
- });
2017
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2018
- const doc = (0, smithy_client_1.take)(data, {
2019
- Arn: smithy_client_1.expectString,
2020
- CreationTimestamp: smithy_client_1.expectString,
2021
- Id: smithy_client_1.expectString,
2022
- Version: smithy_client_1.expectString,
2023
- });
2024
- Object.assign(contents, doc);
2025
- return contents;
2026
- };
2027
- exports.de_CreateSubscriptionDefinitionVersionCommand = de_CreateSubscriptionDefinitionVersionCommand;
2028
- const de_CreateSubscriptionDefinitionVersionCommandError = async (output, context) => {
2029
- const parsedOutput = {
2030
- ...output,
2031
- body: await parseErrorBody(output.body, context),
2032
- };
2033
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2034
- switch (errorCode) {
2035
- case "BadRequestException":
2036
- case "com.amazonaws.greengrass#BadRequestException":
2037
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2038
- default:
2039
- const parsedBody = parsedOutput.body;
2040
- return throwDefaultError({
2041
- output,
2042
- parsedBody,
2043
- errorCode,
2044
- });
2045
- }
2046
- };
2047
- const de_DeleteConnectorDefinitionCommand = async (output, context) => {
2048
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2049
- return de_DeleteConnectorDefinitionCommandError(output, context);
2050
- }
2051
- const contents = (0, smithy_client_1.map)({
2052
- $metadata: deserializeMetadata(output),
2053
- });
2054
- await (0, smithy_client_1.collectBody)(output.body, context);
2055
- return contents;
2056
- };
2057
- exports.de_DeleteConnectorDefinitionCommand = de_DeleteConnectorDefinitionCommand;
2058
- const de_DeleteConnectorDefinitionCommandError = async (output, context) => {
2059
- const parsedOutput = {
2060
- ...output,
2061
- body: await parseErrorBody(output.body, context),
2062
- };
2063
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2064
- switch (errorCode) {
2065
- case "BadRequestException":
2066
- case "com.amazonaws.greengrass#BadRequestException":
2067
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2068
- default:
2069
- const parsedBody = parsedOutput.body;
2070
- return throwDefaultError({
2071
- output,
2072
- parsedBody,
2073
- errorCode,
2074
- });
2075
- }
2076
- };
2077
- const de_DeleteCoreDefinitionCommand = async (output, context) => {
2078
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2079
- return de_DeleteCoreDefinitionCommandError(output, context);
2080
- }
2081
- const contents = (0, smithy_client_1.map)({
2082
- $metadata: deserializeMetadata(output),
2083
- });
2084
- await (0, smithy_client_1.collectBody)(output.body, context);
2085
- return contents;
2086
- };
2087
- exports.de_DeleteCoreDefinitionCommand = de_DeleteCoreDefinitionCommand;
2088
- const de_DeleteCoreDefinitionCommandError = async (output, context) => {
2089
- const parsedOutput = {
2090
- ...output,
2091
- body: await parseErrorBody(output.body, context),
2092
- };
2093
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2094
- switch (errorCode) {
2095
- case "BadRequestException":
2096
- case "com.amazonaws.greengrass#BadRequestException":
2097
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2098
- default:
2099
- const parsedBody = parsedOutput.body;
2100
- return throwDefaultError({
2101
- output,
2102
- parsedBody,
2103
- errorCode,
2104
- });
2105
- }
2106
- };
2107
- const de_DeleteDeviceDefinitionCommand = async (output, context) => {
2108
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2109
- return de_DeleteDeviceDefinitionCommandError(output, context);
2110
- }
2111
- const contents = (0, smithy_client_1.map)({
2112
- $metadata: deserializeMetadata(output),
2113
- });
2114
- await (0, smithy_client_1.collectBody)(output.body, context);
2115
- return contents;
2116
- };
2117
- exports.de_DeleteDeviceDefinitionCommand = de_DeleteDeviceDefinitionCommand;
2118
- const de_DeleteDeviceDefinitionCommandError = async (output, context) => {
2119
- const parsedOutput = {
2120
- ...output,
2121
- body: await parseErrorBody(output.body, context),
2122
- };
2123
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2124
- switch (errorCode) {
2125
- case "BadRequestException":
2126
- case "com.amazonaws.greengrass#BadRequestException":
2127
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2128
- default:
2129
- const parsedBody = parsedOutput.body;
2130
- return throwDefaultError({
2131
- output,
2132
- parsedBody,
2133
- errorCode,
2134
- });
2135
- }
2136
- };
2137
- const de_DeleteFunctionDefinitionCommand = async (output, context) => {
2138
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2139
- return de_DeleteFunctionDefinitionCommandError(output, context);
2140
- }
2141
- const contents = (0, smithy_client_1.map)({
2142
- $metadata: deserializeMetadata(output),
2143
- });
2144
- await (0, smithy_client_1.collectBody)(output.body, context);
2145
- return contents;
2146
- };
2147
- exports.de_DeleteFunctionDefinitionCommand = de_DeleteFunctionDefinitionCommand;
2148
- const de_DeleteFunctionDefinitionCommandError = async (output, context) => {
2149
- const parsedOutput = {
2150
- ...output,
2151
- body: await parseErrorBody(output.body, context),
2152
- };
2153
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2154
- switch (errorCode) {
2155
- case "BadRequestException":
2156
- case "com.amazonaws.greengrass#BadRequestException":
2157
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2158
- default:
2159
- const parsedBody = parsedOutput.body;
2160
- return throwDefaultError({
2161
- output,
2162
- parsedBody,
2163
- errorCode,
2164
- });
2165
- }
2166
- };
2167
- const de_DeleteGroupCommand = async (output, context) => {
2168
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2169
- return de_DeleteGroupCommandError(output, context);
2170
- }
2171
- const contents = (0, smithy_client_1.map)({
2172
- $metadata: deserializeMetadata(output),
2173
- });
2174
- await (0, smithy_client_1.collectBody)(output.body, context);
2175
- return contents;
2176
- };
2177
- exports.de_DeleteGroupCommand = de_DeleteGroupCommand;
2178
- const de_DeleteGroupCommandError = async (output, context) => {
2179
- const parsedOutput = {
2180
- ...output,
2181
- body: await parseErrorBody(output.body, context),
2182
- };
2183
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2184
- switch (errorCode) {
2185
- case "BadRequestException":
2186
- case "com.amazonaws.greengrass#BadRequestException":
2187
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2188
- default:
2189
- const parsedBody = parsedOutput.body;
2190
- return throwDefaultError({
2191
- output,
2192
- parsedBody,
2193
- errorCode,
2194
- });
2195
- }
2196
- };
2197
- const de_DeleteLoggerDefinitionCommand = async (output, context) => {
2198
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2199
- return de_DeleteLoggerDefinitionCommandError(output, context);
2200
- }
2201
- const contents = (0, smithy_client_1.map)({
2202
- $metadata: deserializeMetadata(output),
2203
- });
2204
- await (0, smithy_client_1.collectBody)(output.body, context);
2205
- return contents;
2206
- };
2207
- exports.de_DeleteLoggerDefinitionCommand = de_DeleteLoggerDefinitionCommand;
2208
- const de_DeleteLoggerDefinitionCommandError = async (output, context) => {
2209
- const parsedOutput = {
2210
- ...output,
2211
- body: await parseErrorBody(output.body, context),
2212
- };
2213
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2214
- switch (errorCode) {
2215
- case "BadRequestException":
2216
- case "com.amazonaws.greengrass#BadRequestException":
2217
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2218
- default:
2219
- const parsedBody = parsedOutput.body;
2220
- return throwDefaultError({
2221
- output,
2222
- parsedBody,
2223
- errorCode,
2224
- });
2225
- }
2226
- };
2227
- const de_DeleteResourceDefinitionCommand = async (output, context) => {
2228
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2229
- return de_DeleteResourceDefinitionCommandError(output, context);
2230
- }
2231
- const contents = (0, smithy_client_1.map)({
2232
- $metadata: deserializeMetadata(output),
2233
- });
2234
- await (0, smithy_client_1.collectBody)(output.body, context);
2235
- return contents;
2236
- };
2237
- exports.de_DeleteResourceDefinitionCommand = de_DeleteResourceDefinitionCommand;
2238
- const de_DeleteResourceDefinitionCommandError = async (output, context) => {
2239
- const parsedOutput = {
2240
- ...output,
2241
- body: await parseErrorBody(output.body, context),
2242
- };
2243
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2244
- switch (errorCode) {
2245
- case "BadRequestException":
2246
- case "com.amazonaws.greengrass#BadRequestException":
2247
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2248
- default:
2249
- const parsedBody = parsedOutput.body;
2250
- return throwDefaultError({
2251
- output,
2252
- parsedBody,
2253
- errorCode,
2254
- });
2255
- }
2256
- };
2257
- const de_DeleteSubscriptionDefinitionCommand = async (output, context) => {
2258
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2259
- return de_DeleteSubscriptionDefinitionCommandError(output, context);
2260
- }
2261
- const contents = (0, smithy_client_1.map)({
2262
- $metadata: deserializeMetadata(output),
2263
- });
2264
- await (0, smithy_client_1.collectBody)(output.body, context);
2265
- return contents;
2266
- };
2267
- exports.de_DeleteSubscriptionDefinitionCommand = de_DeleteSubscriptionDefinitionCommand;
2268
- const de_DeleteSubscriptionDefinitionCommandError = async (output, context) => {
2269
- const parsedOutput = {
2270
- ...output,
2271
- body: await parseErrorBody(output.body, context),
2272
- };
2273
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2274
- switch (errorCode) {
2275
- case "BadRequestException":
2276
- case "com.amazonaws.greengrass#BadRequestException":
2277
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2278
- default:
2279
- const parsedBody = parsedOutput.body;
2280
- return throwDefaultError({
2281
- output,
2282
- parsedBody,
2283
- errorCode,
2284
- });
2285
- }
2286
- };
2287
- const de_DisassociateRoleFromGroupCommand = async (output, context) => {
2288
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2289
- return de_DisassociateRoleFromGroupCommandError(output, context);
2290
- }
2291
- const contents = (0, smithy_client_1.map)({
2292
- $metadata: deserializeMetadata(output),
2293
- });
2294
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2295
- const doc = (0, smithy_client_1.take)(data, {
2296
- DisassociatedAt: smithy_client_1.expectString,
2297
- });
2298
- Object.assign(contents, doc);
2299
- return contents;
2300
- };
2301
- exports.de_DisassociateRoleFromGroupCommand = de_DisassociateRoleFromGroupCommand;
2302
- const de_DisassociateRoleFromGroupCommandError = async (output, context) => {
2303
- const parsedOutput = {
2304
- ...output,
2305
- body: await parseErrorBody(output.body, context),
2306
- };
2307
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2308
- switch (errorCode) {
2309
- case "BadRequestException":
2310
- case "com.amazonaws.greengrass#BadRequestException":
2311
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2312
- case "InternalServerErrorException":
2313
- case "com.amazonaws.greengrass#InternalServerErrorException":
2314
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
2315
- default:
2316
- const parsedBody = parsedOutput.body;
2317
- return throwDefaultError({
2318
- output,
2319
- parsedBody,
2320
- errorCode,
2321
- });
2322
- }
2323
- };
2324
- const de_DisassociateServiceRoleFromAccountCommand = async (output, context) => {
2325
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2326
- return de_DisassociateServiceRoleFromAccountCommandError(output, context);
2327
- }
2328
- const contents = (0, smithy_client_1.map)({
2329
- $metadata: deserializeMetadata(output),
2330
- });
2331
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2332
- const doc = (0, smithy_client_1.take)(data, {
2333
- DisassociatedAt: smithy_client_1.expectString,
2334
- });
2335
- Object.assign(contents, doc);
2336
- return contents;
2337
- };
2338
- exports.de_DisassociateServiceRoleFromAccountCommand = de_DisassociateServiceRoleFromAccountCommand;
2339
- const de_DisassociateServiceRoleFromAccountCommandError = async (output, context) => {
2340
- const parsedOutput = {
2341
- ...output,
2342
- body: await parseErrorBody(output.body, context),
2343
- };
2344
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2345
- switch (errorCode) {
2346
- case "InternalServerErrorException":
2347
- case "com.amazonaws.greengrass#InternalServerErrorException":
2348
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
2349
- default:
2350
- const parsedBody = parsedOutput.body;
2351
- return throwDefaultError({
2352
- output,
2353
- parsedBody,
2354
- errorCode,
2355
- });
2356
- }
2357
- };
2358
- const de_GetAssociatedRoleCommand = async (output, context) => {
2359
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2360
- return de_GetAssociatedRoleCommandError(output, context);
2361
- }
2362
- const contents = (0, smithy_client_1.map)({
2363
- $metadata: deserializeMetadata(output),
2364
- });
2365
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2366
- const doc = (0, smithy_client_1.take)(data, {
2367
- AssociatedAt: smithy_client_1.expectString,
2368
- RoleArn: smithy_client_1.expectString,
2369
- });
2370
- Object.assign(contents, doc);
2371
- return contents;
2372
- };
2373
- exports.de_GetAssociatedRoleCommand = de_GetAssociatedRoleCommand;
2374
- const de_GetAssociatedRoleCommandError = async (output, context) => {
2375
- const parsedOutput = {
2376
- ...output,
2377
- body: await parseErrorBody(output.body, context),
2378
- };
2379
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2380
- switch (errorCode) {
2381
- case "BadRequestException":
2382
- case "com.amazonaws.greengrass#BadRequestException":
2383
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2384
- case "InternalServerErrorException":
2385
- case "com.amazonaws.greengrass#InternalServerErrorException":
2386
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
2387
- default:
2388
- const parsedBody = parsedOutput.body;
2389
- return throwDefaultError({
2390
- output,
2391
- parsedBody,
2392
- errorCode,
2393
- });
2394
- }
2395
- };
2396
- const de_GetBulkDeploymentStatusCommand = async (output, context) => {
2397
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2398
- return de_GetBulkDeploymentStatusCommandError(output, context);
2399
- }
2400
- const contents = (0, smithy_client_1.map)({
2401
- $metadata: deserializeMetadata(output),
2402
- });
2403
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2404
- const doc = (0, smithy_client_1.take)(data, {
2405
- BulkDeploymentMetrics: smithy_client_1._json,
2406
- BulkDeploymentStatus: smithy_client_1.expectString,
2407
- CreatedAt: smithy_client_1.expectString,
2408
- ErrorDetails: smithy_client_1._json,
2409
- ErrorMessage: smithy_client_1.expectString,
2410
- tags: smithy_client_1._json,
2411
- });
2412
- Object.assign(contents, doc);
2413
- return contents;
2414
- };
2415
- exports.de_GetBulkDeploymentStatusCommand = de_GetBulkDeploymentStatusCommand;
2416
- const de_GetBulkDeploymentStatusCommandError = async (output, context) => {
2417
- const parsedOutput = {
2418
- ...output,
2419
- body: await parseErrorBody(output.body, context),
2420
- };
2421
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2422
- switch (errorCode) {
2423
- case "BadRequestException":
2424
- case "com.amazonaws.greengrass#BadRequestException":
2425
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2426
- default:
2427
- const parsedBody = parsedOutput.body;
2428
- return throwDefaultError({
2429
- output,
2430
- parsedBody,
2431
- errorCode,
2432
- });
2433
- }
2434
- };
2435
- const de_GetConnectivityInfoCommand = async (output, context) => {
2436
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2437
- return de_GetConnectivityInfoCommandError(output, context);
2438
- }
2439
- const contents = (0, smithy_client_1.map)({
2440
- $metadata: deserializeMetadata(output),
2441
- });
2442
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2443
- const doc = (0, smithy_client_1.take)(data, {
2444
- ConnectivityInfo: smithy_client_1._json,
2445
- Message: [, smithy_client_1.expectString, `message`],
2446
- });
2447
- Object.assign(contents, doc);
2448
- return contents;
2449
- };
2450
- exports.de_GetConnectivityInfoCommand = de_GetConnectivityInfoCommand;
2451
- const de_GetConnectivityInfoCommandError = async (output, context) => {
2452
- const parsedOutput = {
2453
- ...output,
2454
- body: await parseErrorBody(output.body, context),
2455
- };
2456
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2457
- switch (errorCode) {
2458
- case "BadRequestException":
2459
- case "com.amazonaws.greengrass#BadRequestException":
2460
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2461
- case "InternalServerErrorException":
2462
- case "com.amazonaws.greengrass#InternalServerErrorException":
2463
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
2464
- default:
2465
- const parsedBody = parsedOutput.body;
2466
- return throwDefaultError({
2467
- output,
2468
- parsedBody,
2469
- errorCode,
2470
- });
2471
- }
2472
- };
2473
- const de_GetConnectorDefinitionCommand = async (output, context) => {
2474
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2475
- return de_GetConnectorDefinitionCommandError(output, context);
2476
- }
2477
- const contents = (0, smithy_client_1.map)({
2478
- $metadata: deserializeMetadata(output),
2479
- });
2480
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2481
- const doc = (0, smithy_client_1.take)(data, {
2482
- Arn: smithy_client_1.expectString,
2483
- CreationTimestamp: smithy_client_1.expectString,
2484
- Id: smithy_client_1.expectString,
2485
- LastUpdatedTimestamp: smithy_client_1.expectString,
2486
- LatestVersion: smithy_client_1.expectString,
2487
- LatestVersionArn: smithy_client_1.expectString,
2488
- Name: smithy_client_1.expectString,
2489
- tags: smithy_client_1._json,
2490
- });
2491
- Object.assign(contents, doc);
2492
- return contents;
2493
- };
2494
- exports.de_GetConnectorDefinitionCommand = de_GetConnectorDefinitionCommand;
2495
- const de_GetConnectorDefinitionCommandError = async (output, context) => {
2496
- const parsedOutput = {
2497
- ...output,
2498
- body: await parseErrorBody(output.body, context),
2499
- };
2500
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2501
- switch (errorCode) {
2502
- case "BadRequestException":
2503
- case "com.amazonaws.greengrass#BadRequestException":
2504
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2505
- default:
2506
- const parsedBody = parsedOutput.body;
2507
- return throwDefaultError({
2508
- output,
2509
- parsedBody,
2510
- errorCode,
2511
- });
2512
- }
2513
- };
2514
- const de_GetConnectorDefinitionVersionCommand = async (output, context) => {
2515
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2516
- return de_GetConnectorDefinitionVersionCommandError(output, context);
2517
- }
2518
- const contents = (0, smithy_client_1.map)({
2519
- $metadata: deserializeMetadata(output),
2520
- });
2521
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2522
- const doc = (0, smithy_client_1.take)(data, {
2523
- Arn: smithy_client_1.expectString,
2524
- CreationTimestamp: smithy_client_1.expectString,
2525
- Definition: smithy_client_1._json,
2526
- Id: smithy_client_1.expectString,
2527
- NextToken: smithy_client_1.expectString,
2528
- Version: smithy_client_1.expectString,
2529
- });
2530
- Object.assign(contents, doc);
2531
- return contents;
2532
- };
2533
- exports.de_GetConnectorDefinitionVersionCommand = de_GetConnectorDefinitionVersionCommand;
2534
- const de_GetConnectorDefinitionVersionCommandError = async (output, context) => {
2535
- const parsedOutput = {
2536
- ...output,
2537
- body: await parseErrorBody(output.body, context),
2538
- };
2539
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2540
- switch (errorCode) {
2541
- case "BadRequestException":
2542
- case "com.amazonaws.greengrass#BadRequestException":
2543
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2544
- default:
2545
- const parsedBody = parsedOutput.body;
2546
- return throwDefaultError({
2547
- output,
2548
- parsedBody,
2549
- errorCode,
2550
- });
2551
- }
2552
- };
2553
- const de_GetCoreDefinitionCommand = async (output, context) => {
2554
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2555
- return de_GetCoreDefinitionCommandError(output, context);
2556
- }
2557
- const contents = (0, smithy_client_1.map)({
2558
- $metadata: deserializeMetadata(output),
2559
- });
2560
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2561
- const doc = (0, smithy_client_1.take)(data, {
2562
- Arn: smithy_client_1.expectString,
2563
- CreationTimestamp: smithy_client_1.expectString,
2564
- Id: smithy_client_1.expectString,
2565
- LastUpdatedTimestamp: smithy_client_1.expectString,
2566
- LatestVersion: smithy_client_1.expectString,
2567
- LatestVersionArn: smithy_client_1.expectString,
2568
- Name: smithy_client_1.expectString,
2569
- tags: smithy_client_1._json,
2570
- });
2571
- Object.assign(contents, doc);
2572
- return contents;
2573
- };
2574
- exports.de_GetCoreDefinitionCommand = de_GetCoreDefinitionCommand;
2575
- const de_GetCoreDefinitionCommandError = async (output, context) => {
2576
- const parsedOutput = {
2577
- ...output,
2578
- body: await parseErrorBody(output.body, context),
2579
- };
2580
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2581
- switch (errorCode) {
2582
- case "BadRequestException":
2583
- case "com.amazonaws.greengrass#BadRequestException":
2584
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2585
- default:
2586
- const parsedBody = parsedOutput.body;
2587
- return throwDefaultError({
2588
- output,
2589
- parsedBody,
2590
- errorCode,
2591
- });
2592
- }
2593
- };
2594
- const de_GetCoreDefinitionVersionCommand = async (output, context) => {
2595
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2596
- return de_GetCoreDefinitionVersionCommandError(output, context);
2597
- }
2598
- const contents = (0, smithy_client_1.map)({
2599
- $metadata: deserializeMetadata(output),
2600
- });
2601
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2602
- const doc = (0, smithy_client_1.take)(data, {
2603
- Arn: smithy_client_1.expectString,
2604
- CreationTimestamp: smithy_client_1.expectString,
2605
- Definition: smithy_client_1._json,
2606
- Id: smithy_client_1.expectString,
2607
- NextToken: smithy_client_1.expectString,
2608
- Version: smithy_client_1.expectString,
2609
- });
2610
- Object.assign(contents, doc);
2611
- return contents;
2612
- };
2613
- exports.de_GetCoreDefinitionVersionCommand = de_GetCoreDefinitionVersionCommand;
2614
- const de_GetCoreDefinitionVersionCommandError = async (output, context) => {
2615
- const parsedOutput = {
2616
- ...output,
2617
- body: await parseErrorBody(output.body, context),
2618
- };
2619
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2620
- switch (errorCode) {
2621
- case "BadRequestException":
2622
- case "com.amazonaws.greengrass#BadRequestException":
2623
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2624
- default:
2625
- const parsedBody = parsedOutput.body;
2626
- return throwDefaultError({
2627
- output,
2628
- parsedBody,
2629
- errorCode,
2630
- });
2631
- }
2632
- };
2633
- const de_GetDeploymentStatusCommand = async (output, context) => {
2634
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2635
- return de_GetDeploymentStatusCommandError(output, context);
2636
- }
2637
- const contents = (0, smithy_client_1.map)({
2638
- $metadata: deserializeMetadata(output),
2639
- });
2640
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2641
- const doc = (0, smithy_client_1.take)(data, {
2642
- DeploymentStatus: smithy_client_1.expectString,
2643
- DeploymentType: smithy_client_1.expectString,
2644
- ErrorDetails: smithy_client_1._json,
2645
- ErrorMessage: smithy_client_1.expectString,
2646
- UpdatedAt: smithy_client_1.expectString,
2647
- });
2648
- Object.assign(contents, doc);
2649
- return contents;
2650
- };
2651
- exports.de_GetDeploymentStatusCommand = de_GetDeploymentStatusCommand;
2652
- const de_GetDeploymentStatusCommandError = async (output, context) => {
2653
- const parsedOutput = {
2654
- ...output,
2655
- body: await parseErrorBody(output.body, context),
2656
- };
2657
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2658
- switch (errorCode) {
2659
- case "BadRequestException":
2660
- case "com.amazonaws.greengrass#BadRequestException":
2661
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2662
- default:
2663
- const parsedBody = parsedOutput.body;
2664
- return throwDefaultError({
2665
- output,
2666
- parsedBody,
2667
- errorCode,
2668
- });
2669
- }
2670
- };
2671
- const de_GetDeviceDefinitionCommand = async (output, context) => {
2672
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2673
- return de_GetDeviceDefinitionCommandError(output, context);
2674
- }
2675
- const contents = (0, smithy_client_1.map)({
2676
- $metadata: deserializeMetadata(output),
2677
- });
2678
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2679
- const doc = (0, smithy_client_1.take)(data, {
2680
- Arn: smithy_client_1.expectString,
2681
- CreationTimestamp: smithy_client_1.expectString,
2682
- Id: smithy_client_1.expectString,
2683
- LastUpdatedTimestamp: smithy_client_1.expectString,
2684
- LatestVersion: smithy_client_1.expectString,
2685
- LatestVersionArn: smithy_client_1.expectString,
2686
- Name: smithy_client_1.expectString,
2687
- tags: smithy_client_1._json,
2688
- });
2689
- Object.assign(contents, doc);
2690
- return contents;
2691
- };
2692
- exports.de_GetDeviceDefinitionCommand = de_GetDeviceDefinitionCommand;
2693
- const de_GetDeviceDefinitionCommandError = async (output, context) => {
2694
- const parsedOutput = {
2695
- ...output,
2696
- body: await parseErrorBody(output.body, context),
2697
- };
2698
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2699
- switch (errorCode) {
2700
- case "BadRequestException":
2701
- case "com.amazonaws.greengrass#BadRequestException":
2702
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2703
- default:
2704
- const parsedBody = parsedOutput.body;
2705
- return throwDefaultError({
2706
- output,
2707
- parsedBody,
2708
- errorCode,
2709
- });
2710
- }
2711
- };
2712
- const de_GetDeviceDefinitionVersionCommand = async (output, context) => {
2713
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2714
- return de_GetDeviceDefinitionVersionCommandError(output, context);
2715
- }
2716
- const contents = (0, smithy_client_1.map)({
2717
- $metadata: deserializeMetadata(output),
2718
- });
2719
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2720
- const doc = (0, smithy_client_1.take)(data, {
2721
- Arn: smithy_client_1.expectString,
2722
- CreationTimestamp: smithy_client_1.expectString,
2723
- Definition: smithy_client_1._json,
2724
- Id: smithy_client_1.expectString,
2725
- NextToken: smithy_client_1.expectString,
2726
- Version: smithy_client_1.expectString,
2727
- });
2728
- Object.assign(contents, doc);
2729
- return contents;
2730
- };
2731
- exports.de_GetDeviceDefinitionVersionCommand = de_GetDeviceDefinitionVersionCommand;
2732
- const de_GetDeviceDefinitionVersionCommandError = async (output, context) => {
2733
- const parsedOutput = {
2734
- ...output,
2735
- body: await parseErrorBody(output.body, context),
2736
- };
2737
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2738
- switch (errorCode) {
2739
- case "BadRequestException":
2740
- case "com.amazonaws.greengrass#BadRequestException":
2741
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2742
- default:
2743
- const parsedBody = parsedOutput.body;
2744
- return throwDefaultError({
2745
- output,
2746
- parsedBody,
2747
- errorCode,
2748
- });
2749
- }
2750
- };
2751
- const de_GetFunctionDefinitionCommand = async (output, context) => {
2752
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2753
- return de_GetFunctionDefinitionCommandError(output, context);
2754
- }
2755
- const contents = (0, smithy_client_1.map)({
2756
- $metadata: deserializeMetadata(output),
2757
- });
2758
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2759
- const doc = (0, smithy_client_1.take)(data, {
2760
- Arn: smithy_client_1.expectString,
2761
- CreationTimestamp: smithy_client_1.expectString,
2762
- Id: smithy_client_1.expectString,
2763
- LastUpdatedTimestamp: smithy_client_1.expectString,
2764
- LatestVersion: smithy_client_1.expectString,
2765
- LatestVersionArn: smithy_client_1.expectString,
2766
- Name: smithy_client_1.expectString,
2767
- tags: smithy_client_1._json,
2768
- });
2769
- Object.assign(contents, doc);
2770
- return contents;
2771
- };
2772
- exports.de_GetFunctionDefinitionCommand = de_GetFunctionDefinitionCommand;
2773
- const de_GetFunctionDefinitionCommandError = async (output, context) => {
2774
- const parsedOutput = {
2775
- ...output,
2776
- body: await parseErrorBody(output.body, context),
2777
- };
2778
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2779
- switch (errorCode) {
2780
- case "BadRequestException":
2781
- case "com.amazonaws.greengrass#BadRequestException":
2782
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2783
- default:
2784
- const parsedBody = parsedOutput.body;
2785
- return throwDefaultError({
2786
- output,
2787
- parsedBody,
2788
- errorCode,
2789
- });
2790
- }
2791
- };
2792
- const de_GetFunctionDefinitionVersionCommand = async (output, context) => {
2793
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2794
- return de_GetFunctionDefinitionVersionCommandError(output, context);
2795
- }
2796
- const contents = (0, smithy_client_1.map)({
2797
- $metadata: deserializeMetadata(output),
2798
- });
2799
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2800
- const doc = (0, smithy_client_1.take)(data, {
2801
- Arn: smithy_client_1.expectString,
2802
- CreationTimestamp: smithy_client_1.expectString,
2803
- Definition: smithy_client_1._json,
2804
- Id: smithy_client_1.expectString,
2805
- NextToken: smithy_client_1.expectString,
2806
- Version: smithy_client_1.expectString,
2807
- });
2808
- Object.assign(contents, doc);
2809
- return contents;
2810
- };
2811
- exports.de_GetFunctionDefinitionVersionCommand = de_GetFunctionDefinitionVersionCommand;
2812
- const de_GetFunctionDefinitionVersionCommandError = async (output, context) => {
2813
- const parsedOutput = {
2814
- ...output,
2815
- body: await parseErrorBody(output.body, context),
2816
- };
2817
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2818
- switch (errorCode) {
2819
- case "BadRequestException":
2820
- case "com.amazonaws.greengrass#BadRequestException":
2821
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2822
- default:
2823
- const parsedBody = parsedOutput.body;
2824
- return throwDefaultError({
2825
- output,
2826
- parsedBody,
2827
- errorCode,
2828
- });
2829
- }
2830
- };
2831
- const de_GetGroupCommand = async (output, context) => {
2832
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2833
- return de_GetGroupCommandError(output, context);
2834
- }
2835
- const contents = (0, smithy_client_1.map)({
2836
- $metadata: deserializeMetadata(output),
2837
- });
2838
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2839
- const doc = (0, smithy_client_1.take)(data, {
2840
- Arn: smithy_client_1.expectString,
2841
- CreationTimestamp: smithy_client_1.expectString,
2842
- Id: smithy_client_1.expectString,
2843
- LastUpdatedTimestamp: smithy_client_1.expectString,
2844
- LatestVersion: smithy_client_1.expectString,
2845
- LatestVersionArn: smithy_client_1.expectString,
2846
- Name: smithy_client_1.expectString,
2847
- tags: smithy_client_1._json,
2848
- });
2849
- Object.assign(contents, doc);
2850
- return contents;
2851
- };
2852
- exports.de_GetGroupCommand = de_GetGroupCommand;
2853
- const de_GetGroupCommandError = async (output, context) => {
2854
- const parsedOutput = {
2855
- ...output,
2856
- body: await parseErrorBody(output.body, context),
2857
- };
2858
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2859
- switch (errorCode) {
2860
- case "BadRequestException":
2861
- case "com.amazonaws.greengrass#BadRequestException":
2862
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2863
- default:
2864
- const parsedBody = parsedOutput.body;
2865
- return throwDefaultError({
2866
- output,
2867
- parsedBody,
2868
- errorCode,
2869
- });
2870
- }
2871
- };
2872
- const de_GetGroupCertificateAuthorityCommand = async (output, context) => {
2873
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2874
- return de_GetGroupCertificateAuthorityCommandError(output, context);
2875
- }
2876
- const contents = (0, smithy_client_1.map)({
2877
- $metadata: deserializeMetadata(output),
2878
- });
2879
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2880
- const doc = (0, smithy_client_1.take)(data, {
2881
- GroupCertificateAuthorityArn: smithy_client_1.expectString,
2882
- GroupCertificateAuthorityId: smithy_client_1.expectString,
2883
- PemEncodedCertificate: smithy_client_1.expectString,
2884
- });
2885
- Object.assign(contents, doc);
2886
- return contents;
2887
- };
2888
- exports.de_GetGroupCertificateAuthorityCommand = de_GetGroupCertificateAuthorityCommand;
2889
- const de_GetGroupCertificateAuthorityCommandError = async (output, context) => {
2890
- const parsedOutput = {
2891
- ...output,
2892
- body: await parseErrorBody(output.body, context),
2893
- };
2894
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2895
- switch (errorCode) {
2896
- case "BadRequestException":
2897
- case "com.amazonaws.greengrass#BadRequestException":
2898
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2899
- case "InternalServerErrorException":
2900
- case "com.amazonaws.greengrass#InternalServerErrorException":
2901
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
2902
- default:
2903
- const parsedBody = parsedOutput.body;
2904
- return throwDefaultError({
2905
- output,
2906
- parsedBody,
2907
- errorCode,
2908
- });
2909
- }
2910
- };
2911
- const de_GetGroupCertificateConfigurationCommand = async (output, context) => {
2912
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2913
- return de_GetGroupCertificateConfigurationCommandError(output, context);
2914
- }
2915
- const contents = (0, smithy_client_1.map)({
2916
- $metadata: deserializeMetadata(output),
2917
- });
2918
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2919
- const doc = (0, smithy_client_1.take)(data, {
2920
- CertificateAuthorityExpiryInMilliseconds: smithy_client_1.expectString,
2921
- CertificateExpiryInMilliseconds: smithy_client_1.expectString,
2922
- GroupId: smithy_client_1.expectString,
2923
- });
2924
- Object.assign(contents, doc);
2925
- return contents;
2926
- };
2927
- exports.de_GetGroupCertificateConfigurationCommand = de_GetGroupCertificateConfigurationCommand;
2928
- const de_GetGroupCertificateConfigurationCommandError = async (output, context) => {
2929
- const parsedOutput = {
2930
- ...output,
2931
- body: await parseErrorBody(output.body, context),
2932
- };
2933
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2934
- switch (errorCode) {
2935
- case "BadRequestException":
2936
- case "com.amazonaws.greengrass#BadRequestException":
2937
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2938
- case "InternalServerErrorException":
2939
- case "com.amazonaws.greengrass#InternalServerErrorException":
2940
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
2941
- default:
2942
- const parsedBody = parsedOutput.body;
2943
- return throwDefaultError({
2944
- output,
2945
- parsedBody,
2946
- errorCode,
2947
- });
2948
- }
2949
- };
2950
- const de_GetGroupVersionCommand = async (output, context) => {
2951
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2952
- return de_GetGroupVersionCommandError(output, context);
2953
- }
2954
- const contents = (0, smithy_client_1.map)({
2955
- $metadata: deserializeMetadata(output),
2956
- });
2957
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2958
- const doc = (0, smithy_client_1.take)(data, {
2959
- Arn: smithy_client_1.expectString,
2960
- CreationTimestamp: smithy_client_1.expectString,
2961
- Definition: smithy_client_1._json,
2962
- Id: smithy_client_1.expectString,
2963
- Version: smithy_client_1.expectString,
2964
- });
2965
- Object.assign(contents, doc);
2966
- return contents;
2967
- };
2968
- exports.de_GetGroupVersionCommand = de_GetGroupVersionCommand;
2969
- const de_GetGroupVersionCommandError = async (output, context) => {
2970
- const parsedOutput = {
2971
- ...output,
2972
- body: await parseErrorBody(output.body, context),
2973
- };
2974
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2975
- switch (errorCode) {
2976
- case "BadRequestException":
2977
- case "com.amazonaws.greengrass#BadRequestException":
2978
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2979
- default:
2980
- const parsedBody = parsedOutput.body;
2981
- return throwDefaultError({
2982
- output,
2983
- parsedBody,
2984
- errorCode,
2985
- });
2986
- }
2987
- };
2988
- const de_GetLoggerDefinitionCommand = async (output, context) => {
2989
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2990
- return de_GetLoggerDefinitionCommandError(output, context);
2991
- }
2992
- const contents = (0, smithy_client_1.map)({
2993
- $metadata: deserializeMetadata(output),
2994
- });
2995
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2996
- const doc = (0, smithy_client_1.take)(data, {
2997
- Arn: smithy_client_1.expectString,
2998
- CreationTimestamp: smithy_client_1.expectString,
2999
- Id: smithy_client_1.expectString,
3000
- LastUpdatedTimestamp: smithy_client_1.expectString,
3001
- LatestVersion: smithy_client_1.expectString,
3002
- LatestVersionArn: smithy_client_1.expectString,
3003
- Name: smithy_client_1.expectString,
3004
- tags: smithy_client_1._json,
3005
- });
3006
- Object.assign(contents, doc);
3007
- return contents;
3008
- };
3009
- exports.de_GetLoggerDefinitionCommand = de_GetLoggerDefinitionCommand;
3010
- const de_GetLoggerDefinitionCommandError = async (output, context) => {
3011
- const parsedOutput = {
3012
- ...output,
3013
- body: await parseErrorBody(output.body, context),
3014
- };
3015
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3016
- switch (errorCode) {
3017
- case "BadRequestException":
3018
- case "com.amazonaws.greengrass#BadRequestException":
3019
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3020
- default:
3021
- const parsedBody = parsedOutput.body;
3022
- return throwDefaultError({
3023
- output,
3024
- parsedBody,
3025
- errorCode,
3026
- });
3027
- }
3028
- };
3029
- const de_GetLoggerDefinitionVersionCommand = async (output, context) => {
3030
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3031
- return de_GetLoggerDefinitionVersionCommandError(output, context);
3032
- }
3033
- const contents = (0, smithy_client_1.map)({
3034
- $metadata: deserializeMetadata(output),
3035
- });
3036
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3037
- const doc = (0, smithy_client_1.take)(data, {
3038
- Arn: smithy_client_1.expectString,
3039
- CreationTimestamp: smithy_client_1.expectString,
3040
- Definition: smithy_client_1._json,
3041
- Id: smithy_client_1.expectString,
3042
- Version: smithy_client_1.expectString,
3043
- });
3044
- Object.assign(contents, doc);
3045
- return contents;
3046
- };
3047
- exports.de_GetLoggerDefinitionVersionCommand = de_GetLoggerDefinitionVersionCommand;
3048
- const de_GetLoggerDefinitionVersionCommandError = async (output, context) => {
3049
- const parsedOutput = {
3050
- ...output,
3051
- body: await parseErrorBody(output.body, context),
3052
- };
3053
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3054
- switch (errorCode) {
3055
- case "BadRequestException":
3056
- case "com.amazonaws.greengrass#BadRequestException":
3057
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3058
- default:
3059
- const parsedBody = parsedOutput.body;
3060
- return throwDefaultError({
3061
- output,
3062
- parsedBody,
3063
- errorCode,
3064
- });
3065
- }
3066
- };
3067
- const de_GetResourceDefinitionCommand = async (output, context) => {
3068
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3069
- return de_GetResourceDefinitionCommandError(output, context);
3070
- }
3071
- const contents = (0, smithy_client_1.map)({
3072
- $metadata: deserializeMetadata(output),
3073
- });
3074
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3075
- const doc = (0, smithy_client_1.take)(data, {
3076
- Arn: smithy_client_1.expectString,
3077
- CreationTimestamp: smithy_client_1.expectString,
3078
- Id: smithy_client_1.expectString,
3079
- LastUpdatedTimestamp: smithy_client_1.expectString,
3080
- LatestVersion: smithy_client_1.expectString,
3081
- LatestVersionArn: smithy_client_1.expectString,
3082
- Name: smithy_client_1.expectString,
3083
- tags: smithy_client_1._json,
3084
- });
3085
- Object.assign(contents, doc);
3086
- return contents;
3087
- };
3088
- exports.de_GetResourceDefinitionCommand = de_GetResourceDefinitionCommand;
3089
- const de_GetResourceDefinitionCommandError = async (output, context) => {
3090
- const parsedOutput = {
3091
- ...output,
3092
- body: await parseErrorBody(output.body, context),
3093
- };
3094
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3095
- switch (errorCode) {
3096
- case "BadRequestException":
3097
- case "com.amazonaws.greengrass#BadRequestException":
3098
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3099
- default:
3100
- const parsedBody = parsedOutput.body;
3101
- return throwDefaultError({
3102
- output,
3103
- parsedBody,
3104
- errorCode,
3105
- });
3106
- }
3107
- };
3108
- const de_GetResourceDefinitionVersionCommand = async (output, context) => {
3109
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3110
- return de_GetResourceDefinitionVersionCommandError(output, context);
3111
- }
3112
- const contents = (0, smithy_client_1.map)({
3113
- $metadata: deserializeMetadata(output),
3114
- });
3115
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3116
- const doc = (0, smithy_client_1.take)(data, {
3117
- Arn: smithy_client_1.expectString,
3118
- CreationTimestamp: smithy_client_1.expectString,
3119
- Definition: smithy_client_1._json,
3120
- Id: smithy_client_1.expectString,
3121
- Version: smithy_client_1.expectString,
3122
- });
3123
- Object.assign(contents, doc);
3124
- return contents;
3125
- };
3126
- exports.de_GetResourceDefinitionVersionCommand = de_GetResourceDefinitionVersionCommand;
3127
- const de_GetResourceDefinitionVersionCommandError = async (output, context) => {
3128
- const parsedOutput = {
3129
- ...output,
3130
- body: await parseErrorBody(output.body, context),
3131
- };
3132
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3133
- switch (errorCode) {
3134
- case "BadRequestException":
3135
- case "com.amazonaws.greengrass#BadRequestException":
3136
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3137
- default:
3138
- const parsedBody = parsedOutput.body;
3139
- return throwDefaultError({
3140
- output,
3141
- parsedBody,
3142
- errorCode,
3143
- });
3144
- }
3145
- };
3146
- const de_GetServiceRoleForAccountCommand = async (output, context) => {
3147
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3148
- return de_GetServiceRoleForAccountCommandError(output, context);
3149
- }
3150
- const contents = (0, smithy_client_1.map)({
3151
- $metadata: deserializeMetadata(output),
3152
- });
3153
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3154
- const doc = (0, smithy_client_1.take)(data, {
3155
- AssociatedAt: smithy_client_1.expectString,
3156
- RoleArn: smithy_client_1.expectString,
3157
- });
3158
- Object.assign(contents, doc);
3159
- return contents;
3160
- };
3161
- exports.de_GetServiceRoleForAccountCommand = de_GetServiceRoleForAccountCommand;
3162
- const de_GetServiceRoleForAccountCommandError = async (output, context) => {
3163
- const parsedOutput = {
3164
- ...output,
3165
- body: await parseErrorBody(output.body, context),
3166
- };
3167
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3168
- switch (errorCode) {
3169
- case "InternalServerErrorException":
3170
- case "com.amazonaws.greengrass#InternalServerErrorException":
3171
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
3172
- default:
3173
- const parsedBody = parsedOutput.body;
3174
- return throwDefaultError({
3175
- output,
3176
- parsedBody,
3177
- errorCode,
3178
- });
3179
- }
3180
- };
3181
- const de_GetSubscriptionDefinitionCommand = async (output, context) => {
3182
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3183
- return de_GetSubscriptionDefinitionCommandError(output, context);
3184
- }
3185
- const contents = (0, smithy_client_1.map)({
3186
- $metadata: deserializeMetadata(output),
3187
- });
3188
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3189
- const doc = (0, smithy_client_1.take)(data, {
3190
- Arn: smithy_client_1.expectString,
3191
- CreationTimestamp: smithy_client_1.expectString,
3192
- Id: smithy_client_1.expectString,
3193
- LastUpdatedTimestamp: smithy_client_1.expectString,
3194
- LatestVersion: smithy_client_1.expectString,
3195
- LatestVersionArn: smithy_client_1.expectString,
3196
- Name: smithy_client_1.expectString,
3197
- tags: smithy_client_1._json,
3198
- });
3199
- Object.assign(contents, doc);
3200
- return contents;
3201
- };
3202
- exports.de_GetSubscriptionDefinitionCommand = de_GetSubscriptionDefinitionCommand;
3203
- const de_GetSubscriptionDefinitionCommandError = async (output, context) => {
3204
- const parsedOutput = {
3205
- ...output,
3206
- body: await parseErrorBody(output.body, context),
3207
- };
3208
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3209
- switch (errorCode) {
3210
- case "BadRequestException":
3211
- case "com.amazonaws.greengrass#BadRequestException":
3212
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3213
- default:
3214
- const parsedBody = parsedOutput.body;
3215
- return throwDefaultError({
3216
- output,
3217
- parsedBody,
3218
- errorCode,
3219
- });
3220
- }
3221
- };
3222
- const de_GetSubscriptionDefinitionVersionCommand = async (output, context) => {
3223
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3224
- return de_GetSubscriptionDefinitionVersionCommandError(output, context);
3225
- }
3226
- const contents = (0, smithy_client_1.map)({
3227
- $metadata: deserializeMetadata(output),
3228
- });
3229
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3230
- const doc = (0, smithy_client_1.take)(data, {
3231
- Arn: smithy_client_1.expectString,
3232
- CreationTimestamp: smithy_client_1.expectString,
3233
- Definition: smithy_client_1._json,
3234
- Id: smithy_client_1.expectString,
3235
- NextToken: smithy_client_1.expectString,
3236
- Version: smithy_client_1.expectString,
3237
- });
3238
- Object.assign(contents, doc);
3239
- return contents;
3240
- };
3241
- exports.de_GetSubscriptionDefinitionVersionCommand = de_GetSubscriptionDefinitionVersionCommand;
3242
- const de_GetSubscriptionDefinitionVersionCommandError = async (output, context) => {
3243
- const parsedOutput = {
3244
- ...output,
3245
- body: await parseErrorBody(output.body, context),
3246
- };
3247
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3248
- switch (errorCode) {
3249
- case "BadRequestException":
3250
- case "com.amazonaws.greengrass#BadRequestException":
3251
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3252
- default:
3253
- const parsedBody = parsedOutput.body;
3254
- return throwDefaultError({
3255
- output,
3256
- parsedBody,
3257
- errorCode,
3258
- });
3259
- }
3260
- };
3261
- const de_GetThingRuntimeConfigurationCommand = async (output, context) => {
3262
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3263
- return de_GetThingRuntimeConfigurationCommandError(output, context);
3264
- }
3265
- const contents = (0, smithy_client_1.map)({
3266
- $metadata: deserializeMetadata(output),
3267
- });
3268
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3269
- const doc = (0, smithy_client_1.take)(data, {
3270
- RuntimeConfiguration: smithy_client_1._json,
3271
- });
3272
- Object.assign(contents, doc);
3273
- return contents;
3274
- };
3275
- exports.de_GetThingRuntimeConfigurationCommand = de_GetThingRuntimeConfigurationCommand;
3276
- const de_GetThingRuntimeConfigurationCommandError = async (output, context) => {
3277
- const parsedOutput = {
3278
- ...output,
3279
- body: await parseErrorBody(output.body, context),
3280
- };
3281
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3282
- switch (errorCode) {
3283
- case "BadRequestException":
3284
- case "com.amazonaws.greengrass#BadRequestException":
3285
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3286
- case "InternalServerErrorException":
3287
- case "com.amazonaws.greengrass#InternalServerErrorException":
3288
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
3289
- default:
3290
- const parsedBody = parsedOutput.body;
3291
- return throwDefaultError({
3292
- output,
3293
- parsedBody,
3294
- errorCode,
3295
- });
3296
- }
3297
- };
3298
- const de_ListBulkDeploymentDetailedReportsCommand = async (output, context) => {
3299
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3300
- return de_ListBulkDeploymentDetailedReportsCommandError(output, context);
3301
- }
3302
- const contents = (0, smithy_client_1.map)({
3303
- $metadata: deserializeMetadata(output),
3304
- });
3305
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3306
- const doc = (0, smithy_client_1.take)(data, {
3307
- Deployments: smithy_client_1._json,
3308
- NextToken: smithy_client_1.expectString,
3309
- });
3310
- Object.assign(contents, doc);
3311
- return contents;
3312
- };
3313
- exports.de_ListBulkDeploymentDetailedReportsCommand = de_ListBulkDeploymentDetailedReportsCommand;
3314
- const de_ListBulkDeploymentDetailedReportsCommandError = async (output, context) => {
3315
- const parsedOutput = {
3316
- ...output,
3317
- body: await parseErrorBody(output.body, context),
3318
- };
3319
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3320
- switch (errorCode) {
3321
- case "BadRequestException":
3322
- case "com.amazonaws.greengrass#BadRequestException":
3323
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3324
- default:
3325
- const parsedBody = parsedOutput.body;
3326
- return throwDefaultError({
3327
- output,
3328
- parsedBody,
3329
- errorCode,
3330
- });
3331
- }
3332
- };
3333
- const de_ListBulkDeploymentsCommand = async (output, context) => {
3334
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3335
- return de_ListBulkDeploymentsCommandError(output, context);
3336
- }
3337
- const contents = (0, smithy_client_1.map)({
3338
- $metadata: deserializeMetadata(output),
3339
- });
3340
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3341
- const doc = (0, smithy_client_1.take)(data, {
3342
- BulkDeployments: smithy_client_1._json,
3343
- NextToken: smithy_client_1.expectString,
3344
- });
3345
- Object.assign(contents, doc);
3346
- return contents;
3347
- };
3348
- exports.de_ListBulkDeploymentsCommand = de_ListBulkDeploymentsCommand;
3349
- const de_ListBulkDeploymentsCommandError = async (output, context) => {
3350
- const parsedOutput = {
3351
- ...output,
3352
- body: await parseErrorBody(output.body, context),
3353
- };
3354
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3355
- switch (errorCode) {
3356
- case "BadRequestException":
3357
- case "com.amazonaws.greengrass#BadRequestException":
3358
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3359
- default:
3360
- const parsedBody = parsedOutput.body;
3361
- return throwDefaultError({
3362
- output,
3363
- parsedBody,
3364
- errorCode,
3365
- });
3366
- }
3367
- };
3368
- const de_ListConnectorDefinitionsCommand = async (output, context) => {
3369
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3370
- return de_ListConnectorDefinitionsCommandError(output, context);
3371
- }
3372
- const contents = (0, smithy_client_1.map)({
3373
- $metadata: deserializeMetadata(output),
3374
- });
3375
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3376
- const doc = (0, smithy_client_1.take)(data, {
3377
- Definitions: (_) => de___listOfDefinitionInformation(_, context),
3378
- NextToken: smithy_client_1.expectString,
3379
- });
3380
- Object.assign(contents, doc);
3381
- return contents;
3382
- };
3383
- exports.de_ListConnectorDefinitionsCommand = de_ListConnectorDefinitionsCommand;
3384
- const de_ListConnectorDefinitionsCommandError = async (output, context) => {
3385
- const parsedOutput = {
3386
- ...output,
3387
- body: await parseErrorBody(output.body, context),
3388
- };
3389
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3390
- const parsedBody = parsedOutput.body;
3391
- return throwDefaultError({
3392
- output,
3393
- parsedBody,
3394
- errorCode,
3395
- });
3396
- };
3397
- const de_ListConnectorDefinitionVersionsCommand = async (output, context) => {
3398
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3399
- return de_ListConnectorDefinitionVersionsCommandError(output, context);
3400
- }
3401
- const contents = (0, smithy_client_1.map)({
3402
- $metadata: deserializeMetadata(output),
3403
- });
3404
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3405
- const doc = (0, smithy_client_1.take)(data, {
3406
- NextToken: smithy_client_1.expectString,
3407
- Versions: smithy_client_1._json,
3408
- });
3409
- Object.assign(contents, doc);
3410
- return contents;
3411
- };
3412
- exports.de_ListConnectorDefinitionVersionsCommand = de_ListConnectorDefinitionVersionsCommand;
3413
- const de_ListConnectorDefinitionVersionsCommandError = async (output, context) => {
3414
- const parsedOutput = {
3415
- ...output,
3416
- body: await parseErrorBody(output.body, context),
3417
- };
3418
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3419
- switch (errorCode) {
3420
- case "BadRequestException":
3421
- case "com.amazonaws.greengrass#BadRequestException":
3422
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3423
- default:
3424
- const parsedBody = parsedOutput.body;
3425
- return throwDefaultError({
3426
- output,
3427
- parsedBody,
3428
- errorCode,
3429
- });
3430
- }
3431
- };
3432
- const de_ListCoreDefinitionsCommand = async (output, context) => {
3433
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3434
- return de_ListCoreDefinitionsCommandError(output, context);
3435
- }
3436
- const contents = (0, smithy_client_1.map)({
3437
- $metadata: deserializeMetadata(output),
3438
- });
3439
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3440
- const doc = (0, smithy_client_1.take)(data, {
3441
- Definitions: (_) => de___listOfDefinitionInformation(_, context),
3442
- NextToken: smithy_client_1.expectString,
3443
- });
3444
- Object.assign(contents, doc);
3445
- return contents;
3446
- };
3447
- exports.de_ListCoreDefinitionsCommand = de_ListCoreDefinitionsCommand;
3448
- const de_ListCoreDefinitionsCommandError = async (output, context) => {
3449
- const parsedOutput = {
3450
- ...output,
3451
- body: await parseErrorBody(output.body, context),
3452
- };
3453
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3454
- const parsedBody = parsedOutput.body;
3455
- return throwDefaultError({
3456
- output,
3457
- parsedBody,
3458
- errorCode,
3459
- });
3460
- };
3461
- const de_ListCoreDefinitionVersionsCommand = async (output, context) => {
3462
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3463
- return de_ListCoreDefinitionVersionsCommandError(output, context);
3464
- }
3465
- const contents = (0, smithy_client_1.map)({
3466
- $metadata: deserializeMetadata(output),
3467
- });
3468
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3469
- const doc = (0, smithy_client_1.take)(data, {
3470
- NextToken: smithy_client_1.expectString,
3471
- Versions: smithy_client_1._json,
3472
- });
3473
- Object.assign(contents, doc);
3474
- return contents;
3475
- };
3476
- exports.de_ListCoreDefinitionVersionsCommand = de_ListCoreDefinitionVersionsCommand;
3477
- const de_ListCoreDefinitionVersionsCommandError = async (output, context) => {
3478
- const parsedOutput = {
3479
- ...output,
3480
- body: await parseErrorBody(output.body, context),
3481
- };
3482
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3483
- switch (errorCode) {
3484
- case "BadRequestException":
3485
- case "com.amazonaws.greengrass#BadRequestException":
3486
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3487
- default:
3488
- const parsedBody = parsedOutput.body;
3489
- return throwDefaultError({
3490
- output,
3491
- parsedBody,
3492
- errorCode,
3493
- });
3494
- }
3495
- };
3496
- const de_ListDeploymentsCommand = async (output, context) => {
3497
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3498
- return de_ListDeploymentsCommandError(output, context);
3499
- }
3500
- const contents = (0, smithy_client_1.map)({
3501
- $metadata: deserializeMetadata(output),
3502
- });
3503
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3504
- const doc = (0, smithy_client_1.take)(data, {
3505
- Deployments: smithy_client_1._json,
3506
- NextToken: smithy_client_1.expectString,
3507
- });
3508
- Object.assign(contents, doc);
3509
- return contents;
3510
- };
3511
- exports.de_ListDeploymentsCommand = de_ListDeploymentsCommand;
3512
- const de_ListDeploymentsCommandError = async (output, context) => {
3513
- const parsedOutput = {
3514
- ...output,
3515
- body: await parseErrorBody(output.body, context),
3516
- };
3517
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3518
- switch (errorCode) {
3519
- case "BadRequestException":
3520
- case "com.amazonaws.greengrass#BadRequestException":
3521
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3522
- default:
3523
- const parsedBody = parsedOutput.body;
3524
- return throwDefaultError({
3525
- output,
3526
- parsedBody,
3527
- errorCode,
3528
- });
3529
- }
3530
- };
3531
- const de_ListDeviceDefinitionsCommand = async (output, context) => {
3532
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3533
- return de_ListDeviceDefinitionsCommandError(output, context);
3534
- }
3535
- const contents = (0, smithy_client_1.map)({
3536
- $metadata: deserializeMetadata(output),
3537
- });
3538
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3539
- const doc = (0, smithy_client_1.take)(data, {
3540
- Definitions: (_) => de___listOfDefinitionInformation(_, context),
3541
- NextToken: smithy_client_1.expectString,
3542
- });
3543
- Object.assign(contents, doc);
3544
- return contents;
3545
- };
3546
- exports.de_ListDeviceDefinitionsCommand = de_ListDeviceDefinitionsCommand;
3547
- const de_ListDeviceDefinitionsCommandError = async (output, context) => {
3548
- const parsedOutput = {
3549
- ...output,
3550
- body: await parseErrorBody(output.body, context),
3551
- };
3552
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3553
- const parsedBody = parsedOutput.body;
3554
- return throwDefaultError({
3555
- output,
3556
- parsedBody,
3557
- errorCode,
3558
- });
3559
- };
3560
- const de_ListDeviceDefinitionVersionsCommand = async (output, context) => {
3561
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3562
- return de_ListDeviceDefinitionVersionsCommandError(output, context);
3563
- }
3564
- const contents = (0, smithy_client_1.map)({
3565
- $metadata: deserializeMetadata(output),
3566
- });
3567
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3568
- const doc = (0, smithy_client_1.take)(data, {
3569
- NextToken: smithy_client_1.expectString,
3570
- Versions: smithy_client_1._json,
3571
- });
3572
- Object.assign(contents, doc);
3573
- return contents;
3574
- };
3575
- exports.de_ListDeviceDefinitionVersionsCommand = de_ListDeviceDefinitionVersionsCommand;
3576
- const de_ListDeviceDefinitionVersionsCommandError = async (output, context) => {
3577
- const parsedOutput = {
3578
- ...output,
3579
- body: await parseErrorBody(output.body, context),
3580
- };
3581
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3582
- switch (errorCode) {
3583
- case "BadRequestException":
3584
- case "com.amazonaws.greengrass#BadRequestException":
3585
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3586
- default:
3587
- const parsedBody = parsedOutput.body;
3588
- return throwDefaultError({
3589
- output,
3590
- parsedBody,
3591
- errorCode,
3592
- });
3593
- }
3594
- };
3595
- const de_ListFunctionDefinitionsCommand = async (output, context) => {
3596
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3597
- return de_ListFunctionDefinitionsCommandError(output, context);
3598
- }
3599
- const contents = (0, smithy_client_1.map)({
3600
- $metadata: deserializeMetadata(output),
3601
- });
3602
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3603
- const doc = (0, smithy_client_1.take)(data, {
3604
- Definitions: (_) => de___listOfDefinitionInformation(_, context),
3605
- NextToken: smithy_client_1.expectString,
3606
- });
3607
- Object.assign(contents, doc);
3608
- return contents;
3609
- };
3610
- exports.de_ListFunctionDefinitionsCommand = de_ListFunctionDefinitionsCommand;
3611
- const de_ListFunctionDefinitionsCommandError = async (output, context) => {
3612
- const parsedOutput = {
3613
- ...output,
3614
- body: await parseErrorBody(output.body, context),
3615
- };
3616
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3617
- const parsedBody = parsedOutput.body;
3618
- return throwDefaultError({
3619
- output,
3620
- parsedBody,
3621
- errorCode,
3622
- });
3623
- };
3624
- const de_ListFunctionDefinitionVersionsCommand = async (output, context) => {
3625
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3626
- return de_ListFunctionDefinitionVersionsCommandError(output, context);
3627
- }
3628
- const contents = (0, smithy_client_1.map)({
3629
- $metadata: deserializeMetadata(output),
3630
- });
3631
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3632
- const doc = (0, smithy_client_1.take)(data, {
3633
- NextToken: smithy_client_1.expectString,
3634
- Versions: smithy_client_1._json,
3635
- });
3636
- Object.assign(contents, doc);
3637
- return contents;
3638
- };
3639
- exports.de_ListFunctionDefinitionVersionsCommand = de_ListFunctionDefinitionVersionsCommand;
3640
- const de_ListFunctionDefinitionVersionsCommandError = async (output, context) => {
3641
- const parsedOutput = {
3642
- ...output,
3643
- body: await parseErrorBody(output.body, context),
3644
- };
3645
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3646
- switch (errorCode) {
3647
- case "BadRequestException":
3648
- case "com.amazonaws.greengrass#BadRequestException":
3649
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3650
- default:
3651
- const parsedBody = parsedOutput.body;
3652
- return throwDefaultError({
3653
- output,
3654
- parsedBody,
3655
- errorCode,
3656
- });
3657
- }
3658
- };
3659
- const de_ListGroupCertificateAuthoritiesCommand = async (output, context) => {
3660
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3661
- return de_ListGroupCertificateAuthoritiesCommandError(output, context);
3662
- }
3663
- const contents = (0, smithy_client_1.map)({
3664
- $metadata: deserializeMetadata(output),
3665
- });
3666
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3667
- const doc = (0, smithy_client_1.take)(data, {
3668
- GroupCertificateAuthorities: smithy_client_1._json,
3669
- });
3670
- Object.assign(contents, doc);
3671
- return contents;
3672
- };
3673
- exports.de_ListGroupCertificateAuthoritiesCommand = de_ListGroupCertificateAuthoritiesCommand;
3674
- const de_ListGroupCertificateAuthoritiesCommandError = async (output, context) => {
3675
- const parsedOutput = {
3676
- ...output,
3677
- body: await parseErrorBody(output.body, context),
3678
- };
3679
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3680
- switch (errorCode) {
3681
- case "BadRequestException":
3682
- case "com.amazonaws.greengrass#BadRequestException":
3683
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3684
- case "InternalServerErrorException":
3685
- case "com.amazonaws.greengrass#InternalServerErrorException":
3686
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
3687
- default:
3688
- const parsedBody = parsedOutput.body;
3689
- return throwDefaultError({
3690
- output,
3691
- parsedBody,
3692
- errorCode,
3693
- });
3694
- }
3695
- };
3696
- const de_ListGroupsCommand = async (output, context) => {
3697
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3698
- return de_ListGroupsCommandError(output, context);
3699
- }
3700
- const contents = (0, smithy_client_1.map)({
3701
- $metadata: deserializeMetadata(output),
3702
- });
3703
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3704
- const doc = (0, smithy_client_1.take)(data, {
3705
- Groups: smithy_client_1._json,
3706
- NextToken: smithy_client_1.expectString,
3707
- });
3708
- Object.assign(contents, doc);
3709
- return contents;
3710
- };
3711
- exports.de_ListGroupsCommand = de_ListGroupsCommand;
3712
- const de_ListGroupsCommandError = async (output, context) => {
3713
- const parsedOutput = {
3714
- ...output,
3715
- body: await parseErrorBody(output.body, context),
3716
- };
3717
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3718
- const parsedBody = parsedOutput.body;
3719
- return throwDefaultError({
3720
- output,
3721
- parsedBody,
3722
- errorCode,
3723
- });
3724
- };
3725
- const de_ListGroupVersionsCommand = async (output, context) => {
3726
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3727
- return de_ListGroupVersionsCommandError(output, context);
3728
- }
3729
- const contents = (0, smithy_client_1.map)({
3730
- $metadata: deserializeMetadata(output),
3731
- });
3732
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3733
- const doc = (0, smithy_client_1.take)(data, {
3734
- NextToken: smithy_client_1.expectString,
3735
- Versions: smithy_client_1._json,
3736
- });
3737
- Object.assign(contents, doc);
3738
- return contents;
3739
- };
3740
- exports.de_ListGroupVersionsCommand = de_ListGroupVersionsCommand;
3741
- const de_ListGroupVersionsCommandError = async (output, context) => {
3742
- const parsedOutput = {
3743
- ...output,
3744
- body: await parseErrorBody(output.body, context),
3745
- };
3746
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3747
- switch (errorCode) {
3748
- case "BadRequestException":
3749
- case "com.amazonaws.greengrass#BadRequestException":
3750
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3751
- default:
3752
- const parsedBody = parsedOutput.body;
3753
- return throwDefaultError({
3754
- output,
3755
- parsedBody,
3756
- errorCode,
3757
- });
3758
- }
3759
- };
3760
- const de_ListLoggerDefinitionsCommand = async (output, context) => {
3761
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3762
- return de_ListLoggerDefinitionsCommandError(output, context);
3763
- }
3764
- const contents = (0, smithy_client_1.map)({
3765
- $metadata: deserializeMetadata(output),
3766
- });
3767
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3768
- const doc = (0, smithy_client_1.take)(data, {
3769
- Definitions: (_) => de___listOfDefinitionInformation(_, context),
3770
- NextToken: smithy_client_1.expectString,
3771
- });
3772
- Object.assign(contents, doc);
3773
- return contents;
3774
- };
3775
- exports.de_ListLoggerDefinitionsCommand = de_ListLoggerDefinitionsCommand;
3776
- const de_ListLoggerDefinitionsCommandError = async (output, context) => {
3777
- const parsedOutput = {
3778
- ...output,
3779
- body: await parseErrorBody(output.body, context),
3780
- };
3781
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3782
- const parsedBody = parsedOutput.body;
3783
- return throwDefaultError({
3784
- output,
3785
- parsedBody,
3786
- errorCode,
3787
- });
3788
- };
3789
- const de_ListLoggerDefinitionVersionsCommand = async (output, context) => {
3790
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3791
- return de_ListLoggerDefinitionVersionsCommandError(output, context);
3792
- }
3793
- const contents = (0, smithy_client_1.map)({
3794
- $metadata: deserializeMetadata(output),
3795
- });
3796
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3797
- const doc = (0, smithy_client_1.take)(data, {
3798
- NextToken: smithy_client_1.expectString,
3799
- Versions: smithy_client_1._json,
3800
- });
3801
- Object.assign(contents, doc);
3802
- return contents;
3803
- };
3804
- exports.de_ListLoggerDefinitionVersionsCommand = de_ListLoggerDefinitionVersionsCommand;
3805
- const de_ListLoggerDefinitionVersionsCommandError = async (output, context) => {
3806
- const parsedOutput = {
3807
- ...output,
3808
- body: await parseErrorBody(output.body, context),
3809
- };
3810
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3811
- switch (errorCode) {
3812
- case "BadRequestException":
3813
- case "com.amazonaws.greengrass#BadRequestException":
3814
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3815
- default:
3816
- const parsedBody = parsedOutput.body;
3817
- return throwDefaultError({
3818
- output,
3819
- parsedBody,
3820
- errorCode,
3821
- });
3822
- }
3823
- };
3824
- const de_ListResourceDefinitionsCommand = async (output, context) => {
3825
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3826
- return de_ListResourceDefinitionsCommandError(output, context);
3827
- }
3828
- const contents = (0, smithy_client_1.map)({
3829
- $metadata: deserializeMetadata(output),
3830
- });
3831
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3832
- const doc = (0, smithy_client_1.take)(data, {
3833
- Definitions: (_) => de___listOfDefinitionInformation(_, context),
3834
- NextToken: smithy_client_1.expectString,
3835
- });
3836
- Object.assign(contents, doc);
3837
- return contents;
3838
- };
3839
- exports.de_ListResourceDefinitionsCommand = de_ListResourceDefinitionsCommand;
3840
- const de_ListResourceDefinitionsCommandError = async (output, context) => {
3841
- const parsedOutput = {
3842
- ...output,
3843
- body: await parseErrorBody(output.body, context),
3844
- };
3845
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3846
- const parsedBody = parsedOutput.body;
3847
- return throwDefaultError({
3848
- output,
3849
- parsedBody,
3850
- errorCode,
3851
- });
3852
- };
3853
- const de_ListResourceDefinitionVersionsCommand = async (output, context) => {
3854
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3855
- return de_ListResourceDefinitionVersionsCommandError(output, context);
3856
- }
3857
- const contents = (0, smithy_client_1.map)({
3858
- $metadata: deserializeMetadata(output),
3859
- });
3860
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3861
- const doc = (0, smithy_client_1.take)(data, {
3862
- NextToken: smithy_client_1.expectString,
3863
- Versions: smithy_client_1._json,
3864
- });
3865
- Object.assign(contents, doc);
3866
- return contents;
3867
- };
3868
- exports.de_ListResourceDefinitionVersionsCommand = de_ListResourceDefinitionVersionsCommand;
3869
- const de_ListResourceDefinitionVersionsCommandError = async (output, context) => {
3870
- const parsedOutput = {
3871
- ...output,
3872
- body: await parseErrorBody(output.body, context),
3873
- };
3874
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3875
- switch (errorCode) {
3876
- case "BadRequestException":
3877
- case "com.amazonaws.greengrass#BadRequestException":
3878
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3879
- default:
3880
- const parsedBody = parsedOutput.body;
3881
- return throwDefaultError({
3882
- output,
3883
- parsedBody,
3884
- errorCode,
3885
- });
3886
- }
3887
- };
3888
- const de_ListSubscriptionDefinitionsCommand = async (output, context) => {
3889
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3890
- return de_ListSubscriptionDefinitionsCommandError(output, context);
3891
- }
3892
- const contents = (0, smithy_client_1.map)({
3893
- $metadata: deserializeMetadata(output),
3894
- });
3895
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3896
- const doc = (0, smithy_client_1.take)(data, {
3897
- Definitions: (_) => de___listOfDefinitionInformation(_, context),
3898
- NextToken: smithy_client_1.expectString,
3899
- });
3900
- Object.assign(contents, doc);
3901
- return contents;
3902
- };
3903
- exports.de_ListSubscriptionDefinitionsCommand = de_ListSubscriptionDefinitionsCommand;
3904
- const de_ListSubscriptionDefinitionsCommandError = async (output, context) => {
3905
- const parsedOutput = {
3906
- ...output,
3907
- body: await parseErrorBody(output.body, context),
3908
- };
3909
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3910
- const parsedBody = parsedOutput.body;
3911
- return throwDefaultError({
3912
- output,
3913
- parsedBody,
3914
- errorCode,
3915
- });
3916
- };
3917
- const de_ListSubscriptionDefinitionVersionsCommand = async (output, context) => {
3918
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3919
- return de_ListSubscriptionDefinitionVersionsCommandError(output, context);
3920
- }
3921
- const contents = (0, smithy_client_1.map)({
3922
- $metadata: deserializeMetadata(output),
3923
- });
3924
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3925
- const doc = (0, smithy_client_1.take)(data, {
3926
- NextToken: smithy_client_1.expectString,
3927
- Versions: smithy_client_1._json,
3928
- });
3929
- Object.assign(contents, doc);
3930
- return contents;
3931
- };
3932
- exports.de_ListSubscriptionDefinitionVersionsCommand = de_ListSubscriptionDefinitionVersionsCommand;
3933
- const de_ListSubscriptionDefinitionVersionsCommandError = async (output, context) => {
3934
- const parsedOutput = {
3935
- ...output,
3936
- body: await parseErrorBody(output.body, context),
3937
- };
3938
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3939
- switch (errorCode) {
3940
- case "BadRequestException":
3941
- case "com.amazonaws.greengrass#BadRequestException":
3942
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3943
- default:
3944
- const parsedBody = parsedOutput.body;
3945
- return throwDefaultError({
3946
- output,
3947
- parsedBody,
3948
- errorCode,
3949
- });
3950
- }
3951
- };
3952
- const de_ListTagsForResourceCommand = async (output, context) => {
3953
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3954
- return de_ListTagsForResourceCommandError(output, context);
3955
- }
3956
- const contents = (0, smithy_client_1.map)({
3957
- $metadata: deserializeMetadata(output),
3958
- });
3959
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3960
- const doc = (0, smithy_client_1.take)(data, {
3961
- tags: smithy_client_1._json,
3962
- });
3963
- Object.assign(contents, doc);
3964
- return contents;
3965
- };
3966
- exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
3967
- const de_ListTagsForResourceCommandError = async (output, context) => {
3968
- const parsedOutput = {
3969
- ...output,
3970
- body: await parseErrorBody(output.body, context),
3971
- };
3972
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3973
- switch (errorCode) {
3974
- case "BadRequestException":
3975
- case "com.amazonaws.greengrass#BadRequestException":
3976
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3977
- default:
3978
- const parsedBody = parsedOutput.body;
3979
- return throwDefaultError({
3980
- output,
3981
- parsedBody,
3982
- errorCode,
3983
- });
3984
- }
3985
- };
3986
- const de_ResetDeploymentsCommand = async (output, context) => {
3987
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3988
- return de_ResetDeploymentsCommandError(output, context);
3989
- }
3990
- const contents = (0, smithy_client_1.map)({
3991
- $metadata: deserializeMetadata(output),
3992
- });
3993
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3994
- const doc = (0, smithy_client_1.take)(data, {
3995
- DeploymentArn: smithy_client_1.expectString,
3996
- DeploymentId: smithy_client_1.expectString,
3997
- });
3998
- Object.assign(contents, doc);
3999
- return contents;
4000
- };
4001
- exports.de_ResetDeploymentsCommand = de_ResetDeploymentsCommand;
4002
- const de_ResetDeploymentsCommandError = async (output, context) => {
4003
- const parsedOutput = {
4004
- ...output,
4005
- body: await parseErrorBody(output.body, context),
4006
- };
4007
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4008
- switch (errorCode) {
4009
- case "BadRequestException":
4010
- case "com.amazonaws.greengrass#BadRequestException":
4011
- throw await de_BadRequestExceptionRes(parsedOutput, context);
4012
- default:
4013
- const parsedBody = parsedOutput.body;
4014
- return throwDefaultError({
4015
- output,
4016
- parsedBody,
4017
- errorCode,
4018
- });
4019
- }
4020
- };
4021
- const de_StartBulkDeploymentCommand = async (output, context) => {
4022
- if (output.statusCode !== 200 && output.statusCode >= 300) {
4023
- return de_StartBulkDeploymentCommandError(output, context);
4024
- }
4025
- const contents = (0, smithy_client_1.map)({
4026
- $metadata: deserializeMetadata(output),
4027
- });
4028
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
4029
- const doc = (0, smithy_client_1.take)(data, {
4030
- BulkDeploymentArn: smithy_client_1.expectString,
4031
- BulkDeploymentId: smithy_client_1.expectString,
4032
- });
4033
- Object.assign(contents, doc);
4034
- return contents;
4035
- };
4036
- exports.de_StartBulkDeploymentCommand = de_StartBulkDeploymentCommand;
4037
- const de_StartBulkDeploymentCommandError = async (output, context) => {
4038
- const parsedOutput = {
4039
- ...output,
4040
- body: await parseErrorBody(output.body, context),
4041
- };
4042
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4043
- switch (errorCode) {
4044
- case "BadRequestException":
4045
- case "com.amazonaws.greengrass#BadRequestException":
4046
- throw await de_BadRequestExceptionRes(parsedOutput, context);
4047
- default:
4048
- const parsedBody = parsedOutput.body;
4049
- return throwDefaultError({
4050
- output,
4051
- parsedBody,
4052
- errorCode,
4053
- });
4054
- }
4055
- };
4056
- const de_StopBulkDeploymentCommand = async (output, context) => {
4057
- if (output.statusCode !== 200 && output.statusCode >= 300) {
4058
- return de_StopBulkDeploymentCommandError(output, context);
4059
- }
4060
- const contents = (0, smithy_client_1.map)({
4061
- $metadata: deserializeMetadata(output),
4062
- });
4063
- await (0, smithy_client_1.collectBody)(output.body, context);
4064
- return contents;
4065
- };
4066
- exports.de_StopBulkDeploymentCommand = de_StopBulkDeploymentCommand;
4067
- const de_StopBulkDeploymentCommandError = async (output, context) => {
4068
- const parsedOutput = {
4069
- ...output,
4070
- body: await parseErrorBody(output.body, context),
4071
- };
4072
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4073
- switch (errorCode) {
4074
- case "BadRequestException":
4075
- case "com.amazonaws.greengrass#BadRequestException":
4076
- throw await de_BadRequestExceptionRes(parsedOutput, context);
4077
- default:
4078
- const parsedBody = parsedOutput.body;
4079
- return throwDefaultError({
4080
- output,
4081
- parsedBody,
4082
- errorCode,
4083
- });
4084
- }
4085
- };
4086
- const de_TagResourceCommand = async (output, context) => {
4087
- if (output.statusCode !== 204 && output.statusCode >= 300) {
4088
- return de_TagResourceCommandError(output, context);
4089
- }
4090
- const contents = (0, smithy_client_1.map)({
4091
- $metadata: deserializeMetadata(output),
4092
- });
4093
- await (0, smithy_client_1.collectBody)(output.body, context);
4094
- return contents;
4095
- };
4096
- exports.de_TagResourceCommand = de_TagResourceCommand;
4097
- const de_TagResourceCommandError = async (output, context) => {
4098
- const parsedOutput = {
4099
- ...output,
4100
- body: await parseErrorBody(output.body, context),
4101
- };
4102
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4103
- switch (errorCode) {
4104
- case "BadRequestException":
4105
- case "com.amazonaws.greengrass#BadRequestException":
4106
- throw await de_BadRequestExceptionRes(parsedOutput, context);
4107
- default:
4108
- const parsedBody = parsedOutput.body;
4109
- return throwDefaultError({
4110
- output,
4111
- parsedBody,
4112
- errorCode,
4113
- });
4114
- }
4115
- };
4116
- const de_UntagResourceCommand = async (output, context) => {
4117
- if (output.statusCode !== 204 && output.statusCode >= 300) {
4118
- return de_UntagResourceCommandError(output, context);
4119
- }
4120
- const contents = (0, smithy_client_1.map)({
4121
- $metadata: deserializeMetadata(output),
4122
- });
4123
- await (0, smithy_client_1.collectBody)(output.body, context);
4124
- return contents;
4125
- };
4126
- exports.de_UntagResourceCommand = de_UntagResourceCommand;
4127
- const de_UntagResourceCommandError = async (output, context) => {
4128
- const parsedOutput = {
4129
- ...output,
4130
- body: await parseErrorBody(output.body, context),
4131
- };
4132
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4133
- switch (errorCode) {
4134
- case "BadRequestException":
4135
- case "com.amazonaws.greengrass#BadRequestException":
4136
- throw await de_BadRequestExceptionRes(parsedOutput, context);
4137
- default:
4138
- const parsedBody = parsedOutput.body;
4139
- return throwDefaultError({
4140
- output,
4141
- parsedBody,
4142
- errorCode,
4143
- });
4144
- }
4145
- };
4146
- const de_UpdateConnectivityInfoCommand = async (output, context) => {
4147
- if (output.statusCode !== 200 && output.statusCode >= 300) {
4148
- return de_UpdateConnectivityInfoCommandError(output, context);
4149
- }
4150
- const contents = (0, smithy_client_1.map)({
4151
- $metadata: deserializeMetadata(output),
4152
- });
4153
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
4154
- const doc = (0, smithy_client_1.take)(data, {
4155
- Message: [, smithy_client_1.expectString, `message`],
4156
- Version: smithy_client_1.expectString,
4157
- });
4158
- Object.assign(contents, doc);
4159
- return contents;
4160
- };
4161
- exports.de_UpdateConnectivityInfoCommand = de_UpdateConnectivityInfoCommand;
4162
- const de_UpdateConnectivityInfoCommandError = async (output, context) => {
4163
- const parsedOutput = {
4164
- ...output,
4165
- body: await parseErrorBody(output.body, context),
4166
- };
4167
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4168
- switch (errorCode) {
4169
- case "BadRequestException":
4170
- case "com.amazonaws.greengrass#BadRequestException":
4171
- throw await de_BadRequestExceptionRes(parsedOutput, context);
4172
- case "InternalServerErrorException":
4173
- case "com.amazonaws.greengrass#InternalServerErrorException":
4174
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
4175
- default:
4176
- const parsedBody = parsedOutput.body;
4177
- return throwDefaultError({
4178
- output,
4179
- parsedBody,
4180
- errorCode,
4181
- });
4182
- }
4183
- };
4184
- const de_UpdateConnectorDefinitionCommand = async (output, context) => {
4185
- if (output.statusCode !== 200 && output.statusCode >= 300) {
4186
- return de_UpdateConnectorDefinitionCommandError(output, context);
4187
- }
4188
- const contents = (0, smithy_client_1.map)({
4189
- $metadata: deserializeMetadata(output),
4190
- });
4191
- await (0, smithy_client_1.collectBody)(output.body, context);
4192
- return contents;
4193
- };
4194
- exports.de_UpdateConnectorDefinitionCommand = de_UpdateConnectorDefinitionCommand;
4195
- const de_UpdateConnectorDefinitionCommandError = async (output, context) => {
4196
- const parsedOutput = {
4197
- ...output,
4198
- body: await parseErrorBody(output.body, context),
4199
- };
4200
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4201
- switch (errorCode) {
4202
- case "BadRequestException":
4203
- case "com.amazonaws.greengrass#BadRequestException":
4204
- throw await de_BadRequestExceptionRes(parsedOutput, context);
4205
- default:
4206
- const parsedBody = parsedOutput.body;
4207
- return throwDefaultError({
4208
- output,
4209
- parsedBody,
4210
- errorCode,
4211
- });
4212
- }
4213
- };
4214
- const de_UpdateCoreDefinitionCommand = async (output, context) => {
4215
- if (output.statusCode !== 200 && output.statusCode >= 300) {
4216
- return de_UpdateCoreDefinitionCommandError(output, context);
4217
- }
4218
- const contents = (0, smithy_client_1.map)({
4219
- $metadata: deserializeMetadata(output),
4220
- });
4221
- await (0, smithy_client_1.collectBody)(output.body, context);
4222
- return contents;
4223
- };
4224
- exports.de_UpdateCoreDefinitionCommand = de_UpdateCoreDefinitionCommand;
4225
- const de_UpdateCoreDefinitionCommandError = async (output, context) => {
4226
- const parsedOutput = {
4227
- ...output,
4228
- body: await parseErrorBody(output.body, context),
4229
- };
4230
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4231
- switch (errorCode) {
4232
- case "BadRequestException":
4233
- case "com.amazonaws.greengrass#BadRequestException":
4234
- throw await de_BadRequestExceptionRes(parsedOutput, context);
4235
- default:
4236
- const parsedBody = parsedOutput.body;
4237
- return throwDefaultError({
4238
- output,
4239
- parsedBody,
4240
- errorCode,
4241
- });
4242
- }
4243
- };
4244
- const de_UpdateDeviceDefinitionCommand = async (output, context) => {
4245
- if (output.statusCode !== 200 && output.statusCode >= 300) {
4246
- return de_UpdateDeviceDefinitionCommandError(output, context);
4247
- }
4248
- const contents = (0, smithy_client_1.map)({
4249
- $metadata: deserializeMetadata(output),
4250
- });
4251
- await (0, smithy_client_1.collectBody)(output.body, context);
4252
- return contents;
4253
- };
4254
- exports.de_UpdateDeviceDefinitionCommand = de_UpdateDeviceDefinitionCommand;
4255
- const de_UpdateDeviceDefinitionCommandError = async (output, context) => {
4256
- const parsedOutput = {
4257
- ...output,
4258
- body: await parseErrorBody(output.body, context),
4259
- };
4260
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4261
- switch (errorCode) {
4262
- case "BadRequestException":
4263
- case "com.amazonaws.greengrass#BadRequestException":
4264
- throw await de_BadRequestExceptionRes(parsedOutput, context);
4265
- default:
4266
- const parsedBody = parsedOutput.body;
4267
- return throwDefaultError({
4268
- output,
4269
- parsedBody,
4270
- errorCode,
4271
- });
4272
- }
4273
- };
4274
- const de_UpdateFunctionDefinitionCommand = async (output, context) => {
4275
- if (output.statusCode !== 200 && output.statusCode >= 300) {
4276
- return de_UpdateFunctionDefinitionCommandError(output, context);
4277
- }
4278
- const contents = (0, smithy_client_1.map)({
4279
- $metadata: deserializeMetadata(output),
4280
- });
4281
- await (0, smithy_client_1.collectBody)(output.body, context);
4282
- return contents;
4283
- };
4284
- exports.de_UpdateFunctionDefinitionCommand = de_UpdateFunctionDefinitionCommand;
4285
- const de_UpdateFunctionDefinitionCommandError = async (output, context) => {
4286
- const parsedOutput = {
4287
- ...output,
4288
- body: await parseErrorBody(output.body, context),
4289
- };
4290
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4291
- switch (errorCode) {
4292
- case "BadRequestException":
4293
- case "com.amazonaws.greengrass#BadRequestException":
4294
- throw await de_BadRequestExceptionRes(parsedOutput, context);
4295
- default:
4296
- const parsedBody = parsedOutput.body;
4297
- return throwDefaultError({
4298
- output,
4299
- parsedBody,
4300
- errorCode,
4301
- });
4302
- }
4303
- };
4304
- const de_UpdateGroupCommand = async (output, context) => {
4305
- if (output.statusCode !== 200 && output.statusCode >= 300) {
4306
- return de_UpdateGroupCommandError(output, context);
4307
- }
4308
- const contents = (0, smithy_client_1.map)({
4309
- $metadata: deserializeMetadata(output),
4310
- });
4311
- await (0, smithy_client_1.collectBody)(output.body, context);
4312
- return contents;
4313
- };
4314
- exports.de_UpdateGroupCommand = de_UpdateGroupCommand;
4315
- const de_UpdateGroupCommandError = async (output, context) => {
4316
- const parsedOutput = {
4317
- ...output,
4318
- body: await parseErrorBody(output.body, context),
4319
- };
4320
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4321
- switch (errorCode) {
4322
- case "BadRequestException":
4323
- case "com.amazonaws.greengrass#BadRequestException":
4324
- throw await de_BadRequestExceptionRes(parsedOutput, context);
4325
- default:
4326
- const parsedBody = parsedOutput.body;
4327
- return throwDefaultError({
4328
- output,
4329
- parsedBody,
4330
- errorCode,
4331
- });
4332
- }
4333
- };
4334
- const de_UpdateGroupCertificateConfigurationCommand = async (output, context) => {
4335
- if (output.statusCode !== 200 && output.statusCode >= 300) {
4336
- return de_UpdateGroupCertificateConfigurationCommandError(output, context);
4337
- }
4338
- const contents = (0, smithy_client_1.map)({
4339
- $metadata: deserializeMetadata(output),
4340
- });
4341
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
4342
- const doc = (0, smithy_client_1.take)(data, {
4343
- CertificateAuthorityExpiryInMilliseconds: smithy_client_1.expectString,
4344
- CertificateExpiryInMilliseconds: smithy_client_1.expectString,
4345
- GroupId: smithy_client_1.expectString,
4346
- });
4347
- Object.assign(contents, doc);
4348
- return contents;
4349
- };
4350
- exports.de_UpdateGroupCertificateConfigurationCommand = de_UpdateGroupCertificateConfigurationCommand;
4351
- const de_UpdateGroupCertificateConfigurationCommandError = async (output, context) => {
4352
- const parsedOutput = {
4353
- ...output,
4354
- body: await parseErrorBody(output.body, context),
4355
- };
4356
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4357
- switch (errorCode) {
4358
- case "BadRequestException":
4359
- case "com.amazonaws.greengrass#BadRequestException":
4360
- throw await de_BadRequestExceptionRes(parsedOutput, context);
4361
- case "InternalServerErrorException":
4362
- case "com.amazonaws.greengrass#InternalServerErrorException":
4363
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
4364
- default:
4365
- const parsedBody = parsedOutput.body;
4366
- return throwDefaultError({
4367
- output,
4368
- parsedBody,
4369
- errorCode,
4370
- });
4371
- }
4372
- };
4373
- const de_UpdateLoggerDefinitionCommand = async (output, context) => {
4374
- if (output.statusCode !== 200 && output.statusCode >= 300) {
4375
- return de_UpdateLoggerDefinitionCommandError(output, context);
4376
- }
4377
- const contents = (0, smithy_client_1.map)({
4378
- $metadata: deserializeMetadata(output),
4379
- });
4380
- await (0, smithy_client_1.collectBody)(output.body, context);
4381
- return contents;
4382
- };
4383
- exports.de_UpdateLoggerDefinitionCommand = de_UpdateLoggerDefinitionCommand;
4384
- const de_UpdateLoggerDefinitionCommandError = async (output, context) => {
4385
- const parsedOutput = {
4386
- ...output,
4387
- body: await parseErrorBody(output.body, context),
4388
- };
4389
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4390
- switch (errorCode) {
4391
- case "BadRequestException":
4392
- case "com.amazonaws.greengrass#BadRequestException":
4393
- throw await de_BadRequestExceptionRes(parsedOutput, context);
4394
- default:
4395
- const parsedBody = parsedOutput.body;
4396
- return throwDefaultError({
4397
- output,
4398
- parsedBody,
4399
- errorCode,
4400
- });
4401
- }
4402
- };
4403
- const de_UpdateResourceDefinitionCommand = async (output, context) => {
4404
- if (output.statusCode !== 200 && output.statusCode >= 300) {
4405
- return de_UpdateResourceDefinitionCommandError(output, context);
4406
- }
4407
- const contents = (0, smithy_client_1.map)({
4408
- $metadata: deserializeMetadata(output),
4409
- });
4410
- await (0, smithy_client_1.collectBody)(output.body, context);
4411
- return contents;
4412
- };
4413
- exports.de_UpdateResourceDefinitionCommand = de_UpdateResourceDefinitionCommand;
4414
- const de_UpdateResourceDefinitionCommandError = async (output, context) => {
4415
- const parsedOutput = {
4416
- ...output,
4417
- body: await parseErrorBody(output.body, context),
4418
- };
4419
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4420
- switch (errorCode) {
4421
- case "BadRequestException":
4422
- case "com.amazonaws.greengrass#BadRequestException":
4423
- throw await de_BadRequestExceptionRes(parsedOutput, context);
4424
- default:
4425
- const parsedBody = parsedOutput.body;
4426
- return throwDefaultError({
4427
- output,
4428
- parsedBody,
4429
- errorCode,
4430
- });
4431
- }
4432
- };
4433
- const de_UpdateSubscriptionDefinitionCommand = async (output, context) => {
4434
- if (output.statusCode !== 200 && output.statusCode >= 300) {
4435
- return de_UpdateSubscriptionDefinitionCommandError(output, context);
4436
- }
4437
- const contents = (0, smithy_client_1.map)({
4438
- $metadata: deserializeMetadata(output),
4439
- });
4440
- await (0, smithy_client_1.collectBody)(output.body, context);
4441
- return contents;
4442
- };
4443
- exports.de_UpdateSubscriptionDefinitionCommand = de_UpdateSubscriptionDefinitionCommand;
4444
- const de_UpdateSubscriptionDefinitionCommandError = async (output, context) => {
4445
- const parsedOutput = {
4446
- ...output,
4447
- body: await parseErrorBody(output.body, context),
4448
- };
4449
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4450
- switch (errorCode) {
4451
- case "BadRequestException":
4452
- case "com.amazonaws.greengrass#BadRequestException":
4453
- throw await de_BadRequestExceptionRes(parsedOutput, context);
4454
- default:
4455
- const parsedBody = parsedOutput.body;
4456
- return throwDefaultError({
4457
- output,
4458
- parsedBody,
4459
- errorCode,
4460
- });
4461
- }
4462
- };
4463
- const de_UpdateThingRuntimeConfigurationCommand = async (output, context) => {
4464
- if (output.statusCode !== 200 && output.statusCode >= 300) {
4465
- return de_UpdateThingRuntimeConfigurationCommandError(output, context);
4466
- }
4467
- const contents = (0, smithy_client_1.map)({
4468
- $metadata: deserializeMetadata(output),
4469
- });
4470
- await (0, smithy_client_1.collectBody)(output.body, context);
4471
- return contents;
4472
- };
4473
- exports.de_UpdateThingRuntimeConfigurationCommand = de_UpdateThingRuntimeConfigurationCommand;
4474
- const de_UpdateThingRuntimeConfigurationCommandError = async (output, context) => {
4475
- const parsedOutput = {
4476
- ...output,
4477
- body: await parseErrorBody(output.body, context),
4478
- };
4479
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4480
- switch (errorCode) {
4481
- case "BadRequestException":
4482
- case "com.amazonaws.greengrass#BadRequestException":
4483
- throw await de_BadRequestExceptionRes(parsedOutput, context);
4484
- case "InternalServerErrorException":
4485
- case "com.amazonaws.greengrass#InternalServerErrorException":
4486
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
4487
- default:
4488
- const parsedBody = parsedOutput.body;
4489
- return throwDefaultError({
4490
- output,
4491
- parsedBody,
4492
- errorCode,
4493
- });
4494
- }
4495
- };
4496
- const throwDefaultError = (0, smithy_client_1.withBaseException)(GreengrassServiceException_1.GreengrassServiceException);
4497
- const de_BadRequestExceptionRes = async (parsedOutput, context) => {
4498
- const contents = (0, smithy_client_1.map)({});
4499
- const data = parsedOutput.body;
4500
- const doc = (0, smithy_client_1.take)(data, {
4501
- ErrorDetails: smithy_client_1._json,
4502
- Message: smithy_client_1.expectString,
4503
- });
4504
- Object.assign(contents, doc);
4505
- const exception = new models_0_1.BadRequestException({
4506
- $metadata: deserializeMetadata(parsedOutput),
4507
- ...contents,
4508
- });
4509
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
4510
- };
4511
- const de_InternalServerErrorExceptionRes = async (parsedOutput, context) => {
4512
- const contents = (0, smithy_client_1.map)({});
4513
- const data = parsedOutput.body;
4514
- const doc = (0, smithy_client_1.take)(data, {
4515
- ErrorDetails: smithy_client_1._json,
4516
- Message: smithy_client_1.expectString,
4517
- });
4518
- Object.assign(contents, doc);
4519
- const exception = new models_0_1.InternalServerErrorException({
4520
- $metadata: deserializeMetadata(parsedOutput),
4521
- ...contents,
4522
- });
4523
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
4524
- };
4525
- const de___listOfDefinitionInformation = (output, context) => {
4526
- const retVal = (output || [])
4527
- .filter((e) => e != null)
4528
- .map((entry) => {
4529
- return de_DefinitionInformation(entry, context);
4530
- });
4531
- return retVal;
4532
- };
4533
- const de_DefinitionInformation = (output, context) => {
4534
- return (0, smithy_client_1.take)(output, {
4535
- Arn: smithy_client_1.expectString,
4536
- CreationTimestamp: smithy_client_1.expectString,
4537
- Id: smithy_client_1.expectString,
4538
- LastUpdatedTimestamp: smithy_client_1.expectString,
4539
- LatestVersion: smithy_client_1.expectString,
4540
- LatestVersionArn: smithy_client_1.expectString,
4541
- Name: smithy_client_1.expectString,
4542
- Tags: [, smithy_client_1._json, `tags`],
4543
- });
4544
- };
4545
- const deserializeMetadata = (output) => ({
4546
- httpStatusCode: output.statusCode,
4547
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
4548
- extendedRequestId: output.headers["x-amz-id-2"],
4549
- cfId: output.headers["x-amz-cf-id"],
4550
- });
4551
- const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
4552
- const isSerializableHeaderValue = (value) => value !== undefined &&
4553
- value !== null &&
4554
- value !== "" &&
4555
- (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
4556
- (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
4557
- const _ACT = "AmznClientToken";
4558
- const _MR = "MaxResults";
4559
- const _NT = "NextToken";
4560
- const _TK = "TagKeys";
4561
- const _tK = "tagKeys";
4562
- const _xact = "x-amzn-client-token";
4563
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
4564
- if (encoded.length) {
4565
- return JSON.parse(encoded);
4566
- }
4567
- return {};
4568
- });
4569
- const parseErrorBody = async (errorBody, context) => {
4570
- const value = await parseBody(errorBody, context);
4571
- value.message = value.message ?? value.Message;
4572
- return value;
4573
- };
4574
- const loadRestJsonErrorCode = (output, data) => {
4575
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
4576
- const sanitizeErrorCode = (rawValue) => {
4577
- let cleanValue = rawValue;
4578
- if (typeof cleanValue === "number") {
4579
- cleanValue = cleanValue.toString();
4580
- }
4581
- if (cleanValue.indexOf(",") >= 0) {
4582
- cleanValue = cleanValue.split(",")[0];
4583
- }
4584
- if (cleanValue.indexOf(":") >= 0) {
4585
- cleanValue = cleanValue.split(":")[0];
4586
- }
4587
- if (cleanValue.indexOf("#") >= 0) {
4588
- cleanValue = cleanValue.split("#")[1];
4589
- }
4590
- return cleanValue;
4591
- };
4592
- const headerKey = findKey(output.headers, "x-amzn-errortype");
4593
- if (headerKey !== undefined) {
4594
- return sanitizeErrorCode(output.headers[headerKey]);
4595
- }
4596
- if (data.code !== undefined) {
4597
- return sanitizeErrorCode(data.code);
4598
- }
4599
- if (data["__type"] !== undefined) {
4600
- return sanitizeErrorCode(data["__type"]);
4601
- }
4602
- };
1
+ module.exports = require("../index.js");