{-# 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.CompatibleEnvironmentTemplateInput where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data CompatibleEnvironmentTemplateInput = CompatibleEnvironmentTemplateInput'
{
CompatibleEnvironmentTemplateInput -> Text
majorVersion :: Prelude.Text,
CompatibleEnvironmentTemplateInput -> Text
templateName :: Prelude.Text
}
deriving (CompatibleEnvironmentTemplateInput
-> CompatibleEnvironmentTemplateInput -> Bool
(CompatibleEnvironmentTemplateInput
-> CompatibleEnvironmentTemplateInput -> Bool)
-> (CompatibleEnvironmentTemplateInput
-> CompatibleEnvironmentTemplateInput -> Bool)
-> Eq CompatibleEnvironmentTemplateInput
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CompatibleEnvironmentTemplateInput
-> CompatibleEnvironmentTemplateInput -> Bool
$c/= :: CompatibleEnvironmentTemplateInput
-> CompatibleEnvironmentTemplateInput -> Bool
== :: CompatibleEnvironmentTemplateInput
-> CompatibleEnvironmentTemplateInput -> Bool
$c== :: CompatibleEnvironmentTemplateInput
-> CompatibleEnvironmentTemplateInput -> Bool
Prelude.Eq, ReadPrec [CompatibleEnvironmentTemplateInput]
ReadPrec CompatibleEnvironmentTemplateInput
Int -> ReadS CompatibleEnvironmentTemplateInput
ReadS [CompatibleEnvironmentTemplateInput]
(Int -> ReadS CompatibleEnvironmentTemplateInput)
-> ReadS [CompatibleEnvironmentTemplateInput]
-> ReadPrec CompatibleEnvironmentTemplateInput
-> ReadPrec [CompatibleEnvironmentTemplateInput]
-> Read CompatibleEnvironmentTemplateInput
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CompatibleEnvironmentTemplateInput]
$creadListPrec :: ReadPrec [CompatibleEnvironmentTemplateInput]
readPrec :: ReadPrec CompatibleEnvironmentTemplateInput
$creadPrec :: ReadPrec CompatibleEnvironmentTemplateInput
readList :: ReadS [CompatibleEnvironmentTemplateInput]
$creadList :: ReadS [CompatibleEnvironmentTemplateInput]
readsPrec :: Int -> ReadS CompatibleEnvironmentTemplateInput
$creadsPrec :: Int -> ReadS CompatibleEnvironmentTemplateInput
Prelude.Read, Int -> CompatibleEnvironmentTemplateInput -> ShowS
[CompatibleEnvironmentTemplateInput] -> ShowS
CompatibleEnvironmentTemplateInput -> String
(Int -> CompatibleEnvironmentTemplateInput -> ShowS)
-> (CompatibleEnvironmentTemplateInput -> String)
-> ([CompatibleEnvironmentTemplateInput] -> ShowS)
-> Show CompatibleEnvironmentTemplateInput
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CompatibleEnvironmentTemplateInput] -> ShowS
$cshowList :: [CompatibleEnvironmentTemplateInput] -> ShowS
show :: CompatibleEnvironmentTemplateInput -> String
$cshow :: CompatibleEnvironmentTemplateInput -> String
showsPrec :: Int -> CompatibleEnvironmentTemplateInput -> ShowS
$cshowsPrec :: Int -> CompatibleEnvironmentTemplateInput -> ShowS
Prelude.Show, (forall x.
CompatibleEnvironmentTemplateInput
-> Rep CompatibleEnvironmentTemplateInput x)
-> (forall x.
Rep CompatibleEnvironmentTemplateInput x
-> CompatibleEnvironmentTemplateInput)
-> Generic CompatibleEnvironmentTemplateInput
forall x.
Rep CompatibleEnvironmentTemplateInput x
-> CompatibleEnvironmentTemplateInput
forall x.
CompatibleEnvironmentTemplateInput
-> Rep CompatibleEnvironmentTemplateInput x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CompatibleEnvironmentTemplateInput x
-> CompatibleEnvironmentTemplateInput
$cfrom :: forall x.
CompatibleEnvironmentTemplateInput
-> Rep CompatibleEnvironmentTemplateInput x
Prelude.Generic)
newCompatibleEnvironmentTemplateInput ::
Prelude.Text ->
Prelude.Text ->
CompatibleEnvironmentTemplateInput
newCompatibleEnvironmentTemplateInput :: Text -> Text -> CompatibleEnvironmentTemplateInput
newCompatibleEnvironmentTemplateInput
Text
pMajorVersion_
Text
pTemplateName_ =
CompatibleEnvironmentTemplateInput' :: Text -> Text -> CompatibleEnvironmentTemplateInput
CompatibleEnvironmentTemplateInput'
{ $sel:majorVersion:CompatibleEnvironmentTemplateInput' :: Text
majorVersion =
Text
pMajorVersion_,
$sel:templateName:CompatibleEnvironmentTemplateInput' :: Text
templateName = Text
pTemplateName_
}
compatibleEnvironmentTemplateInput_majorVersion :: Lens.Lens' CompatibleEnvironmentTemplateInput Prelude.Text
compatibleEnvironmentTemplateInput_majorVersion :: (Text -> f Text)
-> CompatibleEnvironmentTemplateInput
-> f CompatibleEnvironmentTemplateInput
compatibleEnvironmentTemplateInput_majorVersion = (CompatibleEnvironmentTemplateInput -> Text)
-> (CompatibleEnvironmentTemplateInput
-> Text -> CompatibleEnvironmentTemplateInput)
-> Lens
CompatibleEnvironmentTemplateInput
CompatibleEnvironmentTemplateInput
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CompatibleEnvironmentTemplateInput' {Text
majorVersion :: Text
$sel:majorVersion:CompatibleEnvironmentTemplateInput' :: CompatibleEnvironmentTemplateInput -> Text
majorVersion} -> Text
majorVersion) (\s :: CompatibleEnvironmentTemplateInput
s@CompatibleEnvironmentTemplateInput' {} Text
a -> CompatibleEnvironmentTemplateInput
s {$sel:majorVersion:CompatibleEnvironmentTemplateInput' :: Text
majorVersion = Text
a} :: CompatibleEnvironmentTemplateInput)
compatibleEnvironmentTemplateInput_templateName :: Lens.Lens' CompatibleEnvironmentTemplateInput Prelude.Text
compatibleEnvironmentTemplateInput_templateName :: (Text -> f Text)
-> CompatibleEnvironmentTemplateInput
-> f CompatibleEnvironmentTemplateInput
compatibleEnvironmentTemplateInput_templateName = (CompatibleEnvironmentTemplateInput -> Text)
-> (CompatibleEnvironmentTemplateInput
-> Text -> CompatibleEnvironmentTemplateInput)
-> Lens
CompatibleEnvironmentTemplateInput
CompatibleEnvironmentTemplateInput
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CompatibleEnvironmentTemplateInput' {Text
templateName :: Text
$sel:templateName:CompatibleEnvironmentTemplateInput' :: CompatibleEnvironmentTemplateInput -> Text
templateName} -> Text
templateName) (\s :: CompatibleEnvironmentTemplateInput
s@CompatibleEnvironmentTemplateInput' {} Text
a -> CompatibleEnvironmentTemplateInput
s {$sel:templateName:CompatibleEnvironmentTemplateInput' :: Text
templateName = Text
a} :: CompatibleEnvironmentTemplateInput)
instance
Prelude.Hashable
CompatibleEnvironmentTemplateInput
instance
Prelude.NFData
CompatibleEnvironmentTemplateInput
instance
Core.ToJSON
CompatibleEnvironmentTemplateInput
where
toJSON :: CompatibleEnvironmentTemplateInput -> Value
toJSON CompatibleEnvironmentTemplateInput' {Text
templateName :: Text
majorVersion :: Text
$sel:templateName:CompatibleEnvironmentTemplateInput' :: CompatibleEnvironmentTemplateInput -> Text
$sel:majorVersion:CompatibleEnvironmentTemplateInput' :: CompatibleEnvironmentTemplateInput -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"majorVersion" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
majorVersion),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"templateName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
templateName)
]
)