{-# 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.CloudFront.ListRealtimeLogConfigs
(
ListRealtimeLogConfigs (..),
newListRealtimeLogConfigs,
listRealtimeLogConfigs_marker,
listRealtimeLogConfigs_maxItems,
ListRealtimeLogConfigsResponse (..),
newListRealtimeLogConfigsResponse,
listRealtimeLogConfigsResponse_realtimeLogConfigs,
listRealtimeLogConfigsResponse_httpStatus,
)
where
import Amazonka.CloudFront.Types
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
data ListRealtimeLogConfigs = ListRealtimeLogConfigs'
{
ListRealtimeLogConfigs -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
ListRealtimeLogConfigs -> Maybe Text
maxItems :: Prelude.Maybe Prelude.Text
}
deriving (ListRealtimeLogConfigs -> ListRealtimeLogConfigs -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListRealtimeLogConfigs -> ListRealtimeLogConfigs -> Bool
$c/= :: ListRealtimeLogConfigs -> ListRealtimeLogConfigs -> Bool
== :: ListRealtimeLogConfigs -> ListRealtimeLogConfigs -> Bool
$c== :: ListRealtimeLogConfigs -> ListRealtimeLogConfigs -> Bool
Prelude.Eq, ReadPrec [ListRealtimeLogConfigs]
ReadPrec ListRealtimeLogConfigs
Int -> ReadS ListRealtimeLogConfigs
ReadS [ListRealtimeLogConfigs]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListRealtimeLogConfigs]
$creadListPrec :: ReadPrec [ListRealtimeLogConfigs]
readPrec :: ReadPrec ListRealtimeLogConfigs
$creadPrec :: ReadPrec ListRealtimeLogConfigs
readList :: ReadS [ListRealtimeLogConfigs]
$creadList :: ReadS [ListRealtimeLogConfigs]
readsPrec :: Int -> ReadS ListRealtimeLogConfigs
$creadsPrec :: Int -> ReadS ListRealtimeLogConfigs
Prelude.Read, Int -> ListRealtimeLogConfigs -> ShowS
[ListRealtimeLogConfigs] -> ShowS
ListRealtimeLogConfigs -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListRealtimeLogConfigs] -> ShowS
$cshowList :: [ListRealtimeLogConfigs] -> ShowS
show :: ListRealtimeLogConfigs -> String
$cshow :: ListRealtimeLogConfigs -> String
showsPrec :: Int -> ListRealtimeLogConfigs -> ShowS
$cshowsPrec :: Int -> ListRealtimeLogConfigs -> ShowS
Prelude.Show, forall x. Rep ListRealtimeLogConfigs x -> ListRealtimeLogConfigs
forall x. ListRealtimeLogConfigs -> Rep ListRealtimeLogConfigs x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListRealtimeLogConfigs x -> ListRealtimeLogConfigs
$cfrom :: forall x. ListRealtimeLogConfigs -> Rep ListRealtimeLogConfigs x
Prelude.Generic)
newListRealtimeLogConfigs ::
ListRealtimeLogConfigs
newListRealtimeLogConfigs :: ListRealtimeLogConfigs
newListRealtimeLogConfigs =
ListRealtimeLogConfigs'
{ $sel:marker:ListRealtimeLogConfigs' :: Maybe Text
marker = forall a. Maybe a
Prelude.Nothing,
$sel:maxItems:ListRealtimeLogConfigs' :: Maybe Text
maxItems = forall a. Maybe a
Prelude.Nothing
}
listRealtimeLogConfigs_marker :: Lens.Lens' ListRealtimeLogConfigs (Prelude.Maybe Prelude.Text)
listRealtimeLogConfigs_marker :: Lens' ListRealtimeLogConfigs (Maybe Text)
listRealtimeLogConfigs_marker = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRealtimeLogConfigs' {Maybe Text
marker :: Maybe Text
$sel:marker:ListRealtimeLogConfigs' :: ListRealtimeLogConfigs -> Maybe Text
marker} -> Maybe Text
marker) (\s :: ListRealtimeLogConfigs
s@ListRealtimeLogConfigs' {} Maybe Text
a -> ListRealtimeLogConfigs
s {$sel:marker:ListRealtimeLogConfigs' :: Maybe Text
marker = Maybe Text
a} :: ListRealtimeLogConfigs)
listRealtimeLogConfigs_maxItems :: Lens.Lens' ListRealtimeLogConfigs (Prelude.Maybe Prelude.Text)
listRealtimeLogConfigs_maxItems :: Lens' ListRealtimeLogConfigs (Maybe Text)
listRealtimeLogConfigs_maxItems = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRealtimeLogConfigs' {Maybe Text
maxItems :: Maybe Text
$sel:maxItems:ListRealtimeLogConfigs' :: ListRealtimeLogConfigs -> Maybe Text
maxItems} -> Maybe Text
maxItems) (\s :: ListRealtimeLogConfigs
s@ListRealtimeLogConfigs' {} Maybe Text
a -> ListRealtimeLogConfigs
s {$sel:maxItems:ListRealtimeLogConfigs' :: Maybe Text
maxItems = Maybe Text
a} :: ListRealtimeLogConfigs)
instance Core.AWSRequest ListRealtimeLogConfigs where
type
AWSResponse ListRealtimeLogConfigs =
ListRealtimeLogConfigsResponse
request :: (Service -> Service)
-> ListRealtimeLogConfigs -> Request ListRealtimeLogConfigs
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 ListRealtimeLogConfigs
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListRealtimeLogConfigs)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXML
( \Int
s ResponseHeaders
h [Node]
x ->
Maybe RealtimeLogConfigs -> Int -> ListRealtimeLogConfigsResponse
ListRealtimeLogConfigsResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (forall a. FromXML a => [Node] -> Either String a
Data.parseXML [Node]
x)
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 ListRealtimeLogConfigs where
hashWithSalt :: Int -> ListRealtimeLogConfigs -> Int
hashWithSalt Int
_salt ListRealtimeLogConfigs' {Maybe Text
maxItems :: Maybe Text
marker :: Maybe Text
$sel:maxItems:ListRealtimeLogConfigs' :: ListRealtimeLogConfigs -> Maybe Text
$sel:marker:ListRealtimeLogConfigs' :: ListRealtimeLogConfigs -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
marker
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
maxItems
instance Prelude.NFData ListRealtimeLogConfigs where
rnf :: ListRealtimeLogConfigs -> ()
rnf ListRealtimeLogConfigs' {Maybe Text
maxItems :: Maybe Text
marker :: Maybe Text
$sel:maxItems:ListRealtimeLogConfigs' :: ListRealtimeLogConfigs -> Maybe Text
$sel:marker:ListRealtimeLogConfigs' :: ListRealtimeLogConfigs -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
marker
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
maxItems
instance Data.ToHeaders ListRealtimeLogConfigs where
toHeaders :: ListRealtimeLogConfigs -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath ListRealtimeLogConfigs where
toPath :: ListRealtimeLogConfigs -> ByteString
toPath =
forall a b. a -> b -> a
Prelude.const ByteString
"/2020-05-31/realtime-log-config"
instance Data.ToQuery ListRealtimeLogConfigs where
toQuery :: ListRealtimeLogConfigs -> QueryString
toQuery ListRealtimeLogConfigs' {Maybe Text
maxItems :: Maybe Text
marker :: Maybe Text
$sel:maxItems:ListRealtimeLogConfigs' :: ListRealtimeLogConfigs -> Maybe Text
$sel:marker:ListRealtimeLogConfigs' :: ListRealtimeLogConfigs -> Maybe Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Marker" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
marker,
ByteString
"MaxItems" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
maxItems
]
data ListRealtimeLogConfigsResponse = ListRealtimeLogConfigsResponse'
{
ListRealtimeLogConfigsResponse -> Maybe RealtimeLogConfigs
realtimeLogConfigs :: Prelude.Maybe RealtimeLogConfigs,
ListRealtimeLogConfigsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ListRealtimeLogConfigsResponse
-> ListRealtimeLogConfigsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListRealtimeLogConfigsResponse
-> ListRealtimeLogConfigsResponse -> Bool
$c/= :: ListRealtimeLogConfigsResponse
-> ListRealtimeLogConfigsResponse -> Bool
== :: ListRealtimeLogConfigsResponse
-> ListRealtimeLogConfigsResponse -> Bool
$c== :: ListRealtimeLogConfigsResponse
-> ListRealtimeLogConfigsResponse -> Bool
Prelude.Eq, ReadPrec [ListRealtimeLogConfigsResponse]
ReadPrec ListRealtimeLogConfigsResponse
Int -> ReadS ListRealtimeLogConfigsResponse
ReadS [ListRealtimeLogConfigsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListRealtimeLogConfigsResponse]
$creadListPrec :: ReadPrec [ListRealtimeLogConfigsResponse]
readPrec :: ReadPrec ListRealtimeLogConfigsResponse
$creadPrec :: ReadPrec ListRealtimeLogConfigsResponse
readList :: ReadS [ListRealtimeLogConfigsResponse]
$creadList :: ReadS [ListRealtimeLogConfigsResponse]
readsPrec :: Int -> ReadS ListRealtimeLogConfigsResponse
$creadsPrec :: Int -> ReadS ListRealtimeLogConfigsResponse
Prelude.Read, Int -> ListRealtimeLogConfigsResponse -> ShowS
[ListRealtimeLogConfigsResponse] -> ShowS
ListRealtimeLogConfigsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListRealtimeLogConfigsResponse] -> ShowS
$cshowList :: [ListRealtimeLogConfigsResponse] -> ShowS
show :: ListRealtimeLogConfigsResponse -> String
$cshow :: ListRealtimeLogConfigsResponse -> String
showsPrec :: Int -> ListRealtimeLogConfigsResponse -> ShowS
$cshowsPrec :: Int -> ListRealtimeLogConfigsResponse -> ShowS
Prelude.Show, forall x.
Rep ListRealtimeLogConfigsResponse x
-> ListRealtimeLogConfigsResponse
forall x.
ListRealtimeLogConfigsResponse
-> Rep ListRealtimeLogConfigsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListRealtimeLogConfigsResponse x
-> ListRealtimeLogConfigsResponse
$cfrom :: forall x.
ListRealtimeLogConfigsResponse
-> Rep ListRealtimeLogConfigsResponse x
Prelude.Generic)
newListRealtimeLogConfigsResponse ::
Prelude.Int ->
ListRealtimeLogConfigsResponse
newListRealtimeLogConfigsResponse :: Int -> ListRealtimeLogConfigsResponse
newListRealtimeLogConfigsResponse Int
pHttpStatus_ =
ListRealtimeLogConfigsResponse'
{ $sel:realtimeLogConfigs:ListRealtimeLogConfigsResponse' :: Maybe RealtimeLogConfigs
realtimeLogConfigs =
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListRealtimeLogConfigsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
listRealtimeLogConfigsResponse_realtimeLogConfigs :: Lens.Lens' ListRealtimeLogConfigsResponse (Prelude.Maybe RealtimeLogConfigs)
listRealtimeLogConfigsResponse_realtimeLogConfigs :: Lens' ListRealtimeLogConfigsResponse (Maybe RealtimeLogConfigs)
listRealtimeLogConfigsResponse_realtimeLogConfigs = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRealtimeLogConfigsResponse' {Maybe RealtimeLogConfigs
realtimeLogConfigs :: Maybe RealtimeLogConfigs
$sel:realtimeLogConfigs:ListRealtimeLogConfigsResponse' :: ListRealtimeLogConfigsResponse -> Maybe RealtimeLogConfigs
realtimeLogConfigs} -> Maybe RealtimeLogConfigs
realtimeLogConfigs) (\s :: ListRealtimeLogConfigsResponse
s@ListRealtimeLogConfigsResponse' {} Maybe RealtimeLogConfigs
a -> ListRealtimeLogConfigsResponse
s {$sel:realtimeLogConfigs:ListRealtimeLogConfigsResponse' :: Maybe RealtimeLogConfigs
realtimeLogConfigs = Maybe RealtimeLogConfigs
a} :: ListRealtimeLogConfigsResponse)
listRealtimeLogConfigsResponse_httpStatus :: Lens.Lens' ListRealtimeLogConfigsResponse Prelude.Int
listRealtimeLogConfigsResponse_httpStatus :: Lens' ListRealtimeLogConfigsResponse Int
listRealtimeLogConfigsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRealtimeLogConfigsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListRealtimeLogConfigsResponse' :: ListRealtimeLogConfigsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListRealtimeLogConfigsResponse
s@ListRealtimeLogConfigsResponse' {} Int
a -> ListRealtimeLogConfigsResponse
s {$sel:httpStatus:ListRealtimeLogConfigsResponse' :: Int
httpStatus = Int
a} :: ListRealtimeLogConfigsResponse)
instance
Prelude.NFData
ListRealtimeLogConfigsResponse
where
rnf :: ListRealtimeLogConfigsResponse -> ()
rnf ListRealtimeLogConfigsResponse' {Int
Maybe RealtimeLogConfigs
httpStatus :: Int
realtimeLogConfigs :: Maybe RealtimeLogConfigs
$sel:httpStatus:ListRealtimeLogConfigsResponse' :: ListRealtimeLogConfigsResponse -> Int
$sel:realtimeLogConfigs:ListRealtimeLogConfigsResponse' :: ListRealtimeLogConfigsResponse -> Maybe RealtimeLogConfigs
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe RealtimeLogConfigs
realtimeLogConfigs
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus