{-# LANGUAGE DisambiguateRecordFields #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.ChimeSDKMessaging.Types
(
defaultService,
_BadRequestException,
_ConflictException,
_ForbiddenException,
_NotFoundException,
_ResourceLimitExceededException,
_ServiceFailureException,
_ServiceUnavailableException,
_ThrottledClientException,
_UnauthorizedClientException,
AllowNotifications (..),
ChannelMembershipType (..),
ChannelMessagePersistenceType (..),
ChannelMessageStatus (..),
ChannelMessageType (..),
ChannelMode (..),
ChannelPrivacy (..),
ErrorCode (..),
FallbackAction (..),
InvocationType (..),
PushNotificationType (..),
SearchFieldKey (..),
SearchFieldOperator (..),
SortOrder (..),
AppInstanceUserMembershipSummary (..),
newAppInstanceUserMembershipSummary,
appInstanceUserMembershipSummary_readMarkerTimestamp,
appInstanceUserMembershipSummary_subChannelId,
appInstanceUserMembershipSummary_type,
BatchChannelMemberships (..),
newBatchChannelMemberships,
batchChannelMemberships_channelArn,
batchChannelMemberships_invitedBy,
batchChannelMemberships_members,
batchChannelMemberships_subChannelId,
batchChannelMemberships_type,
BatchCreateChannelMembershipError (..),
newBatchCreateChannelMembershipError,
batchCreateChannelMembershipError_errorCode,
batchCreateChannelMembershipError_errorMessage,
batchCreateChannelMembershipError_memberArn,
Channel (..),
newChannel,
channel_channelArn,
channel_channelFlowArn,
channel_createdBy,
channel_createdTimestamp,
channel_elasticChannelConfiguration,
channel_lastMessageTimestamp,
channel_lastUpdatedTimestamp,
channel_metadata,
channel_mode,
channel_name,
channel_privacy,
ChannelAssociatedWithFlowSummary (..),
newChannelAssociatedWithFlowSummary,
channelAssociatedWithFlowSummary_channelArn,
channelAssociatedWithFlowSummary_metadata,
channelAssociatedWithFlowSummary_mode,
channelAssociatedWithFlowSummary_name,
channelAssociatedWithFlowSummary_privacy,
ChannelBan (..),
newChannelBan,
channelBan_channelArn,
channelBan_createdBy,
channelBan_createdTimestamp,
channelBan_member,
ChannelBanSummary (..),
newChannelBanSummary,
channelBanSummary_member,
ChannelFlow (..),
newChannelFlow,
channelFlow_channelFlowArn,
channelFlow_createdTimestamp,
channelFlow_lastUpdatedTimestamp,
channelFlow_name,
channelFlow_processors,
ChannelFlowSummary (..),
newChannelFlowSummary,
channelFlowSummary_channelFlowArn,
channelFlowSummary_name,
channelFlowSummary_processors,
ChannelMembership (..),
newChannelMembership,
channelMembership_channelArn,
channelMembership_createdTimestamp,
channelMembership_invitedBy,
channelMembership_lastUpdatedTimestamp,
channelMembership_member,
channelMembership_subChannelId,
channelMembership_type,
ChannelMembershipForAppInstanceUserSummary (..),
newChannelMembershipForAppInstanceUserSummary,
channelMembershipForAppInstanceUserSummary_appInstanceUserMembershipSummary,
channelMembershipForAppInstanceUserSummary_channelSummary,
ChannelMembershipPreferences (..),
newChannelMembershipPreferences,
channelMembershipPreferences_pushNotifications,
ChannelMembershipSummary (..),
newChannelMembershipSummary,
channelMembershipSummary_member,
ChannelMessage (..),
newChannelMessage,
channelMessage_channelArn,
channelMessage_content,
channelMessage_createdTimestamp,
channelMessage_lastEditedTimestamp,
channelMessage_lastUpdatedTimestamp,
channelMessage_messageAttributes,
channelMessage_messageId,
channelMessage_metadata,
channelMessage_persistence,
channelMessage_redacted,
channelMessage_sender,
channelMessage_status,
channelMessage_subChannelId,
channelMessage_type,
ChannelMessageCallback (..),
newChannelMessageCallback,
channelMessageCallback_content,
channelMessageCallback_messageAttributes,
channelMessageCallback_metadata,
channelMessageCallback_pushNotification,
channelMessageCallback_subChannelId,
channelMessageCallback_messageId,
ChannelMessageStatusStructure (..),
newChannelMessageStatusStructure,
channelMessageStatusStructure_detail,
channelMessageStatusStructure_value,
ChannelMessageSummary (..),
newChannelMessageSummary,
channelMessageSummary_content,
channelMessageSummary_createdTimestamp,
channelMessageSummary_lastEditedTimestamp,
channelMessageSummary_lastUpdatedTimestamp,
channelMessageSummary_messageAttributes,
channelMessageSummary_messageId,
channelMessageSummary_metadata,
channelMessageSummary_redacted,
channelMessageSummary_sender,
channelMessageSummary_status,
channelMessageSummary_type,
ChannelModeratedByAppInstanceUserSummary (..),
newChannelModeratedByAppInstanceUserSummary,
channelModeratedByAppInstanceUserSummary_channelSummary,
ChannelModerator (..),
newChannelModerator,
channelModerator_channelArn,
channelModerator_createdBy,
channelModerator_createdTimestamp,
channelModerator_moderator,
ChannelModeratorSummary (..),
newChannelModeratorSummary,
channelModeratorSummary_moderator,
ChannelSummary (..),
newChannelSummary,
channelSummary_channelArn,
channelSummary_lastMessageTimestamp,
channelSummary_metadata,
channelSummary_mode,
channelSummary_name,
channelSummary_privacy,
ElasticChannelConfiguration (..),
newElasticChannelConfiguration,
elasticChannelConfiguration_maximumSubChannels,
elasticChannelConfiguration_targetMembershipsPerSubChannel,
elasticChannelConfiguration_minimumMembershipPercentage,
Identity (..),
newIdentity,
identity_arn,
identity_name,
LambdaConfiguration (..),
newLambdaConfiguration,
lambdaConfiguration_resourceArn,
lambdaConfiguration_invocationType,
MessageAttributeValue (..),
newMessageAttributeValue,
messageAttributeValue_stringValues,
MessagingSessionEndpoint (..),
newMessagingSessionEndpoint,
messagingSessionEndpoint_url,
Processor (..),
newProcessor,
processor_name,
processor_configuration,
processor_executionOrder,
processor_fallbackAction,
ProcessorConfiguration (..),
newProcessorConfiguration,
processorConfiguration_lambda,
PushNotificationConfiguration (..),
newPushNotificationConfiguration,
pushNotificationConfiguration_body,
pushNotificationConfiguration_title,
pushNotificationConfiguration_type,
PushNotificationPreferences (..),
newPushNotificationPreferences,
pushNotificationPreferences_filterRule,
pushNotificationPreferences_allowNotifications,
SearchField (..),
newSearchField,
searchField_key,
searchField_values,
searchField_operator,
SubChannelSummary (..),
newSubChannelSummary,
subChannelSummary_membershipCount,
subChannelSummary_subChannelId,
Tag (..),
newTag,
tag_key,
tag_value,
)
where
import Amazonka.ChimeSDKMessaging.Types.AllowNotifications
import Amazonka.ChimeSDKMessaging.Types.AppInstanceUserMembershipSummary
import Amazonka.ChimeSDKMessaging.Types.BatchChannelMemberships
import Amazonka.ChimeSDKMessaging.Types.BatchCreateChannelMembershipError
import Amazonka.ChimeSDKMessaging.Types.Channel
import Amazonka.ChimeSDKMessaging.Types.ChannelAssociatedWithFlowSummary
import Amazonka.ChimeSDKMessaging.Types.ChannelBan
import Amazonka.ChimeSDKMessaging.Types.ChannelBanSummary
import Amazonka.ChimeSDKMessaging.Types.ChannelFlow
import Amazonka.ChimeSDKMessaging.Types.ChannelFlowSummary
import Amazonka.ChimeSDKMessaging.Types.ChannelMembership
import Amazonka.ChimeSDKMessaging.Types.ChannelMembershipForAppInstanceUserSummary
import Amazonka.ChimeSDKMessaging.Types.ChannelMembershipPreferences
import Amazonka.ChimeSDKMessaging.Types.ChannelMembershipSummary
import Amazonka.ChimeSDKMessaging.Types.ChannelMembershipType
import Amazonka.ChimeSDKMessaging.Types.ChannelMessage
import Amazonka.ChimeSDKMessaging.Types.ChannelMessageCallback
import Amazonka.ChimeSDKMessaging.Types.ChannelMessagePersistenceType
import Amazonka.ChimeSDKMessaging.Types.ChannelMessageStatus
import Amazonka.ChimeSDKMessaging.Types.ChannelMessageStatusStructure
import Amazonka.ChimeSDKMessaging.Types.ChannelMessageSummary
import Amazonka.ChimeSDKMessaging.Types.ChannelMessageType
import Amazonka.ChimeSDKMessaging.Types.ChannelMode
import Amazonka.ChimeSDKMessaging.Types.ChannelModeratedByAppInstanceUserSummary
import Amazonka.ChimeSDKMessaging.Types.ChannelModerator
import Amazonka.ChimeSDKMessaging.Types.ChannelModeratorSummary
import Amazonka.ChimeSDKMessaging.Types.ChannelPrivacy
import Amazonka.ChimeSDKMessaging.Types.ChannelSummary
import Amazonka.ChimeSDKMessaging.Types.ElasticChannelConfiguration
import Amazonka.ChimeSDKMessaging.Types.ErrorCode
import Amazonka.ChimeSDKMessaging.Types.FallbackAction
import Amazonka.ChimeSDKMessaging.Types.Identity
import Amazonka.ChimeSDKMessaging.Types.InvocationType
import Amazonka.ChimeSDKMessaging.Types.LambdaConfiguration
import Amazonka.ChimeSDKMessaging.Types.MessageAttributeValue
import Amazonka.ChimeSDKMessaging.Types.MessagingSessionEndpoint
import Amazonka.ChimeSDKMessaging.Types.Processor
import Amazonka.ChimeSDKMessaging.Types.ProcessorConfiguration
import Amazonka.ChimeSDKMessaging.Types.PushNotificationConfiguration
import Amazonka.ChimeSDKMessaging.Types.PushNotificationPreferences
import Amazonka.ChimeSDKMessaging.Types.PushNotificationType
import Amazonka.ChimeSDKMessaging.Types.SearchField
import Amazonka.ChimeSDKMessaging.Types.SearchFieldKey
import Amazonka.ChimeSDKMessaging.Types.SearchFieldOperator
import Amazonka.ChimeSDKMessaging.Types.SortOrder
import Amazonka.ChimeSDKMessaging.Types.SubChannelSummary
import Amazonka.ChimeSDKMessaging.Types.Tag
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Sign.V4 as Sign
defaultService :: Core.Service
defaultService :: Service
defaultService =
Core.Service
{ $sel:abbrev:Service :: Abbrev
Core.abbrev = Abbrev
"ChimeSDKMessaging",
$sel:signer:Service :: Signer
Core.signer = Signer
Sign.v4,
$sel:endpointPrefix:Service :: ByteString
Core.endpointPrefix = ByteString
"messaging-chime",
$sel:signingName:Service :: ByteString
Core.signingName = ByteString
"chime",
$sel:version:Service :: ByteString
Core.version = ByteString
"2021-05-15",
$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.parseJSONError Abbrev
"ChimeSDKMessaging",
$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
"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
_BadRequestException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_BadRequestException :: forall a. AsError a => Fold a ServiceError
_BadRequestException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"BadRequestException"
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
_ConflictException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ConflictException :: forall a. AsError a => Fold a ServiceError
_ConflictException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ConflictException"
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
409
_ForbiddenException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ForbiddenException :: forall a. AsError a => Fold a ServiceError
_ForbiddenException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ForbiddenException"
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
_NotFoundException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_NotFoundException :: forall a. AsError a => Fold a ServiceError
_NotFoundException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"NotFoundException"
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
404
_ResourceLimitExceededException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ResourceLimitExceededException :: forall a. AsError a => Fold a ServiceError
_ResourceLimitExceededException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ResourceLimitExceededException"
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
_ServiceFailureException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ServiceFailureException :: forall a. AsError a => Fold a ServiceError
_ServiceFailureException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ServiceFailureException"
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
500
_ServiceUnavailableException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ServiceUnavailableException :: forall a. AsError a => Fold a ServiceError
_ServiceUnavailableException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ServiceUnavailableException"
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
503
_ThrottledClientException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ThrottledClientException :: forall a. AsError a => Fold a ServiceError
_ThrottledClientException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ThrottledClientException"
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
429
_UnauthorizedClientException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_UnauthorizedClientException :: forall a. AsError a => Fold a ServiceError
_UnauthorizedClientException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"UnauthorizedClientException"
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
401