Skip to content

Commit

Permalink
feat(client-sagemaker-a2i-runtime): Fix bug with parsing ISO-8601 Cre…
Browse files Browse the repository at this point in the history
…ationTime in Java SDK in DescribeHumanLoop
  • Loading branch information
awstools committed Aug 9, 2022
1 parent c4ac25d commit d2380d7
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@ import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@a
import {
decorateServiceException as __decorateServiceException,
expectNonNull as __expectNonNull,
expectNumber as __expectNumber,
expectObject as __expectObject,
expectString as __expectString,
extendedEncodeURIComponent as __extendedEncodeURIComponent,
map as __map,
parseEpochTimestamp as __parseEpochTimestamp,
parseRfc3339DateTime as __parseRfc3339DateTime,
resolvedPath as __resolvedPath,
throwDefaultError,
} from "@aws-sdk/smithy-client";
Expand Down Expand Up @@ -242,7 +241,7 @@ export const deserializeAws_restJson1DescribeHumanLoopCommand = async (
});
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
if (data.CreationTime != null) {
contents.CreationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationTime)));
contents.CreationTime = __expectNonNull(__parseRfc3339DateTime(data.CreationTime));
}
if (data.FailureCode != null) {
contents.FailureCode = __expectString(data.FailureCode);
Expand Down Expand Up @@ -600,9 +599,7 @@ const deserializeAws_restJson1HumanLoopSummaries = (output: any, context: __Serd
const deserializeAws_restJson1HumanLoopSummary = (output: any, context: __SerdeContext): HumanLoopSummary => {
return {
CreationTime:
output.CreationTime != null
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime)))
: undefined,
output.CreationTime != null ? __expectNonNull(__parseRfc3339DateTime(output.CreationTime)) : undefined,
FailureReason: __expectString(output.FailureReason),
FlowDefinitionArn: __expectString(output.FlowDefinitionArn),
HumanLoopName: __expectString(output.HumanLoopName),
Expand Down
42 changes: 23 additions & 19 deletions codegen/sdk-codegen/aws-models/sagemaker-a2i-runtime.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,21 @@
"shapes": {
"com.amazonaws.sagemakera2iruntime#AmazonSageMakerA2IRuntime": {
"type": "service",
"traits": {
"aws.api#service": {
"sdkId": "SageMaker A2I Runtime",
"arnNamespace": "sagemaker",
"cloudFormationName": "SageMakerA2IRuntime",
"cloudTrailEventSource": "sagemakera2iruntime.amazonaws.com",
"endpointPrefix": "a2i-runtime.sagemaker"
},
"aws.auth#sigv4": {
"name": "sagemaker"
},
"aws.protocols#restJson1": {},
"smithy.api#documentation": "<p>Amazon Augmented AI (Amazon A2I) adds the benefit of human judgment to any machine learning\n application. When an AI application can't evaluate data with a high degree of confidence,\n human reviewers can take over. This human review is called a human review workflow. To create\n and start a human review workflow, you need three resources: a <i>worker task\n template</i>, a <i>flow definition</i>, and a <i>human\n loop</i>.</p>\n <p>For information about these resources and prerequisites for using Amazon A2I, see <a href=\"https://docs.aws.amazon.com/sagemaker/latest/dg/a2i-getting-started.html\">Get Started with\n Amazon Augmented AI</a> in the Amazon SageMaker Developer Guide.</p>\n <p>This API reference includes information about API actions and data types that you can use\n to interact with Amazon A2I programmatically. Use this guide to:</p>\n <ul>\n <li>\n <p>Start a human loop with the <code>StartHumanLoop</code> operation when using\n Amazon A2I with a <i>custom task type</i>. To learn more about the\n difference between custom and built-in task types, see <a href=\"https://docs.aws.amazon.com/sagemaker/latest/dg/a2i-task-types-general.html\">Use Task Types </a>. To learn\n how to start a human loop using this API, see <a href=\"https://docs.aws.amazon.com/sagemaker/latest/dg/a2i-start-human-loop.html#a2i-instructions-starthumanloop\">Create and Start a Human Loop for a Custom Task Type </a> in the\n Amazon SageMaker Developer Guide.</p>\n </li>\n <li>\n <p>Manage your human loops. You can list all human loops that you have created, describe\n individual human loops, and stop and delete human loops. To learn more, see <a href=\"https://docs.aws.amazon.com/sagemaker/latest/dg/a2i-monitor-humanloop-results.html\">Monitor and Manage Your Human Loop </a> in the Amazon SageMaker Developer Guide.</p>\n </li>\n </ul>\n <p>Amazon A2I integrates APIs from various AWS services to create and start human review\n workflows for those services. To learn how Amazon A2I uses these APIs, see <a href=\"https://docs.aws.amazon.com/sagemaker/latest/dg/a2i-api-references.html\">Use APIs in\n Amazon A2I</a> in the Amazon SageMaker Developer Guide.</p>",
"smithy.api#title": "Amazon Augmented AI Runtime"
},
"version": "2019-11-07",
"operations": [
{
Expand All @@ -48,22 +63,7 @@
{
"target": "com.amazonaws.sagemakera2iruntime#StopHumanLoop"
}
],
"traits": {
"aws.api#service": {
"sdkId": "SageMaker A2I Runtime",
"arnNamespace": "sagemaker",
"cloudFormationName": "SageMakerA2IRuntime",
"cloudTrailEventSource": "sagemakera2iruntime.amazonaws.com",
"endpointPrefix": "a2i-runtime.sagemaker"
},
"aws.auth#sigv4": {
"name": "sagemaker"
},
"aws.protocols#restJson1": {},
"smithy.api#documentation": "<p>Amazon Augmented AI (Amazon A2I) adds the benefit of human judgment to any machine learning\n application. When an AI application can't evaluate data with a high degree of confidence,\n human reviewers can take over. This human review is called a human review workflow. To create\n and start a human review workflow, you need three resources: a <i>worker task\n template</i>, a <i>flow definition</i>, and a <i>human\n loop</i>.</p>\n <p>For information about these resources and prerequisites for using Amazon A2I, see <a href=\"https://docs.aws.amazon.com/sagemaker/latest/dg/a2i-getting-started.html\">Get Started with\n Amazon Augmented AI</a> in the Amazon SageMaker Developer Guide.</p>\n <p>This API reference includes information about API actions and data types that you can use\n to interact with Amazon A2I programmatically. Use this guide to:</p>\n <ul>\n <li>\n <p>Start a human loop with the <code>StartHumanLoop</code> operation when using\n Amazon A2I with a <i>custom task type</i>. To learn more about the\n difference between custom and built-in task types, see <a href=\"https://docs.aws.amazon.com/sagemaker/latest/dg/a2i-task-types-general.html\">Use Task Types </a>. To learn\n how to start a human loop using this API, see <a href=\"https://docs.aws.amazon.com/sagemaker/latest/dg/a2i-start-human-loop.html#a2i-instructions-starthumanloop\">Create and Start a Human Loop for a Custom Task Type </a> in the\n Amazon SageMaker Developer Guide.</p>\n </li>\n <li>\n <p>Manage your human loops. You can list all human loops that you have created, describe\n individual human loops, and stop and delete human loops. To learn more, see <a href=\"https://docs.aws.amazon.com/sagemaker/latest/dg/a2i-monitor-humanloop-results.html\">Monitor and Manage Your Human Loop </a> in the Amazon SageMaker Developer Guide.</p>\n </li>\n </ul>\n <p>Amazon A2I integrates APIs from various AWS services to create and start human review\n workflows for those services. To learn how Amazon A2I uses these APIs, see <a href=\"https://docs.aws.amazon.com/sagemaker/latest/dg/a2i-api-references.html\">Use APIs in\n Amazon A2I</a> in the Amazon SageMaker Developer Guide.</p>",
"smithy.api#title": "Amazon Augmented AI Runtime"
}
]
},
"com.amazonaws.sagemakera2iruntime#ConflictException": {
"type": "structure",
Expand Down Expand Up @@ -271,7 +271,7 @@
"min": 0,
"max": 1024
},
"smithy.api#pattern": "arn:aws[a-z\\-]*:sagemaker:[a-z0-9\\-]*:[0-9]{12}:flow-definition/.*"
"smithy.api#pattern": "^arn:aws[a-z\\-]*:sagemaker:[a-z0-9\\-]*:[0-9]{12}:flow-definition/"
}
},
"com.amazonaws.sagemakera2iruntime#HumanLoopArn": {
Expand All @@ -281,7 +281,7 @@
"min": 0,
"max": 1024
},
"smithy.api#pattern": "arn:aws[a-z\\-]*:sagemaker:[a-z0-9\\-]*:[0-9]{12}:human-loop/.*"
"smithy.api#pattern": "^arn:aws[a-z\\-]*:sagemaker:[a-z0-9\\-]*:[0-9]{12}:human-loop/"
}
},
"com.amazonaws.sagemakera2iruntime#HumanLoopDataAttributes": {
Expand Down Expand Up @@ -464,6 +464,7 @@
"smithy.api#paginated": {
"inputToken": "NextToken",
"outputToken": "NextToken",
"items": "HumanLoopSummaries",
"pageSize": "MaxResults"
}
}
Expand Down Expand Up @@ -736,7 +737,10 @@
}
},
"com.amazonaws.sagemakera2iruntime#Timestamp": {
"type": "timestamp"
"type": "timestamp",
"traits": {
"smithy.api#timestampFormat": "date-time"
}
},
"com.amazonaws.sagemakera2iruntime#ValidationException": {
"type": "structure",
Expand Down

0 comments on commit d2380d7

Please sign in to comment.