@aws-sdk/client-iot-data-plane 3.183.0 → 3.186.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.
@@ -1,32 +1,39 @@
1
+ import { __extends } from "tslib";
1
2
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
2
3
  import { Command as $Command } from "@aws-sdk/smithy-client";
3
4
  import { UpdateThingShadowRequestFilterSensitiveLog, UpdateThingShadowResponseFilterSensitiveLog, } from "../models/models_0";
4
5
  import { deserializeAws_restJson1UpdateThingShadowCommand, serializeAws_restJson1UpdateThingShadowCommand, } from "../protocols/Aws_restJson1";
5
- export class UpdateThingShadowCommand extends $Command {
6
- constructor(input) {
7
- super();
8
- this.input = input;
6
+ var UpdateThingShadowCommand = (function (_super) {
7
+ __extends(UpdateThingShadowCommand, _super);
8
+ function UpdateThingShadowCommand(input) {
9
+ var _this = _super.call(this) || this;
10
+ _this.input = input;
11
+ return _this;
9
12
  }
10
- resolveMiddleware(clientStack, configuration, options) {
13
+ UpdateThingShadowCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
11
14
  this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
12
- const stack = clientStack.concat(this.middlewareStack);
13
- const { logger } = configuration;
14
- const clientName = "IoTDataPlaneClient";
15
- const commandName = "UpdateThingShadowCommand";
16
- const handlerExecutionContext = {
17
- logger,
18
- clientName,
19
- commandName,
15
+ var stack = clientStack.concat(this.middlewareStack);
16
+ var logger = configuration.logger;
17
+ var clientName = "IoTDataPlaneClient";
18
+ var commandName = "UpdateThingShadowCommand";
19
+ var handlerExecutionContext = {
20
+ logger: logger,
21
+ clientName: clientName,
22
+ commandName: commandName,
20
23
  inputFilterSensitiveLog: UpdateThingShadowRequestFilterSensitiveLog,
21
24
  outputFilterSensitiveLog: UpdateThingShadowResponseFilterSensitiveLog,
22
25
  };
23
- const { requestHandler } = configuration;
24
- return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
25
- }
26
- serialize(input, context) {
26
+ var requestHandler = configuration.requestHandler;
27
+ return stack.resolve(function (request) {
28
+ return requestHandler.handle(request.request, options || {});
29
+ }, handlerExecutionContext);
30
+ };
31
+ UpdateThingShadowCommand.prototype.serialize = function (input, context) {
27
32
  return serializeAws_restJson1UpdateThingShadowCommand(input, context);
28
- }
29
- deserialize(output, context) {
33
+ };
34
+ UpdateThingShadowCommand.prototype.deserialize = function (output, context) {
30
35
  return deserializeAws_restJson1UpdateThingShadowCommand(output, context);
31
- }
32
- }
36
+ };
37
+ return UpdateThingShadowCommand;
38
+ }($Command));
39
+ export { UpdateThingShadowCommand };
@@ -1,5 +1,6 @@
1
+ import { __assign, __awaiter, __generator } from "tslib";
1
2
  import { getRegionInfo } from "@aws-sdk/config-resolver";
2
- const regionHash = {
3
+ var regionHash = {
3
4
  "ca-central-1": {
4
5
  variants: [
5
6
  {
@@ -57,7 +58,7 @@ const regionHash = {
57
58
  ],
58
59
  },
59
60
  };
60
- const partitionHash = {
61
+ var partitionHash = {
61
62
  aws: {
62
63
  regions: [
63
64
  "af-south-1",
@@ -182,9 +183,8 @@ const partitionHash = {
182
183
  ],
183
184
  },
184
185
  };
185
- export const defaultRegionInfoProvider = async (region, options) => getRegionInfo(region, {
186
- ...options,
187
- signingService: "iotdata",
188
- regionHash,
189
- partitionHash,
190
- });
186
+ export var defaultRegionInfoProvider = function (region, options) { return __awaiter(void 0, void 0, void 0, function () {
187
+ return __generator(this, function (_a) {
188
+ return [2, getRegionInfo(region, __assign(__assign({}, options), { signingService: "iotdata", regionHash: regionHash, partitionHash: partitionHash }))];
189
+ });
190
+ }); };
@@ -1,7 +1,12 @@
1
+ import { __extends } from "tslib";
1
2
  import { ServiceException as __ServiceException, } from "@aws-sdk/smithy-client";
2
- export class IoTDataPlaneServiceException extends __ServiceException {
3
- constructor(options) {
4
- super(options);
5
- Object.setPrototypeOf(this, IoTDataPlaneServiceException.prototype);
3
+ var IoTDataPlaneServiceException = (function (_super) {
4
+ __extends(IoTDataPlaneServiceException, _super);
5
+ function IoTDataPlaneServiceException(options) {
6
+ var _this = _super.call(this, options) || this;
7
+ Object.setPrototypeOf(_this, IoTDataPlaneServiceException.prototype);
8
+ return _this;
6
9
  }
7
- }
10
+ return IoTDataPlaneServiceException;
11
+ }(__ServiceException));
12
+ export { IoTDataPlaneServiceException };
@@ -1,163 +1,136 @@
1
+ import { __assign, __extends } from "tslib";
1
2
  import { IoTDataPlaneServiceException as __BaseException } from "./IoTDataPlaneServiceException";
2
- export class ConflictException extends __BaseException {
3
- constructor(opts) {
4
- super({
5
- name: "ConflictException",
6
- $fault: "client",
7
- ...opts,
8
- });
9
- this.name = "ConflictException";
10
- this.$fault = "client";
11
- Object.setPrototypeOf(this, ConflictException.prototype);
3
+ var ConflictException = (function (_super) {
4
+ __extends(ConflictException, _super);
5
+ function ConflictException(opts) {
6
+ var _this = _super.call(this, __assign({ name: "ConflictException", $fault: "client" }, opts)) || this;
7
+ _this.name = "ConflictException";
8
+ _this.$fault = "client";
9
+ Object.setPrototypeOf(_this, ConflictException.prototype);
10
+ return _this;
12
11
  }
13
- }
14
- export class InternalFailureException extends __BaseException {
15
- constructor(opts) {
16
- super({
17
- name: "InternalFailureException",
18
- $fault: "server",
19
- ...opts,
20
- });
21
- this.name = "InternalFailureException";
22
- this.$fault = "server";
23
- Object.setPrototypeOf(this, InternalFailureException.prototype);
12
+ return ConflictException;
13
+ }(__BaseException));
14
+ export { ConflictException };
15
+ var InternalFailureException = (function (_super) {
16
+ __extends(InternalFailureException, _super);
17
+ function InternalFailureException(opts) {
18
+ var _this = _super.call(this, __assign({ name: "InternalFailureException", $fault: "server" }, opts)) || this;
19
+ _this.name = "InternalFailureException";
20
+ _this.$fault = "server";
21
+ Object.setPrototypeOf(_this, InternalFailureException.prototype);
22
+ return _this;
24
23
  }
25
- }
26
- export class InvalidRequestException extends __BaseException {
27
- constructor(opts) {
28
- super({
29
- name: "InvalidRequestException",
30
- $fault: "client",
31
- ...opts,
32
- });
33
- this.name = "InvalidRequestException";
34
- this.$fault = "client";
35
- Object.setPrototypeOf(this, InvalidRequestException.prototype);
24
+ return InternalFailureException;
25
+ }(__BaseException));
26
+ export { InternalFailureException };
27
+ var InvalidRequestException = (function (_super) {
28
+ __extends(InvalidRequestException, _super);
29
+ function InvalidRequestException(opts) {
30
+ var _this = _super.call(this, __assign({ name: "InvalidRequestException", $fault: "client" }, opts)) || this;
31
+ _this.name = "InvalidRequestException";
32
+ _this.$fault = "client";
33
+ Object.setPrototypeOf(_this, InvalidRequestException.prototype);
34
+ return _this;
36
35
  }
37
- }
38
- export class MethodNotAllowedException extends __BaseException {
39
- constructor(opts) {
40
- super({
41
- name: "MethodNotAllowedException",
42
- $fault: "client",
43
- ...opts,
44
- });
45
- this.name = "MethodNotAllowedException";
46
- this.$fault = "client";
47
- Object.setPrototypeOf(this, MethodNotAllowedException.prototype);
36
+ return InvalidRequestException;
37
+ }(__BaseException));
38
+ export { InvalidRequestException };
39
+ var MethodNotAllowedException = (function (_super) {
40
+ __extends(MethodNotAllowedException, _super);
41
+ function MethodNotAllowedException(opts) {
42
+ var _this = _super.call(this, __assign({ name: "MethodNotAllowedException", $fault: "client" }, opts)) || this;
43
+ _this.name = "MethodNotAllowedException";
44
+ _this.$fault = "client";
45
+ Object.setPrototypeOf(_this, MethodNotAllowedException.prototype);
46
+ return _this;
48
47
  }
49
- }
50
- export class ResourceNotFoundException extends __BaseException {
51
- constructor(opts) {
52
- super({
53
- name: "ResourceNotFoundException",
54
- $fault: "client",
55
- ...opts,
56
- });
57
- this.name = "ResourceNotFoundException";
58
- this.$fault = "client";
59
- Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
48
+ return MethodNotAllowedException;
49
+ }(__BaseException));
50
+ export { MethodNotAllowedException };
51
+ var ResourceNotFoundException = (function (_super) {
52
+ __extends(ResourceNotFoundException, _super);
53
+ function ResourceNotFoundException(opts) {
54
+ var _this = _super.call(this, __assign({ name: "ResourceNotFoundException", $fault: "client" }, opts)) || this;
55
+ _this.name = "ResourceNotFoundException";
56
+ _this.$fault = "client";
57
+ Object.setPrototypeOf(_this, ResourceNotFoundException.prototype);
58
+ return _this;
60
59
  }
61
- }
62
- export class ServiceUnavailableException extends __BaseException {
63
- constructor(opts) {
64
- super({
65
- name: "ServiceUnavailableException",
66
- $fault: "server",
67
- ...opts,
68
- });
69
- this.name = "ServiceUnavailableException";
70
- this.$fault = "server";
71
- Object.setPrototypeOf(this, ServiceUnavailableException.prototype);
60
+ return ResourceNotFoundException;
61
+ }(__BaseException));
62
+ export { ResourceNotFoundException };
63
+ var ServiceUnavailableException = (function (_super) {
64
+ __extends(ServiceUnavailableException, _super);
65
+ function ServiceUnavailableException(opts) {
66
+ var _this = _super.call(this, __assign({ name: "ServiceUnavailableException", $fault: "server" }, opts)) || this;
67
+ _this.name = "ServiceUnavailableException";
68
+ _this.$fault = "server";
69
+ Object.setPrototypeOf(_this, ServiceUnavailableException.prototype);
70
+ return _this;
72
71
  }
73
- }
74
- export class ThrottlingException extends __BaseException {
75
- constructor(opts) {
76
- super({
77
- name: "ThrottlingException",
78
- $fault: "client",
79
- ...opts,
80
- });
81
- this.name = "ThrottlingException";
82
- this.$fault = "client";
83
- Object.setPrototypeOf(this, ThrottlingException.prototype);
72
+ return ServiceUnavailableException;
73
+ }(__BaseException));
74
+ export { ServiceUnavailableException };
75
+ var ThrottlingException = (function (_super) {
76
+ __extends(ThrottlingException, _super);
77
+ function ThrottlingException(opts) {
78
+ var _this = _super.call(this, __assign({ name: "ThrottlingException", $fault: "client" }, opts)) || this;
79
+ _this.name = "ThrottlingException";
80
+ _this.$fault = "client";
81
+ Object.setPrototypeOf(_this, ThrottlingException.prototype);
82
+ return _this;
84
83
  }
85
- }
86
- export class UnauthorizedException extends __BaseException {
87
- constructor(opts) {
88
- super({
89
- name: "UnauthorizedException",
90
- $fault: "client",
91
- ...opts,
92
- });
93
- this.name = "UnauthorizedException";
94
- this.$fault = "client";
95
- Object.setPrototypeOf(this, UnauthorizedException.prototype);
84
+ return ThrottlingException;
85
+ }(__BaseException));
86
+ export { ThrottlingException };
87
+ var UnauthorizedException = (function (_super) {
88
+ __extends(UnauthorizedException, _super);
89
+ function UnauthorizedException(opts) {
90
+ var _this = _super.call(this, __assign({ name: "UnauthorizedException", $fault: "client" }, opts)) || this;
91
+ _this.name = "UnauthorizedException";
92
+ _this.$fault = "client";
93
+ Object.setPrototypeOf(_this, UnauthorizedException.prototype);
94
+ return _this;
96
95
  }
97
- }
98
- export class UnsupportedDocumentEncodingException extends __BaseException {
99
- constructor(opts) {
100
- super({
101
- name: "UnsupportedDocumentEncodingException",
102
- $fault: "client",
103
- ...opts,
104
- });
105
- this.name = "UnsupportedDocumentEncodingException";
106
- this.$fault = "client";
107
- Object.setPrototypeOf(this, UnsupportedDocumentEncodingException.prototype);
96
+ return UnauthorizedException;
97
+ }(__BaseException));
98
+ export { UnauthorizedException };
99
+ var UnsupportedDocumentEncodingException = (function (_super) {
100
+ __extends(UnsupportedDocumentEncodingException, _super);
101
+ function UnsupportedDocumentEncodingException(opts) {
102
+ var _this = _super.call(this, __assign({ name: "UnsupportedDocumentEncodingException", $fault: "client" }, opts)) || this;
103
+ _this.name = "UnsupportedDocumentEncodingException";
104
+ _this.$fault = "client";
105
+ Object.setPrototypeOf(_this, UnsupportedDocumentEncodingException.prototype);
106
+ return _this;
108
107
  }
109
- }
110
- export class RequestEntityTooLargeException extends __BaseException {
111
- constructor(opts) {
112
- super({
113
- name: "RequestEntityTooLargeException",
114
- $fault: "client",
115
- ...opts,
116
- });
117
- this.name = "RequestEntityTooLargeException";
118
- this.$fault = "client";
119
- Object.setPrototypeOf(this, RequestEntityTooLargeException.prototype);
108
+ return UnsupportedDocumentEncodingException;
109
+ }(__BaseException));
110
+ export { UnsupportedDocumentEncodingException };
111
+ var RequestEntityTooLargeException = (function (_super) {
112
+ __extends(RequestEntityTooLargeException, _super);
113
+ function RequestEntityTooLargeException(opts) {
114
+ var _this = _super.call(this, __assign({ name: "RequestEntityTooLargeException", $fault: "client" }, opts)) || this;
115
+ _this.name = "RequestEntityTooLargeException";
116
+ _this.$fault = "client";
117
+ Object.setPrototypeOf(_this, RequestEntityTooLargeException.prototype);
118
+ return _this;
120
119
  }
121
- }
122
- export const DeleteThingShadowRequestFilterSensitiveLog = (obj) => ({
123
- ...obj,
124
- });
125
- export const DeleteThingShadowResponseFilterSensitiveLog = (obj) => ({
126
- ...obj,
127
- });
128
- export const GetRetainedMessageRequestFilterSensitiveLog = (obj) => ({
129
- ...obj,
130
- });
131
- export const GetRetainedMessageResponseFilterSensitiveLog = (obj) => ({
132
- ...obj,
133
- });
134
- export const GetThingShadowRequestFilterSensitiveLog = (obj) => ({
135
- ...obj,
136
- });
137
- export const GetThingShadowResponseFilterSensitiveLog = (obj) => ({
138
- ...obj,
139
- });
140
- export const ListNamedShadowsForThingRequestFilterSensitiveLog = (obj) => ({
141
- ...obj,
142
- });
143
- export const ListNamedShadowsForThingResponseFilterSensitiveLog = (obj) => ({
144
- ...obj,
145
- });
146
- export const ListRetainedMessagesRequestFilterSensitiveLog = (obj) => ({
147
- ...obj,
148
- });
149
- export const RetainedMessageSummaryFilterSensitiveLog = (obj) => ({
150
- ...obj,
151
- });
152
- export const ListRetainedMessagesResponseFilterSensitiveLog = (obj) => ({
153
- ...obj,
154
- });
155
- export const PublishRequestFilterSensitiveLog = (obj) => ({
156
- ...obj,
157
- });
158
- export const UpdateThingShadowRequestFilterSensitiveLog = (obj) => ({
159
- ...obj,
160
- });
161
- export const UpdateThingShadowResponseFilterSensitiveLog = (obj) => ({
162
- ...obj,
163
- });
120
+ return RequestEntityTooLargeException;
121
+ }(__BaseException));
122
+ export { RequestEntityTooLargeException };
123
+ export var DeleteThingShadowRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
124
+ export var DeleteThingShadowResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
125
+ export var GetRetainedMessageRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
126
+ export var GetRetainedMessageResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
127
+ export var GetThingShadowRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
128
+ export var GetThingShadowResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
129
+ export var ListNamedShadowsForThingRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
130
+ export var ListNamedShadowsForThingResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
131
+ export var ListRetainedMessagesRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
132
+ export var RetainedMessageSummaryFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
133
+ export var ListRetainedMessagesResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
134
+ export var PublishRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
135
+ export var UpdateThingShadowRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
136
+ export var UpdateThingShadowResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -1,32 +1,75 @@
1
+ import { __asyncGenerator, __await, __awaiter, __generator, __read, __spreadArray } from "tslib";
1
2
  import { ListRetainedMessagesCommand, } from "../commands/ListRetainedMessagesCommand";
2
3
  import { IoTDataPlane } from "../IoTDataPlane";
3
4
  import { IoTDataPlaneClient } from "../IoTDataPlaneClient";
4
- const makePagedClientRequest = async (client, input, ...args) => {
5
- return await client.send(new ListRetainedMessagesCommand(input), ...args);
5
+ var makePagedClientRequest = function (client, input) {
6
+ var args = [];
7
+ for (var _i = 2; _i < arguments.length; _i++) {
8
+ args[_i - 2] = arguments[_i];
9
+ }
10
+ return __awaiter(void 0, void 0, void 0, function () {
11
+ return __generator(this, function (_a) {
12
+ switch (_a.label) {
13
+ case 0: return [4, client.send.apply(client, __spreadArray([new ListRetainedMessagesCommand(input)], __read(args), false))];
14
+ case 1: return [2, _a.sent()];
15
+ }
16
+ });
17
+ });
6
18
  };
7
- const makePagedRequest = async (client, input, ...args) => {
8
- return await client.listRetainedMessages(input, ...args);
19
+ var makePagedRequest = function (client, input) {
20
+ var args = [];
21
+ for (var _i = 2; _i < arguments.length; _i++) {
22
+ args[_i - 2] = arguments[_i];
23
+ }
24
+ return __awaiter(void 0, void 0, void 0, function () {
25
+ return __generator(this, function (_a) {
26
+ switch (_a.label) {
27
+ case 0: return [4, client.listRetainedMessages.apply(client, __spreadArray([input], __read(args), false))];
28
+ case 1: return [2, _a.sent()];
29
+ }
30
+ });
31
+ });
9
32
  };
10
- export async function* paginateListRetainedMessages(config, input, ...additionalArguments) {
11
- let token = config.startingToken || undefined;
12
- let hasNext = true;
13
- let page;
14
- while (hasNext) {
15
- input.nextToken = token;
16
- input["maxResults"] = config.pageSize;
17
- if (config.client instanceof IoTDataPlane) {
18
- page = await makePagedRequest(config.client, input, ...additionalArguments);
19
- }
20
- else if (config.client instanceof IoTDataPlaneClient) {
21
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
22
- }
23
- else {
24
- throw new Error("Invalid client, expected IoTDataPlane | IoTDataPlaneClient");
25
- }
26
- yield page;
27
- const prevToken = token;
28
- token = page.nextToken;
29
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
33
+ export function paginateListRetainedMessages(config, input) {
34
+ var additionalArguments = [];
35
+ for (var _i = 2; _i < arguments.length; _i++) {
36
+ additionalArguments[_i - 2] = arguments[_i];
30
37
  }
31
- return undefined;
38
+ return __asyncGenerator(this, arguments, function paginateListRetainedMessages_1() {
39
+ var token, hasNext, page, prevToken;
40
+ return __generator(this, function (_a) {
41
+ switch (_a.label) {
42
+ case 0:
43
+ token = config.startingToken || undefined;
44
+ hasNext = true;
45
+ _a.label = 1;
46
+ case 1:
47
+ if (!hasNext) return [3, 9];
48
+ input.nextToken = token;
49
+ input["maxResults"] = config.pageSize;
50
+ if (!(config.client instanceof IoTDataPlane)) return [3, 3];
51
+ return [4, __await(makePagedRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments), false)))];
52
+ case 2:
53
+ page = _a.sent();
54
+ return [3, 6];
55
+ case 3:
56
+ if (!(config.client instanceof IoTDataPlaneClient)) return [3, 5];
57
+ return [4, __await(makePagedClientRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments), false)))];
58
+ case 4:
59
+ page = _a.sent();
60
+ return [3, 6];
61
+ case 5: throw new Error("Invalid client, expected IoTDataPlane | IoTDataPlaneClient");
62
+ case 6: return [4, __await(page)];
63
+ case 7: return [4, _a.sent()];
64
+ case 8:
65
+ _a.sent();
66
+ prevToken = token;
67
+ token = page.nextToken;
68
+ hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
69
+ return [3, 1];
70
+ case 9: return [4, __await(undefined)];
71
+ case 10: return [2, _a.sent()];
72
+ }
73
+ });
74
+ });
32
75
  }