{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.MediaLive.Waiters
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.MediaLive.Waiters where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaLive.DescribeChannel
import Amazonka.MediaLive.DescribeInput
import Amazonka.MediaLive.DescribeMultiplex
import Amazonka.MediaLive.Lens
import Amazonka.MediaLive.Types
import qualified Amazonka.Prelude as Prelude

-- | Polls 'Amazonka.MediaLive.DescribeChannel' every 5 seconds until a successful state is reached. An error is returned after 120 failed checks.
newChannelRunning :: Core.Wait DescribeChannel
newChannelRunning :: Wait DescribeChannel
newChannelRunning =
  Wait :: forall a. ByteString -> Int -> Seconds -> [Acceptor a] -> Wait a
Core.Wait
    { $sel:_waitName:Wait :: ByteString
Core._waitName = ByteString
"ChannelRunning",
      $sel:_waitAttempts:Wait :: Int
Core._waitAttempts = Int
120,
      $sel:_waitDelay:Wait :: Seconds
Core._waitDelay = Seconds
5,
      $sel:_waitAcceptors:Wait :: [Acceptor DescribeChannel]
Core._waitAcceptors =
        [ CI Text
-> Accept
-> Fold (AWSResponse DescribeChannel) (CI Text)
-> Acceptor DescribeChannel
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"RUNNING"
            Accept
Core.AcceptSuccess
            ( (Maybe ChannelState -> f (Maybe ChannelState))
-> DescribeChannelResponse -> f DescribeChannelResponse
Lens' DescribeChannelResponse (Maybe ChannelState)
describeChannelResponse_state ((Maybe ChannelState -> f (Maybe ChannelState))
 -> DescribeChannelResponse -> f DescribeChannelResponse)
-> ((CI Text -> f (CI Text))
    -> Maybe ChannelState -> f (Maybe ChannelState))
-> (CI Text -> f (CI Text))
-> DescribeChannelResponse
-> f DescribeChannelResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ChannelState -> f ChannelState)
-> Maybe ChannelState -> f (Maybe ChannelState)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                ((ChannelState -> f ChannelState)
 -> Maybe ChannelState -> f (Maybe ChannelState))
-> ((CI Text -> f (CI Text)) -> ChannelState -> f ChannelState)
-> (CI Text -> f (CI Text))
-> Maybe ChannelState
-> f (Maybe ChannelState)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ChannelState -> CI Text)
-> (CI Text -> f (CI Text)) -> ChannelState -> f ChannelState
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to ChannelState -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            ),
          CI Text
-> Accept
-> Fold (AWSResponse DescribeChannel) (CI Text)
-> Acceptor DescribeChannel
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"STARTING"
            Accept
Core.AcceptRetry
            ( (Maybe ChannelState -> f (Maybe ChannelState))
-> DescribeChannelResponse -> f DescribeChannelResponse
Lens' DescribeChannelResponse (Maybe ChannelState)
describeChannelResponse_state ((Maybe ChannelState -> f (Maybe ChannelState))
 -> DescribeChannelResponse -> f DescribeChannelResponse)
-> ((CI Text -> f (CI Text))
    -> Maybe ChannelState -> f (Maybe ChannelState))
-> (CI Text -> f (CI Text))
-> DescribeChannelResponse
-> f DescribeChannelResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ChannelState -> f ChannelState)
-> Maybe ChannelState -> f (Maybe ChannelState)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                ((ChannelState -> f ChannelState)
 -> Maybe ChannelState -> f (Maybe ChannelState))
-> ((CI Text -> f (CI Text)) -> ChannelState -> f ChannelState)
-> (CI Text -> f (CI Text))
-> Maybe ChannelState
-> f (Maybe ChannelState)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ChannelState -> CI Text)
-> (CI Text -> f (CI Text)) -> ChannelState -> f ChannelState
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to ChannelState -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            ),
          Int -> Accept -> Acceptor DescribeChannel
forall a. Int -> Accept -> Acceptor a
Core.matchStatus Int
500 Accept
Core.AcceptRetry
        ]
    }

-- | Polls 'Amazonka.MediaLive.DescribeInput' every 5 seconds until a successful state is reached. An error is returned after 20 failed checks.
newInputAttached :: Core.Wait DescribeInput
newInputAttached :: Wait DescribeInput
newInputAttached =
  Wait :: forall a. ByteString -> Int -> Seconds -> [Acceptor a] -> Wait a
