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

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.RDS.DescribeDBClusterSnapshots
import Amazonka.RDS.DescribeDBInstances
import Amazonka.RDS.DescribeDBSnapshots
import Amazonka.RDS.Lens
import Amazonka.RDS.Types

-- | Polls 'Amazonka.RDS.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.RDS.DescribeDBSnapshots' every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.
newDBSnapshotCompleted :: Core.Wait DescribeDBSnapshots
newDBSnapshotCompleted :: Wait DescribeDBSnapshots
newDBSnapshotCompleted =
  Wait :: forall a. ByteString -> Int -> Seconds -> [Acceptor a] -> Wait a
Core.Wait
    { $sel:_waitName:Wait :: ByteString
Core._waitName = ByteString
"DBSnapshotCompleted",
      $sel:_waitAttempts:Wait :: Int
Core._waitAttempts = Int
40,
      $sel:_waitDelay:Wait :: Seconds
Core._waitDelay = Seconds
15,
      $sel:_waitAcceptors:Wait :: [Acceptor DescribeDBSnapshots]
Core._waitAcceptors =
        [ ErrorCode -> Accept -> Acceptor DescribeDBSnapshots
forall a. ErrorCode -> Accept -> Acceptor a
Core.matchError
            ErrorCode
"DBSnapshotNotFound"
            Accept
Core.AcceptSuccess,
          CI Text
-> Accept
-> Fold (AWSResponse DescribeDBSnapshots) (CI Text)
-> Acceptor DescribeDBSnapshots
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"available"
            Accept
Core.AcceptSuccess
            ( (DescribeDBSnapshotsResponse -> [DBSnapshot])
-> Fold DescribeDBSnapshotsResponse DBSnapshot
forall (f :: * -> *) s a. Foldable f => (s -> f a) -> Fold s a
Lens.folding
                ( Getting [DBSnapshot] DescribeDBSnapshotsResponse [DBSnapshot]
-> DescribeDBSnapshotsResponse -> [DBSnapshot]
forall r s. Getting [r] s [r] -> s -> [r]
Lens.concatOf
                    ( (Maybe [DBSnapshot] -> Const [DBSnapshot] (Maybe [DBSnapshot]))
-> DescribeDBSnapshotsResponse
-> Const [DBSnapshot] DescribeDBSnapshotsResponse
Lens' DescribeDBSnapshotsResponse (Maybe [DBSnapshot])
describeDBSnapshotsResponse_dbSnapshots
                        ((Maybe [DBSnapshot] -> Const [DBSnapshot] (Maybe [DBSnapshot]))
 -> DescribeDBSnapshotsResponse
 -> Const [DBSnapshot] DescribeDBSnapshotsResponse)
-> (([DBSnapshot] -> Const [DBSnapshot] [DBSnapshot])
    -> Maybe [DBSnapshot] -> Const [DBSnapshot] (Maybe [DBSnapshot]))
-> Getting [DBSnapshot] DescribeDBSnapshotsResponse [DBSnapshot]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([DBSnapshot] -> Const [DBSnapshot] [DBSnapshot])
-> Maybe [DBSnapshot] -> Const [DBSnapshot] (Maybe [DBSnapshot])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                    )
                )
                ((DBSnapshot -> f DBSnapshot)
 -> DescribeDBSnapshotsResponse -> f DescribeDBSnapshotsResponse)
-> ((CI Text -> f (CI Text)) -> DBSnapshot -> f DBSnapshot)
-> (CI Text -> f (CI Text))
-> DescribeDBSnapshotsResponse
-> f DescribeDBSnapshotsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Maybe Text -> f (Maybe Text)) -> DBSnapshot -> f DBSnapshot
Lens' DBSnapshot (Maybe Text)
dbSnapshot_status
                ((Maybe Text -> f (Maybe Text)) -> DBSnapshot -> f DBSnapshot)
-> ((CI Text -> f (CI Text)) -> Maybe Text -> f (Maybe Text))
-> (CI Text -> f (CI Text))
-> DBSnapshot
-> f DBSnapshot
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.RDS.DescribeDBSnapshots' every 30 seconds until a successful state is reached. An error is returned after 60 failed checks.
newDBSnapshotDeleted :: Core.Wait DescribeDBSnapshots
newDBSnapshotDeleted :: Wait DescribeDBSnapshots
newDBSnapshotDeleted =
  Wait :: forall a. ByteString -> Int -> Seconds -> [Acceptor a] -> Wait a
Core.Wait
    { $sel:_waitName:Wait :: ByteString
Core._waitName = ByteString
"DBSnapshotDeleted",
      $sel:_waitAttempts:Wait :: Int
Core._waitAttempts = Int
60,
      $sel:_waitDelay:Wait :: Seconds
Core._waitDelay = Seconds
30,
      $sel:_waitAcceptors:Wait :: [Acceptor DescribeDBSnapshots]
Core._waitAcceptors =
        [ Bool
-> Accept
-> Fold (AWSResponse DescribeDBSnapshots) [DBSnapshot]
-> Acceptor DescribeDBSnapshots
forall a b. Bool -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchNonEmpty
            Bool
Prelude.True
            Accept
Core.AcceptSuccess
            ( (Maybe [DBSnapshot] -> f (Maybe [DBSnapshot]))
-> DescribeDBSnapshotsResponse -> f DescribeDBSnapshotsResponse
Lens' DescribeDBSnapshotsResponse (Maybe [DBSnapshot])
describeDBSnapshotsResponse_dbSnapshots
                ((Maybe [DBSnapshot] -> f (Maybe [DBSnapshot]))
 -> DescribeDBSnapshotsResponse -> f DescribeDBSnapshotsResponse)
-> (([DBSnapshot] -> f [DBSnapshot])
    -> Maybe [DBSnapshot] -> f (Maybe [DBSnapshot]))
-> ([DBSnapshot] -> f [DBSnapshot])
-> DescribeDBSnapshotsResponse
-> f DescribeDBSnapshotsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([DBSnapshot] -> f [DBSnapshot])
-> Maybe [DBSnapshot] -> f (Maybe [DBSnapshot])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
            ),
          ErrorCode -> Accept -> Acceptor DescribeDBSnapshots
forall a. ErrorCode -> Accept -> Acceptor a
Core.matchError
            ErrorCode
"DBSnapshotNotFound"
            Accept
Core.AcceptSuccess,
          CI Text
-> Accept
-> Fold (AWSResponse DescribeDBSnapshots) (CI Text)
-> Acceptor DescribeDBSnapshots
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAny
            CI Text
"creating"
            Accept
Core.AcceptFailure
            ( (DescribeDBSnapshotsResponse -> [DBSnapshot])
-> Fold DescribeDBSnapshotsResponse DBSnapshot
forall (f :: * -> *) s a. Foldable f => (s -> f a) -> Fold s a
Lens.folding
                ( Getting [DBSnapshot] DescribeDBSnapshotsResponse [DBSnapshot]
-> DescribeDBSnapshotsResponse -> [DBSnapshot]
forall r s. Getting [r] s [r] -> s -> [r]
Lens.concatOf
                    ( (Maybe [DBSnapshot] -> Const [DBSnapshot] (Maybe [DBSnapshot]))
-> DescribeDBSnapshotsResponse
-> Const [DBSnapshot] DescribeDBSnapshotsResponse
Lens' DescribeDBSnapshotsResponse (Maybe [DBSnapshot])
describeDBSnapshotsResponse_dbSnapshots
                        ((Maybe [DBSnapshot] -> Const [DBSnapshot] (Maybe [DBSnapshot]))
 -> DescribeDBSnapshotsResponse
 -> Const [DBSnapshot] DescribeDBSnapshotsResponse)
-> (([DBSnapshot] -> Const [DBSnapshot] [DBSnapshot])
    -> Maybe [DBSnapshot] -> Const [DBSnapshot] (Maybe [DBSnapshot]))
-> Getting [DBSnapshot] DescribeDBSnapshotsResponse [DBSnapshot]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([DBSnapshot] -> Const [DBSnapshot] [DBSnapshot])
-> Maybe [DBSnapshot] -> Const [DBSnapshot] (Maybe [DBSnapshot])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                    )
                )
                ((DBSnapshot -> f DBSnapshot)
 -> DescribeDBSnapshotsResponse -> f DescribeDBSnapshotsResponse)
-> ((CI Text -> f (CI Text)) -> DBSnapshot -> f DBSnapshot)
-> (CI Text -> f (CI Text))
-> DescribeDBSnapshotsResponse
-> f DescribeDBSnapshotsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Maybe Text -> f (Maybe Text)) -> DBSnapshot -> f DBSnapshot
Lens' DBSnapshot (Maybe Text)
dbSnapshot_status
                ((Maybe Text -> f (Maybe Text)) -> DBSnapshot -> f DBSnapshot)
-> ((CI Text -> f (CI Text)) -> Maybe Text -> f (Maybe Text))
-> (CI Text -> f (CI Text))
-> DBSnapshot
-> f DBSnapshot
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 DescribeDBSnapshots) (CI Text)
-> Acceptor DescribeDBSnapshots
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAny
            CI Text
"modifying"
            Accept
Core.AcceptFailure
            ( (DescribeDBSnapshotsResponse -> [DBSnapshot])
-> Fold DescribeDBSnapshotsResponse DBSnapshot
forall (f :: * -> *) s a. Foldable f => (s -> f a) -> Fold s a
Lens.folding
                ( Getting [DBSnapshot] DescribeDBSnapshotsResponse [DBSnapshot]
-> DescribeDBSnapshotsResponse -> [DBSnapshot]
forall r s. Getting [r] s [r] -> s -> [r]
Lens.concatOf
                    ( (Maybe [DBSnapshot] -> Const [DBSnapshot] (Maybe [DBSnapshot]))
-> DescribeDBSnapshotsResponse
-> Const [DBSnapshot] DescribeDBSnapshotsResponse
Lens' DescribeDBSnapshotsResponse (Maybe [DBSnapshot])
describeDBSnapshotsResponse_dbSnapshots
                        ((Maybe [DBSnapshot] -> Const [DBSnapshot] (Maybe [DBSnapshot]))
 -> DescribeDBSnapshotsResponse
 -> Const [DBSnapshot] DescribeDBSnapshotsResponse)
-> (([DBSnapshot] -> Const [DBSnapshot] [DBSnapshot])
    -> Maybe [DBSnapshot] -> Const [DBSnapshot] (Maybe [DBSnapshot]))
-> Getting [DBSnapshot] DescribeDBSnapshotsResponse [DBSnapshot]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([DBSnapshot] -> Const [DBSnapshot] [DBSnapshot])
-> Maybe [DBSnapshot] -> Const [DBSnapshot] (Maybe [DBSnapshot])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                    )
                )
                ((DBSnapshot -> f DBSnapshot)
 -> DescribeDBSnapshotsResponse -> f DescribeDBSnapshotsResponse)
-> ((CI Text -> f (CI Text)) -> DBSnapshot -> f DBSnapshot)
-> (CI Text -> f (CI Text))
-> DescribeDBSnapshotsResponse
-> f DescribeDBSnapshotsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Maybe Text -> f (Maybe Text)) -> DBSnapshot -> f DBSnapshot
Lens' DBSnapshot (Maybe Text)
dbSnapshot_status
                ((Maybe Text -> f (Maybe Text)) -> DBSnapshot -> f DBSnapshot)
-> ((CI Text -> f (CI Text)) -> Maybe Text -> f (Maybe Text))
-> (CI Text -> f (CI Text))
-> DBSnapshot
-> f DBSnapshot
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 DescribeDBSnapshots) (CI Text)
-> Acceptor DescribeDBSnapshots
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAny
            CI Text
"rebooting"
            Accept
Core.AcceptFailure
            ( (DescribeDBSnapshotsResponse -> [DBSnapshot])
-> Fold DescribeDBSnapshotsResponse DBSnapshot
forall (f :: * -> *) s a. Foldable f => (s -> f a) -> Fold s a
Lens.folding
                ( Getting [DBSnapshot] DescribeDBSnapshotsResponse [DBSnapshot]
-> DescribeDBSnapshotsResponse -> [DBSnapshot]
forall r s. Getting [r] s [r] -> s -> [r]
Lens.concatOf
                    ( (Maybe [DBSnapshot] -> Const [DBSnapshot] (Maybe [DBSnapshot]))
-> DescribeDBSnapshotsResponse
-> Const [DBSnapshot] DescribeDBSnapshotsResponse
Lens' DescribeDBSnapshotsResponse (Maybe [DBSnapshot])
describeDBSnapshotsResponse_dbSnapshots
                        ((Maybe [DBSnapshot] -> Const [DBSnapshot] (Maybe [DBSnapshot]))
 -> DescribeDBSnapshotsResponse
 -> Const [DBSnapshot] DescribeDBSnapshotsResponse)
-> (([DBSnapshot] -> Const [DBSnapshot] [DBSnapshot])
    -> Maybe [DBSnapshot] -> Const [DBSnapshot] (Maybe [DBSnapshot]))
-> Getting [DBSnapshot] DescribeDBSnapshotsResponse [DBSnapshot]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([DBSnapshot] -> Const [DBSnapshot] [DBSnapshot])
-> Maybe [DBSnapshot] -> Const [DBSnapshot] (Maybe [DBSnapshot])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                    )
                )
                ((DBSnapshot -> f DBSnapshot)
 -> DescribeDBSnapshotsResponse -> f DescribeDBSnapshotsResponse)
-> ((CI Text -> f (CI Text)) -> DBSnapshot -> f DBSnapshot)
-> (CI Text -> f (CI Text))
-> DescribeDBSnapshotsResponse
-> f DescribeDBSnapshotsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Maybe Text -> f (Maybe Text)) -> DBSnapshot -> f DBSnapshot
Lens' DBSnapshot (Maybe Text)
dbSnapshot_status
                ((Maybe Text -> f (Maybe Text)) -> DBSnapshot -> f DBSnapshot)
-> ((CI Text -> f (CI Text)) -> Maybe Text -> f (Maybe Text))
-> (CI Text -> f (CI Text))
-> DBSnapshot
-> f DBSnapshot
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 DescribeDBSnapshots) (CI Text)
-> Acceptor DescribeDBSnapshots
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAny
            CI Text
"resetting-master-credentials"
            Accept
Core.AcceptFailure
            ( (DescribeDBSnapshotsResponse -> [DBSnapshot])
-> Fold DescribeDBSnapshotsResponse DBSnapshot
forall (f :: * -> *) s a. Foldable f => (s -> f a) -> Fold s a
Lens.folding
                ( Getting [DBSnapshot] DescribeDBSnapshotsResponse [DBSnapshot]
-> DescribeDBSnapshotsResponse -> [DBSnapshot]
forall r s. Getting [r] s [r] -> s -> [r]
Lens.concatOf
                    ( (Maybe [DBSnapshot] -> Const [DBSnapshot] (Maybe [DBSnapshot]))
-> DescribeDBSnapshotsResponse
-> Const [DBSnapshot] DescribeDBSnapshotsResponse
Lens' DescribeDBSnapshotsResponse (Maybe [DBSnapshot])
describeDBSnapshotsResponse_dbSnapshots
                        ((Maybe [DBSnapshot] -> Const [DBSnapshot] (Maybe [DBSnapshot]))
 -> DescribeDBSnapshotsResponse
 -> Const [DBSnapshot] DescribeDBSnapshotsResponse)
-> (([DBSnapshot] -> Const [DBSnapshot] [DBSnapshot])
    -> Maybe [DBSnapshot] -> Const [DBSnapshot] (Maybe [DBSnapshot]))
-> Getting [DBSnapshot] DescribeDBSnapshotsResponse [DBSnapshot]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([DBSnapshot] -> Const [DBSnapshot] [DBSnapshot])
-> Maybe [DBSnapshot] -> Const [DBSnapshot] (Maybe [DBSnapshot])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                    )
                )
                ((DBSnapshot -> f DBSnapshot)
 -> DescribeDBSnapshotsResponse -> f DescribeDBSnapshotsResponse)
-> ((CI Text -> f (CI Text)) -> DBSnapshot -> f DBSnapshot)
-> (CI Text -> f (CI Text))
-> DescribeDBSnapshotsResponse
-> f DescribeDBSnapshotsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Maybe Text -> f (Maybe Text)) -> DBSnapshot -> f DBSnapshot
Lens' DBSnapshot (Maybe Text)
dbSnapshot_status
                ((Maybe Text -> f (Maybe Text)) -> DBSnapshot -> f DBSnapshot)
-> ((CI Text -> f (CI Text)) -> Maybe Text -> f (Maybe Text))
-> (CI Text -> f (CI Text))
-> DBSnapshot
-> f DBSnapshot
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.RDS.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 =
        [ Bool
-> Accept
-> Fold (AWSResponse DescribeDBInstances) [DBInstance]
-> Acceptor DescribeDBInstances
forall a b. Bool -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchNonEmpty
            Bool
Prelude.True
            Accept
Core.AcceptSuccess
            ( (Maybe [DBInstance] -> f (Maybe [DBInstance]))
-> DescribeDBInstancesResponse -> f DescribeDBInstancesResponse
Lens' DescribeDBInstancesResponse (Maybe [DBInstance])
describeDBInstancesResponse_dbInstances
                ((Maybe [DBInstance] -> f (Maybe [DBInstance]))
 -> DescribeDBInstancesResponse -> f DescribeDBInstancesResponse)
-> (([DBInstance] -> f [DBInstance])
    -> Maybe [DBInstance] -> f (Maybe [DBInstance]))
-> ([DBInstance] -> f [DBInstance])
-> DescribeDBInstancesResponse
-> f DescribeDBInstancesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([DBInstance] -> f [DBInstance])
-> Maybe [DBInstance] -> f (Maybe [DBInstance])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
            ),
          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
            )
        ]
    }

