@aws-amplify/graphql-api-construct
Version:
AppSync GraphQL Api Construct using Amplify GraphQL Transformer.
1,139 lines (1,120 loc) • 127 kB
JavaScript
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
var index_exports = {};
__export(index_exports, {
AccessDeniedException: () => AccessDeniedException,
ApplyGuardrailCommand: () => ApplyGuardrailCommand,
ApplyGuardrailRequestFilterSensitiveLog: () => ApplyGuardrailRequestFilterSensitiveLog,
AsyncInvokeOutputDataConfig: () => AsyncInvokeOutputDataConfig,
AsyncInvokeStatus: () => AsyncInvokeStatus,
AsyncInvokeSummaryFilterSensitiveLog: () => AsyncInvokeSummaryFilterSensitiveLog,
BedrockRuntime: () => BedrockRuntime,
BedrockRuntimeClient: () => BedrockRuntimeClient,
BedrockRuntimeServiceException: () => BedrockRuntimeServiceException,
BidirectionalInputPayloadPartFilterSensitiveLog: () => BidirectionalInputPayloadPartFilterSensitiveLog,
BidirectionalOutputPayloadPartFilterSensitiveLog: () => BidirectionalOutputPayloadPartFilterSensitiveLog,
CachePointType: () => CachePointType,
ConflictException: () => ConflictException,
ContentBlock: () => ContentBlock,
ContentBlockDelta: () => ContentBlockDelta,
ContentBlockDeltaEventFilterSensitiveLog: () => ContentBlockDeltaEventFilterSensitiveLog,
ContentBlockDeltaFilterSensitiveLog: () => ContentBlockDeltaFilterSensitiveLog,
ContentBlockFilterSensitiveLog: () => ContentBlockFilterSensitiveLog,
ContentBlockStart: () => ContentBlockStart,
ConversationRole: () => ConversationRole,
ConverseCommand: () => ConverseCommand,
ConverseOutput: () => ConverseOutput,
ConverseOutputFilterSensitiveLog: () => ConverseOutputFilterSensitiveLog,
ConverseRequestFilterSensitiveLog: () => ConverseRequestFilterSensitiveLog,
ConverseResponseFilterSensitiveLog: () => ConverseResponseFilterSensitiveLog,
ConverseStreamCommand: () => ConverseStreamCommand,
ConverseStreamOutput: () => ConverseStreamOutput,
ConverseStreamOutputFilterSensitiveLog: () => ConverseStreamOutputFilterSensitiveLog,
ConverseStreamRequestFilterSensitiveLog: () => ConverseStreamRequestFilterSensitiveLog,
ConverseStreamResponseFilterSensitiveLog: () => ConverseStreamResponseFilterSensitiveLog,
DocumentFormat: () => DocumentFormat,
DocumentSource: () => DocumentSource,
GetAsyncInvokeCommand: () => GetAsyncInvokeCommand,
GetAsyncInvokeResponseFilterSensitiveLog: () => GetAsyncInvokeResponseFilterSensitiveLog,
GuardrailAction: () => GuardrailAction,
GuardrailContentBlock: () => GuardrailContentBlock,
GuardrailContentBlockFilterSensitiveLog: () => GuardrailContentBlockFilterSensitiveLog,
GuardrailContentFilterConfidence: () => GuardrailContentFilterConfidence,
GuardrailContentFilterStrength: () => GuardrailContentFilterStrength,
GuardrailContentFilterType: () => GuardrailContentFilterType,
GuardrailContentPolicyAction: () => GuardrailContentPolicyAction,
GuardrailContentQualifier: () => GuardrailContentQualifier,
GuardrailContentSource: () => GuardrailContentSource,
GuardrailContextualGroundingFilterType: () => GuardrailContextualGroundingFilterType,
GuardrailContextualGroundingPolicyAction: () => GuardrailContextualGroundingPolicyAction,
GuardrailConverseContentBlock: () => GuardrailConverseContentBlock,
GuardrailConverseContentBlockFilterSensitiveLog: () => GuardrailConverseContentBlockFilterSensitiveLog,
GuardrailConverseContentQualifier: () => GuardrailConverseContentQualifier,
GuardrailConverseImageBlockFilterSensitiveLog: () => GuardrailConverseImageBlockFilterSensitiveLog,
GuardrailConverseImageFormat: () => GuardrailConverseImageFormat,
GuardrailConverseImageSource: () => GuardrailConverseImageSource,
GuardrailConverseImageSourceFilterSensitiveLog: () => GuardrailConverseImageSourceFilterSensitiveLog,
GuardrailImageBlockFilterSensitiveLog: () => GuardrailImageBlockFilterSensitiveLog,
GuardrailImageFormat: () => GuardrailImageFormat,
GuardrailImageSource: () => GuardrailImageSource,
GuardrailImageSourceFilterSensitiveLog: () => GuardrailImageSourceFilterSensitiveLog,
GuardrailManagedWordType: () => GuardrailManagedWordType,
GuardrailOutputScope: () => GuardrailOutputScope,
GuardrailPiiEntityType: () => GuardrailPiiEntityType,
GuardrailSensitiveInformationPolicyAction: () => GuardrailSensitiveInformationPolicyAction,
GuardrailStreamProcessingMode: () => GuardrailStreamProcessingMode,
GuardrailTopicPolicyAction: () => GuardrailTopicPolicyAction,
GuardrailTopicType: () => GuardrailTopicType,
GuardrailTrace: () => GuardrailTrace,
GuardrailWordPolicyAction: () => GuardrailWordPolicyAction,
ImageFormat: () => ImageFormat,
ImageSource: () => ImageSource,
InternalServerException: () => InternalServerException,
InvokeModelCommand: () => InvokeModelCommand,
InvokeModelRequestFilterSensitiveLog: () => InvokeModelRequestFilterSensitiveLog,
InvokeModelResponseFilterSensitiveLog: () => InvokeModelResponseFilterSensitiveLog,
InvokeModelWithBidirectionalStreamCommand: () => InvokeModelWithBidirectionalStreamCommand,
InvokeModelWithBidirectionalStreamInput: () => InvokeModelWithBidirectionalStreamInput,
InvokeModelWithBidirectionalStreamInputFilterSensitiveLog: () => InvokeModelWithBidirectionalStreamInputFilterSensitiveLog,
InvokeModelWithBidirectionalStreamOutput: () => InvokeModelWithBidirectionalStreamOutput,
InvokeModelWithBidirectionalStreamOutputFilterSensitiveLog: () => InvokeModelWithBidirectionalStreamOutputFilterSensitiveLog,
InvokeModelWithBidirectionalStreamRequestFilterSensitiveLog: () => InvokeModelWithBidirectionalStreamRequestFilterSensitiveLog,
InvokeModelWithBidirectionalStreamResponseFilterSensitiveLog: () => InvokeModelWithBidirectionalStreamResponseFilterSensitiveLog,
InvokeModelWithResponseStreamCommand: () => InvokeModelWithResponseStreamCommand,
InvokeModelWithResponseStreamRequestFilterSensitiveLog: () => InvokeModelWithResponseStreamRequestFilterSensitiveLog,
InvokeModelWithResponseStreamResponseFilterSensitiveLog: () => InvokeModelWithResponseStreamResponseFilterSensitiveLog,
ListAsyncInvokesCommand: () => ListAsyncInvokesCommand,
ListAsyncInvokesResponseFilterSensitiveLog: () => ListAsyncInvokesResponseFilterSensitiveLog,
MessageFilterSensitiveLog: () => MessageFilterSensitiveLog,
ModelErrorException: () => ModelErrorException,
ModelNotReadyException: () => ModelNotReadyException,
ModelStreamErrorException: () => ModelStreamErrorException,
ModelTimeoutException: () => ModelTimeoutException,
PayloadPartFilterSensitiveLog: () => PayloadPartFilterSensitiveLog,
PerformanceConfigLatency: () => PerformanceConfigLatency,
PromptVariableValues: () => PromptVariableValues,
ReasoningContentBlock: () => ReasoningContentBlock,
ReasoningContentBlockDelta: () => ReasoningContentBlockDelta,
ReasoningContentBlockDeltaFilterSensitiveLog: () => ReasoningContentBlockDeltaFilterSensitiveLog,
ReasoningContentBlockFilterSensitiveLog: () => ReasoningContentBlockFilterSensitiveLog,
ReasoningTextBlockFilterSensitiveLog: () => ReasoningTextBlockFilterSensitiveLog,
ResourceNotFoundException: () => ResourceNotFoundException,
ResponseStream: () => ResponseStream,
ResponseStreamFilterSensitiveLog: () => ResponseStreamFilterSensitiveLog,
ServiceQuotaExceededException: () => ServiceQuotaExceededException,
ServiceUnavailableException: () => ServiceUnavailableException,
SortAsyncInvocationBy: () => SortAsyncInvocationBy,
SortOrder: () => SortOrder,
StartAsyncInvokeCommand: () => StartAsyncInvokeCommand,
StartAsyncInvokeRequestFilterSensitiveLog: () => StartAsyncInvokeRequestFilterSensitiveLog,
StopReason: () => StopReason,
SystemContentBlock: () => SystemContentBlock,
SystemContentBlockFilterSensitiveLog: () => SystemContentBlockFilterSensitiveLog,
ThrottlingException: () => ThrottlingException,
Tool: () => Tool,
ToolChoice: () => ToolChoice,
ToolInputSchema: () => ToolInputSchema,
ToolResultContentBlock: () => ToolResultContentBlock,
ToolResultStatus: () => ToolResultStatus,
Trace: () => Trace,
ValidationException: () => ValidationException,
VideoFormat: () => VideoFormat,
VideoSource: () => VideoSource,
__Client: () => import_smithy_client.Client,
paginateListAsyncInvokes: () => paginateListAsyncInvokes
});
module.exports = __toCommonJS(index_exports);
// src/BedrockRuntimeClient.ts
var import_middleware_eventstream = require("@aws-sdk/middleware-eventstream");
var import_middleware_host_header = require("@aws-sdk/middleware-host-header");
var import_middleware_logger = require("@aws-sdk/middleware-logger");
var import_middleware_recursion_detection = require("@aws-sdk/middleware-recursion-detection");
var import_middleware_user_agent = require("@aws-sdk/middleware-user-agent");
var import_config_resolver = require("@smithy/config-resolver");
var import_core = require("@smithy/core");
var import_eventstream_serde_config_resolver = require("@smithy/eventstream-serde-config-resolver");
var import_middleware_content_length = require("@smithy/middleware-content-length");
var import_middleware_endpoint = require("@smithy/middleware-endpoint");
var import_middleware_retry = require("@smithy/middleware-retry");
var import_httpAuthSchemeProvider = require("./auth/httpAuthSchemeProvider");
// src/endpoint/EndpointParameters.ts
var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {
return Object.assign(options, {
useDualstackEndpoint: options.useDualstackEndpoint ?? false,
useFipsEndpoint: options.useFipsEndpoint ?? false,
defaultSigningName: "bedrock"
});
}, "resolveClientEndpointParameters");
var commonParams = {
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
Endpoint: { type: "builtInParams", name: "endpoint" },
Region: { type: "builtInParams", name: "region" },
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
};
// src/BedrockRuntimeClient.ts
var import_runtimeConfig = require("././runtimeConfig");
// src/runtimeExtensions.ts
var import_region_config_resolver = require("@aws-sdk/region-config-resolver");
var import_protocol_http = require("@smithy/protocol-http");
var import_smithy_client = require("@smithy/smithy-client");
// src/auth/httpAuthExtensionConfiguration.ts
var getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {
const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
let _credentials = runtimeConfig.credentials;
return {
setHttpAuthScheme(httpAuthScheme) {
const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
if (index === -1) {
_httpAuthSchemes.push(httpAuthScheme);
} else {
_httpAuthSchemes.splice(index, 1, httpAuthScheme);
}
},
httpAuthSchemes() {
return _httpAuthSchemes;
},
setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
_httpAuthSchemeProvider = httpAuthSchemeProvider;
},
httpAuthSchemeProvider() {
return _httpAuthSchemeProvider;
},
setCredentials(credentials) {
_credentials = credentials;
},
credentials() {
return _credentials;
}
};
}, "getHttpAuthExtensionConfiguration");
var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => {
return {
httpAuthSchemes: config.httpAuthSchemes(),
httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
credentials: config.credentials()
};
}, "resolveHttpAuthRuntimeConfig");
// src/runtimeExtensions.ts
var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
const extensionConfiguration = Object.assign(
(0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig),
(0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig),
(0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig),
getHttpAuthExtensionConfiguration(runtimeConfig)
);
extensions.forEach((extension) => extension.configure(extensionConfiguration));
return Object.assign(
runtimeConfig,
(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
resolveHttpAuthRuntimeConfig(extensionConfiguration)
);
}, "resolveRuntimeExtensions");
// src/BedrockRuntimeClient.ts
var BedrockRuntimeClient = class extends import_smithy_client.Client {
static {
__name(this, "BedrockRuntimeClient");
}
/**
* The resolved configuration of BedrockRuntimeClient class. This is resolved and normalized from the {@link BedrockRuntimeClientConfig | constructor configuration interface}.
*/
config;
constructor(...[configuration]) {
const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});
super(_config_0);
this.initConfig = _config_0;
const _config_1 = resolveClientEndpointParameters(_config_0);
const _config_2 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_1);
const _config_3 = (0, import_middleware_retry.resolveRetryConfig)(_config_2);
const _config_4 = (0, import_config_resolver.resolveRegionConfig)(_config_3);
const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
const _config_6 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_5);
const _config_7 = (0, import_eventstream_serde_config_resolver.resolveEventStreamSerdeConfig)(_config_6);
const _config_8 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_7);
const _config_9 = (0, import_middleware_eventstream.resolveEventStreamConfig)(_config_8);
const _config_10 = resolveRuntimeExtensions(_config_9, configuration?.extensions || []);
this.config = _config_10;
this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
this.middlewareStack.use(
(0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {
httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider.defaultBedrockRuntimeHttpAuthSchemeParametersProvider,
identityProviderConfigProvider: /* @__PURE__ */ __name(async (config) => new import_core.DefaultIdentityProviderConfig({
"aws.auth#sigv4": config.credentials
}), "identityProviderConfigProvider")
})
);
this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config));
}
/**
* Destroy underlying resources, like sockets. It's usually not necessary to do this.
* However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
* Otherwise, sockets might stay open for quite a long time before the server terminates them.
*/
destroy() {
super.destroy();
}
};
// src/BedrockRuntime.ts
// src/commands/ApplyGuardrailCommand.ts
var import_middleware_serde = require("@smithy/middleware-serde");
// src/models/models_0.ts
// src/models/BedrockRuntimeServiceException.ts
var BedrockRuntimeServiceException = class _BedrockRuntimeServiceException extends import_smithy_client.ServiceException {
static {
__name(this, "BedrockRuntimeServiceException");
}
/**
* @internal
*/
constructor(options) {
super(options);
Object.setPrototypeOf(this, _BedrockRuntimeServiceException.prototype);
}
};
// src/models/models_0.ts
var AccessDeniedException = class _AccessDeniedException extends BedrockRuntimeServiceException {
static {
__name(this, "AccessDeniedException");
}
name = "AccessDeniedException";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "AccessDeniedException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _AccessDeniedException.prototype);
}
};
var AsyncInvokeOutputDataConfig;
((AsyncInvokeOutputDataConfig3) => {
AsyncInvokeOutputDataConfig3.visit = /* @__PURE__ */ __name((value, visitor) => {
if (value.s3OutputDataConfig !== void 0) return visitor.s3OutputDataConfig(value.s3OutputDataConfig);
return visitor._(value.$unknown[0], value.$unknown[1]);
}, "visit");
})(AsyncInvokeOutputDataConfig || (AsyncInvokeOutputDataConfig = {}));
var AsyncInvokeStatus = {
COMPLETED: "Completed",
FAILED: "Failed",
IN_PROGRESS: "InProgress"
};
var InternalServerException = class _InternalServerException extends BedrockRuntimeServiceException {
static {
__name(this, "InternalServerException");
}
name = "InternalServerException";
$fault = "server";
/**
* @internal
*/
constructor(opts) {
super({
name: "InternalServerException",
$fault: "server",
...opts
});
Object.setPrototypeOf(this, _InternalServerException.prototype);
}
};
var ThrottlingException = class _ThrottlingException extends BedrockRuntimeServiceException {
static {
__name(this, "ThrottlingException");
}
name = "ThrottlingException";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "ThrottlingException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _ThrottlingException.prototype);
}
};
var ValidationException = class _ValidationException extends BedrockRuntimeServiceException {
static {
__name(this, "ValidationException");
}
name = "ValidationException";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "ValidationException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _ValidationException.prototype);
}
};
var SortAsyncInvocationBy = {
SUBMISSION_TIME: "SubmissionTime"
};
var SortOrder = {
ASCENDING: "Ascending",
DESCENDING: "Descending"
};
var ConflictException = class _ConflictException extends BedrockRuntimeServiceException {
static {
__name(this, "ConflictException");
}
name = "ConflictException";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "ConflictException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _ConflictException.prototype);
}
};
var ResourceNotFoundException = class _ResourceNotFoundException extends BedrockRuntimeServiceException {
static {
__name(this, "ResourceNotFoundException");
}
name = "ResourceNotFoundException";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "ResourceNotFoundException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _ResourceNotFoundException.prototype);
}
};
var ServiceQuotaExceededException = class _ServiceQuotaExceededException extends BedrockRuntimeServiceException {
static {
__name(this, "ServiceQuotaExceededException");
}
name = "ServiceQuotaExceededException";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "ServiceQuotaExceededException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _ServiceQuotaExceededException.prototype);
}
};
var ServiceUnavailableException = class _ServiceUnavailableException extends BedrockRuntimeServiceException {
static {
__name(this, "ServiceUnavailableException");
}
name = "ServiceUnavailableException";
$fault = "server";
/**
* @internal
*/
constructor(opts) {
super({
name: "ServiceUnavailableException",
$fault: "server",
...opts
});
Object.setPrototypeOf(this, _ServiceUnavailableException.prototype);
}
};
var GuardrailImageFormat = {
JPEG: "jpeg",
PNG: "png"
};
var GuardrailImageSource;
((GuardrailImageSource2) => {
GuardrailImageSource2.visit = /* @__PURE__ */ __name((value, visitor) => {
if (value.bytes !== void 0) return visitor.bytes(value.bytes);
return visitor._(value.$unknown[0], value.$unknown[1]);
}, "visit");
})(GuardrailImageSource || (GuardrailImageSource = {}));
var GuardrailContentQualifier = {
GROUNDING_SOURCE: "grounding_source",
GUARD_CONTENT: "guard_content",
QUERY: "query"
};
var GuardrailContentBlock;
((GuardrailContentBlock2) => {
GuardrailContentBlock2.visit = /* @__PURE__ */ __name((value, visitor) => {
if (value.text !== void 0) return visitor.text(value.text);
if (value.image !== void 0) return visitor.image(value.image);
return visitor._(value.$unknown[0], value.$unknown[1]);
}, "visit");
})(GuardrailContentBlock || (GuardrailContentBlock = {}));
var GuardrailOutputScope = {
FULL: "FULL",
INTERVENTIONS: "INTERVENTIONS"
};
var GuardrailContentSource = {
INPUT: "INPUT",
OUTPUT: "OUTPUT"
};
var GuardrailAction = {
GUARDRAIL_INTERVENED: "GUARDRAIL_INTERVENED",
NONE: "NONE"
};
var GuardrailContentPolicyAction = {
BLOCKED: "BLOCKED",
NONE: "NONE"
};
var GuardrailContentFilterConfidence = {
HIGH: "HIGH",
LOW: "LOW",
MEDIUM: "MEDIUM",
NONE: "NONE"
};
var GuardrailContentFilterStrength = {
HIGH: "HIGH",
LOW: "LOW",
MEDIUM: "MEDIUM",
NONE: "NONE"
};
var GuardrailContentFilterType = {
HATE: "HATE",
INSULTS: "INSULTS",
MISCONDUCT: "MISCONDUCT",
PROMPT_ATTACK: "PROMPT_ATTACK",
SEXUAL: "SEXUAL",
VIOLENCE: "VIOLENCE"
};
var GuardrailContextualGroundingPolicyAction = {
BLOCKED: "BLOCKED",
NONE: "NONE"
};
var GuardrailContextualGroundingFilterType = {
GROUNDING: "GROUNDING",
RELEVANCE: "RELEVANCE"
};
var GuardrailSensitiveInformationPolicyAction = {
ANONYMIZED: "ANONYMIZED",
BLOCKED: "BLOCKED",
NONE: "NONE"
};
var GuardrailPiiEntityType = {
ADDRESS: "ADDRESS",
AGE: "AGE",
AWS_ACCESS_KEY: "AWS_ACCESS_KEY",
AWS_SECRET_KEY: "AWS_SECRET_KEY",
CA_HEALTH_NUMBER: "CA_HEALTH_NUMBER",
CA_SOCIAL_INSURANCE_NUMBER: "CA_SOCIAL_INSURANCE_NUMBER",
CREDIT_DEBIT_CARD_CVV: "CREDIT_DEBIT_CARD_CVV",
CREDIT_DEBIT_CARD_EXPIRY: "CREDIT_DEBIT_CARD_EXPIRY",
CREDIT_DEBIT_CARD_NUMBER: "CREDIT_DEBIT_CARD_NUMBER",
DRIVER_ID: "DRIVER_ID",
EMAIL: "EMAIL",
INTERNATIONAL_BANK_ACCOUNT_NUMBER: "INTERNATIONAL_BANK_ACCOUNT_NUMBER",
IP_ADDRESS: "IP_ADDRESS",
LICENSE_PLATE: "LICENSE_PLATE",
MAC_ADDRESS: "MAC_ADDRESS",
NAME: "NAME",
PASSWORD: "PASSWORD",
PHONE: "PHONE",
PIN: "PIN",
SWIFT_CODE: "SWIFT_CODE",
UK_NATIONAL_HEALTH_SERVICE_NUMBER: "UK_NATIONAL_HEALTH_SERVICE_NUMBER",
UK_NATIONAL_INSURANCE_NUMBER: "UK_NATIONAL_INSURANCE_NUMBER",
UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER: "UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER",
URL: "URL",
USERNAME: "USERNAME",
US_BANK_ACCOUNT_NUMBER: "US_BANK_ACCOUNT_NUMBER",
US_BANK_ROUTING_NUMBER: "US_BANK_ROUTING_NUMBER",
US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER: "US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER",
US_PASSPORT_NUMBER: "US_PASSPORT_NUMBER",
US_SOCIAL_SECURITY_NUMBER: "US_SOCIAL_SECURITY_NUMBER",
VEHICLE_IDENTIFICATION_NUMBER: "VEHICLE_IDENTIFICATION_NUMBER"
};
var GuardrailTopicPolicyAction = {
BLOCKED: "BLOCKED",
NONE: "NONE"
};
var GuardrailTopicType = {
DENY: "DENY"
};
var GuardrailWordPolicyAction = {
BLOCKED: "BLOCKED",
NONE: "NONE"
};
var GuardrailManagedWordType = {
PROFANITY: "PROFANITY"
};
var GuardrailTrace = {
DISABLED: "disabled",
ENABLED: "enabled",
ENABLED_FULL: "enabled_full"
};
var CachePointType = {
DEFAULT: "default"
};
var DocumentFormat = {
CSV: "csv",
DOC: "doc",
DOCX: "docx",
HTML: "html",
MD: "md",
PDF: "pdf",
TXT: "txt",
XLS: "xls",
XLSX: "xlsx"
};
var DocumentSource;
((DocumentSource2) => {
DocumentSource2.visit = /* @__PURE__ */ __name((value, visitor) => {
if (value.bytes !== void 0) return visitor.bytes(value.bytes);
if (value.s3Location !== void 0) return visitor.s3Location(value.s3Location);
return visitor._(value.$unknown[0], value.$unknown[1]);
}, "visit");
})(DocumentSource || (DocumentSource = {}));
var GuardrailConverseImageFormat = {
JPEG: "jpeg",
PNG: "png"
};
var GuardrailConverseImageSource;
((GuardrailConverseImageSource2) => {
GuardrailConverseImageSource2.visit = /* @__PURE__ */ __name((value, visitor) => {
if (value.bytes !== void 0) return visitor.bytes(value.bytes);
return visitor._(value.$unknown[0], value.$unknown[1]);
}, "visit");
})(GuardrailConverseImageSource || (GuardrailConverseImageSource = {}));
var GuardrailConverseContentQualifier = {
GROUNDING_SOURCE: "grounding_source",
GUARD_CONTENT: "guard_content",
QUERY: "query"
};
var GuardrailConverseContentBlock;
((GuardrailConverseContentBlock2) => {
GuardrailConverseContentBlock2.visit = /* @__PURE__ */ __name((value, visitor) => {
if (value.text !== void 0) return visitor.text(value.text);
if (value.image !== void 0) return visitor.image(value.image);
return visitor._(value.$unknown[0], value.$unknown[1]);
}, "visit");
})(GuardrailConverseContentBlock || (GuardrailConverseContentBlock = {}));
var ImageFormat = {
GIF: "gif",
JPEG: "jpeg",
PNG: "png",
WEBP: "webp"
};
var ImageSource;
((ImageSource2) => {
ImageSource2.visit = /* @__PURE__ */ __name((value, visitor) => {
if (value.bytes !== void 0) return visitor.bytes(value.bytes);
if (value.s3Location !== void 0) return visitor.s3Location(value.s3Location);
return visitor._(value.$unknown[0], value.$unknown[1]);
}, "visit");
})(ImageSource || (ImageSource = {}));
var ReasoningContentBlock;
((ReasoningContentBlock2) => {
ReasoningContentBlock2.visit = /* @__PURE__ */ __name((value, visitor) => {
if (value.reasoningText !== void 0) return visitor.reasoningText(value.reasoningText);
if (value.redactedContent !== void 0) return visitor.redactedContent(value.redactedContent);
return visitor._(value.$unknown[0], value.$unknown[1]);
}, "visit");
})(ReasoningContentBlock || (ReasoningContentBlock = {}));
var VideoFormat = {
FLV: "flv",
MKV: "mkv",
MOV: "mov",
MP4: "mp4",
MPEG: "mpeg",
MPG: "mpg",
THREE_GP: "three_gp",
WEBM: "webm",
WMV: "wmv"
};
var VideoSource;
((VideoSource2) => {
VideoSource2.visit = /* @__PURE__ */ __name((value, visitor) => {
if (value.bytes !== void 0) return visitor.bytes(value.bytes);
if (value.s3Location !== void 0) return visitor.s3Location(value.s3Location);
return visitor._(value.$unknown[0], value.$unknown[1]);
}, "visit");
})(VideoSource || (VideoSource = {}));
var ToolResultContentBlock;
((ToolResultContentBlock2) => {
ToolResultContentBlock2.visit = /* @__PURE__ */ __name((value, visitor) => {
if (value.json !== void 0) return visitor.json(value.json);
if (value.text !== void 0) return visitor.text(value.text);
if (value.image !== void 0) return visitor.image(value.image);
if (value.document !== void 0) return visitor.document(value.document);
if (value.video !== void 0) return visitor.video(value.video);
return visitor._(value.$unknown[0], value.$unknown[1]);
}, "visit");
})(ToolResultContentBlock || (ToolResultContentBlock = {}));
var ToolResultStatus = {
ERROR: "error",
SUCCESS: "success"
};
var ContentBlock;
((ContentBlock2) => {
ContentBlock2.visit = /* @__PURE__ */ __name((value, visitor) => {
if (value.text !== void 0) return visitor.text(value.text);
if (value.image !== void 0) return visitor.image(value.image);
if (value.document !== void 0) return visitor.document(value.document);
if (value.video !== void 0) return visitor.video(value.video);
if (value.toolUse !== void 0) return visitor.toolUse(value.toolUse);
if (value.toolResult !== void 0) return visitor.toolResult(value.toolResult);
if (value.guardContent !== void 0) return visitor.guardContent(value.guardContent);
if (value.cachePoint !== void 0) return visitor.cachePoint(value.cachePoint);
if (value.reasoningContent !== void 0) return visitor.reasoningContent(value.reasoningContent);
return visitor._(value.$unknown[0], value.$unknown[1]);
}, "visit");
})(ContentBlock || (ContentBlock = {}));
var ConversationRole = {
ASSISTANT: "assistant",
USER: "user"
};
var PerformanceConfigLatency = {
OPTIMIZED: "optimized",
STANDARD: "standard"
};
var PromptVariableValues;
((PromptVariableValues3) => {
PromptVariableValues3.visit = /* @__PURE__ */ __name((value, visitor) => {
if (value.text !== void 0) return visitor.text(value.text);
return visitor._(value.$unknown[0], value.$unknown[1]);
}, "visit");
})(PromptVariableValues || (PromptVariableValues = {}));
var SystemContentBlock;
((SystemContentBlock2) => {
SystemContentBlock2.visit = /* @__PURE__ */ __name((value, visitor) => {
if (value.text !== void 0) return visitor.text(value.text);
if (value.guardContent !== void 0) return visitor.guardContent(value.guardContent);
if (value.cachePoint !== void 0) return visitor.cachePoint(value.cachePoint);
return visitor._(value.$unknown[0], value.$unknown[1]);
}, "visit");
})(SystemContentBlock || (SystemContentBlock = {}));
var ToolChoice;
((ToolChoice3) => {
ToolChoice3.visit = /* @__PURE__ */ __name((value, visitor) => {
if (value.auto !== void 0) return visitor.auto(value.auto);
if (value.any !== void 0) return visitor.any(value.any);
if (value.tool !== void 0) return visitor.tool(value.tool);
return visitor._(value.$unknown[0], value.$unknown[1]);
}, "visit");
})(ToolChoice || (ToolChoice = {}));
var ToolInputSchema;
((ToolInputSchema2) => {
ToolInputSchema2.visit = /* @__PURE__ */ __name((value, visitor) => {
if (value.json !== void 0) return visitor.json(value.json);
return visitor._(value.$unknown[0], value.$unknown[1]);
}, "visit");
})(ToolInputSchema || (ToolInputSchema = {}));
var Tool;
((Tool2) => {
Tool2.visit = /* @__PURE__ */ __name((value, visitor) => {
if (value.toolSpec !== void 0) return visitor.toolSpec(value.toolSpec);
if (value.cachePoint !== void 0) return visitor.cachePoint(value.cachePoint);
return visitor._(value.$unknown[0], value.$unknown[1]);
}, "visit");
})(Tool || (Tool = {}));
var ConverseOutput;
((ConverseOutput3) => {
ConverseOutput3.visit = /* @__PURE__ */ __name((value, visitor) => {
if (value.message !== void 0) return visitor.message(value.message);
return visitor._(value.$unknown[0], value.$unknown[1]);
}, "visit");
})(ConverseOutput || (ConverseOutput = {}));
var StopReason = {
CONTENT_FILTERED: "content_filtered",
END_TURN: "end_turn",
GUARDRAIL_INTERVENED: "guardrail_intervened",
MAX_TOKENS: "max_tokens",
STOP_SEQUENCE: "stop_sequence",
TOOL_USE: "tool_use"
};
var ModelErrorException = class _ModelErrorException extends BedrockRuntimeServiceException {
static {
__name(this, "ModelErrorException");
}
name = "ModelErrorException";
$fault = "client";
/**
* <p>The original status code.</p>
* @public
*/
originalStatusCode;
/**
* <p>The resource name.</p>
* @public
*/
resourceName;
/**
* @internal
*/
constructor(opts) {
super({
name: "ModelErrorException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _ModelErrorException.prototype);
this.originalStatusCode = opts.originalStatusCode;
this.resourceName = opts.resourceName;
}
};
var ModelNotReadyException = class _ModelNotReadyException extends BedrockRuntimeServiceException {
static {
__name(this, "ModelNotReadyException");
}
name = "ModelNotReadyException";
$fault = "client";
$retryable = {};
/**
* @internal
*/
constructor(opts) {
super({
name: "ModelNotReadyException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _ModelNotReadyException.prototype);
}
};
var ModelTimeoutException = class _ModelTimeoutException extends BedrockRuntimeServiceException {
static {
__name(this, "ModelTimeoutException");
}
name = "ModelTimeoutException";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "ModelTimeoutException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _ModelTimeoutException.prototype);
}
};
var GuardrailStreamProcessingMode = {
ASYNC: "async",
SYNC: "sync"
};
var ReasoningContentBlockDelta;
((ReasoningContentBlockDelta3) => {
ReasoningContentBlockDelta3.visit = /* @__PURE__ */ __name((value, visitor) => {
if (value.text !== void 0) return visitor.text(value.text);
if (value.redactedContent !== void 0) return visitor.redactedContent(value.redactedContent);
if (value.signature !== void 0) return visitor.signature(value.signature);
return visitor._(value.$unknown[0], value.$unknown[1]);
}, "visit");
})(ReasoningContentBlockDelta || (ReasoningContentBlockDelta = {}));
var ContentBlockDelta;
((ContentBlockDelta3) => {
ContentBlockDelta3.visit = /* @__PURE__ */ __name((value, visitor) => {
if (value.text !== void 0) return visitor.text(value.text);
if (value.toolUse !== void 0) return visitor.toolUse(value.toolUse);
if (value.reasoningContent !== void 0) return visitor.reasoningContent(value.reasoningContent);
return visitor._(value.$unknown[0], value.$unknown[1]);
}, "visit");
})(ContentBlockDelta || (ContentBlockDelta = {}));
var ContentBlockStart;
((ContentBlockStart2) => {
ContentBlockStart2.visit = /* @__PURE__ */ __name((value, visitor) => {
if (value.toolUse !== void 0) return visitor.toolUse(value.toolUse);
return visitor._(value.$unknown[0], value.$unknown[1]);
}, "visit");
})(ContentBlockStart || (ContentBlockStart = {}));
var ModelStreamErrorException = class _ModelStreamErrorException extends BedrockRuntimeServiceException {
static {
__name(this, "ModelStreamErrorException");
}
name = "ModelStreamErrorException";
$fault = "client";
/**
* <p>The original status code.</p>
* @public
*/
originalStatusCode;
/**
* <p>The original message.</p>
* @public
*/
originalMessage;
/**
* @internal
*/
constructor(opts) {
super({
name: "ModelStreamErrorException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _ModelStreamErrorException.prototype);
this.originalStatusCode = opts.originalStatusCode;
this.originalMessage = opts.originalMessage;
}
};
var ConverseStreamOutput;
((ConverseStreamOutput3) => {
ConverseStreamOutput3.visit = /* @__PURE__ */ __name((value, visitor) => {
if (value.messageStart !== void 0) return visitor.messageStart(value.messageStart);
if (value.contentBlockStart !== void 0) return visitor.contentBlockStart(value.contentBlockStart);
if (value.contentBlockDelta !== void 0) return visitor.contentBlockDelta(value.contentBlockDelta);
if (value.contentBlockStop !== void 0) return visitor.contentBlockStop(value.contentBlockStop);
if (value.messageStop !== void 0) return visitor.messageStop(value.messageStop);
if (value.metadata !== void 0) return visitor.metadata(value.metadata);
if (value.internalServerException !== void 0)
return visitor.internalServerException(value.internalServerException);
if (value.modelStreamErrorException !== void 0)
return visitor.modelStreamErrorException(value.modelStreamErrorException);
if (value.validationException !== void 0) return visitor.validationException(value.validationException);
if (value.throttlingException !== void 0) return visitor.throttlingException(value.throttlingException);
if (value.serviceUnavailableException !== void 0)
return visitor.serviceUnavailableException(value.serviceUnavailableException);
return visitor._(value.$unknown[0], value.$unknown[1]);
}, "visit");
})(ConverseStreamOutput || (ConverseStreamOutput = {}));
var Trace = {
DISABLED: "DISABLED",
ENABLED: "ENABLED",
ENABLED_FULL: "ENABLED_FULL"
};
var InvokeModelWithBidirectionalStreamInput;
((InvokeModelWithBidirectionalStreamInput2) => {
InvokeModelWithBidirectionalStreamInput2.visit = /* @__PURE__ */ __name((value, visitor) => {
if (value.chunk !== void 0) return visitor.chunk(value.chunk);
return visitor._(value.$unknown[0], value.$unknown[1]);
}, "visit");
})(InvokeModelWithBidirectionalStreamInput || (InvokeModelWithBidirectionalStreamInput = {}));
var InvokeModelWithBidirectionalStreamOutput;
((InvokeModelWithBidirectionalStreamOutput3) => {
InvokeModelWithBidirectionalStreamOutput3.visit = /* @__PURE__ */ __name((value, visitor) => {
if (value.chunk !== void 0) return visitor.chunk(value.chunk);
if (value.internalServerException !== void 0)
return visitor.internalServerException(value.internalServerException);
if (value.modelStreamErrorException !== void 0)
return visitor.modelStreamErrorException(value.modelStreamErrorException);
if (value.validationException !== void 0) return visitor.validationException(value.validationException);
if (value.throttlingException !== void 0) return visitor.throttlingException(value.throttlingException);
if (value.modelTimeoutException !== void 0) return visitor.modelTimeoutException(value.modelTimeoutException);
if (value.serviceUnavailableException !== void 0)
return visitor.serviceUnavailableException(value.serviceUnavailableException);
return visitor._(value.$unknown[0], value.$unknown[1]);
}, "visit");
})(InvokeModelWithBidirectionalStreamOutput || (InvokeModelWithBidirectionalStreamOutput = {}));
var ResponseStream;
((ResponseStream3) => {
ResponseStream3.visit = /* @__PURE__ */ __name((value, visitor) => {
if (value.chunk !== void 0) return visitor.chunk(value.chunk);
if (value.internalServerException !== void 0)
return visitor.internalServerException(value.internalServerException);
if (value.modelStreamErrorException !== void 0)
return visitor.modelStreamErrorException(value.modelStreamErrorException);
if (value.validationException !== void 0) return visitor.validationException(value.validationException);
if (value.throttlingException !== void 0) return visitor.throttlingException(value.throttlingException);
if (value.modelTimeoutException !== void 0) return visitor.modelTimeoutException(value.modelTimeoutException);
if (value.serviceUnavailableException !== void 0)
return visitor.serviceUnavailableException(value.serviceUnavailableException);
return visitor._(value.$unknown[0], value.$unknown[1]);
}, "visit");
})(ResponseStream || (ResponseStream = {}));
var GetAsyncInvokeResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.failureMessage && { failureMessage: import_smithy_client.SENSITIVE_STRING },
...obj.outputDataConfig && { outputDataConfig: obj.outputDataConfig }
}), "GetAsyncInvokeResponseFilterSensitiveLog");
var AsyncInvokeSummaryFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.failureMessage && { failureMessage: import_smithy_client.SENSITIVE_STRING },
...obj.outputDataConfig && { outputDataConfig: obj.outputDataConfig }
}), "AsyncInvokeSummaryFilterSensitiveLog");
var ListAsyncInvokesResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.asyncInvokeSummaries && {
asyncInvokeSummaries: obj.asyncInvokeSummaries.map((item) => AsyncInvokeSummaryFilterSensitiveLog(item))
}
}), "ListAsyncInvokesResponseFilterSensitiveLog");
var StartAsyncInvokeRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.modelInput && { modelInput: import_smithy_client.SENSITIVE_STRING },
...obj.outputDataConfig && { outputDataConfig: obj.outputDataConfig }
}), "StartAsyncInvokeRequestFilterSensitiveLog");
var GuardrailImageSourceFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
if (obj.bytes !== void 0) return { bytes: obj.bytes };
if (obj.$unknown !== void 0) return { [obj.$unknown[0]]: "UNKNOWN" };
}, "GuardrailImageSourceFilterSensitiveLog");
var GuardrailImageBlockFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.source && { source: import_smithy_client.SENSITIVE_STRING }
}), "GuardrailImageBlockFilterSensitiveLog");
var GuardrailContentBlockFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
if (obj.text !== void 0) return { text: obj.text };
if (obj.image !== void 0) return { image: import_smithy_client.SENSITIVE_STRING };
if (obj.$unknown !== void 0) return { [obj.$unknown[0]]: "UNKNOWN" };
}, "GuardrailContentBlockFilterSensitiveLog");
var ApplyGuardrailRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.content && { content: obj.content.map((item) => GuardrailContentBlockFilterSensitiveLog(item)) }
}), "ApplyGuardrailRequestFilterSensitiveLog");
var GuardrailConverseImageSourceFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
if (obj.bytes !== void 0) return { bytes: obj.bytes };
if (obj.$unknown !== void 0) return { [obj.$unknown[0]]: "UNKNOWN" };
}, "GuardrailConverseImageSourceFilterSensitiveLog");
var GuardrailConverseImageBlockFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.source && { source: import_smithy_client.SENSITIVE_STRING }
}), "GuardrailConverseImageBlockFilterSensitiveLog");
var GuardrailConverseContentBlockFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
if (obj.text !== void 0) return { text: obj.text };
if (obj.image !== void 0) return { image: import_smithy_client.SENSITIVE_STRING };
if (obj.$unknown !== void 0) return { [obj.$unknown[0]]: "UNKNOWN" };
}, "GuardrailConverseContentBlockFilterSensitiveLog");
var ReasoningTextBlockFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj
}), "ReasoningTextBlockFilterSensitiveLog");
var ReasoningContentBlockFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
if (obj.reasoningText !== void 0) return { reasoningText: import_smithy_client.SENSITIVE_STRING };
if (obj.redactedContent !== void 0) return { redactedContent: obj.redactedContent };
if (obj.$unknown !== void 0) return { [obj.$unknown[0]]: "UNKNOWN" };
}, "ReasoningContentBlockFilterSensitiveLog");
var ContentBlockFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
if (obj.text !== void 0) return { text: obj.text };
if (obj.image !== void 0) return { image: obj.image };
if (obj.document !== void 0) return { document: obj.document };
if (obj.video !== void 0) return { video: obj.video };
if (obj.toolUse !== void 0) return { toolUse: obj.toolUse };
if (obj.toolResult !== void 0) return { toolResult: obj.toolResult };
if (obj.guardContent !== void 0)
return { guardContent: GuardrailConverseContentBlockFilterSensitiveLog(obj.guardContent) };
if (obj.cachePoint !== void 0) return { cachePoint: obj.cachePoint };
if (obj.reasoningContent !== void 0) return { reasoningContent: import_smithy_client.SENSITIVE_STRING };
if (obj.$unknown !== void 0) return { [obj.$unknown[0]]: "UNKNOWN" };
}, "ContentBlockFilterSensitiveLog");
var MessageFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.content && { content: obj.content.map((item) => ContentBlockFilterSensitiveLog(item)) }
}), "MessageFilterSensitiveLog");
var SystemContentBlockFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
if (obj.text !== void 0) return { text: obj.text };
if (obj.guardContent !== void 0)
return { guardContent: GuardrailConverseContentBlockFilterSensitiveLog(obj.guardContent) };
if (obj.cachePoint !== void 0) return { cachePoint: obj.cachePoint };
if (obj.$unknown !== void 0) return { [obj.$unknown[0]]: "UNKNOWN" };
}, "SystemContentBlockFilterSensitiveLog");
var ConverseRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.messages && { messages: obj.messages.map((item) => MessageFilterSensitiveLog(item)) },
...obj.system && { system: obj.system.map((item) => SystemContentBlockFilterSensitiveLog(item)) },
...obj.toolConfig && { toolConfig: obj.toolConfig },
...obj.promptVariables && { promptVariables: import_smithy_client.SENSITIVE_STRING },
...obj.requestMetadata && { requestMetadata: import_smithy_client.SENSITIVE_STRING }
}), "ConverseRequestFilterSensitiveLog");
var ConverseOutputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
if (obj.message !== void 0) return { message: MessageFilterSensitiveLog(obj.message) };
if (obj.$unknown !== void 0) return { [obj.$unknown[0]]: "UNKNOWN" };
}, "ConverseOutputFilterSensitiveLog");
var ConverseResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.output && { output: ConverseOutputFilterSensitiveLog(obj.output) }
}), "ConverseResponseFilterSensitiveLog");
var ConverseStreamRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.messages && { messages: obj.messages.map((item) => MessageFilterSensitiveLog(item)) },
...obj.system && { system: obj.system.map((item) => SystemContentBlockFilterSensitiveLog(item)) },
...obj.toolConfig && { toolConfig: obj.toolConfig },
...obj.promptVariables && { promptVariables: import_smithy_client.SENSITIVE_STRING },
...obj.requestMetadata && { requestMetadata: import_smithy_client.SENSITIVE_STRING }
}), "ConverseStreamRequestFilterSensitiveLog");
var ReasoningContentBlockDeltaFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
if (obj.text !== void 0) return { text: obj.text };
if (obj.redactedContent !== void 0) return { redactedContent: obj.redactedContent };
if (obj.signature !== void 0) return { signature: obj.signature };
if (obj.$unknown !== void 0) return { [obj.$unknown[0]]: "UNKNOWN" };
}, "ReasoningContentBlockDeltaFilterSensitiveLog");
var ContentBlockDeltaFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
if (obj.text !== void 0) return { text: obj.text };
if (obj.toolUse !== void 0) return { toolUse: obj.toolUse };
if (obj.reasoningContent !== void 0) return { reasoningContent: import_smithy_client.SENSITIVE_STRING };
if (obj.$unknown !== void 0) return { [obj.$unknown[0]]: "UNKNOWN" };
}, "ContentBlockDeltaFilterSensitiveLog");
var ContentBlockDeltaEventFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.delta && { delta: ContentBlockDeltaFilterSensitiveLog(obj.delta) }
}), "ContentBlockDeltaEventFilterSensitiveLog");
var ConverseStreamOutputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
if (obj.messageStart !== void 0) return { messageStart: obj.messageStart };
if (obj.contentBlockStart !== void 0) return { contentBlockStart: obj.contentBlockStart };
if (obj.contentBlockDelta !== void 0)
return { contentBlockDelta: ContentBlockDeltaEventFilterSensitiveLog(obj.contentBlockDelta) };
if (obj.contentBlockStop !== void 0) return { contentBlockStop: obj.contentBlockStop };
if (obj.messageStop !== void 0) return { messageStop: obj.messageStop };
if (obj.metadata !== void 0) return { metadata: obj.metadata };
if (obj.internalServerException !== void 0) return { internalServerException: obj.internalServerException };
if (obj.modelStreamErrorException !== void 0) return { modelStreamErrorException: obj.modelStreamErrorException };
if (obj.validationException !== void 0) return { validationException: obj.validationException };
if (obj.throttlingException !== void 0) return { throttlingException: obj.throttlingException };
if (obj.serviceUnavailableException !== void 0)
return { serviceUnavailableException: obj.serviceUnavailableException };
if (obj.$unknown !== void 0) return { [obj.$unknown[0]]: "UNKNOWN" };
}, "ConverseStreamOutputFilterSensitiveLog");
var ConverseStreamResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.stream && { stream: "STREAMING_CONTENT" }
}), "ConverseStreamResponseFilterSensitiveLog");
var InvokeModelRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.body && { body: import_smithy_client.SENSITIVE_STRING }
}), "InvokeModelRequestFilterSensitiveLog");
var InvokeModelResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.body && { body: import_smithy_client.SENSITIVE_STRING }
}), "InvokeModelResponseFilterSensitiveLog");
var BidirectionalInputPayloadPartFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.bytes && { bytes: import_smithy_client.SENSITIVE_STRING }
}), "BidirectionalInputPayloadPartFilterSensitiveLog");
var InvokeModelWithBidirectionalStreamInputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
if (obj.chunk !== void 0) return { chunk: import_smithy_client.SENSITIVE_STRING };
if (obj.$unknown !== void 0) return { [obj.$unknown[0]]: "UNKNOWN" };
}, "InvokeModelWithBidirectionalStreamInputFilterSensitiveLog");
var InvokeModelWithBidirectionalStreamRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.body && { body: "STREAMING_CONTENT" }
}), "InvokeModelWithBidirectionalStreamRequestF