{-# 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.WorkSpacesWeb.GetUserAccessLoggingSettings
(
GetUserAccessLoggingSettings (..),
newGetUserAccessLoggingSettings,
getUserAccessLoggingSettings_userAccessLoggingSettingsArn,
GetUserAccessLoggingSettingsResponse (..),
newGetUserAccessLoggingSettingsResponse,
getUserAccessLoggingSettingsResponse_userAccessLoggingSettings,
getUserAccessLoggingSettingsResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.WorkSpacesWeb.Types
data GetUserAccessLoggingSettings = GetUserAccessLoggingSettings'
{
GetUserAccessLoggingSettings -> Text
userAccessLoggingSettingsArn :: Prelude.Text
}
deriving (GetUserAccessLoggingSettings
-> GetUserAccessLoggingSettings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetUserAccessLoggingSettings
-> GetUserAccessLoggingSettings -> Bool
$c/= :: GetUserAccessLoggingSettings
-> GetUserAccessLoggingSettings -> Bool
== :: GetUserAccessLoggingSettings
-> GetUserAccessLoggingSettings -> Bool
$c== :: GetUserAccessLoggingSettings
-> GetUserAccessLoggingSettings -> Bool
Prelude.Eq, ReadPrec [GetUserAccessLoggingSettings]
ReadPrec GetUserAccessLoggingSettings
Int -> ReadS GetUserAccessLoggingSettings
ReadS [GetUserAccessLoggingSettings]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetUserAccessLoggingSettings]
$creadListPrec :: ReadPrec [GetUserAccessLoggingSettings]
readPrec :: ReadPrec GetUserAccessLoggingSettings
$creadPrec :: ReadPrec GetUserAccessLoggingSettings
readList :: ReadS [GetUserAccessLoggingSettings]
$creadList :: ReadS [GetUserAccessLoggingSettings]
readsPrec :: Int -> ReadS GetUserAccessLoggingSettings
$creadsPrec :: Int -> ReadS GetUserAccessLoggingSettings
Prelude.Read, Int -> GetUserAccessLoggingSettings -> ShowS
[GetUserAccessLoggingSettings] -> ShowS
GetUserAccessLoggingSettings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetUserAccessLoggingSettings] -> ShowS
$cshowList :: [GetUserAccessLoggingSettings] -> ShowS
show :: GetUserAccessLoggingSettings -> String
$cshow :: GetUserAccessLoggingSettings -> String
showsPrec :: Int -> GetUserAccessLoggingSettings -> ShowS
$cshowsPrec :: Int -> GetUserAccessLoggingSettings -> ShowS
Prelude.Show, forall x.
Rep GetUserAccessLoggingSettings x -> GetUserAccessLoggingSettings
forall x.
GetUserAccessLoggingSettings -> Rep GetUserAccessLoggingSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetUserAccessLoggingSettings x -> GetUserAccessLoggingSettings
$cfrom :: forall x.
GetUserAccessLoggingSettings -> Rep GetUserAccessLoggingSettings x
Prelude.Generic)
newGetUserAccessLoggingSettings ::
Prelude.Text ->
GetUserAccessLoggingSettings
newGetUserAccessLoggingSettings :: Text -> GetUserAccessLoggingSettings
newGetUserAccessLoggingSettings
Text
pUserAccessLoggingSettingsArn_ =
GetUserAccessLoggingSettings'
{ $sel:userAccessLoggingSettingsArn:GetUserAccessLoggingSettings' :: Text
userAccessLoggingSettingsArn =
Text
pUserAccessLoggingSettingsArn_
}
getUserAccessLoggingSettings_userAccessLoggingSettingsArn :: Lens.Lens' GetUserAccessLoggingSettings Prelude.Text
getUserAccessLoggingSettings_userAccessLoggingSettingsArn :: Lens' GetUserAccessLoggingSettings Text
getUserAccessLoggingSettings_userAccessLoggingSettingsArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetUserAccessLoggingSettings' {Text
userAccessLoggingSettingsArn :: Text
$sel:userAccessLoggingSettingsArn:GetUserAccessLoggingSettings' :: GetUserAccessLoggingSettings -> Text
userAccessLoggingSettingsArn} -> Text
userAccessLoggingSettingsArn) (\s :: GetUserAccessLoggingSettings
s@GetUserAccessLoggingSettings' {} Text
a -> GetUserAccessLoggingSettings
s {$sel:userAccessLoggingSettingsArn:GetUserAccessLoggingSettings' :: Text
userAccessLoggingSettingsArn = Text
a} :: GetUserAccessLoggingSettings)
instance Core.AWSRequest GetUserAccessLoggingSettings where
type
AWSResponse GetUserAccessLoggingSettings =
GetUserAccessLoggingSettingsResponse
request :: (Service -> Service)
-> GetUserAccessLoggingSettings
-> Request GetUserAccessLoggingSettings
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy GetUserAccessLoggingSettings
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetUserAccessLoggingSettings)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe UserAccessLoggingSettings
-> Int -> GetUserAccessLoggingSettingsResponse
GetUserAccessLoggingSettingsResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"userAccessLoggingSettings")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance
Prelude.Hashable
GetUserAccessLoggingSettings
where
hashWithSalt :: Int -> GetUserAccessLoggingSettings -> Int
hashWithSalt Int
_salt GetUserAccessLoggingSettings' {Text
userAccessLoggingSettingsArn :: Text
$sel:userAccessLoggingSettingsArn:GetUserAccessLoggingSettings' :: GetUserAccessLoggingSettings -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
userAccessLoggingSettingsArn
instance Prelude.NFData GetUserAccessLoggingSettings where
rnf :: GetUserAccessLoggingSettings -> ()
rnf GetUserAccessLoggingSettings' {Text
userAccessLoggingSettingsArn :: Text
$sel:userAccessLoggingSettingsArn:GetUserAccessLoggingSettings' :: GetUserAccessLoggingSettings -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
userAccessLoggingSettingsArn
instance Data.ToHeaders GetUserAccessLoggingSettings where
toHeaders :: GetUserAccessLoggingSettings -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToPath GetUserAccessLoggingSettings where
toPath :: GetUserAccessLoggingSettings -> ByteString
toPath GetUserAccessLoggingSettings' {Text
userAccessLoggingSettingsArn :: Text
$sel:userAccessLoggingSettingsArn:GetUserAccessLoggingSettings' :: GetUserAccessLoggingSettings -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/userAccessLoggingSettings/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
userAccessLoggingSettingsArn
]
instance Data.ToQuery GetUserAccessLoggingSettings where
toQuery :: GetUserAccessLoggingSettings -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data GetUserAccessLoggingSettingsResponse = GetUserAccessLoggingSettingsResponse'
{
GetUserAccessLoggingSettingsResponse
-> Maybe UserAccessLoggingSettings
userAccessLoggingSettings :: Prelude.Maybe UserAccessLoggingSettings,
GetUserAccessLoggingSettingsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (GetUserAccessLoggingSettingsResponse
-> GetUserAccessLoggingSettingsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetUserAccessLoggingSettingsResponse
-> GetUserAccessLoggingSettingsResponse -> Bool
$c/= :: GetUserAccessLoggingSettingsResponse
-> GetUserAccessLoggingSettingsResponse -> Bool
== :: GetUserAccessLoggingSettingsResponse
-> GetUserAccessLoggingSettingsResponse -> Bool
$c== :: GetUserAccessLoggingSettingsResponse
-> GetUserAccessLoggingSettingsResponse -> Bool
Prelude.Eq, ReadPrec [GetUserAccessLoggingSettingsResponse]
ReadPrec GetUserAccessLoggingSettingsResponse
Int -> ReadS GetUserAccessLoggingSettingsResponse
ReadS [GetUserAccessLoggingSettingsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetUserAccessLoggingSettingsResponse]
$creadListPrec :: ReadPrec [GetUserAccessLoggingSettingsResponse]
readPrec :: ReadPrec GetUserAccessLoggingSettingsResponse
$creadPrec :: ReadPrec GetUserAccessLoggingSettingsResponse
readList :: ReadS [GetUserAccessLoggingSettingsResponse]
$creadList :: ReadS [GetUserAccessLoggingSettingsResponse]
readsPrec :: Int -> ReadS GetUserAccessLoggingSettingsResponse
$creadsPrec :: Int -> ReadS GetUserAccessLoggingSettingsResponse
Prelude.Read, Int -> GetUserAccessLoggingSettingsResponse -> ShowS
[GetUserAccessLoggingSettingsResponse] -> ShowS
GetUserAccessLoggingSettingsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetUserAccessLoggingSettingsResponse] -> ShowS
$cshowList :: [GetUserAccessLoggingSettingsResponse] -> ShowS
show :: GetUserAccessLoggingSettingsResponse -> String
$cshow :: GetUserAccessLoggingSettingsResponse -> String
showsPrec :: Int -> GetUserAccessLoggingSettingsResponse -> ShowS
$cshowsPrec :: Int -> GetUserAccessLoggingSettingsResponse -> ShowS
Prelude.Show, forall x.
Rep GetUserAccessLoggingSettingsResponse x
-> GetUserAccessLoggingSettingsResponse
forall x.
GetUserAccessLoggingSettingsResponse
-> Rep GetUserAccessLoggingSettingsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetUserAccessLoggingSettingsResponse x
-> GetUserAccessLoggingSettingsResponse
$cfrom :: forall x.
GetUserAccessLoggingSettingsResponse
-> Rep GetUserAccessLoggingSettingsResponse x
Prelude.Generic)
newGetUserAccessLoggingSettingsResponse ::
Prelude.Int ->
GetUserAccessLoggingSettingsResponse
newGetUserAccessLoggingSettingsResponse :: Int -> GetUserAccessLoggingSettingsResponse
newGetUserAccessLoggingSettingsResponse Int
pHttpStatus_ =
GetUserAccessLoggingSettingsResponse'
{ $sel:userAccessLoggingSettings:GetUserAccessLoggingSettingsResponse' :: Maybe UserAccessLoggingSettings
userAccessLoggingSettings =
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetUserAccessLoggingSettingsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
getUserAccessLoggingSettingsResponse_userAccessLoggingSettings :: Lens.Lens' GetUserAccessLoggingSettingsResponse (Prelude.Maybe UserAccessLoggingSettings)
getUserAccessLoggingSettingsResponse_userAccessLoggingSettings :: Lens'
GetUserAccessLoggingSettingsResponse
(Maybe UserAccessLoggingSettings)
getUserAccessLoggingSettingsResponse_userAccessLoggingSettings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetUserAccessLoggingSettingsResponse' {Maybe UserAccessLoggingSettings
userAccessLoggingSettings :: Maybe UserAccessLoggingSettings
$sel:userAccessLoggingSettings:GetUserAccessLoggingSettingsResponse' :: GetUserAccessLoggingSettingsResponse
-> Maybe UserAccessLoggingSettings
userAccessLoggingSettings} -> Maybe UserAccessLoggingSettings
userAccessLoggingSettings) (\s :: GetUserAccessLoggingSettingsResponse
s@GetUserAccessLoggingSettingsResponse' {} Maybe UserAccessLoggingSettings
a -> GetUserAccessLoggingSettingsResponse
s {$sel:userAccessLoggingSettings:GetUserAccessLoggingSettingsResponse' :: Maybe UserAccessLoggingSettings
userAccessLoggingSettings = Maybe UserAccessLoggingSettings
a} :: GetUserAccessLoggingSettingsResponse)
getUserAccessLoggingSettingsResponse_httpStatus :: Lens.Lens' GetUserAccessLoggingSettingsResponse Prelude.Int
getUserAccessLoggingSettingsResponse_httpStatus :: Lens' GetUserAccessLoggingSettingsResponse Int
getUserAccessLoggingSettingsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetUserAccessLoggingSettingsResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetUserAccessLoggingSettingsResponse' :: GetUserAccessLoggingSettingsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetUserAccessLoggingSettingsResponse
s@GetUserAccessLoggingSettingsResponse' {} Int
a -> GetUserAccessLoggingSettingsResponse
s {$sel:httpStatus:GetUserAccessLoggingSettingsResponse' :: Int
httpStatus = Int
a} :: GetUserAccessLoggingSettingsResponse)
instance
Prelude.NFData
GetUserAccessLoggingSettingsResponse
where
rnf :: GetUserAccessLoggingSettingsResponse -> ()
rnf GetUserAccessLoggingSettingsResponse' {Int
Maybe UserAccessLoggingSettings
httpStatus :: Int
userAccessLoggingSettings :: Maybe UserAccessLoggingSettings
$sel:httpStatus:GetUserAccessLoggingSettingsResponse' :: GetUserAccessLoggingSettingsResponse -> Int
$sel:userAccessLoggingSettings:GetUserAccessLoggingSettingsResponse' :: GetUserAccessLoggingSettingsResponse
-> Maybe UserAccessLoggingSettings
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe UserAccessLoggingSettings
userAccessLoggingSettings
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus