{-# LANGUAGE DisambiguateRecordFields #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.SQS.Types
(
defaultService,
_BatchEntryIdsNotDistinct,
_BatchRequestTooLong,
_EmptyBatchRequest,
_InvalidAttributeName,
_InvalidBatchEntryId,
_InvalidIdFormat,
_InvalidMessageContents,
_MessageNotInflight,
_OverLimit,
_PurgeQueueInProgress,
_QueueDeletedRecently,
_QueueDoesNotExist,
_QueueNameExists,
_ReceiptHandleIsInvalid,
_TooManyEntriesInBatchRequest,
_UnsupportedOperation,
MessageAttribute (..),
MessageSystemAttributeNameForSends (..),
QueueAttributeName (..),
BatchResultErrorEntry (..),
newBatchResultErrorEntry,
batchResultErrorEntry_message,
batchResultErrorEntry_id,
batchResultErrorEntry_senderFault,
batchResultErrorEntry_code,
ChangeMessageVisibilityBatchRequestEntry (..),
newChangeMessageVisibilityBatchRequestEntry,
changeMessageVisibilityBatchRequestEntry_visibilityTimeout,
changeMessageVisibilityBatchRequestEntry_id,
changeMessageVisibilityBatchRequestEntry_receiptHandle,
ChangeMessageVisibilityBatchResultEntry (..),
newChangeMessageVisibilityBatchResultEntry,
changeMessageVisibilityBatchResultEntry_id,
DeleteMessageBatchRequestEntry (..),
newDeleteMessageBatchRequestEntry,
deleteMessageBatchRequestEntry_id,
deleteMessageBatchRequestEntry_receiptHandle,
DeleteMessageBatchResultEntry (..),
newDeleteMessageBatchResultEntry,
deleteMessageBatchResultEntry_id,
Message (..),
newMessage,
message_attributes,
message_body,
message_mD5OfBody,
message_mD5OfMessageAttributes,
message_messageAttributes,
message_messageId,
message_receiptHandle,
MessageAttributeValue (..),
newMessageAttributeValue,
messageAttributeValue_binaryListValues,
messageAttributeValue_binaryValue,
messageAttributeValue_stringListValues,
messageAttributeValue_stringValue,
messageAttributeValue_dataType,
MessageSystemAttributeValue (..),
newMessageSystemAttributeValue,
messageSystemAttributeValue_binaryListValues,
messageSystemAttributeValue_binaryValue,
messageSystemAttributeValue_stringListValues,
messageSystemAttributeValue_stringValue,
messageSystemAttributeValue_dataType,
SendMessageBatchRequestEntry (..),
newSendMessageBatchRequestEntry,
sendMessageBatchRequestEntry_delaySeconds,
sendMessageBatchRequestEntry_messageAttributes,
sendMessageBatchRequestEntry_messageDeduplicationId,
sendMessageBatchRequestEntry_messageGroupId,
sendMessageBatchRequestEntry_messageSystemAttributes,
sendMessageBatchRequestEntry_id,
sendMessageBatchRequestEntry_messageBody,
SendMessageBatchResultEntry (..),
newSendMessageBatchResultEntry,
sendMessageBatchResultEntry_mD5OfMessageAttributes,
sendMessageBatchResultEntry_mD5OfMessageSystemAttributes,
sendMessageBatchResultEntry_sequenceNumber,
sendMessageBatchResultEntry_id,
sendMessageBatchResultEntry_messageId,
sendMessageBatchResultEntry_mD5OfMessageBody,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SQS.Types.BatchResultErrorEntry
import Amazonka.SQS.Types.ChangeMessageVisibilityBatchRequestEntry
import Amazonka.SQS.Types.ChangeMessageVisibilityBatchResultEntry
import Amazonka.SQS.Types.DeleteMessageBatchRequestEntry
import Amazonka.SQS.Types.DeleteMessageBatchResultEntry
import Amazonka.SQS.Types.Message
import Amazonka.SQS.Types.MessageAttribute
import Amazonka.SQS.Types.MessageAttributeValue
import Amazonka.SQS.Types.MessageSystemAttributeNameForSends
import Amazonka.SQS.Types.MessageSystemAttributeValue
import Amazonka.SQS.Types.QueueAttributeName
import Amazonka.SQS.Types.SendMessageBatchRequestEntry
import Amazonka.SQS.Types.SendMessageBatchResultEntry
import qualified Amazonka.Sign.V4 as Sign
defaultService :: Core.Service
defaultService :: Service
defaultService =
Core.Service
{ $sel:abbrev:Service :: Abbrev
Core.abbrev = Abbrev
"SQS",
$sel:signer:Service :: Signer
Core.signer = Signer
Sign.v4,
$sel:endpointPrefix:Service :: ByteString
Core.endpointPrefix = ByteString
"sqs",
$sel:signingName:Service :: ByteString
Core.signingName = ByteString
"sqs",
$sel:version:Service :: ByteString
Core.version = ByteString
"2012-11-05",
$sel:s3AddressingStyle:Service :: S3AddressingStyle
Core.s3AddressingStyle = S3AddressingStyle
Core.S3AddressingStyleAuto,
$sel:endpoint:Service :: Region -> Endpoint
Core.endpoint = Service -> Region -> Endpoint
Core.defaultEndpoint Service
defaultService,
$sel:timeout:Service :: Maybe Seconds
Core.timeout = forall a. a -> Maybe a
Prelude.Just Seconds
70,
$sel:check:Service :: Status -> Bool
Core.check = Status -> Bool
Core.statusSuccess,
$sel:error:Service :: Status -> [Header] -> ByteStringLazy -> Error
Core.error = Abbrev -> Status -> [Header] -> ByteStringLazy -> Error
Core.parseXMLError Abbrev
"SQS",
$sel:retry:Service :: Retry
Core.retry = Retry
retry
}
where
retry :: Retry
retry =
Core.Exponential
{ $sel:base:Exponential :: Double
Core.base = Double
5.0e-2,
$sel:growth:Exponential :: Int
Core.growth = Int
2,
$sel:attempts:Exponential :: Int
Core.attempts = Int
5,
$sel:check:Exponential :: ServiceError -> Maybe Text
Core.check = forall {a}. IsString a => ServiceError -> Maybe a
check
}
check :: ServiceError -> Maybe a
check ServiceError
e
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
502) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"bad_gateway"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
504) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"gateway_timeout"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
500) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"general_server_error"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
509) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"limit_exceeded"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"RequestThrottled"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
403
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"request_limit_exceeded"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"RequestThrottledException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"request_throttled_exception"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
503) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"service_unavailable"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"ThrottledException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"throttled_exception"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"Throttling"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"throttling"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"ThrottlingException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"throttling_exception"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode
ErrorCode
"ProvisionedThroughputExceededException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"throughput_exceeded"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
429) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"too_many_requests"
| Bool
Prelude.otherwise = forall a. Maybe a
Prelude.Nothing
_BatchEntryIdsNotDistinct :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_BatchEntryIdsNotDistinct :: forall a. AsError a => Fold a ServiceError
_BatchEntryIdsNotDistinct =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"AWS.SimpleQueueService.BatchEntryIdsNotDistinct"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
_BatchRequestTooLong :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_BatchRequestTooLong :: forall a. AsError a => Fold a ServiceError
_BatchRequestTooLong =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"AWS.SimpleQueueService.BatchRequestTooLong"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
_EmptyBatchRequest :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_EmptyBatchRequest :: forall a. AsError a => Fold a ServiceError
_EmptyBatchRequest =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"AWS.SimpleQueueService.EmptyBatchRequest"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
_InvalidAttributeName :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_InvalidAttributeName :: forall a. AsError a => Fold a ServiceError
_InvalidAttributeName =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"InvalidAttributeName"
_InvalidBatchEntryId :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_InvalidBatchEntryId :: forall a. AsError a => Fold a ServiceError
_InvalidBatchEntryId =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"AWS.SimpleQueueService.InvalidBatchEntryId"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
_InvalidIdFormat :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_InvalidIdFormat :: forall a. AsError a => Fold a ServiceError
_InvalidIdFormat =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"InvalidIdFormat"
_InvalidMessageContents :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_InvalidMessageContents :: forall a. AsError a => Fold a ServiceError
_InvalidMessageContents =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"InvalidMessageContents"
_MessageNotInflight :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_MessageNotInflight :: forall a. AsError a => Fold a ServiceError
_MessageNotInflight =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"AWS.SimpleQueueService.MessageNotInflight"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
_OverLimit :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_OverLimit :: forall a. AsError a => Fold a ServiceError
_OverLimit =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError Service
defaultService ErrorCode
"OverLimit"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
403
_PurgeQueueInProgress :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_PurgeQueueInProgress :: forall a. AsError a => Fold a ServiceError
_PurgeQueueInProgress =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"AWS.SimpleQueueService.PurgeQueueInProgress"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
403
_QueueDeletedRecently :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_QueueDeletedRecently :: forall a. AsError a => Fold a ServiceError
_QueueDeletedRecently =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"AWS.SimpleQueueService.QueueDeletedRecently"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
_QueueDoesNotExist :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_QueueDoesNotExist :: forall a. AsError a => Fold a ServiceError
_QueueDoesNotExist =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"AWS.SimpleQueueService.NonExistentQueue"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
_QueueNameExists :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_QueueNameExists :: forall a. AsError a => Fold a ServiceError
_QueueNameExists =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"QueueAlreadyExists"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
_ReceiptHandleIsInvalid :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ReceiptHandleIsInvalid :: forall a. AsError a => Fold a ServiceError
_ReceiptHandleIsInvalid =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ReceiptHandleIsInvalid"
_TooManyEntriesInBatchRequest :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_TooManyEntriesInBatchRequest :: forall a. AsError a => Fold a ServiceError
_TooManyEntriesInBatchRequest =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"AWS.SimpleQueueService.TooManyEntriesInBatchRequest"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
_UnsupportedOperation :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_UnsupportedOperation :: forall a. AsError a => Fold a ServiceError
_UnsupportedOperation =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"AWS.SimpleQueueService.UnsupportedOperation"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400