{-# 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.RDS.CreateDBClusterSnapshot
-- 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)
--
-- Creates a snapshot of a DB cluster. For more information on Amazon
-- Aurora, see
-- <https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html What Is Amazon Aurora?>
-- in the /Amazon Aurora User Guide./
--
-- This action only applies to Aurora DB clusters.
module Amazonka.RDS.CreateDBClusterSnapshot
  ( -- * Creating a Request
    CreateDBClusterSnapshot (..),
    newCreateDBClusterSnapshot,

    -- * Request Lenses
    createDBClusterSnapshot_tags,
    createDBClusterSnapshot_dbClusterSnapshotIdentifier,
    createDBClusterSnapshot_dbClusterIdentifier,

    -- * Destructuring the Response
    CreateDBClusterSnapshotResponse (..),
    newCreateDBClusterSnapshotResponse,

    -- * Response Lenses
    createDBClusterSnapshotResponse_dbClusterSnapshot,
    createDBClusterSnapshotResponse_httpStatus,
  )
where

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

-- |
--
-- /See:/ 'newCreateDBClusterSnapshot' smart constructor.
data CreateDBClusterSnapshot = CreateDBClusterSnapshot'
  { -- | The tags to be assigned to the DB cluster snapshot.
    CreateDBClusterSnapshot -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The identifier of the DB cluster snapshot. This parameter is stored as a
    -- lowercase string.
    --
    -- Constraints:
    --
    -- -   Must contain from 1 to 63 letters, numbers, or hyphens.
    --
    -- -   First character must be a letter.
    --
    -- -   Can\'t end with a hyphen or contain two consecutive hyphens.
    --
    -- Example: @my-cluster1-snapshot1@
    CreateDBClusterSnapshot -> Text
dbClusterSnapshotIdentifier :: Prelude.Text,
    -- | The identifier of the DB cluster to create a snapshot for. This
    -- parameter isn\'t case-sensitive.
    --
    -- Constraints:
    --
    -- -   Must match the identifier of an existing DBCluster.
    --
    -- Example: @my-cluster1@
    CreateDBClusterSnapshot -> Text
dbClusterIdentifier :: Prelude.Text
  }
  deriving (CreateDBClusterSnapshot -> CreateDBClusterSnapshot -> Bool
(CreateDBClusterSnapshot -> CreateDBClusterSnapshot -> Bool)
-> (CreateDBClusterSnapshot -> CreateDBClusterSnapshot -> Bool)
-> Eq CreateDBClusterSnapshot
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateDBClusterSnapshot -> CreateDBClusterSnapshot -> Bool
$c/= :: CreateDBClusterSnapshot -> CreateDBClusterSnapshot -> Bool
== :: CreateDBClusterSnapshot -> CreateDBClusterSnapshot -> Bool
$c== :: CreateDBClusterSnapshot -> CreateDBClusterSnapshot -> Bool
Prelude.Eq, ReadPrec [CreateDBClusterSnapshot]
ReadPrec CreateDBClusterSnapshot
Int -> ReadS CreateDBClusterSnapshot
ReadS [CreateDBClusterSnapshot]
(Int -> ReadS CreateDBClusterSnapshot)
-> ReadS [CreateDBClusterSnapshot]
-> ReadPrec CreateDBClusterSnapshot
-> ReadPrec [CreateDBClusterSnapshot]
-> Read CreateDBClusterSnapshot
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateDBClusterSnapshot]
$creadListPrec :: ReadPrec [CreateDBClusterSnapshot]
readPrec :: ReadPrec CreateDBClusterSnapshot
$creadPrec :: ReadPrec CreateDBClusterSnapshot
readList :: ReadS [CreateDBClusterSnapshot]
$creadList :: ReadS [CreateDBClusterSnapshot]
readsPrec :: Int -> ReadS CreateDBClusterSnapshot
$creadsPrec :: Int -> ReadS CreateDBClusterSnapshot
Prelude.Read, Int -> CreateDBClusterSnapshot -> ShowS
[CreateDBClusterSnapshot] -> ShowS
CreateDBClusterSnapshot -> String
(Int -> CreateDBClusterSnapshot -> ShowS)
-> (CreateDBClusterSnapshot -> String)
-> ([CreateDBClusterSnapshot] -> ShowS)
-> Show CreateDBClusterSnapshot
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateDBClusterSnapshot] -> ShowS
$cshowList :: [CreateDBClusterSnapshot] -> ShowS
show :: CreateDBClusterSnapshot -> String
$cshow :: CreateDBClusterSnapshot -> String
showsPrec :: Int -> CreateDBClusterSnapshot -> ShowS
$cshowsPrec :: Int -> CreateDBClusterSnapshot -> ShowS
Prelude.Show, (forall x.
 CreateDBClusterSnapshot -> Rep CreateDBClusterSnapshot x)
