{-# 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.Chime.PutAppInstanceRetentionSettings
-- 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)
--
-- Sets the amount of time in days that a given @AppInstance@ retains data.
module Amazonka.Chime.PutAppInstanceRetentionSettings
  ( -- * Creating a Request
    PutAppInstanceRetentionSettings (..),
    newPutAppInstanceRetentionSettings,

    -- * Request Lenses
    putAppInstanceRetentionSettings_appInstanceArn,
    putAppInstanceRetentionSettings_appInstanceRetentionSettings,

    -- * Destructuring the Response
    PutAppInstanceRetentionSettingsResponse (..),
    newPutAppInstanceRetentionSettingsResponse,

    -- * Response Lenses
    putAppInstanceRetentionSettingsResponse_appInstanceRetentionSettings,
    putAppInstanceRetentionSettingsResponse_initiateDeletionTimestamp,
    putAppInstanceRetentionSettingsResponse_httpStatus,
  )
where

import Amazonka.Chime.Types
import qualified Amazonka.Core as Core
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:/ 'newPutAppInstanceRetentionSettings' smart constructor.
data PutAppInstanceRetentionSettings = PutAppInstanceRetentionSettings'
  { -- | The ARN of the @AppInstance@.
    PutAppInstanceRetentionSettings -> Text
appInstanceArn :: Prelude.Text,
    -- | The time in days to retain data. Data type: number.
    PutAppInstanceRetentionSettings -> AppInstanceRetentionSettings
appInstanceRetentionSettings :: AppInstanceRetentionSettings
  }
  deriving (PutAppInstanceRetentionSettings
-> PutAppInstanceRetentionSettings -> Bool
(PutAppInstanceRetentionSettings
 -> PutAppInstanceRetentionSettings -> Bool)
-> (PutAppInstanceRetentionSettings
    -> PutAppInstanceRetentionSettings -> Bool)
-> Eq PutAppInstanceRetentionSettings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutAppInstanceRetentionSettings
-> PutAppInstanceRetentionSettings -> Bool
$c/= :: PutAppInstanceRetentionSettings
-> PutAppInstanceRetentionSettings -> Bool
== :: PutAppInstanceRetentionSettings
-> PutAppInstanceRetentionSettings -> Bool
$c== :: PutAppInstanceRetentionSettings
-> PutAppInstanceRetentionSettings -> Bool
Prelude.Eq, ReadPrec [PutAppInstanceRetentionSettings]
ReadPrec PutAppInstanceRetentionSettings
Int -> ReadS PutAppInstanceRetentionSettings
ReadS [PutAppInstanceRetentionSettings]
(Int -> ReadS PutAppInstanceRetentionSettings)
-> ReadS [PutAppInstanceRetentionSettings]
-> ReadPrec PutAppInstanceRetentionSettings
-> ReadPrec [PutAppInstanceRetentionSettings]
-> Read PutAppInstanceRetentionSettings
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PutAppInstanceRetentionSettings]
$creadListPrec :: ReadPrec [PutAppInstanceRetentionSettings]
readPrec :: ReadPrec PutAppInstanceRetentionSettings
$creadPrec :: ReadPrec PutAppInstanceRetentionSettings
readList :: ReadS [PutAppInstanceRetentionSettings]
$creadList :: ReadS [PutAppInstanceRetentionSettings]
readsPrec :: Int -> ReadS PutAppInstanceRetentionSettings
$creadsPrec :: Int -> ReadS PutAppInstanceRetentionSettings
Prelude.Read, Int -> PutAppInstanceRetentionSettings -> ShowS
[PutAppInstanceRetentionSettings] -> ShowS
PutAppInstanceRetentionSettings -> String
(Int -> PutAppInstanceRetentionSettings -> ShowS)
-> (PutAppInstanceRetentionSettings -> String)
-> ([PutAppInstanceRetentionSettings] -> ShowS)
-> Show PutAppInstanceRetentionSettings
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutAppInstanceRetentionSettings] -> ShowS
$cshowList :: [PutAppInstanceRetentionSettings] -> ShowS
show :: PutAppInstanceRetentionSettings -> String
$cshow :: PutAppInstanceRetentionSettings -> String
showsPrec :: Int -> PutAppInstanceRetentionSettings -> ShowS
$cshowsPrec :: Int -> PutAppInstanceRetentionSettings -> ShowS
Prelude.Show, (forall x.
 PutAppInstanceRetentionSettings
 -> Rep PutAppInstanceRetentionSettings x)
-> (forall x.
    Rep PutAppInstanceRetentionSettings x
    -> PutAppInstanceRetentionSettings)
-> Generic PutAppInstanceRetentionSettings
forall x.
Rep PutAppInstanceRetentionSettings x
-> PutAppInstanceRetentionSettings
forall x.
PutAppInstanceRetentionSettings
-> Rep PutAppInstanceRetentionSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep PutAppInstanceRetentionSettings x
-> PutAppInstanceRetentionSettings
$cfrom :: forall x.
PutAppInstanceRetentionSettings
-> Rep PutAppInstanceRetentionSettings x
Prelude.Generic)

-- |
-- Create a value of 'PutAppInstanceRetentionSettings' 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:
--
-- 'appInstanceArn', 'putAppInstanceRetentionSettings_appInstanceArn' - The ARN of the @AppInstance@.
--
-- 'appInstanceRetentionSettings', 'putAppInstanceRetentionSettings_appInstanceRetentionSettings' - The time in days to retain data. Data type: number.
newPutAppInstanceRetentionSettings ::
  -- | 'appInstanceArn'
  Prelude.Text ->
  -- | 'appInstanceRetentionSettings'
  AppInstanceRetentionSettings ->
  PutAppInstanceRetentionSettings
newPutAppInstanceRetentionSettings :: Text
-> AppInstanceRetentionSettings -> PutAppInstanceRetentionSettings
newPutAppInstanceRetentionSettings
  Text
pAppInstanceArn_
  AppInstanceRetentionSettings
pAppInstanceRetentionSettings_ =
    PutAppInstanceRetentionSettings' :: Text
-> AppInstanceRetentionSettings -> PutAppInstanceRetentionSettings
PutAppInstanceRetentionSettings'
      { $sel:appInstanceArn:PutAppInstanceRetentionSettings' :: Text
appInstanceArn =
          Text
pAppInstanceArn_,
        $sel:appInstanceRetentionSettings:PutAppInstanceRetentionSettings' :: AppInstanceRetentionSettings
appInstanceRetentionSettings =
          AppInstanceRetentionSettings
pAppInstanceRetentionSettings_
      }

-- | The ARN of the @AppInstance@.
putAppInstanceRetentionSettings_appInstanceArn :: Lens.Lens' PutAppInstanceRetentionSettings Prelude.Text
putAppInstanceRetentionSettings_appInstanceArn :: (Text -> f Text)
-> PutAppInstanceRetentionSettings
-> f PutAppInstanceRetentionSettings
putAppInstanceRetentionSettings_appInstanceArn = (PutAppInstanceRetentionSettings -> Text)
-> (PutAppInstanceRetentionSettings
    -> Text -> PutAppInstanceRetentionSettings)
-> Lens
     PutAppInstanceRetentionSettings
     PutAppInstanceRetentionSettings
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutAppInstanceRetentionSettings' {Text
appInstanceArn :: Text
$sel:appInstanceArn:PutAppInstanceRetentionSettings' :: PutAppInstanceRetentionSettings -> Text
appInstanceArn} -> Text
appInstanceArn) (\s :: PutAppInstanceRetentionSettings
s@PutAppInstanceRetentionSettings' {} Text
a -> PutAppInstanceRetentionSettings
s {$sel:appInstanceArn:PutAppInstanceRetentionSettings' :: Text
appInstanceArn = Text
a} :: PutAppInstanceRetentionSettings)

