Skip to content

Commit

Permalink
chore: update with union fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kuhe committed Oct 4, 2024
1 parent d5eae88 commit ad7be23
Show file tree
Hide file tree
Showing 18 changed files with 246 additions and 231 deletions.
60 changes: 42 additions & 18 deletions clients/client-b2bi/src/commands/CreateTransformerCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,17 +204,29 @@ export interface CreateTransformerCommandOutput extends CreateTransformerRespons
* ```javascript
* //
* const input = {
* "name": "transformJSON",
* "name": "transformX12",
* "clientToken": "foo",
* "ediType": {
* "x12Details": {
* "version": "VERSION_4010",
* "transactionSet": "X12_110"
* }
* "inputConversion": {
* "formatOptions": {
* "x12": {
* "version": "VERSION_4010",
* "transactionSet": "X12_110"
* }
* },
* "fromFormat": "X12"
* },
* "mapping": {
* "template": "{}",
* "templateLanguage": "JSONATA"
* },
* "sampleDocuments": {
* "bucketName": "test-bucket",
* "keys": [
* {
* "input": "sampleDoc.txt"
* }
* ]
* },
* "fileFormat": "JSON",
* "mappingTemplate": "{}",
* "sampleDocument": "s3://test-bucket/sampleDoc.txt",
* "tags": [
* {
* "Key": "sampleKey",
Expand All @@ -226,17 +238,29 @@ export interface CreateTransformerCommandOutput extends CreateTransformerRespons
* const response = await client.send(command);
* /* response ==
* {
* "name": "transformJSON",
* "name": "transformX12",
* "createdAt": "2023-11-01T21:51:05.504Z",
* "ediType": {
* "x12Details": {
* "version": "VERSION_4010",
* "transactionSet": "X12_110"
* }
* "inputConversion": {
* "formatOptions": {
* "x12": {
* "version": "VERSION_4010",
* "transactionSet": "X12_110"
* }
* },
* "fromFormat": "X12"
* },
* "mapping": {
* "template": "{}",
* "templateLanguage": "JSONATA"
* },
* "sampleDocuments": {
* "bucketName": "test-bucket",
* "keys": [
* {
* "input": "sampleDoc.txt"
* }
* ]
* },
* "fileFormat": "JSON",
* "mappingTemplate": "$",
* "sampleDocument": "s3://test-bucket/sampleDoc.txt",
* "status": "inactive",
* "transformerArn": "arn:aws:b2bi:us-west-2:123456789012:transformer/tr-974c129999f84d8c9",
* "transformerId": "tr-974c129999f84d8c9"
Expand Down
31 changes: 21 additions & 10 deletions clients/client-b2bi/src/commands/GetTransformerCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,18 +127,29 @@ export interface GetTransformerCommandOutput extends GetTransformerResponse, __M
* const response = await client.send(command);
* /* response ==
* {
* "name": "transformJSON",
* "name": "transformX12",
* "createdAt": "2023-11-01T21:51:05.504Z",
* "ediType": {
* "x12Details": {
* "version": "VERSION_4010",
* "transactionSet": "X12_110"
* }
* "inputConversion": {
* "formatOptions": {
* "x12": {
* "version": "VERSION_4010",
* "transactionSet": "X12_110"
* }
* },
* "fromFormat": "X12"
* },
* "mapping": {
* "template": "{}",
* "templateLanguage": "JSONATA"
* },
* "sampleDocuments": {
* "bucketName": "test-bucket",
* "keys": [
* {
* "input": "sampleDoc.txt"
* }
* ]
* },
* "fileFormat": "JSON",
* "mappingTemplate": "$",
* "modifiedAt": "2023-11-01T21:51:05.504Z",
* "sampleDocument": "s3://test-bucket/sampleDoc.txt",
* "status": "inactive",
* "transformerArn": "arn:aws:b2bi:us-west-2:123456789012:transformer/tr-974c129999f84d8c9",
* "transformerId": "tr-974c129999f84d8c9"
Expand Down
64 changes: 44 additions & 20 deletions clients/client-b2bi/src/commands/UpdateTransformerCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,37 +169,61 @@ export interface UpdateTransformerCommandOutput extends UpdateTransformerRespons
* ```javascript
* //
* const input = {
* "name": "transformJSON",
* "ediType": {
* "x12Details": {
* "version": "VERSION_4010",
* "transactionSet": "X12_110"
* }
* "name": "transformX12",
* "inputConversion": {
* "formatOptions": {
* "x12": {
* "version": "VERSION_4010",
* "transactionSet": "X12_110"
* }
* },
* "fromFormat": "X12"
* },
* "mapping": {
* "template": "{}",
* "templateLanguage": "JSONATA"
* },
* "sampleDocuments": {
* "bucketName": "test-bucket",
* "keys": [
* {
* "input": "sampleDoc.txt"
* }
* ]
* },
* "fileFormat": "JSON",
* "mappingTemplate": "{}",
* "sampleDocument": "s3://test-bucket/sampleDoc.txt",
* "status": "inactive",
* "transformerId": "tr-974c129999f84d8c9"
* };
* const command = new UpdateTransformerCommand(input);
* const response = await client.send(command);
* /* response ==
* {
* "name": "transformJSON",
* "name": "transformX12",
* "createdAt": "2023-11-01T21:51:05.504Z",
* "ediType": {
* "x12Details": {
* "version": "VERSION_4010",
* "transactionSet": "X12_110"
* }
* "inputConversion": {
* "formatOptions": {
* "x12": {
* "version": "VERSION_4010",
* "transactionSet": "X12_110"
* }
* },
* "fromFormat": "X12"
* },
* "mapping": {
* "template": "{}",
* "templateLanguage": "JSONATA"
* },
* "modifiedAt": "2023-11-02T22:31:05.504Z",
* "sampleDocuments": {
* "bucketName": "test-bucket",
* "keys": [
* {
* "input": "sampleDoc.txt"
* }
* ]
* },
* "fileFormat": "JSON",
* "mappingTemplate": "$",
* "modifiedAt": "2023-11-01T21:51:05.504Z",
* "sampleDocument": "s3://test-bucket/sampleDoc.txt",
* "status": "inactive",
* "transformerArn": "arn:aws:b2bi:us-west-2:607686414464:transformer/tr-974c129999f84d8c9",
* "transformerArn": "arn:aws:b2bi:us-west-2:123456789012:transformer/tr-974c129999f84d8c9",
* "transformerId": "tr-974c129999f84d8c9"
* }
* *\/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,9 +314,7 @@ export const de_InvokeAgentCommand = async (
[_mI]: [, output.headers[_xabami]],
});
const data: any = output.body;
if (Object.keys(data ?? {}).length) {
contents.completion = __expectUnion(de_ResponseStream(data, context));
}
contents.completion = de_ResponseStream(data, context);
return contents;
};

Expand All @@ -334,9 +332,7 @@ export const de_InvokeFlowCommand = async (
$metadata: deserializeMetadata(output),
});
const data: any = output.body;
if (Object.keys(data ?? {}).length) {
contents.responseStream = __expectUnion(de_FlowResponseStream(data, context));
}
contents.responseStream = de_FlowResponseStream(data, context);
return contents;
};

Expand Down
8 changes: 2 additions & 6 deletions clients/client-bedrock-runtime/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -295,9 +295,7 @@ export const de_ConverseStreamCommand = async (
$metadata: deserializeMetadata(output),
});
const data: any = output.body;
if (Object.keys(data ?? {}).length) {
contents.stream = __expectUnion(de_ConverseStreamOutput(data, context));
}
contents.stream = de_ConverseStreamOutput(data, context);
return contents;
};

Expand Down Expand Up @@ -335,9 +333,7 @@ export const de_InvokeModelWithResponseStreamCommand = async (
[_cT]: [, output.headers[_xabct]],
});
const data: any = output.body;
if (Object.keys(data ?? {}).length) {
contents.body = __expectUnion(de_ResponseStream(data, context));
}
contents.body = de_ResponseStream(data, context);
return contents;
};

Expand Down
11 changes: 2 additions & 9 deletions clients/client-lambda/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
// smithy-typescript generated code
import {
awsExpectUnion as __expectUnion,
loadRestJsonErrorCode,
parseJsonBody as parseBody,
parseJsonErrorBody as parseErrorBody,
} from "@aws-sdk/core";
import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
import { requestBuilder as rb } from "@smithy/core";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
import {
Expand Down Expand Up @@ -2787,9 +2782,7 @@ export const de_InvokeWithResponseStreamCommand = async (
[_RSCT]: [, output.headers[_ct]],
});
const data: any = output.body;
if (Object.keys(data ?? {}).length) {
contents.EventStream = __expectUnion(de_InvokeWithResponseStreamResponseEvent(data, context));
}
contents.EventStream = de_InvokeWithResponseStreamResponseEvent(data, context);
map(contents, {
StatusCode: [, output.statusCode],
});
Expand Down
11 changes: 2 additions & 9 deletions clients/client-lex-runtime-v2/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
// smithy-typescript generated code
import {
awsExpectUnion as __expectUnion,
loadRestJsonErrorCode,
parseJsonBody as parseBody,
parseJsonErrorBody as parseErrorBody,
} from "@aws-sdk/core";
import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
import { requestBuilder as rb } from "@smithy/core";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
import {
Expand Down Expand Up @@ -369,9 +364,7 @@ export const de_StartConversationCommand = async (
$metadata: deserializeMetadata(output),
});
const data: any = output.body;
if (Object.keys(data ?? {}).length) {
contents.responseEventStream = __expectUnion(de_StartConversationResponseEventStream(data, context));
}
contents.responseEventStream = de_StartConversationResponseEventStream(data, context);
return contents;
};

Expand Down
4 changes: 1 addition & 3 deletions clients/client-qbusiness/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1556,9 +1556,7 @@ export const de_ChatCommand = async (
$metadata: deserializeMetadata(output),
});
const data: any = output.body;
if (Object.keys(data ?? {}).length) {
contents.outputStream = __expectUnion(de_ChatOutputStream(data, context));
}
contents.outputStream = de_ChatOutputStream(data, context);
return contents;
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,7 @@ export const de_StartFaceLivenessSessionCommand = async (
[_SI]: [, output.headers[_xarslsi]],
});
const data: any = output.body;
if (Object.keys(data ?? {}).length) {
contents.LivenessResponseStream = __expectUnion(de_LivenessResponseStream(data, context));
}
contents.LivenessResponseStream = de_LivenessResponseStream(data, context);
return contents;
};

Expand Down
20 changes: 10 additions & 10 deletions clients/client-s3/src/commands/DeleteObjectCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,28 +163,28 @@ export interface DeleteObjectCommandOutput extends DeleteObjectOutput, __Metadat
* <p>Base exception class for all service exceptions from S3 service.</p>
*
* @public
* @example To delete an object (from a non-versioned bucket)
* @example To delete an object
* ```javascript
* // The following example deletes an object from a non-versioned bucket.
* // The following example deletes an object from an S3 bucket.
* const input = {
* "Bucket": "ExampleBucket",
* "Key": "HappyFace.jpg"
* "Bucket": "examplebucket",
* "Key": "objectkey.jpg"
* };
* const command = new DeleteObjectCommand(input);
* await client.send(command);
* // example id: to-delete-an-object-from-a-non-versioned-bucket-1481588533089
* // example id: to-delete-an-object-1472850136595
* ```
*
* @example To delete an object
* @example To delete an object (from a non-versioned bucket)
* ```javascript
* // The following example deletes an object from an S3 bucket.
* // The following example deletes an object from a non-versioned bucket.
* const input = {
* "Bucket": "examplebucket",
* "Key": "objectkey.jpg"
* "Bucket": "ExampleBucket",
* "Key": "HappyFace.jpg"
* };
* const command = new DeleteObjectCommand(input);
* await client.send(command);
* // example id: to-delete-an-object-1472850136595
* // example id: to-delete-an-object-from-a-non-versioned-bucket-1481588533089
* ```
*
*/
Expand Down
Loading

0 comments on commit ad7be23

Please sign in to comment.