{-# 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.Proton.Types.ServicePipeline where
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
import Amazonka.Proton.Types.DeploymentStatus
data ServicePipeline = ServicePipeline'
{
ServicePipeline -> Maybe (Sensitive Text)
deploymentStatusMessage :: Prelude.Maybe (Data.Sensitive Prelude.Text),
ServicePipeline -> Maybe (Sensitive Text)
spec :: Prelude.Maybe (Data.Sensitive Prelude.Text),
ServicePipeline -> Text
arn :: Prelude.Text,
ServicePipeline -> POSIX
createdAt :: Data.POSIX,
ServicePipeline -> DeploymentStatus
deploymentStatus :: DeploymentStatus,
ServicePipeline -> POSIX
lastDeploymentAttemptedAt :: Data.POSIX,
ServicePipeline -> POSIX
lastDeploymentSucceededAt :: Data.POSIX,
ServicePipeline -> Text
templateMajorVersion :: Prelude.Text,
ServicePipeline -> Text
templateMinorVersion :: Prelude.Text,
ServicePipeline -> Text
templateName :: Prelude.Text
}
deriving (ServicePipeline -> ServicePipeline -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ServicePipeline -> ServicePipeline -> Bool
$c/= :: ServicePipeline -> ServicePipeline -> Bool
== :: ServicePipeline -> ServicePipeline -> Bool
$c== :: ServicePipeline -> ServicePipeline -> Bool
Prelude.Eq, Int -> ServicePipeline -> ShowS
[ServicePipeline] -> ShowS
ServicePipeline -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ServicePipeline] -> ShowS
$cshowList :: [ServicePipeline] -> ShowS
show :: ServicePipeline -> String
$cshow :: ServicePipeline -> String
showsPrec :: Int -> ServicePipeline -> ShowS
$cshowsPrec :: Int -> ServicePipeline -> ShowS
Prelude.Show, forall x. Rep ServicePipeline x -> ServicePipeline
forall x. ServicePipeline -> Rep ServicePipeline x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ServicePipeline x -> ServicePipeline
$cfrom :: forall x. ServicePipeline -> Rep ServicePipeline x
Prelude.Generic)
newServicePipeline ::
Prelude.Text ->
Prelude.UTCTime ->
DeploymentStatus ->
Prelude.UTCTime ->
Prelude.UTCTime ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
ServicePipeline
newServicePipeline :: Text
-> UTCTime
-> DeploymentStatus
-> UTCTime
-> UTCTime
-> Text
-> Text
-> Text
-> ServicePipeline
newServicePipeline
Text
pArn_
UTCTime
pCreatedAt_
DeploymentStatus
pDeploymentStatus_
UTCTime
pLastDeploymentAttemptedAt_
UTCTime
pLastDeploymentSucceededAt_
Text
pTemplateMajorVersion_
Text
pTemplateMinorVersion_
Text
pTemplateName_ =
ServicePipeline'
{ $sel:deploymentStatusMessage:ServicePipeline' :: Maybe (Sensitive Text)
deploymentStatusMessage =
forall a. Maybe a
Prelude.Nothing,
$sel:spec:ServicePipeline' :: Maybe (Sensitive Text)
spec = forall a. Maybe a
Prelude.Nothing,
$sel:arn:ServicePipeline' :: Text
arn = Text
pArn_,
$sel:createdAt:ServicePipeline' :: POSIX
createdAt = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreatedAt_,
$sel:deploymentStatus:ServicePipeline' :: DeploymentStatus
deploymentStatus = DeploymentStatus
pDeploymentStatus_,
$sel:lastDeploymentAttemptedAt:ServicePipeline' :: POSIX
lastDeploymentAttemptedAt =
forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pLastDeploymentAttemptedAt_,
$sel:lastDeploymentSucceededAt:ServicePipeline' :: POSIX
lastDeploymentSucceededAt =
forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pLastDeploymentSucceededAt_,
$sel:templateMajorVersion:ServicePipeline' :: Text
templateMajorVersion = Text
pTemplateMajorVersion_,
$sel:templateMinorVersion:ServicePipeline' :: Text
templateMinorVersion = Text
pTemplateMinorVersion_,
$sel:templateName:ServicePipeline' :: Text
templateName = Text
pTemplateName_
}
servicePipeline_deploymentStatusMessage :: Lens.Lens' ServicePipeline (Prelude.Maybe Prelude.Text)
servicePipeline_deploymentStatusMessage :: Lens' ServicePipeline (Maybe Text)
servicePipeline_deploymentStatusMessage = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServicePipeline' {Maybe (Sensitive Text)
deploymentStatusMessage :: Maybe (Sensitive Text)
$sel:deploymentStatusMessage:ServicePipeline' :: ServicePipeline -> Maybe (Sensitive Text)
deploymentStatusMessage} -> Maybe (Sensitive Text)
deploymentStatusMessage) (\s :: ServicePipeline
s@ServicePipeline' {} Maybe (Sensitive Text)
a -> ServicePipeline
s {$sel:deploymentStatusMessage:ServicePipeline' :: Maybe (Sensitive Text)
deploymentStatusMessage = Maybe (Sensitive Text)
a} :: ServicePipeline) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall a. Iso' (Sensitive a) a
Data._Sensitive
servicePipeline_spec :: Lens.Lens' ServicePipeline (Prelude.Maybe Prelude.Text)
servicePipeline_spec :: Lens' ServicePipeline (Maybe Text)
servicePipeline_spec = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServicePipeline' {Maybe (Sensitive Text)
spec :: Maybe (Sensitive Text)
$sel:spec:ServicePipeline' :: ServicePipeline -> Maybe (Sensitive Text)
spec} -> Maybe (Sensitive Text)
spec) (\s :: ServicePipeline
s@ServicePipeline' {} Maybe (Sensitive Text)
a -> ServicePipeline
s {$sel:spec:ServicePipeline' :: Maybe (Sensitive Text)
spec = Maybe (Sensitive Text)
a} :: ServicePipeline) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall a. Iso' (Sensitive a) a
Data._Sensitive
servicePipeline_arn :: Lens.Lens' ServicePipeline Prelude.Text
servicePipeline_arn :: Lens' ServicePipeline Text
servicePipeline_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServicePipeline' {Text
arn :: Text
$sel:arn:ServicePipeline' :: ServicePipeline -> Text
arn} -> Text
arn) (\s :: ServicePipeline
s@ServicePipeline' {} Text
a -> ServicePipeline
s {$sel:arn:ServicePipeline' :: Text
arn = Text
a} :: ServicePipeline)
servicePipeline_createdAt :: Lens.Lens' ServicePipeline Prelude.UTCTime
servicePipeline_createdAt :: Lens' ServicePipeline UTCTime
servicePipeline_createdAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServicePipeline' {POSIX
createdAt :: POSIX
$sel:createdAt:ServicePipeline' :: ServicePipeline -> POSIX
createdAt} -> POSIX
createdAt) (\s :: ServicePipeline
s@ServicePipeline' {} POSIX
a -> ServicePipeline
s {$sel:createdAt:ServicePipeline' :: POSIX
createdAt = POSIX
a} :: ServicePipeline) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
servicePipeline_deploymentStatus :: Lens.Lens' ServicePipeline DeploymentStatus
servicePipeline_deploymentStatus :: Lens' ServicePipeline DeploymentStatus
servicePipeline_deploymentStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServicePipeline' {DeploymentStatus
deploymentStatus :: DeploymentStatus
$sel:deploymentStatus:ServicePipeline' :: ServicePipeline -> DeploymentStatus
deploymentStatus} -> DeploymentStatus
deploymentStatus) (\s :: ServicePipeline
s@ServicePipeline' {} DeploymentStatus
a -> ServicePipeline
s {$sel:deploymentStatus:ServicePipeline' :: DeploymentStatus
deploymentStatus = DeploymentStatus
a} :: ServicePipeline)
servicePipeline_lastDeploymentAttemptedAt :: Lens.Lens' ServicePipeline Prelude.UTCTime
servicePipeline_lastDeploymentAttemptedAt :: Lens' ServicePipeline UTCTime
servicePipeline_lastDeploymentAttemptedAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServicePipeline' {POSIX
lastDeploymentAttemptedAt :: POSIX
$sel:lastDeploymentAttemptedAt:ServicePipeline' :: ServicePipeline -> POSIX
lastDeploymentAttemptedAt} -> POSIX
lastDeploymentAttemptedAt) (\s :: ServicePipeline
s@ServicePipeline' {} POSIX
a -> ServicePipeline
s {$sel:lastDeploymentAttemptedAt:ServicePipeline' :: POSIX
lastDeploymentAttemptedAt = POSIX
a} :: ServicePipeline) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
servicePipeline_lastDeploymentSucceededAt :: Lens.Lens' ServicePipeline Prelude.UTCTime
servicePipeline_lastDeploymentSucceededAt :: Lens' ServicePipeline UTCTime
servicePipeline_lastDeploymentSucceededAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServicePipeline' {POSIX
lastDeploymentSucceededAt :: POSIX
$sel:lastDeploymentSucceededAt:ServicePipeline' :: ServicePipeline -> POSIX
lastDeploymentSucceededAt} -> POSIX
lastDeploymentSucceededAt) (\s :: ServicePipeline
s@ServicePipeline' {} POSIX
a -> ServicePipeline
s {$sel:lastDeploymentSucceededAt:ServicePipeline' :: POSIX
lastDeploymentSucceededAt = POSIX
a} :: ServicePipeline) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
servicePipeline_templateMajorVersion :: Lens.Lens' ServicePipeline Prelude.Text
servicePipeline_templateMajorVersion :: Lens' ServicePipeline Text
servicePipeline_templateMajorVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServicePipeline' {Text
templateMajorVersion :: Text
$sel:templateMajorVersion:ServicePipeline' :: ServicePipeline -> Text
templateMajorVersion} -> Text
templateMajorVersion) (\s :: ServicePipeline
s@ServicePipeline' {} Text
a -> ServicePipeline
s {$sel:templateMajorVersion:ServicePipeline' :: Text
templateMajorVersion = Text
a} :: ServicePipeline)
servicePipeline_templateMinorVersion :: Lens.Lens' ServicePipeline Prelude.Text
servicePipeline_templateMinorVersion :: Lens' ServicePipeline Text
servicePipeline_templateMinorVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServicePipeline' {Text
templateMinorVersion :: Text
$sel:templateMinorVersion:ServicePipeline' :: ServicePipeline -> Text
templateMinorVersion} -> Text
templateMinorVersion) (\s :: ServicePipeline
s@ServicePipeline' {} Text
a -> ServicePipeline
s {$sel:templateMinorVersion:ServicePipeline' :: Text
templateMinorVersion = Text
a} :: ServicePipeline)
servicePipeline_templateName :: Lens.Lens' ServicePipeline Prelude.Text
servicePipeline_templateName :: Lens' ServicePipeline Text
servicePipeline_templateName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServicePipeline' {Text
templateName :: Text
$sel:templateName:ServicePipeline' :: ServicePipeline -> Text
templateName} -> Text
templateName) (\s :: ServicePipeline
s@ServicePipeline' {} Text
a -> ServicePipeline
s {$sel:templateName:ServicePipeline' :: Text
templateName = Text
a} :: ServicePipeline)
instance Data.FromJSON ServicePipeline where
parseJSON :: Value -> Parser ServicePipeline
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ServicePipeline"
( \Object
x ->
Maybe (Sensitive Text)
-> Maybe (Sensitive Text)
-> Text
-> POSIX
-> DeploymentStatus
-> POSIX
-> POSIX
-> Text
-> Text
-> Text
-> ServicePipeline
ServicePipeline'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"deploymentStatusMessage")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"spec")
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
"arn")
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
"createdAt")
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
"deploymentStatus")
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
"lastDeploymentAttemptedAt")
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
"lastDeploymentSucceededAt")
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
"templateMajorVersion")
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
"templateMinorVersion")
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
"templateName")
)
instance Prelude.Hashable ServicePipeline where
hashWithSalt :: Int -> ServicePipeline -> Int
hashWithSalt Int
_salt ServicePipeline' {Maybe (Sensitive Text)
Text
POSIX
DeploymentStatus
templateName :: Text
templateMinorVersion :: Text
templateMajorVersion :: Text
lastDeploymentSucceededAt :: POSIX
lastDeploymentAttemptedAt :: POSIX
deploymentStatus :: DeploymentStatus
createdAt :: POSIX
arn :: Text
spec :: Maybe (Sensitive Text)
deploymentStatusMessage :: Maybe (Sensitive Text)
$sel:templateName:ServicePipeline' :: ServicePipeline -> Text
$sel:templateMinorVersion:ServicePipeline' :: ServicePipeline -> Text
$sel:templateMajorVersion:ServicePipeline' :: ServicePipeline -> Text
$sel:lastDeploymentSucceededAt:ServicePipeline' :: ServicePipeline -> POSIX
$sel:lastDeploymentAttemptedAt:ServicePipeline' :: ServicePipeline -> POSIX
$sel:deploymentStatus:ServicePipeline' :: ServicePipeline -> DeploymentStatus
$sel:createdAt:ServicePipeline' :: ServicePipeline -> POSIX
$sel:arn:ServicePipeline' :: ServicePipeline -> Text
$sel:spec:ServicePipeline' :: ServicePipeline -> Maybe (Sensitive Text)
$sel:deploymentStatusMessage:ServicePipeline' :: ServicePipeline -> Maybe (Sensitive Text)
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
deploymentStatusMessage
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
spec
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
arn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
createdAt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` DeploymentStatus
deploymentStatus
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
lastDeploymentAttemptedAt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
lastDeploymentSucceededAt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
templateMajorVersion
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
templateMinorVersion
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
templateName
instance Prelude.NFData ServicePipeline where
rnf :: ServicePipeline -> ()
rnf ServicePipeline' {Maybe (Sensitive Text)
Text
POSIX
DeploymentStatus
templateName :: Text
templateMinorVersion :: Text
templateMajorVersion :: Text
lastDeploymentSucceededAt :: POSIX
lastDeploymentAttemptedAt :: POSIX
deploymentStatus :: DeploymentStatus
createdAt :: POSIX
arn :: Text
spec :: Maybe (Sensitive Text)
deploymentStatusMessage :: Maybe (Sensitive Text)
$sel:templateName:ServicePipeline' :: ServicePipeline -> Text
$sel:templateMinorVersion:ServicePipeline' :: ServicePipeline -> Text
$sel:templateMajorVersion:ServicePipeline' :: ServicePipeline -> Text
$sel:lastDeploymentSucceededAt:ServicePipeline' :: ServicePipeline -> POSIX
$sel:lastDeploymentAttemptedAt:ServicePipeline' :: ServicePipeline -> POSIX
$sel:deploymentStatus:ServicePipeline' :: ServicePipeline -> DeploymentStatus
$sel:createdAt:ServicePipeline' :: ServicePipeline -> POSIX
$sel:arn:ServicePipeline' :: ServicePipeline -> Text
$sel:spec:ServicePipeline' :: ServicePipeline -> Maybe (Sensitive Text)
$sel:deploymentStatusMessage:ServicePipeline' :: ServicePipeline -> Maybe (Sensitive Text)
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
deploymentStatusMessage
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
spec
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
arn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
createdAt
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf DeploymentStatus
deploymentStatus
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
lastDeploymentAttemptedAt
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
lastDeploymentSucceededAt
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
templateMajorVersion
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
templateMinorVersion
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
templateName