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

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

-- |
-- Module      : Amazonka.KafkaConnect.Types
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.KafkaConnect.Types
  ( -- * Service Configuration
    defaultService,

    -- * Errors
    _ConflictException,
    _ForbiddenException,
    _NotFoundException,
    _TooManyRequestsException,
    _InternalServerErrorException,
    _ServiceUnavailableException,
    _UnauthorizedException,
    _BadRequestException,

    -- * ConnectorState
    ConnectorState (..),

    -- * CustomPluginContentType
    CustomPluginContentType (..),

    -- * CustomPluginState
    CustomPluginState (..),

    -- * KafkaClusterClientAuthenticationType
    KafkaClusterClientAuthenticationType (..),

    -- * KafkaClusterEncryptionInTransitType
    KafkaClusterEncryptionInTransitType (..),

    -- * ApacheKafkaCluster
    ApacheKafkaCluster (..),
    newApacheKafkaCluster,
    apacheKafkaCluster_bootstrapServers,
    apacheKafkaCluster_vpc,

    -- * ApacheKafkaClusterDescription
    ApacheKafkaClusterDescription (..),
    newApacheKafkaClusterDescription,
    apacheKafkaClusterDescription_bootstrapServers,
    apacheKafkaClusterDescription_vpc,

    -- * AutoScaling
    AutoScaling (..),
    newAutoScaling,
    autoScaling_scaleInPolicy,
    autoScaling_scaleOutPolicy,
    autoScaling_maxWorkerCount,
    autoScaling_mcuCount,
    autoScaling_minWorkerCount,

    -- * AutoScalingDescription
    AutoScalingDescription (..),
    newAutoScalingDescription,
    autoScalingDescription_scaleInPolicy,
    autoScalingDescription_mcuCount,
    autoScalingDescription_scaleOutPolicy,
    autoScalingDescription_maxWorkerCount,
    autoScalingDescription_minWorkerCount,

    -- * AutoScalingUpdate
    AutoScalingUpdate (..),
    newAutoScalingUpdate,
    autoScalingUpdate_maxWorkerCount,
    autoScalingUpdate_mcuCount,
    autoScalingUpdate_minWorkerCount,
    autoScalingUpdate_scaleInPolicy,
    autoScalingUpdate_scaleOutPolicy,

    -- * Capacity
    Capacity (..),
    newCapacity,
    capacity_autoScaling,
    capacity_provisionedCapacity,

    -- * CapacityDescription
    CapacityDescription (..),
    newCapacityDescription,
    capacityDescription_autoScaling,
    capacityDescription_provisionedCapacity,

    -- * CapacityUpdate
    CapacityUpdate (..),
    newCapacityUpdate,
    capacityUpdate_autoScaling,
    capacityUpdate_provisionedCapacity,

    -- * CloudWatchLogsLogDelivery
    CloudWatchLogsLogDelivery (..),
    newCloudWatchLogsLogDelivery,
    cloudWatchLogsLogDelivery_logGroup,
    cloudWatchLogsLogDelivery_enabled,

    -- * CloudWatchLogsLogDeliveryDescription
    CloudWatchLogsLogDeliveryDescription (..),
    newCloudWatchLogsLogDeliveryDescription,
    cloudWatchLogsLogDeliveryDescription_enabled,
    cloudWatchLogsLogDeliveryDescription_logGroup,

    -- * ConnectorSummary
    ConnectorSummary (..),
    newConnectorSummary,
    connectorSummary_creationTime,
    connectorSummary_kafkaCluster,
    connectorSummary_kafkaConnectVersion,
    connectorSummary_logDelivery,
    connectorSummary_currentVersion,
    connectorSummary_workerConfiguration,
    connectorSummary_connectorArn,
    connectorSummary_connectorName,
    connectorSummary_connectorState,
    connectorSummary_capacity,
    connectorSummary_plugins,
    connectorSummary_connectorDescription,
    connectorSummary_kafkaClusterClientAuthentication,
    connectorSummary_kafkaClusterEncryptionInTransit,
    connectorSummary_serviceExecutionRoleArn,

    -- * CustomPlugin
    CustomPlugin (..),
    newCustomPlugin,
    customPlugin_customPluginArn,
    customPlugin_revision,

    -- * CustomPluginDescription
    CustomPluginDescription (..),
    newCustomPluginDescription,
    customPluginDescription_customPluginArn,
    customPluginDescription_revision,

    -- * CustomPluginFileDescription
    CustomPluginFileDescription (..),
    newCustomPluginFileDescription,
    customPluginFileDescription_fileMd5,
    customPluginFileDescription_fileSize,

    -- * CustomPluginLocation
    CustomPluginLocation (..),
    newCustomPluginLocation,
    customPluginLocation_s3Location,

    -- * CustomPluginLocationDescription
    CustomPluginLocationDescription (..),
    newCustomPluginLocationDescription,
    customPluginLocationDescription_s3Location,

    -- * CustomPluginRevisionSummary
    CustomPluginRevisionSummary (..),
    newCustomPluginRevisionSummary,
    customPluginRevisionSummary_creationTime,
    customPluginRevisionSummary_location,
    customPluginRevisionSummary_fileDescription,
    customPluginRevisionSummary_revision,
    customPluginRevisionSummary_description,
    customPluginRevisionSummary_contentType,

    -- * CustomPluginSummary
    CustomPluginSummary (..),
    newCustomPluginSummary,
    customPluginSummary_creationTime,
    customPluginSummary_latestRevision,
    customPluginSummary_name,
    customPluginSummary_customPluginArn,
    customPluginSummary_customPluginState,
    customPluginSummary_description,

    -- * FirehoseLogDelivery
    FirehoseLogDelivery (..),
    newFirehoseLogDelivery,
    firehoseLogDelivery_deliveryStream,
    firehoseLogDelivery_enabled,

    -- * FirehoseLogDeliveryDescription
    FirehoseLogDeliveryDescription (..),
    newFirehoseLogDeliveryDescription,
    firehoseLogDeliveryDescription_enabled,
    firehoseLogDeliveryDescription_deliveryStream,

    -- * KafkaCluster
    KafkaCluster (..),
    newKafkaCluster,
    kafkaCluster_apacheKafkaCluster,

    -- * KafkaClusterClientAuthentication
    KafkaClusterClientAuthentication (..),
    newKafkaClusterClientAuthentication,
    kafkaClusterClientAuthentication_authenticationType,

    -- * KafkaClusterClientAuthenticationDescription
    KafkaClusterClientAuthenticationDescription (..),
    newKafkaClusterClientAuthenticationDescription,
    kafkaClusterClientAuthenticationDescription_authenticationType,

    -- * KafkaClusterDescription
    KafkaClusterDescription (..),
    newKafkaClusterDescription,
    kafkaClusterDescription_apacheKafkaCluster,

    -- * KafkaClusterEncryptionInTransit
    KafkaClusterEncryptionInTransit (..),
    newKafkaClusterEncryptionInTransit,
    kafkaClusterEncryptionInTransit_encryptionType,

    -- * KafkaClusterEncryptionInTransitDescription
    KafkaClusterEncryptionInTransitDescription (..),
    newKafkaClusterEncryptionInTransitDescription,
    kafkaClusterEncryptionInTransitDescription_encryptionType,

    -- * LogDelivery
    LogDelivery (..),
    newLogDelivery,
    logDelivery_workerLogDelivery,

    -- * LogDeliveryDescription
    LogDeliveryDescription (..),
    newLogDeliveryDescription,
    logDeliveryDescription_workerLogDelivery,

    -- * Plugin
    Plugin (..),
    newPlugin,
    plugin_customPlugin,

    -- * PluginDescription
    PluginDescription (..),
    newPluginDescription,
    pluginDescription_customPlugin,

    -- * ProvisionedCapacity
    ProvisionedCapacity (..),
    newProvisionedCapacity,
    provisionedCapacity_mcuCount,
    provisionedCapacity_workerCount,

    -- * ProvisionedCapacityDescription
    ProvisionedCapacityDescription (..),
    newProvisionedCapacityDescription,
    provisionedCapacityDescription_workerCount,
    provisionedCapacityDescription_mcuCount,

    -- * ProvisionedCapacityUpdate
    ProvisionedCapacityUpdate (..),
    newProvisionedCapacityUpdate,
    provisionedCapacityUpdate_mcuCount,
    provisionedCapacityUpdate_workerCount,

    -- * S3Location
    S3Location (..),
    newS3Location,
    s3Location_objectVersion,
    s3Location_bucketArn,
    s3Location_fileKey,

    -- * S3LocationDescription
    S3LocationDescription (..),
    newS3LocationDescription,
    s3LocationDescription_objectVersion,
    s3LocationDescription_bucketArn,
    s3LocationDescription_fileKey,

    -- * S3LogDelivery
    S3LogDelivery (..),
    newS3LogDelivery,
    s3LogDelivery_prefix,
    s3LogDelivery_bucket,
    s3LogDelivery_enabled,

    -- * S3LogDeliveryDescription
    S3LogDeliveryDescription (..),
    newS3LogDeliveryDescription,
    s3LogDeliveryDescription_enabled,
    s3LogDeliveryDescription_prefix,
    s3LogDeliveryDescription_bucket,

    -- * ScaleInPolicy
    ScaleInPolicy (..),
    newScaleInPolicy,
    scaleInPolicy_cpuUtilizationPercentage,

    -- * ScaleInPolicyDescription
    ScaleInPolicyDescription (..),
    newScaleInPolicyDescription,
    scaleInPolicyDescription_cpuUtilizationPercentage,

    -- * ScaleInPolicyUpdate
    ScaleInPolicyUpdate (..),
    newScaleInPolicyUpdate,
    scaleInPolicyUpdate_cpuUtilizationPercentage,

    -- * ScaleOutPolicy
    ScaleOutPolicy (..),
    newScaleOutPolicy,
    scaleOutPolicy_cpuUtilizationPercentage,

    -- * ScaleOutPolicyDescription
    ScaleOutPolicyDescription (..),
    newScaleOutPolicyDescription,
    scaleOutPolicyDescription_cpuUtilizationPercentage,

    -- * ScaleOutPolicyUpdate
    ScaleOutPolicyUpdate (..),
    newScaleOutPolicyUpdate,
    scaleOutPolicyUpdate_cpuUtilizationPercentage,

    -- * Vpc
    Vpc (..),
    newVpc,
    vpc_securityGroups,
    vpc_subnets,

    -- * VpcDescription
    VpcDescription (..),
    newVpcDescription,
    vpcDescription_securityGroups,
    vpcDescription_subnets,

    -- * WorkerConfiguration
    WorkerConfiguration (..),
    newWorkerConfiguration,
    workerConfiguration_revision,
    workerConfiguration_workerConfigurationArn,

    -- * WorkerConfigurationDescription
    WorkerConfigurationDescription (..),
    newWorkerConfigurationDescription,
    workerConfigurationDescription_workerConfigurationArn,
    workerConfigurationDescription_revision,

    -- * WorkerConfigurationRevisionDescription
    WorkerConfigurationRevisionDescription (..),
    newWorkerConfigurationRevisionDescription,
    workerConfigurationRevisionDescription_creationTime,
    workerConfigurationRevisionDescription_revision,
    workerConfigurationRevisionDescription_propertiesFileContent,
    workerConfigurationRevisionDescription_description,

    -- * WorkerConfigurationRevisionSummary
    WorkerConfigurationRevisionSummary (..),
    newWorkerConfigurationRevisionSummary,
    workerConfigurationRevisionSummary_creationTime,
    workerConfigurationRevisionSummary_revision,
    workerConfigurationRevisionSummary_description,

    -- * WorkerConfigurationSummary
    WorkerConfigurationSummary (..),
    newWorkerConfigurationSummary,
    workerConfigurationSummary_creationTime,
    workerConfigurationSummary_latestRevision,
    workerConfigurationSummary_name,
    workerConfigurationSummary_workerConfigurationArn,
    workerConfigurationSummary_description,

    -- * WorkerLogDelivery
    WorkerLogDelivery (..),
    newWorkerLogDelivery,
    workerLogDelivery_cloudWatchLogs,
    workerLogDelivery_firehose,
    workerLogDelivery_s3,

    -- * WorkerLogDeliveryDescription
    WorkerLogDeliveryDescription (..),
    newWorkerLogDeliveryDescription,
    workerLogDeliveryDescription_cloudWatchLogs,
    workerLogDeliveryDescription_firehose,
    workerLogDeliveryDescription_s3,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.KafkaConnect.Types.ApacheKafkaCluster
import Amazonka.KafkaConnect.Types.ApacheKafkaClusterDescription
import Amazonka.KafkaConnect.Types.AutoScaling
import Amazonka.KafkaConnect.Types.AutoScalingDescription
import Amazonka.KafkaConnect.Types.AutoScalingUpdate
import Amazonka.KafkaConnect.Types.Capacity
import Amazonka.KafkaConnect.Types.CapacityDescription
import Amazonka.KafkaConnect.Types.CapacityUpdate
import Amazonka.KafkaConnect.Types.CloudWatchLogsLogDelivery
import Amazonka.KafkaConnect.Types.CloudWatchLogsLogDeliveryDescription
import Amazonka.KafkaConnect.Types.ConnectorState
import Amazonka.KafkaConnect.Types.ConnectorSummary
import Amazonka.KafkaConnect.Types.CustomPlugin
import Amazonka.KafkaConnect.Types.CustomPluginContentType
import Amazonka.KafkaConnect.Types.CustomPluginDescription
import Amazonka.KafkaConnect.Types.CustomPluginFileDescription
import Amazonka.KafkaConnect.Types.CustomPluginLocation
import Amazonka.KafkaConnect.Types.CustomPluginLocationDescription
import Amazonka.KafkaConnect.Types.CustomPluginRevisionSummary
import Amazonka.KafkaConnect.Types.CustomPluginState
import Amazonka.KafkaConnect.Types.CustomPluginSummary
import Amazonka.KafkaConnect.Types.FirehoseLogDelivery
import Amazonka.KafkaConnect.Types.FirehoseLogDeliveryDescription
import Amazonka.KafkaConnect.Types.KafkaCluster
import Amazonka.KafkaConnect.Types.KafkaClusterClientAuthentication
import Amazonka.KafkaConnect.Types.KafkaClusterClientAuthenticationDescription
import Amazonka.KafkaConnect.Types.KafkaClusterClientAuthenticationType
import Amazonka.KafkaConnect.Types.KafkaClusterDescription
import Amazonka.KafkaConnect.Types.KafkaClusterEncryptionInTransit
import Amazonka.KafkaConnect.Types.KafkaClusterEncryptionInTransitDescription
import Amazonka.KafkaConnect.Types.KafkaClusterEncryptionInTransitType
import Amazonka.KafkaConnect.Types.LogDelivery
import Amazonka.KafkaConnect.Types.LogDeliveryDescription
import Amazonka.KafkaConnect.Types.Plugin
import Amazonka.KafkaConnect.Types.PluginDescription
import Amazonka.KafkaConnect.Types.ProvisionedCapacity
import Amazonka.KafkaConnect.Types.ProvisionedCapacityDescription
import Amazonka.KafkaConnect.Types.ProvisionedCapacityUpdate
import Amazonka.KafkaConnect.Types.S3Location
import Amazonka.KafkaConnect.Types.S3LocationDescription
import Amazonka.KafkaConnect.Types.S3LogDelivery
import Amazonka.KafkaConnect.Types.S3LogDeliveryDescription
import Amazonka.KafkaConnect.Types.ScaleInPolicy
import Amazonka.KafkaConnect.Types.ScaleInPolicyDescription
import Amazonka.KafkaConnect.Types.ScaleInPolicyUpdate
import Amazonka.KafkaConnect.Types.ScaleOutPolicy
import Amazonka.KafkaConnect.Types.ScaleOutPolicyDescription
import Amazonka.KafkaConnect.Types.ScaleOutPolicyUpdate
import Amazonka.KafkaConnect.Types.Vpc
import Amazonka.KafkaConnect.Types.VpcDescription
import Amazonka.KafkaConnect.Types.WorkerConfiguration
import Amazonka.KafkaConnect.Types.WorkerConfigurationDescription
import Amazonka.KafkaConnect.Types.WorkerConfigurationRevisionDescription
import Amazonka.KafkaConnect.Types.WorkerConfigurationRevisionSummary
import Amazonka.KafkaConnect.Types.WorkerConfigurationSummary
import Amazonka.KafkaConnect.Types.WorkerLogDelivery
import Amazonka.KafkaConnect.Types.WorkerLogDeliveryDescription
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Sign.V4 as Sign

-- | API version @2021-09-14@ of the Amazon Managed Streaming for Kafka Connect SDK configuration.
defaultService :: Core.Service
defaultService :: Service
defaultService =
  Service :: Abbrev
-> Signer
-> ByteString
-> ByteString
-> ByteString
-> (Region -> Endpoint)
-> Maybe Seconds
-> (Status -> Bool)
-> (Status -> [Header] -> ByteStringLazy -> Error)
-> Retry
-> Service
Core.Service
    { $sel:_serviceAbbrev:Service :: Abbrev
Core._serviceAbbrev = Abbrev
"KafkaConnect",
      $sel:_serviceSigner:Service :: Signer
Core._serviceSigner = Signer
Sign.v4,
      $sel:_serviceEndpointPrefix:Service :: ByteString
Core._serviceEndpointPrefix = ByteString
"kafkaconnect",
      $sel:_serviceSigningName:Service :: ByteString
Core._serviceSigningName = ByteString
"kafkaconnect",
      $sel:_serviceVersion:Service :: ByteString
Core._serviceVersion = ByteString
"2021-09-14",
      $sel:_serviceEndpoint:Service :: Region -> Endpoint
Core._serviceEndpoint =
        Service -> Region -> Endpoint
Core.defaultEndpoint Service
defaultService,
      $sel:_serviceTimeout:Service :: Maybe Seconds
Core._serviceTimeout = Seconds -> Maybe Seconds
forall a. a -> Maybe a
Prelude.Just Seconds
70,
      $sel:_serviceCheck:Service :: Status -> Bool
Core._serviceCheck = Status -> Bool
Core.statusSuccess,
      $sel:_serviceError:Service :: Status -> [Header] -> ByteStringLazy -> Error
Core._serviceError =
        Abbrev -> Status -> [Header] -> ByteStringLazy -> Error
Core.parseJSONError Abbrev
"KafkaConnect",
      $sel:_serviceRetry:Service :: Retry
Core._serviceRetry = Retry
retry
    }
  where
    retry :: Retry
retry =
      Exponential :: Double -> Int -> Int -> (ServiceError -> Maybe Text) -> Retry
Core.Exponential
        { $sel:_retryBase:Exponential :: Double
Core._retryBase = Double
5.0e-2,
          $sel:_retryGrowth:Exponential :: Int
Core._retryGrowth = Int
2,
          $sel:_retryAttempts:Exponential :: Int
Core._retryAttempts = Int
5,
          $sel:_retryCheck:Exponential :: ServiceError -> Maybe Text
Core._retryCheck = ServiceError -> Maybe Text
forall a. IsString a => ServiceError -> Maybe a
check
        }
    check :: ServiceError -> Maybe a
check ServiceError
e
      | Getting Any ServiceError ServiceError -> ServiceError -> Bool
forall s a. Getting Any s a -> s -> Bool
Lens.has
          ( ErrorCode -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"ThrottledException"
              Getting Any ServiceError ServiceError
-> Getting Any ServiceError ServiceError
-> Getting Any ServiceError ServiceError
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Int -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
          )
          ServiceError
e =
        a -> Maybe a
forall a. a -> Maybe a
Prelude.Just a
"throttled_exception"
      | Getting Any ServiceError ServiceError -> ServiceError -> Bool
forall s a. Getting Any s a -> s -> Bool
Lens.has (Int -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
429) ServiceError
e =
        a -> Maybe a
forall a. a -> Maybe a
Prelude.Just a
"too_many_requests"
      | Getting Any ServiceError ServiceError -> ServiceError -> Bool
forall s a. Getting Any s a -> s -> Bool
Lens.has
          ( ErrorCode -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"ThrottlingException"
              Getting Any ServiceError ServiceError
-> Getting Any ServiceError ServiceError
-> Getting Any ServiceError ServiceError
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Int -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
          )
          ServiceError
e =
        a -> Maybe a
forall a. a -> Maybe a
Prelude.Just a
"throttling_exception"
      | Getting Any ServiceError ServiceError -> ServiceError -> Bool
forall s a. Getting Any s a -> s -> Bool
Lens.has
          ( ErrorCode -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"Throttling"
              Getting Any ServiceError ServiceError
-> Getting Any ServiceError ServiceError
-> Getting Any ServiceError ServiceError
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Int -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
          )
          ServiceError
e =
        a -> Maybe a
forall a. a -> Maybe a
Prelude.Just a
"throttling"
      | Getting Any ServiceError ServiceError -> ServiceError -> Bool
forall s a. Getting Any s a -> s -> Bool
Lens.has
          ( ErrorCode -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode
              ErrorCode
"ProvisionedThroughputExceededException"
              Getting Any ServiceError ServiceError
-> Getting Any ServiceError ServiceError
-> Getting Any ServiceError ServiceError
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Int -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
          )
          ServiceError
e =
        a -> Maybe a
forall a. a -> Maybe a
Prelude.Just a
"throughput_exceeded"
      | Getting Any ServiceError ServiceError -> ServiceError -> Bool
forall s a. Getting Any s a -> s -> Bool
Lens.has (Int -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
504) ServiceError
e =
        a -> Maybe a
forall a. a -> Maybe a
Prelude.Just a
"gateway_timeout"
      | Getting Any ServiceError ServiceError -> ServiceError -> Bool
forall s a. Getting Any s a -> s -> Bool
Lens.has
          ( ErrorCode -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"RequestThrottledException"
              Getting Any ServiceError ServiceError
-> Getting Any ServiceError ServiceError
-> Getting Any ServiceError ServiceError
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Int -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
          )
          ServiceError
e =
        a -> Maybe a
forall a. a -> Maybe a
Prelude.Just a
"request_throttled_exception"
      | Getting Any ServiceError ServiceError -> ServiceError -> Bool
forall s a. Getting Any s a -> s -> Bool
Lens.has (Int -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
502) ServiceError
e =
        a -> Maybe a
forall a. a -> Maybe a
Prelude.Just a
"bad_gateway"
      | Getting Any ServiceError ServiceError -> ServiceError -> Bool
forall s a. Getting Any s a -> s -> Bool
Lens.has (Int -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
503) ServiceError
e =
        a -> Maybe a
forall a. a -> Maybe a
Prelude.Just a
"service_unavailable"
      | Getting Any ServiceError ServiceError -> ServiceError -> Bool
forall s a. Getting Any s a -> s -> Bool
Lens.has (Int -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
500) ServiceError
e =
        a -> Maybe a
forall a. a -> Maybe a
Prelude.Just a
"general_server_error"
      | Getting Any ServiceError ServiceError -> ServiceError -> Bool
forall s a. Getting Any s a -> s -> Bool
Lens.has (Int -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
509) ServiceError
e =
        a -> Maybe a
forall a. a -> Maybe a
Prelude.Just a
"limit_exceeded"
      | Bool
Prelude.otherwise = Maybe a
forall a. Maybe a
Prelude.Nothing

-- | HTTP Status Code 409: Conflict. A resource with this name already
-- exists. Retry your request with another name.
_ConflictException :: Core.AsError a => Lens.Getting (Prelude.First Core.ServiceError) a Core.ServiceError
_ConflictException :: Getting (First ServiceError) a ServiceError
_ConflictException =
  Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
forall a.
AsError a =>
Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
Core._MatchServiceError
    Service
defaultService
    ErrorCode
"ConflictException"
    Getting (First ServiceError) a ServiceError
-> ((ServiceError -> Const (First ServiceError) ServiceError)
    -> ServiceError -> Const (First ServiceError) ServiceError)
-> Getting (First ServiceError) a ServiceError
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Int
-> (ServiceError -> Const (First ServiceError) ServiceError)
-> ServiceError
-> Const (First ServiceError) ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
409

-- | HTTP Status Code 403: Access forbidden. Correct your credentials and
-- then retry your request.
_ForbiddenException :: Core.AsError a => Lens.Getting (Prelude.First Core.ServiceError) a Core.ServiceError
_ForbiddenException :: Getting (First ServiceError) a ServiceError
_ForbiddenException =
  Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
forall a.
AsError a =>
Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
Core._MatchServiceError
    Service
defaultService
    ErrorCode
"ForbiddenException"
    Getting (First ServiceError) a ServiceError
-> ((ServiceError -> Const (First ServiceError) ServiceError)
    -> ServiceError -> Const (First ServiceError) ServiceError)
-> Getting (First ServiceError) a ServiceError
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Int
-> (ServiceError -> Const (First ServiceError) ServiceError)
-> ServiceError
-> Const (First ServiceError) ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
403

-- | HTTP Status Code 404: Resource not found due to incorrect input. Correct
-- your request and then retry it.
_NotFoundException :: Core.AsError a => Lens.Getting (Prelude.First Core.ServiceError) a Core.ServiceError
_NotFoundException :: Getting (First ServiceError) a ServiceError
_NotFoundException =
  Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
forall a.
AsError a =>
Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
Core._MatchServiceError
    Service
defaultService
    ErrorCode
"NotFoundException"
    Getting (First ServiceError) a ServiceError
-> ((ServiceError -> Const (First ServiceError) ServiceError)
    -> ServiceError -> Const (First ServiceError) ServiceError)
-> Getting (First ServiceError) a ServiceError
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Int
-> (ServiceError -> Const (First ServiceError) ServiceError)
-> ServiceError
-> Const (First ServiceError) ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
404

-- | HTTP Status Code 429: Limit exceeded. Resource limit reached.
_TooManyRequestsException :: Core.AsError a => Lens.Getting (Prelude.First Core.ServiceError) a Core.ServiceError
_TooManyRequestsException :: Getting (First ServiceError) a ServiceError
_TooManyRequestsException =
  Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
forall a.
AsError a =>
Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
Core._MatchServiceError
    Service
defaultService
    ErrorCode
"TooManyRequestsException"
    Getting (First ServiceError) a ServiceError
-> ((ServiceError -> Const (First ServiceError) ServiceError)
    -> ServiceError -> Const (First ServiceError) ServiceError)
-> Getting (First ServiceError) a ServiceError
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Int
-> (ServiceError -> Const (First ServiceError) ServiceError)
-> ServiceError
-> Const (First ServiceError) ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
429

-- | HTTP Status Code 500: Unexpected internal server error. Retrying your
-- request might resolve the issue.
_InternalServerErrorException :: Core.AsError a => Lens.Getting (Prelude.First Core.ServiceError) a Core.ServiceError
_InternalServerErrorException :: Getting (First ServiceError) a ServiceError
_InternalServerErrorException =
  Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
forall a.
AsError a =>
Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
Core._MatchServiceError
    Service
defaultService
    ErrorCode
"InternalServerErrorException"
    Getting (First ServiceError) a ServiceError
-> ((ServiceError -> Const (First ServiceError) ServiceError)
    -> ServiceError -> Const (First ServiceError) ServiceError)
-> Getting (First ServiceError) a ServiceError
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Int
-> (ServiceError -> Const (First ServiceError) ServiceError)
-> ServiceError
-> Const (First ServiceError) ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
500

-- | HTTP Status Code 503: Service Unavailable. Retrying your request in some
-- time might resolve the issue.
_ServiceUnavailableException :: Core.AsError a => Lens.Getting (Prelude.First Core.ServiceError) a Core.ServiceError
_ServiceUnavailableException :: Getting (First ServiceError) a ServiceError
_ServiceUnavailableException =
  Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
forall a.
AsError a =>
Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
Core._MatchServiceError
    Service
defaultService
    ErrorCode
"ServiceUnavailableException"
    Getting (First ServiceError) a ServiceError
-> ((ServiceError -> Const (First ServiceError) ServiceError)
    -> ServiceError -> Const (First ServiceError) ServiceError)
-> Getting (First ServiceError) a ServiceError
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Int
-> (ServiceError -> Const (First ServiceError) ServiceError)
-> ServiceError
-> Const (First ServiceError) ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
503

-- | HTTP Status Code 401: Unauthorized request. The provided credentials
-- couldn\'t be validated.
_UnauthorizedException :: Core.AsError a => Lens.Getting (Prelude.First Core.ServiceError) a Core.ServiceError
_UnauthorizedException :: Getting (First ServiceError) a ServiceError
_UnauthorizedException =
  Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
forall a.
AsError a =>
Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
Core._MatchServiceError
    Service
defaultService
    ErrorCode
"UnauthorizedException"
    Getting (First ServiceError) a ServiceError
-> ((ServiceError -> Const (First ServiceError) ServiceError)
    -> ServiceError -> Const (First ServiceError) ServiceError)
-> Getting (First ServiceError) a ServiceError
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Int
-> (ServiceError -> Const (First ServiceError) ServiceError)
-> ServiceError
-> Const (First ServiceError) ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
401

-- | HTTP Status Code 400: Bad request due to incorrect input. Correct your
-- request and then retry it.
_BadRequestException :: Core.AsError a => Lens.Getting (Prelude.First Core.ServiceError) a Core.ServiceError
_BadRequestException :: Getting (First ServiceError) a ServiceError
_BadRequestException =
  Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
forall a.
AsError a =>
Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
Core._MatchServiceError
    Service
defaultService
    ErrorCode
"BadRequestException"
    Getting (First ServiceError) a ServiceError
-> ((ServiceError -> Const (First ServiceError) ServiceError)
    -> ServiceError -> Const (First ServiceError) ServiceError)
-> Getting (First ServiceError) a ServiceError
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Int
-> (ServiceError -> Const (First ServiceError) ServiceError)
-> ServiceError
-> Const (First ServiceError) ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400