{-# 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.Redshift.ModifySnapshotCopyRetentionPeriod
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Modifies the number of days to retain snapshots in the destination
-- Amazon Web Services Region after they are copied from the source Amazon
-- Web Services Region. By default, this operation only changes the
-- retention period of copied automated snapshots. The retention periods
-- for both new and existing copied automated snapshots are updated with
-- the new retention period. You can set the manual option to change only
-- the retention periods of copied manual snapshots. If you set this
-- option, only newly copied manual snapshots have the new retention
-- period.
module Amazonka.Redshift.ModifySnapshotCopyRetentionPeriod
  ( -- * Creating a Request
    ModifySnapshotCopyRetentionPeriod (..),
    newModifySnapshotCopyRetentionPeriod,

    -- * Request Lenses
    modifySnapshotCopyRetentionPeriod_manual,
    modifySnapshotCopyRetentionPeriod_clusterIdentifier,
    modifySnapshotCopyRetentionPeriod_retentionPeriod,

    -- * Destructuring the Response
    ModifySnapshotCopyRetentionPeriodResponse (..),
    newModifySnapshotCopyRetentionPeriodResponse,

    -- * Response Lenses
    modifySnapshotCopyRetentionPeriodResponse_cluster,
    modifySnapshotCopyRetentionPeriodResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import Amazonka.Redshift.Types
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- |
--
-- /See:/ 'newModifySnapshotCopyRetentionPeriod' smart constructor.
data ModifySnapshotCopyRetentionPeriod = ModifySnapshotCopyRetentionPeriod'
  { -- | Indicates whether to apply the snapshot retention period to newly copied
    -- manual snapshots instead of automated snapshots.
    ModifySnapshotCopyRetentionPeriod -> Maybe Bool
manual :: Prelude.Maybe Prelude.Bool,
    -- | The unique identifier of the cluster for which you want to change the
    -- retention period for either automated or manual snapshots that are
    -- copied to a destination Amazon Web Services Region.
    --
    -- Constraints: Must be the valid name of an existing cluster that has
    -- cross-region snapshot copy enabled.
    ModifySnapshotCopyRetentionPeriod -> Text
clusterIdentifier :: Prelude.Text,
    -- | The number of days to retain automated snapshots in the destination
    -- Amazon Web Services Region after they are copied from the source Amazon
    -- Web Services Region.
    --
    -- By default, this only changes the retention period of copied automated
    -- snapshots.
    --
    -- If you decrease the retention period for automated snapshots that are
    -- copied to a destination Amazon Web Services Region, Amazon Redshift
    -- deletes any existing automated snapshots that were copied to the
    -- destination Amazon Web Services Region and that fall outside of the new
    -- retention period.
    --
    -- Constraints: Must be at least 1 and no more than 35 for automated
    -- snapshots.
    --
    -- If you specify the @manual@ option, only newly copied manual snapshots
    -- will have the new retention period.
    --
    -- If you specify the value of -1 newly copied manual snapshots are
    -- retained indefinitely.
    --
    -- Constraints: The number of days must be either -1 or an integer between
    -- 1 and 3,653 for manual snapshots.
    ModifySnapshotCopyRetentionPeriod -> Int
retentionPeriod :: Prelude.Int
  }
  deriving (ModifySnapshotCopyRetentionPeriod
-> ModifySnapshotCopyRetentionPeriod -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ModifySnapshotCopyRetentionPeriod
-> ModifySnapshotCopyRetentionPeriod -> Bool
$c/= :: ModifySnapshotCopyRetentionPeriod
-> ModifySnapshotCopyRetentionPeriod -> Bool
== :: ModifySnapshotCopyRetentionPeriod
-> ModifySnapshotCopyRetentionPeriod -> Bool
$c== :: ModifySnapshotCopyRetentionPeriod
-> ModifySnapshotCopyRetentionPeriod -> Bool
Prelude.Eq, ReadPrec [ModifySnapshotCopyRetentionPeriod]
ReadPrec ModifySnapshotCopyRetentionPeriod
Int -> ReadS ModifySnapshotCopyRetentionPeriod
ReadS [ModifySnapshotCopyRetentionPeriod]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ModifySnapshotCopyRetentionPeriod]
$creadListPrec :: ReadPrec [ModifySnapshotCopyRetentionPeriod]
readPrec :: ReadPrec ModifySnapshotCopyRetentionPeriod
$creadPrec :: ReadPrec ModifySnapshotCopyRetentionPeriod
readList :: ReadS [ModifySnapshotCopyRetentionPeriod]
$creadList :: ReadS [ModifySnapshotCopyRetentionPeriod]
readsPrec :: Int -> ReadS ModifySnapshotCopyRetentionPeriod
$creadsPrec :: Int -> ReadS ModifySnapshotCopyRetentionPeriod
Prelude.Read, Int -> ModifySnapshotCopyRetentionPeriod -> ShowS
[ModifySnapshotCopyRetentionPeriod] -> ShowS
ModifySnapshotCopyRetentionPeriod -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ModifySnapshotCopyRetentionPeriod] -> ShowS
$cshowList :: [ModifySnapshotCopyRetentionPeriod] -> ShowS
show :: ModifySnapshotCopyRetentionPeriod -> String
$cshow :: ModifySnapshotCopyRetentionPeriod -> String
showsPrec :: Int -> ModifySnapshotCopyRetentionPeriod -> ShowS
$cshowsPrec :: Int -> ModifySnapshotCopyRetentionPeriod -> ShowS
Prelude.Show, forall x.
Rep ModifySnapshotCopyRetentionPeriod x
-> ModifySnapshotCopyRetentionPeriod
forall x.
ModifySnapshotCopyRetentionPeriod
-> Rep ModifySnapshotCopyRetentionPeriod x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ModifySnapshotCopyRetentionPeriod x
-> ModifySnapshotCopyRetentionPeriod
$cfrom :: forall x.
ModifySnapshotCopyRetentionPeriod
-> Rep ModifySnapshotCopyRetentionPeriod x
Prelude.Generic)

