(config: T & HttpAuthSchemeInputConfig): T & HttpAuthSchemeResolvedConfig => {
+ const token = memoizeIdentityProvider(config.token, isIdentityExpired, doesIdentityRequireRefresh);
+ return {
+ ...config,
+ token,
+ } as T & HttpAuthSchemeResolvedConfig;
+};
diff --git a/src.gen/@amzn/codewhisperer-streaming/src/commands/ExportResultArchiveCommand.ts b/src.gen/@amzn/codewhisperer-streaming/src/commands/ExportResultArchiveCommand.ts
index 6ae5d746d63..8b8a5016715 100644
--- a/src.gen/@amzn/codewhisperer-streaming/src/commands/ExportResultArchiveCommand.ts
+++ b/src.gen/@amzn/codewhisperer-streaming/src/commands/ExportResultArchiveCommand.ts
@@ -14,27 +14,14 @@ import {
se_ExportResultArchiveCommand,
} from "../protocols/Aws_restJson1";
import { getSerdePlugin } from "@smithy/middleware-serde";
-import {
- HttpRequest as __HttpRequest,
- HttpResponse as __HttpResponse,
-} from "@smithy/protocol-http";
import { Command as $Command } from "@smithy/smithy-client";
-import {
- FinalizeHandlerArguments,
- Handler,
- HandlerExecutionContext,
- MiddlewareStack,
- SMITHY_CONTEXT_KEY,
- EventStreamSerdeContext as __EventStreamSerdeContext,
- HttpHandlerOptions as __HttpHandlerOptions,
- MetadataBearer as __MetadataBearer,
- SerdeContext as __SerdeContext,
-} from "@smithy/types";
+import { MetadataBearer as __MetadataBearer } from "@smithy/types";
/**
* @public
*/
-export { __MetadataBearer, $Command };
+export type { __MetadataBearer };
+export { $Command };
/**
* @public
*
@@ -49,7 +36,6 @@ export interface ExportResultArchiveCommandInput extends ExportResultArchiveRequ
export interface ExportResultArchiveCommandOutput extends ExportResultArchiveResponse, __MetadataBearer {}
/**
- * @public
* API to export operation result as an archive
* @example
* Use a bare-bones client and the command you need to make an API call.
@@ -59,11 +45,15 @@ export interface ExportResultArchiveCommandOutput extends ExportResultArchiveRes
* const client = new CodeWhispererStreamingClient(config);
* const input = { // ExportResultArchiveRequest
* exportId: "STRING_VALUE", // required
- * exportIntent: "TRANSFORMATION" || "TASK_ASSIST", // required
+ * exportIntent: "TRANSFORMATION" || "TASK_ASSIST" || "UNIT_TESTS", // required
* exportContext: { // ExportContext Union: only one key present
* transformationExportContext: { // TransformationExportContext
* downloadArtifactId: "STRING_VALUE", // required
- * downloadArtifactType: "ClientInstructions" || "Logs", // required
+ * downloadArtifactType: "ClientInstructions" || "Logs" || "GeneratedCode", // required
+ * },
+ * unitTestGenerationExportContext: { // UnitTestGenerationExportContext
+ * testGenerationJobGroupName: "STRING_VALUE", // required
+ * testGenerationJobId: "STRING_VALUE",
* },
* },
* };
@@ -78,7 +68,7 @@ export interface ExportResultArchiveCommandOutput extends ExportResultArchiveRes
* // contentChecksumType: "SHA_256",
* // },
* // binaryPayloadEvent: { // BinaryPayloadEvent
- * // bytes: "BLOB_VALUE",
+ * // bytes: new Uint8Array(),
* // },
* // internalServerException: { // InternalServerException
* // message: "STRING_VALUE", // required
@@ -115,76 +105,38 @@ export interface ExportResultArchiveCommandOutput extends ExportResultArchiveRes
* @throws {@link CodeWhispererStreamingServiceException}
* Base exception class for all service exceptions from CodeWhispererStreaming service.
*
+ * @public
*/
-export class ExportResultArchiveCommand extends $Command {
- // Start section: command_properties
- // End section: command_properties
-
- /**
- * @public
- */
- constructor(readonly input: ExportResultArchiveCommandInput) {
- // Start section: command_constructor
- super();
- // End section: command_constructor
- }
-
- /**
- * @internal
- */
- resolveMiddleware(
- clientStack: MiddlewareStack,
- configuration: CodeWhispererStreamingClientResolvedConfig,
- options?: __HttpHandlerOptions
- ): Handler {
- this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
-
- const stack = clientStack.concat(this.middlewareStack);
-
- const { logger } = configuration;
- const clientName = "CodeWhispererStreamingClient";
- const commandName = "ExportResultArchiveCommand";
- const handlerExecutionContext: HandlerExecutionContext = {
- logger,
- clientName,
- commandName,
- inputFilterSensitiveLog:
- (_: any) => _,
- outputFilterSensitiveLog:
- ExportResultArchiveResponseFilterSensitiveLog,
- [SMITHY_CONTEXT_KEY]: {
- service: "AmazonCodeWhispererStreamingService",
- operation: "ExportResultArchive",
- },
- }
- const { requestHandler } = configuration;
- return stack.resolve(
- (request: FinalizeHandlerArguments) =>
- requestHandler.handle(request.request as __HttpRequest, options || {}),
- handlerExecutionContext
- );
- }
-
- /**
- * @internal
- */
- private serialize(
- input: ExportResultArchiveCommandInput,
- context: __SerdeContext
- ): Promise<__HttpRequest> {
- return se_ExportResultArchiveCommand(input, context);
- }
+export class ExportResultArchiveCommand extends $Command.classBuilder()
+ .m(function (this: any, Command: any, cs: any, config: CodeWhispererStreamingClientResolvedConfig, o: any) {
+ return [
- /**
- * @internal
- */
- private deserialize(
- output: __HttpResponse,
- context: __SerdeContext & __EventStreamSerdeContext
- ): Promise {
- return de_ExportResultArchiveCommand(output, context);
- }
+ getSerdePlugin(config, this.serialize, this.deserialize),
+ ];
+ })
+ .s("AmazonCodeWhispererStreamingService", "ExportResultArchive", {
- // Start section: command_body_extra
- // End section: command_body_extra
+ /**
+ * @internal
+ */
+ eventStream: {
+ output: true,
+ },
+ })
+ .n("CodeWhispererStreamingClient", "ExportResultArchiveCommand")
+ .f(void 0, ExportResultArchiveResponseFilterSensitiveLog)
+ .ser(se_ExportResultArchiveCommand)
+ .de(de_ExportResultArchiveCommand)
+.build() {
+/** @internal type navigation helper, not in runtime. */
+declare protected static __types: {
+ api: {
+ input: ExportResultArchiveRequest;
+ output: ExportResultArchiveResponse;
+ };
+ sdk: {
+ input: ExportResultArchiveCommandInput;
+ output: ExportResultArchiveCommandOutput;
+ };
+};
}
diff --git a/src.gen/@amzn/codewhisperer-streaming/src/commands/GenerateAssistantResponseCommand.ts b/src.gen/@amzn/codewhisperer-streaming/src/commands/GenerateAssistantResponseCommand.ts
index 87e0f6fa51f..a2a90084c08 100644
--- a/src.gen/@amzn/codewhisperer-streaming/src/commands/GenerateAssistantResponseCommand.ts
+++ b/src.gen/@amzn/codewhisperer-streaming/src/commands/GenerateAssistantResponseCommand.ts
@@ -15,27 +15,14 @@ import {
se_GenerateAssistantResponseCommand,
} from "../protocols/Aws_restJson1";
import { getSerdePlugin } from "@smithy/middleware-serde";
-import {
- HttpRequest as __HttpRequest,
- HttpResponse as __HttpResponse,
-} from "@smithy/protocol-http";
import { Command as $Command } from "@smithy/smithy-client";
-import {
- FinalizeHandlerArguments,
- Handler,
- HandlerExecutionContext,
- MiddlewareStack,
- SMITHY_CONTEXT_KEY,
- EventStreamSerdeContext as __EventStreamSerdeContext,
- HttpHandlerOptions as __HttpHandlerOptions,
- MetadataBearer as __MetadataBearer,
- SerdeContext as __SerdeContext,
-} from "@smithy/types";
+import { MetadataBearer as __MetadataBearer } from "@smithy/types";
/**
* @public
*/
-export { __MetadataBearer, $Command };
+export type { __MetadataBearer };
+export { $Command };
/**
* @public
*
@@ -50,7 +37,6 @@ export interface GenerateAssistantResponseCommandInput extends GenerateAssistant
export interface GenerateAssistantResponseCommandOutput extends GenerateAssistantResponseResponse, __MetadataBearer {}
/**
- * @public
* API to generate assistant response.
* @example
* Use a bare-bones client and the command you need to make an API call.
@@ -139,6 +125,7 @@ export interface GenerateAssistantResponseCommandOutput extends GenerateAssistan
* value: "STRING_VALUE",
* },
* ],
+ * timezoneOffset: Number("int"),
* },
* appStudioContext: { // AppStudioState
* namespace: "STRING_VALUE", // required
@@ -184,12 +171,17 @@ export interface GenerateAssistantResponseCommandOutput extends GenerateAssistan
* },
* consoleState: { // ConsoleState
* region: "STRING_VALUE",
+ * consoleUrl: "STRING_VALUE",
+ * serviceId: "STRING_VALUE",
+ * serviceConsolePage: "STRING_VALUE",
+ * serviceSubconsolePage: "STRING_VALUE",
+ * taskName: "STRING_VALUE",
* },
* userSettings: { // UserSettings
* hasConsentedToCrossRegionCalls: true || false,
* },
* },
- * userIntent: "SUGGEST_ALTERNATE_IMPLEMENTATION" || "APPLY_COMMON_BEST_PRACTICES" || "IMPROVE_CODE" || "SHOW_EXAMPLES" || "CITE_SOURCES" || "EXPLAIN_LINE_BY_LINE" || "EXPLAIN_CODE_SELECTION" || "GENERATE_CLOUDFORMATION_TEMPLATE" || "GENERATE_UNIT_TESTS",
+ * userIntent: "SUGGEST_ALTERNATE_IMPLEMENTATION" || "APPLY_COMMON_BEST_PRACTICES" || "IMPROVE_CODE" || "SHOW_EXAMPLES" || "CITE_SOURCES" || "EXPLAIN_LINE_BY_LINE" || "EXPLAIN_CODE_SELECTION" || "GENERATE_CLOUDFORMATION_TEMPLATE" || "GENERATE_UNIT_TESTS" || "CODE_GENERATION",
* },
* assistantResponseMessage: { // AssistantResponseMessage
* messageId: "STRING_VALUE",
@@ -214,7 +206,7 @@ export interface GenerateAssistantResponseCommandOutput extends GenerateAssistan
* ],
* followupPrompt: { // FollowupPrompt
* content: "STRING_VALUE", // required
- * userIntent: "SUGGEST_ALTERNATE_IMPLEMENTATION" || "APPLY_COMMON_BEST_PRACTICES" || "IMPROVE_CODE" || "SHOW_EXAMPLES" || "CITE_SOURCES" || "EXPLAIN_LINE_BY_LINE" || "EXPLAIN_CODE_SELECTION" || "GENERATE_CLOUDFORMATION_TEMPLATE" || "GENERATE_UNIT_TESTS",
+ * userIntent: "SUGGEST_ALTERNATE_IMPLEMENTATION" || "APPLY_COMMON_BEST_PRACTICES" || "IMPROVE_CODE" || "SHOW_EXAMPLES" || "CITE_SOURCES" || "EXPLAIN_LINE_BY_LINE" || "EXPLAIN_CODE_SELECTION" || "GENERATE_CLOUDFORMATION_TEMPLATE" || "GENERATE_UNIT_TESTS" || "CODE_GENERATION",
* },
* },
* },
@@ -274,6 +266,7 @@ export interface GenerateAssistantResponseCommandOutput extends GenerateAssistan
* value: "STRING_VALUE",
* },
* ],
+ * timezoneOffset: Number("int"),
* },
* appStudioContext: {
* namespace: "STRING_VALUE", // required
@@ -300,12 +293,17 @@ export interface GenerateAssistantResponseCommandOutput extends GenerateAssistan
* },
* consoleState: {
* region: "STRING_VALUE",
+ * consoleUrl: "STRING_VALUE",
+ * serviceId: "STRING_VALUE",
+ * serviceConsolePage: "STRING_VALUE",
+ * serviceSubconsolePage: "STRING_VALUE",
+ * taskName: "STRING_VALUE",
* },
* userSettings: {
* hasConsentedToCrossRegionCalls: true || false,
* },
* },
- * userIntent: "SUGGEST_ALTERNATE_IMPLEMENTATION" || "APPLY_COMMON_BEST_PRACTICES" || "IMPROVE_CODE" || "SHOW_EXAMPLES" || "CITE_SOURCES" || "EXPLAIN_LINE_BY_LINE" || "EXPLAIN_CODE_SELECTION" || "GENERATE_CLOUDFORMATION_TEMPLATE" || "GENERATE_UNIT_TESTS",
+ * userIntent: "SUGGEST_ALTERNATE_IMPLEMENTATION" || "APPLY_COMMON_BEST_PRACTICES" || "IMPROVE_CODE" || "SHOW_EXAMPLES" || "CITE_SOURCES" || "EXPLAIN_LINE_BY_LINE" || "EXPLAIN_CODE_SELECTION" || "GENERATE_CLOUDFORMATION_TEMPLATE" || "GENERATE_UNIT_TESTS" || "CODE_GENERATION",
* },
* assistantResponseMessage: {
* messageId: "STRING_VALUE",
@@ -330,11 +328,11 @@ export interface GenerateAssistantResponseCommandOutput extends GenerateAssistan
* ],
* followupPrompt: {
* content: "STRING_VALUE", // required
- * userIntent: "SUGGEST_ALTERNATE_IMPLEMENTATION" || "APPLY_COMMON_BEST_PRACTICES" || "IMPROVE_CODE" || "SHOW_EXAMPLES" || "CITE_SOURCES" || "EXPLAIN_LINE_BY_LINE" || "EXPLAIN_CODE_SELECTION" || "GENERATE_CLOUDFORMATION_TEMPLATE" || "GENERATE_UNIT_TESTS",
+ * userIntent: "SUGGEST_ALTERNATE_IMPLEMENTATION" || "APPLY_COMMON_BEST_PRACTICES" || "IMPROVE_CODE" || "SHOW_EXAMPLES" || "CITE_SOURCES" || "EXPLAIN_LINE_BY_LINE" || "EXPLAIN_CODE_SELECTION" || "GENERATE_CLOUDFORMATION_TEMPLATE" || "GENERATE_UNIT_TESTS" || "CODE_GENERATION",
* },
* },
* },
- * chatTriggerType: "MANUAL" || "DIAGNOSTIC", // required
+ * chatTriggerType: "MANUAL" || "DIAGNOSTIC" || "INLINE_CHAT", // required
* customizationArn: "STRING_VALUE",
* },
* profileArn: "STRING_VALUE",
@@ -346,10 +344,12 @@ export interface GenerateAssistantResponseCommandOutput extends GenerateAssistan
* // generateAssistantResponseResponse: { // ChatResponseStream Union: only one key present
* // messageMetadataEvent: { // MessageMetadataEvent
* // conversationId: "STRING_VALUE",
+ * // utteranceId: "STRING_VALUE",
* // },
* // assistantResponseEvent: { // AssistantResponseEvent
* // content: "STRING_VALUE", // required
* // },
+ * // dryRunSucceedEvent: {},
* // codeReferenceEvent: { // CodeReferenceEvent
* // references: [ // References
* // { // Reference
@@ -375,7 +375,7 @@ export interface GenerateAssistantResponseCommandOutput extends GenerateAssistan
* // followupPromptEvent: { // FollowupPromptEvent
* // followupPrompt: { // FollowupPrompt
* // content: "STRING_VALUE", // required
- * // userIntent: "SUGGEST_ALTERNATE_IMPLEMENTATION" || "APPLY_COMMON_BEST_PRACTICES" || "IMPROVE_CODE" || "SHOW_EXAMPLES" || "CITE_SOURCES" || "EXPLAIN_LINE_BY_LINE" || "EXPLAIN_CODE_SELECTION" || "GENERATE_CLOUDFORMATION_TEMPLATE" || "GENERATE_UNIT_TESTS",
+ * // userIntent: "SUGGEST_ALTERNATE_IMPLEMENTATION" || "APPLY_COMMON_BEST_PRACTICES" || "IMPROVE_CODE" || "SHOW_EXAMPLES" || "CITE_SOURCES" || "EXPLAIN_LINE_BY_LINE" || "EXPLAIN_CODE_SELECTION" || "GENERATE_CLOUDFORMATION_TEMPLATE" || "GENERATE_UNIT_TESTS" || "CODE_GENERATION",
* // },
* // },
* // codeEvent: { // CodeEvent
@@ -390,6 +390,201 @@ export interface GenerateAssistantResponseCommandOutput extends GenerateAssistan
* // },
* // },
* // },
+ * // interactionComponentsEvent: { // InteractionComponentsEvent
+ * // interactionComponentEntries: [ // InteractionComponentEntryList // required
+ * // { // InteractionComponentEntry
+ * // interactionComponentId: "STRING_VALUE",
+ * // interactionComponent: { // InteractionComponent
+ * // text: { // Text
+ * // content: "STRING_VALUE", // required
+ * // },
+ * // alert: { // Alert
+ * // type: "INFO" || "ERROR" || "WARNING", // required
+ * // content: [ // AlertComponentList // required
+ * // { // AlertComponent
+ * // text: {
+ * // content: "STRING_VALUE", // required
+ * // },
+ * // },
+ * // ],
+ * // },
+ * // infrastructureUpdate: { // InfrastructureUpdate
+ * // transition: { // InfrastructureUpdateTransition
+ * // currentState: "STRING_VALUE", // required
+ * // nextState: "STRING_VALUE", // required
+ * // },
+ * // },
+ * // progress: { // Progress
+ * // content: [ // ProgressComponentList // required
+ * // { // ProgressComponent
+ * // step: { // Step
+ * // id: Number("int"), // required
+ * // state: "FAILED" || "SUCCEEDED" || "STOPPED" || "PENDING" || "IN_PROGRESS" || "LOADING" || "PAUSED", // required
+ * // label: "STRING_VALUE", // required
+ * // content: [ // StepComponentList
+ * // { // StepComponent
+ * // text: "",
+ * // },
+ * // ],
+ * // },
+ * // },
+ * // ],
+ * // },
+ * // step: {
+ * // id: Number("int"), // required
+ * // state: "FAILED" || "SUCCEEDED" || "STOPPED" || "PENDING" || "IN_PROGRESS" || "LOADING" || "PAUSED", // required
+ * // label: "STRING_VALUE", // required
+ * // content: [
+ * // {
+ * // text: "",
+ * // },
+ * // ],
+ * // },
+ * // taskDetails: { // TaskDetails
+ * // overview: { // TaskOverview
+ * // label: "STRING_VALUE", // required
+ * // description: "STRING_VALUE", // required
+ * // },
+ * // content: [ // TaskComponentList // required
+ * // { // TaskComponent
+ * // text: "",
+ * // infrastructureUpdate: {
+ * // transition: {
+ * // currentState: "STRING_VALUE", // required
+ * // nextState: "STRING_VALUE", // required
+ * // },
+ * // },
+ * // alert: {
+ * // type: "INFO" || "ERROR" || "WARNING", // required
+ * // content: [ // required
+ * // {
+ * // text: "",
+ * // },
+ * // ],
+ * // },
+ * // progress: {
+ * // content: [ // required
+ * // {
+ * // step: "",
+ * // },
+ * // ],
+ * // },
+ * // },
+ * // ],
+ * // actions: [ // TaskActionList
+ * // { // TaskAction
+ * // label: "STRING_VALUE", // required
+ * // note: { // TaskActionNote
+ * // content: "STRING_VALUE", // required
+ * // type: "INFO" || "WARNING",
+ * // },
+ * // primary: true || false,
+ * // disabled: true || false,
+ * // payload: { // TaskActionPayload // required
+ * // "": "STRING_VALUE",
+ * // },
+ * // confirmation: { // TaskActionConfirmation
+ * // content: "STRING_VALUE",
+ * // },
+ * // },
+ * // ],
+ * // },
+ * // taskReference: { // TaskReference
+ * // taskId: "STRING_VALUE", // required
+ * // },
+ * // suggestions: { // Suggestions
+ * // items: [ // SuggestionList // required
+ * // { // Suggestion
+ * // value: "STRING_VALUE", // required
+ * // },
+ * // ],
+ * // },
+ * // section: { // Section
+ * // title: "STRING_VALUE", // required
+ * // content: [ // SectionComponentList // required
+ * // { // SectionComponent
+ * // text: "",
+ * // alert: {
+ * // type: "INFO" || "ERROR" || "WARNING", // required
+ * // content: [ // required
+ * // {
+ * // text: "",
+ * // },
+ * // ],
+ * // },
+ * // resource: { // Resource
+ * // title: "STRING_VALUE", // required
+ * // link: "STRING_VALUE", // required
+ * // description: "STRING_VALUE", // required
+ * // type: "STRING_VALUE", // required
+ * // ARN: "STRING_VALUE", // required
+ * // resourceJsonString: "STRING_VALUE", // required
+ * // },
+ * // resourceList: { // ResourceList
+ * // action: { // Action
+ * // webLink: { // WebLink
+ * // label: "STRING_VALUE", // required
+ * // url: "STRING_VALUE", // required
+ * // },
+ * // moduleLink: { // ModuleLink
+ * // cloudWatchTroubleshootingLink: { // CloudWatchTroubleshootingLink
+ * // label: "STRING_VALUE", // required
+ * // investigationPayload: "STRING_VALUE", // required
+ * // defaultText: "STRING_VALUE",
+ * // },
+ * // },
+ * // },
+ * // items: [ // Resources // required
+ * // {
+ * // title: "STRING_VALUE", // required
+ * // link: "STRING_VALUE", // required
+ * // description: "STRING_VALUE", // required
+ * // type: "STRING_VALUE", // required
+ * // ARN: "STRING_VALUE", // required
+ * // resourceJsonString: "STRING_VALUE", // required
+ * // },
+ * // ],
+ * // },
+ * // },
+ * // ],
+ * // action: {
+ * // webLink: {
+ * // label: "STRING_VALUE", // required
+ * // url: "STRING_VALUE", // required
+ * // },
+ * // moduleLink: {
+ * // cloudWatchTroubleshootingLink: {
+ * // label: "STRING_VALUE", // required
+ * // investigationPayload: "STRING_VALUE", // required
+ * // defaultText: "STRING_VALUE",
+ * // },
+ * // },
+ * // },
+ * // },
+ * // resource: "",
+ * // resourceList: {
+ * // action: {
+ * // webLink: {
+ * // label: "STRING_VALUE", // required
+ * // url: "STRING_VALUE", // required
+ * // },
+ * // moduleLink: {
+ * // cloudWatchTroubleshootingLink: {
+ * // label: "STRING_VALUE", // required
+ * // investigationPayload: "STRING_VALUE", // required
+ * // defaultText: "STRING_VALUE",
+ * // },
+ * // },
+ * // },
+ * // items: [ // required
+ * // "",
+ * // ],
+ * // },
+ * // action: "",
+ * // },
+ * // },
+ * // ],
+ * // },
* // invalidStateEvent: { // InvalidStateEvent
* // reason: "INVALID_TASK_ASSIST_PLAN", // required
* // message: "STRING_VALUE", // required
@@ -423,76 +618,38 @@ export interface GenerateAssistantResponseCommandOutput extends GenerateAssistan
* @throws {@link CodeWhispererStreamingServiceException}
* Base exception class for all service exceptions from CodeWhispererStreaming service.
*
+ * @public
*/
-export class GenerateAssistantResponseCommand extends $Command {
- // Start section: command_properties
- // End section: command_properties
-
- /**
- * @public
- */
- constructor(readonly input: GenerateAssistantResponseCommandInput) {
- // Start section: command_constructor
- super();
- // End section: command_constructor
- }
-
- /**
- * @internal
- */
- resolveMiddleware(
- clientStack: MiddlewareStack,
- configuration: CodeWhispererStreamingClientResolvedConfig,
- options?: __HttpHandlerOptions
- ): Handler {
- this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
-
- const stack = clientStack.concat(this.middlewareStack);
-
- const { logger } = configuration;
- const clientName = "CodeWhispererStreamingClient";
- const commandName = "GenerateAssistantResponseCommand";
- const handlerExecutionContext: HandlerExecutionContext = {
- logger,
- clientName,
- commandName,
- inputFilterSensitiveLog:
- GenerateAssistantResponseRequestFilterSensitiveLog,
- outputFilterSensitiveLog:
- GenerateAssistantResponseResponseFilterSensitiveLog,
- [SMITHY_CONTEXT_KEY]: {
- service: "AmazonCodeWhispererStreamingService",
- operation: "GenerateAssistantResponse",
- },
- }
- const { requestHandler } = configuration;
- return stack.resolve(
- (request: FinalizeHandlerArguments) =>
- requestHandler.handle(request.request as __HttpRequest, options || {}),
- handlerExecutionContext
- );
- }
-
- /**
- * @internal
- */
- private serialize(
- input: GenerateAssistantResponseCommandInput,
- context: __SerdeContext
- ): Promise<__HttpRequest> {
- return se_GenerateAssistantResponseCommand(input, context);
- }
+export class GenerateAssistantResponseCommand extends $Command.classBuilder()
+ .m(function (this: any, Command: any, cs: any, config: CodeWhispererStreamingClientResolvedConfig, o: any) {
+ return [
- /**
- * @internal
- */
- private deserialize(
- output: __HttpResponse,
- context: __SerdeContext & __EventStreamSerdeContext
- ): Promise {
- return de_GenerateAssistantResponseCommand(output, context);
- }
+ getSerdePlugin(config, this.serialize, this.deserialize),
+ ];
+ })
+ .s("AmazonCodeWhispererStreamingService", "GenerateAssistantResponse", {
- // Start section: command_body_extra
- // End section: command_body_extra
+ /**
+ * @internal
+ */
+ eventStream: {
+ output: true,
+ },
+ })
+ .n("CodeWhispererStreamingClient", "GenerateAssistantResponseCommand")
+ .f(GenerateAssistantResponseRequestFilterSensitiveLog, GenerateAssistantResponseResponseFilterSensitiveLog)
+ .ser(se_GenerateAssistantResponseCommand)
+ .de(de_GenerateAssistantResponseCommand)
+.build() {
+/** @internal type navigation helper, not in runtime. */
+declare protected static __types: {
+ api: {
+ input: GenerateAssistantResponseRequest;
+ output: GenerateAssistantResponseResponse;
+ };
+ sdk: {
+ input: GenerateAssistantResponseCommandInput;
+ output: GenerateAssistantResponseCommandOutput;
+ };
+};
}
diff --git a/src.gen/@amzn/codewhisperer-streaming/src/commands/GenerateTaskAssistPlanCommand.ts b/src.gen/@amzn/codewhisperer-streaming/src/commands/GenerateTaskAssistPlanCommand.ts
index 22a591f22d8..7935035aeea 100644
--- a/src.gen/@amzn/codewhisperer-streaming/src/commands/GenerateTaskAssistPlanCommand.ts
+++ b/src.gen/@amzn/codewhisperer-streaming/src/commands/GenerateTaskAssistPlanCommand.ts
@@ -15,27 +15,14 @@ import {
se_GenerateTaskAssistPlanCommand,
} from "../protocols/Aws_restJson1";
import { getSerdePlugin } from "@smithy/middleware-serde";
-import {
- HttpRequest as __HttpRequest,
- HttpResponse as __HttpResponse,
-} from "@smithy/protocol-http";
import { Command as $Command } from "@smithy/smithy-client";
-import {
- FinalizeHandlerArguments,
- Handler,
- HandlerExecutionContext,
- MiddlewareStack,
- SMITHY_CONTEXT_KEY,
- EventStreamSerdeContext as __EventStreamSerdeContext,
- HttpHandlerOptions as __HttpHandlerOptions,
- MetadataBearer as __MetadataBearer,
- SerdeContext as __SerdeContext,
-} from "@smithy/types";
+import { MetadataBearer as __MetadataBearer } from "@smithy/types";
/**
* @public
*/
-export { __MetadataBearer, $Command };
+export type { __MetadataBearer };
+export { $Command };
/**
* @public
*
@@ -50,8 +37,7 @@ export interface GenerateTaskAssistPlanCommandInput extends GenerateTaskAssistPl
export interface GenerateTaskAssistPlanCommandOutput extends GenerateTaskAssistPlanResponse, __MetadataBearer {}
/**
- * @public
- * API to generate task assit plan.
+ * API to generate task assist plan.
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
@@ -139,6 +125,7 @@ export interface GenerateTaskAssistPlanCommandOutput extends GenerateTaskAssistP
* value: "STRING_VALUE",
* },
* ],
+ * timezoneOffset: Number("int"),
* },
* appStudioContext: { // AppStudioState
* namespace: "STRING_VALUE", // required
@@ -184,12 +171,17 @@ export interface GenerateTaskAssistPlanCommandOutput extends GenerateTaskAssistP
* },
* consoleState: { // ConsoleState
* region: "STRING_VALUE",
+ * consoleUrl: "STRING_VALUE",
+ * serviceId: "STRING_VALUE",
+ * serviceConsolePage: "STRING_VALUE",
+ * serviceSubconsolePage: "STRING_VALUE",
+ * taskName: "STRING_VALUE",
* },
* userSettings: { // UserSettings
* hasConsentedToCrossRegionCalls: true || false,
* },
* },
- * userIntent: "SUGGEST_ALTERNATE_IMPLEMENTATION" || "APPLY_COMMON_BEST_PRACTICES" || "IMPROVE_CODE" || "SHOW_EXAMPLES" || "CITE_SOURCES" || "EXPLAIN_LINE_BY_LINE" || "EXPLAIN_CODE_SELECTION" || "GENERATE_CLOUDFORMATION_TEMPLATE" || "GENERATE_UNIT_TESTS",
+ * userIntent: "SUGGEST_ALTERNATE_IMPLEMENTATION" || "APPLY_COMMON_BEST_PRACTICES" || "IMPROVE_CODE" || "SHOW_EXAMPLES" || "CITE_SOURCES" || "EXPLAIN_LINE_BY_LINE" || "EXPLAIN_CODE_SELECTION" || "GENERATE_CLOUDFORMATION_TEMPLATE" || "GENERATE_UNIT_TESTS" || "CODE_GENERATION",
* },
* assistantResponseMessage: { // AssistantResponseMessage
* messageId: "STRING_VALUE",
@@ -214,7 +206,7 @@ export interface GenerateTaskAssistPlanCommandOutput extends GenerateTaskAssistP
* ],
* followupPrompt: { // FollowupPrompt
* content: "STRING_VALUE", // required
- * userIntent: "SUGGEST_ALTERNATE_IMPLEMENTATION" || "APPLY_COMMON_BEST_PRACTICES" || "IMPROVE_CODE" || "SHOW_EXAMPLES" || "CITE_SOURCES" || "EXPLAIN_LINE_BY_LINE" || "EXPLAIN_CODE_SELECTION" || "GENERATE_CLOUDFORMATION_TEMPLATE" || "GENERATE_UNIT_TESTS",
+ * userIntent: "SUGGEST_ALTERNATE_IMPLEMENTATION" || "APPLY_COMMON_BEST_PRACTICES" || "IMPROVE_CODE" || "SHOW_EXAMPLES" || "CITE_SOURCES" || "EXPLAIN_LINE_BY_LINE" || "EXPLAIN_CODE_SELECTION" || "GENERATE_CLOUDFORMATION_TEMPLATE" || "GENERATE_UNIT_TESTS" || "CODE_GENERATION",
* },
* },
* },
@@ -274,6 +266,7 @@ export interface GenerateTaskAssistPlanCommandOutput extends GenerateTaskAssistP
* value: "STRING_VALUE",
* },
* ],
+ * timezoneOffset: Number("int"),
* },
* appStudioContext: {
* namespace: "STRING_VALUE", // required
@@ -300,12 +293,17 @@ export interface GenerateTaskAssistPlanCommandOutput extends GenerateTaskAssistP
* },
* consoleState: {
* region: "STRING_VALUE",
+ * consoleUrl: "STRING_VALUE",
+ * serviceId: "STRING_VALUE",
+ * serviceConsolePage: "STRING_VALUE",
+ * serviceSubconsolePage: "STRING_VALUE",
+ * taskName: "STRING_VALUE",
* },
* userSettings: {
* hasConsentedToCrossRegionCalls: true || false,
* },
* },
- * userIntent: "SUGGEST_ALTERNATE_IMPLEMENTATION" || "APPLY_COMMON_BEST_PRACTICES" || "IMPROVE_CODE" || "SHOW_EXAMPLES" || "CITE_SOURCES" || "EXPLAIN_LINE_BY_LINE" || "EXPLAIN_CODE_SELECTION" || "GENERATE_CLOUDFORMATION_TEMPLATE" || "GENERATE_UNIT_TESTS",
+ * userIntent: "SUGGEST_ALTERNATE_IMPLEMENTATION" || "APPLY_COMMON_BEST_PRACTICES" || "IMPROVE_CODE" || "SHOW_EXAMPLES" || "CITE_SOURCES" || "EXPLAIN_LINE_BY_LINE" || "EXPLAIN_CODE_SELECTION" || "GENERATE_CLOUDFORMATION_TEMPLATE" || "GENERATE_UNIT_TESTS" || "CODE_GENERATION",
* },
* assistantResponseMessage: {
* messageId: "STRING_VALUE",
@@ -330,11 +328,11 @@ export interface GenerateTaskAssistPlanCommandOutput extends GenerateTaskAssistP
* ],
* followupPrompt: {
* content: "STRING_VALUE", // required
- * userIntent: "SUGGEST_ALTERNATE_IMPLEMENTATION" || "APPLY_COMMON_BEST_PRACTICES" || "IMPROVE_CODE" || "SHOW_EXAMPLES" || "CITE_SOURCES" || "EXPLAIN_LINE_BY_LINE" || "EXPLAIN_CODE_SELECTION" || "GENERATE_CLOUDFORMATION_TEMPLATE" || "GENERATE_UNIT_TESTS",
+ * userIntent: "SUGGEST_ALTERNATE_IMPLEMENTATION" || "APPLY_COMMON_BEST_PRACTICES" || "IMPROVE_CODE" || "SHOW_EXAMPLES" || "CITE_SOURCES" || "EXPLAIN_LINE_BY_LINE" || "EXPLAIN_CODE_SELECTION" || "GENERATE_CLOUDFORMATION_TEMPLATE" || "GENERATE_UNIT_TESTS" || "CODE_GENERATION",
* },
* },
* },
- * chatTriggerType: "MANUAL" || "DIAGNOSTIC", // required
+ * chatTriggerType: "MANUAL" || "DIAGNOSTIC" || "INLINE_CHAT", // required
* customizationArn: "STRING_VALUE",
* },
* workspaceState: { // WorkspaceState
@@ -349,10 +347,12 @@ export interface GenerateTaskAssistPlanCommandOutput extends GenerateTaskAssistP
* // planningResponseStream: { // ChatResponseStream Union: only one key present
* // messageMetadataEvent: { // MessageMetadataEvent
* // conversationId: "STRING_VALUE",
+ * // utteranceId: "STRING_VALUE",
* // },
* // assistantResponseEvent: { // AssistantResponseEvent
* // content: "STRING_VALUE", // required
* // },
+ * // dryRunSucceedEvent: {},
* // codeReferenceEvent: { // CodeReferenceEvent
* // references: [ // References
* // { // Reference
@@ -378,7 +378,7 @@ export interface GenerateTaskAssistPlanCommandOutput extends GenerateTaskAssistP
* // followupPromptEvent: { // FollowupPromptEvent
* // followupPrompt: { // FollowupPrompt
* // content: "STRING_VALUE", // required
- * // userIntent: "SUGGEST_ALTERNATE_IMPLEMENTATION" || "APPLY_COMMON_BEST_PRACTICES" || "IMPROVE_CODE" || "SHOW_EXAMPLES" || "CITE_SOURCES" || "EXPLAIN_LINE_BY_LINE" || "EXPLAIN_CODE_SELECTION" || "GENERATE_CLOUDFORMATION_TEMPLATE" || "GENERATE_UNIT_TESTS",
+ * // userIntent: "SUGGEST_ALTERNATE_IMPLEMENTATION" || "APPLY_COMMON_BEST_PRACTICES" || "IMPROVE_CODE" || "SHOW_EXAMPLES" || "CITE_SOURCES" || "EXPLAIN_LINE_BY_LINE" || "EXPLAIN_CODE_SELECTION" || "GENERATE_CLOUDFORMATION_TEMPLATE" || "GENERATE_UNIT_TESTS" || "CODE_GENERATION",
* // },
* // },
* // codeEvent: { // CodeEvent
@@ -393,6 +393,201 @@ export interface GenerateTaskAssistPlanCommandOutput extends GenerateTaskAssistP
* // },
* // },
* // },
+ * // interactionComponentsEvent: { // InteractionComponentsEvent
+ * // interactionComponentEntries: [ // InteractionComponentEntryList // required
+ * // { // InteractionComponentEntry
+ * // interactionComponentId: "STRING_VALUE",
+ * // interactionComponent: { // InteractionComponent
+ * // text: { // Text
+ * // content: "STRING_VALUE", // required
+ * // },
+ * // alert: { // Alert
+ * // type: "INFO" || "ERROR" || "WARNING", // required
+ * // content: [ // AlertComponentList // required
+ * // { // AlertComponent
+ * // text: {
+ * // content: "STRING_VALUE", // required
+ * // },
+ * // },
+ * // ],
+ * // },
+ * // infrastructureUpdate: { // InfrastructureUpdate
+ * // transition: { // InfrastructureUpdateTransition
+ * // currentState: "STRING_VALUE", // required
+ * // nextState: "STRING_VALUE", // required
+ * // },
+ * // },
+ * // progress: { // Progress
+ * // content: [ // ProgressComponentList // required
+ * // { // ProgressComponent
+ * // step: { // Step
+ * // id: Number("int"), // required
+ * // state: "FAILED" || "SUCCEEDED" || "STOPPED" || "PENDING" || "IN_PROGRESS" || "LOADING" || "PAUSED", // required
+ * // label: "STRING_VALUE", // required
+ * // content: [ // StepComponentList
+ * // { // StepComponent
+ * // text: "",
+ * // },
+ * // ],
+ * // },
+ * // },
+ * // ],
+ * // },
+ * // step: {
+ * // id: Number("int"), // required
+ * // state: "FAILED" || "SUCCEEDED" || "STOPPED" || "PENDING" || "IN_PROGRESS" || "LOADING" || "PAUSED", // required
+ * // label: "STRING_VALUE", // required
+ * // content: [
+ * // {
+ * // text: "",
+ * // },
+ * // ],
+ * // },
+ * // taskDetails: { // TaskDetails
+ * // overview: { // TaskOverview
+ * // label: "STRING_VALUE", // required
+ * // description: "STRING_VALUE", // required
+ * // },
+ * // content: [ // TaskComponentList // required
+ * // { // TaskComponent
+ * // text: "",
+ * // infrastructureUpdate: {
+ * // transition: {
+ * // currentState: "STRING_VALUE", // required
+ * // nextState: "STRING_VALUE", // required
+ * // },
+ * // },
+ * // alert: {
+ * // type: "INFO" || "ERROR" || "WARNING", // required
+ * // content: [ // required
+ * // {
+ * // text: "",
+ * // },
+ * // ],
+ * // },
+ * // progress: {
+ * // content: [ // required
+ * // {
+ * // step: "",
+ * // },
+ * // ],
+ * // },
+ * // },
+ * // ],
+ * // actions: [ // TaskActionList
+ * // { // TaskAction
+ * // label: "STRING_VALUE", // required
+ * // note: { // TaskActionNote
+ * // content: "STRING_VALUE", // required
+ * // type: "INFO" || "WARNING",
+ * // },
+ * // primary: true || false,
+ * // disabled: true || false,
+ * // payload: { // TaskActionPayload // required
+ * // "": "STRING_VALUE",
+ * // },
+ * // confirmation: { // TaskActionConfirmation
+ * // content: "STRING_VALUE",
+ * // },
+ * // },
+ * // ],
+ * // },
+ * // taskReference: { // TaskReference
+ * // taskId: "STRING_VALUE", // required
+ * // },
+ * // suggestions: { // Suggestions
+ * // items: [ // SuggestionList // required
+ * // { // Suggestion
+ * // value: "STRING_VALUE", // required
+ * // },
+ * // ],
+ * // },
+ * // section: { // Section
+ * // title: "STRING_VALUE", // required
+ * // content: [ // SectionComponentList // required
+ * // { // SectionComponent
+ * // text: "",
+ * // alert: {
+ * // type: "INFO" || "ERROR" || "WARNING", // required
+ * // content: [ // required
+ * // {
+ * // text: "",
+ * // },
+ * // ],
+ * // },
+ * // resource: { // Resource
+ * // title: "STRING_VALUE", // required
+ * // link: "STRING_VALUE", // required
+ * // description: "STRING_VALUE", // required
+ * // type: "STRING_VALUE", // required
+ * // ARN: "STRING_VALUE", // required
+ * // resourceJsonString: "STRING_VALUE", // required
+ * // },
+ * // resourceList: { // ResourceList
+ * // action: { // Action
+ * // webLink: { // WebLink
+ * // label: "STRING_VALUE", // required
+ * // url: "STRING_VALUE", // required
+ * // },
+ * // moduleLink: { // ModuleLink
+ * // cloudWatchTroubleshootingLink: { // CloudWatchTroubleshootingLink
+ * // label: "STRING_VALUE", // required
+ * // investigationPayload: "STRING_VALUE", // required
+ * // defaultText: "STRING_VALUE",
+ * // },
+ * // },
+ * // },
+ * // items: [ // Resources // required
+ * // {
+ * // title: "STRING_VALUE", // required
+ * // link: "STRING_VALUE", // required
+ * // description: "STRING_VALUE", // required
+ * // type: "STRING_VALUE", // required
+ * // ARN: "STRING_VALUE", // required
+ * // resourceJsonString: "STRING_VALUE", // required
+ * // },
+ * // ],
+ * // },
+ * // },
+ * // ],
+ * // action: {
+ * // webLink: {
+ * // label: "STRING_VALUE", // required
+ * // url: "STRING_VALUE", // required
+ * // },
+ * // moduleLink: {
+ * // cloudWatchTroubleshootingLink: {
+ * // label: "STRING_VALUE", // required
+ * // investigationPayload: "STRING_VALUE", // required
+ * // defaultText: "STRING_VALUE",
+ * // },
+ * // },
+ * // },
+ * // },
+ * // resource: "",
+ * // resourceList: {
+ * // action: {
+ * // webLink: {
+ * // label: "STRING_VALUE", // required
+ * // url: "STRING_VALUE", // required
+ * // },
+ * // moduleLink: {
+ * // cloudWatchTroubleshootingLink: {
+ * // label: "STRING_VALUE", // required
+ * // investigationPayload: "STRING_VALUE", // required
+ * // defaultText: "STRING_VALUE",
+ * // },
+ * // },
+ * // },
+ * // items: [ // required
+ * // "",
+ * // ],
+ * // },
+ * // action: "",
+ * // },
+ * // },
+ * // ],
+ * // },
* // invalidStateEvent: { // InvalidStateEvent
* // reason: "INVALID_TASK_ASSIST_PLAN", // required
* // message: "STRING_VALUE", // required
@@ -435,76 +630,38 @@ export interface GenerateTaskAssistPlanCommandOutput extends GenerateTaskAssistP
* @throws {@link CodeWhispererStreamingServiceException}
* Base exception class for all service exceptions from CodeWhispererStreaming service.
*
+ * @public
*/
-export class GenerateTaskAssistPlanCommand extends $Command {
- // Start section: command_properties
- // End section: command_properties
-
- /**
- * @public
- */
- constructor(readonly input: GenerateTaskAssistPlanCommandInput) {
- // Start section: command_constructor
- super();
- // End section: command_constructor
- }
-
- /**
- * @internal
- */
- resolveMiddleware(
- clientStack: MiddlewareStack,
- configuration: CodeWhispererStreamingClientResolvedConfig,
- options?: __HttpHandlerOptions
- ): Handler {
- this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
-
- const stack = clientStack.concat(this.middlewareStack);
-
- const { logger } = configuration;
- const clientName = "CodeWhispererStreamingClient";
- const commandName = "GenerateTaskAssistPlanCommand";
- const handlerExecutionContext: HandlerExecutionContext = {
- logger,
- clientName,
- commandName,
- inputFilterSensitiveLog:
- GenerateTaskAssistPlanRequestFilterSensitiveLog,
- outputFilterSensitiveLog:
- GenerateTaskAssistPlanResponseFilterSensitiveLog,
- [SMITHY_CONTEXT_KEY]: {
- service: "AmazonCodeWhispererStreamingService",
- operation: "GenerateTaskAssistPlan",
- },
- }
- const { requestHandler } = configuration;
- return stack.resolve(
- (request: FinalizeHandlerArguments) =>
- requestHandler.handle(request.request as __HttpRequest, options || {}),
- handlerExecutionContext
- );
- }
-
- /**
- * @internal
- */
- private serialize(
- input: GenerateTaskAssistPlanCommandInput,
- context: __SerdeContext
- ): Promise<__HttpRequest> {
- return se_GenerateTaskAssistPlanCommand(input, context);
- }
+export class GenerateTaskAssistPlanCommand extends $Command.classBuilder()
+ .m(function (this: any, Command: any, cs: any, config: CodeWhispererStreamingClientResolvedConfig, o: any) {
+ return [
- /**
- * @internal
- */
- private deserialize(
- output: __HttpResponse,
- context: __SerdeContext & __EventStreamSerdeContext
- ): Promise {
- return de_GenerateTaskAssistPlanCommand(output, context);
- }
+ getSerdePlugin(config, this.serialize, this.deserialize),
+ ];
+ })
+ .s("AmazonCodeWhispererStreamingService", "GenerateTaskAssistPlan", {
- // Start section: command_body_extra
- // End section: command_body_extra
+ /**
+ * @internal
+ */
+ eventStream: {
+ output: true,
+ },
+ })
+ .n("CodeWhispererStreamingClient", "GenerateTaskAssistPlanCommand")
+ .f(GenerateTaskAssistPlanRequestFilterSensitiveLog, GenerateTaskAssistPlanResponseFilterSensitiveLog)
+ .ser(se_GenerateTaskAssistPlanCommand)
+ .de(de_GenerateTaskAssistPlanCommand)
+.build() {
+/** @internal type navigation helper, not in runtime. */
+declare protected static __types: {
+ api: {
+ input: GenerateTaskAssistPlanRequest;
+ output: GenerateTaskAssistPlanResponse;
+ };
+ sdk: {
+ input: GenerateTaskAssistPlanCommandInput;
+ output: GenerateTaskAssistPlanCommandOutput;
+ };
+};
}
diff --git a/src.gen/@amzn/codewhisperer-streaming/src/commands/ConverseStreamCommand.ts b/src.gen/@amzn/codewhisperer-streaming/src/commands/SendMessageCommand.ts
similarity index 56%
rename from src.gen/@amzn/codewhisperer-streaming/src/commands/ConverseStreamCommand.ts
rename to src.gen/@amzn/codewhisperer-streaming/src/commands/SendMessageCommand.ts
index d9f4bb7f580..bba9534bebb 100644
--- a/src.gen/@amzn/codewhisperer-streaming/src/commands/ConverseStreamCommand.ts
+++ b/src.gen/@amzn/codewhisperer-streaming/src/commands/SendMessageCommand.ts
@@ -5,49 +5,36 @@ import {
ServiceOutputTypes,
} from "../CodeWhispererStreamingClient";
import {
- ConverseStreamRequest,
- ConverseStreamRequestFilterSensitiveLog,
- ConverseStreamResponse,
- ConverseStreamResponseFilterSensitiveLog,
+ SendMessageRequest,
+ SendMessageRequestFilterSensitiveLog,
+ SendMessageResponse,
+ SendMessageResponseFilterSensitiveLog,
} from "../models/models_0";
import {
- de_ConverseStreamCommand,
- se_ConverseStreamCommand,
+ de_SendMessageCommand,
+ se_SendMessageCommand,
} from "../protocols/Aws_restJson1";
import { getSerdePlugin } from "@smithy/middleware-serde";
-import {
- HttpRequest as __HttpRequest,
- HttpResponse as __HttpResponse,
-} from "@smithy/protocol-http";
import { Command as $Command } from "@smithy/smithy-client";
-import {
- FinalizeHandlerArguments,
- Handler,
- HandlerExecutionContext,
- MiddlewareStack,
- SMITHY_CONTEXT_KEY,
- EventStreamSerdeContext as __EventStreamSerdeContext,
- HttpHandlerOptions as __HttpHandlerOptions,
- MetadataBearer as __MetadataBearer,
- SerdeContext as __SerdeContext,
-} from "@smithy/types";
+import { MetadataBearer as __MetadataBearer } from "@smithy/types";
/**
* @public
*/
-export { __MetadataBearer, $Command };
+export type { __MetadataBearer };
+export { $Command };
/**
* @public
*
- * The input for {@link ConverseStreamCommand}.
+ * The input for {@link SendMessageCommand}.
*/
-export interface ConverseStreamCommandInput extends ConverseStreamRequest {}
+export interface SendMessageCommandInput extends SendMessageRequest {}
/**
* @public
*
- * The output of {@link ConverseStreamCommand}.
+ * The output of {@link SendMessageCommand}.
*/
-export interface ConverseStreamCommandOutput extends ConverseStreamResponse, __MetadataBearer {}
+export interface SendMessageCommandOutput extends SendMessageResponse, __MetadataBearer {}
/**
* @public
@@ -55,10 +42,10 @@ export interface ConverseStreamCommandOutput extends ConverseStreamResponse, __M
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
- * import { CodeWhispererStreamingClient, ConverseStreamCommand } from "@amzn/codewhisperer-streaming"; // ES Modules import
- * // const { CodeWhispererStreamingClient, ConverseStreamCommand } = require("@amzn/codewhisperer-streaming"); // CommonJS import
+ * import { CodeWhispererStreamingClient, SendMessageCommand } from "@amzn/codewhisperer-streaming"; // ES Modules import
+ * // const { CodeWhispererStreamingClient, SendMessageCommand } = require("@amzn/codewhisperer-streaming"); // CommonJS import
* const client = new CodeWhispererStreamingClient(config);
- * const input = { // ConverseStreamRequest
+ * const input = { // SendMessageRequest
* conversationState: { // ConversationState
* conversationId: "STRING_VALUE",
* history: [ // ChatHistory
@@ -139,6 +126,7 @@ export interface ConverseStreamCommandOutput extends ConverseStreamResponse, __M
* value: "STRING_VALUE",
* },
* ],
+ * timezoneOffset: Number("int"),
* },
* appStudioContext: { // AppStudioState
* namespace: "STRING_VALUE", // required
@@ -184,12 +172,17 @@ export interface ConverseStreamCommandOutput extends ConverseStreamResponse, __M
* },
* consoleState: { // ConsoleState
* region: "STRING_VALUE",
+ * consoleUrl: "STRING_VALUE",
+ * serviceId: "STRING_VALUE",
+ * serviceConsolePage: "STRING_VALUE",
+ * serviceSubconsolePage: "STRING_VALUE",
+ * taskName: "STRING_VALUE",
* },
* userSettings: { // UserSettings
* hasConsentedToCrossRegionCalls: true || false,
* },
* },
- * userIntent: "SUGGEST_ALTERNATE_IMPLEMENTATION" || "APPLY_COMMON_BEST_PRACTICES" || "IMPROVE_CODE" || "SHOW_EXAMPLES" || "CITE_SOURCES" || "EXPLAIN_LINE_BY_LINE" || "EXPLAIN_CODE_SELECTION" || "GENERATE_CLOUDFORMATION_TEMPLATE",
+ * userIntent: "SUGGEST_ALTERNATE_IMPLEMENTATION" || "APPLY_COMMON_BEST_PRACTICES" || "IMPROVE_CODE" || "SHOW_EXAMPLES" || "CITE_SOURCES" || "EXPLAIN_LINE_BY_LINE" || "EXPLAIN_CODE_SELECTION" || "GENERATE_CLOUDFORMATION_TEMPLATE" || "GENERATE_UNIT_TESTS" || "CODE_GENERATION",
* },
* assistantResponseMessage: { // AssistantResponseMessage
* messageId: "STRING_VALUE",
@@ -214,7 +207,7 @@ export interface ConverseStreamCommandOutput extends ConverseStreamResponse, __M
* ],
* followupPrompt: { // FollowupPrompt
* content: "STRING_VALUE", // required
- * userIntent: "SUGGEST_ALTERNATE_IMPLEMENTATION" || "APPLY_COMMON_BEST_PRACTICES" || "IMPROVE_CODE" || "SHOW_EXAMPLES" || "CITE_SOURCES" || "EXPLAIN_LINE_BY_LINE" || "EXPLAIN_CODE_SELECTION" || "GENERATE_CLOUDFORMATION_TEMPLATE",
+ * userIntent: "SUGGEST_ALTERNATE_IMPLEMENTATION" || "APPLY_COMMON_BEST_PRACTICES" || "IMPROVE_CODE" || "SHOW_EXAMPLES" || "CITE_SOURCES" || "EXPLAIN_LINE_BY_LINE" || "EXPLAIN_CODE_SELECTION" || "GENERATE_CLOUDFORMATION_TEMPLATE" || "GENERATE_UNIT_TESTS" || "CODE_GENERATION",
* },
* },
* },
@@ -274,6 +267,7 @@ export interface ConverseStreamCommandOutput extends ConverseStreamResponse, __M
* value: "STRING_VALUE",
* },
* ],
+ * timezoneOffset: Number("int"),
* },
* appStudioContext: {
* namespace: "STRING_VALUE", // required
@@ -300,12 +294,17 @@ export interface ConverseStreamCommandOutput extends ConverseStreamResponse, __M
* },
* consoleState: {
* region: "STRING_VALUE",
+ * consoleUrl: "STRING_VALUE",
+ * serviceId: "STRING_VALUE",
+ * serviceConsolePage: "STRING_VALUE",
+ * serviceSubconsolePage: "STRING_VALUE",
+ * taskName: "STRING_VALUE",
* },
* userSettings: {
* hasConsentedToCrossRegionCalls: true || false,
* },
* },
- * userIntent: "SUGGEST_ALTERNATE_IMPLEMENTATION" || "APPLY_COMMON_BEST_PRACTICES" || "IMPROVE_CODE" || "SHOW_EXAMPLES" || "CITE_SOURCES" || "EXPLAIN_LINE_BY_LINE" || "EXPLAIN_CODE_SELECTION" || "GENERATE_CLOUDFORMATION_TEMPLATE",
+ * userIntent: "SUGGEST_ALTERNATE_IMPLEMENTATION" || "APPLY_COMMON_BEST_PRACTICES" || "IMPROVE_CODE" || "SHOW_EXAMPLES" || "CITE_SOURCES" || "EXPLAIN_LINE_BY_LINE" || "EXPLAIN_CODE_SELECTION" || "GENERATE_CLOUDFORMATION_TEMPLATE" || "GENERATE_UNIT_TESTS" || "CODE_GENERATION",
* },
* assistantResponseMessage: {
* messageId: "STRING_VALUE",
@@ -330,29 +329,29 @@ export interface ConverseStreamCommandOutput extends ConverseStreamResponse, __M
* ],
* followupPrompt: {
* content: "STRING_VALUE", // required
- * userIntent: "SUGGEST_ALTERNATE_IMPLEMENTATION" || "APPLY_COMMON_BEST_PRACTICES" || "IMPROVE_CODE" || "SHOW_EXAMPLES" || "CITE_SOURCES" || "EXPLAIN_LINE_BY_LINE" || "EXPLAIN_CODE_SELECTION" || "GENERATE_CLOUDFORMATION_TEMPLATE",
+ * userIntent: "SUGGEST_ALTERNATE_IMPLEMENTATION" || "APPLY_COMMON_BEST_PRACTICES" || "IMPROVE_CODE" || "SHOW_EXAMPLES" || "CITE_SOURCES" || "EXPLAIN_LINE_BY_LINE" || "EXPLAIN_CODE_SELECTION" || "GENERATE_CLOUDFORMATION_TEMPLATE" || "GENERATE_UNIT_TESTS" || "CODE_GENERATION",
* },
* },
* },
- * chatTriggerType: "MANUAL" || "DIAGNOSTIC", // required
+ * chatTriggerType: "MANUAL" || "DIAGNOSTIC" || "INLINE_CHAT", // required
* customizationArn: "STRING_VALUE",
* },
* profileArn: "STRING_VALUE",
* source: "STRING_VALUE",
* dryRun: true || false,
* };
- * const command = new ConverseStreamCommand(input);
+ * const command = new SendMessageCommand(input);
* const response = await client.send(command);
- * // { // ConverseStreamResponse
- * // conversationId: "STRING_VALUE", // required
- * // utteranceId: "STRING_VALUE",
- * // converseStreamResponse: { // ChatResponseStream Union: only one key present
+ * // { // SendMessageResponse
+ * // sendMessageResponse: { // ChatResponseStream Union: only one key present
* // messageMetadataEvent: { // MessageMetadataEvent
* // conversationId: "STRING_VALUE",
+ * // utteranceId: "STRING_VALUE",
* // },
* // assistantResponseEvent: { // AssistantResponseEvent
* // content: "STRING_VALUE", // required
* // },
+ * // dryRunSucceedEvent: {},
* // codeReferenceEvent: { // CodeReferenceEvent
* // references: [ // References
* // { // Reference
@@ -378,7 +377,7 @@ export interface ConverseStreamCommandOutput extends ConverseStreamResponse, __M
* // followupPromptEvent: { // FollowupPromptEvent
* // followupPrompt: { // FollowupPrompt
* // content: "STRING_VALUE", // required
- * // userIntent: "SUGGEST_ALTERNATE_IMPLEMENTATION" || "APPLY_COMMON_BEST_PRACTICES" || "IMPROVE_CODE" || "SHOW_EXAMPLES" || "CITE_SOURCES" || "EXPLAIN_LINE_BY_LINE" || "EXPLAIN_CODE_SELECTION" || "GENERATE_CLOUDFORMATION_TEMPLATE",
+ * // userIntent: "SUGGEST_ALTERNATE_IMPLEMENTATION" || "APPLY_COMMON_BEST_PRACTICES" || "IMPROVE_CODE" || "SHOW_EXAMPLES" || "CITE_SOURCES" || "EXPLAIN_LINE_BY_LINE" || "EXPLAIN_CODE_SELECTION" || "GENERATE_CLOUDFORMATION_TEMPLATE" || "GENERATE_UNIT_TESTS" || "CODE_GENERATION",
* // },
* // },
* // codeEvent: { // CodeEvent
@@ -393,6 +392,201 @@ export interface ConverseStreamCommandOutput extends ConverseStreamResponse, __M
* // },
* // },
* // },
+ * // interactionComponentsEvent: { // InteractionComponentsEvent
+ * // interactionComponentEntries: [ // InteractionComponentEntryList // required
+ * // { // InteractionComponentEntry
+ * // interactionComponentId: "STRING_VALUE",
+ * // interactionComponent: { // InteractionComponent
+ * // text: { // Text
+ * // content: "STRING_VALUE", // required
+ * // },
+ * // alert: { // Alert
+ * // type: "INFO" || "ERROR" || "WARNING", // required
+ * // content: [ // AlertComponentList // required
+ * // { // AlertComponent
+ * // text: {
+ * // content: "STRING_VALUE", // required
+ * // },
+ * // },
+ * // ],
+ * // },
+ * // infrastructureUpdate: { // InfrastructureUpdate
+ * // transition: { // InfrastructureUpdateTransition
+ * // currentState: "STRING_VALUE", // required
+ * // nextState: "STRING_VALUE", // required
+ * // },
+ * // },
+ * // progress: { // Progress
+ * // content: [ // ProgressComponentList // required
+ * // { // ProgressComponent
+ * // step: { // Step
+ * // id: Number("int"), // required
+ * // state: "FAILED" || "SUCCEEDED" || "STOPPED" || "PENDING" || "IN_PROGRESS" || "LOADING" || "PAUSED", // required
+ * // label: "STRING_VALUE", // required
+ * // content: [ // StepComponentList
+ * // { // StepComponent
+ * // text: "",
+ * // },
+ * // ],
+ * // },
+ * // },
+ * // ],
+ * // },
+ * // step: {
+ * // id: Number("int"), // required
+ * // state: "FAILED" || "SUCCEEDED" || "STOPPED" || "PENDING" || "IN_PROGRESS" || "LOADING" || "PAUSED", // required
+ * // label: "STRING_VALUE", // required
+ * // content: [
+ * // {
+ * // text: "",
+ * // },
+ * // ],
+ * // },
+ * // taskDetails: { // TaskDetails
+ * // overview: { // TaskOverview
+ * // label: "STRING_VALUE", // required
+ * // description: "STRING_VALUE", // required
+ * // },
+ * // content: [ // TaskComponentList // required
+ * // { // TaskComponent
+ * // text: "",
+ * // infrastructureUpdate: {
+ * // transition: {
+ * // currentState: "STRING_VALUE", // required
+ * // nextState: "STRING_VALUE", // required
+ * // },
+ * // },
+ * // alert: {
+ * // type: "INFO" || "ERROR" || "WARNING", // required
+ * // content: [ // required
+ * // {
+ * // text: "",
+ * // },
+ * // ],
+ * // },
+ * // progress: {
+ * // content: [ // required
+ * // {
+ * // step: "",
+ * // },
+ * // ],
+ * // },
+ * // },
+ * // ],
+ * // actions: [ // TaskActionList
+ * // { // TaskAction
+ * // label: "STRING_VALUE", // required
+ * // note: { // TaskActionNote
+ * // content: "STRING_VALUE", // required
+ * // type: "INFO" || "WARNING",
+ * // },
+ * // primary: true || false,
+ * // disabled: true || false,
+ * // payload: { // TaskActionPayload // required
+ * // "": "STRING_VALUE",
+ * // },
+ * // confirmation: { // TaskActionConfirmation
+ * // content: "STRING_VALUE",
+ * // },
+ * // },
+ * // ],
+ * // },
+ * // taskReference: { // TaskReference
+ * // taskId: "STRING_VALUE", // required
+ * // },
+ * // suggestions: { // Suggestions
+ * // items: [ // SuggestionList // required
+ * // { // Suggestion
+ * // value: "STRING_VALUE", // required
+ * // },
+ * // ],
+ * // },
+ * // section: { // Section
+ * // title: "STRING_VALUE", // required
+ * // content: [ // SectionComponentList // required
+ * // { // SectionComponent
+ * // text: "",
+ * // alert: {
+ * // type: "INFO" || "ERROR" || "WARNING", // required
+ * // content: [ // required
+ * // {
+ * // text: "",
+ * // },
+ * // ],
+ * // },
+ * // resource: { // Resource
+ * // title: "STRING_VALUE", // required
+ * // link: "STRING_VALUE", // required
+ * // description: "STRING_VALUE", // required
+ * // type: "STRING_VALUE", // required
+ * // ARN: "STRING_VALUE", // required
+ * // resourceJsonString: "STRING_VALUE", // required
+ * // },
+ * // resourceList: { // ResourceList
+ * // action: { // Action
+ * // webLink: { // WebLink
+ * // label: "STRING_VALUE", // required
+ * // url: "STRING_VALUE", // required
+ * // },
+ * // moduleLink: { // ModuleLink
+ * // cloudWatchTroubleshootingLink: { // CloudWatchTroubleshootingLink
+ * // label: "STRING_VALUE", // required
+ * // investigationPayload: "STRING_VALUE", // required
+ * // defaultText: "STRING_VALUE",
+ * // },
+ * // },
+ * // },
+ * // items: [ // Resources // required
+ * // {
+ * // title: "STRING_VALUE", // required
+ * // link: "STRING_VALUE", // required
+ * // description: "STRING_VALUE", // required
+ * // type: "STRING_VALUE", // required
+ * // ARN: "STRING_VALUE", // required
+ * // resourceJsonString: "STRING_VALUE", // required
+ * // },
+ * // ],
+ * // },
+ * // },
+ * // ],
+ * // action: {
+ * // webLink: {
+ * // label: "STRING_VALUE", // required
+ * // url: "STRING_VALUE", // required
+ * // },
+ * // moduleLink: {
+ * // cloudWatchTroubleshootingLink: {
+ * // label: "STRING_VALUE", // required
+ * // investigationPayload: "STRING_VALUE", // required
+ * // defaultText: "STRING_VALUE",
+ * // },
+ * // },
+ * // },
+ * // },
+ * // resource: "",
+ * // resourceList: {
+ * // action: {
+ * // webLink: {
+ * // label: "STRING_VALUE", // required
+ * // url: "STRING_VALUE", // required
+ * // },
+ * // moduleLink: {
+ * // cloudWatchTroubleshootingLink: {
+ * // label: "STRING_VALUE", // required
+ * // investigationPayload: "STRING_VALUE", // required
+ * // defaultText: "STRING_VALUE",
+ * // },
+ * // },
+ * // },
+ * // items: [ // required
+ * // "",
+ * // ],
+ * // },
+ * // action: "",
+ * // },
+ * // },
+ * // ],
+ * // },
* // invalidStateEvent: { // InvalidStateEvent
* // reason: "INVALID_TASK_ASSIST_PLAN", // required
* // message: "STRING_VALUE", // required
@@ -405,10 +599,10 @@ export interface ConverseStreamCommandOutput extends ConverseStreamResponse, __M
*
* ```
*
- * @param ConverseStreamCommandInput - {@link ConverseStreamCommandInput}
- * @returns {@link ConverseStreamCommandOutput}
- * @see {@link ConverseStreamCommandInput} for command's `input` shape.
- * @see {@link ConverseStreamCommandOutput} for command's `response` shape.
+ * @param SendMessageCommandInput - {@link SendMessageCommandInput}
+ * @returns {@link SendMessageCommandOutput}
+ * @see {@link SendMessageCommandInput} for command's `input` shape.
+ * @see {@link SendMessageCommandOutput} for command's `response` shape.
* @see {@link CodeWhispererStreamingClientResolvedConfig | config} for CodeWhispererStreamingClient's `config` shape.
*
* @throws {@link InternalServerException} (server fault)
@@ -439,75 +633,36 @@ export interface ConverseStreamCommandOutput extends ConverseStreamResponse, __M
* Base exception class for all service exceptions from CodeWhispererStreaming service.
*
*/
-export class ConverseStreamCommand extends $Command {
- // Start section: command_properties
- // End section: command_properties
-
- /**
- * @public
- */
- constructor(readonly input: ConverseStreamCommandInput) {
- // Start section: command_constructor
- super();
- // End section: command_constructor
- }
-
- /**
- * @internal
- */
- resolveMiddleware(
- clientStack: MiddlewareStack,
- configuration: CodeWhispererStreamingClientResolvedConfig,
- options?: __HttpHandlerOptions
- ): Handler {
- this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
-
- const stack = clientStack.concat(this.middlewareStack);
-
- const { logger } = configuration;
- const clientName = "CodeWhispererStreamingClient";
- const commandName = "ConverseStreamCommand";
- const handlerExecutionContext: HandlerExecutionContext = {
- logger,
- clientName,
- commandName,
- inputFilterSensitiveLog:
- ConverseStreamRequestFilterSensitiveLog,
- outputFilterSensitiveLog:
- ConverseStreamResponseFilterSensitiveLog,
- [SMITHY_CONTEXT_KEY]: {
- service: "AmazonCodeWhispererStreamingService",
- operation: "ConverseStream",
- },
- }
- const { requestHandler } = configuration;
- return stack.resolve(
- (request: FinalizeHandlerArguments) =>
- requestHandler.handle(request.request as __HttpRequest, options || {}),
- handlerExecutionContext
- );
- }
-
- /**
- * @internal
- */
- private serialize(
- input: ConverseStreamCommandInput,
- context: __SerdeContext
- ): Promise<__HttpRequest> {
- return se_ConverseStreamCommand(input, context);
- }
+export class SendMessageCommand extends $Command.classBuilder()
+ .m(function (this: any, Command: any, cs: any, config: CodeWhispererStreamingClientResolvedConfig, o: any) {
+ return [
- /**
- * @internal
- */
- private deserialize(
- output: __HttpResponse,
- context: __SerdeContext & __EventStreamSerdeContext
- ): Promise {
- return de_ConverseStreamCommand(output, context);
- }
+ getSerdePlugin(config, this.serialize, this.deserialize),
+ ];
+ })
+ .s("AmazonCodeWhispererStreamingService", "SendMessage", {
- // Start section: command_body_extra
- // End section: command_body_extra
+ /**
+ * @internal
+ */
+ eventStream: {
+ output: true,
+ },
+ })
+ .n("CodeWhispererStreamingClient", "SendMessageCommand")
+ .f(SendMessageRequestFilterSensitiveLog, SendMessageResponseFilterSensitiveLog)
+ .ser(se_SendMessageCommand)
+ .de(de_SendMessageCommand)
+.build() {
+/** @internal type navigation helper, not in runtime. */
+declare protected static __types: {
+ api: {
+ input: SendMessageRequest;
+ output: SendMessageResponse;
+ };
+ sdk: {
+ input: SendMessageCommandInput;
+ output: SendMessageCommandOutput;
+ };
+};
}
diff --git a/src.gen/@amzn/codewhisperer-streaming/src/commands/index.ts b/src.gen/@amzn/codewhisperer-streaming/src/commands/index.ts
index 2f4466affaa..d129f09766c 100644
--- a/src.gen/@amzn/codewhisperer-streaming/src/commands/index.ts
+++ b/src.gen/@amzn/codewhisperer-streaming/src/commands/index.ts
@@ -2,4 +2,4 @@
export * from "./ExportResultArchiveCommand";
export * from "./GenerateAssistantResponseCommand";
export * from "./GenerateTaskAssistPlanCommand";
-export * from "./ConverseStreamCommand";
+export * from "./SendMessageCommand";
diff --git a/src.gen/@amzn/codewhisperer-streaming/src/endpoints.ts b/src.gen/@amzn/codewhisperer-streaming/src/endpoints.ts
index fbe56d41241..1bcae7151d4 100644
--- a/src.gen/@amzn/codewhisperer-streaming/src/endpoints.ts
+++ b/src.gen/@amzn/codewhisperer-streaming/src/endpoints.ts
@@ -26,7 +26,9 @@ const partitionHash: PartitionHash = {
"ap-southeast-2",
"ap-southeast-3",
"ap-southeast-4",
+ "ap-southeast-5",
"ca-central-1",
+ "ca-west-1",
"eu-central-1",
"eu-central-2",
"eu-north-1",
@@ -44,7 +46,7 @@ const partitionHash: PartitionHash = {
"us-west-1",
"us-west-2",
],
- regionRegex: "^(us|eu|ap|sa|ca|me|af|il)\\-\\w+\\-\\d+$",
+ regionRegex: "^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",
variants: [
{
"hostname": "amazoncodewhispererstreamingservice.{region}.amazonaws.com",
@@ -142,6 +144,7 @@ const partitionHash: PartitionHash = {
},
"aws-iso-e": {
regions: [
+ "eu-isoe-west-1",
],
regionRegex: "^eu\\-isoe\\-\\w+\\-\\d+$",
variants: [
diff --git a/src.gen/@amzn/codewhisperer-streaming/src/extensionConfiguration.ts b/src.gen/@amzn/codewhisperer-streaming/src/extensionConfiguration.ts
index bead58330eb..99cf43fdd3a 100644
--- a/src.gen/@amzn/codewhisperer-streaming/src/extensionConfiguration.ts
+++ b/src.gen/@amzn/codewhisperer-streaming/src/extensionConfiguration.ts
@@ -1,4 +1,5 @@
// smithy-typescript generated code
+import { HttpAuthExtensionConfiguration } from "./auth/httpAuthExtensionConfiguration";
import { AwsRegionExtensionConfiguration } from "@aws-sdk/types";
import { HttpHandlerExtensionConfiguration } from "@smithy/protocol-http";
import { DefaultExtensionConfiguration } from "@smithy/types";
@@ -6,4 +7,4 @@ import { DefaultExtensionConfiguration } from "@smithy/types";
/**
* @internal
*/
-export interface CodeWhispererStreamingExtensionConfiguration extends HttpHandlerExtensionConfiguration, DefaultExtensionConfiguration, AwsRegionExtensionConfiguration {}
+export interface CodeWhispererStreamingExtensionConfiguration extends HttpHandlerExtensionConfiguration, DefaultExtensionConfiguration, AwsRegionExtensionConfiguration, HttpAuthExtensionConfiguration {}
diff --git a/src.gen/@amzn/codewhisperer-streaming/src/index.ts b/src.gen/@amzn/codewhisperer-streaming/src/index.ts
index ac3895763af..99403eb1a21 100644
--- a/src.gen/@amzn/codewhisperer-streaming/src/index.ts
+++ b/src.gen/@amzn/codewhisperer-streaming/src/index.ts
@@ -2,6 +2,8 @@
/* eslint-disable */
export * from "./CodeWhispererStreamingClient";
export * from "./CodeWhispererStreaming";
+export type { RuntimeExtension } from "./runtimeExtensions";
+export type { CodeWhispererStreamingExtensionConfiguration } from "./extensionConfiguration";
export * from "./commands";
export * from "./models";
diff --git a/src.gen/@amzn/codewhisperer-streaming/src/models/CodeWhispererStreamingServiceException.ts b/src.gen/@amzn/codewhisperer-streaming/src/models/CodeWhispererStreamingServiceException.ts
index 542a96f612a..242c89f66d9 100644
--- a/src.gen/@amzn/codewhisperer-streaming/src/models/CodeWhispererStreamingServiceException.ts
+++ b/src.gen/@amzn/codewhisperer-streaming/src/models/CodeWhispererStreamingServiceException.ts
@@ -4,7 +4,9 @@ import {
ServiceExceptionOptions as __ServiceExceptionOptions,
} from "@smithy/smithy-client";
-export { __ServiceException, __ServiceExceptionOptions }
+export type { __ServiceExceptionOptions }
+
+export { __ServiceException }
/**
* @public
diff --git a/src.gen/@amzn/codewhisperer-streaming/src/models/models_0.ts b/src.gen/@amzn/codewhisperer-streaming/src/models/models_0.ts
index 2b069eb9a73..8b686f47c76 100644
--- a/src.gen/@amzn/codewhisperer-streaming/src/models/models_0.ts
+++ b/src.gen/@amzn/codewhisperer-streaming/src/models/models_0.ts
@@ -18,17 +18,17 @@ export const AccessDeniedExceptionReason = {
export type AccessDeniedExceptionReason = typeof AccessDeniedExceptionReason[keyof typeof AccessDeniedExceptionReason]
/**
- * @public
* This exception is thrown when the user does not have sufficient access to perform this action.
+ * @public
*/
export class AccessDeniedException extends __BaseException {
readonly name: "AccessDeniedException" = "AccessDeniedException";
readonly $fault: "client" = "client";
/**
- * @public
* Reason for AccessDeniedException
+ * @public
*/
- reason?: AccessDeniedExceptionReason | string;
+ reason?: AccessDeniedExceptionReason | undefined;
/**
* @internal
@@ -45,8 +45,8 @@ export class AccessDeniedException extends __BaseException {
}
/**
- * @public
* This exception is thrown when an unexpected error occurred during the processing of a request.
+ * @public
*/
export class InternalServerException extends __BaseException {
readonly name: "InternalServerException" = "InternalServerException";
@@ -67,8 +67,8 @@ export class InternalServerException extends __BaseException {
}
/**
- * @public
* This exception is thrown when describing a resource that does not exist.
+ * @public
*/
export class ResourceNotFoundException extends __BaseException {
readonly name: "ResourceNotFoundException" = "ResourceNotFoundException";
@@ -88,7 +88,19 @@ export class ResourceNotFoundException extends __BaseException {
/**
* @public
+ * @enum
+ */
+export const ThrottlingExceptionReason = {
+ MONTHLY_REQUEST_COUNT: "MONTHLY_REQUEST_COUNT",
+} as const
+/**
+ * @public
+ */
+export type ThrottlingExceptionReason = typeof ThrottlingExceptionReason[keyof typeof ThrottlingExceptionReason]
+
+/**
* This exception is thrown when request was denied due to request throttling.
+ * @public
*/
export class ThrottlingException extends __BaseException {
readonly name: "ThrottlingException" = "ThrottlingException";
@@ -96,6 +108,12 @@ export class ThrottlingException extends __BaseException {
$retryable = {
throttling: true,
};
+ /**
+ * Reason for ThrottlingException
+ * @public
+ */
+ reason?: ThrottlingExceptionReason | undefined;
+
/**
* @internal
*/
@@ -106,6 +124,7 @@ export class ThrottlingException extends __BaseException {
...opts
});
Object.setPrototypeOf(this, ThrottlingException.prototype);
+ this.reason = opts.reason;
}
}
@@ -116,6 +135,7 @@ export class ThrottlingException extends __BaseException {
export const ValidationExceptionReason = {
CONTENT_LENGTH_EXCEEDS_THRESHOLD: "CONTENT_LENGTH_EXCEEDS_THRESHOLD",
INVALID_CONVERSATION_ID: "INVALID_CONVERSATION_ID",
+ INVALID_KMS_GRANT: "INVALID_KMS_GRANT",
} as const
/**
* @public
@@ -123,17 +143,17 @@ export const ValidationExceptionReason = {
export type ValidationExceptionReason = typeof ValidationExceptionReason[keyof typeof ValidationExceptionReason]
/**
- * @public
* This exception is thrown when the input fails to satisfy the constraints specified by the service.
+ * @public
*/
export class ValidationException extends __BaseException {
readonly name: "ValidationException" = "ValidationException";
readonly $fault: "client" = "client";
/**
- * @public
* Reason for ValidationException
+ * @public
*/
- reason?: ValidationExceptionReason | string;
+ reason?: ValidationExceptionReason | undefined;
/**
* @internal
@@ -150,31 +170,31 @@ export class ValidationException extends __BaseException {
}
/**
- * @public
* Description of a user's context when they are calling Q Chat from AppStudio
+ * @public
*/
export interface AppStudioState {
/**
- * @public
* The namespace of the context. Examples: 'ui.Button', 'ui.Table.DataSource', 'ui.Table.RowActions.Button', 'logic.invokeAWS', 'logic.JavaScript'
+ * @public
*/
namespace: string | undefined;
/**
- * @public
* The name of the property. Examples: 'visibility', 'disability', 'value', 'code'
+ * @public
*/
propertyName: string | undefined;
/**
- * @public
* The value of the property.
+ * @public
*/
- propertyValue?: string;
+ propertyValue?: string | undefined;
/**
- * @public
* Context about how the property is used
+ * @public
*/
propertyContext: string | undefined;
}
@@ -199,13 +219,13 @@ export const AppStudioStateFilterSensitiveLog = (obj: AppStudioState): any => ({
})
/**
- * @public
* Streaming Response Event for Assistant Markdown text message.
+ * @public
*/
export interface AssistantResponseEvent {
/**
- * @public
* The content of the text message in markdown format.
+ * @public
*/
content: string | undefined;
}
@@ -233,6 +253,10 @@ export const UserIntent = {
* Cite Sources
*/
CITE_SOURCES: "CITE_SOURCES",
+ /**
+ * generate code
+ */
+ CODE_GENERATION: "CODE_GENERATION",
/**
* Explain Code Selection
*/
@@ -268,21 +292,21 @@ export const UserIntent = {
export type UserIntent = typeof UserIntent[keyof typeof UserIntent]
/**
- * @public
* Followup Prompt for the Assistant Response
+ * @public
*/
export interface FollowupPrompt {
/**
- * @public
* The content of the text message in markdown format.
+ * @public
*/
content: string | undefined;
/**
- * @public
* User Intent
+ * @public
*/
- userIntent?: UserIntent | string;
+ userIntent?: UserIntent | undefined;
}
/**
@@ -296,66 +320,66 @@ export const FollowupPromptFilterSensitiveLog = (obj: FollowupPrompt): any => ({
})
/**
- * @public
* Represents span in a text
+ * @public
*/
export interface Span {
- start?: number;
- end?: number;
+ start?: number | undefined;
+ end?: number | undefined;
}
/**
- * @public
* Code Reference / Repository details
+ * @public
*/
export interface Reference {
/**
- * @public
* License name
+ * @public
*/
- licenseName?: string;
+ licenseName?: string | undefined;
/**
- * @public
* Code Repsitory for the associated reference
+ * @public
*/
- repository?: string;
+ repository?: string | undefined;
/**
- * @public
* Respository URL
+ * @public
*/
- url?: string;
+ url?: string | undefined;
/**
- * @public
* Span / Range for the Reference
+ * @public
*/
- recommendationContentSpan?: Span;
+ recommendationContentSpan?: Span | undefined;
}
/**
- * @public
* Represents an additional reference link retured with the Chat message
+ * @public
*/
export interface SupplementaryWebLink {
/**
- * @public
* URL of the web reference link
+ * @public
*/
url: string | undefined;
/**
- * @public
* Title of the web reference link
+ * @public
*/
title: string | undefined;
/**
- * @public
* Relevant text snippet from the link
+ * @public
*/
- snippet?: string;
+ snippet?: string | undefined;
}
/**
@@ -375,39 +399,39 @@ export const SupplementaryWebLinkFilterSensitiveLog = (obj: SupplementaryWebLink
})
/**
- * @public
* Markdown text message.
+ * @public
*/
export interface AssistantResponseMessage {
/**
- * @public
* Unique identifier for the chat message
+ * @public
*/
- messageId?: string;
+ messageId?: string | undefined;
/**
- * @public
* The content of the text message in markdown format.
+ * @public
*/
content: string | undefined;
/**
- * @public
* Web References
+ * @public
*/
- supplementaryWebLinks?: (SupplementaryWebLink)[];
+ supplementaryWebLinks?: (SupplementaryWebLink)[] | undefined;
/**
- * @public
* Code References
+ * @public
*/
- references?: (Reference)[];
+ references?: (Reference)[] | undefined;
/**
- * @public
* Followup Prompt
+ * @public
*/
- followupPrompt?: FollowupPrompt;
+ followupPrompt?: FollowupPrompt | undefined;
}
/**
@@ -431,11 +455,31 @@ export const AssistantResponseMessageFilterSensitiveLog = (obj: AssistantRespons
/**
* @public
+ * @enum
+ */
+export const ConflictExceptionReason = {
+ CUSTOMER_KMS_KEY_DISABLED: "CUSTOMER_KMS_KEY_DISABLED",
+ CUSTOMER_KMS_KEY_INVALID_KEY_POLICY: "CUSTOMER_KMS_KEY_INVALID_KEY_POLICY",
+ MISMATCHED_KMS_KEY: "MISMATCHED_KMS_KEY",
+} as const
+/**
+ * @public
+ */
+export type ConflictExceptionReason = typeof ConflictExceptionReason[keyof typeof ConflictExceptionReason]
+
+/**
* This exception is thrown when the action to perform could not be completed because the resource is in a conflicting state.
+ * @public
*/
export class ConflictException extends __BaseException {
readonly name: "ConflictException" = "ConflictException";
readonly $fault: "client" = "client";
+ /**
+ * Reason for ConflictException
+ * @public
+ */
+ reason?: ConflictExceptionReason | undefined;
+
/**
* @internal
*/
@@ -446,12 +490,13 @@ export class ConflictException extends __BaseException {
...opts
});
Object.setPrototypeOf(this, ConflictException.prototype);
+ this.reason = opts.reason;
}
}
/**
- * @public
* Programming Languages supported by CodeWhisperer
+ * @public
*/
export interface ProgrammingLanguage {
languageName: string | undefined;
@@ -470,33 +515,33 @@ export const ContentChecksumType = {
export type ContentChecksumType = typeof ContentChecksumType[keyof typeof ContentChecksumType]
/**
- * @public
* Payload Part
+ * @public
*/
export interface BinaryMetadataEvent {
/**
- * @public
* Content length of the binary payload
+ * @public
*/
- size?: number;
+ size?: number | undefined;
/**
- * @public
* Content type of the response
+ * @public
*/
- mimeType?: string;
+ mimeType?: string | undefined;
/**
- * @public
* Content checksum of the binary payload
+ * @public
*/
- contentChecksum?: string;
+ contentChecksum?: string | undefined;
/**
- * @public
* Content checksum type of the binary payload
+ * @public
*/
- contentChecksumType?: ContentChecksumType | string;
+ contentChecksumType?: ContentChecksumType | undefined;
}
/**
@@ -507,15 +552,15 @@ export const BinaryMetadataEventFilterSensitiveLog = (obj: BinaryMetadataEvent):
})
/**
- * @public
* Payload Part
+ * @public
*/
export interface BinaryPayloadEvent {
/**
- * @public
* Payload Part's body
+ * @public
*/
- bytes?: Uint8Array;
+ bytes?: Uint8Array | undefined;
}
/**
@@ -529,13 +574,31 @@ export const BinaryPayloadEventFilterSensitiveLog = (obj: BinaryPayloadEvent): a
})
/**
- * @public
* Information about the state of the AWS management console page from which the user is calling
+ * @public
*/
export interface ConsoleState {
- region?: string;
+ region?: string | undefined;
+ consoleUrl?: string | undefined;
+ serviceId?: string | undefined;
+ serviceConsolePage?: string | undefined;
+ serviceSubconsolePage?: string | undefined;
+ taskName?: string | undefined;
}
+/**
+ * @internal
+ */
+export const ConsoleStateFilterSensitiveLog = (obj: ConsoleState): any => ({
+ ...obj,
+ ...(obj.consoleUrl && { consoleUrl:
+ SENSITIVE_STRING
+ }),
+ ...(obj.taskName && { taskName:
+ SENSITIVE_STRING
+ }),
+})
+
/**
* @public
* @enum
@@ -552,25 +615,25 @@ export const DiagnosticSeverity = {
export type DiagnosticSeverity = typeof DiagnosticSeverity[keyof typeof DiagnosticSeverity]
/**
- * @public
* Structure to represent metadata about a Runtime Diagnostics
+ * @public
*/
export interface RuntimeDiagnostic {
/**
- * @public
* A human-readable string describing the source of the diagnostic
+ * @public
*/
source: string | undefined;
/**
- * @public
* Diagnostic Error type
+ * @public
*/
- severity: DiagnosticSeverity | string | undefined;
+ severity: DiagnosticSeverity | undefined;
/**
- * @public
* The diagnostic's message.
+ * @public
*/
message: string | undefined;
}
@@ -606,52 +669,52 @@ export type SymbolType = typeof SymbolType[keyof typeof SymbolType]
*/
export interface DocumentSymbol {
/**
- * @public
* Name of the Document Symbol
+ * @public
*/
name: string | undefined;
/**
- * @public
* Symbol type - DECLARATION / USAGE
+ * @public
*/
- type: SymbolType | string | undefined;
+ type: SymbolType | undefined;
/**
- * @public
* Symbol package / source for FullyQualified names
+ * @public
*/
- source?: string;
+ source?: string | undefined;
}
/**
- * @public
* Represents a Text Document / File
+ * @public
*/
export interface TextDocument {
/**
- * @public
* Filepath relative to the root of the workspace
+ * @public
*/
relativeFilePath: string | undefined;
/**
- * @public
* The text document's language identifier.
+ * @public
*/
- programmingLanguage?: ProgrammingLanguage;
+ programmingLanguage?: ProgrammingLanguage | undefined;
/**
- * @public
* Content of the text document
+ * @public
*/
- text?: string;
+ text?: string | undefined;
/**
- * @public
* DocumentSymbols parsed from a text document
+ * @public
*/
- documentSymbols?: (DocumentSymbol)[];
+ documentSymbols?: (DocumentSymbol)[] | undefined;
}
/**
@@ -668,73 +731,73 @@ export const TextDocumentFilterSensitiveLog = (obj: TextDocument): any => ({
})
/**
- * @public
* Indicates Cursor postion in a Text Document
+ * @public
*/
export interface Position {
/**
- * @public
* Line position in a document.
+ * @public
*/
line: number | undefined;
/**
- * @public
* Character offset on a line in a document (zero-based)
+ * @public
*/
character: number | undefined;
}
/**
- * @public
* Indicates Range / Span in a Text Document
+ * @public
*/
export interface Range {
/**
- * @public
* The range's start position.
+ * @public
*/
start: Position | undefined;
/**
- * @public
* The range's end position.
+ * @public
*/
end: Position | undefined;
}
/**
- * @public
* Structure to represent metadata about a TextDocument Diagnostic
+ * @public
*/
export interface TextDocumentDiagnostic {
/**
- * @public
* Represents a Text Document associated with Diagnostic
+ * @public
*/
document: TextDocument | undefined;
/**
- * @public
* The range at which the message applies.
+ * @public
*/
range: Range | undefined;
/**
- * @public
* A human-readable string describing the source of the diagnostic
+ * @public
*/
source: string | undefined;
/**
- * @public
* Diagnostic Error type
+ * @public
*/
- severity: DiagnosticSeverity | string | undefined;
+ severity: DiagnosticSeverity | undefined;
/**
- * @public
* The diagnostic's message.
+ * @public
*/
message: string | undefined;
}
@@ -756,8 +819,8 @@ export const TextDocumentDiagnosticFilterSensitiveLog = (obj: TextDocumentDiagno
})
/**
- * @public
* Represents a Diagnostic message
+ * @public
*/
export type Diagnostic =
| Diagnostic.RuntimeDiagnosticMember
@@ -770,8 +833,8 @@ export type Diagnostic =
export namespace Diagnostic {
/**
- * @public
* Diagnostics originating from a TextDocument
+ * @public
*/
export interface TextDocumentDiagnosticMember {
textDocumentDiagnostic: TextDocumentDiagnostic;
@@ -780,8 +843,8 @@ export namespace Diagnostic {
}
/**
- * @public
* Diagnostics originating from a Runtime
+ * @public
*/
export interface RuntimeDiagnosticMember {
textDocumentDiagnostic?: never;
@@ -828,8 +891,8 @@ export const DiagnosticFilterSensitiveLog = (obj: Diagnostic): any => {
}
/**
- * @public
* Represents the state of the Cursor in an Editor
+ * @public
*/
export type CursorState =
| CursorState.PositionMember
@@ -842,8 +905,8 @@ export type CursorState =
export namespace CursorState {
/**
- * @public
* Represents a cursor position in a Text Document
+ * @public
*/
export interface PositionMember {
position: Position;
@@ -852,8 +915,8 @@ export namespace CursorState {
}
/**
- * @public
* Represents a text selection in a Text Document
+ * @public
*/
export interface RangeMember {
position?: never;
@@ -888,33 +951,33 @@ export namespace CursorState {
}
/**
- * @public
* Represents an IDE retrieved relevant Text Document / File
+ * @public
*/
export interface RelevantTextDocument {
/**
- * @public
* Filepath relative to the root of the workspace
+ * @public
*/
relativeFilePath: string | undefined;
/**
- * @public
* The text document's language identifier.
+ * @public
*/
- programmingLanguage?: ProgrammingLanguage;
+ programmingLanguage?: ProgrammingLanguage | undefined;
/**
- * @public
* Content of the text document
+ * @public
*/
- text?: string;
+ text?: string | undefined;
/**
- * @public
* DocumentSymbols parsed from a text document
+ * @public
*/
- documentSymbols?: (DocumentSymbol)[];
+ documentSymbols?: (DocumentSymbol)[] | undefined;
}
/**
@@ -931,33 +994,33 @@ export const RelevantTextDocumentFilterSensitiveLog = (obj: RelevantTextDocument
})
/**
- * @public
* Represents the state of an Editor
+ * @public
*/
export interface EditorState {
/**
- * @public
* Represents currently edited file
+ * @public
*/
- document?: TextDocument;
+ document?: TextDocument | undefined;
/**
- * @public
* Position of the cursor
+ * @public
*/
- cursorState?: CursorState;
+ cursorState?: CursorState | undefined;
/**
- * @public
* Represents IDE provided relevant files
+ * @public
*/
- relevantDocuments?: (RelevantTextDocument)[];
+ relevantDocuments?: (RelevantTextDocument)[] | undefined;
/**
- * @public
* Whether service should use relevant document in prompt
+ * @public
*/
- useRelevantDocuments?: boolean;
+ useRelevantDocuments?: boolean | undefined;
}
/**
@@ -980,21 +1043,21 @@ export const EditorStateFilterSensitiveLog = (obj: EditorState): any => ({
})
/**
- * @public
* An environment variable
+ * @public
*/
export interface EnvironmentVariable {
/**
- * @public
* The key of an environment variable
+ * @public
*/
- key?: string;
+ key?: string | undefined;
/**
- * @public
* The value of an environment variable
+ * @public
*/
- value?: string;
+ value?: string | undefined;
}
/**
@@ -1011,27 +1074,33 @@ export const EnvironmentVariableFilterSensitiveLog = (obj: EnvironmentVariable):
})
/**
- * @public
* State related to the user's environment
+ * @public
*/
export interface EnvState {
/**
- * @public
* The name of the operating system in use
+ * @public
*/
- operatingSystem?: string;
+ operatingSystem?: string | undefined;
/**
- * @public
* The current working directory of the environment
+ * @public
*/
- currentWorkingDirectory?: string;
+ currentWorkingDirectory?: string | undefined;
/**
- * @public
* The environment variables set in the current environment
+ * @public
*/
- environmentVariables?: (EnvironmentVariable)[];
+ environmentVariables?: (EnvironmentVariable)[] | undefined;
+
+ /**
+ * Local timezone offset of the client. For more information, see documentation https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getTimezoneOffset
+ * @public
+ */
+ timezoneOffset?: number | undefined;
}
/**
@@ -1051,15 +1120,15 @@ export const EnvStateFilterSensitiveLog = (obj: EnvState): any => ({
})
/**
- * @public
* State related to the Git VSC
+ * @public
*/
export interface GitState {
/**
- * @public
* The output of the command `git status --porcelain=v1 -b`
+ * @public
*/
- status?: string;
+ status?: string | undefined;
}
/**
@@ -1073,39 +1142,39 @@ export const GitStateFilterSensitiveLog = (obj: GitState): any => ({
})
/**
- * @public
* An single entry in the shell history
+ * @public
*/
export interface ShellHistoryEntry {
/**
- * @public
* The shell command that was run
+ * @public
*/
command: string | undefined;
/**
- * @public
* The directory the command was ran in
+ * @public
*/
- directory?: string;
+ directory?: string | undefined;
/**
- * @public
* The exit code of the command after it finished
+ * @public
*/
- exitCode?: number;
+ exitCode?: number | undefined;
/**
- * @public
* The stdout from the command
+ * @public
*/
- stdout?: string;
+ stdout?: string | undefined;
/**
- * @public
* The stderr from the command
+ * @public
*/
- stderr?: string;
+ stderr?: string | undefined;
}
/**
@@ -1128,21 +1197,21 @@ export const ShellHistoryEntryFilterSensitiveLog = (obj: ShellHistoryEntry): any
})
/**
- * @public
* Represents the state of a shell
+ * @public
*/
export interface ShellState {
/**
- * @public
* The name of the current shell
+ * @public
*/
shellName: string | undefined;
/**
- * @public
* The history previous shell commands for the current shell
+ * @public
*/
- shellHistory?: (ShellHistoryEntry)[];
+ shellHistory?: (ShellHistoryEntry)[] | undefined;
}
/**
@@ -1159,65 +1228,65 @@ export const ShellStateFilterSensitiveLog = (obj: ShellState): any => ({
})
/**
- * @public
* Settings information passed by the Q widget
+ * @public
*/
export interface UserSettings {
- hasConsentedToCrossRegionCalls?: boolean;
+ hasConsentedToCrossRegionCalls?: boolean | undefined;
}
/**
- * @public
* Additional Chat message context associated with the Chat Message
+ * @public
*/
export interface UserInputMessageContext {
/**
- * @public
* Editor state chat message context.
+ * @public
*/
- editorState?: EditorState;
+ editorState?: EditorState | undefined;
/**
- * @public
* Shell state chat message context.
+ * @public
*/
- shellState?: ShellState;
+ shellState?: ShellState | undefined;
/**
- * @public
* Git state chat message context.
+ * @public
*/
- gitState?: GitState;
+ gitState?: GitState | undefined;
/**
- * @public
* Environment state chat message context.
+ * @public
*/
- envState?: EnvState;
+ envState?: EnvState | undefined;
/**
- * @public
* The state of a user's AppStudio UI when sending a message.
+ * @public
*/
- appStudioContext?: AppStudioState;
+ appStudioContext?: AppStudioState | undefined;
/**
- * @public
* Diagnostic chat message context.
+ * @public
*/
- diagnostic?: Diagnostic;
+ diagnostic?: Diagnostic | undefined;
/**
- * @public
* Contextual information about the environment from which the user is calling.
+ * @public
*/
- consoleState?: ConsoleState;
+ consoleState?: ConsoleState | undefined;
/**
- * @public
* Settings information, e.g., whether the user has enabled cross-region API calls.
+ * @public
*/
- userSettings?: UserSettings;
+ userSettings?: UserSettings | undefined;
}
/**
@@ -1243,30 +1312,33 @@ export const UserInputMessageContextFilterSensitiveLog = (obj: UserInputMessageC
...(obj.diagnostic && { diagnostic:
DiagnosticFilterSensitiveLog(obj.diagnostic)
}),
+ ...(obj.consoleState && { consoleState:
+ ConsoleStateFilterSensitiveLog(obj.consoleState)
+ }),
})
/**
- * @public
* Structure to represent a chat input message from User
+ * @public
*/
export interface UserInputMessage {
/**
- * @public
* The content of the chat message.
+ * @public
*/
content: string | undefined;
/**
- * @public
* Chat message context associated with the Chat Message
+ * @public
*/
- userInputMessageContext?: UserInputMessageContext;
+ userInputMessageContext?: UserInputMessageContext | undefined;
/**
- * @public
* User Intent
+ * @public
*/
- userIntent?: UserIntent | string;
+ userIntent?: UserIntent | undefined;
}
/**
@@ -1296,8 +1368,8 @@ export type ChatMessage =
export namespace ChatMessage {
/**
- * @public
* Structure to represent a chat input message from User
+ * @public
*/
export interface UserInputMessageMember {
userInputMessage: UserInputMessage;
@@ -1306,8 +1378,8 @@ export namespace ChatMessage {
}
/**
- * @public
* Markdown text message.
+ * @public
*/
export interface AssistantResponseMessageMember {
userInputMessage?: never;
@@ -1353,135 +1425,1223 @@ export const ChatMessageFilterSensitiveLog = (obj: ChatMessage): any => {
if (obj.$unknown !== undefined) return {[obj.$unknown[0]]: 'UNKNOWN'};
}
-/**
- * @public
- * Streaming response event for generated code text.
- */
-export interface CodeEvent {
+/**
+ * Streaming response event for generated code text.
+ * @public
+ */
+export interface CodeEvent {
+ /**
+ * Generated code snippet.
+ * @public
+ */
+ content: string | undefined;
+}
+
+/**
+ * @internal
+ */
+export const CodeEventFilterSensitiveLog = (obj: CodeEvent): any => ({
+ ...obj,
+ ...(obj.content && { content:
+ SENSITIVE_STRING
+ }),
+})
+
+/**
+ * Streaming Response Event for CodeReferences
+ * @public
+ */
+export interface CodeReferenceEvent {
+ /**
+ * Code References for Assistant Response Message
+ * @public
+ */
+ references?: (Reference)[] | undefined;
+}
+
+/**
+ * Streaming Response Event when DryRun is succeessful
+ * @public
+ */
+export interface DryRunSucceedEvent {
+}
+
+/**
+ * Streaming Response Event for Followup Prompt.
+ * @public
+ */
+export interface FollowupPromptEvent {
+ /**
+ * Followup Prompt for the Assistant Response
+ * @public
+ */
+ followupPrompt?: FollowupPrompt | undefined;
+}
+
+/**
+ * @internal
+ */
+export const FollowupPromptEventFilterSensitiveLog = (obj: FollowupPromptEvent): any => ({
+ ...obj,
+ ...(obj.followupPrompt && { followupPrompt:
+ FollowupPromptFilterSensitiveLog(obj.followupPrompt)
+ }),
+})
+
+/**
+ * @public
+ * @enum
+ */
+export const IntentType = {
+ GLUE_SENSEI: "GLUE_SENSEI",
+ RESOURCE_DATA: "RESOURCE_DATA",
+ SUPPORT: "SUPPORT",
+} as const
+/**
+ * @public
+ */
+export type IntentType = typeof IntentType[keyof typeof IntentType]
+
+/**
+ * @public
+ */
+export type IntentDataType =
+ | IntentDataType.StringMember
+ | IntentDataType.$UnknownMember
+
+/**
+ * @public
+ */
+export namespace IntentDataType {
+
+ export interface StringMember {
+ string: string;
+ $unknown?: never;
+ }
+
+ /**
+ * @public
+ */
+ export interface $UnknownMember {
+ string?: never;
+ $unknown: [string, any];
+ }
+
+ export interface Visitor {
+ string: (value: string) => T;
+ _: (name: string, value: any) => T;
+ }
+
+ export const visit = (
+ value: IntentDataType,
+ visitor: Visitor
+ ): T => {
+ if (value.string !== undefined) return visitor.string(value.string);
+ return visitor._(value.$unknown[0], value.$unknown[1]);
+ }
+
+}
+
+/**
+ * Streaming Response Event for Intents
+ * @public
+ */
+export interface IntentsEvent {
+ /**
+ * A map of Intent objects
+ * @public
+ */
+ intents?: Partial>> | undefined;
+}
+
+/**
+ * @internal
+ */
+export const IntentsEventFilterSensitiveLog = (obj: IntentsEvent): any => ({
+ ...obj,
+ ...(obj.intents && { intents:
+ SENSITIVE_STRING
+ }),
+})
+
+/**
+ * For CloudWatch Troubleshooting Link Module
+ * @public
+ */
+export interface CloudWatchTroubleshootingLink {
+ /**
+ * A label for the link.
+ * @public
+ */
+ label: string | undefined;
+
+ /**
+ * Stringified JSON payload. See spec here https://code.amazon.com/packages/CloudWatchOdysseyModel/blobs/50c0832f0e393e4ab68827eb4f04d832366821c1/--/model/events.smithy#L28 .
+ * @public
+ */
+ investigationPayload: string | undefined;
+
+ /**
+ * Fallback string, if target channel does not support the CloudWatchTroubleshootingLink.
+ * @public
+ */
+ defaultText?: string | undefined;
+}
+
+/**
+ * @internal
+ */
+export const CloudWatchTroubleshootingLinkFilterSensitiveLog = (obj: CloudWatchTroubleshootingLink): any => ({
+ ...obj,
+ ...(obj.label && { label:
+ SENSITIVE_STRING
+ }),
+ ...(obj.investigationPayload && { investigationPayload:
+ SENSITIVE_STRING
+ }),
+ ...(obj.defaultText && { defaultText:
+ SENSITIVE_STRING
+ }),
+})
+
+/**
+ * @public
+ */
+export interface ModuleLink {
+ /**
+ * For CloudWatch Troubleshooting Link Module
+ * @public
+ */
+ cloudWatchTroubleshootingLink?: CloudWatchTroubleshootingLink | undefined;
+}
+
+/**
+ * @internal
+ */
+export const ModuleLinkFilterSensitiveLog = (obj: ModuleLink): any => ({
+ ...obj,
+ ...(obj.cloudWatchTroubleshootingLink && { cloudWatchTroubleshootingLink:
+ CloudWatchTroubleshootingLinkFilterSensitiveLog(obj.cloudWatchTroubleshootingLink)
+ }),
+})
+
+/**
+ * @public
+ */
+export interface WebLink {
+ /**
+ * A label for the link
+ * @public
+ */
+ label: string | undefined;
+
+ /**
+ * URL of the Weblink
+ * @public
+ */
+ url: string | undefined;
+}
+
+/**
+ * @internal
+ */
+export const WebLinkFilterSensitiveLog = (obj: WebLink): any => ({
+ ...obj,
+ ...(obj.label && { label:
+ SENSITIVE_STRING
+ }),
+ ...(obj.url && { url:
+ SENSITIVE_STRING
+ }),
+})
+
+/**
+ * @public
+ */
+export interface Action {
+ webLink?: WebLink | undefined;
+ moduleLink?: ModuleLink | undefined;
+}
+
+/**
+ * @internal
+ */
+export const ActionFilterSensitiveLog = (obj: Action): any => ({
+ ...obj,
+ ...(obj.webLink && { webLink:
+ WebLinkFilterSensitiveLog(obj.webLink)
+ }),
+ ...(obj.moduleLink && { moduleLink:
+ ModuleLinkFilterSensitiveLog(obj.moduleLink)
+ }),
+})
+
+/**
+ * Structure representing a simple text component with sensitive content, which can include Markdown formatting.
+ * @public
+ */
+export interface Text {
+ /**
+ * Contains text content that may include sensitive information and can support Markdown formatting.
+ * @public
+ */
+ content: string | undefined;
+}
+
+/**
+ * @internal
+ */
+export const TextFilterSensitiveLog = (obj: Text): any => ({
+ ...obj,
+ ...(obj.content && { content:
+ SENSITIVE_STRING
+ }),
+})
+
+/**
+ * @public
+ */
+export interface AlertComponent {
+ /**
+ * Structure representing a simple text component with sensitive content, which can include Markdown formatting.
+ * @public
+ */
+ text?: Text | undefined;
+}
+
+/**
+ * @internal
+ */
+export const AlertComponentFilterSensitiveLog = (obj: AlertComponent): any => ({
+ ...obj,
+ ...(obj.text && { text:
+ TextFilterSensitiveLog(obj.text)
+ }),
+})
+
+/**
+ * @public
+ * @enum
+ */
+export const AlertType = {
+ /**
+ * Alert indicating an error or failure that requires attention.
+ */
+ ERROR: "ERROR",
+ /**
+ * Informational alert providing general information.
+ */
+ INFO: "INFO",
+ /**
+ * Alert indicating a warning or potential issue that should be noted.
+ */
+ WARNING: "WARNING",
+} as const
+/**
+ * @public
+ */
+export type AlertType = typeof AlertType[keyof typeof AlertType]
+
+/**
+ * Structure representing an alert with a type and content.
+ * @public
+ */
+export interface Alert {
+ /**
+ * Enum defining types of alerts that can be issued.
+ * @public
+ */
+ type: AlertType | undefined;
+
+ /**
+ * Contains the content of the alert, which may include sensitive information.
+ * @public
+ */
+ content: (AlertComponent)[] | undefined;
+}
+
+/**
+ * @internal
+ */
+export const AlertFilterSensitiveLog = (obj: Alert): any => ({
+ ...obj,
+ ...(obj.content && { content:
+ obj.content.map(
+ item =>
+ AlertComponentFilterSensitiveLog(item)
+ )
+ }),
+})
+
+/**
+ * Structure describing a transition between two states in an infrastructure update.
+ * @public
+ */
+export interface InfrastructureUpdateTransition {
+ /**
+ * The current state of the infrastructure before the update.
+ * @public
+ */
+ currentState: string | undefined;
+
+ /**
+ * The next state of the infrastructure following the update.
+ * @public
+ */
+ nextState: string | undefined;
+}
+
+/**
+ * @internal
+ */
+export const InfrastructureUpdateTransitionFilterSensitiveLog = (obj: InfrastructureUpdateTransition): any => ({
+ ...obj,
+ ...(obj.currentState && { currentState:
+ SENSITIVE_STRING
+ }),
+ ...(obj.nextState && { nextState:
+ SENSITIVE_STRING
+ }),
+})
+
+/**
+ * Structure representing different types of infrastructure updates.
+ * @public
+ */
+export interface InfrastructureUpdate {
+ /**
+ * Structure describing a transition between two states in an infrastructure update.
+ * @public
+ */
+ transition?: InfrastructureUpdateTransition | undefined;
+}
+
+/**
+ * @internal
+ */
+export const InfrastructureUpdateFilterSensitiveLog = (obj: InfrastructureUpdate): any => ({
+ ...obj,
+ ...(obj.transition && { transition:
+ InfrastructureUpdateTransitionFilterSensitiveLog(obj.transition)
+ }),
+})
+
+/**
+ * @public
+ */
+export interface StepComponent {
+ /**
+ * Structure representing a simple text component with sensitive content, which can include Markdown formatting.
+ * @public
+ */
+ text?: Text | undefined;
+}
+
+/**
+ * @internal
+ */
+export const StepComponentFilterSensitiveLog = (obj: StepComponent): any => ({
+ ...obj,
+ ...(obj.text && { text:
+ TextFilterSensitiveLog(obj.text)
+ }),
+})
+
+/**
+ * @public
+ * @enum
+ */
+export const StepState = {
+ /**
+ * Indicates a failure or issue that needs to be addressed.
+ */
+ FAILED: "FAILED",
+ /**
+ * Indicates that the step is currently being processed. This is a non-terminal state, meaning the process is active and ongoing.
+ */
+ IN_PROGRESS: "IN_PROGRESS",
+ /**
+ * Indicates that the step is being loaded or initialized. This is a non-terminal state, meaning the process is in the setup phase.
+ */
+ LOADING: "LOADING",
+ /**
+ * Indicates that the step is temporarily halted but can resume. This is a non-terminal state, representing a temporary pause.
+ */
+ PAUSED: "PAUSED",
+ /**
+ * Indicates that the step is waiting for some condition or input. This is a non-terminal state, meaning the process is paused but not complete.
+ */
+ PENDING: "PENDING",
+ /**
+ * Indicates that the step was stopped, either intentionally or unintentionally.
+ */
+ STOPPED: "STOPPED",
+ /**
+ * Indicates successful completion of the step.
+ */
+ SUCCEEDED: "SUCCEEDED",
+} as const
+/**
+ * @public
+ */
+export type StepState = typeof StepState[keyof typeof StepState]
+
+/**
+ * Structure representing an individual step in a process.
+ * @public
+ */
+export interface Step {
+ /**
+ * A unique identifier for the step. It must be a non-negative integer to ensure each step is distinct.
+ * @public
+ */
+ id: number | undefined;
+
+ /**
+ * Enum representing all possible step states, combining terminal and non-terminal states.
+ * @public
+ */
+ state: StepState | undefined;
+
+ /**
+ * A label for the step, providing a concise description.
+ * @public
+ */
+ label: string | undefined;
+
+ /**
+ * Optional content providing additional details about the step.
+ * @public
+ */
+ content?: (StepComponent)[] | undefined;
+}
+
+/**
+ * @internal
+ */
+export const StepFilterSensitiveLog = (obj: Step): any => ({
+ ...obj,
+ ...(obj.label && { label:
+ SENSITIVE_STRING
+ }),
+ ...(obj.content && { content:
+ obj.content.map(
+ item =>
+ StepComponentFilterSensitiveLog(item)
+ )
+ }),
+})
+
+/**
+ * @public
+ */
+export interface ProgressComponent {
+ /**
+ * Structure representing an individual step in a process.
+ * @public
+ */
+ step?: Step | undefined;
+}
+
+/**
+ * @internal
+ */
+export const ProgressComponentFilterSensitiveLog = (obj: ProgressComponent): any => ({
+ ...obj,
+ ...(obj.step && { step:
+ StepFilterSensitiveLog(obj.step)
+ }),
+})
+
+/**
+ * Structure representing a collection of steps in a process.
+ * @public
+ */
+export interface Progress {
+ /**
+ * A collection of steps that make up a process. Each step is detailed using the Step structure.
+ * @public
+ */
+ content: (ProgressComponent)[] | undefined;
+}
+
+/**
+ * @internal
+ */
+export const ProgressFilterSensitiveLog = (obj: Progress): any => ({
+ ...obj,
+ ...(obj.content && { content:
+ obj.content.map(
+ item =>
+ ProgressComponentFilterSensitiveLog(item)
+ )
+ }),
+})
+
+/**
+ * Structure representing a resource item
+ * @public
+ */
+export interface Resource {
+ /**
+ * Card title.
+ * @public
+ */
+ title: string | undefined;
+
+ /**
+ * Link for the resource item
+ * @public
+ */
+ link: string | undefined;
+
+ /**
+ * Short text about that resource for example Region: us-east-1
+ * @public
+ */
+ description: string | undefined;
+
+ /**
+ * Resource type e.g AWS EC2
+ * @public
+ */
+ type: string | undefined;
+
+ /**
+ * Amazon resource number e.g arn:aws:aec:.....
+ * @public
+ */
+ ARN: string | undefined;
+
+ /**
+ * A stringified object
+ * @public
+ */
+ resourceJsonString: string | undefined;
+}
+
+/**
+ * @internal
+ */
+export const ResourceFilterSensitiveLog = (obj: Resource): any => ({
+ ...obj,
+ ...(obj.title && { title:
+ SENSITIVE_STRING
+ }),
+ ...(obj.link && { link:
+ SENSITIVE_STRING
+ }),
+ ...(obj.description && { description:
+ SENSITIVE_STRING
+ }),
+ ...(obj.type && { type:
+ SENSITIVE_STRING
+ }),
+ ...(obj.ARN && { ARN:
+ SENSITIVE_STRING
+ }),
+ ...(obj.resourceJsonString && { resourceJsonString:
+ SENSITIVE_STRING
+ }),
+})
+
+/**
+ * Structure representing a list of Items
+ * @public
+ */
+export interface ResourceList {
+ /**
+ * Action associated with the list
+ * @public
+ */
+ action?: Action | undefined;
+
+ /**
+ * List of resources
+ * @public
+ */
+ items: (Resource)[] | undefined;
+}
+
+/**
+ * @internal
+ */
+export const ResourceListFilterSensitiveLog = (obj: ResourceList): any => ({
+ ...obj,
+ ...(obj.action && { action:
+ ActionFilterSensitiveLog(obj.action)
+ }),
+ ...(obj.items && { items:
+ obj.items.map(
+ item =>
+ ResourceFilterSensitiveLog(item)
+ )
+ }),
+})
+
+/**
+ * @public
+ */
+export interface SectionComponent {
+ /**
+ * Structure representing a simple text component with sensitive content, which can include Markdown formatting.
+ * @public
+ */
+ text?: Text | undefined;
+
+ /**
+ * Structure representing an alert with a type and content.
+ * @public
+ */
+ alert?: Alert | undefined;
+
+ /**
+ * Structure representing a resource item
+ * @public
+ */
+ resource?: Resource | undefined;
+
+ /**
+ * Structure representing a list of Items
+ * @public
+ */
+ resourceList?: ResourceList | undefined;
+}
+
+/**
+ * @internal
+ */
+export const SectionComponentFilterSensitiveLog = (obj: SectionComponent): any => ({
+ ...obj,
+ ...(obj.text && { text:
+ TextFilterSensitiveLog(obj.text)
+ }),
+ ...(obj.alert && { alert:
+ AlertFilterSensitiveLog(obj.alert)
+ }),
+ ...(obj.resource && { resource:
+ ResourceFilterSensitiveLog(obj.resource)
+ }),
+ ...(obj.resourceList && { resourceList:
+ ResourceListFilterSensitiveLog(obj.resourceList)
+ }),
+})
+
+/**
+ * Structure representing a collapsable section
+ * @public
+ */
+export interface Section {
+ /**
+ * Contains text content that may include sensitive information and can support Markdown formatting.
+ * @public
+ */
+ title: string | undefined;
+
+ /**
+ * Contains a list of interaction components e.g Text, Alert, List, etc.
+ * @public
+ */
+ content: (SectionComponent)[] | undefined;
+
+ /**
+ * Action associated with the Section
+ * @public
+ */
+ action?: Action | undefined;
+}
+
+/**
+ * @internal
+ */
+export const SectionFilterSensitiveLog = (obj: Section): any => ({
+ ...obj,
+ ...(obj.title && { title:
+ SENSITIVE_STRING
+ }),
+ ...(obj.content && { content:
+ obj.content.map(
+ item =>
+ SectionComponentFilterSensitiveLog(item)
+ )
+ }),
+ ...(obj.action && { action:
+ ActionFilterSensitiveLog(obj.action)
+ }),
+})
+
+/**
+ * Structure representing a suggestion for follow-ups.
+ * @public
+ */
+export interface Suggestion {
+ value: string | undefined;
+}
+
+/**
+ * @internal
+ */
+export const SuggestionFilterSensitiveLog = (obj: Suggestion): any => ({
+ ...obj,
+ ...(obj.value && { value:
+ SENSITIVE_STRING
+ }),
+})
+
+/**
+ * Structure containing a list of suggestions.
+ * @public
+ */
+export interface Suggestions {
+ items: (Suggestion)[] | undefined;
+}
+
+/**
+ * @internal
+ */
+export const SuggestionsFilterSensitiveLog = (obj: Suggestions): any => ({
+ ...obj,
+ ...(obj.items && { items:
+ obj.items.map(
+ item =>
+ SuggestionFilterSensitiveLog(item)
+ )
+ }),
+})
+
+/**
+ * Structure representing a confirmation message related to a task action.
+ * @public
+ */
+export interface TaskActionConfirmation {
+ /**
+ * Confirmation message related to the action note, which may include sensitive information.
+ * @public
+ */
+ content?: string | undefined;
+}
+
+/**
+ * @internal
+ */
+export const TaskActionConfirmationFilterSensitiveLog = (obj: TaskActionConfirmation): any => ({
+ ...obj,
+ ...(obj.content && { content:
+ SENSITIVE_STRING
+ }),
+})
+
+/**
+ * @public
+ * @enum
+ */
+export const TaskActionNoteType = {
+ /**
+ * Information note providing general details.
+ */
+ INFO: "INFO",
+ /**
+ * Warning note indicating a potential issue.
+ */
+ WARNING: "WARNING",
+} as const
+/**
+ * @public
+ */
+export type TaskActionNoteType = typeof TaskActionNoteType[keyof typeof TaskActionNoteType]
+
+/**
+ * Structure representing a note associated with a task action.
+ * @public
+ */
+export interface TaskActionNote {
+ /**
+ * Content of the note, which may include sensitive information.
+ * @public
+ */
+ content: string | undefined;
+
+ /**
+ * Enum defining the types of notes that can be associated with a task action.
+ * @public
+ */
+ type?: TaskActionNoteType | undefined;
+}
+
+/**
+ * @internal
+ */
+export const TaskActionNoteFilterSensitiveLog = (obj: TaskActionNote): any => ({
+ ...obj,
+ ...(obj.content && { content:
+ SENSITIVE_STRING
+ }),
+})
+
+/**
+ * Structure representing an action associated with a task.
+ * @public
+ */
+export interface TaskAction {
+ /**
+ * A label for the action.
+ * @public
+ */
+ label: string | undefined;
+
+ /**
+ * Structure representing a note associated with a task action.
+ * @public
+ */
+ note?: TaskActionNote | undefined;
+
+ /**
+ * Indicates whether the action is primary or not.
+ * @public
+ */
+ primary?: boolean | undefined;
+
+ /**
+ * Indicates whether the action is disabled or not.
+ * @public
+ */
+ disabled?: boolean | undefined;
+
+ /**
+ * Map representing key-value pairs for the payload of a task action.
+ * @public
+ */
+ payload: Record | undefined;
+
+ /**
+ * Structure representing a confirmation message related to a task action.
+ * @public
+ */
+ confirmation?: TaskActionConfirmation | undefined;
+}
+
+/**
+ * @internal
+ */
+export const TaskActionFilterSensitiveLog = (obj: TaskAction): any => ({
+ ...obj,
+ ...(obj.label && { label:
+ SENSITIVE_STRING
+ }),
+ ...(obj.note && { note:
+ TaskActionNoteFilterSensitiveLog(obj.note)
+ }),
+ ...(obj.payload && { payload:
+ SENSITIVE_STRING
+ }),
+ ...(obj.confirmation && { confirmation:
+ TaskActionConfirmationFilterSensitiveLog(obj.confirmation)
+ }),
+})
+
+/**
+ * Structure representing different types of components that can be part of a task.
+ * @public
+ */
+export interface TaskComponent {
+ /**
+ * Structure representing a simple text component with sensitive content, which can include Markdown formatting.
+ * @public
+ */
+ text?: Text | undefined;
+
+ /**
+ * Structure representing different types of infrastructure updates.
+ * @public
+ */
+ infrastructureUpdate?: InfrastructureUpdate | undefined;
+
+ /**
+ * Structure representing an alert with a type and content.
+ * @public
+ */
+ alert?: Alert | undefined;
+
+ /**
+ * Structure representing a collection of steps in a process.
+ * @public
+ */
+ progress?: Progress | undefined;
+}
+
+/**
+ * @internal
+ */
+export const TaskComponentFilterSensitiveLog = (obj: TaskComponent): any => ({
+ ...obj,
+ ...(obj.text && { text:
+ TextFilterSensitiveLog(obj.text)
+ }),
+ ...(obj.infrastructureUpdate && { infrastructureUpdate:
+ InfrastructureUpdateFilterSensitiveLog(obj.infrastructureUpdate)
+ }),
+ ...(obj.alert && { alert:
+ AlertFilterSensitiveLog(obj.alert)
+ }),
+ ...(obj.progress && { progress:
+ ProgressFilterSensitiveLog(obj.progress)
+ }),
+})
+
+/**
+ * Structure representing an overview of a task, including a label and description.
+ * @public
+ */
+export interface TaskOverview {
+ /**
+ * A label for the task overview.
+ * @public
+ */
+ label: string | undefined;
+
+ /**
+ * Text description providing details about the task. This field may include sensitive information and supports Markdown formatting.
+ * @public
+ */
+ description: string | undefined;
+}
+
+/**
+ * @internal
+ */
+export const TaskOverviewFilterSensitiveLog = (obj: TaskOverview): any => ({
+ ...obj,
+ ...(obj.label && { label:
+ SENSITIVE_STRING
+ }),
+ ...(obj.description && { description:
+ SENSITIVE_STRING
+ }),
+})
+
+/**
+ * Structure containing details about a task.
+ * @public
+ */
+export interface TaskDetails {
+ /**
+ * Structure representing an overview of a task, including a label and description.
+ * @public
+ */
+ overview: TaskOverview | undefined;
+
+ /**
+ * Lists the components that can be used to form the task's content.
+ * @public
+ */
+ content: (TaskComponent)[] | undefined;
+
+ /**
+ * Optional list of actions associated with the task.
+ * @public
+ */
+ actions?: (TaskAction)[] | undefined;
+}
+
+/**
+ * @internal
+ */
+export const TaskDetailsFilterSensitiveLog = (obj: TaskDetails): any => ({
+ ...obj,
+ ...(obj.overview && { overview:
+ TaskOverviewFilterSensitiveLog(obj.overview)
+ }),
+ ...(obj.content && { content:
+ obj.content.map(
+ item =>
+ TaskComponentFilterSensitiveLog(item)
+ )
+ }),
+ ...(obj.actions && { actions:
+ obj.actions.map(
+ item =>
+ TaskActionFilterSensitiveLog(item)
+ )
+ }),
+})
+
+/**
+ * Structure representing a reference to a task.
+ * @public
+ */
+export interface TaskReference {
+ /**
+ * Unique identifier for the task.
+ * @public
+ */
+ taskId: string | undefined;
+}
+
+/**
+ * Structure representing different types of interaction components.
+ * @public
+ */
+export interface InteractionComponent {
+ /**
+ * Structure representing a simple text component with sensitive content, which can include Markdown formatting.
+ * @public
+ */
+ text?: Text | undefined;
+
+ /**
+ * Structure representing an alert with a type and content.
+ * @public
+ */
+ alert?: Alert | undefined;
+
+ /**
+ * Structure representing different types of infrastructure updates.
+ * @public
+ */
+ infrastructureUpdate?: InfrastructureUpdate | undefined;
+
+ /**
+ * Structure representing a collection of steps in a process.
+ * @public
+ */
+ progress?: Progress | undefined;
+
+ /**
+ * Structure representing an individual step in a process.
+ * @public
+ */
+ step?: Step | undefined;
+
+ /**
+ * Structure containing details about a task.
+ * @public
+ */
+ taskDetails?: TaskDetails | undefined;
+
+ /**
+ * Structure representing a reference to a task.
+ * @public
+ */
+ taskReference?: TaskReference | undefined;
+
+ /**
+ * Structure containing a list of suggestions.
+ * @public
+ */
+ suggestions?: Suggestions | undefined;
+
+ /**
+ * Structure representing a collapsable section
+ * @public
+ */
+ section?: Section | undefined;
+
+ /**
+ * Structure representing a resource item
+ * @public
+ */
+ resource?: Resource | undefined;
+
/**
+ * Structure representing a list of Items
* @public
- * Generated code snippet.
*/
- content: string | undefined;
+ resourceList?: ResourceList | undefined;
+
+ action?: Action | undefined;
}
/**
* @internal
*/
-export const CodeEventFilterSensitiveLog = (obj: CodeEvent): any => ({
+export const InteractionComponentFilterSensitiveLog = (obj: InteractionComponent): any => ({
...obj,
- ...(obj.content && { content:
- SENSITIVE_STRING
+ ...(obj.text && { text:
+ TextFilterSensitiveLog(obj.text)
+ }),
+ ...(obj.alert && { alert:
+ AlertFilterSensitiveLog(obj.alert)
+ }),
+ ...(obj.infrastructureUpdate && { infrastructureUpdate:
+ InfrastructureUpdateFilterSensitiveLog(obj.infrastructureUpdate)
+ }),
+ ...(obj.progress && { progress:
+ ProgressFilterSensitiveLog(obj.progress)
+ }),
+ ...(obj.step && { step:
+ StepFilterSensitiveLog(obj.step)
+ }),
+ ...(obj.taskDetails && { taskDetails:
+ TaskDetailsFilterSensitiveLog(obj.taskDetails)
+ }),
+ ...(obj.suggestions && { suggestions:
+ SuggestionsFilterSensitiveLog(obj.suggestions)
+ }),
+ ...(obj.section && { section:
+ SectionFilterSensitiveLog(obj.section)
+ }),
+ ...(obj.resource && { resource:
+ ResourceFilterSensitiveLog(obj.resource)
+ }),
+ ...(obj.resourceList && { resourceList:
+ ResourceListFilterSensitiveLog(obj.resourceList)
+ }),
+ ...(obj.action && { action:
+ ActionFilterSensitiveLog(obj.action)
}),
})
/**
+ * Interaction component with an identifier
* @public
- * Streaming Response Event for CodeReferences
*/
-export interface CodeReferenceEvent {
+export interface InteractionComponentEntry {
/**
+ * Identifier that can uniquely identify the interaction component within
+ * stream response. This field is optional.
* @public
- * Code References for Assistant Response Message
*/
- references?: (Reference)[];
-}
+ interactionComponentId?: string | undefined;
-/**
- * @public
- * Streaming Response Event for Followup Prompt.
- */
-export interface FollowupPromptEvent {
/**
+ * Interaction component
* @public
- * Followup Prompt for the Assistant Response
*/
- followupPrompt?: FollowupPrompt;
+ interactionComponent: InteractionComponent | undefined;
}
/**
* @internal
*/
-export const FollowupPromptEventFilterSensitiveLog = (obj: FollowupPromptEvent): any => ({
+export const InteractionComponentEntryFilterSensitiveLog = (obj: InteractionComponentEntry): any => ({
...obj,
- ...(obj.followupPrompt && { followupPrompt:
- FollowupPromptFilterSensitiveLog(obj.followupPrompt)
+ ...(obj.interactionComponent && { interactionComponent:
+ InteractionComponentFilterSensitiveLog(obj.interactionComponent)
}),
})
/**
+ * Streaming Event for interaction components list
* @public
- * @enum
- */
-export const IntentType = {
- GLUE_SENSEI: "GLUE_SENSEI",
- RESOURCE_DATA: "RESOURCE_DATA",
- SUPPORT: "SUPPORT",
-} as const
-/**
- * @public
- */
-export type IntentType = typeof IntentType[keyof typeof IntentType]
-
-/**
- * @public
- */
-export type IntentDataType =
- | IntentDataType.StringMember
- | IntentDataType.$UnknownMember
-
-/**
- * @public
- */
-export namespace IntentDataType {
-
- export interface StringMember {
- string: string;
- $unknown?: never;
- }
-
- /**
- * @public
- */
- export interface $UnknownMember {
- string?: never;
- $unknown: [string, any];
- }
-
- export interface Visitor {
- string: (value: string) => T;
- _: (name: string, value: any) => T;
- }
-
- export const visit = (
- value: IntentDataType,
- visitor: Visitor
- ): T => {
- if (value.string !== undefined) return visitor.string(value.string);
- return visitor._(value.$unknown[0], value.$unknown[1]);
- }
-
-}
-
-/**
- * @public
- * Streaming Response Event for Intents
*/
-export interface IntentsEvent {
+export interface InteractionComponentsEvent {
/**
+ * List of identifiable interaction components
* @public
- * A map of Intent objects
*/
- intents?: Record>;
+ interactionComponentEntries: (InteractionComponentEntry)[] | undefined;
}
/**
* @internal
*/
-export const IntentsEventFilterSensitiveLog = (obj: IntentsEvent): any => ({
+export const InteractionComponentsEventFilterSensitiveLog = (obj: InteractionComponentsEvent): any => ({
...obj,
- ...(obj.intents && { intents:
- SENSITIVE_STRING
+ ...(obj.interactionComponentEntries && { interactionComponentEntries:
+ obj.interactionComponentEntries.map(
+ item =>
+ InteractionComponentEntryFilterSensitiveLog(item)
+ )
}),
})
@@ -1498,41 +2658,47 @@ export const InvalidStateReason = {
export type InvalidStateReason = typeof InvalidStateReason[keyof typeof InvalidStateReason]
/**
- * @public
* Streaming Response Event when an Invalid State is reached
+ * @public
*/
export interface InvalidStateEvent {
/**
- * @public
* Reasons for Invalid State Event
+ * @public
*/
- reason: InvalidStateReason | string | undefined;
+ reason: InvalidStateReason | undefined;
message: string | undefined;
}
/**
- * @public
* Streaming Response Event for AssistantResponse Metadata
+ * @public
*/
export interface MessageMetadataEvent {
/**
- * @public
* Unique identifier for the conversation
+ * @public
+ */
+ conversationId?: string | undefined;
+
+ /**
+ * Unique identifier for the utterance
+ * @public
*/
- conversationId?: string;
+ utteranceId?: string | undefined;
}
/**
- * @public
* Streaming Response Event for SupplementaryWebLinks
+ * @public
*/
export interface SupplementaryWebLinksEvent {
/**
- * @public
* Web References for Assistant Response Message
+ * @public
*/
- supplementaryWebLinks?: (SupplementaryWebLink)[];
+ supplementaryWebLinks?: (SupplementaryWebLink)[] | undefined;
}
/**
@@ -1549,16 +2715,18 @@ export const SupplementaryWebLinksEventFilterSensitiveLog = (obj: SupplementaryW
})
/**
- * @public
* Streaming events from UniDirectional Streaming Conversational APIs.
+ * @public
*/
export type ChatResponseStream =
| ChatResponseStream.AssistantResponseEventMember
| ChatResponseStream.CodeEventMember
| ChatResponseStream.CodeReferenceEventMember
+ | ChatResponseStream.DryRunSucceedEventMember
| ChatResponseStream.ErrorMember
| ChatResponseStream.FollowupPromptEventMember
| ChatResponseStream.IntentsEventMember
+ | ChatResponseStream.InteractionComponentsEventMember
| ChatResponseStream.InvalidStateEventMember
| ChatResponseStream.MessageMetadataEventMember
| ChatResponseStream.SupplementaryWebLinksEventMember
@@ -1570,153 +2738,209 @@ export type ChatResponseStream =
export namespace ChatResponseStream {
/**
- * @public
* Message Metadata event
+ * @public
*/
export interface MessageMetadataEventMember {
messageMetadataEvent: MessageMetadataEvent;
assistantResponseEvent?: never;
+ dryRunSucceedEvent?: never;
codeReferenceEvent?: never;
supplementaryWebLinksEvent?: never;
followupPromptEvent?: never;
codeEvent?: never;
intentsEvent?: never;
+ interactionComponentsEvent?: never;
invalidStateEvent?: never;
error?: never;
$unknown?: never;
}
/**
- * @public
* Assistant response event - Text / Code snippet
+ * @public
*/
export interface AssistantResponseEventMember {
messageMetadataEvent?: never;
assistantResponseEvent: AssistantResponseEvent;
+ dryRunSucceedEvent?: never;
codeReferenceEvent?: never;
supplementaryWebLinksEvent?: never;
followupPromptEvent?: never;
codeEvent?: never;
intentsEvent?: never;
+ interactionComponentsEvent?: never;
invalidStateEvent?: never;
error?: never;
$unknown?: never;
}
/**
+ * DryRun Succeed Event
* @public
+ */
+ export interface DryRunSucceedEventMember {
+ messageMetadataEvent?: never;
+ assistantResponseEvent?: never;
+ dryRunSucceedEvent: DryRunSucceedEvent;
+ codeReferenceEvent?: never;
+ supplementaryWebLinksEvent?: never;
+ followupPromptEvent?: never;
+ codeEvent?: never;
+ intentsEvent?: never;
+ interactionComponentsEvent?: never;
+ invalidStateEvent?: never;
+ error?: never;
+ $unknown?: never;
+ }
+
+ /**
* Code References event
+ * @public
*/
export interface CodeReferenceEventMember {
messageMetadataEvent?: never;
assistantResponseEvent?: never;
+ dryRunSucceedEvent?: never;
codeReferenceEvent: CodeReferenceEvent;
supplementaryWebLinksEvent?: never;
followupPromptEvent?: never;
codeEvent?: never;
intentsEvent?: never;
+ interactionComponentsEvent?: never;
invalidStateEvent?: never;
error?: never;
$unknown?: never;
}
/**
- * @public
* Web Reference links event
+ * @public
*/
export interface SupplementaryWebLinksEventMember {
messageMetadataEvent?: never;
assistantResponseEvent?: never;
+ dryRunSucceedEvent?: never;
codeReferenceEvent?: never;
supplementaryWebLinksEvent: SupplementaryWebLinksEvent;
followupPromptEvent?: never;
codeEvent?: never;
intentsEvent?: never;
+ interactionComponentsEvent?: never;
invalidStateEvent?: never;
error?: never;
$unknown?: never;
}
/**
- * @public
* Followup prompt event
+ * @public
*/
export interface FollowupPromptEventMember {
messageMetadataEvent?: never;
assistantResponseEvent?: never;
+ dryRunSucceedEvent?: never;
codeReferenceEvent?: never;
supplementaryWebLinksEvent?: never;
followupPromptEvent: FollowupPromptEvent;
codeEvent?: never;
intentsEvent?: never;
+ interactionComponentsEvent?: never;
invalidStateEvent?: never;
error?: never;
$unknown?: never;
}
/**
- * @public
* Code Generated event
+ * @public
*/
export interface CodeEventMember {
messageMetadataEvent?: never;
assistantResponseEvent?: never;
+ dryRunSucceedEvent?: never;
codeReferenceEvent?: never;
supplementaryWebLinksEvent?: never;
followupPromptEvent?: never;
codeEvent: CodeEvent;
intentsEvent?: never;
+ interactionComponentsEvent?: never;
invalidStateEvent?: never;
error?: never;
$unknown?: never;
}
/**
- * @public
* Intents event
+ * @public
*/
export interface IntentsEventMember {
messageMetadataEvent?: never;
assistantResponseEvent?: never;
+ dryRunSucceedEvent?: never;
codeReferenceEvent?: never;
supplementaryWebLinksEvent?: never;
followupPromptEvent?: never;
codeEvent?: never;
intentsEvent: IntentsEvent;
+ interactionComponentsEvent?: never;
invalidStateEvent?: never;
error?: never;
$unknown?: never;
}
/**
+ * Interactions components event
* @public
+ */
+ export interface InteractionComponentsEventMember {
+ messageMetadataEvent?: never;
+ assistantResponseEvent?: never;
+ dryRunSucceedEvent?: never;
+ codeReferenceEvent?: never;
+ supplementaryWebLinksEvent?: never;
+ followupPromptEvent?: never;
+ codeEvent?: never;
+ intentsEvent?: never;
+ interactionComponentsEvent: InteractionComponentsEvent;
+ invalidStateEvent?: never;
+ error?: never;
+ $unknown?: never;
+ }
+
+ /**
* Invalid State event
+ * @public
*/
export interface InvalidStateEventMember {
messageMetadataEvent?: never;
assistantResponseEvent?: never;
+ dryRunSucceedEvent?: never;
codeReferenceEvent?: never;
supplementaryWebLinksEvent?: never;
followupPromptEvent?: never;
codeEvent?: never;
intentsEvent?: never;
+ interactionComponentsEvent?: never;
invalidStateEvent: InvalidStateEvent;
error?: never;
$unknown?: never;
}
/**
- * @public
* Internal Server Exception
+ * @public
*/
export interface ErrorMember {
messageMetadataEvent?: never;
assistantResponseEvent?: never;
+ dryRunSucceedEvent?: never;
codeReferenceEvent?: never;
supplementaryWebLinksEvent?: never;
followupPromptEvent?: never;
codeEvent?: never;
intentsEvent?: never;
+ interactionComponentsEvent?: never;
invalidStateEvent?: never;
error: InternalServerException;
$unknown?: never;
@@ -1728,11 +2952,13 @@ export namespace ChatResponseStream {
export interface $UnknownMember {
messageMetadataEvent?: never;
assistantResponseEvent?: never;
+ dryRunSucceedEvent?: never;
codeReferenceEvent?: never;
supplementaryWebLinksEvent?: never;
followupPromptEvent?: never;
codeEvent?: never;
intentsEvent?: never;
+ interactionComponentsEvent?: never;
invalidStateEvent?: never;
error?: never;
$unknown: [string, any];
@@ -1741,11 +2967,13 @@ export namespace ChatResponseStream {
export interface Visitor {
messageMetadataEvent: (value: MessageMetadataEvent) => T;
assistantResponseEvent: (value: AssistantResponseEvent) => T;
+ dryRunSucceedEvent: (value: DryRunSucceedEvent) => T;
codeReferenceEvent: (value: CodeReferenceEvent) => T;
supplementaryWebLinksEvent: (value: SupplementaryWebLinksEvent) => T;
followupPromptEvent: (value: FollowupPromptEvent) => T;
codeEvent: (value: CodeEvent) => T;
intentsEvent: (value: IntentsEvent) => T;
+ interactionComponentsEvent: (value: InteractionComponentsEvent) => T;
invalidStateEvent: (value: InvalidStateEvent) => T;
error: (value: InternalServerException) => T;
_: (name: string, value: any) => T;
@@ -1757,11 +2985,13 @@ export namespace ChatResponseStream {
): T => {
if (value.messageMetadataEvent !== undefined) return visitor.messageMetadataEvent(value.messageMetadataEvent);
if (value.assistantResponseEvent !== undefined) return visitor.assistantResponseEvent(value.assistantResponseEvent);
+ if (value.dryRunSucceedEvent !== undefined) return visitor.dryRunSucceedEvent(value.dryRunSucceedEvent);
if (value.codeReferenceEvent !== undefined) return visitor.codeReferenceEvent(value.codeReferenceEvent);
if (value.supplementaryWebLinksEvent !== undefined) return visitor.supplementaryWebLinksEvent(value.supplementaryWebLinksEvent);
if (value.followupPromptEvent !== undefined) return visitor.followupPromptEvent(value.followupPromptEvent);
if (value.codeEvent !== undefined) return visitor.codeEvent(value.codeEvent);
if (value.intentsEvent !== undefined) return visitor.intentsEvent(value.intentsEvent);
+ if (value.interactionComponentsEvent !== undefined) return visitor.interactionComponentsEvent(value.interactionComponentsEvent);
if (value.invalidStateEvent !== undefined) return visitor.invalidStateEvent(value.invalidStateEvent);
if (value.error !== undefined) return visitor.error(value.error);
return visitor._(value.$unknown[0], value.$unknown[1]);
@@ -1778,6 +3008,9 @@ export const ChatResponseStreamFilterSensitiveLog = (obj: ChatResponseStream): a
if (obj.assistantResponseEvent !== undefined) return {assistantResponseEvent:
AssistantResponseEventFilterSensitiveLog(obj.assistantResponseEvent)
};
+ if (obj.dryRunSucceedEvent !== undefined) return {dryRunSucceedEvent:
+ obj.dryRunSucceedEvent
+ };
if (obj.codeReferenceEvent !== undefined) return {codeReferenceEvent:
obj.codeReferenceEvent
};
@@ -1793,6 +3026,9 @@ export const ChatResponseStreamFilterSensitiveLog = (obj: ChatResponseStream): a
if (obj.intentsEvent !== undefined) return {intentsEvent:
IntentsEventFilterSensitiveLog(obj.intentsEvent)
};
+ if (obj.interactionComponentsEvent !== undefined) return {interactionComponentsEvent:
+ InteractionComponentsEventFilterSensitiveLog(obj.interactionComponentsEvent)
+ };
if (obj.invalidStateEvent !== undefined) return {invalidStateEvent:
obj.invalidStateEvent
};
@@ -1811,6 +3047,10 @@ export const ChatTriggerType = {
* Indicates the Chat was triggered in response to a IDE diagnostic
*/
DIAGNOSTIC: "DIAGNOSTIC",
+ /**
+ * Indicates the Chat was triggered in response to an inline chat event
+ */
+ INLINE_CHAT: "INLINE_CHAT",
/**
* Indicates the Chat was triggered due to an explicit chat request by an end-user
*/
@@ -1835,35 +3075,35 @@ export const ContextTruncationScheme = {
export type ContextTruncationScheme = typeof ContextTruncationScheme[keyof typeof ContextTruncationScheme]
/**
- * @public
* Structure to represent the current state of a chat conversation.
+ * @public
*/
export interface ConversationState {
/**
- * @public
* Unique identifier for the chat conversation stream
+ * @public
*/
- conversationId?: string;
+ conversationId?: string | undefined;
/**
- * @public
* Holds the history of chat messages.
+ * @public
*/
- history?: (ChatMessage)[];
+ history?: (ChatMessage)[] | undefined;
/**
- * @public
* Holds the current message being processed or displayed.
+ * @public
*/
currentMessage: ChatMessage | undefined;
/**
- * @public
* Trigger Reason for Chat
+ * @public
*/
- chatTriggerType: ChatTriggerType | string | undefined;
+ chatTriggerType: ChatTriggerType | undefined;
- customizationArn?: string;
+ customizationArn?: string | undefined;
}
/**
@@ -1883,13 +3123,13 @@ export const ConversationStateFilterSensitiveLog = (obj: ConversationState): any
})
/**
- * @public
* This exception is translated to a 204 as it succeeded the IAM Auth.
+ * @public
*/
export class DryRunOperationException extends __BaseException {
readonly name: "DryRunOperationException" = "DryRunOperationException";
readonly $fault: "client" = "client";
- responseCode?: number;
+ responseCode?: number | undefined;
/**
* @internal
*/
@@ -1910,6 +3150,7 @@ export class DryRunOperationException extends __BaseException {
*/
export const TransformationDownloadArtifactType = {
CLIENT_INSTRUCTIONS: "ClientInstructions",
+ GENERATED_CODE: "GeneratedCode",
LOGS: "Logs",
} as const
/**
@@ -1918,30 +3159,31 @@ export const TransformationDownloadArtifactType = {
export type TransformationDownloadArtifactType = typeof TransformationDownloadArtifactType[keyof typeof TransformationDownloadArtifactType]
/**
- * @public
* Transformation export context
+ * @public
*/
export interface TransformationExportContext {
downloadArtifactId: string | undefined;
- downloadArtifactType: TransformationDownloadArtifactType | string | undefined;
+ downloadArtifactType: TransformationDownloadArtifactType | undefined;
}
/**
- * @public
* Unit test generation export context
+ * @public
*/
export interface UnitTestGenerationExportContext {
/**
- * @public
* Test generation job group name
+ * @public
*/
testGenerationJobGroupName: string | undefined;
- testGenerationJobId?: string;
+ testGenerationJobId?: string | undefined;
}
/**
* Export Context
+ * @public
*/
export type ExportContext =
| ExportContext.TransformationExportContextMember
@@ -1954,8 +3196,8 @@ export type ExportContext =
export namespace ExportContext {
/**
- * @public
* Transformation export context
+ * @public
*/
export interface TransformationExportContextMember {
transformationExportContext: TransformationExportContext;
@@ -1964,8 +3206,8 @@ export namespace ExportContext {
}
/**
- * @public
* Unit test generation export context
+ * @public
*/
export interface UnitTestGenerationExportContextMember {
transformationExportContext?: never;
@@ -2023,8 +3265,8 @@ export const ExportIntent = {
export type ExportIntent = typeof ExportIntent[keyof typeof ExportIntent]
/**
- * @public
* Response Stream
+ * @public
*/
export type ResultArchiveStream =
| ResultArchiveStream.BinaryMetadataEventMember
@@ -2038,8 +3280,8 @@ export type ResultArchiveStream =
export namespace ResultArchiveStream {
/**
- * @public
* Payload Part
+ * @public
*/
export interface BinaryMetadataEventMember {
binaryMetadataEvent: BinaryMetadataEvent;
@@ -2049,8 +3291,8 @@ export namespace ResultArchiveStream {
}
/**
- * @public
* Payload Part
+ * @public
*/
export interface BinaryPayloadEventMember {
binaryMetadataEvent?: never;
@@ -2060,8 +3302,8 @@ export namespace ResultArchiveStream {
}
/**
- * @public
* This exception is thrown when an unexpected error occurred during the processing of a request.
+ * @public
*/
export interface InternalServerExceptionMember {
binaryMetadataEvent?: never;
@@ -2115,8 +3357,8 @@ export const ResultArchiveStreamFilterSensitiveLog = (obj: ResultArchiveStream):
}
/**
- * @public
* This exception is thrown when request was denied due to caller exceeding their usage limits
+ * @public
*/
export class ServiceQuotaExceededException extends __BaseException {
readonly name: "ServiceQuotaExceededException" = "ServiceQuotaExceededException";
@@ -2135,41 +3377,41 @@ export class ServiceQuotaExceededException extends __BaseException {
}
/**
- * @public
* Represents a Workspace state uploaded to S3 for Async Code Actions
+ * @public
*/
export interface WorkspaceState {
/**
- * @public
* Upload ID representing an Upload using a PreSigned URL
+ * @public
*/
uploadId: string | undefined;
/**
- * @public
* Primary programming language of the Workspace
+ * @public
*/
programmingLanguage: ProgrammingLanguage | undefined;
/**
- * @public
* Workspace context truncation schemes based on usecase
+ * @public
*/
- contextTruncationScheme?: ContextTruncationScheme | string;
+ contextTruncationScheme?: ContextTruncationScheme | undefined;
}
/**
- * @public
* Structure to represent a new generate assistant response request.
+ * @public
*/
export interface GenerateAssistantResponseRequest {
/**
- * @public
* Structure to represent the current state of a chat conversation.
+ * @public
*/
conversationState: ConversationState | undefined;
- profileArn?: string;
+ profileArn?: string | undefined;
}
/**
@@ -2183,19 +3425,19 @@ export const GenerateAssistantResponseRequestFilterSensitiveLog = (obj: Generate
})
/**
- * @public
* Structure to represent generate assistant response response.
+ * @public
*/
export interface GenerateAssistantResponseResponse {
/**
- * @public
* ID which represents a multi-turn conversation
+ * @public
*/
conversationId: string | undefined;
/**
- * @public
* Streaming events from UniDirectional Streaming Conversational APIs.
+ * @public
*/
generateAssistantResponseResponse: AsyncIterable | undefined;
}
@@ -2211,32 +3453,32 @@ export const GenerateAssistantResponseResponseFilterSensitiveLog = (obj: Generat
})
/**
- * @public
* Structure to represent a new ExportResultArchive request.
+ * @public
*/
export interface ExportResultArchiveRequest {
exportId: string | undefined;
/**
- * @public
* Export Intent
+ * @public
*/
- exportIntent: ExportIntent | string | undefined;
+ exportIntent: ExportIntent | undefined;
/**
- * @public
* Export Context
+ * @public
*/
- exportContext?: ExportContext;
+ exportContext?: ExportContext | undefined;
}
/**
- * @public
* Structure to represent ExportResultArchive response.
+ * @public
*/
export interface ExportResultArchiveResponse {
/**
- * @public
* Response Stream
+ * @public
*/
body: AsyncIterable | undefined;
}
@@ -2284,6 +3526,10 @@ export const Origin = {
* AWS Mobile Application (ACMA)
*/
MOBILE: "MOBILE",
+ /**
+ * Amazon SageMaker's Rome Chat.
+ */
+ SAGE_MAKER: "SAGE_MAKER",
/**
* Internal Service Traffic (Integ Tests, Canaries, etc.). This is the default when no Origin header present in request.
*/
@@ -2303,30 +3549,30 @@ export const Origin = {
export type Origin = typeof Origin[keyof typeof Origin]
/**
+ * Structure to represent a SendMessage request.
* @public
- * Structure to represent a new generate assistant response request.
*/
-export interface ConverseStreamRequest {
+export interface SendMessageRequest {
/**
- * @public
* Structure to represent the current state of a chat conversation.
+ * @public
*/
conversationState: ConversationState | undefined;
- profileArn?: string;
+ profileArn?: string | undefined;
/**
- * @public
* The origin of the caller
+ * @public
*/
- source?: Origin | string;
+ source?: Origin | undefined;
- dryRun?: boolean;
+ dryRun?: boolean | undefined;
}
/**
* @internal
*/
-export const ConverseStreamRequestFilterSensitiveLog = (obj: ConverseStreamRequest): any => ({
+export const SendMessageRequestFilterSensitiveLog = (obj: SendMessageRequest): any => ({
...obj,
...(obj.conversationState && { conversationState:
ConversationStateFilterSensitiveLog(obj.conversationState)
@@ -2334,53 +3580,41 @@ export const ConverseStreamRequestFilterSensitiveLog = (obj: ConverseStreamReque
})
/**
+ * Structure to represent a SendMessage response.
* @public
- * Structure to represent generate assistant response response.
*/
-export interface ConverseStreamResponse {
- /**
- * @public
- * ID which represents a multi-turn conversation
- */
- conversationId: string | undefined;
-
+export interface SendMessageResponse {
/**
- * @public
- * UtteranceId
- */
- utteranceId?: string;
-
- /**
- * @public
* Streaming events from UniDirectional Streaming Conversational APIs.
+ * @public
*/
- converseStreamResponse: AsyncIterable | undefined;
+ sendMessageResponse: AsyncIterable | undefined;
}
/**
* @internal
*/
-export const ConverseStreamResponseFilterSensitiveLog = (obj: ConverseStreamResponse): any => ({
+export const SendMessageResponseFilterSensitiveLog = (obj: SendMessageResponse): any => ({
...obj,
- ...(obj.converseStreamResponse && { converseStreamResponse:
+ ...(obj.sendMessageResponse && { sendMessageResponse:
'STREAMING_CONTENT'
}),
})
/**
- * @public
* Structure to represent execute planning interaction request.
+ * @public
*/
export interface GenerateTaskAssistPlanRequest {
/**
- * @public
* Structure to represent the current state of a chat conversation.
+ * @public
*/
conversationState: ConversationState | undefined;
/**
- * @public
* Represents a Workspace state uploaded to S3 for Async Code Actions
+ * @public
*/
workspaceState: WorkspaceState | undefined;
}
@@ -2396,15 +3630,15 @@ export const GenerateTaskAssistPlanRequestFilterSensitiveLog = (obj: GenerateTas
})
/**
- * @public
* Structure to represent execute planning interaction response.
+ * @public
*/
export interface GenerateTaskAssistPlanResponse {
/**
- * @public
* Streaming events from UniDirectional Streaming Conversational APIs.
+ * @public
*/
- planningResponseStream?: AsyncIterable;
+ planningResponseStream?: AsyncIterable | undefined;
}
/**
diff --git a/src.gen/@amzn/codewhisperer-streaming/src/protocols/Aws_restJson1.ts b/src.gen/@amzn/codewhisperer-streaming/src/protocols/Aws_restJson1.ts
index 4cb959b355a..145357d7a7e 100644
--- a/src.gen/@amzn/codewhisperer-streaming/src/protocols/Aws_restJson1.ts
+++ b/src.gen/@amzn/codewhisperer-streaming/src/protocols/Aws_restJson1.ts
@@ -1,8 +1,4 @@
// smithy-typescript generated code
-import {
- ConverseStreamCommandInput,
- ConverseStreamCommandOutput,
-} from "../commands/ConverseStreamCommand";
import {
ExportResultArchiveCommandInput,
ExportResultArchiveCommandOutput,
@@ -15,6 +11,10 @@ import {
GenerateTaskAssistPlanCommandInput,
GenerateTaskAssistPlanCommandOutput,
} from "../commands/GenerateTaskAssistPlanCommand";
+import {
+ SendMessageCommandInput,
+ SendMessageCommandOutput,
+} from "../commands/SendMessageCommand";
import { CodeWhispererStreamingServiceException as __BaseException } from "../models/CodeWhispererStreamingServiceException";
import {
AccessDeniedException,
@@ -34,6 +34,7 @@ import {
Diagnostic,
DocumentSymbol,
DryRunOperationException,
+ DryRunSucceedEvent,
EditorState,
EnvState,
EnvironmentVariable,
@@ -42,6 +43,9 @@ import {
FollowupPromptEvent,
GitState,
IntentsEvent,
+ InteractionComponent,
+ InteractionComponentEntry,
+ InteractionComponentsEvent,
InternalServerException,
InvalidStateEvent,
MessageMetadataEvent,
@@ -63,12 +67,19 @@ import {
TextDocumentDiagnostic,
ThrottlingException,
TransformationExportContext,
+ UnitTestGenerationExportContext,
UserInputMessage,
UserInputMessageContext,
UserSettings,
ValidationException,
WorkspaceState,
} from "../models/models_0";
+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,
@@ -97,26 +108,21 @@ export const se_ExportResultArchiveCommand = async(
input: ExportResultArchiveCommandInput,
context: __SerdeContext
): Promise<__HttpRequest> => {
- const {hostname, protocol = "https", port, path: basePath} = await context.endpoint();
+ const b = rb(input, context);
const headers: any = {
'content-type': 'application/json',
};
- let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/exportResultArchive";
+ b.bp("/exportResultArchive");
let body: any;
body = JSON.stringify(take(input, {
'exportContext': _ => _json(_),
'exportId': [],
'exportIntent': [],
}));
- return new __HttpRequest({
- protocol,
- hostname,
- port,
- method: "POST",
- headers,
- path: resolvedPath,
- body,
- });
+ b.m("POST")
+ .h(headers)
+ .b(body);
+ return b.build();
}
/**
@@ -126,25 +132,20 @@ export const se_GenerateAssistantResponseCommand = async(
input: GenerateAssistantResponseCommandInput,
context: __SerdeContext
): Promise<__HttpRequest> => {
- const {hostname, protocol = "https", port, path: basePath} = await context.endpoint();
+ const b = rb(input, context);
const headers: any = {
'content-type': 'application/json',
};
- let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/generateAssistantResponse";
+ b.bp("/generateAssistantResponse");
let body: any;
body = JSON.stringify(take(input, {
'conversationState': _ => _json(_),
'profileArn': [],
}));
- return new __HttpRequest({
- protocol,
- hostname,
- port,
- method: "POST",
- headers,
- path: resolvedPath,
- body,
- });
+ b.m("POST")
+ .h(headers)
+ .b(body);
+ return b.build();
}
/**
@@ -154,39 +155,34 @@ export const se_GenerateTaskAssistPlanCommand = async(
input: GenerateTaskAssistPlanCommandInput,
context: __SerdeContext
): Promise<__HttpRequest> => {
- const {hostname, protocol = "https", port, path: basePath} = await context.endpoint();
+ const b = rb(input, context);
const headers: any = {
'content-type': 'application/json',
};
- let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/generateTaskAssistPlan";
+ b.bp("/generateTaskAssistPlan");
let body: any;
body = JSON.stringify(take(input, {
'conversationState': _ => _json(_),
'workspaceState': _ => _json(_),
}));
- return new __HttpRequest({
- protocol,
- hostname,
- port,
- method: "POST",
- headers,
- path: resolvedPath,
- body,
- });
+ b.m("POST")
+ .h(headers)
+ .b(body);
+ return b.build();
}
/**
- * serializeAws_restJson1ConverseStreamCommand
+ * serializeAws_restJson1SendMessageCommand
*/
-export const se_ConverseStreamCommand = async(
- input: ConverseStreamCommandInput,
+export const se_SendMessageCommand = async(
+ input: SendMessageCommandInput,
context: __SerdeContext
): Promise<__HttpRequest> => {
- const {hostname, protocol = "https", port, path: basePath} = await context.endpoint();
+ const b = rb(input, context);
const headers: any = {
'content-type': 'application/json',
};
- let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/ConverseStream";
+ b.bp("/SendMessageStreaming");
let body: any;
body = JSON.stringify(take(input, {
'conversationState': _ => _json(_),
@@ -194,15 +190,10 @@ export const se_ConverseStreamCommand = async(
'profileArn': [],
'source': [],
}));
- return new __HttpRequest({
- protocol,
- hostname,
- port,
- method: "POST",
- headers,
- path: resolvedPath,
- body,
- });
+ b.m("POST")
+ .h(headers)
+ .b(body);
+ return b.build();
}
/**
@@ -213,7 +204,7 @@ export const de_ExportResultArchiveCommand = async(
context: __SerdeContext & __EventStreamSerdeContext
): Promise => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_ExportResultArchiveCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents: any = map({
$metadata: deserializeMetadata(output),
@@ -224,12 +215,67 @@ export const de_ExportResultArchiveCommand = async(
}
/**
- * deserializeAws_restJson1ExportResultArchiveCommandError
+ * deserializeAws_restJson1GenerateAssistantResponseCommand
+ */
+export const de_GenerateAssistantResponseCommand = async(
+ output: __HttpResponse,
+ context: __SerdeContext & __EventStreamSerdeContext
+): Promise => {
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
+ return de_CommandError(output, context);
+ }
+ const contents: any = map({
+ $metadata: deserializeMetadata(output),
+ [_cI]: [, output.headers[_xacci]],
+ });
+ const data: any = output.body;
+ contents.generateAssistantResponseResponse = de_ChatResponseStream(data, context);
+ return contents;
+}
+
+/**
+ * deserializeAws_restJson1GenerateTaskAssistPlanCommand
+ */
+export const de_GenerateTaskAssistPlanCommand = async(
+ output: __HttpResponse,
+ context: __SerdeContext & __EventStreamSerdeContext
+): Promise => {
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
+ return de_CommandError(output, context);
+ }
+ const contents: any = map({
+ $metadata: deserializeMetadata(output),
+ });
+ const data: any = output.body;
+ contents.planningResponseStream = de_ChatResponseStream(data, context);
+ return contents;
+}
+
+/**
+ * deserializeAws_restJson1SendMessageCommand
+ */
+export const de_SendMessageCommand = async(
+ output: __HttpResponse,
+ context: __SerdeContext & __EventStreamSerdeContext
+): Promise => {
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
+ return de_CommandError(output, context);
+ }
+ const contents: any = map({
+ $metadata: deserializeMetadata(output),
+ });
+ const data: any = output.body;
+ contents.sendMessageResponse = de_ChatResponseStream(data, context);
+ return contents;
+}
+
+/**
+ * deserialize_Aws_restJson1CommandError
*/
-const de_ExportResultArchiveCommandError = async(
+const de_CommandError = async(
output: __HttpResponse,
context: __SerdeContext,
-): Promise => {
+): Promise => {
const parsedOutput: any = {
...output,
body: await parseErrorBody(output.body, context)
@@ -254,746 +300,679 @@ const de_ExportResultArchiveCommandError = async(
case "ValidationException":
case "com.amazon.aws.codewhisperer#ValidationException":
throw await de_ValidationExceptionRes(parsedOutput, context);
+ case "ServiceQuotaExceededException":
+ case "com.amazon.aws.codewhisperer#ServiceQuotaExceededException":
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
+ case "DryRunOperationException":
+ case "com.amazon.aws.codewhisperer#DryRunOperationException":
+ throw await de_DryRunOperationExceptionRes(parsedOutput, context);
default:
const parsedBody = parsedOutput.body;
return throwDefaultError({
output,
parsedBody,
errorCode
- })
+ }) as never
}
}
+ const throwDefaultError = withBaseException(__BaseException);
/**
- * deserializeAws_restJson1GenerateAssistantResponseCommand
+ * deserializeAws_restJson1AccessDeniedExceptionRes
*/
- export const de_GenerateAssistantResponseCommand = async(
- output: __HttpResponse,
- context: __SerdeContext & __EventStreamSerdeContext
- ): Promise => {
- if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_GenerateAssistantResponseCommandError(output, context);
- }
+ const de_AccessDeniedExceptionRes = async (
+ parsedOutput: any,
+ context: __SerdeContext
+ ): Promise => {
const contents: any = map({
- $metadata: deserializeMetadata(output),
- conversationId: [, output.headers['x-amzn-codewhisperer-conversation-id']],
});
- const data: any = output.body;
- contents.generateAssistantResponseResponse = de_ChatResponseStream(data, context);
- return contents;
- }
+ const data: any = parsedOutput.body;
+ const doc = take(data, {
+ 'message': __expectString,
+ 'reason': __expectString,
+ });
+ Object.assign(contents, doc);
+ const exception = new AccessDeniedException({
+ $metadata: deserializeMetadata(parsedOutput),
+ ...contents
+ });
+ return __decorateServiceException(exception, parsedOutput.body);
+ };
/**
- * deserializeAws_restJson1GenerateAssistantResponseCommandError
+ * deserializeAws_restJson1ConflictExceptionRes
*/
- const de_GenerateAssistantResponseCommandError = async(
- output: __HttpResponse,
- context: __SerdeContext,
- ): Promise => {
- const parsedOutput: any = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
- switch (errorCode) {
- case "AccessDeniedException":
- case "com.amazon.aws.codewhisperer#AccessDeniedException":
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
- case "InternalServerException":
- case "com.amazon.aws.codewhisperer#InternalServerException":
- throw await de_InternalServerExceptionRes(parsedOutput, context);
- case "ThrottlingException":
- case "com.amazon.aws.codewhisperer#ThrottlingException":
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
- case "ValidationException":
- case "com.amazon.aws.codewhisperer#ValidationException":
- throw await de_ValidationExceptionRes(parsedOutput, context);
- default:
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- })
- }
- }
+ const de_ConflictExceptionRes = async (
+ parsedOutput: any,
+ context: __SerdeContext
+ ): Promise => {
+ const contents: any = map({
+ });
+ const data: any = parsedOutput.body;
+ const doc = take(data, {
+ 'message': __expectString,
+ 'reason': __expectString,
+ });
+ Object.assign(contents, doc);
+ const exception = new ConflictException({
+ $metadata: deserializeMetadata(parsedOutput),
+ ...contents
+ });
+ return __decorateServiceException(exception, parsedOutput.body);
+ };
- /**
- * deserializeAws_restJson1GenerateTaskAssistPlanCommand
- */
- export const de_GenerateTaskAssistPlanCommand = async(
- output: __HttpResponse,
- context: __SerdeContext & __EventStreamSerdeContext
- ): Promise => {
- if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_GenerateTaskAssistPlanCommandError(output, context);
- }
- const contents: any = map({
- $metadata: deserializeMetadata(output),
- });
- const data: any = output.body;
- contents.planningResponseStream = de_ChatResponseStream(data, context);
- return contents;
- }
+ /**
+ * deserializeAws_restJson1DryRunOperationExceptionRes
+ */
+ const de_DryRunOperationExceptionRes = async (
+ parsedOutput: any,
+ context: __SerdeContext
+ ): Promise => {
+ const contents: any = map({
+ });
+ const data: any = parsedOutput.body;
+ const doc = take(data, {
+ 'message': __expectString,
+ });
+ Object.assign(contents, doc);
+ const exception = new DryRunOperationException({
+ $metadata: deserializeMetadata(parsedOutput),
+ ...contents
+ });
+ return __decorateServiceException(exception, parsedOutput.body);
+ };
- /**
- * deserializeAws_restJson1GenerateTaskAssistPlanCommandError
- */
- const de_GenerateTaskAssistPlanCommandError = async(
- output: __HttpResponse,
- context: __SerdeContext,
- ): Promise => {
- const parsedOutput: any = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
- switch (errorCode) {
- case "AccessDeniedException":
- case "com.amazon.aws.codewhisperer#AccessDeniedException":
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
- case "ConflictException":
- case "com.amazon.aws.codewhisperer#ConflictException":
- throw await de_ConflictExceptionRes(parsedOutput, context);
- case "InternalServerException":
- case "com.amazon.aws.codewhisperer#InternalServerException":
- throw await de_InternalServerExceptionRes(parsedOutput, context);
- case "ResourceNotFoundException":
- case "com.amazon.aws.codewhisperer#ResourceNotFoundException":
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
- case "ServiceQuotaExceededException":
- case "com.amazon.aws.codewhisperer#ServiceQuotaExceededException":
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
- case "ThrottlingException":
- case "com.amazon.aws.codewhisperer#ThrottlingException":
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
- case "ValidationException":
- case "com.amazon.aws.codewhisperer#ValidationException":
- throw await de_ValidationExceptionRes(parsedOutput, context);
- default:
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- })
- }
- }
+ /**
+ * deserializeAws_restJson1InternalServerExceptionRes
+ */
+ const de_InternalServerExceptionRes = async (
+ parsedOutput: any,
+ context: __SerdeContext
+ ): Promise => {
+ const contents: any = map({
+ });
+ const data: any = parsedOutput.body;
+ const doc = take(data, {
+ 'message': __expectString,
+ });
+ Object.assign(contents, doc);
+ const exception = new InternalServerException({
+ $metadata: deserializeMetadata(parsedOutput),
+ ...contents
+ });
+ return __decorateServiceException(exception, parsedOutput.body);
+ };
- /**
- * deserializeAws_restJson1ConverseStreamCommand
- */
- export const de_ConverseStreamCommand = async(
- output: __HttpResponse,
- context: __SerdeContext & __EventStreamSerdeContext
- ): Promise => {
- if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_ConverseStreamCommandError(output, context);
- }
- const contents: any = map({
- $metadata: deserializeMetadata(output),
- conversationId: [, output.headers['x-amzn-q-conversation-id']],
- utteranceId: [, output.headers['x-amzn-q-utterance-id']],
- });
- const data: any = output.body;
- contents.converseStreamResponse = de_ChatResponseStream(data, context);
- return contents;
- }
+ /**
+ * deserializeAws_restJson1ResourceNotFoundExceptionRes
+ */
+ const de_ResourceNotFoundExceptionRes = async (
+ parsedOutput: any,
+ context: __SerdeContext
+ ): Promise => {
+ const contents: any = map({
+ });
+ const data: any = parsedOutput.body;
+ const doc = take(data, {
+ 'message': __expectString,
+ });
+ Object.assign(contents, doc);
+ const exception = new ResourceNotFoundException({
+ $metadata: deserializeMetadata(parsedOutput),
+ ...contents
+ });
+ return __decorateServiceException(exception, parsedOutput.body);
+ };
- /**
- * deserializeAws_restJson1ConverseStreamCommandError
- */
- const de_ConverseStreamCommandError = async(
- output: __HttpResponse,
- context: __SerdeContext,
- ): Promise => {
- const parsedOutput: any = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
- switch (errorCode) {
- case "AccessDeniedException":
- case "com.amazon.aws.codewhisperer#AccessDeniedException":
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
- case "ConflictException":
- case "com.amazon.aws.codewhisperer#ConflictException":
- throw await de_ConflictExceptionRes(parsedOutput, context);
- case "DryRunOperationException":
- case "com.amazon.aws.codewhisperer#DryRunOperationException":
- throw await de_DryRunOperationExceptionRes(parsedOutput, context);
- case "InternalServerException":
- case "com.amazon.aws.codewhisperer#InternalServerException":
- throw await de_InternalServerExceptionRes(parsedOutput, context);
- case "ResourceNotFoundException":
- case "com.amazon.aws.codewhisperer#ResourceNotFoundException":
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
- case "ServiceQuotaExceededException":
- case "com.amazon.aws.codewhisperer#ServiceQuotaExceededException":
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
- case "ThrottlingException":
- case "com.amazon.aws.codewhisperer#ThrottlingException":
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
- case "ValidationException":
- case "com.amazon.aws.codewhisperer#ValidationException":
- throw await de_ValidationExceptionRes(parsedOutput, context);
- default:
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- })
- }
- }
+ /**
+ * deserializeAws_restJson1ServiceQuotaExceededExceptionRes
+ */
+ const de_ServiceQuotaExceededExceptionRes = async (
+ parsedOutput: any,
+ context: __SerdeContext
+ ): Promise => {
+ const contents: any = map({
+ });
+ const data: any = parsedOutput.body;
+ const doc = take(data, {
+ 'message': __expectString,
+ });
+ Object.assign(contents, doc);
+ const exception = new ServiceQuotaExceededException({
+ $metadata: deserializeMetadata(parsedOutput),
+ ...contents
+ });
+ return __decorateServiceException(exception, parsedOutput.body);
+ };
+
+ /**
+ * deserializeAws_restJson1ThrottlingExceptionRes
+ */
+ const de_ThrottlingExceptionRes = async (
+ parsedOutput: any,
+ context: __SerdeContext
+ ): Promise => {
+ const contents: any = map({
+ });
+ const data: any = parsedOutput.body;
+ const doc = take(data, {
+ 'message': __expectString,
+ 'reason': __expectString,
+ });
+ Object.assign(contents, doc);
+ const exception = new ThrottlingException({
+ $metadata: deserializeMetadata(parsedOutput),
+ ...contents
+ });
+ return __decorateServiceException(exception, parsedOutput.body);
+ };
+
+ /**
+ * deserializeAws_restJson1ValidationExceptionRes
+ */
+ const de_ValidationExceptionRes = async (
+ parsedOutput: any,
+ context: __SerdeContext
+ ): Promise => {
+ const contents: any = map({
+ });
+ const data: any = parsedOutput.body;
+ const doc = take(data, {
+ 'message': __expectString,
+ 'reason': __expectString,
+ });
+ Object.assign(contents, doc);
+ const exception = new ValidationException({
+ $metadata: deserializeMetadata(parsedOutput),
+ ...contents
+ });
+ return __decorateServiceException(exception, parsedOutput.body);
+ };
- const throwDefaultError = withBaseException(__BaseException);
- /**
- * deserializeAws_restJson1AccessDeniedExceptionRes
- */
- const de_AccessDeniedExceptionRes = async (
- parsedOutput: any,
- context: __SerdeContext
- ): Promise => {
- const contents: any = map({
- });
- const data: any = parsedOutput.body;
- const doc = take(data, {
- 'message': __expectString,
- 'reason': __expectString,
- });
- Object.assign(contents, doc);
- const exception = new AccessDeniedException({
- $metadata: deserializeMetadata(parsedOutput),
- ...contents
- });
- return __decorateServiceException(exception, parsedOutput.body);
- };
-
- /**
- * deserializeAws_restJson1ConflictExceptionRes
- */
- const de_ConflictExceptionRes = async (
- parsedOutput: any,
- context: __SerdeContext
- ): Promise => {
- const contents: any = map({
- });
- const data: any = parsedOutput.body;
- const doc = take(data, {
- 'message': __expectString,
- });
- Object.assign(contents, doc);
- const exception = new ConflictException({
- $metadata: deserializeMetadata(parsedOutput),
- ...contents
- });
- return __decorateServiceException(exception, parsedOutput.body);
- };
-
- /**
- * deserializeAws_restJson1DryRunOperationExceptionRes
- */
- const de_DryRunOperationExceptionRes = async (
- parsedOutput: any,
- context: __SerdeContext
- ): Promise => {
- const contents: any = map({
- });
- const data: any = parsedOutput.body;
- const doc = take(data, {
- 'message': __expectString,
- });
- Object.assign(contents, doc);
- const exception = new DryRunOperationException({
- $metadata: deserializeMetadata(parsedOutput),
- ...contents
- });
- return __decorateServiceException(exception, parsedOutput.body);
- };
-
- /**
- * deserializeAws_restJson1InternalServerExceptionRes
- */
- const de_InternalServerExceptionRes = async (
- parsedOutput: any,
- context: __SerdeContext
- ): Promise => {
- const contents: any = map({
- });
- const data: any = parsedOutput.body;
- const doc = take(data, {
- 'message': __expectString,
- });
- Object.assign(contents, doc);
- const exception = new InternalServerException({
- $metadata: deserializeMetadata(parsedOutput),
- ...contents
- });
- return __decorateServiceException(exception, parsedOutput.body);
- };
-
- /**
- * deserializeAws_restJson1ResourceNotFoundExceptionRes
- */
- const de_ResourceNotFoundExceptionRes = async (
- parsedOutput: any,
- context: __SerdeContext
- ): Promise => {
- const contents: any = map({
- });
- const data: any = parsedOutput.body;
- const doc = take(data, {
- 'message': __expectString,
- });
- Object.assign(contents, doc);
- const exception = new ResourceNotFoundException({
- $metadata: deserializeMetadata(parsedOutput),
- ...contents
- });
- return __decorateServiceException(exception, parsedOutput.body);
- };
-
- /**
- * deserializeAws_restJson1ServiceQuotaExceededExceptionRes
- */
- const de_ServiceQuotaExceededExceptionRes = async (
- parsedOutput: any,
- context: __SerdeContext
- ): Promise => {
- const contents: any = map({
- });
- const data: any = parsedOutput.body;
- const doc = take(data, {
- 'message': __expectString,
- });
- Object.assign(contents, doc);
- const exception = new ServiceQuotaExceededException({
- $metadata: deserializeMetadata(parsedOutput),
- ...contents
- });
- return __decorateServiceException(exception, parsedOutput.body);
- };
-
- /**
- * deserializeAws_restJson1ThrottlingExceptionRes
- */
- const de_ThrottlingExceptionRes = async (
- parsedOutput: any,
- context: __SerdeContext
- ): Promise => {
- const contents: any = map({
- });
- const data: any = parsedOutput.body;
- const doc = take(data, {
- 'message': __expectString,
- });
- Object.assign(contents, doc);
- const exception = new ThrottlingException({
- $metadata: deserializeMetadata(parsedOutput),
- ...contents
- });
- return __decorateServiceException(exception, parsedOutput.body);
- };
-
- /**
- * deserializeAws_restJson1ValidationExceptionRes
- */
- const de_ValidationExceptionRes = async (
- parsedOutput: any,
- context: __SerdeContext
- ): Promise => {
- const contents: any = map({
- });
- const data: any = parsedOutput.body;
- const doc = take(data, {
- 'message': __expectString,
- 'reason': __expectString,
- });
- Object.assign(contents, doc);
- const exception = new ValidationException({
- $metadata: deserializeMetadata(parsedOutput),
- ...contents
- });
- return __decorateServiceException(exception, parsedOutput.body);
- };
-
- /**
- * deserializeAws_restJson1ChatResponseStream
- */
- const de_ChatResponseStream = (
- output: any,
- context: __SerdeContext & __EventStreamSerdeContext
- ): AsyncIterable => {
- return context.eventStreamMarshaller.deserialize(
- output,
- async event => {
- if (event["messageMetadataEvent"] != null) {
- return {
- messageMetadataEvent: await de_MessageMetadataEvent_event(event["messageMetadataEvent"], context),
- };
- }
- if (event["assistantResponseEvent"] != null) {
- return {
- assistantResponseEvent: await de_AssistantResponseEvent_event(event["assistantResponseEvent"], context),
- };
- }
- if (event["codeReferenceEvent"] != null) {
- return {
- codeReferenceEvent: await de_CodeReferenceEvent_event(event["codeReferenceEvent"], context),
- };
- }
- if (event["supplementaryWebLinksEvent"] != null) {
- return {
- supplementaryWebLinksEvent: await de_SupplementaryWebLinksEvent_event(event["supplementaryWebLinksEvent"], context),
- };
- }
- if (event["followupPromptEvent"] != null) {
- return {
- followupPromptEvent: await de_FollowupPromptEvent_event(event["followupPromptEvent"], context),
- };
- }
- if (event["codeEvent"] != null) {
- return {
- codeEvent: await de_CodeEvent_event(event["codeEvent"], context),
- };
- }
- if (event["intentsEvent"] != null) {
- return {
- intentsEvent: await de_IntentsEvent_event(event["intentsEvent"], context),
- };
- }
- if (event["invalidStateEvent"] != null) {
- return {
- invalidStateEvent: await de_InvalidStateEvent_event(event["invalidStateEvent"], context),
- };
- }
- if (event["error"] != null) {
- return {
- error: await de_InternalServerException_event(event["error"], context),
- };
- }
- return {$unknown: output};
- }
- );
+ /**
+ * deserializeAws_restJson1ChatResponseStream
+ */
+ const de_ChatResponseStream = (
+ output: any,
+ context: __SerdeContext & __EventStreamSerdeContext
+ ): AsyncIterable => {
+ return context.eventStreamMarshaller.deserialize(
+ output,
+ async event => {
+ if (event["messageMetadataEvent"] != null) {
+ return {
+ messageMetadataEvent: await de_MessageMetadataEvent_event(event["messageMetadataEvent"], context),
+ };
}
- /**
- * deserializeAws_restJson1ResultArchiveStream
- */
- const de_ResultArchiveStream = (
- output: any,
- context: __SerdeContext & __EventStreamSerdeContext
- ): AsyncIterable => {
- return context.eventStreamMarshaller.deserialize(
- output,
- async event => {
- if (event["binaryMetadataEvent"] != null) {
- return {
- binaryMetadataEvent: await de_BinaryMetadataEvent_event(event["binaryMetadataEvent"], context),
- };
- }
- if (event["binaryPayloadEvent"] != null) {
- return {
- binaryPayloadEvent: await de_BinaryPayloadEvent_event(event["binaryPayloadEvent"], context),
- };
- }
- if (event["internalServerException"] != null) {
- return {
- internalServerException: await de_InternalServerException_event(event["internalServerException"], context),
- };
- }
- return {$unknown: output};
- }
- );
+ if (event["assistantResponseEvent"] != null) {
+ return {
+ assistantResponseEvent: await de_AssistantResponseEvent_event(event["assistantResponseEvent"], context),
+ };
}
- const de_AssistantResponseEvent_event = async (
- output: any,
- context: __SerdeContext
- ): Promise => {
- const contents: AssistantResponseEvent = {} as any;
- const data: any = await parseBody(output.body, context);
- Object.assign(contents, _json(data));
- return contents;
+ if (event["dryRunSucceedEvent"] != null) {
+ return {
+ dryRunSucceedEvent: await de_DryRunSucceedEvent_event(event["dryRunSucceedEvent"], context),
+ };
}
- const de_BinaryMetadataEvent_event = async (
- output: any,
- context: __SerdeContext
- ): Promise => {
- const contents: BinaryMetadataEvent = {} as any;
- const data: any = await parseBody(output.body, context);
- Object.assign(contents, _json(data));
- return contents;
+ if (event["codeReferenceEvent"] != null) {
+ return {
+ codeReferenceEvent: await de_CodeReferenceEvent_event(event["codeReferenceEvent"], context),
+ };
}
- const de_BinaryPayloadEvent_event = async (
- output: any,
- context: __SerdeContext
- ): Promise => {
- const contents: BinaryPayloadEvent = {} as any;
- const data: any = await parseBody(output.body, context);
- Object.assign(contents, de_BinaryPayloadEvent(data, context));
- return contents;
+ if (event["supplementaryWebLinksEvent"] != null) {
+ return {
+ supplementaryWebLinksEvent: await de_SupplementaryWebLinksEvent_event(event["supplementaryWebLinksEvent"], context),
+ };
+ }
+ if (event["followupPromptEvent"] != null) {
+ return {
+ followupPromptEvent: await de_FollowupPromptEvent_event(event["followupPromptEvent"], context),
+ };
}
- const de_CodeEvent_event = async (
- output: any,
- context: __SerdeContext
- ): Promise => {
- const contents: CodeEvent = {} as any;
- const data: any = await parseBody(output.body, context);
- Object.assign(contents, _json(data));
- return contents;
+ if (event["codeEvent"] != null) {
+ return {
+ codeEvent: await de_CodeEvent_event(event["codeEvent"], context),
+ };
}
- const de_CodeReferenceEvent_event = async (
- output: any,
- context: __SerdeContext
- ): Promise => {
- const contents: CodeReferenceEvent = {} as any;
- const data: any = await parseBody(output.body, context);
- Object.assign(contents, _json(data));
- return contents;
+ if (event["intentsEvent"] != null) {
+ return {
+ intentsEvent: await de_IntentsEvent_event(event["intentsEvent"], context),
+ };
}
- const de_FollowupPromptEvent_event = async (
- output: any,
- context: __SerdeContext
- ): Promise => {
- const contents: FollowupPromptEvent = {} as any;
- const data: any = await parseBody(output.body, context);
- Object.assign(contents, _json(data));
- return contents;
+ if (event["interactionComponentsEvent"] != null) {
+ return {
+ interactionComponentsEvent: await de_InteractionComponentsEvent_event(event["interactionComponentsEvent"], context),
+ };
}
- const de_IntentsEvent_event = async (
- output: any,
- context: __SerdeContext
- ): Promise => {
- const contents: IntentsEvent = {} as any;
- const data: any = await parseBody(output.body, context);
- Object.assign(contents, _json(data));
- return contents;
+ if (event["invalidStateEvent"] != null) {
+ return {
+ invalidStateEvent: await de_InvalidStateEvent_event(event["invalidStateEvent"], context),
+ };
}
- const de_InternalServerException_event = async (
- output: any,
- context: __SerdeContext
- ): Promise => {
- const parsedOutput: any = {
- ...output,
- body: await parseBody(output.body, context)
+ if (event["error"] != null) {
+ return {
+ error: await de_InternalServerException_event(event["error"], context),
};
- return de_InternalServerExceptionRes(parsedOutput, context);
}
- const de_InvalidStateEvent_event = async (
- output: any,
- context: __SerdeContext
- ): Promise => {
- const contents: InvalidStateEvent = {} as any;
- const data: any = await parseBody(output.body, context);
- Object.assign(contents, _json(data));
- return contents;
+ return {$unknown: output};
+ }
+ );
+ }
+ /**
+ * deserializeAws_restJson1ResultArchiveStream
+ */
+ const de_ResultArchiveStream = (
+ output: any,
+ context: __SerdeContext & __EventStreamSerdeContext
+ ): AsyncIterable => {
+ return context.eventStreamMarshaller.deserialize(
+ output,
+ async event => {
+ if (event["binaryMetadataEvent"] != null) {
+ return {
+ binaryMetadataEvent: await de_BinaryMetadataEvent_event(event["binaryMetadataEvent"], context),
+ };
}
- const de_MessageMetadataEvent_event = async (
- output: any,
- context: __SerdeContext
- ): Promise => {
- const contents: MessageMetadataEvent = {} as any;
- const data: any = await parseBody(output.body, context);
- Object.assign(contents, _json(data));
- return contents;
+ if (event["binaryPayloadEvent"] != null) {
+ return {
+ binaryPayloadEvent: await de_BinaryPayloadEvent_event(event["binaryPayloadEvent"], context),
+ };
}
- const de_SupplementaryWebLinksEvent_event = async (
- output: any,
- context: __SerdeContext
- ): Promise => {
- const contents: SupplementaryWebLinksEvent = {} as any;
- const data: any = await parseBody(output.body, context);
- Object.assign(contents, _json(data));
- return contents;
+ if (event["internalServerException"] != null) {
+ return {
+ internalServerException: await de_InternalServerException_event(event["internalServerException"], context),
+ };
}
- // se_AppStudioState omitted.
+ return {$unknown: output};
+ }
+ );
+ }
+ const de_AssistantResponseEvent_event = async (
+ output: any,
+ context: __SerdeContext
+ ): Promise => {
+ const contents: AssistantResponseEvent = {} as any;
+ const data: any = await parseBody(output.body, context);
+ Object.assign(contents, _json(data));
+ return contents;
+ }
+ const de_BinaryMetadataEvent_event = async (
+ output: any,
+ context: __SerdeContext
+ ): Promise => {
+ const contents: BinaryMetadataEvent = {} as any;
+ const data: any = await parseBody(output.body, context);
+ Object.assign(contents, _json(data));
+ return contents;
+ }
+ const de_BinaryPayloadEvent_event = async (
+ output: any,
+ context: __SerdeContext
+ ): Promise => {
+ const contents: BinaryPayloadEvent = {} as any;
+ const data: any = await parseBody(output.body, context);
+ Object.assign(contents, de_BinaryPayloadEvent(data, context));
+ return contents;
+ }
+ const de_CodeEvent_event = async (
+ output: any,
+ context: __SerdeContext
+ ): Promise => {
+ const contents: CodeEvent = {} as any;
+ const data: any = await parseBody(output.body, context);
+ Object.assign(contents, _json(data));
+ return contents;
+ }
+ const de_CodeReferenceEvent_event = async (
+ output: any,
+ context: __SerdeContext
+ ): Promise => {
+ const contents: CodeReferenceEvent = {} as any;
+ const data: any = await parseBody(output.body, context);
+ Object.assign(contents, _json(data));
+ return contents;
+ }
+ const de_DryRunSucceedEvent_event = async (
+ output: any,
+ context: __SerdeContext
+ ): Promise => {
+ const contents: DryRunSucceedEvent = {} as any;
+ const data: any = await parseBody(output.body, context);
+ Object.assign(contents, _json(data));
+ return contents;
+ }
+ const de_FollowupPromptEvent_event = async (
+ output: any,
+ context: __SerdeContext
+ ): Promise => {
+ const contents: FollowupPromptEvent = {} as any;
+ const data: any = await parseBody(output.body, context);
+ Object.assign(contents, _json(data));
+ return contents;
+ }
+ const de_IntentsEvent_event = async (
+ output: any,
+ context: __SerdeContext
+ ): Promise => {
+ const contents: IntentsEvent = {} as any;
+ const data: any = await parseBody(output.body, context);
+ Object.assign(contents, _json(data));
+ return contents;
+ }
+ const de_InternalServerException_event = async (
+ output: any,
+ context: __SerdeContext
+ ): Promise => {
+ const parsedOutput: any = {
+ ...output,
+ body: await parseBody(output.body, context)
+ };
+ return de_InternalServerExceptionRes(parsedOutput, context);
+ }
+ const de_InvalidStateEvent_event = async (
+ output: any,
+ context: __SerdeContext
+ ): Promise => {
+ const contents: InvalidStateEvent = {} as any;
+ const data: any = await parseBody(output.body, context);
+ Object.assign(contents, _json(data));
+ return contents;
+ }
+ const de_MessageMetadataEvent_event = async (
+ output: any,
+ context: __SerdeContext
+ ): Promise => {
+ const contents: MessageMetadataEvent = {} as any;
+ const data: any = await parseBody(output.body, context);
+ Object.assign(contents, _json(data));
+ return contents;
+ }
+ const de_SupplementaryWebLinksEvent_event = async (
+ output: any,
+ context: __SerdeContext
+ ): Promise => {
+ const contents: SupplementaryWebLinksEvent = {} as any;
+ const data: any = await parseBody(output.body, context);
+ Object.assign(contents, _json(data));
+ return contents;
+ }
+ const de_InteractionComponentsEvent_event = async (
+ output: any,
+ context: __SerdeContext
+ ): Promise => {
+ const contents: InteractionComponentsEvent = {} as any;
+ const data: any = await parseBody(output.body, context);
+ Object.assign(contents, de_InteractionComponentsEvent(data, context));
+ return contents;
+ }
+ // se_AppStudioState omitted.
- // se_AssistantResponseMessage omitted.
+ // se_AssistantResponseMessage omitted.
- // se_ChatHistory omitted.
+ // se_ChatHistory omitted.
- // se_ChatMessage omitted.
+ // se_ChatMessage omitted.
- // se_ConsoleState omitted.
+ // se_ConsoleState omitted.
- // se_ConversationState omitted.
+ // se_ConversationState omitted.
- // se_CursorState omitted.
+ // se_CursorState omitted.
- // se_Diagnostic omitted.
+ // se_Diagnostic omitted.
- // se_DocumentSymbol omitted.
+ // se_DocumentSymbol omitted.
- // se_DocumentSymbols omitted.
+ // se_DocumentSymbols omitted.
- // se_EditorState omitted.
+ // se_EditorState omitted.
- // se_EnvironmentVariable omitted.
+ // se_EnvironmentVariable omitted.
- // se_EnvironmentVariables omitted.
+ // se_EnvironmentVariables omitted.
- // se_EnvState omitted.
+ // se_EnvState omitted.
- // se_ExportContext omitted.
+ // se_ExportContext omitted.
- // se_FollowupPrompt omitted.
+ // se_FollowupPrompt omitted.
- // se_GitState omitted.
+ // se_GitState omitted.
- // se_Position omitted.
+ // se_Position omitted.
- // se_ProgrammingLanguage omitted.
+ // se_ProgrammingLanguage omitted.
- // se_Range omitted.
+ // se_Range omitted.
- // se_Reference omitted.
+ // se_Reference omitted.
- // se_References omitted.
+ // se_References omitted.
- // se_RelevantDocumentList omitted.
+ // se_RelevantDocumentList omitted.
- // se_RelevantTextDocument omitted.
+ // se_RelevantTextDocument omitted.
- // se_RuntimeDiagnostic omitted.
+ // se_RuntimeDiagnostic omitted.
- // se_ShellHistory omitted.
+ // se_ShellHistory omitted.
- // se_ShellHistoryEntry omitted.
+ // se_ShellHistoryEntry omitted.
- // se_ShellState omitted.
+ // se_ShellState omitted.
- // se_Span omitted.
+ // se_Span omitted.
- // se_SupplementaryWebLink omitted.
+ // se_SupplementaryWebLink omitted.
- // se_SupplementaryWebLinks omitted.
+ // se_SupplementaryWebLinks omitted.
- // se_TextDocument omitted.
+ // se_TextDocument omitted.
- // se_TextDocumentDiagnostic omitted.
+ // se_TextDocumentDiagnostic omitted.
- // se_TransformationExportContext omitted.
+ // se_TransformationExportContext omitted.
- // se_UserInputMessage omitted.
+ // se_UnitTestGenerationExportContext omitted.
- // se_UserInputMessageContext omitted.
+ // se_UserInputMessage omitted.
- // se_UserSettings omitted.
+ // se_UserInputMessageContext omitted.
- // se_WorkspaceState omitted.
+ // se_UserSettings omitted.
- // de_AssistantResponseEvent omitted.
+ // se_WorkspaceState omitted.
- // de_BinaryMetadataEvent omitted.
+ // de_AssistantResponseEvent omitted.
- /**
- * deserializeAws_restJson1BinaryPayloadEvent
- */
- const de_BinaryPayloadEvent = (
- output: any,
- context: __SerdeContext
- ): BinaryPayloadEvent => {
- return take(output, {
- 'bytes': context.base64Decoder,
- }) as any;
- }
+ // de_BinaryMetadataEvent omitted.
+
+ /**
+ * deserializeAws_restJson1BinaryPayloadEvent
+ */
+ const de_BinaryPayloadEvent = (
+ output: any,
+ context: __SerdeContext
+ ): BinaryPayloadEvent => {
+ return take(output, {
+ 'bytes': context.base64Decoder,
+ }) as any;
+ }
+
+ // de_CodeEvent omitted.
+
+ // de_CodeReferenceEvent omitted.
- // de_CodeEvent omitted.
+ // de_DryRunSucceedEvent omitted.
- // de_CodeReferenceEvent omitted.
+ // de_FollowupPrompt omitted.
- // de_FollowupPrompt omitted.
+ // de_FollowupPromptEvent omitted.
- // de_FollowupPromptEvent omitted.
+ // de_IntentData omitted.
- // de_IntentData omitted.
+ // de_IntentDataType omitted.
- // de_IntentDataType omitted.
+ // de_IntentMap omitted.
- // de_IntentMap omitted.
+ // de_IntentsEvent omitted.
- // de_IntentsEvent omitted.
+ // de_InvalidStateEvent omitted.
- // de_InvalidStateEvent omitted.
+ // de_MessageMetadataEvent omitted.
- // de_MessageMetadataEvent omitted.
+ // de_Reference omitted.
- // de_Reference omitted.
+ // de_References omitted.
- // de_References omitted.
+ // de_Span omitted.
- // de_Span omitted.
+ // de_SupplementaryWebLink omitted.
- // de_SupplementaryWebLink omitted.
+ // de_SupplementaryWebLinks omitted.
- // de_SupplementaryWebLinks omitted.
+ // de_SupplementaryWebLinksEvent omitted.
- // de_SupplementaryWebLinksEvent omitted.
+ /**
+ * deserializeAws_restJson1InteractionComponentsEvent
+ */
+ const de_InteractionComponentsEvent = (
+ output: any,
+ context: __SerdeContext
+ ): InteractionComponentsEvent => {
+ return take(output, {
+ 'interactionComponentEntries': (_: any) => de_InteractionComponentEntryList(_, context),
+ }) as any;
+ }
- const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({
- httpStatusCode: output.statusCode,
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
- extendedRequestId: output.headers["x-amz-id-2"],
- cfId: output.headers["x-amz-cf-id"],
- });
+ // de_Action omitted.
- // Encode Uint8Array data into string with utf-8.
- const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then(body => context.utf8Encoder(body))
+ // de_Alert omitted.
- const isSerializableHeaderValue = (value: any): boolean =>
- value !== undefined &&
- value !== null &&
- value !== "" &&
- (!Object.getOwnPropertyNames(value).includes("length") ||
- value.length != 0) &&
- (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
+ // de_AlertComponent omitted.
- const parseBody = (streamBody: any, context: __SerdeContext): any => collectBodyString(streamBody, context).then(encoded => {
- if (encoded.length) {
- return JSON.parse(encoded);
- }
- return {};
- });
+ // de_AlertComponentList omitted.
- const parseErrorBody = async (errorBody: any, context: __SerdeContext) => {
- const value = await parseBody(errorBody, context);
- value.message = value.message ?? value.Message;
- return value;
- }
+ // de_CloudWatchTroubleshootingLink omitted.
- /**
- * Load an error code for the aws.rest-json-1.1 protocol.
- */
- const loadRestJsonErrorCode = (output: __HttpResponse, data: any): string | undefined => {
- const findKey = (object: any, key: string) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
-
- const sanitizeErrorCode = (rawValue: string | number): string => {
- let cleanValue = rawValue;
- if (typeof cleanValue === "number") {
- cleanValue = cleanValue.toString();
- }
- if (cleanValue.indexOf(",") >= 0) {
- cleanValue = cleanValue.split(",")[0];
- }
- if (cleanValue.indexOf(":") >= 0) {
- cleanValue = cleanValue.split(":")[0];
- }
- if (cleanValue.indexOf("#") >= 0) {
- cleanValue = cleanValue.split("#")[1];
- }
- return cleanValue;
- };
+ // de_InfrastructureUpdate omitted.
+
+ // de_InfrastructureUpdateTransition omitted.
+
+ /**
+ * deserializeAws_restJson1InteractionComponent
+ */
+ const de_InteractionComponent = (
+ output: any,
+ context: __SerdeContext
+ ): InteractionComponent => {
+ return take(output, {
+ 'action': _json,
+ 'alert': _json,
+ 'infrastructureUpdate': _json,
+ 'progress': _json,
+ 'resource': _json,
+ 'resourceList': _json,
+ 'section': _json,
+ 'step': _json,
+ 'suggestions': _json,
+ 'taskDetails': _json,
+ 'taskReference': _json,
+ 'text': _json,
+ }) as any;
+ }
+
+ /**
+ * deserializeAws_restJson1InteractionComponentEntry
+ */
+ const de_InteractionComponentEntry = (
+ output: any,
+ context: __SerdeContext
+ ): InteractionComponentEntry => {
+ return take(output, {
+ 'interactionComponent': (_: any) => de_InteractionComponent(_, context),
+ 'interactionComponentId': __expectString,
+ }) as any;
+ }
+
+ /**
+ * deserializeAws_restJson1InteractionComponentEntryList
+ */
+ const de_InteractionComponentEntryList = (
+ output: any,
+ context: __SerdeContext
+ ): (InteractionComponentEntry)[] => {
+ const retVal = (output || []).filter((e: any) => e != null).map((entry: any) => {
+ return de_InteractionComponentEntry(entry, context);
+ });
+ return retVal;
+ }
+
+ // de_ModuleLink omitted.
+
+ // de_Progress omitted.
- const headerKey = findKey(output.headers, "x-amzn-errortype");
- if (headerKey !== undefined) {
- return sanitizeErrorCode(output.headers[headerKey]);
- }
+ // de_ProgressComponent omitted.
+
+ // de_ProgressComponentList omitted.
+
+ // de_Resource omitted.
+
+ // de_ResourceList omitted.
+
+ // de_Resources omitted.
+
+ // de_Section omitted.
+
+ // de_SectionComponent omitted.
+
+ // de_SectionComponentList omitted.
+
+ // de_Step omitted.
+
+ // de_StepComponent omitted.
+
+ // de_StepComponentList omitted.
+
+ // de_Suggestion omitted.
+
+ // de_SuggestionList omitted.
+
+ // de_Suggestions omitted.
+
+ // de_TaskAction omitted.
+
+ // de_TaskActionConfirmation omitted.
+
+ // de_TaskActionList omitted.
+
+ // de_TaskActionNote omitted.
+
+ // de_TaskActionPayload omitted.
+
+ // de_TaskComponent omitted.
+
+ // de_TaskComponentList omitted.
+
+ // de_TaskDetails omitted.
+
+ // de_TaskOverview omitted.
+
+ // de_TaskReference omitted.
+
+ // de_Text omitted.
+
+ // de_WebLink omitted.
+
+ const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({
+ httpStatusCode: output.statusCode,
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
+ extendedRequestId: output.headers["x-amz-id-2"],
+ cfId: output.headers["x-amz-cf-id"],
+ });
- if (data.code !== undefined) {
- return sanitizeErrorCode(data.code);
- }
+ // Encode Uint8Array data into string with utf-8.
+ const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then(body => context.utf8Encoder(body))
- if (data["__type"] !== undefined) {
- return sanitizeErrorCode(data["__type"]);
- }
- };
+ const _cI = "conversationId";
+ const _xacci = "x-amzn-codewhisperer-conversation-id";
diff --git a/src.gen/@amzn/codewhisperer-streaming/src/runtimeConfig.browser.ts b/src.gen/@amzn/codewhisperer-streaming/src/runtimeConfig.browser.ts
index 58120df7271..c4d80b94bb5 100644
--- a/src.gen/@amzn/codewhisperer-streaming/src/runtimeConfig.browser.ts
+++ b/src.gen/@amzn/codewhisperer-streaming/src/runtimeConfig.browser.ts
@@ -3,7 +3,7 @@
import packageInfo from "../package.json"; // eslint-disable-line
import { Sha256 } from "@aws-crypto/sha256-browser";
-import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser";
+import { createDefaultUserAgentProvider } from "@aws-sdk/util-user-agent-browser";
import {
DEFAULT_USE_DUALSTACK_ENDPOINT,
DEFAULT_USE_FIPS_ENDPOINT,
@@ -13,6 +13,7 @@ import {
FetchHttpHandler as RequestHandler,
streamCollector,
} from "@smithy/fetch-http-handler";
+import { invalidProvider } from "@smithy/invalid-dependency";
import { calculateBodyLength } from "@smithy/util-body-length-browser";
import {
DEFAULT_MAX_ATTEMPTS,
@@ -36,10 +37,11 @@ export const getRuntimeConfig = (config: CodeWhispererStreamingClientConfig) =>
runtime: "browser",
defaultsMode,
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
- defaultUserAgentProvider: config?.defaultUserAgentProvider ?? defaultUserAgent({serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version}),
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version}),
eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? eventStreamSerdeProvider,
maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
- requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider),
+ region: config?.region ?? invalidProvider("Region is missing"),
+ requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
sha256: config?.sha256 ?? Sha256,
streamCollector: config?.streamCollector ?? streamCollector,
diff --git a/src.gen/@amzn/codewhisperer-streaming/src/runtimeConfig.shared.ts b/src.gen/@amzn/codewhisperer-streaming/src/runtimeConfig.shared.ts
index 4f73fd15be4..50601826426 100644
--- a/src.gen/@amzn/codewhisperer-streaming/src/runtimeConfig.shared.ts
+++ b/src.gen/@amzn/codewhisperer-streaming/src/runtimeConfig.shared.ts
@@ -1,6 +1,9 @@
// smithy-typescript generated code
+import { defaultCodeWhispererStreamingHttpAuthSchemeProvider } from "./auth/httpAuthSchemeProvider";
import { defaultRegionInfoProvider } from "./endpoints";
+import { HttpBearerAuthSigner } from "@smithy/core";
import { NoOpLogger } from "@smithy/smithy-client";
+import { IdentityProviderConfig } from "@smithy/types";
import { parseUrl } from "@smithy/url-parser";
import {
fromBase64,
@@ -15,16 +18,25 @@ import { CodeWhispererStreamingClientConfig } from "./CodeWhispererStreamingClie
/**
* @internal
*/
-export const getRuntimeConfig = (config: CodeWhispererStreamingClientConfig) => ({
- apiVersion: "2023-11-27",
- base64Decoder: config?.base64Decoder ?? fromBase64,
+export const getRuntimeConfig = (config: CodeWhispererStreamingClientConfig) => {
+ return {
+ apiVersion: "2023-11-27",
+ base64Decoder: config?.base64Decoder ?? fromBase64,
base64Encoder: config?.base64Encoder ?? toBase64,
disableHostPrefix: config?.disableHostPrefix ?? false,
extensions: config?.extensions ?? [],
+ httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultCodeWhispererStreamingHttpAuthSchemeProvider,
+ httpAuthSchemes: config?.httpAuthSchemes ?? [{
+ schemeId: "smithy.api#httpBearerAuth",
+ identityProvider: (ipc: IdentityProviderConfig) =>
+ ipc.getIdentityProvider("smithy.api#httpBearerAuth"),
+ signer: new HttpBearerAuthSigner(),
+ }],
logger: config?.logger ?? new NoOpLogger(),
regionInfoProvider: config?.regionInfoProvider ?? defaultRegionInfoProvider,
serviceId: config?.serviceId ?? "CodeWhispererStreaming",
urlParser: config?.urlParser ?? parseUrl,
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
utf8Encoder: config?.utf8Encoder ?? toUtf8,
-});
+ }
+};
diff --git a/src.gen/@amzn/codewhisperer-streaming/src/runtimeConfig.ts b/src.gen/@amzn/codewhisperer-streaming/src/runtimeConfig.ts
index 79cbb9467fb..b4d035f79b3 100644
--- a/src.gen/@amzn/codewhisperer-streaming/src/runtimeConfig.ts
+++ b/src.gen/@amzn/codewhisperer-streaming/src/runtimeConfig.ts
@@ -2,11 +2,22 @@
// @ts-ignore: package.json will be imported from dist folders
import packageInfo from "../package.json"; // eslint-disable-line
-import { defaultUserAgent } from "@aws-sdk/util-user-agent-node";
+import { emitWarningIfUnsupportedVersion as awsCheckVersion } from "@aws-sdk/core";
import {
+ FromSsoInit,
+ nodeProvider,
+} from "@aws-sdk/token-providers";
+import {
+ NODE_APP_ID_CONFIG_OPTIONS,
+ createDefaultUserAgentProvider,
+} from "@aws-sdk/util-user-agent-node";
+import {
+ NODE_REGION_CONFIG_FILE_OPTIONS,
+ NODE_REGION_CONFIG_OPTIONS,
NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,
NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,
} from "@smithy/config-resolver";
+import { HttpBearerAuthSigner } from "@smithy/core";
import { eventStreamSerdeProvider } from "@smithy/eventstream-serde-node";
import { Hash } from "@smithy/hash-node";
import {
@@ -18,6 +29,7 @@ import {
NodeHttpHandler as RequestHandler,
streamCollector,
} from "@smithy/node-http-handler";
+import { IdentityProviderConfig } from "@smithy/types";
import { calculateBodyLength } from "@smithy/util-body-length-node";
import { DEFAULT_RETRY_MODE } from "@smithy/util-retry";
import { CodeWhispererStreamingClientConfig } from "./CodeWhispererStreamingClient";
@@ -34,20 +46,28 @@ export const getRuntimeConfig = (config: CodeWhispererStreamingClientConfig) =>
const defaultsMode = resolveDefaultsModeConfig(config);
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
const clientSharedValues = getSharedRuntimeConfig(config);
- return {
+ awsCheckVersion(process.version);return {
...clientSharedValues,
...config,
runtime: "node",
defaultsMode,
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
- defaultUserAgentProvider: config?.defaultUserAgentProvider ?? defaultUserAgent({serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version}),
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version}),
eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? eventStreamSerdeProvider,
+ httpAuthSchemes: config?.httpAuthSchemes ?? [{
+ schemeId: "smithy.api#httpBearerAuth",
+ identityProvider: (ipc: IdentityProviderConfig) =>
+ ipc.getIdentityProvider("smithy.api#httpBearerAuth") || (async (idProps) => await nodeProvider(idProps as FromSsoInit)(idProps)),
+ signer: new HttpBearerAuthSigner(),
+ }],
maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
- requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider),
+ region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS),
+ requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
retryMode: config?.retryMode ?? loadNodeConfig({...NODE_RETRY_MODE_CONFIG_OPTIONS,default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,}),
sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
streamCollector: config?.streamCollector ?? streamCollector,
useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),
+ userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS),
};
};
diff --git a/src.gen/@amzn/codewhisperer-streaming/src/runtimeExtensions.ts b/src.gen/@amzn/codewhisperer-streaming/src/runtimeExtensions.ts
index 167325ed188..174ceda287d 100644
--- a/src.gen/@amzn/codewhisperer-streaming/src/runtimeExtensions.ts
+++ b/src.gen/@amzn/codewhisperer-streaming/src/runtimeExtensions.ts
@@ -1,4 +1,8 @@
// smithy-typescript generated code
+import {
+ getHttpAuthExtensionConfiguration,
+ resolveHttpAuthRuntimeConfig,
+} from "./auth/httpAuthExtensionConfiguration";
import {
getAwsRegionExtensionConfiguration,
resolveAwsRegionExtensionConfiguration,
@@ -40,6 +44,7 @@ export const resolveRuntimeExtensions = (
...asPartial(getAwsRegionExtensionConfiguration(runtimeConfig)),
...asPartial(getDefaultExtensionConfiguration(runtimeConfig)),
...asPartial(getHttpHandlerExtensionConfiguration(runtimeConfig)),
+ ...asPartial(getHttpAuthExtensionConfiguration(runtimeConfig)),
};
extensions.forEach(extension => extension.configure(extensionConfiguration));
@@ -49,5 +54,6 @@ export const resolveRuntimeExtensions = (
...resolveAwsRegionExtensionConfiguration(extensionConfiguration),
...resolveDefaultRuntimeConfig(extensionConfiguration),
...resolveHttpHandlerRuntimeConfig(extensionConfiguration),
+ ...resolveHttpAuthRuntimeConfig(extensionConfiguration),
};
}
diff --git a/src.gen/@amzn/codewhisperer-streaming/tsconfig.json b/src.gen/@amzn/codewhisperer-streaming/tsconfig.json
index 344909de212..e7f5ec56b74 100644
--- a/src.gen/@amzn/codewhisperer-streaming/tsconfig.json
+++ b/src.gen/@amzn/codewhisperer-streaming/tsconfig.json
@@ -1,5 +1,5 @@
{
- "extends": "@tsconfig/node14/tsconfig.json",
+ "extends": "@tsconfig/node16/tsconfig.json",
"compilerOptions": {
"downlevelIteration": true,
"importHelpers": true,
diff --git a/src.gen/@amzn/codewhisperer-streaming/typedoc.json b/src.gen/@amzn/codewhisperer-streaming/typedoc.json
deleted file mode 100644
index 9f06c7fccfe..00000000000
--- a/src.gen/@amzn/codewhisperer-streaming/typedoc.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "entryPoints": ["src/index.ts"],
- "out": "docs",
- "readme": "README.md"
-}