{-# LANGUAGE OverloadedStrings #-}
module Network.AWS.LexModels.Types
(
lexModels
, _PreconditionFailedException
, _ConflictException
, _NotFoundException
, _InternalFailureException
, _BadRequestException
, _LimitExceededException
, _ResourceInUseException
, ChannelStatus (..)
, ChannelType (..)
, ContentType (..)
, ExportStatus (..)
, ExportType (..)
, FulfillmentActivityType (..)
, ImportStatus (..)
, LexStatus (..)
, Locale (..)
, MergeStrategy (..)
, ProcessBehavior (..)
, ResourceType (..)
, SlotConstraint (..)
, SlotValueSelectionStrategy (..)
, StatusType (..)
, BotAliasMetadata
, botAliasMetadata
, bamChecksum
, bamBotVersion
, bamBotName
, bamCreatedDate
, bamName
, bamLastUpdatedDate
, bamDescription
, BotChannelAssociation
, botChannelAssociation
, bcaFailureReason
, bcaStatus
, bcaBotAlias
, bcaBotName
, bcaBotConfiguration
, bcaCreatedDate
, bcaName
, bcaType
, bcaDescription
, BotMetadata
, botMetadata
, bmStatus
, bmCreatedDate
, bmName
, bmVersion
, bmLastUpdatedDate
, bmDescription
, BuiltinIntentMetadata
, builtinIntentMetadata
, bimSignature
, bimSupportedLocales
, BuiltinIntentSlot
, builtinIntentSlot
, bisName
, BuiltinSlotTypeMetadata
, builtinSlotTypeMetadata
, bstmSignature
, bstmSupportedLocales
, CodeHook
, codeHook
, chUri
, chMessageVersion
, EnumerationValue
, enumerationValue
, evSynonyms
, evValue
, FollowUpPrompt
, followUpPrompt
, fupPrompt
, fupRejectionStatement
, FulfillmentActivity
, fulfillmentActivity
, faCodeHook
, faType
, Intent
, intent
, iIntentName
, iIntentVersion
, IntentMetadata
, intentMetadata
, imCreatedDate
, imName
, imVersion
, imLastUpdatedDate
, imDescription
, Message
, message
, mGroupNumber
, mContentType
, mContent
, Prompt
, prompt
, pResponseCard
, pMessages
, pMaxAttempts
, Slot
, slot
, sSlotType
, sValueElicitationPrompt
, sResponseCard
, sPriority
, sSlotTypeVersion
, sSampleUtterances
, sDescription
, sName
, sSlotConstraint
, SlotTypeMetadata
, slotTypeMetadata
, stmCreatedDate
, stmName
, stmVersion
, stmLastUpdatedDate
, stmDescription
, Statement
, statement
, staResponseCard
, staMessages
, UtteranceData
, utteranceData
, udFirstUtteredDate
, udCount
, udUtteranceString
, udLastUtteredDate
, udDistinctUsers
, UtteranceList
, utteranceList
, ulBotVersion
, ulUtterances
) where
import Network.AWS.Lens
import Network.AWS.LexModels.Types.Product
import Network.AWS.LexModels.Types.Sum
import Network.AWS.Prelude
import Network.AWS.Sign.V4
lexModels :: Service
lexModels =
Service
{ _svcAbbrev = "LexModels"
, _svcSigner = v4
, _svcPrefix = "models.lex"
, _svcVersion = "2017-04-19"
, _svcEndpoint = defaultEndpoint lexModels
, _svcTimeout = Just 70
, _svcCheck = statusSuccess
, _svcError = parseJSONError "LexModels"
, _svcRetry = retry
}
where
retry =
Exponential
{ _retryBase = 5.0e-2
, _retryGrowth = 2
, _retryAttempts = 5
, _retryCheck = check
}
check e
| has (hasCode "ThrottledException" . hasStatus 400) e =
Just "throttled_exception"
| has (hasStatus 429) e = Just "too_many_requests"
| has (hasCode "ThrottlingException" . hasStatus 400) e =
Just "throttling_exception"
| has (hasCode "Throttling" . hasStatus 400) e = Just "throttling"
| has (hasStatus 504) e = Just "gateway_timeout"
| has (hasCode "RequestThrottledException" . hasStatus 400) e =
Just "request_throttled_exception"
| has (hasStatus 502) e = Just "bad_gateway"
| has (hasStatus 503) e = Just "service_unavailable"
| has (hasStatus 500) e = Just "general_server_error"
| has (hasStatus 509) e = Just "limit_exceeded"
| otherwise = Nothing
_PreconditionFailedException :: AsError a => Getting (First ServiceError) a ServiceError
_PreconditionFailedException =
_MatchServiceError lexModels "PreconditionFailedException" . hasStatus 412
_ConflictException :: AsError a => Getting (First ServiceError) a ServiceError
_ConflictException =
_MatchServiceError lexModels "ConflictException" . hasStatus 409
_NotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
_NotFoundException =
_MatchServiceError lexModels "NotFoundException" . hasStatus 404
_InternalFailureException :: AsError a => Getting (First ServiceError) a ServiceError
_InternalFailureException =
_MatchServiceError lexModels "InternalFailureException" . hasStatus 500
_BadRequestException :: AsError a => Getting (First ServiceError) a ServiceError
_BadRequestException =
_MatchServiceError lexModels "BadRequestException" . hasStatus 400
_LimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError
_LimitExceededException =
_MatchServiceError lexModels "LimitExceededException" . hasStatus 429
_ResourceInUseException :: AsError a => Getting (First ServiceError) a ServiceError
_ResourceInUseException =
_MatchServiceError lexModels "ResourceInUseException" . hasStatus 400