{-# 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 #-}
module Amazonka.ChimeSDKIdentity.GetAppInstanceRetentionSettings
(
GetAppInstanceRetentionSettings (..),
newGetAppInstanceRetentionSettings,
getAppInstanceRetentionSettings_appInstanceArn,
GetAppInstanceRetentionSettingsResponse (..),
newGetAppInstanceRetentionSettingsResponse,
getAppInstanceRetentionSettingsResponse_appInstanceRetentionSettings,
getAppInstanceRetentionSettingsResponse_initiateDeletionTimestamp,
getAppInstanceRetentionSettingsResponse_httpStatus,
)
where
import Amazonka.ChimeSDKIdentity.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
data GetAppInstanceRetentionSettings = GetAppInstanceRetentionSettings'
{
GetAppInstanceRetentionSettings -> Text
appInstanceArn :: Prelude.Text
}
deriving (GetAppInstanceRetentionSettings
-> GetAppInstanceRetentionSettings -> Bool
(GetAppInstanceRetentionSettings
-> GetAppInstanceRetentionSettings -> Bool)
-> (GetAppInstanceRetentionSettings
-> GetAppInstanceRetentionSettings -> Bool)
-> Eq GetAppInstanceRetentionSettings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetAppInstanceRetentionSettings
-> GetAppInstanceRetentionSettings -> Bool
$c/= :: GetAppInstanceRetentionSettings
-> GetAppInstanceRetentionSettings -> Bool
== :: GetAppInstanceRetentionSettings
-> GetAppInstanceRetentionSettings -> Bool
$c== :: GetAppInstanceRetentionSettings
-> GetAppInstanceRetentionSettings -> Bool
Prelude.Eq, ReadPrec [GetAppInstanceRetentionSettings]
ReadPrec GetAppInstanceRetentionSettings
Int -> ReadS GetAppInstanceRetentionSettings
ReadS [GetAppInstanceRetentionSettings]
(Int -> ReadS GetAppInstanceRetentionSettings)
-> ReadS [GetAppInstanceRetentionSettings]
-> ReadPrec GetAppInstanceRetentionSettings
-> ReadPrec [GetAppInstanceRetentionSettings]
-> Read GetAppInstanceRetentionSettings
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetAppInstanceRetentionSettings]
$creadListPrec :: ReadPrec [GetAppInstanceRetentionSettings]
readPrec :: ReadPrec GetAppInstanceRetentionSettings
$creadPrec :: ReadPrec GetAppInstanceRetentionSettings
readList :: ReadS [GetAppInstanceRetentionSettings]
$creadList :: ReadS [GetAppInstanceRetentionSettings]
readsPrec :: Int -> ReadS GetAppInstanceRetentionSettings
$creadsPrec :: Int -> ReadS GetAppInstanceRetentionSettings
Prelude.Read, Int -> GetAppInstanceRetentionSettings -> ShowS
[GetAppInstanceRetentionSettings] -> ShowS
GetAppInstanceRetentionSettings -> String
(Int -> GetAppInstanceRetentionSettings -> ShowS)
-> (GetAppInstanceRetentionSettings -> String)
-> ([GetAppInstanceRetentionSettings] -> ShowS)
-> Show GetAppInstanceRetentionSettings
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetAppInstanceRetentionSettings] -> ShowS
$cshowList :: [GetAppInstanceRetentionSettings] -> ShowS
show :: GetAppInstanceRetentionSettings -> String
$cshow :: GetAppInstanceRetentionSettings -> String
showsPrec :: Int -> GetAppInstanceRetentionSettings -> ShowS
$cshowsPrec :: Int -> GetAppInstanceRetentionSettings -> ShowS
Prelude.Show, (forall x.
GetAppInstanceRetentionSettings
-> Rep GetAppInstanceRetentionSettings x)
-> (forall x.
Rep GetAppInstanceRetentionSettings x
-> GetAppInstanceRetentionSettings)
-> Generic GetAppInstanceRetentionSettings
forall x.
Rep GetAppInstanceRetentionSettings x
-> GetAppInstanceRetentionSettings
forall x.
GetAppInstanceRetentionSettings
-> Rep GetAppInstanceRetentionSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetAppInstanceRetentionSettings x
-> GetAppInstanceRetentionSettings
$cfrom :: forall x.
GetAppInstanceRetentionSettings
-> Rep GetAppInstanceRetentionSettings x
Prelude.Generic)
newGetAppInstanceRetentionSettings ::
Prelude.Text ->
GetAppInstanceRetentionSettings
newGetAppInstanceRetentionSettings :: Text -> GetAppInstanceRetentionSettings
newGetAppInstanceRetentionSettings Text
pAppInstanceArn_ =
GetAppInstanceRetentionSettings' :: Text -> GetAppInstanceRetentionSettings
GetAppInstanceRetentionSettings'
{ $sel:appInstanceArn:GetAppInstanceRetentionSettings' :: Text
appInstanceArn =
Text
pAppInstanceArn_
}
getAppInstanceRetentionSettings_appInstanceArn :: Lens.Lens' GetAppInstanceRetentionSettings Prelude.Text
getAppInstanceRetentionSettings_appInstanceArn :: (Text -> f Text)
-> GetAppInstanceRetentionSettings
-> f GetAppInstanceRetentionSettings
getAppInstanceRetentionSettings_appInstanceArn = (GetAppInstanceRetentionSettings -> Text)
-> (GetAppInstanceRetentionSettings
-> Text -> GetAppInstanceRetentionSettings)
-> Lens
GetAppInstanceRetentionSettings
GetAppInstanceRetentionSettings
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAppInstanceRetentionSettings' {Text
appInstanceArn :: Text
$sel:appInstanceArn:GetAppInstanceRetentionSettings' :: GetAppInstanceRetentionSettings -> Text
appInstanceArn} -> Text
appInstanceArn) (\s :: GetAppInstanceRetentionSettings
s@GetAppInstanceRetentionSettings' {} Text
a -> GetAppInstanceRetentionSettings
s {$sel:appInstanceArn:GetAppInstanceRetentionSettings' :: Text
appInstanceArn = Text
a} :: GetAppInstanceRetentionSettings)
instance
Core.AWSRequest
GetAppInstanceRetentionSettings
where
type
AWSResponse GetAppInstanceRetentionSettings =
GetAppInstanceRetentionSettingsResponse
request :: GetAppInstanceRetentionSettings
-> Request GetAppInstanceRetentionSettings
request = Service
-> GetAppInstanceRetentionSettings
-> Request GetAppInstanceRetentionSettings
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
response :: Logger
-> Service
-> Proxy GetAppInstanceRetentionSettings
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse GetAppInstanceRetentionSettings)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse GetAppInstanceRetentionSettings))
-> Logger
-> Service
-> Proxy GetAppInstanceRetentionSettings
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse GetAppInstanceRetentionSettings)))
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 -> GetAppInstanceRetentionSettingsResponse
GetAppInstanceRetentionSettingsResponse'
(Maybe AppInstanceRetentionSettings
-> Maybe POSIX -> Int -> GetAppInstanceRetentionSettingsResponse)
-> Either String (Maybe AppInstanceRetentionSettings)
-> Either
String
(Maybe POSIX -> Int -> GetAppInstanceRetentionSettingsResponse)
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 -> GetAppInstanceRetentionSettingsResponse)
-> Either String (Maybe POSIX)
-> Either String (Int -> GetAppInstanceRetentionSettingsResponse)
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 -> GetAppInstanceRetentionSettingsResponse)
-> Either String Int
-> Either String GetAppInstanceRetentionSettingsResponse
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
GetAppInstanceRetentionSettings
instance
Prelude.NFData
GetAppInstanceRetentionSettings
instance
Core.ToHeaders
GetAppInstanceRetentionSettings
where
toHeaders :: GetAppInstanceRetentionSettings -> ResponseHeaders
toHeaders = ResponseHeaders
-> GetAppInstanceRetentionSettings -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath GetAppInstanceRetentionSettings where
toPath :: GetAppInstanceRetentionSettings -> ByteString
toPath GetAppInstanceRetentionSettings' {Text
appInstanceArn :: Text
$sel:appInstanceArn:GetAppInstanceRetentionSettings' :: GetAppInstanceRetentionSettings -> 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 GetAppInstanceRetentionSettings where
toQuery :: GetAppInstanceRetentionSettings -> QueryString
toQuery = QueryString -> GetAppInstanceRetentionSettings -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data GetAppInstanceRetentionSettingsResponse = GetAppInstanceRetentionSettingsResponse'
{
GetAppInstanceRetentionSettingsResponse
-> Maybe AppInstanceRetentionSettings
appInstanceRetentionSettings :: Prelude.Maybe AppInstanceRetentionSettings,
GetAppInstanceRetentionSettingsResponse -> Maybe POSIX
initiateDeletionTimestamp :: Prelude.Maybe Core.POSIX,
GetAppInstanceRetentionSettingsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (GetAppInstanceRetentionSettingsResponse
-> GetAppInstanceRetentionSettingsResponse -> Bool
(GetAppInstanceRetentionSettingsResponse
-> GetAppInstanceRetentionSettingsResponse -> Bool)
-> (GetAppInstanceRetentionSettingsResponse
-> GetAppInstanceRetentionSettingsResponse -> Bool)
-> Eq GetAppInstanceRetentionSettingsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetAppInstanceRetentionSettingsResponse
-> GetAppInstanceRetentionSettingsResponse -> Bool
$c/= :: GetAppInstanceRetentionSettingsResponse
-> GetAppInstanceRetentionSettingsResponse -> Bool
== :: GetAppInstanceRetentionSettingsResponse
-> GetAppInstanceRetentionSettingsResponse -> Bool
$c== :: GetAppInstanceRetentionSettingsResponse
-> GetAppInstanceRetentionSettingsResponse -> Bool
Prelude.Eq, ReadPrec [GetAppInstanceRetentionSettingsResponse]
ReadPrec GetAppInstanceRetentionSettingsResponse
Int -> ReadS GetAppInstanceRetentionSettingsResponse
ReadS [GetAppInstanceRetentionSettingsResponse]
(Int -> ReadS GetAppInstanceRetentionSettingsResponse)
-> ReadS [GetAppInstanceRetentionSettingsResponse]
-> ReadPrec GetAppInstanceRetentionSettingsResponse
-> ReadPrec [GetAppInstanceRetentionSettingsResponse]
-> Read GetAppInstanceRetentionSettingsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetAppInstanceRetentionSettingsResponse]
$creadListPrec :: ReadPrec [GetAppInstanceRetentionSettingsResponse]
readPrec :: ReadPrec GetAppInstanceRetentionSettingsResponse
$creadPrec :: ReadPrec GetAppInstanceRetentionSettingsResponse
readList :: ReadS [GetAppInstanceRetentionSettingsResponse]
$creadList :: ReadS [GetAppInstanceRetentionSettingsResponse]
readsPrec :: Int -> ReadS GetAppInstanceRetentionSettingsResponse
$creadsPrec :: Int -> ReadS GetAppInstanceRetentionSettingsResponse
Prelude.Read, Int -> GetAppInstanceRetentionSettingsResponse -> ShowS
[GetAppInstanceRetentionSettingsResponse] -> ShowS
GetAppInstanceRetentionSettingsResponse -> String
(Int -> GetAppInstanceRetentionSettingsResponse -> ShowS)
-> (GetAppInstanceRetentionSettingsResponse -> String)
-> ([GetAppInstanceRetentionSettingsResponse] -> ShowS)
-> Show GetAppInstanceRetentionSettingsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetAppInstanceRetentionSettingsResponse] -> ShowS
$cshowList :: [GetAppInstanceRetentionSettingsResponse] -> ShowS
show :: GetAppInstanceRetentionSettingsResponse -> String
$cshow :: GetAppInstanceRetentionSettingsResponse -> String
showsPrec :: Int -> GetAppInstanceRetentionSettingsResponse -> ShowS
$cshowsPrec :: Int -> GetAppInstanceRetentionSettingsResponse -> ShowS
Prelude.Show, (forall x.
GetAppInstanceRetentionSettingsResponse
-> Rep GetAppInstanceRetentionSettingsResponse x)
-> (forall x.
Rep GetAppInstanceRetentionSettingsResponse x
-> GetAppInstanceRetentionSettingsResponse)
-> Generic GetAppInstanceRetentionSettingsResponse
forall x.
Rep GetAppInstanceRetentionSettingsResponse x
-> GetAppInstanceRetentionSettingsResponse
forall x.
GetAppInstanceRetentionSettingsResponse
-> Rep GetAppInstanceRetentionSettingsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetAppInstanceRetentionSettingsResponse x
-> GetAppInstanceRetentionSettingsResponse
$cfrom :: forall x.
GetAppInstanceRetentionSettingsResponse
-> Rep GetAppInstanceRetentionSettingsResponse x
Prelude.Generic)
newGetAppInstanceRetentionSettingsResponse ::
Prelude.Int ->
GetAppInstanceRetentionSettingsResponse
newGetAppInstanceRetentionSettingsResponse :: Int -> GetAppInstanceRetentionSettingsResponse
newGetAppInstanceRetentionSettingsResponse
Int
pHttpStatus_ =
GetAppInstanceRetentionSettingsResponse' :: Maybe AppInstanceRetentionSettings
-> Maybe POSIX -> Int -> GetAppInstanceRetentionSettingsResponse
GetAppInstanceRetentionSettingsResponse'
{ $sel:appInstanceRetentionSettings:GetAppInstanceRetentionSettingsResponse' :: Maybe AppInstanceRetentionSettings
appInstanceRetentionSettings =
Maybe AppInstanceRetentionSettings
forall a. Maybe a
Prelude.Nothing,
$sel:initiateDeletionTimestamp:GetAppInstanceRetentionSettingsResponse' :: Maybe POSIX
initiateDeletionTimestamp =
Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetAppInstanceRetentionSettingsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
getAppInstanceRetentionSettingsResponse_appInstanceRetentionSettings :: Lens.Lens' GetAppInstanceRetentionSettingsResponse (Prelude.Maybe AppInstanceRetentionSettings)
getAppInstanceRetentionSettingsResponse_appInstanceRetentionSettings :: (Maybe AppInstanceRetentionSettings
-> f (Maybe AppInstanceRetentionSettings))
-> GetAppInstanceRetentionSettingsResponse
-> f GetAppInstanceRetentionSettingsResponse
getAppInstanceRetentionSettingsResponse_appInstanceRetentionSettings = (GetAppInstanceRetentionSettingsResponse
-> Maybe AppInstanceRetentionSettings)
-> (GetAppInstanceRetentionSettingsResponse
-> Maybe AppInstanceRetentionSettings
-> GetAppInstanceRetentionSettingsResponse)
-> Lens
GetAppInstanceRetentionSettingsResponse
GetAppInstanceRetentionSettingsResponse
(Maybe AppInstanceRetentionSettings)
(Maybe AppInstanceRetentionSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAppInstanceRetentionSettingsResponse' {Maybe AppInstanceRetentionSettings
appInstanceRetentionSettings :: Maybe AppInstanceRetentionSettings
$sel:appInstanceRetentionSettings:GetAppInstanceRetentionSettingsResponse' :: GetAppInstanceRetentionSettingsResponse
-> Maybe AppInstanceRetentionSettings
appInstanceRetentionSettings} -> Maybe AppInstanceRetentionSettings
appInstanceRetentionSettings) (\s :: GetAppInstanceRetentionSettingsResponse
s@GetAppInstanceRetentionSettingsResponse' {} Maybe AppInstanceRetentionSettings
a -> GetAppInstanceRetentionSettingsResponse
s {$sel:appInstanceRetentionSettings:GetAppInstanceRetentionSettingsResponse' :: Maybe AppInstanceRetentionSettings
appInstanceRetentionSettings = Maybe AppInstanceRetentionSettings
a} :: GetAppInstanceRetentionSettingsResponse)
getAppInstanceRetentionSettingsResponse_initiateDeletionTimestamp :: Lens.Lens' GetAppInstanceRetentionSettingsResponse (Prelude.Maybe Prelude.UTCTime)
getAppInstanceRetentionSettingsResponse_initiateDeletionTimestamp :: (Maybe UTCTime -> f (Maybe UTCTime))
-> GetAppInstanceRetentionSettingsResponse
-> f GetAppInstanceRetentionSettingsResponse
getAppInstanceRetentionSettingsResponse_initiateDeletionTimestamp = (GetAppInstanceRetentionSettingsResponse -> Maybe POSIX)
-> (GetAppInstanceRetentionSettingsResponse
-> Maybe POSIX -> GetAppInstanceRetentionSettingsResponse)
-> Lens
GetAppInstanceRetentionSettingsResponse
GetAppInstanceRetentionSettingsResponse
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAppInstanceRetentionSettingsResponse' {Maybe POSIX
initiateDeletionTimestamp :: Maybe POSIX
$sel:initiateDeletionTimestamp:GetAppInstanceRetentionSettingsResponse' :: GetAppInstanceRetentionSettingsResponse -> Maybe POSIX
initiateDeletionTimestamp} -> Maybe POSIX
initiateDeletionTimestamp) (\s :: GetAppInstanceRetentionSettingsResponse
s@GetAppInstanceRetentionSettingsResponse' {} Maybe POSIX
a -> GetAppInstanceRetentionSettingsResponse
s {$sel:initiateDeletionTimestamp:GetAppInstanceRetentionSettingsResponse' :: Maybe POSIX
initiateDeletionTimestamp = Maybe POSIX
a} :: GetAppInstanceRetentionSettingsResponse) ((Maybe POSIX -> f (Maybe POSIX))
-> GetAppInstanceRetentionSettingsResponse
-> f GetAppInstanceRetentionSettingsResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> GetAppInstanceRetentionSettingsResponse
-> f GetAppInstanceRetentionSettingsResponse
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
getAppInstanceRetentionSettingsResponse_httpStatus :: Lens.Lens' GetAppInstanceRetentionSettingsResponse Prelude.Int
getAppInstanceRetentionSettingsResponse_httpStatus :: (Int -> f Int)
-> GetAppInstanceRetentionSettingsResponse
-> f GetAppInstanceRetentionSettingsResponse
getAppInstanceRetentionSettingsResponse_httpStatus = (GetAppInstanceRetentionSettingsResponse -> Int)
-> (GetAppInstanceRetentionSettingsResponse
-> Int -> GetAppInstanceRetentionSettingsResponse)
-> Lens
GetAppInstanceRetentionSettingsResponse
GetAppInstanceRetentionSettingsResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAppInstanceRetentionSettingsResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetAppInstanceRetentionSettingsResponse' :: GetAppInstanceRetentionSettingsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetAppInstanceRetentionSettingsResponse
s@GetAppInstanceRetentionSettingsResponse' {} Int
a -> GetAppInstanceRetentionSettingsResponse
s {$sel:httpStatus:GetAppInstanceRetentionSettingsResponse' :: Int
httpStatus = Int
a} :: GetAppInstanceRetentionSettingsResponse)
instance
Prelude.NFData
GetAppInstanceRetentionSettingsResponse