{-# 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.IVSChat.ListLoggingConfigurations
(
ListLoggingConfigurations (..),
newListLoggingConfigurations,
listLoggingConfigurations_maxResults,
listLoggingConfigurations_nextToken,
ListLoggingConfigurationsResponse (..),
newListLoggingConfigurationsResponse,
listLoggingConfigurationsResponse_nextToken,
listLoggingConfigurationsResponse_httpStatus,
listLoggingConfigurationsResponse_loggingConfigurations,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.IVSChat.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data ListLoggingConfigurations = ListLoggingConfigurations'
{
ListLoggingConfigurations -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
ListLoggingConfigurations -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text
}
deriving (ListLoggingConfigurations -> ListLoggingConfigurations -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListLoggingConfigurations -> ListLoggingConfigurations -> Bool
$c/= :: ListLoggingConfigurations -> ListLoggingConfigurations -> Bool
== :: ListLoggingConfigurations -> ListLoggingConfigurations -> Bool
$c== :: ListLoggingConfigurations -> ListLoggingConfigurations -> Bool
Prelude.Eq, ReadPrec [ListLoggingConfigurations]
ReadPrec ListLoggingConfigurations
Int -> ReadS ListLoggingConfigurations
ReadS [ListLoggingConfigurations]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListLoggingConfigurations]
$creadListPrec :: ReadPrec [ListLoggingConfigurations]
readPrec :: ReadPrec ListLoggingConfigurations
$creadPrec :: ReadPrec ListLoggingConfigurations
readList :: ReadS [ListLoggingConfigurations]
$creadList :: ReadS [ListLoggingConfigurations]
readsPrec :: Int -> ReadS ListLoggingConfigurations
$creadsPrec :: Int -> ReadS ListLoggingConfigurations
Prelude.Read, Int -> ListLoggingConfigurations -> ShowS
[ListLoggingConfigurations] -> ShowS
ListLoggingConfigurations -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListLoggingConfigurations] -> ShowS
$cshowList :: [ListLoggingConfigurations] -> ShowS
show :: ListLoggingConfigurations -> String
$cshow :: ListLoggingConfigurations -> String
showsPrec :: Int -> ListLoggingConfigurations -> ShowS
$cshowsPrec :: Int -> ListLoggingConfigurations -> ShowS
Prelude.Show, forall x.
Rep ListLoggingConfigurations x -> ListLoggingConfigurations
forall x.
ListLoggingConfigurations -> Rep ListLoggingConfigurations x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListLoggingConfigurations x -> ListLoggingConfigurations
$cfrom :: forall x.
ListLoggingConfigurations -> Rep ListLoggingConfigurations x
Prelude.Generic)
newListLoggingConfigurations ::
ListLoggingConfigurations
newListLoggingConfigurations :: ListLoggingConfigurations
newListLoggingConfigurations =
ListLoggingConfigurations'
{ $sel:maxResults:ListLoggingConfigurations' :: Maybe Natural
maxResults =
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListLoggingConfigurations' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing
}
listLoggingConfigurations_maxResults :: Lens.Lens' ListLoggingConfigurations (Prelude.Maybe Prelude.Natural)
listLoggingConfigurations_maxResults :: Lens' ListLoggingConfigurations (Maybe Natural)
listLoggingConfigurations_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLoggingConfigurations' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListLoggingConfigurations' :: ListLoggingConfigurations -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListLoggingConfigurations
s@ListLoggingConfigurations' {} Maybe Natural
a -> ListLoggingConfigurations
s {$sel:maxResults:ListLoggingConfigurations' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListLoggingConfigurations)
listLoggingConfigurations_nextToken :: Lens.Lens' ListLoggingConfigurations (Prelude.Maybe Prelude.Text)
listLoggingConfigurations_nextToken :: Lens' ListLoggingConfigurations (Maybe Text)
listLoggingConfigurations_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLoggingConfigurations' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListLoggingConfigurations' :: ListLoggingConfigurations -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListLoggingConfigurations
s@ListLoggingConfigurations' {} Maybe Text
a -> ListLoggingConfigurations
s {$sel:nextToken:ListLoggingConfigurations' :: Maybe Text
nextToken = Maybe Text
a} :: ListLoggingConfigurations)
instance Core.AWSRequest ListLoggingConfigurations where
type
AWSResponse ListLoggingConfigurations =
ListLoggingConfigurationsResponse
request :: (Service -> Service)
-> ListLoggingConfigurations -> Request ListLoggingConfigurations
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListLoggingConfigurations
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListLoggingConfigurations)))
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
-> Int
-> [LoggingConfigurationSummary]
-> ListLoggingConfigurationsResponse
ListLoggingConfigurationsResponse'
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.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
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
"loggingConfigurations"
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
)
)
instance Prelude.Hashable ListLoggingConfigurations where
hashWithSalt :: Int -> ListLoggingConfigurations -> Int
hashWithSalt Int
_salt ListLoggingConfigurations' {Maybe Natural
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:nextToken:ListLoggingConfigurations' :: ListLoggingConfigurations -> Maybe Text
$sel:maxResults:ListLoggingConfigurations' :: ListLoggingConfigurations -> 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 ListLoggingConfigurations where
rnf :: ListLoggingConfigurations -> ()
rnf ListLoggingConfigurations' {Maybe Natural
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:nextToken:ListLoggingConfigurations' :: ListLoggingConfigurations -> Maybe Text
$sel:maxResults:ListLoggingConfigurations' :: ListLoggingConfigurations -> 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 ListLoggingConfigurations where
toHeaders :: ListLoggingConfigurations -> 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.ToJSON ListLoggingConfigurations where
toJSON :: ListLoggingConfigurations -> Value
toJSON ListLoggingConfigurations' {Maybe Natural
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:nextToken:ListLoggingConfigurations' :: ListLoggingConfigurations -> Maybe Text
$sel:maxResults:ListLoggingConfigurations' :: ListLoggingConfigurations -> Maybe Natural
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"maxResults" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
(Key
"nextToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken
]
)
instance Data.ToPath ListLoggingConfigurations where
toPath :: ListLoggingConfigurations -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/ListLoggingConfigurations"
instance Data.ToQuery ListLoggingConfigurations where
toQuery :: ListLoggingConfigurations -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data ListLoggingConfigurationsResponse = ListLoggingConfigurationsResponse'
{
ListLoggingConfigurationsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListLoggingConfigurationsResponse -> Int
httpStatus :: Prelude.Int,
ListLoggingConfigurationsResponse -> [LoggingConfigurationSummary]
loggingConfigurations :: [LoggingConfigurationSummary]
}
deriving (ListLoggingConfigurationsResponse
-> ListLoggingConfigurationsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListLoggingConfigurationsResponse
-> ListLoggingConfigurationsResponse -> Bool
$c/= :: ListLoggingConfigurationsResponse
-> ListLoggingConfigurationsResponse -> Bool
== :: ListLoggingConfigurationsResponse
-> ListLoggingConfigurationsResponse -> Bool
$c== :: ListLoggingConfigurationsResponse
-> ListLoggingConfigurationsResponse -> Bool
Prelude.Eq, ReadPrec [ListLoggingConfigurationsResponse]
ReadPrec ListLoggingConfigurationsResponse
Int -> ReadS ListLoggingConfigurationsResponse
ReadS [ListLoggingConfigurationsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListLoggingConfigurationsResponse]
$creadListPrec :: ReadPrec [ListLoggingConfigurationsResponse]
readPrec :: ReadPrec ListLoggingConfigurationsResponse
$creadPrec :: ReadPrec ListLoggingConfigurationsResponse
readList :: ReadS [ListLoggingConfigurationsResponse]
$creadList :: ReadS [ListLoggingConfigurationsResponse]
readsPrec :: Int -> ReadS ListLoggingConfigurationsResponse
$creadsPrec :: Int -> ReadS ListLoggingConfigurationsResponse
Prelude.Read, Int -> ListLoggingConfigurationsResponse -> ShowS
[ListLoggingConfigurationsResponse] -> ShowS
ListLoggingConfigurationsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListLoggingConfigurationsResponse] -> ShowS
$cshowList :: [ListLoggingConfigurationsResponse] -> ShowS
show :: ListLoggingConfigurationsResponse -> String
$cshow :: ListLoggingConfigurationsResponse -> String
showsPrec :: Int -> ListLoggingConfigurationsResponse -> ShowS
$cshowsPrec :: Int -> ListLoggingConfigurationsResponse -> ShowS
Prelude.Show, forall x.
Rep ListLoggingConfigurationsResponse x
-> ListLoggingConfigurationsResponse
forall x.
ListLoggingConfigurationsResponse
-> Rep ListLoggingConfigurationsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListLoggingConfigurationsResponse x
-> ListLoggingConfigurationsResponse
$cfrom :: forall x.
ListLoggingConfigurationsResponse
-> Rep ListLoggingConfigurationsResponse x
Prelude.Generic)
newListLoggingConfigurationsResponse ::
Prelude.Int ->
ListLoggingConfigurationsResponse
newListLoggingConfigurationsResponse :: Int -> ListLoggingConfigurationsResponse
newListLoggingConfigurationsResponse Int
pHttpStatus_ =
ListLoggingConfigurationsResponse'
{ $sel:nextToken:ListLoggingConfigurationsResponse' :: Maybe Text
nextToken =
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListLoggingConfigurationsResponse' :: Int
httpStatus = Int
pHttpStatus_,
$sel:loggingConfigurations:ListLoggingConfigurationsResponse' :: [LoggingConfigurationSummary]
loggingConfigurations = forall a. Monoid a => a
Prelude.mempty
}
listLoggingConfigurationsResponse_nextToken :: Lens.Lens' ListLoggingConfigurationsResponse (Prelude.Maybe Prelude.Text)
listLoggingConfigurationsResponse_nextToken :: Lens' ListLoggingConfigurationsResponse (Maybe Text)
listLoggingConfigurationsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLoggingConfigurationsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListLoggingConfigurationsResponse' :: ListLoggingConfigurationsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListLoggingConfigurationsResponse
s@ListLoggingConfigurationsResponse' {} Maybe Text
a -> ListLoggingConfigurationsResponse
s {$sel:nextToken:ListLoggingConfigurationsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListLoggingConfigurationsResponse)
listLoggingConfigurationsResponse_httpStatus :: Lens.Lens' ListLoggingConfigurationsResponse Prelude.Int
listLoggingConfigurationsResponse_httpStatus :: Lens' ListLoggingConfigurationsResponse Int
listLoggingConfigurationsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLoggingConfigurationsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListLoggingConfigurationsResponse' :: ListLoggingConfigurationsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListLoggingConfigurationsResponse
s@ListLoggingConfigurationsResponse' {} Int
a -> ListLoggingConfigurationsResponse
s {$sel:httpStatus:ListLoggingConfigurationsResponse' :: Int
httpStatus = Int
a} :: ListLoggingConfigurationsResponse)
listLoggingConfigurationsResponse_loggingConfigurations :: Lens.Lens' ListLoggingConfigurationsResponse [LoggingConfigurationSummary]
listLoggingConfigurationsResponse_loggingConfigurations :: Lens'
ListLoggingConfigurationsResponse [LoggingConfigurationSummary]
listLoggingConfigurationsResponse_loggingConfigurations = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLoggingConfigurationsResponse' {[LoggingConfigurationSummary]
loggingConfigurations :: [LoggingConfigurationSummary]
$sel:loggingConfigurations:ListLoggingConfigurationsResponse' :: ListLoggingConfigurationsResponse -> [LoggingConfigurationSummary]
loggingConfigurations} -> [LoggingConfigurationSummary]
loggingConfigurations) (\s :: ListLoggingConfigurationsResponse
s@ListLoggingConfigurationsResponse' {} [LoggingConfigurationSummary]
a -> ListLoggingConfigurationsResponse
s {$sel:loggingConfigurations:ListLoggingConfigurationsResponse' :: [LoggingConfigurationSummary]
loggingConfigurations = [LoggingConfigurationSummary]
a} :: ListLoggingConfigurationsResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance
Prelude.NFData
ListLoggingConfigurationsResponse
where
rnf :: ListLoggingConfigurationsResponse -> ()
rnf ListLoggingConfigurationsResponse' {Int
[LoggingConfigurationSummary]
Maybe Text
loggingConfigurations :: [LoggingConfigurationSummary]
httpStatus :: Int
nextToken :: Maybe Text
$sel:loggingConfigurations:ListLoggingConfigurationsResponse' :: ListLoggingConfigurationsResponse -> [LoggingConfigurationSummary]
$sel:httpStatus:ListLoggingConfigurationsResponse' :: ListLoggingConfigurationsResponse -> Int
$sel:nextToken:ListLoggingConfigurationsResponse' :: ListLoggingConfigurationsResponse -> 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 Int
httpStatus
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [LoggingConfigurationSummary]
loggingConfigurations