-- |
-- Create a value of 'ModifySnapshotCopyRetentionPeriod' 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:
--
-- 'manual', 'modifySnapshotCopyRetentionPeriod_manual' - Indicates whether to apply the snapshot retention period to newly copied
-- manual snapshots instead of automated snapshots.
--
-- 'clusterIdentifier', 'modifySnapshotCopyRetentionPeriod_clusterIdentifier' - The unique identifier of the cluster for which you want to change the
-- retention period for either automated or manual snapshots that are
-- copied to a destination Amazon Web Services Region.
--
-- Constraints: Must be the valid name of an existing cluster that has
-- cross-region snapshot copy enabled.
--
-- 'retentionPeriod', 'modifySnapshotCopyRetentionPeriod_retentionPeriod' - The number of days to retain automated snapshots in the destination
-- Amazon Web Services Region after they are copied from the source Amazon
-- Web Services Region.
--
-- By default, this only changes the retention period of copied automated
-- snapshots.
--
-- If you decrease the retention period for automated snapshots that are
-- copied to a destination Amazon Web Services Region, Amazon Redshift
-- deletes any existing automated snapshots that were copied to the
-- destination Amazon Web Services Region and that fall outside of the new
-- retention period.
--
-- Constraints: Must be at least 1 and no more than 35 for automated
-- snapshots.
--
-- If you specify the @manual@ option, only newly copied manual snapshots
-- will have the new retention period.
--
-- If you specify the value of -1 newly copied manual snapshots are
-- retained indefinitely.
--
-- Constraints: The number of days must be either -1 or an integer between
-- 1 and 3,653 for manual snapshots.
newModifySnapshotCopyRetentionPeriod ::
  -- | 'clusterIdentifier'
  Prelude.Text ->
  -- | 'retentionPeriod'
  Prelude.Int ->
  ModifySnapshotCopyRetentionPeriod
