//! Auto generated by `s3s_codegen::v1::error::codegen`

#![allow(clippy::doc_markdown)]
#![allow(clippy::too_many_lines)]

use bytestring::ByteString;
use hyper::StatusCode;

// 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

#[derive(Debug, Clone, PartialEq, Eq)]
#[non_exhaustive]
pub enum S3ErrorCode {
    /// The bucket does not allow ACLs.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    AccessControlListNotSupported,

    /// Access Denied
    ///
    /// HTTP Status Code: 403 Forbidden
    ///
    AccessDenied,

    /// An access point with an identical name already exists in your account.
    ///
    /// HTTP Status Code: 409 Conflict
    ///
    AccessPointAlreadyOwnedByYou,

    /// There is a problem with your Amazon Web Services account that prevents the action from completing successfully. Contact Amazon Web Services Support for further assistance.
    ///
    /// HTTP Status Code: 403 Forbidden
    ///
    AccountProblem,

    /// All access to this Amazon S3 resource has been disabled. Contact Amazon Web Services Support for further assistance.
    ///
    /// HTTP Status Code: 403 Forbidden
    ///
    AllAccessDisabled,

    /// The field name matches to multiple fields in the file. Check the SQL expression and the file, and try again.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    AmbiguousFieldName,

    /// The email address you provided is associated with more than one account.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    AmbiguousGrantByEmailAddress,

    /// The authorization header you provided is invalid.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    AuthorizationHeaderMalformed,

    /// The authorization query parameters that you provided are not valid.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    AuthorizationQueryParametersError,

    /// The Content-MD5 you specified did not match what we received.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    BadDigest,

    /// The requested bucket name is not available. The bucket namespace is shared by all users of the system. Please select a different name and try again.
    ///
    /// HTTP Status Code: 409 Conflict
    ///
    BucketAlreadyExists,

    /// The bucket you tried to create already exists, and you own it. Amazon S3 returns this error in all Amazon Web Services Regions except in the North Virginia Region. For legacy compatibility, if you re-create an existing bucket that you already own in the North Virginia Region, Amazon S3 returns 200 OK and resets the bucket access control lists (ACLs).
    ///
    /// HTTP Status Code: 409 Conflict
    ///
    BucketAlreadyOwnedByYou,

    /// The bucket you tried to delete has access points attached. Delete your access points before deleting your bucket.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    BucketHasAccessPointsAttached,

    /// The bucket you tried to delete is not empty.
    ///
    /// HTTP Status Code: 409 Conflict
    ///
    BucketNotEmpty,

    /// The service is unavailable. Try again later.
    ///
    /// HTTP Status Code: 503 Service Unavailable
    ///
    Busy,

    /// A quoted record delimiter was found in the file. To allow quoted record delimiters, set AllowQuotedRecordDelimiter to 'TRUE'.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    CSVEscapingRecordDelimiter,

    /// An error occurred while parsing the CSV file. Check the file and try again.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    CSVParsingError,

    /// An unescaped quote was found while parsing the CSV file. To allow quoted record delimiters, set AllowQuotedRecordDelimiter to 'TRUE'.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    CSVUnescapedQuote,

    /// An attempt to convert from one data type to another using CAST failed in the SQL expression.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    CastFailed,

    /// Your Multi-Region Access Point idempotency token was already used for a different request.
    ///
    /// HTTP Status Code: 409 Conflict
    ///
    ClientTokenConflict,

    /// The length of a column in the result is greater than maxCharsPerColumn of 1 MB.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    ColumnTooLong,

    /// A conflicting operation occurred. If using PutObject you can retry the request. If using multipart upload you should initiate another CreateMultipartUpload request and re-upload each part.
    ///
    /// HTTP Status Code: 409 Conflict
    ///
    ConditionalRequestConflict,

    /// Returned to the original caller when an error is encountered while reading the WriteGetObjectResponse body.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    ConnectionClosedByRequester,

    /// This request does not support credentials.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    CredentialsNotSupported,

    /// Cross-location logging not allowed. Buckets in one geographic location cannot log information to a bucket in another location.
    ///
    /// HTTP Status Code: 403 Forbidden
    ///
    CrossLocationLoggingProhibited,

    /// The device is not currently active.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    DeviceNotActiveError,

    /// The request body cannot be empty.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    EmptyRequestBody,

    /// Direct requests to the correct endpoint.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    EndpointNotFound,

