@aws-sdk/client-rum 3.180.0 → 3.183.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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,26 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.183.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.182.0...v3.183.0) (2022-10-03)
7
+
8
+ **Note:** Version bump only for package @aws-sdk/client-rum
9
+
10
+
11
+
12
+
13
+
14
+ # [3.181.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.180.0...v3.181.0) (2022-09-29)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * **clients:** make parseErrorBody async ([#3999](https://github.com/aws/aws-sdk-js-v3/issues/3999)) ([2558c93](https://github.com/aws/aws-sdk-js-v3/commit/2558c93c050357ac6dc47aa0452b15b12ebfd676))
20
+ * **clients:** populate message field when parsing errors ([#3995](https://github.com/aws/aws-sdk-js-v3/issues/3995)) ([02e47f1](https://github.com/aws/aws-sdk-js-v3/commit/02e47f14397ae0a5d2e2883350d038b307fdcdb4))
21
+
22
+
23
+
24
+
25
+
6
26
  # [3.180.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.179.0...v3.180.0) (2022-09-27)
7
27
 
8
28
  **Note:** Version bump only for package @aws-sdk/client-rum
@@ -249,7 +249,7 @@ exports.deserializeAws_restJson1CreateAppMonitorCommand = deserializeAws_restJso
249
249
  const deserializeAws_restJson1CreateAppMonitorCommandError = async (output, context) => {
250
250
  const parsedOutput = {
251
251
  ...output,
252
- body: await parseBody(output.body, context),
252
+ body: await parseErrorBody(output.body, context),
253
253
  };
254
254
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
255
255
  switch (errorCode) {
@@ -295,7 +295,7 @@ exports.deserializeAws_restJson1DeleteAppMonitorCommand = deserializeAws_restJso
295
295
  const deserializeAws_restJson1DeleteAppMonitorCommandError = async (output, context) => {
296
296
  const parsedOutput = {
297
297
  ...output,
298
- body: await parseBody(output.body, context),
298
+ body: await parseErrorBody(output.body, context),
299
299
  };
300
300
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
301
301
  switch (errorCode) {
@@ -344,7 +344,7 @@ exports.deserializeAws_restJson1GetAppMonitorCommand = deserializeAws_restJson1G
344
344
  const deserializeAws_restJson1GetAppMonitorCommandError = async (output, context) => {
345
345
  const parsedOutput = {
346
346
  ...output,
347
- body: await parseBody(output.body, context),
347
+ body: await parseErrorBody(output.body, context),
348
348
  };
349
349
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
350
350
  switch (errorCode) {
@@ -393,7 +393,7 @@ exports.deserializeAws_restJson1GetAppMonitorDataCommand = deserializeAws_restJs
393
393
  const deserializeAws_restJson1GetAppMonitorDataCommandError = async (output, context) => {
394
394
  const parsedOutput = {
395
395
  ...output,
396
- body: await parseBody(output.body, context),
396
+ body: await parseErrorBody(output.body, context),
397
397
  };
398
398
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
399
399
  switch (errorCode) {
@@ -442,7 +442,7 @@ exports.deserializeAws_restJson1ListAppMonitorsCommand = deserializeAws_restJson
442
442
  const deserializeAws_restJson1ListAppMonitorsCommandError = async (output, context) => {
443
443
  const parsedOutput = {
444
444
  ...output,
445
- body: await parseBody(output.body, context),
445
+ body: await parseErrorBody(output.body, context),
446
446
  };
447
447
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
448
448
  switch (errorCode) {
@@ -488,7 +488,7 @@ exports.deserializeAws_restJson1ListTagsForResourceCommand = deserializeAws_rest
488
488
  const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
489
489
  const parsedOutput = {
490
490
  ...output,
491
- body: await parseBody(output.body, context),
491
+ body: await parseErrorBody(output.body, context),
492
492
  };
493
493
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
494
494
  switch (errorCode) {
@@ -525,7 +525,7 @@ exports.deserializeAws_restJson1PutRumEventsCommand = deserializeAws_restJson1Pu
525
525
  const deserializeAws_restJson1PutRumEventsCommandError = async (output, context) => {
526
526
  const parsedOutput = {
527
527
  ...output,
528
- body: await parseBody(output.body, context),
528
+ body: await parseErrorBody(output.body, context),
529
529
  };
530
530
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
531
531
  switch (errorCode) {
@@ -568,7 +568,7 @@ exports.deserializeAws_restJson1TagResourceCommand = deserializeAws_restJson1Tag
568
568
  const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
569
569
  const parsedOutput = {
570
570
  ...output,
571
- body: await parseBody(output.body, context),
571
+ body: await parseErrorBody(output.body, context),
572
572
  };
573
573
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
574
574
  switch (errorCode) {
@@ -605,7 +605,7 @@ exports.deserializeAws_restJson1UntagResourceCommand = deserializeAws_restJson1U
605
605
  const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
606
606
  const parsedOutput = {
607
607
  ...output,
608
- body: await parseBody(output.body, context),
608
+ body: await parseErrorBody(output.body, context),
609
609
  };
610
610
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
611
611
  switch (errorCode) {
@@ -642,7 +642,7 @@ exports.deserializeAws_restJson1UpdateAppMonitorCommand = deserializeAws_restJso
642
642
  const deserializeAws_restJson1UpdateAppMonitorCommandError = async (output, context) => {
643
643
  const parsedOutput = {
644
644
  ...output,
645
- body: await parseBody(output.body, context),
645
+ body: await parseErrorBody(output.body, context),
646
646
  };
647
647
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
648
648
  switch (errorCode) {
@@ -1030,6 +1030,12 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
1030
1030
  }
1031
1031
  return {};
1032
1032
  });
1033
+ const parseErrorBody = async (errorBody, context) => {
1034
+ var _a;
1035
+ const value = await parseBody(errorBody, context);
1036
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
1037
+ return value;
1038
+ };
1033
1039
  const loadRestJsonErrorCode = (output, data) => {
1034
1040
  const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
1035
1041
  const sanitizeErrorCode = (rawValue) => {
package/dist-es/RUM.js CHANGED
@@ -1,4 +1,3 @@
1
- import { __extends } from "tslib";
2
1
  import { CreateAppMonitorCommand, } from "./commands/CreateAppMonitorCommand";
3
2
  import { DeleteAppMonitorCommand, } from "./commands/DeleteAppMonitorCommand";
4
3
  import { GetAppMonitorCommand, } from "./commands/GetAppMonitorCommand";
@@ -10,151 +9,145 @@ import { TagResourceCommand } from "./commands/TagResourceCommand";
10
9
  import { UntagResourceCommand, } from "./commands/UntagResourceCommand";
11
10
  import { UpdateAppMonitorCommand, } from "./commands/UpdateAppMonitorCommand";
12
11
  import { RUMClient } from "./RUMClient";
13
- var RUM = (function (_super) {
14
- __extends(RUM, _super);
15
- function RUM() {
16
- return _super !== null && _super.apply(this, arguments) || this;
17
- }
18
- RUM.prototype.createAppMonitor = function (args, optionsOrCb, cb) {
19
- var command = new CreateAppMonitorCommand(args);
12
+ export class RUM extends RUMClient {
13
+ createAppMonitor(args, optionsOrCb, cb) {
14
+ const command = new CreateAppMonitorCommand(args);
20
15
  if (typeof optionsOrCb === "function") {
21
16
  this.send(command, optionsOrCb);
22
17
  }
23
18
  else if (typeof cb === "function") {
24
19
  if (typeof optionsOrCb !== "object")
25
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
20
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
26
21
  this.send(command, optionsOrCb || {}, cb);
27
22
  }
28
23
  else {
29
24
  return this.send(command, optionsOrCb);
30
25
  }
31
- };
32
- RUM.prototype.deleteAppMonitor = function (args, optionsOrCb, cb) {
33
- var command = new DeleteAppMonitorCommand(args);
26
+ }
27
+ deleteAppMonitor(args, optionsOrCb, cb) {
28
+ const command = new DeleteAppMonitorCommand(args);
34
29
  if (typeof optionsOrCb === "function") {
35
30
  this.send(command, optionsOrCb);
36
31
  }
37
32
  else if (typeof cb === "function") {
38
33
  if (typeof optionsOrCb !== "object")
39
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
34
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
40
35
  this.send(command, optionsOrCb || {}, cb);
41
36
  }
42
37
  else {
43
38
  return this.send(command, optionsOrCb);
44
39
  }
45
- };
46
- RUM.prototype.getAppMonitor = function (args, optionsOrCb, cb) {
47
- var command = new GetAppMonitorCommand(args);
40
+ }
41
+ getAppMonitor(args, optionsOrCb, cb) {
42
+ const command = new GetAppMonitorCommand(args);
48
43
  if (typeof optionsOrCb === "function") {
49
44
  this.send(command, optionsOrCb);
50
45
  }
51
46
  else if (typeof cb === "function") {
52
47
  if (typeof optionsOrCb !== "object")
53
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
48
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
54
49
  this.send(command, optionsOrCb || {}, cb);
55
50
  }
56
51
  else {
57
52
  return this.send(command, optionsOrCb);
58
53
  }
59
- };
60
- RUM.prototype.getAppMonitorData = function (args, optionsOrCb, cb) {
61
- var command = new GetAppMonitorDataCommand(args);
54
+ }
55
+ getAppMonitorData(args, optionsOrCb, cb) {
56
+ const command = new GetAppMonitorDataCommand(args);
62
57
  if (typeof optionsOrCb === "function") {
63
58
  this.send(command, optionsOrCb);
64
59
  }
65
60
  else if (typeof cb === "function") {
66
61
  if (typeof optionsOrCb !== "object")
67
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
62
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
68
63
  this.send(command, optionsOrCb || {}, cb);
69
64
  }
70
65
  else {
71
66
  return this.send(command, optionsOrCb);
72
67
  }
73
- };
74
- RUM.prototype.listAppMonitors = function (args, optionsOrCb, cb) {
75
- var command = new ListAppMonitorsCommand(args);
68
+ }
69
+ listAppMonitors(args, optionsOrCb, cb) {
70
+ const command = new ListAppMonitorsCommand(args);
76
71
  if (typeof optionsOrCb === "function") {
77
72
  this.send(command, optionsOrCb);
78
73
  }
79
74
  else if (typeof cb === "function") {
80
75
  if (typeof optionsOrCb !== "object")
81
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
76
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
82
77
  this.send(command, optionsOrCb || {}, cb);
83
78
  }
84
79
  else {
85
80
  return this.send(command, optionsOrCb);
86
81
  }
87
- };
88
- RUM.prototype.listTagsForResource = function (args, optionsOrCb, cb) {
89
- var command = new ListTagsForResourceCommand(args);
82
+ }
83
+ listTagsForResource(args, optionsOrCb, cb) {
84
+ const command = new ListTagsForResourceCommand(args);
90
85
  if (typeof optionsOrCb === "function") {
91
86
  this.send(command, optionsOrCb);
92
87
  }
93
88
  else if (typeof cb === "function") {
94
89
  if (typeof optionsOrCb !== "object")
95
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
90
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
96
91
  this.send(command, optionsOrCb || {}, cb);
97
92
  }
98
93
  else {
99
94
  return this.send(command, optionsOrCb);
100
95
  }
101
- };
102
- RUM.prototype.putRumEvents = function (args, optionsOrCb, cb) {
103
- var command = new PutRumEventsCommand(args);
96
+ }
97
+ putRumEvents(args, optionsOrCb, cb) {
98
+ const command = new PutRumEventsCommand(args);
104
99
  if (typeof optionsOrCb === "function") {
105
100
  this.send(command, optionsOrCb);
106
101
  }
107
102
  else if (typeof cb === "function") {
108
103
  if (typeof optionsOrCb !== "object")
109
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
104
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
110
105
  this.send(command, optionsOrCb || {}, cb);
111
106
  }
112
107
  else {
113
108
  return this.send(command, optionsOrCb);
114
109
  }
115
- };
116
- RUM.prototype.tagResource = function (args, optionsOrCb, cb) {
117
- var command = new TagResourceCommand(args);
110
+ }
111
+ tagResource(args, optionsOrCb, cb) {
112
+ const command = new TagResourceCommand(args);
118
113
  if (typeof optionsOrCb === "function") {
119
114
  this.send(command, optionsOrCb);
120
115
  }
121
116
  else if (typeof cb === "function") {
122
117
  if (typeof optionsOrCb !== "object")
123
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
118
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
124
119
  this.send(command, optionsOrCb || {}, cb);
125
120
  }
126
121
  else {
127
122
  return this.send(command, optionsOrCb);
128
123
  }
129
- };
130
- RUM.prototype.untagResource = function (args, optionsOrCb, cb) {
131
- var command = new UntagResourceCommand(args);
124
+ }
125
+ untagResource(args, optionsOrCb, cb) {
126
+ const command = new UntagResourceCommand(args);
132
127
  if (typeof optionsOrCb === "function") {
133
128
  this.send(command, optionsOrCb);
134
129
  }
135
130
  else if (typeof cb === "function") {
136
131
  if (typeof optionsOrCb !== "object")
137
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
132
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
138
133
  this.send(command, optionsOrCb || {}, cb);
139
134
  }
140
135
  else {
141
136
  return this.send(command, optionsOrCb);
142
137
  }
143
- };
144
- RUM.prototype.updateAppMonitor = function (args, optionsOrCb, cb) {
145
- var command = new UpdateAppMonitorCommand(args);
138
+ }
139
+ updateAppMonitor(args, optionsOrCb, cb) {
140
+ const command = new UpdateAppMonitorCommand(args);
146
141
  if (typeof optionsOrCb === "function") {
147
142
  this.send(command, optionsOrCb);
148
143
  }
149
144
  else if (typeof cb === "function") {
150
145
  if (typeof optionsOrCb !== "object")
151
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
146
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
152
147
  this.send(command, optionsOrCb || {}, cb);
153
148
  }
154
149
  else {
155
150
  return this.send(command, optionsOrCb);
156
151
  }
157
- };
158
- return RUM;
159
- }(RUMClient));
160
- export { RUM };
152
+ }
153
+ }
@@ -1,4 +1,3 @@
1
- import { __extends } from "tslib";
2
1
  import { resolveEndpointsConfig, resolveRegionConfig, } from "@aws-sdk/config-resolver";
3
2
  import { getContentLengthPlugin } from "@aws-sdk/middleware-content-length";
4
3
  import { getHostHeaderPlugin, resolveHostHeaderConfig, } from "@aws-sdk/middleware-host-header";
@@ -9,31 +8,26 @@ import { getAwsAuthPlugin, resolveAwsAuthConfig, } from "@aws-sdk/middleware-sig
9
8
  import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
10
9
  import { Client as __Client, } from "@aws-sdk/smithy-client";
11
10
  import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
12
- var RUMClient = (function (_super) {
13
- __extends(RUMClient, _super);
14
- function RUMClient(configuration) {
15
- var _this = this;
16
- var _config_0 = __getRuntimeConfig(configuration);
17
- var _config_1 = resolveRegionConfig(_config_0);
18
- var _config_2 = resolveEndpointsConfig(_config_1);
19
- var _config_3 = resolveRetryConfig(_config_2);
20
- var _config_4 = resolveHostHeaderConfig(_config_3);
21
- var _config_5 = resolveAwsAuthConfig(_config_4);
22
- var _config_6 = resolveUserAgentConfig(_config_5);
23
- _this = _super.call(this, _config_6) || this;
24
- _this.config = _config_6;
25
- _this.middlewareStack.use(getRetryPlugin(_this.config));
26
- _this.middlewareStack.use(getContentLengthPlugin(_this.config));
27
- _this.middlewareStack.use(getHostHeaderPlugin(_this.config));
28
- _this.middlewareStack.use(getLoggerPlugin(_this.config));
29
- _this.middlewareStack.use(getRecursionDetectionPlugin(_this.config));
30
- _this.middlewareStack.use(getAwsAuthPlugin(_this.config));
31
- _this.middlewareStack.use(getUserAgentPlugin(_this.config));
32
- return _this;
11
+ export class RUMClient extends __Client {
12
+ constructor(configuration) {
13
+ const _config_0 = __getRuntimeConfig(configuration);
14
+ const _config_1 = resolveRegionConfig(_config_0);
15
+ const _config_2 = resolveEndpointsConfig(_config_1);
16
+ const _config_3 = resolveRetryConfig(_config_2);
17
+ const _config_4 = resolveHostHeaderConfig(_config_3);
18
+ const _config_5 = resolveAwsAuthConfig(_config_4);
19
+ const _config_6 = resolveUserAgentConfig(_config_5);
20
+ super(_config_6);
21
+ this.config = _config_6;
22
+ this.middlewareStack.use(getRetryPlugin(this.config));
23
+ this.middlewareStack.use(getContentLengthPlugin(this.config));
24
+ this.middlewareStack.use(getHostHeaderPlugin(this.config));
25
+ this.middlewareStack.use(getLoggerPlugin(this.config));
26
+ this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
27
+ this.middlewareStack.use(getAwsAuthPlugin(this.config));
28
+ this.middlewareStack.use(getUserAgentPlugin(this.config));
33
29
  }
34
- RUMClient.prototype.destroy = function () {
35
- _super.prototype.destroy.call(this);
36
- };
37
- return RUMClient;
38
- }(__Client));
39
- export { RUMClient };
30
+ destroy() {
31
+ super.destroy();
32
+ }
33
+ }
@@ -1,39 +1,32 @@
1
- import { __extends } from "tslib";
2
1
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
2
  import { Command as $Command } from "@aws-sdk/smithy-client";
4
3
  import { CreateAppMonitorRequestFilterSensitiveLog, CreateAppMonitorResponseFilterSensitiveLog, } from "../models/models_0";
5
4
  import { deserializeAws_restJson1CreateAppMonitorCommand, serializeAws_restJson1CreateAppMonitorCommand, } from "../protocols/Aws_restJson1";
6
- var CreateAppMonitorCommand = (function (_super) {
7
- __extends(CreateAppMonitorCommand, _super);
8
- function CreateAppMonitorCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class CreateAppMonitorCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- CreateAppMonitorCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
10
+ resolveMiddleware(clientStack, configuration, options) {
14
11
  this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
- var stack = clientStack.concat(this.middlewareStack);
16
- var logger = configuration.logger;
17
- var clientName = "RUMClient";
18
- var commandName = "CreateAppMonitorCommand";
19
- var handlerExecutionContext = {
20
- logger: logger,
21
- clientName: clientName,
22
- commandName: commandName,
12
+ const stack = clientStack.concat(this.middlewareStack);
13
+ const { logger } = configuration;
14
+ const clientName = "RUMClient";
15
+ const commandName = "CreateAppMonitorCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: CreateAppMonitorRequestFilterSensitiveLog,
24
21
  outputFilterSensitiveLog: CreateAppMonitorResponseFilterSensitiveLog,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- CreateAppMonitorCommand.prototype.serialize = function (input, context) {
23
+ const { requestHandler } = configuration;
24
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
25
+ }
26
+ serialize(input, context) {
32
27
  return serializeAws_restJson1CreateAppMonitorCommand(input, context);
33
- };
34
- CreateAppMonitorCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_restJson1CreateAppMonitorCommand(output, context);
36
- };
37
- return CreateAppMonitorCommand;
38
- }($Command));
39
- export { CreateAppMonitorCommand };
31
+ }
32
+ }
@@ -1,39 +1,32 @@
1
- import { __extends } from "tslib";
2
1
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
2
  import { Command as $Command } from "@aws-sdk/smithy-client";
4
3
  import { DeleteAppMonitorRequestFilterSensitiveLog, DeleteAppMonitorResponseFilterSensitiveLog, } from "../models/models_0";
5
4
  import { deserializeAws_restJson1DeleteAppMonitorCommand, serializeAws_restJson1DeleteAppMonitorCommand, } from "../protocols/Aws_restJson1";
6
- var DeleteAppMonitorCommand = (function (_super) {
7
- __extends(DeleteAppMonitorCommand, _super);
8
- function DeleteAppMonitorCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class DeleteAppMonitorCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- DeleteAppMonitorCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
10
+ resolveMiddleware(clientStack, configuration, options) {
14
11
  this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
- var stack = clientStack.concat(this.middlewareStack);
16
- var logger = configuration.logger;
17
- var clientName = "RUMClient";
18
- var commandName = "DeleteAppMonitorCommand";
19
- var handlerExecutionContext = {
20
- logger: logger,
21
- clientName: clientName,
22
- commandName: commandName,
12
+ const stack = clientStack.concat(this.middlewareStack);
13
+ const { logger } = configuration;
14
+ const clientName = "RUMClient";
15
+ const commandName = "DeleteAppMonitorCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: DeleteAppMonitorRequestFilterSensitiveLog,
24
21
  outputFilterSensitiveLog: DeleteAppMonitorResponseFilterSensitiveLog,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- DeleteAppMonitorCommand.prototype.serialize = function (input, context) {
23
+ const { requestHandler } = configuration;
24
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
25
+ }
26
+ serialize(input, context) {
32
27
  return serializeAws_restJson1DeleteAppMonitorCommand(input, context);
33
- };
34
- DeleteAppMonitorCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_restJson1DeleteAppMonitorCommand(output, context);
36
- };
37
- return DeleteAppMonitorCommand;
38
- }($Command));
39
- export { DeleteAppMonitorCommand };
31
+ }
32
+ }
@@ -1,39 +1,32 @@
1
- import { __extends } from "tslib";
2
1
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
2
  import { Command as $Command } from "@aws-sdk/smithy-client";
4
3
  import { GetAppMonitorRequestFilterSensitiveLog, GetAppMonitorResponseFilterSensitiveLog, } from "../models/models_0";
5
4
  import { deserializeAws_restJson1GetAppMonitorCommand, serializeAws_restJson1GetAppMonitorCommand, } from "../protocols/Aws_restJson1";
6
- var GetAppMonitorCommand = (function (_super) {
7
- __extends(GetAppMonitorCommand, _super);
8
- function GetAppMonitorCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class GetAppMonitorCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- GetAppMonitorCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
10
+ resolveMiddleware(clientStack, configuration, options) {
14
11
  this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
- var stack = clientStack.concat(this.middlewareStack);
16
- var logger = configuration.logger;
17
- var clientName = "RUMClient";
18
- var commandName = "GetAppMonitorCommand";
19
- var handlerExecutionContext = {
20
- logger: logger,
21
- clientName: clientName,
22
- commandName: commandName,
12
+ const stack = clientStack.concat(this.middlewareStack);
13
+ const { logger } = configuration;
14
+ const clientName = "RUMClient";
15
+ const commandName = "GetAppMonitorCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: GetAppMonitorRequestFilterSensitiveLog,
24
21
  outputFilterSensitiveLog: GetAppMonitorResponseFilterSensitiveLog,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- GetAppMonitorCommand.prototype.serialize = function (input, context) {
23
+ const { requestHandler } = configuration;
24
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
25
+ }
26
+ serialize(input, context) {
32
27
  return serializeAws_restJson1GetAppMonitorCommand(input, context);
33
- };
34
- GetAppMonitorCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_restJson1GetAppMonitorCommand(output, context);
36
- };
37
- return GetAppMonitorCommand;
38
- }($Command));
39
- export { GetAppMonitorCommand };
31
+ }
32
+ }
@@ -1,39 +1,32 @@
1
- import { __extends } from "tslib";
2
1
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
2
  import { Command as $Command } from "@aws-sdk/smithy-client";
4
3
  import { GetAppMonitorDataRequestFilterSensitiveLog, GetAppMonitorDataResponseFilterSensitiveLog, } from "../models/models_0";
5
4
  import { deserializeAws_restJson1GetAppMonitorDataCommand, serializeAws_restJson1GetAppMonitorDataCommand, } from "../protocols/Aws_restJson1";
6
- var GetAppMonitorDataCommand = (function (_super) {
7
- __extends(GetAppMonitorDataCommand, _super);
8
- function GetAppMonitorDataCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class GetAppMonitorDataCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- GetAppMonitorDataCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
10
+ resolveMiddleware(clientStack, configuration, options) {
14
11
  this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
- var stack = clientStack.concat(this.middlewareStack);
16
- var logger = configuration.logger;
17
- var clientName = "RUMClient";
18
- var commandName = "GetAppMonitorDataCommand";
19
- var handlerExecutionContext = {
20
- logger: logger,
21
- clientName: clientName,
22
- commandName: commandName,
12
+ const stack = clientStack.concat(this.middlewareStack);
13
+ const { logger } = configuration;
14
+ const clientName = "RUMClient";
15
+ const commandName = "GetAppMonitorDataCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: GetAppMonitorDataRequestFilterSensitiveLog,
24
21
  outputFilterSensitiveLog: GetAppMonitorDataResponseFilterSensitiveLog,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- GetAppMonitorDataCommand.prototype.serialize = function (input, context) {
23
+ const { requestHandler } = configuration;
24
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
25
+ }
26
+ serialize(input, context) {
32
27
  return serializeAws_restJson1GetAppMonitorDataCommand(input, context);
33
- };
34
- GetAppMonitorDataCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_restJson1GetAppMonitorDataCommand(output, context);
36
- };
37
- return GetAppMonitorDataCommand;
38
- }($Command));
39
- export { GetAppMonitorDataCommand };
31
+ }
32
+ }