{-# 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.ElasticBeanstalk.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.ElasticBeanstalk.Waiters where

import qualified Amazonka.Core as Core
import Amazonka.ElasticBeanstalk.DescribeEnvironments
import Amazonka.ElasticBeanstalk.Lens
import Amazonka.ElasticBeanstalk.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Polls 'Amazonka.ElasticBeanstalk.DescribeEnvironments' every 20 seconds until a successful state is reached. An error is returned after 20 failed checks.
newEnvironmentExists :: Core.Wait DescribeEnvironments
newEnvironmentExists :: Wait DescribeEnvironments
newEnvironmentExists =
  Wait :: forall a. ByteString -> Int -> Seconds -> [Acceptor a] -> Wait a
Core.Wait
    { $sel:_waitName:Wait :: ByteString
Core._waitName = ByteString
"EnvironmentExists",
      $sel:_waitAttempts:Wait :: Int
Core._waitAttempts = Int
20,
      $sel:_waitDelay:Wait :: Seconds
Core._waitDelay = Seconds
20,
      $sel:_waitAcceptors:Wait :: [Acceptor DescribeEnvironments]
Core._waitAcceptors =
        [ CI Text
-> Accept
-> Fold (AWSResponse DescribeEnvironments) (CI Text)
-> Acceptor DescribeEnvironments
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"Ready"
            Accept
Core.AcceptSuccess
            ( (EnvironmentDescriptionsMessage -> [EnvironmentDescription])
-> Fold EnvironmentDescriptionsMessage EnvironmentDescription
forall (f :: * -> *) s a. Foldable f => (s -> f a) -> Fold s a
Lens.folding
                ( Getting
  [EnvironmentDescription]
  EnvironmentDescriptionsMessage
  [EnvironmentDescription]
-> EnvironmentDescriptionsMessage -> [EnvironmentDescription]
forall r s. Getting [r] s [r] -> s -> [r]
Lens.concatOf
                    ( (Maybe [EnvironmentDescription]
 -> Const [EnvironmentDescription] (Maybe [EnvironmentDescription]))
-> EnvironmentDescriptionsMessage
-> Const [EnvironmentDescription] EnvironmentDescriptionsMessage
Lens'
  EnvironmentDescriptionsMessage (Maybe [EnvironmentDescription])
environmentDescriptionsMessage_environments
                        ((Maybe [EnvironmentDescription]
  -> Const [EnvironmentDescription] (Maybe [EnvironmentDescription]))
 -> EnvironmentDescriptionsMessage
 -> Const [EnvironmentDescription] EnvironmentDescriptionsMessage)
-> (([EnvironmentDescription]
     -> Const [EnvironmentDescription] [EnvironmentDescription])
    -> Maybe [EnvironmentDescription]
    -> Const [EnvironmentDescription] (Maybe [EnvironmentDescription]))
-> Getting
     [EnvironmentDescription]
     EnvironmentDescriptionsMessage
     [EnvironmentDescription]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([EnvironmentDescription]
 -> Const [EnvironmentDescription] [EnvironmentDescription])
-> Maybe [EnvironmentDescription]
-> Const [EnvironmentDescription] (Maybe [EnvironmentDescription])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                    )
                )
                ((EnvironmentDescription -> f EnvironmentDescription)
 -> EnvironmentDescriptionsMessage
 -> f EnvironmentDescriptionsMessage)
-> ((CI Text -> f (CI Text))
    -> EnvironmentDescription -> f EnvironmentDescription)
-> (CI Text -> f (CI Text))
-> EnvironmentDescriptionsMessage
-> f EnvironmentDescriptionsMessage
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Maybe EnvironmentStatus -> f (Maybe EnvironmentStatus))
-> EnvironmentDescription -> f EnvironmentDescription
Lens' EnvironmentDescription (Maybe EnvironmentStatus)
environmentDescription_status
                ((Maybe EnvironmentStatus -> f (Maybe EnvironmentStatus))
 -> EnvironmentDescription -> f EnvironmentDescription)
-> ((CI Text -> f (CI Text))
    -> Maybe EnvironmentStatus -> f (Maybe EnvironmentStatus))
-> (CI Text -> f (CI Text))
-> EnvironmentDescription
-> f EnvironmentDescription
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (EnvironmentStatus -> f EnvironmentStatus)
-> Maybe EnvironmentStatus -> f (Maybe EnvironmentStatus)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                ((EnvironmentStatus -> f EnvironmentStatus)
 -> Maybe EnvironmentStatus -> f (Maybe EnvironmentStatus))
-> ((CI Text -> f (CI Text))
    -> EnvironmentStatus -> f EnvironmentStatus)
-> (CI Text -> f (CI Text))
-> Maybe EnvironmentStatus
-> f (Maybe EnvironmentStatus)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (EnvironmentStatus -> CI Text)
-> (CI Text -> f (CI Text))
-> EnvironmentStatus
-> f EnvironmentStatus
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to EnvironmentStatus -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            ),
          CI Text
-> Accept
-> Fold (AWSResponse DescribeEnvironments) (CI Text)
-> Acceptor DescribeEnvironments
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"Launching"
            Accept
Core.AcceptRetry
            ( (EnvironmentDescriptionsMessage -> [EnvironmentDescription])
-> Fold EnvironmentDescriptionsMessage EnvironmentDescription
forall (f :: * -> *) s a. Foldable f => (s -> f a) -> Fold s a
Lens.folding
                ( Getting
  [EnvironmentDescription]
  EnvironmentDescriptionsMessage
  [EnvironmentDescription]
-> EnvironmentDescriptionsMessage -> [EnvironmentDescription]
forall r s. Getting [r] s [r] -> s -> [r]
Lens.concatOf
                    ( (Maybe [EnvironmentDescription]
 -> Const [EnvironmentDescription] (Maybe [EnvironmentDescription]))
-> EnvironmentDescriptionsMessage
-> Const [EnvironmentDescription] EnvironmentDescriptionsMessage
Lens'
  EnvironmentDescriptionsMessage (Maybe [EnvironmentDescription])
environmentDescriptionsMessage_environments
                        ((Maybe [EnvironmentDescription]
  -> Const [EnvironmentDescription] (Maybe [EnvironmentDescription]))
 -> EnvironmentDescriptionsMessage
 -> Const [EnvironmentDescription] EnvironmentDescriptionsMessage)
-> (([EnvironmentDescription]
     -> Const [EnvironmentDescription] [EnvironmentDescription])
    -> Maybe [EnvironmentDescription]
    -> Const [EnvironmentDescription] (Maybe [EnvironmentDescription]))
-> Getting
     [EnvironmentDescription]
     EnvironmentDescriptionsMessage
     [EnvironmentDescription]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([EnvironmentDescription]
 -> Const [EnvironmentDescription] [EnvironmentDescription])
-> Maybe [EnvironmentDescription]
-> Const [EnvironmentDescription] (Maybe [EnvironmentDescription])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                    )
                )
                ((EnvironmentDescription -> f EnvironmentDescription)
 -> EnvironmentDescriptionsMessage
 -> f EnvironmentDescriptionsMessage)
-> ((CI Text -> f (CI Text))
    -> EnvironmentDescription -> f EnvironmentDescription)
-> (CI Text -> f (CI Text))
-> EnvironmentDescriptionsMessage
-> f EnvironmentDescriptionsMessage
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Maybe EnvironmentStatus -> f (Maybe EnvironmentStatus))
-> EnvironmentDescription -> f EnvironmentDescription
Lens' EnvironmentDescription (Maybe EnvironmentStatus)
environmentDescription_status
                ((Maybe EnvironmentStatus -> f (Maybe EnvironmentStatus))
 -> EnvironmentDescription -> f EnvironmentDescription)
-> ((CI Text -> f (CI Text))
    -> Maybe EnvironmentStatus -> f (Maybe EnvironmentStatus))
-> (CI Text -> f (CI Text))
-> EnvironmentDescription
-> f EnvironmentDescription
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (EnvironmentStatus -> f EnvironmentStatus)
-> Maybe EnvironmentStatus -> f (Maybe EnvironmentStatus)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                ((EnvironmentStatus -> f EnvironmentStatus)
 -> Maybe EnvironmentStatus -> f (Maybe EnvironmentStatus))
-> ((CI Text -> f (CI Text))
    -> EnvironmentStatus -> f EnvironmentStatus)
-> (CI Text -> f (CI Text))
-> Maybe EnvironmentStatus
-> f (Maybe EnvironmentStatus)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (EnvironmentStatus -> CI Text)
-> (CI Text -> f (CI Text))
-> EnvironmentStatus
-> f EnvironmentStatus
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to EnvironmentStatus -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            )
        ]
    }

