{-# LANGUAGE DisambiguateRecordFields #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Amazonka.Rekognition.Waiters where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import Amazonka.Rekognition.DescribeProjectVersions
import Amazonka.Rekognition.Lens
import Amazonka.Rekognition.Types
newProjectVersionRunning :: Core.Wait DescribeProjectVersions
newProjectVersionRunning :: Wait DescribeProjectVersions
newProjectVersionRunning =
Core.Wait
{ $sel:name:Wait :: ByteString
Core.name = ByteString
"ProjectVersionRunning",
$sel:attempts:Wait :: Int
Core.attempts = Int
40,
$sel:delay:Wait :: Seconds
Core.delay = Seconds
30,
$sel:acceptors:Wait :: [Acceptor DescribeProjectVersions]
Core.acceptors =
[ forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
CI Text
"RUNNING"
Accept
Core.AcceptSuccess
( forall (f :: * -> *) s a. Foldable f => (s -> f a) -> Fold s a
Lens.folding
( forall r s. Getting [r] s [r] -> s -> [r]
Lens.concatOf
( Lens'
DescribeProjectVersionsResponse (Maybe [ProjectVersionDescription])
describeProjectVersionsResponse_projectVersionDescriptions
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
)
)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Lens' ProjectVersionDescription (Maybe ProjectVersionStatus)
projectVersionDescription_status
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to forall a. ToText a => a -> CI Text
Data.toTextCI
),
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAny
CI Text
"FAILED"
Accept
Core.AcceptFailure
( forall (f :: * -> *) s a. Foldable f => (s -> f a) -> Fold s a
Lens.folding
( forall r s. Getting [r] s [r] -> s -> [r]
Lens.concatOf
( Lens'
DescribeProjectVersionsResponse (Maybe [ProjectVersionDescription])
describeProjectVersionsResponse_projectVersionDescriptions
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
)
)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Lens' ProjectVersionDescription (Maybe ProjectVersionStatus)
projectVersionDescription_status
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to forall a. ToText a => a -> CI Text
Data.toTextCI
)
]
}
newProjectVersionTrainingCompleted :: Core.Wait DescribeProjectVersions
newProjectVersionTrainingCompleted :: Wait DescribeProjectVersions
newProjectVersionTrainingCompleted =
Core.Wait
{ $sel:name:Wait :: ByteString
Core.name =
ByteString
"ProjectVersionTrainingCompleted",
$sel:attempts:Wait :: Int
Core.attempts = Int
360,
$sel:delay:Wait :: Seconds
Core.delay = Seconds
120,
$sel:acceptors:Wait :: [Acceptor DescribeProjectVersions]
Core.acceptors =
[ forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
CI Text
"TRAINING_COMPLETED"
Accept
Core.AcceptSuccess
( forall (f :: * -> *) s a. Foldable f => (s -> f a) -> Fold s a
Lens.folding
( forall r s. Getting [r] s [r] -> s -> [r]
Lens.concatOf
( Lens'
DescribeProjectVersionsResponse (Maybe [ProjectVersionDescription])
describeProjectVersionsResponse_projectVersionDescriptions
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
)
)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Lens' ProjectVersionDescription (Maybe ProjectVersionStatus)
projectVersionDescription_status
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to forall a. ToText a => a -> CI Text
Data.toTextCI
),
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAny
CI Text
"TRAINING_FAILED"
Accept
Core.AcceptFailure
( forall (f :: * -> *) s a. Foldable f => (s -> f a) -> Fold s a
Lens.folding
( forall r s. Getting [r] s [r] -> s -> [r]
Lens.concatOf
( Lens'
DescribeProjectVersionsResponse (Maybe [ProjectVersionDescription])
describeProjectVersionsResponse_projectVersionDescriptions
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
)
)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Lens' ProjectVersionDescription (Maybe ProjectVersionStatus)
projectVersionDescription_status
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to forall a. ToText a => a -> CI Text
Data.toTextCI
)
]
}