{-# 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.ServiceTemplate where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Proton.Types.Provisioning
data ServiceTemplate = ServiceTemplate'
{
ServiceTemplate -> Maybe Text
recommendedVersion :: Prelude.Maybe Prelude.Text,
ServiceTemplate -> Maybe (Sensitive Text)
displayName :: Prelude.Maybe (Core.Sensitive Prelude.Text),
ServiceTemplate -> Maybe Text
encryptionKey :: Prelude.Maybe Prelude.Text,
ServiceTemplate -> Maybe Provisioning
pipelineProvisioning :: Prelude.Maybe Provisioning,
ServiceTemplate -> Maybe (Sensitive Text)
description :: Prelude.Maybe (Core.Sensitive Prelude.Text),
ServiceTemplate -> Text
arn :: Prelude.Text,
ServiceTemplate -> POSIX
createdAt :: Core.POSIX,
ServiceTemplate -> POSIX
lastModifiedAt :: Core.POSIX,
ServiceTemplate -> Text
name :: Prelude.Text
}
deriving (ServiceTemplate -> ServiceTemplate -> Bool
(ServiceTemplate -> ServiceTemplate -> Bool)
-> (ServiceTemplate -> ServiceTemplate -> Bool)
-> Eq ServiceTemplate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ServiceTemplate -> ServiceTemplate -> Bool
$c/= :: ServiceTemplate -> ServiceTemplate -> Bool
== :: ServiceTemplate -> ServiceTemplate -> Bool
$c== :: ServiceTemplate -> ServiceTemplate -> Bool
Prelude.Eq, Int -> ServiceTemplate -> ShowS
[ServiceTemplate] -> ShowS
ServiceTemplate -> String
(Int -> ServiceTemplate -> ShowS)
-> (ServiceTemplate -> String)
-> ([ServiceTemplate] -> ShowS)
-> Show ServiceTemplate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ServiceTemplate] -> ShowS
$cshowList :: [ServiceTemplate] -> ShowS
show :: ServiceTemplate -> String
$cshow :: ServiceTemplate -> String
showsPrec :: Int -> ServiceTemplate -> ShowS
$cshowsPrec :: Int -> ServiceTemplate -> ShowS
Prelude.Show, (forall x. ServiceTemplate -> Rep ServiceTemplate x)
-> (forall x. Rep ServiceTemplate x -> ServiceTemplate)
-> Generic ServiceTemplate
forall x. Rep ServiceTemplate x -> ServiceTemplate
forall x. ServiceTemplate -> Rep ServiceTemplate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ServiceTemplate x -> ServiceTemplate
$cfrom :: forall x. ServiceTemplate -> Rep ServiceTemplate x
Prelude.Generic)
newServiceTemplate ::
Prelude.Text ->
Prelude.UTCTime ->
Prelude.UTCTime ->
Prelude.Text ->
ServiceTemplate
newServiceTemplate :: Text -> UTCTime -> UTCTime -> Text -> ServiceTemplate
newServiceTemplate
Text
pArn_
UTCTime
pCreatedAt_
UTCTime
pLastModifiedAt_
Text
pName_ =
ServiceTemplate' :: Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Provisioning
-> Maybe (Sensitive Text)
-> Text
-> POSIX
-> POSIX
-> Text
-> ServiceTemplate
ServiceTemplate'
{ $sel:recommendedVersion:ServiceTemplate' :: Maybe Text
recommendedVersion =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:displayName:ServiceTemplate' :: Maybe (Sensitive Text)
displayName = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
$sel:encryptionKey:ServiceTemplate' :: Maybe Text
encryptionKey = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:pipelineProvisioning:ServiceTemplate' :: Maybe Provisioning
pipelineProvisioning = Maybe Provisioning
forall a. Maybe a
Prelude.Nothing,
$sel:description:ServiceTemplate' :: Maybe (Sensitive Text)
description = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
$sel:arn:ServiceTemplate' :: Text
arn = Text
pArn_,
$sel:createdAt:ServiceTemplate' :: POSIX
createdAt = Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
-> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreatedAt_,
$sel:lastModifiedAt:ServiceTemplate' :: POSIX
lastModifiedAt = Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
-> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pLastModifiedAt_,
$sel:name:ServiceTemplate' :: Text
name = Text
pName_
}
serviceTemplate_recommendedVersion :: Lens.Lens' ServiceTemplate (Prelude.Maybe Prelude.Text)
serviceTemplate_recommendedVersion :: (Maybe Text -> f (Maybe Text))
-> ServiceTemplate -> f ServiceTemplate
serviceTemplate_recommendedVersion = (ServiceTemplate -> Maybe Text)
-> (ServiceTemplate -> Maybe Text -> ServiceTemplate)
-> Lens ServiceTemplate ServiceTemplate (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceTemplate' {Maybe Text
recommendedVersion :: Maybe Text
$sel:recommendedVersion:ServiceTemplate' :: ServiceTemplate -> Maybe Text
recommendedVersion} -> Maybe Text
recommendedVersion) (\s :: ServiceTemplate
s@ServiceTemplate' {} Maybe Text
a -> ServiceTemplate
s {$sel:recommendedVersion:ServiceTemplate' :: Maybe Text
recommendedVersion = Maybe Text
a} :: ServiceTemplate)
serviceTemplate_displayName :: Lens.Lens' ServiceTemplate (Prelude.Maybe Prelude.Text)
serviceTemplate_displayName :: (Maybe Text -> f (Maybe Text))
-> ServiceTemplate -> f ServiceTemplate
serviceTemplate_displayName = (ServiceTemplate -> Maybe (Sensitive Text))
-> (ServiceTemplate -> Maybe (Sensitive Text) -> ServiceTemplate)
-> Lens
ServiceTemplate
ServiceTemplate
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceTemplate' {Maybe (Sensitive Text)
displayName :: Maybe (Sensitive Text)
$sel:displayName:ServiceTemplate' :: ServiceTemplate -> Maybe (Sensitive Text)
displayName} -> Maybe (Sensitive Text)
displayName) (\s :: ServiceTemplate
s@ServiceTemplate' {} Maybe (Sensitive Text)
a -> ServiceTemplate
s {$sel:displayName:ServiceTemplate' :: Maybe (Sensitive Text)
displayName = Maybe (Sensitive Text)
a} :: ServiceTemplate) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> ServiceTemplate -> f ServiceTemplate)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> ServiceTemplate
-> f ServiceTemplate
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
(Maybe Text)
(Maybe Text)
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 (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive
serviceTemplate_encryptionKey :: Lens.Lens' ServiceTemplate (Prelude.Maybe Prelude.Text)
serviceTemplate_encryptionKey :: (Maybe Text -> f (Maybe Text))
-> ServiceTemplate -> f ServiceTemplate
serviceTemplate_encryptionKey = (ServiceTemplate -> Maybe Text)
-> (ServiceTemplate -> Maybe Text -> ServiceTemplate)
-> Lens ServiceTemplate ServiceTemplate (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceTemplate' {Maybe Text
encryptionKey :: Maybe Text
$sel:encryptionKey:ServiceTemplate' :: ServiceTemplate -> Maybe Text
encryptionKey} -> Maybe Text
encryptionKey) (\s :: ServiceTemplate
s@ServiceTemplate' {} Maybe Text
a -> ServiceTemplate
s {$sel:encryptionKey:ServiceTemplate' :: Maybe Text
encryptionKey = Maybe Text
a} :: ServiceTemplate)
serviceTemplate_pipelineProvisioning :: Lens.Lens' ServiceTemplate (Prelude.Maybe Provisioning)
serviceTemplate_pipelineProvisioning :: (Maybe Provisioning -> f (Maybe Provisioning))
-> ServiceTemplate -> f ServiceTemplate
serviceTemplate_pipelineProvisioning = (ServiceTemplate -> Maybe Provisioning)
-> (ServiceTemplate -> Maybe Provisioning -> ServiceTemplate)
-> Lens
ServiceTemplate
ServiceTemplate
(Maybe Provisioning)
(Maybe Provisioning)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceTemplate' {Maybe Provisioning
pipelineProvisioning :: Maybe Provisioning
$sel:pipelineProvisioning:ServiceTemplate' :: ServiceTemplate -> Maybe Provisioning
pipelineProvisioning} -> Maybe Provisioning
pipelineProvisioning) (\s :: ServiceTemplate
s@ServiceTemplate' {} Maybe Provisioning
a -> ServiceTemplate
s {$sel:pipelineProvisioning:ServiceTemplate' :: Maybe Provisioning
pipelineProvisioning = Maybe Provisioning
a} :: ServiceTemplate)
serviceTemplate_description :: Lens.Lens' ServiceTemplate (Prelude.Maybe Prelude.Text)
serviceTemplate_description :: (Maybe Text -> f (Maybe Text))
-> ServiceTemplate -> f ServiceTemplate
serviceTemplate_description = (ServiceTemplate -> Maybe (Sensitive Text))
-> (ServiceTemplate -> Maybe (Sensitive Text) -> ServiceTemplate)
-> Lens
ServiceTemplate
ServiceTemplate
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceTemplate' {Maybe (Sensitive Text)
description :: Maybe (Sensitive Text)
$sel:description:ServiceTemplate' :: ServiceTemplate -> Maybe (Sensitive Text)
description} -> Maybe (Sensitive Text)
description) (\s :: ServiceTemplate
s@ServiceTemplate' {} Maybe (Sensitive Text)
a -> ServiceTemplate
s {$sel:description:ServiceTemplate' :: Maybe (Sensitive Text)
description = Maybe (Sensitive Text)
a} :: ServiceTemplate) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> ServiceTemplate -> f ServiceTemplate)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> ServiceTemplate
-> f ServiceTemplate
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
(Maybe Text)
(Maybe Text)
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 (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive
serviceTemplate_arn :: Lens.Lens' ServiceTemplate Prelude.Text
serviceTemplate_arn :: (Text -> f Text) -> ServiceTemplate -> f ServiceTemplate
serviceTemplate_arn = (ServiceTemplate -> Text)
-> (ServiceTemplate -> Text -> ServiceTemplate)
-> Lens ServiceTemplate ServiceTemplate Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceTemplate' {Text
arn :: Text
$sel:arn:ServiceTemplate' :: ServiceTemplate -> Text
arn} -> Text
arn) (\s :: ServiceTemplate
s@ServiceTemplate' {} Text
a -> ServiceTemplate
s {$sel:arn:ServiceTemplate' :: Text
arn = Text
a} :: ServiceTemplate)
serviceTemplate_createdAt :: Lens.Lens' ServiceTemplate Prelude.UTCTime
serviceTemplate_createdAt :: (UTCTime -> f UTCTime) -> ServiceTemplate -> f ServiceTemplate
serviceTemplate_createdAt = (ServiceTemplate -> POSIX)
-> (ServiceTemplate -> POSIX -> ServiceTemplate)
-> Lens ServiceTemplate ServiceTemplate POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceTemplate' {POSIX
createdAt :: POSIX
$sel:createdAt:ServiceTemplate' :: ServiceTemplate -> POSIX
createdAt} -> POSIX
createdAt) (\s :: ServiceTemplate
s@ServiceTemplate' {} POSIX
a -> ServiceTemplate
s {$sel:createdAt:ServiceTemplate' :: POSIX
createdAt = POSIX
a} :: ServiceTemplate) ((POSIX -> f POSIX) -> ServiceTemplate -> f ServiceTemplate)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> ServiceTemplate
-> f ServiceTemplate
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
serviceTemplate_lastModifiedAt :: Lens.Lens' ServiceTemplate Prelude.UTCTime
serviceTemplate_lastModifiedAt :: (UTCTime -> f UTCTime) -> ServiceTemplate -> f ServiceTemplate
serviceTemplate_lastModifiedAt = (ServiceTemplate -> POSIX)
-> (ServiceTemplate -> POSIX -> ServiceTemplate)
-> Lens ServiceTemplate ServiceTemplate POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceTemplate' {POSIX
lastModifiedAt :: POSIX
$sel:lastModifiedAt:ServiceTemplate' :: ServiceTemplate -> POSIX
lastModifiedAt} -> POSIX
lastModifiedAt) (\s :: ServiceTemplate
s@ServiceTemplate' {} POSIX
a -> ServiceTemplate
s {$sel:lastModifiedAt:ServiceTemplate' :: POSIX
lastModifiedAt = POSIX
a} :: ServiceTemplate) ((POSIX -> f POSIX) -> ServiceTemplate -> f ServiceTemplate)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> ServiceTemplate
-> f ServiceTemplate
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
serviceTemplate_name :: Lens.Lens' ServiceTemplate Prelude.Text
serviceTemplate_name :: (Text -> f Text) -> ServiceTemplate -> f ServiceTemplate
serviceTemplate_name = (ServiceTemplate -> Text)
-> (ServiceTemplate -> Text -> ServiceTemplate)
-> Lens ServiceTemplate ServiceTemplate Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceTemplate' {Text
name :: Text
$sel:name:ServiceTemplate' :: ServiceTemplate -> Text
name} -> Text
name) (\s :: ServiceTemplate
s@ServiceTemplate' {} Text
a -> ServiceTemplate
s {$sel:name:ServiceTemplate' :: Text
name = Text
a} :: ServiceTemplate)
instance Core.FromJSON ServiceTemplate where
parseJSON :: Value -> Parser ServiceTemplate
parseJSON =
String
-> (Object -> Parser ServiceTemplate)
-> Value
-> Parser ServiceTemplate
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ServiceTemplate"
( \Object
x ->
Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Provisioning
-> Maybe (Sensitive Text)
-> Text
-> POSIX
-> POSIX
-> Text
-> ServiceTemplate
ServiceTemplate'
(Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Provisioning
-> Maybe (Sensitive Text)
-> Text
-> POSIX
-> POSIX
-> Text
-> ServiceTemplate)
-> Parser (Maybe Text)
-> Parser
(Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Provisioning
-> Maybe (Sensitive Text)
-> Text
-> POSIX
-> POSIX
-> Text
-> ServiceTemplate)
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
"recommendedVersion")
Parser
(Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Provisioning
-> Maybe (Sensitive Text)
-> Text
-> POSIX
-> POSIX
-> Text
-> ServiceTemplate)
-> Parser (Maybe (Sensitive Text))
-> Parser
(Maybe Text
-> Maybe Provisioning
-> Maybe (Sensitive Text)
-> Text
-> POSIX
-> POSIX
-> Text
-> ServiceTemplate)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Sensitive Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"displayName")
Parser
(Maybe Text
-> Maybe Provisioning
-> Maybe (Sensitive Text)
-> Text
-> POSIX
-> POSIX
-> Text
-> ServiceTemplate)
-> Parser (Maybe Text)
-> Parser
(Maybe Provisioning
-> Maybe (Sensitive Text)
-> Text
-> POSIX
-> POSIX
-> Text
-> ServiceTemplate)
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
"encryptionKey")
Parser
(Maybe Provisioning
-> Maybe (Sensitive Text)
-> Text
-> POSIX
-> POSIX
-> Text
-> ServiceTemplate)
-> Parser (Maybe Provisioning)
-> Parser
(Maybe (Sensitive Text)
-> Text -> POSIX -> POSIX -> Text -> ServiceTemplate)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Provisioning)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"pipelineProvisioning")
Parser
(Maybe (Sensitive Text)
-> Text -> POSIX -> POSIX -> Text -> ServiceTemplate)
-> Parser (Maybe (Sensitive Text))
-> Parser (Text -> POSIX -> POSIX -> Text -> ServiceTemplate)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Sensitive Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"description")
Parser (Text -> POSIX -> POSIX -> Text -> ServiceTemplate)
-> Parser Text
-> Parser (POSIX -> POSIX -> Text -> ServiceTemplate)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"arn")
Parser (POSIX -> POSIX -> Text -> ServiceTemplate)
-> Parser POSIX -> Parser (POSIX -> Text -> ServiceTemplate)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser POSIX
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"createdAt")
Parser (POSIX -> Text -> ServiceTemplate)
-> Parser POSIX -> Parser (Text -> ServiceTemplate)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser POSIX
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"lastModifiedAt")
Parser (Text -> ServiceTemplate)
-> Parser Text -> Parser ServiceTemplate
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"name")
)
instance Prelude.Hashable ServiceTemplate
instance Prelude.NFData ServiceTemplate