{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Amazonka.MediaConnect.Waiters where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaConnect.DescribeFlow
import Amazonka.MediaConnect.Lens
import Amazonka.MediaConnect.Types
import qualified Amazonka.Prelude as Prelude
newFlowStandby :: Core.Wait DescribeFlow
newFlowStandby :: Wait DescribeFlow
newFlowStandby =
Wait :: forall a. ByteString -> Int -> Seconds -> [Acceptor a] -> Wait a
Core.Wait
{ $sel:_waitName:Wait :: ByteString
Core._waitName = ByteString
"FlowStandby",
$sel:_waitAttempts:Wait :: Int
Core._waitAttempts = Int
40,
$sel:_waitDelay:Wait :: Seconds
Core._waitDelay = Seconds
3,
$sel:_waitAcceptors:Wait :: [Acceptor DescribeFlow]
Core._waitAcceptors =
[ CI Text
-> Accept
-> Fold (AWSResponse DescribeFlow) (CI Text)
-> Acceptor DescribeFlow
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
CI Text
"STANDBY"
Accept
Core.AcceptSuccess
( (Maybe Flow -> f (Maybe Flow))
-> DescribeFlowResponse -> f DescribeFlowResponse
Lens' DescribeFlowResponse (Maybe Flow)
describeFlowResponse_flow ((Maybe Flow -> f (Maybe Flow))
-> DescribeFlowResponse -> f DescribeFlowResponse)
-> ((CI Text -> f (CI Text)) -> Maybe Flow -> f (Maybe Flow))
-> (CI Text -> f (CI Text))
-> DescribeFlowResponse
-> f DescribeFlowResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Flow -> f Flow) -> Maybe Flow -> f (Maybe Flow)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
((Flow -> f Flow) -> Maybe Flow -> f (Maybe Flow))
-> ((CI Text -> f (CI Text)) -> Flow -> f Flow)
-> (CI Text -> f (CI Text))
-> Maybe Flow
-> f (Maybe Flow)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Status -> f Status) -> Flow -> f Flow
Lens' Flow Status
flow_status
((Status -> f Status) -> Flow -> f Flow)
-> ((CI Text -> f (CI Text)) -> Status -> f Status)
-> (CI Text -> f (CI Text))
-> Flow
-> f Flow
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Status -> CI Text)
-> (CI Text -> f (CI Text)) -> Status -> f Status
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to Status -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
),
CI Text
-> Accept
-> Fold (AWSResponse DescribeFlow) (CI Text)
-> Acceptor DescribeFlow
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
CI Text
"STOPPING"
Accept
Core.AcceptRetry
( (Maybe Flow -> f (Maybe Flow))
-> DescribeFlowResponse -> f DescribeFlowResponse
Lens' DescribeFlowResponse (Maybe Flow)
describeFlowResponse_flow ((Maybe Flow -> f (Maybe Flow))
-> DescribeFlowResponse -> f DescribeFlowResponse)
-> ((CI Text -> f (CI Text)) -> Maybe Flow -> f (Maybe Flow))
-> (CI Text -> f (CI Text))
-> DescribeFlowResponse
-> f DescribeFlowResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Flow -> f Flow) -> Maybe Flow -> f (Maybe Flow)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
((Flow -> f Flow) -> Maybe Flow -> f (Maybe Flow))
-> ((CI Text -> f (CI Text)) -> Flow -> f Flow)
-> (CI Text -> f (CI Text))
-> Maybe Flow
-> f (Maybe Flow)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Status -> f Status) -> Flow -> f Flow
Lens' Flow Status
flow_status
((Status -> f Status) -> Flow -> f Flow)
-> ((CI Text -> f (CI Text)) -> Status -> f Status)
-> (CI Text -> f (CI Text))
-> Flow
-> f Flow
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Status -> CI Text)
-> (CI Text -> f (CI Text)) -> Status -> f Status
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to Status -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
),
Int -> Accept -> Acceptor DescribeFlow
forall a. Int -> Accept -> Acceptor a
Core.matchStatus Int
500 Accept
Core.AcceptRetry,
Int -> Accept -> Acceptor DescribeFlow
forall a. Int -> Accept -> Acceptor a
Core.matchStatus Int
503 Accept
Core.AcceptRetry,
CI Text
-> Accept
-> Fold (AWSResponse DescribeFlow) (CI Text)
-> Acceptor DescribeFlow
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
CI Text
"ERROR"
Accept
Core.AcceptFailure
( (Maybe Flow -> f (Maybe Flow))
-> DescribeFlowResponse -> f DescribeFlowResponse
Lens' DescribeFlowResponse (Maybe Flow)
describeFlowResponse_flow ((Maybe Flow -> f (Maybe Flow))
-> DescribeFlowResponse -> f DescribeFlowResponse)
-> ((CI Text -> f (CI Text)) -> Maybe Flow -> f (Maybe Flow))
-> (CI Text -> f (CI Text))
-> DescribeFlowResponse
-> f DescribeFlowResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Flow -> f Flow) -> Maybe Flow -> f (Maybe Flow)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
((Flow -> f Flow) -> Maybe Flow -> f (Maybe Flow))
-> ((CI Text -> f (CI Text)) -> Flow -> f Flow)
-> (CI Text -> f (CI Text))
-> Maybe Flow
-> f (Maybe Flow)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Status -> f Status) -> Flow -> f Flow
Lens' Flow Status
flow_status
((Status -> f Status) -> Flow -> f Flow)
-> ((CI Text -> f (CI Text)) -> Status -> f Status)
-> (CI Text -> f (CI Text))
-> Flow
-> f Flow
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Status -> CI Text)
-> (CI Text -> f (CI Text)) -> Status -> f Status
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to Status -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
)
]
}
newFlowActive :: Core.Wait DescribeFlow
newFlowActive :: Wait DescribeFlow
newFlowActive =
Wait :: forall a. ByteString -> Int -> Seconds -> [Acceptor a] -> Wait a
Core.Wait
{ $sel:_waitName:Wait :: ByteString
Core._waitName = ByteString
"FlowActive",
$sel:_waitAttempts:Wait :: Int
Core._waitAttempts = Int
40,
$sel:_waitDelay:Wait :: Seconds
Core._waitDelay = Seconds
3,
$sel:_waitAcceptors:Wait :: [Acceptor DescribeFlow]
Core._waitAcceptors =
[ CI Text
-> Accept
-> Fold (AWSResponse DescribeFlow) (CI Text)
-> Acceptor DescribeFlow
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
CI Text
"ACTIVE"
Accept
Core.AcceptSuccess
( (Maybe Flow -> f (Maybe Flow))
-> DescribeFlowResponse -> f DescribeFlowResponse
Lens' DescribeFlowResponse (Maybe Flow)
describeFlowResponse_flow ((Maybe Flow -> f (Maybe Flow))
-> DescribeFlowResponse -> f DescribeFlowResponse)
-> ((CI Text -> f (CI Text)) -> Maybe Flow -> f (Maybe Flow))
-> (CI Text -> f (CI Text))
-> DescribeFlowResponse
-> f DescribeFlowResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Flow -> f Flow) -> Maybe Flow -> f (Maybe Flow)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
((Flow -> f Flow) -> Maybe Flow -> f (Maybe Flow))
-> ((CI Text -> f (CI Text)) -> Flow -> f Flow)
-> (CI Text -> f (CI Text))
-> Maybe Flow
-> f (Maybe Flow)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Status -> f Status) -> Flow -> f Flow
Lens' Flow Status
flow_status
((Status -> f Status) -> Flow -> f Flow)
-> ((CI Text -> f (CI Text)) -> Status -> f Status)
-> (CI Text -> f (CI Text))
-> Flow
-> f Flow
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Status -> CI Text)
-> (CI Text -> f (CI Text)) -> Status -> f Status
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to Status -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
),
CI Text
-> Accept
-> Fold (AWSResponse DescribeFlow) (CI Text)
-> Acceptor DescribeFlow
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
CI Text
"STARTING"
Accept
Core.AcceptRetry
( (Maybe Flow -> f (Maybe Flow))
-> DescribeFlowResponse -> f DescribeFlowResponse
Lens' DescribeFlowResponse (Maybe Flow)
describeFlowResponse_flow ((Maybe Flow -> f (Maybe Flow))
-> DescribeFlowResponse -> f DescribeFlowResponse)
-> ((CI Text -> f (CI Text)) -> Maybe Flow -> f (Maybe Flow))
-> (CI Text -> f (CI Text))
-> DescribeFlowResponse
-> f DescribeFlowResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Flow -> f Flow) -> Maybe Flow -> f (Maybe Flow)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
((Flow -> f Flow) -> Maybe Flow -> f (Maybe Flow))
-> ((CI Text -> f (CI Text)) -> Flow -> f Flow)
-> (CI Text -> f (CI Text))
-> Maybe Flow
-> f (Maybe Flow)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Status -> f Status) -> Flow -> f Flow
Lens' Flow Status
flow_status
((Status -> f Status) -> Flow -> f Flow)
-> ((CI Text -> f (CI Text)) -> Status -> f Status)
-> (CI Text -> f (CI Text))
-> Flow
-> f Flow
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Status -> CI Text)
-> (CI Text -> f (CI Text)) -> Status -> f Status
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to Status -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
),
CI Text
-> Accept
-> Fold (AWSResponse DescribeFlow) (CI Text)
-> Acceptor DescribeFlow
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
CI Text
"UPDATING"
Accept
Core.AcceptRetry
( (Maybe Flow -> f (Maybe Flow))
-> DescribeFlowResponse -> f DescribeFlowResponse
Lens' DescribeFlowResponse (Maybe Flow)
describeFlowResponse_flow ((Maybe Flow -> f (Maybe Flow))
-> DescribeFlowResponse -> f DescribeFlowResponse)
-> ((CI Text -> f (CI Text)) -> Maybe Flow -> f (Maybe Flow))
-> (CI Text -> f (CI Text))
-> DescribeFlowResponse
-> f DescribeFlowResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Flow -> f Flow) -> Maybe Flow -> f (Maybe Flow)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
((Flow -> f Flow) -> Maybe Flow -> f (Maybe Flow))
-> ((CI Text -> f (CI Text)) -> Flow -> f Flow)
-> (CI Text -> f (CI Text))
-> Maybe Flow
-> f (Maybe Flow)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Status -> f Status) -> Flow -> f Flow
Lens' Flow Status
flow_status
((Status -> f Status) -> Flow -> f Flow)
-> ((CI Text -> f (CI Text)) -> Status -> f Status)
-> (CI Text -> f (CI Text))
-> Flow
-> f Flow
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Status -> CI Text)
-> (CI Text -> f (CI Text)) -> Status -> f Status
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to Status -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
),
Int -> Accept -> Acceptor DescribeFlow
forall a. Int -> Accept -> Acceptor a
Core.matchStatus Int
500 Accept
Core.AcceptRetry,
Int -> Accept -> Acceptor DescribeFlow
forall a. Int -> Accept -> Acceptor a
Core.matchStatus Int
503 Accept
Core.AcceptRetry,
CI Text
-> Accept
-> Fold (AWSResponse DescribeFlow) (CI Text)
-> Acceptor DescribeFlow
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
CI Text
"ERROR"
Accept
Core.AcceptFailure
( (Maybe Flow -> f (Maybe Flow))
-> DescribeFlowResponse -> f DescribeFlowResponse
Lens' DescribeFlowResponse (Maybe Flow)
describeFlowResponse_flow ((Maybe Flow -> f (Maybe Flow))
-> DescribeFlowResponse -> f DescribeFlowResponse)
-> ((CI Text -> f (CI Text)) -> Maybe Flow -> f (Maybe Flow))
-> (CI Text -> f (CI Text))
-> DescribeFlowResponse
-> f DescribeFlowResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Flow -> f Flow) -> Maybe Flow -> f (Maybe Flow)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
((Flow -> f Flow) -> Maybe Flow -> f (Maybe Flow))
-> ((CI Text -> f (CI Text)) -> Flow -> f Flow)
-> (CI Text -> f (CI Text))
-> Maybe Flow
-> f (Maybe Flow)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Status -> f Status) -> Flow -> f Flow
Lens' Flow Status
flow_status
((Status -> f Status) -> Flow -> f Flow)
-> ((CI Text -> f (CI Text)) -> Status -> f Status)
-> (CI Text -> f (CI Text))
-> Flow
-> f Flow
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Status -> CI Text)
-> (CI Text -> f (CI Text)) -> Status -> f Status
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to Status -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
)
]
}
newFlowDeleted :: Core.Wait DescribeFlow
newFlowDeleted :: Wait DescribeFlow
newFlowDeleted =
Wait :: forall a. ByteString -> Int -> Seconds -> [Acceptor a] -> Wait a
Core.Wait
{ $sel:_waitName:Wait :: ByteString
Core._waitName = ByteString
"FlowDeleted",
$sel:_waitAttempts:Wait :: Int
Core._waitAttempts = Int
40,
$sel:_waitDelay:Wait :: Seconds
Core._waitDelay = Seconds
3,
$sel:_waitAcceptors:Wait :: [Acceptor DescribeFlow]
Core._waitAcceptors =
[ Int -> Accept -> Acceptor DescribeFlow
forall a. Int -> Accept -> Acceptor a
Core.matchStatus Int
404 Accept
Core.AcceptSuccess,
CI Text
-> Accept
-> Fold (AWSResponse DescribeFlow) (CI Text)
-> Acceptor DescribeFlow
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
CI Text
"DELETING"
Accept
Core.AcceptRetry
( (Maybe Flow -> f (Maybe Flow))
-> DescribeFlowResponse -> f DescribeFlowResponse
Lens' DescribeFlowResponse (Maybe Flow)
describeFlowResponse_flow ((Maybe Flow -> f (Maybe Flow))
-> DescribeFlowResponse -> f DescribeFlowResponse)
-> ((CI Text -> f (CI Text)) -> Maybe Flow -> f (Maybe Flow))
-> (CI Text -> f (CI Text))
-> DescribeFlowResponse
-> f DescribeFlowResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Flow -> f Flow) -> Maybe Flow -> f (Maybe Flow)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
((Flow -> f Flow) -> Maybe Flow -> f (Maybe Flow))
-> ((CI Text -> f (CI Text)) -> Flow -> f Flow)
-> (CI Text -> f (CI Text))
-> Maybe Flow
-> f (Maybe Flow)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Status -> f Status) -> Flow -> f Flow
Lens' Flow Status
flow_status
((Status -> f Status) -> Flow -> f Flow)
-> ((CI Text -> f (CI Text)) -> Status -> f Status)
-> (CI Text -> f (CI Text))
-> Flow
-> f Flow
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Status -> CI Text)
-> (CI Text -> f (CI Text)) -> Status -> f Status
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to Status -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
),
Int -> Accept -> Acceptor DescribeFlow
forall a. Int -> Accept -> Acceptor a
Core.matchStatus Int
500 Accept
Core.AcceptRetry,
Int -> Accept -> Acceptor DescribeFlow
forall a. Int -> Accept -> Acceptor a
Core.matchStatus Int
503 Accept
Core.AcceptRetry,
CI Text
-> Accept
-> Fold (AWSResponse DescribeFlow) (CI Text)
-> Acceptor DescribeFlow
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
CI Text
"ERROR"
Accept
Core.AcceptFailure
( (Maybe Flow -> f (Maybe Flow))
-> DescribeFlowResponse -> f DescribeFlowResponse
Lens' DescribeFlowResponse (Maybe Flow)
describeFlowResponse_flow ((Maybe Flow -> f (Maybe Flow))
-> DescribeFlowResponse -> f DescribeFlowResponse)
-> ((CI Text -> f (CI Text)) -> Maybe Flow -> f (Maybe Flow))
-> (CI Text -> f (CI Text))
-> DescribeFlowResponse
-> f DescribeFlowResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Flow -> f Flow) -> Maybe Flow -> f (Maybe Flow)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
((Flow -> f Flow) -> Maybe Flow -> f (Maybe Flow))
-> ((CI Text -> f (CI Text)) -> Flow -> f Flow)
-> (CI Text -> f (CI Text))
-> Maybe Flow
-> f (Maybe Flow)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Status -> f Status) -> Flow -> f Flow
Lens' Flow Status
flow_status
((Status -> f Status) -> Flow -> f Flow)
-> ((CI Text -> f (CI Text)) -> Status -> f Status)
-> (CI Text -> f (CI Text))
-> Flow
-> f Flow
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Status -> CI Text)
-> (CI Text -> f (CI Text)) -> Status -> f Status
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to Status -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
)
]
}