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

import qualified Amazonka.Core as Core
import Amazonka.DocumentDB.DescribeDBInstances
import Amazonka.DocumentDB.Lens
import Amazonka.DocumentDB.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Polls 'Amazonka.DocumentDB.DescribeDBInstances' every 30 seconds until a successful state is reached. An error is returned after 60 failed checks.
newDBInstanceAvailable :: Core.Wait DescribeDBInstances
newDBInstanceAvailable :: Wait DescribeDBInstances
newDBInstanceAvailable =
  Wait :: forall a. ByteString -> Int -> Seconds -> [Acceptor a] -> Wait a
Core.Wait
    { $sel:_waitName:Wait :: ByteString
Core._waitName = ByteString
"DBInstanceAvailable",
      $sel:_waitAttempts:Wait :: Int
Core._waitAttempts = Int
60,
      $sel:_waitDelay:Wait :: Seconds
Core._waitDelay = Seconds
30,
      $sel:_waitAcceptors:Wait :: [Acceptor DescribeDBInstances]
Core._waitAcceptors =
        [ CI Text
-> Accept
-> Fold (AWSResponse DescribeDBInstances) (CI Text)
-> Acceptor DescribeDBInstances
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"available"
            Accept
Core.AcceptSuccess
            ( (DescribeDBInstancesResponse -> [DBInstance])
-> Fold DescribeDBInstancesResponse DBInstance
forall (f :: * -> *) s a. Foldable f => (s -> f a) -> Fold s a
Lens.folding
                ( Getting [DBInstance] DescribeDBInstancesResponse [DBInstance]
-> DescribeDBInstancesResponse -> [DBInstance]
forall r s. Getting [r] s [r] -> s -> [r]
Lens.concatOf
                    ( (Maybe [DBInstance] -> Const [DBInstance] (Maybe [DBInstance]))
-> DescribeDBInstancesResponse
-> Const [DBInstance] DescribeDBInstancesResponse
Lens' DescribeDBInstancesResponse (Maybe [DBInstance])
describeDBInstancesResponse_dbInstances
                        ((Maybe [DBInstance] -> Const [DBInstance] (Maybe [DBInstance]))
 -> DescribeDBInstancesResponse
 -> Const [DBInstance] DescribeDBInstancesResponse)
-> (([DBInstance] -> Const [DBInstance] [DBInstance])
    -> Maybe [DBInstance] -> Const [DBInstance] (Maybe [DBInstance]))
-> Getting [DBInstance] DescribeDBInstancesResponse [DBInstance]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([DBInstance] -> Const [DBInstance] [DBInstance])
-> Maybe [DBInstance] -> Const [DBInstance] (Maybe [DBInstance])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                    )
                )
                ((DBInstance -> f DBInstance)
 -> DescribeDBInstancesResponse -> f DescribeDBInstancesResponse)
-> ((CI Text -> f (CI Text)) -> DBInstance -> f DBInstance)
-> (CI Text -> f (CI Text))
-> DescribeDBInstancesResponse
-> f DescribeDBInstancesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Maybe Text -> f (Maybe Text)) -> DBInstance -> f DBInstance
Lens' DBInstance (Maybe Text)
dbInstance_dbInstanceStatus
                ((Maybe Text -> f (Maybe Text)) -> DBInstance -> f DBInstance)
-> ((CI Text -> f (CI Text)) -> Maybe Text -> f (Maybe Text))
-> (CI Text -> f (CI Text))
-> DBInstance
-> f DBInstance
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> f Text) -> Maybe Text -> f (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                ((Text -> f Text) -> Maybe Text -> f (Maybe Text))
-> ((CI Text -> f (CI Text)) -> Text -> f Text)
-> (CI Text -> f (CI Text))
-> Maybe Text
-> f (Maybe Text)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> CI Text) -> (CI Text -> f (CI Text)) -> Text -> f Text
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to Text -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            ),
          CI Text
-> Accept
-> Fold (AWSResponse DescribeDBInstances) (CI Text)
-> Acceptor DescribeDBInstances
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAny
            CI Text
"deleted"
            Accept
Core.AcceptFailure
            ( (DescribeDBInstancesResponse -> [DBInstance])
-> Fold DescribeDBInstancesResponse DBInstance
forall (f :: * -> *) s a. Foldable f => (s -> f a) -> Fold s a
Lens.folding
                ( Getting [DBInstance] DescribeDBInstancesResponse [DBInstance]
-> DescribeDBInstancesResponse -> [DBInstance]
forall r s. Getting [r] s [r] -> s -> [r]
Lens.concatOf
                    ( (Maybe [DBInstance] -> Const [DBInstance] (Maybe [DBInstance]))
-> DescribeDBInstancesResponse
-> Const [DBInstance] DescribeDBInstancesResponse
Lens' DescribeDBInstancesResponse (Maybe [DBInstance])
describeDBInstancesResponse_dbInstances
                        ((Maybe [DBInstance] -> Const [DBInstance] (Maybe [DBInstance]))
 -> DescribeDBInstancesResponse
 -> Const [DBInstance] DescribeDBInstancesResponse)
-> (([DBInstance] -> Const [DBInstance] [DBInstance])
    -> Maybe [DBInstance] -> Const [DBInstance] (Maybe [DBInstance]))
-> Getting [DBInstance] DescribeDBInstancesResponse [DBInstance]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([DBInstance] -> Const [DBInstance] [DBInstance])
-> Maybe [DBInstance] -> Const [DBInstance] (Maybe [DBInstance])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                    )
                )
                ((DBInstance -> f DBInstance)
 -> DescribeDBInstancesResponse -> f DescribeDBInstancesResponse)
-> ((CI Text -> f (CI Text)) -> DBInstance -> f DBInstance)
-> (CI Text -> f (CI Text))
-> DescribeDBInstancesResponse
-> f DescribeDBInstancesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Maybe Text -> f (Maybe Text)) -> DBInstance -> f DBInstance
Lens' DBInstance (Maybe Text)
dbInstance_dbInstanceStatus
                ((Maybe Text -> f (Maybe Text)) -> DBInstance -> f DBInstance)
-> ((CI Text -> f (CI Text)) -> Maybe Text -> f (Maybe Text))
-> (CI Text -> f (CI Text))
-> DBInstance
-> f DBInstance
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> f Text) -> Maybe Text -> f (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                ((Text -> f Text) -> Maybe Text -> f (Maybe Text))
-> ((CI Text -> f (CI Text)) -> Text -> f Text)
-> (CI Text -> f (CI Text))
-> Maybe Text
-> f (Maybe Text)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> CI Text) -> (CI Text -> f (CI Text)) -> Text -> f Text
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to Text -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            ),
          CI Text
-> Accept
-> Fold (AWSResponse DescribeDBInstances) (CI Text)
-> Acceptor DescribeDBInstances
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAny
            CI Text
"deleting"
            Accept
Core.AcceptFailure
            ( (DescribeDBInstancesResponse -> [DBInstance])
-> Fold DescribeDBInstancesResponse DBInstance
forall (f :: * -> *) s a. Foldable f => (s -> f a) -> Fold s a
Lens.folding
                ( Getting [DBInstance] DescribeDBInstancesResponse [DBInstance]
-> DescribeDBInstancesResponse -> [DBInstance]
forall r s. Getting [r] s [r] -> s -> [r]
Lens.concatOf
                    ( (Maybe [DBInstance] -> Const [DBInstance] (Maybe [DBInstance]))
-> DescribeDBInstancesResponse
-> Const [DBInstance] DescribeDBInstancesResponse
Lens' DescribeDBInstancesResponse (Maybe [DBInstance])
describeDBInstancesResponse_dbInstances
                        ((Maybe [DBInstance] -> Const [DBInstance] (Maybe [DBInstance]))
 -> DescribeDBInstancesResponse
 -> Const [DBInstance] DescribeDBInstancesResponse)
-> (([DBInstance] -> Const [DBInstance] [DBInstance])
    -> Maybe [DBInstance] -> Const [DBInstance] (Maybe [DBInstance]))
-> Getting [DBInstance] DescribeDBInstancesResponse [DBInstance]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([DBInstance] -> Const [DBInstance] [DBInstance])
-> Maybe [DBInstance] -> Const [DBInstance] (Maybe [DBInstance])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                    )
                )
                ((DBInstance -> f DBInstance)
 -> DescribeDBInstancesResponse -> f DescribeDBInstancesResponse)
-> ((CI Text -> f (CI Text)) -> DBInstance -> f DBInstance)
-> (CI Text -> f (CI Text))
-> DescribeDBInstancesResponse
-> f DescribeDBInstancesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Maybe Text -> f (Maybe Text)) -> DBInstance -> f DBInstance
Lens' DBInstance (Maybe Text)
dbInstance_dbInstanceStatus
                ((Maybe Text -> f (Maybe Text)) -> DBInstance -> f DBInstance)
-> ((CI Text -> f (CI Text)) -> Maybe Text -> f (Maybe Text))
-> (CI Text -> f (CI Text))
-> DBInstance
-> f DBInstance
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> f Text) -> Maybe Text -> f (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                ((Text -> f Text) -> Maybe Text -> f (Maybe Text))
-> ((CI Text -> f (CI Text)) -> Text -> f Text)
-> (CI Text -> f (CI Text))
-> Maybe Text
-> f (Maybe Text)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> CI Text) -> (CI Text -> f (CI Text)) -> Text -> f Text
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to Text -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            ),
          CI Text
-> Accept
-> Fold (AWSResponse DescribeDBInstances) (CI Text)
-> Acceptor DescribeDBInstances
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAny
            CI Text
"failed"
            Accept
Core.AcceptFailure
            ( (DescribeDBInstancesResponse -> [DBInstance])
-> Fold DescribeDBInstancesResponse DBInstance
forall (f :: * -> *) s a. Foldable f => (s -> f a) -> Fold s a
Lens.folding
                ( Getting [DBInstance] DescribeDBInstancesResponse [DBInstance]
-> DescribeDBInstancesResponse -> [DBInstance]
forall r s. Getting [r] s [r] -> s -> [r]
Lens.concatOf
                    ( (Maybe [DBInstance] -> Const [DBInstance] (Maybe [DBInstance]))
-> DescribeDBInstancesResponse
-> Const [DBInstance] DescribeDBInstancesResponse
Lens' DescribeDBInstancesResponse (Maybe [DBInstance])
describeDBInstancesResponse_dbInstances
                        ((Maybe [DBInstance] -> Const [DBInstance] (Maybe [DBInstance]))
 -> DescribeDBInstancesResponse
 -> Const [DBInstance] DescribeDBInstancesResponse)
-> (([DBInstance] -> Const [DBInstance] [DBInstance])
    -> Maybe [DBInstance] -> Const [DBInstance] (Maybe [DBInstance]))
-> Getting [DBInstance] DescribeDBInstancesResponse [DBInstance]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([DBInstance] -> Const [DBInstance] [DBInstance])
-> Maybe [DBInstance] -> Const [DBInstance] (Maybe [DBInstance])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                    )
                )
                ((DBInstance -> f DBInstance)
 -> DescribeDBInstancesResponse -> f DescribeDBInstancesResponse)
-> ((CI Text -> f (CI Text)) -> DBInstance -> f DBInstance)
-> (CI Text -> f (CI Text))
-> DescribeDBInstancesResponse
-> f DescribeDBInstancesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Maybe Text -> f (Maybe Text)) -> DBInstance -> f DBInstance
Lens' DBInstance (Maybe Text)
dbInstance_dbInstanceStatus
                ((Maybe Text -> f (Maybe Text)) -> DBInstance -> f DBInstance)
-> ((CI Text -> f (CI Text)) -> Maybe Text -> f (Maybe Text))
-> (CI Text -> f (CI Text))
-> DBInstance
-> f DBInstance
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> f Text) -> Maybe Text -> f (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                ((Text -> f Text) -> Maybe Text -> f (Maybe Text))
-> ((CI Text -> f (CI Text)) -> Text -> f Text)
-> (CI Text -> f (CI Text))
-> Maybe Text
-> f (Maybe Text)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> CI Text) -> (CI Text -> f (CI Text)) -> Text -> f Text
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to Text -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            ),
          CI Text
-> Accept
-> Fold (AWSResponse DescribeDBInstances) (CI Text)
-> Acceptor DescribeDBInstances
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAny
            CI Text
