@aws-sdk/client-sagemaker-metrics 3.306.0 → 3.309.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.
@@ -36,10 +36,10 @@ class BatchPutMetricsCommand extends smithy_client_1.Command {
36
36
  return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
37
37
  }
38
38
  serialize(input, context) {
39
- return (0, Aws_restJson1_1.serializeAws_restJson1BatchPutMetricsCommand)(input, context);
39
+ return (0, Aws_restJson1_1.se_BatchPutMetricsCommand)(input, context);
40
40
  }
41
41
  deserialize(output, context) {
42
- return (0, Aws_restJson1_1.deserializeAws_restJson1BatchPutMetricsCommand)(output, context);
42
+ return (0, Aws_restJson1_1.de_BatchPutMetricsCommand)(output, context);
43
43
  }
44
44
  }
45
45
  exports.BatchPutMetricsCommand = BatchPutMetricsCommand;
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deserializeAws_restJson1BatchPutMetricsCommand = exports.serializeAws_restJson1BatchPutMetricsCommand = void 0;
3
+ exports.de_BatchPutMetricsCommand = exports.se_BatchPutMetricsCommand = void 0;
4
4
  const protocol_http_1 = require("@aws-sdk/protocol-http");
5
5
  const smithy_client_1 = require("@aws-sdk/smithy-client");
6
6
  const SageMakerMetricsServiceException_1 = require("../models/SageMakerMetricsServiceException");
