"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.InvokeModelWithResponseStreamResponseFilterSensitiveLog = exports.ResponseStreamFilterSensitiveLog = exports.PayloadPartFilterSensitiveLog = exports.InvokeModelWithResponseStreamRequestFilterSensitiveLog = exports.InvokeModelResponseFilterSensitiveLog = exports.InvokeModelRequestFilterSensitiveLog = exports.ResponseStream = exports.ModelStreamErrorException = exports.ValidationException = exports.ThrottlingException = exports.ServiceQuotaExceededException = exports.ResourceNotFoundException = exports.ModelTimeoutException = exports.ModelNotReadyException = exports.ModelErrorException = exports.InternalServerException = exports.AccessDeniedException = void 0;
const smithy_client_1 = require("@smithy/smithy-client");
const BedrockRuntimeServiceException_1 = require("./BedrockRuntimeServiceException");
class AccessDeniedException extends BedrockRuntimeServiceException_1.BedrockRuntimeServiceException {
    constructor(opts) {
        super({
            name: "AccessDeniedException",
            $fault: "client",
            ...opts,
        });
        this.name = "AccessDeniedException";
        this.$fault = "client";
        Object.setPrototypeOf(this, AccessDeniedException.prototype);
    }
}
exports.AccessDeniedException = AccessDeniedException;
class InternalServerException extends BedrockRuntimeServiceException_1.BedrockRuntimeServiceException {
    constructor(opts) {
        super({
            name: "InternalServerException",
            $fault: "server",
            ...opts,
        });
        this.name = "InternalServerException";
        this.$fault = "server";
        Object.setPrototypeOf(this, InternalServerException.prototype);
    }
}
exports.InternalServerException = InternalServerException;
class ModelErrorException extends BedrockRuntimeServiceException_1.BedrockRuntimeServiceException {
    constructor(opts) {
        super({
            name: "ModelErrorException",
            $fault: "client",
            ...opts,
        });
        this.name = "ModelErrorException";
        this.$fault = "client";
        Object.setPrototypeOf(this, ModelErrorException.prototype);
        this.originalStatusCode = opts.originalStatusCode;
        this.resourceName = opts.resourceName;
    }
}
exports.ModelErrorException = ModelErrorException;
class ModelNotReadyException extends BedrockRuntimeServiceException_1.BedrockRuntimeServiceException {
    constructor(opts) {
        super({
            name: "ModelNotReadyException",
            $fault: "client",
            ...opts,
        });
        this.name = "ModelNotReadyException";
        this.$fault = "client";
        Object.setPrototypeOf(this, ModelNotReadyException.prototype);
    }
}
exports.ModelNotReadyException = ModelNotReadyException;
class ModelTimeoutException extends BedrockRuntimeServiceException_1.BedrockRuntimeServiceException {
    constructor(opts) {
        super({
            name: "ModelTimeoutException",
            $fault: "client",
            ...opts,
        });
        this.name = "ModelTimeoutException";
        this.$fault = "client";
        Object.setPrototypeOf(this, ModelTimeoutException.prototype);
    }
}
exports.ModelTimeoutException = ModelTimeoutException;
class ResourceNotFoundException extends BedrockRuntimeServiceException_1.BedrockRuntimeServiceException {
    constructor(opts) {
        super({
            name: "ResourceNotFoundException",
            $fault: "client",
            ...opts,
        });
        this.name = "ResourceNotFoundException";
        this.$fault = "client";
        Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
    }
}
exports.ResourceNotFoundException = ResourceNotFoundException;
class ServiceQuotaExceededException extends BedrockRuntimeServiceException_1.BedrockRuntimeServiceException {
    constructor(opts) {
        super({
            name: "ServiceQuotaExceededException",
            $fault: "client",
            ...opts,
        });
        this.name = "ServiceQuotaExceededException";
        this.$fault = "client";
        Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
    }
}
exports.ServiceQuotaExceededException = ServiceQuotaExceededException;
class ThrottlingException extends BedrockRuntimeServiceException_1.BedrockRuntimeServiceException {
    constructor(opts) {
        super({
            name: "ThrottlingException",
            $fault: "client",
            ...opts,
        });
        this.name = "ThrottlingException";
        this.$fault = "client";
        Object.setPrototypeOf(this, ThrottlingException.prototype);
    }
}
exports.ThrottlingException = ThrottlingException;
class ValidationException extends BedrockRuntimeServiceException_1.BedrockRuntimeServiceException {
    constructor(opts) {
        super({
            name: "ValidationException",
            $fault: "client",
            ...opts,
        });
        this.name = "ValidationException";
        this.$fault = "client";
        Object.setPrototypeOf(this, ValidationException.prototype);
    }
}
exports.ValidationException = ValidationException;
class ModelStreamErrorException extends BedrockRuntimeServiceException_1.BedrockRuntimeServiceException {
    constructor(opts) {
        super({
            name: "ModelStreamErrorException",
            $fault: "client",
            ...opts,
        });
        this.name = "ModelStreamErrorException";
        this.$fault = "client";
        Object.setPrototypeOf(this, ModelStreamErrorException.prototype);
        this.originalStatusCode = opts.originalStatusCode;
        this.originalMessage = opts.originalMessage;
    }
}
exports.ModelStreamErrorException = ModelStreamErrorException;
var ResponseStream;
(function (ResponseStream) {
    ResponseStream.visit = (value, visitor) => {
        if (value.chunk !== undefined)
            return visitor.chunk(value.chunk);
        if (value.internalServerException !== undefined)
            return visitor.internalServerException(value.internalServerException);
        if (value.modelStreamErrorException !== undefined)
            return visitor.modelStreamErrorException(value.modelStreamErrorException);
        if (value.validationException !== undefined)
            return visitor.validationException(value.validationException);
        if (value.throttlingException !== undefined)
            return visitor.throttlingException(value.throttlingException);
        return visitor._(value.$unknown[0], value.$unknown[1]);
    };
})(ResponseStream = exports.ResponseStream || (exports.ResponseStream = {}));
const InvokeModelRequestFilterSensitiveLog = (obj) => ({
    ...obj,
    ...(obj.body && { body: smithy_client_1.SENSITIVE_STRING }),
});
exports.InvokeModelRequestFilterSensitiveLog = InvokeModelRequestFilterSensitiveLog;
const InvokeModelResponseFilterSensitiveLog = (obj) => ({
    ...obj,
    ...(obj.body && { body: smithy_client_1.SENSITIVE_STRING }),
});
exports.InvokeModelResponseFilterSensitiveLog = InvokeModelResponseFilterSensitiveLog;
const InvokeModelWithResponseStreamRequestFilterSensitiveLog = (obj) => ({
    ...obj,
    ...(obj.body && { body: smithy_client_1.SENSITIVE_STRING }),
});
exports.InvokeModelWithResponseStreamRequestFilterSensitiveLog = InvokeModelWithResponseStreamRequestFilterSensitiveLog;
const PayloadPartFilterSensitiveLog = (obj) => ({
    ...obj,
    ...(obj.bytes && { bytes: smithy_client_1.SENSITIVE_STRING }),
});
exports.PayloadPartFilterSensitiveLog = PayloadPartFilterSensitiveLog;
const ResponseStreamFilterSensitiveLog = (obj) => {
    if (obj.chunk !== undefined)
        return { chunk: smithy_client_1.SENSITIVE_STRING };
    if (obj.internalServerException !== undefined)
        return { internalServerException: obj.internalServerException };
    if (obj.modelStreamErrorException !== undefined)
        return { modelStreamErrorException: obj.modelStreamErrorException };
    if (obj.validationException !== undefined)
        return { validationException: obj.validationException };
    if (obj.throttlingException !== undefined)
        return { throttlingException: obj.throttlingException };
    if (obj.$unknown !== undefined)
        return { [obj.$unknown[0]]: "UNKNOWN" };
};
exports.ResponseStreamFilterSensitiveLog = ResponseStreamFilterSensitiveLog;
const InvokeModelWithResponseStreamResponseFilterSensitiveLog = (obj) => ({
    ...obj,
    ...(obj.body && { body: "STREAMING_CONTENT" }),
});
exports.InvokeModelWithResponseStreamResponseFilterSensitiveLog = InvokeModelWithResponseStreamResponseFilterSensitiveLog;
