@aws-sdk/client-sns 3.477.0 → 3.481.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 (205) hide show
  1. package/dist-cjs/commands/AddPermissionCommand.js +18 -41
  2. package/dist-cjs/commands/CheckIfPhoneNumberIsOptedOutCommand.js +18 -41
  3. package/dist-cjs/commands/ConfirmSubscriptionCommand.js +18 -41
  4. package/dist-cjs/commands/CreatePlatformApplicationCommand.js +18 -41
  5. package/dist-cjs/commands/CreatePlatformEndpointCommand.js +18 -41
  6. package/dist-cjs/commands/CreateSMSSandboxPhoneNumberCommand.js +18 -41
  7. package/dist-cjs/commands/CreateTopicCommand.js +18 -41
  8. package/dist-cjs/commands/DeleteEndpointCommand.js +18 -41
  9. package/dist-cjs/commands/DeletePlatformApplicationCommand.js +18 -41
  10. package/dist-cjs/commands/DeleteSMSSandboxPhoneNumberCommand.js +18 -41
  11. package/dist-cjs/commands/DeleteTopicCommand.js +18 -41
  12. package/dist-cjs/commands/GetDataProtectionPolicyCommand.js +18 -41
  13. package/dist-cjs/commands/GetEndpointAttributesCommand.js +18 -41
  14. package/dist-cjs/commands/GetPlatformApplicationAttributesCommand.js +18 -41
  15. package/dist-cjs/commands/GetSMSAttributesCommand.js +18 -41
  16. package/dist-cjs/commands/GetSMSSandboxAccountStatusCommand.js +18 -41
  17. package/dist-cjs/commands/GetSubscriptionAttributesCommand.js +18 -41
  18. package/dist-cjs/commands/GetTopicAttributesCommand.js +18 -41
  19. package/dist-cjs/commands/ListEndpointsByPlatformApplicationCommand.js +18 -41
  20. package/dist-cjs/commands/ListOriginationNumbersCommand.js +18 -41
  21. package/dist-cjs/commands/ListPhoneNumbersOptedOutCommand.js +18 -41
  22. package/dist-cjs/commands/ListPlatformApplicationsCommand.js +18 -41
  23. package/dist-cjs/commands/ListSMSSandboxPhoneNumbersCommand.js +18 -41
  24. package/dist-cjs/commands/ListSubscriptionsByTopicCommand.js +18 -41
  25. package/dist-cjs/commands/ListSubscriptionsCommand.js +18 -41
  26. package/dist-cjs/commands/ListTagsForResourceCommand.js +18 -41
  27. package/dist-cjs/commands/ListTopicsCommand.js +18 -41
  28. package/dist-cjs/commands/OptInPhoneNumberCommand.js +18 -41
  29. package/dist-cjs/commands/PublishBatchCommand.js +18 -41
  30. package/dist-cjs/commands/PublishCommand.js +18 -41
  31. package/dist-cjs/commands/PutDataProtectionPolicyCommand.js +18 -41
  32. package/dist-cjs/commands/RemovePermissionCommand.js +18 -41
  33. package/dist-cjs/commands/SetEndpointAttributesCommand.js +18 -41
  34. package/dist-cjs/commands/SetPlatformApplicationAttributesCommand.js +18 -41
  35. package/dist-cjs/commands/SetSMSAttributesCommand.js +18 -41
  36. package/dist-cjs/commands/SetSubscriptionAttributesCommand.js +18 -41
  37. package/dist-cjs/commands/SetTopicAttributesCommand.js +18 -41
  38. package/dist-cjs/commands/SubscribeCommand.js +18 -41
  39. package/dist-cjs/commands/TagResourceCommand.js +18 -41
  40. package/dist-cjs/commands/UnsubscribeCommand.js +18 -41
  41. package/dist-cjs/commands/UntagResourceCommand.js +18 -41
  42. package/dist-cjs/commands/VerifySMSSandboxPhoneNumberCommand.js +18 -41
  43. package/dist-cjs/endpoint/EndpointParameters.js +7 -1
  44. package/dist-cjs/pagination/ListEndpointsByPlatformApplicationPaginator.js +2 -23
  45. package/dist-cjs/pagination/ListOriginationNumbersPaginator.js +2 -24
  46. package/dist-cjs/pagination/ListPhoneNumbersOptedOutPaginator.js +2 -23
  47. package/dist-cjs/pagination/ListPlatformApplicationsPaginator.js +2 -23
  48. package/dist-cjs/pagination/ListSMSSandboxPhoneNumbersPaginator.js +2 -24
  49. package/dist-cjs/pagination/ListSubscriptionsByTopicPaginator.js +2 -23
  50. package/dist-cjs/pagination/ListSubscriptionsPaginator.js +2 -23
  51. package/dist-cjs/pagination/ListTopicsPaginator.js +2 -23
  52. package/dist-es/commands/AddPermissionCommand.js +18 -41
  53. package/dist-es/commands/CheckIfPhoneNumberIsOptedOutCommand.js +18 -41
  54. package/dist-es/commands/ConfirmSubscriptionCommand.js +18 -41
  55. package/dist-es/commands/CreatePlatformApplicationCommand.js +18 -41
  56. package/dist-es/commands/CreatePlatformEndpointCommand.js +18 -41
  57. package/dist-es/commands/CreateSMSSandboxPhoneNumberCommand.js +18 -41
  58. package/dist-es/commands/CreateTopicCommand.js +18 -41
  59. package/dist-es/commands/DeleteEndpointCommand.js +18 -41
  60. package/dist-es/commands/DeletePlatformApplicationCommand.js +18 -41
  61. package/dist-es/commands/DeleteSMSSandboxPhoneNumberCommand.js +18 -41
  62. package/dist-es/commands/DeleteTopicCommand.js +18 -41
  63. package/dist-es/commands/GetDataProtectionPolicyCommand.js +18 -41
  64. package/dist-es/commands/GetEndpointAttributesCommand.js +18 -41
  65. package/dist-es/commands/GetPlatformApplicationAttributesCommand.js +18 -41
  66. package/dist-es/commands/GetSMSAttributesCommand.js +18 -41
  67. package/dist-es/commands/GetSMSSandboxAccountStatusCommand.js +18 -41
  68. package/dist-es/commands/GetSubscriptionAttributesCommand.js +18 -41
  69. package/dist-es/commands/GetTopicAttributesCommand.js +18 -41
  70. package/dist-es/commands/ListEndpointsByPlatformApplicationCommand.js +18 -41
  71. package/dist-es/commands/ListOriginationNumbersCommand.js +18 -41
  72. package/dist-es/commands/ListPhoneNumbersOptedOutCommand.js +18 -41
  73. package/dist-es/commands/ListPlatformApplicationsCommand.js +18 -41
  74. package/dist-es/commands/ListSMSSandboxPhoneNumbersCommand.js +18 -41
  75. package/dist-es/commands/ListSubscriptionsByTopicCommand.js +18 -41
  76. package/dist-es/commands/ListSubscriptionsCommand.js +18 -41
  77. package/dist-es/commands/ListTagsForResourceCommand.js +18 -41
  78. package/dist-es/commands/ListTopicsCommand.js +18 -41
  79. package/dist-es/commands/OptInPhoneNumberCommand.js +18 -41
  80. package/dist-es/commands/PublishBatchCommand.js +18 -41
  81. package/dist-es/commands/PublishCommand.js +18 -41
  82. package/dist-es/commands/PutDataProtectionPolicyCommand.js +18 -41
  83. package/dist-es/commands/RemovePermissionCommand.js +18 -41
  84. package/dist-es/commands/SetEndpointAttributesCommand.js +18 -41
  85. package/dist-es/commands/SetPlatformApplicationAttributesCommand.js +18 -41
  86. package/dist-es/commands/SetSMSAttributesCommand.js +18 -41
  87. package/dist-es/commands/SetSubscriptionAttributesCommand.js +18 -41
  88. package/dist-es/commands/SetTopicAttributesCommand.js +18 -41
  89. package/dist-es/commands/SubscribeCommand.js +18 -41
  90. package/dist-es/commands/TagResourceCommand.js +18 -41
  91. package/dist-es/commands/UnsubscribeCommand.js +18 -41
  92. package/dist-es/commands/UntagResourceCommand.js +18 -41
  93. package/dist-es/commands/VerifySMSSandboxPhoneNumberCommand.js +18 -41
  94. package/dist-es/endpoint/EndpointParameters.js +6 -0
  95. package/dist-es/pagination/ListEndpointsByPlatformApplicationPaginator.js +2 -22
  96. package/dist-es/pagination/ListOriginationNumbersPaginator.js +2 -23
  97. package/dist-es/pagination/ListPhoneNumbersOptedOutPaginator.js +2 -22
  98. package/dist-es/pagination/ListPlatformApplicationsPaginator.js +2 -22
  99. package/dist-es/pagination/ListSMSSandboxPhoneNumbersPaginator.js +2 -23
  100. package/dist-es/pagination/ListSubscriptionsByTopicPaginator.js +2 -22
  101. package/dist-es/pagination/ListSubscriptionsPaginator.js +2 -22
  102. package/dist-es/pagination/ListTopicsPaginator.js +2 -22
  103. package/dist-types/commands/AddPermissionCommand.d.ts +6 -21
  104. package/dist-types/commands/CheckIfPhoneNumberIsOptedOutCommand.d.ts +6 -21
  105. package/dist-types/commands/ConfirmSubscriptionCommand.d.ts +6 -21
  106. package/dist-types/commands/CreatePlatformApplicationCommand.d.ts +6 -21
  107. package/dist-types/commands/CreatePlatformEndpointCommand.d.ts +6 -21
  108. package/dist-types/commands/CreateSMSSandboxPhoneNumberCommand.d.ts +6 -21
  109. package/dist-types/commands/CreateTopicCommand.d.ts +6 -21
  110. package/dist-types/commands/DeleteEndpointCommand.d.ts +6 -21
  111. package/dist-types/commands/DeletePlatformApplicationCommand.d.ts +6 -21
  112. package/dist-types/commands/DeleteSMSSandboxPhoneNumberCommand.d.ts +6 -21
  113. package/dist-types/commands/DeleteTopicCommand.d.ts +6 -21
  114. package/dist-types/commands/GetDataProtectionPolicyCommand.d.ts +6 -21
  115. package/dist-types/commands/GetEndpointAttributesCommand.d.ts +6 -21
  116. package/dist-types/commands/GetPlatformApplicationAttributesCommand.d.ts +6 -21
  117. package/dist-types/commands/GetSMSAttributesCommand.d.ts +6 -21
  118. package/dist-types/commands/GetSMSSandboxAccountStatusCommand.d.ts +6 -21
  119. package/dist-types/commands/GetSubscriptionAttributesCommand.d.ts +6 -21
  120. package/dist-types/commands/GetTopicAttributesCommand.d.ts +6 -21
  121. package/dist-types/commands/ListEndpointsByPlatformApplicationCommand.d.ts +6 -21
  122. package/dist-types/commands/ListOriginationNumbersCommand.d.ts +6 -21
  123. package/dist-types/commands/ListPhoneNumbersOptedOutCommand.d.ts +6 -21
  124. package/dist-types/commands/ListPlatformApplicationsCommand.d.ts +6 -21
  125. package/dist-types/commands/ListSMSSandboxPhoneNumbersCommand.d.ts +6 -21
  126. package/dist-types/commands/ListSubscriptionsByTopicCommand.d.ts +6 -21
  127. package/dist-types/commands/ListSubscriptionsCommand.d.ts +6 -21
  128. package/dist-types/commands/ListTagsForResourceCommand.d.ts +6 -21
  129. package/dist-types/commands/ListTopicsCommand.d.ts +6 -21
  130. package/dist-types/commands/OptInPhoneNumberCommand.d.ts +6 -21
  131. package/dist-types/commands/PublishBatchCommand.d.ts +6 -21
  132. package/dist-types/commands/PublishCommand.d.ts +6 -21
  133. package/dist-types/commands/PutDataProtectionPolicyCommand.d.ts +6 -21
  134. package/dist-types/commands/RemovePermissionCommand.d.ts +6 -21
  135. package/dist-types/commands/SetEndpointAttributesCommand.d.ts +6 -21
  136. package/dist-types/commands/SetPlatformApplicationAttributesCommand.d.ts +6 -21
  137. package/dist-types/commands/SetSMSAttributesCommand.d.ts +6 -21
  138. package/dist-types/commands/SetSubscriptionAttributesCommand.d.ts +6 -21
  139. package/dist-types/commands/SetTopicAttributesCommand.d.ts +6 -21
  140. package/dist-types/commands/SubscribeCommand.d.ts +6 -21
  141. package/dist-types/commands/TagResourceCommand.d.ts +6 -21
  142. package/dist-types/commands/UnsubscribeCommand.d.ts +6 -21
  143. package/dist-types/commands/UntagResourceCommand.d.ts +6 -21
  144. package/dist-types/commands/VerifySMSSandboxPhoneNumberCommand.d.ts +6 -21
  145. package/dist-types/endpoint/EndpointParameters.d.ts +18 -0
  146. package/dist-types/pagination/ListEndpointsByPlatformApplicationPaginator.d.ts +1 -1
  147. package/dist-types/pagination/ListOriginationNumbersPaginator.d.ts +1 -1
  148. package/dist-types/pagination/ListPhoneNumbersOptedOutPaginator.d.ts +1 -1
  149. package/dist-types/pagination/ListPlatformApplicationsPaginator.d.ts +1 -1
  150. package/dist-types/pagination/ListSMSSandboxPhoneNumbersPaginator.d.ts +1 -1
  151. package/dist-types/pagination/ListSubscriptionsByTopicPaginator.d.ts +1 -1
  152. package/dist-types/pagination/ListSubscriptionsPaginator.d.ts +1 -1
  153. package/dist-types/pagination/ListTopicsPaginator.d.ts +1 -1
  154. package/dist-types/ts3.4/commands/AddPermissionCommand.d.ts +14 -23
  155. package/dist-types/ts3.4/commands/CheckIfPhoneNumberIsOptedOutCommand.d.ts +12 -24
  156. package/dist-types/ts3.4/commands/ConfirmSubscriptionCommand.d.ts +14 -23
  157. package/dist-types/ts3.4/commands/CreatePlatformApplicationCommand.d.ts +12 -24
  158. package/dist-types/ts3.4/commands/CreatePlatformEndpointCommand.d.ts +12 -24
  159. package/dist-types/ts3.4/commands/CreateSMSSandboxPhoneNumberCommand.d.ts +12 -24
  160. package/dist-types/ts3.4/commands/CreateTopicCommand.d.ts +14 -23
  161. package/dist-types/ts3.4/commands/DeleteEndpointCommand.d.ts +14 -23
  162. package/dist-types/ts3.4/commands/DeletePlatformApplicationCommand.d.ts +12 -24
  163. package/dist-types/ts3.4/commands/DeleteSMSSandboxPhoneNumberCommand.d.ts +12 -24
  164. package/dist-types/ts3.4/commands/DeleteTopicCommand.d.ts +14 -23
  165. package/dist-types/ts3.4/commands/GetDataProtectionPolicyCommand.d.ts +12 -24
  166. package/dist-types/ts3.4/commands/GetEndpointAttributesCommand.d.ts +12 -24
  167. package/dist-types/ts3.4/commands/GetPlatformApplicationAttributesCommand.d.ts +12 -24
  168. package/dist-types/ts3.4/commands/GetSMSAttributesCommand.d.ts +14 -23
  169. package/dist-types/ts3.4/commands/GetSMSSandboxAccountStatusCommand.d.ts +12 -24
  170. package/dist-types/ts3.4/commands/GetSubscriptionAttributesCommand.d.ts +12 -24
  171. package/dist-types/ts3.4/commands/GetTopicAttributesCommand.d.ts +14 -23
  172. package/dist-types/ts3.4/commands/ListEndpointsByPlatformApplicationCommand.d.ts +12 -24
  173. package/dist-types/ts3.4/commands/ListOriginationNumbersCommand.d.ts +12 -24
  174. package/dist-types/ts3.4/commands/ListPhoneNumbersOptedOutCommand.d.ts +12 -24
  175. package/dist-types/ts3.4/commands/ListPlatformApplicationsCommand.d.ts +12 -24
  176. package/dist-types/ts3.4/commands/ListSMSSandboxPhoneNumbersCommand.d.ts +12 -24
  177. package/dist-types/ts3.4/commands/ListSubscriptionsByTopicCommand.d.ts +12 -24
  178. package/dist-types/ts3.4/commands/ListSubscriptionsCommand.d.ts +14 -23
  179. package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +14 -23
  180. package/dist-types/ts3.4/commands/ListTopicsCommand.d.ts +14 -23
  181. package/dist-types/ts3.4/commands/OptInPhoneNumberCommand.d.ts +14 -23
  182. package/dist-types/ts3.4/commands/PublishBatchCommand.d.ts +14 -23
  183. package/dist-types/ts3.4/commands/PublishCommand.d.ts +12 -23
  184. package/dist-types/ts3.4/commands/PutDataProtectionPolicyCommand.d.ts +12 -24
  185. package/dist-types/ts3.4/commands/RemovePermissionCommand.d.ts +14 -23
  186. package/dist-types/ts3.4/commands/SetEndpointAttributesCommand.d.ts +12 -24
  187. package/dist-types/ts3.4/commands/SetPlatformApplicationAttributesCommand.d.ts +12 -24
  188. package/dist-types/ts3.4/commands/SetSMSAttributesCommand.d.ts +14 -23
  189. package/dist-types/ts3.4/commands/SetSubscriptionAttributesCommand.d.ts +12 -24
  190. package/dist-types/ts3.4/commands/SetTopicAttributesCommand.d.ts +14 -23
  191. package/dist-types/ts3.4/commands/SubscribeCommand.d.ts +14 -23
  192. package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +14 -23
  193. package/dist-types/ts3.4/commands/UnsubscribeCommand.d.ts +14 -23
  194. package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +14 -23
  195. package/dist-types/ts3.4/commands/VerifySMSSandboxPhoneNumberCommand.d.ts +12 -24
  196. package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +18 -0
  197. package/dist-types/ts3.4/pagination/ListEndpointsByPlatformApplicationPaginator.d.ts +3 -3
  198. package/dist-types/ts3.4/pagination/ListOriginationNumbersPaginator.d.ts +3 -3
  199. package/dist-types/ts3.4/pagination/ListPhoneNumbersOptedOutPaginator.d.ts +3 -3
  200. package/dist-types/ts3.4/pagination/ListPlatformApplicationsPaginator.d.ts +3 -3
  201. package/dist-types/ts3.4/pagination/ListSMSSandboxPhoneNumbersPaginator.d.ts +3 -3
  202. package/dist-types/ts3.4/pagination/ListSubscriptionsByTopicPaginator.d.ts +3 -3
  203. package/dist-types/ts3.4/pagination/ListSubscriptionsPaginator.d.ts +3 -3
  204. package/dist-types/ts3.4/pagination/ListTopicsPaginator.d.ts +3 -3
  205. package/package.json +11 -10
