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