-- | Polls 'Amazonka.RDS.DescribeDBClusterSnapshots' every 30 seconds until a successful state is reached. An error is returned after 60 failed checks.
newDBClusterSnapshotDeleted :: Core.Wait DescribeDBClusterSnapshots
newDBClusterSnapshotDeleted :: Wait DescribeDBClusterSnapshots
newDBClusterSnapshotDeleted =
  Wait :: forall a. ByteString -> Int -> Seconds -> [Acceptor a] -> Wait a
Core.Wait
    { $sel:_waitName:Wait :: ByteString
Core._waitName =
        ByteString
"DBClusterSnapshotDeleted",
      $sel:_waitAttempts:Wait :: Int
Core._waitAttempts = Int
60,
      $sel:_waitDelay:Wait :: Seconds
Core._waitDelay = Seconds
30,
      $sel:_waitAcceptors:Wait :: [Acceptor DescribeDBClusterSnapshots]
Core._waitAcceptors =
        [ Bool
-> Accept
-> Fold
     (AWSResponse DescribeDBClusterSnapshots) [DBClusterSnapshot]
-> Acceptor DescribeDBClusterSnapshots
forall a b. Bool -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchNonEmpty
            Bool
Prelude.True
            Accept
Core.AcceptSuccess
            ( (Maybe [DBClusterSnapshot] -> f (Maybe [DBClusterSnapshot]))
-> DescribeDBClusterSnapshotsResponse
-> f DescribeDBClusterSnapshotsResponse
Lens'
  DescribeDBClusterSnapshotsResponse (Maybe [DBClusterSnapshot])
describeDBClusterSnapshotsResponse_dbClusterSnapshots
                ((Maybe [DBClusterSnapshot] -> f (Maybe [DBClusterSnapshot]))
 -> DescribeDBClusterSnapshotsResponse
 -> f DescribeDBClusterSnapshotsResponse)
-> (([DBClusterSnapshot] -> f [DBClusterSnapshot])
    -> Maybe [DBClusterSnapshot] -> f (Maybe [DBClusterSnapshot]))
-> ([DBClusterSnapshot] -> f [DBClusterSnapshot])
-> DescribeDBClusterSnapshotsResponse
-> f DescribeDBClusterSnapshotsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([DBClusterSnapshot] -> f [DBClusterSnapshot])
-> Maybe [DBClusterSnapshot] -> f (Maybe [DBClusterSnapshot])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
            ),
          ErrorCode -> Accept -> Acceptor DescribeDBClusterSnapshots
forall a. ErrorCode -> Accept -> Acceptor a
Core.matchError
            ErrorCode
"DBClusterSnapshotNotFoundFault"
            Accept
Core.AcceptSuccess,
          CI Text
-> Accept
-> Fold (AWSResponse DescribeDBClusterSnapshots) (CI Text)
-> Acceptor DescribeDBClusterSnapshots
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAny
            CI Text
"creating"
            Accept
Core.AcceptFailure
            ( (DescribeDBClusterSnapshotsResponse -> [DBClusterSnapshot])
-> Fold DescribeDBClusterSnapshotsResponse DBClusterSnapshot
forall (f :: * -> *) s a. Foldable f => (s -> f a) -> Fold s a
Lens.folding
                ( Getting
  [DBClusterSnapshot]
  DescribeDBClusterSnapshotsResponse
  [DBClusterSnapshot]
-> DescribeDBClusterSnapshotsResponse -> [DBClusterSnapshot]
forall r s. Getting [r] s [r] -> s -> [r]
Lens.concatOf
                    ( (Maybe [DBClusterSnapshot]
 -> Const [DBClusterSnapshot] (Maybe [DBClusterSnapshot]))
-> DescribeDBClusterSnapshotsResponse
-> Const [DBClusterSnapshot] DescribeDBClusterSnapshotsResponse
Lens'
  DescribeDBClusterSnapshotsResponse (Maybe [DBClusterSnapshot])
describeDBClusterSnapshotsResponse_dbClusterSnapshots
                        ((Maybe [DBClusterSnapshot]
  -> Const [DBClusterSnapshot] (Maybe [DBClusterSnapshot]))
 -> DescribeDBClusterSnapshotsResponse
 -> Const [DBClusterSnapshot] DescribeDBClusterSnapshotsResponse)
-> (([DBClusterSnapshot]
     -> Const [DBClusterSnapshot] [DBClusterSnapshot])
    -> Maybe [DBClusterSnapshot]
    -> Const [DBClusterSnapshot] (Maybe [DBClusterSnapshot]))
-> Getting
     [DBClusterSnapshot]
     DescribeDBClusterSnapshotsResponse
     [DBClusterSnapshot]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([DBClusterSnapshot]
 -> Const [DBClusterSnapshot] [DBClusterSnapshot])
-> Maybe [DBClusterSnapshot]
-> Const [DBClusterSnapshot] (Maybe [DBClusterSnapshot])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                    )
                )
                ((DBClusterSnapshot -> f DBClusterSnapshot)
 -> DescribeDBClusterSnapshotsResponse
 -> f DescribeDBClusterSnapshotsResponse)
-> ((CI Text -> f (CI Text))
    -> DBClusterSnapshot -> f DBClusterSnapshot)
-> (CI Text -> f (CI Text))
-> DescribeDBClusterSnapshotsResponse
-> f DescribeDBClusterSnapshotsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Maybe Text -> f (Maybe Text))
-> DBClusterSnapshot -> f DBClusterSnapshot
Lens' DBClusterSnapshot (Maybe Text)
dbClusterSnapshot_status
                ((Maybe Text -> f (Maybe Text))
 -> DBClusterSnapshot -> f DBClusterSnapshot)
-> ((CI Text -> f (CI Text)) -> Maybe Text -> f (Maybe Text))
-> (CI Text -> f (CI Text))
-> DBClusterSnapshot
-> f DBClusterSnapshot
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 DescribeDBClusterSnapshots) (CI Text)
-> Acceptor DescribeDBClusterSnapshots
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAny
            CI Text
"modifying"
            Accept
Core.AcceptFailure
            ( (DescribeDBClusterSnapshotsResponse -> [DBClusterSnapshot])
-> Fold DescribeDBClusterSnapshotsResponse DBClusterSnapshot
forall (f :: * -> *) s a. Foldable f => (s -> f a) -> Fold s a
Lens.folding
                ( Getting
  [DBClusterSnapshot]
  DescribeDBClusterSnapshotsResponse
  [DBClusterSnapshot]
-> DescribeDBClusterSnapshotsResponse -> [DBClusterSnapshot]
forall r s. Getting [r] s [r] -> s -> [r]
Lens.concatOf
                    ( (Maybe [DBClusterSnapshot]
 -> Const [DBClusterSnapshot] (Maybe [DBClusterSnapshot]))
-> DescribeDBClusterSnapshotsResponse
-> Const [DBClusterSnapshot] DescribeDBClusterSnapshotsResponse
Lens'
  DescribeDBClusterSnapshotsResponse (Maybe [DBClusterSnapshot])
describeDBClusterSnapshotsResponse_dbClusterSnapshots
                        ((Maybe [DBClusterSnapshot]
  -> Const [DBClusterSnapshot] (Maybe [DBClusterSnapshot]))
 -> DescribeDBClusterSnapshotsResponse
 -> Const [DBClusterSnapshot] DescribeDBClusterSnapshotsResponse)
-> (([DBClusterSnapshot]
     -> Const [DBClusterSnapshot] [DBClusterSnapshot])
    -> Maybe [DBClusterSnapshot]
    -> Const [DBClusterSnapshot] (Maybe [DBClusterSnapshot]))
-> Getting
     [DBClusterSnapshot]
     DescribeDBClusterSnapshotsResponse
     [DBClusterSnapshot]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([DBClusterSnapshot]
 -> Const [DBClusterSnapshot] [DBClusterSnapshot])
-> Maybe [DBClusterSnapshot]
-> Const [DBClusterSnapshot] (Maybe [DBClusterSnapshot])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                    )
                )
                ((DBClusterSnapshot -> f DBClusterSnapshot)
 -> DescribeDBClusterSnapshotsResponse
 -> f DescribeDBClusterSnapshotsResponse)
-> ((CI Text -> f (CI Text))
    -> DBClusterSnapshot -> f DBClusterSnapshot)
-> (CI Text -> f (CI Text))
-> DescribeDBClusterSnapshotsResponse
-> f DescribeDBClusterSnapshotsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Maybe Text -> f (Maybe Text))
-> DBClusterSnapshot -> f DBClusterSnapshot
Lens' DBClusterSnapshot (Maybe Text)
dbClusterSnapshot_status
                ((Maybe Text -> f (Maybe Text))
 -> DBClusterSnapshot -> f DBClusterSnapshot)
-> ((CI Text -> f (CI Text)) -> Maybe Text -> f (Maybe Text))
-> (CI Text -> f (CI Text))
-> DBClusterSnapshot
-> f DBClusterSnapshot
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 DescribeDBClusterSnapshots) (CI Text)
-> Acceptor DescribeDBClusterSnapshots
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAny
            CI Text
"rebooting"
            Accept
Core.AcceptFailure
            ( (DescribeDBClusterSnapshotsResponse -> [DBClusterSnapshot])
-> Fold DescribeDBClusterSnapshotsResponse DBClusterSnapshot
forall (f :: * -> *) s a. Foldable f => (s -> f a) -> Fold s a
Lens.folding
                ( Getting
  [DBClusterSnapshot]
  DescribeDBClusterSnapshotsResponse
  [DBClusterSnapshot]
-> DescribeDBClusterSnapshotsResponse -> [DBClusterSnapshot]
forall r s. Getting [r] s [r] -> s -> [r]
Lens.concatOf
                    ( (Maybe [DBClusterSnapshot]
 -> Const [DBClusterSnapshot] (Maybe [DBClusterSnapshot]))
-> DescribeDBClusterSnapshotsResponse
-> Const [DBClusterSnapshot] DescribeDBClusterSnapshotsResponse
Lens'
  DescribeDBClusterSnapshotsResponse (Maybe [DBClusterSnapshot])
describeDBClusterSnapshotsResponse_dbClusterSnapshots
                        ((Maybe [DBClusterSnapshot]
  -> Const [DBClusterSnapshot] (Maybe [DBClusterSnapshot]))
 -> DescribeDBClusterSnapshotsResponse
 -> Const [DBClusterSnapshot] DescribeDBClusterSnapshotsResponse)
-> (([DBClusterSnapshot]
     -> Const [DBClusterSnapshot] [DBClusterSnapshot])
    -> Maybe [DBClusterSnapshot]
    -> Const [DBClusterSnapshot] (Maybe [DBClusterSnapshot]))
-> Getting
     [DBClusterSnapshot]
     DescribeDBClusterSnapshotsResponse
     [DBClusterSnapshot]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([DBClusterSnapshot]
 -> Const [DBClusterSnapshot] [DBClusterSnapshot])
-> Maybe [DBClusterSnapshot]
-> Const [DBClusterSnapshot] (Maybe [DBClusterSnapshot])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                    )
                )
                ((DBClusterSnapshot -> f DBClusterSnapshot)
 -> DescribeDBClusterSnapshotsResponse
 -> f DescribeDBClusterSnapshotsResponse)
-> ((CI Text -> f (CI Text))
    -> DBClusterSnapshot -> f DBClusterSnapshot)
-> (CI Text -> f (CI Text))
-> DescribeDBClusterSnapshotsResponse
-> f DescribeDBClusterSnapshotsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Maybe Text -> f (Maybe Text))
-> DBClusterSnapshot -> f DBClusterSnapshot
Lens' DBClusterSnapshot (Maybe Text)
dbClusterSnapshot_status
                ((Maybe Text -> f (Maybe Text))
 -> DBClusterSnapshot -> f DBClusterSnapshot)
