{-# 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.CopyDBClusterParameterGroup
-- 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)
--
-- Copies the specified DB cluster parameter group.
module Amazonka.Neptune.CopyDBClusterParameterGroup
  ( -- * Creating a Request
    CopyDBClusterParameterGroup (..),
    newCopyDBClusterParameterGroup,

    -- * Request Lenses
    copyDBClusterParameterGroup_tags,
    copyDBClusterParameterGroup_sourceDBClusterParameterGroupIdentifier,
    copyDBClusterParameterGroup_targetDBClusterParameterGroupIdentifier,
    copyDBClusterParameterGroup_targetDBClusterParameterGroupDescription,

    -- * Destructuring the Response
    CopyDBClusterParameterGroupResponse (..),
    newCopyDBClusterParameterGroupResponse,

    -- * Response Lenses
    copyDBClusterParameterGroupResponse_dbClusterParameterGroup,
    copyDBClusterParameterGroupResponse_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:/ 'newCopyDBClusterParameterGroup' smart constructor.
data CopyDBClusterParameterGroup = CopyDBClusterParameterGroup'
  { -- | The tags to be assigned to the copied DB cluster parameter group.
    CopyDBClusterParameterGroup -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The identifier or Amazon Resource Name (ARN) for the source DB cluster
    -- parameter group. For information about creating an ARN, see
    -- <https://docs.aws.amazon.com/neptune/latest/UserGuide/tagging.ARN.html#tagging.ARN.Constructing Constructing an Amazon Resource Name (ARN)>.
    --
    -- Constraints:
    --
    -- -   Must specify a valid DB cluster parameter group.
    --
    -- -   If the source DB cluster parameter group is in the same Amazon
    --     Region as the copy, specify a valid DB parameter group identifier,
    --     for example @my-db-cluster-param-group@, or a valid ARN.
    --
    -- -   If the source DB parameter group is in a different Amazon Region
    --     than the copy, specify a valid DB cluster parameter group ARN, for
    --     example
    --     @arn:aws:rds:us-east-1:123456789012:cluster-pg:custom-cluster-group1@.
    CopyDBClusterParameterGroup -> Text
sourceDBClusterParameterGroupIdentifier :: Prelude.Text,
    -- | The identifier for the copied DB cluster parameter group.
    --
    -- Constraints:
    --
    -- -   Cannot be null, empty, or blank
    --
    -- -   Must contain from 1 to 255 letters, numbers, or hyphens
    --
    -- -   First character must be a letter
    --
    -- -   Cannot end with a hyphen or contain two consecutive hyphens
    --
    -- Example: @my-cluster-param-group1@
    CopyDBClusterParameterGroup -> Text
targetDBClusterParameterGroupIdentifier :: Prelude.Text,
    -- | A description for the copied DB cluster parameter group.
    CopyDBClusterParameterGroup -> Text
targetDBClusterParameterGroupDescription :: Prelude.Text
  }
  deriving (CopyDBClusterParameterGroup -> CopyDBClusterParameterGroup -> Bool
(CopyDBClusterParameterGroup
 -> CopyDBClusterParameterGroup -> Bool)
-> (CopyDBClusterParameterGroup
    -> CopyDBClusterParameterGroup -> Bool)
-> Eq CopyDBClusterParameterGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CopyDBClusterParameterGroup -> CopyDBClusterParameterGroup -> Bool
$c/= :: CopyDBClusterParameterGroup -> CopyDBClusterParameterGroup -> Bool
== :: CopyDBClusterParameterGroup -> CopyDBClusterParameterGroup -> Bool
$c== :: CopyDBClusterParameterGroup -> CopyDBClusterParameterGroup -> Bool
Prelude.Eq, ReadPrec [CopyDBClusterParameterGroup]
ReadPrec CopyDBClusterParameterGroup
Int -> ReadS CopyDBClusterParameterGroup
ReadS [CopyDBClusterParameterGroup]
(Int -> ReadS CopyDBClusterParameterGroup)
-> ReadS [CopyDBClusterParameterGroup]
-> ReadPrec CopyDBClusterParameterGroup
-> ReadPrec [CopyDBClusterParameterGroup]
-> Read CopyDBClusterParameterGroup
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CopyDBClusterParameterGroup]
$creadListPrec :: ReadPrec [CopyDBClusterParameterGroup]
readPrec :: ReadPrec CopyDBClusterParameterGroup
$creadPrec :: ReadPrec CopyDBClusterParameterGroup
readList :: ReadS [CopyDBClusterParameterGroup]
$creadList :: ReadS [CopyDBClusterParameterGroup]
readsPrec :: Int -> ReadS CopyDBClusterParameterGroup
$creadsPrec :: Int -> ReadS CopyDBClusterParameterGroup
Prelude.Read, Int -> CopyDBClusterParameterGroup -> ShowS
[CopyDBClusterParameterGroup] -> ShowS
CopyDBClusterParameterGroup -> String
(Int -> CopyDBClusterParameterGroup -> ShowS)
-> (CopyDBClusterParameterGroup -> String)
-> ([CopyDBClusterParameterGroup] -> ShowS)
-> Show CopyDBClusterParameterGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CopyDBClusterParameterGroup] -> ShowS
$cshowList :: [CopyDBClusterParameterGroup] -> ShowS
show :: CopyDBClusterParameterGroup -> String
$cshow :: CopyDBClusterParameterGroup -> String
showsPrec :: Int -> CopyDBClusterParameterGroup -> ShowS
$cshowsPrec :: Int -> CopyDBClusterParameterGroup -> ShowS
Prelude.Show, (forall x.
 CopyDBClusterParameterGroup -> Rep CopyDBClusterParameterGroup x)
