Skip to content

Commit

Permalink
feat(clients): full codegen for blobs
Browse files Browse the repository at this point in the history
  • Loading branch information
kuhe committed Jun 14, 2023
1 parent ec956e9 commit a948899
Show file tree
Hide file tree
Showing 467 changed files with 3,567 additions and 1,521 deletions.
10 changes: 7 additions & 3 deletions clients/client-accessanalyzer/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
withBaseException,
} from "@aws-sdk/smithy-client";
import { ResponseMetadata as __ResponseMetadata } from "@aws-sdk/types";
import { Uint8ArrayBlobAdapter as __Uint8ArrayBlobAdapter } from "@aws-sdk/util-stream";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
import { Endpoint as __Endpoint, SerdeContext as __SerdeContext } from "@smithy/types";
import { v4 as generateIdempotencyToken } from "uuid";
Expand Down Expand Up @@ -3323,11 +3324,14 @@ const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({
});

// Collect low-level response body stream to Uint8Array.
const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext): Promise<Uint8Array> => {
const collectBody = async (
streamBody: any = new Uint8Array(),
context: __SerdeContext
): Promise<__Uint8ArrayBlobAdapter> => {
if (streamBody instanceof Uint8Array) {
return Promise.resolve(streamBody);
return __Uint8ArrayBlobAdapter.mutate(streamBody);
}
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
return __Uint8ArrayBlobAdapter.mutate(await context.streamCollector(streamBody)) || new __Uint8ArrayBlobAdapter();
};

// Encode Uint8Array data into string with utf-8.
Expand Down
10 changes: 7 additions & 3 deletions clients/client-account/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
withBaseException,
} from "@aws-sdk/smithy-client";
import { ResponseMetadata as __ResponseMetadata } from "@aws-sdk/types";
import { Uint8ArrayBlobAdapter as __Uint8ArrayBlobAdapter } from "@aws-sdk/util-stream";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
import { Endpoint as __Endpoint, SerdeContext as __SerdeContext } from "@smithy/types";

Expand Down Expand Up @@ -968,11 +969,14 @@ const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({
});

// Collect low-level response body stream to Uint8Array.
const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext): Promise<Uint8Array> => {
const collectBody = async (
streamBody: any = new Uint8Array(),
context: __SerdeContext
): Promise<__Uint8ArrayBlobAdapter> => {
if (streamBody instanceof Uint8Array) {
return Promise.resolve(streamBody);
return __Uint8ArrayBlobAdapter.mutate(streamBody);
}
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
return __Uint8ArrayBlobAdapter.mutate(await context.streamCollector(streamBody)) || new __Uint8ArrayBlobAdapter();
};

// Encode Uint8Array data into string with utf-8.
Expand Down
10 changes: 7 additions & 3 deletions clients/client-acm-pca/src/protocols/Aws_json1_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
withBaseException,
} from "@aws-sdk/smithy-client";
import { HeaderBag as __HeaderBag, ResponseMetadata as __ResponseMetadata } from "@aws-sdk/types";
import { Uint8ArrayBlobAdapter as __Uint8ArrayBlobAdapter } from "@aws-sdk/util-stream";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
import { Endpoint as __Endpoint, SerdeContext as __SerdeContext } from "@smithy/types";

Expand Down Expand Up @@ -2377,11 +2378,14 @@ const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({
});

// Collect low-level response body stream to Uint8Array.
const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext): Promise<Uint8Array> => {
const collectBody = async (
streamBody: any = new Uint8Array(),
context: __SerdeContext
): Promise<__Uint8ArrayBlobAdapter> => {
if (streamBody instanceof Uint8Array) {
return Promise.resolve(streamBody);
return __Uint8ArrayBlobAdapter.mutate(streamBody);
}
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
return __Uint8ArrayBlobAdapter.mutate(await context.streamCollector(streamBody)) || new __Uint8ArrayBlobAdapter();
};

// Encode Uint8Array data into string with utf-8.
Expand Down
10 changes: 7 additions & 3 deletions clients/client-acm/src/protocols/Aws_json1_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
withBaseException,
} from "@aws-sdk/smithy-client";
import { HeaderBag as __HeaderBag, ResponseMetadata as __ResponseMetadata } from "@aws-sdk/types";
import { Uint8ArrayBlobAdapter as __Uint8ArrayBlobAdapter } from "@aws-sdk/util-stream";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
import { Endpoint as __Endpoint, SerdeContext as __SerdeContext } from "@smithy/types";

