{-# 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.RobOMaker.Types.DeploymentApplicationConfig where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.RobOMaker.Types.DeploymentLaunchConfig
data DeploymentApplicationConfig = DeploymentApplicationConfig'
{
DeploymentApplicationConfig -> Text
application :: Prelude.Text,
DeploymentApplicationConfig -> Text
applicationVersion :: Prelude.Text,
DeploymentApplicationConfig -> DeploymentLaunchConfig
launchConfig :: DeploymentLaunchConfig
}
deriving (DeploymentApplicationConfig -> DeploymentApplicationConfig -> Bool
(DeploymentApplicationConfig
-> DeploymentApplicationConfig -> Bool)
-> (DeploymentApplicationConfig
-> DeploymentApplicationConfig -> Bool)
-> Eq DeploymentApplicationConfig
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeploymentApplicationConfig -> DeploymentApplicationConfig -> Bool
$c/= :: DeploymentApplicationConfig -> DeploymentApplicationConfig -> Bool
== :: DeploymentApplicationConfig -> DeploymentApplicationConfig -> Bool
$c== :: DeploymentApplicationConfig -> DeploymentApplicationConfig -> Bool
Prelude.Eq, ReadPrec [DeploymentApplicationConfig]
ReadPrec DeploymentApplicationConfig
Int -> ReadS DeploymentApplicationConfig
ReadS [DeploymentApplicationConfig]
(Int -> ReadS DeploymentApplicationConfig)
-> ReadS [DeploymentApplicationConfig]
-> ReadPrec DeploymentApplicationConfig
-> ReadPrec [DeploymentApplicationConfig]
-> Read DeploymentApplicationConfig
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeploymentApplicationConfig]
$creadListPrec :: ReadPrec [DeploymentApplicationConfig]
readPrec :: ReadPrec DeploymentApplicationConfig
$creadPrec :: ReadPrec DeploymentApplicationConfig
readList :: ReadS [DeploymentApplicationConfig]
$creadList :: ReadS [DeploymentApplicationConfig]
readsPrec :: Int -> ReadS DeploymentApplicationConfig
$creadsPrec :: Int -> ReadS DeploymentApplicationConfig
Prelude.Read, Int -> DeploymentApplicationConfig -> ShowS
[DeploymentApplicationConfig] -> ShowS
DeploymentApplicationConfig -> String
(Int -> DeploymentApplicationConfig -> ShowS)
-> (DeploymentApplicationConfig -> String)
-> ([DeploymentApplicationConfig] -> ShowS)
-> Show DeploymentApplicationConfig
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeploymentApplicationConfig] -> ShowS
$cshowList :: [DeploymentApplicationConfig] -> ShowS
show :: DeploymentApplicationConfig -> String
$cshow :: DeploymentApplicationConfig -> String
showsPrec :: Int -> DeploymentApplicationConfig -> ShowS
$cshowsPrec :: Int -> DeploymentApplicationConfig -> ShowS
Prelude.Show, (forall x.
DeploymentApplicationConfig -> Rep DeploymentApplicationConfig x)
-> (forall x.
Rep DeploymentApplicationConfig x -> DeploymentApplicationConfig)
-> Generic DeploymentApplicationConfig
forall x.
Rep DeploymentApplicationConfig x -> DeploymentApplicationConfig
forall x.
DeploymentApplicationConfig -> Rep DeploymentApplicationConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeploymentApplicationConfig x -> DeploymentApplicationConfig
$cfrom :: forall x.
DeploymentApplicationConfig -> Rep DeploymentApplicationConfig x
Prelude.Generic)
newDeploymentApplicationConfig ::
Prelude.Text ->
Prelude.Text ->
DeploymentLaunchConfig ->
DeploymentApplicationConfig
newDeploymentApplicationConfig :: Text
-> Text -> DeploymentLaunchConfig -> DeploymentApplicationConfig
newDeploymentApplicationConfig
Text
pApplication_
Text
pApplicationVersion_
DeploymentLaunchConfig
pLaunchConfig_ =
DeploymentApplicationConfig' :: Text
-> Text -> DeploymentLaunchConfig -> DeploymentApplicationConfig
DeploymentApplicationConfig'
{ $sel:application:DeploymentApplicationConfig' :: Text
application =
Text
pApplication_,
$sel:applicationVersion:DeploymentApplicationConfig' :: Text
applicationVersion = Text
pApplicationVersion_,
$sel:launchConfig:DeploymentApplicationConfig' :: DeploymentLaunchConfig
launchConfig = DeploymentLaunchConfig
pLaunchConfig_
}
deploymentApplicationConfig_application :: Lens.Lens' DeploymentApplicationConfig Prelude.Text
deploymentApplicationConfig_application :: (Text -> f Text)
-> DeploymentApplicationConfig -> f DeploymentApplicationConfig
deploymentApplicationConfig_application = (DeploymentApplicationConfig -> Text)
-> (DeploymentApplicationConfig
-> Text -> DeploymentApplicationConfig)
-> Lens
DeploymentApplicationConfig DeploymentApplicationConfig Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeploymentApplicationConfig' {Text
application :: Text
$sel:application:DeploymentApplicationConfig' :: DeploymentApplicationConfig -> Text
application} -> Text
application) (\s :: DeploymentApplicationConfig
s@DeploymentApplicationConfig' {} Text
a -> DeploymentApplicationConfig
s {$sel:application:DeploymentApplicationConfig' :: Text
application = Text
a} :: DeploymentApplicationConfig)
deploymentApplicationConfig_applicationVersion :: Lens.Lens' DeploymentApplicationConfig Prelude.Text
deploymentApplicationConfig_applicationVersion :: (Text -> f Text)
-> DeploymentApplicationConfig -> f DeploymentApplicationConfig
deploymentApplicationConfig_applicationVersion = (DeploymentApplicationConfig -> Text)
-> (DeploymentApplicationConfig
-> Text -> DeploymentApplicationConfig)
-> Lens
DeploymentApplicationConfig DeploymentApplicationConfig Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeploymentApplicationConfig' {Text
applicationVersion :: Text
$sel:applicationVersion:DeploymentApplicationConfig' :: DeploymentApplicationConfig -> Text
applicationVersion} -> Text
applicationVersion) (\s :: DeploymentApplicationConfig
s@DeploymentApplicationConfig' {} Text
a -> DeploymentApplicationConfig
s {$sel:applicationVersion:DeploymentApplicationConfig' :: Text
applicationVersion = Text
a} :: DeploymentApplicationConfig)
deploymentApplicationConfig_launchConfig :: Lens.Lens' DeploymentApplicationConfig DeploymentLaunchConfig
deploymentApplicationConfig_launchConfig :: (DeploymentLaunchConfig -> f DeploymentLaunchConfig)
-> DeploymentApplicationConfig -> f DeploymentApplicationConfig
deploymentApplicationConfig_launchConfig = (DeploymentApplicationConfig -> DeploymentLaunchConfig)
-> (DeploymentApplicationConfig
-> DeploymentLaunchConfig -> DeploymentApplicationConfig)
-> Lens
DeploymentApplicationConfig
DeploymentApplicationConfig
DeploymentLaunchConfig
DeploymentLaunchConfig
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeploymentApplicationConfig' {DeploymentLaunchConfig
launchConfig :: DeploymentLaunchConfig
$sel:launchConfig:DeploymentApplicationConfig' :: DeploymentApplicationConfig -> DeploymentLaunchConfig
launchConfig} -> DeploymentLaunchConfig
launchConfig) (\s :: DeploymentApplicationConfig
s@DeploymentApplicationConfig' {} DeploymentLaunchConfig
a -> DeploymentApplicationConfig
s {$sel:launchConfig:DeploymentApplicationConfig' :: DeploymentLaunchConfig
launchConfig = DeploymentLaunchConfig
a} :: DeploymentApplicationConfig)
instance Core.FromJSON DeploymentApplicationConfig where
parseJSON :: Value -> Parser DeploymentApplicationConfig
parseJSON =
String
-> (Object -> Parser DeploymentApplicationConfig)
-> Value
-> Parser DeploymentApplicationConfig
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"DeploymentApplicationConfig"
( \Object
x ->
Text
-> Text -> DeploymentLaunchConfig -> DeploymentApplicationConfig
DeploymentApplicationConfig'
(Text
-> Text -> DeploymentLaunchConfig -> DeploymentApplicationConfig)
-> Parser Text
-> Parser
(Text -> DeploymentLaunchConfig -> DeploymentApplicationConfig)
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
"application")
Parser
(Text -> DeploymentLaunchConfig -> DeploymentApplicationConfig)
-> Parser Text
-> Parser (DeploymentLaunchConfig -> DeploymentApplicationConfig)
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
"applicationVersion")
Parser (DeploymentLaunchConfig -> DeploymentApplicationConfig)
-> Parser DeploymentLaunchConfig
-> Parser DeploymentApplicationConfig
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser DeploymentLaunchConfig
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"launchConfig")
)
instance Prelude.Hashable DeploymentApplicationConfig
instance Prelude.NFData DeploymentApplicationConfig
instance Core.ToJSON DeploymentApplicationConfig where
toJSON :: DeploymentApplicationConfig -> Value
toJSON DeploymentApplicationConfig' {Text
DeploymentLaunchConfig
launchConfig :: DeploymentLaunchConfig
applicationVersion :: Text
application :: Text
$sel:launchConfig:DeploymentApplicationConfig' :: DeploymentApplicationConfig -> DeploymentLaunchConfig
$sel:applicationVersion:DeploymentApplicationConfig' :: DeploymentApplicationConfig -> Text
$sel:application:DeploymentApplicationConfig' :: DeploymentApplicationConfig -> 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
"application" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
application),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"applicationVersion" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
applicationVersion),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"launchConfig" Text -> DeploymentLaunchConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= DeploymentLaunchConfig
launchConfig)
]
)