{-# 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.ListUserAccessLoggingSettings
(
ListUserAccessLoggingSettings (..),
newListUserAccessLoggingSettings,
listUserAccessLoggingSettings_maxResults,
listUserAccessLoggingSettings_nextToken,
ListUserAccessLoggingSettingsResponse (..),
newListUserAccessLoggingSettingsResponse,
listUserAccessLoggingSettingsResponse_nextToken,
listUserAccessLoggingSettingsResponse_userAccessLoggingSettings,
listUserAccessLoggingSettingsResponse_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 ListUserAccessLoggingSettings = ListUserAccessLoggingSettings'
{
ListUserAccessLoggingSettings -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
ListUserAccessLoggingSettings -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text
}
deriving (ListUserAccessLoggingSettings
-> ListUserAccessLoggingSettings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListUserAccessLoggingSettings
-> ListUserAccessLoggingSettings -> Bool
$c/= :: ListUserAccessLoggingSettings
-> ListUserAccessLoggingSettings -> Bool
== :: ListUserAccessLoggingSettings
-> ListUserAccessLoggingSettings -> Bool
$c== :: ListUserAccessLoggingSettings
-> ListUserAccessLoggingSettings -> Bool
Prelude.Eq, ReadPrec [ListUserAccessLoggingSettings]
ReadPrec ListUserAccessLoggingSettings
Int -> ReadS ListUserAccessLoggingSettings
ReadS [ListUserAccessLoggingSettings]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListUserAccessLoggingSettings]
$creadListPrec :: ReadPrec [ListUserAccessLoggingSettings]
readPrec :: ReadPrec ListUserAccessLoggingSettings
$creadPrec :: ReadPrec ListUserAccessLoggingSettings
readList :: ReadS [ListUserAccessLoggingSettings]
$creadList :: ReadS [ListUserAccessLoggingSettings]
readsPrec :: Int -> ReadS ListUserAccessLoggingSettings
$creadsPrec :: Int -> ReadS ListUserAccessLoggingSettings
Prelude.Read, Int -> ListUserAccessLoggingSettings -> ShowS
[ListUserAccessLoggingSettings] -> ShowS
ListUserAccessLoggingSettings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListUserAccessLoggingSettings] -> ShowS
$cshowList :: [ListUserAccessLoggingSettings] -> ShowS
show :: ListUserAccessLoggingSettings -> String
$cshow :: ListUserAccessLoggingSettings -> String
showsPrec :: Int -> ListUserAccessLoggingSettings -> ShowS
$cshowsPrec :: Int -> ListUserAccessLoggingSettings -> ShowS
Prelude.Show, forall x.
Rep ListUserAccessLoggingSettings x
-> ListUserAccessLoggingSettings
forall x.
ListUserAccessLoggingSettings
-> Rep ListUserAccessLoggingSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListUserAccessLoggingSettings x
-> ListUserAccessLoggingSettings
$cfrom :: forall x.
ListUserAccessLoggingSettings
-> Rep ListUserAccessLoggingSettings x
Prelude.Generic)
newListUserAccessLoggingSettings ::
ListUserAccessLoggingSettings
newListUserAccessLoggingSettings :: ListUserAccessLoggingSettings
newListUserAccessLoggingSettings =
ListUserAccessLoggingSettings'
{ $sel:maxResults:ListUserAccessLoggingSettings' :: Maybe Natural
maxResults =
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListUserAccessLoggingSettings' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing
}
listUserAccessLoggingSettings_maxResults :: Lens.Lens' ListUserAccessLoggingSettings (Prelude.Maybe Prelude.Natural)
listUserAccessLoggingSettings_maxResults :: Lens' ListUserAccessLoggingSettings (Maybe Natural)
listUserAccessLoggingSettings_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListUserAccessLoggingSettings' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListUserAccessLoggingSettings' :: ListUserAccessLoggingSettings -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListUserAccessLoggingSettings
s@ListUserAccessLoggingSettings' {} Maybe Natural
a -> ListUserAccessLoggingSettings
s {$sel:maxResults:ListUserAccessLoggingSettings' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListUserAccessLoggingSettings)
listUserAccessLoggingSettings_nextToken :: Lens.Lens' ListUserAccessLoggingSettings (Prelude.Maybe Prelude.Text)
listUserAccessLoggingSettings_nextToken :: Lens' ListUserAccessLoggingSettings (Maybe Text)
listUserAccessLoggingSettings_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListUserAccessLoggingSettings' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListUserAccessLoggingSettings' :: ListUserAccessLoggingSettings -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListUserAccessLoggingSettings
s@ListUserAccessLoggingSettings' {} Maybe Text
a -> ListUserAccessLoggingSettings
s {$sel:nextToken:ListUserAccessLoggingSettings' :: Maybe Text
nextToken = Maybe Text
a} :: ListUserAccessLoggingSettings)
instance
Core.AWSRequest
ListUserAccessLoggingSettings
where
type
AWSResponse ListUserAccessLoggingSettings =
ListUserAccessLoggingSettingsResponse
request :: (Service -> Service)
-> ListUserAccessLoggingSettings
-> Request ListUserAccessLoggingSettings
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 ListUserAccessLoggingSettings
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListUserAccessLoggingSettings)))
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 Text
-> Maybe [UserAccessLoggingSettingsSummary]
-> Int
-> ListUserAccessLoggingSettingsResponse
ListUserAccessLoggingSettingsResponse'
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
"nextToken")
forall (f :: * -> *) a b. Applicative f => 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. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
)
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
ListUserAccessLoggingSettings
where
hashWithSalt :: Int -> ListUserAccessLoggingSettings -> Int
hashWithSalt Int
_salt ListUserAccessLoggingSettings' {Maybe Natural
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:nextToken:ListUserAccessLoggingSettings' :: ListUserAccessLoggingSettings -> Maybe Text
$sel:maxResults:ListUserAccessLoggingSettings' :: ListUserAccessLoggingSettings -> Maybe Natural
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
instance Prelude.NFData ListUserAccessLoggingSettings where
rnf :: ListUserAccessLoggingSettings -> ()
rnf ListUserAccessLoggingSettings' {Maybe Natural
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:nextToken:ListUserAccessLoggingSettings' :: ListUserAccessLoggingSettings -> Maybe Text
$sel:maxResults:ListUserAccessLoggingSettings' :: ListUserAccessLoggingSettings -> Maybe Natural
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxResults
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
instance Data.ToHeaders ListUserAccessLoggingSettings where
toHeaders :: ListUserAccessLoggingSettings -> 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 ListUserAccessLoggingSettings where
toPath :: ListUserAccessLoggingSettings -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/userAccessLoggingSettings"
instance Data.ToQuery ListUserAccessLoggingSettings where
toQuery :: ListUserAccessLoggingSettings -> QueryString
toQuery ListUserAccessLoggingSettings' {Maybe Natural
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:nextToken:ListUserAccessLoggingSettings' :: ListUserAccessLoggingSettings -> Maybe Text
$sel:maxResults:ListUserAccessLoggingSettings' :: ListUserAccessLoggingSettings -> Maybe Natural
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"maxResults" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Natural
maxResults,
ByteString
"nextToken" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
nextToken
]
data ListUserAccessLoggingSettingsResponse = ListUserAccessLoggingSettingsResponse'
{
ListUserAccessLoggingSettingsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListUserAccessLoggingSettingsResponse
-> Maybe [UserAccessLoggingSettingsSummary]
userAccessLoggingSettings :: Prelude.Maybe [UserAccessLoggingSettingsSummary],
ListUserAccessLoggingSettingsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ListUserAccessLoggingSettingsResponse
-> ListUserAccessLoggingSettingsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListUserAccessLoggingSettingsResponse
-> ListUserAccessLoggingSettingsResponse -> Bool
$c/= :: ListUserAccessLoggingSettingsResponse
-> ListUserAccessLoggingSettingsResponse -> Bool
== :: ListUserAccessLoggingSettingsResponse
-> ListUserAccessLoggingSettingsResponse -> Bool
$c== :: ListUserAccessLoggingSettingsResponse
-> ListUserAccessLoggingSettingsResponse -> Bool
Prelude.Eq, ReadPrec [ListUserAccessLoggingSettingsResponse]
ReadPrec ListUserAccessLoggingSettingsResponse
Int -> ReadS ListUserAccessLoggingSettingsResponse
ReadS [ListUserAccessLoggingSettingsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListUserAccessLoggingSettingsResponse]
$creadListPrec :: ReadPrec [ListUserAccessLoggingSettingsResponse]
readPrec :: ReadPrec ListUserAccessLoggingSettingsResponse
$creadPrec :: ReadPrec ListUserAccessLoggingSettingsResponse
readList :: ReadS [ListUserAccessLoggingSettingsResponse]
$creadList :: ReadS [ListUserAccessLoggingSettingsResponse]
readsPrec :: Int -> ReadS ListUserAccessLoggingSettingsResponse
$creadsPrec :: Int -> ReadS ListUserAccessLoggingSettingsResponse
Prelude.Read, Int -> ListUserAccessLoggingSettingsResponse -> ShowS
[ListUserAccessLoggingSettingsResponse] -> ShowS
ListUserAccessLoggingSettingsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListUserAccessLoggingSettingsResponse] -> ShowS
$cshowList :: [ListUserAccessLoggingSettingsResponse] -> ShowS
show :: ListUserAccessLoggingSettingsResponse -> String
$cshow :: ListUserAccessLoggingSettingsResponse -> String
showsPrec :: Int -> ListUserAccessLoggingSettingsResponse -> ShowS
$cshowsPrec :: Int -> ListUserAccessLoggingSettingsResponse -> ShowS
Prelude.Show, forall x.
Rep ListUserAccessLoggingSettingsResponse x
-> ListUserAccessLoggingSettingsResponse
forall x.
ListUserAccessLoggingSettingsResponse
-> Rep ListUserAccessLoggingSettingsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListUserAccessLoggingSettingsResponse x
-> ListUserAccessLoggingSettingsResponse
$cfrom :: forall x.
ListUserAccessLoggingSettingsResponse
-> Rep ListUserAccessLoggingSettingsResponse x
Prelude.Generic)
newListUserAccessLoggingSettingsResponse ::
Prelude.Int ->
ListUserAccessLoggingSettingsResponse
newListUserAccessLoggingSettingsResponse :: Int -> ListUserAccessLoggingSettingsResponse
newListUserAccessLoggingSettingsResponse Int
pHttpStatus_ =
ListUserAccessLoggingSettingsResponse'
{ $sel:nextToken:ListUserAccessLoggingSettingsResponse' :: Maybe Text
nextToken =
forall a. Maybe a
Prelude.Nothing,
$sel:userAccessLoggingSettings:ListUserAccessLoggingSettingsResponse' :: Maybe [UserAccessLoggingSettingsSummary]
userAccessLoggingSettings =
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListUserAccessLoggingSettingsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
listUserAccessLoggingSettingsResponse_nextToken :: Lens.Lens' ListUserAccessLoggingSettingsResponse (Prelude.Maybe Prelude.Text)
listUserAccessLoggingSettingsResponse_nextToken :: Lens' ListUserAccessLoggingSettingsResponse (Maybe Text)
listUserAccessLoggingSettingsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListUserAccessLoggingSettingsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListUserAccessLoggingSettingsResponse' :: ListUserAccessLoggingSettingsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListUserAccessLoggingSettingsResponse
s@ListUserAccessLoggingSettingsResponse' {} Maybe Text
a -> ListUserAccessLoggingSettingsResponse
s {$sel:nextToken:ListUserAccessLoggingSettingsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListUserAccessLoggingSettingsResponse)
listUserAccessLoggingSettingsResponse_userAccessLoggingSettings :: Lens.Lens' ListUserAccessLoggingSettingsResponse (Prelude.Maybe [UserAccessLoggingSettingsSummary])
listUserAccessLoggingSettingsResponse_userAccessLoggingSettings :: Lens'
ListUserAccessLoggingSettingsResponse
(Maybe [UserAccessLoggingSettingsSummary])
listUserAccessLoggingSettingsResponse_userAccessLoggingSettings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListUserAccessLoggingSettingsResponse' {Maybe [UserAccessLoggingSettingsSummary]
userAccessLoggingSettings :: Maybe [UserAccessLoggingSettingsSummary]
$sel:userAccessLoggingSettings:ListUserAccessLoggingSettingsResponse' :: ListUserAccessLoggingSettingsResponse
-> Maybe [UserAccessLoggingSettingsSummary]
userAccessLoggingSettings} -> Maybe [UserAccessLoggingSettingsSummary]
userAccessLoggingSettings) (\s :: ListUserAccessLoggingSettingsResponse
s@ListUserAccessLoggingSettingsResponse' {} Maybe [UserAccessLoggingSettingsSummary]
a -> ListUserAccessLoggingSettingsResponse
s {$sel:userAccessLoggingSettings:ListUserAccessLoggingSettingsResponse' :: Maybe [UserAccessLoggingSettingsSummary]
userAccessLoggingSettings = Maybe [UserAccessLoggingSettingsSummary]
a} :: ListUserAccessLoggingSettingsResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
listUserAccessLoggingSettingsResponse_httpStatus :: Lens.Lens' ListUserAccessLoggingSettingsResponse Prelude.Int
listUserAccessLoggingSettingsResponse_httpStatus :: Lens' ListUserAccessLoggingSettingsResponse Int
listUserAccessLoggingSettingsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListUserAccessLoggingSettingsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListUserAccessLoggingSettingsResponse' :: ListUserAccessLoggingSettingsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListUserAccessLoggingSettingsResponse
s@ListUserAccessLoggingSettingsResponse' {} Int
a -> ListUserAccessLoggingSettingsResponse
s {$sel:httpStatus:ListUserAccessLoggingSettingsResponse' :: Int
httpStatus = Int
a} :: ListUserAccessLoggingSettingsResponse)
instance
Prelude.NFData
ListUserAccessLoggingSettingsResponse
where
rnf :: ListUserAccessLoggingSettingsResponse -> ()
rnf ListUserAccessLoggingSettingsResponse' {Int
Maybe [UserAccessLoggingSettingsSummary]
Maybe Text
httpStatus :: Int
userAccessLoggingSettings :: Maybe [UserAccessLoggingSettingsSummary]
nextToken :: Maybe Text
$sel:httpStatus:ListUserAccessLoggingSettingsResponse' :: ListUserAccessLoggingSettingsResponse -> Int
$sel:userAccessLoggingSettings:ListUserAccessLoggingSettingsResponse' :: ListUserAccessLoggingSettingsResponse
-> Maybe [UserAccessLoggingSettingsSummary]
$sel:nextToken:ListUserAccessLoggingSettingsResponse' :: ListUserAccessLoggingSettingsResponse -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [UserAccessLoggingSettingsSummary]
userAccessLoggingSettings
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus