{-# 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.KinesisVideo.UpdateDataRetention
-- 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)
--
-- Increases or decreases the stream\'s data retention period by the value
-- that you specify. To indicate whether you want to increase or decrease
-- the data retention period, specify the @Operation@ parameter in the
-- request body. In the request, you must specify either the @StreamName@
-- or the @StreamARN@.
--
-- The retention period that you specify replaces the current value.
--
-- This operation requires permission for the
-- @KinesisVideo:UpdateDataRetention@ action.
--
-- Changing the data retention period affects the data in the stream as
-- follows:
--
-- -   If the data retention period is increased, existing data is retained
--     for the new retention period. For example, if the data retention
--     period is increased from one hour to seven hours, all existing data
--     is retained for seven hours.
--
-- -   If the data retention period is decreased, existing data is retained
--     for the new retention period. For example, if the data retention
--     period is decreased from seven hours to one hour, all existing data
--     is retained for one hour, and any data older than one hour is
--     deleted immediately.
module Amazonka.KinesisVideo.UpdateDataRetention
  ( -- * Creating a Request
    UpdateDataRetention (..),
    newUpdateDataRetention,

    -- * Request Lenses
    updateDataRetention_streamARN,
    updateDataRetention_streamName,
    updateDataRetention_currentVersion,
    updateDataRetention_operation,
    updateDataRetention_dataRetentionChangeInHours,

    -- * Destructuring the Response
    UpdateDataRetentionResponse (..),
    newUpdateDataRetentionResponse,

    -- * Response Lenses
    updateDataRetentionResponse_httpStatus,
  )
where

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

-- | /See:/ 'newUpdateDataRetention' smart constructor.
data UpdateDataRetention = UpdateDataRetention'
  { -- | The Amazon Resource Name (ARN) of the stream whose retention period you
    -- want to change.
    UpdateDataRetention -> Maybe Text
streamARN :: Prelude.Maybe Prelude.Text,
    -- | The name of the stream whose retention period you want to change.
    UpdateDataRetention -> Maybe Text
streamName :: Prelude.Maybe Prelude.Text,
    -- | The version of the stream whose retention period you want to change. To
    -- get the version, call either the @DescribeStream@ or the @ListStreams@
    -- API.
    UpdateDataRetention -> Text
currentVersion :: Prelude.Text,
    -- | Indicates whether you want to increase or decrease the retention period.
    UpdateDataRetention -> UpdateDataRetentionOperation
operation :: UpdateDataRetentionOperation,
    -- | The retention period, in hours. The value you specify replaces the
    -- current value. The maximum value for this parameter is 87600 (ten
    -- years).
    UpdateDataRetention -> Natural
dataRetentionChangeInHours :: Prelude.Natural
  }
  deriving (UpdateDataRetention -> UpdateDataRetention -> Bool
(UpdateDataRetention -> UpdateDataRetention -> Bool)
-> (UpdateDataRetention -> UpdateDataRetention -> Bool)
-> Eq UpdateDataRetention
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateDataRetention -> UpdateDataRetention -> Bool
$c/= :: UpdateDataRetention -> UpdateDataRetention -> Bool
== :: UpdateDataRetention -> UpdateDataRetention -> Bool
$c== :: UpdateDataRetention -> UpdateDataRetention -> Bool
Prelude.Eq, ReadPrec [UpdateDataRetention]
ReadPrec UpdateDataRetention
Int -> ReadS UpdateDataRetention
ReadS [UpdateDataRetention]
(Int -> ReadS UpdateDataRetention)
-> ReadS [UpdateDataRetention]
-> ReadPrec UpdateDataRetention
-> ReadPrec [UpdateDataRetention]
-> Read UpdateDataRetention
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateDataRetention]
$creadListPrec :: ReadPrec [UpdateDataRetention]
readPrec :: ReadPrec UpdateDataRetention
$creadPrec :: ReadPrec UpdateDataRetention
readList :: ReadS [UpdateDataRetention]
$creadList :: ReadS [UpdateDataRetention]
readsPrec :: Int -> ReadS UpdateDataRetention
$creadsPrec :: Int -> ReadS UpdateDataRetention
Prelude.Read, Int -> UpdateDataRetention -> ShowS
[UpdateDataRetention] -> ShowS
UpdateDataRetention -> String
(Int -> UpdateDataRetention -> ShowS)
-> (UpdateDataRetention -> String)
-> ([UpdateDataRetention] -> ShowS)
-> Show UpdateDataRetention
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateDataRetention] -> ShowS
$cshowList :: [UpdateDataRetention] -> ShowS
show :: UpdateDataRetention -> String
$cshow :: UpdateDataRetention -> String
showsPrec :: Int -> UpdateDataRetention -> ShowS
$cshowsPrec :: Int -> UpdateDataRetention -> ShowS
Prelude.Show, (forall x. UpdateDataRetention -> Rep UpdateDataRetention x)
-> (forall x. Rep UpdateDataRetention x -> UpdateDataRetention)
-> Generic UpdateDataRetention
forall x. Rep UpdateDataRetention x -> UpdateDataRetention
forall x. UpdateDataRetention -> Rep UpdateDataRetention x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateDataRetention x -> UpdateDataRetention
$cfrom :: forall x. UpdateDataRetention -> Rep UpdateDataRetention x
Prelude.Generic)