"incompatible-restore"
            Accept
Core.AcceptFailure
            ( (DescribeDBInstancesResponse -> [DBInstance])
-> Fold DescribeDBInstancesResponse DBInstance
forall (f :: * -> *) s a. Foldable f => (s -> f a) -> Fold s a
Lens.folding
                ( Getting [DBInstance] DescribeDBInstancesResponse [DBInstance]
-> DescribeDBInstancesResponse -> [DBInstance]
forall r s. Getting [r] s [r] -> s -> [r]
Lens.concatOf
                    ( (Maybe [DBInstance] -> Const [DBInstance] (Maybe [DBInstance]))
-> DescribeDBInstancesResponse
-> Const [DBInstance] DescribeDBInstancesResponse
Lens' DescribeDBInstancesResponse (Maybe [DBInstance])
describeDBInstancesResponse_dbInstances
                        ((Maybe [DBInstance] -> Const [DBInstance] (Maybe [DBInstance]))
 -> DescribeDBInstancesResponse
 -> Const [DBInstance] DescribeDBInstancesResponse)
-> (([DBInstance] -> Const [DBInstance] [DBInstance])
    -> Maybe [DBInstance] -> Const [DBInstance] (Maybe [DBInstance]))
-> Getting [DBInstance] DescribeDBInstancesResponse [DBInstance]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([DBInstance] -> Const [DBInstance] [DBInstance])
-> Maybe [DBInstance] -> Const [DBInstance] (Maybe [DBInstance])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                    )
                )
                ((DBInstance -> f DBInstance)
 -> DescribeDBInstancesResponse -> f DescribeDBInstancesResponse)
-> ((CI Text -> f (CI Text)) -> DBInstance -> f DBInstance)
-> (CI Text -> f (CI Text))
-> DescribeDBInstancesResponse
-> f DescribeDBInstancesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Maybe Text -> f (Maybe Text)) -> DBInstance -> f DBInstance
Lens' DBInstance (Maybe Text)
dbInstance_dbInstanceStatus
                ((Maybe Text -> f (Maybe Text)) -> DBInstance -> f DBInstance)
-> ((CI Text -> f (CI Text)) -> Maybe Text -> f (Maybe Text))
-> (CI Text -> f (CI Text))
-> DBInstance
-> f DBInstance
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> f Text) -> Maybe Text -> f (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                ((Text -> f Text) -> Maybe Text -> f (Maybe Text))
-> ((CI Text -> f (CI Text)) -> Text -> f Text)
-> (CI Text -> f (CI Text))
-> Maybe Text
-> f (Maybe Text)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> CI Text) -> (CI Text -> f (CI Text)) -> Text -> f Text
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to Text -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            ),
          CI Text
-> Accept
-> Fold (AWSResponse DescribeDBInstances) (CI Text)
-> Acceptor DescribeDBInstances
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAny
            CI Text
"incompatible-parameters"
            Accept
Core.AcceptFailure
            ( (DescribeDBInstancesResponse -> [DBInstance])
-> Fold DescribeDBInstancesResponse DBInstance
forall (f :: * -> *) s a. Foldable f => (s -> f a) -> Fold s a
Lens.folding
                ( Getting [DBInstance] DescribeDBInstancesResponse [DBInstance]
-> DescribeDBInstancesResponse -> [DBInstance]
forall r s. Getting [r] s [r] -> s -> [r]
Lens.concatOf
                    ( (Maybe [DBInstance] -> Const [DBInstance] (Maybe [DBInstance]))
-> DescribeDBInstancesResponse
-> Const [DBInstance] DescribeDBInstancesResponse
Lens' DescribeDBInstancesResponse (Maybe [DBInstance])
describeDBInstancesResponse_dbInstances
                        ((Maybe [DBInstance] -> Const [DBInstance] (Maybe [DBInstance]))
 -> DescribeDBInstancesResponse
 -> Const [DBInstance] DescribeDBInstancesResponse)
-> (([DBInstance] -> Const [DBInstance] [DBInstance])
    -> Maybe [DBInstance] -> Const [DBInstance] (Maybe [DBInstance]))
-> Getting [DBInstance] DescribeDBInstancesResponse [DBInstance]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([DBInstance] -> Const [DBInstance] [DBInstance])
-> Maybe [DBInstance] -> Const [DBInstance] (Maybe [DBInstance])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                    )
                )
                ((DBInstance -> f DBInstance)
 -> DescribeDBInstancesResponse -> f DescribeDBInstancesResponse)
-> ((CI Text -> f (CI Text)) -> DBInstance -> f DBInstance)
-> (CI Text -> f (CI Text))
-> DescribeDBInstancesResponse
-> f DescribeDBInstancesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Maybe Text -> f (Maybe Text)) -> DBInstance -> f DBInstance
Lens' DBInstance (Maybe Text)
dbInstance_dbInstanceStatus
                ((Maybe Text -> f (Maybe Text)) -> DBInstance -> f DBInstance)
-> ((CI Text -> f (CI Text)) -> Maybe Text -> f (Maybe Text))
-> (CI Text -> f (CI Text))
-> DBInstance
-> f DBInstance
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> f Text) -> Maybe Text -> f (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                ((Text -> f Text) -> Maybe Text -> f (Maybe Text))
-> ((CI Text -> f (CI Text)) -> Text -> f Text)
-> (CI Text -> f (CI Text))
-> Maybe Text
-> f (Maybe Text)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> CI Text) -> (CI Text -> f (CI Text)) -> Text -> f Text
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to Text -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            )
        ]
    }

-- | Polls 'Amazonka.DocumentDB.DescribeDBInstances' every 30 seconds until a successful state is reached. An error is returned after 60 failed checks.
newDBInstanceDeleted :: Core.Wait DescribeDBInstances
newDBInstanceDeleted :: Wait DescribeDBInstances
newDBInstanceDeleted =
  Wait :: forall a. ByteString -> Int -> Seconds -> [Acceptor a] -> Wait a
Core.Wait
    { $sel:_waitName:Wait :: ByteString
Core._waitName = ByteString
"DBInstanceDeleted",
      $sel:_waitAttempts:Wait :: Int
Core._waitAttempts = Int
60,
      $sel:_waitDelay:Wait :: Seconds
Core._waitDelay = Seconds
30,
      $sel:_waitAcceptors:Wait :: [Acceptor DescribeDBInstances]
Core._waitAcceptors =
        [ CI Text
-> Accept
-> Fold (AWSResponse DescribeDBInstances) (CI Text)
-> Acceptor DescribeDBInstances
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"deleted"
            Accept
Core.AcceptSuccess
            ( (DescribeDBInstancesResponse -> [DBInstance])
-> Fold DescribeDBInstancesResponse DBInstance
forall (f :: * -> *) s a. Foldable f => (s -> f a) -> Fold s a
Lens.folding
                ( Getting [DBInstance] DescribeDBInstancesResponse [DBInstance]
-> DescribeDBInstancesResponse -> [DBInstance]
forall r s. Getting [r] s [r] -> s -> [r]
Lens.concatOf
                    ( (Maybe [DBInstance] -> Const [DBInstance] (Maybe [DBInstance]))
-> DescribeDBInstancesResponse
-> Const [DBInstance] DescribeDBInstancesResponse
Lens' DescribeDBInstancesResponse (Maybe [DBInstance])
describeDBInstancesResponse_dbInstances
                        ((Maybe [DBInstance] -> Const [DBInstance] (Maybe [DBInstance]))
 -> DescribeDBInstancesResponse
 -> Const [DBInstance] DescribeDBInstancesResponse)
-> (([DBInstance] -> Const [DBInstance] [DBInstance])
    -> Maybe [DBInstance] -> Const [DBInstance] (Maybe [DBInstance]))
-> Getting [DBInstance] DescribeDBInstancesResponse [DBInstance]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([DBInstance] -> Const [DBInstance] [DBInstance])
-> Maybe [DBInstance] -> Const [DBInstance] (Maybe [DBInstance])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                    )
                )
                ((DBInstance -> f DBInstance)
 -> DescribeDBInstancesResponse -> f DescribeDBInstancesResponse)
-> ((CI Text -> f (CI Text)) -> DBInstance -> f DBInstance)
-> (CI Text -> f (CI Text))
-> DescribeDBInstancesResponse
-> f DescribeDBInstancesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Maybe Text -> f (Maybe Text)) -> DBInstance -> f DBInstance
Lens' DBInstance (Maybe Text)
dbInstance_dbInstanceStatus
                ((Maybe Text -> f (Maybe Text)) -> DBInstance -> f DBInstance)
-> ((CI Text -> f (CI Text)) -> Maybe Text -> f (Maybe Text))
-> (CI Text -> f (CI Text))
-> DBInstance
-> f DBInstance
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> f Text) -> Maybe Text -> f (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                ((Text -> f Text) -> Maybe Text -> f (Maybe Text))
-> ((CI Text -> f (CI Text)) -> Text -> f Text)
-> (CI Text -> f (CI Text))
-> Maybe Text
-> f (Maybe Text)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> CI Text) -> (CI Text -> f (CI Text)) -> Text -> f Text
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to Text -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            ),
          ErrorCode -> Accept -> Acceptor DescribeDBInstances
forall a. ErrorCode -> Accept -> Acceptor a
Core.matchError
            ErrorCode
"DBInstanceNotFound"
            Accept
Core.AcceptSuccess,
          CI Text
-> Accept
-> Fold (AWSResponse DescribeDBInstances) (CI Text)
-> Acceptor DescribeDBInstances
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAny
            CI Text
"creating"
            Accept
Core.AcceptFailure
            ( (DescribeDBInstancesResponse -> [DBInstance])
-> Fold DescribeDBInstancesResponse DBInstance
forall (f :: * -> *) s a. Foldable f => (s -> f a) -> Fold s a
Lens.folding
                ( Getting [DBInstance] DescribeDBInstancesResponse [DBInstance]
-> DescribeDBInstancesResponse -> [DBInstance]
forall r s. Getting [r] s [r] -> s -> [r]
Lens.concatOf
                    ( (Maybe [DBInstance] -> Const [DBInstance] (Maybe [DBInstance]))
-> DescribeDBInstancesResponse
-> Const [DBInstance] DescribeDBInstancesResponse
Lens' DescribeDBInstancesResponse (Maybe [DBInstance])
describeDBInstancesResponse_dbInstances
                        ((Maybe [DBInstance] -> Const [DBInstance] (Maybe [DBInstance]))
 -> DescribeDBInstancesResponse
 -> Const [DBInstance] DescribeDBInstancesResponse)
-> (([DBInstance] -> Const [DBInstance] [DBInstance])
    -> Maybe [DBInstance] -> Const [DBInstance] (Maybe [DBInstance]))
-> Getting [DBInstance] DescribeDBInstancesResponse [DBInstance]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([DBInstance] -> Const [DBInstance] [DBInstance])
-> Maybe [DBInstance] -> Const [DBInstance] (Maybe [DBInstance])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                    )
                )
                ((DBInstance -> f DBInstance)
 -> DescribeDBInstancesResponse -> f DescribeDBInstancesResponse)
-> ((CI Text -> f (CI Text)) -> DBInstance -> f DBInstance)
-> (CI Text -> f (CI Text))
-> DescribeDBInstancesResponse
-> f DescribeDBInstancesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Maybe Text -> f (Maybe Text)) -> DBInstance -> f DBInstance
Lens' DBInstance (Maybe Text)
dbInstance_dbInstanceStatus
                ((Maybe Text -> f (Maybe Text)) -> DBInstance -> f DBInstance)
-> ((CI Text -> f (CI Text)) -> Maybe Text -> f (Maybe Text))
-> (CI Text -> f (CI Text))
-> DBInstance
-> f DBInstance
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> f Text) -> Maybe Text -> f (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                ((Text -> f Text) -> Maybe Text -> f (Maybe Text))
-> ((CI Text -> f (CI Text)) -> Text -> f Text)
-> (CI Text -> f (CI Text))
-> Maybe Text
-> f (Maybe Text)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> CI Text) -> (CI Text -> f (CI Text)) -> Text -> f Text
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to Text -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            ),
          CI Text
-> Accept
-> Fold (AWSResponse DescribeDBInstances) (CI Text)
-> Acceptor DescribeDBInstances
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAny
            CI Text
"modifying"
            Accept
Core.AcceptFailure
            ( (DescribeDBInstancesResponse -> [DBInstance])
-> Fold DescribeDBInstancesResponse DBInstance
forall (f :: * -> *) s a. Foldable f => (s -> f a) -> Fold s a
Lens.folding
                ( Getting [DBInstance] DescribeDBInstancesResponse [DBInstance]
-> DescribeDBInstancesResponse -> [DBInstance]
forall r s. Getting [r] s [r] -> s -> [r]
Lens.concatOf
                    ( (Maybe [DBInstance] -> Const [DBInstance] (Maybe [DBInstance]))
-> DescribeDBInstancesResponse
-> Const [DBInstance] DescribeDBInstancesResponse
Lens' DescribeDBInstancesResponse (Maybe [DBInstance])
describeDBInstancesResponse_dbInstances
                        ((Maybe [DBInstance] -> Const [DBInstance] (Maybe [DBInstance]))
 -> DescribeDBInstancesResponse
 -> Const [DBInstance] DescribeDBInstancesResponse)
-> (([DBInstance] -> Const [DBInstance] [DBInstance])
    -> Maybe [DBInstance] -> Const [DBInstance] (Maybe [DBInstance]))
-> Getting [DBInstance] DescribeDBInstancesResponse [DBInstance]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([DBInstance] -> Const [DBInstance] [DBInstance])
-> Maybe [DBInstance] -> Const [DBInstance] (Maybe [DBInstance])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                    )
                )
                ((DBInstance -> f DBInstance)
 -> DescribeDBInstancesResponse -> f DescribeDBInstancesResponse)
-> ((CI Text -> f (CI Text)) -> DBInstance -> f DBInstance)
-> (CI Text -> f (CI Text))
-> DescribeDBInstancesResponse
-> f DescribeDBInstancesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Maybe Text -> f (Maybe Text)) -> DBInstance -> f DBInstance
Lens' DBInstance (Maybe Text)
dbInstance_dbInstanceStatus
                ((Maybe Text -> f (Maybe Text)) -> DBInstance -> f DBInstance)
-> ((CI Text -> f (CI Text)) -> Maybe Text -> f (Maybe Text))
-> (CI Text -> f (CI Text))
-> DBInstance
-> f DBInstance
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> f Text) -> Maybe Text -> f (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                ((Text -> f Text) -> Maybe Text -> f (Maybe Text))
-> ((CI Text -> f (CI Text)) -> Text -> f Text)
-> (CI Text -> f (CI Text))
-> Maybe Text
-> f (Maybe Text)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> CI Text) -> (CI Text -> f (CI Text)) -> Text -> f Text
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to Text -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            ),
          CI Text
-> Accept
-> Fold (AWSResponse DescribeDBInstances) (CI Text)
-> Acceptor DescribeDBInstances
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAny
            CI Text
"rebooting"
            Accept
Core.AcceptFailure
            ( (DescribeDBInstancesResponse -> [DBInstance])
-> Fold DescribeDBInstancesResponse DBInstance
forall (f :: * -> *) s a. Foldable f => (s -> f a) -> Fold s a
Lens.folding
                ( Getting [DBInstance] DescribeDBInstancesResponse [DBInstance]
-> DescribeDBInstancesResponse -> [DBInstance]
forall r s. Getting [r] s [r] -> s -> [r]
Lens.concatOf
                    ( (Maybe [DBInstance] -> Const [DBInstance] (Maybe [DBInstance]))
-> DescribeDBInstancesResponse
-> Const [DBInstance] DescribeDBInstancesResponse
Lens' DescribeDBInstancesResponse (Maybe [DBInstance])
describeDBInstancesResponse_dbInstances
                        ((Maybe [DBInstance] -> Const [DBInstance] (Maybe [DBInstance]))
 -> DescribeDBInstancesResponse
 -> Const [DBInstance] DescribeDBInstancesResponse)
-> (([DBInstance] -> Const [DBInstance] [DBInstance])
    -> Maybe [DBInstance] -> Const [DBInstance] (Maybe [DBInstance]))
-> Getting [DBInstance] DescribeDBInstancesResponse [DBInstance]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([DBInstance] -> Const [DBInstance] [DBInstance])
-> Maybe [DBInstance] -> Const [DBInstance] (Maybe [DBInstance])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                    )
                )
                ((DBInstance -> f DBInstance)
 -> DescribeDBInstancesResponse -> f DescribeDBInstancesResponse)
-> ((CI Text -> f (CI Text)) -> DBInstance -> f DBInstance)
-> (CI Text -> f (CI Text))
-> DescribeDBInstancesResponse
-> f DescribeDBInstancesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Maybe Text -> f (Maybe Text)) -> DBInstance -> f DBInstance
Lens' DBInstance (Maybe Text)
dbInstance_dbInstanceStatus
                ((Maybe Text -> f (Maybe Text)) -> DBInstance -> f DBInstance)
