{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Amazonka.Kinesis.Waiters where
import qualified Amazonka.Core as Core
import Amazonka.Kinesis.DescribeStream
import Amazonka.Kinesis.Lens
import Amazonka.Kinesis.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
newStreamExists :: Core.Wait DescribeStream
newStreamExists :: Wait DescribeStream
newStreamExists =
Wait :: forall a. ByteString -> Int -> Seconds -> [Acceptor a] -> Wait a
Core.Wait
{ $sel:_waitName:Wait :: ByteString
Core._waitName = ByteString
"StreamExists",
$sel:_waitAttempts:Wait :: Int
Core._waitAttempts = Int
18,
$sel:_waitDelay:Wait :: Seconds
Core._waitDelay = Seconds
10,
$sel:_waitAcceptors:Wait :: [Acceptor DescribeStream]
Core._waitAcceptors =
[ CI Text
-> Accept
-> Fold (AWSResponse DescribeStream) (CI Text)
-> Acceptor DescribeStream
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
CI Text
"ACTIVE"
Accept
Core.AcceptSuccess
( (StreamDescription -> f StreamDescription)
-> DescribeStreamResponse -> f DescribeStreamResponse
Lens' DescribeStreamResponse StreamDescription
describeStreamResponse_streamDescription
((StreamDescription -> f StreamDescription)
-> DescribeStreamResponse -> f DescribeStreamResponse)
-> ((CI Text -> f (CI Text))
-> StreamDescription -> f StreamDescription)
-> (CI Text -> f (CI Text))
-> DescribeStreamResponse
-> f DescribeStreamResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (StreamStatus -> f StreamStatus)
-> StreamDescription -> f StreamDescription
Lens' StreamDescription StreamStatus
streamDescription_streamStatus
((StreamStatus -> f StreamStatus)
-> StreamDescription -> f StreamDescription)
-> ((CI Text -> f (CI Text)) -> StreamStatus -> f StreamStatus)
-> (CI Text -> f (CI Text))
-> StreamDescription
-> f StreamDescription
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (StreamStatus -> CI Text)
-> (CI Text -> f (CI Text)) -> StreamStatus -> f StreamStatus
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to StreamStatus -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
)
]
}
newStreamNotExists :: Core.Wait DescribeStream
newStreamNotExists :: Wait DescribeStream
newStreamNotExists =
Wait :: forall a. ByteString -> Int -> Seconds -> [Acceptor a] -> Wait a
Core.Wait
{ $sel:_waitName:Wait :: ByteString
Core._waitName = ByteString
"StreamNotExists",
$sel:_waitAttempts:Wait :: Int
Core._waitAttempts = Int
18,
$sel:_waitDelay:Wait :: Seconds
Core._waitDelay = Seconds
10,
$sel:_waitAcceptors:Wait :: [Acceptor DescribeStream]
Core._waitAcceptors =
[ ErrorCode -> Accept -> Acceptor DescribeStream
forall a. ErrorCode -> Accept -> Acceptor a
Core.matchError
ErrorCode
"ResourceNotFoundException"
Accept
Core.AcceptSuccess
]
}