-> (forall x.
    Rep CopyDBClusterParameterGroup x -> CopyDBClusterParameterGroup)
-> Generic CopyDBClusterParameterGroup
forall x.
Rep CopyDBClusterParameterGroup x -> CopyDBClusterParameterGroup
forall x.
CopyDBClusterParameterGroup -> Rep CopyDBClusterParameterGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CopyDBClusterParameterGroup x -> CopyDBClusterParameterGroup
$cfrom :: forall x.
CopyDBClusterParameterGroup -> Rep CopyDBClusterParameterGroup x
Prelude.Generic)

-- |
-- Create a value of 'CopyDBClusterParameterGroup' 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:
--
-- 'tags', 'copyDBClusterParameterGroup_tags' - The tags to be assigned to the copied DB cluster parameter group.
--
-- 'sourceDBClusterParameterGroupIdentifier', 'copyDBClusterParameterGroup_sourceDBClusterParameterGroupIdentifier' - The identifier or Amazon Resource Name (ARN) for the source DB cluster
-- parameter group. For information about creating an ARN, see
-- <https://docs.aws.amazon.com/neptune/latest/UserGuide/tagging.ARN.html#tagging.ARN.Constructing Constructing an Amazon Resource Name (ARN)>.
--
-- Constraints:
--
-- -   Must specify a valid DB cluster parameter group.
--
-- -   If the source DB cluster parameter group is in the same Amazon
--     Region as the copy, specify a valid DB parameter group identifier,
--     for example @my-db-cluster-param-group@, or a valid ARN.
--
-- -   If the source DB parameter group is in a different Amazon Region
--     than the copy, specify a valid DB cluster parameter group ARN, for
--     example
--     @arn:aws:rds:us-east-1:123456789012:cluster-pg:custom-cluster-group1@.
--
-- 'targetDBClusterParameterGroupIdentifier', 'copyDBClusterParameterGroup_targetDBClusterParameterGroupIdentifier' - The identifier for the copied DB cluster parameter group.
--
-- Constraints:
--
-- -   Cannot be null, empty, or blank
--
-- -   Must contain from 1 to 255 letters, numbers, or hyphens
--
-- -   First character must be a letter
--
-- -   Cannot end with a hyphen or contain two consecutive hyphens
--
-- Example: @my-cluster-param-group1@
--
-- 'targetDBClusterParameterGroupDescription', 'copyDBClusterParameterGroup_targetDBClusterParameterGroupDescription' - A description for the copied DB cluster parameter group.
newCopyDBClusterParameterGroup ::
  -- | 'sourceDBClusterParameterGroupIdentifier'
  Prelude.Text ->
  -- | 'targetDBClusterParameterGroupIdentifier'
  Prelude.Text ->
  -- | 'targetDBClusterParameterGroupDescription'
  Prelude.Text ->
  CopyDBClusterParameterGroup
