module Stratosphere.CodeDeploy.Application (
        Application(..), mkApplication
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data Application
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codedeploy-application.html>
    Application {Application -> ()
haddock_workaround_ :: (),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codedeploy-application.html#cfn-codedeploy-application-applicationname>
                 Application -> Maybe (Value Text)
applicationName :: (Prelude.Maybe (Value Prelude.Text)),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codedeploy-application.html#cfn-codedeploy-application-computeplatform>
                 Application -> Maybe (Value Text)
computePlatform :: (Prelude.Maybe (Value Prelude.Text)),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codedeploy-application.html#cfn-codedeploy-application-tags>
                 Application -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
  deriving stock (Application -> Application -> Bool
(Application -> Application -> Bool)
-> (Application -> Application -> Bool) -> Eq Application
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Application -> Application -> Bool
== :: Application -> Application -> Bool
$c/= :: Application -> Application -> Bool
/= :: Application -> Application -> Bool
Prelude.Eq, Int -> Application -> ShowS
[Application] -> ShowS
Application -> String
(Int -> Application -> ShowS)
-> (Application -> String)
-> ([Application] -> ShowS)
-> Show Application
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Application -> ShowS
showsPrec :: Int -> Application -> ShowS
$cshow :: Application -> String
show :: Application -> String
$cshowList :: [Application] -> ShowS
showList :: [Application] -> ShowS
Prelude.Show)
mkApplication :: Application
mkApplication :: Application
mkApplication
  = Application
      {haddock_workaround_ :: ()
haddock_workaround_ = (), applicationName :: Maybe (Value Text)
applicationName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       computePlatform :: Maybe (Value Text)
computePlatform = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Application where
  toResourceProperties :: Application -> ResourceProperties
toResourceProperties Application {Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: Application -> ()
applicationName :: Application -> Maybe (Value Text)
computePlatform :: Application -> Maybe (Value Text)
tags :: Application -> Maybe [Tag]
haddock_workaround_ :: ()
applicationName :: Maybe (Value Text)
computePlatform :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::CodeDeploy::Application",
         supportsTags :: Bool
supportsTags = Bool
Prelude.True,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([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
"ApplicationName" (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)
applicationName,
                            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
"ComputePlatform" (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)
computePlatform,
                            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 Application where
  toJSON :: Application -> Value
toJSON Application {Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: Application -> ()
applicationName :: Application -> Maybe (Value Text)
computePlatform :: Application -> Maybe (Value Text)
tags :: Application -> Maybe [Tag]
haddock_workaround_ :: ()
applicationName :: Maybe (Value Text)
computePlatform :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([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
"ApplicationName" (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)
applicationName,
               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
"ComputePlatform" (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)
computePlatform,
               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 "ApplicationName" Application where
  type PropertyType "ApplicationName" Application = Value Prelude.Text
  set :: PropertyType "ApplicationName" Application
-> Application -> Application
set PropertyType "ApplicationName" Application
newValue Application {Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: Application -> ()
applicationName :: Application -> Maybe (Value Text)
computePlatform :: Application -> Maybe (Value Text)
tags :: Application -> Maybe [Tag]
haddock_workaround_ :: ()
applicationName :: Maybe (Value Text)
computePlatform :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = Application {applicationName :: Maybe (Value Text)
applicationName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ApplicationName" Application
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: ()
computePlatform :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
computePlatform :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "ComputePlatform" Application where
  type PropertyType "ComputePlatform" Application = Value Prelude.Text
  set :: PropertyType "ComputePlatform" Application
-> Application -> Application
set PropertyType "ComputePlatform" Application
newValue Application {Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: Application -> ()
applicationName :: Application -> Maybe (Value Text)
computePlatform :: Application -> Maybe (Value Text)
tags :: Application -> Maybe [Tag]
haddock_workaround_ :: ()
applicationName :: Maybe (Value Text)
computePlatform :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = Application {computePlatform :: Maybe (Value Text)
computePlatform = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ComputePlatform" Application
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: ()
applicationName :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
applicationName :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "Tags" Application where
  type PropertyType "Tags" Application = [Tag]
  set :: PropertyType "Tags" Application -> Application -> Application
set PropertyType "Tags" Application
newValue Application {Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: Application -> ()
applicationName :: Application -> Maybe (Value Text)
computePlatform :: Application -> Maybe (Value Text)
tags :: Application -> Maybe [Tag]
haddock_workaround_ :: ()
applicationName :: Maybe (Value Text)
computePlatform :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = Application {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" Application
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
applicationName :: Maybe (Value Text)
computePlatform :: Maybe (Value Text)
haddock_workaround_ :: ()
applicationName :: Maybe (Value Text)
computePlatform :: Maybe (Value Text)
..}