(config: T & HttpAuthSchemeInputConfig & AwsSdkSigV4PreviouslyResolved): T & HttpAuthSchemeResolvedConfig => {
- const config_0 = resolveAwsSdkSigV4Config(config);
- return {
- ...config_0,
- } as T & HttpAuthSchemeResolvedConfig;
-};
diff --git a/src.gen/@amzn/amazon-q-developer-streaming-client/src/commands/GenerateCodeFromCommandsCommand.ts b/src.gen/@amzn/amazon-q-developer-streaming-client/src/commands/GenerateCodeFromCommandsCommand.ts
index 94969cd6c34..93d491eecff 100644
--- a/src.gen/@amzn/amazon-q-developer-streaming-client/src/commands/GenerateCodeFromCommandsCommand.ts
+++ b/src.gen/@amzn/amazon-q-developer-streaming-client/src/commands/GenerateCodeFromCommandsCommand.ts
@@ -11,29 +11,27 @@ import {
GenerateCodeFromCommandsResponseFilterSensitiveLog,
} from "../models/models_0";
import {
- de_GenerateCodeFromCommandsCommand,
- se_GenerateCodeFromCommandsCommand,
+ deserializeAws_json1_0GenerateCodeFromCommandsCommand,
+ serializeAws_json1_0GenerateCodeFromCommandsCommand,
} from "../protocols/Aws_json1_0";
-import { getSerdePlugin } from "@smithy/middleware-serde";
-import { Command as $Command } from "@smithy/smithy-client";
-import { MetadataBearer as __MetadataBearer } from "@smithy/types";
+import { getSerdePlugin } from "@aws-sdk/middleware-serde";
+import {
+ HttpRequest as __HttpRequest,
+ HttpResponse as __HttpResponse,
+} from "@aws-sdk/protocol-http";
+import { Command as $Command } from "@aws-sdk/smithy-client";
+import {
+ FinalizeHandlerArguments,
+ Handler,
+ HandlerExecutionContext,
+ MiddlewareStack,
+ EventStreamSerdeContext as __EventStreamSerdeContext,
+ HttpHandlerOptions as __HttpHandlerOptions,
+ MetadataBearer as __MetadataBearer,
+ SerdeContext as __SerdeContext,
+} from "@aws-sdk/types";
-/**
- * @public
- */
-export type { __MetadataBearer };
-export { $Command };
-/**
- * @public
- *
- * The input for {@link GenerateCodeFromCommandsCommand}.
- */
export interface GenerateCodeFromCommandsCommandInput extends GenerateCodeFromCommandsRequest {}
-/**
- * @public
- *
- * The output of {@link GenerateCodeFromCommandsCommand}.
- */
export interface GenerateCodeFromCommandsCommandOutput extends GenerateCodeFromCommandsResponse, __MetadataBearer {}
/**
@@ -44,89 +42,71 @@ export interface GenerateCodeFromCommandsCommandOutput extends GenerateCodeFromC
* import { QDeveloperStreamingClient, GenerateCodeFromCommandsCommand } from "@amzn/amazon-q-developer-streaming-client"; // ES Modules import
* // const { QDeveloperStreamingClient, GenerateCodeFromCommandsCommand } = require("@amzn/amazon-q-developer-streaming-client"); // CommonJS import
* const client = new QDeveloperStreamingClient(config);
- * const input = { // GenerateCodeFromCommandsRequest
- * outputFormat: "typescript/cdk" || "java/cdk" || "python/cdk" || "yaml/cfn" || "json/cfn", // required
- * commands: { // CommandInput Union: only one key present
- * commandsList: [ // CliCommandsList
- * "STRING_VALUE",
- * ],
- * },
- * };
* const command = new GenerateCodeFromCommandsCommand(input);
* const response = await client.send(command);
- * // { // GenerateCodeFromCommandsResponse
- * // generatedCodeFromCommandsResponse: { // GenerateCodeFromCommandsResponseStream Union: only one key present
- * // codeEvent: { // CodeEvent
- * // content: "STRING_VALUE", // required
- * // },
- * // Error: { // InternalServerException
- * // message: "STRING_VALUE", // required
- * // },
- * // QuotaLevelExceededError: { // ServiceQuotaExceededException
- * // message: "STRING_VALUE", // required
- * // },
- * // ValidationError: { // ValidationException
- * // message: "STRING_VALUE", // required
- * // reason: "INVALID_CONVERSATION_ID" || "CONTENT_LENGTH_EXCEEDS_THRESHOLD" || "INVALID_KMS_GRANT",
- * // },
- * // },
- * // };
- *
* ```
*
- * @param GenerateCodeFromCommandsCommandInput - {@link GenerateCodeFromCommandsCommandInput}
- * @returns {@link GenerateCodeFromCommandsCommandOutput}
* @see {@link GenerateCodeFromCommandsCommandInput} for command's `input` shape.
* @see {@link GenerateCodeFromCommandsCommandOutput} for command's `response` shape.
* @see {@link QDeveloperStreamingClientResolvedConfig | config} for QDeveloperStreamingClient's `config` shape.
*
- * @throws {@link InternalServerException} (server fault)
- * This exception is thrown when an unexpected error occurred during the processing of a request.
- *
- * @throws {@link ThrottlingException} (client fault)
- * This exception is thrown when request was denied due to request throttling.
- *
- * @throws {@link ValidationException} (client fault)
- * This exception is thrown when the input fails to satisfy the constraints specified by the service.
- *
- * @throws {@link AccessDeniedException} (client fault)
- * This exception is thrown when the user does not have sufficient access to perform this action.
- *
- * @throws {@link QDeveloperStreamingServiceException}
- * Base exception class for all service exceptions from QDeveloperStreaming service.
- *
- * @public
*/
-export class GenerateCodeFromCommandsCommand extends $Command.classBuilder()
- .m(function (this: any, Command: any, cs: any, config: QDeveloperStreamingClientResolvedConfig, o: any) {
- return [
+export class GenerateCodeFromCommandsCommand extends $Command {
+ // Start section: command_properties
+ // End section: command_properties
+
+ constructor(readonly input: GenerateCodeFromCommandsCommandInput) {
+ // Start section: command_constructor
+ super();
+ // End section: command_constructor
+ }
+
+ /**
+ * @internal
+ */
+ resolveMiddleware(
+ clientStack: MiddlewareStack,
+ configuration: QDeveloperStreamingClientResolvedConfig,
+ options?: __HttpHandlerOptions
+ ): Handler {
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
+
+ const stack = clientStack.concat(this.middlewareStack);
+
+ const { logger } = configuration;
+ const clientName = "QDeveloperStreamingClient";
+ const commandName = "GenerateCodeFromCommandsCommand";
+ const handlerExecutionContext: HandlerExecutionContext = {
+ logger,
+ clientName,
+ commandName,
+ inputFilterSensitiveLog:
+ GenerateCodeFromCommandsRequestFilterSensitiveLog,
+ outputFilterSensitiveLog:
+ GenerateCodeFromCommandsResponseFilterSensitiveLog,
+ }
+ const { requestHandler } = configuration;
+ return stack.resolve(
+ (request: FinalizeHandlerArguments) =>
+ requestHandler.handle(request.request as __HttpRequest, options || {}),
+ handlerExecutionContext
+ );
+ }
+
+ private serialize(
+ input: GenerateCodeFromCommandsCommandInput,
+ context: __SerdeContext
+ ): Promise<__HttpRequest> {
+ return serializeAws_json1_0GenerateCodeFromCommandsCommand(input, context);
+ }
- getSerdePlugin(config, this.serialize, this.deserialize),
- ];
- })
- .s("AmazonQDeveloperStreamingService", "GenerateCodeFromCommands", {
+ private deserialize(
+ output: __HttpResponse,
+ context: __SerdeContext & __EventStreamSerdeContext
+ ): Promise {
+ return deserializeAws_json1_0GenerateCodeFromCommandsCommand(output, context);
+ }
- /**
- * @internal
- */
- eventStream: {
- output: true,
- },
- })
- .n("QDeveloperStreamingClient", "GenerateCodeFromCommandsCommand")
- .f(GenerateCodeFromCommandsRequestFilterSensitiveLog, GenerateCodeFromCommandsResponseFilterSensitiveLog)
- .ser(se_GenerateCodeFromCommandsCommand)
- .de(de_GenerateCodeFromCommandsCommand)
-.build() {
-/** @internal type navigation helper, not in runtime. */
-declare protected static __types: {
- api: {
- input: GenerateCodeFromCommandsRequest;
- output: GenerateCodeFromCommandsResponse;
- };
- sdk: {
- input: GenerateCodeFromCommandsCommandInput;
- output: GenerateCodeFromCommandsCommandOutput;
- };
-};
+ // Start section: command_body_extra
+ // End section: command_body_extra
}
diff --git a/src.gen/@amzn/amazon-q-developer-streaming-client/src/commands/SendMessageCommand.ts b/src.gen/@amzn/amazon-q-developer-streaming-client/src/commands/SendMessageCommand.ts
index 74f1722698e..d823c4d79cd 100644
--- a/src.gen/@amzn/amazon-q-developer-streaming-client/src/commands/SendMessageCommand.ts
+++ b/src.gen/@amzn/amazon-q-developer-streaming-client/src/commands/SendMessageCommand.ts
@@ -11,642 +11,85 @@ import {
SendMessageResponseFilterSensitiveLog,
} from "../models/models_0";
import {
- de_SendMessageCommand,
- se_SendMessageCommand,
+ deserializeAws_json1_0SendMessageCommand,
+ serializeAws_json1_0SendMessageCommand,
} from "../protocols/Aws_json1_0";
-import { getSerdePlugin } from "@smithy/middleware-serde";
-import { Command as $Command } from "@smithy/smithy-client";
-import { MetadataBearer as __MetadataBearer } from "@smithy/types";
+import { getSerdePlugin } from "@aws-sdk/middleware-serde";
+import {
+ HttpRequest as __HttpRequest,
+ HttpResponse as __HttpResponse,
+} from "@aws-sdk/protocol-http";
+import { Command as $Command } from "@aws-sdk/smithy-client";
+import {
+ FinalizeHandlerArguments,
+ Handler,
+ HandlerExecutionContext,
+ MiddlewareStack,
+ EventStreamSerdeContext as __EventStreamSerdeContext,
+ HttpHandlerOptions as __HttpHandlerOptions,
+ MetadataBearer as __MetadataBearer,
+ SerdeContext as __SerdeContext,
+} from "@aws-sdk/types";
-/**
- * @public
- */
-export type { __MetadataBearer };
-export { $Command };
-/**
- * @public
- *
- * The input for {@link SendMessageCommand}.
- */
export interface SendMessageCommandInput extends SendMessageRequest {}
-/**
- * @public
- *
- * The output of {@link SendMessageCommand}.
- */
export interface SendMessageCommandOutput extends SendMessageResponse, __MetadataBearer {}
-/**
- * @public
- *
- * @example
- * Use a bare-bones client and the command you need to make an API call.
- * ```javascript
- * import { QDeveloperStreamingClient, SendMessageCommand } from "@amzn/amazon-q-developer-streaming-client"; // ES Modules import
- * // const { QDeveloperStreamingClient, SendMessageCommand } = require("@amzn/amazon-q-developer-streaming-client"); // CommonJS import
- * const client = new QDeveloperStreamingClient(config);
- * const input = { // SendMessageRequest
- * conversationState: { // ConversationState
- * conversationId: "STRING_VALUE",
- * history: [ // ChatHistory
- * { // ChatMessage Union: only one key present
- * userInputMessage: { // UserInputMessage
- * content: "STRING_VALUE", // required
- * userInputMessageContext: { // UserInputMessageContext
- * editorState: { // EditorState
- * document: { // TextDocument
- * relativeFilePath: "STRING_VALUE", // required
- * programmingLanguage: { // ProgrammingLanguage
- * languageName: "STRING_VALUE", // required
- * },
- * text: "STRING_VALUE",
- * documentSymbols: [ // DocumentSymbols
- * { // DocumentSymbol
- * name: "STRING_VALUE", // required
- * type: "DECLARATION" || "USAGE", // required
- * source: "STRING_VALUE",
- * },
- * ],
- * },
- * cursorState: { // CursorState Union: only one key present
- * position: { // Position
- * line: Number("int"), // required
- * character: Number("int"), // required
- * },
- * range: { // Range
- * start: {
- * line: Number("int"), // required
- * character: Number("int"), // required
- * },
- * end: {
- * line: Number("int"), // required
- * character: Number("int"), // required
- * },
- * },
- * },
- * relevantDocuments: [ // RelevantDocumentList
- * { // RelevantTextDocument
- * relativeFilePath: "STRING_VALUE", // required
- * programmingLanguage: {
- * languageName: "STRING_VALUE", // required
- * },
- * text: "STRING_VALUE",
- * documentSymbols: [
- * {
- * name: "STRING_VALUE", // required
- * type: "DECLARATION" || "USAGE", // required
- * source: "STRING_VALUE",
- * },
- * ],
- * },
- * ],
- * useRelevantDocuments: true || false,
- * },
- * shellState: { // ShellState
- * shellName: "STRING_VALUE", // required
- * shellHistory: [ // ShellHistory
- * { // ShellHistoryEntry
- * command: "STRING_VALUE", // required
- * directory: "STRING_VALUE",
- * exitCode: Number("int"),
- * stdout: "STRING_VALUE",
- * stderr: "STRING_VALUE",
- * },
- * ],
- * },
- * gitState: { // GitState
- * status: "STRING_VALUE",
- * },
- * envState: { // EnvState
- * operatingSystem: "STRING_VALUE",
- * currentWorkingDirectory: "STRING_VALUE",
- * environmentVariables: [ // EnvironmentVariables
- * { // EnvironmentVariable
- * key: "STRING_VALUE",
- * value: "STRING_VALUE",
- * },
- * ],
- * },
- * appStudioContext: { // AppStudioState
- * namespace: "STRING_VALUE", // required
- * propertyName: "STRING_VALUE", // required
- * propertyValue: "STRING_VALUE",
- * propertyContext: "STRING_VALUE", // required
- * },
- * diagnostic: { // Diagnostic Union: only one key present
- * textDocumentDiagnostic: { // TextDocumentDiagnostic
- * document: {
- * relativeFilePath: "STRING_VALUE", // required
- * programmingLanguage: {
- * languageName: "STRING_VALUE", // required
- * },
- * text: "STRING_VALUE",
- * documentSymbols: [
- * {
- * name: "STRING_VALUE", // required
- * type: "DECLARATION" || "USAGE", // required
- * source: "STRING_VALUE",
- * },
- * ],
- * },
- * range: {
- * start: {
- * line: Number("int"), // required
- * character: Number("int"), // required
- * },
- * end: {
- * line: Number("int"), // required
- * character: Number("int"), // required
- * },
- * },
- * source: "STRING_VALUE", // required
- * severity: "ERROR" || "WARNING" || "INFORMATION" || "HINT", // required
- * message: "STRING_VALUE", // required
- * },
- * runtimeDiagnostic: { // RuntimeDiagnostic
- * source: "STRING_VALUE", // required
- * severity: "ERROR" || "WARNING" || "INFORMATION" || "HINT", // required
- * message: "STRING_VALUE", // required
- * },
- * },
- * 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" || "CODE_GENERATION",
- * },
- * assistantResponseMessage: { // AssistantResponseMessage
- * messageId: "STRING_VALUE",
- * content: "STRING_VALUE", // required
- * supplementaryWebLinks: [ // SupplementaryWebLinks
- * { // SupplementaryWebLink
- * url: "STRING_VALUE", // required
- * title: "STRING_VALUE", // required
- * snippet: "STRING_VALUE",
- * },
- * ],
- * references: [ // References
- * { // Reference
- * licenseName: "STRING_VALUE",
- * repository: "STRING_VALUE",
- * url: "STRING_VALUE",
- * recommendationContentSpan: { // Span
- * start: Number("int"),
- * end: Number("int"),
- * },
- * },
- * ],
- * 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" || "CODE_GENERATION",
- * },
- * },
- * },
- * ],
- * currentMessage: {// Union: only one key present
- * userInputMessage: {
- * content: "STRING_VALUE", // required
- * userInputMessageContext: {
- * editorState: {
- * document: "",
- * cursorState: {// Union: only one key present
- * position: "",
- * range: {
- * start: "", // required
- * end: "", // required
- * },
- * },
- * relevantDocuments: [
- * {
- * relativeFilePath: "STRING_VALUE", // required
- * programmingLanguage: {
- * languageName: "STRING_VALUE", // required
- * },
- * text: "STRING_VALUE",
- * documentSymbols: [
- * {
- * name: "STRING_VALUE", // required
- * type: "DECLARATION" || "USAGE", // required
- * source: "STRING_VALUE",
- * },
- * ],
- * },
- * ],
- * useRelevantDocuments: true || false,
- * },
- * shellState: {
- * shellName: "STRING_VALUE", // required
- * shellHistory: [
- * {
- * command: "STRING_VALUE", // required
- * directory: "STRING_VALUE",
- * exitCode: Number("int"),
- * stdout: "STRING_VALUE",
- * stderr: "STRING_VALUE",
- * },
- * ],
- * },
- * gitState: {
- * status: "STRING_VALUE",
- * },
- * envState: {
- * operatingSystem: "STRING_VALUE",
- * currentWorkingDirectory: "STRING_VALUE",
- * environmentVariables: [
- * {
- * key: "STRING_VALUE",
- * value: "STRING_VALUE",
- * },
- * ],
- * },
- * appStudioContext: {
- * namespace: "STRING_VALUE", // required
- * propertyName: "STRING_VALUE", // required
- * propertyValue: "STRING_VALUE",
- * propertyContext: "STRING_VALUE", // required
- * },
- * diagnostic: {// Union: only one key present
- * textDocumentDiagnostic: {
- * document: "", // required
- * range: {
- * start: "", // required
- * end: "", // required
- * },
- * source: "STRING_VALUE", // required
- * severity: "ERROR" || "WARNING" || "INFORMATION" || "HINT", // required
- * message: "STRING_VALUE", // required
- * },
- * runtimeDiagnostic: {
- * source: "STRING_VALUE", // required
- * severity: "ERROR" || "WARNING" || "INFORMATION" || "HINT", // required
- * message: "STRING_VALUE", // required
- * },
- * },
- * 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" || "CODE_GENERATION",
- * },
- * assistantResponseMessage: {
- * messageId: "STRING_VALUE",
- * content: "STRING_VALUE", // required
- * supplementaryWebLinks: [
- * {
- * url: "STRING_VALUE", // required
- * title: "STRING_VALUE", // required
- * snippet: "STRING_VALUE",
- * },
- * ],
- * references: [
- * {
- * licenseName: "STRING_VALUE",
- * repository: "STRING_VALUE",
- * url: "STRING_VALUE",
- * recommendationContentSpan: {
- * start: Number("int"),
- * end: Number("int"),
- * },
- * },
- * ],
- * 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" || "CODE_GENERATION",
- * },
- * },
- * },
- * chatTriggerType: "MANUAL" || "DIAGNOSTIC" || "INLINE_CHAT", // required
- * customizationArn: "STRING_VALUE",
- * },
- * profileArn: "STRING_VALUE",
- * source: "STRING_VALUE",
- * dryRun: true || false,
- * };
- * const command = new SendMessageCommand(input);
- * const response = await client.send(command);
- * // { // 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
- * // licenseName: "STRING_VALUE",
- * // repository: "STRING_VALUE",
- * // url: "STRING_VALUE",
- * // recommendationContentSpan: { // Span
- * // start: Number("int"),
- * // end: Number("int"),
- * // },
- * // },
- * // ],
- * // },
- * // supplementaryWebLinksEvent: { // SupplementaryWebLinksEvent
- * // supplementaryWebLinks: [ // SupplementaryWebLinks
- * // { // SupplementaryWebLink
- * // url: "STRING_VALUE", // required
- * // title: "STRING_VALUE", // required
- * // snippet: "STRING_VALUE",
- * // },
- * // ],
- * // },
- * // 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" || "CODE_GENERATION",
- * // },
- * // },
- * // codeEvent: { // CodeEvent
- * // content: "STRING_VALUE", // required
- * // },
- * // intentsEvent: { // IntentsEvent
- * // intents: { // IntentMap
- * // "": { // IntentData
- * // "": { // IntentDataType Union: only one key present
- * // string: "STRING_VALUE",
- * // },
- * // },
- * // },
- * // },
- * // 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 Union: only one key present
- * // 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 Union: only one key present
- * // webLink: { // WebLink
- * // label: "STRING_VALUE", // required
- * // url: "STRING_VALUE", // required
- * // },
- * // moduleLink: { // ModuleLink Union: only one key present
- * // 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
- * // },
- * // ],
- * // },
- * // },
- * // ],
- * // },
- * // resource: "",
- * // resourceList: {
- * // action: {// Union: only one key present
- * // webLink: {
- * // label: "STRING_VALUE", // required
- * // url: "STRING_VALUE", // required
- * // },
- * // moduleLink: {// Union: only one key present
- * // cloudWatchTroubleshootingLink: {
- * // label: "STRING_VALUE", // required
- * // investigationPayload: "STRING_VALUE", // required
- * // defaultText: "STRING_VALUE",
- * // },
- * // },
- * // },
- * // items: [ // required
- * // "",
- * // ],
- * // },
- * // },
- * // },
- * // ],
- * // },
- * // invalidStateEvent: { // InvalidStateEvent
- * // reason: "INVALID_TASK_ASSIST_PLAN", // required
- * // message: "STRING_VALUE", // required
- * // },
- * // error: { // InternalServerException
- * // message: "STRING_VALUE", // required
- * // },
- * // },
- * // };
- *
- * ```
- *
- * @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 QDeveloperStreamingClientResolvedConfig | config} for QDeveloperStreamingClient's `config` shape.
- *
- * @throws {@link InternalServerException} (server fault)
- * This exception is thrown when an unexpected error occurred during the processing of a request.
- *
- * @throws {@link ServiceQuotaExceededException} (client fault)
- * This exception is thrown when request was denied due to caller exceeding their usage limits
- *
- * @throws {@link DryRunOperationException} (client fault)
- * This exception is translated to a 204 as it succeeded the IAM Auth.
- *
- * @throws {@link ThrottlingException} (client fault)
- * This exception is thrown when request was denied due to request throttling.
- *
- * @throws {@link ValidationException} (client fault)
- * This exception is thrown when the input fails to satisfy the constraints specified by the service.
- *
- * @throws {@link ConflictException} (client fault)
- * This exception is thrown when the action to perform could not be completed because the resource is in a conflicting state.
- *
- * @throws {@link ResourceNotFoundException} (client fault)
- * This exception is thrown when describing a resource that does not exist.
- *
- * @throws {@link AccessDeniedException} (client fault)
- * This exception is thrown when the user does not have sufficient access to perform this action.
- *
- * @throws {@link QDeveloperStreamingServiceException}
- * Base exception class for all service exceptions from QDeveloperStreaming service.
- *
- */
-export class SendMessageCommand extends $Command.classBuilder()
- .m(function (this: any, Command: any, cs: any, config: QDeveloperStreamingClientResolvedConfig, o: any) {
- return [
+export class SendMessageCommand extends $Command {
+ // Start section: command_properties
+ // End section: command_properties
+
+ constructor(readonly input: SendMessageCommandInput) {
+ // Start section: command_constructor
+ super();
+ // End section: command_constructor
+ }
+
+ /**
+ * @internal
+ */
+ resolveMiddleware(
+ clientStack: MiddlewareStack,
+ configuration: QDeveloperStreamingClientResolvedConfig,
+ options?: __HttpHandlerOptions
+ ): Handler {
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
+
+ const stack = clientStack.concat(this.middlewareStack);
+
+ const { logger } = configuration;
+ const clientName = "QDeveloperStreamingClient";
+ const commandName = "SendMessageCommand";
+ const handlerExecutionContext: HandlerExecutionContext = {
+ logger,
+ clientName,
+ commandName,
+ inputFilterSensitiveLog:
+ SendMessageRequestFilterSensitiveLog,
+ outputFilterSensitiveLog:
+ SendMessageResponseFilterSensitiveLog,
+ }
+ const { requestHandler } = configuration;
+ return stack.resolve(
+ (request: FinalizeHandlerArguments) =>
+ requestHandler.handle(request.request as __HttpRequest, options || {}),
+ handlerExecutionContext
+ );
+ }
+
+ private serialize(
+ input: SendMessageCommandInput,
+ context: __SerdeContext
+ ): Promise<__HttpRequest> {
+ return serializeAws_json1_0SendMessageCommand(input, context);
+ }
- getSerdePlugin(config, this.serialize, this.deserialize),
- ];
- })
- .s("AmazonQDeveloperStreamingService", "SendMessage", {
+ private deserialize(
+ output: __HttpResponse,
+ context: __SerdeContext & __EventStreamSerdeContext
+ ): Promise {
+ return deserializeAws_json1_0SendMessageCommand(output, context);
+ }
- /**
- * @internal
- */
- eventStream: {
- output: true,
- },
- })
- .n("QDeveloperStreamingClient", "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;
- };
-};
+ // Start section: command_body_extra
+ // End section: command_body_extra
}
diff --git a/src.gen/@amzn/amazon-q-developer-streaming-client/src/endpoints.ts b/src.gen/@amzn/amazon-q-developer-streaming-client/src/endpoints.ts
index 14f0eaa4ec6..430dab4416d 100644
--- a/src.gen/@amzn/amazon-q-developer-streaming-client/src/endpoints.ts
+++ b/src.gen/@amzn/amazon-q-developer-streaming-client/src/endpoints.ts
@@ -1,13 +1,13 @@
// smithy-typescript generated code
-import {
- RegionInfoProvider,
- RegionInfoProviderOptions,
-} from "@aws-sdk/types";
import {
PartitionHash,
RegionHash,
getRegionInfo,
-} from "@smithy/config-resolver";
+} from "@aws-sdk/config-resolver";
+import {
+ RegionInfoProvider,
+ RegionInfoProviderOptions,
+} from "@aws-sdk/types";
const regionHash: RegionHash = {
};
@@ -26,9 +26,7 @@ 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",
@@ -37,7 +35,6 @@ const partitionHash: PartitionHash = {
"eu-west-1",
"eu-west-2",
"eu-west-3",
- "il-central-1",
"me-central-1",
"me-south-1",
"sa-east-1",
@@ -46,7 +43,7 @@ const partitionHash: PartitionHash = {
"us-west-1",
"us-west-2",
],
- regionRegex: "^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",
+ regionRegex: "^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$",
variants: [
{
"hostname": "amazonqdeveloperstreamingservice.{region}.amazonaws.com",
@@ -142,41 +139,6 @@ const partitionHash: PartitionHash = {
}
],
},
- "aws-iso-e": {
- regions: [
- "eu-isoe-west-1",
- ],
- regionRegex: "^eu\\-isoe\\-\\w+\\-\\d+$",
- variants: [
- {
- "hostname": "amazonqdeveloperstreamingservice.{region}.cloud.adc-e.uk",
- "tags": []
- },
- {
- "hostname": "amazonqdeveloperstreamingservice-fips.{region}.cloud.adc-e.uk",
- "tags": [
- "fips"
- ]
- }
- ],
- },
- "aws-iso-f": {
- regions: [
- ],
- regionRegex: "^us\\-isof\\-\\w+\\-\\d+$",
- variants: [
- {
- "hostname": "amazonqdeveloperstreamingservice.{region}.csp.hci.ic.gov",
- "tags": []
- },
- {
- "hostname": "amazonqdeveloperstreamingservice-fips.{region}.csp.hci.ic.gov",
- "tags": [
- "fips"
- ]
- }
- ],
- },
"aws-us-gov": {
regions: [
"us-gov-east-1",
diff --git a/src.gen/@amzn/amazon-q-developer-streaming-client/src/extensionConfiguration.ts b/src.gen/@amzn/amazon-q-developer-streaming-client/src/extensionConfiguration.ts
deleted file mode 100644
index 74ed575070f..00000000000
--- a/src.gen/@amzn/amazon-q-developer-streaming-client/src/extensionConfiguration.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-// 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";
-
-/**
- * @internal
- */
-export interface QDeveloperStreamingExtensionConfiguration extends HttpHandlerExtensionConfiguration, DefaultExtensionConfiguration, AwsRegionExtensionConfiguration, HttpAuthExtensionConfiguration {}
diff --git a/src.gen/@amzn/amazon-q-developer-streaming-client/src/index.ts b/src.gen/@amzn/amazon-q-developer-streaming-client/src/index.ts
index 2fe51ba01b5..255efc402b3 100644
--- a/src.gen/@amzn/amazon-q-developer-streaming-client/src/index.ts
+++ b/src.gen/@amzn/amazon-q-developer-streaming-client/src/index.ts
@@ -1,9 +1,6 @@
// smithy-typescript generated code
-/* eslint-disable */
export * from "./QDeveloperStreamingClient";
export * from "./QDeveloperStreaming";
-export type { RuntimeExtension } from "./runtimeExtensions";
-export type { QDeveloperStreamingExtensionConfiguration } from "./extensionConfiguration";
export * from "./commands";
export * from "./models";
diff --git a/src.gen/@amzn/amazon-q-developer-streaming-client/src/models/QDeveloperStreamingServiceException.ts b/src.gen/@amzn/amazon-q-developer-streaming-client/src/models/QDeveloperStreamingServiceException.ts
index 78c4dae9807..74a683825aa 100644
--- a/src.gen/@amzn/amazon-q-developer-streaming-client/src/models/QDeveloperStreamingServiceException.ts
+++ b/src.gen/@amzn/amazon-q-developer-streaming-client/src/models/QDeveloperStreamingServiceException.ts
@@ -2,15 +2,9 @@
import {
ServiceException as __ServiceException,
ServiceExceptionOptions as __ServiceExceptionOptions,
-} from "@smithy/smithy-client";
-
-export type { __ServiceExceptionOptions }
-
-export { __ServiceException }
+} from "@aws-sdk/smithy-client";
/**
- * @public
- *
* Base exception class for all service exceptions from QDeveloperStreaming service.
*/
export class QDeveloperStreamingServiceException extends __ServiceException {
diff --git a/src.gen/@amzn/amazon-q-developer-streaming-client/src/models/models_0.ts b/src.gen/@amzn/amazon-q-developer-streaming-client/src/models/models_0.ts
index 2c97e552099..4c3327fbb2e 100644
--- a/src.gen/@amzn/amazon-q-developer-streaming-client/src/models/models_0.ts
+++ b/src.gen/@amzn/amazon-q-developer-streaming-client/src/models/models_0.ts
@@ -3,32 +3,22 @@ import { QDeveloperStreamingServiceException as __BaseException } from "./QDevel
import {
SENSITIVE_STRING,
ExceptionOptionType as __ExceptionOptionType,
-} from "@smithy/smithy-client";
+} from "@aws-sdk/smithy-client";
-/**
- * @public
- * @enum
- */
-export const AccessDeniedExceptionReason = {
- UNAUTHORIZED_CUSTOMIZATION_RESOURCE_ACCESS: "UNAUTHORIZED_CUSTOMIZATION_RESOURCE_ACCESS",
-} as const
-/**
- * @public
- */
-export type AccessDeniedExceptionReason = typeof AccessDeniedExceptionReason[keyof typeof AccessDeniedExceptionReason]
+export enum AccessDeniedExceptionReason {
+ UNAUTHORIZED_CUSTOMIZATION_RESOURCE_ACCESS = "UNAUTHORIZED_CUSTOMIZATION_RESOURCE_ACCESS",
+}
/**
* 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";
/**
* Reason for AccessDeniedException
- * @public
*/
- reason?: AccessDeniedExceptionReason;
+ reason?: AccessDeniedExceptionReason | string;
/**
* @internal
@@ -46,7 +36,6 @@ export class AccessDeniedException extends __BaseException {
/**
* 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";
@@ -68,7 +57,6 @@ export class InternalServerException extends __BaseException {
/**
* This exception is thrown when describing a resource that does not exist.
- * @public
*/
export class ResourceNotFoundException extends __BaseException {
readonly name: "ResourceNotFoundException" = "ResourceNotFoundException";
@@ -86,9 +74,12 @@ export class ResourceNotFoundException extends __BaseException {
}
}
+export enum ThrottlingExceptionReason {
+ MONTHLY_REQUEST_COUNT = "MONTHLY_REQUEST_COUNT",
+}
+
/**
* This exception is thrown when request was denied due to request throttling.
- * @public
*/
export class ThrottlingException extends __BaseException {
readonly name: "ThrottlingException" = "ThrottlingException";
@@ -96,6 +87,11 @@ export class ThrottlingException extends __BaseException {
$retryable = {
throttling: true,
};
+ /**
+ * Reason for ThrottlingException
+ */
+ reason?: ThrottlingExceptionReason | string;
+
/**
* @internal
*/
@@ -106,35 +102,26 @@ export class ThrottlingException extends __BaseException {
...opts
});
Object.setPrototypeOf(this, ThrottlingException.prototype);
+ this.reason = opts.reason;
}
}
-/**
- * @public
- * @enum
- */
-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
- */
-export type ValidationExceptionReason = typeof ValidationExceptionReason[keyof typeof ValidationExceptionReason]
+export enum ValidationExceptionReason {
+ CONTENT_LENGTH_EXCEEDS_THRESHOLD = "CONTENT_LENGTH_EXCEEDS_THRESHOLD",
+ INVALID_CONVERSATION_ID = "INVALID_CONVERSATION_ID",
+ INVALID_KMS_GRANT = "INVALID_KMS_GRANT",
+}
/**
* 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";
/**
* Reason for ValidationException
- * @public
*/
- reason?: ValidationExceptionReason;
+ reason?: ValidationExceptionReason | string;
/**
* @internal
@@ -152,32 +139,27 @@ export class ValidationException extends __BaseException {
/**
* Description of a user's context when they are calling Q Chat from AppStudio
- * @public
*/
export interface AppStudioState {
/**
* The namespace of the context. Examples: 'ui.Button', 'ui.Table.DataSource', 'ui.Table.RowActions.Button', 'logic.invokeAWS', 'logic.JavaScript'
- * @public
*/
- namespace: string | undefined;
+ namespace: string;
/**
* The name of the property. Examples: 'visibility', 'disability', 'value', 'code'
- * @public
*/
- propertyName: string | undefined;
+ propertyName: string;
/**
* The value of the property.
- * @public
*/
propertyValue?: string;
/**
* Context about how the property is used
- * @public
*/
- propertyContext: string | undefined;
+ propertyContext: string;
}
/**
@@ -201,14 +183,12 @@ export const AppStudioStateFilterSensitiveLog = (obj: AppStudioState): any => ({
/**
* Streaming Response Event for Assistant Markdown text message.
- * @public
*/
export interface AssistantResponseEvent {
/**
* The content of the text message in markdown format.
- * @public
*/
- content: string | undefined;
+ content: string;
}
/**
@@ -221,73 +201,62 @@ export const AssistantResponseEventFilterSensitiveLog = (obj: AssistantResponseE
}),
})
-/**
- * @public
- * @enum
- */
-export const UserIntent = {
+export enum UserIntent {
/**
* Apply Common Best Practices
*/
- APPLY_COMMON_BEST_PRACTICES: "APPLY_COMMON_BEST_PRACTICES",
+ APPLY_COMMON_BEST_PRACTICES = "APPLY_COMMON_BEST_PRACTICES",
/**
* Cite Sources
*/
- CITE_SOURCES: "CITE_SOURCES",
+ CITE_SOURCES = "CITE_SOURCES",
/**
* generate code
*/
- CODE_GENERATION: "CODE_GENERATION",
+ CODE_GENERATION = "CODE_GENERATION",
/**
* Explain Code Selection
*/
- EXPLAIN_CODE_SELECTION: "EXPLAIN_CODE_SELECTION",
+ EXPLAIN_CODE_SELECTION = "EXPLAIN_CODE_SELECTION",
/**
* Explain Code Line By Line
*/
- EXPLAIN_LINE_BY_LINE: "EXPLAIN_LINE_BY_LINE",
+ EXPLAIN_LINE_BY_LINE = "EXPLAIN_LINE_BY_LINE",
/**
* Generate CloudFormation Template
*/
- GENERATE_CLOUDFORMATION_TEMPLATE: "GENERATE_CLOUDFORMATION_TEMPLATE",
+ GENERATE_CLOUDFORMATION_TEMPLATE = "GENERATE_CLOUDFORMATION_TEMPLATE",
/**
* Generate Unit Tests
*/
- GENERATE_UNIT_TESTS: "GENERATE_UNIT_TESTS",
+ GENERATE_UNIT_TESTS = "GENERATE_UNIT_TESTS",
/**
* Improve Code
*/
- IMPROVE_CODE: "IMPROVE_CODE",
+ IMPROVE_CODE = "IMPROVE_CODE",
/**
* Show More Examples
*/
- SHOW_EXAMPLES: "SHOW_EXAMPLES",
+ SHOW_EXAMPLES = "SHOW_EXAMPLES",
/**
* Suggest Alternative Implementation
*/
- SUGGEST_ALTERNATE_IMPLEMENTATION: "SUGGEST_ALTERNATE_IMPLEMENTATION",
-} as const
-/**
- * @public
- */
-export type UserIntent = typeof UserIntent[keyof typeof UserIntent]
+ SUGGEST_ALTERNATE_IMPLEMENTATION = "SUGGEST_ALTERNATE_IMPLEMENTATION",
+}
/**
* Followup Prompt for the Assistant Response
- * @public
*/
export interface FollowupPrompt {
/**
* The content of the text message in markdown format.
- * @public
*/
- content: string | undefined;
+ content: string;
/**
* User Intent
- * @public
*/
- userIntent?: UserIntent;
+ userIntent?: UserIntent | string;
}
/**
@@ -302,63 +271,67 @@ export const FollowupPromptFilterSensitiveLog = (obj: FollowupPrompt): any => ({
/**
* Represents span in a text
- * @public
*/
export interface Span {
start?: number;
end?: number;
}
+/**
+ * @internal
+ */
+export const SpanFilterSensitiveLog = (obj: Span): any => ({
+ ...obj,
+})
+
/**
* Code Reference / Repository details
- * @public
*/
export interface Reference {
/**
* License name
- * @public
*/
licenseName?: string;
/**
* Code Repsitory for the associated reference
- * @public
*/
repository?: string;
/**
* Respository URL
- * @public
*/
url?: string;
/**
* Span / Range for the Reference
- * @public
*/
recommendationContentSpan?: Span;
}
+/**
+ * @internal
+ */
+export const ReferenceFilterSensitiveLog = (obj: Reference): any => ({
+ ...obj,
+})
+
/**
* Represents an additional reference link retured with the Chat message
- * @public
*/
export interface SupplementaryWebLink {
/**
* URL of the web reference link
- * @public
*/
- url: string | undefined;
+ url: string;
/**
* Title of the web reference link
- * @public
*/
- title: string | undefined;
+ title: string;
/**
* Relevant text snippet from the link
- * @public
*/
snippet?: string;
}
@@ -381,36 +354,30 @@ export const SupplementaryWebLinkFilterSensitiveLog = (obj: SupplementaryWebLink
/**
* Markdown text message.
- * @public
*/
export interface AssistantResponseMessage {
/**
* Unique identifier for the chat message
- * @public
*/
messageId?: string;
/**
* The content of the text message in markdown format.
- * @public
*/
- content: string | undefined;
+ content: string;
/**
* Web References
- * @public
*/
supplementaryWebLinks?: (SupplementaryWebLink)[];
/**
* Code References
- * @public
*/
references?: (Reference)[];
/**
* Followup Prompt
- * @public
*/
followupPrompt?: FollowupPrompt;
}
@@ -434,32 +401,22 @@ 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]
+export enum 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",
+}
/**
* 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;
+ reason?: ConflictExceptionReason | string;
/**
* @internal
@@ -477,15 +434,20 @@ export class ConflictException extends __BaseException {
/**
* Programming Languages supported by CodeWhisperer
- * @public
*/
export interface ProgrammingLanguage {
- languageName: string | undefined;
+ languageName: string;
}
+/**
+ * @internal
+ */
+export const ProgrammingLanguageFilterSensitiveLog = (obj: ProgrammingLanguage): any => ({
+ ...obj,
+})
+
/**
* Information about the state of the AWS management console page from which the user is calling
- * @public
*/
export interface ConsoleState {
region?: string;
@@ -509,43 +471,31 @@ export const ConsoleStateFilterSensitiveLog = (obj: ConsoleState): any => ({
}),
})
-/**
- * @public
- * @enum
- */
-export const DiagnosticSeverity = {
- ERROR: "ERROR",
- HINT: "HINT",
- INFORMATION: "INFORMATION",
- WARNING: "WARNING",
-} as const
-/**
- * @public
- */
-export type DiagnosticSeverity = typeof DiagnosticSeverity[keyof typeof DiagnosticSeverity]
+export enum DiagnosticSeverity {
+ ERROR = "ERROR",
+ HINT = "HINT",
+ INFORMATION = "INFORMATION",
+ WARNING = "WARNING",
+}
/**
* Structure to represent metadata about a Runtime Diagnostics
- * @public
*/
export interface RuntimeDiagnostic {
/**
* A human-readable string describing the source of the diagnostic
- * @public
*/
- source: string | undefined;
+ source: string;
/**
* Diagnostic Error type
- * @public
*/
- severity: DiagnosticSeverity | undefined;
+ severity: DiagnosticSeverity | string;
/**
* The diagnostic's message.
- * @public
*/
- message: string | undefined;
+ message: string;
}
/**
@@ -561,68 +511,56 @@ export const RuntimeDiagnosticFilterSensitiveLog = (obj: RuntimeDiagnostic): any
}),
})
-/**
- * @public
- * @enum
- */
-export const SymbolType = {
- DECLARATION: "DECLARATION",
- USAGE: "USAGE",
-} as const
-/**
- * @public
- */
-export type SymbolType = typeof SymbolType[keyof typeof SymbolType]
+export enum SymbolType {
+ DECLARATION = "DECLARATION",
+ USAGE = "USAGE",
+}
-/**
- * @public
- */
export interface DocumentSymbol {
/**
* Name of the Document Symbol
- * @public
*/
- name: string | undefined;
+ name: string;
/**
* Symbol type - DECLARATION / USAGE
- * @public
*/
- type: SymbolType | undefined;
+ type: SymbolType | string;
/**
* Symbol package / source for FullyQualified names
- * @public
*/
source?: string;
}
+/**
+ * @internal
+ */
+export const DocumentSymbolFilterSensitiveLog = (obj: DocumentSymbol): any => ({
+ ...obj,
+})
+
/**
* Represents a Text Document / File
- * @public
*/
export interface TextDocument {
/**
* Filepath relative to the root of the workspace
- * @public
*/
- relativeFilePath: string | undefined;
+ relativeFilePath: string;
/**
* The text document's language identifier.
- * @public
*/
programmingLanguage?: ProgrammingLanguage;
/**
* Content of the text document
- * @public
*/
text?: string;
/**
* DocumentSymbols parsed from a text document
- * @public
*/
documentSymbols?: (DocumentSymbol)[];
}
@@ -642,74 +580,76 @@ export const TextDocumentFilterSensitiveLog = (obj: TextDocument): any => ({
/**
* Indicates Cursor postion in a Text Document
- * @public
*/
export interface Position {
/**
* Line position in a document.
- * @public
*/
- line: number | undefined;
+ line: number;
/**
* Character offset on a line in a document (zero-based)
- * @public
*/
- character: number | undefined;
+ character: number;
}
+/**
+ * @internal
+ */
+export const PositionFilterSensitiveLog = (obj: Position): any => ({
+ ...obj,
+})
+
/**
* Indicates Range / Span in a Text Document
- * @public
*/
export interface Range {
/**
* The range's start position.
- * @public
*/
- start: Position | undefined;
+ start: Position;
/**
* The range's end position.
- * @public
*/
- end: Position | undefined;
+ end: Position;
}
+/**
+ * @internal
+ */
+export const RangeFilterSensitiveLog = (obj: Range): any => ({
+ ...obj,
+})
+
/**
* Structure to represent metadata about a TextDocument Diagnostic
- * @public
*/
export interface TextDocumentDiagnostic {
/**
* Represents a Text Document associated with Diagnostic
- * @public
*/
- document: TextDocument | undefined;
+ document: TextDocument;
/**
* The range at which the message applies.
- * @public
*/
- range: Range | undefined;
+ range: Range;
/**
* A human-readable string describing the source of the diagnostic
- * @public
*/
- source: string | undefined;
+ source: string;
/**
* Diagnostic Error type
- * @public
*/
- severity: DiagnosticSeverity | undefined;
+ severity: DiagnosticSeverity | string;
/**
* The diagnostic's message.
- * @public
*/
- message: string | undefined;
+ message: string;
}
/**
@@ -730,21 +670,16 @@ export const TextDocumentDiagnosticFilterSensitiveLog = (obj: TextDocumentDiagno
/**
* Represents a Diagnostic message
- * @public
*/
export type Diagnostic =
| Diagnostic.RuntimeDiagnosticMember
| Diagnostic.TextDocumentDiagnosticMember
| Diagnostic.$UnknownMember
-/**
- * @public
- */
export namespace Diagnostic {
/**
* Diagnostics originating from a TextDocument
- * @public
*/
export interface TextDocumentDiagnosticMember {
textDocumentDiagnostic: TextDocumentDiagnostic;
@@ -754,7 +689,6 @@ export namespace Diagnostic {
/**
* Diagnostics originating from a Runtime
- * @public
*/
export interface RuntimeDiagnosticMember {
textDocumentDiagnostic?: never;
@@ -762,9 +696,6 @@ export namespace Diagnostic {
$unknown?: never;
}
- /**
- * @public
- */
export interface $UnknownMember {
textDocumentDiagnostic?: never;
runtimeDiagnostic?: never;
@@ -802,21 +733,16 @@ export const DiagnosticFilterSensitiveLog = (obj: Diagnostic): any => {
/**
* Represents the state of the Cursor in an Editor
- * @public
*/
export type CursorState =
| CursorState.PositionMember
| CursorState.RangeMember
| CursorState.$UnknownMember
-/**
- * @public
- */
export namespace CursorState {
/**
* Represents a cursor position in a Text Document
- * @public
*/
export interface PositionMember {
position: Position;
@@ -826,7 +752,6 @@ export namespace CursorState {
/**
* Represents a text selection in a Text Document
- * @public
*/
export interface RangeMember {
position?: never;
@@ -834,9 +759,6 @@ export namespace CursorState {
$unknown?: never;
}
- /**
- * @public
- */
export interface $UnknownMember {
position?: never;
range?: never;
@@ -859,33 +781,40 @@ export namespace CursorState {
}
}
+/**
+ * @internal
+ */
+export const CursorStateFilterSensitiveLog = (obj: CursorState): any => {
+ if (obj.position !== undefined) return {position:
+ PositionFilterSensitiveLog(obj.position)
+ };
+ if (obj.range !== undefined) return {range:
+ RangeFilterSensitiveLog(obj.range)
+ };
+ if (obj.$unknown !== undefined) return {[obj.$unknown[0]]: 'UNKNOWN'};
+}
/**
* Represents an IDE retrieved relevant Text Document / File
- * @public
*/
export interface RelevantTextDocument {
/**
* Filepath relative to the root of the workspace
- * @public
*/
- relativeFilePath: string | undefined;
+ relativeFilePath: string;
/**
* The text document's language identifier.
- * @public
*/
programmingLanguage?: ProgrammingLanguage;
/**
* Content of the text document
- * @public
*/
text?: string;
/**
* DocumentSymbols parsed from a text document
- * @public
*/
documentSymbols?: (DocumentSymbol)[];
}
@@ -905,30 +834,25 @@ export const RelevantTextDocumentFilterSensitiveLog = (obj: RelevantTextDocument
/**
* Represents the state of an Editor
- * @public
*/
export interface EditorState {
/**
* Represents currently edited file
- * @public
*/
document?: TextDocument;
/**
* Position of the cursor
- * @public
*/
cursorState?: CursorState;
/**
* Represents IDE provided relevant files
- * @public
*/
relevantDocuments?: (RelevantTextDocument)[];
/**
* Whether service should use relevant document in prompt
- * @public
*/
useRelevantDocuments?: boolean;
}
@@ -942,7 +866,7 @@ export const EditorStateFilterSensitiveLog = (obj: EditorState): any => ({
TextDocumentFilterSensitiveLog(obj.document)
}),
...(obj.cursorState && { cursorState:
- obj.cursorState
+ CursorStateFilterSensitiveLog(obj.cursorState)
}),
...(obj.relevantDocuments && { relevantDocuments:
obj.relevantDocuments.map(
@@ -954,18 +878,15 @@ export const EditorStateFilterSensitiveLog = (obj: EditorState): any => ({
/**
* An environment variable
- * @public
*/
export interface EnvironmentVariable {
/**
* The key of an environment variable
- * @public
*/
key?: string;
/**
* The value of an environment variable
- * @public
*/
value?: string;
}
@@ -985,26 +906,27 @@ export const EnvironmentVariableFilterSensitiveLog = (obj: EnvironmentVariable):
/**
* State related to the user's environment
- * @public
*/
export interface EnvState {
/**
* The name of the operating system in use
- * @public
*/
operatingSystem?: string;
/**
* The current working directory of the environment
- * @public
*/
currentWorkingDirectory?: string;
/**
* The environment variables set in the current environment
- * @public
*/
environmentVariables?: (EnvironmentVariable)[];
+
+ /**
+ * 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
+ */
+ timezoneOffset?: number;
}
/**
@@ -1025,12 +947,10 @@ export const EnvStateFilterSensitiveLog = (obj: EnvState): any => ({
/**
* State related to the Git VSC
- * @public
*/
export interface GitState {
/**
* The output of the command `git status --porcelain=v1 -b`
- * @public
*/
status?: string;
}
@@ -1047,36 +967,30 @@ export const GitStateFilterSensitiveLog = (obj: GitState): any => ({
/**
* An single entry in the shell history
- * @public
*/
export interface ShellHistoryEntry {
/**
* The shell command that was run
- * @public
*/
- command: string | undefined;
+ command: string;
/**
* The directory the command was ran in
- * @public
*/
directory?: string;
/**
* The exit code of the command after it finished
- * @public
*/
exitCode?: number;
/**
* The stdout from the command
- * @public
*/
stdout?: string;
/**
* The stderr from the command
- * @public
*/
stderr?: string;
}
@@ -1102,18 +1016,15 @@ export const ShellHistoryEntryFilterSensitiveLog = (obj: ShellHistoryEntry): any
/**
* Represents the state of a shell
- * @public
*/
export interface ShellState {
/**
* The name of the current shell
- * @public
*/
- shellName: string | undefined;
+ shellName: string;
/**
* The history previous shell commands for the current shell
- * @public
*/
shellHistory?: (ShellHistoryEntry)[];
}
@@ -1133,62 +1044,59 @@ export const ShellStateFilterSensitiveLog = (obj: ShellState): any => ({
/**
* Settings information passed by the Q widget
- * @public
*/
export interface UserSettings {
hasConsentedToCrossRegionCalls?: boolean;
}
+/**
+ * @internal
+ */
+export const UserSettingsFilterSensitiveLog = (obj: UserSettings): any => ({
+ ...obj,
+})
+
/**
* Additional Chat message context associated with the Chat Message
- * @public
*/
export interface UserInputMessageContext {
/**
* Editor state chat message context.
- * @public
*/
editorState?: EditorState;
/**
* Shell state chat message context.
- * @public
*/
shellState?: ShellState;
/**
* Git state chat message context.
- * @public
*/
gitState?: GitState;
/**
* Environment state chat message context.
- * @public
*/
envState?: EnvState;
/**
* The state of a user's AppStudio UI when sending a message.
- * @public
*/
appStudioContext?: AppStudioState;
/**
* Diagnostic chat message context.
- * @public
*/
diagnostic?: Diagnostic;
/**
* Contextual information about the environment from which the user is calling.
- * @public
*/
consoleState?: ConsoleState;
/**
* Settings information, e.g., whether the user has enabled cross-region API calls.
- * @public
*/
userSettings?: UserSettings;
}
@@ -1223,26 +1131,22 @@ export const UserInputMessageContextFilterSensitiveLog = (obj: UserInputMessageC
/**
* Structure to represent a chat input message from User
- * @public
*/
export interface UserInputMessage {
/**
* The content of the chat message.
- * @public
*/
- content: string | undefined;
+ content: string;
/**
* Chat message context associated with the Chat Message
- * @public
*/
userInputMessageContext?: UserInputMessageContext;
/**
* User Intent
- * @public
*/
- userIntent?: UserIntent;
+ userIntent?: UserIntent | string;
}
/**
@@ -1258,22 +1162,15 @@ export const UserInputMessageFilterSensitiveLog = (obj: UserInputMessage): any =
}),
})
-/**
- * @public
- */
export type ChatMessage =
| ChatMessage.AssistantResponseMessageMember
| ChatMessage.UserInputMessageMember
| ChatMessage.$UnknownMember
-/**
- * @public
- */
export namespace ChatMessage {
/**
* Structure to represent a chat input message from User
- * @public
*/
export interface UserInputMessageMember {
userInputMessage: UserInputMessage;
@@ -1283,7 +1180,6 @@ export namespace ChatMessage {
/**
* Markdown text message.
- * @public
*/
export interface AssistantResponseMessageMember {
userInputMessage?: never;
@@ -1291,9 +1187,6 @@ export namespace ChatMessage {
$unknown?: never;
}
- /**
- * @public
- */
export interface $UnknownMember {
userInputMessage?: never;
assistantResponseMessage?: never;
@@ -1331,14 +1224,12 @@ export const ChatMessageFilterSensitiveLog = (obj: ChatMessage): any => {
/**
* Streaming response event for generated code text.
- * @public
*/
export interface CodeEvent {
/**
* Generated code snippet.
- * @public
*/
- content: string | undefined;
+ content: string;
}
/**
@@ -1353,31 +1244,40 @@ export const CodeEventFilterSensitiveLog = (obj: CodeEvent): any => ({
/**
* Streaming Response Event for CodeReferences
- * @public
*/
export interface CodeReferenceEvent {
/**
* Code References for Assistant Response Message
- * @public
*/
references?: (Reference)[];
}
+/**
+ * @internal
+ */
+export const CodeReferenceEventFilterSensitiveLog = (obj: CodeReferenceEvent): any => ({
+ ...obj,
+})
+
/**
* Streaming Response Event when DryRun is succeessful
- * @public
*/
export interface DryRunSucceedEvent {
}
+/**
+ * @internal
+ */
+export const DryRunSucceedEventFilterSensitiveLog = (obj: DryRunSucceedEvent): any => ({
+ ...obj,
+})
+
/**
* Streaming Response Event for Followup Prompt.
- * @public
*/
export interface FollowupPromptEvent {
/**
* Followup Prompt for the Assistant Response
- * @public
*/
followupPrompt?: FollowupPrompt;
}
@@ -1392,30 +1292,16 @@ export const FollowupPromptEventFilterSensitiveLog = (obj: FollowupPromptEvent):
}),
})
-/**
- * @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]
+export enum IntentType {
+ GLUE_SENSEI = "GLUE_SENSEI",
+ RESOURCE_DATA = "RESOURCE_DATA",
+ SUPPORT = "SUPPORT",
+}
-/**
- * @public
- */
export type IntentDataType =
| IntentDataType.StringMember
| IntentDataType.$UnknownMember
-/**
- * @public
- */
export namespace IntentDataType {
export interface StringMember {
@@ -1423,9 +1309,6 @@ export namespace IntentDataType {
$unknown?: never;
}
- /**
- * @public
- */
export interface $UnknownMember {
string?: never;
$unknown: [string, any];
@@ -1445,17 +1328,24 @@ export namespace IntentDataType {
}
}
+/**
+ * @internal
+ */
+export const IntentDataTypeFilterSensitiveLog = (obj: IntentDataType): any => {
+ if (obj.string !== undefined) return {string:
+ obj.string
+ };
+ if (obj.$unknown !== undefined) return {[obj.$unknown[0]]: 'UNKNOWN'};
+}
/**
* Streaming Response Event for Intents
- * @public
*/
export interface IntentsEvent {
/**
* A map of Intent objects
- * @public
*/
- intents?: Partial>>;
+ intents?: Record>;
}
/**
@@ -1468,16 +1358,110 @@ export const IntentsEventFilterSensitiveLog = (obj: IntentsEvent): any => ({
}),
})
+/**
+ * For CloudWatch Troubleshooting Link Module
+ */
+export interface CloudWatchTroubleshootingLink {
+ /**
+ * A label for the link.
+ */
+ label: string;
+
+ /**
+ * Stringified JSON payload. See spec here https://code.amazon.com/packages/CloudWatchOdysseyModel/blobs/50c0832f0e393e4ab68827eb4f04d832366821c1/--/model/events.smithy#L28 .
+ */
+ investigationPayload: string;
+
+ /**
+ * Fallback string, if target channel does not support the CloudWatchTroubleshootingLink.
+ */
+ defaultText?: string;
+}
+
+/**
+ * @internal
+ */
+export const CloudWatchTroubleshootingLinkFilterSensitiveLog = (obj: CloudWatchTroubleshootingLink): any => ({
+ ...obj,
+ ...(obj.label && { label:
+ SENSITIVE_STRING
+ }),
+ ...(obj.investigationPayload && { investigationPayload:
+ SENSITIVE_STRING
+ }),
+ ...(obj.defaultText && { defaultText:
+ SENSITIVE_STRING
+ }),
+})
+
+export interface ModuleLink {
+ /**
+ * For CloudWatch Troubleshooting Link Module
+ */
+ cloudWatchTroubleshootingLink?: CloudWatchTroubleshootingLink;
+}
+
+/**
+ * @internal
+ */
+export const ModuleLinkFilterSensitiveLog = (obj: ModuleLink): any => ({
+ ...obj,
+ ...(obj.cloudWatchTroubleshootingLink && { cloudWatchTroubleshootingLink:
+ CloudWatchTroubleshootingLinkFilterSensitiveLog(obj.cloudWatchTroubleshootingLink)
+ }),
+})
+
+export interface WebLink {
+ /**
+ * A label for the link
+ */
+ label: string;
+
+ /**
+ * URL of the Weblink
+ */
+ url: string;
+}
+
+/**
+ * @internal
+ */
+export const WebLinkFilterSensitiveLog = (obj: WebLink): any => ({
+ ...obj,
+ ...(obj.label && { label:
+ SENSITIVE_STRING
+ }),
+ ...(obj.url && { url:
+ SENSITIVE_STRING
+ }),
+})
+
+export interface Action {
+ webLink?: WebLink;
+ moduleLink?: ModuleLink;
+}
+
+/**
+ * @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;
+ content: string;
}
/**
@@ -1490,13 +1474,9 @@ export const TextFilterSensitiveLog = (obj: Text): any => ({
}),
})
-/**
- * @public
- */
export interface AlertComponent {
/**
* Structure representing a simple text component with sensitive content, which can include Markdown formatting.
- * @public
*/
text?: Text;
}
@@ -1511,45 +1491,34 @@ export const AlertComponentFilterSensitiveLog = (obj: AlertComponent): any => ({
}),
})
-/**
- * @public
- * @enum
- */
-export const AlertType = {
+export enum AlertType {
/**
* Alert indicating an error or failure that requires attention.
*/
- ERROR: "ERROR",
+ ERROR = "ERROR",
/**
* Informational alert providing general information.
*/
- INFO: "INFO",
+ 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]
+ WARNING = "WARNING",
+}
/**
* 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;
+ type: AlertType | string;
/**
* Contains the content of the alert, which may include sensitive information.
- * @public
*/
- content: (AlertComponent)[] | undefined;
+ content: (AlertComponent)[];
}
/**
@@ -1567,20 +1536,17 @@ export const AlertFilterSensitiveLog = (obj: Alert): any => ({
/**
* 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;
+ currentState: string;
/**
* The next state of the infrastructure following the update.
- * @public
*/
- nextState: string | undefined;
+ nextState: string;
}
/**
@@ -1598,12 +1564,10 @@ export const InfrastructureUpdateTransitionFilterSensitiveLog = (obj: Infrastruc
/**
* 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;
}
@@ -1618,13 +1582,9 @@ export const InfrastructureUpdateFilterSensitiveLog = (obj: InfrastructureUpdate
}),
})
-/**
- * @public
- */
export interface StepComponent {
/**
* Structure representing a simple text component with sensitive content, which can include Markdown formatting.
- * @public
*/
text?: Text;
}
@@ -1639,71 +1599,58 @@ export const StepComponentFilterSensitiveLog = (obj: StepComponent): any => ({
}),
})
-/**
- * @public
- * @enum
- */
-export const StepState = {
+export enum StepState {
/**
* Indicates a failure or issue that needs to be addressed.
*/
- FAILED: "FAILED",
+ 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",
+ 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",
+ LOADING = "LOADING",
/**
* Indicates that the step is temporarily halted but can resume. This is a non-terminal state, representing a temporary pause.
*/
- PAUSED: "PAUSED",
+ 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",
+ PENDING = "PENDING",
/**
* Indicates that the step was stopped, either intentionally or unintentionally.
*/
- STOPPED: "STOPPED",
+ STOPPED = "STOPPED",
/**
* Indicates successful completion of the step.
*/
- SUCCEEDED: "SUCCEEDED",
-} as const
-/**
- * @public
- */
-export type StepState = typeof StepState[keyof typeof StepState]
+ SUCCEEDED = "SUCCEEDED",
+}
/**
* 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;
+ id: number;
/**
* Enum representing all possible step states, combining terminal and non-terminal states.
- * @public
*/
- state: StepState | undefined;
+ state: StepState | string;
/**
* A label for the step, providing a concise description.
- * @public
*/
- label: string | undefined;
+ label: string;
/**
* Optional content providing additional details about the step.
- * @public
*/
content?: (StepComponent)[];
}
@@ -1724,13 +1671,9 @@ export const StepFilterSensitiveLog = (obj: Step): any => ({
}),
})
-/**
- * @public
- */
export interface ProgressComponent {
/**
* Structure representing an individual step in a process.
- * @public
*/
step?: Step;
}
@@ -1747,14 +1690,12 @@ export const ProgressComponentFilterSensitiveLog = (obj: ProgressComponent): any
/**
* 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;
+ content: (ProgressComponent)[];
}
/**
@@ -1772,44 +1713,37 @@ export const ProgressFilterSensitiveLog = (obj: Progress): any => ({
/**
* Structure representing a resource item
- * @public
*/
export interface Resource {
/**
* Card title.
- * @public
*/
- title: string | undefined;
+ title: string;
/**
* Link for the resource item
- * @public
*/
- link: string | undefined;
+ link: string;
/**
* Short text about that resource for example Region: us-east-1
- * @public
*/
- description: string | undefined;
+ description: string;
/**
* Resource type e.g AWS EC2
- * @public
*/
- type: string | undefined;
+ type: string;
/**
* Amazon resource number e.g arn:aws:aec:.....
- * @public
*/
- ARN: string | undefined;
+ ARN: string;
/**
* A stringified object
- * @public
*/
- resourceJsonString: string | undefined;
+ resourceJsonString: string;
}
/**
@@ -1837,208 +1771,19 @@ export const ResourceFilterSensitiveLog = (obj: Resource): any => ({
}),
})
-/**
- * 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;
-}
-
-/**
- * @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 type ModuleLink =
- | ModuleLink.CloudWatchTroubleshootingLinkMember
- | ModuleLink.$UnknownMember
-
-/**
- * @public
- */
-export namespace ModuleLink {
-
- /**
- * For CloudWatch Troubleshooting Link Module
- * @public
- */
- export interface CloudWatchTroubleshootingLinkMember {
- cloudWatchTroubleshootingLink: CloudWatchTroubleshootingLink;
- $unknown?: never;
- }
-
- /**
- * @public
- */
- export interface $UnknownMember {
- cloudWatchTroubleshootingLink?: never;
- $unknown: [string, any];
- }
-
- export interface Visitor {
- cloudWatchTroubleshootingLink: (value: CloudWatchTroubleshootingLink) => T;
- _: (name: string, value: any) => T;
- }
-
- export const visit = (
- value: ModuleLink,
- visitor: Visitor
- ): T => {
- if (value.cloudWatchTroubleshootingLink !== undefined) return visitor.cloudWatchTroubleshootingLink(value.cloudWatchTroubleshootingLink);
- return visitor._(value.$unknown[0], value.$unknown[1]);
- }
-
-}
-/**
- * @internal
- */
-export const ModuleLinkFilterSensitiveLog = (obj: ModuleLink): any => {
- if (obj.cloudWatchTroubleshootingLink !== undefined) return {cloudWatchTroubleshootingLink:
- CloudWatchTroubleshootingLinkFilterSensitiveLog(obj.cloudWatchTroubleshootingLink)
- };
- if (obj.$unknown !== undefined) return {[obj.$unknown[0]]: 'UNKNOWN'};
-}
-
-/**
- * @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 type Action =
- | Action.ModuleLinkMember
- | Action.WebLinkMember
- | Action.$UnknownMember
-
-/**
- * @public
- */
-export namespace Action {
-
- export interface WebLinkMember {
- webLink: WebLink;
- moduleLink?: never;
- $unknown?: never;
- }
-
- export interface ModuleLinkMember {
- webLink?: never;
- moduleLink: ModuleLink;
- $unknown?: never;
- }
-
- /**
- * @public
- */
- export interface $UnknownMember {
- webLink?: never;
- moduleLink?: never;
- $unknown: [string, any];
- }
-
- export interface Visitor {
- webLink: (value: WebLink) => T;
- moduleLink: (value: ModuleLink) => T;
- _: (name: string, value: any) => T;
- }
-
- export const visit = (
- value: Action,
- visitor: Visitor
- ): T => {
- if (value.webLink !== undefined) return visitor.webLink(value.webLink);
- if (value.moduleLink !== undefined) return visitor.moduleLink(value.moduleLink);
- return visitor._(value.$unknown[0], value.$unknown[1]);
- }
-
-}
-/**
- * @internal
- */
-export const ActionFilterSensitiveLog = (obj: Action): any => {
- if (obj.webLink !== undefined) return {webLink:
- WebLinkFilterSensitiveLog(obj.webLink)
- };
- if (obj.moduleLink !== undefined) return {moduleLink:
- ModuleLinkFilterSensitiveLog(obj.moduleLink)
- };
- if (obj.$unknown !== undefined) return {[obj.$unknown[0]]: 'UNKNOWN'};
-}
-
/**
* Structure representing a list of Items
- * @public
*/
export interface ResourceList {
/**
* Action associated with the list
- * @public
*/
action?: Action;
/**
* List of resources
- * @public
*/
- items: (Resource)[] | undefined;
+ items: (Resource)[];
}
/**
@@ -2057,135 +1802,65 @@ export const ResourceListFilterSensitiveLog = (obj: ResourceList): any => ({
}),
})
-/**
- * @public
- */
-export type SectionComponent =
- | SectionComponent.AlertMember
- | SectionComponent.ResourceMember
- | SectionComponent.ResourceListMember
- | SectionComponent.TextMember
- | SectionComponent.$UnknownMember
-
-/**
- * @public
- */
-export namespace SectionComponent {
-
+export interface SectionComponent {
/**
* Structure representing a simple text component with sensitive content, which can include Markdown formatting.
- * @public
*/
- export interface TextMember {
- text: Text;
- alert?: never;
- resource?: never;
- resourceList?: never;
- $unknown?: never;
- }
+ text?: Text;
/**
* Structure representing an alert with a type and content.
- * @public
*/
- export interface AlertMember {
- text?: never;
- alert: Alert;
- resource?: never;
- resourceList?: never;
- $unknown?: never;
- }
+ alert?: Alert;
/**
* Structure representing a resource item
- * @public
*/
- export interface ResourceMember {
- text?: never;
- alert?: never;
- resource: Resource;
- resourceList?: never;
- $unknown?: never;
- }
+ resource?: Resource;
/**
* Structure representing a list of Items
- * @public
*/
- export interface ResourceListMember {
- text?: never;
- alert?: never;
- resource?: never;
- resourceList: ResourceList;
- $unknown?: never;
- }
-
- /**
- * @public
- */
- export interface $UnknownMember {
- text?: never;
- alert?: never;
- resource?: never;
- resourceList?: never;
- $unknown: [string, any];
- }
-
- export interface Visitor {
- text: (value: Text) => T;
- alert: (value: Alert) => T;
- resource: (value: Resource) => T;
- resourceList: (value: ResourceList) => T;
- _: (name: string, value: any) => T;
- }
-
- export const visit = (
- value: SectionComponent,
- visitor: Visitor
- ): T => {
- if (value.text !== undefined) return visitor.text(value.text);
- if (value.alert !== undefined) return visitor.alert(value.alert);
- if (value.resource !== undefined) return visitor.resource(value.resource);
- if (value.resourceList !== undefined) return visitor.resourceList(value.resourceList);
- return visitor._(value.$unknown[0], value.$unknown[1]);
- }
-
+ resourceList?: ResourceList;
}
+
/**
* @internal
*/
-export const SectionComponentFilterSensitiveLog = (obj: SectionComponent): any => {
- if (obj.text !== undefined) return {text:
+export const SectionComponentFilterSensitiveLog = (obj: SectionComponent): any => ({
+ ...obj,
+ ...(obj.text && { text:
TextFilterSensitiveLog(obj.text)
- };
- if (obj.alert !== undefined) return {alert:
+ }),
+ ...(obj.alert && { alert:
AlertFilterSensitiveLog(obj.alert)
- };
- if (obj.resource !== undefined) return {resource:
+ }),
+ ...(obj.resource && { resource:
ResourceFilterSensitiveLog(obj.resource)
- };
- if (obj.resourceList !== undefined) return {resourceList:
+ }),
+ ...(obj.resourceList && { resourceList:
ResourceListFilterSensitiveLog(obj.resourceList)
- };
- if (obj.$unknown !== undefined) return {[obj.$unknown[0]]: 'UNKNOWN'};
-}
+ }),
+})
/**
* 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;
+ title: string;
+
+ /**
+ * Contains a list of interaction components e.g Text, Alert, List, etc.
+ */
+ content: (SectionComponent)[];
/**
- * Contains a list of interaction components e.g Text, Alert ,List ...etc
- * @public
+ * Action associated with the Section
*/
- content: (SectionComponent)[] | undefined;
+ action?: Action;
}
/**
@@ -2202,32 +1877,54 @@ export const SectionFilterSensitiveLog = (obj: Section): any => ({
SectionComponentFilterSensitiveLog(item)
)
}),
+ ...(obj.action && { action:
+ ActionFilterSensitiveLog(obj.action)
+ }),
})
/**
* Structure representing a suggestion for follow-ups.
- * @public
*/
export interface Suggestion {
- value: string | undefined;
+ value: string;
}
+/**
+ * @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;
+ items: (Suggestion)[];
}
+/**
+ * @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;
}
@@ -2242,41 +1939,30 @@ export const TaskActionConfirmationFilterSensitiveLog = (obj: TaskActionConfirma
}),
})
-/**
- * @public
- * @enum
- */
-export const TaskActionNoteType = {
+export enum TaskActionNoteType {
/**
* Information note providing general details.
*/
- INFO: "INFO",
+ INFO = "INFO",
/**
* Warning note indicating a potential issue.
*/
- WARNING: "WARNING",
-} as const
-/**
- * @public
- */
-export type TaskActionNoteType = typeof TaskActionNoteType[keyof typeof TaskActionNoteType]
+ WARNING = "WARNING",
+}
/**
* 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;
+ content: string;
/**
* Enum defining the types of notes that can be associated with a task action.
- * @public
*/
- type?: TaskActionNoteType;
+ type?: TaskActionNoteType | string;
}
/**
@@ -2291,42 +1977,35 @@ export const TaskActionNoteFilterSensitiveLog = (obj: TaskActionNote): any => ({
/**
* Structure representing an action associated with a task.
- * @public
*/
export interface TaskAction {
/**
* A label for the action.
- * @public
*/
- label: string | undefined;
+ label: string;
/**
* Structure representing a note associated with a task action.
- * @public
*/
note?: TaskActionNote;
/**
* Indicates whether the action is primary or not.
- * @public
*/
primary?: boolean;
/**
* Indicates whether the action is disabled or not.
- * @public
*/
disabled?: boolean;
/**
* Map representing key-value pairs for the payload of a task action.
- * @public
*/
- payload: Record | undefined;
+ payload: Record;
/**
* Structure representing a confirmation message related to a task action.
- * @public
*/
confirmation?: TaskActionConfirmation;
}
@@ -2352,30 +2031,25 @@ export const TaskActionFilterSensitiveLog = (obj: TaskAction): any => ({
/**
* 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;
/**
* Structure representing different types of infrastructure updates.
- * @public
*/
infrastructureUpdate?: InfrastructureUpdate;
/**
* Structure representing an alert with a type and content.
- * @public
*/
alert?: Alert;
/**
* Structure representing a collection of steps in a process.
- * @public
*/
progress?: Progress;
}
@@ -2401,20 +2075,17 @@ export const TaskComponentFilterSensitiveLog = (obj: TaskComponent): any => ({
/**
* 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;
+ label: string;
/**
* Text description providing details about the task. This field may include sensitive information and supports Markdown formatting.
- * @public
*/
- description: string | undefined;
+ description: string;
}
/**
@@ -2432,24 +2103,20 @@ export const TaskOverviewFilterSensitiveLog = (obj: TaskOverview): any => ({
/**
* 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;
+ overview: TaskOverview;
/**
* Lists the components that can be used to form the task's content.
- * @public
*/
- content: (TaskComponent)[] | undefined;
+ content: (TaskComponent)[];
/**
* Optional list of actions associated with the task.
- * @public
*/
actions?: (TaskAction)[];
}
@@ -2478,86 +2145,81 @@ export const TaskDetailsFilterSensitiveLog = (obj: TaskDetails): any => ({
/**
* Structure representing a reference to a task.
- * @public
*/
export interface TaskReference {
/**
* Unique identifier for the task.
- * @public
*/
- taskId: string | undefined;
+ taskId: string;
}
+/**
+ * @internal
+ */
+export const TaskReferenceFilterSensitiveLog = (obj: TaskReference): any => ({
+ ...obj,
+})
+
/**
* 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;
/**
* Structure representing an alert with a type and content.
- * @public
*/
alert?: Alert;
/**
* Structure representing different types of infrastructure updates.
- * @public
*/
infrastructureUpdate?: InfrastructureUpdate;
/**
* Structure representing a collection of steps in a process.
- * @public
*/
progress?: Progress;
/**
* Structure representing an individual step in a process.
- * @public
*/
step?: Step;
/**
* Structure containing details about a task.
- * @public
*/
taskDetails?: TaskDetails;
/**
* Structure representing a reference to a task.
- * @public
*/
taskReference?: TaskReference;
/**
* Structure containing a list of suggestions.
- * @public
*/
suggestions?: Suggestions;
/**
* Structure representing a collapsable section
- * @public
*/
section?: Section;
/**
* Structure representing a resource item
- * @public
*/
resource?: Resource;
/**
* Structure representing a list of Items
- * @public
*/
resourceList?: ResourceList;
+
+ action?: Action;
}
/**
@@ -2583,6 +2245,9 @@ export const InteractionComponentFilterSensitiveLog = (obj: InteractionComponent
...(obj.taskDetails && { taskDetails:
TaskDetailsFilterSensitiveLog(obj.taskDetails)
}),
+ ...(obj.suggestions && { suggestions:
+ SuggestionsFilterSensitiveLog(obj.suggestions)
+ }),
...(obj.section && { section:
SectionFilterSensitiveLog(obj.section)
}),
@@ -2592,25 +2257,25 @@ export const InteractionComponentFilterSensitiveLog = (obj: InteractionComponent
...(obj.resourceList && { resourceList:
ResourceListFilterSensitiveLog(obj.resourceList)
}),
+ ...(obj.action && { action:
+ ActionFilterSensitiveLog(obj.action)
+ }),
})
/**
* Interaction component with an identifier
- * @public
*/
export interface InteractionComponentEntry {
/**
* Identifier that can uniquely identify the interaction component within
* stream response. This field is optional.
- * @public
*/
interactionComponentId?: string;
/**
* Interaction component
- * @public
*/
- interactionComponent: InteractionComponent | undefined;
+ interactionComponent: InteractionComponent;
}
/**
@@ -2625,14 +2290,12 @@ export const InteractionComponentEntryFilterSensitiveLog = (obj: InteractionComp
/**
* Streaming Event for interaction components list
- * @public
*/
export interface InteractionComponentsEvent {
/**
* List of identifiable interaction components
- * @public
*/
- interactionComponentEntries: (InteractionComponentEntry)[] | undefined;
+ interactionComponentEntries: (InteractionComponentEntry)[];
}
/**
@@ -2648,58 +2311,57 @@ export const InteractionComponentsEventFilterSensitiveLog = (obj: InteractionCom
}),
})
-/**
- * @public
- * @enum
- */
-export const InvalidStateReason = {
- INVALID_TASK_ASSIST_PLAN: "INVALID_TASK_ASSIST_PLAN",
-} as const
-/**
- * @public
- */
-export type InvalidStateReason = typeof InvalidStateReason[keyof typeof InvalidStateReason]
+export enum InvalidStateReason {
+ INVALID_TASK_ASSIST_PLAN = "INVALID_TASK_ASSIST_PLAN",
+}
/**
* Streaming Response Event when an Invalid State is reached
- * @public
*/
export interface InvalidStateEvent {
/**
* Reasons for Invalid State Event
- * @public
*/
- reason: InvalidStateReason | undefined;
+ reason: InvalidStateReason | string;
- message: string | undefined;
+ message: string;
}
+/**
+ * @internal
+ */
+export const InvalidStateEventFilterSensitiveLog = (obj: InvalidStateEvent): any => ({
+ ...obj,
+})
+
/**
* Streaming Response Event for AssistantResponse Metadata
- * @public
*/
export interface MessageMetadataEvent {
/**
* Unique identifier for the conversation
- * @public
*/
conversationId?: string;
/**
* Unique identifier for the utterance
- * @public
*/
utteranceId?: string;
}
+/**
+ * @internal
+ */
+export const MessageMetadataEventFilterSensitiveLog = (obj: MessageMetadataEvent): any => ({
+ ...obj,
+})
+
/**
* Streaming Response Event for SupplementaryWebLinks
- * @public
*/
export interface SupplementaryWebLinksEvent {
/**
* Web References for Assistant Response Message
- * @public
*/
supplementaryWebLinks?: (SupplementaryWebLink)[];
}
@@ -2719,7 +2381,6 @@ export const SupplementaryWebLinksEventFilterSensitiveLog = (obj: SupplementaryW
/**
* Streaming events from UniDirectional Streaming Conversational APIs.
- * @public
*/
export type ChatResponseStream =
| ChatResponseStream.AssistantResponseEventMember
@@ -2735,14 +2396,10 @@ export type ChatResponseStream =
| ChatResponseStream.SupplementaryWebLinksEventMember
| ChatResponseStream.$UnknownMember
-/**
- * @public
- */
export namespace ChatResponseStream {
/**
* Message Metadata event
- * @public
*/
export interface MessageMetadataEventMember {
messageMetadataEvent: MessageMetadataEvent;
@@ -2761,7 +2418,6 @@ export namespace ChatResponseStream {
/**
* Assistant response event - Text / Code snippet
- * @public
*/
export interface AssistantResponseEventMember {
messageMetadataEvent?: never;
@@ -2780,7 +2436,6 @@ export namespace ChatResponseStream {
/**
* DryRun Succeed Event
- * @public
*/
export interface DryRunSucceedEventMember {
messageMetadataEvent?: never;
@@ -2799,7 +2454,6 @@ export namespace ChatResponseStream {
/**
* Code References event
- * @public
*/
export interface CodeReferenceEventMember {
messageMetadataEvent?: never;
@@ -2818,7 +2472,6 @@ export namespace ChatResponseStream {
/**
* Web Reference links event
- * @public
*/
export interface SupplementaryWebLinksEventMember {
messageMetadataEvent?: never;
@@ -2837,7 +2490,6 @@ export namespace ChatResponseStream {
/**
* Followup prompt event
- * @public
*/
export interface FollowupPromptEventMember {
messageMetadataEvent?: never;
@@ -2856,7 +2508,6 @@ export namespace ChatResponseStream {
/**
* Code Generated event
- * @public
*/
export interface CodeEventMember {
messageMetadataEvent?: never;
@@ -2875,7 +2526,6 @@ export namespace ChatResponseStream {
/**
* Intents event
- * @public
*/
export interface IntentsEventMember {
messageMetadataEvent?: never;
@@ -2894,7 +2544,6 @@ export namespace ChatResponseStream {
/**
* Interactions components event
- * @public
*/
export interface InteractionComponentsEventMember {
messageMetadataEvent?: never;
@@ -2913,7 +2562,6 @@ export namespace ChatResponseStream {
/**
* Invalid State event
- * @public
*/
export interface InvalidStateEventMember {
messageMetadataEvent?: never;
@@ -2932,7 +2580,6 @@ export namespace ChatResponseStream {
/**
* Internal Server Exception
- * @public
*/
export interface ErrorMember {
messageMetadataEvent?: never;
@@ -2949,9 +2596,6 @@ export namespace ChatResponseStream {
$unknown?: never;
}
- /**
- * @public
- */
export interface $UnknownMember {
messageMetadataEvent?: never;
assistantResponseEvent?: never;
@@ -3006,16 +2650,16 @@ export namespace ChatResponseStream {
*/
export const ChatResponseStreamFilterSensitiveLog = (obj: ChatResponseStream): any => {
if (obj.messageMetadataEvent !== undefined) return {messageMetadataEvent:
- obj.messageMetadataEvent
+ MessageMetadataEventFilterSensitiveLog(obj.messageMetadataEvent)
};
if (obj.assistantResponseEvent !== undefined) return {assistantResponseEvent:
AssistantResponseEventFilterSensitiveLog(obj.assistantResponseEvent)
};
if (obj.dryRunSucceedEvent !== undefined) return {dryRunSucceedEvent:
- obj.dryRunSucceedEvent
+ DryRunSucceedEventFilterSensitiveLog(obj.dryRunSucceedEvent)
};
if (obj.codeReferenceEvent !== undefined) return {codeReferenceEvent:
- obj.codeReferenceEvent
+ CodeReferenceEventFilterSensitiveLog(obj.codeReferenceEvent)
};
if (obj.supplementaryWebLinksEvent !== undefined) return {supplementaryWebLinksEvent:
SupplementaryWebLinksEventFilterSensitiveLog(obj.supplementaryWebLinksEvent)
@@ -3033,7 +2677,7 @@ export const ChatResponseStreamFilterSensitiveLog = (obj: ChatResponseStream): a
InteractionComponentsEventFilterSensitiveLog(obj.interactionComponentsEvent)
};
if (obj.invalidStateEvent !== undefined) return {invalidStateEvent:
- obj.invalidStateEvent
+ InvalidStateEventFilterSensitiveLog(obj.invalidStateEvent)
};
if (obj.error !== undefined) return {error:
obj.error
@@ -3041,54 +2685,38 @@ export const ChatResponseStreamFilterSensitiveLog = (obj: ChatResponseStream): a
if (obj.$unknown !== undefined) return {[obj.$unknown[0]]: 'UNKNOWN'};
}
-/**
- * @public
- * @enum
- */
-export const ChatTriggerType = {
+export enum ChatTriggerType {
/**
* Indicates the Chat was triggered in response to a IDE diagnostic
*/
- DIAGNOSTIC: "DIAGNOSTIC",
+ DIAGNOSTIC = "DIAGNOSTIC",
/**
* Indicates the Chat was triggered in response to an inline chat event
*/
- INLINE_CHAT: "INLINE_CHAT",
+ INLINE_CHAT = "INLINE_CHAT",
/**
* Indicates the Chat was triggered due to an explicit chat request by an end-user
*/
- MANUAL: "MANUAL",
-} as const
-/**
- * @public
- */
-export type ChatTriggerType = typeof ChatTriggerType[keyof typeof ChatTriggerType]
+ MANUAL = "MANUAL",
+}
/**
* CommandInput can be extended to either a list of strings or a single string.
- * @public
*/
export type CommandInput =
| CommandInput.CommandsListMember
| CommandInput.$UnknownMember
-/**
- * @public
- */
export namespace CommandInput {
/**
* The list of context items used to generate output.
- * @public
*/
export interface CommandsListMember {
commandsList: (string)[];
$unknown?: never;
}
- /**
- * @public
- */
export interface $UnknownMember {
commandsList?: never;
$unknown: [string, any];
@@ -3120,32 +2748,27 @@ export const CommandInputFilterSensitiveLog = (obj: CommandInput): any => {
/**
* Structure to represent the current state of a chat conversation.
- * @public
*/
export interface ConversationState {
/**
* Unique identifier for the chat conversation stream
- * @public
*/
conversationId?: string;
/**
* Holds the history of chat messages.
- * @public
*/
history?: (ChatMessage)[];
/**
* Holds the current message being processed or displayed.
- * @public
*/
- currentMessage: ChatMessage | undefined;
+ currentMessage: ChatMessage;
/**
* Trigger Reason for Chat
- * @public
*/
- chatTriggerType: ChatTriggerType | undefined;
+ chatTriggerType: ChatTriggerType | string;
customizationArn?: string;
}
@@ -3168,7 +2791,6 @@ export const ConversationStateFilterSensitiveLog = (obj: ConversationState): any
/**
* This exception is translated to a 204 as it succeeded the IAM Auth.
- * @public
*/
export class DryRunOperationException extends __BaseException {
readonly name: "DryRunOperationException" = "DryRunOperationException";
@@ -3188,25 +2810,16 @@ export class DryRunOperationException extends __BaseException {
}
}
-/**
- * @public
- * @enum
- */
-export const OutputFormat = {
- JAVA_CDK: "java/cdk",
- JSON_CFN: "json/cfn",
- PYTHON_CDK: "python/cdk",
- TYPESCRIPT_CDK: "typescript/cdk",
- YAML_CFN: "yaml/cfn",
-} as const
-/**
- * @public
- */
-export type OutputFormat = typeof OutputFormat[keyof typeof OutputFormat]
+export enum OutputFormat {
+ JAVA_CDK = "java/cdk",
+ JSON_CFN = "json/cfn",
+ PYTHON_CDK = "python/cdk",
+ TYPESCRIPT_CDK = "typescript/cdk",
+ YAML_CFN = "yaml/cfn",
+}
/**
* 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";
@@ -3224,74 +2837,67 @@ export class ServiceQuotaExceededException extends __BaseException {
}
}
-/**
- * @public
- * @enum
- */
-export const Origin = {
+export enum Origin {
/**
* AWS Chatbot
*/
- CHATBOT: "CHATBOT",
+ CHATBOT = "CHATBOT",
/**
* AWS Management Console (https://.console.aws.amazon.com)
*/
- CONSOLE: "CONSOLE",
+ CONSOLE = "CONSOLE",
/**
* AWS Documentation Website (https://docs.aws.amazon.com)
*/
- DOCUMENTATION: "DOCUMENTATION",
+ DOCUMENTATION = "DOCUMENTATION",
/**
* Any IDE caller.
*/
- IDE: "IDE",
+ IDE = "IDE",
/**
* AWS Marketing Website (https://aws.amazon.com)
*/
- MARKETING: "MARKETING",
+ MARKETING = "MARKETING",
/**
* MD.
*/
- MD: "MD",
+ MD = "MD",
/**
* AWS Mobile Application (ACMA)
*/
- MOBILE: "MOBILE",
+ 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.
*/
- SERVICE_INTERNAL: "SERVICE_INTERNAL",
+ SERVICE_INTERNAL = "SERVICE_INTERNAL",
/**
* Unified Search in AWS Management Console (https://.console.aws.amazon.com)
*/
- UNIFIED_SEARCH: "UNIFIED_SEARCH",
+ UNIFIED_SEARCH = "UNIFIED_SEARCH",
/**
* Origin header is not set.
*/
- UNKNOWN: "UNKNOWN",
-} as const
-/**
- * @public
- */
-export type Origin = typeof Origin[keyof typeof Origin]
+ UNKNOWN = "UNKNOWN",
+}
/**
* Structure to represent a SendMessage request.
- * @public
*/
export interface SendMessageRequest {
/**
* Structure to represent the current state of a chat conversation.
- * @public
*/
- conversationState: ConversationState | undefined;
+ conversationState: ConversationState;
profileArn?: string;
/**
* The origin of the caller
- * @public
*/
- source?: Origin;
+ source?: Origin | string;
dryRun?: boolean;
}
@@ -3308,14 +2914,12 @@ export const SendMessageRequestFilterSensitiveLog = (obj: SendMessageRequest): a
/**
* Structure to represent a SendMessage response.
- * @public
*/
export interface SendMessageResponse {
/**
* Streaming events from UniDirectional Streaming Conversational APIs.
- * @public
*/
- sendMessageResponse: AsyncIterable | undefined;
+ sendMessageResponse: AsyncIterable;
}
/**
@@ -3328,21 +2932,16 @@ export const SendMessageResponseFilterSensitiveLog = (obj: SendMessageResponse):
}),
})
-/**
- * @public
- */
export interface GenerateCodeFromCommandsRequest {
/**
* Format of the output - language/format eg. typescript/cdk
- * @public
*/
- outputFormat: OutputFormat | undefined;
+ outputFormat: OutputFormat | string;
/**
* CommandInput can be extended to either a list of strings or a single string.
- * @public
*/
- commands: CommandInput | undefined;
+ commands: CommandInput;
}
/**
@@ -3357,7 +2956,6 @@ export const GenerateCodeFromCommandsRequestFilterSensitiveLog = (obj: GenerateC
/**
* Streaming events from UniDirectional streaming infrastructure code generation APIs.
- * @public
*/
export type GenerateCodeFromCommandsResponseStream =
| GenerateCodeFromCommandsResponseStream.ErrorMember
@@ -3366,14 +2964,10 @@ export type GenerateCodeFromCommandsResponseStream =
| GenerateCodeFromCommandsResponseStream.CodeEventMember
| GenerateCodeFromCommandsResponseStream.$UnknownMember
-/**
- * @public
- */
export namespace GenerateCodeFromCommandsResponseStream {
/**
* Generated code snippet
- * @public
*/
export interface CodeEventMember {
codeEvent: CodeEvent;
@@ -3385,7 +2979,6 @@ export namespace GenerateCodeFromCommandsResponseStream {
/**
* Internal Server Exception
- * @public
*/
export interface ErrorMember {
codeEvent?: never;
@@ -3397,7 +2990,6 @@ export namespace GenerateCodeFromCommandsResponseStream {
/**
* Exceptions for quota level exceeded errors
- * @public
*/
export interface QuotaLevelExceededErrorMember {
codeEvent?: never;
@@ -3409,7 +3001,6 @@ export namespace GenerateCodeFromCommandsResponseStream {
/**
* Validation errors in the ConsoleToCodeService
- * @public
*/
export interface ValidationErrorMember {
codeEvent?: never;
@@ -3419,9 +3010,6 @@ export namespace GenerateCodeFromCommandsResponseStream {
$unknown?: never;
}
- /**
- * @public
- */
export interface $UnknownMember {
codeEvent?: never;
Error?: never;
@@ -3471,14 +3059,12 @@ export const GenerateCodeFromCommandsResponseStreamFilterSensitiveLog = (obj: Ge
/**
* Structure to represent generated code response.
- * @public
*/
export interface GenerateCodeFromCommandsResponse {
/**
* Streaming events from UniDirectional streaming infrastructure code generation APIs.
- * @public
*/
- generatedCodeFromCommandsResponse: AsyncIterable | undefined;
+ generatedCodeFromCommandsResponse: AsyncIterable;
}
/**
diff --git a/src.gen/@amzn/amazon-q-developer-streaming-client/src/protocols/Aws_json1_0.ts b/src.gen/@amzn/amazon-q-developer-streaming-client/src/protocols/Aws_json1_0.ts
index bcd0c7daa10..b947ae121c7 100644
--- a/src.gen/@amzn/amazon-q-developer-streaming-client/src/protocols/Aws_json1_0.ts
+++ b/src.gen/@amzn/amazon-q-developer-streaming-client/src/protocols/Aws_json1_0.ts
@@ -10,11 +10,15 @@ import {
import { QDeveloperStreamingServiceException as __BaseException } from "../models/QDeveloperStreamingServiceException";
import {
AccessDeniedException,
+ Action,
+ Alert,
+ AlertComponent,
AppStudioState,
AssistantResponseEvent,
AssistantResponseMessage,
ChatMessage,
ChatResponseStream,
+ CloudWatchTroubleshootingLink,
CodeEvent,
CodeReferenceEvent,
CommandInput,
@@ -34,6 +38,10 @@ import {
GenerateCodeFromCommandsRequest,
GenerateCodeFromCommandsResponseStream,
GitState,
+ InfrastructureUpdate,
+ InfrastructureUpdateTransition,
+ IntentDataType,
+ IntentType,
IntentsEvent,
InteractionComponent,
InteractionComponentEntry,
@@ -41,20 +49,39 @@ import {
InternalServerException,
InvalidStateEvent,
MessageMetadataEvent,
+ ModuleLink,
Position,
ProgrammingLanguage,
+ Progress,
+ ProgressComponent,
Range,
Reference,
RelevantTextDocument,
+ Resource,
+ ResourceList,
ResourceNotFoundException,
RuntimeDiagnostic,
+ Section,
+ SectionComponent,
SendMessageRequest,
ServiceQuotaExceededException,
ShellHistoryEntry,
ShellState,
Span,
+ Step,
+ StepComponent,
+ Suggestion,
+ Suggestions,
SupplementaryWebLink,
SupplementaryWebLinksEvent,
+ TaskAction,
+ TaskActionConfirmation,
+ TaskActionNote,
+ TaskComponent,
+ TaskDetails,
+ TaskOverview,
+ TaskReference,
+ Text,
TextDocument,
TextDocumentDiagnostic,
ThrottlingException,
@@ -62,102 +89,74 @@ import {
UserInputMessageContext,
UserSettings,
ValidationException,
+ WebLink,
} from "../models/models_0";
-import {
- loadRestJsonErrorCode,
- parseJsonBody as parseBody,
- parseJsonErrorBody as parseErrorBody,
-} from "@aws-sdk/core";
import {
HttpRequest as __HttpRequest,
HttpResponse as __HttpResponse,
-} from "@smithy/protocol-http";
+} from "@aws-sdk/protocol-http";
import {
decorateServiceException as __decorateServiceException,
+ expectBoolean as __expectBoolean,
+ expectInt32 as __expectInt32,
expectString as __expectString,
- _json,
- collectBody,
- take,
- withBaseException,
-} from "@smithy/smithy-client";
+ expectUnion as __expectUnion,
+ throwDefaultError,
+} from "@aws-sdk/smithy-client";
import {
Endpoint as __Endpoint,
EventStreamSerdeContext as __EventStreamSerdeContext,
HeaderBag as __HeaderBag,
ResponseMetadata as __ResponseMetadata,
SerdeContext as __SerdeContext,
-} from "@smithy/types";
+} from "@aws-sdk/types";
import { v4 as generateIdempotencyToken } from "uuid";
-/**
- * serializeAws_json1_0GenerateCodeFromCommandsCommand
- */
-export const se_GenerateCodeFromCommandsCommand = async(
+export const serializeAws_json1_0GenerateCodeFromCommandsCommand = async(
input: GenerateCodeFromCommandsCommandInput,
context: __SerdeContext
): Promise<__HttpRequest> => {
- const headers: __HeaderBag = sharedHeaders("GenerateCodeFromCommands")
+ const headers: __HeaderBag = {
+ 'content-type': "application/x-amz-json-1.0",
+ 'x-amz-target': "AmazonQDeveloperStreamingService.GenerateCodeFromCommands",
+ };
let body: any;
- body = JSON.stringify(_json(input));
+ body = JSON.stringify(serializeAws_json1_0GenerateCodeFromCommandsRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
}
-/**
- * serializeAws_json1_0SendMessageCommand
- */
-export const se_SendMessageCommand = async(
+export const serializeAws_json1_0SendMessageCommand = async(
input: SendMessageCommandInput,
context: __SerdeContext
): Promise<__HttpRequest> => {
- const headers: __HeaderBag = sharedHeaders("SendMessage")
+ const headers: __HeaderBag = {
+ 'content-type': "application/x-amz-json-1.0",
+ 'x-amz-target': "AmazonQDeveloperStreamingService.SendMessage",
+ };
let body: any;
- body = JSON.stringify(se_SendMessageRequest(input, context));
+ body = JSON.stringify(serializeAws_json1_0SendMessageRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
}
-/**
- * deserializeAws_json1_0GenerateCodeFromCommandsCommand
- */
-export const de_GenerateCodeFromCommandsCommand = async(
+export const deserializeAws_json1_0GenerateCodeFromCommandsCommand = async(
output: __HttpResponse,
context: __SerdeContext & __EventStreamSerdeContext
): Promise => {
if (output.statusCode >= 300) {
- return de_CommandError(output, context);
+ return deserializeAws_json1_0GenerateCodeFromCommandsCommandError(output, context);
}
- const contents = { generatedCodeFromCommandsResponse: de_GenerateCodeFromCommandsResponseStream(output.body, context) };
+ const contents = { generatedCodeFromCommandsResponse: deserializeAws_json1_0GenerateCodeFromCommandsResponseStream(output.body, context) };
const response: GenerateCodeFromCommandsCommandOutput = {
$metadata: deserializeMetadata(output),
...contents,
};
- return response;
+ return Promise.resolve(response);
}
-/**
- * deserializeAws_json1_0SendMessageCommand
- */
-export const de_SendMessageCommand = async(
- output: __HttpResponse,
- context: __SerdeContext & __EventStreamSerdeContext
-): Promise => {
- if (output.statusCode >= 300) {
- return de_CommandError(output, context);
- }
- const contents = { sendMessageResponse: de_ChatResponseStream(output.body, context) };
- const response: SendMessageCommandOutput = {
- $metadata: deserializeMetadata(output),
- ...contents,
- };
- return response;
-}
-
-/**
- * deserialize_Aws_json1_0CommandError
- */
-const de_CommandError = async(
+const deserializeAws_json1_0GenerateCodeFromCommandsCommandError = async(
output: __HttpResponse,
context: __SerdeContext,
-): Promise => {
+): Promise => {
const parsedOutput: any = {
...output,
body: await parseErrorBody(output.body, context)
@@ -166,698 +165,1618 @@ const de_CommandError = async(
switch (errorCode) {
case "AccessDeniedException":
case "com.amazon.aws.codewhisperer#AccessDeniedException":
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
+ throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
case "InternalServerException":
case "com.amazon.aws.codewhisperer#InternalServerException":
- throw await de_InternalServerExceptionRes(parsedOutput, context);
+ throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
case "ThrottlingException":
case "com.amazon.aws.codewhisperer#ThrottlingException":
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
+ throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
case "ValidationException":
case "com.amazon.aws.codewhisperer#ValidationException":
- throw await de_ValidationExceptionRes(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 "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);
+ throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
default:
const parsedBody = parsedOutput.body;
- return throwDefaultError({
+ throwDefaultError({
output,
parsedBody,
+ exceptionCtor: __BaseException,
errorCode
- }) as never
+ })
}
}
- /**
- * deserializeAws_json1_0AccessDeniedExceptionRes
- */
- const de_AccessDeniedExceptionRes = async (
- parsedOutput: any,
- context: __SerdeContext
- ): Promise => {
- const body = parsedOutput.body
- const deserialized: any = _json(body);
- const exception = new AccessDeniedException({
- $metadata: deserializeMetadata(parsedOutput),
- ...deserialized
- });
- return __decorateServiceException(exception, body);
- };
-
- /**
- * deserializeAws_json1_0ConflictExceptionRes
- */
- const de_ConflictExceptionRes = async (
- parsedOutput: any,
- context: __SerdeContext
- ): Promise => {
- const body = parsedOutput.body
- const deserialized: any = _json(body);
- const exception = new ConflictException({
- $metadata: deserializeMetadata(parsedOutput),
- ...deserialized
- });
- return __decorateServiceException(exception, body);
- };
+ export const deserializeAws_json1_0SendMessageCommand = async(
+ output: __HttpResponse,
+ context: __SerdeContext & __EventStreamSerdeContext
+ ): Promise => {
+ if (output.statusCode >= 300) {
+ return deserializeAws_json1_0SendMessageCommandError(output, context);
+ }
+ const contents = { sendMessageResponse: deserializeAws_json1_0ChatResponseStream(output.body, context) };
+ const response: SendMessageCommandOutput = {
+ $metadata: deserializeMetadata(output),
+ ...contents,
+ };
+ return Promise.resolve(response);
+ }
- /**
- * deserializeAws_json1_0DryRunOperationExceptionRes
- */
- const de_DryRunOperationExceptionRes = async (
- parsedOutput: any,
- context: __SerdeContext
- ): Promise => {
- const body = parsedOutput.body
- const deserialized: any = _json(body);
- const exception = new DryRunOperationException({
- $metadata: deserializeMetadata(parsedOutput),
- ...deserialized
- });
- return __decorateServiceException(exception, body);
- };
+ const deserializeAws_json1_0SendMessageCommandError = 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 deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
+ case "ConflictException":
+ case "com.amazon.aws.codewhisperer#ConflictException":
+ throw await deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context);
+ case "DryRunOperationException":
+ case "com.amazon.aws.codewhisperer#DryRunOperationException":
+ throw await deserializeAws_json1_0DryRunOperationExceptionResponse(parsedOutput, context);
+ case "InternalServerException":
+ case "com.amazon.aws.codewhisperer#InternalServerException":
+ throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
+ case "ResourceNotFoundException":
+ case "com.amazon.aws.codewhisperer#ResourceNotFoundException":
+ throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
+ case "ServiceQuotaExceededException":
+ case "com.amazon.aws.codewhisperer#ServiceQuotaExceededException":
+ throw await deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context);
+ case "ThrottlingException":
+ case "com.amazon.aws.codewhisperer#ThrottlingException":
+ throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
+ case "ValidationException":
+ case "com.amazon.aws.codewhisperer#ValidationException":
+ throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
+ default:
+ const parsedBody = parsedOutput.body;
+ throwDefaultError({
+ output,
+ parsedBody,
+ exceptionCtor: __BaseException,
+ errorCode
+ })
+ }
+ }
- /**
- * deserializeAws_json1_0InternalServerExceptionRes
- */
- const de_InternalServerExceptionRes = async (
- parsedOutput: any,
- context: __SerdeContext
- ): Promise => {
- const body = parsedOutput.body
- const deserialized: any = _json(body);
- const exception = new InternalServerException({
- $metadata: deserializeMetadata(parsedOutput),
- ...deserialized
- });
- return __decorateServiceException(exception, body);
- };
+ const deserializeAws_json1_0AccessDeniedExceptionResponse = async (
+ parsedOutput: any,
+ context: __SerdeContext
+ ): Promise => {
+ const body = parsedOutput.body
+ const deserialized: any = deserializeAws_json1_0AccessDeniedException(body, context);
+ const exception = new AccessDeniedException({
+ $metadata: deserializeMetadata(parsedOutput),
+ ...deserialized
+ });
+ return __decorateServiceException(exception, body);
+ };
- /**
- * deserializeAws_json1_0ResourceNotFoundExceptionRes
- */
- const de_ResourceNotFoundExceptionRes = async (
- parsedOutput: any,
- context: __SerdeContext
- ): Promise => {
- const body = parsedOutput.body
- const deserialized: any = _json(body);
- const exception = new ResourceNotFoundException({
- $metadata: deserializeMetadata(parsedOutput),
- ...deserialized
- });
- return __decorateServiceException(exception, body);
- };
+ const deserializeAws_json1_0ConflictExceptionResponse = async (
+ parsedOutput: any,
+ context: __SerdeContext
+ ): Promise => {
+ const body = parsedOutput.body
+ const deserialized: any = deserializeAws_json1_0ConflictException(body, context);
+ const exception = new ConflictException({
+ $metadata: deserializeMetadata(parsedOutput),
+ ...deserialized
+ });
+ return __decorateServiceException(exception, body);
+ };
- /**
- * deserializeAws_json1_0ServiceQuotaExceededExceptionRes
- */
- const de_ServiceQuotaExceededExceptionRes = async (
- parsedOutput: any,
- context: __SerdeContext
- ): Promise => {
- const body = parsedOutput.body
- const deserialized: any = _json(body);
- const exception = new ServiceQuotaExceededException({
- $metadata: deserializeMetadata(parsedOutput),
- ...deserialized
- });
- return __decorateServiceException(exception, body);
- };
+ const deserializeAws_json1_0DryRunOperationExceptionResponse = async (
+ parsedOutput: any,
+ context: __SerdeContext
+ ): Promise => {
+ const body = parsedOutput.body
+ const deserialized: any = deserializeAws_json1_0DryRunOperationException(body, context);
+ const exception = new DryRunOperationException({
+ $metadata: deserializeMetadata(parsedOutput),
+ ...deserialized
+ });
+ return __decorateServiceException(exception, body);
+ };
- /**
- * deserializeAws_json1_0ThrottlingExceptionRes
- */
- const de_ThrottlingExceptionRes = async (
- parsedOutput: any,
- context: __SerdeContext
- ): Promise => {
- const body = parsedOutput.body
- const deserialized: any = _json(body);
- const exception = new ThrottlingException({
- $metadata: deserializeMetadata(parsedOutput),
- ...deserialized
- });
- return __decorateServiceException(exception, body);
- };
+ const deserializeAws_json1_0InternalServerExceptionResponse = async (
+ parsedOutput: any,
+ context: __SerdeContext
+ ): Promise => {
+ const body = parsedOutput.body
+ const deserialized: any = deserializeAws_json1_0InternalServerException(body, context);
+ const exception = new InternalServerException({
+ $metadata: deserializeMetadata(parsedOutput),
+ ...deserialized
+ });
+ return __decorateServiceException(exception, body);
+ };
- /**
- * deserializeAws_json1_0ValidationExceptionRes
- */
- const de_ValidationExceptionRes = async (
- parsedOutput: any,
- context: __SerdeContext
- ): Promise => {
- const body = parsedOutput.body
- const deserialized: any = _json(body);
- const exception = new ValidationException({
- $metadata: deserializeMetadata(parsedOutput),
- ...deserialized
- });
- return __decorateServiceException(exception, body);
- };
+ const deserializeAws_json1_0ResourceNotFoundExceptionResponse = async (
+ parsedOutput: any,
+ context: __SerdeContext
+ ): Promise => {
+ const body = parsedOutput.body
+ const deserialized: any = deserializeAws_json1_0ResourceNotFoundException(body, context);
+ const exception = new ResourceNotFoundException({
+ $metadata: deserializeMetadata(parsedOutput),
+ ...deserialized
+ });
+ return __decorateServiceException(exception, body);
+ };
- /**
- * deserializeAws_json1_0ChatResponseStream
- */
- 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["dryRunSucceedEvent"] != null) {
- return {
- dryRunSucceedEvent: await de_DryRunSucceedEvent_event(event["dryRunSucceedEvent"], 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["interactionComponentsEvent"] != null) {
- return {
- interactionComponentsEvent: await de_InteractionComponentsEvent_event(event["interactionComponentsEvent"], 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_json1_0GenerateCodeFromCommandsResponseStream
- */
- const de_GenerateCodeFromCommandsResponseStream = (
- output: any,
- context: __SerdeContext & __EventStreamSerdeContext
- ): AsyncIterable => {
- return context.eventStreamMarshaller.deserialize(
- output,
- async event => {
- if (event["codeEvent"] != null) {
- return {
- codeEvent: await de_CodeEvent_event(event["codeEvent"], context),
- };
- }
- if (event["Error"] != null) {
- return {
- Error: await de_InternalServerException_event(event["Error"], context),
- };
- }
- if (event["QuotaLevelExceededError"] != null) {
- return {
- QuotaLevelExceededError: await de_ServiceQuotaExceededException_event(event["QuotaLevelExceededError"], context),
- };
- }
- if (event["ValidationError"] != null) {
- return {
- ValidationError: await de_ValidationException_event(event["ValidationError"], context),
- };
- }
- 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_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_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;
- }
- const de_InternalServerException_event = async (
- output: any,
- context: __SerdeContext
- ): Promise => {
- const parsedOutput: any = {
- ...output,
- body: await parseBody(output.body, context)
+ const deserializeAws_json1_0ServiceQuotaExceededExceptionResponse = async (
+ parsedOutput: any,
+ context: __SerdeContext
+ ): Promise => {
+ const body = parsedOutput.body
+ const deserialized: any = deserializeAws_json1_0ServiceQuotaExceededException(body, context);
+ const exception = new ServiceQuotaExceededException({
+ $metadata: deserializeMetadata(parsedOutput),
+ ...deserialized
+ });
+ return __decorateServiceException(exception, body);
};
- 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_ServiceQuotaExceededException_event = async (
- output: any,
- context: __SerdeContext
- ): Promise => {
- const parsedOutput: any = {
- ...output,
- body: await parseBody(output.body, context)
+
+ const deserializeAws_json1_0ThrottlingExceptionResponse = async (
+ parsedOutput: any,
+ context: __SerdeContext
+ ): Promise => {
+ const body = parsedOutput.body
+ const deserialized: any = deserializeAws_json1_0ThrottlingException(body, context);
+ const exception = new ThrottlingException({
+ $metadata: deserializeMetadata(parsedOutput),
+ ...deserialized
+ });
+ return __decorateServiceException(exception, body);
};
- return de_ServiceQuotaExceededExceptionRes(parsedOutput, 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;
- }
- const de_ValidationException_event = async (
- output: any,
- context: __SerdeContext
- ): Promise => {
- const parsedOutput: any = {
- ...output,
- body: await parseBody(output.body, context)
+
+ const deserializeAws_json1_0ValidationExceptionResponse = async (
+ parsedOutput: any,
+ context: __SerdeContext
+ ): Promise => {
+ const body = parsedOutput.body
+ const deserialized: any = deserializeAws_json1_0ValidationException(body, context);
+ const exception = new ValidationException({
+ $metadata: deserializeMetadata(parsedOutput),
+ ...deserialized
+ });
+ return __decorateServiceException(exception, body);
};
- return de_ValidationExceptionRes(parsedOutput, context);
- }
- // se_AppStudioState omitted.
- // se_AssistantResponseMessage omitted.
+ const deserializeAws_json1_0ChatResponseStream = (
+ output: any,
+ context: __SerdeContext & __EventStreamSerdeContext
+ ): AsyncIterable => {
+ return context.eventStreamMarshaller.deserialize(
+ output,
+ async event => {
+ if (event["messageMetadataEvent"] != null) {
+ return {
+ messageMetadataEvent: await deserializeAws_json1_0MessageMetadataEvent_event(event["messageMetadataEvent"], context),
+ };
+ }
+ if (event["assistantResponseEvent"] != null) {
+ return {
+ assistantResponseEvent: await deserializeAws_json1_0AssistantResponseEvent_event(event["assistantResponseEvent"], context),
+ };
+ }
+ if (event["dryRunSucceedEvent"] != null) {
+ return {
+ dryRunSucceedEvent: await deserializeAws_json1_0DryRunSucceedEvent_event(event["dryRunSucceedEvent"], context),
+ };
+ }
+ if (event["codeReferenceEvent"] != null) {
+ return {
+ codeReferenceEvent: await deserializeAws_json1_0CodeReferenceEvent_event(event["codeReferenceEvent"], context),
+ };
+ }
+ if (event["supplementaryWebLinksEvent"] != null) {
+ return {
+ supplementaryWebLinksEvent: await deserializeAws_json1_0SupplementaryWebLinksEvent_event(event["supplementaryWebLinksEvent"], context),
+ };
+ }
+ if (event["followupPromptEvent"] != null) {
+ return {
+ followupPromptEvent: await deserializeAws_json1_0FollowupPromptEvent_event(event["followupPromptEvent"], context),
+ };
+ }
+ if (event["codeEvent"] != null) {
+ return {
+ codeEvent: await deserializeAws_json1_0CodeEvent_event(event["codeEvent"], context),
+ };
+ }
+ if (event["intentsEvent"] != null) {
+ return {
+ intentsEvent: await deserializeAws_json1_0IntentsEvent_event(event["intentsEvent"], context),
+ };
+ }
+ if (event["interactionComponentsEvent"] != null) {
+ return {
+ interactionComponentsEvent: await deserializeAws_json1_0InteractionComponentsEvent_event(event["interactionComponentsEvent"], context),
+ };
+ }
+ if (event["invalidStateEvent"] != null) {
+ return {
+ invalidStateEvent: await deserializeAws_json1_0InvalidStateEvent_event(event["invalidStateEvent"], context),
+ };
+ }
+ if (event["error"] != null) {
+ return {
+ error: await deserializeAws_json1_0InternalServerException_event(event["error"], context),
+ };
+ }
+ return {$unknown: output};
+ }
+ );
+ }
+ const deserializeAws_json1_0GenerateCodeFromCommandsResponseStream = (
+ output: any,
+ context: __SerdeContext & __EventStreamSerdeContext
+ ): AsyncIterable => {
+ return context.eventStreamMarshaller.deserialize(
+ output,
+ async event => {
+ if (event["codeEvent"] != null) {
+ return {
+ codeEvent: await deserializeAws_json1_0CodeEvent_event(event["codeEvent"], context),
+ };
+ }
+ if (event["Error"] != null) {
+ return {
+ Error: await deserializeAws_json1_0InternalServerException_event(event["Error"], context),
+ };
+ }
+ if (event["QuotaLevelExceededError"] != null) {
+ return {
+ QuotaLevelExceededError: await deserializeAws_json1_0ServiceQuotaExceededException_event(event["QuotaLevelExceededError"], context),
+ };
+ }
+ if (event["ValidationError"] != null) {
+ return {
+ ValidationError: await deserializeAws_json1_0ValidationException_event(event["ValidationError"], context),
+ };
+ }
+ return {$unknown: output};
+ }
+ );
+ }
+ const deserializeAws_json1_0AssistantResponseEvent_event = async (
+ output: any,
+ context: __SerdeContext
+ ): Promise => {
+ const contents: AssistantResponseEvent = {} as any;
+ const data: any = await parseBody(output.body, context);
+ Object.assign(contents, deserializeAws_json1_0AssistantResponseEvent(data, context));
+ return contents;
+ }
+ const deserializeAws_json1_0CodeEvent_event = async (
+ output: any,
+ context: __SerdeContext
+ ): Promise => {
+ const contents: CodeEvent = {} as any;
+ const data: any = await parseBody(output.body, context);
+ Object.assign(contents, deserializeAws_json1_0CodeEvent(data, context));
+ return contents;
+ }
+ const deserializeAws_json1_0CodeReferenceEvent_event = async (
+ output: any,
+ context: __SerdeContext
+ ): Promise => {
+ const contents: CodeReferenceEvent = {} as any;
+ const data: any = await parseBody(output.body, context);
+ Object.assign(contents, deserializeAws_json1_0CodeReferenceEvent(data, context));
+ return contents;
+ }
+ const deserializeAws_json1_0DryRunSucceedEvent_event = async (
+ output: any,
+ context: __SerdeContext
+ ): Promise => {
+ const contents: DryRunSucceedEvent = {} as any;
+ const data: any = await parseBody(output.body, context);
+ Object.assign(contents, deserializeAws_json1_0DryRunSucceedEvent(data, context));
+ return contents;
+ }
+ const deserializeAws_json1_0FollowupPromptEvent_event = async (
+ output: any,
+ context: __SerdeContext
+ ): Promise => {
+ const contents: FollowupPromptEvent = {} as any;
+ const data: any = await parseBody(output.body, context);
+ Object.assign(contents, deserializeAws_json1_0FollowupPromptEvent(data, context));
+ return contents;
+ }
+ const deserializeAws_json1_0IntentsEvent_event = async (
+ output: any,
+ context: __SerdeContext
+ ): Promise => {
+ const contents: IntentsEvent = {} as any;
+ const data: any = await parseBody(output.body, context);
+ Object.assign(contents, deserializeAws_json1_0IntentsEvent(data, context));
+ return contents;
+ }
+ const deserializeAws_json1_0InternalServerException_event = async (
+ output: any,
+ context: __SerdeContext
+ ): Promise => {
+ const parsedOutput: any = {
+ ...output,
+ body: await parseBody(output.body, context)
+ };
+ return deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
+ }
+ const deserializeAws_json1_0InvalidStateEvent_event = async (
+ output: any,
+ context: __SerdeContext
+ ): Promise => {
+ const contents: InvalidStateEvent = {} as any;
+ const data: any = await parseBody(output.body, context);
+ Object.assign(contents, deserializeAws_json1_0InvalidStateEvent(data, context));
+ return contents;
+ }
+ const deserializeAws_json1_0MessageMetadataEvent_event = async (
+ output: any,
+ context: __SerdeContext
+ ): Promise => {
+ const contents: MessageMetadataEvent = {} as any;
+ const data: any = await parseBody(output.body, context);
+ Object.assign(contents, deserializeAws_json1_0MessageMetadataEvent(data, context));
+ return contents;
+ }
+ const deserializeAws_json1_0ServiceQuotaExceededException_event = async (
+ output: any,
+ context: __SerdeContext
+ ): Promise => {
+ const parsedOutput: any = {
+ ...output,
+ body: await parseBody(output.body, context)
+ };
+ return deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context);
+ }
+ const deserializeAws_json1_0SupplementaryWebLinksEvent_event = async (
+ output: any,
+ context: __SerdeContext
+ ): Promise => {
+ const contents: SupplementaryWebLinksEvent = {} as any;
+ const data: any = await parseBody(output.body, context);
+ Object.assign(contents, deserializeAws_json1_0SupplementaryWebLinksEvent(data, context));
+ return contents;
+ }
+ const deserializeAws_json1_0ValidationException_event = async (
+ output: any,
+ context: __SerdeContext
+ ): Promise => {
+ const parsedOutput: any = {
+ ...output,
+ body: await parseBody(output.body, context)
+ };
+ return deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
+ }
+ const deserializeAws_json1_0InteractionComponentsEvent_event = async (
+ output: any,
+ context: __SerdeContext
+ ): Promise => {
+ const contents: InteractionComponentsEvent = {} as any;
+ const data: any = await parseBody(output.body, context);
+ Object.assign(contents, deserializeAws_json1_0InteractionComponentsEvent(data, context));
+ return contents;
+ }
+ const serializeAws_json1_0AppStudioState = (
+ input: AppStudioState,
+ context: __SerdeContext
+ ): any => {
+ return {
+ ...(input.namespace != null && { "namespace": input.namespace }),
+ ...(input.propertyContext != null && { "propertyContext": input.propertyContext }),
+ ...(input.propertyName != null && { "propertyName": input.propertyName }),
+ ...(input.propertyValue != null && { "propertyValue": input.propertyValue }),
+ };
+ }
- // se_ChatHistory omitted.
+ const serializeAws_json1_0AssistantResponseMessage = (
+ input: AssistantResponseMessage,
+ context: __SerdeContext
+ ): any => {
+ return {
+ ...(input.content != null && { "content": input.content }),
+ ...(input.followupPrompt != null && { "followupPrompt": serializeAws_json1_0FollowupPrompt(input.followupPrompt, context) }),
+ ...(input.messageId != null && { "messageId": input.messageId }),
+ ...(input.references != null && { "references": serializeAws_json1_0References(input.references, context) }),
+ ...(input.supplementaryWebLinks != null && { "supplementaryWebLinks": serializeAws_json1_0SupplementaryWebLinks(input.supplementaryWebLinks, context) }),
+ };
+ }
- // se_ChatMessage omitted.
+ const serializeAws_json1_0ChatHistory = (
+ input: (ChatMessage)[],
+ context: __SerdeContext
+ ): any => {
+ return input.filter((e: any) => e != null).map(entry => {
+ return serializeAws_json1_0ChatMessage(entry, context);
+ });
+ }
- // se_CliCommandsList omitted.
+ const serializeAws_json1_0ChatMessage = (
+ input: ChatMessage,
+ context: __SerdeContext
+ ): any => {
+ return ChatMessage.visit(input, {
+ assistantResponseMessage: value => ({ "assistantResponseMessage": serializeAws_json1_0AssistantResponseMessage(value, context) }),
+ userInputMessage: value => ({ "userInputMessage": serializeAws_json1_0UserInputMessage(value, context) }),
+ _: (name, value) => ({ name: value } as any)
+ });
+ }
- // se_CommandInput omitted.
+ const serializeAws_json1_0CliCommandsList = (
+ input: (string)[],
+ context: __SerdeContext
+ ): any => {
+ return input.filter((e: any) => e != null).map(entry => {
+ return entry;
+ });
+ }
- // se_ConsoleState omitted.
+ const serializeAws_json1_0CommandInput = (
+ input: CommandInput,
+ context: __SerdeContext
+ ): any => {
+ return CommandInput.visit(input, {
+ commandsList: value => ({ "commandsList": serializeAws_json1_0CliCommandsList(value, context) }),
+ _: (name, value) => ({ name: value } as any)
+ });
+ }
- // se_ConversationState omitted.
+ const serializeAws_json1_0ConsoleState = (
+ input: ConsoleState,
+ context: __SerdeContext
+ ): any => {
+ return {
+ ...(input.consoleUrl != null && { "consoleUrl": input.consoleUrl }),
+ ...(input.region != null && { "region": input.region }),
+ ...(input.serviceConsolePage != null && { "serviceConsolePage": input.serviceConsolePage }),
+ ...(input.serviceId != null && { "serviceId": input.serviceId }),
+ ...(input.serviceSubconsolePage != null && { "serviceSubconsolePage": input.serviceSubconsolePage }),
+ ...(input.taskName != null && { "taskName": input.taskName }),
+ };
+ }
- // se_CursorState omitted.
+ const serializeAws_json1_0ConversationState = (
+ input: ConversationState,
+ context: __SerdeContext
+ ): any => {
+ return {
+ ...(input.chatTriggerType != null && { "chatTriggerType": input.chatTriggerType }),
+ ...(input.conversationId != null && { "conversationId": input.conversationId }),
+ ...(input.currentMessage != null && { "currentMessage": serializeAws_json1_0ChatMessage(input.currentMessage, context) }),
+ ...(input.customizationArn != null && { "customizationArn": input.customizationArn }),
+ ...(input.history != null && { "history": serializeAws_json1_0ChatHistory(input.history, context) }),
+ };
+ }
- // se_Diagnostic omitted.
+ const serializeAws_json1_0CursorState = (
+ input: CursorState,
+ context: __SerdeContext
+ ): any => {
+ return CursorState.visit(input, {
+ position: value => ({ "position": serializeAws_json1_0Position(value, context) }),
+ range: value => ({ "range": serializeAws_json1_0Range(value, context) }),
+ _: (name, value) => ({ name: value } as any)
+ });
+ }
- // se_DocumentSymbol omitted.
+ const serializeAws_json1_0Diagnostic = (
+ input: Diagnostic,
+ context: __SerdeContext
+ ): any => {
+ return Diagnostic.visit(input, {
+ runtimeDiagnostic: value => ({ "runtimeDiagnostic": serializeAws_json1_0RuntimeDiagnostic(value, context) }),
+ textDocumentDiagnostic: value => ({ "textDocumentDiagnostic": serializeAws_json1_0TextDocumentDiagnostic(value, context) }),
+ _: (name, value) => ({ name: value } as any)
+ });
+ }
- // se_DocumentSymbols omitted.
+ const serializeAws_json1_0DocumentSymbol = (
+ input: DocumentSymbol,
+ context: __SerdeContext
+ ): any => {
+ return {
+ ...(input.name != null && { "name": input.name }),
+ ...(input.source != null && { "source": input.source }),
+ ...(input.type != null && { "type": input.type }),
+ };
+ }
- // se_EditorState omitted.
+ const serializeAws_json1_0DocumentSymbols = (
+ input: (DocumentSymbol)[],
+ context: __SerdeContext
+ ): any => {
+ return input.filter((e: any) => e != null).map(entry => {
+ return serializeAws_json1_0DocumentSymbol(entry, context);
+ });
+ }
- // se_EnvironmentVariable omitted.
+ const serializeAws_json1_0EditorState = (
+ input: EditorState,
+ context: __SerdeContext
+ ): any => {
+ return {
+ ...(input.cursorState != null && { "cursorState": serializeAws_json1_0CursorState(input.cursorState, context) }),
+ ...(input.document != null && { "document": serializeAws_json1_0TextDocument(input.document, context) }),
+ ...(input.relevantDocuments != null && { "relevantDocuments": serializeAws_json1_0RelevantDocumentList(input.relevantDocuments, context) }),
+ ...(input.useRelevantDocuments != null && { "useRelevantDocuments": input.useRelevantDocuments }),
+ };
+ }
- // se_EnvironmentVariables omitted.
+ const serializeAws_json1_0EnvironmentVariable = (
+ input: EnvironmentVariable,
+ context: __SerdeContext
+ ): any => {
+ return {
+ ...(input.key != null && { "key": input.key }),
+ ...(input.value != null && { "value": input.value }),
+ };
+ }
- // se_EnvState omitted.
+ const serializeAws_json1_0EnvironmentVariables = (
+ input: (EnvironmentVariable)[],
+ context: __SerdeContext
+ ): any => {
+ return input.filter((e: any) => e != null).map(entry => {
+ return serializeAws_json1_0EnvironmentVariable(entry, context);
+ });
+ }
- // se_FollowupPrompt omitted.
+ const serializeAws_json1_0EnvState = (
+ input: EnvState,
+ context: __SerdeContext
+ ): any => {
+ return {
+ ...(input.currentWorkingDirectory != null && { "currentWorkingDirectory": input.currentWorkingDirectory }),
+ ...(input.environmentVariables != null && { "environmentVariables": serializeAws_json1_0EnvironmentVariables(input.environmentVariables, context) }),
+ ...(input.operatingSystem != null && { "operatingSystem": input.operatingSystem }),
+ ...(input.timezoneOffset != null && { "timezoneOffset": input.timezoneOffset }),
+ };
+ }
- // se_GitState omitted.
+ const serializeAws_json1_0FollowupPrompt = (
+ input: FollowupPrompt,
+ context: __SerdeContext
+ ): any => {
+ return {
+ ...(input.content != null && { "content": input.content }),
+ ...(input.userIntent != null && { "userIntent": input.userIntent }),
+ };
+ }
- // se_Position omitted.
+ const serializeAws_json1_0GitState = (
+ input: GitState,
+ context: __SerdeContext
+ ): any => {
+ return {
+ ...(input.status != null && { "status": input.status }),
+ };
+ }
- // se_ProgrammingLanguage omitted.
+ const serializeAws_json1_0Position = (
+ input: Position,
+ context: __SerdeContext
+ ): any => {
+ return {
+ ...(input.character != null && { "character": input.character }),
+ ...(input.line != null && { "line": input.line }),
+ };
+ }
- // se_Range omitted.
+ const serializeAws_json1_0ProgrammingLanguage = (
+ input: ProgrammingLanguage,
+ context: __SerdeContext
+ ): any => {
+ return {
+ ...(input.languageName != null && { "languageName": input.languageName }),
+ };
+ }
- // se_Reference omitted.
+ const serializeAws_json1_0Range = (
+ input: Range,
+ context: __SerdeContext
+ ): any => {
+ return {
+ ...(input.end != null && { "end": serializeAws_json1_0Position(input.end, context) }),
+ ...(input.start != null && { "start": serializeAws_json1_0Position(input.start, context) }),
+ };
+ }
- // se_References omitted.
+ const serializeAws_json1_0Reference = (
+ input: Reference,
+ context: __SerdeContext
+ ): any => {
+ return {
+ ...(input.licenseName != null && { "licenseName": input.licenseName }),
+ ...(input.recommendationContentSpan != null && { "recommendationContentSpan": serializeAws_json1_0Span(input.recommendationContentSpan, context) }),
+ ...(input.repository != null && { "repository": input.repository }),
+ ...(input.url != null && { "url": input.url }),
+ };
+ }
- // se_RelevantDocumentList omitted.
+ const serializeAws_json1_0References = (
+ input: (Reference)[],
+ context: __SerdeContext
+ ): any => {
+ return input.filter((e: any) => e != null).map(entry => {
+ return serializeAws_json1_0Reference(entry, context);
+ });
+ }
- // se_RelevantTextDocument omitted.
+ const serializeAws_json1_0RelevantDocumentList = (
+ input: (RelevantTextDocument)[],
+ context: __SerdeContext
+ ): any => {
+ return input.filter((e: any) => e != null).map(entry => {
+ return serializeAws_json1_0RelevantTextDocument(entry, context);
+ });
+ }
- // se_RuntimeDiagnostic omitted.
+ const serializeAws_json1_0RelevantTextDocument = (
+ input: RelevantTextDocument,
+ context: __SerdeContext
+ ): any => {
+ return {
+ ...(input.documentSymbols != null && { "documentSymbols": serializeAws_json1_0DocumentSymbols(input.documentSymbols, context) }),
+ ...(input.programmingLanguage != null && { "programmingLanguage": serializeAws_json1_0ProgrammingLanguage(input.programmingLanguage, context) }),
+ ...(input.relativeFilePath != null && { "relativeFilePath": input.relativeFilePath }),
+ ...(input.text != null && { "text": input.text }),
+ };
+ }
- // se_ShellHistory omitted.
+ const serializeAws_json1_0RuntimeDiagnostic = (
+ input: RuntimeDiagnostic,
+ context: __SerdeContext
+ ): any => {
+ return {
+ ...(input.message != null && { "message": input.message }),
+ ...(input.severity != null && { "severity": input.severity }),
+ ...(input.source != null && { "source": input.source }),
+ };
+ }
- // se_ShellHistoryEntry omitted.
+ const serializeAws_json1_0ShellHistory = (
+ input: (ShellHistoryEntry)[],
+ context: __SerdeContext
+ ): any => {
+ return input.filter((e: any) => e != null).map(entry => {
+ return serializeAws_json1_0ShellHistoryEntry(entry, context);
+ });
+ }
- // se_ShellState omitted.
+ const serializeAws_json1_0ShellHistoryEntry = (
+ input: ShellHistoryEntry,
+ context: __SerdeContext
+ ): any => {
+ return {
+ ...(input.command != null && { "command": input.command }),
+ ...(input.directory != null && { "directory": input.directory }),
+ ...(input.exitCode != null && { "exitCode": input.exitCode }),
+ ...(input.stderr != null && { "stderr": input.stderr }),
+ ...(input.stdout != null && { "stdout": input.stdout }),
+ };
+ }
- // se_Span omitted.
+ const serializeAws_json1_0ShellState = (
+ input: ShellState,
+ context: __SerdeContext
+ ): any => {
+ return {
+ ...(input.shellHistory != null && { "shellHistory": serializeAws_json1_0ShellHistory(input.shellHistory, context) }),
+ ...(input.shellName != null && { "shellName": input.shellName }),
+ };
+ }
- // se_SupplementaryWebLink omitted.
+ const serializeAws_json1_0Span = (
+ input: Span,
+ context: __SerdeContext
+ ): any => {
+ return {
+ ...(input.end != null && { "end": input.end }),
+ ...(input.start != null && { "start": input.start }),
+ };
+ }
- // se_SupplementaryWebLinks omitted.
+ const serializeAws_json1_0SupplementaryWebLink = (
+ input: SupplementaryWebLink,
+ context: __SerdeContext
+ ): any => {
+ return {
+ ...(input.snippet != null && { "snippet": input.snippet }),
+ ...(input.title != null && { "title": input.title }),
+ ...(input.url != null && { "url": input.url }),
+ };
+ }
- // se_TextDocument omitted.
+ const serializeAws_json1_0SupplementaryWebLinks = (
+ input: (SupplementaryWebLink)[],
+ context: __SerdeContext
+ ): any => {
+ return input.filter((e: any) => e != null).map(entry => {
+ return serializeAws_json1_0SupplementaryWebLink(entry, context);
+ });
+ }
- // se_TextDocumentDiagnostic omitted.
+ const serializeAws_json1_0TextDocument = (
+ input: TextDocument,
+ context: __SerdeContext
+ ): any => {
+ return {
+ ...(input.documentSymbols != null && { "documentSymbols": serializeAws_json1_0DocumentSymbols(input.documentSymbols, context) }),
+ ...(input.programmingLanguage != null && { "programmingLanguage": serializeAws_json1_0ProgrammingLanguage(input.programmingLanguage, context) }),
+ ...(input.relativeFilePath != null && { "relativeFilePath": input.relativeFilePath }),
+ ...(input.text != null && { "text": input.text }),
+ };
+ }
- // se_UserInputMessage omitted.
+ const serializeAws_json1_0TextDocumentDiagnostic = (
+ input: TextDocumentDiagnostic,
+ context: __SerdeContext
+ ): any => {
+ return {
+ ...(input.document != null && { "document": serializeAws_json1_0TextDocument(input.document, context) }),
+ ...(input.message != null && { "message": input.message }),
+ ...(input.range != null && { "range": serializeAws_json1_0Range(input.range, context) }),
+ ...(input.severity != null && { "severity": input.severity }),
+ ...(input.source != null && { "source": input.source }),
+ };
+ }
- // se_UserInputMessageContext omitted.
+ const serializeAws_json1_0UserInputMessage = (
+ input: UserInputMessage,
+ context: __SerdeContext
+ ): any => {
+ return {
+ ...(input.content != null && { "content": input.content }),
+ ...(input.userInputMessageContext != null && { "userInputMessageContext": serializeAws_json1_0UserInputMessageContext(input.userInputMessageContext, context) }),
+ ...(input.userIntent != null && { "userIntent": input.userIntent }),
+ };
+ }
- // se_UserSettings omitted.
+ const serializeAws_json1_0UserInputMessageContext = (
+ input: UserInputMessageContext,
+ context: __SerdeContext
+ ): any => {
+ return {
+ ...(input.appStudioContext != null && { "appStudioContext": serializeAws_json1_0AppStudioState(input.appStudioContext, context) }),
+ ...(input.consoleState != null && { "consoleState": serializeAws_json1_0ConsoleState(input.consoleState, context) }),
+ ...(input.diagnostic != null && { "diagnostic": serializeAws_json1_0Diagnostic(input.diagnostic, context) }),
+ ...(input.editorState != null && { "editorState": serializeAws_json1_0EditorState(input.editorState, context) }),
+ ...(input.envState != null && { "envState": serializeAws_json1_0EnvState(input.envState, context) }),
+ ...(input.gitState != null && { "gitState": serializeAws_json1_0GitState(input.gitState, context) }),
+ ...(input.shellState != null && { "shellState": serializeAws_json1_0ShellState(input.shellState, context) }),
+ ...(input.userSettings != null && { "userSettings": serializeAws_json1_0UserSettings(input.userSettings, context) }),
+ };
+ }
- // se_GenerateCodeFromCommandsRequest omitted.
+ const serializeAws_json1_0UserSettings = (
+ input: UserSettings,
+ context: __SerdeContext
+ ): any => {
+ return {
+ ...(input.hasConsentedToCrossRegionCalls != null && { "hasConsentedToCrossRegionCalls": input.hasConsentedToCrossRegionCalls }),
+ };
+ }
- /**
- * serializeAws_json1_0SendMessageRequest
- */
- const se_SendMessageRequest = (
- input: SendMessageRequest,
- context: __SerdeContext
- ): any => {
- return take(input, {
- 'conversationState': _json,
- 'dryRun': [],
- 'profileArn': [],
- 'source': [],
- });
- }
+ const serializeAws_json1_0GenerateCodeFromCommandsRequest = (
+ input: GenerateCodeFromCommandsRequest,
+ context: __SerdeContext
+ ): any => {
+ return {
+ ...(input.commands != null && { "commands": serializeAws_json1_0CommandInput(input.commands, context) }),
+ ...(input.outputFormat != null && { "outputFormat": input.outputFormat }),
+ };
+ }
- // de_AccessDeniedException omitted.
+ const serializeAws_json1_0SendMessageRequest = (
+ input: SendMessageRequest,
+ context: __SerdeContext
+ ): any => {
+ return {
+ ...(input.conversationState != null && { "conversationState": serializeAws_json1_0ConversationState(input.conversationState, context) }),
+ ...(input.dryRun != null && { "dryRun": input.dryRun }),
+ ...(input.profileArn != null && { "profileArn": input.profileArn }),
+ ...(input.source != null && { "source": input.source }),
+ };
+ }
- // de_AssistantResponseEvent omitted.
+ const deserializeAws_json1_0AccessDeniedException = (
+ output: any,
+ context: __SerdeContext
+ ): AccessDeniedException => {
+ return {
+ message: __expectString(output.message),
+ reason: __expectString(output.reason),
+ } as any;
+ }
- // de_CodeEvent omitted.
+ const deserializeAws_json1_0AssistantResponseEvent = (
+ output: any,
+ context: __SerdeContext
+ ): AssistantResponseEvent => {
+ return {
+ content: __expectString(output.content),
+ } as any;
+ }
- // de_CodeReferenceEvent omitted.
+ const deserializeAws_json1_0CodeEvent = (
+ output: any,
+ context: __SerdeContext
+ ): CodeEvent => {
+ return {
+ content: __expectString(output.content),
+ } as any;
+ }
- // de_ConflictException omitted.
+ const deserializeAws_json1_0CodeReferenceEvent = (
+ output: any,
+ context: __SerdeContext
+ ): CodeReferenceEvent => {
+ return {
+ references: (output.references != null) ? deserializeAws_json1_0References(output.references, context): undefined,
+ } as any;
+ }
- // de_DryRunOperationException omitted.
+ const deserializeAws_json1_0ConflictException = (
+ output: any,
+ context: __SerdeContext
+ ): ConflictException => {
+ return {
+ message: __expectString(output.message),
+ reason: __expectString(output.reason),
+ } as any;
+ }
- // de_DryRunSucceedEvent omitted.
+ const deserializeAws_json1_0DryRunOperationException = (
+ output: any,
+ context: __SerdeContext
+ ): DryRunOperationException => {
+ return {
+ message: __expectString(output.message),
+ responseCode: __expectInt32(output.responseCode),
+ } as any;
+ }
- // de_FollowupPrompt omitted.
+ const deserializeAws_json1_0DryRunSucceedEvent = (
+ output: any,
+ context: __SerdeContext
+ ): DryRunSucceedEvent => {
+ return {
+ } as any;
+ }
- // de_FollowupPromptEvent omitted.
+ const deserializeAws_json1_0FollowupPrompt = (
+ output: any,
+ context: __SerdeContext
+ ): FollowupPrompt => {
+ return {
+ content: __expectString(output.content),
+ userIntent: __expectString(output.userIntent),
+ } as any;
+ }
- // de_IntentData omitted.
+ const deserializeAws_json1_0FollowupPromptEvent = (
+ output: any,
+ context: __SerdeContext
+ ): FollowupPromptEvent => {
+ return {
+ followupPrompt: (output.followupPrompt != null) ? deserializeAws_json1_0FollowupPrompt(output.followupPrompt, context): undefined,
+ } as any;
+ }
- // de_IntentDataType omitted.
+ const deserializeAws_json1_0IntentData = (
+ output: any,
+ context: __SerdeContext
+ ): Record => {
+ return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => {
+ if (value === null) {
+ return acc;
+ }
+ acc[key] = deserializeAws_json1_0IntentDataType(__expectUnion(value), context);
+ return acc;
+ }, {});
+ }
- // de_IntentMap omitted.
+ const deserializeAws_json1_0IntentDataType = (
+ output: any,
+ context: __SerdeContext
+ ): IntentDataType => {
+ if (__expectString(output.string) !== undefined) {
+ return { string: __expectString(output.string) as any }
+ }
+ return { $unknown: Object.entries(output)[0] };
+ }
- // de_IntentsEvent omitted.
+ const deserializeAws_json1_0IntentMap = (
+ output: any,
+ context: __SerdeContext
+ ): Record> => {
+ return Object.entries(output).reduce((acc: Record>, [key, value]: [IntentType | string, any]) => {
+ if (value === null) {
+ return acc;
+ }
+ acc[key] = deserializeAws_json1_0IntentData(value, context);
+ return acc;
+ }, {});
+ }
- /**
- * deserializeAws_json1_0InteractionComponentEntry
- */
- const de_InteractionComponentEntry = (
- output: any,
- context: __SerdeContext
- ): InteractionComponentEntry => {
- return take(output, {
- 'interactionComponent': (_: any) => de_InteractionComponent(_, context),
- 'interactionComponentId': __expectString,
- }) as any;
- }
+ const deserializeAws_json1_0IntentsEvent = (
+ output: any,
+ context: __SerdeContext
+ ): IntentsEvent => {
+ return {
+ intents: (output.intents != null) ? deserializeAws_json1_0IntentMap(output.intents, context): undefined,
+ } as any;
+ }
- /**
- * deserializeAws_json1_0InteractionComponentEntryList
- */
- 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;
- }
+ const deserializeAws_json1_0InternalServerException = (
+ output: any,
+ context: __SerdeContext
+ ): InternalServerException => {
+ return {
+ message: __expectString(output.message),
+ } as any;
+ }
- /**
- * deserializeAws_json1_0InteractionComponentsEvent
- */
- const de_InteractionComponentsEvent = (
- output: any,
- context: __SerdeContext
- ): InteractionComponentsEvent => {
- return take(output, {
- 'interactionComponentEntries': (_: any) => de_InteractionComponentEntryList(_, context),
- }) as any;
- }
+ const deserializeAws_json1_0InvalidStateEvent = (
+ output: any,
+ context: __SerdeContext
+ ): InvalidStateEvent => {
+ return {
+ message: __expectString(output.message),
+ reason: __expectString(output.reason),
+ } as any;
+ }
- // de_InternalServerException omitted.
+ const deserializeAws_json1_0MessageMetadataEvent = (
+ output: any,
+ context: __SerdeContext
+ ): MessageMetadataEvent => {
+ return {
+ conversationId: __expectString(output.conversationId),
+ utteranceId: __expectString(output.utteranceId),
+ } as any;
+ }
- // de_InvalidStateEvent omitted.
+ const deserializeAws_json1_0Reference = (
+ output: any,
+ context: __SerdeContext
+ ): Reference => {
+ return {
+ licenseName: __expectString(output.licenseName),
+ recommendationContentSpan: (output.recommendationContentSpan != null) ? deserializeAws_json1_0Span(output.recommendationContentSpan, context): undefined,
+ repository: __expectString(output.repository),
+ url: __expectString(output.url),
+ } as any;
+ }
- // de_MessageMetadataEvent omitted.
+ const deserializeAws_json1_0References = (
+ output: any,
+ context: __SerdeContext
+ ): (Reference)[] => {
+ const retVal = (output || []).filter((e: any) => e != null).map((entry: any) => {
+ if (entry === null) {
+ return null as any;
+ }
+ return deserializeAws_json1_0Reference(entry, context);
+ });
+ return retVal;
+ }
- // de_Reference omitted.
+ const deserializeAws_json1_0ResourceNotFoundException = (
+ output: any,
+ context: __SerdeContext
+ ): ResourceNotFoundException => {
+ return {
+ message: __expectString(output.message),
+ } as any;
+ }
- // de_References omitted.
+ const deserializeAws_json1_0ServiceQuotaExceededException = (
+ output: any,
+ context: __SerdeContext
+ ): ServiceQuotaExceededException => {
+ return {
+ message: __expectString(output.message),
+ } as any;
+ }
- // de_ResourceNotFoundException omitted.
+ const deserializeAws_json1_0Span = (
+ output: any,
+ context: __SerdeContext
+ ): Span => {
+ return {
+ end: __expectInt32(output.end),
+ start: __expectInt32(output.start),
+ } as any;
+ }
- // de_ServiceQuotaExceededException omitted.
+ const deserializeAws_json1_0SupplementaryWebLink = (
+ output: any,
+ context: __SerdeContext
+ ): SupplementaryWebLink => {
+ return {
+ snippet: __expectString(output.snippet),
+ title: __expectString(output.title),
+ url: __expectString(output.url),
+ } as any;
+ }
- // de_Span omitted.
+ const deserializeAws_json1_0SupplementaryWebLinks = (
+ output: any,
+ context: __SerdeContext
+ ): (SupplementaryWebLink)[] => {
+ const retVal = (output || []).filter((e: any) => e != null).map((entry: any) => {
+ if (entry === null) {
+ return null as any;
+ }
+ return deserializeAws_json1_0SupplementaryWebLink(entry, context);
+ });
+ return retVal;
+ }
- // de_SupplementaryWebLink omitted.
+ const deserializeAws_json1_0SupplementaryWebLinksEvent = (
+ output: any,
+ context: __SerdeContext
+ ): SupplementaryWebLinksEvent => {
+ return {
+ supplementaryWebLinks: (output.supplementaryWebLinks != null) ? deserializeAws_json1_0SupplementaryWebLinks(output.supplementaryWebLinks, context): undefined,
+ } as any;
+ }
- // de_SupplementaryWebLinks omitted.
+ const deserializeAws_json1_0ThrottlingException = (
+ output: any,
+ context: __SerdeContext
+ ): ThrottlingException => {
+ return {
+ message: __expectString(output.message),
+ reason: __expectString(output.reason),
+ } as any;
+ }
- // de_SupplementaryWebLinksEvent omitted.
+ const deserializeAws_json1_0ValidationException = (
+ output: any,
+ context: __SerdeContext
+ ): ValidationException => {
+ return {
+ message: __expectString(output.message),
+ reason: __expectString(output.reason),
+ } as any;
+ }
- // de_ThrottlingException omitted.
+ const deserializeAws_json1_0InteractionComponentsEvent = (
+ output: any,
+ context: __SerdeContext
+ ): InteractionComponentsEvent => {
+ return {
+ interactionComponentEntries: (output.interactionComponentEntries != null) ? deserializeAws_json1_0InteractionComponentEntryList(output.interactionComponentEntries, context): undefined,
+ } as any;
+ }
- // de_ValidationException omitted.
+ const deserializeAws_json1_0Action = (
+ output: any,
+ context: __SerdeContext
+ ): Action => {
+ return {
+ moduleLink: (output.moduleLink != null) ? deserializeAws_json1_0ModuleLink(output.moduleLink, context): undefined,
+ webLink: (output.webLink != null) ? deserializeAws_json1_0WebLink(output.webLink, context): undefined,
+ } as any;
+ }
- // de_Action omitted.
+ const deserializeAws_json1_0Alert = (
+ output: any,
+ context: __SerdeContext
+ ): Alert => {
+ return {
+ content: (output.content != null) ? deserializeAws_json1_0AlertComponentList(output.content, context): undefined,
+ type: __expectString(output.type),
+ } as any;
+ }
- // de_Alert omitted.
+ const deserializeAws_json1_0AlertComponent = (
+ output: any,
+ context: __SerdeContext
+ ): AlertComponent => {
+ return {
+ text: (output.text != null) ? deserializeAws_json1_0Text(output.text, context): undefined,
+ } as any;
+ }
- // de_AlertComponent omitted.
+ const deserializeAws_json1_0AlertComponentList = (
+ output: any,
+ context: __SerdeContext
+ ): (AlertComponent)[] => {
+ const retVal = (output || []).filter((e: any) => e != null).map((entry: any) => {
+ if (entry === null) {
+ return null as any;
+ }
+ return deserializeAws_json1_0AlertComponent(entry, context);
+ });
+ return retVal;
+ }
- // de_AlertComponentList omitted.
+ const deserializeAws_json1_0CloudWatchTroubleshootingLink = (
+ output: any,
+ context: __SerdeContext
+ ): CloudWatchTroubleshootingLink => {
+ return {
+ defaultText: __expectString(output.defaultText),
+ investigationPayload: __expectString(output.investigationPayload),
+ label: __expectString(output.label),
+ } as any;
+ }
- // de_CloudWatchTroubleshootingLink omitted.
+ const deserializeAws_json1_0InfrastructureUpdate = (
+ output: any,
+ context: __SerdeContext
+ ): InfrastructureUpdate => {
+ return {
+ transition: (output.transition != null) ? deserializeAws_json1_0InfrastructureUpdateTransition(output.transition, context): undefined,
+ } as any;
+ }
- // de_InfrastructureUpdate omitted.
+ const deserializeAws_json1_0InfrastructureUpdateTransition = (
+ output: any,
+ context: __SerdeContext
+ ): InfrastructureUpdateTransition => {
+ return {
+ currentState: __expectString(output.currentState),
+ nextState: __expectString(output.nextState),
+ } as any;
+ }
- // de_InfrastructureUpdateTransition omitted.
+ const deserializeAws_json1_0InteractionComponent = (
+ output: any,
+ context: __SerdeContext
+ ): InteractionComponent => {
+ return {
+ action: (output.action != null) ? deserializeAws_json1_0Action(output.action, context): undefined,
+ alert: (output.alert != null) ? deserializeAws_json1_0Alert(output.alert, context): undefined,
+ infrastructureUpdate: (output.infrastructureUpdate != null) ? deserializeAws_json1_0InfrastructureUpdate(output.infrastructureUpdate, context): undefined,
+ progress: (output.progress != null) ? deserializeAws_json1_0Progress(output.progress, context): undefined,
+ resource: (output.resource != null) ? deserializeAws_json1_0Resource(output.resource, context): undefined,
+ resourceList: (output.resourceList != null) ? deserializeAws_json1_0ResourceList(output.resourceList, context): undefined,
+ section: (output.section != null) ? deserializeAws_json1_0Section(output.section, context): undefined,
+ step: (output.step != null) ? deserializeAws_json1_0Step(output.step, context): undefined,
+ suggestions: (output.suggestions != null) ? deserializeAws_json1_0Suggestions(output.suggestions, context): undefined,
+ taskDetails: (output.taskDetails != null) ? deserializeAws_json1_0TaskDetails(output.taskDetails, context): undefined,
+ taskReference: (output.taskReference != null) ? deserializeAws_json1_0TaskReference(output.taskReference, context): undefined,
+ text: (output.text != null) ? deserializeAws_json1_0Text(output.text, context): undefined,
+ } as any;
+ }
- /**
- * deserializeAws_json1_0InteractionComponent
- */
- const de_InteractionComponent = (
- output: any,
- context: __SerdeContext
- ): InteractionComponent => {
- return take(output, {
- 'alert': _json,
- 'infrastructureUpdate': _json,
- 'progress': _json,
- 'resource': _json,
- 'resourceList': _json,
- 'section': _json,
- 'step': _json,
- 'suggestions': _json,
- 'taskDetails': _json,
- 'taskReference': _json,
- 'text': _json,
- }) as any;
- }
+ const deserializeAws_json1_0InteractionComponentEntry = (
+ output: any,
+ context: __SerdeContext
+ ): InteractionComponentEntry => {
+ return {
+ interactionComponent: (output.interactionComponent != null) ? deserializeAws_json1_0InteractionComponent(output.interactionComponent, context): undefined,
+ interactionComponentId: __expectString(output.interactionComponentId),
+ } as any;
+ }
- // de_ModuleLink omitted.
+ const deserializeAws_json1_0InteractionComponentEntryList = (
+ output: any,
+ context: __SerdeContext
+ ): (InteractionComponentEntry)[] => {
+ const retVal = (output || []).filter((e: any) => e != null).map((entry: any) => {
+ if (entry === null) {
+ return null as any;
+ }
+ return deserializeAws_json1_0InteractionComponentEntry(entry, context);
+ });
+ return retVal;
+ }
- // de_Progress omitted.
+ const deserializeAws_json1_0ModuleLink = (
+ output: any,
+ context: __SerdeContext
+ ): ModuleLink => {
+ return {
+ cloudWatchTroubleshootingLink: (output.cloudWatchTroubleshootingLink != null) ? deserializeAws_json1_0CloudWatchTroubleshootingLink(output.cloudWatchTroubleshootingLink, context): undefined,
+ } as any;
+ }
- // de_ProgressComponent omitted.
+ const deserializeAws_json1_0Progress = (
+ output: any,
+ context: __SerdeContext
+ ): Progress => {
+ return {
+ content: (output.content != null) ? deserializeAws_json1_0ProgressComponentList(output.content, context): undefined,
+ } as any;
+ }
- // de_ProgressComponentList omitted.
+ const deserializeAws_json1_0ProgressComponent = (
+ output: any,
+ context: __SerdeContext
+ ): ProgressComponent => {
+ return {
+ step: (output.step != null) ? deserializeAws_json1_0Step(output.step, context): undefined,
+ } as any;
+ }
- // de_Resource omitted.
+ const deserializeAws_json1_0ProgressComponentList = (
+ output: any,
+ context: __SerdeContext
+ ): (ProgressComponent)[] => {
+ const retVal = (output || []).filter((e: any) => e != null).map((entry: any) => {
+ if (entry === null) {
+ return null as any;
+ }
+ return deserializeAws_json1_0ProgressComponent(entry, context);
+ });
+ return retVal;
+ }
- // de_ResourceList omitted.
+ const deserializeAws_json1_0Resource = (
+ output: any,
+ context: __SerdeContext
+ ): Resource => {
+ return {
+ ARN: __expectString(output.ARN),
+ description: __expectString(output.description),
+ link: __expectString(output.link),
+ resourceJsonString: __expectString(output.resourceJsonString),
+ title: __expectString(output.title),
+ type: __expectString(output.type),
+ } as any;
+ }
- // de_Resources omitted.
+ const deserializeAws_json1_0ResourceList = (
+ output: any,
+ context: __SerdeContext
+ ): ResourceList => {
+ return {
+ action: (output.action != null) ? deserializeAws_json1_0Action(output.action, context): undefined,
+ items: (output.items != null) ? deserializeAws_json1_0Resources(output.items, context): undefined,
+ } as any;
+ }
- // de_Section omitted.
+ const deserializeAws_json1_0Resources = (
+ output: any,
+ context: __SerdeContext
+ ): (Resource)[] => {
+ const retVal = (output || []).filter((e: any) => e != null).map((entry: any) => {
+ if (entry === null) {
+ return null as any;
+ }
+ return deserializeAws_json1_0Resource(entry, context);
+ });
+ return retVal;
+ }
- // de_SectionComponent omitted.
+ const deserializeAws_json1_0Section = (
+ output: any,
+ context: __SerdeContext
+ ): Section => {
+ return {
+ action: (output.action != null) ? deserializeAws_json1_0Action(output.action, context): undefined,
+ content: (output.content != null) ? deserializeAws_json1_0SectionComponentList(output.content, context): undefined,
+ title: __expectString(output.title),
+ } as any;
+ }
- // de_SectionComponentList omitted.
+ const deserializeAws_json1_0SectionComponent = (
+ output: any,
+ context: __SerdeContext
+ ): SectionComponent => {
+ return {
+ alert: (output.alert != null) ? deserializeAws_json1_0Alert(output.alert, context): undefined,
+ resource: (output.resource != null) ? deserializeAws_json1_0Resource(output.resource, context): undefined,
+ resourceList: (output.resourceList != null) ? deserializeAws_json1_0ResourceList(output.resourceList, context): undefined,
+ text: (output.text != null) ? deserializeAws_json1_0Text(output.text, context): undefined,
+ } as any;
+ }
- // de_Step omitted.
+ const deserializeAws_json1_0SectionComponentList = (
+ output: any,
+ context: __SerdeContext
+ ): (SectionComponent)[] => {
+ const retVal = (output || []).filter((e: any) => e != null).map((entry: any) => {
+ if (entry === null) {
+ return null as any;
+ }
+ return deserializeAws_json1_0SectionComponent(entry, context);
+ });
+ return retVal;
+ }
- // de_StepComponent omitted.
+ const deserializeAws_json1_0Step = (
+ output: any,
+ context: __SerdeContext
+ ): Step => {
+ return {
+ content: (output.content != null) ? deserializeAws_json1_0StepComponentList(output.content, context): undefined,
+ id: __expectInt32(output.id),
+ label: __expectString(output.label),
+ state: __expectString(output.state),
+ } as any;
+ }
- // de_StepComponentList omitted.
+ const deserializeAws_json1_0StepComponent = (
+ output: any,
+ context: __SerdeContext
+ ): StepComponent => {
+ return {
+ text: (output.text != null) ? deserializeAws_json1_0Text(output.text, context): undefined,
+ } as any;
+ }
- // de_Suggestion omitted.
+ const deserializeAws_json1_0StepComponentList = (
+ output: any,
+ context: __SerdeContext
+ ): (StepComponent)[] => {
+ const retVal = (output || []).filter((e: any) => e != null).map((entry: any) => {
+ if (entry === null) {
+ return null as any;
+ }
+ return deserializeAws_json1_0StepComponent(entry, context);
+ });
+ return retVal;
+ }
- // de_SuggestionList omitted.
+ const deserializeAws_json1_0Suggestion = (
+ output: any,
+ context: __SerdeContext
+ ): Suggestion => {
+ return {
+ value: __expectString(output.value),
+ } as any;
+ }
- // de_Suggestions omitted.
+ const deserializeAws_json1_0SuggestionList = (
+ output: any,
+ context: __SerdeContext
+ ): (Suggestion)[] => {
+ const retVal = (output || []).filter((e: any) => e != null).map((entry: any) => {
+ if (entry === null) {
+ return null as any;
+ }
+ return deserializeAws_json1_0Suggestion(entry, context);
+ });
+ return retVal;
+ }
- // de_TaskAction omitted.
+ const deserializeAws_json1_0Suggestions = (
+ output: any,
+ context: __SerdeContext
+ ): Suggestions => {
+ return {
+ items: (output.items != null) ? deserializeAws_json1_0SuggestionList(output.items, context): undefined,
+ } as any;
+ }
- // de_TaskActionConfirmation omitted.
+ const deserializeAws_json1_0TaskAction = (
+ output: any,
+ context: __SerdeContext
+ ): TaskAction => {
+ return {
+ confirmation: (output.confirmation != null) ? deserializeAws_json1_0TaskActionConfirmation(output.confirmation, context): undefined,
+ disabled: __expectBoolean(output.disabled),
+ label: __expectString(output.label),
+ note: (output.note != null) ? deserializeAws_json1_0TaskActionNote(output.note, context): undefined,
+ payload: (output.payload != null) ? deserializeAws_json1_0TaskActionPayload(output.payload, context): undefined,
+ primary: __expectBoolean(output.primary),
+ } as any;
+ }
- // de_TaskActionList omitted.
+ const deserializeAws_json1_0TaskActionConfirmation = (
+ output: any,
+ context: __SerdeContext
+ ): TaskActionConfirmation => {
+ return {
+ content: __expectString(output.content),
+ } as any;
+ }
- // de_TaskActionNote omitted.
+ const deserializeAws_json1_0TaskActionList = (
+ output: any,
+ context: __SerdeContext
+ ): (TaskAction)[] => {
+ const retVal = (output || []).filter((e: any) => e != null).map((entry: any) => {
+ if (entry === null) {
+ return null as any;
+ }
+ return deserializeAws_json1_0TaskAction(entry, context);
+ });
+ return retVal;
+ }
- // de_TaskActionPayload omitted.
+ const deserializeAws_json1_0TaskActionNote = (
+ output: any,
+ context: __SerdeContext
+ ): TaskActionNote => {
+ return {
+ content: __expectString(output.content),
+ type: __expectString(output.type),
+ } as any;
+ }
- // de_TaskComponent omitted.
+ const deserializeAws_json1_0TaskActionPayload = (
+ output: any,
+ context: __SerdeContext
+ ): Record => {
+ return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => {
+ if (value === null) {
+ return acc;
+ }
+ acc[key] = __expectString(value) as any;
+ return acc;
+ }, {});
+ }
- // de_TaskComponentList omitted.
+ const deserializeAws_json1_0TaskComponent = (
+ output: any,
+ context: __SerdeContext
+ ): TaskComponent => {
+ return {
+ alert: (output.alert != null) ? deserializeAws_json1_0Alert(output.alert, context): undefined,
+ infrastructureUpdate: (output.infrastructureUpdate != null) ? deserializeAws_json1_0InfrastructureUpdate(output.infrastructureUpdate, context): undefined,
+ progress: (output.progress != null) ? deserializeAws_json1_0Progress(output.progress, context): undefined,
+ text: (output.text != null) ? deserializeAws_json1_0Text(output.text, context): undefined,
+ } as any;
+ }
- // de_TaskDetails omitted.
+ const deserializeAws_json1_0TaskComponentList = (
+ output: any,
+ context: __SerdeContext
+ ): (TaskComponent)[] => {
+ const retVal = (output || []).filter((e: any) => e != null).map((entry: any) => {
+ if (entry === null) {
+ return null as any;
+ }
+ return deserializeAws_json1_0TaskComponent(entry, context);
+ });
+ return retVal;
+ }
- // de_TaskOverview omitted.
+ const deserializeAws_json1_0TaskDetails = (
+ output: any,
+ context: __SerdeContext
+ ): TaskDetails => {
+ return {
+ actions: (output.actions != null) ? deserializeAws_json1_0TaskActionList(output.actions, context): undefined,
+ content: (output.content != null) ? deserializeAws_json1_0TaskComponentList(output.content, context): undefined,
+ overview: (output.overview != null) ? deserializeAws_json1_0TaskOverview(output.overview, context): undefined,
+ } as any;
+ }
- // de_TaskReference omitted.
+ const deserializeAws_json1_0TaskOverview = (
+ output: any,
+ context: __SerdeContext
+ ): TaskOverview => {
+ return {
+ description: __expectString(output.description),
+ label: __expectString(output.label),
+ } as any;
+ }
- // de_Text omitted.
+ const deserializeAws_json1_0TaskReference = (
+ output: any,
+ context: __SerdeContext
+ ): TaskReference => {
+ return {
+ taskId: __expectString(output.taskId),
+ } as any;
+ }
- // de_WebLink omitted.
+ const deserializeAws_json1_0Text = (
+ output: any,
+ context: __SerdeContext
+ ): Text => {
+ return {
+ content: __expectString(output.content),
+ } 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"],
- });
+ const deserializeAws_json1_0WebLink = (
+ output: any,
+ context: __SerdeContext
+ ): WebLink => {
+ return {
+ label: __expectString(output.label),
+ url: __expectString(output.url),
+ } as any;
+ }
- // Encode Uint8Array data into string with utf-8.
- const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then(body => context.utf8Encoder(body))
+ 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"],
+ });
- const throwDefaultError = withBaseException(__BaseException);
- const buildHttpRpcRequest = async (
- context: __SerdeContext,
- headers: __HeaderBag,
- path: string,
- resolvedHostname: string | undefined,
- body: any,
- ): Promise<__HttpRequest> => {
- const {hostname, protocol = "https", port, path: basePath} = await context.endpoint();
- const contents: any = {
- protocol,
- hostname,
- port,
- method: "POST",
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
- headers,
+ // Collect low-level response body stream to Uint8Array.
+ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext): Promise => {
+ if (streamBody instanceof Uint8Array) {
+ return Promise.resolve(streamBody);
+ }
+ return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
};
- if (resolvedHostname !== undefined) {
- contents.hostname = resolvedHostname;
- }
- if (body !== undefined) {
- contents.body = body;
+
+ // Encode Uint8Array data into string with utf-8.
+ const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then(body => context.utf8Encoder(body))
+
+ const buildHttpRpcRequest = async (
+ context: __SerdeContext,
+ headers: __HeaderBag,
+ path: string,
+ resolvedHostname: string | undefined,
+ body: any,
+ ): Promise<__HttpRequest> => {
+ const {hostname, protocol = "https", port, path: basePath} = await context.endpoint();
+ const contents: any = {
+ protocol,
+ hostname,
+ port,
+ method: "POST",
+ path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
+ headers,
+ };
+ if (resolvedHostname !== undefined) {
+ contents.hostname = resolvedHostname;
+ }
+ if (body !== undefined) {
+ contents.body = body;
+ }
+ return new __HttpRequest(contents);
+ };
+
+ const parseBody = (streamBody: any, context: __SerdeContext): any => collectBodyString(streamBody, context).then(encoded => {
+ if (encoded.length) {
+ return JSON.parse(encoded);
+ }
+ return {};
+ });
+
+ const parseErrorBody = async (errorBody: any, context: __SerdeContext) => {
+ const value = await parseBody(errorBody, context);
+ value.message = value.message ?? value.Message;
+ return value;
}
- return new __HttpRequest(contents);
- };
- function sharedHeaders(operation: string): __HeaderBag { return {
- 'content-type': "application/x-amz-json-1.0",
- 'x-amz-target': `AmazonQDeveloperStreamingService.${operation}`,
- }};
+
+ /**
+ * 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;
+ };
+
+ const headerKey = findKey(output.headers, "x-amzn-errortype");
+ if (headerKey !== undefined) {
+ return sanitizeErrorCode(output.headers[headerKey]);
+ }
+
+ if (data.code !== undefined) {
+ return sanitizeErrorCode(data.code);
+ }
+
+ if (data["__type"] !== undefined) {
+ return sanitizeErrorCode(data["__type"]);
+ }
+ };
diff --git a/src.gen/@amzn/amazon-q-developer-streaming-client/src/runtimeConfig.browser.ts b/src.gen/@amzn/amazon-q-developer-streaming-client/src/runtimeConfig.browser.ts
index f6a45601c74..b4c828e98df 100644
--- a/src.gen/@amzn/amazon-q-developer-streaming-client/src/runtimeConfig.browser.ts
+++ b/src.gen/@amzn/amazon-q-developer-streaming-client/src/runtimeConfig.browser.ts
@@ -3,26 +3,26 @@
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 {
DEFAULT_USE_DUALSTACK_ENDPOINT,
DEFAULT_USE_FIPS_ENDPOINT,
-} from "@smithy/config-resolver";
-import { eventStreamSerdeProvider } from "@smithy/eventstream-serde-browser";
+} from "@aws-sdk/config-resolver";
+import { eventStreamSerdeProvider } from "@aws-sdk/eventstream-serde-browser";
import {
FetchHttpHandler as RequestHandler,
streamCollector,
-} from "@smithy/fetch-http-handler";
-import { invalidProvider } from "@smithy/invalid-dependency";
-import { calculateBodyLength } from "@smithy/util-body-length-browser";
+} from "@aws-sdk/fetch-http-handler";
+import { invalidProvider } from "@aws-sdk/invalid-dependency";
+import { calculateBodyLength } from "@aws-sdk/util-body-length-browser";
import {
DEFAULT_MAX_ATTEMPTS,
DEFAULT_RETRY_MODE,
-} from "@smithy/util-retry";
+} from "@aws-sdk/util-retry";
+import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser";
import { QDeveloperStreamingClientConfig } from "./QDeveloperStreamingClient";
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
-import { loadConfigsForDefaultMode } from "@smithy/smithy-client";
-import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-browser";
+import { loadConfigsForDefaultMode } from "@aws-sdk/smithy-client";
+import { resolveDefaultsModeConfig } from "@aws-sdk/util-defaults-mode-browser";
/**
* @internal
@@ -42,7 +42,7 @@ export const getRuntimeConfig = (config: QDeveloperStreamingClientConfig) => {
eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? eventStreamSerdeProvider,
maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
region: config?.region ?? invalidProvider("Region is missing"),
- requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
+ requestHandler: config?.requestHandler ?? new 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/amazon-q-developer-streaming-client/src/runtimeConfig.shared.ts b/src.gen/@amzn/amazon-q-developer-streaming-client/src/runtimeConfig.shared.ts
index d225ea9de71..83300c5ca8d 100644
--- a/src.gen/@amzn/amazon-q-developer-streaming-client/src/runtimeConfig.shared.ts
+++ b/src.gen/@amzn/amazon-q-developer-streaming-client/src/runtimeConfig.shared.ts
@@ -1,42 +1,29 @@
// smithy-typescript generated code
-import { defaultQDeveloperStreamingHttpAuthSchemeProvider } from "./auth/httpAuthSchemeProvider";
import { defaultRegionInfoProvider } from "./endpoints";
-import { AwsSdkSigV4Signer } from "@aws-sdk/core";
-import { NoOpLogger } from "@smithy/smithy-client";
-import { IdentityProviderConfig } from "@smithy/types";
-import { parseUrl } from "@smithy/url-parser";
+import { NoOpLogger } from "@aws-sdk/smithy-client";
+import { parseUrl } from "@aws-sdk/url-parser";
import {
fromBase64,
toBase64,
-} from "@smithy/util-base64";
+} from "@aws-sdk/util-base64";
import {
fromUtf8,
toUtf8,
-} from "@smithy/util-utf8";
+} from "@aws-sdk/util-utf8";
import { QDeveloperStreamingClientConfig } from "./QDeveloperStreamingClient";
/**
* @internal
*/
-export const getRuntimeConfig = (config: QDeveloperStreamingClientConfig) => {
- return {
- apiVersion: "2024-06-11",
- base64Decoder: config?.base64Decoder ?? fromBase64,
+export const getRuntimeConfig = (config: QDeveloperStreamingClientConfig) => ({
+ apiVersion: "2024-06-11",
+ base64Decoder: config?.base64Decoder ?? fromBase64,
base64Encoder: config?.base64Encoder ?? toBase64,
disableHostPrefix: config?.disableHostPrefix ?? false,
- extensions: config?.extensions ?? [],
- httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultQDeveloperStreamingHttpAuthSchemeProvider,
- httpAuthSchemes: config?.httpAuthSchemes ?? [{
- schemeId: "aws.auth#sigv4",
- identityProvider: (ipc: IdentityProviderConfig) =>
- ipc.getIdentityProvider("aws.auth#sigv4"),
- signer: new AwsSdkSigV4Signer(),
- }],
logger: config?.logger ?? new NoOpLogger(),
regionInfoProvider: config?.regionInfoProvider ?? defaultRegionInfoProvider,
serviceId: config?.serviceId ?? "QDeveloperStreaming",
urlParser: config?.urlParser ?? parseUrl,
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
utf8Encoder: config?.utf8Encoder ?? toUtf8,
- }
-};
+});
diff --git a/src.gen/@amzn/amazon-q-developer-streaming-client/src/runtimeConfig.ts b/src.gen/@amzn/amazon-q-developer-streaming-client/src/runtimeConfig.ts
index 9a3f3852e8f..c1abdb14e93 100644
--- a/src.gen/@amzn/amazon-q-developer-streaming-client/src/runtimeConfig.ts
+++ b/src.gen/@amzn/amazon-q-developer-streaming-client/src/runtimeConfig.ts
@@ -2,33 +2,33 @@
// @ts-ignore: package.json will be imported from dist folders
import packageInfo from "../package.json"; // eslint-disable-line
-import { emitWarningIfUnsupportedVersion as awsCheckVersion } from "@aws-sdk/core";
-import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
-import { defaultUserAgent } from "@aws-sdk/util-user-agent-node";
+import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts";
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 { eventStreamSerdeProvider } from "@smithy/eventstream-serde-node";
-import { Hash } from "@smithy/hash-node";
+} from "@aws-sdk/config-resolver";
+import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
+import { eventStreamSerdeProvider } from "@aws-sdk/eventstream-serde-node";
+import { Hash } from "@aws-sdk/hash-node";
import {
NODE_MAX_ATTEMPT_CONFIG_OPTIONS,
NODE_RETRY_MODE_CONFIG_OPTIONS,
-} from "@smithy/middleware-retry";
-import { loadConfig as loadNodeConfig } from "@smithy/node-config-provider";
+} from "@aws-sdk/middleware-retry";
+import { loadConfig as loadNodeConfig } from "@aws-sdk/node-config-provider";
import {
NodeHttpHandler as RequestHandler,
streamCollector,
-} from "@smithy/node-http-handler";
-import { calculateBodyLength } from "@smithy/util-body-length-node";
-import { DEFAULT_RETRY_MODE } from "@smithy/util-retry";
+} from "@aws-sdk/node-http-handler";
+import { calculateBodyLength } from "@aws-sdk/util-body-length-node";
+import { DEFAULT_RETRY_MODE } from "@aws-sdk/util-retry";
+import { defaultUserAgent } from "@aws-sdk/util-user-agent-node";
import { QDeveloperStreamingClientConfig } from "./QDeveloperStreamingClient";
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
-import { loadConfigsForDefaultMode } from "@smithy/smithy-client";
-import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-node";
-import { emitWarningIfUnsupportedVersion } from "@smithy/smithy-client";
+import { loadConfigsForDefaultMode } from "@aws-sdk/smithy-client";
+import { resolveDefaultsModeConfig } from "@aws-sdk/util-defaults-mode-node";
+import { emitWarningIfUnsupportedVersion } from "@aws-sdk/smithy-client";
/**
* @internal
@@ -38,18 +38,18 @@ export const getRuntimeConfig = (config: QDeveloperStreamingClientConfig) => {
const defaultsMode = resolveDefaultsModeConfig(config);
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
const clientSharedValues = getSharedRuntimeConfig(config);
- awsCheckVersion(process.version);return {
+ return {
...clientSharedValues,
...config,
runtime: "node",
defaultsMode,
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
- credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider,
+ credentialDefaultProvider: config?.credentialDefaultProvider ?? decorateDefaultCredentialProvider(credentialDefaultProvider),
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? defaultUserAgent({serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version}),
eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? eventStreamSerdeProvider,
maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS),
- requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
+ requestHandler: config?.requestHandler ?? new 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,
diff --git a/src.gen/@amzn/amazon-q-developer-streaming-client/src/runtimeExtensions.ts b/src.gen/@amzn/amazon-q-developer-streaming-client/src/runtimeExtensions.ts
deleted file mode 100644
index 2db7927eff2..00000000000
--- a/src.gen/@amzn/amazon-q-developer-streaming-client/src/runtimeExtensions.ts
+++ /dev/null
@@ -1,59 +0,0 @@
-// smithy-typescript generated code
-import {
- getHttpAuthExtensionConfiguration,
- resolveHttpAuthRuntimeConfig,
-} from "./auth/httpAuthExtensionConfiguration";
-import {
- getAwsRegionExtensionConfiguration,
- resolveAwsRegionExtensionConfiguration,
-} from "@aws-sdk/region-config-resolver";
-import {
- getHttpHandlerExtensionConfiguration,
- resolveHttpHandlerRuntimeConfig,
-} from "@smithy/protocol-http";
-import {
- getDefaultExtensionConfiguration,
- resolveDefaultRuntimeConfig,
-} from "@smithy/smithy-client";
-import { QDeveloperStreamingExtensionConfiguration } from "./extensionConfiguration";
-
-/**
- * @public
- */
-export interface RuntimeExtension {
- configure(extensionConfiguration: QDeveloperStreamingExtensionConfiguration): void;
-}
-
-/**
- * @public
- */
-export interface RuntimeExtensionsConfig {
- extensions: RuntimeExtension[]
-}
-
-const asPartial = >(t: T) => t;
-
-/**
- * @internal
- */
-export const resolveRuntimeExtensions = (
- runtimeConfig: any,
- extensions: RuntimeExtension[]
-) => {
- const extensionConfiguration: QDeveloperStreamingExtensionConfiguration = {
- ...asPartial(getAwsRegionExtensionConfiguration(runtimeConfig)),
- ...asPartial(getDefaultExtensionConfiguration(runtimeConfig)),
- ...asPartial(getHttpHandlerExtensionConfiguration(runtimeConfig)),
- ...asPartial(getHttpAuthExtensionConfiguration(runtimeConfig)),
- };
-
- extensions.forEach(extension => extension.configure(extensionConfiguration));
-
- return {
- ...runtimeConfig,
- ...resolveAwsRegionExtensionConfiguration(extensionConfiguration),
- ...resolveDefaultRuntimeConfig(extensionConfiguration),
- ...resolveHttpHandlerRuntimeConfig(extensionConfiguration),
- ...resolveHttpAuthRuntimeConfig(extensionConfiguration),
- };
-}
diff --git a/src.gen/@amzn/amazon-q-developer-streaming-client/tsconfig.json b/src.gen/@amzn/amazon-q-developer-streaming-client/tsconfig.json
index e7f5ec56b74..344909de212 100644
--- a/src.gen/@amzn/amazon-q-developer-streaming-client/tsconfig.json
+++ b/src.gen/@amzn/amazon-q-developer-streaming-client/tsconfig.json
@@ -1,5 +1,5 @@
{
- "extends": "@tsconfig/node16/tsconfig.json",
+ "extends": "@tsconfig/node14/tsconfig.json",
"compilerOptions": {
"downlevelIteration": true,
"importHelpers": true,