-> ((CI Text -> f (CI Text)) -> Maybe Text -> f (Maybe Text))
-> (CI Text -> f (CI Text))
-> DBInstance
-> f DBInstance
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> f Text) -> Maybe Text -> f (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                ((Text -> f Text) -> Maybe Text -> f (Maybe Text))
-> ((CI Text -> f (CI Text)) -> Text -> f Text)
-> (CI Text -> f (CI Text))
-> Maybe Text
-> f (Maybe Text)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> CI Text) -> (CI Text -> f (CI Text)) -> Text -> f Text
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to Text -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            ),
          CI Text
-> Accept
-> Fold (AWSResponse DescribeDBInstances) (CI Text)
-> Acceptor DescribeDBInstances
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAny
            CI Text
"resetting-master-credentials"
            Accept
Core.AcceptFailure
            ( (DescribeDBInstancesResponse -> [DBInstance])
-> Fold DescribeDBInstancesResponse DBInstance
forall (f :: * -> *) s a. Foldable f => (s -> f a) -> Fold s a
Lens.folding
                ( Getting [DBInstance] DescribeDBInstancesResponse [DBInstance]
-> DescribeDBInstancesResponse -> [DBInstance]
forall r s. Getting [r] s [r] -> s -> [r]
Lens.concatOf
                    ( (Maybe [DBInstance] -> Const [DBInstance] (Maybe [DBInstance]))
-> DescribeDBInstancesResponse
-> Const [DBInstance] DescribeDBInstancesResponse
Lens' DescribeDBInstancesResponse (Maybe [DBInstance])
describeDBInstancesResponse_dbInstances
                        ((Maybe [DBInstance] -> Const [DBInstance] (Maybe [DBInstance]))
 -> DescribeDBInstancesResponse
 -> Const [DBInstance] DescribeDBInstancesResponse)
-> (([DBInstance] -> Const [DBInstance] [DBInstance])
    -> Maybe [DBInstance] -> Const [DBInstance] (Maybe [DBInstance]))
-> Getting [DBInstance] DescribeDBInstancesResponse [DBInstance]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([DBInstance] -> Const [DBInstance] [DBInstance])
-> Maybe [DBInstance] -> Const [DBInstance] (Maybe [DBInstance])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                    )
                )
                ((DBInstance -> f DBInstance)
 -> DescribeDBInstancesResponse -> f DescribeDBInstancesResponse)
-> ((CI Text -> f (CI Text)) -> DBInstance -> f DBInstance)
-> (CI Text -> f (CI Text))
-> DescribeDBInstancesResponse
-> f DescribeDBInstancesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Maybe Text -> f (Maybe Text)) -> DBInstance -> f DBInstance
Lens' DBInstance (Maybe Text)
dbInstance_dbInstanceStatus
                ((Maybe Text -> f (Maybe Text)) -> DBInstance -> f DBInstance)
-> ((CI Text -> f (CI Text)) -> Maybe Text -> f (Maybe Text))
-> (CI Text -> f (CI Text))
-> DBInstance
-> f DBInstance
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> f Text) -> Maybe Text -> f (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                ((Text -> f Text) -> Maybe Text -> f (Maybe Text))
-> ((CI Text -> f (CI Text)) -> Text -> f Text)
-> (CI Text -> f (CI Text))
-> Maybe Text
-> f (Maybe Text)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> CI Text) -> (CI Text -> f (CI Text)) -> Text -> f Text
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to Text -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            )
        ]
    }