-- | The time in days to retain data. Data type: number.
putAppInstanceRetentionSettings_appInstanceRetentionSettings :: Lens.Lens' PutAppInstanceRetentionSettings AppInstanceRetentionSettings
putAppInstanceRetentionSettings_appInstanceRetentionSettings :: (AppInstanceRetentionSettings -> f AppInstanceRetentionSettings)
-> PutAppInstanceRetentionSettings
-> f PutAppInstanceRetentionSettings
putAppInstanceRetentionSettings_appInstanceRetentionSettings = (PutAppInstanceRetentionSettings -> AppInstanceRetentionSettings)
-> (PutAppInstanceRetentionSettings
    -> AppInstanceRetentionSettings -> PutAppInstanceRetentionSettings)
-> Lens
     PutAppInstanceRetentionSettings
     PutAppInstanceRetentionSettings
     AppInstanceRetentionSettings
     AppInstanceRetentionSettings
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutAppInstanceRetentionSettings' {AppInstanceRetentionSettings
appInstanceRetentionSettings :: AppInstanceRetentionSettings
$sel:appInstanceRetentionSettings:PutAppInstanceRetentionSettings' :: PutAppInstanceRetentionSettings -> AppInstanceRetentionSettings
appInstanceRetentionSettings} -> AppInstanceRetentionSettings
appInstanceRetentionSettings) (\s :: PutAppInstanceRetentionSettings
s@PutAppInstanceRetentionSettings' {} AppInstanceRetentionSettings
a -> PutAppInstanceRetentionSettings
s {$sel:appInstanceRetentionSettings:PutAppInstanceRetentionSettings' :: AppInstanceRetentionSettings
appInstanceRetentionSettings = AppInstanceRetentionSettings
a} :: PutAppInstanceRetentionSettings)

instance
  Core.AWSRequest
    PutAppInstanceRetentionSettings
  where
  type
    AWSResponse PutAppInstanceRetentionSettings =
      PutAppInstanceRetentionSettingsResponse
  request :: PutAppInstanceRetentionSettings
-> Request PutAppInstanceRetentionSettings
request = Service
-> PutAppInstanceRetentionSettings
-> Request PutAppInstanceRetentionSettings
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy PutAppInstanceRetentionSettings
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse PutAppInstanceRetentionSettings)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse PutAppInstanceRetentionSettings))
-> Logger
-> Service
-> Proxy PutAppInstanceRetentionSettings
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse PutAppInstanceRetentionSettings)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe AppInstanceRetentionSettings
-> Maybe POSIX -> Int -> PutAppInstanceRetentionSettingsResponse
PutAppInstanceRetentionSettingsResponse'
            (Maybe AppInstanceRetentionSettings
 -> Maybe POSIX -> Int -> PutAppInstanceRetentionSettingsResponse)
-> Either String (Maybe AppInstanceRetentionSettings)
-> Either
     String
     (Maybe POSIX -> Int -> PutAppInstanceRetentionSettingsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object
-> Text -> Either String (Maybe AppInstanceRetentionSettings)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"AppInstanceRetentionSettings")
            Either
  String
  (Maybe POSIX -> Int -> PutAppInstanceRetentionSettingsResponse)
-> Either String (Maybe POSIX)
-> Either String (Int -> PutAppInstanceRetentionSettingsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"InitiateDeletionTimestamp")
            Either String (Int -> PutAppInstanceRetentionSettingsResponse)
-> Either String Int
-> Either String PutAppInstanceRetentionSettingsResponse
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
    PutAppInstanceRetentionSettings

instance
  Prelude.NFData
    PutAppInstanceRetentionSettings

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

instance Core.ToJSON PutAppInstanceRetentionSettings where
  toJSON :: PutAppInstanceRetentionSettings -> Value
