{-# 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.ListIncidentRecords
(
ListIncidentRecords (..),
newListIncidentRecords,
listIncidentRecords_filters,
listIncidentRecords_nextToken,
listIncidentRecords_maxResults,
ListIncidentRecordsResponse (..),
newListIncidentRecordsResponse,
listIncidentRecordsResponse_nextToken,
listIncidentRecordsResponse_httpStatus,
listIncidentRecordsResponse_incidentRecordSummaries,
)
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 ListIncidentRecords = ListIncidentRecords'
{
ListIncidentRecords -> Maybe [Filter]
filters :: Prelude.Maybe [Filter],
ListIncidentRecords -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListIncidentRecords -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
}
deriving (ListIncidentRecords -> ListIncidentRecords -> Bool
(ListIncidentRecords -> ListIncidentRecords -> Bool)
-> (ListIncidentRecords -> ListIncidentRecords -> Bool)
-> Eq ListIncidentRecords
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListIncidentRecords -> ListIncidentRecords -> Bool
$c/= :: ListIncidentRecords -> ListIncidentRecords -> Bool
== :: ListIncidentRecords -> ListIncidentRecords -> Bool
$c== :: ListIncidentRecords -> ListIncidentRecords -> Bool
Prelude.Eq, ReadPrec [ListIncidentRecords]
ReadPrec ListIncidentRecords
Int -> ReadS ListIncidentRecords
ReadS [ListIncidentRecords]
(Int -> ReadS ListIncidentRecords)
-> ReadS [ListIncidentRecords]
-> ReadPrec ListIncidentRecords
-> ReadPrec [ListIncidentRecords]
-> Read ListIncidentRecords
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListIncidentRecords]
$creadListPrec :: ReadPrec [ListIncidentRecords]
readPrec :: ReadPrec ListIncidentRecords
$creadPrec :: ReadPrec ListIncidentRecords
readList :: ReadS [ListIncidentRecords]
$creadList :: ReadS [ListIncidentRecords]
readsPrec :: Int -> ReadS ListIncidentRecords
$creadsPrec :: Int -> ReadS ListIncidentRecords
Prelude.Read, Int -> ListIncidentRecords -> ShowS
[ListIncidentRecords] -> ShowS
ListIncidentRecords -> String
(Int -> ListIncidentRecords -> ShowS)
-> (ListIncidentRecords -> String)
-> ([ListIncidentRecords] -> ShowS)
-> Show ListIncidentRecords
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListIncidentRecords] -> ShowS
$cshowList :: [ListIncidentRecords] -> ShowS
show :: ListIncidentRecords -> String
$cshow :: ListIncidentRecords -> String
showsPrec :: Int -> ListIncidentRecords -> ShowS
$cshowsPrec :: Int -> ListIncidentRecords -> ShowS
Prelude.Show, (forall x. ListIncidentRecords -> Rep ListIncidentRecords x)
-> (forall x. Rep ListIncidentRecords x -> ListIncidentRecords)
-> Generic ListIncidentRecords
forall x. Rep ListIncidentRecords x -> ListIncidentRecords
forall x. ListIncidentRecords -> Rep ListIncidentRecords x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListIncidentRecords x -> ListIncidentRecords
$cfrom :: forall x. ListIncidentRecords -> Rep ListIncidentRecords x
Prelude.Generic)
newListIncidentRecords ::
ListIncidentRecords
newListIncidentRecords :: ListIncidentRecords
newListIncidentRecords =
ListIncidentRecords' :: Maybe [Filter]
-> Maybe Text -> Maybe Natural -> ListIncidentRecords
ListIncidentRecords'
{ $sel:filters:ListIncidentRecords' :: Maybe [Filter]
filters = Maybe [Filter]
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListIncidentRecords' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:ListIncidentRecords' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
}
listIncidentRecords_filters :: Lens.Lens' ListIncidentRecords (Prelude.Maybe [Filter])
listIncidentRecords_filters :: (Maybe [Filter] -> f (Maybe [Filter]))
-> ListIncidentRecords -> f ListIncidentRecords
listIncidentRecords_filters = (ListIncidentRecords -> Maybe [Filter])
-> (ListIncidentRecords -> Maybe [Filter] -> ListIncidentRecords)
-> Lens
ListIncidentRecords
ListIncidentRecords
(Maybe [Filter])
(Maybe [Filter])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListIncidentRecords' {Maybe [Filter]
filters :: Maybe [Filter]
$sel:filters:ListIncidentRecords' :: ListIncidentRecords -> Maybe [Filter]
filters} -> Maybe [Filter]
filters) (\s :: ListIncidentRecords
s@ListIncidentRecords' {} Maybe [Filter]
a -> ListIncidentRecords
s {$sel:filters:ListIncidentRecords' :: Maybe [Filter]
filters = Maybe [Filter]
a} :: ListIncidentRecords) ((Maybe [Filter] -> f (Maybe [Filter]))
-> ListIncidentRecords -> f ListIncidentRecords)
-> ((Maybe [Filter] -> f (Maybe [Filter]))
-> Maybe [Filter] -> f (Maybe [Filter]))
-> (Maybe [Filter] -> f (Maybe [Filter]))
-> ListIncidentRecords
-> f ListIncidentRecords
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
listIncidentRecords_nextToken :: Lens.Lens' ListIncidentRecords (Prelude.Maybe Prelude.Text)
listIncidentRecords_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListIncidentRecords -> f ListIncidentRecords
listIncidentRecords_nextToken = (ListIncidentRecords -> Maybe Text)
-> (ListIncidentRecords -> Maybe Text -> ListIncidentRecords)
-> Lens
ListIncidentRecords ListIncidentRecords (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListIncidentRecords' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListIncidentRecords' :: ListIncidentRecords -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListIncidentRecords
s@ListIncidentRecords' {} Maybe Text
a -> ListIncidentRecords
s {$sel:nextToken:ListIncidentRecords' :: Maybe Text
nextToken = Maybe Text
a} :: ListIncidentRecords)
listIncidentRecords_maxResults :: Lens.Lens' ListIncidentRecords (Prelude.Maybe Prelude.Natural)
listIncidentRecords_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListIncidentRecords -> f ListIncidentRecords
listIncidentRecords_maxResults = (ListIncidentRecords -> Maybe Natural)
-> (ListIncidentRecords -> Maybe Natural -> ListIncidentRecords)
-> Lens
ListIncidentRecords
ListIncidentRecords
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListIncidentRecords' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListIncidentRecords' :: ListIncidentRecords -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListIncidentRecords
s@ListIncidentRecords' {} Maybe Natural
a -> ListIncidentRecords
s {$sel:maxResults:ListIncidentRecords' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListIncidentRecords)
instance Core.AWSPager ListIncidentRecords where
page :: ListIncidentRecords
-> AWSResponse ListIncidentRecords -> Maybe ListIncidentRecords
page ListIncidentRecords
rq AWSResponse ListIncidentRecords
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListIncidentRecords
ListIncidentRecordsResponse
rs
ListIncidentRecordsResponse
-> Getting (First Text) ListIncidentRecordsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListIncidentRecordsResponse
-> Const (First Text) ListIncidentRecordsResponse
Lens' ListIncidentRecordsResponse (Maybe Text)
listIncidentRecordsResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListIncidentRecordsResponse
-> Const (First Text) ListIncidentRecordsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListIncidentRecordsResponse 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 ListIncidentRecords
forall a. Maybe a
Prelude.Nothing
| [IncidentRecordSummary] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListIncidentRecords
ListIncidentRecordsResponse
rs
ListIncidentRecordsResponse
-> Getting
[IncidentRecordSummary]
ListIncidentRecordsResponse
[IncidentRecordSummary]
-> [IncidentRecordSummary]
forall s a. s -> Getting a s a -> a
Lens.^. Getting
[IncidentRecordSummary]
ListIncidentRecordsResponse
[IncidentRecordSummary]
Lens' ListIncidentRecordsResponse [IncidentRecordSummary]
listIncidentRecordsResponse_incidentRecordSummaries
) =
Maybe ListIncidentRecords
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
ListIncidentRecords -> Maybe ListIncidentRecords
forall a. a -> Maybe a
Prelude.Just (ListIncidentRecords -> Maybe ListIncidentRecords)
-> ListIncidentRecords -> Maybe ListIncidentRecords
forall a b. (a -> b) -> a -> b
Prelude.$
ListIncidentRecords
rq
ListIncidentRecords
-> (ListIncidentRecords -> ListIncidentRecords)
-> ListIncidentRecords
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListIncidentRecords -> Identity ListIncidentRecords
Lens
ListIncidentRecords ListIncidentRecords (Maybe Text) (Maybe Text)
listIncidentRecords_nextToken
((Maybe Text -> Identity (Maybe Text))
-> ListIncidentRecords -> Identity ListIncidentRecords)
-> Maybe Text -> ListIncidentRecords -> ListIncidentRecords
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListIncidentRecords
ListIncidentRecordsResponse
rs
ListIncidentRecordsResponse
-> Getting (First Text) ListIncidentRecordsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListIncidentRecordsResponse
-> Const (First Text) ListIncidentRecordsResponse
Lens' ListIncidentRecordsResponse (Maybe Text)
listIncidentRecordsResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListIncidentRecordsResponse
-> Const (First Text) ListIncidentRecordsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListIncidentRecordsResponse 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 ListIncidentRecords where
type
AWSResponse ListIncidentRecords =
ListIncidentRecordsResponse
request :: ListIncidentRecords -> Request ListIncidentRecords
request = Service -> ListIncidentRecords -> Request ListIncidentRecords
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy ListIncidentRecords
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListIncidentRecords)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse ListIncidentRecords))
-> Logger
-> Service
-> Proxy ListIncidentRecords
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListIncidentRecords)))
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 -> [IncidentRecordSummary] -> ListIncidentRecordsResponse
ListIncidentRecordsResponse'
(Maybe Text
-> Int -> [IncidentRecordSummary] -> ListIncidentRecordsResponse)
-> Either String (Maybe Text)
-> Either
String
(Int -> [IncidentRecordSummary] -> ListIncidentRecordsResponse)
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 -> [IncidentRecordSummary] -> ListIncidentRecordsResponse)
-> Either String Int
-> Either
String ([IncidentRecordSummary] -> ListIncidentRecordsResponse)
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 ([IncidentRecordSummary] -> ListIncidentRecordsResponse)
-> Either String [IncidentRecordSummary]
-> Either String ListIncidentRecordsResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Either String (Maybe [IncidentRecordSummary])
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"incidentRecordSummaries"
Either String (Maybe [IncidentRecordSummary])
-> [IncidentRecordSummary] -> Either String [IncidentRecordSummary]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [IncidentRecordSummary]
forall a. Monoid a => a
Prelude.mempty
)
)
instance Prelude.Hashable ListIncidentRecords
instance Prelude.NFData ListIncidentRecords
instance Core.ToHeaders ListIncidentRecords where
toHeaders :: ListIncidentRecords -> ResponseHeaders
toHeaders =
ResponseHeaders -> ListIncidentRecords -> 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 ListIncidentRecords where
toJSON :: ListIncidentRecords -> Value
toJSON ListIncidentRecords' {Maybe Natural
Maybe [Filter]
Maybe Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
filters :: Maybe [Filter]
$sel:maxResults:ListIncidentRecords' :: ListIncidentRecords -> Maybe Natural
$sel:nextToken:ListIncidentRecords' :: ListIncidentRecords -> Maybe Text
$sel:filters:ListIncidentRecords' :: ListIncidentRecords -> 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
"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
]
)
instance Core.ToPath ListIncidentRecords where
toPath :: ListIncidentRecords -> ByteString
toPath = ByteString -> ListIncidentRecords -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/listIncidentRecords"
instance Core.ToQuery ListIncidentRecords where
toQuery :: ListIncidentRecords -> QueryString
toQuery = QueryString -> ListIncidentRecords -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data ListIncidentRecordsResponse = ListIncidentRecordsResponse'
{
ListIncidentRecordsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListIncidentRecordsResponse -> Int
httpStatus :: Prelude.Int,
ListIncidentRecordsResponse -> [IncidentRecordSummary]
incidentRecordSummaries :: [IncidentRecordSummary]
}
deriving (ListIncidentRecordsResponse -> ListIncidentRecordsResponse -> Bool
(ListIncidentRecordsResponse
-> ListIncidentRecordsResponse -> Bool)
-> (ListIncidentRecordsResponse
-> ListIncidentRecordsResponse -> Bool)
-> Eq ListIncidentRecordsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListIncidentRecordsResponse -> ListIncidentRecordsResponse -> Bool
$c/= :: ListIncidentRecordsResponse -> ListIncidentRecordsResponse -> Bool
== :: ListIncidentRecordsResponse -> ListIncidentRecordsResponse -> Bool
$c== :: ListIncidentRecordsResponse -> ListIncidentRecordsResponse -> Bool
Prelude.Eq, ReadPrec [ListIncidentRecordsResponse]
ReadPrec ListIncidentRecordsResponse
Int -> ReadS ListIncidentRecordsResponse
ReadS [ListIncidentRecordsResponse]
(Int -> ReadS ListIncidentRecordsResponse)
-> ReadS [ListIncidentRecordsResponse]
-> ReadPrec ListIncidentRecordsResponse
-> ReadPrec [ListIncidentRecordsResponse]
-> Read ListIncidentRecordsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListIncidentRecordsResponse]
$creadListPrec :: ReadPrec [ListIncidentRecordsResponse]
readPrec :: ReadPrec ListIncidentRecordsResponse
$creadPrec :: ReadPrec ListIncidentRecordsResponse
readList :: ReadS [ListIncidentRecordsResponse]
$creadList :: ReadS [ListIncidentRecordsResponse]
readsPrec :: Int -> ReadS ListIncidentRecordsResponse
$creadsPrec :: Int -> ReadS ListIncidentRecordsResponse
Prelude.Read, Int -> ListIncidentRecordsResponse -> ShowS
[ListIncidentRecordsResponse] -> ShowS
ListIncidentRecordsResponse -> String
(Int -> ListIncidentRecordsResponse -> ShowS)
-> (ListIncidentRecordsResponse -> String)
-> ([ListIncidentRecordsResponse] -> ShowS)
-> Show ListIncidentRecordsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListIncidentRecordsResponse] -> ShowS
$cshowList :: [ListIncidentRecordsResponse] -> ShowS
show :: ListIncidentRecordsResponse -> String
$cshow :: ListIncidentRecordsResponse -> String
showsPrec :: Int -> ListIncidentRecordsResponse -> ShowS
$cshowsPrec :: Int -> ListIncidentRecordsResponse -> ShowS
Prelude.Show, (forall x.
ListIncidentRecordsResponse -> Rep ListIncidentRecordsResponse x)
-> (forall x.
Rep ListIncidentRecordsResponse x -> ListIncidentRecordsResponse)
-> Generic ListIncidentRecordsResponse
forall x.
Rep ListIncidentRecordsResponse x -> ListIncidentRecordsResponse
forall x.
ListIncidentRecordsResponse -> Rep ListIncidentRecordsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListIncidentRecordsResponse x -> ListIncidentRecordsResponse
$cfrom :: forall x.
ListIncidentRecordsResponse -> Rep ListIncidentRecordsResponse x
Prelude.Generic)
newListIncidentRecordsResponse ::
Prelude.Int ->
ListIncidentRecordsResponse
newListIncidentRecordsResponse :: Int -> ListIncidentRecordsResponse
newListIncidentRecordsResponse Int
pHttpStatus_ =
ListIncidentRecordsResponse' :: Maybe Text
-> Int -> [IncidentRecordSummary] -> ListIncidentRecordsResponse
ListIncidentRecordsResponse'
{ $sel:nextToken:ListIncidentRecordsResponse' :: Maybe Text
nextToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListIncidentRecordsResponse' :: Int
httpStatus = Int
pHttpStatus_,
$sel:incidentRecordSummaries:ListIncidentRecordsResponse' :: [IncidentRecordSummary]
incidentRecordSummaries = [IncidentRecordSummary]
forall a. Monoid a => a
Prelude.mempty
}
listIncidentRecordsResponse_nextToken :: Lens.Lens' ListIncidentRecordsResponse (Prelude.Maybe Prelude.Text)
listIncidentRecordsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListIncidentRecordsResponse -> f ListIncidentRecordsResponse
listIncidentRecordsResponse_nextToken = (ListIncidentRecordsResponse -> Maybe Text)
-> (ListIncidentRecordsResponse
-> Maybe Text -> ListIncidentRecordsResponse)
-> Lens' ListIncidentRecordsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListIncidentRecordsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListIncidentRecordsResponse' :: ListIncidentRecordsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListIncidentRecordsResponse
s@ListIncidentRecordsResponse' {} Maybe Text
a -> ListIncidentRecordsResponse
s {$sel:nextToken:ListIncidentRecordsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListIncidentRecordsResponse)
listIncidentRecordsResponse_httpStatus :: Lens.Lens' ListIncidentRecordsResponse Prelude.Int
listIncidentRecordsResponse_httpStatus :: (Int -> f Int)
-> ListIncidentRecordsResponse -> f ListIncidentRecordsResponse
listIncidentRecordsResponse_httpStatus = (ListIncidentRecordsResponse -> Int)
-> (ListIncidentRecordsResponse
-> Int -> ListIncidentRecordsResponse)
-> Lens
ListIncidentRecordsResponse ListIncidentRecordsResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListIncidentRecordsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListIncidentRecordsResponse' :: ListIncidentRecordsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListIncidentRecordsResponse
s@ListIncidentRecordsResponse' {} Int
a -> ListIncidentRecordsResponse
s {$sel:httpStatus:ListIncidentRecordsResponse' :: Int
httpStatus = Int
a} :: ListIncidentRecordsResponse)
listIncidentRecordsResponse_incidentRecordSummaries :: Lens.Lens' ListIncidentRecordsResponse [IncidentRecordSummary]
listIncidentRecordsResponse_incidentRecordSummaries :: ([IncidentRecordSummary] -> f [IncidentRecordSummary])
-> ListIncidentRecordsResponse -> f ListIncidentRecordsResponse
listIncidentRecordsResponse_incidentRecordSummaries = (ListIncidentRecordsResponse -> [IncidentRecordSummary])
-> (ListIncidentRecordsResponse
-> [IncidentRecordSummary] -> ListIncidentRecordsResponse)
-> Lens' ListIncidentRecordsResponse [IncidentRecordSummary]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListIncidentRecordsResponse' {[IncidentRecordSummary]
incidentRecordSummaries :: [IncidentRecordSummary]
$sel:incidentRecordSummaries:ListIncidentRecordsResponse' :: ListIncidentRecordsResponse -> [IncidentRecordSummary]
incidentRecordSummaries} -> [IncidentRecordSummary]
incidentRecordSummaries) (\s :: ListIncidentRecordsResponse
s@ListIncidentRecordsResponse' {} [IncidentRecordSummary]
a -> ListIncidentRecordsResponse
s {$sel:incidentRecordSummaries:ListIncidentRecordsResponse' :: [IncidentRecordSummary]
incidentRecordSummaries = [IncidentRecordSummary]
a} :: ListIncidentRecordsResponse) (([IncidentRecordSummary] -> f [IncidentRecordSummary])
-> ListIncidentRecordsResponse -> f ListIncidentRecordsResponse)
-> (([IncidentRecordSummary] -> f [IncidentRecordSummary])
-> [IncidentRecordSummary] -> f [IncidentRecordSummary])
-> ([IncidentRecordSummary] -> f [IncidentRecordSummary])
-> ListIncidentRecordsResponse
-> f ListIncidentRecordsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([IncidentRecordSummary] -> f [IncidentRecordSummary])
-> [IncidentRecordSummary] -> f [IncidentRecordSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Prelude.NFData ListIncidentRecordsResponse