{-# 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.CodeCommit.DescribePullRequestEvents
(
DescribePullRequestEvents (..),
newDescribePullRequestEvents,
describePullRequestEvents_pullRequestEventType,
describePullRequestEvents_actorArn,
describePullRequestEvents_nextToken,
describePullRequestEvents_maxResults,
describePullRequestEvents_pullRequestId,
DescribePullRequestEventsResponse (..),
newDescribePullRequestEventsResponse,
describePullRequestEventsResponse_nextToken,
describePullRequestEventsResponse_httpStatus,
describePullRequestEventsResponse_pullRequestEvents,
)
where
import Amazonka.CodeCommit.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 DescribePullRequestEvents = DescribePullRequestEvents'
{
DescribePullRequestEvents -> Maybe PullRequestEventType
pullRequestEventType :: Prelude.Maybe PullRequestEventType,
DescribePullRequestEvents -> Maybe Text
actorArn :: Prelude.Maybe Prelude.Text,
DescribePullRequestEvents -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribePullRequestEvents -> Maybe Int
maxResults :: Prelude.Maybe Prelude.Int,
DescribePullRequestEvents -> Text
pullRequestId :: Prelude.Text
}
deriving (DescribePullRequestEvents -> DescribePullRequestEvents -> Bool
(DescribePullRequestEvents -> DescribePullRequestEvents -> Bool)
-> (DescribePullRequestEvents -> DescribePullRequestEvents -> Bool)
-> Eq DescribePullRequestEvents
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribePullRequestEvents -> DescribePullRequestEvents -> Bool
$c/= :: DescribePullRequestEvents -> DescribePullRequestEvents -> Bool
== :: DescribePullRequestEvents -> DescribePullRequestEvents -> Bool
$c== :: DescribePullRequestEvents -> DescribePullRequestEvents -> Bool
Prelude.Eq, ReadPrec [DescribePullRequestEvents]
ReadPrec DescribePullRequestEvents
Int -> ReadS DescribePullRequestEvents
ReadS [DescribePullRequestEvents]
(Int -> ReadS DescribePullRequestEvents)
-> ReadS [DescribePullRequestEvents]
-> ReadPrec DescribePullRequestEvents
-> ReadPrec [DescribePullRequestEvents]
-> Read DescribePullRequestEvents
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribePullRequestEvents]
$creadListPrec :: ReadPrec [DescribePullRequestEvents]
readPrec :: ReadPrec DescribePullRequestEvents
$creadPrec :: ReadPrec DescribePullRequestEvents
readList :: ReadS [DescribePullRequestEvents]
$creadList :: ReadS [DescribePullRequestEvents]
readsPrec :: Int -> ReadS DescribePullRequestEvents
$creadsPrec :: Int -> ReadS DescribePullRequestEvents
Prelude.Read, Int -> DescribePullRequestEvents -> ShowS
[DescribePullRequestEvents] -> ShowS
DescribePullRequestEvents -> String
(Int -> DescribePullRequestEvents -> ShowS)
-> (DescribePullRequestEvents -> String)
-> ([DescribePullRequestEvents] -> ShowS)
-> Show DescribePullRequestEvents
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribePullRequestEvents] -> ShowS
$cshowList :: [DescribePullRequestEvents] -> ShowS
show :: DescribePullRequestEvents -> String
$cshow :: DescribePullRequestEvents -> String
showsPrec :: Int -> DescribePullRequestEvents -> ShowS
$cshowsPrec :: Int -> DescribePullRequestEvents -> ShowS
Prelude.Show, (forall x.
DescribePullRequestEvents -> Rep DescribePullRequestEvents x)
-> (forall x.
Rep DescribePullRequestEvents x -> DescribePullRequestEvents)
-> Generic DescribePullRequestEvents
forall x.
Rep DescribePullRequestEvents x -> DescribePullRequestEvents
forall x.
DescribePullRequestEvents -> Rep DescribePullRequestEvents x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribePullRequestEvents x -> DescribePullRequestEvents
$cfrom :: forall x.
DescribePullRequestEvents -> Rep DescribePullRequestEvents x
Prelude.Generic)
newDescribePullRequestEvents ::
Prelude.Text ->
DescribePullRequestEvents
newDescribePullRequestEvents :: Text -> DescribePullRequestEvents
newDescribePullRequestEvents Text
pPullRequestId_ =
DescribePullRequestEvents' :: Maybe PullRequestEventType
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Text
-> DescribePullRequestEvents
DescribePullRequestEvents'
{ $sel:pullRequestEventType:DescribePullRequestEvents' :: Maybe PullRequestEventType
pullRequestEventType =
Maybe PullRequestEventType
forall a. Maybe a
Prelude.Nothing,
$sel:actorArn:DescribePullRequestEvents' :: Maybe Text
actorArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:DescribePullRequestEvents' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:DescribePullRequestEvents' :: Maybe Int
maxResults = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:pullRequestId:DescribePullRequestEvents' :: Text
pullRequestId = Text
pPullRequestId_
}
describePullRequestEvents_pullRequestEventType :: Lens.Lens' DescribePullRequestEvents (Prelude.Maybe PullRequestEventType)
describePullRequestEvents_pullRequestEventType :: (Maybe PullRequestEventType -> f (Maybe PullRequestEventType))
-> DescribePullRequestEvents -> f DescribePullRequestEvents
describePullRequestEvents_pullRequestEventType = (DescribePullRequestEvents -> Maybe PullRequestEventType)
-> (DescribePullRequestEvents
-> Maybe PullRequestEventType -> DescribePullRequestEvents)
-> Lens
DescribePullRequestEvents
DescribePullRequestEvents
(Maybe PullRequestEventType)
(Maybe PullRequestEventType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePullRequestEvents' {Maybe PullRequestEventType
pullRequestEventType :: Maybe PullRequestEventType
$sel:pullRequestEventType:DescribePullRequestEvents' :: DescribePullRequestEvents -> Maybe PullRequestEventType
pullRequestEventType} -> Maybe PullRequestEventType
pullRequestEventType) (\s :: DescribePullRequestEvents
s@DescribePullRequestEvents' {} Maybe PullRequestEventType
a -> DescribePullRequestEvents
s {$sel:pullRequestEventType:DescribePullRequestEvents' :: Maybe PullRequestEventType
pullRequestEventType = Maybe PullRequestEventType
a} :: DescribePullRequestEvents)
describePullRequestEvents_actorArn :: Lens.Lens' DescribePullRequestEvents (Prelude.Maybe Prelude.Text)
describePullRequestEvents_actorArn :: (Maybe Text -> f (Maybe Text))
-> DescribePullRequestEvents -> f DescribePullRequestEvents
describePullRequestEvents_actorArn = (DescribePullRequestEvents -> Maybe Text)
-> (DescribePullRequestEvents
-> Maybe Text -> DescribePullRequestEvents)
-> Lens
DescribePullRequestEvents
DescribePullRequestEvents
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePullRequestEvents' {Maybe Text
actorArn :: Maybe Text
$sel:actorArn:DescribePullRequestEvents' :: DescribePullRequestEvents -> Maybe Text
actorArn} -> Maybe Text
actorArn) (\s :: DescribePullRequestEvents
s@DescribePullRequestEvents' {} Maybe Text
a -> DescribePullRequestEvents
s {$sel:actorArn:DescribePullRequestEvents' :: Maybe Text
actorArn = Maybe Text
a} :: DescribePullRequestEvents)
describePullRequestEvents_nextToken :: Lens.Lens' DescribePullRequestEvents (Prelude.Maybe Prelude.Text)
describePullRequestEvents_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribePullRequestEvents -> f DescribePullRequestEvents
describePullRequestEvents_nextToken = (DescribePullRequestEvents -> Maybe Text)
-> (DescribePullRequestEvents
-> Maybe Text -> DescribePullRequestEvents)
-> Lens
DescribePullRequestEvents
DescribePullRequestEvents
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePullRequestEvents' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribePullRequestEvents' :: DescribePullRequestEvents -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribePullRequestEvents
s@DescribePullRequestEvents' {} Maybe Text
a -> DescribePullRequestEvents
s {$sel:nextToken:DescribePullRequestEvents' :: Maybe Text
nextToken = Maybe Text
a} :: DescribePullRequestEvents)
describePullRequestEvents_maxResults :: Lens.Lens' DescribePullRequestEvents (Prelude.Maybe Prelude.Int)
describePullRequestEvents_maxResults :: (Maybe Int -> f (Maybe Int))
-> DescribePullRequestEvents -> f DescribePullRequestEvents
describePullRequestEvents_maxResults = (DescribePullRequestEvents -> Maybe Int)
-> (DescribePullRequestEvents
-> Maybe Int -> DescribePullRequestEvents)
-> Lens
DescribePullRequestEvents
DescribePullRequestEvents
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePullRequestEvents' {Maybe Int
maxResults :: Maybe Int
$sel:maxResults:DescribePullRequestEvents' :: DescribePullRequestEvents -> Maybe Int
maxResults} -> Maybe Int
maxResults) (\s :: DescribePullRequestEvents
s@DescribePullRequestEvents' {} Maybe Int
a -> DescribePullRequestEvents
s {$sel:maxResults:DescribePullRequestEvents' :: Maybe Int
maxResults = Maybe Int
a} :: DescribePullRequestEvents)
describePullRequestEvents_pullRequestId :: Lens.Lens' DescribePullRequestEvents Prelude.Text
describePullRequestEvents_pullRequestId :: (Text -> f Text)
-> DescribePullRequestEvents -> f DescribePullRequestEvents
describePullRequestEvents_pullRequestId = (DescribePullRequestEvents -> Text)
-> (DescribePullRequestEvents -> Text -> DescribePullRequestEvents)
-> Lens
DescribePullRequestEvents DescribePullRequestEvents Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePullRequestEvents' {Text
pullRequestId :: Text
$sel:pullRequestId:DescribePullRequestEvents' :: DescribePullRequestEvents -> Text
pullRequestId} -> Text
pullRequestId) (\s :: DescribePullRequestEvents
s@DescribePullRequestEvents' {} Text
a -> DescribePullRequestEvents
s {$sel:pullRequestId:DescribePullRequestEvents' :: Text
pullRequestId = Text
a} :: DescribePullRequestEvents)
instance Core.AWSPager DescribePullRequestEvents where
page :: DescribePullRequestEvents
-> AWSResponse DescribePullRequestEvents
-> Maybe DescribePullRequestEvents
page DescribePullRequestEvents
rq AWSResponse DescribePullRequestEvents
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribePullRequestEvents
DescribePullRequestEventsResponse
rs
DescribePullRequestEventsResponse
-> Getting (First Text) DescribePullRequestEventsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribePullRequestEventsResponse
-> Const (First Text) DescribePullRequestEventsResponse
Lens' DescribePullRequestEventsResponse (Maybe Text)
describePullRequestEventsResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribePullRequestEventsResponse
-> Const (First Text) DescribePullRequestEventsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribePullRequestEventsResponse 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 DescribePullRequestEvents
forall a. Maybe a
Prelude.Nothing
| [PullRequestEvent] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribePullRequestEvents
DescribePullRequestEventsResponse
rs
DescribePullRequestEventsResponse
-> Getting
[PullRequestEvent]
DescribePullRequestEventsResponse
[PullRequestEvent]
-> [PullRequestEvent]
forall s a. s -> Getting a s a -> a
Lens.^. Getting
[PullRequestEvent]
DescribePullRequestEventsResponse
[PullRequestEvent]
Lens' DescribePullRequestEventsResponse [PullRequestEvent]
describePullRequestEventsResponse_pullRequestEvents
) =
Maybe DescribePullRequestEvents
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
DescribePullRequestEvents -> Maybe DescribePullRequestEvents
forall a. a -> Maybe a
Prelude.Just (DescribePullRequestEvents -> Maybe DescribePullRequestEvents)
-> DescribePullRequestEvents -> Maybe DescribePullRequestEvents
forall a b. (a -> b) -> a -> b
Prelude.$
DescribePullRequestEvents
rq
DescribePullRequestEvents
-> (DescribePullRequestEvents -> DescribePullRequestEvents)
-> DescribePullRequestEvents
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> DescribePullRequestEvents -> Identity DescribePullRequestEvents
Lens
DescribePullRequestEvents
DescribePullRequestEvents
(Maybe Text)
(Maybe Text)
describePullRequestEvents_nextToken
((Maybe Text -> Identity (Maybe Text))
-> DescribePullRequestEvents -> Identity DescribePullRequestEvents)
-> Maybe Text
-> DescribePullRequestEvents
-> DescribePullRequestEvents
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribePullRequestEvents
DescribePullRequestEventsResponse
rs
DescribePullRequestEventsResponse
-> Getting (First Text) DescribePullRequestEventsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribePullRequestEventsResponse
-> Const (First Text) DescribePullRequestEventsResponse
Lens' DescribePullRequestEventsResponse (Maybe Text)
describePullRequestEventsResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribePullRequestEventsResponse
-> Const (First Text) DescribePullRequestEventsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribePullRequestEventsResponse 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 DescribePullRequestEvents where
type
AWSResponse DescribePullRequestEvents =
DescribePullRequestEventsResponse
request :: DescribePullRequestEvents -> Request DescribePullRequestEvents
request = Service
-> DescribePullRequestEvents -> Request DescribePullRequestEvents
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DescribePullRequestEvents
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribePullRequestEvents)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse DescribePullRequestEvents))
-> Logger
-> Service
-> Proxy DescribePullRequestEvents
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribePullRequestEvents)))
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 -> [PullRequestEvent] -> DescribePullRequestEventsResponse
DescribePullRequestEventsResponse'
(Maybe Text
-> Int -> [PullRequestEvent] -> DescribePullRequestEventsResponse)
-> Either String (Maybe Text)
-> Either
String
(Int -> [PullRequestEvent] -> DescribePullRequestEventsResponse)
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 -> [PullRequestEvent] -> DescribePullRequestEventsResponse)
-> Either String Int
-> Either
String ([PullRequestEvent] -> DescribePullRequestEventsResponse)
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 ([PullRequestEvent] -> DescribePullRequestEventsResponse)
-> Either String [PullRequestEvent]
-> Either String DescribePullRequestEventsResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Either String (Maybe [PullRequestEvent])
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"pullRequestEvents"
Either String (Maybe [PullRequestEvent])
-> [PullRequestEvent] -> Either String [PullRequestEvent]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [PullRequestEvent]
forall a. Monoid a => a
Prelude.mempty
)
)
instance Prelude.Hashable DescribePullRequestEvents
instance Prelude.NFData DescribePullRequestEvents
instance Core.ToHeaders DescribePullRequestEvents where
toHeaders :: DescribePullRequestEvents -> ResponseHeaders
toHeaders =
ResponseHeaders -> DescribePullRequestEvents -> 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
"CodeCommit_20150413.DescribePullRequestEvents" ::
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 DescribePullRequestEvents where
toJSON :: DescribePullRequestEvents -> Value
toJSON DescribePullRequestEvents' {Maybe Int
Maybe Text
Maybe PullRequestEventType
Text
pullRequestId :: Text
maxResults :: Maybe Int
nextToken :: Maybe Text
actorArn :: Maybe Text
pullRequestEventType :: Maybe PullRequestEventType
$sel:pullRequestId:DescribePullRequestEvents' :: DescribePullRequestEvents -> Text
$sel:maxResults:DescribePullRequestEvents' :: DescribePullRequestEvents -> Maybe Int
$sel:nextToken:DescribePullRequestEvents' :: DescribePullRequestEvents -> Maybe Text
$sel:actorArn:DescribePullRequestEvents' :: DescribePullRequestEvents -> Maybe Text
$sel:pullRequestEventType:DescribePullRequestEvents' :: DescribePullRequestEvents -> Maybe PullRequestEventType
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"pullRequestEventType" Text -> PullRequestEventType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(PullRequestEventType -> Pair)
-> Maybe PullRequestEventType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe PullRequestEventType
pullRequestEventType,
(Text
"actorArn" 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
actorArn,
(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 -> 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,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"pullRequestId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
pullRequestId)
]
)
instance Core.ToPath DescribePullRequestEvents where
toPath :: DescribePullRequestEvents -> ByteString
toPath = ByteString -> DescribePullRequestEvents -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DescribePullRequestEvents where
toQuery :: DescribePullRequestEvents -> QueryString
toQuery = QueryString -> DescribePullRequestEvents -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DescribePullRequestEventsResponse = DescribePullRequestEventsResponse'
{
DescribePullRequestEventsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribePullRequestEventsResponse -> Int
httpStatus :: Prelude.Int,
DescribePullRequestEventsResponse -> [PullRequestEvent]
pullRequestEvents :: [PullRequestEvent]
}
deriving (DescribePullRequestEventsResponse
-> DescribePullRequestEventsResponse -> Bool
(DescribePullRequestEventsResponse
-> DescribePullRequestEventsResponse -> Bool)
-> (DescribePullRequestEventsResponse
-> DescribePullRequestEventsResponse -> Bool)
-> Eq DescribePullRequestEventsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribePullRequestEventsResponse
-> DescribePullRequestEventsResponse -> Bool
$c/= :: DescribePullRequestEventsResponse
-> DescribePullRequestEventsResponse -> Bool
== :: DescribePullRequestEventsResponse
-> DescribePullRequestEventsResponse -> Bool
$c== :: DescribePullRequestEventsResponse
-> DescribePullRequestEventsResponse -> Bool
Prelude.Eq, ReadPrec [DescribePullRequestEventsResponse]
ReadPrec DescribePullRequestEventsResponse
Int -> ReadS DescribePullRequestEventsResponse
ReadS [DescribePullRequestEventsResponse]
(Int -> ReadS DescribePullRequestEventsResponse)
-> ReadS [DescribePullRequestEventsResponse]
-> ReadPrec DescribePullRequestEventsResponse
-> ReadPrec [DescribePullRequestEventsResponse]
-> Read DescribePullRequestEventsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribePullRequestEventsResponse]
$creadListPrec :: ReadPrec [DescribePullRequestEventsResponse]
readPrec :: ReadPrec DescribePullRequestEventsResponse
$creadPrec :: ReadPrec DescribePullRequestEventsResponse
readList :: ReadS [DescribePullRequestEventsResponse]
$creadList :: ReadS [DescribePullRequestEventsResponse]
readsPrec :: Int -> ReadS DescribePullRequestEventsResponse
$creadsPrec :: Int -> ReadS DescribePullRequestEventsResponse
Prelude.Read, Int -> DescribePullRequestEventsResponse -> ShowS
[DescribePullRequestEventsResponse] -> ShowS
DescribePullRequestEventsResponse -> String
(Int -> DescribePullRequestEventsResponse -> ShowS)
-> (DescribePullRequestEventsResponse -> String)
-> ([DescribePullRequestEventsResponse] -> ShowS)
-> Show DescribePullRequestEventsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribePullRequestEventsResponse] -> ShowS
$cshowList :: [DescribePullRequestEventsResponse] -> ShowS
show :: DescribePullRequestEventsResponse -> String
$cshow :: DescribePullRequestEventsResponse -> String
showsPrec :: Int -> DescribePullRequestEventsResponse -> ShowS
$cshowsPrec :: Int -> DescribePullRequestEventsResponse -> ShowS
Prelude.Show, (forall x.
DescribePullRequestEventsResponse
-> Rep DescribePullRequestEventsResponse x)
-> (forall x.
Rep DescribePullRequestEventsResponse x
-> DescribePullRequestEventsResponse)
-> Generic DescribePullRequestEventsResponse
forall x.
Rep DescribePullRequestEventsResponse x
-> DescribePullRequestEventsResponse
forall x.
DescribePullRequestEventsResponse
-> Rep DescribePullRequestEventsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribePullRequestEventsResponse x
-> DescribePullRequestEventsResponse
$cfrom :: forall x.
DescribePullRequestEventsResponse
-> Rep DescribePullRequestEventsResponse x
Prelude.Generic)
newDescribePullRequestEventsResponse ::
Prelude.Int ->
DescribePullRequestEventsResponse
newDescribePullRequestEventsResponse :: Int -> DescribePullRequestEventsResponse
newDescribePullRequestEventsResponse Int
pHttpStatus_ =
DescribePullRequestEventsResponse' :: Maybe Text
-> Int -> [PullRequestEvent] -> DescribePullRequestEventsResponse
DescribePullRequestEventsResponse'
{ $sel:nextToken:DescribePullRequestEventsResponse' :: Maybe Text
nextToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribePullRequestEventsResponse' :: Int
httpStatus = Int
pHttpStatus_,
$sel:pullRequestEvents:DescribePullRequestEventsResponse' :: [PullRequestEvent]
pullRequestEvents = [PullRequestEvent]
forall a. Monoid a => a
Prelude.mempty
}
describePullRequestEventsResponse_nextToken :: Lens.Lens' DescribePullRequestEventsResponse (Prelude.Maybe Prelude.Text)
describePullRequestEventsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribePullRequestEventsResponse
-> f DescribePullRequestEventsResponse
describePullRequestEventsResponse_nextToken = (DescribePullRequestEventsResponse -> Maybe Text)
-> (DescribePullRequestEventsResponse
-> Maybe Text -> DescribePullRequestEventsResponse)
-> Lens' DescribePullRequestEventsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePullRequestEventsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribePullRequestEventsResponse' :: DescribePullRequestEventsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribePullRequestEventsResponse
s@DescribePullRequestEventsResponse' {} Maybe Text
a -> DescribePullRequestEventsResponse
s {$sel:nextToken:DescribePullRequestEventsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribePullRequestEventsResponse)
describePullRequestEventsResponse_httpStatus :: Lens.Lens' DescribePullRequestEventsResponse Prelude.Int
describePullRequestEventsResponse_httpStatus :: (Int -> f Int)
-> DescribePullRequestEventsResponse
-> f DescribePullRequestEventsResponse
describePullRequestEventsResponse_httpStatus = (DescribePullRequestEventsResponse -> Int)
-> (DescribePullRequestEventsResponse
-> Int -> DescribePullRequestEventsResponse)
-> Lens
DescribePullRequestEventsResponse
DescribePullRequestEventsResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePullRequestEventsResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribePullRequestEventsResponse' :: DescribePullRequestEventsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribePullRequestEventsResponse
s@DescribePullRequestEventsResponse' {} Int
a -> DescribePullRequestEventsResponse
s {$sel:httpStatus:DescribePullRequestEventsResponse' :: Int
httpStatus = Int
a} :: DescribePullRequestEventsResponse)
describePullRequestEventsResponse_pullRequestEvents :: Lens.Lens' DescribePullRequestEventsResponse [PullRequestEvent]
describePullRequestEventsResponse_pullRequestEvents :: ([PullRequestEvent] -> f [PullRequestEvent])
-> DescribePullRequestEventsResponse
-> f DescribePullRequestEventsResponse
describePullRequestEventsResponse_pullRequestEvents = (DescribePullRequestEventsResponse -> [PullRequestEvent])
-> (DescribePullRequestEventsResponse
-> [PullRequestEvent] -> DescribePullRequestEventsResponse)
-> Lens' DescribePullRequestEventsResponse [PullRequestEvent]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePullRequestEventsResponse' {[PullRequestEvent]
pullRequestEvents :: [PullRequestEvent]
$sel:pullRequestEvents:DescribePullRequestEventsResponse' :: DescribePullRequestEventsResponse -> [PullRequestEvent]
pullRequestEvents} -> [PullRequestEvent]
pullRequestEvents) (\s :: DescribePullRequestEventsResponse
s@DescribePullRequestEventsResponse' {} [PullRequestEvent]
a -> DescribePullRequestEventsResponse
s {$sel:pullRequestEvents:DescribePullRequestEventsResponse' :: [PullRequestEvent]
pullRequestEvents = [PullRequestEvent]
a} :: DescribePullRequestEventsResponse) (([PullRequestEvent] -> f [PullRequestEvent])
-> DescribePullRequestEventsResponse
-> f DescribePullRequestEventsResponse)
-> (([PullRequestEvent] -> f [PullRequestEvent])
-> [PullRequestEvent] -> f [PullRequestEvent])
-> ([PullRequestEvent] -> f [PullRequestEvent])
-> DescribePullRequestEventsResponse
-> f DescribePullRequestEventsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([PullRequestEvent] -> f [PullRequestEvent])
-> [PullRequestEvent] -> f [PullRequestEvent]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance
Prelude.NFData
DescribePullRequestEventsResponse