newModifySnapshotCopyRetentionPeriod :: Text -> Int -> ModifySnapshotCopyRetentionPeriod
newModifySnapshotCopyRetentionPeriod
  Text
pClusterIdentifier_
  Int
pRetentionPeriod_ =
    ModifySnapshotCopyRetentionPeriod'
      { $sel:manual:ModifySnapshotCopyRetentionPeriod' :: Maybe Bool
manual =
          forall a. Maybe a
Prelude.Nothing,
        $sel:clusterIdentifier:ModifySnapshotCopyRetentionPeriod' :: Text
clusterIdentifier = Text
pClusterIdentifier_,
        $sel:retentionPeriod:ModifySnapshotCopyRetentionPeriod' :: Int
retentionPeriod = Int
pRetentionPeriod_
      }

-- | Indicates whether to apply the snapshot retention period to newly copied
-- manual snapshots instead of automated snapshots.
modifySnapshotCopyRetentionPeriod_manual :: Lens.Lens' ModifySnapshotCopyRetentionPeriod (Prelude.Maybe Prelude.Bool)
modifySnapshotCopyRetentionPeriod_manual :: Lens' ModifySnapshotCopyRetentionPeriod (Maybe Bool)
modifySnapshotCopyRetentionPeriod_manual = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifySnapshotCopyRetentionPeriod' {Maybe Bool
manual :: Maybe Bool
$sel:manual:ModifySnapshotCopyRetentionPeriod' :: ModifySnapshotCopyRetentionPeriod -> Maybe Bool
manual} -> Maybe Bool
manual) (\s :: ModifySnapshotCopyRetentionPeriod
s@ModifySnapshotCopyRetentionPeriod' {} Maybe Bool
a -> ModifySnapshotCopyRetentionPeriod
s {$sel:manual:ModifySnapshotCopyRetentionPeriod' :: Maybe Bool
manual = Maybe Bool
a} :: ModifySnapshotCopyRetentionPeriod)

-- | The unique identifier of the cluster for which you want to change the
-- retention period for either automated or manual snapshots that are
-- copied to a destination Amazon Web Services Region.
--
-- Constraints: Must be the valid name of an existing cluster that has
-- cross-region snapshot copy enabled.
modifySnapshotCopyRetentionPeriod_clusterIdentifier :: Lens.Lens' ModifySnapshotCopyRetentionPeriod Prelude.Text
modifySnapshotCopyRetentionPeriod_clusterIdentifier :: Lens' ModifySnapshotCopyRetentionPeriod Text
modifySnapshotCopyRetentionPeriod_clusterIdentifier = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifySnapshotCopyRetentionPeriod' {Text
clusterIdentifier :: Text
$sel:clusterIdentifier:ModifySnapshotCopyRetentionPeriod' :: ModifySnapshotCopyRetentionPeriod -> Text
clusterIdentifier} -> Text
clusterIdentifier) (\s :: ModifySnapshotCopyRetentionPeriod
s@ModifySnapshotCopyRetentionPeriod' {} Text
a -> ModifySnapshotCopyRetentionPeriod
s {$sel:clusterIdentifier:ModifySnapshotCopyRetentionPeriod' :: Text
clusterIdentifier = Text
a} :: ModifySnapshotCopyRetentionPeriod)

-- | The number of days to retain automated snapshots in the destination
-- Amazon Web Services Region after they are copied from the source Amazon
-- Web Services Region.
--
-- By default, this only changes the retention period of copied automated
-- snapshots.
--
-- If you decrease the retention period for automated snapshots that are
-- copied to a destination Amazon Web Services Region, Amazon Redshift
-- deletes any existing automated snapshots that were copied to the
-- destination Amazon Web Services Region and that fall outside of the new
-- retention period.
--
-- Constraints: Must be at least 1 and no more than 35 for automated
-- snapshots.
--
-- If you specify the @manual@ option, only newly copied manual snapshots
-- will have the new retention period.
--
-- If you specify the value of -1 newly copied manual snapshots are
-- retained indefinitely.
--
-- Constraints: The number of days must be either -1 or an integer between
-- 1 and 3,653 for manual snapshots.
modifySnapshotCopyRetentionPeriod_retentionPeriod :: Lens.Lens' ModifySnapshotCopyRetentionPeriod Prelude.Int
modifySnapshotCopyRetentionPeriod_retentionPeriod :: Lens' ModifySnapshotCopyRetentionPeriod Int
modifySnapshotCopyRetentionPeriod_retentionPeriod = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifySnapshotCopyRetentionPeriod' {Int
retentionPeriod :: Int
$sel:retentionPeriod:ModifySnapshotCopyRetentionPeriod' :: ModifySnapshotCopyRetentionPeriod -> Int
retentionPeriod} -> Int
retentionPeriod) (\s :: ModifySnapshotCopyRetentionPeriod
s@ModifySnapshotCopyRetentionPeriod' {} Int
a -> ModifySnapshotCopyRetentionPeriod
s {$sel:retentionPeriod:ModifySnapshotCopyRetentionPeriod' :: Int
retentionPeriod = Int
a} :: ModifySnapshotCopyRetentionPeriod)

instance
  Core.AWSRequest
    ModifySnapshotCopyRetentionPeriod
  where
  type
    AWSResponse ModifySnapshotCopyRetentionPeriod =
      ModifySnapshotCopyRetentionPeriodResponse
  request :: (Service -> Service)
-> ModifySnapshotCopyRetentionPeriod
-> Request ModifySnapshotCopyRetentionPeriod
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ModifySnapshotCopyRetentionPeriod
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse ModifySnapshotCopyRetentionPeriod)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
    -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
      Text
"ModifySnapshotCopyRetentionPeriodResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Cluster -> Int -> ModifySnapshotCopyRetentionPeriodResponse
ModifySnapshotCopyRetentionPeriodResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"Cluster")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance
  Prelude.Hashable
    ModifySnapshotCopyRetentionPeriod
  where
  hashWithSalt :: Int -> ModifySnapshotCopyRetentionPeriod -> Int
hashWithSalt
    Int
_salt
    ModifySnapshotCopyRetentionPeriod' {Int
Maybe Bool
Text
retentionPeriod :: Int
clusterIdentifier :: Text
manual :: Maybe Bool
$sel:retentionPeriod:ModifySnapshotCopyRetentionPeriod' :: ModifySnapshotCopyRetentionPeriod -> Int
$sel:clusterIdentifier:ModifySnapshotCopyRetentionPeriod' :: ModifySnapshotCopyRetentionPeriod -> Text
$sel:manual:ModifySnapshotCopyRetentionPeriod' :: ModifySnapshotCopyRetentionPeriod -> Maybe Bool
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
manual
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
clusterIdentifier
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Int
retentionPeriod

instance
  Prelude.NFData
    ModifySnapshotCopyRetentionPeriod
  where
  rnf :: ModifySnapshotCopyRetentionPeriod -> ()
rnf ModifySnapshotCopyRetentionPeriod' {Int
Maybe Bool
Text
retentionPeriod :: Int
clusterIdentifier :: Text
manual :: Maybe Bool
$sel:retentionPeriod:ModifySnapshotCopyRetentionPeriod' :: ModifySnapshotCopyRetentionPeriod -> Int
$sel:clusterIdentifier:ModifySnapshotCopyRetentionPeriod' :: ModifySnapshotCopyRetentionPeriod -> Text
$sel:manual:ModifySnapshotCopyRetentionPeriod' :: ModifySnapshotCopyRetentionPeriod -> Maybe Bool
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
manual
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
clusterIdentifier
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
retentionPeriod

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

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

instance
  Data.ToQuery
    ModifySnapshotCopyRetentionPeriod
  where
  toQuery :: ModifySnapshotCopyRetentionPeriod -> QueryString
