{-# 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.Neptune.DescribeValidDBInstanceModifications
-- 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)
--
-- You can call DescribeValidDBInstanceModifications to learn what
-- modifications you can make to your DB instance. You can use this
-- information when you call ModifyDBInstance.
module Amazonka.Neptune.DescribeValidDBInstanceModifications
  ( -- * Creating a Request
    DescribeValidDBInstanceModifications (..),
    newDescribeValidDBInstanceModifications,

    -- * Request Lenses
    describeValidDBInstanceModifications_dbInstanceIdentifier,

    -- * Destructuring the Response
    DescribeValidDBInstanceModificationsResponse (..),
    newDescribeValidDBInstanceModificationsResponse,

    -- * Response Lenses
    describeValidDBInstanceModificationsResponse_validDBInstanceModificationsMessage,
    describeValidDBInstanceModificationsResponse_httpStatus,
  )
where

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

-- | /See:/ 'newDescribeValidDBInstanceModifications' smart constructor.
data DescribeValidDBInstanceModifications = DescribeValidDBInstanceModifications'
  { -- | The customer identifier or the ARN of your DB instance.
    DescribeValidDBInstanceModifications -> Text
dbInstanceIdentifier :: Prelude.Text
  }
  deriving (DescribeValidDBInstanceModifications
-> DescribeValidDBInstanceModifications -> Bool
(DescribeValidDBInstanceModifications
 -> DescribeValidDBInstanceModifications -> Bool)
-> (DescribeValidDBInstanceModifications
    -> DescribeValidDBInstanceModifications -> Bool)
-> Eq DescribeValidDBInstanceModifications
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeValidDBInstanceModifications
-> DescribeValidDBInstanceModifications -> Bool
$c/= :: DescribeValidDBInstanceModifications
-> DescribeValidDBInstanceModifications -> Bool
== :: DescribeValidDBInstanceModifications
-> DescribeValidDBInstanceModifications -> Bool
$c== :: DescribeValidDBInstanceModifications
-> DescribeValidDBInstanceModifications -> Bool
Prelude.Eq, ReadPrec [DescribeValidDBInstanceModifications]
ReadPrec DescribeValidDBInstanceModifications
Int -> ReadS DescribeValidDBInstanceModifications
ReadS [DescribeValidDBInstanceModifications]
(Int -> ReadS DescribeValidDBInstanceModifications)
-> ReadS [DescribeValidDBInstanceModifications]
-> ReadPrec DescribeValidDBInstanceModifications
-> ReadPrec [DescribeValidDBInstanceModifications]
-> Read DescribeValidDBInstanceModifications
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeValidDBInstanceModifications]
$creadListPrec :: ReadPrec [DescribeValidDBInstanceModifications]
readPrec :: ReadPrec DescribeValidDBInstanceModifications
$creadPrec :: ReadPrec DescribeValidDBInstanceModifications
readList :: ReadS [DescribeValidDBInstanceModifications]
$creadList :: ReadS [DescribeValidDBInstanceModifications]
readsPrec :: Int -> ReadS DescribeValidDBInstanceModifications
$creadsPrec :: Int -> ReadS DescribeValidDBInstanceModifications
Prelude.Read, Int -> DescribeValidDBInstanceModifications -> ShowS
[DescribeValidDBInstanceModifications] -> ShowS
DescribeValidDBInstanceModifications -> String
(Int -> DescribeValidDBInstanceModifications -> ShowS)
-> (DescribeValidDBInstanceModifications -> String)
-> ([DescribeValidDBInstanceModifications] -> ShowS)
-> Show DescribeValidDBInstanceModifications
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeValidDBInstanceModifications] -> ShowS
$cshowList :: [DescribeValidDBInstanceModifications] -> ShowS
show :: DescribeValidDBInstanceModifications -> String
$cshow :: DescribeValidDBInstanceModifications -> String
showsPrec :: Int -> DescribeValidDBInstanceModifications -> ShowS
$cshowsPrec :: Int -> DescribeValidDBInstanceModifications -> ShowS
Prelude.Show, (forall x.
 DescribeValidDBInstanceModifications
 -> Rep DescribeValidDBInstanceModifications x)
-> (forall x.
    Rep DescribeValidDBInstanceModifications x
    -> DescribeValidDBInstanceModifications)