-> ((CI Text -> f (CI Text)) -> Maybe Text -> f (Maybe Text))
-> (CI Text -> f (CI Text))
-> DBClusterSnapshot
-> f DBClusterSnapshot
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 DescribeDBClusterSnapshots) (CI Text)
-> Acceptor DescribeDBClusterSnapshots
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAny
            CI Text
"resetting-master-credentials"
            Accept
Core.AcceptFailure
            ( (DescribeDBClusterSnapshotsResponse -> [DBClusterSnapshot])
-> Fold DescribeDBClusterSnapshotsResponse DBClusterSnapshot
forall (f :: * -> *) s a. Foldable f => (s -> f a) -> Fold s a
Lens.folding
                ( Getting
  [DBClusterSnapshot]
  DescribeDBClusterSnapshotsResponse
  [DBClusterSnapshot]
-> DescribeDBClusterSnapshotsResponse -> [DBClusterSnapshot]
forall r s. Getting [r] s [r] -> s -> [r]
Lens.concatOf
                    ( (Maybe [DBClusterSnapshot]
 -> Const [DBClusterSnapshot] (Maybe [DBClusterSnapshot]))
-> DescribeDBClusterSnapshotsResponse
-> Const [DBClusterSnapshot] DescribeDBClusterSnapshotsResponse
Lens'
  DescribeDBClusterSnapshotsResponse (Maybe [DBClusterSnapshot])
describeDBClusterSnapshotsResponse_dbClusterSnapshots
                        ((Maybe [DBClusterSnapshot]
  -> Const [DBClusterSnapshot] (Maybe [DBClusterSnapshot]))
 -> DescribeDBClusterSnapshotsResponse
 -> Const [DBClusterSnapshot] DescribeDBClusterSnapshotsResponse)
-> (([DBClusterSnapshot]
     -> Const [DBClusterSnapshot] [DBClusterSnapshot])
    -> Maybe [DBClusterSnapshot]
    -> Const [DBClusterSnapshot] (Maybe [DBClusterSnapshot]))
-> Getting
     [DBClusterSnapshot]
     DescribeDBClusterSnapshotsResponse
     [DBClusterSnapshot]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([DBClusterSnapshot]
 -> Const [DBClusterSnapshot] [DBClusterSnapshot])
-> Maybe [DBClusterSnapshot]
-> Const [DBClusterSnapshot] (Maybe [DBClusterSnapshot])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                    )
                )
                ((DBClusterSnapshot -> f DBClusterSnapshot)
 -> DescribeDBClusterSnapshotsResponse
 -> f DescribeDBClusterSnapshotsResponse)
-> ((CI Text -> f (CI Text))
    -> DBClusterSnapshot -> f DBClusterSnapshot)
-> (CI Text -> f (CI Text))
-> DescribeDBClusterSnapshotsResponse
-> f DescribeDBClusterSnapshotsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Maybe Text -> f (Maybe Text))
-> DBClusterSnapshot -> f DBClusterSnapshot
Lens' DBClusterSnapshot (Maybe Text)
dbClusterSnapshot_status
                ((Maybe Text -> f (Maybe Text))
 -> DBClusterSnapshot -> f DBClusterSnapshot)
-> ((CI Text -> f (CI Text)) -> Maybe Text -> f (Maybe Text))
-> (CI Text -> f (CI Text))
-> DBClusterSnapshot
-> f DBClusterSnapshot
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.RDS.DescribeDBSnapshots' every 30 seconds until a successful state is reached. An error is returned after 60 failed checks.
newDBSnapshotAvailable :: Core.Wait DescribeDBSnapshots
newDBSnapshotAvailable :: Wait DescribeDBSnapshots
newDBSnapshotAvailable =
  Wait :: forall a. ByteString -> Int -> Seconds -> [Acceptor a] -> Wait a