Expand Down Expand Up @@ -1599,11 +1600,14 @@ const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({
});

// Collect low-level response body stream to Uint8Array.
const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext): Promise<Uint8Array> => {
const collectBody = async (
streamBody: any = new Uint8Array(),
context: __SerdeContext
): Promise<__Uint8ArrayBlobAdapter> => {
if (streamBody instanceof Uint8Array) {
return Promise.resolve(streamBody);
return __Uint8ArrayBlobAdapter.mutate(streamBody);
}
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
return __Uint8ArrayBlobAdapter.mutate(await context.streamCollector(streamBody)) || new __Uint8ArrayBlobAdapter();
};

// Encode Uint8Array data into string with utf-8.
Expand Down
10 changes: 7 additions & 3 deletions clients/client-alexa-for-business/src/protocols/Aws_json1_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
withBaseException,
} from "@aws-sdk/smithy-client";
import { HeaderBag as __HeaderBag, ResponseMetadata as __ResponseMetadata } from "@aws-sdk/types";
import { Uint8ArrayBlobAdapter as __Uint8ArrayBlobAdapter } from "@aws-sdk/util-stream";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
import { Endpoint as __Endpoint, SerdeContext as __SerdeContext } from "@smithy/types";
import { v4 as generateIdempotencyToken } from "uuid";
Expand Down Expand Up @@ -7152,11 +7153,14 @@ const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({
});

// Collect low-level response body stream to Uint8Array.
const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext): Promise<Uint8Array> => {
const collectBody = async (
streamBody: any = new Uint8Array(),
context: __SerdeContext
): Promise<__Uint8ArrayBlobAdapter> => {
if (streamBody instanceof Uint8Array) {
return Promise.resolve(streamBody);
return __Uint8ArrayBlobAdapter.mutate(streamBody);
}
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
return __Uint8ArrayBlobAdapter.mutate(await context.streamCollector(streamBody)) || new __Uint8ArrayBlobAdapter();
};

// Encode Uint8Array data into string with utf-8.
Expand Down
10 changes: 7 additions & 3 deletions clients/client-amp/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
withBaseException,
} from "@aws-sdk/smithy-client";
import { ResponseMetadata as __ResponseMetadata } from "@aws-sdk/types";
import { Uint8ArrayBlobAdapter as __Uint8ArrayBlobAdapter } from "@aws-sdk/util-stream";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
import { Endpoint as __Endpoint, SerdeContext as __SerdeContext } from "@smithy/types";
import { v4 as generateIdempotencyToken } from "uuid";
Expand Down Expand Up @@ -2264,11 +2265,14 @@ const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({
});

// Collect low-level response body stream to Uint8Array.
const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext): Promise<Uint8Array> => {
const collectBody = async (
streamBody: any = new Uint8Array(),
context: __SerdeContext
): Promise<__Uint8ArrayBlobAdapter> => {
if (streamBody instanceof Uint8Array) {
return Promise.resolve(streamBody);
return __Uint8ArrayBlobAdapter.mutate(streamBody);
}
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
return __Uint8ArrayBlobAdapter.mutate(await context.streamCollector(streamBody)) || new __Uint8ArrayBlobAdapter();
};

// Encode Uint8Array data into string with utf-8.
Expand Down
10 changes: 7 additions & 3 deletions clients/client-amplify/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
withBaseException,
} from "@aws-sdk/smithy-client";
import { ResponseMetadata as __ResponseMetadata } from "@aws-sdk/types";
import { Uint8ArrayBlobAdapter as __Uint8ArrayBlobAdapter } from "@aws-sdk/util-stream";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
import { Endpoint as __Endpoint, SerdeContext as __SerdeContext } from "@smithy/types";

