{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

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

-- |
-- Module      : Amazonka.OpsWorks.DescribeRdsDbInstances
-- 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)
--
-- Describes Amazon RDS instances.
--
-- __Required Permissions__: To use this action, an IAM user must have a
-- Show, Deploy, or Manage permissions level for the stack, or an attached
-- policy that explicitly grants permissions. For more information about
-- user permissions, see
-- <https://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html Managing User Permissions>.
--
-- This call accepts only one resource-identifying parameter.
module Amazonka.OpsWorks.DescribeRdsDbInstances
  ( -- * Creating a Request
    DescribeRdsDbInstances (..),
    newDescribeRdsDbInstances,

    -- * Request Lenses
    describeRdsDbInstances_rdsDbInstanceArns,
    describeRdsDbInstances_stackId,

    -- * Destructuring the Response
    DescribeRdsDbInstancesResponse (..),
    newDescribeRdsDbInstancesResponse,

    -- * Response Lenses
    describeRdsDbInstancesResponse_rdsDbInstances,
    describeRdsDbInstancesResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.OpsWorks.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newDescribeRdsDbInstances' smart constructor.
data DescribeRdsDbInstances = DescribeRdsDbInstances'
  { -- | An array containing the ARNs of the instances to be described.
    DescribeRdsDbInstances -> Maybe [Text]
rdsDbInstanceArns :: Prelude.Maybe [Prelude.Text],
    -- | The ID of the stack with which the instances are registered. The
    -- operation returns descriptions of all registered Amazon RDS instances.
    DescribeRdsDbInstances -> Text
stackId :: Prelude.Text
  }
  deriving (DescribeRdsDbInstances -> DescribeRdsDbInstances -> Bool
(DescribeRdsDbInstances -> DescribeRdsDbInstances -> Bool)
-> (DescribeRdsDbInstances -> DescribeRdsDbInstances -> Bool)
-> Eq DescribeRdsDbInstances
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeRdsDbInstances -> DescribeRdsDbInstances -> Bool
$c/= :: DescribeRdsDbInstances -> DescribeRdsDbInstances -> Bool
== :: DescribeRdsDbInstances -> DescribeRdsDbInstances -> Bool
$c== :: DescribeRdsDbInstances -> DescribeRdsDbInstances -> Bool
Prelude.Eq, ReadPrec [DescribeRdsDbInstances]
ReadPrec DescribeRdsDbInstances
Int -> ReadS DescribeRdsDbInstances
ReadS [DescribeRdsDbInstances]
(Int -> ReadS DescribeRdsDbInstances)
-> ReadS [DescribeRdsDbInstances]
-> ReadPrec DescribeRdsDbInstances
-> ReadPrec [DescribeRdsDbInstances]
-> Read DescribeRdsDbInstances
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeRdsDbInstances]
$creadListPrec :: ReadPrec [DescribeRdsDbInstances]
readPrec :: ReadPrec DescribeRdsDbInstances
$creadPrec :: ReadPrec DescribeRdsDbInstances
readList :: ReadS [DescribeRdsDbInstances]
$creadList :: ReadS [DescribeRdsDbInstances]
readsPrec :: Int -> ReadS DescribeRdsDbInstances
$creadsPrec :: Int -> ReadS DescribeRdsDbInstances
Prelude.Read, Int -> DescribeRdsDbInstances -> ShowS
[DescribeRdsDbInstances] -> ShowS
DescribeRdsDbInstances -> String
(Int -> DescribeRdsDbInstances -> ShowS)
-> (DescribeRdsDbInstances -> String)
-> ([DescribeRdsDbInstances] -> ShowS)
-> Show DescribeRdsDbInstances
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeRdsDbInstances] -> ShowS
$cshowList :: [DescribeRdsDbInstances] -> ShowS
show :: DescribeRdsDbInstances -> String
$cshow :: DescribeRdsDbInstances -> String
showsPrec :: Int -> DescribeRdsDbInstances -> ShowS
$cshowsPrec :: Int -> DescribeRdsDbInstances -> ShowS
Prelude.Show, (forall x. DescribeRdsDbInstances -> Rep DescribeRdsDbInstances x)
-> (forall x.
    Rep DescribeRdsDbInstances x -> DescribeRdsDbInstances)