Core.Wait
    { $sel:_waitName:Wait :: ByteString
Core._waitName = ByteString
"DBSnapshotAvailable",
      $sel:_waitAttempts:Wait :: Int
Core._waitAttempts = Int
60,
      $sel:_waitDelay:Wait :: Seconds
Core._waitDelay = Seconds
30,
      $sel:_waitAcceptors:Wait :: [Acceptor DescribeDBSnapshots]
Core._waitAcceptors =
        [ CI Text
-> Accept
-> Fold (AWSResponse DescribeDBSnapshots) (CI Text)
-> Acceptor DescribeDBSnapshots
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"available"
            Accept
Core.AcceptSuccess
            ( (DescribeDBSnapshotsResponse -> [DBSnapshot])
-> Fold DescribeDBSnapshotsResponse DBSnapshot
forall (f :: * -> *) s a. Foldable f => (s -> f a) -> Fold s a
Lens.folding
                ( Getting [DBSnapshot] DescribeDBSnapshotsResponse [DBSnapshot]
-> DescribeDBSnapshotsResponse -> [DBSnapshot]
forall r s. Getting [r] s [r] -> s -> [r]
Lens.concatOf
                    ( (Maybe [DBSnapshot] -> Const [DBSnapshot] (Maybe [DBSnapshot]))
-> DescribeDBSnapshotsResponse
-> Const [DBSnapshot] DescribeDBSnapshotsResponse
Lens' DescribeDBSnapshotsResponse (Maybe [DBSnapshot])
describeDBSnapshotsResponse_dbSnapshots
                        ((Maybe [DBSnapshot] -> Const [DBSnapshot] (Maybe [DBSnapshot]))
 -> DescribeDBSnapshotsResponse
 -> Const [DBSnapshot] DescribeDBSnapshotsResponse)
-> (([DBSnapshot] -> Const [DBSnapshot] [DBSnapshot])
    -> Maybe [DBSnapshot] -> Const [DBSnapshot] (Maybe [DBSnapshot]))
-> Getting [DBSnapshot] DescribeDBSnapshotsResponse [DBSnapshot]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([DBSnapshot] -> Const [DBSnapshot] [DBSnapshot])
-> Maybe [DBSnapshot] -> Const [DBSnapshot] (Maybe [DBSnapshot])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                    )
                )
                ((DBSnapshot -> f DBSnapshot)
 -> DescribeDBSnapshotsResponse -> f DescribeDBSnapshotsResponse)
-> ((CI Text -> f (CI Text)) -> DBSnapshot -> f DBSnapshot)
-> (CI Text -> f (CI Text))
-> DescribeDBSnapshotsResponse
-> f DescribeDBSnapshotsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Maybe Text -> f (Maybe Text)) -> DBSnapshot -> f DBSnapshot
Lens' DBSnapshot (Maybe Text)
dbSnapshot_status
                ((Maybe Text -> f (Maybe Text)) -> DBSnapshot -> f DBSnapshot)
-> ((CI Text -> f (CI Text)) -> Maybe Text -> f (Maybe Text))
-> (CI Text -> f (CI Text))
-> DBSnapshot
-> f DBSnapshot
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 DescribeDBSnapshots) (CI Text)
-> Acceptor DescribeDBSnapshots
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAny
            CI Text
"deleted"
            Accept
Core.AcceptFailure
            ( (DescribeDBSnapshotsResponse -> [DBSnapshot])
-> Fold DescribeDBSnapshotsResponse DBSnapshot
forall (f :: * -> *) s a. Foldable f => (s -> f a) -> Fold s a
Lens.folding
                ( Getting [DBSnapshot] DescribeDBSnapshotsResponse [DBSnapshot]
-> DescribeDBSnapshotsResponse -> [DBSnapshot]
forall r s. Getting [r] s [r] -> s -> [r]
Lens.concatOf
                    ( (Maybe [DBSnapshot] -> Const [DBSnapshot] (Maybe [DBSnapshot]))
-> DescribeDBSnapshotsResponse
-> Const [DBSnapshot] DescribeDBSnapshotsResponse
Lens' DescribeDBSnapshotsResponse (Maybe [DBSnapshot])
describeDBSnapshotsResponse_dbSnapshots
                        ((Maybe [DBSnapshot] -> Const [DBSnapshot] (Maybe [DBSnapshot]))
 -> DescribeDBSnapshotsResponse
 -> Const [DBSnapshot] DescribeDBSnapshotsResponse)
-> (([DBSnapshot] -> Const [DBSnapshot] [DBSnapshot])
    -> Maybe [DBSnapshot] -> Const [DBSnapshot] (Maybe [DBSnapshot]))
-> Getting [DBSnapshot] DescribeDBSnapshotsResponse [DBSnapshot]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([DBSnapshot] -> Const [DBSnapshot] [DBSnapshot])
-> Maybe [DBSnapshot] -> Const [DBSnapshot] (Maybe [DBSnapshot])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                    )
                )
                ((DBSnapshot -> f DBSnapshot)
 -> DescribeDBSnapshotsResponse -> f DescribeDBSnapshotsResponse)
-> ((CI Text -> f (CI Text)) -> DBSnapshot -> f DBSnapshot)
-> (CI Text -> f (CI Text))
-> DescribeDBSnapshotsResponse
-> f DescribeDBSnapshotsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Maybe Text -> f (Maybe Text)) -> DBSnapshot -> f DBSnapshot
Lens' DBSnapshot (Maybe Text)
dbSnapshot_status
                ((Maybe Text -> f (Maybe Text)) -> DBSnapshot -> f DBSnapshot)
-> ((CI Text -> f (CI Text)) -> Maybe Text -> f (Maybe Text))
-> (CI Text -> f (CI Text))
-> DBSnapshot
-> f DBSnapshot
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 DescribeDBSnapshots) (CI Text)
-> Acceptor DescribeDBSnapshots
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAny
            CI Text
"deleting"
            Accept
Core.AcceptFailure
            ( (DescribeDBSnapshotsResponse -> [DBSnapshot])
-> Fold DescribeDBSnapshotsResponse DBSnapshot
forall (f :: * -> *) s a. Foldable f => (s -> f a) -> Fold s a
Lens.folding
                ( Getting [DBSnapshot] DescribeDBSnapshotsResponse [DBSnapshot]
-> DescribeDBSnapshotsResponse -> [DBSnapshot]
forall r s. Getting [r] s [r] -> s -> [r]
Lens.concatOf
                    ( (Maybe [DBSnapshot] -> Const [DBSnapshot] (Maybe [DBSnapshot]))
-> DescribeDBSnapshotsResponse
-> Const [DBSnapshot] DescribeDBSnapshotsResponse
Lens' DescribeDBSnapshotsResponse (Maybe [DBSnapshot])
describeDBSnapshotsResponse_dbSnapshots
                        ((Maybe [DBSnapshot] -> Const [DBSnapshot] (Maybe [DBSnapshot]))
 -> DescribeDBSnapshotsResponse
 -> Const [DBSnapshot] DescribeDBSnapshotsResponse)
-> (([DBSnapshot] -> Const [DBSnapshot] [DBSnapshot])
    -> Maybe [DBSnapshot] -> Const [DBSnapshot] (Maybe [DBSnapshot]))
-> Getting [DBSnapshot] DescribeDBSnapshotsResponse [DBSnapshot]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([DBSnapshot] -> Const [DBSnapshot] [DBSnapshot])
-> Maybe [DBSnapshot] -> Const [DBSnapshot] (Maybe [DBSnapshot])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                    )
                )
                ((DBSnapshot -> f DBSnapshot)
 -> DescribeDBSnapshotsResponse -> f DescribeDBSnapshotsResponse)
-> ((CI Text -> f (CI Text)) -> DBSnapshot -> f DBSnapshot)
-> (CI Text -> f (CI Text))
-> DescribeDBSnapshotsResponse
-> f DescribeDBSnapshotsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Maybe Text -> f (Maybe Text)) -> DBSnapshot -> f DBSnapshot
Lens' DBSnapshot (Maybe Text)
dbSnapshot_status
                ((Maybe Text -> f (Maybe Text)) -> DBSnapshot -> f DBSnapshot)
-> ((CI Text -> f (CI Text)) -> Maybe Text -> f (Maybe Text))
-> (CI Text -> f (CI Text))
-> DBSnapshot
-> f DBSnapshot
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 DescribeDBSnapshots) (CI Text)
-> Acceptor DescribeDBSnapshots
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAny
            CI Text
"failed"
            Accept
Core.AcceptFailure
            ( (DescribeDBSnapshotsResponse -> [DBSnapshot])
-> Fold DescribeDBSnapshotsResponse DBSnapshot
forall (f :: * -> *) s a. Foldable f => (s -> f a) -> Fold s a
Lens.folding
                ( Getting [DBSnapshot] DescribeDBSnapshotsResponse [DBSnapshot]
-> DescribeDBSnapshotsResponse -> [DBSnapshot]
forall r s. Getting [r] s [r] -> s -> [r]
Lens.concatOf
                    ( (Maybe [DBSnapshot] -> Const [DBSnapshot] (Maybe [DBSnapshot]))
-> DescribeDBSnapshotsResponse
-> Const [DBSnapshot] DescribeDBSnapshotsResponse
Lens' DescribeDBSnapshotsResponse (Maybe [DBSnapshot])
describeDBSnapshotsResponse_dbSnapshots
                        ((Maybe [DBSnapshot] -> Const [DBSnapshot] (Maybe [DBSnapshot]))
 -> DescribeDBSnapshotsResponse
 -> Const [DBSnapshot] DescribeDBSnapshotsResponse)
-> (([DBSnapshot] -> Const [DBSnapshot] [DBSnapshot])
    -> Maybe [DBSnapshot] -> Const [DBSnapshot] (Maybe [DBSnapshot]))
-> Getting [DBSnapshot] DescribeDBSnapshotsResponse [DBSnapshot]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([DBSnapshot] -> Const [DBSnapshot] [DBSnapshot])
-> Maybe [DBSnapshot] -> Const [DBSnapshot] (Maybe [DBSnapshot])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                    )
                )
                ((DBSnapshot -> f DBSnapshot)
 -> DescribeDBSnapshotsResponse -> f DescribeDBSnapshotsResponse)
-> ((CI Text -> f (CI Text)) -> DBSnapshot -> f DBSnapshot)
-> (CI Text -> f (CI Text))
-> DescribeDBSnapshotsResponse
-> f DescribeDBSnapshotsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Maybe Text -> f (Maybe Text)) -> DBSnapshot -> f DBSnapshot
Lens' DBSnapshot (Maybe Text)
dbSnapshot_status
                ((Maybe Text -> f (Maybe Text)) -> DBSnapshot -> f DBSnapshot)
