{-# LANGUAGE DisambiguateRecordFields #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.IoTEvents.Types
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.IoTEvents.Types
  ( -- * Service Configuration
    defaultService,

    -- * Errors
    _InternalFailureException,
    _InvalidRequestException,
    _LimitExceededException,
    _ResourceAlreadyExistsException,
    _ResourceInUseException,
    _ResourceNotFoundException,
    _ServiceUnavailableException,
    _ThrottlingException,
    _UnsupportedOperationException,

    -- * AlarmModelVersionStatus
    AlarmModelVersionStatus (..),

    -- * AnalysisResultLevel
    AnalysisResultLevel (..),

    -- * AnalysisStatus
    AnalysisStatus (..),

    -- * ComparisonOperator
    ComparisonOperator (..),

    -- * DetectorModelVersionStatus
    DetectorModelVersionStatus (..),

    -- * EvaluationMethod
    EvaluationMethod (..),

    -- * InputStatus
    InputStatus (..),

    -- * LoggingLevel
    LoggingLevel (..),

    -- * PayloadType
    PayloadType (..),

    -- * AcknowledgeFlow
    AcknowledgeFlow (..),
    newAcknowledgeFlow,
    acknowledgeFlow_enabled,

    -- * Action
    Action (..),
    newAction,
    action_clearTimer,
    action_dynamoDB,
    action_dynamoDBv2,
    action_firehose,
    action_iotEvents,
    action_iotSiteWise,
    action_iotTopicPublish,
    action_lambda,
    action_resetTimer,
    action_setTimer,
    action_setVariable,
    action_sns,
    action_sqs,

    -- * AlarmAction
    AlarmAction (..),
    newAlarmAction,
    alarmAction_dynamoDB,
    alarmAction_dynamoDBv2,
    alarmAction_firehose,
    alarmAction_iotEvents,
    alarmAction_iotSiteWise,
    alarmAction_iotTopicPublish,
    alarmAction_lambda,
    alarmAction_sns,
    alarmAction_sqs,

    -- * AlarmCapabilities
    AlarmCapabilities (..),
    newAlarmCapabilities,
    alarmCapabilities_acknowledgeFlow,
    alarmCapabilities_initializationConfiguration,

    -- * AlarmEventActions
    AlarmEventActions (..),
    newAlarmEventActions,
    alarmEventActions_alarmActions,

    -- * AlarmModelSummary
    AlarmModelSummary (..),
    newAlarmModelSummary,
    alarmModelSummary_alarmModelDescription,
    alarmModelSummary_alarmModelName,
    alarmModelSummary_creationTime,

    -- * AlarmModelVersionSummary
    AlarmModelVersionSummary (..),
    newAlarmModelVersionSummary,
    alarmModelVersionSummary_alarmModelArn,
    alarmModelVersionSummary_alarmModelName,
    alarmModelVersionSummary_alarmModelVersion,
    alarmModelVersionSummary_creationTime,
    alarmModelVersionSummary_lastUpdateTime,
    alarmModelVersionSummary_roleArn,
    alarmModelVersionSummary_status,
    alarmModelVersionSummary_statusMessage,

    -- * AlarmNotification
    AlarmNotification (..),
    newAlarmNotification,
    alarmNotification_notificationActions,

    -- * AlarmRule
    AlarmRule (..),
    newAlarmRule,
    alarmRule_simpleRule,

    -- * AnalysisResult
    AnalysisResult (..),
    newAnalysisResult,
    analysisResult_level,
    analysisResult_locations,
    analysisResult_message,
    analysisResult_type,

    -- * AnalysisResultLocation
    AnalysisResultLocation (..),
    newAnalysisResultLocation,
    analysisResultLocation_path,

    -- * AssetPropertyTimestamp
    AssetPropertyTimestamp (..),
    newAssetPropertyTimestamp,
    assetPropertyTimestamp_offsetInNanos,
    assetPropertyTimestamp_timeInSeconds,

    -- * AssetPropertyValue
    AssetPropertyValue (..),
    newAssetPropertyValue,
    assetPropertyValue_quality,
    assetPropertyValue_timestamp,
    assetPropertyValue_value,

    -- * AssetPropertyVariant
    AssetPropertyVariant (..),
    newAssetPropertyVariant,
    assetPropertyVariant_booleanValue,
    assetPropertyVariant_doubleValue,
    assetPropertyVariant_integerValue,
    assetPropertyVariant_stringValue,

    -- * Attribute
    Attribute (..),
    newAttribute,
    attribute_jsonPath,

    -- * ClearTimerAction
    ClearTimerAction (..),
    newClearTimerAction,
    clearTimerAction_timerName,

    -- * DetectorDebugOption
    DetectorDebugOption (..),
    newDetectorDebugOption,
    detectorDebugOption_keyValue,
    detectorDebugOption_detectorModelName,

    -- * DetectorModel
    DetectorModel (..),
    newDetectorModel,
    detectorModel_detectorModelConfiguration,
    detectorModel_detectorModelDefinition,

    -- * DetectorModelConfiguration
    DetectorModelConfiguration (..),
    newDetectorModelConfiguration,
    detectorModelConfiguration_creationTime,
    detectorModelConfiguration_detectorModelArn,
    detectorModelConfiguration_detectorModelDescription,
    detectorModelConfiguration_detectorModelName,
    detectorModelConfiguration_detectorModelVersion,
    detectorModelConfiguration_evaluationMethod,
    detectorModelConfiguration_key,
    detectorModelConfiguration_lastUpdateTime,
    detectorModelConfiguration_roleArn,
    detectorModelConfiguration_status,

    -- * DetectorModelDefinition
    DetectorModelDefinition (..),
    newDetectorModelDefinition,
    detectorModelDefinition_states,
    detectorModelDefinition_initialStateName,

    -- * DetectorModelSummary
    DetectorModelSummary (..),
    newDetectorModelSummary,
    detectorModelSummary_creationTime,
    detectorModelSummary_detectorModelDescription,
    detectorModelSummary_detectorModelName,

    -- * DetectorModelVersionSummary
    DetectorModelVersionSummary (..),
    newDetectorModelVersionSummary,
    detectorModelVersionSummary_creationTime,
    detectorModelVersionSummary_detectorModelArn,
    detectorModelVersionSummary_detectorModelName,
    detectorModelVersionSummary_detectorModelVersion,
    detectorModelVersionSummary_evaluationMethod,
    detectorModelVersionSummary_lastUpdateTime,
    detectorModelVersionSummary_roleArn,
    detectorModelVersionSummary_status,

    -- * DynamoDBAction
    DynamoDBAction (..),
    newDynamoDBAction,
    dynamoDBAction_hashKeyType,
    dynamoDBAction_operation,
    dynamoDBAction_payload,
    dynamoDBAction_payloadField,
    dynamoDBAction_rangeKeyField,
    dynamoDBAction_rangeKeyType,
    dynamoDBAction_rangeKeyValue,
    dynamoDBAction_hashKeyField,
    dynamoDBAction_hashKeyValue,
    dynamoDBAction_tableName,

    -- * DynamoDBv2Action
    DynamoDBv2Action (..),
    newDynamoDBv2Action,
    dynamoDBv2Action_payload,
    dynamoDBv2Action_tableName,

    -- * EmailConfiguration
    EmailConfiguration (..),
    newEmailConfiguration,
    emailConfiguration_content,
    emailConfiguration_from,
    emailConfiguration_recipients,

    -- * EmailContent
    EmailContent (..),
    newEmailContent,
    emailContent_additionalMessage,
    emailContent_subject,

    -- * EmailRecipients
    EmailRecipients (..),
    newEmailRecipients,
    emailRecipients_to,

    -- * Event
    Event (..),
    newEvent,
    event_actions,
    event_condition,
    event_eventName,

    -- * FirehoseAction
    FirehoseAction (..),
    newFirehoseAction,
    firehoseAction_payload,
    firehoseAction_separator,
    firehoseAction_deliveryStreamName,

    -- * InitializationConfiguration
    InitializationConfiguration (..),
    newInitializationConfiguration,
    initializationConfiguration_disabledOnInitialization,

    -- * Input
    Input (..),
    newInput,
    input_inputConfiguration,
    input_inputDefinition,

    -- * InputConfiguration
    InputConfiguration (..),
    newInputConfiguration,
    inputConfiguration_inputDescription,
    inputConfiguration_inputName,
    inputConfiguration_inputArn,
    inputConfiguration_creationTime,
    inputConfiguration_lastUpdateTime,
    inputConfiguration_status,

    -- * InputDefinition
    InputDefinition (..),
    newInputDefinition,
    inputDefinition_attributes,

    -- * InputIdentifier
    InputIdentifier (..),
    newInputIdentifier,
    inputIdentifier_iotEventsInputIdentifier,
    inputIdentifier_iotSiteWiseInputIdentifier,

    -- * InputSummary
    InputSummary (..),
    newInputSummary,
    inputSummary_creationTime,
    inputSummary_inputArn,
    inputSummary_inputDescription,
    inputSummary_inputName,
    inputSummary_lastUpdateTime,
    inputSummary_status,

    -- * IotEventsAction
    IotEventsAction (..),
    newIotEventsAction,
    iotEventsAction_payload,
    iotEventsAction_inputName,

    -- * IotEventsInputIdentifier
    IotEventsInputIdentifier (..),
    newIotEventsInputIdentifier,
    iotEventsInputIdentifier_inputName,

    -- * IotSiteWiseAction
    IotSiteWiseAction (..),
    newIotSiteWiseAction,
    iotSiteWiseAction_assetId,
    iotSiteWiseAction_entryId,
    iotSiteWiseAction_propertyAlias,
    iotSiteWiseAction_propertyId,
    iotSiteWiseAction_propertyValue,

    -- * IotSiteWiseAssetModelPropertyIdentifier
    IotSiteWiseAssetModelPropertyIdentifier (..),
    newIotSiteWiseAssetModelPropertyIdentifier,
    iotSiteWiseAssetModelPropertyIdentifier_assetModelId,
    iotSiteWiseAssetModelPropertyIdentifier_propertyId,

    -- * IotSiteWiseInputIdentifier
    IotSiteWiseInputIdentifier (..),
    newIotSiteWiseInputIdentifier,
    iotSiteWiseInputIdentifier_iotSiteWiseAssetModelPropertyIdentifier,

    -- * IotTopicPublishAction
    IotTopicPublishAction (..),
    newIotTopicPublishAction,
    iotTopicPublishAction_payload,
    iotTopicPublishAction_mqttTopic,

    -- * LambdaAction
    LambdaAction (..),
    newLambdaAction,
    lambdaAction_payload,
    lambdaAction_functionArn,

    -- * LoggingOptions
    LoggingOptions (..),
    newLoggingOptions,
    loggingOptions_detectorDebugOptions,
    loggingOptions_roleArn,
    loggingOptions_level,
    loggingOptions_enabled,

    -- * NotificationAction
    NotificationAction (..),
    newNotificationAction,
    notificationAction_emailConfigurations,
    notificationAction_smsConfigurations,
    notificationAction_action,

    -- * NotificationTargetActions
    NotificationTargetActions (..),
    newNotificationTargetActions,
    notificationTargetActions_lambdaAction,

    -- * OnEnterLifecycle
    OnEnterLifecycle (..),
    newOnEnterLifecycle,
    onEnterLifecycle_events,

    -- * OnExitLifecycle
    OnExitLifecycle (..),
    newOnExitLifecycle,
    onExitLifecycle_events,

    -- * OnInputLifecycle
    OnInputLifecycle (..),
    newOnInputLifecycle,
    onInputLifecycle_events,
    onInputLifecycle_transitionEvents,

    -- * Payload
    Payload (..),
    newPayload,
    payload_contentExpression,
    payload_type,

    -- * RecipientDetail
    RecipientDetail (..),
    newRecipientDetail,
    recipientDetail_ssoIdentity,

    -- * ResetTimerAction
    ResetTimerAction (..),
    newResetTimerAction,
    resetTimerAction_timerName,

    -- * RoutedResource
    RoutedResource (..),
    newRoutedResource,
    routedResource_arn,
    routedResource_name,

    -- * SMSConfiguration
    SMSConfiguration (..),
    newSMSConfiguration,
    sMSConfiguration_additionalMessage,
    sMSConfiguration_senderId,
    sMSConfiguration_recipients,

    -- * SNSTopicPublishAction
    SNSTopicPublishAction (..),
    newSNSTopicPublishAction,
    sNSTopicPublishAction_payload,
    sNSTopicPublishAction_targetArn,

    -- * SSOIdentity
    SSOIdentity (..),
    newSSOIdentity,
    sSOIdentity_userId,
    sSOIdentity_identityStoreId,

    -- * SetTimerAction
    SetTimerAction (..),
    newSetTimerAction,
    setTimerAction_durationExpression,
    setTimerAction_seconds,
    setTimerAction_timerName,

    -- * SetVariableAction
    SetVariableAction (..),
    newSetVariableAction,
    setVariableAction_variableName,
    setVariableAction_value,

    -- * SimpleRule
    SimpleRule (..),
    newSimpleRule,
    simpleRule_inputProperty,
    simpleRule_comparisonOperator,
    simpleRule_threshold,

    -- * SqsAction
    SqsAction (..),
    newSqsAction,
    sqsAction_payload,
    sqsAction_useBase64,
    sqsAction_queueUrl,

    -- * State
    State (..),
    newState,
    state_onEnter,
    state_onExit,
    state_onInput,
    state_stateName,

    -- * Tag
    Tag (..),
    newTag,
    tag_key,
    tag_value,

    -- * TransitionEvent
    TransitionEvent (..),
    newTransitionEvent,
    transitionEvent_actions,
    transitionEvent_eventName,
    transitionEvent_condition,
    transitionEvent_nextState,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import Amazonka.IoTEvents.Types.AcknowledgeFlow
import Amazonka.IoTEvents.Types.Action
import Amazonka.IoTEvents.Types.AlarmAction
import Amazonka.IoTEvents.Types.AlarmCapabilities
import Amazonka.IoTEvents.Types.AlarmEventActions
import Amazonka.IoTEvents.Types.AlarmModelSummary
import Amazonka.IoTEvents.Types.AlarmModelVersionStatus
import Amazonka.IoTEvents.Types.AlarmModelVersionSummary
import Amazonka.IoTEvents.Types.AlarmNotification
import Amazonka.IoTEvents.Types.AlarmRule
import Amazonka.IoTEvents.Types.AnalysisResult
import Amazonka.IoTEvents.Types.AnalysisResultLevel
import Amazonka.IoTEvents.Types.AnalysisResultLocation
import Amazonka.IoTEvents.Types.AnalysisStatus
import Amazonka.IoTEvents.Types.AssetPropertyTimestamp
import Amazonka.IoTEvents.Types.AssetPropertyValue
import Amazonka.IoTEvents.Types.AssetPropertyVariant
import Amazonka.IoTEvents.Types.Attribute
import Amazonka.IoTEvents.Types.ClearTimerAction
import Amazonka.IoTEvents.Types.ComparisonOperator
import Amazonka.IoTEvents.Types.DetectorDebugOption
import Amazonka.IoTEvents.Types.DetectorModel
import Amazonka.IoTEvents.Types.DetectorModelConfiguration
import Amazonka.IoTEvents.Types.DetectorModelDefinition
import Amazonka.IoTEvents.Types.DetectorModelSummary
import Amazonka.IoTEvents.Types.DetectorModelVersionStatus
import Amazonka.IoTEvents.Types.DetectorModelVersionSummary
import Amazonka.IoTEvents.Types.DynamoDBAction
import Amazonka.IoTEvents.Types.DynamoDBv2Action
import Amazonka.IoTEvents.Types.EmailConfiguration
import Amazonka.IoTEvents.Types.EmailContent
import Amazonka.IoTEvents.Types.EmailRecipients
import Amazonka.IoTEvents.Types.EvaluationMethod
import Amazonka.IoTEvents.Types.Event
import Amazonka.IoTEvents.Types.FirehoseAction
import Amazonka.IoTEvents.Types.InitializationConfiguration
import Amazonka.IoTEvents.Types.Input
import Amazonka.IoTEvents.Types.InputConfiguration
import Amazonka.IoTEvents.Types.InputDefinition
import Amazonka.IoTEvents.Types.InputIdentifier
import Amazonka.IoTEvents.Types.InputStatus
import Amazonka.IoTEvents.Types.InputSummary
import Amazonka.IoTEvents.Types.IotEventsAction
import Amazonka.IoTEvents.Types.IotEventsInputIdentifier
import Amazonka.IoTEvents.Types.IotSiteWiseAction
import Amazonka.IoTEvents.Types.IotSiteWiseAssetModelPropertyIdentifier
import Amazonka.IoTEvents.Types.IotSiteWiseInputIdentifier
import Amazonka.IoTEvents.Types.IotTopicPublishAction
import Amazonka.IoTEvents.Types.LambdaAction
import Amazonka.IoTEvents.Types.LoggingLevel
import Amazonka.IoTEvents.Types.LoggingOptions
import Amazonka.IoTEvents.Types.NotificationAction
import Amazonka.IoTEvents.Types.NotificationTargetActions
import Amazonka.IoTEvents.Types.OnEnterLifecycle
import Amazonka.IoTEvents.Types.OnExitLifecycle
import Amazonka.IoTEvents.Types.OnInputLifecycle
import Amazonka.IoTEvents.Types.Payload
import Amazonka.IoTEvents.Types.PayloadType
import Amazonka.IoTEvents.Types.RecipientDetail
import Amazonka.IoTEvents.Types.ResetTimerAction
import Amazonka.IoTEvents.Types.RoutedResource
import Amazonka.IoTEvents.Types.SMSConfiguration
import Amazonka.IoTEvents.Types.SNSTopicPublishAction
import Amazonka.IoTEvents.Types.SSOIdentity
import Amazonka.IoTEvents.Types.SetTimerAction
import Amazonka.IoTEvents.Types.SetVariableAction
import Amazonka.IoTEvents.Types.SimpleRule
import Amazonka.IoTEvents.Types.SqsAction
import Amazonka.IoTEvents.Types.State
import Amazonka.IoTEvents.Types.Tag
import Amazonka.IoTEvents.Types.TransitionEvent
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Sign.V4 as Sign

-- | API version @2018-07-27@ of the Amazon IoT Events SDK configuration.
defaultService :: Core.Service
defaultService :: Service
defaultService =
  Core.Service
    { $sel:abbrev:Service :: Abbrev
Core.abbrev = Abbrev
"IoTEvents",
      $sel:signer:Service :: Signer
Core.signer = Signer
Sign.v4,
      $sel:endpointPrefix:Service :: ByteString
Core.endpointPrefix = ByteString
"iotevents",
      $sel:signingName:Service :: ByteString
Core.signingName = ByteString
"iotevents",
      $sel:version:Service :: ByteString
Core.version = ByteString
"2018-07-27",
      $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
"IoTEvents",
      $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

-- | An internal failure occurred.
_InternalFailureException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_InternalFailureException :: forall a. AsError a => Fold a ServiceError
_InternalFailureException =
  forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
    Service
defaultService
    ErrorCode
"InternalFailureException"
    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

-- | The request was invalid.
_InvalidRequestException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_InvalidRequestException :: forall a. AsError a => Fold a ServiceError
_InvalidRequestException =
  forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
    Service
defaultService
    ErrorCode
"InvalidRequestException"
    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

-- | A limit was exceeded.
_LimitExceededException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_LimitExceededException :: forall a. AsError a => Fold a ServiceError
_LimitExceededException =
  forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
    Service
defaultService
    ErrorCode
"LimitExceededException"
    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
410

-- | The resource already exists.
_ResourceAlreadyExistsException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ResourceAlreadyExistsException :: forall a. AsError a => Fold a ServiceError
_ResourceAlreadyExistsException =
  forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
    Service
defaultService
    ErrorCode
"ResourceAlreadyExistsException"
    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

-- | The resource is in use.
_ResourceInUseException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ResourceInUseException :: forall a. AsError a => Fold a ServiceError
_ResourceInUseException =
  forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
    Service
defaultService
    ErrorCode
"ResourceInUseException"
    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

-- | The resource was not found.
_ResourceNotFoundException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ResourceNotFoundException :: forall a. AsError a => Fold a ServiceError
_ResourceNotFoundException =
  forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
    Service
defaultService
    ErrorCode
"ResourceNotFoundException"
    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

-- | The service is currently unavailable.
_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

-- | The request could not be completed due to throttling.
_ThrottlingException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ThrottlingException :: forall a. AsError a => Fold a ServiceError
_ThrottlingException =
  forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
    Service
defaultService
    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
429

-- | The requested operation is not supported.
_UnsupportedOperationException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_UnsupportedOperationException :: forall a. AsError a => Fold a ServiceError
_UnsupportedOperationException =
  forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
    Service
defaultService
    ErrorCode
"UnsupportedOperationException"
    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
501