-> Generic DescribeRdsDbInstances
forall x. Rep DescribeRdsDbInstances x -> DescribeRdsDbInstances
forall x. DescribeRdsDbInstances -> Rep DescribeRdsDbInstances x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeRdsDbInstances x -> DescribeRdsDbInstances
$cfrom :: forall x. DescribeRdsDbInstances -> Rep DescribeRdsDbInstances x
Prelude.Generic)

-- |
-- Create a value of 'DescribeRdsDbInstances' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'rdsDbInstanceArns', 'describeRdsDbInstances_rdsDbInstanceArns' - An array containing the ARNs of the instances to be described.
--
-- 'stackId', 'describeRdsDbInstances_stackId' - The ID of the stack with which the instances are registered. The
-- operation returns descriptions of all registered Amazon RDS instances.
newDescribeRdsDbInstances ::
  -- | 'stackId'
  Prelude.Text ->
  DescribeRdsDbInstances
newDescribeRdsDbInstances :: Text -> DescribeRdsDbInstances
newDescribeRdsDbInstances Text
pStackId_ =
  DescribeRdsDbInstances' :: Maybe [Text] -> Text -> DescribeRdsDbInstances
DescribeRdsDbInstances'
    { $sel:rdsDbInstanceArns:DescribeRdsDbInstances' :: Maybe [Text]
rdsDbInstanceArns =
        Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:stackId:DescribeRdsDbInstances' :: Text
stackId = Text
pStackId_
    }

-- | An array containing the ARNs of the instances to be described.
describeRdsDbInstances_rdsDbInstanceArns :: Lens.Lens' DescribeRdsDbInstances (Prelude.Maybe [Prelude.Text])
describeRdsDbInstances_rdsDbInstanceArns :: (Maybe [Text] -> f (Maybe [Text]))
-> DescribeRdsDbInstances -> f DescribeRdsDbInstances
describeRdsDbInstances_rdsDbInstanceArns = (DescribeRdsDbInstances -> Maybe [Text])
-> (DescribeRdsDbInstances
    -> Maybe [Text] -> DescribeRdsDbInstances)
-> Lens
     DescribeRdsDbInstances
     DescribeRdsDbInstances
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRdsDbInstances' {Maybe [Text]
rdsDbInstanceArns :: Maybe [Text]
$sel:rdsDbInstanceArns:DescribeRdsDbInstances' :: DescribeRdsDbInstances -> Maybe [Text]
rdsDbInstanceArns} -> Maybe [Text]
rdsDbInstanceArns) (\s :: DescribeRdsDbInstances
s@DescribeRdsDbInstances' {} Maybe [Text]
a -> DescribeRdsDbInstances
s {$sel:rdsDbInstanceArns:DescribeRdsDbInstances' :: Maybe [Text]
rdsDbInstanceArns = Maybe [Text]
a} :: DescribeRdsDbInstances) ((Maybe [Text] -> f (Maybe [Text]))
 -> DescribeRdsDbInstances -> f DescribeRdsDbInstances)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DescribeRdsDbInstances
-> f DescribeRdsDbInstances
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The ID of the stack with which the instances are registered. The
-- operation returns descriptions of all registered Amazon RDS instances.
describeRdsDbInstances_stackId :: Lens.Lens' DescribeRdsDbInstances Prelude.Text
describeRdsDbInstances_stackId :: (Text -> f Text)
-> DescribeRdsDbInstances -> f DescribeRdsDbInstances
describeRdsDbInstances_stackId = (DescribeRdsDbInstances -> Text)
-> (DescribeRdsDbInstances -> Text -> DescribeRdsDbInstances)
-> Lens DescribeRdsDbInstances DescribeRdsDbInstances Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRdsDbInstances' {Text
stackId :: Text
$sel:stackId:DescribeRdsDbInstances' :: DescribeRdsDbInstances -> Text
stackId} -> Text
stackId) (\s :: DescribeRdsDbInstances
s@DescribeRdsDbInstances' {} Text
a -> DescribeRdsDbInstances
s {$sel:stackId:DescribeRdsDbInstances' :: Text
stackId = Text
a} :: DescribeRdsDbInstances)