    /// Your proposed upload exceeds the maximum allowed object size.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    EntityTooLarge,

    /// Your proposed upload is smaller than the minimum allowed object size.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    EntityTooSmall,

    /// A column name or a path provided does not exist in the SQL expression.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    EvaluatorBindingDoesNotExist,

    /// There is an incorrect number of arguments in the function call in the SQL expression.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    EvaluatorInvalidArguments,

    /// The timestamp format string in the SQL expression is not valid.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    EvaluatorInvalidTimestampFormatPattern,

    /// The timestamp format pattern contains a symbol in the SQL expression that is not valid.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    EvaluatorInvalidTimestampFormatPatternSymbol,

    /// The timestamp format pattern contains a valid format symbol that cannot be applied to timestamp parsing in the SQL expression.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    EvaluatorInvalidTimestampFormatPatternSymbolForParsing,

    /// The timestamp format pattern contains a token in the SQL expression that is not valid.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    EvaluatorInvalidTimestampFormatPatternToken,

    /// An argument given to the LIKE expression was not valid.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    EvaluatorLikePatternInvalidEscapeSequence,

    /// LIMIT must not be negative.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    EvaluatorNegativeLimit,

    /// The timestamp format pattern contains multiple format specifiers representing the timestamp field in the SQL expression.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    EvaluatorTimestampFormatPatternDuplicateFields,

    /// The timestamp format pattern contains a 12-hour hour of day format symbol but doesn't also contain an AM/PM field, or it contains a 24-hour hour of day format specifier and contains an AM/PM field in the SQL expression.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    EvaluatorTimestampFormatPatternHourClockAmPmMismatch,

    /// The timestamp format pattern contains an unterminated token in the SQL expression.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    EvaluatorUnterminatedTimestampFormatPatternToken,

    /// The provided token has expired.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    ExpiredToken,

    /// The SQL expression is too long. The maximum byte-length for an SQL expression is 256 KB.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    ExpressionTooLong,

    /// The query cannot be evaluated. Check the file and try again.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    ExternalEvalException,

    /// This error might occur for the following reasons:
    ///
    ///
    /// You are trying to access a bucket from a different Region than where the bucket exists.
    ///
    /// You attempt to create a bucket with a location constraint that corresponds to a different region than the regional endpoint the request was sent to.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    IllegalLocationConstraintException,

    /// An illegal argument was used in the SQL function.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    IllegalSqlFunctionArgument,

    /// Indicates that the versioning configuration specified in the request is invalid.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    IllegalVersioningConfigurationException,

    /// You did not provide the number of bytes specified by the Content-Length HTTP header
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    IncompleteBody,

    /// The specified bucket exists in another Region. Direct requests to the correct endpoint.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    IncorrectEndpoint,

    /// POST requires exactly one file upload per request.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    IncorrectNumberOfFilesInPostRequest,

    /// An incorrect argument type was specified in a function call in the SQL expression.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    IncorrectSqlFunctionArgumentType,

    /// Inline data exceeds the maximum allowed size.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    InlineDataTooLarge,

    /// An integer overflow or underflow occurred in the SQL expression.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    IntegerOverflow,

    /// We encountered an internal error. Please try again.
    ///
    /// HTTP Status Code: 500 Internal Server Error
    ///
    InternalError,

    /// The Amazon Web Services access key ID you provided does not exist in our records.
    ///
    /// HTTP Status Code: 403 Forbidden
    ///
    InvalidAccessKeyId,

    /// The specified access point name or account is not valid.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    InvalidAccessPoint,

    /// The specified access point alias name is not valid.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    InvalidAccessPointAliasError,

    /// You must specify the Anonymous role.
    ///
    InvalidAddressingHeader,

    /// Invalid Argument
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    InvalidArgument,

    /// Bucket cannot have ACLs set with ObjectOwnership's BucketOwnerEnforced setting.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    InvalidBucketAclWithObjectOwnership,

    /// The specified bucket is not valid.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    InvalidBucketName,

    /// The value of the expected bucket owner parameter must be an AWS account ID.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    InvalidBucketOwnerAWSAccountID,

    /// The request is not valid with the current state of the bucket.
    ///
    /// HTTP Status Code: 409 Conflict
    ///
    InvalidBucketState,

    /// An attempt to convert from one data type to another using CAST failed in the SQL expression.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    InvalidCast,

    /// The column index in the SQL expression is not valid.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    InvalidColumnIndex,

    /// The file is not in a supported compression format. Only GZIP and BZIP2 are supported.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    InvalidCompressionFormat,

    /// The data source type is not valid. Only CSV, JSON, and Parquet are supported.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    InvalidDataSource,

    /// The SQL expression contains a data type that is not valid.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    InvalidDataType,

    /// The Content-MD5 you specified is not valid.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    InvalidDigest,

    /// The encryption request you specified is not valid. The valid value is AES256.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    InvalidEncryptionAlgorithmError,

    /// The ExpressionType value is not valid. Only SQL expressions are supported.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    InvalidExpressionType,

    /// The FileHeaderInfo value is not valid. Only NONE, USE, and IGNORE are supported.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    InvalidFileHeaderInfo,

    /// The host headers provided in the request used the incorrect style addressing.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    InvalidHostHeader,

    /// The request is made using an unexpected HTTP method.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    InvalidHttpMethod,

    /// The JsonType value is not valid. Only DOCUMENT and LINES are supported.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    InvalidJsonType,

    /// The key path in the SQL expression is not valid.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    InvalidKeyPath,

    /// The specified location constraint is not valid. For more information about Regions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.html#access-bucket-intro">How to Select a Region for Your Buckets</a>.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    InvalidLocationConstraint,

    /// The action is not valid for the current state of the object.
    ///
    /// HTTP Status Code: 403 Forbidden
    ///
    InvalidObjectState,

    /// One or more of the specified parts could not be found. The part might not have been uploaded, or the specified entity tag might not have matched the part's entity tag.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    InvalidPart,

    /// The list of parts was not in ascending order. Parts list must be specified in order by part number.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    InvalidPartOrder,

    /// All access to this object has been disabled. Please contact Amazon Web Services Support for further assistance.
    ///
    /// HTTP Status Code: 403 Forbidden
    ///
    InvalidPayer,

    /// The content of the form does not meet the conditions specified in the policy document.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    InvalidPolicyDocument,

    /// The QuoteFields value is not valid. Only ALWAYS and ASNEEDED are supported.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    InvalidQuoteFields,

    /// The requested range cannot be satisfied.
    ///
    /// HTTP Status Code: 416 Requested Range NotSatisfiable
    ///
    InvalidRange,

    /// You've attempted to create a Multi-Region Access Point in a Region that you haven't opted in to.
    ///
    /// HTTP Status Code: 403 Forbidden
    ///
    InvalidRegion,

    /// + Please use <code>AWS4-HMAC-SHA256</code>.
    /// + SOAP requests must be made over an HTTPS connection.
    /// + Amazon S3 Transfer Acceleration is not supported for buckets with non-DNS compliant names.
    /// + Amazon S3 Transfer Acceleration is not supported for buckets with periods (.) in their names.
    /// + Amazon S3 Transfer Accelerate endpoint only supports virtual style requests.
    /// + Amazon S3 Transfer Accelerate is not configured on this bucket.
    /// + Amazon S3 Transfer Accelerate is disabled on this bucket.
    /// + Amazon S3 Transfer Acceleration is not supported on this bucket. Contact Amazon Web Services Support for more information.
    /// + Amazon S3 Transfer Acceleration cannot be enabled on this bucket. Contact Amazon Web Services Support for more information.
    ///
    /// HTTP Status Code: 400 Bad Request
    InvalidRequest,

    /// The value of a parameter in the SelectRequest element is not valid. Check the service API documentation and try again.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    InvalidRequestParameter,

    /// The SOAP request body is invalid.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    InvalidSOAPRequest,

    /// The provided scan range is not valid.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    InvalidScanRange,

    /// The provided security credentials are not valid.
    ///
    /// HTTP Status Code: 403 Forbidden
    ///
    InvalidSecurity,

    /// Returned if the session doesn't exist anymore because it timed out or expired.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    InvalidSessionException,

    /// The request signature that the server calculated does not match the signature that you provided. Check your AWS secret access key and signing method. For more information, see Signing and authenticating REST requests.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    InvalidSignature,

    /// The storage class you specified is not valid.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    InvalidStorageClass,

    /// The SQL expression contains a table alias that is not valid.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    InvalidTableAlias,

    /// Your request contains tag input that is not valid. For example, your request might contain duplicate keys, keys or values that are too long, or system tags.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    InvalidTag,