-- |
-- Create a value of 'UpdateDataRetention' 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:
--
-- 'streamARN', 'updateDataRetention_streamARN' - The Amazon Resource Name (ARN) of the stream whose retention period you
-- want to change.
--
-- 'streamName', 'updateDataRetention_streamName' - The name of the stream whose retention period you want to change.
--
-- 'currentVersion', 'updateDataRetention_currentVersion' - The version of the stream whose retention period you want to change. To
-- get the version, call either the @DescribeStream@ or the @ListStreams@
-- API.
--
-- 'operation', 'updateDataRetention_operation' - Indicates whether you want to increase or decrease the retention period.
--
-- 'dataRetentionChangeInHours', 'updateDataRetention_dataRetentionChangeInHours' - The retention period, in hours. The value you specify replaces the
-- current value. The maximum value for this parameter is 87600 (ten
-- years).
newUpdateDataRetention ::
  -- | 'currentVersion'
  Prelude.Text ->
  -- | 'operation'
  UpdateDataRetentionOperation ->
  -- | 'dataRetentionChangeInHours'
  Prelude.Natural ->
  UpdateDataRetention
newUpdateDataRetention :: Text
-> UpdateDataRetentionOperation -> Natural -> UpdateDataRetention
newUpdateDataRetention
  Text
pCurrentVersion_
  UpdateDataRetentionOperation
pOperation_
  Natural
pDataRetentionChangeInHours_ =
    UpdateDataRetention' :: Maybe Text
-> Maybe Text
-> Text
-> UpdateDataRetentionOperation
-> Natural
-> UpdateDataRetention
UpdateDataRetention'
      { $sel:streamARN:UpdateDataRetention' :: Maybe Text
streamARN = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:streamName:UpdateDataRetention' :: Maybe Text
streamName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:currentVersion:UpdateDataRetention' :: Text
currentVersion = Text
pCurrentVersion_,
        $sel:operation:UpdateDataRetention' :: UpdateDataRetentionOperation
operation = UpdateDataRetentionOperation
pOperation_,
        $sel:dataRetentionChangeInHours:UpdateDataRetention' :: Natural
dataRetentionChangeInHours =
          Natural
pDataRetentionChangeInHours_
      }