toQuery ModifySnapshotCopyRetentionPeriod' {Int
Maybe Bool
Text
retentionPeriod :: Int
clusterIdentifier :: Text
manual :: Maybe Bool
$sel:retentionPeriod:ModifySnapshotCopyRetentionPeriod' :: ModifySnapshotCopyRetentionPeriod -> Int
$sel:clusterIdentifier:ModifySnapshotCopyRetentionPeriod' :: ModifySnapshotCopyRetentionPeriod -> Text
$sel:manual:ModifySnapshotCopyRetentionPeriod' :: ModifySnapshotCopyRetentionPeriod -> Maybe Bool
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: ( ByteString
"ModifySnapshotCopyRetentionPeriod" ::
                      Prelude.ByteString
                  ),
        ByteString
"Version"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2012-12-01" :: Prelude.ByteString),
        ByteString
"Manual" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
manual,
        ByteString
"ClusterIdentifier" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
clusterIdentifier,
        ByteString
"RetentionPeriod" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Int
retentionPeriod
      ]

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

-- |
-- Create a value of 'ModifySnapshotCopyRetentionPeriodResponse' 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:
--
-- 'cluster', 'modifySnapshotCopyRetentionPeriodResponse_cluster' - Undocumented member.
--
-- 'httpStatus', 'modifySnapshotCopyRetentionPeriodResponse_httpStatus' - The response's http status code.
newModifySnapshotCopyRetentionPeriodResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ModifySnapshotCopyRetentionPeriodResponse
newModifySnapshotCopyRetentionPeriodResponse :: Int -> ModifySnapshotCopyRetentionPeriodResponse
newModifySnapshotCopyRetentionPeriodResponse
  Int
pHttpStatus_ =
    ModifySnapshotCopyRetentionPeriodResponse'
      { $sel:cluster:ModifySnapshotCopyRetentionPeriodResponse' :: Maybe Cluster
cluster =
          forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:ModifySnapshotCopyRetentionPeriodResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | Undocumented member.
modifySnapshotCopyRetentionPeriodResponse_cluster :: Lens.Lens' ModifySnapshotCopyRetentionPeriodResponse (Prelude.Maybe Cluster)
modifySnapshotCopyRetentionPeriodResponse_cluster :: Lens' ModifySnapshotCopyRetentionPeriodResponse (Maybe Cluster)
modifySnapshotCopyRetentionPeriodResponse_cluster = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifySnapshotCopyRetentionPeriodResponse' {Maybe Cluster
cluster :: Maybe Cluster
$sel:cluster:ModifySnapshotCopyRetentionPeriodResponse' :: ModifySnapshotCopyRetentionPeriodResponse -> Maybe Cluster
cluster} -> Maybe Cluster
cluster) (\s :: ModifySnapshotCopyRetentionPeriodResponse
s@ModifySnapshotCopyRetentionPeriodResponse' {} Maybe Cluster
a -> ModifySnapshotCopyRetentionPeriodResponse
s {$sel:cluster:ModifySnapshotCopyRetentionPeriodResponse' :: Maybe Cluster
cluster = Maybe Cluster
a} :: ModifySnapshotCopyRetentionPeriodResponse)

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

instance
  Prelude.NFData
    ModifySnapshotCopyRetentionPeriodResponse
  where
  rnf :: ModifySnapshotCopyRetentionPeriodResponse -> ()
rnf ModifySnapshotCopyRetentionPeriodResponse' {Int
Maybe Cluster
httpStatus :: Int
cluster :: Maybe Cluster
$sel:httpStatus:ModifySnapshotCopyRetentionPeriodResponse' :: ModifySnapshotCopyRetentionPeriodResponse -> Int
$sel:cluster:ModifySnapshotCopyRetentionPeriodResponse' :: ModifySnapshotCopyRetentionPeriodResponse -> Maybe Cluster
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Cluster
cluster
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus