module Stratosphere.AppConfig.Environment (
module Exports, Environment(..), mkEnvironment
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.AppConfig.Environment.MonitorProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data Environment
=
Environment {Environment -> ()
haddock_workaround_ :: (),
Environment -> Value Text
applicationId :: (Value Prelude.Text),
Environment -> Maybe (Value Text)
deletionProtectionCheck :: (Prelude.Maybe (Value Prelude.Text)),
Environment -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text)),
Environment -> Maybe [MonitorProperty]
monitors :: (Prelude.Maybe [MonitorProperty]),
Environment -> Value Text
name :: (Value Prelude.Text),
Environment -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
deriving stock (Environment -> Environment -> Bool
(Environment -> Environment -> Bool)
-> (Environment -> Environment -> Bool) -> Eq Environment
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Environment -> Environment -> Bool
== :: Environment -> Environment -> Bool
$c/= :: Environment -> Environment -> Bool
/= :: Environment -> Environment -> Bool
Prelude.Eq, Int -> Environment -> ShowS
[Environment] -> ShowS
Environment -> String
(Int -> Environment -> ShowS)
-> (Environment -> String)
-> ([Environment] -> ShowS)
-> Show Environment
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Environment -> ShowS
showsPrec :: Int -> Environment -> ShowS
$cshow :: Environment -> String
show :: Environment -> String
$cshowList :: [Environment] -> ShowS
showList :: [Environment] -> ShowS
Prelude.Show)
mkEnvironment ::
Value Prelude.Text -> Value Prelude.Text -> Environment
mkEnvironment :: Value Text -> Value Text -> Environment
mkEnvironment Value Text
applicationId Value Text
name
= Environment
{haddock_workaround_ :: ()
haddock_workaround_ = (), applicationId :: Value Text
applicationId = Value Text
applicationId,
name :: Value Text
name = Value Text
name, deletionProtectionCheck :: Maybe (Value Text)
deletionProtectionCheck = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
description :: Maybe (Value Text)
description = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, monitors :: Maybe [MonitorProperty]
monitors = Maybe [MonitorProperty]
forall a. Maybe a
Prelude.Nothing,
tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Environment where
toResourceProperties :: Environment -> ResourceProperties
toResourceProperties Environment {Maybe [Tag]
Maybe [MonitorProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Environment -> ()
applicationId :: Environment -> Value Text
deletionProtectionCheck :: Environment -> Maybe (Value Text)
description :: Environment -> Maybe (Value Text)
monitors :: Environment -> Maybe [MonitorProperty]
name :: Environment -> Value Text
tags :: Environment -> Maybe [Tag]
haddock_workaround_ :: ()
applicationId :: Value Text
deletionProtectionCheck :: Maybe (Value Text)
description :: Maybe (Value Text)
monitors :: Maybe [MonitorProperty]
name :: Value Text
tags :: Maybe [Tag]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::AppConfig::Environment",
supportsTags :: Bool
supportsTags = Bool
Prelude.True,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"ApplicationId" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
applicationId, Key
"Name" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
name]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"DeletionProtectionCheck"
(Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
deletionProtectionCheck,
Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Description" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
description,
Key -> [MonitorProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Monitors" ([MonitorProperty] -> (Key, Value))
-> Maybe [MonitorProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [MonitorProperty]
monitors,
Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags]))}
instance JSON.ToJSON Environment where
toJSON :: Environment -> Value
toJSON Environment {Maybe [Tag]
Maybe [MonitorProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Environment -> ()
applicationId :: Environment -> Value Text
deletionProtectionCheck :: Environment -> Maybe (Value Text)
description :: Environment -> Maybe (Value Text)
monitors :: Environment -> Maybe [MonitorProperty]
name :: Environment -> Value Text
tags :: Environment -> Maybe [Tag]
haddock_workaround_ :: ()
applicationId :: Value Text
deletionProtectionCheck :: Maybe (Value Text)
description :: Maybe (Value Text)
monitors :: Maybe [MonitorProperty]
name :: Value Text
tags :: Maybe [Tag]
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"ApplicationId" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
applicationId, Key
"Name" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
name]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"DeletionProtectionCheck"
(Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
deletionProtectionCheck,
Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Description" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
description,
Key -> [MonitorProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Monitors" ([MonitorProperty] -> (Key, Value))
-> Maybe [MonitorProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [MonitorProperty]
monitors,
Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags])))
instance Property "ApplicationId" Environment where
type PropertyType "ApplicationId" Environment = Value Prelude.Text
set :: PropertyType "ApplicationId" Environment
-> Environment -> Environment
set PropertyType "ApplicationId" Environment
newValue Environment {Maybe [Tag]
Maybe [MonitorProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Environment -> ()
applicationId :: Environment -> Value Text
deletionProtectionCheck :: Environment -> Maybe (Value Text)
description :: Environment -> Maybe (Value Text)
monitors :: Environment -> Maybe [MonitorProperty]
name :: Environment -> Value Text
tags :: Environment -> Maybe [Tag]
haddock_workaround_ :: ()
applicationId :: Value Text
deletionProtectionCheck :: Maybe (Value Text)
description :: Maybe (Value Text)
monitors :: Maybe [MonitorProperty]
name :: Value Text
tags :: Maybe [Tag]
..}
= Environment {applicationId :: Value Text
applicationId = PropertyType "ApplicationId" Environment
Value Text
newValue, Maybe [Tag]
Maybe [MonitorProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
deletionProtectionCheck :: Maybe (Value Text)
description :: Maybe (Value Text)
monitors :: Maybe [MonitorProperty]
name :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
deletionProtectionCheck :: Maybe (Value Text)
description :: Maybe (Value Text)
monitors :: Maybe [MonitorProperty]
name :: Value Text
tags :: Maybe [Tag]
..}
instance Property "DeletionProtectionCheck" Environment where
type PropertyType "DeletionProtectionCheck" Environment = Value Prelude.Text
set :: PropertyType "DeletionProtectionCheck" Environment
-> Environment -> Environment
set PropertyType "DeletionProtectionCheck" Environment
newValue Environment {Maybe [Tag]
Maybe [MonitorProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Environment -> ()
applicationId :: Environment -> Value Text
deletionProtectionCheck :: Environment -> Maybe (Value Text)
description :: Environment -> Maybe (Value Text)
monitors :: Environment -> Maybe [MonitorProperty]
name :: Environment -> Value Text
tags :: Environment -> Maybe [Tag]
haddock_workaround_ :: ()
applicationId :: Value Text
deletionProtectionCheck :: Maybe (Value Text)
description :: Maybe (Value Text)
monitors :: Maybe [MonitorProperty]
name :: Value Text
tags :: Maybe [Tag]
..}
= Environment {deletionProtectionCheck :: Maybe (Value Text)
deletionProtectionCheck = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "DeletionProtectionCheck" Environment
Value Text
newValue, Maybe [Tag]
Maybe [MonitorProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
applicationId :: Value Text
description :: Maybe (Value Text)
monitors :: Maybe [MonitorProperty]
name :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
applicationId :: Value Text
description :: Maybe (Value Text)
monitors :: Maybe [MonitorProperty]
name :: Value Text
tags :: Maybe [Tag]
..}
instance Property "Description" Environment where
type PropertyType "Description" Environment = Value Prelude.Text
set :: PropertyType "Description" Environment
-> Environment -> Environment
set PropertyType "Description" Environment
newValue Environment {Maybe [Tag]
Maybe [MonitorProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Environment -> ()
applicationId :: Environment -> Value Text
deletionProtectionCheck :: Environment -> Maybe (Value Text)
description :: Environment -> Maybe (Value Text)
monitors :: Environment -> Maybe [MonitorProperty]
name :: Environment -> Value Text
tags :: Environment -> Maybe [Tag]
haddock_workaround_ :: ()
applicationId :: Value Text
deletionProtectionCheck :: Maybe (Value Text)
description :: Maybe (Value Text)
monitors :: Maybe [MonitorProperty]
name :: Value Text
tags :: Maybe [Tag]
..}
= Environment {description :: Maybe (Value Text)
description = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Description" Environment
Value Text
newValue, Maybe [Tag]
Maybe [MonitorProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
applicationId :: Value Text
deletionProtectionCheck :: Maybe (Value Text)
monitors :: Maybe [MonitorProperty]
name :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
applicationId :: Value Text
deletionProtectionCheck :: Maybe (Value Text)
monitors :: Maybe [MonitorProperty]
name :: Value Text
tags :: Maybe [Tag]
..}
instance Property "Monitors" Environment where
type PropertyType "Monitors" Environment = [MonitorProperty]
set :: PropertyType "Monitors" Environment -> Environment -> Environment
set PropertyType "Monitors" Environment
newValue Environment {Maybe [Tag]
Maybe [MonitorProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Environment -> ()
applicationId :: Environment -> Value Text
deletionProtectionCheck :: Environment -> Maybe (Value Text)
description :: Environment -> Maybe (Value Text)
monitors :: Environment -> Maybe [MonitorProperty]
name :: Environment -> Value Text
tags :: Environment -> Maybe [Tag]
haddock_workaround_ :: ()
applicationId :: Value Text
deletionProtectionCheck :: Maybe (Value Text)
description :: Maybe (Value Text)
monitors :: Maybe [MonitorProperty]
name :: Value Text
tags :: Maybe [Tag]
..}
= Environment {monitors :: Maybe [MonitorProperty]
monitors = [MonitorProperty] -> Maybe [MonitorProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [MonitorProperty]
PropertyType "Monitors" Environment
newValue, Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
applicationId :: Value Text
deletionProtectionCheck :: Maybe (Value Text)
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
applicationId :: Value Text
deletionProtectionCheck :: Maybe (Value Text)
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe [Tag]
..}
instance Property "Name" Environment where
type PropertyType "Name" Environment = Value Prelude.Text
set :: PropertyType "Name" Environment -> Environment -> Environment
set PropertyType "Name" Environment
newValue Environment {Maybe [Tag]
Maybe [MonitorProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Environment -> ()
applicationId :: Environment -> Value Text
deletionProtectionCheck :: Environment -> Maybe (Value Text)
description :: Environment -> Maybe (Value Text)
monitors :: Environment -> Maybe [MonitorProperty]
name :: Environment -> Value Text
tags :: Environment -> Maybe [Tag]
haddock_workaround_ :: ()
applicationId :: Value Text
deletionProtectionCheck :: Maybe (Value Text)
description :: Maybe (Value Text)
monitors :: Maybe [MonitorProperty]
name :: Value Text
tags :: Maybe [Tag]
..} = Environment {name :: Value Text
name = PropertyType "Name" Environment
Value Text
newValue, Maybe [Tag]
Maybe [MonitorProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
applicationId :: Value Text
deletionProtectionCheck :: Maybe (Value Text)
description :: Maybe (Value Text)
monitors :: Maybe [MonitorProperty]
tags :: Maybe [Tag]
haddock_workaround_ :: ()
applicationId :: Value Text
deletionProtectionCheck :: Maybe (Value Text)
description :: Maybe (Value Text)
monitors :: Maybe [MonitorProperty]
tags :: Maybe [Tag]
..}
instance Property "Tags" Environment where
type PropertyType "Tags" Environment = [Tag]
set :: PropertyType "Tags" Environment -> Environment -> Environment
set PropertyType "Tags" Environment
newValue Environment {Maybe [Tag]
Maybe [MonitorProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Environment -> ()
applicationId :: Environment -> Value Text
deletionProtectionCheck :: Environment -> Maybe (Value Text)
description :: Environment -> Maybe (Value Text)
monitors :: Environment -> Maybe [MonitorProperty]
name :: Environment -> Value Text
tags :: Environment -> Maybe [Tag]
haddock_workaround_ :: ()
applicationId :: Value Text
deletionProtectionCheck :: Maybe (Value Text)
description :: Maybe (Value Text)
monitors :: Maybe [MonitorProperty]
name :: Value Text
tags :: Maybe [Tag]
..}
= Environment {tags :: Maybe [Tag]
tags = [Tag] -> Maybe [Tag]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [Tag]
PropertyType "Tags" Environment
newValue, Maybe [MonitorProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
applicationId :: Value Text
deletionProtectionCheck :: Maybe (Value Text)
description :: Maybe (Value Text)
monitors :: Maybe [MonitorProperty]
name :: Value Text
haddock_workaround_ :: ()
applicationId :: Value Text
deletionProtectionCheck :: Maybe (Value Text)
description :: Maybe (Value Text)
monitors :: Maybe [MonitorProperty]
name :: Value Text
..}