7
- const serializeAws_restJson1BatchPutMetricsCommand = async (input, context) => {
7
+ const se_BatchPutMetricsCommand = async (input, context) => {
8
8
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
9
9
  const headers = {
10
10
  "content-type": "application/json",
@@ -12,7 +12,7 @@ const serializeAws_restJson1BatchPutMetricsCommand = async (input, context) => {
12
12
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/BatchPutMetrics";
13
13
  let body;
14
14
  body = JSON.stringify({
15
- ...(input.MetricData != null && { MetricData: serializeAws_restJson1RawMetricDataList(input.MetricData, context) }),
15
+ ...(input.MetricData != null && { MetricData: se_RawMetricDataList(input.MetricData, context) }),
16
16
  ...(input.TrialComponentName != null && { TrialComponentName: input.TrialComponentName }),
17
17
  });
18
18
  return new protocol_http_1.HttpRequest({
@@ -25,22 +25,22 @@ const serializeAws_restJson1BatchPutMetricsCommand = async (input, context) => {
25
25
  body,
26
26
  });
27
27
  };
28
- exports.serializeAws_restJson1BatchPutMetricsCommand = serializeAws_restJson1BatchPutMetricsCommand;
29
- const deserializeAws_restJson1BatchPutMetricsCommand = async (output, context) => {
28
+ exports.se_BatchPutMetricsCommand = se_BatchPutMetricsCommand;
29
+ const de_BatchPutMetricsCommand = async (output, context) => {
30
30
  if (output.statusCode !== 200 && output.statusCode >= 300) {
31
- return deserializeAws_restJson1BatchPutMetricsCommandError(output, context);
31
+ return de_BatchPutMetricsCommandError(output, context);
32
32
  }
33
33
  const contents = map({
34
34
  $metadata: deserializeMetadata(output),
35
35
  });
36
36
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
37
37
  if (data.Errors != null) {
38
- contents.Errors = deserializeAws_restJson1BatchPutMetricsErrorList(data.Errors, context);
38
+ contents.Errors = de_BatchPutMetricsErrorList(data.Errors, context);
39
39
  }
40
40
  return contents;
41
41
  };
42
- exports.deserializeAws_restJson1BatchPutMetricsCommand = deserializeAws_restJson1BatchPutMetricsCommand;
43
- const deserializeAws_restJson1BatchPutMetricsCommandError = async (output, context) => {
42
+ exports.de_BatchPutMetricsCommand = de_BatchPutMetricsCommand;
43
+ const de_BatchPutMetricsCommandError = async (output, context) => {
44
44
  const parsedOutput = {
45
45
  ...output,
46
46
  body: await parseErrorBody(output.body, context),
@@ -55,7 +55,7 @@ const deserializeAws_restJson1BatchPutMetricsCommandError = async (output, conte
55
55
  });
56
56
  };
57
57
  const map = smithy_client_1.map;
58
- const serializeAws_restJson1RawMetricData = (input, context) => {
58
+ const se_RawMetricData = (input, context) => {
59
59
  return {
60
60
  ...(input.MetricName != null && { MetricName: input.MetricName }),
61
61
  ...(input.Step != null && { Step: input.Step }),
@@ -63,27 +63,27 @@ const serializeAws_restJson1RawMetricData = (input, context) => {
63
63
  ...(input.Value != null && { Value: (0, smithy_client_1.serializeFloat)(input.Value) }),
64
64
  };
65
65
  };
66
- const serializeAws_restJson1RawMetricDataList = (input, context) => {
66
+ const se_RawMetricDataList = (input, context) => {
67
67
  return input
68
68
  .filter((e) => e != null)
69
69
  .map((entry) => {
70
- return serializeAws_restJson1RawMetricData(entry, context);
70
+ return se_RawMetricData(entry, context);
71
71
  });
72
72
  };
73
- const deserializeAws_restJson1BatchPutMetricsError = (output, context) => {
73
+ const de_BatchPutMetricsError = (output, context) => {
74
74
  return {
75
75
  Code: (0, smithy_client_1.expectString)(output.Code),
76
76
  MetricIndex: (0, smithy_client_1.expectInt32)(output.MetricIndex),
77
77
  };
78
78
  };
79
- const deserializeAws_restJson1BatchPutMetricsErrorList = (output, context) => {
79
+ const de_BatchPutMetricsErrorList = (output, context) => {
80
80
  const retVal = (output || [])
81
81
  .filter((e) => e != null)
82
82
  .map((entry) => {
83
83
  if (entry === null) {
84
84
  return null;
85
85
  }
86
- return deserializeAws_restJson1BatchPutMetricsError(entry, context);
86
+ return de_BatchPutMetricsError(entry, context);
87
87
  });
88
88
  return retVal;
89
89
  };
@@ -1,7 +1,7 @@
1
1
  import { getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
2
2
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
3
  import { Command as $Command } from "@aws-sdk/smithy-client";
4
- import { deserializeAws_restJson1BatchPutMetricsCommand, serializeAws_restJson1BatchPutMetricsCommand, } from "../protocols/Aws_restJson1";
4
+ import { de_BatchPutMetricsCommand, se_BatchPutMetricsCommand } from "../protocols/Aws_restJson1";
5
5
  export class BatchPutMetricsCommand extends $Command {
6
6
  static getEndpointParameterInstructions() {
7
7
  return {
@@ -33,9 +33,9 @@ export class BatchPutMetricsCommand extends $Command {
33
33
  return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
34
34
  }
35
35
  serialize(input, context) {
36
- return serializeAws_restJson1BatchPutMetricsCommand(input, context);
36
+ return se_BatchPutMetricsCommand(input, context);
37
37
  }
38
38
  deserialize(output, context) {
39
- return deserializeAws_restJson1BatchPutMetricsCommand(output, context);
39
+ return de_BatchPutMetricsCommand(output, context);
40
40
  }
41
41
  }
@@ -1,7 +1,7 @@
1
1
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
2
  import { expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map as __map, serializeFloat as __serializeFloat, throwDefaultError, } from "@aws-sdk/smithy-client";
3
3
  import { SageMakerMetricsServiceException as __BaseException } from "../models/SageMakerMetricsServiceException";
4
- export const serializeAws_restJson1BatchPutMetricsCommand = async (input, context) => {
4
+ export const se_BatchPutMetricsCommand = async (input, context) => {
5
5
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
6
6
  const headers = {
7
7
  "content-type": "application/json",
@@ -9,7 +9,7 @@ export const serializeAws_restJson1BatchPutMetricsCommand = async (input, contex
9
9
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/BatchPutMetrics";
10
10
  let body;
11
11
  body = JSON.stringify({
12
- ...(input.MetricData != null && { MetricData: serializeAws_restJson1RawMetricDataList(input.MetricData, context) }),
12
+ ...(input.MetricData != null && { MetricData: se_RawMetricDataList(input.MetricData, context) }),
13
13
  ...(input.TrialComponentName != null && { TrialComponentName: input.TrialComponentName }),
14
14
  });
15
15
  return new __HttpRequest({
@@ -22,20 +22,20 @@ export const serializeAws_restJson1BatchPutMetricsCommand = async (input, contex
22
22
  body,
23
23
  });
24
24
  };
25
- export const deserializeAws_restJson1BatchPutMetricsCommand = async (output, context) => {
25
+ export const de_BatchPutMetricsCommand = async (output, context) => {
26
26
  if (output.statusCode !== 200 && output.statusCode >= 300) {
27
- return deserializeAws_restJson1BatchPutMetricsCommandError(output, context);
27
+ return de_BatchPutMetricsCommandError(output, context);
28
28
  }
29
29
  const contents = map({
30
30
  $metadata: deserializeMetadata(output),
31
31
  });
32
32
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
33
33
  if (data.Errors != null) {
34
- contents.Errors = deserializeAws_restJson1BatchPutMetricsErrorList(data.Errors, context);
34
+ contents.Errors = de_BatchPutMetricsErrorList(data.Errors, context);
35
35
  }
36
36
  return contents;
37
37
  };
38
- const deserializeAws_restJson1BatchPutMetricsCommandError = async (output, context) => {
38
+ const de_BatchPutMetricsCommandError = async (output, context) => {
39
39
  const parsedOutput = {
40
40
  ...output,
41
41
  body: await parseErrorBody(output.body, context),
@@ -50,7 +50,7 @@ const deserializeAws_restJson1BatchPutMetricsCommandError = async (output, conte
50
50
  });
51
51
  };
52
52
  const map = __map;
53
- const serializeAws_restJson1RawMetricData = (input, context) => {
53
+ const se_RawMetricData = (input, context) => {
54
54
  return {
55
55
  ...(input.MetricName != null && { MetricName: input.MetricName }),
56
56
  ...(input.Step != null && { Step: input.Step }),
@@ -58,27 +58,27 @@ const serializeAws_restJson1RawMetricData = (input, context) => {
58
58
  ...(input.Value != null && { Value: __serializeFloat(input.Value) }),
59
59
  };
60
60
  };
61
- const serializeAws_restJson1RawMetricDataList = (input, context) => {
61
+ const se_RawMetricDataList = (input, context) => {
62
62
  return input
63
63
  .filter((e) => e != null)
64
64
  .map((entry) => {
65
- return serializeAws_restJson1RawMetricData(entry, context);
65
+ return se_RawMetricData(entry, context);
66
66
  });
67
67
  };
68
- const deserializeAws_restJson1BatchPutMetricsError = (output, context) => {
68
+ const de_BatchPutMetricsError = (output, context) => {
69
69
  return {
70
70
  Code: __expectString(output.Code),
71
71
  MetricIndex: __expectInt32(output.MetricIndex),
72
72
  };
73
73
  };
74
- const deserializeAws_restJson1BatchPutMetricsErrorList = (output, context) => {
74
+ const de_BatchPutMetricsErrorList = (output, context) => {
75
75
  const retVal = (output || [])
76
76
  .filter((e) => e != null)
77
77
  .map((entry) => {
78
78
  if (entry === null) {
79
79
  return null;
80
80
  }
81
- return deserializeAws_restJson1BatchPutMetricsError(entry, context);
81
+ return de_BatchPutMetricsError(entry, context);
82
82
  });
83
83
  return retVal;
84
84
  };
@@ -1,5 +1,11 @@
1
1
  import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
2
2
  import { SerdeContext as __SerdeContext } from "@aws-sdk/types";
3
3
  import { BatchPutMetricsCommandInput, BatchPutMetricsCommandOutput } from "../commands/BatchPutMetricsCommand";
4
- export declare const serializeAws_restJson1BatchPutMetricsCommand: (input: BatchPutMetricsCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
5
- export declare const deserializeAws_restJson1BatchPutMetricsCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<BatchPutMetricsCommandOutput>;
4
+ /**
5
+ * serializeAws_restJson1BatchPutMetricsCommand
6
+ */
7
+ export declare const se_BatchPutMetricsCommand: (input: BatchPutMetricsCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
8
+ /**
9
+ * deserializeAws_restJson1BatchPutMetricsCommand
10
+ */
11
+ export declare const de_BatchPutMetricsCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<BatchPutMetricsCommandOutput>;
@@ -7,11 +7,11 @@ import {
7
7
  BatchPutMetricsCommandInput,
8
8
  BatchPutMetricsCommandOutput,
9
9
  } from "../commands/BatchPutMetricsCommand";
10
- export declare const serializeAws_restJson1BatchPutMetricsCommand: (
10
+ export declare const se_BatchPutMetricsCommand: (
11
11
  input: BatchPutMetricsCommandInput,
12
12
  context: __SerdeContext
13
13
  ) => Promise<__HttpRequest>;
14
- export declare const deserializeAws_restJson1BatchPutMetricsCommand: (
14
+ export declare const de_BatchPutMetricsCommand: (
15
15
  output: __HttpResponse,
16
16
  context: __SerdeContext
17
17
  ) => Promise<BatchPutMetricsCommandOutput>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-sagemaker-metrics",
3
3
  "description": "AWS SDK for JavaScript Sagemaker Metrics Client for Node.js, Browser and React Native",
4
- "version": "3.306.0",
4
+ "version": "3.309.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -21,9 +21,9 @@
21
21
  "dependencies": {
22
22
  "@aws-crypto/sha256-browser": "3.0.0",
23
23
  "@aws-crypto/sha256-js": "3.0.0",
24
- "@aws-sdk/client-sts": "3.306.0",
24
+ "@aws-sdk/client-sts": "3.309.0",
25
25
  "@aws-sdk/config-resolver": "3.306.0",
26
- "@aws-sdk/credential-provider-node": "3.306.0",
26
+ "@aws-sdk/credential-provider-node": "3.309.0",
27
27
  "@aws-sdk/fetch-http-handler": "3.306.0",
28
28
  "@aws-sdk/hash-node": "3.306.0",
29
29
  "@aws-sdk/invalid-dependency": "3.306.0",
@@ -40,14 +40,14 @@
40
40
  "@aws-sdk/node-config-provider": "3.306.0",
41
41
  "@aws-sdk/node-http-handler": "3.306.0",
42
42
  "@aws-sdk/protocol-http": "3.306.0",
43
- "@aws-sdk/smithy-client": "3.306.0",
43
+ "@aws-sdk/smithy-client": "3.309.0",
44
44
  "@aws-sdk/types": "3.306.0",
45
45
  "@aws-sdk/url-parser": "3.306.0",
46
46
  "@aws-sdk/util-base64": "3.303.0",
47
47
  "@aws-sdk/util-body-length-browser": "3.303.0",
48
48
  "@aws-sdk/util-body-length-node": "3.303.0",
49
- "@aws-sdk/util-defaults-mode-browser": "3.306.0",
50
- "@aws-sdk/util-defaults-mode-node": "3.306.0",
49
+ "@aws-sdk/util-defaults-mode-browser": "3.309.0",
50
+ "@aws-sdk/util-defaults-mode-node": "3.309.0",
51
51
  "@aws-sdk/util-endpoints": "3.306.0",
52
52
  "@aws-sdk/util-retry": "3.306.0",
53
53
  "@aws-sdk/util-user-agent-browser": "3.306.0",