Skip to content

Commit

Permalink
feat: codegen for fixing streaming member shape
Browse files Browse the repository at this point in the history
  • Loading branch information
AllanZhengYP committed Mar 2, 2020
1 parent 5756f9b commit 5279837
Show file tree
Hide file tree
Showing 21 changed files with 71 additions and 223 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,16 @@ import {
SerdeContext as __SerdeContext
} from "@aws-sdk/types";

export type UploadDocumentsCommandInput = UploadDocumentsRequest;
export type UploadDocumentsCommandInput = Omit<
UploadDocumentsRequest,
"documents"
> & {
documents?:
| UploadDocumentsRequest["documents"]
| string
| Uint8Array
| Buffer;
};
export type UploadDocumentsCommandOutput = UploadDocumentsResponse;

export class UploadDocumentsCommand extends $Command<
Expand Down
3 changes: 2 additions & 1 deletion clients/client-cloudsearch-domain/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
isa as __isa
} from "@aws-sdk/smithy-client";
import { MetadataBearer as $MetadataBearer } from "@aws-sdk/types";
import { Readable } from "stream";

/**
* <p>A container for facet information.</p>
Expand Down Expand Up @@ -714,7 +715,7 @@ export interface UploadDocumentsRequest {
/**
* <p>A batch of documents formatted in JSON or HTML.</p>
*/
documents: Uint8Array | undefined;
documents: Readable | ReadableStream | Blob | undefined;
}

export namespace UploadDocumentsRequest {
Expand Down
3 changes: 2 additions & 1 deletion clients/client-ebs/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
isa as __isa
} from "@aws-sdk/smithy-client";
import { MetadataBearer as $MetadataBearer } from "@aws-sdk/types";
import { Readable } from "stream";

/**
* <p>A block of data in an Amazon Elastic Block Store snapshot.</p>
Expand Down Expand Up @@ -98,7 +99,7 @@ export interface GetSnapshotBlockResponse extends $MetadataBearer {
/**
* <p>The data content of the block.</p>
*/
BlockData?: Uint8Array;
BlockData?: Readable | ReadableStream | Blob;

/**
* <p>The checksum generated for the block.</p>
Expand Down
4 changes: 3 additions & 1 deletion clients/client-glacier/commands/UploadArchiveCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ import {
SerdeContext as __SerdeContext
} from "@aws-sdk/types";

export type UploadArchiveCommandInput = UploadArchiveInput;
export type UploadArchiveCommandInput = Omit<UploadArchiveInput, "body"> & {
body?: UploadArchiveInput["body"] | string | Uint8Array | Buffer;
};
export type UploadArchiveCommandOutput = ArchiveCreationOutput;

export class UploadArchiveCommand extends $Command<
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@ import {
SerdeContext as __SerdeContext
} from "@aws-sdk/types";

export type UploadMultipartPartCommandInput = UploadMultipartPartInput;
export type UploadMultipartPartCommandInput = Omit<
UploadMultipartPartInput,
"body"
> & {
body?: UploadMultipartPartInput["body"] | string | Uint8Array | Buffer;
};
export type UploadMultipartPartCommandOutput = UploadMultipartPartOutput;

export class UploadMultipartPartCommand extends $Command<
Expand Down
7 changes: 4 additions & 3 deletions clients/client-glacier/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
isa as __isa
} from "@aws-sdk/smithy-client";
import { MetadataBearer as $MetadataBearer } from "@aws-sdk/types";
import { Readable } from "stream";

export enum ActionCode {
ArchiveRetrieval = "ArchiveRetrieval",
Expand Down Expand Up @@ -1224,7 +1225,7 @@ export interface GetJobOutputOutput extends $MetadataBearer {
/**
* <p>The job data, either archive data or inventory data.</p>
*/
body?: Uint8Array;
body?: Readable | ReadableStream | Blob;

/**
* <p>The checksum of the data in the response. This header is returned only when
Expand Down Expand Up @@ -2554,7 +2555,7 @@ export interface UploadArchiveInput {
/**
* <p>The data to upload.</p>
*/
body?: Uint8Array;
body?: Readable | ReadableStream | Blob;

/**
* <p>The SHA256 tree hash of the data being uploaded.</p>
Expand Down Expand Up @@ -2631,7 +2632,7 @@ export interface UploadMultipartPartInput {
/**
* <p>The data to upload.</p>
*/
body?: Uint8Array;
body?: Readable | ReadableStream | Blob;

/**
* <p>The SHA256 tree hash of the data being uploaded.</p>
Expand Down
3 changes: 2 additions & 1 deletion clients/client-kinesis-video-archived-media/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
isa as __isa
} from "@aws-sdk/smithy-client";
import { MetadataBearer as $MetadataBearer } from "@aws-sdk/types";
import { Readable } from "stream";

export enum ContainerFormat {
FRAGMENTED_MP4 = "FRAGMENTED_MP4",
Expand Down Expand Up @@ -665,7 +666,7 @@ export interface GetMediaForFragmentListOutput extends $MetadataBearer {
* </li>
* </ul>
*/
Payload?: Uint8Array;
Payload?: Readable | ReadableStream | Blob;
}

export namespace GetMediaForFragmentListOutput {
Expand Down
3 changes: 2 additions & 1 deletion clients/client-kinesis-video-media/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
isa as __isa
} from "@aws-sdk/smithy-client";
import { MetadataBearer as $MetadataBearer } from "@aws-sdk/types";
import { Readable } from "stream";

