Skip to content

Commit d63767b

Browse files
committed
chore: update with union fix
1 parent f4d0e14 commit d63767b

File tree

18 files changed

+246
-231
lines changed

18 files changed

+246
-231
lines changed

clients/client-b2bi/src/commands/CreateTransformerCommand.ts

Lines changed: 42 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -204,17 +204,29 @@ export interface CreateTransformerCommandOutput extends CreateTransformerRespons
204204
* ```javascript
205205
* //
206206
* const input = {
207-
* "name": "transformJSON",
207+
* "name": "transformX12",
208208
* "clientToken": "foo",
209-
* "ediType": {
210-
* "x12Details": {
211-
* "version": "VERSION_4010",
212-
* "transactionSet": "X12_110"
213-
* }
209+
* "inputConversion": {
210+
* "formatOptions": {
211+
* "x12": {
212+
* "version": "VERSION_4010",
213+
* "transactionSet": "X12_110"
214+
* }
215+
* },
216+
* "fromFormat": "X12"
217+
* },
218+
* "mapping": {
219+
* "template": "{}",
220+
* "templateLanguage": "JSONATA"
221+
* },
222+
* "sampleDocuments": {
223+
* "bucketName": "test-bucket",
224+
* "keys": [
225+
* {
226+
* "input": "sampleDoc.txt"
227+
* }
228+
* ]
214229
* },
215-
* "fileFormat": "JSON",
216-
* "mappingTemplate": "{}",
217-
* "sampleDocument": "s3://test-bucket/sampleDoc.txt",
218230
* "tags": [
219231
* {
220232
* "Key": "sampleKey",
@@ -226,17 +238,29 @@ export interface CreateTransformerCommandOutput extends CreateTransformerRespons
226238
* const response = await client.send(command);
227239
* /* response ==
228240
* {
229-
* "name": "transformJSON",
241+
* "name": "transformX12",
230242
* "createdAt": "2023-11-01T21:51:05.504Z",
231-
* "ediType": {
232-
* "x12Details": {
233-
* "version": "VERSION_4010",
234-
* "transactionSet": "X12_110"
235-
* }
243+
* "inputConversion": {
244+
* "formatOptions": {
245+
* "x12": {
246+
* "version": "VERSION_4010",
247+
* "transactionSet": "X12_110"
248+
* }
249+
* },
250+
* "fromFormat": "X12"
251+
* },
252+
* "mapping": {
253+
* "template": "{}",
254+
* "templateLanguage": "JSONATA"
255+
* },
256+
* "sampleDocuments": {
257+
* "bucketName": "test-bucket",
258+
* "keys": [
259+
* {
260+
* "input": "sampleDoc.txt"
261+
* }
262+
* ]
236263
* },
237-
* "fileFormat": "JSON",
238-
* "mappingTemplate": "$",
239-
* "sampleDocument": "s3://test-bucket/sampleDoc.txt",
240264
* "status": "inactive",
241265
* "transformerArn": "arn:aws:b2bi:us-west-2:123456789012:transformer/tr-974c129999f84d8c9",
242266
* "transformerId": "tr-974c129999f84d8c9"

clients/client-b2bi/src/commands/GetTransformerCommand.ts

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -127,18 +127,29 @@ export interface GetTransformerCommandOutput extends GetTransformerResponse, __M
127127
* const response = await client.send(command);
128128
* /* response ==
129129
* {
130-
* "name": "transformJSON",
130+
* "name": "transformX12",
131131
* "createdAt": "2023-11-01T21:51:05.504Z",
132-
* "ediType": {
133-
* "x12Details": {
134-
* "version": "VERSION_4010",
135-
* "transactionSet": "X12_110"
136-
* }
132+
* "inputConversion": {
133+
* "formatOptions": {
134+
* "x12": {
135+
* "version": "VERSION_4010",
136+
* "transactionSet": "X12_110"
137+
* }
138+
* },
139+
* "fromFormat": "X12"
140+
* },
141+
* "mapping": {
142+
* "template": "{}",
143+
* "templateLanguage": "JSONATA"
144+
* },
145+
* "sampleDocuments": {
146+
* "bucketName": "test-bucket",
147+
* "keys": [
148+
* {
149+
* "input": "sampleDoc.txt"
150+
* }
151+
* ]
137152
* },
138-
* "fileFormat": "JSON",
139-
* "mappingTemplate": "$",
140-
* "modifiedAt": "2023-11-01T21:51:05.504Z",
141-
* "sampleDocument": "s3://test-bucket/sampleDoc.txt",
142153
* "status": "inactive",
143154
* "transformerArn": "arn:aws:b2bi:us-west-2:123456789012:transformer/tr-974c129999f84d8c9",
144155
* "transformerId": "tr-974c129999f84d8c9"

clients/client-b2bi/src/commands/UpdateTransformerCommand.ts

Lines changed: 44 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -169,37 +169,61 @@ export interface UpdateTransformerCommandOutput extends UpdateTransformerRespons
169169
* ```javascript
170170
* //
171171
* const input = {
172-
* "name": "transformJSON",
173-
* "ediType": {
174-
* "x12Details": {
175-
* "version": "VERSION_4010",
176-
* "transactionSet": "X12_110"
177-
* }
172+
* "name": "transformX12",
173+
* "inputConversion": {
174+
* "formatOptions": {
175+
* "x12": {
176+
* "version": "VERSION_4010",
177+
* "transactionSet": "X12_110"
178+
* }
179+
* },
180+
* "fromFormat": "X12"
181+
* },
182+
* "mapping": {
183+
* "template": "{}",
184+
* "templateLanguage": "JSONATA"
185+
* },
186+
* "sampleDocuments": {
187+
* "bucketName": "test-bucket",
188+
* "keys": [
189+
* {
190+
* "input": "sampleDoc.txt"
191+
* }
192+
* ]
178193
* },
179-
* "fileFormat": "JSON",
180-
* "mappingTemplate": "{}",
181-
* "sampleDocument": "s3://test-bucket/sampleDoc.txt",
182194
* "status": "inactive",
183195
* "transformerId": "tr-974c129999f84d8c9"
184196
* };
185197
* const command = new UpdateTransformerCommand(input);
186198
* const response = await client.send(command);
187199
* /* response ==
188200
* {
189-
* "name": "transformJSON",
201+
* "name": "transformX12",
190202
* "createdAt": "2023-11-01T21:51:05.504Z",
191-
* "ediType": {
192-
* "x12Details": {
193-
* "version": "VERSION_4010",
194-
* "transactionSet": "X12_110"
195-
* }
203+
* "inputConversion": {
204+
* "formatOptions": {
205+
* "x12": {
206+
* "version": "VERSION_4010",
207+
* "transactionSet": "X12_110"
208+
* }
209+
* },
210+
* "fromFormat": "X12"
211+
* },
212+
* "mapping": {
213+
* "template": "{}",
214+
* "templateLanguage": "JSONATA"
215+
* },
216+
* "modifiedAt": "2023-11-02T22:31:05.504Z",
217+
* "sampleDocuments": {
218+
* "bucketName": "test-bucket",
219+
* "keys": [
220+
* {
221+
* "input": "sampleDoc.txt"
222+
* }
223+
* ]
196224
* },
197-
* "fileFormat": "JSON",
198-
* "mappingTemplate": "$",
199-
* "modifiedAt": "2023-11-01T21:51:05.504Z",
200-
* "sampleDocument": "s3://test-bucket/sampleDoc.txt",
201225
* "status": "inactive",
202-
* "transformerArn": "arn:aws:b2bi:us-west-2:607686414464:transformer/tr-974c129999f84d8c9",
226+
* "transformerArn": "arn:aws:b2bi:us-west-2:123456789012:transformer/tr-974c129999f84d8c9",
203227
* "transformerId": "tr-974c129999f84d8c9"
204228
* }
205229
* *\/

clients/client-bedrock-agent-runtime/src/protocols/Aws_restJson1.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -314,9 +314,7 @@ export const de_InvokeAgentCommand = async (
314314
[_mI]: [, output.headers[_xabami]],
315315
});
316316
const data: any = output.body;
317-
if (Object.keys(data ?? {}).length) {
318-
contents.completion = __expectUnion(de_ResponseStream(data, context));
319-
}
317+
contents.completion = de_ResponseStream(data, context);
320318
return contents;
321319
};
322320

@@ -334,9 +332,7 @@ export const de_InvokeFlowCommand = async (
334332
$metadata: deserializeMetadata(output),
335333
});
336334
const data: any = output.body;
337-
if (Object.keys(data ?? {}).length) {
338-
contents.responseStream = __expectUnion(de_FlowResponseStream(data, context));
339-
}
335+
contents.responseStream = de_FlowResponseStream(data, context);
340336
return contents;
341337
};
342338

clients/client-bedrock-runtime/src/protocols/Aws_restJson1.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -295,9 +295,7 @@ export const de_ConverseStreamCommand = async (
295295
$metadata: deserializeMetadata(output),
296296
});
297297
const data: any = output.body;
298-
if (Object.keys(data ?? {}).length) {
299-
contents.stream = __expectUnion(de_ConverseStreamOutput(data, context));
300-
}
298+
contents.stream = de_ConverseStreamOutput(data, context);
301299
return contents;
302300
};
303301

@@ -335,9 +333,7 @@ export const de_InvokeModelWithResponseStreamCommand = async (
335333
[_cT]: [, output.headers[_xabct]],
336334
});
337335
const data: any = output.body;
338-
if (Object.keys(data ?? {}).length) {
339-
contents.body = __expectUnion(de_ResponseStream(data, context));
340-
}
336+
contents.body = de_ResponseStream(data, context);
341337
return contents;
342338
};
343339

clients/client-lambda/src/protocols/Aws_restJson1.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
// smithy-typescript generated code
2-
import {
3-
awsExpectUnion as __expectUnion,
4-
loadRestJsonErrorCode,
5-
parseJsonBody as parseBody,
6-
parseJsonErrorBody as parseErrorBody,
7-
} from "@aws-sdk/core";
2+
import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
83
import { requestBuilder as rb } from "@smithy/core";
94
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
105
import {
@@ -2787,9 +2782,7 @@ export const de_InvokeWithResponseStreamCommand = async (
27872782
[_RSCT]: [, output.headers[_ct]],
27882783
});
27892784
const data: any = output.body;
2790-
if (Object.keys(data ?? {}).length) {
2791-
contents.EventStream = __expectUnion(de_InvokeWithResponseStreamResponseEvent(data, context));
2792-
}
2785+
contents.EventStream = de_InvokeWithResponseStreamResponseEvent(data, context);
27932786
map(contents, {
27942787
StatusCode: [, output.statusCode],
27952788
});

clients/client-lex-runtime-v2/src/protocols/Aws_restJson1.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
// smithy-typescript generated code
2-
import {
3-
awsExpectUnion as __expectUnion,
4-
loadRestJsonErrorCode,
5-
parseJsonBody as parseBody,
6-
parseJsonErrorBody as parseErrorBody,
7-
} from "@aws-sdk/core";
2+
import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
83
import { requestBuilder as rb } from "@smithy/core";
94
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
105
import {
@@ -369,9 +364,7 @@ export const de_StartConversationCommand = async (
369364
$metadata: deserializeMetadata(output),
370365
});
371366
const data: any = output.body;
372-
if (Object.keys(data ?? {}).length) {
373-
contents.responseEventStream = __expectUnion(de_StartConversationResponseEventStream(data, context));
374-
}
367+
contents.responseEventStream = de_StartConversationResponseEventStream(data, context);
375368
return contents;
376369
};
377370

clients/client-qbusiness/src/protocols/Aws_restJson1.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1556,9 +1556,7 @@ export const de_ChatCommand = async (
15561556
$metadata: deserializeMetadata(output),
15571557
});
15581558
const data: any = output.body;
1559-
if (Object.keys(data ?? {}).length) {
1560-
contents.outputStream = __expectUnion(de_ChatOutputStream(data, context));
1561-
}
1559+
contents.outputStream = de_ChatOutputStream(data, context);
15621560
return contents;
15631561
};
15641562

clients/client-rekognitionstreaming/src/protocols/Aws_restJson1.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,7 @@ export const de_StartFaceLivenessSessionCommand = async (
102102
[_SI]: [, output.headers[_xarslsi]],
103103
});
104104
const data: any = output.body;
105-
if (Object.keys(data ?? {}).length) {
106-
contents.LivenessResponseStream = __expectUnion(de_LivenessResponseStream(data, context));
107-
}
105+
contents.LivenessResponseStream = de_LivenessResponseStream(data, context);
108106
return contents;
109107
};
110108

clients/client-s3/src/commands/DeleteObjectCommand.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -163,28 +163,28 @@ export interface DeleteObjectCommandOutput extends DeleteObjectOutput, __Metadat
163163
* <p>Base exception class for all service exceptions from S3 service.</p>
164164
*
165165
* @public
166-
* @example To delete an object (from a non-versioned bucket)
166+
* @example To delete an object
167167
* ```javascript
168-
* // The following example deletes an object from a non-versioned bucket.
168+
* // The following example deletes an object from an S3 bucket.
169169
* const input = {
170-
* "Bucket": "ExampleBucket",
171-
* "Key": "HappyFace.jpg"
170+
* "Bucket": "examplebucket",
171+
* "Key": "objectkey.jpg"
172172
* };
173173
* const command = new DeleteObjectCommand(input);
174174
* await client.send(command);
175-
* // example id: to-delete-an-object-from-a-non-versioned-bucket-1481588533089
175+
* // example id: to-delete-an-object-1472850136595
176176
* ```
177177
*
178-
* @example To delete an object
178+
* @example To delete an object (from a non-versioned bucket)
179179
* ```javascript
180-
* // The following example deletes an object from an S3 bucket.
180+
* // The following example deletes an object from a non-versioned bucket.
181181
* const input = {
182-
* "Bucket": "examplebucket",
183-
* "Key": "objectkey.jpg"
182+
* "Bucket": "ExampleBucket",
183+
* "Key": "HappyFace.jpg"
184184
* };
185185
* const command = new DeleteObjectCommand(input);
186186
* await client.send(command);
187-
* // example id: to-delete-an-object-1472850136595
187+
* // example id: to-delete-an-object-from-a-non-versioned-bucket-1481588533089
188188
* ```
189189
*
190190
*/

0 commit comments

Comments
 (0)