instance Core.AWSRequest DescribeRdsDbInstances where
  type
    AWSResponse DescribeRdsDbInstances =
      DescribeRdsDbInstancesResponse
  request :: DescribeRdsDbInstances -> Request DescribeRdsDbInstances
request = Service -> DescribeRdsDbInstances -> Request DescribeRdsDbInstances
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeRdsDbInstances
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeRdsDbInstances)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeRdsDbInstances))
-> Logger
-> Service
-> Proxy DescribeRdsDbInstances
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeRdsDbInstances)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe [RdsDbInstance] -> Int -> DescribeRdsDbInstancesResponse
DescribeRdsDbInstancesResponse'
            (Maybe [RdsDbInstance] -> Int -> DescribeRdsDbInstancesResponse)
-> Either String (Maybe [RdsDbInstance])
-> Either String (Int -> DescribeRdsDbInstancesResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe (Maybe [RdsDbInstance]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"RdsDbInstances" Either String (Maybe (Maybe [RdsDbInstance]))
-> Maybe [RdsDbInstance] -> Either String (Maybe [RdsDbInstance])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [RdsDbInstance]
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> DescribeRdsDbInstancesResponse)
-> Either String Int
-> Either String DescribeRdsDbInstancesResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable DescribeRdsDbInstances

instance Prelude.NFData DescribeRdsDbInstances

instance Core.ToHeaders DescribeRdsDbInstances where
  toHeaders :: DescribeRdsDbInstances -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeRdsDbInstances -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"OpsWorks_20130218.DescribeRdsDbInstances" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON DescribeRdsDbInstances where
  toJSON :: DescribeRdsDbInstances -> Value
toJSON DescribeRdsDbInstances' {Maybe [Text]
Text
stackId :: Text
rdsDbInstanceArns :: Maybe [Text]
$sel:stackId:DescribeRdsDbInstances' :: DescribeRdsDbInstances -> Text
$sel:rdsDbInstanceArns:DescribeRdsDbInstances' :: DescribeRdsDbInstances -> Maybe [Text]
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"RdsDbInstanceArns" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              ([Text] -> Pair) -> Maybe [Text] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
rdsDbInstanceArns,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"StackId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
stackId)
          ]
      )

instance Core.ToPath DescribeRdsDbInstances where
  toPath :: DescribeRdsDbInstances -> ByteString
toPath = ByteString -> DescribeRdsDbInstances -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Core.ToQuery DescribeRdsDbInstances where
  toQuery :: DescribeRdsDbInstances -> QueryString
toQuery = QueryString -> DescribeRdsDbInstances -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | Contains the response to a @DescribeRdsDbInstances@ request.
--
-- /See:/ 'newDescribeRdsDbInstancesResponse' smart constructor.
data DescribeRdsDbInstancesResponse = DescribeRdsDbInstancesResponse'
  { -- | An a array of @RdsDbInstance@ objects that describe the instances.
    DescribeRdsDbInstancesResponse -> Maybe [RdsDbInstance]
rdsDbInstances :: Prelude.Maybe [RdsDbInstance],
    -- | The response's http status code.
    DescribeRdsDbInstancesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeRdsDbInstancesResponse
-> DescribeRdsDbInstancesResponse -> Bool
(DescribeRdsDbInstancesResponse
 -> DescribeRdsDbInstancesResponse -> Bool)
-> (DescribeRdsDbInstancesResponse
    -> DescribeRdsDbInstancesResponse -> Bool)
-> Eq DescribeRdsDbInstancesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeRdsDbInstancesResponse
-> DescribeRdsDbInstancesResponse -> Bool
$c/= :: DescribeRdsDbInstancesResponse
-> DescribeRdsDbInstancesResponse -> Bool
== :: DescribeRdsDbInstancesResponse
-> DescribeRdsDbInstancesResponse -> Bool
$c== :: DescribeRdsDbInstancesResponse
-> DescribeRdsDbInstancesResponse -> Bool
Prelude.Eq, ReadPrec [DescribeRdsDbInstancesResponse]
ReadPrec DescribeRdsDbInstancesResponse
Int -> ReadS DescribeRdsDbInstancesResponse
ReadS [DescribeRdsDbInstancesResponse]
(Int -> ReadS DescribeRdsDbInstancesResponse)
-> ReadS [DescribeRdsDbInstancesResponse]
-> ReadPrec DescribeRdsDbInstancesResponse
-> ReadPrec [DescribeRdsDbInstancesResponse]
-> Read DescribeRdsDbInstancesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeRdsDbInstancesResponse]
$creadListPrec :: ReadPrec [DescribeRdsDbInstancesResponse]
readPrec :: ReadPrec DescribeRdsDbInstancesResponse
$creadPrec :: ReadPrec DescribeRdsDbInstancesResponse
readList :: ReadS [DescribeRdsDbInstancesResponse]
$creadList :: ReadS [DescribeRdsDbInstancesResponse]
readsPrec :: Int -> ReadS DescribeRdsDbInstancesResponse
$creadsPrec :: Int -> ReadS DescribeRdsDbInstancesResponse
Prelude.Read, Int -> DescribeRdsDbInstancesResponse -> ShowS
[DescribeRdsDbInstancesResponse] -> ShowS
DescribeRdsDbInstancesResponse -> String
(Int -> DescribeRdsDbInstancesResponse -> ShowS)
-> (DescribeRdsDbInstancesResponse -> String)
-> ([DescribeRdsDbInstancesResponse] -> ShowS)
-> Show DescribeRdsDbInstancesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeRdsDbInstancesResponse] -> ShowS
$cshowList :: [DescribeRdsDbInstancesResponse] -> ShowS
show :: DescribeRdsDbInstancesResponse -> String
$cshow :: DescribeRdsDbInstancesResponse -> String
showsPrec :: Int -> DescribeRdsDbInstancesResponse -> ShowS
$cshowsPrec :: Int -> DescribeRdsDbInstancesResponse -> ShowS
Prelude.Show, (forall x.
 DescribeRdsDbInstancesResponse
 -> Rep DescribeRdsDbInstancesResponse x)
-> (forall x.
    Rep DescribeRdsDbInstancesResponse x
    -> DescribeRdsDbInstancesResponse)
-> Generic DescribeRdsDbInstancesResponse
forall x.
Rep DescribeRdsDbInstancesResponse x
-> DescribeRdsDbInstancesResponse
forall x.
DescribeRdsDbInstancesResponse
-> Rep DescribeRdsDbInstancesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeRdsDbInstancesResponse x
-> DescribeRdsDbInstancesResponse
$cfrom :: forall x.
DescribeRdsDbInstancesResponse
-> Rep DescribeRdsDbInstancesResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeRdsDbInstancesResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'rdsDbInstances', 'describeRdsDbInstancesResponse_rdsDbInstances' - An a array of @RdsDbInstance@ objects that describe the instances.
--
-- 'httpStatus', 'describeRdsDbInstancesResponse_httpStatus' - The response's http status code.
newDescribeRdsDbInstancesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeRdsDbInstancesResponse
newDescribeRdsDbInstancesResponse :: Int -> DescribeRdsDbInstancesResponse
newDescribeRdsDbInstancesResponse Int
pHttpStatus_ =
  DescribeRdsDbInstancesResponse' :: Maybe [RdsDbInstance] -> Int -> DescribeRdsDbInstancesResponse