newCopyDBClusterParameterGroup :: Text -> Text -> Text -> CopyDBClusterParameterGroup
newCopyDBClusterParameterGroup
  Text
pSourceDBClusterParameterGroupIdentifier_
  Text
pTargetDBClusterParameterGroupIdentifier_
  Text
pTargetDBClusterParameterGroupDescription_ =
    CopyDBClusterParameterGroup' :: Maybe [Tag] -> Text -> Text -> Text -> CopyDBClusterParameterGroup
CopyDBClusterParameterGroup'
      { $sel:tags:CopyDBClusterParameterGroup' :: Maybe [Tag]
tags =
          Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
        $sel:sourceDBClusterParameterGroupIdentifier:CopyDBClusterParameterGroup' :: Text
sourceDBClusterParameterGroupIdentifier =
          Text
pSourceDBClusterParameterGroupIdentifier_,
        $sel:targetDBClusterParameterGroupIdentifier:CopyDBClusterParameterGroup' :: Text
targetDBClusterParameterGroupIdentifier =
          Text
pTargetDBClusterParameterGroupIdentifier_,
        $sel:targetDBClusterParameterGroupDescription:CopyDBClusterParameterGroup' :: Text
targetDBClusterParameterGroupDescription =
          Text
pTargetDBClusterParameterGroupDescription_
      }

-- | The tags to be assigned to the copied DB cluster parameter group.
copyDBClusterParameterGroup_tags :: Lens.Lens' CopyDBClusterParameterGroup (Prelude.Maybe [Tag])
copyDBClusterParameterGroup_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CopyDBClusterParameterGroup -> f CopyDBClusterParameterGroup
copyDBClusterParameterGroup_tags = (CopyDBClusterParameterGroup -> Maybe [Tag])
-> (CopyDBClusterParameterGroup
    -> Maybe [Tag] -> CopyDBClusterParameterGroup)
-> Lens
     CopyDBClusterParameterGroup
     CopyDBClusterParameterGroup
     (Maybe [Tag])
     (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyDBClusterParameterGroup' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CopyDBClusterParameterGroup' :: CopyDBClusterParameterGroup -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CopyDBClusterParameterGroup
s@CopyDBClusterParameterGroup' {} Maybe [Tag]
a -> CopyDBClusterParameterGroup
s {$sel:tags:CopyDBClusterParameterGroup' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CopyDBClusterParameterGroup) ((Maybe [Tag] -> f (Maybe [Tag]))
 -> CopyDBClusterParameterGroup -> f CopyDBClusterParameterGroup)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CopyDBClusterParameterGroup
-> f CopyDBClusterParameterGroup
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
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 [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The identifier or Amazon Resource Name (ARN) for the source DB cluster
-- parameter group. For information about creating an ARN, see
-- <https://docs.aws.amazon.com/neptune/latest/UserGuide/tagging.ARN.html#tagging.ARN.Constructing Constructing an Amazon Resource Name (ARN)>.
--
-- Constraints:
--
-- -   Must specify a valid DB cluster parameter group.
--
-- -   If the source DB cluster parameter group is in the same Amazon
--     Region as the copy, specify a valid DB parameter group identifier,
--     for example @my-db-cluster-param-group@, or a valid ARN.
--
-- -   If the source DB parameter group is in a different Amazon Region
--     than the copy, specify a valid DB cluster parameter group ARN, for
--     example
--     @arn:aws:rds:us-east-1:123456789012:cluster-pg:custom-cluster-group1@.
copyDBClusterParameterGroup_sourceDBClusterParameterGroupIdentifier :: Lens.Lens' CopyDBClusterParameterGroup Prelude.Text
copyDBClusterParameterGroup_sourceDBClusterParameterGroupIdentifier :: (Text -> f Text)
-> CopyDBClusterParameterGroup -> f CopyDBClusterParameterGroup
copyDBClusterParameterGroup_sourceDBClusterParameterGroupIdentifier = (CopyDBClusterParameterGroup -> Text)
-> (CopyDBClusterParameterGroup
    -> Text -> CopyDBClusterParameterGroup)
-> Lens
     CopyDBClusterParameterGroup CopyDBClusterParameterGroup Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyDBClusterParameterGroup' {Text
sourceDBClusterParameterGroupIdentifier :: Text
$sel:sourceDBClusterParameterGroupIdentifier:CopyDBClusterParameterGroup' :: CopyDBClusterParameterGroup -> Text
sourceDBClusterParameterGroupIdentifier} -> Text
sourceDBClusterParameterGroupIdentifier) (\s :: CopyDBClusterParameterGroup
s@CopyDBClusterParameterGroup' {} Text
a -> CopyDBClusterParameterGroup
s {$sel:sourceDBClusterParameterGroupIdentifier:CopyDBClusterParameterGroup' :: Text
sourceDBClusterParameterGroupIdentifier = Text
a} :: CopyDBClusterParameterGroup)

