{-# 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.PullRequestMergedStateChangedEventMetadata where
import Amazonka.CodeCommit.Types.MergeMetadata
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data PullRequestMergedStateChangedEventMetadata = PullRequestMergedStateChangedEventMetadata'
{
PullRequestMergedStateChangedEventMetadata -> Maybe Text
destinationReference :: Prelude.Maybe Prelude.Text,
PullRequestMergedStateChangedEventMetadata -> Maybe MergeMetadata
mergeMetadata :: Prelude.Maybe MergeMetadata,
PullRequestMergedStateChangedEventMetadata -> Maybe Text
repositoryName :: Prelude.Maybe Prelude.Text
}
deriving (PullRequestMergedStateChangedEventMetadata
-> PullRequestMergedStateChangedEventMetadata -> Bool
(PullRequestMergedStateChangedEventMetadata
-> PullRequestMergedStateChangedEventMetadata -> Bool)
-> (PullRequestMergedStateChangedEventMetadata
-> PullRequestMergedStateChangedEventMetadata -> Bool)
-> Eq PullRequestMergedStateChangedEventMetadata
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PullRequestMergedStateChangedEventMetadata
-> PullRequestMergedStateChangedEventMetadata -> Bool
$c/= :: PullRequestMergedStateChangedEventMetadata
-> PullRequestMergedStateChangedEventMetadata -> Bool
== :: PullRequestMergedStateChangedEventMetadata
-> PullRequestMergedStateChangedEventMetadata -> Bool
$c== :: PullRequestMergedStateChangedEventMetadata
-> PullRequestMergedStateChangedEventMetadata -> Bool
Prelude.Eq, ReadPrec [PullRequestMergedStateChangedEventMetadata]
ReadPrec PullRequestMergedStateChangedEventMetadata
Int -> ReadS PullRequestMergedStateChangedEventMetadata
ReadS [PullRequestMergedStateChangedEventMetadata]
(Int -> ReadS PullRequestMergedStateChangedEventMetadata)
-> ReadS [PullRequestMergedStateChangedEventMetadata]
-> ReadPrec PullRequestMergedStateChangedEventMetadata
-> ReadPrec [PullRequestMergedStateChangedEventMetadata]
-> Read PullRequestMergedStateChangedEventMetadata
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PullRequestMergedStateChangedEventMetadata]
$creadListPrec :: ReadPrec [PullRequestMergedStateChangedEventMetadata]
readPrec :: ReadPrec PullRequestMergedStateChangedEventMetadata
$creadPrec :: ReadPrec PullRequestMergedStateChangedEventMetadata
readList :: ReadS [PullRequestMergedStateChangedEventMetadata]
$creadList :: ReadS [PullRequestMergedStateChangedEventMetadata]
readsPrec :: Int -> ReadS PullRequestMergedStateChangedEventMetadata
$creadsPrec :: Int -> ReadS PullRequestMergedStateChangedEventMetadata
Prelude.Read, Int -> PullRequestMergedStateChangedEventMetadata -> ShowS
[PullRequestMergedStateChangedEventMetadata] -> ShowS
PullRequestMergedStateChangedEventMetadata -> String
(Int -> PullRequestMergedStateChangedEventMetadata -> ShowS)
-> (PullRequestMergedStateChangedEventMetadata -> String)
-> ([PullRequestMergedStateChangedEventMetadata] -> ShowS)
-> Show PullRequestMergedStateChangedEventMetadata
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PullRequestMergedStateChangedEventMetadata] -> ShowS
$cshowList :: [PullRequestMergedStateChangedEventMetadata] -> ShowS
show :: PullRequestMergedStateChangedEventMetadata -> String
$cshow :: PullRequestMergedStateChangedEventMetadata -> String
showsPrec :: Int -> PullRequestMergedStateChangedEventMetadata -> ShowS
$cshowsPrec :: Int -> PullRequestMergedStateChangedEventMetadata -> ShowS
Prelude.Show, (forall x.
PullRequestMergedStateChangedEventMetadata
-> Rep PullRequestMergedStateChangedEventMetadata x)
-> (forall x.
Rep PullRequestMergedStateChangedEventMetadata x
-> PullRequestMergedStateChangedEventMetadata)
-> Generic PullRequestMergedStateChangedEventMetadata
forall x.
Rep PullRequestMergedStateChangedEventMetadata x
-> PullRequestMergedStateChangedEventMetadata
forall x.
PullRequestMergedStateChangedEventMetadata
-> Rep PullRequestMergedStateChangedEventMetadata x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep PullRequestMergedStateChangedEventMetadata x
-> PullRequestMergedStateChangedEventMetadata
$cfrom :: forall x.
PullRequestMergedStateChangedEventMetadata
-> Rep PullRequestMergedStateChangedEventMetadata x
Prelude.Generic)
newPullRequestMergedStateChangedEventMetadata ::
PullRequestMergedStateChangedEventMetadata
newPullRequestMergedStateChangedEventMetadata :: PullRequestMergedStateChangedEventMetadata
newPullRequestMergedStateChangedEventMetadata =
PullRequestMergedStateChangedEventMetadata' :: Maybe Text
-> Maybe MergeMetadata
-> Maybe Text
-> PullRequestMergedStateChangedEventMetadata
PullRequestMergedStateChangedEventMetadata'
{ $sel:destinationReference:PullRequestMergedStateChangedEventMetadata' :: Maybe Text
destinationReference =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:mergeMetadata:PullRequestMergedStateChangedEventMetadata' :: Maybe MergeMetadata
mergeMetadata = Maybe MergeMetadata
forall a. Maybe a
Prelude.Nothing,
$sel:repositoryName:PullRequestMergedStateChangedEventMetadata' :: Maybe Text
repositoryName =
Maybe Text
forall a. Maybe a
Prelude.Nothing
}
pullRequestMergedStateChangedEventMetadata_destinationReference :: Lens.Lens' PullRequestMergedStateChangedEventMetadata (Prelude.Maybe Prelude.Text)
pullRequestMergedStateChangedEventMetadata_destinationReference :: (Maybe Text -> f (Maybe Text))
-> PullRequestMergedStateChangedEventMetadata
-> f PullRequestMergedStateChangedEventMetadata
pullRequestMergedStateChangedEventMetadata_destinationReference = (PullRequestMergedStateChangedEventMetadata -> Maybe Text)
-> (PullRequestMergedStateChangedEventMetadata
-> Maybe Text -> PullRequestMergedStateChangedEventMetadata)
-> Lens
PullRequestMergedStateChangedEventMetadata
PullRequestMergedStateChangedEventMetadata
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PullRequestMergedStateChangedEventMetadata' {Maybe Text
destinationReference :: Maybe Text
$sel:destinationReference:PullRequestMergedStateChangedEventMetadata' :: PullRequestMergedStateChangedEventMetadata -> Maybe Text
destinationReference} -> Maybe Text
destinationReference) (\s :: PullRequestMergedStateChangedEventMetadata
s@PullRequestMergedStateChangedEventMetadata' {} Maybe Text
a -> PullRequestMergedStateChangedEventMetadata
s {$sel:destinationReference:PullRequestMergedStateChangedEventMetadata' :: Maybe Text
destinationReference = Maybe Text
a} :: PullRequestMergedStateChangedEventMetadata)
pullRequestMergedStateChangedEventMetadata_mergeMetadata :: Lens.Lens' PullRequestMergedStateChangedEventMetadata (Prelude.Maybe MergeMetadata)
pullRequestMergedStateChangedEventMetadata_mergeMetadata :: (Maybe MergeMetadata -> f (Maybe MergeMetadata))
-> PullRequestMergedStateChangedEventMetadata
-> f PullRequestMergedStateChangedEventMetadata
pullRequestMergedStateChangedEventMetadata_mergeMetadata = (PullRequestMergedStateChangedEventMetadata -> Maybe MergeMetadata)
-> (PullRequestMergedStateChangedEventMetadata
-> Maybe MergeMetadata
-> PullRequestMergedStateChangedEventMetadata)
-> Lens
PullRequestMergedStateChangedEventMetadata
PullRequestMergedStateChangedEventMetadata
(Maybe MergeMetadata)
(Maybe MergeMetadata)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PullRequestMergedStateChangedEventMetadata' {Maybe MergeMetadata
mergeMetadata :: Maybe MergeMetadata
$sel:mergeMetadata:PullRequestMergedStateChangedEventMetadata' :: PullRequestMergedStateChangedEventMetadata -> Maybe MergeMetadata
mergeMetadata} -> Maybe MergeMetadata
mergeMetadata) (\s :: PullRequestMergedStateChangedEventMetadata
s@PullRequestMergedStateChangedEventMetadata' {} Maybe MergeMetadata
a -> PullRequestMergedStateChangedEventMetadata
s {$sel:mergeMetadata:PullRequestMergedStateChangedEventMetadata' :: Maybe MergeMetadata
mergeMetadata = Maybe MergeMetadata
a} :: PullRequestMergedStateChangedEventMetadata)
pullRequestMergedStateChangedEventMetadata_repositoryName :: Lens.Lens' PullRequestMergedStateChangedEventMetadata (Prelude.Maybe Prelude.Text)
pullRequestMergedStateChangedEventMetadata_repositoryName :: (Maybe Text -> f (Maybe Text))
-> PullRequestMergedStateChangedEventMetadata
-> f PullRequestMergedStateChangedEventMetadata
pullRequestMergedStateChangedEventMetadata_repositoryName = (PullRequestMergedStateChangedEventMetadata -> Maybe Text)
-> (PullRequestMergedStateChangedEventMetadata
-> Maybe Text -> PullRequestMergedStateChangedEventMetadata)
-> Lens
PullRequestMergedStateChangedEventMetadata
PullRequestMergedStateChangedEventMetadata
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PullRequestMergedStateChangedEventMetadata' {Maybe Text
repositoryName :: Maybe Text
$sel:repositoryName:PullRequestMergedStateChangedEventMetadata' :: PullRequestMergedStateChangedEventMetadata -> Maybe Text
repositoryName} -> Maybe Text
repositoryName) (\s :: PullRequestMergedStateChangedEventMetadata
s@PullRequestMergedStateChangedEventMetadata' {} Maybe Text
a -> PullRequestMergedStateChangedEventMetadata
s {$sel:repositoryName:PullRequestMergedStateChangedEventMetadata' :: Maybe Text
repositoryName = Maybe Text
a} :: PullRequestMergedStateChangedEventMetadata)
instance
Core.FromJSON
PullRequestMergedStateChangedEventMetadata
where
parseJSON :: Value -> Parser PullRequestMergedStateChangedEventMetadata
parseJSON =
String
-> (Object -> Parser PullRequestMergedStateChangedEventMetadata)
-> Value
-> Parser PullRequestMergedStateChangedEventMetadata
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"PullRequestMergedStateChangedEventMetadata"
( \Object
x ->
Maybe Text
-> Maybe MergeMetadata
-> Maybe Text
-> PullRequestMergedStateChangedEventMetadata
PullRequestMergedStateChangedEventMetadata'
(Maybe Text
-> Maybe MergeMetadata
-> Maybe Text
-> PullRequestMergedStateChangedEventMetadata)
-> Parser (Maybe Text)
-> Parser
(Maybe MergeMetadata
-> Maybe Text -> PullRequestMergedStateChangedEventMetadata)
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
"destinationReference")
Parser
(Maybe MergeMetadata
-> Maybe Text -> PullRequestMergedStateChangedEventMetadata)
-> Parser (Maybe MergeMetadata)
-> Parser
(Maybe Text -> PullRequestMergedStateChangedEventMetadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe MergeMetadata)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"mergeMetadata")
Parser (Maybe Text -> PullRequestMergedStateChangedEventMetadata)
-> Parser (Maybe Text)
-> Parser PullRequestMergedStateChangedEventMetadata
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
PullRequestMergedStateChangedEventMetadata
instance
Prelude.NFData
PullRequestMergedStateChangedEventMetadata