{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Amazonka.Signer.Waiters where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Signer.DescribeSigningJob
import Amazonka.Signer.Lens
import Amazonka.Signer.Types
newSuccessfulSigningJob :: Core.Wait DescribeSigningJob
newSuccessfulSigningJob :: Wait DescribeSigningJob
newSuccessfulSigningJob =
Wait :: forall a. ByteString -> Int -> Seconds -> [Acceptor a] -> Wait a
Core.Wait
{ $sel:_waitName:Wait :: ByteString
Core._waitName = ByteString
"SuccessfulSigningJob",
$sel:_waitAttempts:Wait :: Int
Core._waitAttempts = Int
25,
$sel:_waitDelay:Wait :: Seconds
Core._waitDelay = Seconds
20,
$sel:_waitAcceptors:Wait :: [Acceptor DescribeSigningJob]
Core._waitAcceptors =
[ CI Text
-> Accept
-> Fold (AWSResponse DescribeSigningJob) (CI Text)
-> Acceptor DescribeSigningJob
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
CI Text
"Succeeded"
Accept
Core.AcceptSuccess
( (Maybe SigningStatus -> f (Maybe SigningStatus))
-> DescribeSigningJobResponse -> f DescribeSigningJobResponse
Lens' DescribeSigningJobResponse (Maybe SigningStatus)
describeSigningJobResponse_status
((Maybe SigningStatus -> f (Maybe SigningStatus))
-> DescribeSigningJobResponse -> f DescribeSigningJobResponse)
-> ((CI Text -> f (CI Text))
-> Maybe SigningStatus -> f (Maybe SigningStatus))
-> (CI Text -> f (CI Text))
-> DescribeSigningJobResponse
-> f DescribeSigningJobResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (SigningStatus -> f SigningStatus)
-> Maybe SigningStatus -> f (Maybe SigningStatus)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
((SigningStatus -> f SigningStatus)
-> Maybe SigningStatus -> f (Maybe SigningStatus))
-> ((CI Text -> f (CI Text)) -> SigningStatus -> f SigningStatus)
-> (CI Text -> f (CI Text))
-> Maybe SigningStatus
-> f (Maybe SigningStatus)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (SigningStatus -> CI Text)
-> (CI Text -> f (CI Text)) -> SigningStatus -> f SigningStatus
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to SigningStatus -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
),
CI Text
-> Accept
-> Fold (AWSResponse DescribeSigningJob) (CI Text)
-> Acceptor DescribeSigningJob
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
CI Text
"Failed"
Accept
Core.AcceptFailure
( (Maybe SigningStatus -> f (Maybe SigningStatus))
-> DescribeSigningJobResponse -> f DescribeSigningJobResponse
Lens' DescribeSigningJobResponse (Maybe SigningStatus)
describeSigningJobResponse_status
((Maybe SigningStatus -> f (Maybe SigningStatus))
-> DescribeSigningJobResponse -> f DescribeSigningJobResponse)
-> ((CI Text -> f (CI Text))
-> Maybe SigningStatus -> f (Maybe SigningStatus))
-> (CI Text -> f (CI Text))
-> DescribeSigningJobResponse
-> f DescribeSigningJobResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (SigningStatus -> f SigningStatus)
-> Maybe SigningStatus -> f (Maybe SigningStatus)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
((SigningStatus -> f SigningStatus)
-> Maybe SigningStatus -> f (Maybe SigningStatus))
-> ((CI Text -> f (CI Text)) -> SigningStatus -> f SigningStatus)
-> (CI Text -> f (CI Text))
-> Maybe SigningStatus
-> f (Maybe SigningStatus)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (SigningStatus -> CI Text)
-> (CI Text -> f (CI Text)) -> SigningStatus -> f SigningStatus
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to SigningStatus -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
),
ErrorCode -> Accept -> Acceptor DescribeSigningJob
forall a. ErrorCode -> Accept -> Acceptor a
Core.matchError
ErrorCode
"ResourceNotFoundException"
Accept
Core.AcceptFailure
]
}