{-# 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.GreengrassV2.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.GreengrassV2.Types
  ( -- * Service Configuration
    defaultService,

    -- * Errors
    _AccessDeniedException,
    _ConflictException,
    _InternalServerException,
    _RequestAlreadyInProgressException,
    _ResourceNotFoundException,
    _ServiceQuotaExceededException,
    _ThrottlingException,
    _ValidationException,

    -- * CloudComponentState
    CloudComponentState (..),

    -- * ComponentDependencyType
    ComponentDependencyType (..),

    -- * ComponentVisibilityScope
    ComponentVisibilityScope (..),

    -- * CoreDeviceStatus
    CoreDeviceStatus (..),

    -- * DeploymentComponentUpdatePolicyAction
    DeploymentComponentUpdatePolicyAction (..),

    -- * DeploymentFailureHandlingPolicy
    DeploymentFailureHandlingPolicy (..),

    -- * DeploymentHistoryFilter
    DeploymentHistoryFilter (..),

    -- * DeploymentStatus
    DeploymentStatus (..),

    -- * EffectiveDeploymentExecutionStatus
    EffectiveDeploymentExecutionStatus (..),

    -- * InstalledComponentLifecycleState
    InstalledComponentLifecycleState (..),

    -- * InstalledComponentTopologyFilter
    InstalledComponentTopologyFilter (..),

    -- * IoTJobAbortAction
    IoTJobAbortAction (..),

    -- * IoTJobExecutionFailureType
    IoTJobExecutionFailureType (..),

    -- * LambdaEventSourceType
    LambdaEventSourceType (..),

    -- * LambdaFilesystemPermission
    LambdaFilesystemPermission (..),

    -- * LambdaInputPayloadEncodingType
    LambdaInputPayloadEncodingType (..),

    -- * LambdaIsolationMode
    LambdaIsolationMode (..),

    -- * RecipeOutputFormat
    RecipeOutputFormat (..),

    -- * VendorGuidance
    VendorGuidance (..),

    -- * AssociateClientDeviceWithCoreDeviceEntry
    AssociateClientDeviceWithCoreDeviceEntry (..),
    newAssociateClientDeviceWithCoreDeviceEntry,
    associateClientDeviceWithCoreDeviceEntry_thingName,

    -- * AssociateClientDeviceWithCoreDeviceErrorEntry
    AssociateClientDeviceWithCoreDeviceErrorEntry (..),
    newAssociateClientDeviceWithCoreDeviceErrorEntry,
    associateClientDeviceWithCoreDeviceErrorEntry_code,
    associateClientDeviceWithCoreDeviceErrorEntry_message,
    associateClientDeviceWithCoreDeviceErrorEntry_thingName,

    -- * AssociatedClientDevice
    AssociatedClientDevice (..),
    newAssociatedClientDevice,
    associatedClientDevice_associationTimestamp,
    associatedClientDevice_thingName,

    -- * CloudComponentStatus
    CloudComponentStatus (..),
    newCloudComponentStatus,
    cloudComponentStatus_componentState,
    cloudComponentStatus_errors,
    cloudComponentStatus_message,
    cloudComponentStatus_vendorGuidance,
    cloudComponentStatus_vendorGuidanceMessage,

    -- * Component
    Component (..),
    newComponent,
    component_arn,
    component_componentName,
    component_latestVersion,

    -- * ComponentCandidate
    ComponentCandidate (..),
    newComponentCandidate,
    componentCandidate_componentName,
    componentCandidate_componentVersion,
    componentCandidate_versionRequirements,

    -- * ComponentConfigurationUpdate
    ComponentConfigurationUpdate (..),
    newComponentConfigurationUpdate,
    componentConfigurationUpdate_merge,
    componentConfigurationUpdate_reset,

    -- * ComponentDependencyRequirement
    ComponentDependencyRequirement (..),
    newComponentDependencyRequirement,
    componentDependencyRequirement_dependencyType,
    componentDependencyRequirement_versionRequirement,

    -- * ComponentDeploymentSpecification
    ComponentDeploymentSpecification (..),
    newComponentDeploymentSpecification,
    componentDeploymentSpecification_componentVersion,
    componentDeploymentSpecification_configurationUpdate,
    componentDeploymentSpecification_runWith,

    -- * ComponentLatestVersion
    ComponentLatestVersion (..),
    newComponentLatestVersion,
    componentLatestVersion_arn,
    componentLatestVersion_componentVersion,
    componentLatestVersion_creationTimestamp,
    componentLatestVersion_description,
    componentLatestVersion_platforms,
    componentLatestVersion_publisher,

    -- * ComponentPlatform
    ComponentPlatform (..),
    newComponentPlatform,
    componentPlatform_attributes,
    componentPlatform_name,

    -- * ComponentRunWith
    ComponentRunWith (..),
    newComponentRunWith,
    componentRunWith_posixUser,
    componentRunWith_systemResourceLimits,
    componentRunWith_windowsUser,

    -- * ComponentVersionListItem
    ComponentVersionListItem (..),
    newComponentVersionListItem,
    componentVersionListItem_arn,
    componentVersionListItem_componentName,
    componentVersionListItem_componentVersion,

    -- * ConnectivityInfo
    ConnectivityInfo (..),
    newConnectivityInfo,
    connectivityInfo_hostAddress,
    connectivityInfo_id,
    connectivityInfo_metadata,
    connectivityInfo_portNumber,

    -- * CoreDevice
    CoreDevice (..),
    newCoreDevice,
    coreDevice_coreDeviceThingName,
    coreDevice_lastStatusUpdateTimestamp,
    coreDevice_status,

    -- * Deployment
    Deployment (..),
    newDeployment,
    deployment_creationTimestamp,
    deployment_deploymentId,
    deployment_deploymentName,
    deployment_deploymentStatus,
    deployment_isLatestForTarget,
    deployment_parentTargetArn,
    deployment_revisionId,
    deployment_targetArn,

    -- * DeploymentComponentUpdatePolicy
    DeploymentComponentUpdatePolicy (..),
    newDeploymentComponentUpdatePolicy,
    deploymentComponentUpdatePolicy_action,
    deploymentComponentUpdatePolicy_timeoutInSeconds,

    -- * DeploymentConfigurationValidationPolicy
    DeploymentConfigurationValidationPolicy (..),
    newDeploymentConfigurationValidationPolicy,
    deploymentConfigurationValidationPolicy_timeoutInSeconds,

    -- * DeploymentIoTJobConfiguration
    DeploymentIoTJobConfiguration (..),
    newDeploymentIoTJobConfiguration,
    deploymentIoTJobConfiguration_abortConfig,
    deploymentIoTJobConfiguration_jobExecutionsRolloutConfig,
    deploymentIoTJobConfiguration_timeoutConfig,

    -- * DeploymentPolicies
    DeploymentPolicies (..),
    newDeploymentPolicies,
    deploymentPolicies_componentUpdatePolicy,
    deploymentPolicies_configurationValidationPolicy,
    deploymentPolicies_failureHandlingPolicy,

    -- * DisassociateClientDeviceFromCoreDeviceEntry
    DisassociateClientDeviceFromCoreDeviceEntry (..),
    newDisassociateClientDeviceFromCoreDeviceEntry,
    disassociateClientDeviceFromCoreDeviceEntry_thingName,

    -- * DisassociateClientDeviceFromCoreDeviceErrorEntry
    DisassociateClientDeviceFromCoreDeviceErrorEntry (..),
    newDisassociateClientDeviceFromCoreDeviceErrorEntry,
    disassociateClientDeviceFromCoreDeviceErrorEntry_code,
    disassociateClientDeviceFromCoreDeviceErrorEntry_message,
    disassociateClientDeviceFromCoreDeviceErrorEntry_thingName,

    -- * EffectiveDeployment
    EffectiveDeployment (..),
    newEffectiveDeployment,
    effectiveDeployment_description,
    effectiveDeployment_iotJobArn,
    effectiveDeployment_iotJobId,
    effectiveDeployment_reason,
    effectiveDeployment_statusDetails,
    effectiveDeployment_deploymentId,
    effectiveDeployment_deploymentName,
    effectiveDeployment_targetArn,
    effectiveDeployment_coreDeviceExecutionStatus,
    effectiveDeployment_creationTimestamp,
    effectiveDeployment_modifiedTimestamp,

    -- * EffectiveDeploymentStatusDetails
    EffectiveDeploymentStatusDetails (..),
    newEffectiveDeploymentStatusDetails,
    effectiveDeploymentStatusDetails_errorStack,
    effectiveDeploymentStatusDetails_errorTypes,

    -- * InstalledComponent
    InstalledComponent (..),
    newInstalledComponent,
    installedComponent_componentName,
    installedComponent_componentVersion,
    installedComponent_isRoot,
    installedComponent_lastInstallationSource,
    installedComponent_lastReportedTimestamp,
    installedComponent_lastStatusChangeTimestamp,
    installedComponent_lifecycleState,
    installedComponent_lifecycleStateDetails,
    installedComponent_lifecycleStatusCodes,

    -- * IoTJobAbortConfig
    IoTJobAbortConfig (..),
    newIoTJobAbortConfig,
    ioTJobAbortConfig_criteriaList,

    -- * IoTJobAbortCriteria
    IoTJobAbortCriteria (..),
    newIoTJobAbortCriteria,
    ioTJobAbortCriteria_failureType,
    ioTJobAbortCriteria_action,
    ioTJobAbortCriteria_thresholdPercentage,
    ioTJobAbortCriteria_minNumberOfExecutedThings,

    -- * IoTJobExecutionsRolloutConfig
    IoTJobExecutionsRolloutConfig (..),
    newIoTJobExecutionsRolloutConfig,
    ioTJobExecutionsRolloutConfig_exponentialRate,
    ioTJobExecutionsRolloutConfig_maximumPerMinute,

    -- * IoTJobExponentialRolloutRate
    IoTJobExponentialRolloutRate (..),
    newIoTJobExponentialRolloutRate,
    ioTJobExponentialRolloutRate_baseRatePerMinute,
    ioTJobExponentialRolloutRate_incrementFactor,
    ioTJobExponentialRolloutRate_rateIncreaseCriteria,

    -- * IoTJobRateIncreaseCriteria
    IoTJobRateIncreaseCriteria (..),
    newIoTJobRateIncreaseCriteria,
    ioTJobRateIncreaseCriteria_numberOfNotifiedThings,
    ioTJobRateIncreaseCriteria_numberOfSucceededThings,

    -- * IoTJobTimeoutConfig
    IoTJobTimeoutConfig (..),
    newIoTJobTimeoutConfig,
    ioTJobTimeoutConfig_inProgressTimeoutInMinutes,

    -- * LambdaContainerParams
    LambdaContainerParams (..),
    newLambdaContainerParams,
    lambdaContainerParams_devices,
    lambdaContainerParams_memorySizeInKB,
    lambdaContainerParams_mountROSysfs,
    lambdaContainerParams_volumes,

    -- * LambdaDeviceMount
    LambdaDeviceMount (..),
    newLambdaDeviceMount,
    lambdaDeviceMount_addGroupOwner,
    lambdaDeviceMount_permission,
    lambdaDeviceMount_path,

    -- * LambdaEventSource
    LambdaEventSource (..),
    newLambdaEventSource,
    lambdaEventSource_topic,
    lambdaEventSource_type,

    -- * LambdaExecutionParameters
    LambdaExecutionParameters (..),
    newLambdaExecutionParameters,
    lambdaExecutionParameters_environmentVariables,
    lambdaExecutionParameters_eventSources,
    lambdaExecutionParameters_execArgs,
    lambdaExecutionParameters_inputPayloadEncodingType,
    lambdaExecutionParameters_linuxProcessParams,
    lambdaExecutionParameters_maxIdleTimeInSeconds,
    lambdaExecutionParameters_maxInstancesCount,
    lambdaExecutionParameters_maxQueueSize,
    lambdaExecutionParameters_pinned,
    lambdaExecutionParameters_statusTimeoutInSeconds,
    lambdaExecutionParameters_timeoutInSeconds,

    -- * LambdaFunctionRecipeSource
    LambdaFunctionRecipeSource (..),
    newLambdaFunctionRecipeSource,
    lambdaFunctionRecipeSource_componentDependencies,
    lambdaFunctionRecipeSource_componentLambdaParameters,
    lambdaFunctionRecipeSource_componentName,
    lambdaFunctionRecipeSource_componentPlatforms,
    lambdaFunctionRecipeSource_componentVersion,
    lambdaFunctionRecipeSource_lambdaArn,

    -- * LambdaLinuxProcessParams
    LambdaLinuxProcessParams (..),
    newLambdaLinuxProcessParams,
    lambdaLinuxProcessParams_containerParams,
    lambdaLinuxProcessParams_isolationMode,

    -- * LambdaVolumeMount
    LambdaVolumeMount (..),
    newLambdaVolumeMount,
    lambdaVolumeMount_addGroupOwner,
    lambdaVolumeMount_permission,
    lambdaVolumeMount_sourcePath,
    lambdaVolumeMount_destinationPath,

    -- * ResolvedComponentVersion
    ResolvedComponentVersion (..),
    newResolvedComponentVersion,
    resolvedComponentVersion_arn,
    resolvedComponentVersion_componentName,
    resolvedComponentVersion_componentVersion,
    resolvedComponentVersion_message,
    resolvedComponentVersion_recipe,
    resolvedComponentVersion_vendorGuidance,

    -- * SystemResourceLimits
    SystemResourceLimits (..),
    newSystemResourceLimits,
    systemResourceLimits_cpus,
    systemResourceLimits_memory,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import Amazonka.GreengrassV2.Types.AssociateClientDeviceWithCoreDeviceEntry
import Amazonka.GreengrassV2.Types.AssociateClientDeviceWithCoreDeviceErrorEntry
import Amazonka.GreengrassV2.Types.AssociatedClientDevice
import Amazonka.GreengrassV2.Types.CloudComponentState
import Amazonka.GreengrassV2.Types.CloudComponentStatus
import Amazonka.GreengrassV2.Types.Component
import Amazonka.GreengrassV2.Types.ComponentCandidate
import Amazonka.GreengrassV2.Types.ComponentConfigurationUpdate
import Amazonka.GreengrassV2.Types.ComponentDependencyRequirement
import Amazonka.GreengrassV2.Types.ComponentDependencyType
import Amazonka.GreengrassV2.Types.ComponentDeploymentSpecification
import Amazonka.GreengrassV2.Types.ComponentLatestVersion
import Amazonka.GreengrassV2.Types.ComponentPlatform
import Amazonka.GreengrassV2.Types.ComponentRunWith
import Amazonka.GreengrassV2.Types.ComponentVersionListItem
import Amazonka.GreengrassV2.Types.ComponentVisibilityScope
import Amazonka.GreengrassV2.Types.ConnectivityInfo
import Amazonka.GreengrassV2.Types.CoreDevice
import Amazonka.GreengrassV2.Types.CoreDeviceStatus
import Amazonka.GreengrassV2.Types.Deployment
import Amazonka.GreengrassV2.Types.DeploymentComponentUpdatePolicy
import Amazonka.GreengrassV2.Types.DeploymentComponentUpdatePolicyAction
import Amazonka.GreengrassV2.Types.DeploymentConfigurationValidationPolicy
import Amazonka.GreengrassV2.Types.DeploymentFailureHandlingPolicy
import Amazonka.GreengrassV2.Types.DeploymentHistoryFilter
import Amazonka.GreengrassV2.Types.DeploymentIoTJobConfiguration
import Amazonka.GreengrassV2.Types.DeploymentPolicies
import Amazonka.GreengrassV2.Types.DeploymentStatus
import Amazonka.GreengrassV2.Types.DisassociateClientDeviceFromCoreDeviceEntry
import Amazonka.GreengrassV2.Types.DisassociateClientDeviceFromCoreDeviceErrorEntry
import Amazonka.GreengrassV2.Types.EffectiveDeployment
import Amazonka.GreengrassV2.Types.EffectiveDeploymentExecutionStatus
import Amazonka.GreengrassV2.Types.EffectiveDeploymentStatusDetails
import Amazonka.GreengrassV2.Types.InstalledComponent
import Amazonka.GreengrassV2.Types.InstalledComponentLifecycleState
import Amazonka.GreengrassV2.Types.InstalledComponentTopologyFilter
import Amazonka.GreengrassV2.Types.IoTJobAbortAction
import Amazonka.GreengrassV2.Types.IoTJobAbortConfig
import Amazonka.GreengrassV2.Types.IoTJobAbortCriteria
import Amazonka.GreengrassV2.Types.IoTJobExecutionFailureType
import Amazonka.GreengrassV2.Types.IoTJobExecutionsRolloutConfig
import Amazonka.GreengrassV2.Types.IoTJobExponentialRolloutRate
import Amazonka.GreengrassV2.Types.IoTJobRateIncreaseCriteria
import Amazonka.GreengrassV2.Types.IoTJobTimeoutConfig
import Amazonka.GreengrassV2.Types.LambdaContainerParams
import Amazonka.GreengrassV2.Types.LambdaDeviceMount
import Amazonka.GreengrassV2.Types.LambdaEventSource
import Amazonka.GreengrassV2.Types.LambdaEventSourceType
import Amazonka.GreengrassV2.Types.LambdaExecutionParameters
import Amazonka.GreengrassV2.Types.LambdaFilesystemPermission
import Amazonka.GreengrassV2.Types.LambdaFunctionRecipeSource
import Amazonka.GreengrassV2.Types.LambdaInputPayloadEncodingType
import Amazonka.GreengrassV2.Types.LambdaIsolationMode
import Amazonka.GreengrassV2.Types.LambdaLinuxProcessParams
import Amazonka.GreengrassV2.Types.LambdaVolumeMount
import Amazonka.GreengrassV2.Types.RecipeOutputFormat
import Amazonka.GreengrassV2.Types.ResolvedComponentVersion
import Amazonka.GreengrassV2.Types.SystemResourceLimits
import Amazonka.GreengrassV2.Types.VendorGuidance
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Sign.V4 as Sign

-- | API version @2020-11-30@ of the Amazon IoT Greengrass V2 SDK configuration.
defaultService :: Core.Service
defaultService :: Service
defaultService =
  Core.Service
    { $sel:abbrev:Service :: Abbrev
Core.abbrev = Abbrev
"GreengrassV2",
      $sel:signer:Service :: Signer
Core.signer = Signer
Sign.v4,
      $sel:endpointPrefix:Service :: ByteString
Core.endpointPrefix = ByteString
"greengrass",
      $sel:signingName:Service :: ByteString
Core.signingName = ByteString
"greengrass",
      $sel:version:Service :: ByteString
Core.version = ByteString
"2020-11-30",
      $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
"GreengrassV2",
      $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

-- | You don\'t have permission to perform the action.
_AccessDeniedException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_AccessDeniedException :: forall a. AsError a => Fold a ServiceError
_AccessDeniedException =
  forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
    Service
defaultService
    ErrorCode
"AccessDeniedException"
    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

-- | Your request has conflicting operations. This can occur if you\'re
-- trying to perform more than one operation on the same resource at the
-- same time.
_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

-- | IoT Greengrass can\'t process your request right now. Try again later.
_InternalServerException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_InternalServerException :: forall a. AsError a => Fold a ServiceError
_InternalServerException =
  forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
    Service
defaultService
    ErrorCode
"InternalServerException"
    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 is already in progress. This exception occurs when you use a
-- client token for multiple requests while IoT Greengrass is still
-- processing an earlier request that uses the same client token.
_RequestAlreadyInProgressException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_RequestAlreadyInProgressException :: forall a. AsError a => Fold a ServiceError
_RequestAlreadyInProgressException =
  forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
    Service
defaultService
    ErrorCode
"RequestAlreadyInProgressException"
    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

-- | The requested resource can\'t be 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

-- | Your request exceeds a service quota. For example, you might have the
-- maximum number of components that you can create.
_ServiceQuotaExceededException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ServiceQuotaExceededException :: forall a. AsError a => Fold a ServiceError
_ServiceQuotaExceededException =
  forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
    Service
defaultService
    ErrorCode
"ServiceQuotaExceededException"
    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
402

-- | Your request exceeded a request rate quota. For example, you might have
-- exceeded the amount of times that you can retrieve device or deployment
-- status per second.
_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 request isn\'t valid. This can occur if your request contains
-- malformed JSON or unsupported characters.
_ValidationException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ValidationException :: forall a. AsError a => Fold a ServiceError
_ValidationException =
  forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
    Service
defaultService
    ErrorCode
"ValidationException"
    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