#![allow(clippy::doc_markdown)]
#![allow(clippy::too_many_lines)]
use bytestring::ByteString;
use hyper::StatusCode;
#[derive(Debug, Clone, PartialEq, Eq)]
#[non_exhaustive]
pub enum S3ErrorCode {
AccessControlListNotSupported,
AccessDenied,
AccessPointAlreadyOwnedByYou,
AccountProblem,
AllAccessDisabled,
AmbiguousFieldName,
AmbiguousGrantByEmailAddress,
AuthorizationHeaderMalformed,
AuthorizationQueryParametersError,
BadDigest,
BucketAlreadyExists,
BucketAlreadyOwnedByYou,
BucketHasAccessPointsAttached,
BucketNotEmpty,
Busy,
CSVEscapingRecordDelimiter,
CSVParsingError,
CSVUnescapedQuote,
CastFailed,
ClientTokenConflict,
ColumnTooLong,
ConditionalRequestConflict,
ConnectionClosedByRequester,
CredentialsNotSupported,
CrossLocationLoggingProhibited,
DeviceNotActiveError,
EmptyRequestBody,
EndpointNotFound,
EntityTooLarge,
EntityTooSmall,
EvaluatorBindingDoesNotExist,
EvaluatorInvalidArguments,
EvaluatorInvalidTimestampFormatPattern,
EvaluatorInvalidTimestampFormatPatternSymbol,
EvaluatorInvalidTimestampFormatPatternSymbolForParsing,
EvaluatorInvalidTimestampFormatPatternToken,
EvaluatorLikePatternInvalidEscapeSequence,
EvaluatorNegativeLimit,
EvaluatorTimestampFormatPatternDuplicateFields,
EvaluatorTimestampFormatPatternHourClockAmPmMismatch,
EvaluatorUnterminatedTimestampFormatPatternToken,
ExpiredToken,
ExpressionTooLong,
ExternalEvalException,
IllegalLocationConstraintException,
IllegalSqlFunctionArgument,
IllegalVersioningConfigurationException,
IncompleteBody,
IncorrectEndpoint,
IncorrectNumberOfFilesInPostRequest,
IncorrectSqlFunctionArgumentType,
InlineDataTooLarge,
IntegerOverflow,
InternalError,
InvalidAccessKeyId,
InvalidAccessPoint,
InvalidAccessPointAliasError,
InvalidAddressingHeader,
InvalidArgument,
InvalidBucketAclWithObjectOwnership,
InvalidBucketName,
InvalidBucketOwnerAWSAccountID,
InvalidBucketState,
InvalidCast,
InvalidColumnIndex,
InvalidCompressionFormat,
InvalidDataSource,
InvalidDataType,
InvalidDigest,
InvalidEncryptionAlgorithmError,
InvalidExpressionType,
InvalidFileHeaderInfo,
InvalidHostHeader,
InvalidHttpMethod,
InvalidJsonType,
InvalidKeyPath,
InvalidLocationConstraint,
InvalidObjectState,
InvalidPart,
InvalidPartOrder,
InvalidPayer,
InvalidPolicyDocument,
InvalidQuoteFields,
InvalidRange,
InvalidRegion,
InvalidRequest,
InvalidRequestParameter,
InvalidSOAPRequest,
InvalidScanRange,
InvalidSecurity,
InvalidSessionException,
InvalidSignature,
InvalidStorageClass,
InvalidTableAlias,
InvalidTag,
InvalidTargetBucketForLogging,
InvalidTextEncoding,
InvalidToken,
InvalidURI,
JSONParsingError,
KeyTooLongError,
LexerInvalidChar,
LexerInvalidIONLiteral,
LexerInvalidLiteral,
LexerInvalidOperator,
LikeInvalidInputs,
MalformedACLError,
MalformedPOSTRequest,
MalformedPolicy,
MalformedXML,
MaxMessageLengthExceeded,
MaxOperatorsExceeded,
MaxPostPreDataLengthExceededError,
MetadataTooLarge,
MethodNotAllowed,
MissingAttachment,
MissingAuthenticationToken,
MissingContentLength,
MissingRequestBodyError,
MissingRequiredParameter,
MissingSecurityElement,
MissingSecurityHeader,
MultipleDataSourcesUnsupported,
NoLoggingStatusForKey,
NoSuchAccessPoint,
NoSuchAsyncRequest,
NoSuchBucket,
NoSuchBucketPolicy,
NoSuchCORSConfiguration,
NoSuchKey,
NoSuchLifecycleConfiguration,
NoSuchMultiRegionAccessPoint,
NoSuchObjectLockConfiguration,
NoSuchResource,
NoSuchTagSet,
NoSuchUpload,
NoSuchVersion,
NoSuchWebsiteConfiguration,
NoTransformationDefined,
NotDeviceOwnerError,
NotImplemented,
NotModified,
NotSignedUp,
NumberFormatError,
ObjectLockConfigurationNotFoundError,
ObjectSerializationConflict,
OperationAborted,
OverMaxColumn,
OverMaxParquetBlockSize,
OverMaxRecordSize,
OwnershipControlsNotFoundError,
ParquetParsingError,
ParquetUnsupportedCompressionCodec,
ParseAsteriskIsNotAloneInSelectList,
ParseCannotMixSqbAndWildcardInSelectList,
ParseCastArity,
ParseEmptySelect,
ParseExpected2TokenTypes,
ParseExpectedArgumentDelimiter,
ParseExpectedDatePart,
ParseExpectedExpression,
ParseExpectedIdentForAlias,
ParseExpectedIdentForAt,
ParseExpectedIdentForGroupName,
ParseExpectedKeyword,
ParseExpectedLeftParenAfterCast,
ParseExpectedLeftParenBuiltinFunctionCall,
ParseExpectedLeftParenValueConstructor,
ParseExpectedMember,
ParseExpectedNumber,
ParseExpectedRightParenBuiltinFunctionCall,
ParseExpectedTokenType,
ParseExpectedTypeName,
ParseExpectedWhenClause,
ParseInvalidContextForWildcardInSelectList,
ParseInvalidPathComponent,
ParseInvalidTypeParam,
ParseMalformedJoin,
ParseMissingIdentAfterAt,
ParseNonUnaryAgregateFunctionCall,
ParseSelectMissingFrom,
ParseUnExpectedKeyword,
ParseUnexpectedOperator,
ParseUnexpectedTerm,
ParseUnexpectedToken,
ParseUnknownOperator,
ParseUnsupportedAlias,
ParseUnsupportedCallWithStar,
ParseUnsupportedCase,
ParseUnsupportedCaseClause,
ParseUnsupportedLiteralsGroupBy,
ParseUnsupportedSelect,
ParseUnsupportedSyntax,
ParseUnsupportedToken,
PermanentRedirect,
PermanentRedirectControlError,
PreconditionFailed,
Redirect,
ReplicationConfigurationNotFoundError,
RequestHeaderSectionTooLarge,
RequestIsNotMultiPartContent,
RequestTimeTooSkewed,
RequestTimeout,
RequestTorrentOfBucketError,
ResponseInterrupted,
RestoreAlreadyInProgress,
ServerSideEncryptionConfigurationNotFoundError,
ServiceUnavailable,
SignatureDoesNotMatch,
SlowDown,
TagPolicyException,
TemporaryRedirect,
TokenCodeInvalidError,
TokenRefreshRequired,
TooManyAccessPoints,
TooManyBuckets,
TooManyMultiRegionAccessPointregionsError,
TooManyMultiRegionAccessPoints,
TooManyTags,
TruncatedInput,
UnauthorizedAccess,
UnauthorizedAccessError,
UnexpectedContent,
UnexpectedIPError,
UnrecognizedFormatException,
UnresolvableGrantByEmailAddress,
UnsupportedArgument,
UnsupportedFunction,
UnsupportedParquetType,
UnsupportedRangeHeader,
UnsupportedScanRangeInput,
UnsupportedSignature,
UnsupportedSqlOperation,
UnsupportedSqlStructure,
UnsupportedStorageClass,
UnsupportedSyntax,
UnsupportedTypeForQuerying,
UserKeyMustBeSpecified,
ValueParseFailure,
Custom(ByteString),
}
impl S3ErrorCode {
const STATIC_CODE_LIST: &'static [&'static str] = &[
"AccessControlListNotSupported",
"AccessDenied",
"AccessPointAlreadyOwnedByYou",
"AccountProblem",
"AllAccessDisabled",
"AmbiguousFieldName",
"AmbiguousGrantByEmailAddress",
"AuthorizationHeaderMalformed",
"AuthorizationQueryParametersError",
"BadDigest",
"BucketAlreadyExists",
"BucketAlreadyOwnedByYou",
"BucketHasAccessPointsAttached",
"BucketNotEmpty",
"Busy",
"CSVEscapingRecordDelimiter",
"CSVParsingError",
"CSVUnescapedQuote",
"CastFailed",
"ClientTokenConflict",
"ColumnTooLong",
"ConditionalRequestConflict",
"ConnectionClosedByRequester",
"CredentialsNotSupported",
"CrossLocationLoggingProhibited",
"DeviceNotActiveError",
"EmptyRequestBody",
"EndpointNotFound",
"EntityTooLarge",
"EntityTooSmall",
"EvaluatorBindingDoesNotExist",
"EvaluatorInvalidArguments",
"EvaluatorInvalidTimestampFormatPattern",
"EvaluatorInvalidTimestampFormatPatternSymbol",
"EvaluatorInvalidTimestampFormatPatternSymbolForParsing",
"EvaluatorInvalidTimestampFormatPatternToken",
"EvaluatorLikePatternInvalidEscapeSequence",
"EvaluatorNegativeLimit",
"EvaluatorTimestampFormatPatternDuplicateFields",
"EvaluatorTimestampFormatPatternHourClockAmPmMismatch",
"EvaluatorUnterminatedTimestampFormatPatternToken",
"ExpiredToken",
"ExpressionTooLong",
"ExternalEvalException",
"IllegalLocationConstraintException",
"IllegalSqlFunctionArgument",
"IllegalVersioningConfigurationException",
"IncompleteBody",
"IncorrectEndpoint",
"IncorrectNumberOfFilesInPostRequest",
"IncorrectSqlFunctionArgumentType",
"InlineDataTooLarge",
"IntegerOverflow",
"InternalError",
"InvalidAccessKeyId",
"InvalidAccessPoint",
"InvalidAccessPointAliasError",
"InvalidAddressingHeader",
"InvalidArgument",
"InvalidBucketAclWithObjectOwnership",
"InvalidBucketName",
"InvalidBucketOwnerAWSAccountID",
"InvalidBucketState",
"InvalidCast",
"InvalidColumnIndex",
"InvalidCompressionFormat",
"InvalidDataSource",
"InvalidDataType",
"InvalidDigest",
"InvalidEncryptionAlgorithmError",
"InvalidExpressionType",
"InvalidFileHeaderInfo",
"InvalidHostHeader",
"InvalidHttpMethod",
"InvalidJsonType",
"InvalidKeyPath",
"InvalidLocationConstraint",
"InvalidObjectState",
"InvalidPart",
"InvalidPartOrder",
"InvalidPayer",
"InvalidPolicyDocument",
"InvalidQuoteFields",
"InvalidRange",
"InvalidRegion",
"InvalidRequest",
"InvalidRequestParameter",
"InvalidSOAPRequest",
"InvalidScanRange",
"InvalidSecurity",
"InvalidSessionException",
"InvalidSignature",
"InvalidStorageClass",
"InvalidTableAlias",
"InvalidTag",
"InvalidTargetBucketForLogging",
"InvalidTextEncoding",
"InvalidToken",
"InvalidURI",
"JSONParsingError",
"KeyTooLongError",
"LexerInvalidChar",
"LexerInvalidIONLiteral",
"LexerInvalidLiteral",
"LexerInvalidOperator",
"LikeInvalidInputs",
"MalformedACLError",
"MalformedPOSTRequest",
"MalformedPolicy",
"MalformedXML",
"MaxMessageLengthExceeded",
"MaxOperatorsExceeded",
"MaxPostPreDataLengthExceededError",
"MetadataTooLarge",
"MethodNotAllowed",
"MissingAttachment",
"MissingAuthenticationToken",
"MissingContentLength",
"MissingRequestBodyError",
"MissingRequiredParameter",
"MissingSecurityElement",
"MissingSecurityHeader",
"MultipleDataSourcesUnsupported",
"NoLoggingStatusForKey",
"NoSuchAccessPoint",
"NoSuchAsyncRequest",
"NoSuchBucket",
"NoSuchBucketPolicy",
"NoSuchCORSConfiguration",
"NoSuchKey",
"NoSuchLifecycleConfiguration",
"NoSuchMultiRegionAccessPoint",
"NoSuchObjectLockConfiguration",
"NoSuchResource",
"NoSuchTagSet",
"NoSuchUpload",
"NoSuchVersion",
"NoSuchWebsiteConfiguration",
"NoTransformationDefined",
"NotDeviceOwnerError",
"NotImplemented",
"NotModified",
"NotSignedUp",
"NumberFormatError",
"ObjectLockConfigurationNotFoundError",
"ObjectSerializationConflict",
"OperationAborted",
"OverMaxColumn",
"OverMaxParquetBlockSize",
"OverMaxRecordSize",
"OwnershipControlsNotFoundError",
"ParquetParsingError",
"ParquetUnsupportedCompressionCodec",
"ParseAsteriskIsNotAloneInSelectList",
"ParseCannotMixSqbAndWildcardInSelectList",
"ParseCastArity",
"ParseEmptySelect",
"ParseExpected2TokenTypes",
"ParseExpectedArgumentDelimiter",
"ParseExpectedDatePart",
"ParseExpectedExpression",
"ParseExpectedIdentForAlias",
"ParseExpectedIdentForAt",
"ParseExpectedIdentForGroupName",
"ParseExpectedKeyword",
"ParseExpectedLeftParenAfterCast",
"ParseExpectedLeftParenBuiltinFunctionCall",
"ParseExpectedLeftParenValueConstructor",
"ParseExpectedMember",
"ParseExpectedNumber",
"ParseExpectedRightParenBuiltinFunctionCall",
"ParseExpectedTokenType",
"ParseExpectedTypeName",
"ParseExpectedWhenClause",
"ParseInvalidContextForWildcardInSelectList",
"ParseInvalidPathComponent",
"ParseInvalidTypeParam",
"ParseMalformedJoin",
"ParseMissingIdentAfterAt",
"ParseNonUnaryAgregateFunctionCall",
"ParseSelectMissingFrom",
"ParseUnExpectedKeyword",
"ParseUnexpectedOperator",
"ParseUnexpectedTerm",
"ParseUnexpectedToken",
"ParseUnknownOperator",
"ParseUnsupportedAlias",
"ParseUnsupportedCallWithStar",
"ParseUnsupportedCase",
"ParseUnsupportedCaseClause",
"ParseUnsupportedLiteralsGroupBy",
"ParseUnsupportedSelect",
"ParseUnsupportedSyntax",
"ParseUnsupportedToken",
"PermanentRedirect",
"PermanentRedirectControlError",
"PreconditionFailed",
"Redirect",
"ReplicationConfigurationNotFoundError",
"RequestHeaderSectionTooLarge",
"RequestIsNotMultiPartContent",
"RequestTimeTooSkewed",
"RequestTimeout",
"RequestTorrentOfBucketError",
"ResponseInterrupted",
"RestoreAlreadyInProgress",
"ServerSideEncryptionConfigurationNotFoundError",
"ServiceUnavailable",
"SignatureDoesNotMatch",
"SlowDown",
"TagPolicyException",
"TemporaryRedirect",
"TokenCodeInvalidError",
"TokenRefreshRequired",
"TooManyAccessPoints",
"TooManyBuckets",
"TooManyMultiRegionAccessPointregionsError",
"TooManyMultiRegionAccessPoints",
"TooManyTags",
"TruncatedInput",
"UnauthorizedAccess",
"UnauthorizedAccessError",
"UnexpectedContent",
"UnexpectedIPError",
"UnrecognizedFormatException",
"UnresolvableGrantByEmailAddress",
"UnsupportedArgument",
"UnsupportedFunction",
"UnsupportedParquetType",
"UnsupportedRangeHeader",
"UnsupportedScanRangeInput",
"UnsupportedSignature",
"UnsupportedSqlOperation",
"UnsupportedSqlStructure",
"UnsupportedStorageClass",
"UnsupportedSyntax",
"UnsupportedTypeForQuerying",
"UserKeyMustBeSpecified",
"ValueParseFailure",
];
#[must_use]
fn as_enum_tag(&self) -> usize {
match self {
Self::AccessControlListNotSupported => 0,
Self::AccessDenied => 1,
Self::AccessPointAlreadyOwnedByYou => 2,
Self::AccountProblem => 3,
Self::AllAccessDisabled => 4,
Self::AmbiguousFieldName => 5,
Self::AmbiguousGrantByEmailAddress => 6,
Self::AuthorizationHeaderMalformed => 7,
Self::AuthorizationQueryParametersError => 8,
Self::BadDigest => 9,
Self::BucketAlreadyExists => 10,
Self::BucketAlreadyOwnedByYou => 11,
Self::BucketHasAccessPointsAttached => 12,
Self::BucketNotEmpty => 13,
Self::Busy => 14,
Self::CSVEscapingRecordDelimiter => 15,
Self::CSVParsingError => 16,
Self::CSVUnescapedQuote => 17,
Self::CastFailed => 18,
Self::ClientTokenConflict => 19,
Self::ColumnTooLong => 20,
Self::ConditionalRequestConflict => 21,
Self::ConnectionClosedByRequester => 22,
Self::CredentialsNotSupported => 23,
Self::CrossLocationLoggingProhibited => 24,
Self::DeviceNotActiveError => 25,
Self::EmptyRequestBody => 26,
Self::EndpointNotFound => 27,
Self::EntityTooLarge => 28,
Self::EntityTooSmall => 29,
Self::EvaluatorBindingDoesNotExist => 30,
Self::EvaluatorInvalidArguments => 31,
Self::EvaluatorInvalidTimestampFormatPattern => 32,
Self::EvaluatorInvalidTimestampFormatPatternSymbol => 33,
Self::EvaluatorInvalidTimestampFormatPatternSymbolForParsing => 34,
Self::EvaluatorInvalidTimestampFormatPatternToken => 35,
Self::EvaluatorLikePatternInvalidEscapeSequence => 36,
Self::EvaluatorNegativeLimit => 37,
Self::EvaluatorTimestampFormatPatternDuplicateFields => 38,
Self::EvaluatorTimestampFormatPatternHourClockAmPmMismatch => 39,
Self::EvaluatorUnterminatedTimestampFormatPatternToken => 40,
Self::ExpiredToken => 41,
Self::ExpressionTooLong => 42,
Self::ExternalEvalException => 43,
Self::IllegalLocationConstraintException => 44,
Self::IllegalSqlFunctionArgument => 45,
Self::IllegalVersioningConfigurationException => 46,
Self::IncompleteBody => 47,
Self::IncorrectEndpoint => 48,
Self::IncorrectNumberOfFilesInPostRequest => 49,
Self::IncorrectSqlFunctionArgumentType => 50,
Self::InlineDataTooLarge => 51,
Self::IntegerOverflow => 52,
Self::InternalError => 53,
Self::InvalidAccessKeyId => 54,
Self::InvalidAccessPoint => 55,
Self::InvalidAccessPointAliasError => 56,
Self::InvalidAddressingHeader => 57,
Self::InvalidArgument => 58,
Self::InvalidBucketAclWithObjectOwnership => 59,
Self::InvalidBucketName => 60,
Self::InvalidBucketOwnerAWSAccountID => 61,
Self::InvalidBucketState => 62,
Self::InvalidCast => 63,
Self::InvalidColumnIndex => 64,
Self::InvalidCompressionFormat => 65,
Self::InvalidDataSource => 66,
Self::InvalidDataType => 67,
Self::InvalidDigest => 68,
Self::InvalidEncryptionAlgorithmError => 69,
Self::InvalidExpressionType => 70,
Self::InvalidFileHeaderInfo => 71,
Self::InvalidHostHeader => 72,
Self::InvalidHttpMethod => 73,
Self::InvalidJsonType => 74,
Self::InvalidKeyPath => 75,
Self::InvalidLocationConstraint => 76,
Self::InvalidObjectState => 77,
Self::InvalidPart => 78,
Self::InvalidPartOrder => 79,
Self::InvalidPayer => 80,
Self::InvalidPolicyDocument => 81,
Self::InvalidQuoteFields => 82,
Self::InvalidRange => 83,
Self::InvalidRegion => 84,
Self::InvalidRequest => 85,
Self::InvalidRequestParameter => 86,
Self::InvalidSOAPRequest => 87,
Self::InvalidScanRange => 88,
Self::InvalidSecurity => 89,
Self::InvalidSessionException => 90,
Self::InvalidSignature => 91,
Self::InvalidStorageClass => 92,
Self::InvalidTableAlias => 93,
Self::InvalidTag => 94,
Self::InvalidTargetBucketForLogging => 95,
Self::InvalidTextEncoding => 96,
Self::InvalidToken => 97,
Self::InvalidURI => 98,
Self::JSONParsingError => 99,
Self::KeyTooLongError => 100,
Self::LexerInvalidChar => 101,
Self::LexerInvalidIONLiteral => 102,
Self::LexerInvalidLiteral => 103,
Self::LexerInvalidOperator => 104,
Self::LikeInvalidInputs => 105,
Self::MalformedACLError => 106,
Self::MalformedPOSTRequest => 107,
Self::MalformedPolicy => 108,
Self::MalformedXML => 109,
Self::MaxMessageLengthExceeded => 110,
Self::MaxOperatorsExceeded => 111,
Self::MaxPostPreDataLengthExceededError => 112,
Self::MetadataTooLarge => 113,
Self::MethodNotAllowed => 114,
Self::MissingAttachment => 115,
Self::MissingAuthenticationToken => 116,
Self::MissingContentLength => 117,
Self::MissingRequestBodyError => 118,
Self::MissingRequiredParameter => 119,
Self::MissingSecurityElement => 120,
Self::MissingSecurityHeader => 121,
Self::MultipleDataSourcesUnsupported => 122,
Self::NoLoggingStatusForKey => 123,
Self::NoSuchAccessPoint => 124,
Self::NoSuchAsyncRequest => 125,
Self::NoSuchBucket => 126,
Self::NoSuchBucketPolicy => 127,
Self::NoSuchCORSConfiguration => 128,
Self::NoSuchKey => 129,
Self::NoSuchLifecycleConfiguration => 130,
Self::NoSuchMultiRegionAccessPoint => 131,
Self::NoSuchObjectLockConfiguration => 132,
Self::NoSuchResource => 133,
Self::NoSuchTagSet => 134,
Self::NoSuchUpload => 135,
Self::NoSuchVersion => 136,
Self::NoSuchWebsiteConfiguration => 137,
Self::NoTransformationDefined => 138,
Self::NotDeviceOwnerError => 139,
Self::NotImplemented => 140,
Self::NotModified => 141,
Self::NotSignedUp => 142,
Self::NumberFormatError => 143,
Self::ObjectLockConfigurationNotFoundError => 144,
Self::ObjectSerializationConflict => 145,
Self::OperationAborted => 146,
Self::OverMaxColumn => 147,
Self::OverMaxParquetBlockSize => 148,
Self::OverMaxRecordSize => 149,
Self::OwnershipControlsNotFoundError => 150,
Self::ParquetParsingError => 151,
Self::ParquetUnsupportedCompressionCodec => 152,
Self::ParseAsteriskIsNotAloneInSelectList => 153,
Self::ParseCannotMixSqbAndWildcardInSelectList => 154,
Self::ParseCastArity => 155,
Self::ParseEmptySelect => 156,
Self::ParseExpected2TokenTypes => 157,
Self::ParseExpectedArgumentDelimiter => 158,
Self::ParseExpectedDatePart => 159,
Self::ParseExpectedExpression => 160,
Self::ParseExpectedIdentForAlias => 161,
Self::ParseExpectedIdentForAt => 162,
Self::ParseExpectedIdentForGroupName => 163,
Self::ParseExpectedKeyword => 164,
Self::ParseExpectedLeftParenAfterCast => 165,
Self::ParseExpectedLeftParenBuiltinFunctionCall => 166,
Self::ParseExpectedLeftParenValueConstructor => 167,
Self::ParseExpectedMember => 168,
Self::ParseExpectedNumber => 169,
Self::ParseExpectedRightParenBuiltinFunctionCall => 170,
Self::ParseExpectedTokenType => 171,
Self::ParseExpectedTypeName => 172,
Self::ParseExpectedWhenClause => 173,
Self::ParseInvalidContextForWildcardInSelectList => 174,
Self::ParseInvalidPathComponent => 175,
Self::ParseInvalidTypeParam => 176,
Self::ParseMalformedJoin => 177,
Self::ParseMissingIdentAfterAt => 178,
Self::ParseNonUnaryAgregateFunctionCall => 179,
Self::ParseSelectMissingFrom => 180,
Self::ParseUnExpectedKeyword => 181,
Self::ParseUnexpectedOperator => 182,
Self::ParseUnexpectedTerm => 183,
Self::ParseUnexpectedToken => 184,
Self::ParseUnknownOperator => 185,
Self::ParseUnsupportedAlias => 186,
Self::ParseUnsupportedCallWithStar => 187,
Self::ParseUnsupportedCase => 188,
Self::ParseUnsupportedCaseClause => 189,
Self::ParseUnsupportedLiteralsGroupBy => 190,
Self::ParseUnsupportedSelect => 191,
Self::ParseUnsupportedSyntax => 192,
Self::ParseUnsupportedToken => 193,
Self::PermanentRedirect => 194,
Self::PermanentRedirectControlError => 195,
Self::PreconditionFailed => 196,
Self::Redirect => 197,
Self::ReplicationConfigurationNotFoundError => 198,
Self::RequestHeaderSectionTooLarge => 199,
Self::RequestIsNotMultiPartContent => 200,
Self::RequestTimeTooSkewed => 201,
Self::RequestTimeout => 202,
Self::RequestTorrentOfBucketError => 203,
Self::ResponseInterrupted => 204,
Self::RestoreAlreadyInProgress => 205,
Self::ServerSideEncryptionConfigurationNotFoundError => 206,
Self::ServiceUnavailable => 207,
Self::SignatureDoesNotMatch => 208,
Self::SlowDown => 209,
Self::TagPolicyException => 210,
Self::TemporaryRedirect => 211,
Self::TokenCodeInvalidError => 212,
Self::TokenRefreshRequired => 213,
Self::TooManyAccessPoints => 214,
Self::TooManyBuckets => 215,
Self::TooManyMultiRegionAccessPointregionsError => 216,
Self::TooManyMultiRegionAccessPoints => 217,
Self::TooManyTags => 218,
Self::TruncatedInput => 219,
Self::UnauthorizedAccess => 220,
Self::UnauthorizedAccessError => 221,
Self::UnexpectedContent => 222,
Self::UnexpectedIPError => 223,
Self::UnrecognizedFormatException => 224,
Self::UnresolvableGrantByEmailAddress => 225,
Self::UnsupportedArgument => 226,
Self::UnsupportedFunction => 227,
Self::UnsupportedParquetType => 228,
Self::UnsupportedRangeHeader => 229,
Self::UnsupportedScanRangeInput => 230,
Self::UnsupportedSignature => 231,
Self::UnsupportedSqlOperation => 232,
Self::UnsupportedSqlStructure => 233,
Self::UnsupportedStorageClass => 234,
Self::UnsupportedSyntax => 235,
Self::UnsupportedTypeForQuerying => 236,
Self::UserKeyMustBeSpecified => 237,
Self::ValueParseFailure => 238,
Self::Custom(_) => usize::MAX,
}
}
pub(crate) fn as_static_str(&self) -> Option<&'static str> {
Self::STATIC_CODE_LIST.get(self.as_enum_tag()).copied()
}
#[must_use]
pub fn from_bytes(s: &[u8]) -> Option<Self> {
match s {
b"AccessControlListNotSupported" => Some(Self::AccessControlListNotSupported),
b"AccessDenied" => Some(Self::AccessDenied),
b"AccessPointAlreadyOwnedByYou" => Some(Self::AccessPointAlreadyOwnedByYou),
b"AccountProblem" => Some(Self::AccountProblem),
b"AllAccessDisabled" => Some(Self::AllAccessDisabled),
b"AmbiguousFieldName" => Some(Self::AmbiguousFieldName),
b"AmbiguousGrantByEmailAddress" => Some(Self::AmbiguousGrantByEmailAddress),
b"AuthorizationHeaderMalformed" => Some(Self::AuthorizationHeaderMalformed),
b"AuthorizationQueryParametersError" => Some(Self::AuthorizationQueryParametersError),
b"BadDigest" => Some(Self::BadDigest),
b"BucketAlreadyExists" => Some(Self::BucketAlreadyExists),
b"BucketAlreadyOwnedByYou" => Some(Self::BucketAlreadyOwnedByYou),
b"BucketHasAccessPointsAttached" => Some(Self::BucketHasAccessPointsAttached),
b"BucketNotEmpty" => Some(Self::BucketNotEmpty),
b"Busy" => Some(Self::Busy),
b"CSVEscapingRecordDelimiter" => Some(Self::CSVEscapingRecordDelimiter),
b"CSVParsingError" => Some(Self::CSVParsingError),
b"CSVUnescapedQuote" => Some(Self::CSVUnescapedQuote),
b"CastFailed" => Some(Self::CastFailed),
b"ClientTokenConflict" => Some(Self::ClientTokenConflict),
b"ColumnTooLong" => Some(Self::ColumnTooLong),
b"ConditionalRequestConflict" => Some(Self::ConditionalRequestConflict),
b"ConnectionClosedByRequester" => Some(Self::ConnectionClosedByRequester),
b"CredentialsNotSupported" => Some(Self::CredentialsNotSupported),
b"CrossLocationLoggingProhibited" => Some(Self::CrossLocationLoggingProhibited),
b"DeviceNotActiveError" => Some(Self::DeviceNotActiveError),
b"EmptyRequestBody" => Some(Self::EmptyRequestBody),
b"EndpointNotFound" => Some(Self::EndpointNotFound),
b"EntityTooLarge" => Some(Self::EntityTooLarge),
b"EntityTooSmall" => Some(Self::EntityTooSmall),
b"EvaluatorBindingDoesNotExist" => Some(Self::EvaluatorBindingDoesNotExist),
b"EvaluatorInvalidArguments" => Some(Self::EvaluatorInvalidArguments),
b"EvaluatorInvalidTimestampFormatPattern" => Some(Self::EvaluatorInvalidTimestampFormatPattern),
b"EvaluatorInvalidTimestampFormatPatternSymbol" => Some(Self::EvaluatorInvalidTimestampFormatPatternSymbol),
b"EvaluatorInvalidTimestampFormatPatternSymbolForParsing" => {
Some(Self::EvaluatorInvalidTimestampFormatPatternSymbolForParsing)
}
b"EvaluatorInvalidTimestampFormatPatternToken" => Some(Self::EvaluatorInvalidTimestampFormatPatternToken),
b"EvaluatorLikePatternInvalidEscapeSequence" => Some(Self::EvaluatorLikePatternInvalidEscapeSequence),
b"EvaluatorNegativeLimit" => Some(Self::EvaluatorNegativeLimit),
b"EvaluatorTimestampFormatPatternDuplicateFields" => Some(Self::EvaluatorTimestampFormatPatternDuplicateFields),
b"EvaluatorTimestampFormatPatternHourClockAmPmMismatch" => {
Some(Self::EvaluatorTimestampFormatPatternHourClockAmPmMismatch)
}
b"EvaluatorUnterminatedTimestampFormatPatternToken" => Some(Self::EvaluatorUnterminatedTimestampFormatPatternToken),
b"ExpiredToken" => Some(Self::ExpiredToken),
b"ExpressionTooLong" => Some(Self::ExpressionTooLong),
b"ExternalEvalException" => Some(Self::ExternalEvalException),
b"IllegalLocationConstraintException" => Some(Self::IllegalLocationConstraintException),
b"IllegalSqlFunctionArgument" => Some(Self::IllegalSqlFunctionArgument),
b"IllegalVersioningConfigurationException" => Some(Self::IllegalVersioningConfigurationException),
b"IncompleteBody" => Some(Self::IncompleteBody),
b"IncorrectEndpoint" => Some(Self::IncorrectEndpoint),
b"IncorrectNumberOfFilesInPostRequest" => Some(Self::IncorrectNumberOfFilesInPostRequest),
b"IncorrectSqlFunctionArgumentType" => Some(Self::IncorrectSqlFunctionArgumentType),
b"InlineDataTooLarge" => Some(Self::InlineDataTooLarge),
b"IntegerOverflow" => Some(Self::IntegerOverflow),
b"InternalError" => Some(Self::InternalError),
b"InvalidAccessKeyId" => Some(Self::InvalidAccessKeyId),
b"InvalidAccessPoint" => Some(Self::InvalidAccessPoint),
b"InvalidAccessPointAliasError" => Some(Self::InvalidAccessPointAliasError),
b"InvalidAddressingHeader" => Some(Self::InvalidAddressingHeader),
b"InvalidArgument" => Some(Self::InvalidArgument),
b"InvalidBucketAclWithObjectOwnership" => Some(Self::InvalidBucketAclWithObjectOwnership),
b"InvalidBucketName" => Some(Self::InvalidBucketName),
b"InvalidBucketOwnerAWSAccountID" => Some(Self::InvalidBucketOwnerAWSAccountID),
b"InvalidBucketState" => Some(Self::InvalidBucketState),
b"InvalidCast" => Some(Self::InvalidCast),
b"InvalidColumnIndex" => Some(Self::InvalidColumnIndex),
b"InvalidCompressionFormat" => Some(Self::InvalidCompressionFormat),
b"InvalidDataSource" => Some(Self::InvalidDataSource),
b"InvalidDataType" => Some(Self::InvalidDataType),
b"InvalidDigest" => Some(Self::InvalidDigest),
b"InvalidEncryptionAlgorithmError" => Some(Self::InvalidEncryptionAlgorithmError),
b"InvalidExpressionType" => Some(Self::InvalidExpressionType),
b"InvalidFileHeaderInfo" => Some(Self::InvalidFileHeaderInfo),
b"InvalidHostHeader" => Some(Self::InvalidHostHeader),
b"InvalidHttpMethod" => Some(Self::InvalidHttpMethod),
b"InvalidJsonType" => Some(Self::InvalidJsonType),
b"InvalidKeyPath" => Some(Self::InvalidKeyPath),
b"InvalidLocationConstraint" => Some(Self::InvalidLocationConstraint),
b"InvalidObjectState" => Some(Self::InvalidObjectState),
b"InvalidPart" => Some(Self::InvalidPart),
b"InvalidPartOrder" => Some(Self::InvalidPartOrder),
b"InvalidPayer" => Some(Self::InvalidPayer),
b"InvalidPolicyDocument" => Some(Self::InvalidPolicyDocument),
b"InvalidQuoteFields" => Some(Self::InvalidQuoteFields),
b"InvalidRange" => Some(Self::InvalidRange),
b"InvalidRegion" => Some(Self::InvalidRegion),
b"InvalidRequest" => Some(Self::InvalidRequest),
b"InvalidRequestParameter" => Some(Self::InvalidRequestParameter),
b"InvalidSOAPRequest" => Some(Self::InvalidSOAPRequest),
b"InvalidScanRange" => Some(Self::InvalidScanRange),
b"InvalidSecurity" => Some(Self::InvalidSecurity),
b"InvalidSessionException" => Some(Self::InvalidSessionException),
b"InvalidSignature" => Some(Self::InvalidSignature),
b"InvalidStorageClass" => Some(Self::InvalidStorageClass),
b"InvalidTableAlias" => Some(Self::InvalidTableAlias),
b"InvalidTag" => Some(Self::InvalidTag),
b"InvalidTargetBucketForLogging" => Some(Self::InvalidTargetBucketForLogging),
b"InvalidTextEncoding" => Some(Self::InvalidTextEncoding),
b"InvalidToken" => Some(Self::InvalidToken),
b"InvalidURI" => Some(Self::InvalidURI),
b"JSONParsingError" => Some(Self::JSONParsingError),
b"KeyTooLongError" => Some(Self::KeyTooLongError),
b"LexerInvalidChar" => Some(Self::LexerInvalidChar),
b"LexerInvalidIONLiteral" => Some(Self::LexerInvalidIONLiteral),
b"LexerInvalidLiteral" => Some(Self::LexerInvalidLiteral),
b"LexerInvalidOperator" => Some(Self::LexerInvalidOperator),
b"LikeInvalidInputs" => Some(Self::LikeInvalidInputs),
b"MalformedACLError" => Some(Self::MalformedACLError),
b"MalformedPOSTRequest" => Some(Self::MalformedPOSTRequest),
b"MalformedPolicy" => Some(Self::MalformedPolicy),
b"MalformedXML" => Some(Self::MalformedXML),
b"MaxMessageLengthExceeded" => Some(Self::MaxMessageLengthExceeded),
b"MaxOperatorsExceeded" => Some(Self::MaxOperatorsExceeded),
b"MaxPostPreDataLengthExceededError" => Some(Self::MaxPostPreDataLengthExceededError),
b"MetadataTooLarge" => Some(Self::MetadataTooLarge),
b"MethodNotAllowed" => Some(Self::MethodNotAllowed),
b"MissingAttachment" => Some(Self::MissingAttachment),
b"MissingAuthenticationToken" => Some(Self::MissingAuthenticationToken),
b"MissingContentLength" => Some(Self::MissingContentLength),
b"MissingRequestBodyError" => Some(Self::MissingRequestBodyError),
b"MissingRequiredParameter" => Some(Self::MissingRequiredParameter),
b"MissingSecurityElement" => Some(Self::MissingSecurityElement),
b"MissingSecurityHeader" => Some(Self::MissingSecurityHeader),
b"MultipleDataSourcesUnsupported" => Some(Self::MultipleDataSourcesUnsupported),
b"NoLoggingStatusForKey" => Some(Self::NoLoggingStatusForKey),
b"NoSuchAccessPoint" => Some(Self::NoSuchAccessPoint),
b"NoSuchAsyncRequest" => Some(Self::NoSuchAsyncRequest),
b"NoSuchBucket" => Some(Self::NoSuchBucket),
b"NoSuchBucketPolicy" => Some(Self::NoSuchBucketPolicy),
b"NoSuchCORSConfiguration" => Some(Self::NoSuchCORSConfiguration),
b"NoSuchKey" => Some(Self::NoSuchKey),
b"NoSuchLifecycleConfiguration" => Some(Self::NoSuchLifecycleConfiguration),
b"NoSuchMultiRegionAccessPoint" => Some(Self::NoSuchMultiRegionAccessPoint),
b"NoSuchObjectLockConfiguration" => Some(Self::NoSuchObjectLockConfiguration),
b"NoSuchResource" => Some(Self::NoSuchResource),
b"NoSuchTagSet" => Some(Self::NoSuchTagSet),
b"NoSuchUpload" => Some(Self::NoSuchUpload),
b"NoSuchVersion" => Some(Self::NoSuchVersion),
b"NoSuchWebsiteConfiguration" => Some(Self::NoSuchWebsiteConfiguration),
b"NoTransformationDefined" => Some(Self::NoTransformationDefined),
b"NotDeviceOwnerError" => Some(Self::NotDeviceOwnerError),
b"NotImplemented" => Some(Self::NotImplemented),
b"NotModified" => Some(Self::NotModified),
b"NotSignedUp" => Some(Self::NotSignedUp),
b"NumberFormatError" => Some(Self::NumberFormatError),
b"ObjectLockConfigurationNotFoundError" => Some(Self::ObjectLockConfigurationNotFoundError),
b"ObjectSerializationConflict" => Some(Self::ObjectSerializationConflict),
b"OperationAborted" => Some(Self::OperationAborted),
b"OverMaxColumn" => Some(Self::OverMaxColumn),
b"OverMaxParquetBlockSize" => Some(Self::OverMaxParquetBlockSize),
b"OverMaxRecordSize" => Some(Self::OverMaxRecordSize),
b"OwnershipControlsNotFoundError" => Some(Self::OwnershipControlsNotFoundError),
b"ParquetParsingError" => Some(Self::ParquetParsingError),
b"ParquetUnsupportedCompressionCodec" => Some(Self::ParquetUnsupportedCompressionCodec),
b"ParseAsteriskIsNotAloneInSelectList" => Some(Self::ParseAsteriskIsNotAloneInSelectList),
b"ParseCannotMixSqbAndWildcardInSelectList" => Some(Self::ParseCannotMixSqbAndWildcardInSelectList),
b"ParseCastArity" => Some(Self::ParseCastArity),
b"ParseEmptySelect" => Some(Self::ParseEmptySelect),
b"ParseExpected2TokenTypes" => Some(Self::ParseExpected2TokenTypes),
b"ParseExpectedArgumentDelimiter" => Some(Self::ParseExpectedArgumentDelimiter),
b"ParseExpectedDatePart" => Some(Self::ParseExpectedDatePart),
b"ParseExpectedExpression" => Some(Self::ParseExpectedExpression),
b"ParseExpectedIdentForAlias" => Some(Self::ParseExpectedIdentForAlias),
b"ParseExpectedIdentForAt" => Some(Self::ParseExpectedIdentForAt),
b"ParseExpectedIdentForGroupName" => Some(Self::ParseExpectedIdentForGroupName),
b"ParseExpectedKeyword" => Some(Self::ParseExpectedKeyword),
b"ParseExpectedLeftParenAfterCast" => Some(Self::ParseExpectedLeftParenAfterCast),
b"ParseExpectedLeftParenBuiltinFunctionCall" => Some(Self::ParseExpectedLeftParenBuiltinFunctionCall),
b"ParseExpectedLeftParenValueConstructor" => Some(Self::ParseExpectedLeftParenValueConstructor),
b"ParseExpectedMember" => Some(Self::ParseExpectedMember),
b"ParseExpectedNumber" => Some(Self::ParseExpectedNumber),
b"ParseExpectedRightParenBuiltinFunctionCall" => Some(Self::ParseExpectedRightParenBuiltinFunctionCall),
b"ParseExpectedTokenType" => Some(Self::ParseExpectedTokenType),
b"ParseExpectedTypeName" => Some(Self::ParseExpectedTypeName),
b"ParseExpectedWhenClause" => Some(Self::ParseExpectedWhenClause),
b"ParseInvalidContextForWildcardInSelectList" => Some(Self::ParseInvalidContextForWildcardInSelectList),
b"ParseInvalidPathComponent" => Some(Self::ParseInvalidPathComponent),
b"ParseInvalidTypeParam" => Some(Self::ParseInvalidTypeParam),
b"ParseMalformedJoin" => Some(Self::ParseMalformedJoin),
b"ParseMissingIdentAfterAt" => Some(Self::ParseMissingIdentAfterAt),
b"ParseNonUnaryAgregateFunctionCall" => Some(Self::ParseNonUnaryAgregateFunctionCall),
b"ParseSelectMissingFrom" => Some(Self::ParseSelectMissingFrom),
b"ParseUnExpectedKeyword" => Some(Self::ParseUnExpectedKeyword),
b"ParseUnexpectedOperator" => Some(Self::ParseUnexpectedOperator),
b"ParseUnexpectedTerm" => Some(Self::ParseUnexpectedTerm),
b"ParseUnexpectedToken" => Some(Self::ParseUnexpectedToken),
b"ParseUnknownOperator" => Some(Self::ParseUnknownOperator),
b"ParseUnsupportedAlias" => Some(Self::ParseUnsupportedAlias),
b"ParseUnsupportedCallWithStar" => Some(Self::ParseUnsupportedCallWithStar),
b"ParseUnsupportedCase" => Some(Self::ParseUnsupportedCase),
b"ParseUnsupportedCaseClause" => Some(Self::ParseUnsupportedCaseClause),
b"ParseUnsupportedLiteralsGroupBy" => Some(Self::ParseUnsupportedLiteralsGroupBy),
b"ParseUnsupportedSelect" => Some(Self::ParseUnsupportedSelect),
b"ParseUnsupportedSyntax" => Some(Self::ParseUnsupportedSyntax),
b"ParseUnsupportedToken" => Some(Self::ParseUnsupportedToken),
b"PermanentRedirect" => Some(Self::PermanentRedirect),
b"PermanentRedirectControlError" => Some(Self::PermanentRedirectControlError),
b"PreconditionFailed" => Some(Self::PreconditionFailed),
b"Redirect" => Some(Self::Redirect),
b"ReplicationConfigurationNotFoundError" => Some(Self::ReplicationConfigurationNotFoundError),
b"RequestHeaderSectionTooLarge" => Some(Self::RequestHeaderSectionTooLarge),
b"RequestIsNotMultiPartContent" => Some(Self::RequestIsNotMultiPartContent),
b"RequestTimeTooSkewed" => Some(Self::RequestTimeTooSkewed),
b"RequestTimeout" => Some(Self::RequestTimeout),
b"RequestTorrentOfBucketError" => Some(Self::RequestTorrentOfBucketError),
b"ResponseInterrupted" => Some(Self::ResponseInterrupted),
b"RestoreAlreadyInProgress" => Some(Self::RestoreAlreadyInProgress),
b"ServerSideEncryptionConfigurationNotFoundError" => Some(Self::ServerSideEncryptionConfigurationNotFoundError),
b"ServiceUnavailable" => Some(Self::ServiceUnavailable),
b"SignatureDoesNotMatch" => Some(Self::SignatureDoesNotMatch),
b"SlowDown" => Some(Self::SlowDown),
b"TagPolicyException" => Some(Self::TagPolicyException),
b"TemporaryRedirect" => Some(Self::TemporaryRedirect),
b"TokenCodeInvalidError" => Some(Self::TokenCodeInvalidError),
b"TokenRefreshRequired" => Some(Self::TokenRefreshRequired),
b"TooManyAccessPoints" => Some(Self::TooManyAccessPoints),
b"TooManyBuckets" => Some(Self::TooManyBuckets),
b"TooManyMultiRegionAccessPointregionsError" => Some(Self::TooManyMultiRegionAccessPointregionsError),
b"TooManyMultiRegionAccessPoints" => Some(Self::TooManyMultiRegionAccessPoints),
b"TooManyTags" => Some(Self::TooManyTags),
b"TruncatedInput" => Some(Self::TruncatedInput),
b"UnauthorizedAccess" => Some(Self::UnauthorizedAccess),
b"UnauthorizedAccessError" => Some(Self::UnauthorizedAccessError),
b"UnexpectedContent" => Some(Self::UnexpectedContent),
b"UnexpectedIPError" => Some(Self::UnexpectedIPError),
b"UnrecognizedFormatException" => Some(Self::UnrecognizedFormatException),
b"UnresolvableGrantByEmailAddress" => Some(Self::UnresolvableGrantByEmailAddress),
b"UnsupportedArgument" => Some(Self::UnsupportedArgument),
b"UnsupportedFunction" => Some(Self::UnsupportedFunction),
b"UnsupportedParquetType" => Some(Self::UnsupportedParquetType),
b"UnsupportedRangeHeader" => Some(Self::UnsupportedRangeHeader),
b"UnsupportedScanRangeInput" => Some(Self::UnsupportedScanRangeInput),
b"UnsupportedSignature" => Some(Self::UnsupportedSignature),
b"UnsupportedSqlOperation" => Some(Self::UnsupportedSqlOperation),
b"UnsupportedSqlStructure" => Some(Self::UnsupportedSqlStructure),
b"UnsupportedStorageClass" => Some(Self::UnsupportedStorageClass),
b"UnsupportedSyntax" => Some(Self::UnsupportedSyntax),
b"UnsupportedTypeForQuerying" => Some(Self::UnsupportedTypeForQuerying),
b"UserKeyMustBeSpecified" => Some(Self::UserKeyMustBeSpecified),
b"ValueParseFailure" => Some(Self::ValueParseFailure),
_ => std::str::from_utf8(s).ok().map(|s| Self::Custom(s.into())),
}
}
#[allow(clippy::match_same_arms)]
#[must_use]
pub fn status_code(&self) -> Option<StatusCode> {
match self {
Self::AccessControlListNotSupported => Some(StatusCode::BAD_REQUEST),
Self::AccessDenied => Some(StatusCode::FORBIDDEN),
Self::AccessPointAlreadyOwnedByYou => Some(StatusCode::CONFLICT),
Self::AccountProblem => Some(StatusCode::FORBIDDEN),
Self::AllAccessDisabled => Some(StatusCode::FORBIDDEN),
Self::AmbiguousFieldName => Some(StatusCode::BAD_REQUEST),
Self::AmbiguousGrantByEmailAddress => Some(StatusCode::BAD_REQUEST),
Self::AuthorizationHeaderMalformed => Some(StatusCode::BAD_REQUEST),
Self::AuthorizationQueryParametersError => Some(StatusCode::BAD_REQUEST),
Self::BadDigest => Some(StatusCode::BAD_REQUEST),
Self::BucketAlreadyExists => Some(StatusCode::CONFLICT),
Self::BucketAlreadyOwnedByYou => Some(StatusCode::CONFLICT),
Self::BucketHasAccessPointsAttached => Some(StatusCode::BAD_REQUEST),
Self::BucketNotEmpty => Some(StatusCode::CONFLICT),
Self::Busy => Some(StatusCode::SERVICE_UNAVAILABLE),
Self::CSVEscapingRecordDelimiter => Some(StatusCode::BAD_REQUEST),
Self::CSVParsingError => Some(StatusCode::BAD_REQUEST),
Self::CSVUnescapedQuote => Some(StatusCode::BAD_REQUEST),
Self::CastFailed => Some(StatusCode::BAD_REQUEST),
Self::ClientTokenConflict => Some(StatusCode::CONFLICT),
Self::ColumnTooLong => Some(StatusCode::BAD_REQUEST),
Self::ConditionalRequestConflict => Some(StatusCode::CONFLICT),
Self::ConnectionClosedByRequester => Some(StatusCode::BAD_REQUEST),
Self::CredentialsNotSupported => Some(StatusCode::BAD_REQUEST),
Self::CrossLocationLoggingProhibited => Some(StatusCode::FORBIDDEN),
Self::DeviceNotActiveError => Some(StatusCode::BAD_REQUEST),
Self::EmptyRequestBody => Some(StatusCode::BAD_REQUEST),
Self::EndpointNotFound => Some(StatusCode::BAD_REQUEST),
Self::EntityTooLarge => Some(StatusCode::BAD_REQUEST),
Self::EntityTooSmall => Some(StatusCode::BAD_REQUEST),
Self::EvaluatorBindingDoesNotExist => Some(StatusCode::BAD_REQUEST),
Self::EvaluatorInvalidArguments => Some(StatusCode::BAD_REQUEST),
Self::EvaluatorInvalidTimestampFormatPattern => Some(StatusCode::BAD_REQUEST),
Self::EvaluatorInvalidTimestampFormatPatternSymbol => Some(StatusCode::BAD_REQUEST),
Self::EvaluatorInvalidTimestampFormatPatternSymbolForParsing => Some(StatusCode::BAD_REQUEST),
Self::EvaluatorInvalidTimestampFormatPatternToken => Some(StatusCode::BAD_REQUEST),
Self::EvaluatorLikePatternInvalidEscapeSequence => Some(StatusCode::BAD_REQUEST),
Self::EvaluatorNegativeLimit => Some(StatusCode::BAD_REQUEST),
Self::EvaluatorTimestampFormatPatternDuplicateFields => Some(StatusCode::BAD_REQUEST),
Self::EvaluatorTimestampFormatPatternHourClockAmPmMismatch => Some(StatusCode::BAD_REQUEST),
Self::EvaluatorUnterminatedTimestampFormatPatternToken => Some(StatusCode::BAD_REQUEST),
Self::ExpiredToken => Some(StatusCode::BAD_REQUEST),
Self::ExpressionTooLong => Some(StatusCode::BAD_REQUEST),
Self::ExternalEvalException => Some(StatusCode::BAD_REQUEST),
Self::IllegalLocationConstraintException => Some(StatusCode::BAD_REQUEST),
Self::IllegalSqlFunctionArgument => Some(StatusCode::BAD_REQUEST),
Self::IllegalVersioningConfigurationException => Some(StatusCode::BAD_REQUEST),
Self::IncompleteBody => Some(StatusCode::BAD_REQUEST),
Self::IncorrectEndpoint => Some(StatusCode::BAD_REQUEST),
Self::IncorrectNumberOfFilesInPostRequest => Some(StatusCode::BAD_REQUEST),
Self::IncorrectSqlFunctionArgumentType => Some(StatusCode::BAD_REQUEST),
Self::InlineDataTooLarge => Some(StatusCode::BAD_REQUEST),
Self::IntegerOverflow => Some(StatusCode::BAD_REQUEST),
Self::InternalError => Some(StatusCode::INTERNAL_SERVER_ERROR),
Self::InvalidAccessKeyId => Some(StatusCode::FORBIDDEN),
Self::InvalidAccessPoint => Some(StatusCode::BAD_REQUEST),
Self::InvalidAccessPointAliasError => Some(StatusCode::BAD_REQUEST),
Self::InvalidAddressingHeader => None,
Self::InvalidArgument => Some(StatusCode::BAD_REQUEST),
Self::InvalidBucketAclWithObjectOwnership => Some(StatusCode::BAD_REQUEST),
Self::InvalidBucketName => Some(StatusCode::BAD_REQUEST),
Self::InvalidBucketOwnerAWSAccountID => Some(StatusCode::BAD_REQUEST),
Self::InvalidBucketState => Some(StatusCode::CONFLICT),
Self::InvalidCast => Some(StatusCode::BAD_REQUEST),
Self::InvalidColumnIndex => Some(StatusCode::BAD_REQUEST),
Self::InvalidCompressionFormat => Some(StatusCode::BAD_REQUEST),
Self::InvalidDataSource => Some(StatusCode::BAD_REQUEST),
Self::InvalidDataType => Some(StatusCode::BAD_REQUEST),
Self::InvalidDigest => Some(StatusCode::BAD_REQUEST),
Self::InvalidEncryptionAlgorithmError => Some(StatusCode::BAD_REQUEST),
Self::InvalidExpressionType => Some(StatusCode::BAD_REQUEST),
Self::InvalidFileHeaderInfo => Some(StatusCode::BAD_REQUEST),
Self::InvalidHostHeader => Some(StatusCode::BAD_REQUEST),
Self::InvalidHttpMethod => Some(StatusCode::BAD_REQUEST),
Self::InvalidJsonType => Some(StatusCode::BAD_REQUEST),
Self::InvalidKeyPath => Some(StatusCode::BAD_REQUEST),
Self::InvalidLocationConstraint => Some(StatusCode::BAD_REQUEST),
Self::InvalidObjectState => Some(StatusCode::FORBIDDEN),
Self::InvalidPart => Some(StatusCode::BAD_REQUEST),
Self::InvalidPartOrder => Some(StatusCode::BAD_REQUEST),
Self::InvalidPayer => Some(StatusCode::FORBIDDEN),
Self::InvalidPolicyDocument => Some(StatusCode::BAD_REQUEST),
Self::InvalidQuoteFields => Some(StatusCode::BAD_REQUEST),
Self::InvalidRange => Some(StatusCode::RANGE_NOT_SATISFIABLE),
Self::InvalidRegion => Some(StatusCode::FORBIDDEN),
Self::InvalidRequest => Some(StatusCode::BAD_REQUEST),
Self::InvalidRequestParameter => Some(StatusCode::BAD_REQUEST),
Self::InvalidSOAPRequest => Some(StatusCode::BAD_REQUEST),
Self::InvalidScanRange => Some(StatusCode::BAD_REQUEST),
Self::InvalidSecurity => Some(StatusCode::FORBIDDEN),
Self::InvalidSessionException => Some(StatusCode::BAD_REQUEST),
Self::InvalidSignature => Some(StatusCode::BAD_REQUEST),
Self::InvalidStorageClass => Some(StatusCode::BAD_REQUEST),
Self::InvalidTableAlias => Some(StatusCode::BAD_REQUEST),
Self::InvalidTag => Some(StatusCode::BAD_REQUEST),
Self::InvalidTargetBucketForLogging => Some(StatusCode::BAD_REQUEST),
Self::InvalidTextEncoding => Some(StatusCode::BAD_REQUEST),
Self::InvalidToken => Some(StatusCode::BAD_REQUEST),
Self::InvalidURI => Some(StatusCode::BAD_REQUEST),
Self::JSONParsingError => Some(StatusCode::BAD_REQUEST),
Self::KeyTooLongError => Some(StatusCode::BAD_REQUEST),
Self::LexerInvalidChar => Some(StatusCode::BAD_REQUEST),
Self::LexerInvalidIONLiteral => Some(StatusCode::BAD_REQUEST),
Self::LexerInvalidLiteral => Some(StatusCode::BAD_REQUEST),
Self::LexerInvalidOperator => Some(StatusCode::BAD_REQUEST),
Self::LikeInvalidInputs => Some(StatusCode::BAD_REQUEST),
Self::MalformedACLError => Some(StatusCode::BAD_REQUEST),
Self::MalformedPOSTRequest => Some(StatusCode::BAD_REQUEST),
Self::MalformedPolicy => Some(StatusCode::BAD_REQUEST),
Self::MalformedXML => Some(StatusCode::BAD_REQUEST),
Self::MaxMessageLengthExceeded => Some(StatusCode::BAD_REQUEST),
Self::MaxOperatorsExceeded => Some(StatusCode::BAD_REQUEST),
Self::MaxPostPreDataLengthExceededError => Some(StatusCode::BAD_REQUEST),
Self::MetadataTooLarge => Some(StatusCode::BAD_REQUEST),
Self::MethodNotAllowed => Some(StatusCode::METHOD_NOT_ALLOWED),
Self::MissingAttachment => None,
Self::MissingAuthenticationToken => Some(StatusCode::FORBIDDEN),
Self::MissingContentLength => Some(StatusCode::LENGTH_REQUIRED),
Self::MissingRequestBodyError => Some(StatusCode::BAD_REQUEST),
Self::MissingRequiredParameter => Some(StatusCode::BAD_REQUEST),
Self::MissingSecurityElement => Some(StatusCode::BAD_REQUEST),
Self::MissingSecurityHeader => Some(StatusCode::BAD_REQUEST),
Self::MultipleDataSourcesUnsupported => Some(StatusCode::BAD_REQUEST),
Self::NoLoggingStatusForKey => Some(StatusCode::BAD_REQUEST),
Self::NoSuchAccessPoint => Some(StatusCode::NOT_FOUND),
Self::NoSuchAsyncRequest => Some(StatusCode::NOT_FOUND),
Self::NoSuchBucket => Some(StatusCode::NOT_FOUND),
Self::NoSuchBucketPolicy => Some(StatusCode::NOT_FOUND),
Self::NoSuchCORSConfiguration => Some(StatusCode::NOT_FOUND),
Self::NoSuchKey => Some(StatusCode::NOT_FOUND),
Self::NoSuchLifecycleConfiguration => Some(StatusCode::NOT_FOUND),
Self::NoSuchMultiRegionAccessPoint => Some(StatusCode::NOT_FOUND),
Self::NoSuchObjectLockConfiguration => Some(StatusCode::NOT_FOUND),
Self::NoSuchResource => Some(StatusCode::NOT_FOUND),
Self::NoSuchTagSet => Some(StatusCode::NOT_FOUND),
Self::NoSuchUpload => Some(StatusCode::NOT_FOUND),
Self::NoSuchVersion => Some(StatusCode::NOT_FOUND),
Self::NoSuchWebsiteConfiguration => Some(StatusCode::NOT_FOUND),
Self::NoTransformationDefined => Some(StatusCode::NOT_FOUND),
Self::NotDeviceOwnerError => Some(StatusCode::BAD_REQUEST),
Self::NotImplemented => Some(StatusCode::NOT_IMPLEMENTED),
Self::NotModified => Some(StatusCode::NOT_MODIFIED),
Self::NotSignedUp => Some(StatusCode::FORBIDDEN),
Self::NumberFormatError => Some(StatusCode::BAD_REQUEST),
Self::ObjectLockConfigurationNotFoundError => Some(StatusCode::NOT_FOUND),
Self::ObjectSerializationConflict => Some(StatusCode::BAD_REQUEST),
Self::OperationAborted => Some(StatusCode::CONFLICT),
Self::OverMaxColumn => Some(StatusCode::BAD_REQUEST),
Self::OverMaxParquetBlockSize => Some(StatusCode::BAD_REQUEST),
Self::OverMaxRecordSize => Some(StatusCode::BAD_REQUEST),
Self::OwnershipControlsNotFoundError => Some(StatusCode::NOT_FOUND),
Self::ParquetParsingError => Some(StatusCode::BAD_REQUEST),
Self::ParquetUnsupportedCompressionCodec => Some(StatusCode::BAD_REQUEST),
Self::ParseAsteriskIsNotAloneInSelectList => Some(StatusCode::BAD_REQUEST),
Self::ParseCannotMixSqbAndWildcardInSelectList => Some(StatusCode::BAD_REQUEST),
Self::ParseCastArity => Some(StatusCode::BAD_REQUEST),
Self::ParseEmptySelect => Some(StatusCode::BAD_REQUEST),
Self::ParseExpected2TokenTypes => Some(StatusCode::BAD_REQUEST),
Self::ParseExpectedArgumentDelimiter => Some(StatusCode::BAD_REQUEST),
Self::ParseExpectedDatePart => Some(StatusCode::BAD_REQUEST),
Self::ParseExpectedExpression => Some(StatusCode::BAD_REQUEST),
Self::ParseExpectedIdentForAlias => Some(StatusCode::BAD_REQUEST),
Self::ParseExpectedIdentForAt => Some(StatusCode::BAD_REQUEST),
Self::ParseExpectedIdentForGroupName => Some(StatusCode::BAD_REQUEST),
Self::ParseExpectedKeyword => Some(StatusCode::BAD_REQUEST),
Self::ParseExpectedLeftParenAfterCast => Some(StatusCode::BAD_REQUEST),
Self::ParseExpectedLeftParenBuiltinFunctionCall => Some(StatusCode::BAD_REQUEST),
Self::ParseExpectedLeftParenValueConstructor => Some(StatusCode::BAD_REQUEST),
Self::ParseExpectedMember => Some(StatusCode::BAD_REQUEST),
Self::ParseExpectedNumber => Some(StatusCode::BAD_REQUEST),
Self::ParseExpectedRightParenBuiltinFunctionCall => Some(StatusCode::BAD_REQUEST),
Self::ParseExpectedTokenType => Some(StatusCode::BAD_REQUEST),
Self::ParseExpectedTypeName => Some(StatusCode::BAD_REQUEST),
Self::ParseExpectedWhenClause => Some(StatusCode::BAD_REQUEST),
Self::ParseInvalidContextForWildcardInSelectList => Some(StatusCode::BAD_REQUEST),
Self::ParseInvalidPathComponent => Some(StatusCode::BAD_REQUEST),
Self::ParseInvalidTypeParam => Some(StatusCode::BAD_REQUEST),
Self::ParseMalformedJoin => Some(StatusCode::BAD_REQUEST),
Self::ParseMissingIdentAfterAt => Some(StatusCode::BAD_REQUEST),
Self::ParseNonUnaryAgregateFunctionCall => Some(StatusCode::BAD_REQUEST),
Self::ParseSelectMissingFrom => Some(StatusCode::BAD_REQUEST),
Self::ParseUnExpectedKeyword => Some(StatusCode::BAD_REQUEST),
Self::ParseUnexpectedOperator => Some(StatusCode::BAD_REQUEST),
Self::ParseUnexpectedTerm => Some(StatusCode::BAD_REQUEST),
Self::ParseUnexpectedToken => Some(StatusCode::BAD_REQUEST),
Self::ParseUnknownOperator => Some(StatusCode::BAD_REQUEST),
Self::ParseUnsupportedAlias => Some(StatusCode::BAD_REQUEST),
Self::ParseUnsupportedCallWithStar => Some(StatusCode::BAD_REQUEST),
Self::ParseUnsupportedCase => Some(StatusCode::BAD_REQUEST),
Self::ParseUnsupportedCaseClause => Some(StatusCode::BAD_REQUEST),
Self::ParseUnsupportedLiteralsGroupBy => Some(StatusCode::BAD_REQUEST),
Self::ParseUnsupportedSelect => Some(StatusCode::BAD_REQUEST),
Self::ParseUnsupportedSyntax => Some(StatusCode::BAD_REQUEST),
Self::ParseUnsupportedToken => Some(StatusCode::BAD_REQUEST),
Self::PermanentRedirect => Some(StatusCode::MOVED_PERMANENTLY),
Self::PermanentRedirectControlError => Some(StatusCode::MOVED_PERMANENTLY),
Self::PreconditionFailed => Some(StatusCode::PRECONDITION_FAILED),
Self::Redirect => Some(StatusCode::TEMPORARY_REDIRECT),
Self::ReplicationConfigurationNotFoundError => Some(StatusCode::NOT_FOUND),
Self::RequestHeaderSectionTooLarge => Some(StatusCode::BAD_REQUEST),
Self::RequestIsNotMultiPartContent => Some(StatusCode::BAD_REQUEST),
Self::RequestTimeTooSkewed => Some(StatusCode::FORBIDDEN),
Self::RequestTimeout => Some(StatusCode::BAD_REQUEST),
Self::RequestTorrentOfBucketError => Some(StatusCode::BAD_REQUEST),
Self::ResponseInterrupted => Some(StatusCode::BAD_REQUEST),
Self::RestoreAlreadyInProgress => Some(StatusCode::CONFLICT),
Self::ServerSideEncryptionConfigurationNotFoundError => Some(StatusCode::BAD_REQUEST),
Self::ServiceUnavailable => Some(StatusCode::SERVICE_UNAVAILABLE),
Self::SignatureDoesNotMatch => Some(StatusCode::FORBIDDEN),
Self::SlowDown => Some(StatusCode::SERVICE_UNAVAILABLE),
Self::TagPolicyException => Some(StatusCode::BAD_REQUEST),
Self::TemporaryRedirect => Some(StatusCode::TEMPORARY_REDIRECT),
Self::TokenCodeInvalidError => Some(StatusCode::BAD_REQUEST),
Self::TokenRefreshRequired => Some(StatusCode::BAD_REQUEST),
Self::TooManyAccessPoints => Some(StatusCode::BAD_REQUEST),
Self::TooManyBuckets => Some(StatusCode::BAD_REQUEST),
Self::TooManyMultiRegionAccessPointregionsError => Some(StatusCode::BAD_REQUEST),
Self::TooManyMultiRegionAccessPoints => Some(StatusCode::BAD_REQUEST),
Self::TooManyTags => Some(StatusCode::BAD_REQUEST),
Self::TruncatedInput => Some(StatusCode::BAD_REQUEST),
Self::UnauthorizedAccess => Some(StatusCode::UNAUTHORIZED),
Self::UnauthorizedAccessError => Some(StatusCode::FORBIDDEN),
Self::UnexpectedContent => Some(StatusCode::BAD_REQUEST),
Self::UnexpectedIPError => Some(StatusCode::FORBIDDEN),
Self::UnrecognizedFormatException => Some(StatusCode::BAD_REQUEST),
Self::UnresolvableGrantByEmailAddress => Some(StatusCode::BAD_REQUEST),
Self::UnsupportedArgument => Some(StatusCode::BAD_REQUEST),
Self::UnsupportedFunction => Some(StatusCode::BAD_REQUEST),
Self::UnsupportedParquetType => Some(StatusCode::BAD_REQUEST),
Self::UnsupportedRangeHeader => Some(StatusCode::BAD_REQUEST),
Self::UnsupportedScanRangeInput => Some(StatusCode::BAD_REQUEST),
Self::UnsupportedSignature => Some(StatusCode::BAD_REQUEST),
Self::UnsupportedSqlOperation => Some(StatusCode::BAD_REQUEST),
Self::UnsupportedSqlStructure => Some(StatusCode::BAD_REQUEST),
Self::UnsupportedStorageClass => Some(StatusCode::BAD_REQUEST),
Self::UnsupportedSyntax => Some(StatusCode::BAD_REQUEST),
Self::UnsupportedTypeForQuerying => Some(StatusCode::BAD_REQUEST),
Self::UserKeyMustBeSpecified => Some(StatusCode::BAD_REQUEST),
Self::ValueParseFailure => Some(StatusCode::BAD_REQUEST),
Self::Custom(_) => None,
}
}
}