Expand Down Expand Up @@ -3778,11 +3779,14 @@ const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({
});

// Collect low-level response body stream to Uint8Array.
const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext): Promise<Uint8Array> => {
const collectBody = async (
streamBody: any = new Uint8Array(),
context: __SerdeContext
): Promise<__Uint8ArrayBlobAdapter> => {
if (streamBody instanceof Uint8Array) {
return Promise.resolve(streamBody);
return __Uint8ArrayBlobAdapter.mutate(streamBody);
}
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
return __Uint8ArrayBlobAdapter.mutate(await context.streamCollector(streamBody)) || new __Uint8ArrayBlobAdapter();
};

// Encode Uint8Array data into string with utf-8.
Expand Down
10 changes: 7 additions & 3 deletions clients/client-amplifybackend/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
withBaseException,
} from "@aws-sdk/smithy-client";
import { ResponseMetadata as __ResponseMetadata } from "@aws-sdk/types";
import { Uint8ArrayBlobAdapter as __Uint8ArrayBlobAdapter } from "@aws-sdk/util-stream";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
import { Endpoint as __Endpoint, SerdeContext as __SerdeContext } from "@smithy/types";

Expand Down Expand Up @@ -3892,11 +3893,14 @@ const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({
});

// Collect low-level response body stream to Uint8Array.
const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext): Promise<Uint8Array> => {
const collectBody = async (
streamBody: any = new Uint8Array(),
context: __SerdeContext
): Promise<__Uint8ArrayBlobAdapter> => {
if (streamBody instanceof Uint8Array) {
return Promise.resolve(streamBody);
return __Uint8ArrayBlobAdapter.mutate(streamBody);
}
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
return __Uint8ArrayBlobAdapter.mutate(await context.streamCollector(streamBody)) || new __Uint8ArrayBlobAdapter();
};

// Encode Uint8Array data into string with utf-8.
Expand Down
10 changes: 7 additions & 3 deletions clients/client-amplifyuibuilder/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
withBaseException,
} from "@aws-sdk/smithy-client";
import { ResponseMetadata as __ResponseMetadata } from "@aws-sdk/types";
import { Uint8ArrayBlobAdapter as __Uint8ArrayBlobAdapter } from "@aws-sdk/util-stream";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
import { Endpoint as __Endpoint, SerdeContext as __SerdeContext } from "@smithy/types";
import { v4 as generateIdempotencyToken } from "uuid";
Expand Down Expand Up @@ -3706,11 +3707,14 @@ const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({
});

// Collect low-level response body stream to Uint8Array.
const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext): Promise<Uint8Array> => {
const collectBody = async (
streamBody: any = new Uint8Array(),
context: __SerdeContext
): Promise<__Uint8ArrayBlobAdapter> => {
if (streamBody instanceof Uint8Array) {
return Promise.resolve(streamBody);
return __Uint8ArrayBlobAdapter.mutate(streamBody);
}
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
return __Uint8ArrayBlobAdapter.mutate(await context.streamCollector(streamBody)) || new __Uint8ArrayBlobAdapter();
};

// Encode Uint8Array data into string with utf-8.
Expand Down
9 changes: 8 additions & 1 deletion clients/client-api-gateway/src/commands/GetExportCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
MetadataBearer as __MetadataBearer,
MiddlewareStack,
} from "@aws-sdk/types";
import { Uint8ArrayBlobAdapter } from "@aws-sdk/util-stream";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
import { SerdeContext as __SerdeContext } from "@smithy/types";

