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