{-# 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.MemoryDb.DescribeEvents
(
DescribeEvents (..),
newDescribeEvents,
describeEvents_sourceName,
describeEvents_startTime,
describeEvents_sourceType,
describeEvents_nextToken,
describeEvents_endTime,
describeEvents_duration,
describeEvents_maxResults,
DescribeEventsResponse (..),
newDescribeEventsResponse,
describeEventsResponse_nextToken,
describeEventsResponse_events,
describeEventsResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MemoryDb.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DescribeEvents = DescribeEvents'
{
DescribeEvents -> Maybe Text
sourceName :: Prelude.Maybe Prelude.Text,
DescribeEvents -> Maybe POSIX
startTime :: Prelude.Maybe Core.POSIX,
DescribeEvents -> Maybe SourceType
sourceType :: Prelude.Maybe SourceType,
DescribeEvents -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribeEvents -> Maybe POSIX
endTime :: Prelude.Maybe Core.POSIX,
DescribeEvents -> Maybe Int
duration :: Prelude.Maybe Prelude.Int,
DescribeEvents -> Maybe Int
maxResults :: Prelude.Maybe Prelude.Int
}
deriving (DescribeEvents -> DescribeEvents -> Bool
(DescribeEvents -> DescribeEvents -> Bool)
-> (DescribeEvents -> DescribeEvents -> Bool) -> Eq DescribeEvents
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeEvents -> DescribeEvents -> Bool
$c/= :: DescribeEvents -> DescribeEvents -> Bool
== :: DescribeEvents -> DescribeEvents -> Bool
$c== :: DescribeEvents -> DescribeEvents -> Bool
Prelude.Eq, ReadPrec [DescribeEvents]
ReadPrec DescribeEvents
Int -> ReadS DescribeEvents
ReadS [DescribeEvents]
(Int -> ReadS DescribeEvents)
-> ReadS [DescribeEvents]
-> ReadPrec DescribeEvents
-> ReadPrec [DescribeEvents]
-> Read DescribeEvents
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeEvents]
$creadListPrec :: ReadPrec [DescribeEvents]
readPrec :: ReadPrec DescribeEvents
$creadPrec :: ReadPrec DescribeEvents
readList :: ReadS [DescribeEvents]
$creadList :: ReadS [DescribeEvents]
readsPrec :: Int -> ReadS DescribeEvents
$creadsPrec :: Int -> ReadS DescribeEvents
Prelude.Read, Int -> DescribeEvents -> ShowS
[DescribeEvents] -> ShowS
DescribeEvents -> String
(Int -> DescribeEvents -> ShowS)
-> (DescribeEvents -> String)
-> ([DescribeEvents] -> ShowS)
-> Show DescribeEvents
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeEvents] -> ShowS
$cshowList :: [DescribeEvents] -> ShowS
show :: DescribeEvents -> String
$cshow :: DescribeEvents -> String
showsPrec :: Int -> DescribeEvents -> ShowS
$cshowsPrec :: Int -> DescribeEvents -> ShowS
Prelude.Show, (forall x. DescribeEvents -> Rep DescribeEvents x)
-> (forall x. Rep DescribeEvents x -> DescribeEvents)
-> Generic DescribeEvents
forall x. Rep DescribeEvents x -> DescribeEvents
forall x. DescribeEvents -> Rep DescribeEvents x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeEvents x -> DescribeEvents
$cfrom :: forall x. DescribeEvents -> Rep DescribeEvents x
Prelude.Generic)
newDescribeEvents ::
DescribeEvents
newDescribeEvents :: DescribeEvents
newDescribeEvents =
DescribeEvents' :: Maybe Text
-> Maybe POSIX
-> Maybe SourceType
-> Maybe Text
-> Maybe POSIX
-> Maybe Int
-> Maybe Int
-> DescribeEvents
DescribeEvents'
{ $sel:sourceName:DescribeEvents' :: Maybe Text
sourceName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:startTime:DescribeEvents' :: Maybe POSIX
startTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:sourceType:DescribeEvents' :: Maybe SourceType
sourceType = Maybe SourceType
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:DescribeEvents' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:endTime:DescribeEvents' :: Maybe POSIX
endTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:duration:DescribeEvents' :: Maybe Int
duration = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:DescribeEvents' :: Maybe Int
maxResults = Maybe Int
forall a. Maybe a
Prelude.Nothing
}
describeEvents_sourceName :: Lens.Lens' DescribeEvents (Prelude.Maybe Prelude.Text)
describeEvents_sourceName :: (Maybe Text -> f (Maybe Text))
-> DescribeEvents -> f DescribeEvents
describeEvents_sourceName = (DescribeEvents -> Maybe Text)
-> (DescribeEvents -> Maybe Text -> DescribeEvents)
-> Lens DescribeEvents DescribeEvents (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEvents' {Maybe Text
sourceName :: Maybe Text
$sel:sourceName:DescribeEvents' :: DescribeEvents -> Maybe Text
sourceName} -> Maybe Text
sourceName) (\s :: DescribeEvents
s@DescribeEvents' {} Maybe Text
a -> DescribeEvents
s {$sel:sourceName:DescribeEvents' :: Maybe Text
sourceName = Maybe Text
a} :: DescribeEvents)
describeEvents_startTime :: Lens.Lens' DescribeEvents (Prelude.Maybe Prelude.UTCTime)
describeEvents_startTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeEvents -> f DescribeEvents
describeEvents_startTime = (DescribeEvents -> Maybe POSIX)
-> (DescribeEvents -> Maybe POSIX -> DescribeEvents)
-> Lens DescribeEvents DescribeEvents (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEvents' {Maybe POSIX
startTime :: Maybe POSIX
$sel:startTime:DescribeEvents' :: DescribeEvents -> Maybe POSIX
startTime} -> Maybe POSIX
startTime) (\s :: DescribeEvents
s@DescribeEvents' {} Maybe POSIX
a -> DescribeEvents
s {$sel:startTime:DescribeEvents' :: Maybe POSIX
startTime = Maybe POSIX
a} :: DescribeEvents) ((Maybe POSIX -> f (Maybe POSIX))
-> DescribeEvents -> f DescribeEvents)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeEvents
-> f DescribeEvents
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
describeEvents_sourceType :: Lens.Lens' DescribeEvents (Prelude.Maybe SourceType)
describeEvents_sourceType :: (Maybe SourceType -> f (Maybe SourceType))
-> DescribeEvents -> f DescribeEvents
describeEvents_sourceType = (DescribeEvents -> Maybe SourceType)
-> (DescribeEvents -> Maybe SourceType -> DescribeEvents)
-> Lens
DescribeEvents DescribeEvents (Maybe SourceType) (Maybe SourceType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEvents' {Maybe SourceType
sourceType :: Maybe SourceType
$sel:sourceType:DescribeEvents' :: DescribeEvents -> Maybe SourceType
sourceType} -> Maybe SourceType
sourceType) (\s :: DescribeEvents
s@DescribeEvents' {} Maybe SourceType
a -> DescribeEvents
s {$sel:sourceType:DescribeEvents' :: Maybe SourceType
sourceType = Maybe SourceType
a} :: DescribeEvents)
describeEvents_nextToken :: Lens.Lens' DescribeEvents (Prelude.Maybe Prelude.Text)
describeEvents_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeEvents -> f DescribeEvents
describeEvents_nextToken = (DescribeEvents -> Maybe Text)
-> (DescribeEvents -> Maybe Text -> DescribeEvents)
-> Lens DescribeEvents DescribeEvents (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEvents' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeEvents' :: DescribeEvents -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeEvents
s@DescribeEvents' {} Maybe Text
a -> DescribeEvents
s {$sel:nextToken:DescribeEvents' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeEvents)
describeEvents_endTime :: Lens.Lens' DescribeEvents (Prelude.Maybe Prelude.UTCTime)
describeEvents_endTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeEvents -> f DescribeEvents
describeEvents_endTime = (DescribeEvents -> Maybe POSIX)
-> (DescribeEvents -> Maybe POSIX -> DescribeEvents)
-> Lens DescribeEvents DescribeEvents (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEvents' {Maybe POSIX
endTime :: Maybe POSIX
$sel:endTime:DescribeEvents' :: DescribeEvents -> Maybe POSIX
endTime} -> Maybe POSIX
endTime) (\s :: DescribeEvents
s@DescribeEvents' {} Maybe POSIX
a -> DescribeEvents
s {$sel:endTime:DescribeEvents' :: Maybe POSIX
endTime = Maybe POSIX
a} :: DescribeEvents) ((Maybe POSIX -> f (Maybe POSIX))
-> DescribeEvents -> f DescribeEvents)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeEvents
-> f DescribeEvents
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
describeEvents_duration :: Lens.Lens' DescribeEvents (Prelude.Maybe Prelude.Int)
describeEvents_duration :: (Maybe Int -> f (Maybe Int)) -> DescribeEvents -> f DescribeEvents
describeEvents_duration = (DescribeEvents -> Maybe Int)
-> (DescribeEvents -> Maybe Int -> DescribeEvents)
-> Lens DescribeEvents DescribeEvents (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEvents' {Maybe Int
duration :: Maybe Int
$sel:duration:DescribeEvents' :: DescribeEvents -> Maybe Int
duration} -> Maybe Int
duration) (\s :: DescribeEvents
s@DescribeEvents' {} Maybe Int
a -> DescribeEvents
s {$sel:duration:DescribeEvents' :: Maybe Int
duration = Maybe Int
a} :: DescribeEvents)
describeEvents_maxResults :: Lens.Lens' DescribeEvents (Prelude.Maybe Prelude.Int)
describeEvents_maxResults :: (Maybe Int -> f (Maybe Int)) -> DescribeEvents -> f DescribeEvents
describeEvents_maxResults = (DescribeEvents -> Maybe Int)
-> (DescribeEvents -> Maybe Int -> DescribeEvents)
-> Lens DescribeEvents DescribeEvents (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEvents' {Maybe Int
maxResults :: Maybe Int
$sel:maxResults:DescribeEvents' :: DescribeEvents -> Maybe Int
maxResults} -> Maybe Int
maxResults) (\s :: DescribeEvents
s@DescribeEvents' {} Maybe Int
a -> DescribeEvents
s {$sel:maxResults:DescribeEvents' :: Maybe Int
maxResults = Maybe Int
a} :: DescribeEvents)
instance Core.AWSRequest DescribeEvents where
type
AWSResponse DescribeEvents =
DescribeEventsResponse
request :: DescribeEvents -> Request DescribeEvents
request = Service -> DescribeEvents -> Request DescribeEvents
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DescribeEvents
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeEvents)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse DescribeEvents))
-> Logger
-> Service
-> Proxy DescribeEvents
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeEvents)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Text -> Maybe [Event] -> Int -> DescribeEventsResponse
DescribeEventsResponse'
(Maybe Text -> Maybe [Event] -> Int -> DescribeEventsResponse)
-> Either String (Maybe Text)
-> Either String (Maybe [Event] -> Int -> DescribeEventsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"NextToken")
Either String (Maybe [Event] -> Int -> DescribeEventsResponse)
-> Either String (Maybe [Event])
-> Either String (Int -> DescribeEventsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [Event]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Events" Either String (Maybe (Maybe [Event]))
-> Maybe [Event] -> Either String (Maybe [Event])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Event]
forall a. Monoid a => a
Prelude.mempty)
Either String (Int -> DescribeEventsResponse)
-> Either String Int -> Either String DescribeEventsResponse
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 DescribeEvents
instance Prelude.NFData DescribeEvents
instance Core.ToHeaders DescribeEvents where
toHeaders :: DescribeEvents -> ResponseHeaders
toHeaders =
ResponseHeaders -> DescribeEvents -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"AmazonMemoryDB.DescribeEvents" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON DescribeEvents where
toJSON :: DescribeEvents -> Value
toJSON DescribeEvents' {Maybe Int
Maybe Text
Maybe POSIX
Maybe SourceType
maxResults :: Maybe Int
duration :: Maybe Int
endTime :: Maybe POSIX
nextToken :: Maybe Text
sourceType :: Maybe SourceType
startTime :: Maybe POSIX
sourceName :: Maybe Text
$sel:maxResults:DescribeEvents' :: DescribeEvents -> Maybe Int
$sel:duration:DescribeEvents' :: DescribeEvents -> Maybe Int
$sel:endTime:DescribeEvents' :: DescribeEvents -> Maybe POSIX
$sel:nextToken:DescribeEvents' :: DescribeEvents -> Maybe Text
$sel:sourceType:DescribeEvents' :: DescribeEvents -> Maybe SourceType
$sel:startTime:DescribeEvents' :: DescribeEvents -> Maybe POSIX
$sel:sourceName:DescribeEvents' :: DescribeEvents -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"SourceName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
sourceName,
(Text
"StartTime" Text -> POSIX -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (POSIX -> Pair) -> Maybe POSIX -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe POSIX
startTime,
(Text
"SourceType" Text -> SourceType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (SourceType -> Pair) -> Maybe SourceType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SourceType
sourceType,
(Text
"NextToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
(Text
"EndTime" Text -> POSIX -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (POSIX -> Pair) -> Maybe POSIX -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe POSIX
endTime,
(Text
"Duration" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
duration,
(Text
"MaxResults" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
maxResults
]
)
instance Core.ToPath DescribeEvents where
toPath :: DescribeEvents -> ByteString
toPath = ByteString -> DescribeEvents -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DescribeEvents where
toQuery :: DescribeEvents -> QueryString
toQuery = QueryString -> DescribeEvents -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DescribeEventsResponse = DescribeEventsResponse'
{
DescribeEventsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribeEventsResponse -> Maybe [Event]
events :: Prelude.Maybe [Event],
DescribeEventsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DescribeEventsResponse -> DescribeEventsResponse -> Bool
(DescribeEventsResponse -> DescribeEventsResponse -> Bool)
-> (DescribeEventsResponse -> DescribeEventsResponse -> Bool)
-> Eq DescribeEventsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeEventsResponse -> DescribeEventsResponse -> Bool
$c/= :: DescribeEventsResponse -> DescribeEventsResponse -> Bool
== :: DescribeEventsResponse -> DescribeEventsResponse -> Bool
$c== :: DescribeEventsResponse -> DescribeEventsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeEventsResponse]
ReadPrec DescribeEventsResponse
Int -> ReadS DescribeEventsResponse
ReadS [DescribeEventsResponse]
(Int -> ReadS DescribeEventsResponse)
-> ReadS [DescribeEventsResponse]
-> ReadPrec DescribeEventsResponse
-> ReadPrec [DescribeEventsResponse]
-> Read DescribeEventsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeEventsResponse]
$creadListPrec :: ReadPrec [DescribeEventsResponse]
readPrec :: ReadPrec DescribeEventsResponse
$creadPrec :: ReadPrec DescribeEventsResponse
readList :: ReadS [DescribeEventsResponse]
$creadList :: ReadS [DescribeEventsResponse]
readsPrec :: Int -> ReadS DescribeEventsResponse
$creadsPrec :: Int -> ReadS DescribeEventsResponse
Prelude.Read, Int -> DescribeEventsResponse -> ShowS
[DescribeEventsResponse] -> ShowS
DescribeEventsResponse -> String
(Int -> DescribeEventsResponse -> ShowS)
-> (DescribeEventsResponse -> String)
-> ([DescribeEventsResponse] -> ShowS)
-> Show DescribeEventsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeEventsResponse] -> ShowS
$cshowList :: [DescribeEventsResponse] -> ShowS
show :: DescribeEventsResponse -> String
$cshow :: DescribeEventsResponse -> String
showsPrec :: Int -> DescribeEventsResponse -> ShowS
$cshowsPrec :: Int -> DescribeEventsResponse -> ShowS
Prelude.Show, (forall x. DescribeEventsResponse -> Rep DescribeEventsResponse x)
-> (forall x.
Rep DescribeEventsResponse x -> DescribeEventsResponse)
-> Generic DescribeEventsResponse
forall x. Rep DescribeEventsResponse x -> DescribeEventsResponse
forall x. DescribeEventsResponse -> Rep DescribeEventsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeEventsResponse x -> DescribeEventsResponse
$cfrom :: forall x. DescribeEventsResponse -> Rep DescribeEventsResponse x
Prelude.Generic)
newDescribeEventsResponse ::
Prelude.Int ->
DescribeEventsResponse
newDescribeEventsResponse :: Int -> DescribeEventsResponse
newDescribeEventsResponse Int
pHttpStatus_ =
DescribeEventsResponse' :: Maybe Text -> Maybe [Event] -> Int -> DescribeEventsResponse
DescribeEventsResponse'
{ $sel:nextToken:DescribeEventsResponse' :: Maybe Text
nextToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:events:DescribeEventsResponse' :: Maybe [Event]
events = Maybe [Event]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeEventsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
describeEventsResponse_nextToken :: Lens.Lens' DescribeEventsResponse (Prelude.Maybe Prelude.Text)
describeEventsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeEventsResponse -> f DescribeEventsResponse
describeEventsResponse_nextToken = (DescribeEventsResponse -> Maybe Text)
-> (DescribeEventsResponse -> Maybe Text -> DescribeEventsResponse)
-> Lens
DescribeEventsResponse
DescribeEventsResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEventsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeEventsResponse' :: DescribeEventsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeEventsResponse
s@DescribeEventsResponse' {} Maybe Text
a -> DescribeEventsResponse
s {$sel:nextToken:DescribeEventsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeEventsResponse)
describeEventsResponse_events :: Lens.Lens' DescribeEventsResponse (Prelude.Maybe [Event])
describeEventsResponse_events :: (Maybe [Event] -> f (Maybe [Event]))
-> DescribeEventsResponse -> f DescribeEventsResponse
describeEventsResponse_events = (DescribeEventsResponse -> Maybe [Event])
-> (DescribeEventsResponse
-> Maybe [Event] -> DescribeEventsResponse)
-> Lens
DescribeEventsResponse
DescribeEventsResponse
(Maybe [Event])
(Maybe [Event])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEventsResponse' {Maybe [Event]
events :: Maybe [Event]
$sel:events:DescribeEventsResponse' :: DescribeEventsResponse -> Maybe [Event]
events} -> Maybe [Event]
events) (\s :: DescribeEventsResponse
s@DescribeEventsResponse' {} Maybe [Event]
a -> DescribeEventsResponse
s {$sel:events:DescribeEventsResponse' :: Maybe [Event]
events = Maybe [Event]
a} :: DescribeEventsResponse) ((Maybe [Event] -> f (Maybe [Event]))
-> DescribeEventsResponse -> f DescribeEventsResponse)
-> ((Maybe [Event] -> f (Maybe [Event]))
-> Maybe [Event] -> f (Maybe [Event]))
-> (Maybe [Event] -> f (Maybe [Event]))
-> DescribeEventsResponse
-> f DescribeEventsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Event] [Event] [Event] [Event]
-> Iso
(Maybe [Event]) (Maybe [Event]) (Maybe [Event]) (Maybe [Event])
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 AnIso [Event] [Event] [Event] [Event]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
describeEventsResponse_httpStatus :: Lens.Lens' DescribeEventsResponse Prelude.Int
describeEventsResponse_httpStatus :: (Int -> f Int)
-> DescribeEventsResponse -> f DescribeEventsResponse
describeEventsResponse_httpStatus = (DescribeEventsResponse -> Int)
-> (DescribeEventsResponse -> Int -> DescribeEventsResponse)
-> Lens DescribeEventsResponse DescribeEventsResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEventsResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeEventsResponse' :: DescribeEventsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeEventsResponse
s@DescribeEventsResponse' {} Int
a -> DescribeEventsResponse
s {$sel:httpStatus:DescribeEventsResponse' :: Int
httpStatus = Int
a} :: DescribeEventsResponse)
instance Prelude.NFData DescribeEventsResponse