Expand All @@ -27,12 +28,18 @@ export { __MetadataBearer, $Command };
* The input for {@link GetExportCommand}.
*/
export interface GetExportCommandInput extends GetExportRequest {}
/**
* @public
*/
export type GetExportCommandOutputType = Omit<ExportResponse, "body"> & {
body?: Uint8ArrayBlobAdapter;
};
/**
* @public
*
* The output of {@link GetExportCommand}.
*/
export interface GetExportCommandOutput extends ExportResponse, __MetadataBearer {}
export interface GetExportCommandOutput extends GetExportCommandOutputType, __MetadataBearer {}

/**
* @public
Expand Down
9 changes: 8 additions & 1 deletion clients/client-api-gateway/src/commands/GetSdkCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
MetadataBearer as __MetadataBearer,
MiddlewareStack,
} from "@aws-sdk/types";
import { Uint8ArrayBlobAdapter } from "@aws-sdk/util-stream";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
import { SerdeContext as __SerdeContext } from "@smithy/types";

Expand All @@ -27,12 +28,18 @@ export { __MetadataBearer, $Command };
* The input for {@link GetSdkCommand}.
*/
export interface GetSdkCommandInput extends GetSdkRequest {}
/**
* @public
*/
export type GetSdkCommandOutputType = Omit<SdkResponse, "body"> & {
body?: Uint8ArrayBlobAdapter;
};
/**
* @public
*
* The output of {@link GetSdkCommand}.
*/
export interface GetSdkCommandOutput extends SdkResponse, __MetadataBearer {}
export interface GetSdkCommandOutput extends GetSdkCommandOutputType, __MetadataBearer {}

/**
* @public
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middl
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
import { Command as $Command } from "@aws-sdk/smithy-client";
import {
BlobTypes,
FinalizeHandlerArguments,
Handler,
HandlerExecutionContext,
Expand All @@ -21,12 +22,18 @@ import { de_ImportApiKeysCommand, se_ImportApiKeysCommand } from "../protocols/A
* @public
*/
export { __MetadataBearer, $Command };
/**
* @public
*/
export type ImportApiKeysCommandInputType = Omit<ImportApiKeysRequest, "body"> & {
body: BlobTypes;
};
/**
* @public
*
* The input for {@link ImportApiKeysCommand}.
*/
export interface ImportApiKeysCommandInput extends ImportApiKeysRequest {}
export interface ImportApiKeysCommandInput extends ImportApiKeysCommandInputType {}
/**
* @public
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middl
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
import { Command as $Command } from "@aws-sdk/smithy-client";
import {
BlobTypes,
FinalizeHandlerArguments,
Handler,
HandlerExecutionContext,
Expand All @@ -21,12 +22,18 @@ import { de_ImportDocumentationPartsCommand, se_ImportDocumentationPartsCommand
* @public
*/
export { __MetadataBearer, $Command };
/**
* @public
*/
export type ImportDocumentationPartsCommandInputType = Omit<ImportDocumentationPartsRequest, "body"> & {
body: BlobTypes;
};
/**
* @public
*
* The input for {@link ImportDocumentationPartsCommand}.
*/
export interface ImportDocumentationPartsCommandInput extends ImportDocumentationPartsRequest {}
export interface ImportDocumentationPartsCommandInput extends ImportDocumentationPartsCommandInputType {}
/**
* @public
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middl
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
import { Command as $Command } from "@aws-sdk/smithy-client";
import {
BlobTypes,
FinalizeHandlerArguments,
Handler,
HandlerExecutionContext,
Expand All @@ -21,12 +22,18 @@ import { de_ImportRestApiCommand, se_ImportRestApiCommand } from "../protocols/A
* @public
*/
export { __MetadataBearer, $Command };
/**
* @public
*/
export type ImportRestApiCommandInputType = Omit<ImportRestApiRequest, "body"> & {
body: BlobTypes;
};
/**
* @public
*
* The input for {@link ImportRestApiCommand}.
*/
export interface ImportRestApiCommandInput extends ImportRestApiRequest {}
export interface ImportRestApiCommandInput extends ImportRestApiCommandInputType {}
/**
* @public
*
Expand Down
Loading

0 comments on commit a948899

Please sign in to comment.