-- | The identifier for the copied DB cluster parameter group.
--
-- Constraints:
--
-- -   Cannot be null, empty, or blank
--
-- -   Must contain from 1 to 255 letters, numbers, or hyphens
--
-- -   First character must be a letter
--
-- -   Cannot end with a hyphen or contain two consecutive hyphens
--
-- Example: @my-cluster-param-group1@
copyDBClusterParameterGroup_targetDBClusterParameterGroupIdentifier :: Lens.Lens' CopyDBClusterParameterGroup Prelude.Text
copyDBClusterParameterGroup_targetDBClusterParameterGroupIdentifier :: (Text -> f Text)
-> CopyDBClusterParameterGroup -> f CopyDBClusterParameterGroup
copyDBClusterParameterGroup_targetDBClusterParameterGroupIdentifier = (CopyDBClusterParameterGroup -> Text)
-> (CopyDBClusterParameterGroup
    -> Text -> CopyDBClusterParameterGroup)
-> Lens
     CopyDBClusterParameterGroup CopyDBClusterParameterGroup Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyDBClusterParameterGroup' {Text
targetDBClusterParameterGroupIdentifier :: Text
$sel:targetDBClusterParameterGroupIdentifier:CopyDBClusterParameterGroup' :: CopyDBClusterParameterGroup -> Text
targetDBClusterParameterGroupIdentifier} -> Text
targetDBClusterParameterGroupIdentifier) (\s :: CopyDBClusterParameterGroup
s@CopyDBClusterParameterGroup' {} Text
a -> CopyDBClusterParameterGroup
s {$sel:targetDBClusterParameterGroupIdentifier:CopyDBClusterParameterGroup' :: Text
targetDBClusterParameterGroupIdentifier = Text
a} :: CopyDBClusterParameterGroup)

-- | A description for the copied DB cluster parameter group.
copyDBClusterParameterGroup_targetDBClusterParameterGroupDescription :: Lens.Lens' CopyDBClusterParameterGroup Prelude.Text
copyDBClusterParameterGroup_targetDBClusterParameterGroupDescription :: (Text -> f Text)
-> CopyDBClusterParameterGroup -> f CopyDBClusterParameterGroup
copyDBClusterParameterGroup_targetDBClusterParameterGroupDescription = (CopyDBClusterParameterGroup -> Text)
-> (CopyDBClusterParameterGroup
    -> Text -> CopyDBClusterParameterGroup)
-> Lens
     CopyDBClusterParameterGroup CopyDBClusterParameterGroup Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyDBClusterParameterGroup' {Text
targetDBClusterParameterGroupDescription :: Text
$sel:targetDBClusterParameterGroupDescription:CopyDBClusterParameterGroup' :: CopyDBClusterParameterGroup -> Text
targetDBClusterParameterGroupDescription} -> Text
targetDBClusterParameterGroupDescription) (\s :: CopyDBClusterParameterGroup
s@CopyDBClusterParameterGroup' {} Text
a -> CopyDBClusterParameterGroup
s {$sel:targetDBClusterParameterGroupDescription:CopyDBClusterParameterGroup' :: Text
targetDBClusterParameterGroupDescription = Text
a} :: CopyDBClusterParameterGroup)

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

instance Prelude.NFData CopyDBClusterParameterGroup

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

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

instance Core.ToQuery CopyDBClusterParameterGroup where
  toQuery :: CopyDBClusterParameterGroup -> QueryString
toQuery CopyDBClusterParameterGroup' {Maybe [Tag]
Text
targetDBClusterParameterGroupDescription :: Text
targetDBClusterParameterGroupIdentifier :: Text
sourceDBClusterParameterGroupIdentifier :: Text
tags :: Maybe [Tag]
$sel:targetDBClusterParameterGroupDescription:CopyDBClusterParameterGroup' :: CopyDBClusterParameterGroup -> Text
$sel:targetDBClusterParameterGroupIdentifier:CopyDBClusterParameterGroup' :: CopyDBClusterParameterGroup -> Text
$sel:sourceDBClusterParameterGroupIdentifier:CopyDBClusterParameterGroup' :: CopyDBClusterParameterGroup -> Text
$sel:tags:CopyDBClusterParameterGroup' :: CopyDBClusterParameterGroup -> Maybe [Tag]
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: ( ByteString
"CopyDBClusterParameterGroup" ::
                      Prelude.ByteString
                  ),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2014-10-31" :: Prelude.ByteString),
        ByteString
"Tags"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
            (ByteString -> [Tag] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"Tag" ([Tag] -> QueryString) -> Maybe [Tag] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags),
        ByteString
"SourceDBClusterParameterGroupIdentifier"
          ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
sourceDBClusterParameterGroupIdentifier,
        ByteString
"TargetDBClusterParameterGroupIdentifier"
          ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
targetDBClusterParameterGroupIdentifier,
        ByteString
"TargetDBClusterParameterGroupDescription"
          ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
targetDBClusterParameterGroupDescription
      ]

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

-- |
-- Create a value of 'CopyDBClusterParameterGroupResponse' 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:
--
-- 'dbClusterParameterGroup', 'copyDBClusterParameterGroupResponse_dbClusterParameterGroup' - Undocumented member.
--
-- 'httpStatus', 'copyDBClusterParameterGroupResponse_httpStatus' - The response's http status code.
newCopyDBClusterParameterGroupResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CopyDBClusterParameterGroupResponse
newCopyDBClusterParameterGroupResponse :: Int -> CopyDBClusterParameterGroupResponse
newCopyDBClusterParameterGroupResponse Int
pHttpStatus_ =
  CopyDBClusterParameterGroupResponse' :: Maybe DBClusterParameterGroup
-> Int -> CopyDBClusterParameterGroupResponse
CopyDBClusterParameterGroupResponse'
    { $sel:dbClusterParameterGroup:CopyDBClusterParameterGroupResponse' :: Maybe DBClusterParameterGroup
dbClusterParameterGroup =
        Maybe DBClusterParameterGroup
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CopyDBClusterParameterGroupResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Undocumented member.
copyDBClusterParameterGroupResponse_dbClusterParameterGroup :: Lens.Lens' CopyDBClusterParameterGroupResponse (Prelude.Maybe DBClusterParameterGroup)
copyDBClusterParameterGroupResponse_dbClusterParameterGroup :: (Maybe DBClusterParameterGroup
 -> f (Maybe DBClusterParameterGroup))
-> CopyDBClusterParameterGroupResponse
-> f CopyDBClusterParameterGroupResponse
copyDBClusterParameterGroupResponse_dbClusterParameterGroup = (CopyDBClusterParameterGroupResponse
 -> Maybe DBClusterParameterGroup)
-> (CopyDBClusterParameterGroupResponse
    -> Maybe DBClusterParameterGroup
    -> CopyDBClusterParameterGroupResponse)
-> Lens
     CopyDBClusterParameterGroupResponse
     CopyDBClusterParameterGroupResponse
     (Maybe DBClusterParameterGroup)
     (Maybe DBClusterParameterGroup)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyDBClusterParameterGroupResponse' {Maybe DBClusterParameterGroup
dbClusterParameterGroup :: Maybe DBClusterParameterGroup
$sel:dbClusterParameterGroup:CopyDBClusterParameterGroupResponse' :: CopyDBClusterParameterGroupResponse
-> Maybe DBClusterParameterGroup
dbClusterParameterGroup} -> Maybe DBClusterParameterGroup
dbClusterParameterGroup) (\s :: CopyDBClusterParameterGroupResponse
s@CopyDBClusterParameterGroupResponse' {} Maybe DBClusterParameterGroup
a -> CopyDBClusterParameterGroupResponse
s {$sel:dbClusterParameterGroup:CopyDBClusterParameterGroupResponse' :: Maybe DBClusterParameterGroup
dbClusterParameterGroup = Maybe DBClusterParameterGroup
a} :: CopyDBClusterParameterGroupResponse)

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

instance
  Prelude.NFData
    CopyDBClusterParameterGroupResponse