@@ -5,47 +5,24 @@ const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
5
5
  const middleware_serde_1 = require("@smithy/middleware-serde");
6
6
  const smithy_client_1 = require("@smithy/smithy-client");
7
7
  Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
8
- const types_1 = require("@smithy/types");
8
+ const EndpointParameters_1 = require("../endpoint/EndpointParameters");
9
9
  const Aws_query_1 = require("../protocols/Aws_query");
10
- class SetTopicAttributesCommand extends smithy_client_1.Command {
11
- static getEndpointParameterInstructions() {
12
- return {
13
- UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
14
- Endpoint: { type: "builtInParams", name: "endpoint" },
15
- Region: { type: "builtInParams", name: "region" },
16
- UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
17
- };
18
- }
19
- constructor(input) {
20
- super();
21
- this.input = input;
22
- }
23
- resolveMiddleware(clientStack, configuration, options) {
24
- this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
25
- this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, SetTopicAttributesCommand.getEndpointParameterInstructions()));
26
- const stack = clientStack.concat(this.middlewareStack);
27
- const { logger } = configuration;
28
- const clientName = "SNSClient";
29
- const commandName = "SetTopicAttributesCommand";
30
- const handlerExecutionContext = {
31
- logger,
32
- clientName,
33
- commandName,
34
- inputFilterSensitiveLog: (_) => _,
35
- outputFilterSensitiveLog: (_) => _,
36
- [types_1.SMITHY_CONTEXT_KEY]: {
37
- service: "AmazonSimpleNotificationService",
38
- operation: "SetTopicAttributes",
39
- },
40
- };
41
- const { requestHandler } = configuration;
42
- return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
43
- }
44
- serialize(input, context) {
45
- return (0, Aws_query_1.se_SetTopicAttributesCommand)(input, context);
46
- }
47
- deserialize(output, context) {
48
- return (0, Aws_query_1.de_SetTopicAttributesCommand)(output, context);
49
- }
10
+ class SetTopicAttributesCommand extends smithy_client_1.Command
11
+ .classBuilder()
12
+ .ep({
13
+ ...EndpointParameters_1.commonParams,
14
+ })
15
+ .m(function (Command, cs, config, o) {
16
+ return [
17
+ (0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
18
+ (0, middleware_endpoint_1.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
19
+ ];
20
+ })
21
+ .s("AmazonSimpleNotificationService", "SetTopicAttributes", {})
22
+ .n("SNSClient", "SetTopicAttributesCommand")
23
+ .f(void 0, void 0)
24
+ .ser(Aws_query_1.se_SetTopicAttributesCommand)
25
+ .de(Aws_query_1.de_SetTopicAttributesCommand)
26
+ .build() {
50
27
  }
51
28
  exports.SetTopicAttributesCommand = SetTopicAttributesCommand;
@@ -5,47 +5,24 @@ const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
5
5
  const middleware_serde_1 = require("@smithy/middleware-serde");
6
6
  const smithy_client_1 = require("@smithy/smithy-client");
7
7
  Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
8
- const types_1 = require("@smithy/types");
8
+ const EndpointParameters_1 = require("../endpoint/EndpointParameters");
9
9
  const Aws_query_1 = require("../protocols/Aws_query");
10
- class SubscribeCommand extends smithy_client_1.Command {
11
- static getEndpointParameterInstructions() {
12
- return {
13
- UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
14
- Endpoint: { type: "builtInParams", name: "endpoint" },
15
- Region: { type: "builtInParams", name: "region" },
16
- UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
17
- };
18
- }
19
- constructor(input) {
20
- super();
21
- this.input = input;
22
- }
23
- resolveMiddleware(clientStack, configuration, options) {
24
- this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
25
- this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, SubscribeCommand.getEndpointParameterInstructions()));
26
- const stack = clientStack.concat(this.middlewareStack);
27
- const { logger } = configuration;
28
- const clientName = "SNSClient";
29
- const commandName = "SubscribeCommand";
30
- const handlerExecutionContext = {
31
- logger,
32
- clientName,
33
- commandName,
34
- inputFilterSensitiveLog: (_) => _,
35
- outputFilterSensitiveLog: (_) => _,
36
- [types_1.SMITHY_CONTEXT_KEY]: {
37
- service: "AmazonSimpleNotificationService",
38
- operation: "Subscribe",
39
- },
40
- };
41
- const { requestHandler } = configuration;
42
- return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
43
- }
44
- serialize(input, context) {
45
- return (0, Aws_query_1.se_SubscribeCommand)(input, context);
46
- }
47
- deserialize(output, context) {
48
- return (0, Aws_query_1.de_SubscribeCommand)(output, context);
49
- }
10
+ class SubscribeCommand extends smithy_client_1.Command
11
+ .classBuilder()
12
+ .ep({
13
+ ...EndpointParameters_1.commonParams,
14
+ })
15
+ .m(function (Command, cs, config, o) {
16
+ return [
17
+ (0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
18
+ (0, middleware_endpoint_1.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
19
+ ];
20
+ })
21
+ .s("AmazonSimpleNotificationService", "Subscribe", {})
22
+ .n("SNSClient", "SubscribeCommand")
23
+ .f(void 0, void 0)
24
+ .ser(Aws_query_1.se_SubscribeCommand)
25
+ .de(Aws_query_1.de_SubscribeCommand)
26
+ .build() {
50
27
  }
51
28
  exports.SubscribeCommand = SubscribeCommand;
@@ -5,47 +5,24 @@ const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
5
5
  const middleware_serde_1 = require("@smithy/middleware-serde");
6
6
  const smithy_client_1 = require("@smithy/smithy-client");
7
7
  Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
8
- const types_1 = require("@smithy/types");
8
+ const EndpointParameters_1 = require("../endpoint/EndpointParameters");
9
9
  const Aws_query_1 = require("../protocols/Aws_query");
10
- class TagResourceCommand extends smithy_client_1.Command {
11
- static getEndpointParameterInstructions() {
12
- return {
13
- UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
14
- Endpoint: { type: "builtInParams", name: "endpoint" },
15
- Region: { type: "builtInParams", name: "region" },
16
- UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
17
- };
18
- }
19
- constructor(input) {
20
- super();
21
- this.input = input;
22
- }
23
- resolveMiddleware(clientStack, configuration, options) {
24
- this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
25
- this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, TagResourceCommand.getEndpointParameterInstructions()));
26
- const stack = clientStack.concat(this.middlewareStack);
27
- const { logger } = configuration;
28
- const clientName = "SNSClient";
29
- const commandName = "TagResourceCommand";
30
- const handlerExecutionContext = {
31
- logger,
32
- clientName,
33
- commandName,
34
- inputFilterSensitiveLog: (_) => _,
35
- outputFilterSensitiveLog: (_) => _,
36
- [types_1.SMITHY_CONTEXT_KEY]: {
37
- service: "AmazonSimpleNotificationService",
38
- operation: "TagResource",
39
- },
40
- };
41
- const { requestHandler } = configuration;
42
- return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
43
- }
44
- serialize(input, context) {
45
- return (0, Aws_query_1.se_TagResourceCommand)(input, context);
46
- }
47
- deserialize(output, context) {
48
- return (0, Aws_query_1.de_TagResourceCommand)(output, context);
49
- }
10
+ class TagResourceCommand extends smithy_client_1.Command
11
+ .classBuilder()
12
+ .ep({
13
+ ...EndpointParameters_1.commonParams,
14
+ })
15
+ .m(function (Command, cs, config, o) {
16
+ return [
17
+ (0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
18
+ (0, middleware_endpoint_1.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
19
+ ];
20
+ })
21
+ .s("AmazonSimpleNotificationService", "TagResource", {})
22
+ .n("SNSClient", "TagResourceCommand")
23
+ .f(void 0, void 0)
24
+ .ser(Aws_query_1.se_TagResourceCommand)
25
+ .de(Aws_query_1.de_TagResourceCommand)
26
+ .build() {
50
27
  }
51
28
  exports.TagResourceCommand = TagResourceCommand;
@@ -5,47 +5,24 @@ const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
5
5
  const middleware_serde_1 = require("@smithy/middleware-serde");
6
6
  const smithy_client_1 = require("@smithy/smithy-client");
7
7
  Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
8
- const types_1 = require("@smithy/types");
8
+ const EndpointParameters_1 = require("../endpoint/EndpointParameters");
9
9
  const Aws_query_1 = require("../protocols/Aws_query");
10
- class UnsubscribeCommand extends smithy_client_1.Command {
11
- static getEndpointParameterInstructions() {
12
- return {
13
- UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
14
- Endpoint: { type: "builtInParams", name: "endpoint" },
15
- Region: { type: "builtInParams", name: "region" },
16
- UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
17
- };
18
- }
19
- constructor(input) {
20
- super();
21
- this.input = input;
22
- }
23
- resolveMiddleware(clientStack, configuration, options) {
24
- this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
25
- this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, UnsubscribeCommand.getEndpointParameterInstructions()));
26
- const stack = clientStack.concat(this.middlewareStack);
27
- const { logger } = configuration;
28
- const clientName = "SNSClient";
29
- const commandName = "UnsubscribeCommand";
30
- const handlerExecutionContext = {
31
- logger,
32
- clientName,
33
- commandName,
34
- inputFilterSensitiveLog: (_) => _,
35
- outputFilterSensitiveLog: (_) => _,
36
- [types_1.SMITHY_CONTEXT_KEY]: {
37
- service: "AmazonSimpleNotificationService",
38
- operation: "Unsubscribe",
39
- },
40
- };
41
- const { requestHandler } = configuration;
42
- return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
43
- }
44
- serialize(input, context) {
45
- return (0, Aws_query_1.se_UnsubscribeCommand)(input, context);
46
- }
47
- deserialize(output, context) {
48
- return (0, Aws_query_1.de_UnsubscribeCommand)(output, context);
49
- }
10
+ class UnsubscribeCommand extends smithy_client_1.Command
11
+ .classBuilder()
12
+ .ep({
13
+ ...EndpointParameters_1.commonParams,
14
+ })
15
+ .m(function (Command, cs, config, o) {
16
+ return [
17
+ (0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
18
+ (0, middleware_endpoint_1.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
19
+ ];
20
+ })
21
+ .s("AmazonSimpleNotificationService", "Unsubscribe", {})
22
+ .n("SNSClient", "UnsubscribeCommand")
23
+ .f(void 0, void 0)
24
+ .ser(Aws_query_1.se_UnsubscribeCommand)
25
+ .de(Aws_query_1.de_UnsubscribeCommand)
26
+ .build() {
50
27
  }
51
28
  exports.UnsubscribeCommand = UnsubscribeCommand;
@@ -5,47 +5,24 @@ const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
5
5
  const middleware_serde_1 = require("@smithy/middleware-serde");
6
6
  const smithy_client_1 = require("@smithy/smithy-client");
7
7
  Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
8
- const types_1 = require("@smithy/types");
8
+ const EndpointParameters_1 = require("../endpoint/EndpointParameters");
9
9
  const Aws_query_1 = require("../protocols/Aws_query");
10
- class UntagResourceCommand extends smithy_client_1.Command {
11
- static getEndpointParameterInstructions() {
12
- return {
13
- UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
14
- Endpoint: { type: "builtInParams", name: "endpoint" },
15
- Region: { type: "builtInParams", name: "region" },
16
- UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
17
- };
18
- }
19
- constructor(input) {
20
- super();
21
- this.input = input;
22
- }
23
- resolveMiddleware(clientStack, configuration, options) {
24
- this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
25
- this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, UntagResourceCommand.getEndpointParameterInstructions()));
26
- const stack = clientStack.concat(this.middlewareStack);
27
- const { logger } = configuration;
28
- const clientName = "SNSClient";
29
- const commandName = "UntagResourceCommand";
30
- const handlerExecutionContext = {
31
- logger,
32
- clientName,
33
- commandName,
34
- inputFilterSensitiveLog: (_) => _,
35
- outputFilterSensitiveLog: (_) => _,
36
- [types_1.SMITHY_CONTEXT_KEY]: {
37
- service: "AmazonSimpleNotificationService",
38
- operation: "UntagResource",
39
- },
40
- };
41
- const { requestHandler } = configuration;
42
- return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
43
- }
44
- serialize(input, context) {
45
- return (0, Aws_query_1.se_UntagResourceCommand)(input, context);
46
- }
47
- deserialize(output, context) {
48
- return (0, Aws_query_1.de_UntagResourceCommand)(output, context);
49
- }
10
+ class UntagResourceCommand extends smithy_client_1.Command
11
+ .classBuilder()
12
+ .ep({
13
+ ...EndpointParameters_1.commonParams,
14
+ })
15
+ .m(function (Command, cs, config, o) {
16
+ return [
17
+ (0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
18
+ (0, middleware_endpoint_1.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
19
+ ];
20
+ })
21
+ .s("AmazonSimpleNotificationService", "UntagResource", {})
22
+ .n("SNSClient", "UntagResourceCommand")
23
+ .f(void 0, void 0)
24
+ .ser(Aws_query_1.se_UntagResourceCommand)
25
+ .de(Aws_query_1.de_UntagResourceCommand)
26
+ .build() {
50
27
  }
51
28
  exports.UntagResourceCommand = UntagResourceCommand;
@@ -5,47 +5,24 @@ const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
5
5
  const middleware_serde_1 = require("@smithy/middleware-serde");
6
6
  const smithy_client_1 = require("@smithy/smithy-client");
7
7
  Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
8
- const types_1 = require("@smithy/types");
8
+ const EndpointParameters_1 = require("../endpoint/EndpointParameters");
9
9
  const Aws_query_1 = require("../protocols/Aws_query");
10
- class VerifySMSSandboxPhoneNumberCommand extends smithy_client_1.Command {
11
- static getEndpointParameterInstructions() {
12
- return {
13
- UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
14
- Endpoint: { type: "builtInParams", name: "endpoint" },
15
- Region: { type: "builtInParams", name: "region" },
16
- UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
17
- };
18
- }
19
- constructor(input) {
20
- super();
21
- this.input = input;
22
- }
23
- resolveMiddleware(clientStack, configuration, options) {
24
- this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
25
- this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, VerifySMSSandboxPhoneNumberCommand.getEndpointParameterInstructions()));
26
- const stack = clientStack.concat(this.middlewareStack);
27
- const { logger } = configuration;
28
- const clientName = "SNSClient";
29
- const commandName = "VerifySMSSandboxPhoneNumberCommand";
30
- const handlerExecutionContext = {
31
- logger,
32
- clientName,
33
- commandName,
34
- inputFilterSensitiveLog: (_) => _,
35
- outputFilterSensitiveLog: (_) => _,
36
- [types_1.SMITHY_CONTEXT_KEY]: {
37
- service: "AmazonSimpleNotificationService",
38
- operation: "VerifySMSSandboxPhoneNumber",
39
- },
40
- };
41
- const { requestHandler } = configuration;
42
- return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
43
- }
44
- serialize(input, context) {
45
- return (0, Aws_query_1.se_VerifySMSSandboxPhoneNumberCommand)(input, context);
46
- }
47
- deserialize(output, context) {
48
- return (0, Aws_query_1.de_VerifySMSSandboxPhoneNumberCommand)(output, context);
49
- }
10
+ class VerifySMSSandboxPhoneNumberCommand extends smithy_client_1.Command
11
+ .classBuilder()
12
+ .ep({
13
+ ...EndpointParameters_1.commonParams,
14
+ })
15
+ .m(function (Command, cs, config, o) {
16
+ return [
17
+ (0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
18
+ (0, middleware_endpoint_1.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
19
+ ];
20
+ })
21
+ .s("AmazonSimpleNotificationService", "VerifySMSSandboxPhoneNumber", {})
22
+ .n("SNSClient", "VerifySMSSandboxPhoneNumberCommand")
23
+ .f(void 0, void 0)
24
+ .ser(Aws_query_1.se_VerifySMSSandboxPhoneNumberCommand)
25
+ .de(Aws_query_1.de_VerifySMSSandboxPhoneNumberCommand)
26
+ .build() {
50
27
  }
51
28
  exports.VerifySMSSandboxPhoneNumberCommand = VerifySMSSandboxPhoneNumberCommand;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.resolveClientEndpointParameters = void 0;
3
+ exports.commonParams = exports.resolveClientEndpointParameters = void 0;
4
4
  const resolveClientEndpointParameters = (options) => {
5
5
  return {
6
6
  ...options,
@@ -10,3 +10,9 @@ const resolveClientEndpointParameters = (options) => {
10
10
  };
11
11
  };
12
12
  exports.resolveClientEndpointParameters = resolveClientEndpointParameters;
13
+ exports.commonParams = {
14
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
15
+ Endpoint: { type: "builtInParams", name: "endpoint" },
16
+ Region: { type: "builtInParams", name: "region" },
17
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
18
+ };
@@ -1,28 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListEndpointsByPlatformApplication = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListEndpointsByPlatformApplicationCommand_1 = require("../commands/ListEndpointsByPlatformApplicationCommand");
5
6
  const SNSClient_1 = require("../SNSClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListEndpointsByPlatformApplicationCommand_1.ListEndpointsByPlatformApplicationCommand(input), ...args);
8
- };
9
- async function* paginateListEndpointsByPlatformApplication(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- if (config.client instanceof SNSClient_1.SNSClient) {
16
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
17
- }
18
- else {
19
- throw new Error("Invalid client, expected SNS | SNSClient");
20
- }
21
- yield page;
22
- const prevToken = token;
23
- token = page.NextToken;
24
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
25
- }
26
- return undefined;
27
- }
28
- exports.paginateListEndpointsByPlatformApplication = paginateListEndpointsByPlatformApplication;
7
+ exports.paginateListEndpointsByPlatformApplication = (0, core_1.createPaginator)(SNSClient_1.SNSClient, ListEndpointsByPlatformApplicationCommand_1.ListEndpointsByPlatformApplicationCommand, "NextToken", "NextToken", "");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListOriginationNumbers = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListOriginationNumbersCommand_1 = require("../commands/ListOriginationNumbersCommand");
5
6
  const SNSClient_1 = require("../SNSClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListOriginationNumbersCommand_1.ListOriginationNumbersCommand(input), ...args);
8
- };
9
- async function* paginateListOriginationNumbers(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- input["MaxResults"] = config.pageSize;
16
- if (config.client instanceof SNSClient_1.SNSClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected SNS | SNSClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.NextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateListOriginationNumbers = paginateListOriginationNumbers;
7
+ exports.paginateListOriginationNumbers = (0, core_1.createPaginator)(SNSClient_1.SNSClient, ListOriginationNumbersCommand_1.ListOriginationNumbersCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,28 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListPhoneNumbersOptedOut = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListPhoneNumbersOptedOutCommand_1 = require("../commands/ListPhoneNumbersOptedOutCommand");
5
6
  const SNSClient_1 = require("../SNSClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListPhoneNumbersOptedOutCommand_1.ListPhoneNumbersOptedOutCommand(input), ...args);
8
- };
9
- async function* paginateListPhoneNumbersOptedOut(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.nextToken = token;
15
- if (config.client instanceof SNSClient_1.SNSClient) {
16
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
17
- }
18
- else {
19
- throw new Error("Invalid client, expected SNS | SNSClient");
20
- }
21
- yield page;
22
- const prevToken = token;
23
- token = page.nextToken;
24
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
25
- }
26
- return undefined;
27
- }
28
- exports.paginateListPhoneNumbersOptedOut = paginateListPhoneNumbersOptedOut;
7
+ exports.paginateListPhoneNumbersOptedOut = (0, core_1.createPaginator)(SNSClient_1.SNSClient, ListPhoneNumbersOptedOutCommand_1.ListPhoneNumbersOptedOutCommand, "nextToken", "nextToken", "");
@@ -1,28 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListPlatformApplications = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListPlatformApplicationsCommand_1 = require("../commands/ListPlatformApplicationsCommand");
5
6
  const SNSClient_1 = require("../SNSClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListPlatformApplicationsCommand_1.ListPlatformApplicationsCommand(input), ...args);
8
- };
9
- async function* paginateListPlatformApplications(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- if (config.client instanceof SNSClient_1.SNSClient) {
16
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
17
- }
18
- else {
19
- throw new Error("Invalid client, expected SNS | SNSClient");
20
- }
21
- yield page;
22
- const prevToken = token;
23
- token = page.NextToken;
24
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
25
- }
26
- return undefined;
27
- }
28
- exports.paginateListPlatformApplications = paginateListPlatformApplications;
7
+ exports.paginateListPlatformApplications = (0, core_1.createPaginator)(SNSClient_1.SNSClient, ListPlatformApplicationsCommand_1.ListPlatformApplicationsCommand, "NextToken", "NextToken", "");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListSMSSandboxPhoneNumbers = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListSMSSandboxPhoneNumbersCommand_1 = require("../commands/ListSMSSandboxPhoneNumbersCommand");
5
6
  const SNSClient_1 = require("../SNSClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListSMSSandboxPhoneNumbersCommand_1.ListSMSSandboxPhoneNumbersCommand(input), ...args);
8
- };
9
- async function* paginateListSMSSandboxPhoneNumbers(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- input["MaxResults"] = config.pageSize;
16
- if (config.client instanceof SNSClient_1.SNSClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected SNS | SNSClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.NextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateListSMSSandboxPhoneNumbers = paginateListSMSSandboxPhoneNumbers;
7
+ exports.paginateListSMSSandboxPhoneNumbers = (0, core_1.createPaginator)(SNSClient_1.SNSClient, ListSMSSandboxPhoneNumbersCommand_1.ListSMSSandboxPhoneNumbersCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,28 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListSubscriptionsByTopic = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListSubscriptionsByTopicCommand_1 = require("../commands/ListSubscriptionsByTopicCommand");
5
6
  const SNSClient_1 = require("../SNSClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListSubscriptionsByTopicCommand_1.ListSubscriptionsByTopicCommand(input), ...args);
8
- };
9
- async function* paginateListSubscriptionsByTopic(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- if (config.client instanceof SNSClient_1.SNSClient) {
16
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
17
- }
18
- else {
19
- throw new Error("Invalid client, expected SNS | SNSClient");
20
- }
21
- yield page;
22
- const prevToken = token;
23
- token = page.NextToken;
24
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
25
- }
26
- return undefined;
27
- }
28
- exports.paginateListSubscriptionsByTopic = paginateListSubscriptionsByTopic;
7
+ exports.paginateListSubscriptionsByTopic = (0, core_1.createPaginator)(SNSClient_1.SNSClient, ListSubscriptionsByTopicCommand_1.ListSubscriptionsByTopicCommand, "NextToken", "NextToken", "");