    /// The target bucket for logging does not exist, is not owned by you, or does not have the appropriate grants for the log-delivery group.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    InvalidTargetBucketForLogging,

    /// The encoding type is not valid. Only UTF-8 encoding is supported.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    InvalidTextEncoding,

    /// The provided token is malformed or otherwise invalid.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    InvalidToken,

    /// Couldn't parse the specified URI.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    InvalidURI,

    /// An error occurred while parsing the JSON file. Check the file and try again.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    JSONParsingError,

    /// Your key is too long.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    KeyTooLongError,

    /// The SQL expression contains a character that is not valid.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    LexerInvalidChar,

    /// The SQL expression contains an operator that is not valid.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    LexerInvalidIONLiteral,

    /// The SQL expression contains an operator that is not valid.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    LexerInvalidLiteral,

    /// The SQL expression contains a literal that is not valid.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    LexerInvalidOperator,

    /// The argument given to the LIKE clause in the SQL expression is not valid.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    LikeInvalidInputs,

    /// The XML you provided was not well-formed or did not validate against our published schema.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    MalformedACLError,

    /// The body of your POST request is not well-formed multipart/form-data.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    MalformedPOSTRequest,

    /// Your policy contains a principal that is not valid.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    MalformedPolicy,

    /// This happens when the user sends malformed XML (XML that doesn't conform to the published XSD) for the configuration. The error message is, "The XML you provided was not well-formed or did not validate against our published schema."
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    MalformedXML,

    /// Your request was too big.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    MaxMessageLengthExceeded,

    /// Failed to parse SQL expression, try reducing complexity. For example, reduce number of operators used.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    MaxOperatorsExceeded,

    /// Your POST request fields preceding the upload file were too large.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    MaxPostPreDataLengthExceededError,

    /// Your metadata headers exceed the maximum allowed metadata size.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    MetadataTooLarge,

    /// The specified method is not allowed against this resource.
    ///
    /// HTTP Status Code: 405 Method Not Allowed
    ///
    MethodNotAllowed,

    /// A SOAP attachment was expected, but none were found.
    ///
    MissingAttachment,

    /// The request was not signed.Â
    ///
    /// HTTP Status Code: 403 Forbidden
    ///
    MissingAuthenticationToken,

    /// You must provide the Content-Length HTTP header.
    ///
    /// HTTP Status Code: 411 Length Required
    ///
    MissingContentLength,

    /// This happens when the user sends an empty XML document as a request. The error message is, "Request body is empty."
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    MissingRequestBodyError,

    /// The SelectRequest entity is missing a required parameter. Check the service documentation and try again.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    MissingRequiredParameter,

    /// The SOAP 1.1 request is missing a security element.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    MissingSecurityElement,

    /// Your request is missing a required header.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    MissingSecurityHeader,

    /// Multiple data sources are not supported.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    MultipleDataSourcesUnsupported,

    /// There is no such thing as a logging status subresource for a key.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    NoLoggingStatusForKey,

    /// The specified access point does not exist.
    ///
    /// HTTP Status Code: 404 Not Found
    ///
    NoSuchAccessPoint,

    /// The specified request was not found.
    ///
    /// HTTP Status Code: 404 Not Found
    ///
    NoSuchAsyncRequest,

    /// The specified bucket does not exist.
    ///
    /// HTTP Status Code: 404 Not Found
    ///
    NoSuchBucket,

    /// The specified bucket does not have a bucket policy.
    ///
    /// HTTP Status Code: 404 Not Found
    ///
    NoSuchBucketPolicy,

    /// The specified bucket does not have a CORS configuration.
    ///
    /// HTTP Status Code: 404 Not Found
    ///
    NoSuchCORSConfiguration,

    /// The specified key does not exist.
    ///
    /// HTTP Status Code: 404 Not Found
    ///
    NoSuchKey,

    /// The lifecycle configuration does not exist.
    ///
    /// HTTP Status Code: 404 Not Found
    ///
    NoSuchLifecycleConfiguration,

    /// The specified Multi-Region Access Point does not exist.
    ///
    /// HTTP Status Code: 404 Not Found
    ///
    NoSuchMultiRegionAccessPoint,

    /// The specified object does not have an ObjectLock configuration.
    ///
    /// HTTP Status Code: 404 Not Found
    ///
    NoSuchObjectLockConfiguration,