-> ((CI Text -> f (CI Text)) -> Maybe Text -> f (Maybe Text))
-> (CI Text -> f (CI Text))
-> DBSnapshot
-> f DBSnapshot
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 DescribeDBSnapshots) (CI Text)
-> Acceptor DescribeDBSnapshots
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAny
            CI Text
"incompatible-restore"
            Accept
Core.AcceptFailure
            ( (DescribeDBSnapshotsResponse -> [DBSnapshot])
-> Fold DescribeDBSnapshotsResponse DBSnapshot
forall (f :: * -> *) s a. Foldable f => (s -> f a) -> Fold s a
Lens.folding
                ( Getting [DBSnapshot] DescribeDBSnapshotsResponse [DBSnapshot]
-> DescribeDBSnapshotsResponse -> [DBSnapshot]
forall r s. Getting [r] s [r] -> s -> [r]
Lens.concatOf
                    ( (Maybe [DBSnapshot] -> Const [DBSnapshot] (Maybe [DBSnapshot]))
-> DescribeDBSnapshotsResponse
-> Const [DBSnapshot] DescribeDBSnapshotsResponse
Lens' DescribeDBSnapshotsResponse (Maybe [DBSnapshot])
describeDBSnapshotsResponse_dbSnapshots
                        ((Maybe [DBSnapshot] -> Const [DBSnapshot] (Maybe [DBSnapshot]))
 -> DescribeDBSnapshotsResponse
 -> Const [DBSnapshot] DescribeDBSnapshotsResponse)
-> (([DBSnapshot] -> Const [DBSnapshot] [DBSnapshot])
    -> Maybe [DBSnapshot] -> Const [DBSnapshot] (Maybe [DBSnapshot]))
-> Getting [DBSnapshot] DescribeDBSnapshotsResponse [DBSnapshot]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([DBSnapshot] -> Const [DBSnapshot] [DBSnapshot])
-> Maybe [DBSnapshot] -> Const [DBSnapshot] (Maybe [DBSnapshot])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                    )
                )
                ((DBSnapshot -> f DBSnapshot)
 -> DescribeDBSnapshotsResponse -> f DescribeDBSnapshotsResponse)
-> ((CI Text -> f (CI Text)) -> DBSnapshot -> f DBSnapshot)
-> (CI Text -> f (CI Text))
-> DescribeDBSnapshotsResponse
-> f DescribeDBSnapshotsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Maybe Text -> f (Maybe Text)) -> DBSnapshot -> f DBSnapshot
Lens' DBSnapshot (Maybe Text)
dbSnapshot_status
                ((Maybe Text -> f (Maybe Text)) -> DBSnapshot -> f DBSnapshot)
-> ((CI Text -> f (CI Text)) -> Maybe Text -> f (Maybe Text))
-> (CI Text -> f (CI Text))
-> DBSnapshot
-> f DBSnapshot
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 DescribeDBSnapshots) (CI Text)
-> Acceptor DescribeDBSnapshots
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAny
            CI Text
"incompatible-parameters"
            Accept
Core.AcceptFailure
            ( (DescribeDBSnapshotsResponse -> [DBSnapshot])
-> Fold DescribeDBSnapshotsResponse DBSnapshot
forall (f :: * -> *) s a. Foldable f => (s -> f a) -> Fold s a
Lens.folding
                ( Getting [DBSnapshot] DescribeDBSnapshotsResponse [DBSnapshot]
-> DescribeDBSnapshotsResponse -> [DBSnapshot]
forall r s. Getting [r] s [r] -> s -> [r]
Lens.concatOf
                    ( (Maybe [DBSnapshot] -> Const [DBSnapshot] (Maybe [DBSnapshot]))
-> DescribeDBSnapshotsResponse
-> Const [DBSnapshot] DescribeDBSnapshotsResponse
Lens' DescribeDBSnapshotsResponse (Maybe [DBSnapshot])
describeDBSnapshotsResponse_dbSnapshots
                        ((Maybe [DBSnapshot] -> Const [DBSnapshot] (Maybe [DBSnapshot]))
 -> DescribeDBSnapshotsResponse
 -> Const [DBSnapshot] DescribeDBSnapshotsResponse)
-> (([DBSnapshot] -> Const [DBSnapshot] [DBSnapshot])
    -> Maybe [DBSnapshot] -> Const [DBSnapshot] (Maybe [DBSnapshot]))
-> Getting [DBSnapshot] DescribeDBSnapshotsResponse [DBSnapshot]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([DBSnapshot] -> Const [DBSnapshot] [DBSnapshot])
-> Maybe [DBSnapshot] -> Const [DBSnapshot] (Maybe [DBSnapshot])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                    )
                )
                ((DBSnapshot -> f DBSnapshot)
 -> DescribeDBSnapshotsResponse -> f DescribeDBSnapshotsResponse)
-> ((CI Text -> f (CI Text)) -> DBSnapshot -> f DBSnapshot)
-> (CI Text -> f (CI Text))
-> DescribeDBSnapshotsResponse
-> f DescribeDBSnapshotsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Maybe Text -> f (Maybe Text)) -> DBSnapshot -> f DBSnapshot
Lens' DBSnapshot (Maybe Text)
dbSnapshot_status
                ((Maybe Text -> f (Maybe Text)) -> DBSnapshot -> f DBSnapshot)
-> ((CI Text -> f (CI Text)) -> Maybe Text -> f (Maybe Text))
-> (CI Text -> f (CI Text))
-> DBSnapshot
-> f DBSnapshot
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.RDS.DescribeDBClusterSnapshots' every 30 seconds until a successful state is reached. An error is returned after 60 failed checks.
newDBClusterSnapshotAvailable :: Core.Wait DescribeDBClusterSnapshots
newDBClusterSnapshotAvailable :: Wait DescribeDBClusterSnapshots
newDBClusterSnapshotAvailable =
  Wait :: forall a. ByteString -> Int -> Seconds -> [Acceptor a] -> Wait a