-- | Polls 'Amazonka.ElasticBeanstalk.DescribeEnvironments' every 20 seconds until a successful state is reached. An error is returned after 20 failed checks.
newEnvironmentUpdated :: Core.Wait DescribeEnvironments
newEnvironmentUpdated :: Wait DescribeEnvironments
newEnvironmentUpdated =
  Wait :: forall a. ByteString -> Int -> Seconds -> [Acceptor a] -> Wait a
Core.Wait
    { $sel:_waitName:Wait :: ByteString
Core._waitName = ByteString
"EnvironmentUpdated",
      $sel:_waitAttempts:Wait :: Int
Core._waitAttempts = Int
20,
      $sel:_waitDelay:Wait :: Seconds
Core._waitDelay = Seconds
20,
      $sel:_waitAcceptors:Wait :: [Acceptor DescribeEnvironments]
Core._waitAcceptors =
        [ CI Text
-> Accept
-> Fold (AWSResponse DescribeEnvironments) (CI Text)
-> Acceptor DescribeEnvironments
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"Ready"
            Accept
Core.AcceptSuccess
            ( (EnvironmentDescriptionsMessage -> [EnvironmentDescription])
-> Fold EnvironmentDescriptionsMessage EnvironmentDescription
forall (f :: * -> *) s a. Foldable f => (s -> f a) -> Fold s a
Lens.folding
                ( Getting
  [EnvironmentDescription]
  EnvironmentDescriptionsMessage
  [EnvironmentDescription]
-> EnvironmentDescriptionsMessage -> [EnvironmentDescription]
forall r s. Getting [r] s [r] -> s -> [r]
Lens.concatOf
                    ( (Maybe [EnvironmentDescription]
 -> Const [EnvironmentDescription] (Maybe [EnvironmentDescription]))
-> EnvironmentDescriptionsMessage
-> Const [EnvironmentDescription] EnvironmentDescriptionsMessage
Lens'
  EnvironmentDescriptionsMessage (Maybe [EnvironmentDescription])
environmentDescriptionsMessage_environments
                        ((Maybe [EnvironmentDescription]
  -> Const [EnvironmentDescription] (Maybe [EnvironmentDescription]))
 -> EnvironmentDescriptionsMessage
 -> Const [EnvironmentDescription] EnvironmentDescriptionsMessage)
-> (([EnvironmentDescription]
     -> Const [EnvironmentDescription] [EnvironmentDescription])
    -> Maybe [EnvironmentDescription]
    -> Const [EnvironmentDescription] (Maybe [EnvironmentDescription]))
-> Getting
     [EnvironmentDescription]
     EnvironmentDescriptionsMessage
     [EnvironmentDescription]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([EnvironmentDescription]
 -> Const [EnvironmentDescription] [EnvironmentDescription])
-> Maybe [EnvironmentDescription]
-> Const [EnvironmentDescription] (Maybe [EnvironmentDescription])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                    )
                )
                ((EnvironmentDescription -> f EnvironmentDescription)
 -> EnvironmentDescriptionsMessage
 -> f EnvironmentDescriptionsMessage)
-> ((CI Text -> f (CI Text))
    -> EnvironmentDescription -> f EnvironmentDescription)
-> (CI Text -> f (CI Text))
-> EnvironmentDescriptionsMessage
-> f EnvironmentDescriptionsMessage
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Maybe EnvironmentStatus -> f (Maybe EnvironmentStatus))
-> EnvironmentDescription -> f EnvironmentDescription
Lens' EnvironmentDescription (Maybe EnvironmentStatus)
environmentDescription_status
                ((Maybe EnvironmentStatus -> f (Maybe EnvironmentStatus))
 -> EnvironmentDescription -> f EnvironmentDescription)
-> ((CI Text -> f (CI Text))
    -> Maybe EnvironmentStatus -> f (Maybe EnvironmentStatus))
-> (CI Text -> f (CI Text))
-> EnvironmentDescription
-> f EnvironmentDescription
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (EnvironmentStatus -> f EnvironmentStatus)
-> Maybe EnvironmentStatus -> f (Maybe EnvironmentStatus)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                ((EnvironmentStatus -> f EnvironmentStatus)
 -> Maybe EnvironmentStatus -> f (Maybe EnvironmentStatus))
-> ((CI Text -> f (CI Text))
    -> EnvironmentStatus -> f EnvironmentStatus)
-> (CI Text -> f (CI Text))
-> Maybe EnvironmentStatus
-> f (Maybe EnvironmentStatus)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (EnvironmentStatus -> CI Text)
-> (CI Text -> f (CI Text))
-> EnvironmentStatus
-> f EnvironmentStatus
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to EnvironmentStatus -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            ),
          CI Text
-> Accept
-> Fold (AWSResponse DescribeEnvironments) (CI Text)
-> Acceptor DescribeEnvironments
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"Updating"
            Accept
Core.AcceptRetry
            ( (EnvironmentDescriptionsMessage -> [EnvironmentDescription])
-> Fold EnvironmentDescriptionsMessage EnvironmentDescription
forall (f :: * -> *) s a. Foldable f => (s -> f a) -> Fold s a
Lens.folding
                ( Getting
  [EnvironmentDescription]
  EnvironmentDescriptionsMessage
  [EnvironmentDescription]
-> EnvironmentDescriptionsMessage -> [EnvironmentDescription]
forall r s. Getting [r] s [r] -> s -> [r]
Lens.concatOf
                    ( (Maybe [EnvironmentDescription]
 -> Const [EnvironmentDescription] (Maybe [EnvironmentDescription]))
-> EnvironmentDescriptionsMessage
-> Const [EnvironmentDescription] EnvironmentDescriptionsMessage
Lens'
  EnvironmentDescriptionsMessage (Maybe [EnvironmentDescription])
environmentDescriptionsMessage_environments
                        ((Maybe [EnvironmentDescription]
  -> Const [EnvironmentDescription] (Maybe [EnvironmentDescription]))
 -> EnvironmentDescriptionsMessage
 -> Const [EnvironmentDescription] EnvironmentDescriptionsMessage)
-> (([EnvironmentDescription]
     -> Const [EnvironmentDescription] [EnvironmentDescription])
    -> Maybe [EnvironmentDescription]
    -> Const [EnvironmentDescription] (Maybe [EnvironmentDescription]))
-> Getting
     [EnvironmentDescription]
     EnvironmentDescriptionsMessage
     [EnvironmentDescription]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([EnvironmentDescription]
 -> Const [EnvironmentDescription] [EnvironmentDescription])
-> Maybe [EnvironmentDescription]
-> Const [EnvironmentDescription] (Maybe [EnvironmentDescription])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                    )
                )
                ((EnvironmentDescription -> f EnvironmentDescription)
 -> EnvironmentDescriptionsMessage
 -> f EnvironmentDescriptionsMessage)
-> ((CI Text -> f (CI Text))
    -> EnvironmentDescription -> f EnvironmentDescription)
-> (CI Text -> f (CI Text))
-> EnvironmentDescriptionsMessage
-> f EnvironmentDescriptionsMessage
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Maybe EnvironmentStatus -> f (Maybe EnvironmentStatus))
-> EnvironmentDescription -> f EnvironmentDescription
Lens' EnvironmentDescription (Maybe EnvironmentStatus)
environmentDescription_status
                ((Maybe EnvironmentStatus -> f (Maybe EnvironmentStatus))
 -> EnvironmentDescription -> f EnvironmentDescription)
-> ((CI Text -> f (CI Text))
    -> Maybe EnvironmentStatus -> f (Maybe EnvironmentStatus))
-> (CI Text -> f (CI Text))
-> EnvironmentDescription
-> f EnvironmentDescription
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (EnvironmentStatus -> f EnvironmentStatus)
-> Maybe EnvironmentStatus -> f (Maybe EnvironmentStatus)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                ((EnvironmentStatus -> f EnvironmentStatus)
 -> Maybe EnvironmentStatus -> f (Maybe EnvironmentStatus))
-> ((CI Text -> f (CI Text))
    -> EnvironmentStatus -> f EnvironmentStatus)
-> (CI Text -> f (CI Text))
-> Maybe EnvironmentStatus
-> f (Maybe EnvironmentStatus)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (EnvironmentStatus -> CI Text)
-> (CI Text -> f (CI Text))
-> EnvironmentStatus
-> f EnvironmentStatus
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to EnvironmentStatus -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            )
        ]
    }