export interface GetMediaInput {
__type?: "GetMediaInput";
Expand Down Expand Up @@ -108,7 +109,7 @@ export interface GetMediaOutput extends $MetadataBearer {
* </li>
* </ul>
*/
Payload?: Uint8Array;
Payload?: Readable | ReadableStream | Blob;
}

export namespace GetMediaOutput {
Expand Down
4 changes: 3 additions & 1 deletion clients/client-lambda/commands/InvokeAsyncCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ import {
SerdeContext as __SerdeContext
} from "@aws-sdk/types";

export type InvokeAsyncCommandInput = InvokeAsyncRequest;
export type InvokeAsyncCommandInput = Omit<InvokeAsyncRequest, "InvokeArgs"> & {
InvokeArgs?: InvokeAsyncRequest["InvokeArgs"] | string | Uint8Array | Buffer;
};
export type InvokeAsyncCommandOutput = InvokeAsyncResponse;

export class InvokeAsyncCommand extends $Command<
Expand Down
3 changes: 2 additions & 1 deletion clients/client-lambda/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
isa as __isa
} from "@aws-sdk/smithy-client";
import { MetadataBearer as $MetadataBearer } from "@aws-sdk/types";
import { Readable } from "stream";

/**
* <p>Limits that are related to concurrency and storage. All file and storage sizes are in bytes.</p>
Expand Down Expand Up @@ -2157,7 +2158,7 @@ export interface InvokeAsyncRequest {
/**
* <p>The JSON that you want to provide to your Lambda function as input.</p>
*/
InvokeArgs: Uint8Array | undefined;
InvokeArgs: Readable | ReadableStream | Blob | undefined;
}

export namespace InvokeAsyncRequest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,16 @@ import {
SerdeContext as __SerdeContext
} from "@aws-sdk/types";

export type PostContentCommandInput = PostContentRequest;
export type PostContentCommandInput = Omit<
PostContentRequest,
"inputStream"
> & {
inputStream?:
| PostContentRequest["inputStream"]
| string
| Uint8Array
| Buffer;
};
export type PostContentCommandOutput = PostContentResponse;

export class PostContentCommand extends $Command<
Expand Down
7 changes: 4 additions & 3 deletions clients/client-lex-runtime-service/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
isa as __isa
} from "@aws-sdk/smithy-client";
import { MetadataBearer as $MetadataBearer } from "@aws-sdk/types";
import { Readable } from "stream";

/**
* <p> Request validation failed, there is no usable message in the context, or the bot build
Expand Down Expand Up @@ -695,7 +696,7 @@ export interface PostContentRequest {
* the audio data before sending. In general, you get better performance if you stream audio data
* rather than buffering the data locally.</p>
*/
inputStream: Uint8Array | undefined;
inputStream: Readable | ReadableStream | Blob | undefined;

/**
* <p>You pass this value as the <code>x-amz-lex-request-attributes</code> HTTP header.</p>
Expand Down Expand Up @@ -767,7 +768,7 @@ export interface PostContentResponse extends $MetadataBearer {
* example: Suppose that the Lambda function successfully fulfilled the intent, and sent a message
* to convey to the user. Then Amazon Lex sends that message in the response. </p>
*/
audioStream?: Uint8Array;
audioStream?: Readable | ReadableStream | Blob;

/**
* <p>Content type as specified in the <code>Accept</code> HTTP header in the request.</p>
Expand Down Expand Up @@ -1267,7 +1268,7 @@ export interface PutSessionResponse extends $MetadataBearer {
/**
* <p>The audio version of the message to convey to the user.</p>
*/
audioStream?: Uint8Array;
audioStream?: Readable | ReadableStream | Blob;

/**
* <p>Content type as specified in the <code>Accept</code> HTTP header in the request.</p>
Expand Down
4 changes: 3 additions & 1 deletion clients/client-mediastore-data/commands/PutObjectCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ import {
SerdeContext as __SerdeContext
} from "@aws-sdk/types";

export type PutObjectCommandInput = PutObjectRequest;
export type PutObjectCommandInput = Omit<PutObjectRequest, "Body"> & {
Body?: PutObjectRequest["Body"] | string | Uint8Array | Buffer;
};
export type PutObjectCommandOutput = PutObjectResponse;

export class PutObjectCommand extends $Command<
Expand Down
5 changes: 3 additions & 2 deletions clients/client-mediastore-data/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
isa as __isa
} from "@aws-sdk/smithy-client";
import { MetadataBearer as $MetadataBearer } from "@aws-sdk/types";
import { Readable } from "stream";

/**
* <p>The specified container was not found for the specified account.</p>
Expand Down Expand Up @@ -139,7 +140,7 @@ export interface GetObjectResponse extends $MetadataBearer {
/**
* <p>The bytes of the object. </p>
*/
Body?: Uint8Array;
Body?: Readable | ReadableStream | Blob;

/**
* <p>An optional <code>CacheControl</code> header that allows the caller to control the
Expand Down Expand Up @@ -326,7 +327,7 @@ export interface PutObjectRequest {
/**
* <p>The bytes to be stored. </p>
*/
Body: Uint8Array | undefined;
Body: Readable | ReadableStream | Blob | undefined;

/**
* <p>An optional <code>CacheControl</code> header that allows the caller to control the
Expand Down
3 changes: 2 additions & 1 deletion clients/client-polly/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
isa as __isa
} from "@aws-sdk/smithy-client";
import { MetadataBearer as $MetadataBearer } from "@aws-sdk/types";
import { Readable } from "stream";

export interface DeleteLexiconInput {
__type?: "DeleteLexiconInput";
Expand Down Expand Up @@ -1011,7 +1012,7 @@ export interface SynthesizeSpeechOutput extends $MetadataBearer {
* Stream containing the synthesized speech.
* </p>
*/
AudioStream?: Uint8Array;
AudioStream?: Readable | ReadableStream | Blob;

/**
* <p>
Expand Down
Loading

0 comments on commit 5279837

Please sign in to comment.