-- | The Amazon Resource Name (ARN) of the stream whose retention period you
-- want to change.
updateDataRetention_streamARN :: Lens.Lens' UpdateDataRetention (Prelude.Maybe Prelude.Text)
updateDataRetention_streamARN :: (Maybe Text -> f (Maybe Text))
-> UpdateDataRetention -> f UpdateDataRetention
updateDataRetention_streamARN = (UpdateDataRetention -> Maybe Text)
-> (UpdateDataRetention -> Maybe Text -> UpdateDataRetention)
-> Lens
     UpdateDataRetention UpdateDataRetention (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDataRetention' {Maybe Text
streamARN :: Maybe Text
$sel:streamARN:UpdateDataRetention' :: UpdateDataRetention -> Maybe Text
streamARN} -> Maybe Text
streamARN) (\s :: UpdateDataRetention
s@UpdateDataRetention' {} Maybe Text
a -> UpdateDataRetention
s {$sel:streamARN:UpdateDataRetention' :: Maybe Text
streamARN = Maybe Text
a} :: UpdateDataRetention)

-- | The name of the stream whose retention period you want to change.
updateDataRetention_streamName :: Lens.Lens' UpdateDataRetention (Prelude.Maybe Prelude.Text)
updateDataRetention_streamName :: (Maybe Text -> f (Maybe Text))
-> UpdateDataRetention -> f UpdateDataRetention
updateDataRetention_streamName = (UpdateDataRetention -> Maybe Text)
-> (UpdateDataRetention -> Maybe Text -> UpdateDataRetention)
-> Lens
     UpdateDataRetention UpdateDataRetention (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDataRetention' {Maybe Text
streamName :: Maybe Text
$sel:streamName:UpdateDataRetention' :: UpdateDataRetention -> Maybe Text
streamName} -> Maybe Text
streamName) (\s :: UpdateDataRetention
s@UpdateDataRetention' {} Maybe Text
a -> UpdateDataRetention
s {$sel:streamName:UpdateDataRetention' :: Maybe Text
streamName = Maybe Text
a} :: UpdateDataRetention)

-- | The version of the stream whose retention period you want to change. To
-- get the version, call either the @DescribeStream@ or the @ListStreams@
-- API.
updateDataRetention_currentVersion :: Lens.Lens' UpdateDataRetention Prelude.Text
updateDataRetention_currentVersion :: (Text -> f Text) -> UpdateDataRetention -> f UpdateDataRetention
updateDataRetention_currentVersion = (UpdateDataRetention -> Text)
-> (UpdateDataRetention -> Text -> UpdateDataRetention)
-> Lens UpdateDataRetention UpdateDataRetention Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDataRetention' {Text
currentVersion :: Text
$sel:currentVersion:UpdateDataRetention' :: UpdateDataRetention -> Text
currentVersion} -> Text
currentVersion) (\s :: UpdateDataRetention
s@UpdateDataRetention' {} Text
a -> UpdateDataRetention
s {$sel:currentVersion:UpdateDataRetention' :: Text
currentVersion = Text
a} :: UpdateDataRetention)

-- | Indicates whether you want to increase or decrease the retention period.
updateDataRetention_operation :: Lens.Lens' UpdateDataRetention UpdateDataRetentionOperation
updateDataRetention_operation :: (UpdateDataRetentionOperation -> f UpdateDataRetentionOperation)
-> UpdateDataRetention -> f UpdateDataRetention
updateDataRetention_operation = (UpdateDataRetention -> UpdateDataRetentionOperation)
-> (UpdateDataRetention
    -> UpdateDataRetentionOperation -> UpdateDataRetention)
-> Lens
     UpdateDataRetention
     UpdateDataRetention
     UpdateDataRetentionOperation
     UpdateDataRetentionOperation
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDataRetention' {UpdateDataRetentionOperation
operation :: UpdateDataRetentionOperation
$sel:operation:UpdateDataRetention' :: UpdateDataRetention -> UpdateDataRetentionOperation
operation} -> UpdateDataRetentionOperation
operation) (\s :: UpdateDataRetention
s@UpdateDataRetention' {} UpdateDataRetentionOperation
a -> UpdateDataRetention
s {$sel:operation:UpdateDataRetention' :: UpdateDataRetentionOperation
operation = UpdateDataRetentionOperation
a} :: UpdateDataRetention)