-- | Polls 'Amazonka.ElasticBeanstalk.DescribeEnvironments' every 20 seconds until a successful state is reached. An error is returned after 20 failed checks.
newEnvironmentTerminated :: Core.Wait DescribeEnvironments
newEnvironmentTerminated :: Wait DescribeEnvironments
newEnvironmentTerminated =
  Wait :: forall a. ByteString -> Int -> Seconds -> [Acceptor a] -> Wait a
Core.Wait
    { $sel:_waitName:Wait :: ByteString
Core._waitName = ByteString
"EnvironmentTerminated",
      $sel:_waitAttempts:Wait :: Int
Core._waitAttempts = Int
20,
      $sel:_waitDelay:Wait :: Seconds
Core._waitDelay = Seconds
20,
      $sel:_waitAcceptors:Wait :: [Acceptor DescribeEnvironments]
Core._waitAcceptors =
        [ CI Text
-> Accept
-> Fold (AWSResponse DescribeEnvironments) (CI Text)
-> Acceptor DescribeEnvironments
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"Terminated"
            Accept
Core.AcceptSuccess
            ( (EnvironmentDescriptionsMessage -> [EnvironmentDescription])
-> Fold EnvironmentDescriptionsMessage EnvironmentDescription
forall (f :: * -> *) s a. Foldable f => (s -> f a) -> Fold s a
Lens.folding
                ( Getting
  [EnvironmentDescription]
  EnvironmentDescriptionsMessage
  [EnvironmentDescription]
-> EnvironmentDescriptionsMessage -> [EnvironmentDescription]
forall r s. Getting [r] s [r] -> s -> [r]
Lens.concatOf
                    ( (Maybe [EnvironmentDescription]
 -> Const [EnvironmentDescription] (Maybe [EnvironmentDescription]))
-> EnvironmentDescriptionsMessage
-> Const [EnvironmentDescription] EnvironmentDescriptionsMessage
Lens'
  EnvironmentDescriptionsMessage (Maybe [EnvironmentDescription])
environmentDescriptionsMessage_environments
                        ((Maybe [EnvironmentDescription]
  -> Const [EnvironmentDescription] (Maybe [EnvironmentDescription]))
 -> EnvironmentDescriptionsMessage
 -> Const [EnvironmentDescription] EnvironmentDescriptionsMessage)
-> (([EnvironmentDescription]
     -> Const [EnvironmentDescription] [EnvironmentDescription])
    -> Maybe [EnvironmentDescription]
    -> Const [EnvironmentDescription] (Maybe [EnvironmentDescription]))
-> Getting
     [EnvironmentDescription]
     EnvironmentDescriptionsMessage
     [EnvironmentDescription]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([EnvironmentDescription]
 -> Const [EnvironmentDescription] [EnvironmentDescription])
-> Maybe [EnvironmentDescription]
-> Const [EnvironmentDescription] (Maybe [EnvironmentDescription])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                    )
                )
                ((EnvironmentDescription -> f EnvironmentDescription)
 -> EnvironmentDescriptionsMessage
 -> f EnvironmentDescriptionsMessage)
-> ((CI Text -> f (CI Text))
    -> EnvironmentDescription -> f EnvironmentDescription)
-> (CI Text -> f (CI Text))
-> EnvironmentDescriptionsMessage
-> f EnvironmentDescriptionsMessage
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Maybe EnvironmentStatus -> f (Maybe EnvironmentStatus))
-> EnvironmentDescription -> f EnvironmentDescription
Lens' EnvironmentDescription (Maybe EnvironmentStatus)
environmentDescription_status
                ((Maybe EnvironmentStatus -> f (Maybe EnvironmentStatus))
 -> EnvironmentDescription -> f EnvironmentDescription)
-> ((CI Text -> f (CI Text))
    -> Maybe EnvironmentStatus -> f (Maybe EnvironmentStatus))
-> (CI Text -> f (CI Text))
-> EnvironmentDescription
-> f EnvironmentDescription
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (EnvironmentStatus -> f EnvironmentStatus)
-> Maybe EnvironmentStatus -> f (Maybe EnvironmentStatus)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                ((EnvironmentStatus -> f EnvironmentStatus)
 -> Maybe EnvironmentStatus -> f (Maybe EnvironmentStatus))
-> ((CI Text -> f (CI Text))
    -> EnvironmentStatus -> f EnvironmentStatus)
-> (CI Text -> f (CI Text))
-> Maybe EnvironmentStatus
-> f (Maybe EnvironmentStatus)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (EnvironmentStatus -> CI Text)
-> (CI Text -> f (CI Text))
-> EnvironmentStatus
-> f EnvironmentStatus
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to EnvironmentStatus -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            ),
          CI Text
-> Accept
-> Fold (AWSResponse DescribeEnvironments) (CI Text)
-> Acceptor DescribeEnvironments
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"Terminating"
            Accept
Core.AcceptRetry
            ( (EnvironmentDescriptionsMessage -> [EnvironmentDescription])
-> Fold EnvironmentDescriptionsMessage EnvironmentDescription
forall (f :: * -> *) s a. Foldable f => (s -> f a) -> Fold s a
Lens.folding
                ( Getting
  [EnvironmentDescription]
  EnvironmentDescriptionsMessage
  [EnvironmentDescription]
-> EnvironmentDescriptionsMessage -> [EnvironmentDescription]
forall r s. Getting [r] s [r] -> s -> [r]
Lens.concatOf
                    ( (Maybe [EnvironmentDescription]
 -> Const [EnvironmentDescription] (Maybe [EnvironmentDescription]))
-> EnvironmentDescriptionsMessage
-> Const [EnvironmentDescription] EnvironmentDescriptionsMessage
Lens'
  EnvironmentDescriptionsMessage (Maybe [EnvironmentDescription])
environmentDescriptionsMessage_environments
                        ((Maybe [EnvironmentDescription]
  -> Const [EnvironmentDescription] (Maybe [EnvironmentDescription]))
 -> EnvironmentDescriptionsMessage
 -> Const [EnvironmentDescription] EnvironmentDescriptionsMessage)
-> (([EnvironmentDescription]
     -> Const [EnvironmentDescription] [EnvironmentDescription])
    -> Maybe [EnvironmentDescription]
    -> Const [EnvironmentDescription] (Maybe [EnvironmentDescription]))
-> Getting
     [EnvironmentDescription]
     EnvironmentDescriptionsMessage
     [EnvironmentDescription]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([EnvironmentDescription]
 -> Const [EnvironmentDescription] [EnvironmentDescription])
-> Maybe [EnvironmentDescription]
-> Const [EnvironmentDescription] (Maybe [EnvironmentDescription])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                    )
                )
                ((EnvironmentDescription -> f EnvironmentDescription)
 -> EnvironmentDescriptionsMessage
 -> f EnvironmentDescriptionsMessage)
-> ((CI Text -> f (CI Text))
    -> EnvironmentDescription -> f EnvironmentDescription)
-> (CI Text -> f (CI Text))
-> EnvironmentDescriptionsMessage
-> f EnvironmentDescriptionsMessage
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Maybe EnvironmentStatus -> f (Maybe EnvironmentStatus))
-> EnvironmentDescription -> f EnvironmentDescription
Lens' EnvironmentDescription (Maybe EnvironmentStatus)
environmentDescription_status
                ((Maybe EnvironmentStatus -> f (Maybe EnvironmentStatus))
 -> EnvironmentDescription -> f EnvironmentDescription)
-> ((CI Text -> f (CI Text))
    -> Maybe EnvironmentStatus -> f (Maybe EnvironmentStatus))
-> (CI Text -> f (CI Text))
-> EnvironmentDescription
-> f EnvironmentDescription
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (EnvironmentStatus -> f EnvironmentStatus)
-> Maybe EnvironmentStatus -> f (Maybe EnvironmentStatus)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                ((EnvironmentStatus -> f EnvironmentStatus)
 -> Maybe EnvironmentStatus -> f (Maybe EnvironmentStatus))
-> ((CI Text -> f (CI Text))
    -> EnvironmentStatus -> f EnvironmentStatus)
-> (CI Text -> f (CI Text))
-> Maybe EnvironmentStatus
-> f (Maybe EnvironmentStatus)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (EnvironmentStatus -> CI Text)
-> (CI Text -> f (CI Text))
-> EnvironmentStatus
-> f EnvironmentStatus
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to EnvironmentStatus -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            )
        ]
    }