{-# 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-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)
--
-- 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.Lens as Lens
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
(ModifySnapshotCopyRetentionPeriod
 -> ModifySnapshotCopyRetentionPeriod -> Bool)
-> (ModifySnapshotCopyRetentionPeriod
    -> ModifySnapshotCopyRetentionPeriod -> Bool)
-> Eq ModifySnapshotCopyRetentionPeriod
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]
(Int -> ReadS ModifySnapshotCopyRetentionPeriod)
-> ReadS [ModifySnapshotCopyRetentionPeriod]
-> ReadPrec ModifySnapshotCopyRetentionPeriod
-> ReadPrec [ModifySnapshotCopyRetentionPeriod]
-> Read 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
(Int -> ModifySnapshotCopyRetentionPeriod -> ShowS)
-> (ModifySnapshotCopyRetentionPeriod -> String)
-> ([ModifySnapshotCopyRetentionPeriod] -> ShowS)
-> Show ModifySnapshotCopyRetentionPeriod
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.
 ModifySnapshotCopyRetentionPeriod
 -> Rep ModifySnapshotCopyRetentionPeriod x)
-> (forall x.
    Rep ModifySnapshotCopyRetentionPeriod x
    -> ModifySnapshotCopyRetentionPeriod)
-> Generic ModifySnapshotCopyRetentionPeriod
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' :: Maybe Bool -> Text -> Int -> ModifySnapshotCopyRetentionPeriod
ModifySnapshotCopyRetentionPeriod'
      { $sel:manual:ModifySnapshotCopyRetentionPeriod' :: Maybe Bool
manual =
          Maybe Bool
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 :: (Maybe Bool -> f (Maybe Bool))
-> ModifySnapshotCopyRetentionPeriod
-> f ModifySnapshotCopyRetentionPeriod
modifySnapshotCopyRetentionPeriod_manual = (ModifySnapshotCopyRetentionPeriod -> Maybe Bool)
-> (ModifySnapshotCopyRetentionPeriod
    -> Maybe Bool -> ModifySnapshotCopyRetentionPeriod)
-> Lens
     ModifySnapshotCopyRetentionPeriod
     ModifySnapshotCopyRetentionPeriod
     (Maybe Bool)
     (Maybe Bool)
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 :: (Text -> f Text)
-> ModifySnapshotCopyRetentionPeriod
-> f ModifySnapshotCopyRetentionPeriod
modifySnapshotCopyRetentionPeriod_clusterIdentifier = (ModifySnapshotCopyRetentionPeriod -> Text)
-> (ModifySnapshotCopyRetentionPeriod
    -> Text -> ModifySnapshotCopyRetentionPeriod)
-> Lens
     ModifySnapshotCopyRetentionPeriod
     ModifySnapshotCopyRetentionPeriod
     Text
     Text
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 :: (Int -> f Int)
-> ModifySnapshotCopyRetentionPeriod
-> f ModifySnapshotCopyRetentionPeriod
modifySnapshotCopyRetentionPeriod_retentionPeriod = (ModifySnapshotCopyRetentionPeriod -> Int)
-> (ModifySnapshotCopyRetentionPeriod
    -> Int -> ModifySnapshotCopyRetentionPeriod)
-> Lens
     ModifySnapshotCopyRetentionPeriod
     ModifySnapshotCopyRetentionPeriod
     Int
     Int
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 :: ModifySnapshotCopyRetentionPeriod
-> Request ModifySnapshotCopyRetentionPeriod
request = Service
-> ModifySnapshotCopyRetentionPeriod
-> Request ModifySnapshotCopyRetentionPeriod
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy ModifySnapshotCopyRetentionPeriod
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse ModifySnapshotCopyRetentionPeriod)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse ModifySnapshotCopyRetentionPeriod))
-> Logger
-> Service
-> Proxy ModifySnapshotCopyRetentionPeriod
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse ModifySnapshotCopyRetentionPeriod)))
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
"ModifySnapshotCopyRetentionPeriodResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Cluster -> Int -> ModifySnapshotCopyRetentionPeriodResponse
ModifySnapshotCopyRetentionPeriodResponse'
            (Maybe Cluster -> Int -> ModifySnapshotCopyRetentionPeriodResponse)