toJSON PutAppInstanceRetentionSettings' {Text
AppInstanceRetentionSettings
appInstanceRetentionSettings :: AppInstanceRetentionSettings
appInstanceArn :: Text
$sel:appInstanceRetentionSettings:PutAppInstanceRetentionSettings' :: PutAppInstanceRetentionSettings -> AppInstanceRetentionSettings
$sel:appInstanceArn:PutAppInstanceRetentionSettings' :: PutAppInstanceRetentionSettings -> Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"AppInstanceRetentionSettings"
                  Text -> AppInstanceRetentionSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= AppInstanceRetentionSettings
appInstanceRetentionSettings
              )
          ]
      )

instance Core.ToPath PutAppInstanceRetentionSettings where
  toPath :: PutAppInstanceRetentionSettings -> ByteString
toPath PutAppInstanceRetentionSettings' {Text
AppInstanceRetentionSettings
appInstanceRetentionSettings :: AppInstanceRetentionSettings
appInstanceArn :: Text
$sel:appInstanceRetentionSettings:PutAppInstanceRetentionSettings' :: PutAppInstanceRetentionSettings -> AppInstanceRetentionSettings
$sel:appInstanceArn:PutAppInstanceRetentionSettings' :: PutAppInstanceRetentionSettings -> Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/app-instances/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
appInstanceArn,
        ByteString
"/retention-settings"
      ]

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

-- | /See:/ 'newPutAppInstanceRetentionSettingsResponse' smart constructor.
data PutAppInstanceRetentionSettingsResponse = PutAppInstanceRetentionSettingsResponse'
  { -- | The time in days to retain data. Data type: number.
    PutAppInstanceRetentionSettingsResponse
-> Maybe AppInstanceRetentionSettings
appInstanceRetentionSettings :: Prelude.Maybe AppInstanceRetentionSettings,
    -- | The time at which the API deletes data.
    PutAppInstanceRetentionSettingsResponse -> Maybe POSIX
initiateDeletionTimestamp :: Prelude.Maybe Core.POSIX,
    -- | The response's http status code.
    PutAppInstanceRetentionSettingsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (PutAppInstanceRetentionSettingsResponse
-> PutAppInstanceRetentionSettingsResponse -> Bool
(PutAppInstanceRetentionSettingsResponse
 -> PutAppInstanceRetentionSettingsResponse -> Bool)
-> (PutAppInstanceRetentionSettingsResponse
    -> PutAppInstanceRetentionSettingsResponse -> Bool)
-> Eq PutAppInstanceRetentionSettingsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutAppInstanceRetentionSettingsResponse
-> PutAppInstanceRetentionSettingsResponse -> Bool
$c/= :: PutAppInstanceRetentionSettingsResponse
-> PutAppInstanceRetentionSettingsResponse -> Bool
== :: PutAppInstanceRetentionSettingsResponse
-> PutAppInstanceRetentionSettingsResponse -> Bool
$c== :: PutAppInstanceRetentionSettingsResponse
-> PutAppInstanceRetentionSettingsResponse -> Bool
Prelude.Eq, ReadPrec [PutAppInstanceRetentionSettingsResponse]
ReadPrec PutAppInstanceRetentionSettingsResponse
Int -> ReadS PutAppInstanceRetentionSettingsResponse
ReadS [PutAppInstanceRetentionSettingsResponse]
(Int -> ReadS PutAppInstanceRetentionSettingsResponse)
-> ReadS [PutAppInstanceRetentionSettingsResponse]
-> ReadPrec PutAppInstanceRetentionSettingsResponse
-> ReadPrec [PutAppInstanceRetentionSettingsResponse]
-> Read PutAppInstanceRetentionSettingsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PutAppInstanceRetentionSettingsResponse]
$creadListPrec :: ReadPrec [PutAppInstanceRetentionSettingsResponse]
readPrec :: ReadPrec PutAppInstanceRetentionSettingsResponse
$creadPrec :: ReadPrec PutAppInstanceRetentionSettingsResponse
readList :: ReadS [PutAppInstanceRetentionSettingsResponse]
$creadList :: ReadS [PutAppInstanceRetentionSettingsResponse]
readsPrec :: Int -> ReadS PutAppInstanceRetentionSettingsResponse
$creadsPrec :: Int -> ReadS PutAppInstanceRetentionSettingsResponse
Prelude.Read, Int -> PutAppInstanceRetentionSettingsResponse -> ShowS
[PutAppInstanceRetentionSettingsResponse] -> ShowS
PutAppInstanceRetentionSettingsResponse -> String
(Int -> PutAppInstanceRetentionSettingsResponse -> ShowS)
-> (PutAppInstanceRetentionSettingsResponse -> String)
-> ([PutAppInstanceRetentionSettingsResponse] -> ShowS)
-> Show PutAppInstanceRetentionSettingsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutAppInstanceRetentionSettingsResponse] -> ShowS
$cshowList :: [PutAppInstanceRetentionSettingsResponse] -> ShowS
show :: PutAppInstanceRetentionSettingsResponse -> String
$cshow :: PutAppInstanceRetentionSettingsResponse -> String
showsPrec :: Int -> PutAppInstanceRetentionSettingsResponse -> ShowS
$cshowsPrec :: Int -> PutAppInstanceRetentionSettingsResponse -> ShowS
Prelude.Show, (forall x.
 PutAppInstanceRetentionSettingsResponse
 -> Rep PutAppInstanceRetentionSettingsResponse x)
-> (forall x.
    Rep PutAppInstanceRetentionSettingsResponse x
    -> PutAppInstanceRetentionSettingsResponse)
-> Generic PutAppInstanceRetentionSettingsResponse
forall x.
Rep PutAppInstanceRetentionSettingsResponse x
-> PutAppInstanceRetentionSettingsResponse
forall x.
PutAppInstanceRetentionSettingsResponse
-> Rep PutAppInstanceRetentionSettingsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep PutAppInstanceRetentionSettingsResponse x
-> PutAppInstanceRetentionSettingsResponse
$cfrom :: forall x.
PutAppInstanceRetentionSettingsResponse
-> Rep PutAppInstanceRetentionSettingsResponse x
Prelude.Generic)

-- |
-- Create a value of 'PutAppInstanceRetentionSettingsResponse' 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:
--
-- 'appInstanceRetentionSettings', 'putAppInstanceRetentionSettingsResponse_appInstanceRetentionSettings' - The time in days to retain data. Data type: number.
--
-- 'initiateDeletionTimestamp', 'putAppInstanceRetentionSettingsResponse_initiateDeletionTimestamp' - The time at which the API deletes data.
--
-- 'httpStatus', 'putAppInstanceRetentionSettingsResponse_httpStatus' - The response's http status code.
newPutAppInstanceRetentionSettingsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  PutAppInstanceRetentionSettingsResponse
newPutAppInstanceRetentionSettingsResponse :: Int -> PutAppInstanceRetentionSettingsResponse
newPutAppInstanceRetentionSettingsResponse
  Int
pHttpStatus_ =
    PutAppInstanceRetentionSettingsResponse' :: Maybe AppInstanceRetentionSettings
-> Maybe POSIX -> Int -> PutAppInstanceRetentionSettingsResponse
PutAppInstanceRetentionSettingsResponse'
      { $sel:appInstanceRetentionSettings:PutAppInstanceRetentionSettingsResponse' :: Maybe AppInstanceRetentionSettings
appInstanceRetentionSettings =
          Maybe AppInstanceRetentionSettings
forall a. Maybe a
Prelude.Nothing,
        $sel:initiateDeletionTimestamp:PutAppInstanceRetentionSettingsResponse' :: Maybe POSIX
initiateDeletionTimestamp =
          Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:PutAppInstanceRetentionSettingsResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | The time in days to retain data. Data type: number.
putAppInstanceRetentionSettingsResponse_appInstanceRetentionSettings :: Lens.Lens' PutAppInstanceRetentionSettingsResponse (Prelude.Maybe AppInstanceRetentionSettings)
putAppInstanceRetentionSettingsResponse_appInstanceRetentionSettings :: (Maybe AppInstanceRetentionSettings
 -> f (Maybe AppInstanceRetentionSettings))
-> PutAppInstanceRetentionSettingsResponse
-> f PutAppInstanceRetentionSettingsResponse
putAppInstanceRetentionSettingsResponse_appInstanceRetentionSettings = (PutAppInstanceRetentionSettingsResponse
 -> Maybe AppInstanceRetentionSettings)
-> (PutAppInstanceRetentionSettingsResponse
    -> Maybe AppInstanceRetentionSettings
    -> PutAppInstanceRetentionSettingsResponse)
-> Lens
     PutAppInstanceRetentionSettingsResponse
     PutAppInstanceRetentionSettingsResponse
     (Maybe AppInstanceRetentionSettings)
     (Maybe AppInstanceRetentionSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutAppInstanceRetentionSettingsResponse' {Maybe AppInstanceRetentionSettings
appInstanceRetentionSettings :: Maybe AppInstanceRetentionSettings
$sel:appInstanceRetentionSettings:PutAppInstanceRetentionSettingsResponse' :: PutAppInstanceRetentionSettingsResponse
-> Maybe AppInstanceRetentionSettings
appInstanceRetentionSettings} -> Maybe AppInstanceRetentionSettings
appInstanceRetentionSettings) (\s :: PutAppInstanceRetentionSettingsResponse
s@PutAppInstanceRetentionSettingsResponse' {} Maybe AppInstanceRetentionSettings
a -> PutAppInstanceRetentionSettingsResponse
s {$sel:appInstanceRetentionSettings:PutAppInstanceRetentionSettingsResponse' :: Maybe AppInstanceRetentionSettings
appInstanceRetentionSettings = Maybe AppInstanceRetentionSettings
a} :: PutAppInstanceRetentionSettingsResponse)

-- | The time at which the API deletes data.
putAppInstanceRetentionSettingsResponse_initiateDeletionTimestamp :: Lens.Lens' PutAppInstanceRetentionSettingsResponse (Prelude.Maybe Prelude.UTCTime)
putAppInstanceRetentionSettingsResponse_initiateDeletionTimestamp :: (Maybe UTCTime -> f (Maybe UTCTime))
-> PutAppInstanceRetentionSettingsResponse
-> f PutAppInstanceRetentionSettingsResponse
putAppInstanceRetentionSettingsResponse_initiateDeletionTimestamp = (PutAppInstanceRetentionSettingsResponse -> Maybe POSIX)
-> (PutAppInstanceRetentionSettingsResponse
    -> Maybe POSIX -> PutAppInstanceRetentionSettingsResponse)
-> Lens
     PutAppInstanceRetentionSettingsResponse
     PutAppInstanceRetentionSettingsResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutAppInstanceRetentionSettingsResponse' {Maybe POSIX
initiateDeletionTimestamp :: Maybe POSIX
$sel:initiateDeletionTimestamp:PutAppInstanceRetentionSettingsResponse' :: PutAppInstanceRetentionSettingsResponse -> Maybe POSIX
initiateDeletionTimestamp} -> Maybe POSIX
initiateDeletionTimestamp) (\s :: PutAppInstanceRetentionSettingsResponse
s@PutAppInstanceRetentionSettingsResponse' {} Maybe POSIX
a -> PutAppInstanceRetentionSettingsResponse
s {$sel:initiateDeletionTimestamp:PutAppInstanceRetentionSettingsResponse' :: Maybe POSIX
initiateDeletionTimestamp = Maybe POSIX
a} :: PutAppInstanceRetentionSettingsResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> PutAppInstanceRetentionSettingsResponse
 -> f PutAppInstanceRetentionSettingsResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> PutAppInstanceRetentionSettingsResponse
-> f PutAppInstanceRetentionSettingsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

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

instance
  Prelude.NFData
    PutAppInstanceRetentionSettingsResponse