{-# 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.Lens as Lens
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
(ListRealtimeLogConfigs -> ListRealtimeLogConfigs -> Bool)
-> (ListRealtimeLogConfigs -> ListRealtimeLogConfigs -> Bool)
-> Eq ListRealtimeLogConfigs
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]
(Int -> ReadS ListRealtimeLogConfigs)
-> ReadS [ListRealtimeLogConfigs]
-> ReadPrec ListRealtimeLogConfigs
-> ReadPrec [ListRealtimeLogConfigs]
-> Read 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
(Int -> ListRealtimeLogConfigs -> ShowS)
-> (ListRealtimeLogConfigs -> String)
-> ([ListRealtimeLogConfigs] -> ShowS)
-> Show ListRealtimeLogConfigs
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. ListRealtimeLogConfigs -> Rep ListRealtimeLogConfigs x)
-> (forall x.
Rep ListRealtimeLogConfigs x -> ListRealtimeLogConfigs)
-> Generic ListRealtimeLogConfigs
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' :: Maybe Text -> Maybe Text -> ListRealtimeLogConfigs
ListRealtimeLogConfigs'
{ $sel:marker:ListRealtimeLogConfigs' :: Maybe Text
marker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxItems:ListRealtimeLogConfigs' :: Maybe Text
maxItems = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
listRealtimeLogConfigs_marker :: Lens.Lens' ListRealtimeLogConfigs (Prelude.Maybe Prelude.Text)
listRealtimeLogConfigs_marker :: (Maybe Text -> f (Maybe Text))
-> ListRealtimeLogConfigs -> f ListRealtimeLogConfigs
listRealtimeLogConfigs_marker = (ListRealtimeLogConfigs -> Maybe Text)
-> (ListRealtimeLogConfigs -> Maybe Text -> ListRealtimeLogConfigs)
-> Lens
ListRealtimeLogConfigs
ListRealtimeLogConfigs
(Maybe Text)
(Maybe Text)
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 :: (Maybe Text -> f (Maybe Text))
-> ListRealtimeLogConfigs -> f ListRealtimeLogConfigs
listRealtimeLogConfigs_maxItems = (ListRealtimeLogConfigs -> Maybe Text)
-> (ListRealtimeLogConfigs -> Maybe Text -> ListRealtimeLogConfigs)
-> Lens
ListRealtimeLogConfigs
ListRealtimeLogConfigs
(Maybe Text)
(Maybe Text)
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 :: ListRealtimeLogConfigs -> Request ListRealtimeLogConfigs
request = Service -> ListRealtimeLogConfigs -> Request ListRealtimeLogConfigs
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
response :: Logger
-> Service
-> Proxy ListRealtimeLogConfigs
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListRealtimeLogConfigs)))
response =
(Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse ListRealtimeLogConfigs))
-> Logger
-> Service
-> Proxy ListRealtimeLogConfigs
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListRealtimeLogConfigs)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXML
( \Int
s ResponseHeaders
h [Node]
x ->
Maybe RealtimeLogConfigs -> Int -> ListRealtimeLogConfigsResponse
ListRealtimeLogConfigsResponse'
(Maybe RealtimeLogConfigs -> Int -> ListRealtimeLogConfigsResponse)
-> Either String (Maybe RealtimeLogConfigs)
-> Either String (Int -> ListRealtimeLogConfigsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node] -> Either String (Maybe RealtimeLogConfigs)
forall a. FromXML a => [Node] -> Either String a
Core.parseXML [Node]
x)
Either String (Int -> ListRealtimeLogConfigsResponse)
-> Either String Int
-> Either String ListRealtimeLogConfigsResponse
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 ListRealtimeLogConfigs
instance Prelude.NFData ListRealtimeLogConfigs
instance Core.ToHeaders ListRealtimeLogConfigs where
toHeaders :: ListRealtimeLogConfigs -> ResponseHeaders
toHeaders = ResponseHeaders -> ListRealtimeLogConfigs -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath ListRealtimeLogConfigs where
toPath :: ListRealtimeLogConfigs -> ByteString
toPath =
ByteString -> ListRealtimeLogConfigs -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/2020-05-31/realtime-log-config"
instance Core.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
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Marker" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
marker,
ByteString
"MaxItems" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
maxItems
]
data ListRealtimeLogConfigsResponse = ListRealtimeLogConfigsResponse'
{
ListRealtimeLogConfigsResponse -> Maybe RealtimeLogConfigs
realtimeLogConfigs :: Prelude.Maybe RealtimeLogConfigs,
ListRealtimeLogConfigsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ListRealtimeLogConfigsResponse
-> ListRealtimeLogConfigsResponse -> Bool
(ListRealtimeLogConfigsResponse
-> ListRealtimeLogConfigsResponse -> Bool)
-> (ListRealtimeLogConfigsResponse
-> ListRealtimeLogConfigsResponse -> Bool)
-> Eq ListRealtimeLogConfigsResponse
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]
(Int -> ReadS ListRealtimeLogConfigsResponse)
-> ReadS [ListRealtimeLogConfigsResponse]
-> ReadPrec ListRealtimeLogConfigsResponse
-> ReadPrec [ListRealtimeLogConfigsResponse]
-> Read 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
(Int -> ListRealtimeLogConfigsResponse -> ShowS)
-> (ListRealtimeLogConfigsResponse -> String)
-> ([ListRealtimeLogConfigsResponse] -> ShowS)
-> Show ListRealtimeLogConfigsResponse
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.
ListRealtimeLogConfigsResponse
-> Rep ListRealtimeLogConfigsResponse x)
-> (forall x.
Rep ListRealtimeLogConfigsResponse x
-> ListRealtimeLogConfigsResponse)
-> Generic ListRealtimeLogConfigsResponse
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' :: Maybe RealtimeLogConfigs -> Int -> ListRealtimeLogConfigsResponse
ListRealtimeLogConfigsResponse'
{ $sel:realtimeLogConfigs:ListRealtimeLogConfigsResponse' :: Maybe RealtimeLogConfigs
realtimeLogConfigs =
Maybe RealtimeLogConfigs
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListRealtimeLogConfigsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
listRealtimeLogConfigsResponse_realtimeLogConfigs :: Lens.Lens' ListRealtimeLogConfigsResponse (Prelude.Maybe RealtimeLogConfigs)
listRealtimeLogConfigsResponse_realtimeLogConfigs :: (Maybe RealtimeLogConfigs -> f (Maybe RealtimeLogConfigs))
-> ListRealtimeLogConfigsResponse
-> f ListRealtimeLogConfigsResponse
listRealtimeLogConfigsResponse_realtimeLogConfigs = (ListRealtimeLogConfigsResponse -> Maybe RealtimeLogConfigs)
-> (ListRealtimeLogConfigsResponse
-> Maybe RealtimeLogConfigs -> ListRealtimeLogConfigsResponse)
-> Lens
ListRealtimeLogConfigsResponse
ListRealtimeLogConfigsResponse
(Maybe RealtimeLogConfigs)
(Maybe 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 :: (Int -> f Int)
-> ListRealtimeLogConfigsResponse
-> f ListRealtimeLogConfigsResponse
listRealtimeLogConfigsResponse_httpStatus = (ListRealtimeLogConfigsResponse -> Int)
-> (ListRealtimeLogConfigsResponse
-> Int -> ListRealtimeLogConfigsResponse)
-> Lens
ListRealtimeLogConfigsResponse
ListRealtimeLogConfigsResponse
Int
Int
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