Core.Wait
    { $sel:_waitName:Wait :: ByteString
Core._waitName = ByteString
"InputAttached",
      $sel:_waitAttempts:Wait :: Int
Core._waitAttempts = Int
20,
      $sel:_waitDelay:Wait :: Seconds
Core._waitDelay = Seconds
5,
      $sel:_waitAcceptors:Wait :: [Acceptor DescribeInput]
Core._waitAcceptors =
        [ CI Text
-> Accept
-> Fold (AWSResponse DescribeInput) (CI Text)
-> Acceptor DescribeInput
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"ATTACHED"
            Accept
Core.AcceptSuccess
            ( (Maybe InputState -> f (Maybe InputState))
-> DescribeInputResponse -> f DescribeInputResponse
Lens' DescribeInputResponse (Maybe InputState)
describeInputResponse_state ((Maybe InputState -> f (Maybe InputState))
 -> DescribeInputResponse -> f DescribeInputResponse)
-> ((CI Text -> f (CI Text))
    -> Maybe InputState -> f (Maybe InputState))
-> (CI Text -> f (CI Text))
-> DescribeInputResponse
-> f DescribeInputResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (InputState -> f InputState)
-> Maybe InputState -> f (Maybe InputState)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                ((InputState -> f InputState)
 -> Maybe InputState -> f (Maybe InputState))
-> ((CI Text -> f (CI Text)) -> InputState -> f InputState)
-> (CI Text -> f (CI Text))
-> Maybe InputState
-> f (Maybe InputState)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (InputState -> CI Text)
-> (CI Text -> f (CI Text)) -> InputState -> f InputState
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to InputState -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            ),
          CI Text
-> Accept
-> Fold (AWSResponse DescribeInput) (CI Text)
-> Acceptor DescribeInput
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"DETACHED"
            Accept
Core.AcceptRetry
            ( (Maybe InputState -> f (Maybe InputState))
-> DescribeInputResponse -> f DescribeInputResponse
Lens' DescribeInputResponse (Maybe InputState)
describeInputResponse_state ((Maybe InputState -> f (Maybe InputState))
 -> DescribeInputResponse -> f DescribeInputResponse)
-> ((CI Text -> f (CI Text))
    -> Maybe InputState -> f (Maybe InputState))
-> (CI Text -> f (CI Text))
-> DescribeInputResponse
-> f DescribeInputResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (InputState -> f InputState)
-> Maybe InputState -> f (Maybe InputState)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                ((InputState -> f InputState)
 -> Maybe InputState -> f (Maybe InputState))
-> ((CI Text -> f (CI Text)) -> InputState -> f InputState)
-> (CI Text -> f (CI Text))
-> Maybe InputState
-> f (Maybe InputState)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (InputState -> CI Text)
-> (CI Text -> f (CI Text)) -> InputState -> f InputState
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to InputState -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            ),
          Int -> Accept -> Acceptor DescribeInput
forall a. Int -> Accept -> Acceptor a
Core.matchStatus Int
500 Accept
Core.AcceptRetry
        ]
    }

-- | Polls 'Amazonka.MediaLive.DescribeMultiplex' every 5 seconds until a successful state is reached. An error is returned after 120 failed checks.
newMultiplexRunning :: Core.Wait DescribeMultiplex
newMultiplexRunning :: Wait DescribeMultiplex
newMultiplexRunning =
  Wait :: forall a. ByteString -> Int -> Seconds -> [Acceptor a] -> Wait a
Core.Wait
    { $sel:_waitName:Wait :: ByteString
Core._waitName = ByteString
"MultiplexRunning",
      $sel:_waitAttempts:Wait :: Int
Core._waitAttempts = Int
120,
      $sel:_waitDelay:Wait :: Seconds
Core._waitDelay = Seconds
5,
      $sel:_waitAcceptors:Wait :: [Acceptor DescribeMultiplex]
Core._waitAcceptors =
        [ CI Text
-> Accept
-> Fold (AWSResponse DescribeMultiplex) (CI Text)
-> Acceptor DescribeMultiplex
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"RUNNING"
            Accept
Core.AcceptSuccess
            ( (Maybe MultiplexState -> f (Maybe MultiplexState))
-> DescribeMultiplexResponse -> f DescribeMultiplexResponse
Lens' DescribeMultiplexResponse (Maybe MultiplexState)
describeMultiplexResponse_state ((Maybe MultiplexState -> f (Maybe MultiplexState))
 -> DescribeMultiplexResponse -> f DescribeMultiplexResponse)
-> ((CI Text -> f (CI Text))
    -> Maybe MultiplexState -> f (Maybe MultiplexState))
-> (CI Text -> f (CI Text))
-> DescribeMultiplexResponse
-> f DescribeMultiplexResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (MultiplexState -> f MultiplexState)
-> Maybe MultiplexState -> f (Maybe MultiplexState)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                ((MultiplexState -> f MultiplexState)
 -> Maybe MultiplexState -> f (Maybe MultiplexState))
-> ((CI Text -> f (CI Text)) -> MultiplexState -> f MultiplexState)
-> (CI Text -> f (CI Text))
-> Maybe MultiplexState
-> f (Maybe MultiplexState)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (MultiplexState -> CI Text)
-> (CI Text -> f (CI Text)) -> MultiplexState -> f MultiplexState
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to MultiplexState -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            ),
          CI Text
-> Accept
-> Fold (AWSResponse DescribeMultiplex) (CI Text)
-> Acceptor DescribeMultiplex
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"STARTING"
            Accept
Core.AcceptRetry
            ( (Maybe MultiplexState -> f (Maybe MultiplexState))
-> DescribeMultiplexResponse -> f DescribeMultiplexResponse
Lens' DescribeMultiplexResponse (Maybe MultiplexState)
describeMultiplexResponse_state ((Maybe MultiplexState -> f (Maybe MultiplexState))
 -> DescribeMultiplexResponse -> f DescribeMultiplexResponse)
-> ((CI Text -> f (CI Text))
    -> Maybe MultiplexState -> f (Maybe MultiplexState))
-> (CI Text -> f (CI Text))
-> DescribeMultiplexResponse
-> f DescribeMultiplexResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (MultiplexState -> f MultiplexState)
-> Maybe MultiplexState -> f (Maybe MultiplexState)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                ((MultiplexState -> f MultiplexState)
 -> Maybe MultiplexState -> f (Maybe MultiplexState))
-> ((CI Text -> f (CI Text)) -> MultiplexState -> f MultiplexState)
-> (CI Text -> f (CI Text))
-> Maybe MultiplexState
-> f (Maybe MultiplexState)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (MultiplexState -> CI Text)
-> (CI Text -> f (CI Text)) -> MultiplexState -> f MultiplexState
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to MultiplexState -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            ),
          Int -> Accept -> Acceptor DescribeMultiplex
forall a. Int -> Accept -> Acceptor a
Core.matchStatus Int
500 Accept
Core.AcceptRetry
        ]
    }

-- | Polls 'Amazonka.MediaLive.DescribeMultiplex' every 5 seconds until a successful state is reached. An error is returned after 20 failed checks.
newMultiplexDeleted :: Core.Wait DescribeMultiplex
newMultiplexDeleted :: Wait DescribeMultiplex
newMultiplexDeleted =
  Wait :: forall a. ByteString -> Int -> Seconds -> [Acceptor a] -> Wait a
Core.Wait
    { $sel:_waitName:Wait :: ByteString
Core._waitName = ByteString
"MultiplexDeleted",
      $sel:_waitAttempts:Wait :: Int
Core._waitAttempts = Int
20,
      $sel:_waitDelay:Wait :: Seconds
Core._waitDelay = Seconds
5,
      $sel:_waitAcceptors:Wait :: [Acceptor DescribeMultiplex]
Core._waitAcceptors =
        [ CI Text
-> Accept
-> Fold (AWSResponse DescribeMultiplex) (CI Text)
-> Acceptor DescribeMultiplex
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"DELETED"
            Accept
Core.AcceptSuccess
            ( (Maybe MultiplexState -> f (Maybe MultiplexState))
-> DescribeMultiplexResponse -> f DescribeMultiplexResponse
Lens' DescribeMultiplexResponse (Maybe MultiplexState)
describeMultiplexResponse_state ((Maybe MultiplexState -> f (Maybe MultiplexState))
 -> DescribeMultiplexResponse -> f DescribeMultiplexResponse)
-> ((CI Text -> f (CI Text))
    -> Maybe MultiplexState -> f (Maybe MultiplexState))
-> (CI Text -> f (CI Text))
-> DescribeMultiplexResponse
-> f DescribeMultiplexResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (MultiplexState -> f MultiplexState)
-> Maybe MultiplexState -> f (Maybe MultiplexState)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                ((MultiplexState -> f MultiplexState)
 -> Maybe MultiplexState -> f (Maybe MultiplexState))
-> ((CI Text -> f (CI Text)) -> MultiplexState -> f MultiplexState)
-> (CI Text -> f (CI Text))
-> Maybe MultiplexState
-> f (Maybe MultiplexState)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (MultiplexState -> CI Text)
-> (CI Text -> f (CI Text)) -> MultiplexState -> f MultiplexState
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to MultiplexState -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            ),
          CI Text
-> Accept
-> Fold (AWSResponse DescribeMultiplex) (CI Text)
-> Acceptor DescribeMultiplex
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"DELETING"
            Accept
Core.AcceptRetry
            ( (Maybe MultiplexState -> f (Maybe MultiplexState))
-> DescribeMultiplexResponse -> f DescribeMultiplexResponse
Lens' DescribeMultiplexResponse (Maybe MultiplexState)
describeMultiplexResponse_state ((Maybe MultiplexState -> f (Maybe MultiplexState))
 -> DescribeMultiplexResponse -> f DescribeMultiplexResponse)
-> ((CI Text -> f (CI Text))
    -> Maybe MultiplexState -> f (Maybe MultiplexState))
-> (CI Text -> f (CI Text))
-> DescribeMultiplexResponse
-> f DescribeMultiplexResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (MultiplexState -> f MultiplexState)
-> Maybe MultiplexState -> f (Maybe MultiplexState)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                ((MultiplexState -> f MultiplexState)
 -> Maybe MultiplexState -> f (Maybe MultiplexState))
-> ((CI Text -> f (CI Text)) -> MultiplexState -> f MultiplexState)
-> (CI Text -> f (CI Text))
-> Maybe MultiplexState
-> f (Maybe MultiplexState)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (MultiplexState -> CI Text)
-> (CI Text -> f (CI Text)) -> MultiplexState -> f MultiplexState
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to MultiplexState -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            ),
          Int -> Accept -> Acceptor DescribeMultiplex
forall a. Int -> Accept -> Acceptor a
Core.matchStatus Int
500 Accept
Core.AcceptRetry
        ]
    }

-- | Polls 'Amazonka.MediaLive.DescribeInput' every 5 seconds until a successful state is reached. An error is returned after 84 failed checks.
newInputDetached :: Core.Wait DescribeInput
newInputDetached :: Wait DescribeInput
newInputDetached =
  Wait :: forall a. ByteString -> Int -> Seconds -> [Acceptor a] -> Wait a
