stratosphere-appconfig-1.0.0: gen/Stratosphere/AppConfig/Application.hs
module Stratosphere.AppConfig.Application (
module Exports, Application(..), mkApplication
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.AppConfig.Application.TagsProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data Application
= -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appconfig-application.html>
Application {haddock_workaround_ :: (),
-- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appconfig-application.html#cfn-appconfig-application-description>
description :: (Prelude.Maybe (Value Prelude.Text)),
-- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appconfig-application.html#cfn-appconfig-application-name>
name :: (Value Prelude.Text),
-- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appconfig-application.html#cfn-appconfig-application-tags>
tags :: (Prelude.Maybe [TagsProperty])}
deriving stock (Prelude.Eq, Prelude.Show)
mkApplication :: Value Prelude.Text -> Application
mkApplication name
= Application
{haddock_workaround_ = (), name = name,
description = Prelude.Nothing, tags = Prelude.Nothing}
instance ToResourceProperties Application where
toResourceProperties Application {..}
= ResourceProperties
{awsType = "AWS::AppConfig::Application",
supportsTags = Prelude.True,
properties = Prelude.fromList
((Prelude.<>)
["Name" JSON..= name]
(Prelude.catMaybes
[(JSON..=) "Description" Prelude.<$> description,
(JSON..=) "Tags" Prelude.<$> tags]))}
instance JSON.ToJSON Application where
toJSON Application {..}
= JSON.object
(Prelude.fromList
((Prelude.<>)
["Name" JSON..= name]
(Prelude.catMaybes
[(JSON..=) "Description" Prelude.<$> description,
(JSON..=) "Tags" Prelude.<$> tags])))
instance Property "Description" Application where
type PropertyType "Description" Application = Value Prelude.Text
set newValue Application {..}
= Application {description = Prelude.pure newValue, ..}
instance Property "Name" Application where
type PropertyType "Name" Application = Value Prelude.Text
set newValue Application {..} = Application {name = newValue, ..}
instance Property "Tags" Application where
type PropertyType "Tags" Application = [TagsProperty]
set newValue Application {..}
= Application {tags = Prelude.pure newValue, ..}