{-# 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.PullRequestSourceReferenceUpdatedEventMetadata where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data PullRequestSourceReferenceUpdatedEventMetadata = PullRequestSourceReferenceUpdatedEventMetadata'
{
PullRequestSourceReferenceUpdatedEventMetadata -> Maybe Text
afterCommitId :: Prelude.Maybe Prelude.Text,
PullRequestSourceReferenceUpdatedEventMetadata -> Maybe Text
beforeCommitId :: Prelude.Maybe Prelude.Text,
PullRequestSourceReferenceUpdatedEventMetadata -> Maybe Text
mergeBase :: Prelude.Maybe Prelude.Text,
PullRequestSourceReferenceUpdatedEventMetadata -> Maybe Text
repositoryName :: Prelude.Maybe Prelude.Text
}
deriving (PullRequestSourceReferenceUpdatedEventMetadata
-> PullRequestSourceReferenceUpdatedEventMetadata -> Bool
(PullRequestSourceReferenceUpdatedEventMetadata
-> PullRequestSourceReferenceUpdatedEventMetadata -> Bool)
-> (PullRequestSourceReferenceUpdatedEventMetadata
-> PullRequestSourceReferenceUpdatedEventMetadata -> Bool)
-> Eq PullRequestSourceReferenceUpdatedEventMetadata
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PullRequestSourceReferenceUpdatedEventMetadata
-> PullRequestSourceReferenceUpdatedEventMetadata -> Bool
$c/= :: PullRequestSourceReferenceUpdatedEventMetadata
-> PullRequestSourceReferenceUpdatedEventMetadata -> Bool
== :: PullRequestSourceReferenceUpdatedEventMetadata
-> PullRequestSourceReferenceUpdatedEventMetadata -> Bool
$c== :: PullRequestSourceReferenceUpdatedEventMetadata
-> PullRequestSourceReferenceUpdatedEventMetadata -> Bool
Prelude.Eq, ReadPrec [PullRequestSourceReferenceUpdatedEventMetadata]
ReadPrec PullRequestSourceReferenceUpdatedEventMetadata
Int -> ReadS PullRequestSourceReferenceUpdatedEventMetadata
ReadS [PullRequestSourceReferenceUpdatedEventMetadata]
(Int -> ReadS PullRequestSourceReferenceUpdatedEventMetadata)
-> ReadS [PullRequestSourceReferenceUpdatedEventMetadata]
-> ReadPrec PullRequestSourceReferenceUpdatedEventMetadata
-> ReadPrec [PullRequestSourceReferenceUpdatedEventMetadata]
-> Read PullRequestSourceReferenceUpdatedEventMetadata
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PullRequestSourceReferenceUpdatedEventMetadata]
$creadListPrec :: ReadPrec [PullRequestSourceReferenceUpdatedEventMetadata]
readPrec :: ReadPrec PullRequestSourceReferenceUpdatedEventMetadata
$creadPrec :: ReadPrec PullRequestSourceReferenceUpdatedEventMetadata
readList :: ReadS [PullRequestSourceReferenceUpdatedEventMetadata]
$creadList :: ReadS [PullRequestSourceReferenceUpdatedEventMetadata]
readsPrec :: Int -> ReadS PullRequestSourceReferenceUpdatedEventMetadata
$creadsPrec :: Int -> ReadS PullRequestSourceReferenceUpdatedEventMetadata
Prelude.Read, Int -> PullRequestSourceReferenceUpdatedEventMetadata -> ShowS
[PullRequestSourceReferenceUpdatedEventMetadata] -> ShowS
PullRequestSourceReferenceUpdatedEventMetadata -> String
(Int -> PullRequestSourceReferenceUpdatedEventMetadata -> ShowS)
-> (PullRequestSourceReferenceUpdatedEventMetadata -> String)
-> ([PullRequestSourceReferenceUpdatedEventMetadata] -> ShowS)
-> Show PullRequestSourceReferenceUpdatedEventMetadata
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PullRequestSourceReferenceUpdatedEventMetadata] -> ShowS
$cshowList :: [PullRequestSourceReferenceUpdatedEventMetadata] -> ShowS
show :: PullRequestSourceReferenceUpdatedEventMetadata -> String
$cshow :: PullRequestSourceReferenceUpdatedEventMetadata -> String
showsPrec :: Int -> PullRequestSourceReferenceUpdatedEventMetadata -> ShowS
$cshowsPrec :: Int -> PullRequestSourceReferenceUpdatedEventMetadata -> ShowS
Prelude.Show, (forall x.
PullRequestSourceReferenceUpdatedEventMetadata
-> Rep PullRequestSourceReferenceUpdatedEventMetadata x)
-> (forall x.
Rep PullRequestSourceReferenceUpdatedEventMetadata x
-> PullRequestSourceReferenceUpdatedEventMetadata)
-> Generic PullRequestSourceReferenceUpdatedEventMetadata
forall x.
Rep PullRequestSourceReferenceUpdatedEventMetadata x
-> PullRequestSourceReferenceUpdatedEventMetadata
forall x.
PullRequestSourceReferenceUpdatedEventMetadata
-> Rep PullRequestSourceReferenceUpdatedEventMetadata x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep PullRequestSourceReferenceUpdatedEventMetadata x
-> PullRequestSourceReferenceUpdatedEventMetadata
$cfrom :: forall x.
PullRequestSourceReferenceUpdatedEventMetadata
-> Rep PullRequestSourceReferenceUpdatedEventMetadata x
Prelude.Generic)
newPullRequestSourceReferenceUpdatedEventMetadata ::
PullRequestSourceReferenceUpdatedEventMetadata
newPullRequestSourceReferenceUpdatedEventMetadata :: PullRequestSourceReferenceUpdatedEventMetadata
newPullRequestSourceReferenceUpdatedEventMetadata =
PullRequestSourceReferenceUpdatedEventMetadata' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> PullRequestSourceReferenceUpdatedEventMetadata
PullRequestSourceReferenceUpdatedEventMetadata'
{ $sel:afterCommitId:PullRequestSourceReferenceUpdatedEventMetadata' :: Maybe Text
afterCommitId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:beforeCommitId:PullRequestSourceReferenceUpdatedEventMetadata' :: Maybe Text
beforeCommitId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:mergeBase:PullRequestSourceReferenceUpdatedEventMetadata' :: Maybe Text
mergeBase = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:repositoryName:PullRequestSourceReferenceUpdatedEventMetadata' :: Maybe Text
repositoryName =
Maybe Text
forall a. Maybe a
Prelude.Nothing
}
pullRequestSourceReferenceUpdatedEventMetadata_afterCommitId :: Lens.Lens' PullRequestSourceReferenceUpdatedEventMetadata (Prelude.Maybe Prelude.Text)
pullRequestSourceReferenceUpdatedEventMetadata_afterCommitId :: (Maybe Text -> f (Maybe Text))
-> PullRequestSourceReferenceUpdatedEventMetadata
-> f PullRequestSourceReferenceUpdatedEventMetadata
pullRequestSourceReferenceUpdatedEventMetadata_afterCommitId = (PullRequestSourceReferenceUpdatedEventMetadata -> Maybe Text)
-> (PullRequestSourceReferenceUpdatedEventMetadata
-> Maybe Text -> PullRequestSourceReferenceUpdatedEventMetadata)
-> Lens
PullRequestSourceReferenceUpdatedEventMetadata
PullRequestSourceReferenceUpdatedEventMetadata
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PullRequestSourceReferenceUpdatedEventMetadata' {Maybe Text
afterCommitId :: Maybe Text
$sel:afterCommitId:PullRequestSourceReferenceUpdatedEventMetadata' :: PullRequestSourceReferenceUpdatedEventMetadata -> Maybe Text
afterCommitId} -> Maybe Text
afterCommitId) (\s :: PullRequestSourceReferenceUpdatedEventMetadata
s@PullRequestSourceReferenceUpdatedEventMetadata' {} Maybe Text
a -> PullRequestSourceReferenceUpdatedEventMetadata
s {$sel:afterCommitId:PullRequestSourceReferenceUpdatedEventMetadata' :: Maybe Text
afterCommitId = Maybe Text
a} :: PullRequestSourceReferenceUpdatedEventMetadata)
pullRequestSourceReferenceUpdatedEventMetadata_beforeCommitId :: Lens.Lens' PullRequestSourceReferenceUpdatedEventMetadata (Prelude.Maybe Prelude.Text)
pullRequestSourceReferenceUpdatedEventMetadata_beforeCommitId :: (Maybe Text -> f (Maybe Text))
-> PullRequestSourceReferenceUpdatedEventMetadata
-> f PullRequestSourceReferenceUpdatedEventMetadata
pullRequestSourceReferenceUpdatedEventMetadata_beforeCommitId = (PullRequestSourceReferenceUpdatedEventMetadata -> Maybe Text)
-> (PullRequestSourceReferenceUpdatedEventMetadata
-> Maybe Text -> PullRequestSourceReferenceUpdatedEventMetadata)
-> Lens
PullRequestSourceReferenceUpdatedEventMetadata
PullRequestSourceReferenceUpdatedEventMetadata
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PullRequestSourceReferenceUpdatedEventMetadata' {Maybe Text
beforeCommitId :: Maybe Text
$sel:beforeCommitId:PullRequestSourceReferenceUpdatedEventMetadata' :: PullRequestSourceReferenceUpdatedEventMetadata -> Maybe Text
beforeCommitId} -> Maybe Text
beforeCommitId) (\s :: PullRequestSourceReferenceUpdatedEventMetadata
s@PullRequestSourceReferenceUpdatedEventMetadata' {} Maybe Text
a -> PullRequestSourceReferenceUpdatedEventMetadata
s {$sel:beforeCommitId:PullRequestSourceReferenceUpdatedEventMetadata' :: Maybe Text
beforeCommitId = Maybe Text
a} :: PullRequestSourceReferenceUpdatedEventMetadata)
pullRequestSourceReferenceUpdatedEventMetadata_mergeBase :: Lens.Lens' PullRequestSourceReferenceUpdatedEventMetadata (Prelude.Maybe Prelude.Text)
pullRequestSourceReferenceUpdatedEventMetadata_mergeBase :: (Maybe Text -> f (Maybe Text))
-> PullRequestSourceReferenceUpdatedEventMetadata
-> f PullRequestSourceReferenceUpdatedEventMetadata
pullRequestSourceReferenceUpdatedEventMetadata_mergeBase = (PullRequestSourceReferenceUpdatedEventMetadata -> Maybe Text)
-> (PullRequestSourceReferenceUpdatedEventMetadata
-> Maybe Text -> PullRequestSourceReferenceUpdatedEventMetadata)
-> Lens
PullRequestSourceReferenceUpdatedEventMetadata
PullRequestSourceReferenceUpdatedEventMetadata
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PullRequestSourceReferenceUpdatedEventMetadata' {Maybe Text
mergeBase :: Maybe Text
$sel:mergeBase:PullRequestSourceReferenceUpdatedEventMetadata' :: PullRequestSourceReferenceUpdatedEventMetadata -> Maybe Text
mergeBase} -> Maybe Text
mergeBase) (\s :: PullRequestSourceReferenceUpdatedEventMetadata
s@PullRequestSourceReferenceUpdatedEventMetadata' {} Maybe Text
a -> PullRequestSourceReferenceUpdatedEventMetadata
s {$sel:mergeBase:PullRequestSourceReferenceUpdatedEventMetadata' :: Maybe Text
mergeBase = Maybe Text
a} :: PullRequestSourceReferenceUpdatedEventMetadata)
pullRequestSourceReferenceUpdatedEventMetadata_repositoryName :: Lens.Lens' PullRequestSourceReferenceUpdatedEventMetadata (Prelude.Maybe Prelude.Text)
pullRequestSourceReferenceUpdatedEventMetadata_repositoryName :: (Maybe Text -> f (Maybe Text))
-> PullRequestSourceReferenceUpdatedEventMetadata
-> f PullRequestSourceReferenceUpdatedEventMetadata
pullRequestSourceReferenceUpdatedEventMetadata_repositoryName = (PullRequestSourceReferenceUpdatedEventMetadata -> Maybe Text)
-> (PullRequestSourceReferenceUpdatedEventMetadata
-> Maybe Text -> PullRequestSourceReferenceUpdatedEventMetadata)
-> Lens
PullRequestSourceReferenceUpdatedEventMetadata
PullRequestSourceReferenceUpdatedEventMetadata
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PullRequestSourceReferenceUpdatedEventMetadata' {Maybe Text
repositoryName :: Maybe Text
$sel:repositoryName:PullRequestSourceReferenceUpdatedEventMetadata' :: PullRequestSourceReferenceUpdatedEventMetadata -> Maybe Text
repositoryName} -> Maybe Text
repositoryName) (\s :: PullRequestSourceReferenceUpdatedEventMetadata
s@PullRequestSourceReferenceUpdatedEventMetadata' {} Maybe Text
a -> PullRequestSourceReferenceUpdatedEventMetadata
s {$sel:repositoryName:PullRequestSourceReferenceUpdatedEventMetadata' :: Maybe Text
repositoryName = Maybe Text
a} :: PullRequestSourceReferenceUpdatedEventMetadata)
instance
Core.FromJSON
PullRequestSourceReferenceUpdatedEventMetadata
where
parseJSON :: Value -> Parser PullRequestSourceReferenceUpdatedEventMetadata
parseJSON =
String
-> (Object
-> Parser PullRequestSourceReferenceUpdatedEventMetadata)
-> Value
-> Parser PullRequestSourceReferenceUpdatedEventMetadata
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"PullRequestSourceReferenceUpdatedEventMetadata"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> PullRequestSourceReferenceUpdatedEventMetadata
PullRequestSourceReferenceUpdatedEventMetadata'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> PullRequestSourceReferenceUpdatedEventMetadata)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> PullRequestSourceReferenceUpdatedEventMetadata)
forall (f :: * -> *) a b. Functor 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
"afterCommitId")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> PullRequestSourceReferenceUpdatedEventMetadata)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text -> PullRequestSourceReferenceUpdatedEventMetadata)
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
"beforeCommitId")
Parser
(Maybe Text
-> Maybe Text -> PullRequestSourceReferenceUpdatedEventMetadata)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> PullRequestSourceReferenceUpdatedEventMetadata)
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
"mergeBase")
Parser
(Maybe Text -> PullRequestSourceReferenceUpdatedEventMetadata)
-> Parser (Maybe Text)
-> Parser PullRequestSourceReferenceUpdatedEventMetadata
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
"repositoryName")
)
instance
Prelude.Hashable
PullRequestSourceReferenceUpdatedEventMetadata
instance
Prelude.NFData
PullRequestSourceReferenceUpdatedEventMetadata