{-# LANGUAGE DisambiguateRecordFields #-}
{-# 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-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.MediaLive.Waiters where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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 3 seconds until a successful state is reached. An error is returned after 5 failed checks.
newChannelCreated :: Core.Wait DescribeChannel
newChannelCreated :: Wait DescribeChannel
newChannelCreated =
  Core.Wait
    { $sel:name:Wait :: ByteString
Core.name = ByteString
"ChannelCreated",
      $sel:attempts:Wait :: Int
Core.attempts = Int
5,
      $sel:delay:Wait :: Seconds
Core.delay = Seconds
3,
      $sel:acceptors:Wait :: [Acceptor DescribeChannel]
Core.acceptors =
        [ forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"IDLE"
            Accept
Core.AcceptSuccess
            ( Lens' DescribeChannelResponse (Maybe ChannelState)
describeChannelResponse_state
                forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to forall a. ToText a => a -> CI Text
Data.toTextCI
            ),
          forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"CREATING"
            Accept
Core.AcceptRetry
            ( Lens' DescribeChannelResponse (Maybe ChannelState)
describeChannelResponse_state
                forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to forall a. ToText a => a -> CI Text
Data.toTextCI
            ),
          forall a. Int -> Accept -> Acceptor a
Core.matchStatus Int
500 Accept
Core.AcceptRetry,
          forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"CREATE_FAILED"
            Accept
Core.AcceptFailure
            ( Lens' DescribeChannelResponse (Maybe ChannelState)
describeChannelResponse_state
                forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to forall a. ToText a => a -> CI Text
Data.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 =
  Core.Wait
    { $sel:name:Wait :: ByteString
Core.name = ByteString
"ChannelDeleted",
      $sel:attempts:Wait :: Int
Core.attempts = Int
84,
      $sel:delay:Wait :: Seconds
Core.delay = Seconds
5,
      $sel:acceptors:Wait :: [Acceptor DescribeChannel]
Core.acceptors =
        [ forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"DELETED"
            Accept
Core.AcceptSuccess
            ( Lens' DescribeChannelResponse (Maybe ChannelState)
describeChannelResponse_state
                forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to forall a. ToText a => a -> CI Text
Data.toTextCI
            ),
          forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"DELETING"
            Accept
Core.AcceptRetry
            ( Lens' DescribeChannelResponse (Maybe ChannelState)
describeChannelResponse_state
                forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to forall a. ToText a => a -> CI Text
Data.toTextCI
            ),
          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 120 failed checks.
newChannelRunning :: Core.Wait DescribeChannel
newChannelRunning :: Wait DescribeChannel
newChannelRunning =
  Core.Wait
    { $sel:name:Wait :: ByteString
Core.name = ByteString
"ChannelRunning",
      $sel:attempts:Wait :: Int
Core.attempts = Int
120,
      $sel:delay:Wait :: Seconds
Core.delay = Seconds
5,
      $sel:acceptors:Wait :: [Acceptor DescribeChannel]
Core.acceptors =
        [ forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"RUNNING"
            Accept
Core.AcceptSuccess
            ( Lens' DescribeChannelResponse (Maybe ChannelState)
describeChannelResponse_state
                forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to forall a. ToText a => a -> CI Text
Data.toTextCI
            ),
          forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"STARTING"
            Accept
Core.AcceptRetry
            ( Lens' DescribeChannelResponse (Maybe ChannelState)
describeChannelResponse_state
                forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to forall a. ToText a => a -> CI Text
Data.toTextCI
            ),
          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 =
  Core.Wait
    { $sel:name:Wait :: ByteString
Core.name = ByteString
"ChannelStopped",
      $sel:attempts:Wait :: Int
Core.attempts = Int
60,
      $sel:delay:Wait :: Seconds
Core.delay = Seconds
5,
      $sel:acceptors:Wait :: [Acceptor DescribeChannel]
Core.acceptors =
        [ forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"IDLE"
            Accept
Core.AcceptSuccess
            ( Lens' DescribeChannelResponse (Maybe ChannelState)
describeChannelResponse_state
                forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to forall a. ToText a => a -> CI Text
Data.toTextCI
            ),
          forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"STOPPING"
            Accept
Core.AcceptRetry
            ( Lens' DescribeChannelResponse (Maybe ChannelState)
describeChannelResponse_state
                forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to forall a. ToText a => a -> CI Text
Data.toTextCI
            ),
          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 =
  Core.Wait
    { $sel:name:Wait :: ByteString
Core.name = ByteString
"InputAttached",
      $sel:attempts:Wait :: Int
Core.attempts = Int
20,
      $sel:delay:Wait :: Seconds
Core.delay = Seconds
5,
      $sel:acceptors:Wait :: [Acceptor DescribeInput]
Core.acceptors =
        [ forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"ATTACHED"
            Accept
Core.AcceptSuccess
            ( Lens' DescribeInputResponse (Maybe InputState)
describeInputResponse_state
                forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to forall a. ToText a => a -> CI Text
Data.toTextCI
            ),
          forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"DETACHED"
            Accept
Core.AcceptRetry
            ( Lens' DescribeInputResponse (Maybe InputState)
describeInputResponse_state
                forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to forall a. ToText a => a -> CI Text
Data.toTextCI
            ),
          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 =
  Core.Wait
    { $sel:name:Wait :: ByteString
Core.name = ByteString
"InputDeleted",
      $sel:attempts:Wait :: Int
Core.attempts = Int
20,
      $sel:delay:Wait :: Seconds
Core.delay = Seconds
5,
      $sel:acceptors:Wait :: [Acceptor DescribeInput]
Core.acceptors =
        [ forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"DELETED"
            Accept
Core.AcceptSuccess
            ( Lens' DescribeInputResponse (Maybe InputState)
describeInputResponse_state
                forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to forall a. ToText a => a -> CI Text
Data.toTextCI
            ),
          forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"DELETING"
            Accept
Core.AcceptRetry
            ( Lens' DescribeInputResponse (Maybe InputState)
describeInputResponse_state
                forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to forall a. ToText a => a -> CI Text
Data.toTextCI
            ),
          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 =
  Core.Wait
    { $sel:name:Wait :: ByteString
Core.name = ByteString
"InputDetached",
      $sel:attempts:Wait :: Int
Core.attempts = Int
84,
      $sel:delay:Wait :: Seconds
Core.delay = Seconds
5,
      $sel:acceptors:Wait :: [Acceptor DescribeInput]
Core.acceptors =
        [ forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"DETACHED"
            Accept
Core.AcceptSuccess
            ( Lens' DescribeInputResponse (Maybe InputState)
describeInputResponse_state
                forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to forall a. ToText a => a -> CI Text
Data.toTextCI
            ),
          forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"CREATING"
            Accept
Core.AcceptRetry
            ( Lens' DescribeInputResponse (Maybe InputState)
describeInputResponse_state
                forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to forall a. ToText a => a -> CI Text
Data.toTextCI
            ),
          forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"ATTACHED"
            Accept
Core.AcceptRetry
            ( Lens' DescribeInputResponse (Maybe InputState)
describeInputResponse_state
                forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to forall a. ToText a => a -> CI Text
Data.toTextCI
            ),
          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 =
  Core.Wait
    { $sel:name:Wait :: ByteString
Core.name = ByteString
"MultiplexCreated",
      $sel:attempts:Wait :: Int
Core.attempts = Int
5,
      $sel:delay:Wait :: Seconds
Core.delay = Seconds
3,
      $sel:acceptors:Wait :: [Acceptor DescribeMultiplex]
Core.acceptors =
        [ forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"IDLE"
            Accept
Core.AcceptSuccess
            ( Lens' DescribeMultiplexResponse (Maybe MultiplexState)
describeMultiplexResponse_state
                forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to forall a. ToText a => a -> CI Text
Data.toTextCI
            ),
          forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"CREATING"
            Accept
Core.AcceptRetry
            ( Lens' DescribeMultiplexResponse (Maybe MultiplexState)
describeMultiplexResponse_state
                forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to forall a. ToText a => a -> CI Text
Data.toTextCI
            ),
          forall a. Int -> Accept -> Acceptor a
Core.matchStatus Int
500 Accept
Core.AcceptRetry,
          forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"CREATE_FAILED"
            Accept
Core.AcceptFailure
            ( Lens' DescribeMultiplexResponse (Maybe MultiplexState)
describeMultiplexResponse_state
                forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to forall a. ToText a => a -> CI Text
Data.toTextCI
            )
        ]
    }

-- | 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 =
  Core.Wait
    { $sel:name:Wait :: ByteString
Core.name = ByteString
"MultiplexDeleted",
      $sel:attempts:Wait :: Int
Core.attempts = Int
20,
      $sel:delay:Wait :: Seconds
Core.delay = Seconds
5,
      $sel:acceptors:Wait :: [Acceptor DescribeMultiplex]
Core.acceptors =
        [ forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"DELETED"
            Accept
Core.AcceptSuccess
            ( Lens' DescribeMultiplexResponse (Maybe MultiplexState)
describeMultiplexResponse_state
                forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to forall a. ToText a => a -> CI Text
Data.toTextCI
            ),
          forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"DELETING"
            Accept
Core.AcceptRetry
            ( Lens' DescribeMultiplexResponse (Maybe MultiplexState)
describeMultiplexResponse_state
                forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to forall a. ToText a => a -> CI Text
Data.toTextCI
            ),
          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 =
  Core.Wait
    { $sel:name:Wait :: ByteString
Core.name = ByteString
"MultiplexRunning",
      $sel:attempts:Wait :: Int
Core.attempts = Int
120,
      $sel:delay:Wait :: Seconds
Core.delay = Seconds
5,
      $sel:acceptors:Wait :: [Acceptor DescribeMultiplex]
Core.acceptors =
        [ forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"RUNNING"
            Accept
Core.AcceptSuccess
            ( Lens' DescribeMultiplexResponse (Maybe MultiplexState)
describeMultiplexResponse_state
                forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to forall a. ToText a => a -> CI Text
Data.toTextCI
            ),
          forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"STARTING"
            Accept
Core.AcceptRetry
            ( Lens' DescribeMultiplexResponse (Maybe MultiplexState)
describeMultiplexResponse_state
                forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to forall a. ToText a => a -> CI Text
Data.toTextCI
            ),
          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 =
  Core.Wait
    { $sel:name:Wait :: ByteString
Core.name = ByteString
"MultiplexStopped",
      $sel:attempts:Wait :: Int
Core.attempts = Int
28,
      $sel:delay:Wait :: Seconds
Core.delay = Seconds
5,
      $sel:acceptors:Wait :: [Acceptor DescribeMultiplex]
Core.acceptors =
        [ forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"IDLE"
            Accept
Core.AcceptSuccess
            ( Lens' DescribeMultiplexResponse (Maybe MultiplexState)
describeMultiplexResponse_state
                forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to forall a. ToText a => a -> CI Text
Data.toTextCI
            ),
          forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"STOPPING"
            Accept
Core.AcceptRetry
            ( Lens' DescribeMultiplexResponse (Maybe MultiplexState)
describeMultiplexResponse_state
                forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to forall a. ToText a => a -> CI Text
Data.toTextCI
            ),
          forall a. Int -> Accept -> Acceptor a
Core.matchStatus Int
500 Accept
Core.AcceptRetry
        ]
    }