{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Amazonka.Schemas.Waiters where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Schemas.DescribeCodeBinding
import Amazonka.Schemas.Lens
import Amazonka.Schemas.Types
newCodeBindingExists :: Core.Wait DescribeCodeBinding
newCodeBindingExists :: Wait DescribeCodeBinding
newCodeBindingExists =
Wait :: forall a. ByteString -> Int -> Seconds -> [Acceptor a] -> Wait a
Core.Wait
{ $sel:_waitName:Wait :: ByteString
Core._waitName = ByteString
"CodeBindingExists",
$sel:_waitAttempts:Wait :: Int
Core._waitAttempts = Int
30,
$sel:_waitDelay:Wait :: Seconds
Core._waitDelay = Seconds
2,
$sel:_waitAcceptors:Wait :: [Acceptor DescribeCodeBinding]
Core._waitAcceptors =
[ CI Text
-> Accept
-> Fold (AWSResponse DescribeCodeBinding) (CI Text)
-> Acceptor DescribeCodeBinding
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
CI Text
"CREATE_COMPLETE"
Accept
Core.AcceptSuccess
( (Maybe CodeGenerationStatus -> f (Maybe CodeGenerationStatus))
-> DescribeCodeBindingResponse -> f DescribeCodeBindingResponse
Lens' DescribeCodeBindingResponse (Maybe CodeGenerationStatus)
describeCodeBindingResponse_status
((Maybe CodeGenerationStatus -> f (Maybe CodeGenerationStatus))
-> DescribeCodeBindingResponse -> f DescribeCodeBindingResponse)
-> ((CI Text -> f (CI Text))
-> Maybe CodeGenerationStatus -> f (Maybe CodeGenerationStatus))
-> (CI Text -> f (CI Text))
-> DescribeCodeBindingResponse
-> f DescribeCodeBindingResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (CodeGenerationStatus -> f CodeGenerationStatus)
-> Maybe CodeGenerationStatus -> f (Maybe CodeGenerationStatus)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
((CodeGenerationStatus -> f CodeGenerationStatus)
-> Maybe CodeGenerationStatus -> f (Maybe CodeGenerationStatus))
-> ((CI Text -> f (CI Text))
-> CodeGenerationStatus -> f CodeGenerationStatus)
-> (CI Text -> f (CI Text))
-> Maybe CodeGenerationStatus
-> f (Maybe CodeGenerationStatus)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (CodeGenerationStatus -> CI Text)
-> (CI Text -> f (CI Text))
-> CodeGenerationStatus
-> f CodeGenerationStatus
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to CodeGenerationStatus -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
),
CI Text
-> Accept
-> Fold (AWSResponse DescribeCodeBinding) (CI Text)
-> Acceptor DescribeCodeBinding
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
CI Text
"CREATE_IN_PROGRESS"
Accept
Core.AcceptRetry
( (Maybe CodeGenerationStatus -> f (Maybe CodeGenerationStatus))
-> DescribeCodeBindingResponse -> f DescribeCodeBindingResponse
Lens' DescribeCodeBindingResponse (Maybe CodeGenerationStatus)
describeCodeBindingResponse_status
((Maybe CodeGenerationStatus -> f (Maybe CodeGenerationStatus))
-> DescribeCodeBindingResponse -> f DescribeCodeBindingResponse)
-> ((CI Text -> f (CI Text))
-> Maybe CodeGenerationStatus -> f (Maybe CodeGenerationStatus))
-> (CI Text -> f (CI Text))
-> DescribeCodeBindingResponse
-> f DescribeCodeBindingResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (CodeGenerationStatus -> f CodeGenerationStatus)
-> Maybe CodeGenerationStatus -> f (Maybe CodeGenerationStatus)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
((CodeGenerationStatus -> f CodeGenerationStatus)
-> Maybe CodeGenerationStatus -> f (Maybe CodeGenerationStatus))
-> ((CI Text -> f (CI Text))
-> CodeGenerationStatus -> f CodeGenerationStatus)
-> (CI Text -> f (CI Text))
-> Maybe CodeGenerationStatus
-> f (Maybe CodeGenerationStatus)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (CodeGenerationStatus -> CI Text)
-> (CI Text -> f (CI Text))
-> CodeGenerationStatus
-> f CodeGenerationStatus
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to CodeGenerationStatus -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
),
CI Text
-> Accept
-> Fold (AWSResponse DescribeCodeBinding) (CI Text)
-> Acceptor DescribeCodeBinding
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
CI Text
"CREATE_FAILED"
Accept
Core.AcceptFailure
( (Maybe CodeGenerationStatus -> f (Maybe CodeGenerationStatus))
-> DescribeCodeBindingResponse -> f DescribeCodeBindingResponse
Lens' DescribeCodeBindingResponse (Maybe CodeGenerationStatus)
describeCodeBindingResponse_status
((Maybe CodeGenerationStatus -> f (Maybe CodeGenerationStatus))
-> DescribeCodeBindingResponse -> f DescribeCodeBindingResponse)
-> ((CI Text -> f (CI Text))
-> Maybe CodeGenerationStatus -> f (Maybe CodeGenerationStatus))
-> (CI Text -> f (CI Text))
-> DescribeCodeBindingResponse
-> f DescribeCodeBindingResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (CodeGenerationStatus -> f CodeGenerationStatus)
-> Maybe CodeGenerationStatus -> f (Maybe CodeGenerationStatus)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
((CodeGenerationStatus -> f CodeGenerationStatus)
-> Maybe CodeGenerationStatus -> f (Maybe CodeGenerationStatus))
-> ((CI Text -> f (CI Text))
-> CodeGenerationStatus -> f CodeGenerationStatus)
-> (CI Text -> f (CI Text))
-> Maybe CodeGenerationStatus
-> f (Maybe CodeGenerationStatus)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (CodeGenerationStatus -> CI Text)
-> (CI Text -> f (CI Text))
-> CodeGenerationStatus
-> f CodeGenerationStatus
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to CodeGenerationStatus -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
),
ErrorCode -> Accept -> Acceptor DescribeCodeBinding
forall a. ErrorCode -> Accept -> Acceptor a
Core.matchError
ErrorCode
"NotFoundException"
Accept
Core.AcceptFailure
]
}