Core.Wait
    { $sel:_waitName:Wait :: ByteString
Core._waitName =
        ByteString
"DBClusterSnapshotAvailable",
      $sel:_waitAttempts:Wait :: Int
Core._waitAttempts = Int
60,
      $sel:_waitDelay:Wait :: Seconds
Core._waitDelay = Seconds
30,
      $sel:_waitAcceptors:Wait :: [Acceptor DescribeDBClusterSnapshots]
Core._waitAcceptors =
        [ CI Text
-> Accept
-> Fold (AWSResponse DescribeDBClusterSnapshots) (CI Text)
-> Acceptor DescribeDBClusterSnapshots
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"available"
            Accept
Core.AcceptSuccess
            ( (DescribeDBClusterSnapshotsResponse -> [DBClusterSnapshot])
-> Fold DescribeDBClusterSnapshotsResponse DBClusterSnapshot
forall (f :: * -> *) s a. Foldable f => (s -> f a) -> Fold s a
Lens.folding
                ( Getting
  [DBClusterSnapshot]
  DescribeDBClusterSnapshotsResponse
  [DBClusterSnapshot]
-> DescribeDBClusterSnapshotsResponse -> [DBClusterSnapshot]
forall r s. Getting [r] s [r] -> s -> [r]
Lens.concatOf
                    ( (Maybe [DBClusterSnapshot]
 -> Const [DBClusterSnapshot] (Maybe [DBClusterSnapshot]))
-> DescribeDBClusterSnapshotsResponse
-> Const [DBClusterSnapshot] DescribeDBClusterSnapshotsResponse
Lens'
  DescribeDBClusterSnapshotsResponse (Maybe [DBClusterSnapshot])
describeDBClusterSnapshotsResponse_dbClusterSnapshots
                        ((Maybe [DBClusterSnapshot]
  -> Const [DBClusterSnapshot] (Maybe [DBClusterSnapshot]))
 -> DescribeDBClusterSnapshotsResponse
 -> Const [DBClusterSnapshot] DescribeDBClusterSnapshotsResponse)
-> (([DBClusterSnapshot]
     -> Const [DBClusterSnapshot] [DBClusterSnapshot])
    -> Maybe [DBClusterSnapshot]
    -> Const [DBClusterSnapshot] (Maybe [DBClusterSnapshot]))
-> Getting
     [DBClusterSnapshot]
     DescribeDBClusterSnapshotsResponse
     [DBClusterSnapshot]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([DBClusterSnapshot]
 -> Const [DBClusterSnapshot] [DBClusterSnapshot])
-> Maybe [DBClusterSnapshot]
-> Const [DBClusterSnapshot] (Maybe [DBClusterSnapshot])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                    )
                )
                ((DBClusterSnapshot -> f DBClusterSnapshot)
 -> DescribeDBClusterSnapshotsResponse
 -> f DescribeDBClusterSnapshotsResponse)
-> ((CI Text -> f (CI Text))
    -> DBClusterSnapshot -> f DBClusterSnapshot)
-> (CI Text -> f (CI Text))
-> DescribeDBClusterSnapshotsResponse
-> f DescribeDBClusterSnapshotsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Maybe Text -> f (Maybe Text))
-> DBClusterSnapshot -> f DBClusterSnapshot
Lens' DBClusterSnapshot (Maybe Text)
dbClusterSnapshot_status
                ((Maybe Text -> f (Maybe Text))
 -> DBClusterSnapshot -> f DBClusterSnapshot)
-> ((CI Text -> f (CI Text)) -> Maybe Text -> f (Maybe Text))
-> (CI Text -> f (CI Text))
-> DBClusterSnapshot
-> f DBClusterSnapshot
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 DescribeDBClusterSnapshots) (CI Text)
-> Acceptor DescribeDBClusterSnapshots
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAny
            CI Text
"deleted"
            Accept
Core.AcceptFailure
            ( (DescribeDBClusterSnapshotsResponse -> [DBClusterSnapshot])
-> Fold DescribeDBClusterSnapshotsResponse DBClusterSnapshot
forall (f :: * -> *) s a. Foldable f => (s -> f a) -> Fold s a
Lens.folding
                ( Getting
  [DBClusterSnapshot]
  DescribeDBClusterSnapshotsResponse
  [DBClusterSnapshot]
-> DescribeDBClusterSnapshotsResponse -> [DBClusterSnapshot]
forall r s. Getting [r] s [r] -> s -> [r]
Lens.concatOf
                    ( (Maybe [DBClusterSnapshot]
 -> Const [DBClusterSnapshot] (Maybe [DBClusterSnapshot]))
-> DescribeDBClusterSnapshotsResponse
-> Const [DBClusterSnapshot] DescribeDBClusterSnapshotsResponse
Lens'
  DescribeDBClusterSnapshotsResponse (Maybe [DBClusterSnapshot])
describeDBClusterSnapshotsResponse_dbClusterSnapshots
                        ((Maybe [DBClusterSnapshot]
  -> Const [DBClusterSnapshot] (Maybe [DBClusterSnapshot]))
 -> DescribeDBClusterSnapshotsResponse
 -> Const [DBClusterSnapshot] DescribeDBClusterSnapshotsResponse)
-> (([DBClusterSnapshot]
     -> Const [DBClusterSnapshot] [DBClusterSnapshot])
    -> Maybe [DBClusterSnapshot]
    -> Const [DBClusterSnapshot] (Maybe [DBClusterSnapshot]))
-> Getting
     [DBClusterSnapshot]
     DescribeDBClusterSnapshotsResponse
     [DBClusterSnapshot]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([DBClusterSnapshot]
 -> Const [DBClusterSnapshot] [DBClusterSnapshot])
-> Maybe [DBClusterSnapshot]
-> Const [DBClusterSnapshot] (Maybe [DBClusterSnapshot])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                    )
                )
                ((DBClusterSnapshot -> f DBClusterSnapshot)
 -> DescribeDBClusterSnapshotsResponse
 -> f DescribeDBClusterSnapshotsResponse)
-> ((CI Text -> f (CI Text))
    -> DBClusterSnapshot -> f DBClusterSnapshot)
-> (CI Text -> f (CI Text))
-> DescribeDBClusterSnapshotsResponse
-> f DescribeDBClusterSnapshotsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Maybe Text -> f (Maybe Text))
-> DBClusterSnapshot -> f DBClusterSnapshot
Lens' DBClusterSnapshot (Maybe Text)
dbClusterSnapshot_status
                ((Maybe Text -> f (Maybe Text))
 -> DBClusterSnapshot -> f DBClusterSnapshot)
-> ((CI Text -> f (CI Text)) -> Maybe Text -> f (Maybe Text))
-> (CI Text -> f (CI Text))
-> DBClusterSnapshot
-> f DBClusterSnapshot
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 DescribeDBClusterSnapshots) (CI Text)
-> Acceptor DescribeDBClusterSnapshots
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAny
            CI Text
"deleting"
            Accept
Core.AcceptFailure
            ( (DescribeDBClusterSnapshotsResponse -> [DBClusterSnapshot])
-> Fold DescribeDBClusterSnapshotsResponse DBClusterSnapshot
forall (f :: * -> *) s a. Foldable f => (s -> f a) -> Fold s a
Lens.folding
                ( Getting
  [DBClusterSnapshot]
  DescribeDBClusterSnapshotsResponse
  [DBClusterSnapshot]
-> DescribeDBClusterSnapshotsResponse -> [DBClusterSnapshot]
forall r s. Getting [r] s [r] -> s -> [r]
Lens.concatOf
                    ( (Maybe [DBClusterSnapshot]
 -> Const [DBClusterSnapshot] (Maybe [DBClusterSnapshot]))
-> DescribeDBClusterSnapshotsResponse
-> Const [DBClusterSnapshot] DescribeDBClusterSnapshotsResponse
Lens'
  DescribeDBClusterSnapshotsResponse (Maybe [DBClusterSnapshot])
describeDBClusterSnapshotsResponse_dbClusterSnapshots
                        ((Maybe [DBClusterSnapshot]
  -> Const [DBClusterSnapshot] (Maybe [DBClusterSnapshot]))
 -> DescribeDBClusterSnapshotsResponse
 -> Const [DBClusterSnapshot] DescribeDBClusterSnapshotsResponse)
-> (([DBClusterSnapshot]
     -> Const [DBClusterSnapshot] [DBClusterSnapshot])
    -> Maybe [DBClusterSnapshot]
    -> Const [DBClusterSnapshot] (Maybe [DBClusterSnapshot]))
-> Getting
     [DBClusterSnapshot]
     DescribeDBClusterSnapshotsResponse
     [DBClusterSnapshot]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([DBClusterSnapshot]
 -> Const [DBClusterSnapshot] [DBClusterSnapshot])
-> Maybe [DBClusterSnapshot]
-> Const [DBClusterSnapshot] (Maybe [DBClusterSnapshot])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                    )
                )
                ((DBClusterSnapshot -> f DBClusterSnapshot)
 -> DescribeDBClusterSnapshotsResponse
 -> f DescribeDBClusterSnapshotsResponse)
-> ((CI Text -> f (CI Text))
    -> DBClusterSnapshot -> f DBClusterSnapshot)
-> (CI Text -> f (CI Text))
-> DescribeDBClusterSnapshotsResponse
-> f DescribeDBClusterSnapshotsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Maybe Text -> f (Maybe Text))
-> DBClusterSnapshot -> f DBClusterSnapshot
Lens' DBClusterSnapshot (Maybe Text)
dbClusterSnapshot_status
                ((Maybe Text -> f (Maybe Text))
 -> DBClusterSnapshot -> f DBClusterSnapshot)
-> ((CI Text -> f (CI Text)) -> Maybe Text -> f (Maybe Text))
-> (CI Text -> f (CI Text))
-> DBClusterSnapshot
-> f DBClusterSnapshot
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 DescribeDBClusterSnapshots) (CI Text)
-> Acceptor DescribeDBClusterSnapshots
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAny
            CI Text
"failed"
            Accept