-> (forall x.
    Rep CreateDBClusterSnapshot x -> CreateDBClusterSnapshot)
-> Generic CreateDBClusterSnapshot
forall x. Rep CreateDBClusterSnapshot x -> CreateDBClusterSnapshot
forall x. CreateDBClusterSnapshot -> Rep CreateDBClusterSnapshot x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateDBClusterSnapshot x -> CreateDBClusterSnapshot
$cfrom :: forall x. CreateDBClusterSnapshot -> Rep CreateDBClusterSnapshot x
Prelude.Generic)

-- |
-- Create a value of 'CreateDBClusterSnapshot' 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', 'createDBClusterSnapshot_tags' - The tags to be assigned to the DB cluster snapshot.
--
-- 'dbClusterSnapshotIdentifier', 'createDBClusterSnapshot_dbClusterSnapshotIdentifier' - The identifier of the DB cluster snapshot. This parameter is stored as a
-- lowercase string.
--
-- Constraints:
--
-- -   Must contain from 1 to 63 letters, numbers, or hyphens.
--
-- -   First character must be a letter.
--
-- -   Can\'t end with a hyphen or contain two consecutive hyphens.
--
-- Example: @my-cluster1-snapshot1@
--
-- 'dbClusterIdentifier', 'createDBClusterSnapshot_dbClusterIdentifier' - The identifier of the DB cluster to create a snapshot for. This
-- parameter isn\'t case-sensitive.
--
-- Constraints:
--
-- -   Must match the identifier of an existing DBCluster.
--
-- Example: @my-cluster1@
newCreateDBClusterSnapshot ::
  -- | 'dbClusterSnapshotIdentifier'
  Prelude.Text ->
  -- | 'dbClusterIdentifier'
  Prelude.Text ->
  CreateDBClusterSnapshot
newCreateDBClusterSnapshot :: Text -> Text -> CreateDBClusterSnapshot
newCreateDBClusterSnapshot
  Text
pDBClusterSnapshotIdentifier_
  Text
pDBClusterIdentifier_ =
    CreateDBClusterSnapshot' :: Maybe [Tag] -> Text -> Text -> CreateDBClusterSnapshot
CreateDBClusterSnapshot'
      { $sel:tags:CreateDBClusterSnapshot' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
        $sel:dbClusterSnapshotIdentifier:CreateDBClusterSnapshot' :: Text
dbClusterSnapshotIdentifier =
          Text
pDBClusterSnapshotIdentifier_,
        $sel:dbClusterIdentifier:CreateDBClusterSnapshot' :: Text
dbClusterIdentifier = Text
pDBClusterIdentifier_
      }

-- | The tags to be assigned to the DB cluster snapshot.
createDBClusterSnapshot_tags :: Lens.Lens' CreateDBClusterSnapshot (Prelude.Maybe [Tag])
createDBClusterSnapshot_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateDBClusterSnapshot -> f CreateDBClusterSnapshot
createDBClusterSnapshot_tags = (CreateDBClusterSnapshot -> Maybe [Tag])
-> (CreateDBClusterSnapshot
    -> Maybe [Tag] -> CreateDBClusterSnapshot)
-> Lens
     CreateDBClusterSnapshot
     CreateDBClusterSnapshot
     (Maybe [Tag])
     (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBClusterSnapshot' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateDBClusterSnapshot' :: CreateDBClusterSnapshot -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateDBClusterSnapshot
s@CreateDBClusterSnapshot' {} Maybe [Tag]
a -> CreateDBClusterSnapshot
s {$sel:tags:CreateDBClusterSnapshot' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateDBClusterSnapshot) ((Maybe [Tag] -> f (Maybe [Tag]))
 -> CreateDBClusterSnapshot -> f CreateDBClusterSnapshot)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateDBClusterSnapshot
-> f CreateDBClusterSnapshot
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 of the DB cluster snapshot. This parameter is stored as a
-- lowercase string.
--
-- Constraints:
--
-- -   Must contain from 1 to 63 letters, numbers, or hyphens.
--
-- -   First character must be a letter.
--
-- -   Can\'t end with a hyphen or contain two consecutive hyphens.
--
-- Example: @my-cluster1-snapshot1@
createDBClusterSnapshot_dbClusterSnapshotIdentifier :: Lens.Lens' CreateDBClusterSnapshot Prelude.Text
createDBClusterSnapshot_dbClusterSnapshotIdentifier :: (Text -> f Text)
-> CreateDBClusterSnapshot -> f CreateDBClusterSnapshot
createDBClusterSnapshot_dbClusterSnapshotIdentifier = (CreateDBClusterSnapshot -> Text)
-> (CreateDBClusterSnapshot -> Text -> CreateDBClusterSnapshot)
-> Lens CreateDBClusterSnapshot CreateDBClusterSnapshot Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBClusterSnapshot' {Text
dbClusterSnapshotIdentifier :: Text
$sel:dbClusterSnapshotIdentifier:CreateDBClusterSnapshot' :: CreateDBClusterSnapshot -> Text
dbClusterSnapshotIdentifier} -> Text
dbClusterSnapshotIdentifier) (\s :: CreateDBClusterSnapshot
s@CreateDBClusterSnapshot' {} Text
a -> CreateDBClusterSnapshot
s {$sel:dbClusterSnapshotIdentifier:CreateDBClusterSnapshot' :: Text
dbClusterSnapshotIdentifier = Text
a} :: CreateDBClusterSnapshot)

-- | The identifier of the DB cluster to create a snapshot for. This
-- parameter isn\'t case-sensitive.
--
-- Constraints:
--
-- -   Must match the identifier of an existing DBCluster.
--
-- Example: @my-cluster1@
createDBClusterSnapshot_dbClusterIdentifier :: Lens.Lens' CreateDBClusterSnapshot Prelude.Text
createDBClusterSnapshot_dbClusterIdentifier :: (Text -> f Text)
-> CreateDBClusterSnapshot -> f CreateDBClusterSnapshot
createDBClusterSnapshot_dbClusterIdentifier = (CreateDBClusterSnapshot -> Text)
-> (CreateDBClusterSnapshot -> Text -> CreateDBClusterSnapshot)
-> Lens CreateDBClusterSnapshot CreateDBClusterSnapshot Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBClusterSnapshot' {Text
dbClusterIdentifier :: Text
$sel:dbClusterIdentifier:CreateDBClusterSnapshot' :: CreateDBClusterSnapshot -> Text
dbClusterIdentifier} -> Text
dbClusterIdentifier) (\s :: CreateDBClusterSnapshot
s@CreateDBClusterSnapshot' {} Text
a -> CreateDBClusterSnapshot
s {$sel:dbClusterIdentifier:CreateDBClusterSnapshot' :: Text
dbClusterIdentifier = Text
a} :: CreateDBClusterSnapshot)

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