-> Generic DescribeValidDBInstanceModifications
forall x.
Rep DescribeValidDBInstanceModifications x
-> DescribeValidDBInstanceModifications
forall x.
DescribeValidDBInstanceModifications
-> Rep DescribeValidDBInstanceModifications x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeValidDBInstanceModifications x
-> DescribeValidDBInstanceModifications
$cfrom :: forall x.
DescribeValidDBInstanceModifications
-> Rep DescribeValidDBInstanceModifications x
Prelude.Generic)

-- |
-- Create a value of 'DescribeValidDBInstanceModifications' 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:
--
-- 'dbInstanceIdentifier', 'describeValidDBInstanceModifications_dbInstanceIdentifier' - The customer identifier or the ARN of your DB instance.
newDescribeValidDBInstanceModifications ::
  -- | 'dbInstanceIdentifier'
  Prelude.Text ->
  DescribeValidDBInstanceModifications
newDescribeValidDBInstanceModifications :: Text -> DescribeValidDBInstanceModifications
newDescribeValidDBInstanceModifications
  Text
pDBInstanceIdentifier_ =
    DescribeValidDBInstanceModifications' :: Text -> DescribeValidDBInstanceModifications
DescribeValidDBInstanceModifications'
      { $sel:dbInstanceIdentifier:DescribeValidDBInstanceModifications' :: Text
dbInstanceIdentifier =
          Text
pDBInstanceIdentifier_
      }

-- | The customer identifier or the ARN of your DB instance.
describeValidDBInstanceModifications_dbInstanceIdentifier :: Lens.Lens' DescribeValidDBInstanceModifications Prelude.Text
describeValidDBInstanceModifications_dbInstanceIdentifier :: (Text -> f Text)
-> DescribeValidDBInstanceModifications
-> f DescribeValidDBInstanceModifications
describeValidDBInstanceModifications_dbInstanceIdentifier = (DescribeValidDBInstanceModifications -> Text)
-> (DescribeValidDBInstanceModifications
    -> Text -> DescribeValidDBInstanceModifications)
-> Lens
     DescribeValidDBInstanceModifications
     DescribeValidDBInstanceModifications
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeValidDBInstanceModifications' {Text
dbInstanceIdentifier :: Text
$sel:dbInstanceIdentifier:DescribeValidDBInstanceModifications' :: DescribeValidDBInstanceModifications -> Text
dbInstanceIdentifier} -> Text
dbInstanceIdentifier) (\s :: DescribeValidDBInstanceModifications
s@DescribeValidDBInstanceModifications' {} Text
a -> DescribeValidDBInstanceModifications
s {$sel:dbInstanceIdentifier:DescribeValidDBInstanceModifications' :: Text
dbInstanceIdentifier = Text
a} :: DescribeValidDBInstanceModifications)

instance
  Core.AWSRequest
    DescribeValidDBInstanceModifications
  where
  type
    AWSResponse DescribeValidDBInstanceModifications =
      DescribeValidDBInstanceModificationsResponse
  request :: DescribeValidDBInstanceModifications
-> Request DescribeValidDBInstanceModifications
request = Service
-> DescribeValidDBInstanceModifications
-> Request DescribeValidDBInstanceModifications
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeValidDBInstanceModifications
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse DescribeValidDBInstanceModifications)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either
         String (AWSResponse DescribeValidDBInstanceModifications))
-> Logger
-> Service
-> Proxy DescribeValidDBInstanceModifications
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse DescribeValidDBInstanceModifications)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
    -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
      Text
"DescribeValidDBInstanceModificationsResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe ValidDBInstanceModificationsMessage
-> Int -> DescribeValidDBInstanceModificationsResponse
DescribeValidDBInstanceModificationsResponse'
            (Maybe ValidDBInstanceModificationsMessage
 -> Int -> DescribeValidDBInstanceModificationsResponse)
-> Either String (Maybe ValidDBInstanceModificationsMessage)
-> Either
     String (Int -> DescribeValidDBInstanceModificationsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node]
-> Text
-> Either String (Maybe ValidDBInstanceModificationsMessage)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ValidDBInstanceModificationsMessage")
              Either String (Int -> DescribeValidDBInstanceModificationsResponse)
-> Either String Int
-> Either String DescribeValidDBInstanceModificationsResponse
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
    DescribeValidDBInstanceModifications

instance
  Prelude.NFData
    DescribeValidDBInstanceModifications

instance
  Core.ToHeaders
    DescribeValidDBInstanceModifications
  where
  toHeaders :: DescribeValidDBInstanceModifications -> ResponseHeaders
