{-# 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.PullRequestEvent where
import Amazonka.CodeCommit.Types.ApprovalRuleEventMetadata
import Amazonka.CodeCommit.Types.ApprovalRuleOverriddenEventMetadata
import Amazonka.CodeCommit.Types.ApprovalStateChangedEventMetadata
import Amazonka.CodeCommit.Types.PullRequestCreatedEventMetadata
import Amazonka.CodeCommit.Types.PullRequestEventType
import Amazonka.CodeCommit.Types.PullRequestMergedStateChangedEventMetadata
import Amazonka.CodeCommit.Types.PullRequestSourceReferenceUpdatedEventMetadata
import Amazonka.CodeCommit.Types.PullRequestStatusChangedEventMetadata
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data PullRequestEvent = PullRequestEvent'
{
PullRequestEvent
-> Maybe PullRequestMergedStateChangedEventMetadata
pullRequestMergedStateChangedEventMetadata :: Prelude.Maybe PullRequestMergedStateChangedEventMetadata,
PullRequestEvent -> Maybe PullRequestCreatedEventMetadata
pullRequestCreatedEventMetadata :: Prelude.Maybe PullRequestCreatedEventMetadata,
PullRequestEvent -> Maybe ApprovalRuleEventMetadata
approvalRuleEventMetadata :: Prelude.Maybe ApprovalRuleEventMetadata,
PullRequestEvent -> Maybe PullRequestEventType
pullRequestEventType :: Prelude.Maybe PullRequestEventType,
PullRequestEvent -> Maybe PullRequestStatusChangedEventMetadata
pullRequestStatusChangedEventMetadata :: Prelude.Maybe PullRequestStatusChangedEventMetadata,
PullRequestEvent -> Maybe Text
actorArn :: Prelude.Maybe Prelude.Text,
PullRequestEvent -> Maybe Text
pullRequestId :: Prelude.Maybe Prelude.Text,
PullRequestEvent -> Maybe POSIX
eventDate :: Prelude.Maybe Core.POSIX,
PullRequestEvent -> Maybe ApprovalStateChangedEventMetadata
approvalStateChangedEventMetadata :: Prelude.Maybe ApprovalStateChangedEventMetadata,
PullRequestEvent
-> Maybe PullRequestSourceReferenceUpdatedEventMetadata
pullRequestSourceReferenceUpdatedEventMetadata :: Prelude.Maybe PullRequestSourceReferenceUpdatedEventMetadata,
PullRequestEvent -> Maybe ApprovalRuleOverriddenEventMetadata
approvalRuleOverriddenEventMetadata :: Prelude.Maybe ApprovalRuleOverriddenEventMetadata
}
deriving (PullRequestEvent -> PullRequestEvent -> Bool
(PullRequestEvent -> PullRequestEvent -> Bool)
-> (PullRequestEvent -> PullRequestEvent -> Bool)
-> Eq PullRequestEvent
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PullRequestEvent -> PullRequestEvent -> Bool
$c/= :: PullRequestEvent -> PullRequestEvent -> Bool
== :: PullRequestEvent -> PullRequestEvent -> Bool
$c== :: PullRequestEvent -> PullRequestEvent -> Bool
Prelude.Eq, ReadPrec [PullRequestEvent]
ReadPrec PullRequestEvent
Int -> ReadS PullRequestEvent
ReadS [PullRequestEvent]
(Int -> ReadS PullRequestEvent)
-> ReadS [PullRequestEvent]
-> ReadPrec PullRequestEvent
-> ReadPrec [PullRequestEvent]
-> Read PullRequestEvent
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PullRequestEvent]
$creadListPrec :: ReadPrec [PullRequestEvent]
readPrec :: ReadPrec PullRequestEvent
$creadPrec :: ReadPrec PullRequestEvent
readList :: ReadS [PullRequestEvent]
$creadList :: ReadS [PullRequestEvent]
readsPrec :: Int -> ReadS PullRequestEvent
$creadsPrec :: Int -> ReadS PullRequestEvent
Prelude.Read, Int -> PullRequestEvent -> ShowS
[PullRequestEvent] -> ShowS
PullRequestEvent -> String
(Int -> PullRequestEvent -> ShowS)
-> (PullRequestEvent -> String)
-> ([PullRequestEvent] -> ShowS)
-> Show PullRequestEvent
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PullRequestEvent] -> ShowS
$cshowList :: [PullRequestEvent] -> ShowS
show :: PullRequestEvent -> String
$cshow :: PullRequestEvent -> String
showsPrec :: Int -> PullRequestEvent -> ShowS
$cshowsPrec :: Int -> PullRequestEvent -> ShowS
Prelude.Show, (forall x. PullRequestEvent -> Rep PullRequestEvent x)
-> (forall x. Rep PullRequestEvent x -> PullRequestEvent)
-> Generic PullRequestEvent
forall x. Rep PullRequestEvent x -> PullRequestEvent
forall x. PullRequestEvent -> Rep PullRequestEvent x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PullRequestEvent x -> PullRequestEvent
$cfrom :: forall x. PullRequestEvent -> Rep PullRequestEvent x
Prelude.Generic)
newPullRequestEvent ::
PullRequestEvent
newPullRequestEvent :: PullRequestEvent
newPullRequestEvent =
PullRequestEvent' :: Maybe PullRequestMergedStateChangedEventMetadata
-> Maybe PullRequestCreatedEventMetadata
-> Maybe ApprovalRuleEventMetadata
-> Maybe PullRequestEventType
-> Maybe PullRequestStatusChangedEventMetadata
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe ApprovalStateChangedEventMetadata
-> Maybe PullRequestSourceReferenceUpdatedEventMetadata
-> Maybe ApprovalRuleOverriddenEventMetadata
-> PullRequestEvent
PullRequestEvent'
{ $sel:pullRequestMergedStateChangedEventMetadata:PullRequestEvent' :: Maybe PullRequestMergedStateChangedEventMetadata
pullRequestMergedStateChangedEventMetadata =
Maybe PullRequestMergedStateChangedEventMetadata
forall a. Maybe a
Prelude.Nothing,
$sel:pullRequestCreatedEventMetadata:PullRequestEvent' :: Maybe PullRequestCreatedEventMetadata
pullRequestCreatedEventMetadata = Maybe PullRequestCreatedEventMetadata
forall a. Maybe a
Prelude.Nothing,
$sel:approvalRuleEventMetadata:PullRequestEvent' :: Maybe ApprovalRuleEventMetadata
approvalRuleEventMetadata = Maybe ApprovalRuleEventMetadata
forall a. Maybe a
Prelude.Nothing,
$sel:pullRequestEventType:PullRequestEvent' :: Maybe PullRequestEventType
pullRequestEventType = Maybe PullRequestEventType
forall a. Maybe a
Prelude.Nothing,
$sel:pullRequestStatusChangedEventMetadata:PullRequestEvent' :: Maybe PullRequestStatusChangedEventMetadata
pullRequestStatusChangedEventMetadata =
Maybe PullRequestStatusChangedEventMetadata
forall a. Maybe a
Prelude.Nothing,
$sel:actorArn:PullRequestEvent' :: Maybe Text
actorArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:pullRequestId:PullRequestEvent' :: Maybe Text
pullRequestId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:eventDate:PullRequestEvent' :: Maybe POSIX
eventDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:approvalStateChangedEventMetadata:PullRequestEvent' :: Maybe ApprovalStateChangedEventMetadata
approvalStateChangedEventMetadata = Maybe ApprovalStateChangedEventMetadata
forall a. Maybe a
Prelude.Nothing,
$sel:pullRequestSourceReferenceUpdatedEventMetadata:PullRequestEvent' :: Maybe PullRequestSourceReferenceUpdatedEventMetadata
pullRequestSourceReferenceUpdatedEventMetadata =
Maybe PullRequestSourceReferenceUpdatedEventMetadata
forall a. Maybe a
Prelude.Nothing,
$sel:approvalRuleOverriddenEventMetadata:PullRequestEvent' :: Maybe ApprovalRuleOverriddenEventMetadata
approvalRuleOverriddenEventMetadata =
Maybe ApprovalRuleOverriddenEventMetadata
forall a. Maybe a
Prelude.Nothing
}
pullRequestEvent_pullRequestMergedStateChangedEventMetadata :: Lens.Lens' PullRequestEvent (Prelude.Maybe PullRequestMergedStateChangedEventMetadata)
pullRequestEvent_pullRequestMergedStateChangedEventMetadata :: (Maybe PullRequestMergedStateChangedEventMetadata
-> f (Maybe PullRequestMergedStateChangedEventMetadata))
-> PullRequestEvent -> f PullRequestEvent
pullRequestEvent_pullRequestMergedStateChangedEventMetadata = (PullRequestEvent
-> Maybe PullRequestMergedStateChangedEventMetadata)
-> (PullRequestEvent
-> Maybe PullRequestMergedStateChangedEventMetadata
-> PullRequestEvent)
-> Lens
PullRequestEvent
PullRequestEvent
(Maybe PullRequestMergedStateChangedEventMetadata)
(Maybe PullRequestMergedStateChangedEventMetadata)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PullRequestEvent' {Maybe PullRequestMergedStateChangedEventMetadata
pullRequestMergedStateChangedEventMetadata :: Maybe PullRequestMergedStateChangedEventMetadata
$sel:pullRequestMergedStateChangedEventMetadata:PullRequestEvent' :: PullRequestEvent
-> Maybe PullRequestMergedStateChangedEventMetadata
pullRequestMergedStateChangedEventMetadata} -> Maybe PullRequestMergedStateChangedEventMetadata
pullRequestMergedStateChangedEventMetadata) (\s :: PullRequestEvent
s@PullRequestEvent' {} Maybe PullRequestMergedStateChangedEventMetadata
a -> PullRequestEvent
s {$sel:pullRequestMergedStateChangedEventMetadata:PullRequestEvent' :: Maybe PullRequestMergedStateChangedEventMetadata
pullRequestMergedStateChangedEventMetadata = Maybe PullRequestMergedStateChangedEventMetadata
a} :: PullRequestEvent)
pullRequestEvent_pullRequestCreatedEventMetadata :: Lens.Lens' PullRequestEvent (Prelude.Maybe PullRequestCreatedEventMetadata)
pullRequestEvent_pullRequestCreatedEventMetadata :: (Maybe PullRequestCreatedEventMetadata
-> f (Maybe PullRequestCreatedEventMetadata))
-> PullRequestEvent -> f PullRequestEvent
pullRequestEvent_pullRequestCreatedEventMetadata = (PullRequestEvent -> Maybe PullRequestCreatedEventMetadata)
-> (PullRequestEvent
-> Maybe PullRequestCreatedEventMetadata -> PullRequestEvent)
-> Lens
PullRequestEvent
PullRequestEvent
(Maybe PullRequestCreatedEventMetadata)
(Maybe PullRequestCreatedEventMetadata)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PullRequestEvent' {Maybe PullRequestCreatedEventMetadata
pullRequestCreatedEventMetadata :: Maybe PullRequestCreatedEventMetadata
$sel:pullRequestCreatedEventMetadata:PullRequestEvent' :: PullRequestEvent -> Maybe PullRequestCreatedEventMetadata
pullRequestCreatedEventMetadata} -> Maybe PullRequestCreatedEventMetadata
pullRequestCreatedEventMetadata) (\s :: PullRequestEvent
s@PullRequestEvent' {} Maybe PullRequestCreatedEventMetadata
a -> PullRequestEvent
s {$sel:pullRequestCreatedEventMetadata:PullRequestEvent' :: Maybe PullRequestCreatedEventMetadata
pullRequestCreatedEventMetadata = Maybe PullRequestCreatedEventMetadata
a} :: PullRequestEvent)
pullRequestEvent_approvalRuleEventMetadata :: Lens.Lens' PullRequestEvent (Prelude.Maybe ApprovalRuleEventMetadata)
pullRequestEvent_approvalRuleEventMetadata :: (Maybe ApprovalRuleEventMetadata
-> f (Maybe ApprovalRuleEventMetadata))
-> PullRequestEvent -> f PullRequestEvent
pullRequestEvent_approvalRuleEventMetadata = (PullRequestEvent -> Maybe ApprovalRuleEventMetadata)
-> (PullRequestEvent
-> Maybe ApprovalRuleEventMetadata -> PullRequestEvent)
-> Lens
PullRequestEvent
PullRequestEvent
(Maybe ApprovalRuleEventMetadata)
(Maybe ApprovalRuleEventMetadata)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PullRequestEvent' {Maybe ApprovalRuleEventMetadata
approvalRuleEventMetadata :: Maybe ApprovalRuleEventMetadata
$sel:approvalRuleEventMetadata:PullRequestEvent' :: PullRequestEvent -> Maybe ApprovalRuleEventMetadata
approvalRuleEventMetadata} -> Maybe ApprovalRuleEventMetadata
approvalRuleEventMetadata) (\s :: PullRequestEvent
s@PullRequestEvent' {} Maybe ApprovalRuleEventMetadata
a -> PullRequestEvent
s {$sel:approvalRuleEventMetadata:PullRequestEvent' :: Maybe ApprovalRuleEventMetadata
approvalRuleEventMetadata = Maybe ApprovalRuleEventMetadata
a} :: PullRequestEvent)
pullRequestEvent_pullRequestEventType :: Lens.Lens' PullRequestEvent (Prelude.Maybe PullRequestEventType)
pullRequestEvent_pullRequestEventType :: (Maybe PullRequestEventType -> f (Maybe PullRequestEventType))
-> PullRequestEvent -> f PullRequestEvent
pullRequestEvent_pullRequestEventType = (PullRequestEvent -> Maybe PullRequestEventType)
-> (PullRequestEvent
-> Maybe PullRequestEventType -> PullRequestEvent)
-> Lens
PullRequestEvent
PullRequestEvent
(Maybe PullRequestEventType)
(Maybe PullRequestEventType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PullRequestEvent' {Maybe PullRequestEventType
pullRequestEventType :: Maybe PullRequestEventType
$sel:pullRequestEventType:PullRequestEvent' :: PullRequestEvent -> Maybe PullRequestEventType
pullRequestEventType} -> Maybe PullRequestEventType
pullRequestEventType) (\s :: PullRequestEvent
s@PullRequestEvent' {} Maybe PullRequestEventType
a -> PullRequestEvent
s {$sel:pullRequestEventType:PullRequestEvent' :: Maybe PullRequestEventType
pullRequestEventType = Maybe PullRequestEventType
a} :: PullRequestEvent)
pullRequestEvent_pullRequestStatusChangedEventMetadata :: Lens.Lens' PullRequestEvent (Prelude.Maybe PullRequestStatusChangedEventMetadata)
pullRequestEvent_pullRequestStatusChangedEventMetadata :: (Maybe PullRequestStatusChangedEventMetadata
-> f (Maybe PullRequestStatusChangedEventMetadata))
-> PullRequestEvent -> f PullRequestEvent
pullRequestEvent_pullRequestStatusChangedEventMetadata = (PullRequestEvent -> Maybe PullRequestStatusChangedEventMetadata)
-> (PullRequestEvent
-> Maybe PullRequestStatusChangedEventMetadata -> PullRequestEvent)
-> Lens
PullRequestEvent
PullRequestEvent
(Maybe PullRequestStatusChangedEventMetadata)
(Maybe PullRequestStatusChangedEventMetadata)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PullRequestEvent' {Maybe PullRequestStatusChangedEventMetadata
pullRequestStatusChangedEventMetadata :: Maybe PullRequestStatusChangedEventMetadata
$sel:pullRequestStatusChangedEventMetadata:PullRequestEvent' :: PullRequestEvent -> Maybe PullRequestStatusChangedEventMetadata
pullRequestStatusChangedEventMetadata} -> Maybe PullRequestStatusChangedEventMetadata
pullRequestStatusChangedEventMetadata) (\s :: PullRequestEvent
s@PullRequestEvent' {} Maybe PullRequestStatusChangedEventMetadata
a -> PullRequestEvent
s {$sel:pullRequestStatusChangedEventMetadata:PullRequestEvent' :: Maybe PullRequestStatusChangedEventMetadata
pullRequestStatusChangedEventMetadata = Maybe PullRequestStatusChangedEventMetadata
a} :: PullRequestEvent)
pullRequestEvent_actorArn :: Lens.Lens' PullRequestEvent (Prelude.Maybe Prelude.Text)
pullRequestEvent_actorArn :: (Maybe Text -> f (Maybe Text))
-> PullRequestEvent -> f PullRequestEvent
pullRequestEvent_actorArn = (PullRequestEvent -> Maybe Text)
-> (PullRequestEvent -> Maybe Text -> PullRequestEvent)
-> Lens PullRequestEvent PullRequestEvent (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PullRequestEvent' {Maybe Text
actorArn :: Maybe Text
$sel:actorArn:PullRequestEvent' :: PullRequestEvent -> Maybe Text
actorArn} -> Maybe Text
actorArn) (\s :: PullRequestEvent
s@PullRequestEvent' {} Maybe Text
a -> PullRequestEvent
s {$sel:actorArn:PullRequestEvent' :: Maybe Text
actorArn = Maybe Text
a} :: PullRequestEvent)
pullRequestEvent_pullRequestId :: Lens.Lens' PullRequestEvent (Prelude.Maybe Prelude.Text)
pullRequestEvent_pullRequestId :: (Maybe Text -> f (Maybe Text))
-> PullRequestEvent -> f PullRequestEvent
pullRequestEvent_pullRequestId = (PullRequestEvent -> Maybe Text)
-> (PullRequestEvent -> Maybe Text -> PullRequestEvent)
-> Lens PullRequestEvent PullRequestEvent (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PullRequestEvent' {Maybe Text
pullRequestId :: Maybe Text
$sel:pullRequestId:PullRequestEvent' :: PullRequestEvent -> Maybe Text
pullRequestId} -> Maybe Text
pullRequestId) (\s :: PullRequestEvent
s@PullRequestEvent' {} Maybe Text
a -> PullRequestEvent
s {$sel:pullRequestId:PullRequestEvent' :: Maybe Text
pullRequestId = Maybe Text
a} :: PullRequestEvent)
pullRequestEvent_eventDate :: Lens.Lens' PullRequestEvent (Prelude.Maybe Prelude.UTCTime)
pullRequestEvent_eventDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> PullRequestEvent -> f PullRequestEvent
pullRequestEvent_eventDate = (PullRequestEvent -> Maybe POSIX)
-> (PullRequestEvent -> Maybe POSIX -> PullRequestEvent)
-> Lens
PullRequestEvent PullRequestEvent (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PullRequestEvent' {Maybe POSIX
eventDate :: Maybe POSIX
$sel:eventDate:PullRequestEvent' :: PullRequestEvent -> Maybe POSIX
eventDate} -> Maybe POSIX
eventDate) (\s :: PullRequestEvent
s@PullRequestEvent' {} Maybe POSIX
a -> PullRequestEvent
s {$sel:eventDate:PullRequestEvent' :: Maybe POSIX
eventDate = Maybe POSIX
a} :: PullRequestEvent) ((Maybe POSIX -> f (Maybe POSIX))
-> PullRequestEvent -> f PullRequestEvent)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> PullRequestEvent
-> f PullRequestEvent
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
pullRequestEvent_approvalStateChangedEventMetadata :: Lens.Lens' PullRequestEvent (Prelude.Maybe ApprovalStateChangedEventMetadata)
pullRequestEvent_approvalStateChangedEventMetadata :: (Maybe ApprovalStateChangedEventMetadata
-> f (Maybe ApprovalStateChangedEventMetadata))
-> PullRequestEvent -> f PullRequestEvent
pullRequestEvent_approvalStateChangedEventMetadata = (PullRequestEvent -> Maybe ApprovalStateChangedEventMetadata)
-> (PullRequestEvent
-> Maybe ApprovalStateChangedEventMetadata -> PullRequestEvent)
-> Lens
PullRequestEvent
PullRequestEvent
(Maybe ApprovalStateChangedEventMetadata)
(Maybe ApprovalStateChangedEventMetadata)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PullRequestEvent' {Maybe ApprovalStateChangedEventMetadata
approvalStateChangedEventMetadata :: Maybe ApprovalStateChangedEventMetadata
$sel:approvalStateChangedEventMetadata:PullRequestEvent' :: PullRequestEvent -> Maybe ApprovalStateChangedEventMetadata
approvalStateChangedEventMetadata} -> Maybe ApprovalStateChangedEventMetadata
approvalStateChangedEventMetadata) (\s :: PullRequestEvent
s@PullRequestEvent' {} Maybe ApprovalStateChangedEventMetadata
a -> PullRequestEvent
s {$sel:approvalStateChangedEventMetadata:PullRequestEvent' :: Maybe ApprovalStateChangedEventMetadata
approvalStateChangedEventMetadata = Maybe ApprovalStateChangedEventMetadata
a} :: PullRequestEvent)
pullRequestEvent_pullRequestSourceReferenceUpdatedEventMetadata :: Lens.Lens' PullRequestEvent (Prelude.Maybe PullRequestSourceReferenceUpdatedEventMetadata)
pullRequestEvent_pullRequestSourceReferenceUpdatedEventMetadata :: (Maybe PullRequestSourceReferenceUpdatedEventMetadata
-> f (Maybe PullRequestSourceReferenceUpdatedEventMetadata))
-> PullRequestEvent -> f PullRequestEvent
pullRequestEvent_pullRequestSourceReferenceUpdatedEventMetadata = (PullRequestEvent
-> Maybe PullRequestSourceReferenceUpdatedEventMetadata)
-> (PullRequestEvent
-> Maybe PullRequestSourceReferenceUpdatedEventMetadata
-> PullRequestEvent)
-> Lens
PullRequestEvent
PullRequestEvent
(Maybe PullRequestSourceReferenceUpdatedEventMetadata)
(Maybe PullRequestSourceReferenceUpdatedEventMetadata)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PullRequestEvent' {Maybe PullRequestSourceReferenceUpdatedEventMetadata
pullRequestSourceReferenceUpdatedEventMetadata :: Maybe PullRequestSourceReferenceUpdatedEventMetadata
$sel:pullRequestSourceReferenceUpdatedEventMetadata:PullRequestEvent' :: PullRequestEvent
-> Maybe PullRequestSourceReferenceUpdatedEventMetadata
pullRequestSourceReferenceUpdatedEventMetadata} -> Maybe PullRequestSourceReferenceUpdatedEventMetadata
pullRequestSourceReferenceUpdatedEventMetadata) (\s :: PullRequestEvent
s@PullRequestEvent' {} Maybe PullRequestSourceReferenceUpdatedEventMetadata
a -> PullRequestEvent
s {$sel:pullRequestSourceReferenceUpdatedEventMetadata:PullRequestEvent' :: Maybe PullRequestSourceReferenceUpdatedEventMetadata
pullRequestSourceReferenceUpdatedEventMetadata = Maybe PullRequestSourceReferenceUpdatedEventMetadata
a} :: PullRequestEvent)
pullRequestEvent_approvalRuleOverriddenEventMetadata :: Lens.Lens' PullRequestEvent (Prelude.Maybe ApprovalRuleOverriddenEventMetadata)
pullRequestEvent_approvalRuleOverriddenEventMetadata :: (Maybe ApprovalRuleOverriddenEventMetadata
-> f (Maybe ApprovalRuleOverriddenEventMetadata))
-> PullRequestEvent -> f PullRequestEvent
pullRequestEvent_approvalRuleOverriddenEventMetadata = (PullRequestEvent -> Maybe ApprovalRuleOverriddenEventMetadata)
-> (PullRequestEvent
-> Maybe ApprovalRuleOverriddenEventMetadata -> PullRequestEvent)
-> Lens
PullRequestEvent
PullRequestEvent
(Maybe ApprovalRuleOverriddenEventMetadata)
(Maybe ApprovalRuleOverriddenEventMetadata)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PullRequestEvent' {Maybe ApprovalRuleOverriddenEventMetadata
approvalRuleOverriddenEventMetadata :: Maybe ApprovalRuleOverriddenEventMetadata
$sel:approvalRuleOverriddenEventMetadata:PullRequestEvent' :: PullRequestEvent -> Maybe ApprovalRuleOverriddenEventMetadata
approvalRuleOverriddenEventMetadata} -> Maybe ApprovalRuleOverriddenEventMetadata
approvalRuleOverriddenEventMetadata) (\s :: PullRequestEvent
s@PullRequestEvent' {} Maybe ApprovalRuleOverriddenEventMetadata
a -> PullRequestEvent
s {$sel:approvalRuleOverriddenEventMetadata:PullRequestEvent' :: Maybe ApprovalRuleOverriddenEventMetadata
approvalRuleOverriddenEventMetadata = Maybe ApprovalRuleOverriddenEventMetadata
a} :: PullRequestEvent)
instance Core.FromJSON PullRequestEvent where
parseJSON :: Value -> Parser PullRequestEvent
parseJSON =
String
-> (Object -> Parser PullRequestEvent)
-> Value
-> Parser PullRequestEvent
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"PullRequestEvent"
( \Object
x ->
Maybe PullRequestMergedStateChangedEventMetadata
-> Maybe PullRequestCreatedEventMetadata
-> Maybe ApprovalRuleEventMetadata
-> Maybe PullRequestEventType
-> Maybe PullRequestStatusChangedEventMetadata
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe ApprovalStateChangedEventMetadata
-> Maybe PullRequestSourceReferenceUpdatedEventMetadata
-> Maybe ApprovalRuleOverriddenEventMetadata
-> PullRequestEvent
PullRequestEvent'
(Maybe PullRequestMergedStateChangedEventMetadata
-> Maybe PullRequestCreatedEventMetadata
-> Maybe ApprovalRuleEventMetadata
-> Maybe PullRequestEventType
-> Maybe PullRequestStatusChangedEventMetadata
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe ApprovalStateChangedEventMetadata
-> Maybe PullRequestSourceReferenceUpdatedEventMetadata
-> Maybe ApprovalRuleOverriddenEventMetadata
-> PullRequestEvent)
-> Parser (Maybe PullRequestMergedStateChangedEventMetadata)
-> Parser
(Maybe PullRequestCreatedEventMetadata
-> Maybe ApprovalRuleEventMetadata
-> Maybe PullRequestEventType
-> Maybe PullRequestStatusChangedEventMetadata
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe ApprovalStateChangedEventMetadata
-> Maybe PullRequestSourceReferenceUpdatedEventMetadata
-> Maybe ApprovalRuleOverriddenEventMetadata
-> PullRequestEvent)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x
Object
-> Text
-> Parser (Maybe PullRequestMergedStateChangedEventMetadata)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"pullRequestMergedStateChangedEventMetadata"
)
Parser
(Maybe PullRequestCreatedEventMetadata
-> Maybe ApprovalRuleEventMetadata
-> Maybe PullRequestEventType
-> Maybe PullRequestStatusChangedEventMetadata
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe ApprovalStateChangedEventMetadata
-> Maybe PullRequestSourceReferenceUpdatedEventMetadata
-> Maybe ApprovalRuleOverriddenEventMetadata
-> PullRequestEvent)
-> Parser (Maybe PullRequestCreatedEventMetadata)
-> Parser
(Maybe ApprovalRuleEventMetadata
-> Maybe PullRequestEventType
-> Maybe PullRequestStatusChangedEventMetadata
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe ApprovalStateChangedEventMetadata
-> Maybe PullRequestSourceReferenceUpdatedEventMetadata
-> Maybe ApprovalRuleOverriddenEventMetadata
-> PullRequestEvent)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe PullRequestCreatedEventMetadata)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"pullRequestCreatedEventMetadata")
Parser
(Maybe ApprovalRuleEventMetadata
-> Maybe PullRequestEventType
-> Maybe PullRequestStatusChangedEventMetadata
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe ApprovalStateChangedEventMetadata
-> Maybe PullRequestSourceReferenceUpdatedEventMetadata
-> Maybe ApprovalRuleOverriddenEventMetadata
-> PullRequestEvent)
-> Parser (Maybe ApprovalRuleEventMetadata)
-> Parser
(Maybe PullRequestEventType
-> Maybe PullRequestStatusChangedEventMetadata
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe ApprovalStateChangedEventMetadata
-> Maybe PullRequestSourceReferenceUpdatedEventMetadata
-> Maybe ApprovalRuleOverriddenEventMetadata
-> PullRequestEvent)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ApprovalRuleEventMetadata)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"approvalRuleEventMetadata")
Parser
(Maybe PullRequestEventType
-> Maybe PullRequestStatusChangedEventMetadata
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe ApprovalStateChangedEventMetadata
-> Maybe PullRequestSourceReferenceUpdatedEventMetadata
-> Maybe ApprovalRuleOverriddenEventMetadata
-> PullRequestEvent)
-> Parser (Maybe PullRequestEventType)
-> Parser
(Maybe PullRequestStatusChangedEventMetadata
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe ApprovalStateChangedEventMetadata
-> Maybe PullRequestSourceReferenceUpdatedEventMetadata
-> Maybe ApprovalRuleOverriddenEventMetadata
-> PullRequestEvent)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe PullRequestEventType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"pullRequestEventType")
Parser
(Maybe PullRequestStatusChangedEventMetadata
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe ApprovalStateChangedEventMetadata
-> Maybe PullRequestSourceReferenceUpdatedEventMetadata
-> Maybe ApprovalRuleOverriddenEventMetadata
-> PullRequestEvent)
-> Parser (Maybe PullRequestStatusChangedEventMetadata)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe ApprovalStateChangedEventMetadata
-> Maybe PullRequestSourceReferenceUpdatedEventMetadata
-> Maybe ApprovalRuleOverriddenEventMetadata
-> PullRequestEvent)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Parser (Maybe PullRequestStatusChangedEventMetadata)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"pullRequestStatusChangedEventMetadata")
Parser
(Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe ApprovalStateChangedEventMetadata
-> Maybe PullRequestSourceReferenceUpdatedEventMetadata
-> Maybe ApprovalRuleOverriddenEventMetadata
-> PullRequestEvent)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe POSIX
-> Maybe ApprovalStateChangedEventMetadata
-> Maybe PullRequestSourceReferenceUpdatedEventMetadata
-> Maybe ApprovalRuleOverriddenEventMetadata
-> PullRequestEvent)
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
"actorArn")
Parser
(Maybe Text
-> Maybe POSIX
-> Maybe ApprovalStateChangedEventMetadata
-> Maybe PullRequestSourceReferenceUpdatedEventMetadata
-> Maybe ApprovalRuleOverriddenEventMetadata
-> PullRequestEvent)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX
-> Maybe ApprovalStateChangedEventMetadata
-> Maybe PullRequestSourceReferenceUpdatedEventMetadata
-> Maybe ApprovalRuleOverriddenEventMetadata
-> PullRequestEvent)
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 ApprovalStateChangedEventMetadata
-> Maybe PullRequestSourceReferenceUpdatedEventMetadata
-> Maybe ApprovalRuleOverriddenEventMetadata
-> PullRequestEvent)
-> Parser (Maybe POSIX)
-> Parser
(Maybe ApprovalStateChangedEventMetadata
-> Maybe PullRequestSourceReferenceUpdatedEventMetadata
-> Maybe ApprovalRuleOverriddenEventMetadata
-> PullRequestEvent)
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
"eventDate")
Parser
(Maybe ApprovalStateChangedEventMetadata
-> Maybe PullRequestSourceReferenceUpdatedEventMetadata
-> Maybe ApprovalRuleOverriddenEventMetadata
-> PullRequestEvent)
-> Parser (Maybe ApprovalStateChangedEventMetadata)
-> Parser
(Maybe PullRequestSourceReferenceUpdatedEventMetadata
-> Maybe ApprovalRuleOverriddenEventMetadata -> PullRequestEvent)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ApprovalStateChangedEventMetadata)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"approvalStateChangedEventMetadata")
Parser
(Maybe PullRequestSourceReferenceUpdatedEventMetadata
-> Maybe ApprovalRuleOverriddenEventMetadata -> PullRequestEvent)
-> Parser (Maybe PullRequestSourceReferenceUpdatedEventMetadata)
-> Parser
(Maybe ApprovalRuleOverriddenEventMetadata -> PullRequestEvent)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
Object
-> Text
-> Parser (Maybe PullRequestSourceReferenceUpdatedEventMetadata)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"pullRequestSourceReferenceUpdatedEventMetadata"
)
Parser
(Maybe ApprovalRuleOverriddenEventMetadata -> PullRequestEvent)
-> Parser (Maybe ApprovalRuleOverriddenEventMetadata)
-> Parser PullRequestEvent
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Parser (Maybe ApprovalRuleOverriddenEventMetadata)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"approvalRuleOverriddenEventMetadata")
)
instance Prelude.Hashable PullRequestEvent
instance Prelude.NFData PullRequestEvent