Core.Wait
    { $sel:_waitName:Wait :: ByteString
Core._waitName = ByteString
"InputDetached",
      $sel:_waitAttempts:Wait :: Int
Core._waitAttempts = Int
84,
      $sel:_waitDelay:Wait :: Seconds
Core._waitDelay = Seconds
5,
      $sel:_waitAcceptors:Wait :: [Acceptor DescribeInput]
Core._waitAcceptors =
        [ CI Text
-> Accept
-> Fold (AWSResponse DescribeInput) (CI Text)
-> Acceptor DescribeInput
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"DETACHED"
            Accept
Core.AcceptSuccess
            ( (Maybe InputState -> f (Maybe InputState))
-> DescribeInputResponse -> f DescribeInputResponse
Lens' DescribeInputResponse (Maybe InputState)
describeInputResponse_state ((Maybe InputState -> f (Maybe InputState))
 -> DescribeInputResponse -> f DescribeInputResponse)
-> ((CI Text -> f (CI Text))
    -> Maybe InputState -> f (Maybe InputState))
-> (CI Text -> f (CI Text))
-> DescribeInputResponse
-> f DescribeInputResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (InputState -> f InputState)
-> Maybe InputState -> f (Maybe InputState)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                ((InputState -> f InputState)
 -> Maybe InputState -> f (Maybe InputState))
-> ((CI Text -> f (CI Text)) -> InputState -> f InputState)
-> (CI Text -> f (CI Text))
-> Maybe InputState
-> f (Maybe InputState)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (InputState -> CI Text)
-> (CI Text -> f (CI Text)) -> InputState -> f InputState
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to InputState -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            ),
          CI Text
-> Accept
-> Fold (AWSResponse DescribeInput) (CI Text)
-> Acceptor DescribeInput
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"CREATING"
            Accept
Core.AcceptRetry
            ( (Maybe InputState -> f (Maybe InputState))
-> DescribeInputResponse -> f DescribeInputResponse
Lens' DescribeInputResponse (Maybe InputState)
describeInputResponse_state ((Maybe InputState -> f (Maybe InputState))
 -> DescribeInputResponse -> f DescribeInputResponse)
-> ((CI Text -> f (CI Text))
    -> Maybe InputState -> f (Maybe InputState))
-> (CI Text -> f (CI Text))
-> DescribeInputResponse
-> f DescribeInputResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (InputState -> f InputState)
-> Maybe InputState -> f (Maybe InputState)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                ((InputState -> f InputState)
 -> Maybe InputState -> f (Maybe InputState))
-> ((CI Text -> f (CI Text)) -> InputState -> f InputState)
-> (CI Text -> f (CI Text))
-> Maybe InputState
-> f (Maybe InputState)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (InputState -> CI Text)
-> (CI Text -> f (CI Text)) -> InputState -> f InputState
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to InputState -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            ),
          CI Text
-> Accept
-> Fold (AWSResponse DescribeInput) (CI Text)
-> Acceptor DescribeInput
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"ATTACHED"
            Accept
Core.AcceptRetry
            ( (Maybe InputState -> f (Maybe InputState))
-> DescribeInputResponse -> f DescribeInputResponse
Lens' DescribeInputResponse (Maybe InputState)
describeInputResponse_state ((Maybe InputState -> f (Maybe InputState))
 -> DescribeInputResponse -> f DescribeInputResponse)
-> ((CI Text -> f (CI Text))
    -> Maybe InputState -> f (Maybe InputState))
-> (CI Text -> f (CI Text))
-> DescribeInputResponse
-> f DescribeInputResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (InputState -> f InputState)
-> Maybe InputState -> f (Maybe InputState)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                ((InputState -> f InputState)
 -> Maybe InputState -> f (Maybe InputState))
-> ((CI Text -> f (CI Text)) -> InputState -> f InputState)
-> (CI Text -> f (CI Text))
-> Maybe InputState
-> f (Maybe InputState)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (InputState -> CI Text)
-> (CI Text -> f (CI Text)) -> InputState -> f InputState
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to InputState -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            ),
          Int -> Accept -> Acceptor DescribeInput
forall a. Int -> Accept -> Acceptor a
Core.matchStatus Int
500 Accept
Core.AcceptRetry
        ]
    }

-- | Polls 'Amazonka.MediaLive.DescribeInput' every 5 seconds until a successful state is reached. An error is returned after 20 failed checks.
newInputDeleted :: Core.Wait DescribeInput
newInputDeleted :: Wait DescribeInput
newInputDeleted =
  Wait :: forall a. ByteString -> Int -> Seconds -> [Acceptor a] -> Wait a
Core.Wait
    { $sel:_waitName:Wait :: ByteString
Core._waitName = ByteString
"InputDeleted",
      $sel:_waitAttempts:Wait :: Int
Core._waitAttempts = Int
20,
      $sel:_waitDelay:Wait :: Seconds
Core._waitDelay = Seconds
5,
      $sel:_waitAcceptors:Wait :: [Acceptor DescribeInput]
Core._waitAcceptors =
        [ CI Text
-> Accept
-> Fold (AWSResponse DescribeInput) (CI Text)
-> Acceptor DescribeInput
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"DELETED"
            Accept
Core.AcceptSuccess
            ( (Maybe InputState -> f (Maybe InputState))
-> DescribeInputResponse -> f DescribeInputResponse
Lens' DescribeInputResponse (Maybe InputState)
describeInputResponse_state ((Maybe InputState -> f (Maybe InputState))
 -> DescribeInputResponse -> f DescribeInputResponse)
-> ((CI Text -> f (CI Text))
    -> Maybe InputState -> f (Maybe InputState))
-> (CI Text -> f (CI Text))
-> DescribeInputResponse
-> f DescribeInputResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (InputState -> f InputState)
-> Maybe InputState -> f (Maybe InputState)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                ((InputState -> f InputState)
 -> Maybe InputState -> f (Maybe InputState))
-> ((CI Text -> f (CI Text)) -> InputState -> f InputState)
-> (CI Text -> f (CI Text))
-> Maybe InputState
-> f (Maybe InputState)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (InputState -> CI Text)
-> (CI Text -> f (CI Text)) -> InputState -> f InputState
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to InputState -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            ),
          CI Text
-> Accept
-> Fold (AWSResponse DescribeInput) (CI Text)
-> Acceptor DescribeInput
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"DELETING"
            Accept
Core.AcceptRetry
            ( (Maybe InputState -> f (Maybe InputState))
-> DescribeInputResponse -> f DescribeInputResponse
Lens' DescribeInputResponse (Maybe InputState)
describeInputResponse_state ((Maybe InputState -> f (Maybe InputState))
 -> DescribeInputResponse -> f DescribeInputResponse)
-> ((CI Text -> f (CI Text))
    -> Maybe InputState -> f (Maybe InputState))
-> (CI Text -> f (CI Text))
-> DescribeInputResponse
-> f DescribeInputResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (InputState -> f InputState)
-> Maybe InputState -> f (Maybe InputState)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                ((InputState -> f InputState)
 -> Maybe InputState -> f (Maybe InputState))
-> ((CI Text -> f (CI Text)) -> InputState -> f InputState)
-> (CI Text -> f (CI Text))
-> Maybe InputState
-> f (Maybe InputState)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (InputState -> CI Text)
-> (CI Text -> f (CI Text)) -> InputState -> f InputState
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to InputState -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            ),
          Int -> Accept -> Acceptor DescribeInput
forall a. Int -> Accept -> Acceptor a
Core.matchStatus Int
500 Accept
Core.AcceptRetry
        ]
    }