DescribeRdsDbInstancesResponse'
    { $sel:rdsDbInstances:DescribeRdsDbInstancesResponse' :: Maybe [RdsDbInstance]
rdsDbInstances =
        Maybe [RdsDbInstance]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeRdsDbInstancesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | An a array of @RdsDbInstance@ objects that describe the instances.
describeRdsDbInstancesResponse_rdsDbInstances :: Lens.Lens' DescribeRdsDbInstancesResponse (Prelude.Maybe [RdsDbInstance])
describeRdsDbInstancesResponse_rdsDbInstances :: (Maybe [RdsDbInstance] -> f (Maybe [RdsDbInstance]))
-> DescribeRdsDbInstancesResponse
-> f DescribeRdsDbInstancesResponse
describeRdsDbInstancesResponse_rdsDbInstances = (DescribeRdsDbInstancesResponse -> Maybe [RdsDbInstance])
-> (DescribeRdsDbInstancesResponse
    -> Maybe [RdsDbInstance] -> DescribeRdsDbInstancesResponse)
-> Lens
     DescribeRdsDbInstancesResponse
     DescribeRdsDbInstancesResponse
     (Maybe [RdsDbInstance])
     (Maybe [RdsDbInstance])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRdsDbInstancesResponse' {Maybe [RdsDbInstance]
rdsDbInstances :: Maybe [RdsDbInstance]
$sel:rdsDbInstances:DescribeRdsDbInstancesResponse' :: DescribeRdsDbInstancesResponse -> Maybe [RdsDbInstance]
rdsDbInstances} -> Maybe [RdsDbInstance]
rdsDbInstances) (\s :: DescribeRdsDbInstancesResponse
s@DescribeRdsDbInstancesResponse' {} Maybe [RdsDbInstance]
a -> DescribeRdsDbInstancesResponse
s {$sel:rdsDbInstances:DescribeRdsDbInstancesResponse' :: Maybe [RdsDbInstance]
rdsDbInstances = Maybe [RdsDbInstance]
a} :: DescribeRdsDbInstancesResponse) ((Maybe [RdsDbInstance] -> f (Maybe [RdsDbInstance]))
 -> DescribeRdsDbInstancesResponse
 -> f DescribeRdsDbInstancesResponse)
-> ((Maybe [RdsDbInstance] -> f (Maybe [RdsDbInstance]))
    -> Maybe [RdsDbInstance] -> f (Maybe [RdsDbInstance]))
-> (Maybe [RdsDbInstance] -> f (Maybe [RdsDbInstance]))
-> DescribeRdsDbInstancesResponse
-> f DescribeRdsDbInstancesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [RdsDbInstance] [RdsDbInstance] [RdsDbInstance] [RdsDbInstance]
-> Iso
     (Maybe [RdsDbInstance])
     (Maybe [RdsDbInstance])
     (Maybe [RdsDbInstance])
     (Maybe [RdsDbInstance])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  [RdsDbInstance] [RdsDbInstance] [RdsDbInstance] [RdsDbInstance]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The response's http status code.
describeRdsDbInstancesResponse_httpStatus :: Lens.Lens' DescribeRdsDbInstancesResponse Prelude.Int
describeRdsDbInstancesResponse_httpStatus :: (Int -> f Int)
-> DescribeRdsDbInstancesResponse
-> f DescribeRdsDbInstancesResponse
describeRdsDbInstancesResponse_httpStatus = (DescribeRdsDbInstancesResponse -> Int)
-> (DescribeRdsDbInstancesResponse
    -> Int -> DescribeRdsDbInstancesResponse)
-> Lens
     DescribeRdsDbInstancesResponse
     DescribeRdsDbInstancesResponse
     Int
     Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRdsDbInstancesResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeRdsDbInstancesResponse' :: DescribeRdsDbInstancesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeRdsDbInstancesResponse
s@DescribeRdsDbInstancesResponse' {} Int
a -> DescribeRdsDbInstancesResponse
s {$sel:httpStatus:DescribeRdsDbInstancesResponse' :: Int
httpStatus = Int
a} :: DescribeRdsDbInstancesResponse)

instance
  Prelude.NFData
    DescribeRdsDbInstancesResponse