{-# 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.PipelineExecution where
import Amazonka.CodePipeline.Types.ArtifactRevision
import Amazonka.CodePipeline.Types.PipelineExecutionStatus
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data PipelineExecution = PipelineExecution'
{
PipelineExecution -> Maybe PipelineExecutionStatus
status :: Prelude.Maybe PipelineExecutionStatus,
PipelineExecution -> Maybe Text
pipelineName :: Prelude.Maybe Prelude.Text,
PipelineExecution -> Maybe Text
statusSummary :: Prelude.Maybe Prelude.Text,
PipelineExecution -> Maybe Natural
pipelineVersion :: Prelude.Maybe Prelude.Natural,
PipelineExecution -> Maybe Text
pipelineExecutionId :: Prelude.Maybe Prelude.Text,
PipelineExecution -> Maybe [ArtifactRevision]
artifactRevisions :: Prelude.Maybe [ArtifactRevision]
}
deriving (PipelineExecution -> PipelineExecution -> Bool
(PipelineExecution -> PipelineExecution -> Bool)
-> (PipelineExecution -> PipelineExecution -> Bool)
-> Eq PipelineExecution
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PipelineExecution -> PipelineExecution -> Bool
$c/= :: PipelineExecution -> PipelineExecution -> Bool
== :: PipelineExecution -> PipelineExecution -> Bool
$c== :: PipelineExecution -> PipelineExecution -> Bool
Prelude.Eq, ReadPrec [PipelineExecution]
ReadPrec PipelineExecution
Int -> ReadS PipelineExecution
ReadS [PipelineExecution]
(Int -> ReadS PipelineExecution)
-> ReadS [PipelineExecution]
-> ReadPrec PipelineExecution
-> ReadPrec [PipelineExecution]
-> Read PipelineExecution
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PipelineExecution]
$creadListPrec :: ReadPrec [PipelineExecution]
readPrec :: ReadPrec PipelineExecution
$creadPrec :: ReadPrec PipelineExecution
readList :: ReadS [PipelineExecution]
$creadList :: ReadS [PipelineExecution]
readsPrec :: Int -> ReadS PipelineExecution
$creadsPrec :: Int -> ReadS PipelineExecution
Prelude.Read, Int -> PipelineExecution -> ShowS
[PipelineExecution] -> ShowS
PipelineExecution -> String
(Int -> PipelineExecution -> ShowS)
-> (PipelineExecution -> String)
-> ([PipelineExecution] -> ShowS)
-> Show PipelineExecution
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PipelineExecution] -> ShowS
$cshowList :: [PipelineExecution] -> ShowS
show :: PipelineExecution -> String
$cshow :: PipelineExecution -> String
showsPrec :: Int -> PipelineExecution -> ShowS
$cshowsPrec :: Int -> PipelineExecution -> ShowS
Prelude.Show, (forall x. PipelineExecution -> Rep PipelineExecution x)
-> (forall x. Rep PipelineExecution x -> PipelineExecution)
-> Generic PipelineExecution
forall x. Rep PipelineExecution x -> PipelineExecution
forall x. PipelineExecution -> Rep PipelineExecution x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PipelineExecution x -> PipelineExecution
$cfrom :: forall x. PipelineExecution -> Rep PipelineExecution x
Prelude.Generic)
newPipelineExecution ::
PipelineExecution
newPipelineExecution :: PipelineExecution
newPipelineExecution =
PipelineExecution' :: Maybe PipelineExecutionStatus
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe Text
-> Maybe [ArtifactRevision]
-> PipelineExecution
PipelineExecution'
{ $sel:status:PipelineExecution' :: Maybe PipelineExecutionStatus
status = Maybe PipelineExecutionStatus
forall a. Maybe a
Prelude.Nothing,
$sel:pipelineName:PipelineExecution' :: Maybe Text
pipelineName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:statusSummary:PipelineExecution' :: Maybe Text
statusSummary = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:pipelineVersion:PipelineExecution' :: Maybe Natural
pipelineVersion = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:pipelineExecutionId:PipelineExecution' :: Maybe Text
pipelineExecutionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:artifactRevisions:PipelineExecution' :: Maybe [ArtifactRevision]
artifactRevisions = Maybe [ArtifactRevision]
forall a. Maybe a
Prelude.Nothing
}
pipelineExecution_status :: Lens.Lens' PipelineExecution (Prelude.Maybe PipelineExecutionStatus)
pipelineExecution_status :: (Maybe PipelineExecutionStatus
-> f (Maybe PipelineExecutionStatus))
-> PipelineExecution -> f PipelineExecution
pipelineExecution_status = (PipelineExecution -> Maybe PipelineExecutionStatus)
-> (PipelineExecution
-> Maybe PipelineExecutionStatus -> PipelineExecution)
-> Lens
PipelineExecution
PipelineExecution
(Maybe PipelineExecutionStatus)
(Maybe PipelineExecutionStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PipelineExecution' {Maybe PipelineExecutionStatus
status :: Maybe PipelineExecutionStatus
$sel:status:PipelineExecution' :: PipelineExecution -> Maybe PipelineExecutionStatus
status} -> Maybe PipelineExecutionStatus
status) (\s :: PipelineExecution
s@PipelineExecution' {} Maybe PipelineExecutionStatus
a -> PipelineExecution
s {$sel:status:PipelineExecution' :: Maybe PipelineExecutionStatus
status = Maybe PipelineExecutionStatus
a} :: PipelineExecution)
pipelineExecution_pipelineName :: Lens.Lens' PipelineExecution (Prelude.Maybe Prelude.Text)
pipelineExecution_pipelineName :: (Maybe Text -> f (Maybe Text))
-> PipelineExecution -> f PipelineExecution
pipelineExecution_pipelineName = (PipelineExecution -> Maybe Text)
-> (PipelineExecution -> Maybe Text -> PipelineExecution)
-> Lens
PipelineExecution PipelineExecution (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PipelineExecution' {Maybe Text
pipelineName :: Maybe Text
$sel:pipelineName:PipelineExecution' :: PipelineExecution -> Maybe Text
pipelineName} -> Maybe Text
pipelineName) (\s :: PipelineExecution
s@PipelineExecution' {} Maybe Text
a -> PipelineExecution
s {$sel:pipelineName:PipelineExecution' :: Maybe Text
pipelineName = Maybe Text
a} :: PipelineExecution)
pipelineExecution_statusSummary :: Lens.Lens' PipelineExecution (Prelude.Maybe Prelude.Text)
pipelineExecution_statusSummary :: (Maybe Text -> f (Maybe Text))
-> PipelineExecution -> f PipelineExecution
pipelineExecution_statusSummary = (PipelineExecution -> Maybe Text)
-> (PipelineExecution -> Maybe Text -> PipelineExecution)
-> Lens
PipelineExecution PipelineExecution (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PipelineExecution' {Maybe Text
statusSummary :: Maybe Text
$sel:statusSummary:PipelineExecution' :: PipelineExecution -> Maybe Text
statusSummary} -> Maybe Text
statusSummary) (\s :: PipelineExecution
s@PipelineExecution' {} Maybe Text
a -> PipelineExecution
s {$sel:statusSummary:PipelineExecution' :: Maybe Text
statusSummary = Maybe Text
a} :: PipelineExecution)
pipelineExecution_pipelineVersion :: Lens.Lens' PipelineExecution (Prelude.Maybe Prelude.Natural)
pipelineExecution_pipelineVersion :: (Maybe Natural -> f (Maybe Natural))
-> PipelineExecution -> f PipelineExecution
pipelineExecution_pipelineVersion = (PipelineExecution -> Maybe Natural)
-> (PipelineExecution -> Maybe Natural -> PipelineExecution)
-> Lens
PipelineExecution PipelineExecution (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PipelineExecution' {Maybe Natural
pipelineVersion :: Maybe Natural
$sel:pipelineVersion:PipelineExecution' :: PipelineExecution -> Maybe Natural
pipelineVersion} -> Maybe Natural
pipelineVersion) (\s :: PipelineExecution
s@PipelineExecution' {} Maybe Natural
a -> PipelineExecution
s {$sel:pipelineVersion:PipelineExecution' :: Maybe Natural
pipelineVersion = Maybe Natural
a} :: PipelineExecution)
pipelineExecution_pipelineExecutionId :: Lens.Lens' PipelineExecution (Prelude.Maybe Prelude.Text)
pipelineExecution_pipelineExecutionId :: (Maybe Text -> f (Maybe Text))
-> PipelineExecution -> f PipelineExecution
pipelineExecution_pipelineExecutionId = (PipelineExecution -> Maybe Text)
-> (PipelineExecution -> Maybe Text -> PipelineExecution)
-> Lens
PipelineExecution PipelineExecution (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PipelineExecution' {Maybe Text
pipelineExecutionId :: Maybe Text
$sel:pipelineExecutionId:PipelineExecution' :: PipelineExecution -> Maybe Text
pipelineExecutionId} -> Maybe Text
pipelineExecutionId) (\s :: PipelineExecution
s@PipelineExecution' {} Maybe Text
a -> PipelineExecution
s {$sel:pipelineExecutionId:PipelineExecution' :: Maybe Text
pipelineExecutionId = Maybe Text
a} :: PipelineExecution)
pipelineExecution_artifactRevisions :: Lens.Lens' PipelineExecution (Prelude.Maybe [ArtifactRevision])
pipelineExecution_artifactRevisions :: (Maybe [ArtifactRevision] -> f (Maybe [ArtifactRevision]))
-> PipelineExecution -> f PipelineExecution
pipelineExecution_artifactRevisions = (PipelineExecution -> Maybe [ArtifactRevision])
-> (PipelineExecution
-> Maybe [ArtifactRevision] -> PipelineExecution)
-> Lens
PipelineExecution
PipelineExecution
(Maybe [ArtifactRevision])
(Maybe [ArtifactRevision])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PipelineExecution' {Maybe [ArtifactRevision]
artifactRevisions :: Maybe [ArtifactRevision]
$sel:artifactRevisions:PipelineExecution' :: PipelineExecution -> Maybe [ArtifactRevision]
artifactRevisions} -> Maybe [ArtifactRevision]
artifactRevisions) (\s :: PipelineExecution
s@PipelineExecution' {} Maybe [ArtifactRevision]
a -> PipelineExecution
s {$sel:artifactRevisions:PipelineExecution' :: Maybe [ArtifactRevision]
artifactRevisions = Maybe [ArtifactRevision]
a} :: PipelineExecution) ((Maybe [ArtifactRevision] -> f (Maybe [ArtifactRevision]))
-> PipelineExecution -> f PipelineExecution)
-> ((Maybe [ArtifactRevision] -> f (Maybe [ArtifactRevision]))
-> Maybe [ArtifactRevision] -> f (Maybe [ArtifactRevision]))
-> (Maybe [ArtifactRevision] -> f (Maybe [ArtifactRevision]))
-> PipelineExecution
-> f PipelineExecution
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[ArtifactRevision]
[ArtifactRevision]
[ArtifactRevision]
[ArtifactRevision]
-> Iso
(Maybe [ArtifactRevision])
(Maybe [ArtifactRevision])
(Maybe [ArtifactRevision])
(Maybe [ArtifactRevision])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
[ArtifactRevision]
[ArtifactRevision]
[ArtifactRevision]
[ArtifactRevision]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.FromJSON PipelineExecution where
parseJSON :: Value -> Parser PipelineExecution
parseJSON =
String
-> (Object -> Parser PipelineExecution)
-> Value
-> Parser PipelineExecution
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"PipelineExecution"
( \Object
x ->
Maybe PipelineExecutionStatus
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe Text
-> Maybe [ArtifactRevision]
-> PipelineExecution
PipelineExecution'
(Maybe PipelineExecutionStatus
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe Text
-> Maybe [ArtifactRevision]
-> PipelineExecution)
-> Parser (Maybe PipelineExecutionStatus)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe Text
-> Maybe [ArtifactRevision]
-> PipelineExecution)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe PipelineExecutionStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"status")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe Text
-> Maybe [ArtifactRevision]
-> PipelineExecution)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Natural
-> Maybe Text
-> Maybe [ArtifactRevision]
-> PipelineExecution)
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
"pipelineName")
Parser
(Maybe Text
-> Maybe Natural
-> Maybe Text
-> Maybe [ArtifactRevision]
-> PipelineExecution)
-> Parser (Maybe Text)
-> Parser
(Maybe Natural
-> Maybe Text -> Maybe [ArtifactRevision] -> PipelineExecution)
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
"statusSummary")
Parser
(Maybe Natural
-> Maybe Text -> Maybe [ArtifactRevision] -> PipelineExecution)
-> Parser (Maybe Natural)
-> Parser
(Maybe Text -> Maybe [ArtifactRevision] -> PipelineExecution)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"pipelineVersion")
Parser
(Maybe Text -> Maybe [ArtifactRevision] -> PipelineExecution)
-> Parser (Maybe Text)
-> Parser (Maybe [ArtifactRevision] -> PipelineExecution)
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
"pipelineExecutionId")
Parser (Maybe [ArtifactRevision] -> PipelineExecution)
-> Parser (Maybe [ArtifactRevision]) -> Parser PipelineExecution
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [ArtifactRevision]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"artifactRevisions"
Parser (Maybe (Maybe [ArtifactRevision]))
-> Maybe [ArtifactRevision] -> Parser (Maybe [ArtifactRevision])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [ArtifactRevision]
forall a. Monoid a => a
Prelude.mempty
)
)
instance Prelude.Hashable PipelineExecution
instance Prelude.NFData PipelineExecution