-- | The retention period, in hours. The value you specify replaces the
-- current value. The maximum value for this parameter is 87600 (ten
-- years).
updateDataRetention_dataRetentionChangeInHours :: Lens.Lens' UpdateDataRetention Prelude.Natural
updateDataRetention_dataRetentionChangeInHours :: (Natural -> f Natural)
-> UpdateDataRetention -> f UpdateDataRetention
updateDataRetention_dataRetentionChangeInHours = (UpdateDataRetention -> Natural)
-> (UpdateDataRetention -> Natural -> UpdateDataRetention)
-> Lens UpdateDataRetention UpdateDataRetention Natural Natural
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDataRetention' {Natural
dataRetentionChangeInHours :: Natural
$sel:dataRetentionChangeInHours:UpdateDataRetention' :: UpdateDataRetention -> Natural
dataRetentionChangeInHours} -> Natural
dataRetentionChangeInHours) (\s :: UpdateDataRetention
s@UpdateDataRetention' {} Natural
a -> UpdateDataRetention
s {$sel:dataRetentionChangeInHours:UpdateDataRetention' :: Natural
dataRetentionChangeInHours = Natural
a} :: UpdateDataRetention)

instance Core.AWSRequest UpdateDataRetention where
  type
    AWSResponse UpdateDataRetention =
      UpdateDataRetentionResponse
  request :: UpdateDataRetention -> Request UpdateDataRetention
request = Service -> UpdateDataRetention -> Request UpdateDataRetention
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateDataRetention
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateDataRetention)))
response =
    (Int
 -> ResponseHeaders
 -> ()
 -> Either String (AWSResponse UpdateDataRetention))
-> Logger
-> Service
-> Proxy UpdateDataRetention
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateDataRetention)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
      ( \Int
s ResponseHeaders
h ()
x ->
          Int -> UpdateDataRetentionResponse
UpdateDataRetentionResponse'
            (Int -> UpdateDataRetentionResponse)
-> Either String Int -> Either String UpdateDataRetentionResponse
forall (f :: * -> *) a b. Functor 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 UpdateDataRetention

instance Prelude.NFData UpdateDataRetention

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

instance Core.ToJSON UpdateDataRetention where
  toJSON :: UpdateDataRetention -> Value
toJSON UpdateDataRetention' {Natural
Maybe Text
Text
UpdateDataRetentionOperation
dataRetentionChangeInHours :: Natural
operation :: UpdateDataRetentionOperation
currentVersion :: Text
streamName :: Maybe Text
streamARN :: Maybe Text
$sel:dataRetentionChangeInHours:UpdateDataRetention' :: UpdateDataRetention -> Natural
$sel:operation:UpdateDataRetention' :: UpdateDataRetention -> UpdateDataRetentionOperation
$sel:currentVersion:UpdateDataRetention' :: UpdateDataRetention -> Text
$sel:streamName:UpdateDataRetention' :: UpdateDataRetention -> Maybe Text
$sel:streamARN:UpdateDataRetention' :: UpdateDataRetention -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"StreamARN" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
streamARN,
            (Text
"StreamName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
streamName,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"CurrentVersion" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
currentVersion),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Operation" Text -> UpdateDataRetentionOperation -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= UpdateDataRetentionOperation
operation),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"DataRetentionChangeInHours"
                  Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Natural
dataRetentionChangeInHours
              )
          ]
      )

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

instance Core.ToQuery UpdateDataRetention where
  toQuery :: UpdateDataRetention -> QueryString
toQuery = QueryString -> UpdateDataRetention -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

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

-- |
-- Create a value of 'UpdateDataRetentionResponse' 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:
--
-- 'httpStatus', 'updateDataRetentionResponse_httpStatus' - The response's http status code.
newUpdateDataRetentionResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateDataRetentionResponse
newUpdateDataRetentionResponse :: Int -> UpdateDataRetentionResponse
newUpdateDataRetentionResponse Int
pHttpStatus_ =
  UpdateDataRetentionResponse' :: Int -> UpdateDataRetentionResponse
UpdateDataRetentionResponse'
    { $sel:httpStatus:UpdateDataRetentionResponse' :: Int
httpStatus =
        Int
pHttpStatus_
    }

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

instance Prelude.NFData UpdateDataRetentionResponse