{-# 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.SSMIncidents.ListTimelineEvents
(
ListTimelineEvents (..),
newListTimelineEvents,
listTimelineEvents_filters,
listTimelineEvents_sortOrder,
listTimelineEvents_nextToken,
listTimelineEvents_maxResults,
listTimelineEvents_sortBy,
listTimelineEvents_incidentRecordArn,
ListTimelineEventsResponse (..),
newListTimelineEventsResponse,
listTimelineEventsResponse_nextToken,
listTimelineEventsResponse_httpStatus,
listTimelineEventsResponse_eventSummaries,
)
where
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
import Amazonka.SSMIncidents.Types
data ListTimelineEvents = ListTimelineEvents'
{
ListTimelineEvents -> Maybe [Filter]
filters :: Prelude.Maybe [Filter],
ListTimelineEvents -> Maybe SortOrder
sortOrder :: Prelude.Maybe SortOrder,
ListTimelineEvents -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListTimelineEvents -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
ListTimelineEvents -> Maybe TimelineEventSort
sortBy :: Prelude.Maybe TimelineEventSort,
ListTimelineEvents -> Text
incidentRecordArn :: Prelude.Text
}
deriving (ListTimelineEvents -> ListTimelineEvents -> Bool
(ListTimelineEvents -> ListTimelineEvents -> Bool)
-> (ListTimelineEvents -> ListTimelineEvents -> Bool)
-> Eq ListTimelineEvents
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListTimelineEvents -> ListTimelineEvents -> Bool
$c/= :: ListTimelineEvents -> ListTimelineEvents -> Bool
== :: ListTimelineEvents -> ListTimelineEvents -> Bool
$c== :: ListTimelineEvents -> ListTimelineEvents -> Bool
Prelude.Eq, ReadPrec [ListTimelineEvents]
ReadPrec ListTimelineEvents
Int -> ReadS ListTimelineEvents
ReadS [ListTimelineEvents]
(Int -> ReadS ListTimelineEvents)
-> ReadS [ListTimelineEvents]
-> ReadPrec ListTimelineEvents
-> ReadPrec [ListTimelineEvents]
-> Read ListTimelineEvents
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListTimelineEvents]
$creadListPrec :: ReadPrec [ListTimelineEvents]
readPrec :: ReadPrec ListTimelineEvents
$creadPrec :: ReadPrec ListTimelineEvents
readList :: ReadS [ListTimelineEvents]
$creadList :: ReadS [ListTimelineEvents]
readsPrec :: Int -> ReadS ListTimelineEvents
$creadsPrec :: Int -> ReadS ListTimelineEvents
Prelude.Read, Int -> ListTimelineEvents -> ShowS
[ListTimelineEvents] -> ShowS
ListTimelineEvents -> String
(Int -> ListTimelineEvents -> ShowS)
-> (ListTimelineEvents -> String)
-> ([ListTimelineEvents] -> ShowS)
-> Show ListTimelineEvents
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListTimelineEvents] -> ShowS
$cshowList :: [ListTimelineEvents] -> ShowS
show :: ListTimelineEvents -> String
$cshow :: ListTimelineEvents -> String
showsPrec :: Int -> ListTimelineEvents -> ShowS
$cshowsPrec :: Int -> ListTimelineEvents -> ShowS
Prelude.Show, (forall x. ListTimelineEvents -> Rep ListTimelineEvents x)
-> (forall x. Rep ListTimelineEvents x -> ListTimelineEvents)
-> Generic ListTimelineEvents
forall x. Rep ListTimelineEvents x -> ListTimelineEvents
forall x. ListTimelineEvents -> Rep ListTimelineEvents x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListTimelineEvents x -> ListTimelineEvents
$cfrom :: forall x. ListTimelineEvents -> Rep ListTimelineEvents x
Prelude.Generic)
newListTimelineEvents ::
Prelude.Text ->
ListTimelineEvents
newListTimelineEvents :: Text -> ListTimelineEvents
newListTimelineEvents Text
pIncidentRecordArn_ =
ListTimelineEvents' :: Maybe [Filter]
-> Maybe SortOrder
-> Maybe Text
-> Maybe Natural
-> Maybe TimelineEventSort
-> Text
-> ListTimelineEvents
ListTimelineEvents'
{ $sel:filters:ListTimelineEvents' :: Maybe [Filter]
filters = Maybe [Filter]
forall a. Maybe a
Prelude.Nothing,
$sel:sortOrder:ListTimelineEvents' :: Maybe SortOrder
sortOrder = Maybe SortOrder
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListTimelineEvents' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:ListTimelineEvents' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:sortBy:ListTimelineEvents' :: Maybe TimelineEventSort
sortBy = Maybe TimelineEventSort
forall a. Maybe a
Prelude.Nothing,
$sel:incidentRecordArn:ListTimelineEvents' :: Text
incidentRecordArn = Text
pIncidentRecordArn_
}
listTimelineEvents_filters :: Lens.Lens' ListTimelineEvents (Prelude.Maybe [Filter])
listTimelineEvents_filters :: (Maybe [Filter] -> f (Maybe [Filter]))
-> ListTimelineEvents -> f ListTimelineEvents
listTimelineEvents_filters = (ListTimelineEvents -> Maybe [Filter])
-> (ListTimelineEvents -> Maybe [Filter] -> ListTimelineEvents)
-> Lens
ListTimelineEvents
ListTimelineEvents
(Maybe [Filter])
(Maybe [Filter])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTimelineEvents' {Maybe [Filter]
filters :: Maybe [Filter]
$sel:filters:ListTimelineEvents' :: ListTimelineEvents -> Maybe [Filter]
filters} -> Maybe [Filter]
filters) (\s :: ListTimelineEvents
s@ListTimelineEvents' {} Maybe [Filter]
a -> ListTimelineEvents
s {$sel:filters:ListTimelineEvents' :: Maybe [Filter]
filters = Maybe [Filter]
a} :: ListTimelineEvents) ((Maybe [Filter] -> f (Maybe [Filter]))
-> ListTimelineEvents -> f ListTimelineEvents)
-> ((Maybe [Filter] -> f (Maybe [Filter]))
-> Maybe [Filter] -> f (Maybe [Filter]))
-> (Maybe [Filter] -> f (Maybe [Filter]))
-> ListTimelineEvents
-> f ListTimelineEvents
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Filter] [Filter] [Filter] [Filter]
-> Iso
(Maybe [Filter]) (Maybe [Filter]) (Maybe [Filter]) (Maybe [Filter])
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 [Filter] [Filter] [Filter] [Filter]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
listTimelineEvents_sortOrder :: Lens.Lens' ListTimelineEvents (Prelude.Maybe SortOrder)
listTimelineEvents_sortOrder :: (Maybe SortOrder -> f (Maybe SortOrder))
-> ListTimelineEvents -> f ListTimelineEvents
listTimelineEvents_sortOrder = (ListTimelineEvents -> Maybe SortOrder)
-> (ListTimelineEvents -> Maybe SortOrder -> ListTimelineEvents)
-> Lens
ListTimelineEvents
ListTimelineEvents
(Maybe SortOrder)
(Maybe SortOrder)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTimelineEvents' {Maybe SortOrder
sortOrder :: Maybe SortOrder
$sel:sortOrder:ListTimelineEvents' :: ListTimelineEvents -> Maybe SortOrder
sortOrder} -> Maybe SortOrder
sortOrder) (\s :: ListTimelineEvents
s@ListTimelineEvents' {} Maybe SortOrder
a -> ListTimelineEvents
s {$sel:sortOrder:ListTimelineEvents' :: Maybe SortOrder
sortOrder = Maybe SortOrder
a} :: ListTimelineEvents)
listTimelineEvents_nextToken :: Lens.Lens' ListTimelineEvents (Prelude.Maybe Prelude.Text)
listTimelineEvents_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListTimelineEvents -> f ListTimelineEvents
listTimelineEvents_nextToken = (ListTimelineEvents -> Maybe Text)
-> (ListTimelineEvents -> Maybe Text -> ListTimelineEvents)
-> Lens
ListTimelineEvents ListTimelineEvents (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTimelineEvents' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListTimelineEvents' :: ListTimelineEvents -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListTimelineEvents
s@ListTimelineEvents' {} Maybe Text
a -> ListTimelineEvents
s {$sel:nextToken:ListTimelineEvents' :: Maybe Text
nextToken = Maybe Text
a} :: ListTimelineEvents)
listTimelineEvents_maxResults :: Lens.Lens' ListTimelineEvents (Prelude.Maybe Prelude.Natural)
listTimelineEvents_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListTimelineEvents -> f ListTimelineEvents
listTimelineEvents_maxResults = (ListTimelineEvents -> Maybe Natural)
-> (ListTimelineEvents -> Maybe Natural -> ListTimelineEvents)
-> Lens
ListTimelineEvents
ListTimelineEvents
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTimelineEvents' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListTimelineEvents' :: ListTimelineEvents -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListTimelineEvents
s@ListTimelineEvents' {} Maybe Natural
a -> ListTimelineEvents
s {$sel:maxResults:ListTimelineEvents' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListTimelineEvents)
listTimelineEvents_sortBy :: Lens.Lens' ListTimelineEvents (Prelude.Maybe TimelineEventSort)
listTimelineEvents_sortBy :: (Maybe TimelineEventSort -> f (Maybe TimelineEventSort))
-> ListTimelineEvents -> f ListTimelineEvents
listTimelineEvents_sortBy = (ListTimelineEvents -> Maybe TimelineEventSort)
-> (ListTimelineEvents
-> Maybe TimelineEventSort -> ListTimelineEvents)
-> Lens
ListTimelineEvents
ListTimelineEvents
(Maybe TimelineEventSort)
(Maybe TimelineEventSort)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTimelineEvents' {Maybe TimelineEventSort
sortBy :: Maybe TimelineEventSort
$sel:sortBy:ListTimelineEvents' :: ListTimelineEvents -> Maybe TimelineEventSort
sortBy} -> Maybe TimelineEventSort
sortBy) (\s :: ListTimelineEvents
s@ListTimelineEvents' {} Maybe TimelineEventSort
a -> ListTimelineEvents
s {$sel:sortBy:ListTimelineEvents' :: Maybe TimelineEventSort
sortBy = Maybe TimelineEventSort
a} :: ListTimelineEvents)
listTimelineEvents_incidentRecordArn :: Lens.Lens' ListTimelineEvents Prelude.Text
listTimelineEvents_incidentRecordArn :: (Text -> f Text) -> ListTimelineEvents -> f ListTimelineEvents
listTimelineEvents_incidentRecordArn = (ListTimelineEvents -> Text)
-> (ListTimelineEvents -> Text -> ListTimelineEvents)
-> Lens ListTimelineEvents ListTimelineEvents Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTimelineEvents' {Text
incidentRecordArn :: Text
$sel:incidentRecordArn:ListTimelineEvents' :: ListTimelineEvents -> Text
incidentRecordArn} -> Text
incidentRecordArn) (\s :: ListTimelineEvents
s@ListTimelineEvents' {} Text
a -> ListTimelineEvents
s {$sel:incidentRecordArn:ListTimelineEvents' :: Text
incidentRecordArn = Text
a} :: ListTimelineEvents)
instance Core.AWSPager ListTimelineEvents where
page :: ListTimelineEvents
-> AWSResponse ListTimelineEvents -> Maybe ListTimelineEvents
page ListTimelineEvents
rq AWSResponse ListTimelineEvents
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListTimelineEvents
ListTimelineEventsResponse
rs
ListTimelineEventsResponse
-> Getting (First Text) ListTimelineEventsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListTimelineEventsResponse
-> Const (First Text) ListTimelineEventsResponse
Lens' ListTimelineEventsResponse (Maybe Text)
listTimelineEventsResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListTimelineEventsResponse
-> Const (First Text) ListTimelineEventsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListTimelineEventsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe ListTimelineEvents
forall a. Maybe a
Prelude.Nothing
| [EventSummary] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListTimelineEvents
ListTimelineEventsResponse
rs
ListTimelineEventsResponse
-> Getting [EventSummary] ListTimelineEventsResponse [EventSummary]
-> [EventSummary]
forall s a. s -> Getting a s a -> a
Lens.^. Getting [EventSummary] ListTimelineEventsResponse [EventSummary]
Lens' ListTimelineEventsResponse [EventSummary]
listTimelineEventsResponse_eventSummaries
) =
Maybe ListTimelineEvents
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
ListTimelineEvents -> Maybe ListTimelineEvents
forall a. a -> Maybe a
Prelude.Just (ListTimelineEvents -> Maybe ListTimelineEvents)
-> ListTimelineEvents -> Maybe ListTimelineEvents
forall a b. (a -> b) -> a -> b
Prelude.$
ListTimelineEvents
rq
ListTimelineEvents
-> (ListTimelineEvents -> ListTimelineEvents) -> ListTimelineEvents
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListTimelineEvents -> Identity ListTimelineEvents
Lens
ListTimelineEvents ListTimelineEvents (Maybe Text) (Maybe Text)
listTimelineEvents_nextToken
((Maybe Text -> Identity (Maybe Text))
-> ListTimelineEvents -> Identity ListTimelineEvents)
-> Maybe Text -> ListTimelineEvents -> ListTimelineEvents
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListTimelineEvents
ListTimelineEventsResponse
rs
ListTimelineEventsResponse
-> Getting (First Text) ListTimelineEventsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListTimelineEventsResponse
-> Const (First Text) ListTimelineEventsResponse
Lens' ListTimelineEventsResponse (Maybe Text)
listTimelineEventsResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListTimelineEventsResponse
-> Const (First Text) ListTimelineEventsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListTimelineEventsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
instance Core.AWSRequest ListTimelineEvents where
type
AWSResponse ListTimelineEvents =
ListTimelineEventsResponse
request :: ListTimelineEvents -> Request ListTimelineEvents
request = Service -> ListTimelineEvents -> Request ListTimelineEvents
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy ListTimelineEvents
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListTimelineEvents)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse ListTimelineEvents))
-> Logger
-> Service
-> Proxy ListTimelineEvents
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListTimelineEvents)))
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 -> Int -> [EventSummary] -> ListTimelineEventsResponse
ListTimelineEventsResponse'
(Maybe Text -> Int -> [EventSummary] -> ListTimelineEventsResponse)
-> Either String (Maybe Text)
-> Either
String (Int -> [EventSummary] -> ListTimelineEventsResponse)
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 (Int -> [EventSummary] -> ListTimelineEventsResponse)
-> Either String Int
-> Either String ([EventSummary] -> ListTimelineEventsResponse)
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))
Either String ([EventSummary] -> ListTimelineEventsResponse)
-> Either String [EventSummary]
-> Either String ListTimelineEventsResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Either String (Maybe [EventSummary])
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"eventSummaries"
Either String (Maybe [EventSummary])
-> [EventSummary] -> Either String [EventSummary]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [EventSummary]
forall a. Monoid a => a
Prelude.mempty
)
)
instance Prelude.Hashable ListTimelineEvents
instance Prelude.NFData ListTimelineEvents
instance Core.ToHeaders ListTimelineEvents where
toHeaders :: ListTimelineEvents -> ResponseHeaders
toHeaders =
ResponseHeaders -> ListTimelineEvents -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ 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 ListTimelineEvents where
toJSON :: ListTimelineEvents -> Value
toJSON ListTimelineEvents' {Maybe Natural
Maybe [Filter]
Maybe Text
Maybe SortOrder
Maybe TimelineEventSort
Text
incidentRecordArn :: Text
sortBy :: Maybe TimelineEventSort
maxResults :: Maybe Natural
nextToken :: Maybe Text
sortOrder :: Maybe SortOrder
filters :: Maybe [Filter]
$sel:incidentRecordArn:ListTimelineEvents' :: ListTimelineEvents -> Text
$sel:sortBy:ListTimelineEvents' :: ListTimelineEvents -> Maybe TimelineEventSort
$sel:maxResults:ListTimelineEvents' :: ListTimelineEvents -> Maybe Natural
$sel:nextToken:ListTimelineEvents' :: ListTimelineEvents -> Maybe Text
$sel:sortOrder:ListTimelineEvents' :: ListTimelineEvents -> Maybe SortOrder
$sel:filters:ListTimelineEvents' :: ListTimelineEvents -> Maybe [Filter]
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"filters" Text -> [Filter] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Filter] -> Pair) -> Maybe [Filter] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Filter]
filters,
(Text
"sortOrder" Text -> SortOrder -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (SortOrder -> Pair) -> Maybe SortOrder -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SortOrder
sortOrder,
(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
"maxResults" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
(Text
"sortBy" Text -> TimelineEventSort -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (TimelineEventSort -> Pair)
-> Maybe TimelineEventSort -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TimelineEventSort
sortBy,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"incidentRecordArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
incidentRecordArn)
]
)
instance Core.ToPath ListTimelineEvents where
toPath :: ListTimelineEvents -> ByteString
toPath = ByteString -> ListTimelineEvents -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/listTimelineEvents"
instance Core.ToQuery ListTimelineEvents where
toQuery :: ListTimelineEvents -> QueryString
toQuery = QueryString -> ListTimelineEvents -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data ListTimelineEventsResponse = ListTimelineEventsResponse'
{
ListTimelineEventsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListTimelineEventsResponse -> Int
httpStatus :: Prelude.Int,
ListTimelineEventsResponse -> [EventSummary]
eventSummaries :: [EventSummary]
}
deriving (ListTimelineEventsResponse -> ListTimelineEventsResponse -> Bool
(ListTimelineEventsResponse -> ListTimelineEventsResponse -> Bool)
-> (ListTimelineEventsResponse
-> ListTimelineEventsResponse -> Bool)
-> Eq ListTimelineEventsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListTimelineEventsResponse -> ListTimelineEventsResponse -> Bool
$c/= :: ListTimelineEventsResponse -> ListTimelineEventsResponse -> Bool
== :: ListTimelineEventsResponse -> ListTimelineEventsResponse -> Bool
$c== :: ListTimelineEventsResponse -> ListTimelineEventsResponse -> Bool
Prelude.Eq, ReadPrec [ListTimelineEventsResponse]
ReadPrec ListTimelineEventsResponse
Int -> ReadS ListTimelineEventsResponse
ReadS [ListTimelineEventsResponse]
(Int -> ReadS ListTimelineEventsResponse)
-> ReadS [ListTimelineEventsResponse]
-> ReadPrec ListTimelineEventsResponse
-> ReadPrec [ListTimelineEventsResponse]
-> Read ListTimelineEventsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListTimelineEventsResponse]
$creadListPrec :: ReadPrec [ListTimelineEventsResponse]
readPrec :: ReadPrec ListTimelineEventsResponse
$creadPrec :: ReadPrec ListTimelineEventsResponse
readList :: ReadS [ListTimelineEventsResponse]
$creadList :: ReadS [ListTimelineEventsResponse]
readsPrec :: Int -> ReadS ListTimelineEventsResponse
$creadsPrec :: Int -> ReadS ListTimelineEventsResponse
Prelude.Read, Int -> ListTimelineEventsResponse -> ShowS
[ListTimelineEventsResponse] -> ShowS
ListTimelineEventsResponse -> String
(Int -> ListTimelineEventsResponse -> ShowS)
-> (ListTimelineEventsResponse -> String)
-> ([ListTimelineEventsResponse] -> ShowS)
-> Show ListTimelineEventsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListTimelineEventsResponse] -> ShowS
$cshowList :: [ListTimelineEventsResponse] -> ShowS
show :: ListTimelineEventsResponse -> String
$cshow :: ListTimelineEventsResponse -> String
showsPrec :: Int -> ListTimelineEventsResponse -> ShowS
$cshowsPrec :: Int -> ListTimelineEventsResponse -> ShowS
Prelude.Show, (forall x.
ListTimelineEventsResponse -> Rep ListTimelineEventsResponse x)
-> (forall x.
Rep ListTimelineEventsResponse x -> ListTimelineEventsResponse)
-> Generic ListTimelineEventsResponse
forall x.
Rep ListTimelineEventsResponse x -> ListTimelineEventsResponse
forall x.
ListTimelineEventsResponse -> Rep ListTimelineEventsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListTimelineEventsResponse x -> ListTimelineEventsResponse
$cfrom :: forall x.
ListTimelineEventsResponse -> Rep ListTimelineEventsResponse x
Prelude.Generic)
newListTimelineEventsResponse ::
Prelude.Int ->
ListTimelineEventsResponse
newListTimelineEventsResponse :: Int -> ListTimelineEventsResponse
newListTimelineEventsResponse Int
pHttpStatus_ =
ListTimelineEventsResponse' :: Maybe Text -> Int -> [EventSummary] -> ListTimelineEventsResponse
ListTimelineEventsResponse'
{ $sel:nextToken:ListTimelineEventsResponse' :: Maybe Text
nextToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListTimelineEventsResponse' :: Int
httpStatus = Int
pHttpStatus_,
$sel:eventSummaries:ListTimelineEventsResponse' :: [EventSummary]
eventSummaries = [EventSummary]
forall a. Monoid a => a
Prelude.mempty
}
listTimelineEventsResponse_nextToken :: Lens.Lens' ListTimelineEventsResponse (Prelude.Maybe Prelude.Text)
listTimelineEventsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListTimelineEventsResponse -> f ListTimelineEventsResponse
listTimelineEventsResponse_nextToken = (ListTimelineEventsResponse -> Maybe Text)
-> (ListTimelineEventsResponse
-> Maybe Text -> ListTimelineEventsResponse)
-> Lens' ListTimelineEventsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTimelineEventsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListTimelineEventsResponse' :: ListTimelineEventsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListTimelineEventsResponse
s@ListTimelineEventsResponse' {} Maybe Text
a -> ListTimelineEventsResponse
s {$sel:nextToken:ListTimelineEventsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListTimelineEventsResponse)
listTimelineEventsResponse_httpStatus :: Lens.Lens' ListTimelineEventsResponse Prelude.Int
listTimelineEventsResponse_httpStatus :: (Int -> f Int)
-> ListTimelineEventsResponse -> f ListTimelineEventsResponse
listTimelineEventsResponse_httpStatus = (ListTimelineEventsResponse -> Int)
-> (ListTimelineEventsResponse
-> Int -> ListTimelineEventsResponse)
-> Lens
ListTimelineEventsResponse ListTimelineEventsResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTimelineEventsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListTimelineEventsResponse' :: ListTimelineEventsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListTimelineEventsResponse
s@ListTimelineEventsResponse' {} Int
a -> ListTimelineEventsResponse
s {$sel:httpStatus:ListTimelineEventsResponse' :: Int
httpStatus = Int
a} :: ListTimelineEventsResponse)
listTimelineEventsResponse_eventSummaries :: Lens.Lens' ListTimelineEventsResponse [EventSummary]
listTimelineEventsResponse_eventSummaries :: ([EventSummary] -> f [EventSummary])
-> ListTimelineEventsResponse -> f ListTimelineEventsResponse
listTimelineEventsResponse_eventSummaries = (ListTimelineEventsResponse -> [EventSummary])
-> (ListTimelineEventsResponse
-> [EventSummary] -> ListTimelineEventsResponse)
-> Lens' ListTimelineEventsResponse [EventSummary]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTimelineEventsResponse' {[EventSummary]
eventSummaries :: [EventSummary]
$sel:eventSummaries:ListTimelineEventsResponse' :: ListTimelineEventsResponse -> [EventSummary]
eventSummaries} -> [EventSummary]
eventSummaries) (\s :: ListTimelineEventsResponse
s@ListTimelineEventsResponse' {} [EventSummary]
a -> ListTimelineEventsResponse
s {$sel:eventSummaries:ListTimelineEventsResponse' :: [EventSummary]
eventSummaries = [EventSummary]
a} :: ListTimelineEventsResponse) (([EventSummary] -> f [EventSummary])
-> ListTimelineEventsResponse -> f ListTimelineEventsResponse)
-> (([EventSummary] -> f [EventSummary])
-> [EventSummary] -> f [EventSummary])
-> ([EventSummary] -> f [EventSummary])
-> ListTimelineEventsResponse
-> f ListTimelineEventsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([EventSummary] -> f [EventSummary])
-> [EventSummary] -> f [EventSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Prelude.NFData ListTimelineEventsResponse