-- | Polls 'Amazonka.MediaLive.DescribeChannel' every 5 seconds until a successful state is reached. An error is returned after 60 failed checks.
newChannelStopped :: Core.Wait DescribeChannel
newChannelStopped :: Wait DescribeChannel
newChannelStopped =
  Wait :: forall a. ByteString -> Int -> Seconds -> [Acceptor a] -> Wait a
Core.Wait
    { $sel:_waitName:Wait :: ByteString
Core._waitName = ByteString
"ChannelStopped",
      $sel:_waitAttempts:Wait :: Int
Core._waitAttempts = Int
60,
      $sel:_waitDelay:Wait :: Seconds
Core._waitDelay = Seconds
5,
      $sel:_waitAcceptors:Wait :: [Acceptor DescribeChannel]
Core._waitAcceptors =
        [ CI Text
-> Accept
-> Fold (AWSResponse DescribeChannel) (CI Text)
-> Acceptor DescribeChannel
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"IDLE"
            Accept
Core.AcceptSuccess
            ( (Maybe ChannelState -> f (Maybe ChannelState))
-> DescribeChannelResponse -> f DescribeChannelResponse
Lens' DescribeChannelResponse (Maybe ChannelState)
describeChannelResponse_state ((Maybe ChannelState -> f (Maybe ChannelState))
 -> DescribeChannelResponse -> f DescribeChannelResponse)
-> ((CI Text -> f (CI Text))
    -> Maybe ChannelState -> f (Maybe ChannelState))
-> (CI Text -> f (CI Text))
-> DescribeChannelResponse
-> f DescribeChannelResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ChannelState -> f ChannelState)
-> Maybe ChannelState -> f (Maybe ChannelState)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                ((ChannelState -> f ChannelState)
 -> Maybe ChannelState -> f (Maybe ChannelState))
-> ((CI Text -> f (CI Text)) -> ChannelState -> f ChannelState)
-> (CI Text -> f (CI Text))
-> Maybe ChannelState
-> f (Maybe ChannelState)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ChannelState -> CI Text)
-> (CI Text -> f (CI Text)) -> ChannelState -> f ChannelState
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to ChannelState -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            ),
          CI Text
-> Accept
-> Fold (AWSResponse DescribeChannel) (CI Text)
-> Acceptor DescribeChannel
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"STOPPING"
            Accept
Core.AcceptRetry
            ( (Maybe ChannelState -> f (Maybe ChannelState))
-> DescribeChannelResponse -> f DescribeChannelResponse
Lens' DescribeChannelResponse (Maybe ChannelState)
describeChannelResponse_state ((Maybe ChannelState -> f (Maybe ChannelState))
 -> DescribeChannelResponse -> f DescribeChannelResponse)
-> ((CI Text -> f (CI Text))
    -> Maybe ChannelState -> f (Maybe ChannelState))
-> (CI Text -> f (CI Text))
-> DescribeChannelResponse
-> f DescribeChannelResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ChannelState -> f ChannelState)
-> Maybe ChannelState -> f (Maybe ChannelState)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                ((ChannelState -> f ChannelState)
 -> Maybe ChannelState -> f (Maybe ChannelState))
-> ((CI Text -> f (CI Text)) -> ChannelState -> f ChannelState)
-> (CI Text -> f (CI Text))
-> Maybe ChannelState
-> f (Maybe ChannelState)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ChannelState -> CI Text)
-> (CI Text -> f (CI Text)) -> ChannelState -> f ChannelState
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to ChannelState -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            ),
          Int -> Accept -> Acceptor DescribeChannel
forall a. Int -> Accept -> Acceptor a
Core.matchStatus Int
500 Accept
Core.AcceptRetry
        ]
    }

-- | Polls 'Amazonka.MediaLive.DescribeMultiplex' every 3 seconds until a successful state is reached. An error is returned after 5 failed checks.
newMultiplexCreated :: Core.Wait DescribeMultiplex
newMultiplexCreated :: Wait DescribeMultiplex
newMultiplexCreated =
  Wait :: forall a. ByteString -> Int -> Seconds -> [Acceptor a] -> Wait a
Core.Wait
    { $sel:_waitName:Wait :: ByteString
Core._waitName = ByteString
"MultiplexCreated",
      $sel:_waitAttempts:Wait :: Int
Core._waitAttempts = Int
5,
      $sel:_waitDelay:Wait :: Seconds
Core._waitDelay = Seconds
3,
      $sel:_waitAcceptors:Wait :: [Acceptor DescribeMultiplex]
Core._waitAcceptors =
        [ CI Text
-> Accept
-> Fold (AWSResponse DescribeMultiplex) (CI Text)
-> Acceptor DescribeMultiplex
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"IDLE"
            Accept
Core.AcceptSuccess
            ( (Maybe MultiplexState -> f (Maybe MultiplexState))
-> DescribeMultiplexResponse -> f DescribeMultiplexResponse
Lens' DescribeMultiplexResponse (Maybe MultiplexState)
describeMultiplexResponse_state ((Maybe MultiplexState -> f (Maybe MultiplexState))
 -> DescribeMultiplexResponse -> f DescribeMultiplexResponse)
-> ((CI Text -> f (CI Text))
    -> Maybe MultiplexState -> f (Maybe MultiplexState))
-> (CI Text -> f (CI Text))
-> DescribeMultiplexResponse
-> f DescribeMultiplexResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (MultiplexState -> f MultiplexState)
-> Maybe MultiplexState -> f (Maybe MultiplexState)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                ((MultiplexState -> f MultiplexState)
 -> Maybe MultiplexState -> f (Maybe MultiplexState))
-> ((CI Text -> f (CI Text)) -> MultiplexState -> f MultiplexState)
-> (CI Text -> f (CI Text))
-> Maybe MultiplexState
-> f (Maybe MultiplexState)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (MultiplexState -> CI Text)
-> (CI Text -> f (CI Text)) -> MultiplexState -> f MultiplexState
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to MultiplexState -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            ),
          CI Text
-> Accept
-> Fold (AWSResponse DescribeMultiplex) (CI Text)
-> Acceptor DescribeMultiplex
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"CREATING"
            Accept
Core.AcceptRetry
            ( (Maybe MultiplexState -> f (Maybe MultiplexState))
-> DescribeMultiplexResponse -> f DescribeMultiplexResponse
Lens' DescribeMultiplexResponse (Maybe MultiplexState)
describeMultiplexResponse_state ((Maybe MultiplexState -> f (Maybe MultiplexState))
 -> DescribeMultiplexResponse -> f DescribeMultiplexResponse)
-> ((CI Text -> f (CI Text))
    -> Maybe MultiplexState -> f (Maybe MultiplexState))
-> (CI Text -> f (CI Text))
-> DescribeMultiplexResponse
-> f DescribeMultiplexResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (MultiplexState -> f MultiplexState)
-> Maybe MultiplexState -> f (Maybe MultiplexState)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                ((MultiplexState -> f MultiplexState)
 -> Maybe MultiplexState -> f (Maybe MultiplexState))
-> ((CI Text -> f (CI Text)) -> MultiplexState -> f MultiplexState)
-> (CI Text -> f (CI Text))
-> Maybe MultiplexState
-> f (Maybe MultiplexState)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (MultiplexState -> CI Text)
-> (CI Text -> f (CI Text)) -> MultiplexState -> f MultiplexState
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to MultiplexState -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            ),
          Int -> Accept -> Acceptor DescribeMultiplex
forall a. Int -> Accept -> Acceptor a
Core.matchStatus Int
500 Accept
Core.AcceptRetry,
          CI Text
-> Accept
-> Fold (AWSResponse DescribeMultiplex) (CI Text)
-> Acceptor DescribeMultiplex
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"CREATE_FAILED"
            Accept
Core.AcceptFailure
            ( (Maybe MultiplexState -> f (Maybe MultiplexState))
-> DescribeMultiplexResponse -> f DescribeMultiplexResponse
Lens' DescribeMultiplexResponse (Maybe MultiplexState)
describeMultiplexResponse_state ((Maybe MultiplexState -> f (Maybe MultiplexState))
 -> DescribeMultiplexResponse -> f DescribeMultiplexResponse)
-> ((CI Text -> f (CI Text))
    -> Maybe MultiplexState -> f (Maybe MultiplexState))
-> (CI Text -> f (CI Text))
-> DescribeMultiplexResponse
-> f DescribeMultiplexResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (MultiplexState -> f MultiplexState)
-> Maybe MultiplexState -> f (Maybe MultiplexState)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                ((MultiplexState -> f MultiplexState)
 -> Maybe MultiplexState -> f (Maybe MultiplexState))
-> ((CI Text -> f (CI Text)) -> MultiplexState -> f MultiplexState)
-> (CI Text -> f (CI Text))
-> Maybe MultiplexState
-> f (Maybe MultiplexState)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (MultiplexState -> CI Text)
-> (CI Text -> f (CI Text)) -> MultiplexState -> f MultiplexState
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to MultiplexState -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            )
        ]
    }

-- | Polls 'Amazonka.MediaLive.DescribeChannel' every 3 seconds until a successful state is reached. An error is returned after 5 failed checks.
newChannelCreated :: Core.Wait DescribeChannel
newChannelCreated :: Wait DescribeChannel
newChannelCreated =
  Wait :: forall a. ByteString -> Int -> Seconds -> [Acceptor a] -> Wait a
Core.Wait
    { $sel:_waitName:Wait :: ByteString
Core._waitName = ByteString
"ChannelCreated",
      $sel:_waitAttempts:Wait :: Int
Core._waitAttempts = Int
5,
      $sel:_waitDelay:Wait :: Seconds
Core._waitDelay = Seconds
3,
      $sel:_waitAcceptors:Wait :: [Acceptor DescribeChannel]
Core._waitAcceptors =
        [ CI Text
-> Accept
-> Fold (AWSResponse DescribeChannel) (CI Text)
-> Acceptor DescribeChannel
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"IDLE"
            Accept
Core.AcceptSuccess
            ( (Maybe ChannelState -> f (Maybe ChannelState))
-> DescribeChannelResponse -> f DescribeChannelResponse
Lens' DescribeChannelResponse (Maybe ChannelState)
describeChannelResponse_state ((Maybe ChannelState -> f (Maybe ChannelState))
 -> DescribeChannelResponse -> f DescribeChannelResponse)
-> ((CI Text -> f (CI Text))
    -> Maybe ChannelState -> f (Maybe ChannelState))
-> (CI Text -> f (CI Text))
-> DescribeChannelResponse
-> f DescribeChannelResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ChannelState -> f ChannelState)
-> Maybe ChannelState -> f (Maybe ChannelState)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                ((ChannelState -> f ChannelState)
 -> Maybe ChannelState -> f (Maybe ChannelState))
-> ((CI Text -> f (CI Text)) -> ChannelState -> f ChannelState)
-> (CI Text -> f (CI Text))
-> Maybe ChannelState
-> f (Maybe ChannelState)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ChannelState -> CI Text)
-> (CI Text -> f (CI Text)) -> ChannelState -> f ChannelState
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to ChannelState -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            ),
          CI Text
-> Accept
-> Fold (AWSResponse DescribeChannel) (CI Text)
-> Acceptor DescribeChannel
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"CREATING"
            Accept
Core.AcceptRetry
            ( (Maybe ChannelState -> f (Maybe ChannelState))
-> DescribeChannelResponse -> f DescribeChannelResponse
Lens' DescribeChannelResponse (Maybe ChannelState)
describeChannelResponse_state ((Maybe ChannelState -> f (Maybe ChannelState))
 -> DescribeChannelResponse -> f DescribeChannelResponse)
-> ((CI Text -> f (CI Text))
    -> Maybe ChannelState -> f (Maybe ChannelState))
-> (CI Text -> f (CI Text))
-> DescribeChannelResponse
-> f DescribeChannelResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ChannelState -> f ChannelState)
-> Maybe ChannelState -> f (Maybe ChannelState)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                ((ChannelState -> f ChannelState)
 -> Maybe ChannelState -> f (Maybe ChannelState))
-> ((CI Text -> f (CI Text)) -> ChannelState -> f ChannelState)
-> (CI Text -> f (CI Text))
-> Maybe ChannelState
-> f (Maybe ChannelState)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ChannelState -> CI Text)
-> (CI Text -> f (CI Text)) -> ChannelState -> f ChannelState
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to ChannelState -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            ),
          Int -> Accept -> Acceptor DescribeChannel
forall a. Int -> Accept -> Acceptor a
Core.matchStatus Int
500 Accept
Core.AcceptRetry,
          CI Text
-> Accept
-> Fold (AWSResponse DescribeChannel) (CI Text)
-> Acceptor DescribeChannel
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"CREATE_FAILED"
            Accept
Core.AcceptFailure
            ( (Maybe ChannelState -> f (Maybe ChannelState))
-> DescribeChannelResponse -> f DescribeChannelResponse
Lens' DescribeChannelResponse (Maybe ChannelState)
describeChannelResponse_state ((Maybe ChannelState -> f (Maybe ChannelState))
 -> DescribeChannelResponse -> f DescribeChannelResponse)
-> ((CI Text -> f (CI Text))
    -> Maybe ChannelState -> f (Maybe ChannelState))
-> (CI Text -> f (CI Text))
-> DescribeChannelResponse
-> f DescribeChannelResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ChannelState -> f ChannelState)
-> Maybe ChannelState -> f (Maybe ChannelState)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                ((ChannelState -> f ChannelState)
 -> Maybe ChannelState -> f (Maybe ChannelState))
-> ((CI Text -> f (CI Text)) -> ChannelState -> f ChannelState)
-> (CI Text -> f (CI Text))
-> Maybe ChannelState
-> f (Maybe ChannelState)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ChannelState -> CI Text)
-> (CI Text -> f (CI Text)) -> ChannelState -> f ChannelState
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to ChannelState -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            )
        ]
    }

-- | Polls 'Amazonka.MediaLive.DescribeChannel' every 5 seconds until a successful state is reached. An error is returned after 84 failed checks.
newChannelDeleted :: Core.Wait DescribeChannel
newChannelDeleted :: Wait DescribeChannel
newChannelDeleted =
  Wait :: forall a. ByteString -> Int -> Seconds -> [Acceptor a] -> Wait a
Core.Wait
    { $sel:_waitName:Wait :: ByteString
Core._waitName = ByteString
"ChannelDeleted",
      $sel:_waitAttempts:Wait :: Int
Core._waitAttempts = Int
84,
      $sel:_waitDelay:Wait :: Seconds
Core._waitDelay = Seconds
5,
      $sel:_waitAcceptors:Wait :: [Acceptor DescribeChannel]
Core._waitAcceptors =
        [ CI Text
-> Accept
-> Fold (AWSResponse DescribeChannel) (CI Text)
-> Acceptor DescribeChannel
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"DELETED"
            Accept
Core.AcceptSuccess
            ( (Maybe ChannelState -> f (Maybe ChannelState))
-> DescribeChannelResponse -> f DescribeChannelResponse
Lens' DescribeChannelResponse (Maybe ChannelState)
describeChannelResponse_state ((Maybe ChannelState -> f (Maybe ChannelState))
 -> DescribeChannelResponse -> f DescribeChannelResponse)
-> ((CI Text -> f (CI Text))
    -> Maybe ChannelState -> f (Maybe ChannelState))
-> (CI Text -> f (CI Text))
-> DescribeChannelResponse
-> f DescribeChannelResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ChannelState -> f ChannelState)
-> Maybe ChannelState -> f (Maybe ChannelState)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                ((ChannelState -> f ChannelState)
 -> Maybe ChannelState -> f (Maybe ChannelState))
-> ((CI Text -> f (CI Text)) -> ChannelState -> f ChannelState)
-> (CI Text -> f (CI Text))
-> Maybe ChannelState
-> f (Maybe ChannelState)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ChannelState -> CI Text)
-> (CI Text -> f (CI Text)) -> ChannelState -> f ChannelState
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to ChannelState -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            ),
          CI Text
-> Accept
-> Fold (AWSResponse DescribeChannel) (CI Text)
-> Acceptor DescribeChannel
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"DELETING"
            Accept
Core.AcceptRetry
            ( (Maybe ChannelState -> f (Maybe ChannelState))
-> DescribeChannelResponse -> f DescribeChannelResponse
Lens' DescribeChannelResponse (Maybe ChannelState)
describeChannelResponse_state ((Maybe ChannelState -> f (Maybe ChannelState))
 -> DescribeChannelResponse -> f DescribeChannelResponse)
-> ((CI Text -> f (CI Text))
    -> Maybe ChannelState -> f (Maybe ChannelState))
-> (CI Text -> f (CI Text))
-> DescribeChannelResponse
-> f DescribeChannelResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ChannelState -> f ChannelState)
-> Maybe ChannelState -> f (Maybe ChannelState)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                ((ChannelState -> f ChannelState)
 -> Maybe ChannelState -> f (Maybe ChannelState))
-> ((CI Text -> f (CI Text)) -> ChannelState -> f ChannelState)
-> (CI Text -> f (CI Text))
-> Maybe ChannelState
-> f (Maybe ChannelState)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ChannelState -> CI Text)
-> (CI Text -> f (CI Text)) -> ChannelState -> f ChannelState
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to ChannelState -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            ),
          Int -> Accept -> Acceptor DescribeChannel
forall a. Int -> Accept -> Acceptor a
Core.matchStatus Int
500 Accept
Core.AcceptRetry
        ]
    }

-- | Polls 'Amazonka.MediaLive.DescribeMultiplex' every 5 seconds until a successful state is reached. An error is returned after 28 failed checks.
newMultiplexStopped :: Core.Wait DescribeMultiplex
newMultiplexStopped :: Wait DescribeMultiplex
newMultiplexStopped =
  Wait :: forall a. ByteString -> Int -> Seconds -> [Acceptor a] -> Wait a
Core.Wait
    { $sel:_waitName:Wait :: ByteString
Core._waitName = ByteString
"MultiplexStopped",
      $sel:_waitAttempts:Wait :: Int
Core._waitAttempts = Int
28,
      $sel:_waitDelay:Wait :: Seconds
Core._waitDelay = Seconds
5,
      $sel:_waitAcceptors:Wait :: [Acceptor DescribeMultiplex]
Core._waitAcceptors =
        [ CI Text
-> Accept
-> Fold (AWSResponse DescribeMultiplex) (CI Text)
-> Acceptor DescribeMultiplex
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"IDLE"
            Accept
Core.AcceptSuccess
            ( (Maybe MultiplexState -> f (Maybe MultiplexState))
-> DescribeMultiplexResponse -> f DescribeMultiplexResponse
Lens' DescribeMultiplexResponse (Maybe MultiplexState)
describeMultiplexResponse_state ((Maybe MultiplexState -> f (Maybe MultiplexState))
 -> DescribeMultiplexResponse -> f DescribeMultiplexResponse)
-> ((CI Text -> f (CI Text))
    -> Maybe MultiplexState -> f (Maybe MultiplexState))
-> (CI Text -> f (CI Text))
-> DescribeMultiplexResponse
-> f DescribeMultiplexResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (MultiplexState -> f MultiplexState)
-> Maybe MultiplexState -> f (Maybe MultiplexState)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                ((MultiplexState -> f MultiplexState)
 -> Maybe MultiplexState -> f (Maybe MultiplexState))
-> ((CI Text -> f (CI Text)) -> MultiplexState -> f MultiplexState)
-> (CI Text -> f (CI Text))
-> Maybe MultiplexState
-> f (Maybe MultiplexState)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (MultiplexState -> CI Text)
-> (CI Text -> f (CI Text)) -> MultiplexState -> f MultiplexState
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to MultiplexState -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            ),
          CI Text
-> Accept
-> Fold (AWSResponse DescribeMultiplex) (CI Text)
-> Acceptor DescribeMultiplex
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"STOPPING"
            Accept
Core.AcceptRetry
            ( (Maybe MultiplexState -> f (Maybe MultiplexState))
-> DescribeMultiplexResponse -> f DescribeMultiplexResponse
Lens' DescribeMultiplexResponse (Maybe MultiplexState)
describeMultiplexResponse_state ((Maybe MultiplexState -> f (Maybe MultiplexState))
 -> DescribeMultiplexResponse -> f DescribeMultiplexResponse)
-> ((CI Text -> f (CI Text))
    -> Maybe MultiplexState -> f (Maybe MultiplexState))
-> (CI Text -> f (CI Text))
-> DescribeMultiplexResponse
-> f DescribeMultiplexResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (MultiplexState -> f MultiplexState)
-> Maybe MultiplexState -> f (Maybe MultiplexState)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                ((MultiplexState -> f MultiplexState)
 -> Maybe MultiplexState -> f (Maybe MultiplexState))
-> ((CI Text -> f (CI Text)) -> MultiplexState -> f MultiplexState)
-> (CI Text -> f (CI Text))
-> Maybe MultiplexState
-> f (Maybe MultiplexState)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (MultiplexState -> CI Text)
-> (CI Text -> f (CI Text)) -> MultiplexState -> f MultiplexState
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to MultiplexState -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            ),
          Int -> Accept -> Acceptor DescribeMultiplex
forall a. Int -> Accept -> Acceptor a
Core.matchStatus Int
500 Accept
Core.AcceptRetry
        ]
    }