{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.CodeCommit.Types.PullRequest where
import Amazonka.CodeCommit.Types.ApprovalRule
import Amazonka.CodeCommit.Types.PullRequestStatusEnum
import Amazonka.CodeCommit.Types.PullRequestTarget
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data PullRequest = PullRequest'
{
PullRequest -> Maybe [ApprovalRule]
approvalRules :: Prelude.Maybe [ApprovalRule],
PullRequest -> Maybe Text
authorArn :: Prelude.Maybe Prelude.Text,
PullRequest -> Maybe Text
pullRequestId :: Prelude.Maybe Prelude.Text,
PullRequest -> Maybe POSIX
creationDate :: Prelude.Maybe Core.POSIX,
PullRequest -> Maybe PullRequestStatusEnum
pullRequestStatus :: Prelude.Maybe PullRequestStatusEnum,
PullRequest -> Maybe Text
title :: Prelude.Maybe Prelude.Text,
PullRequest -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
PullRequest -> Maybe POSIX
lastActivityDate :: Prelude.Maybe Core.POSIX,
PullRequest -> Maybe Text
revisionId :: Prelude.Maybe Prelude.Text,
PullRequest -> Maybe [PullRequestTarget]
pullRequestTargets :: Prelude.Maybe [PullRequestTarget],
PullRequest -> Maybe Text
description :: Prelude.Maybe Prelude.Text
}
deriving (PullRequest -> PullRequest -> Bool
(PullRequest -> PullRequest -> Bool)
-> (PullRequest -> PullRequest -> Bool) -> Eq PullRequest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PullRequest -> PullRequest -> Bool
$c/= :: PullRequest -> PullRequest -> Bool
== :: PullRequest -> PullRequest -> Bool
$c== :: PullRequest -> PullRequest -> Bool
Prelude.Eq, ReadPrec [PullRequest]
ReadPrec PullRequest
Int -> ReadS PullRequest
ReadS [PullRequest]
(Int -> ReadS PullRequest)
-> ReadS [PullRequest]
-> ReadPrec PullRequest
-> ReadPrec [PullRequest]
-> Read PullRequest
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PullRequest]
$creadListPrec :: ReadPrec [PullRequest]
readPrec :: ReadPrec PullRequest
$creadPrec :: ReadPrec PullRequest
readList :: ReadS [PullRequest]
$creadList :: ReadS [PullRequest]
readsPrec :: Int -> ReadS PullRequest
$creadsPrec :: Int -> ReadS PullRequest
Prelude.Read, Int -> PullRequest -> ShowS
[PullRequest] -> ShowS
PullRequest -> String
(Int -> PullRequest -> ShowS)
-> (PullRequest -> String)
-> ([PullRequest] -> ShowS)
-> Show PullRequest
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PullRequest] -> ShowS
$cshowList :: [PullRequest] -> ShowS
show :: PullRequest -> String
$cshow :: PullRequest -> String
showsPrec :: Int -> PullRequest -> ShowS
$cshowsPrec :: Int -> PullRequest -> ShowS
Prelude.Show, (forall x. PullRequest -> Rep PullRequest x)
-> (forall x. Rep PullRequest x -> PullRequest)
-> Generic PullRequest
forall x. Rep PullRequest x -> PullRequest
forall x. PullRequest -> Rep PullRequest x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PullRequest x -> PullRequest
$cfrom :: forall x. PullRequest -> Rep PullRequest x
Prelude.Generic)
newPullRequest ::
PullRequest
newPullRequest :: PullRequest
newPullRequest =
PullRequest' :: Maybe [ApprovalRule]
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe PullRequestStatusEnum
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe [PullRequestTarget]
-> Maybe Text
-> PullRequest
PullRequest'
{ $sel:approvalRules:PullRequest' :: Maybe [ApprovalRule]
approvalRules = Maybe [ApprovalRule]
forall a. Maybe a
Prelude.Nothing,
$sel:authorArn:PullRequest' :: Maybe Text
authorArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:pullRequestId:PullRequest' :: Maybe Text
pullRequestId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:creationDate:PullRequest' :: Maybe POSIX
creationDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:pullRequestStatus:PullRequest' :: Maybe PullRequestStatusEnum
pullRequestStatus = Maybe PullRequestStatusEnum
forall a. Maybe a
Prelude.Nothing,
$sel:title:PullRequest' :: Maybe Text
title = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:clientRequestToken:PullRequest' :: Maybe Text
clientRequestToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:lastActivityDate:PullRequest' :: Maybe POSIX
lastActivityDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:revisionId:PullRequest' :: Maybe Text
revisionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:pullRequestTargets:PullRequest' :: Maybe [PullRequestTarget]
pullRequestTargets = Maybe [PullRequestTarget]
forall a. Maybe a
Prelude.Nothing,
$sel:description:PullRequest' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
pullRequest_approvalRules :: Lens.Lens' PullRequest (Prelude.Maybe [ApprovalRule])
pullRequest_approvalRules :: (Maybe [ApprovalRule] -> f (Maybe [ApprovalRule]))
-> PullRequest -> f PullRequest
pullRequest_approvalRules = (PullRequest -> Maybe [ApprovalRule])
-> (PullRequest -> Maybe [ApprovalRule] -> PullRequest)
-> Lens
PullRequest
PullRequest
(Maybe [ApprovalRule])
(Maybe [ApprovalRule])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PullRequest' {Maybe [ApprovalRule]
approvalRules :: Maybe [ApprovalRule]
$sel:approvalRules:PullRequest' :: PullRequest -> Maybe [ApprovalRule]
approvalRules} -> Maybe [ApprovalRule]
approvalRules) (\s :: PullRequest
s@PullRequest' {} Maybe [ApprovalRule]
a -> PullRequest
s {$sel:approvalRules:PullRequest' :: Maybe [ApprovalRule]
approvalRules = Maybe [ApprovalRule]
a} :: PullRequest) ((Maybe [ApprovalRule] -> f (Maybe [ApprovalRule]))
-> PullRequest -> f PullRequest)
-> ((Maybe [ApprovalRule] -> f (Maybe [ApprovalRule]))
-> Maybe [ApprovalRule] -> f (Maybe [ApprovalRule]))
-> (Maybe [ApprovalRule] -> f (Maybe [ApprovalRule]))
-> PullRequest
-> f PullRequest
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [ApprovalRule] [ApprovalRule] [ApprovalRule] [ApprovalRule]
-> Iso
(Maybe [ApprovalRule])
(Maybe [ApprovalRule])
(Maybe [ApprovalRule])
(Maybe [ApprovalRule])
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 [ApprovalRule] [ApprovalRule] [ApprovalRule] [ApprovalRule]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
pullRequest_authorArn :: Lens.Lens' PullRequest (Prelude.Maybe Prelude.Text)
pullRequest_authorArn :: (Maybe Text -> f (Maybe Text)) -> PullRequest -> f PullRequest
pullRequest_authorArn = (PullRequest -> Maybe Text)
-> (PullRequest -> Maybe Text -> PullRequest)
-> Lens PullRequest PullRequest (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PullRequest' {Maybe Text
authorArn :: Maybe Text
$sel:authorArn:PullRequest' :: PullRequest -> Maybe Text
authorArn} -> Maybe Text
authorArn) (\s :: PullRequest
s@PullRequest' {} Maybe Text
a -> PullRequest
s {$sel:authorArn:PullRequest' :: Maybe Text
authorArn = Maybe Text
a} :: PullRequest)
pullRequest_pullRequestId :: Lens.Lens' PullRequest (Prelude.Maybe Prelude.Text)
pullRequest_pullRequestId :: (Maybe Text -> f (Maybe Text)) -> PullRequest -> f PullRequest
pullRequest_pullRequestId = (PullRequest -> Maybe Text)
-> (PullRequest -> Maybe Text -> PullRequest)
-> Lens PullRequest PullRequest (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PullRequest' {Maybe Text
pullRequestId :: Maybe Text
$sel:pullRequestId:PullRequest' :: PullRequest -> Maybe Text
pullRequestId} -> Maybe Text
pullRequestId) (\s :: PullRequest
s@PullRequest' {} Maybe Text
a -> PullRequest
s {$sel:pullRequestId:PullRequest' :: Maybe Text
pullRequestId = Maybe Text
a} :: PullRequest)
pullRequest_creationDate :: Lens.Lens' PullRequest (Prelude.Maybe Prelude.UTCTime)
pullRequest_creationDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> PullRequest -> f PullRequest
pullRequest_creationDate = (PullRequest -> Maybe POSIX)
-> (PullRequest -> Maybe POSIX -> PullRequest)
-> Lens PullRequest PullRequest (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PullRequest' {Maybe POSIX
creationDate :: Maybe POSIX
$sel:creationDate:PullRequest' :: PullRequest -> Maybe POSIX
creationDate} -> Maybe POSIX
creationDate) (\s :: PullRequest
s@PullRequest' {} Maybe POSIX
a -> PullRequest
s {$sel:creationDate:PullRequest' :: Maybe POSIX
creationDate = Maybe POSIX
a} :: PullRequest) ((Maybe POSIX -> f (Maybe POSIX)) -> PullRequest -> f PullRequest)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> PullRequest
-> f PullRequest
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
pullRequest_pullRequestStatus :: Lens.Lens' PullRequest (Prelude.Maybe PullRequestStatusEnum)
pullRequest_pullRequestStatus :: (Maybe PullRequestStatusEnum -> f (Maybe PullRequestStatusEnum))
-> PullRequest -> f PullRequest
pullRequest_pullRequestStatus = (PullRequest -> Maybe PullRequestStatusEnum)
-> (PullRequest -> Maybe PullRequestStatusEnum -> PullRequest)
-> Lens
PullRequest
PullRequest
(Maybe PullRequestStatusEnum)
(Maybe PullRequestStatusEnum)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PullRequest' {Maybe PullRequestStatusEnum
pullRequestStatus :: Maybe PullRequestStatusEnum
$sel:pullRequestStatus:PullRequest' :: PullRequest -> Maybe PullRequestStatusEnum
pullRequestStatus} -> Maybe PullRequestStatusEnum
pullRequestStatus) (\s :: PullRequest
s@PullRequest' {} Maybe PullRequestStatusEnum
a -> PullRequest
s {$sel:pullRequestStatus:PullRequest' :: Maybe PullRequestStatusEnum
pullRequestStatus = Maybe PullRequestStatusEnum
a} :: PullRequest)
pullRequest_title :: Lens.Lens' PullRequest (Prelude.Maybe Prelude.Text)
pullRequest_title :: (Maybe Text -> f (Maybe Text)) -> PullRequest -> f PullRequest
pullRequest_title = (PullRequest -> Maybe Text)
-> (PullRequest -> Maybe Text -> PullRequest)
-> Lens PullRequest PullRequest (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PullRequest' {Maybe Text
title :: Maybe Text
$sel:title:PullRequest' :: PullRequest -> Maybe Text
title} -> Maybe Text
title) (\s :: PullRequest
s@PullRequest' {} Maybe Text
a -> PullRequest
s {$sel:title:PullRequest' :: Maybe Text
title = Maybe Text
a} :: PullRequest)
pullRequest_clientRequestToken :: Lens.Lens' PullRequest (Prelude.Maybe Prelude.Text)
pullRequest_clientRequestToken :: (Maybe Text -> f (Maybe Text)) -> PullRequest -> f PullRequest
pullRequest_clientRequestToken = (PullRequest -> Maybe Text)
-> (PullRequest -> Maybe Text -> PullRequest)
-> Lens PullRequest PullRequest (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PullRequest' {Maybe Text
clientRequestToken :: Maybe Text
$sel:clientRequestToken:PullRequest' :: PullRequest -> Maybe Text
clientRequestToken} -> Maybe Text
clientRequestToken) (\s :: PullRequest
s@PullRequest' {} Maybe Text
a -> PullRequest
s {$sel:clientRequestToken:PullRequest' :: Maybe Text
clientRequestToken = Maybe Text
a} :: PullRequest)
pullRequest_lastActivityDate :: Lens.Lens' PullRequest (Prelude.Maybe Prelude.UTCTime)
pullRequest_lastActivityDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> PullRequest -> f PullRequest
pullRequest_lastActivityDate = (PullRequest -> Maybe POSIX)
-> (PullRequest -> Maybe POSIX -> PullRequest)
-> Lens PullRequest PullRequest (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PullRequest' {Maybe POSIX
lastActivityDate :: Maybe POSIX
$sel:lastActivityDate:PullRequest' :: PullRequest -> Maybe POSIX
lastActivityDate} -> Maybe POSIX
lastActivityDate) (\s :: PullRequest
s@PullRequest' {} Maybe POSIX
a -> PullRequest
s {$sel:lastActivityDate:PullRequest' :: Maybe POSIX
lastActivityDate = Maybe POSIX
a} :: PullRequest) ((Maybe POSIX -> f (Maybe POSIX)) -> PullRequest -> f PullRequest)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> PullRequest
-> f PullRequest
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
pullRequest_revisionId :: Lens.Lens' PullRequest (Prelude.Maybe Prelude.Text)
pullRequest_revisionId :: (Maybe Text -> f (Maybe Text)) -> PullRequest -> f PullRequest
pullRequest_revisionId = (PullRequest -> Maybe Text)
-> (PullRequest -> Maybe Text -> PullRequest)
-> Lens PullRequest PullRequest (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PullRequest' {Maybe Text
revisionId :: Maybe Text
$sel:revisionId:PullRequest' :: PullRequest -> Maybe Text
revisionId} -> Maybe Text
revisionId) (\s :: PullRequest
s@PullRequest' {} Maybe Text
a -> PullRequest
s {$sel:revisionId:PullRequest' :: Maybe Text
revisionId = Maybe Text
a} :: PullRequest)
pullRequest_pullRequestTargets :: Lens.Lens' PullRequest (Prelude.Maybe [PullRequestTarget])
pullRequest_pullRequestTargets :: (Maybe [PullRequestTarget] -> f (Maybe [PullRequestTarget]))
-> PullRequest -> f PullRequest
pullRequest_pullRequestTargets = (PullRequest -> Maybe [PullRequestTarget])
-> (PullRequest -> Maybe [PullRequestTarget] -> PullRequest)
-> Lens
PullRequest
PullRequest
(Maybe [PullRequestTarget])
(Maybe [PullRequestTarget])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PullRequest' {Maybe [PullRequestTarget]
pullRequestTargets :: Maybe [PullRequestTarget]
$sel:pullRequestTargets:PullRequest' :: PullRequest -> Maybe [PullRequestTarget]
pullRequestTargets} -> Maybe [PullRequestTarget]
pullRequestTargets) (\s :: PullRequest
s@PullRequest' {} Maybe [PullRequestTarget]
a -> PullRequest
s {$sel:pullRequestTargets:PullRequest' :: Maybe [PullRequestTarget]
pullRequestTargets = Maybe [PullRequestTarget]
a} :: PullRequest) ((Maybe [PullRequestTarget] -> f (Maybe [PullRequestTarget]))
-> PullRequest -> f PullRequest)
-> ((Maybe [PullRequestTarget] -> f (Maybe [PullRequestTarget]))
-> Maybe [PullRequestTarget] -> f (Maybe [PullRequestTarget]))
-> (Maybe [PullRequestTarget] -> f (Maybe [PullRequestTarget]))
-> PullRequest
-> f PullRequest
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[PullRequestTarget]
[PullRequestTarget]
[PullRequestTarget]
[PullRequestTarget]
-> Iso
(Maybe [PullRequestTarget])
(Maybe [PullRequestTarget])
(Maybe [PullRequestTarget])
(Maybe [PullRequestTarget])
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
[PullRequestTarget]
[PullRequestTarget]
[PullRequestTarget]
[PullRequestTarget]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
pullRequest_description :: Lens.Lens' PullRequest (Prelude.Maybe Prelude.Text)
pullRequest_description :: (Maybe Text -> f (Maybe Text)) -> PullRequest -> f PullRequest
pullRequest_description = (PullRequest -> Maybe Text)
-> (PullRequest -> Maybe Text -> PullRequest)
-> Lens PullRequest PullRequest (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PullRequest' {Maybe Text
description :: Maybe Text
$sel:description:PullRequest' :: PullRequest -> Maybe Text
description} -> Maybe Text
description) (\s :: PullRequest
s@PullRequest' {} Maybe Text
a -> PullRequest
s {$sel:description:PullRequest' :: Maybe Text
description = Maybe Text
a} :: PullRequest)
instance Core.FromJSON PullRequest where
parseJSON :: Value -> Parser PullRequest
parseJSON =
String
-> (Object -> Parser PullRequest) -> Value -> Parser PullRequest
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"PullRequest"
( \Object
x ->
Maybe [ApprovalRule]
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe PullRequestStatusEnum
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe [PullRequestTarget]
-> Maybe Text
-> PullRequest
PullRequest'
(Maybe [ApprovalRule]
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe PullRequestStatusEnum
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe [PullRequestTarget]
-> Maybe Text
-> PullRequest)
-> Parser (Maybe [ApprovalRule])
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe PullRequestStatusEnum
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe [PullRequestTarget]
-> Maybe Text
-> PullRequest)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe (Maybe [ApprovalRule]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"approvalRules" Parser (Maybe (Maybe [ApprovalRule]))
-> Maybe [ApprovalRule] -> Parser (Maybe [ApprovalRule])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [ApprovalRule]
forall a. Monoid a => a
Prelude.mempty)
Parser
(Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe PullRequestStatusEnum
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe [PullRequestTarget]
-> Maybe Text
-> PullRequest)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe POSIX
-> Maybe PullRequestStatusEnum
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe [PullRequestTarget]
-> Maybe Text
-> PullRequest)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"authorArn")
Parser
(Maybe Text
-> Maybe POSIX
-> Maybe PullRequestStatusEnum
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe [PullRequestTarget]
-> Maybe Text
-> PullRequest)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX
-> Maybe PullRequestStatusEnum
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe [PullRequestTarget]
-> Maybe Text
-> PullRequest)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"pullRequestId")
Parser
(Maybe POSIX
-> Maybe PullRequestStatusEnum
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe [PullRequestTarget]
-> Maybe Text
-> PullRequest)
-> Parser (Maybe POSIX)
-> Parser
(Maybe PullRequestStatusEnum
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe [PullRequestTarget]
-> Maybe Text
-> PullRequest)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"creationDate")
Parser
(Maybe PullRequestStatusEnum
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe [PullRequestTarget]
-> Maybe Text
-> PullRequest)
-> Parser (Maybe PullRequestStatusEnum)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe [PullRequestTarget]
-> Maybe Text
-> PullRequest)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe PullRequestStatusEnum)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"pullRequestStatus")
Parser
(Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe [PullRequestTarget]
-> Maybe Text
-> PullRequest)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe [PullRequestTarget]
-> Maybe Text
-> PullRequest)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"title")
Parser
(Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe [PullRequestTarget]
-> Maybe Text
-> PullRequest)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX
-> Maybe Text
-> Maybe [PullRequestTarget]
-> Maybe Text
-> PullRequest)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"clientRequestToken")
Parser
(Maybe POSIX
-> Maybe Text
-> Maybe [PullRequestTarget]
-> Maybe Text
-> PullRequest)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text
-> Maybe [PullRequestTarget] -> Maybe Text -> PullRequest)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"lastActivityDate")
Parser
(Maybe Text
-> Maybe [PullRequestTarget] -> Maybe Text -> PullRequest)
-> Parser (Maybe Text)
-> Parser (Maybe [PullRequestTarget] -> Maybe Text -> PullRequest)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"revisionId")
Parser (Maybe [PullRequestTarget] -> Maybe Text -> PullRequest)
-> Parser (Maybe [PullRequestTarget])
-> Parser (Maybe Text -> PullRequest)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [PullRequestTarget]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"pullRequestTargets"
Parser (Maybe (Maybe [PullRequestTarget]))
-> Maybe [PullRequestTarget] -> Parser (Maybe [PullRequestTarget])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [PullRequestTarget]
forall a. Monoid a => a
Prelude.mempty
)
Parser (Maybe Text -> PullRequest)
-> Parser (Maybe Text) -> Parser PullRequest
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"description")
)
instance Prelude.Hashable PullRequest
instance Prelude.NFData PullRequest