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