toHeaders = ResponseHeaders
-> DescribeValidDBInstanceModifications -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty

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

instance
  Core.ToQuery
    DescribeValidDBInstanceModifications
  where
  toQuery :: DescribeValidDBInstanceModifications -> QueryString
toQuery DescribeValidDBInstanceModifications' {Text
dbInstanceIdentifier :: Text
$sel:dbInstanceIdentifier:DescribeValidDBInstanceModifications' :: DescribeValidDBInstanceModifications -> Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: ( ByteString
"DescribeValidDBInstanceModifications" ::
                      Prelude.ByteString
                  ),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2014-10-31" :: Prelude.ByteString),
        ByteString
"DBInstanceIdentifier" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
dbInstanceIdentifier
      ]

-- | /See:/ 'newDescribeValidDBInstanceModificationsResponse' smart constructor.
data DescribeValidDBInstanceModificationsResponse = DescribeValidDBInstanceModificationsResponse'
  { DescribeValidDBInstanceModificationsResponse
-> Maybe ValidDBInstanceModificationsMessage
validDBInstanceModificationsMessage :: Prelude.Maybe ValidDBInstanceModificationsMessage,
    -- | The response's http status code.
    DescribeValidDBInstanceModificationsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeValidDBInstanceModificationsResponse
-> DescribeValidDBInstanceModificationsResponse -> Bool
(DescribeValidDBInstanceModificationsResponse
 -> DescribeValidDBInstanceModificationsResponse -> Bool)
-> (DescribeValidDBInstanceModificationsResponse
    -> DescribeValidDBInstanceModificationsResponse -> Bool)
-> Eq DescribeValidDBInstanceModificationsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeValidDBInstanceModificationsResponse
-> DescribeValidDBInstanceModificationsResponse -> Bool
$c/= :: DescribeValidDBInstanceModificationsResponse
-> DescribeValidDBInstanceModificationsResponse -> Bool
== :: DescribeValidDBInstanceModificationsResponse
-> DescribeValidDBInstanceModificationsResponse -> Bool
$c== :: DescribeValidDBInstanceModificationsResponse
-> DescribeValidDBInstanceModificationsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeValidDBInstanceModificationsResponse]
ReadPrec DescribeValidDBInstanceModificationsResponse
Int -> ReadS DescribeValidDBInstanceModificationsResponse
ReadS [DescribeValidDBInstanceModificationsResponse]
(Int -> ReadS DescribeValidDBInstanceModificationsResponse)
-> ReadS [DescribeValidDBInstanceModificationsResponse]
-> ReadPrec DescribeValidDBInstanceModificationsResponse
-> ReadPrec [DescribeValidDBInstanceModificationsResponse]
-> Read DescribeValidDBInstanceModificationsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeValidDBInstanceModificationsResponse]
$creadListPrec :: ReadPrec [DescribeValidDBInstanceModificationsResponse]
readPrec :: ReadPrec DescribeValidDBInstanceModificationsResponse
$creadPrec :: ReadPrec DescribeValidDBInstanceModificationsResponse
readList :: ReadS [DescribeValidDBInstanceModificationsResponse]
$creadList :: ReadS [DescribeValidDBInstanceModificationsResponse]
readsPrec :: Int -> ReadS DescribeValidDBInstanceModificationsResponse
$creadsPrec :: Int -> ReadS DescribeValidDBInstanceModificationsResponse
Prelude.Read, Int -> DescribeValidDBInstanceModificationsResponse -> ShowS
[DescribeValidDBInstanceModificationsResponse] -> ShowS
DescribeValidDBInstanceModificationsResponse -> String
(Int -> DescribeValidDBInstanceModificationsResponse -> ShowS)
-> (DescribeValidDBInstanceModificationsResponse -> String)
-> ([DescribeValidDBInstanceModificationsResponse] -> ShowS)
-> Show DescribeValidDBInstanceModificationsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeValidDBInstanceModificationsResponse] -> ShowS
$cshowList :: [DescribeValidDBInstanceModificationsResponse] -> ShowS
show :: DescribeValidDBInstanceModificationsResponse -> String
$cshow :: DescribeValidDBInstanceModificationsResponse -> String
showsPrec :: Int -> DescribeValidDBInstanceModificationsResponse -> ShowS
$cshowsPrec :: Int -> DescribeValidDBInstanceModificationsResponse -> ShowS
Prelude.Show, (forall x.
 DescribeValidDBInstanceModificationsResponse
 -> Rep DescribeValidDBInstanceModificationsResponse x)
-> (forall x.
    Rep DescribeValidDBInstanceModificationsResponse x
    -> DescribeValidDBInstanceModificationsResponse)
-> Generic DescribeValidDBInstanceModificationsResponse
forall x.
Rep DescribeValidDBInstanceModificationsResponse x
-> DescribeValidDBInstanceModificationsResponse
forall x.
DescribeValidDBInstanceModificationsResponse
-> Rep DescribeValidDBInstanceModificationsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeValidDBInstanceModificationsResponse x
-> DescribeValidDBInstanceModificationsResponse
$cfrom :: forall x.
DescribeValidDBInstanceModificationsResponse
-> Rep DescribeValidDBInstanceModificationsResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeValidDBInstanceModificationsResponse' 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:
--
-- 'validDBInstanceModificationsMessage', 'describeValidDBInstanceModificationsResponse_validDBInstanceModificationsMessage' - Undocumented member.
--
-- 'httpStatus', 'describeValidDBInstanceModificationsResponse_httpStatus' - The response's http status code.
newDescribeValidDBInstanceModificationsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeValidDBInstanceModificationsResponse
newDescribeValidDBInstanceModificationsResponse :: Int -> DescribeValidDBInstanceModificationsResponse
newDescribeValidDBInstanceModificationsResponse
  Int
pHttpStatus_ =
    DescribeValidDBInstanceModificationsResponse' :: Maybe ValidDBInstanceModificationsMessage
-> Int -> DescribeValidDBInstanceModificationsResponse
DescribeValidDBInstanceModificationsResponse'
      { $sel:validDBInstanceModificationsMessage:DescribeValidDBInstanceModificationsResponse' :: Maybe ValidDBInstanceModificationsMessage
validDBInstanceModificationsMessage =
          Maybe ValidDBInstanceModificationsMessage
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:DescribeValidDBInstanceModificationsResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | Undocumented member.
describeValidDBInstanceModificationsResponse_validDBInstanceModificationsMessage :: Lens.Lens' DescribeValidDBInstanceModificationsResponse (Prelude.Maybe ValidDBInstanceModificationsMessage)
describeValidDBInstanceModificationsResponse_validDBInstanceModificationsMessage :: (Maybe ValidDBInstanceModificationsMessage
 -> f (Maybe ValidDBInstanceModificationsMessage))
-> DescribeValidDBInstanceModificationsResponse
-> f DescribeValidDBInstanceModificationsResponse
describeValidDBInstanceModificationsResponse_validDBInstanceModificationsMessage = (DescribeValidDBInstanceModificationsResponse
 -> Maybe ValidDBInstanceModificationsMessage)
-> (DescribeValidDBInstanceModificationsResponse
    -> Maybe ValidDBInstanceModificationsMessage
    -> DescribeValidDBInstanceModificationsResponse)
-> Lens
     DescribeValidDBInstanceModificationsResponse
     DescribeValidDBInstanceModificationsResponse
     (Maybe ValidDBInstanceModificationsMessage)
     (Maybe ValidDBInstanceModificationsMessage)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeValidDBInstanceModificationsResponse' {Maybe ValidDBInstanceModificationsMessage
validDBInstanceModificationsMessage :: Maybe ValidDBInstanceModificationsMessage
$sel:validDBInstanceModificationsMessage:DescribeValidDBInstanceModificationsResponse' :: DescribeValidDBInstanceModificationsResponse
-> Maybe ValidDBInstanceModificationsMessage
validDBInstanceModificationsMessage} -> Maybe ValidDBInstanceModificationsMessage
validDBInstanceModificationsMessage) (\s :: DescribeValidDBInstanceModificationsResponse
s@DescribeValidDBInstanceModificationsResponse' {} Maybe ValidDBInstanceModificationsMessage
a -> DescribeValidDBInstanceModificationsResponse
s {$sel:validDBInstanceModificationsMessage:DescribeValidDBInstanceModificationsResponse' :: Maybe ValidDBInstanceModificationsMessage
validDBInstanceModificationsMessage = Maybe ValidDBInstanceModificationsMessage
a} :: DescribeValidDBInstanceModificationsResponse)

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

instance
  Prelude.NFData
    DescribeValidDBInstanceModificationsResponse