{-# 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.CodePipeline.Types.StageExecution where
import Amazonka.CodePipeline.Types.StageExecutionStatus
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data StageExecution = StageExecution'
{
StageExecution -> Text
pipelineExecutionId :: Prelude.Text,
StageExecution -> StageExecutionStatus
status :: StageExecutionStatus
}
deriving (StageExecution -> StageExecution -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StageExecution -> StageExecution -> Bool
$c/= :: StageExecution -> StageExecution -> Bool
== :: StageExecution -> StageExecution -> Bool
$c== :: StageExecution -> StageExecution -> Bool
Prelude.Eq, ReadPrec [StageExecution]
ReadPrec StageExecution
Int -> ReadS StageExecution
ReadS [StageExecution]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StageExecution]
$creadListPrec :: ReadPrec [StageExecution]
readPrec :: ReadPrec StageExecution
$creadPrec :: ReadPrec StageExecution
readList :: ReadS [StageExecution]
$creadList :: ReadS [StageExecution]
readsPrec :: Int -> ReadS StageExecution
$creadsPrec :: Int -> ReadS StageExecution
Prelude.Read, Int -> StageExecution -> ShowS
[StageExecution] -> ShowS
StageExecution -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StageExecution] -> ShowS
$cshowList :: [StageExecution] -> ShowS
show :: StageExecution -> String
$cshow :: StageExecution -> String
showsPrec :: Int -> StageExecution -> ShowS
$cshowsPrec :: Int -> StageExecution -> ShowS
Prelude.Show, forall x. Rep StageExecution x -> StageExecution
forall x. StageExecution -> Rep StageExecution x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StageExecution x -> StageExecution
$cfrom :: forall x. StageExecution -> Rep StageExecution x
Prelude.Generic)
newStageExecution ::
Prelude.Text ->
StageExecutionStatus ->
StageExecution
newStageExecution :: Text -> StageExecutionStatus -> StageExecution
newStageExecution Text
pPipelineExecutionId_ StageExecutionStatus
pStatus_ =
StageExecution'
{ $sel:pipelineExecutionId:StageExecution' :: Text
pipelineExecutionId =
Text
pPipelineExecutionId_,
$sel:status:StageExecution' :: StageExecutionStatus
status = StageExecutionStatus
pStatus_
}
stageExecution_pipelineExecutionId :: Lens.Lens' StageExecution Prelude.Text
stageExecution_pipelineExecutionId :: Lens' StageExecution Text
stageExecution_pipelineExecutionId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StageExecution' {Text
pipelineExecutionId :: Text
$sel:pipelineExecutionId:StageExecution' :: StageExecution -> Text
pipelineExecutionId} -> Text
pipelineExecutionId) (\s :: StageExecution
s@StageExecution' {} Text
a -> StageExecution
s {$sel:pipelineExecutionId:StageExecution' :: Text
pipelineExecutionId = Text
a} :: StageExecution)
stageExecution_status :: Lens.Lens' StageExecution StageExecutionStatus
stageExecution_status :: Lens' StageExecution StageExecutionStatus
stageExecution_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StageExecution' {StageExecutionStatus
status :: StageExecutionStatus
$sel:status:StageExecution' :: StageExecution -> StageExecutionStatus
status} -> StageExecutionStatus
status) (\s :: StageExecution
s@StageExecution' {} StageExecutionStatus
a -> StageExecution
s {$sel:status:StageExecution' :: StageExecutionStatus
status = StageExecutionStatus
a} :: StageExecution)
instance Data.FromJSON StageExecution where
parseJSON :: Value -> Parser StageExecution
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"StageExecution"
( \Object
x ->
Text -> StageExecutionStatus -> StageExecution
StageExecution'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"pipelineExecutionId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"status")
)
instance Prelude.Hashable StageExecution where
hashWithSalt :: Int -> StageExecution -> Int
hashWithSalt Int
_salt StageExecution' {Text
StageExecutionStatus
status :: StageExecutionStatus
pipelineExecutionId :: Text
$sel:status:StageExecution' :: StageExecution -> StageExecutionStatus
$sel:pipelineExecutionId:StageExecution' :: StageExecution -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
pipelineExecutionId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` StageExecutionStatus
status
instance Prelude.NFData StageExecution where
rnf :: StageExecution -> ()
rnf StageExecution' {Text
StageExecutionStatus
status :: StageExecutionStatus
pipelineExecutionId :: Text
$sel:status:StageExecution' :: StageExecution -> StageExecutionStatus
$sel:pipelineExecutionId:StageExecution' :: StageExecution -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
pipelineExecutionId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf StageExecutionStatus
status