-> Either String (Maybe Cluster)
-> Either String (Int -> ModifySnapshotCopyRetentionPeriodResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Cluster)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Cluster")
              Either String (Int -> ModifySnapshotCopyRetentionPeriodResponse)
-> Either String Int
-> Either String ModifySnapshotCopyRetentionPeriodResponse
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
    ModifySnapshotCopyRetentionPeriod

instance
  Prelude.NFData
    ModifySnapshotCopyRetentionPeriod

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

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

instance
  Core.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
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: ( ByteString
"ModifySnapshotCopyRetentionPeriod" ::
                      Prelude.ByteString
                  ),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2012-12-01" :: Prelude.ByteString),
        ByteString
"Manual" ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
manual,
        ByteString
"ClusterIdentifier" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
clusterIdentifier,
        ByteString
"RetentionPeriod" ByteString -> Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: 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
(ModifySnapshotCopyRetentionPeriodResponse
 -> ModifySnapshotCopyRetentionPeriodResponse -> Bool)
-> (ModifySnapshotCopyRetentionPeriodResponse
    -> ModifySnapshotCopyRetentionPeriodResponse -> Bool)
-> Eq ModifySnapshotCopyRetentionPeriodResponse
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]
(Int -> ReadS ModifySnapshotCopyRetentionPeriodResponse)
-> ReadS [ModifySnapshotCopyRetentionPeriodResponse]
-> ReadPrec ModifySnapshotCopyRetentionPeriodResponse
-> ReadPrec [ModifySnapshotCopyRetentionPeriodResponse]
-> Read 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
(Int -> ModifySnapshotCopyRetentionPeriodResponse -> ShowS)
-> (ModifySnapshotCopyRetentionPeriodResponse -> String)
-> ([ModifySnapshotCopyRetentionPeriodResponse] -> ShowS)
-> Show ModifySnapshotCopyRetentionPeriodResponse
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.
 ModifySnapshotCopyRetentionPeriodResponse
 -> Rep ModifySnapshotCopyRetentionPeriodResponse x)
-> (forall x.
    Rep ModifySnapshotCopyRetentionPeriodResponse x
    -> ModifySnapshotCopyRetentionPeriodResponse)
-> Generic ModifySnapshotCopyRetentionPeriodResponse
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' :: Maybe Cluster -> Int -> ModifySnapshotCopyRetentionPeriodResponse
ModifySnapshotCopyRetentionPeriodResponse'
      { $sel:cluster:ModifySnapshotCopyRetentionPeriodResponse' :: Maybe Cluster
cluster =
          Maybe 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 :: (Maybe Cluster -> f (Maybe Cluster))
-> ModifySnapshotCopyRetentionPeriodResponse
-> f ModifySnapshotCopyRetentionPeriodResponse
modifySnapshotCopyRetentionPeriodResponse_cluster = (ModifySnapshotCopyRetentionPeriodResponse -> Maybe Cluster)
-> (ModifySnapshotCopyRetentionPeriodResponse
    -> Maybe Cluster -> ModifySnapshotCopyRetentionPeriodResponse)
-> Lens
     ModifySnapshotCopyRetentionPeriodResponse
     ModifySnapshotCopyRetentionPeriodResponse
     (Maybe Cluster)
     (Maybe 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 :: (Int -> f Int)
-> ModifySnapshotCopyRetentionPeriodResponse
-> f ModifySnapshotCopyRetentionPeriodResponse
modifySnapshotCopyRetentionPeriodResponse_httpStatus = (ModifySnapshotCopyRetentionPeriodResponse -> Int)
-> (ModifySnapshotCopyRetentionPeriodResponse
    -> Int -> ModifySnapshotCopyRetentionPeriodResponse)
-> Lens
     ModifySnapshotCopyRetentionPeriodResponse
     ModifySnapshotCopyRetentionPeriodResponse
     Int
     Int
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