    /// The specified resource doesn't exist.
    ///
    /// HTTP Status Code: 404 Not Found
    ///
    NoSuchResource,

    /// The specified tag does not exist.
    ///
    /// HTTP Status Code: 404 Not Found
    ///
    NoSuchTagSet,

    /// The specified multipart upload does not exist. The upload ID might be invalid, or the multipart upload might have been aborted or completed.
    ///
    /// HTTP Status Code: 404 Not Found
    ///
    NoSuchUpload,

    /// Indicates that the version ID specified in the request does not match an existing version.
    ///
    /// HTTP Status Code: 404 Not Found
    ///
    NoSuchVersion,

    /// The specified bucket does not have a website configuration.
    ///
    /// HTTP Status Code: 404 Not Found
    ///
    NoSuchWebsiteConfiguration,

    /// No transformation found for this Object Lambda Access Point.
    ///
    /// HTTP Status Code: 404 Not Found
    ///
    NoTransformationDefined,

    /// The device that generated the token is not owned by the authenticated user.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    NotDeviceOwnerError,

    /// A header you provided implies functionality that is not implemented.
    ///
    /// HTTP Status Code: 501 Not Implemented
    ///
    NotImplemented,

    /// The resource was not changed.
    ///
    /// HTTP Status Code: 304 Not Modified
    ///
    NotModified,

    /// Your account is not signed up for the Amazon S3 service. You must sign up before you can use Amazon S3. You can sign up at the following URL: <a href="http://aws.amazon.com/s3">Amazon S3</a>
    ///
    /// HTTP Status Code: 403 Forbidden
    ///
    NotSignedUp,

    /// An error occurred while parsing a number. This error can be caused by underflow or overflow of integers.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    NumberFormatError,

    /// The Object Lock configuration does not exist for this bucket.
    ///
    /// HTTP Status Code: 404 Not Found
    ///
    ObjectLockConfigurationNotFoundError,

    /// InputSerialization specifies more than one format (CSV, JSON, or Parquet), or OutputSerialization specifies more than one format (CSV or JSON). For InputSerialization and OutputSerialization, you can specify only one format for each.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    ObjectSerializationConflict,

    /// A conflicting conditional action is currently in progress against this resource. Try again.
    ///
    /// HTTP Status Code: 409 Conflict
    ///
    OperationAborted,

    /// The number of columns in the result is greater than the maximum allowable number of columns.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    OverMaxColumn,

    /// The Parquet file is above the max row group size.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    OverMaxParquetBlockSize,

    /// The length of a record in the input or result is greater than the maxCharsPerRecord limit of 1 MB.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    OverMaxRecordSize,

    /// The bucket ownership controls were not found.
    ///
    /// HTTP Status Code: 404 Not Found
    ///
    OwnershipControlsNotFoundError,

    /// An error occurred while parsing the Parquet file. Check the file and try again.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    ParquetParsingError,

    /// The specified Parquet compression codec is not supported.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    ParquetUnsupportedCompressionCodec,

    /// Other expressions are not allowed in the SELECT list when * is used without dot notation in the SQL expression.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    ParseAsteriskIsNotAloneInSelectList,

    /// Cannot mix [] and * in the same expression in a SELECT list in the SQL expression.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    ParseCannotMixSqbAndWildcardInSelectList,

    /// The SQL expression CAST has incorrect arity.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    ParseCastArity,

    /// The SQL expression contains an empty SELECT clause.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    ParseEmptySelect,

    /// The expected token in the SQL expression was not found.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    ParseExpected2TokenTypes,

    /// The expected argument delimiter in the SQL expression was not found.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    ParseExpectedArgumentDelimiter,

    /// The expected date part in the SQL expression was not found.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    ParseExpectedDatePart,

    /// The expected SQL expression was not found.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    ParseExpectedExpression,

    /// The expected identifier for the alias in the SQL expression was not found.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    ParseExpectedIdentForAlias,

    /// The expected identifier for AT name in the SQL expression was not found.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    ParseExpectedIdentForAt,

    /// GROUP is not supported in the SQL expression.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    ParseExpectedIdentForGroupName,

    /// The expected keyword in the SQL expression was not found.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    ParseExpectedKeyword,

    /// The expected left parenthesis after CAST in the SQL expression was not found.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    ParseExpectedLeftParenAfterCast,

    /// The expected left parenthesis in the SQL expression was not found.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    ParseExpectedLeftParenBuiltinFunctionCall,

    /// The expected left parenthesis in the SQL expression was not found.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    ParseExpectedLeftParenValueConstructor,

    /// The SQL expression contains an unsupported use of MEMBER.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    ParseExpectedMember,

    /// The expected number in the SQL expression was not found.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    ParseExpectedNumber,

    /// The expected right parenthesis character in the SQL expression was not found.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    ParseExpectedRightParenBuiltinFunctionCall,

    /// The expected token in the SQL expression was not found.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    ParseExpectedTokenType,

    /// The expected type name in the SQL expression was not found.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    ParseExpectedTypeName,

    /// The expected WHEN clause in the SQL expression was not found. CASE is not supported.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    ParseExpectedWhenClause,

    /// The use of * in the SELECT list in the SQL expression is not valid.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    ParseInvalidContextForWildcardInSelectList,

    /// The SQL expression contains a path component that is not valid.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    ParseInvalidPathComponent,

    /// The SQL expression contains a parameter value that is not valid.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    ParseInvalidTypeParam,

    /// JOIN is not supported in the SQL expression.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    ParseMalformedJoin,

    /// The expected identifier after the @ symbol in the SQL expression was not found.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    ParseMissingIdentAfterAt,

    /// Only one argument is supported for aggregate functions in the SQL expression.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    ParseNonUnaryAgregateFunctionCall,

    /// The SQL expression contains a missing FROM after the SELECT list.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    ParseSelectMissingFrom,

    /// The SQL expression contains an unexpected keyword.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    ParseUnExpectedKeyword,

    /// The SQL expression contains an unexpected operator.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    ParseUnexpectedOperator,

    /// The SQL expression contains an unexpected term.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    ParseUnexpectedTerm,

    /// The SQL expression contains an unexpected token.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    ParseUnexpectedToken,

    /// The SQL expression contains an operator that is not valid.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    ParseUnknownOperator,

    /// The SQL expression contains an unsupported use of ALIAS.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    ParseUnsupportedAlias,

    /// Only COUNT with (*) as a parameter is supported in the SQL expression.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    ParseUnsupportedCallWithStar,

    /// The SQL expression contains an unsupported use of CASE.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    ParseUnsupportedCase,

    /// The SQL expression contains an unsupported use of CASE.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    ParseUnsupportedCaseClause,

    /// The SQL expression contains an unsupported use of GROUP BY.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    ParseUnsupportedLiteralsGroupBy,

    /// The SQL expression contains an unsupported use of SELECT.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    ParseUnsupportedSelect,

    /// The SQL expression contains unsupported syntax.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    ParseUnsupportedSyntax,

    /// The SQL expression contains an unsupported token.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    ParseUnsupportedToken,

    /// The bucket you are attempting to access must be addressed using the specified endpoint. Send all future requests to this endpoint.
    ///
    /// HTTP Status Code: 301 Moved Permanently
    ///
    PermanentRedirect,

    /// The API operation you are attempting to access must be addressed using the specified endpoint. Send all future requests to this endpoint.
    ///
    /// HTTP Status Code: 301 Moved Permanently
    ///
    PermanentRedirectControlError,

    /// At least one of the preconditions you specified did not hold.
    ///
    /// HTTP Status Code: 412 Precondition Failed
    ///
    PreconditionFailed,

    /// Temporary redirect.
    ///
    /// HTTP Status Code: 307 Moved Temporarily
    ///
    Redirect,

    /// There is no replication configuration for this bucket.
    ///
    /// HTTP Status Code: 404 Not Found
    ///
    ReplicationConfigurationNotFoundError,

    /// The request header and query parameters used to make the request exceed the maximum allowed size.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    RequestHeaderSectionTooLarge,

    /// Bucket POST must be of the enclosure-type multipart/form-data.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    RequestIsNotMultiPartContent,

    /// The difference between the request time and the server's time is too large.
    ///
    /// HTTP Status Code: 403 Forbidden
    ///
    RequestTimeTooSkewed,

    /// Your socket connection to the server was not read from or written to within the timeout period.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    RequestTimeout,

    /// Requesting the torrent file of a bucket is not permitted.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    RequestTorrentOfBucketError,

    /// Returned to the original caller when an error is encountered while reading the WriteGetObjectResponse body.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    ResponseInterrupted,