instance Prelude.NFData CreateDBClusterSnapshot

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

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

instance Core.ToQuery CreateDBClusterSnapshot where
  toQuery :: CreateDBClusterSnapshot -> QueryString
toQuery CreateDBClusterSnapshot' {Maybe [Tag]
Text
dbClusterIdentifier :: Text
dbClusterSnapshotIdentifier :: Text
tags :: Maybe [Tag]
$sel:dbClusterIdentifier:CreateDBClusterSnapshot' :: CreateDBClusterSnapshot -> Text
$sel:dbClusterSnapshotIdentifier:CreateDBClusterSnapshot' :: CreateDBClusterSnapshot -> Text
$sel:tags:CreateDBClusterSnapshot' :: CreateDBClusterSnapshot -> 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
"CreateDBClusterSnapshot" :: 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
"DBClusterSnapshotIdentifier"
          ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
dbClusterSnapshotIdentifier,
        ByteString
"DBClusterIdentifier" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
dbClusterIdentifier
      ]

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

-- |
-- Create a value of 'CreateDBClusterSnapshotResponse' 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:
--
-- 'dbClusterSnapshot', 'createDBClusterSnapshotResponse_dbClusterSnapshot' - Undocumented member.
--
-- 'httpStatus', 'createDBClusterSnapshotResponse_httpStatus' - The response's http status code.
newCreateDBClusterSnapshotResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateDBClusterSnapshotResponse
newCreateDBClusterSnapshotResponse :: Int -> CreateDBClusterSnapshotResponse
newCreateDBClusterSnapshotResponse Int
pHttpStatus_ =
  CreateDBClusterSnapshotResponse' :: Maybe DBClusterSnapshot -> Int -> CreateDBClusterSnapshotResponse
CreateDBClusterSnapshotResponse'
    { $sel:dbClusterSnapshot:CreateDBClusterSnapshotResponse' :: Maybe DBClusterSnapshot
dbClusterSnapshot =
        Maybe DBClusterSnapshot
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateDBClusterSnapshotResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Undocumented member.
createDBClusterSnapshotResponse_dbClusterSnapshot :: Lens.Lens' CreateDBClusterSnapshotResponse (Prelude.Maybe DBClusterSnapshot)
createDBClusterSnapshotResponse_dbClusterSnapshot :: (Maybe DBClusterSnapshot -> f (Maybe DBClusterSnapshot))
-> CreateDBClusterSnapshotResponse
-> f CreateDBClusterSnapshotResponse
createDBClusterSnapshotResponse_dbClusterSnapshot = (CreateDBClusterSnapshotResponse -> Maybe DBClusterSnapshot)
-> (CreateDBClusterSnapshotResponse
    -> Maybe DBClusterSnapshot -> CreateDBClusterSnapshotResponse)
-> Lens
     CreateDBClusterSnapshotResponse
     CreateDBClusterSnapshotResponse
     (Maybe DBClusterSnapshot)
     (Maybe DBClusterSnapshot)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBClusterSnapshotResponse' {Maybe DBClusterSnapshot
dbClusterSnapshot :: Maybe DBClusterSnapshot
$sel:dbClusterSnapshot:CreateDBClusterSnapshotResponse' :: CreateDBClusterSnapshotResponse -> Maybe DBClusterSnapshot
dbClusterSnapshot} -> Maybe DBClusterSnapshot
dbClusterSnapshot) (\s :: CreateDBClusterSnapshotResponse
s@CreateDBClusterSnapshotResponse' {} Maybe DBClusterSnapshot
a -> CreateDBClusterSnapshotResponse
s {$sel:dbClusterSnapshot:CreateDBClusterSnapshotResponse' :: Maybe DBClusterSnapshot
dbClusterSnapshot = Maybe DBClusterSnapshot
a} :: CreateDBClusterSnapshotResponse)

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

instance
  Prelude.NFData
    CreateDBClusterSnapshotResponse