{-# LANGUAGE DisambiguateRecordFields #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.LookoutVision.Types
(
defaultService,
_AccessDeniedException,
_ConflictException,
_InternalServerException,
_ResourceNotFoundException,
_ServiceQuotaExceededException,
_ThrottlingException,
_ValidationException,
DatasetStatus (..),
ModelHostingStatus (..),
ModelPackagingJobStatus (..),
ModelStatus (..),
TargetDevice (..),
TargetPlatformAccelerator (..),
TargetPlatformArch (..),
TargetPlatformOs (..),
Anomaly (..),
newAnomaly,
anomaly_name,
anomaly_pixelAnomaly,
DatasetDescription (..),
newDatasetDescription,
datasetDescription_creationTimestamp,
datasetDescription_datasetType,
datasetDescription_imageStats,
datasetDescription_lastUpdatedTimestamp,
datasetDescription_projectName,
datasetDescription_status,
datasetDescription_statusMessage,
DatasetGroundTruthManifest (..),
newDatasetGroundTruthManifest,
datasetGroundTruthManifest_s3Object,
DatasetImageStats (..),
newDatasetImageStats,
datasetImageStats_anomaly,
datasetImageStats_labeled,
datasetImageStats_normal,
datasetImageStats_total,
DatasetMetadata (..),
newDatasetMetadata,
datasetMetadata_creationTimestamp,
datasetMetadata_datasetType,
datasetMetadata_status,
datasetMetadata_statusMessage,
DatasetSource (..),
newDatasetSource,
datasetSource_groundTruthManifest,
DetectAnomalyResult (..),
newDetectAnomalyResult,
detectAnomalyResult_anomalies,
detectAnomalyResult_anomalyMask,
detectAnomalyResult_confidence,
detectAnomalyResult_isAnomalous,
detectAnomalyResult_source,
GreengrassConfiguration (..),
newGreengrassConfiguration,
greengrassConfiguration_compilerOptions,
greengrassConfiguration_componentDescription,
greengrassConfiguration_componentVersion,
greengrassConfiguration_tags,
greengrassConfiguration_targetDevice,
greengrassConfiguration_targetPlatform,
greengrassConfiguration_s3OutputLocation,
greengrassConfiguration_componentName,
GreengrassOutputDetails (..),
newGreengrassOutputDetails,
greengrassOutputDetails_componentName,
greengrassOutputDetails_componentVersion,
greengrassOutputDetails_componentVersionArn,
ImageSource (..),
newImageSource,
imageSource_type,
InputS3Object (..),
newInputS3Object,
inputS3Object_versionId,
inputS3Object_bucket,
inputS3Object_key,
ModelDescription (..),
newModelDescription,
modelDescription_creationTimestamp,
modelDescription_description,
modelDescription_evaluationEndTimestamp,
modelDescription_evaluationManifest,
modelDescription_evaluationResult,
modelDescription_kmsKeyId,
modelDescription_maxInferenceUnits,
modelDescription_minInferenceUnits,
modelDescription_modelArn,
modelDescription_modelVersion,
modelDescription_outputConfig,
modelDescription_performance,
modelDescription_status,
modelDescription_statusMessage,
ModelMetadata (..),
newModelMetadata,
modelMetadata_creationTimestamp,
modelMetadata_description,
modelMetadata_modelArn,
modelMetadata_modelVersion,
modelMetadata_performance,
modelMetadata_status,
modelMetadata_statusMessage,
ModelPackagingConfiguration (..),
newModelPackagingConfiguration,
modelPackagingConfiguration_greengrass,
ModelPackagingDescription (..),
newModelPackagingDescription,
modelPackagingDescription_creationTimestamp,
modelPackagingDescription_jobName,
modelPackagingDescription_lastUpdatedTimestamp,
modelPackagingDescription_modelPackagingConfiguration,
modelPackagingDescription_modelPackagingJobDescription,
modelPackagingDescription_modelPackagingMethod,
modelPackagingDescription_modelPackagingOutputDetails,
modelPackagingDescription_modelVersion,
modelPackagingDescription_projectName,
modelPackagingDescription_status,
modelPackagingDescription_statusMessage,
ModelPackagingJobMetadata (..),
newModelPackagingJobMetadata,
modelPackagingJobMetadata_creationTimestamp,
modelPackagingJobMetadata_jobName,
modelPackagingJobMetadata_lastUpdatedTimestamp,
modelPackagingJobMetadata_modelPackagingJobDescription,
modelPackagingJobMetadata_modelPackagingMethod,
modelPackagingJobMetadata_modelVersion,
modelPackagingJobMetadata_projectName,
modelPackagingJobMetadata_status,
modelPackagingJobMetadata_statusMessage,
ModelPackagingOutputDetails (..),
newModelPackagingOutputDetails,
modelPackagingOutputDetails_greengrass,
ModelPerformance (..),
newModelPerformance,
modelPerformance_f1Score,
modelPerformance_precision,
modelPerformance_recall,
OutputConfig (..),
newOutputConfig,
outputConfig_s3Location,
OutputS3Object (..),
newOutputS3Object,
outputS3Object_bucket,
outputS3Object_key,
PixelAnomaly (..),
newPixelAnomaly,
pixelAnomaly_color,
pixelAnomaly_totalPercentageArea,
ProjectDescription (..),
newProjectDescription,
projectDescription_creationTimestamp,
projectDescription_datasets,
projectDescription_projectArn,
projectDescription_projectName,
ProjectMetadata (..),
newProjectMetadata,
projectMetadata_creationTimestamp,
projectMetadata_projectArn,
projectMetadata_projectName,
S3Location (..),
newS3Location,
s3Location_prefix,
s3Location_bucket,
Tag (..),
newTag,
tag_key,
tag_value,
TargetPlatform (..),
newTargetPlatform,
targetPlatform_accelerator,
targetPlatform_os,
targetPlatform_arch,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import Amazonka.LookoutVision.Types.Anomaly
import Amazonka.LookoutVision.Types.DatasetDescription
import Amazonka.LookoutVision.Types.DatasetGroundTruthManifest
import Amazonka.LookoutVision.Types.DatasetImageStats
import Amazonka.LookoutVision.Types.DatasetMetadata
import Amazonka.LookoutVision.Types.DatasetSource
import Amazonka.LookoutVision.Types.DatasetStatus
import Amazonka.LookoutVision.Types.DetectAnomalyResult
import Amazonka.LookoutVision.Types.GreengrassConfiguration
import Amazonka.LookoutVision.Types.GreengrassOutputDetails
import Amazonka.LookoutVision.Types.ImageSource
import Amazonka.LookoutVision.Types.InputS3Object
import Amazonka.LookoutVision.Types.ModelDescription
import Amazonka.LookoutVision.Types.ModelHostingStatus
import Amazonka.LookoutVision.Types.ModelMetadata
import Amazonka.LookoutVision.Types.ModelPackagingConfiguration
import Amazonka.LookoutVision.Types.ModelPackagingDescription
import Amazonka.LookoutVision.Types.ModelPackagingJobMetadata
import Amazonka.LookoutVision.Types.ModelPackagingJobStatus
import Amazonka.LookoutVision.Types.ModelPackagingOutputDetails
import Amazonka.LookoutVision.Types.ModelPerformance
import Amazonka.LookoutVision.Types.ModelStatus
import Amazonka.LookoutVision.Types.OutputConfig
import Amazonka.LookoutVision.Types.OutputS3Object
import Amazonka.LookoutVision.Types.PixelAnomaly
import Amazonka.LookoutVision.Types.ProjectDescription
import Amazonka.LookoutVision.Types.ProjectMetadata
import Amazonka.LookoutVision.Types.S3Location
import Amazonka.LookoutVision.Types.Tag
import Amazonka.LookoutVision.Types.TargetDevice
import Amazonka.LookoutVision.Types.TargetPlatform
import Amazonka.LookoutVision.Types.TargetPlatformAccelerator
import Amazonka.LookoutVision.Types.TargetPlatformArch
import Amazonka.LookoutVision.Types.TargetPlatformOs
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Sign.V4 as Sign
defaultService :: Core.Service
defaultService :: Service
defaultService =
Core.Service
{ $sel:abbrev:Service :: Abbrev
Core.abbrev = Abbrev
"LookoutVision",
$sel:signer:Service :: Signer
Core.signer = Signer
Sign.v4,
$sel:endpointPrefix:Service :: ByteString
Core.endpointPrefix = ByteString
"lookoutvision",
$sel:signingName:Service :: ByteString
Core.signingName = ByteString
"lookoutvision",
$sel:version:Service :: ByteString
Core.version = ByteString
"2020-11-20",
$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
"LookoutVision",
$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
_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
_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
_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
_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
_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
_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
_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