    /// Object restore is already in progress.
    ///
    /// HTTP Status Code: 409 Conflict
    ///
    RestoreAlreadyInProgress,

    /// The server-side encryption configuration was not found.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    ServerSideEncryptionConfigurationNotFoundError,

    /// Service is unable to handle request.
    ///
    /// HTTP Status Code: 503 Service Unavailable
    ///
    ServiceUnavailable,

    /// The request signature we calculated does not match the signature you provided. Check your Amazon Web Services secret access key and signing method. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html">REST Authentication</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/SOAPAuthentication.html">SOAP Authentication</a> for details.
    ///
    /// HTTP Status Code: 403 Forbidden
    ///
    SignatureDoesNotMatch,

    /// Reduce your request rate.
    ///
    /// HTTP Status Code: 503 Slow Down
    ///
    SlowDown,

    /// The tag policy does not allow the specified value for the following tag key.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    TagPolicyException,

    /// You are being redirected to the bucket while DNS updates.
    ///
    /// HTTP Status Code: 307 Moved Temporarily
    ///
    TemporaryRedirect,

    /// The serial number and/or token code you provided is not valid.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    TokenCodeInvalidError,

    /// The provided token must be refreshed.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    TokenRefreshRequired,

    /// You have attempted to create more access points than are allowed for an account. For more information, see Amazon Simple Storage Service endpoints and quotas in the AWS General Reference.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    TooManyAccessPoints,

    /// You have attempted to create more buckets than allowed.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    TooManyBuckets,

    /// You have attempted to create a Multi-Region Access Point with more Regions than are allowed for an account. For more information, see Amazon Simple Storage Service endpoints and quotas in the AWS General Reference.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    TooManyMultiRegionAccessPointregionsError,

    /// You have attempted to create more Multi-Region Access Points than are allowed for an account. For more information, see Amazon Simple Storage Service endpoints and quotas in the AWS General Reference.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    TooManyMultiRegionAccessPoints,

    /// The number of tags exceeds the limit of 50 tags.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    TooManyTags,

    /// Object decompression failed. Check that the object is properly compressed using the format specified in the request.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    TruncatedInput,

    /// You are not authorized to perform this operation.
    ///
    /// HTTP Status Code: 401 Unauthorized
    ///
    UnauthorizedAccess,

    /// Applicable in China Regions only. Returned when a request is made to a bucket that doesn't have an ICP license. For more information, see ICP Recordal.
    ///
    /// HTTP Status Code: 403 Forbidden
    ///
    UnauthorizedAccessError,

    /// This request does not support content.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    UnexpectedContent,

    /// Applicable in China Regions only. This request was rejected because the IP was unexpected.
    ///
    /// HTTP Status Code: 403 Forbidden
    ///
    UnexpectedIPError,

    /// We encountered a record type that is not valid.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    UnrecognizedFormatException,

    /// The email address you provided does not match any account on record.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    UnresolvableGrantByEmailAddress,

    /// The request contained an unsupported argument.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    UnsupportedArgument,

    /// We encountered an unsupported SQL function.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    UnsupportedFunction,

    /// The specified Parquet type is not supported.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    UnsupportedParquetType,

    /// A range header is not supported for this operation.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    UnsupportedRangeHeader,

    /// Scan range queries are not supported on this type of object.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    UnsupportedScanRangeInput,

    /// The provided request is signed with an unsupported STS Token version or the signature version is not supported.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    UnsupportedSignature,

    /// We encountered an unsupported SQL operation.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    UnsupportedSqlOperation,

    /// We encountered an unsupported SQL structure. Check the SQL Reference.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    UnsupportedSqlStructure,

    /// We encountered a storage class that is not supported. Only STANDARD, STANDARD_IA, and ONEZONE_IA storage classes are supported.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    UnsupportedStorageClass,

    /// We encountered syntax that is not valid.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    UnsupportedSyntax,

    /// Your query contains an unsupported type for comparison (e.g. verifying that a Parquet INT96 column type is greater than 0).
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    UnsupportedTypeForQuerying,

    /// The bucket POST must contain the specified field name. If it is specified, check the order of the fields.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    UserKeyMustBeSpecified,

    /// A timestamp parse failure occurred in the SQL expression.
    ///
    /// HTTP Status Code: 400 Bad Request
    ///
    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,
        }
    }
}