Core.AcceptFailure
            ( (DescribeDBClusterSnapshotsResponse -> [DBClusterSnapshot])
-> Fold DescribeDBClusterSnapshotsResponse DBClusterSnapshot
forall (f :: * -> *) s a. Foldable f => (s -> f a) -> Fold s a
Lens.folding
                ( Getting
  [DBClusterSnapshot]
  DescribeDBClusterSnapshotsResponse
  [DBClusterSnapshot]
-> DescribeDBClusterSnapshotsResponse -> [DBClusterSnapshot]
forall r s. Getting [r] s [r] -> s -> [r]
Lens.concatOf
                    ( (Maybe [DBClusterSnapshot]
 -> Const [DBClusterSnapshot] (Maybe [DBClusterSnapshot]))
-> DescribeDBClusterSnapshotsResponse
-> Const [DBClusterSnapshot] DescribeDBClusterSnapshotsResponse
Lens'
  DescribeDBClusterSnapshotsResponse (Maybe [DBClusterSnapshot])
describeDBClusterSnapshotsResponse_dbClusterSnapshots
                        ((Maybe [DBClusterSnapshot]
  -> Const [DBClusterSnapshot] (Maybe [DBClusterSnapshot]))
 -> DescribeDBClusterSnapshotsResponse
 -> Const [DBClusterSnapshot] DescribeDBClusterSnapshotsResponse)
-> (([DBClusterSnapshot]
     -> Const [DBClusterSnapshot] [DBClusterSnapshot])
    -> Maybe [DBClusterSnapshot]
    -> Const [DBClusterSnapshot] (Maybe [DBClusterSnapshot]))
-> Getting
     [DBClusterSnapshot]
     DescribeDBClusterSnapshotsResponse
     [DBClusterSnapshot]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([DBClusterSnapshot]
 -> Const [DBClusterSnapshot] [DBClusterSnapshot])
-> Maybe [DBClusterSnapshot]
-> Const [DBClusterSnapshot] (Maybe [DBClusterSnapshot])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                    )
                )
                ((DBClusterSnapshot -> f DBClusterSnapshot)
 -> DescribeDBClusterSnapshotsResponse
 -> f DescribeDBClusterSnapshotsResponse)
-> ((CI Text -> f (CI Text))
    -> DBClusterSnapshot -> f DBClusterSnapshot)
-> (CI Text -> f (CI Text))
-> DescribeDBClusterSnapshotsResponse
-> f DescribeDBClusterSnapshotsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Maybe Text -> f (Maybe Text))
-> DBClusterSnapshot -> f DBClusterSnapshot
Lens' DBClusterSnapshot (Maybe Text)
dbClusterSnapshot_status
                ((Maybe Text -> f (Maybe Text))
 -> DBClusterSnapshot -> f DBClusterSnapshot)
-> ((CI Text -> f (CI Text)) -> Maybe Text -> f (Maybe Text))
-> (CI Text -> f (CI Text))
-> DBClusterSnapshot
-> f DBClusterSnapshot
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 DescribeDBClusterSnapshots) (CI Text)
-> Acceptor DescribeDBClusterSnapshots
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAny
            CI Text
"incompatible-restore"
            Accept
Core.AcceptFailure
            ( (DescribeDBClusterSnapshotsResponse -> [DBClusterSnapshot])
-> Fold DescribeDBClusterSnapshotsResponse DBClusterSnapshot
forall (f :: * -> *) s a. Foldable f => (s -> f a) -> Fold s a
Lens.folding
                ( Getting
  [DBClusterSnapshot]
  DescribeDBClusterSnapshotsResponse
  [DBClusterSnapshot]
-> DescribeDBClusterSnapshotsResponse -> [DBClusterSnapshot]
forall r s. Getting [r] s [r] -> s -> [r]
Lens.concatOf
                    ( (Maybe [DBClusterSnapshot]
 -> Const [DBClusterSnapshot] (Maybe [DBClusterSnapshot]))
-> DescribeDBClusterSnapshotsResponse
-> Const [DBClusterSnapshot] DescribeDBClusterSnapshotsResponse
Lens'
  DescribeDBClusterSnapshotsResponse (Maybe [DBClusterSnapshot])
describeDBClusterSnapshotsResponse_dbClusterSnapshots
                        ((Maybe [DBClusterSnapshot]
  -> Const [DBClusterSnapshot] (Maybe [DBClusterSnapshot]))
 -> DescribeDBClusterSnapshotsResponse
 -> Const [DBClusterSnapshot] DescribeDBClusterSnapshotsResponse)
-> (([DBClusterSnapshot]
     -> Const [DBClusterSnapshot] [DBClusterSnapshot])
    -> Maybe [DBClusterSnapshot]
    -> Const [DBClusterSnapshot] (Maybe [DBClusterSnapshot]))
-> Getting
     [DBClusterSnapshot]
     DescribeDBClusterSnapshotsResponse
     [DBClusterSnapshot]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([DBClusterSnapshot]
 -> Const [DBClusterSnapshot] [DBClusterSnapshot])
-> Maybe [DBClusterSnapshot]
-> Const [DBClusterSnapshot] (Maybe [DBClusterSnapshot])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                    )
                )
                ((DBClusterSnapshot -> f DBClusterSnapshot)
 -> DescribeDBClusterSnapshotsResponse
 -> f DescribeDBClusterSnapshotsResponse)
-> ((CI Text -> f (CI Text))
    -> DBClusterSnapshot -> f DBClusterSnapshot)
-> (CI Text -> f (CI Text))
-> DescribeDBClusterSnapshotsResponse
-> f DescribeDBClusterSnapshotsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Maybe Text -> f (Maybe Text))
-> DBClusterSnapshot -> f DBClusterSnapshot
Lens' DBClusterSnapshot (Maybe Text)
dbClusterSnapshot_status
                ((Maybe Text -> f (Maybe Text))
 -> DBClusterSnapshot -> f DBClusterSnapshot)
-> ((CI Text -> f (CI Text)) -> Maybe Text -> f (Maybe Text))
-> (CI Text -> f (CI Text))
-> DBClusterSnapshot
-> f DBClusterSnapshot
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 DescribeDBClusterSnapshots) (CI Text)
-> Acceptor DescribeDBClusterSnapshots
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAny
            CI Text
"incompatible-parameters"
            Accept
Core.AcceptFailure
            ( (DescribeDBClusterSnapshotsResponse -> [DBClusterSnapshot])
-> Fold DescribeDBClusterSnapshotsResponse DBClusterSnapshot
forall (f :: * -> *) s a. Foldable f => (s -> f a) -> Fold s a
Lens.folding
                ( Getting
  [DBClusterSnapshot]
  DescribeDBClusterSnapshotsResponse
  [DBClusterSnapshot]
-> DescribeDBClusterSnapshotsResponse -> [DBClusterSnapshot]
forall r s. Getting [r] s [r] -> s -> [r]
Lens.concatOf
                    ( (Maybe [DBClusterSnapshot]
 -> Const [DBClusterSnapshot] (Maybe [DBClusterSnapshot]))
-> DescribeDBClusterSnapshotsResponse
-> Const [DBClusterSnapshot] DescribeDBClusterSnapshotsResponse
Lens'
  DescribeDBClusterSnapshotsResponse (Maybe [DBClusterSnapshot])
describeDBClusterSnapshotsResponse_dbClusterSnapshots
                        ((Maybe [DBClusterSnapshot]
  -> Const [DBClusterSnapshot] (Maybe [DBClusterSnapshot]))
 -> DescribeDBClusterSnapshotsResponse
 -> Const [DBClusterSnapshot] DescribeDBClusterSnapshotsResponse)
-> (([DBClusterSnapshot]
     -> Const [DBClusterSnapshot] [DBClusterSnapshot])
    -> Maybe [DBClusterSnapshot]
    -> Const [DBClusterSnapshot] (Maybe [DBClusterSnapshot]))
-> Getting
     [DBClusterSnapshot]
     DescribeDBClusterSnapshotsResponse
     [DBClusterSnapshot]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([DBClusterSnapshot]
 -> Const [DBClusterSnapshot] [DBClusterSnapshot])
-> Maybe [DBClusterSnapshot]
-> Const [DBClusterSnapshot] (Maybe [DBClusterSnapshot])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                    )
                )
                ((DBClusterSnapshot -> f DBClusterSnapshot)
 -> DescribeDBClusterSnapshotsResponse
 -> f DescribeDBClusterSnapshotsResponse)
-> ((CI Text -> f (CI Text))
    -> DBClusterSnapshot -> f DBClusterSnapshot)
-> (CI Text -> f (CI Text))
-> DescribeDBClusterSnapshotsResponse
-> f DescribeDBClusterSnapshotsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Maybe Text -> f (Maybe Text))
-> DBClusterSnapshot -> f DBClusterSnapshot
Lens' DBClusterSnapshot (Maybe Text)
dbClusterSnapshot_status
                ((Maybe Text -> f (Maybe Text))
 -> DBClusterSnapshot -> f DBClusterSnapshot)
-> ((CI Text -> f (CI Text)) -> Maybe Text -> f (Maybe Text))
-> (CI Text -> f (CI Text))
-> DBClusterSnapshot
-> f DBClusterSnapshot
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
            )
        ]
    }