module Stratosphere.M2.Application.DefinitionProperty (
        DefinitionProperty(..), mkDefinitionProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data DefinitionProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-m2-application-definition.html>
    DefinitionProperty {DefinitionProperty -> ()
haddock_workaround_ :: (),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-m2-application-definition.html#cfn-m2-application-definition-content>
                        DefinitionProperty -> Maybe (Value Text)
content :: (Prelude.Maybe (Value Prelude.Text)),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-m2-application-definition.html#cfn-m2-application-definition-s3location>
                        DefinitionProperty -> Maybe (Value Text)
s3Location :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (DefinitionProperty -> DefinitionProperty -> Bool
(DefinitionProperty -> DefinitionProperty -> Bool)
-> (DefinitionProperty -> DefinitionProperty -> Bool)
-> Eq DefinitionProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DefinitionProperty -> DefinitionProperty -> Bool
== :: DefinitionProperty -> DefinitionProperty -> Bool
$c/= :: DefinitionProperty -> DefinitionProperty -> Bool
/= :: DefinitionProperty -> DefinitionProperty -> Bool
Prelude.Eq, Int -> DefinitionProperty -> ShowS
[DefinitionProperty] -> ShowS
DefinitionProperty -> String
(Int -> DefinitionProperty -> ShowS)
-> (DefinitionProperty -> String)
-> ([DefinitionProperty] -> ShowS)
-> Show DefinitionProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DefinitionProperty -> ShowS
showsPrec :: Int -> DefinitionProperty -> ShowS
$cshow :: DefinitionProperty -> String
show :: DefinitionProperty -> String
$cshowList :: [DefinitionProperty] -> ShowS
showList :: [DefinitionProperty] -> ShowS
Prelude.Show)
mkDefinitionProperty :: DefinitionProperty
mkDefinitionProperty :: DefinitionProperty
mkDefinitionProperty
  = DefinitionProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), content :: Maybe (Value Text)
content = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       s3Location :: Maybe (Value Text)
s3Location = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties DefinitionProperty where
  toResourceProperties :: DefinitionProperty -> ResourceProperties
toResourceProperties DefinitionProperty {Maybe (Value Text)
()
haddock_workaround_ :: DefinitionProperty -> ()
content :: DefinitionProperty -> Maybe (Value Text)
s3Location :: DefinitionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
content :: Maybe (Value Text)
s3Location :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::M2::Application.Definition",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         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
"Content" (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)
content,
                            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
"S3Location" (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)
s3Location])}
instance JSON.ToJSON DefinitionProperty where
  toJSON :: DefinitionProperty -> Value
toJSON DefinitionProperty {Maybe (Value Text)
()
haddock_workaround_ :: DefinitionProperty -> ()
content :: DefinitionProperty -> Maybe (Value Text)
s3Location :: DefinitionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
content :: Maybe (Value Text)
s3Location :: Maybe (Value Text)
..}
    = [(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
"Content" (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)
content,
               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
"S3Location" (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)
s3Location]))
instance Property "Content" DefinitionProperty where
  type PropertyType "Content" DefinitionProperty = Value Prelude.Text
  set :: PropertyType "Content" DefinitionProperty
-> DefinitionProperty -> DefinitionProperty
set PropertyType "Content" DefinitionProperty
newValue DefinitionProperty {Maybe (Value Text)
()
haddock_workaround_ :: DefinitionProperty -> ()
content :: DefinitionProperty -> Maybe (Value Text)
s3Location :: DefinitionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
content :: Maybe (Value Text)
s3Location :: Maybe (Value Text)
..}
    = DefinitionProperty {content :: Maybe (Value Text)
content = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Content" DefinitionProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
s3Location :: Maybe (Value Text)
haddock_workaround_ :: ()
s3Location :: Maybe (Value Text)
..}
instance Property "S3Location" DefinitionProperty where
  type PropertyType "S3Location" DefinitionProperty = Value Prelude.Text
  set :: PropertyType "S3Location" DefinitionProperty
-> DefinitionProperty -> DefinitionProperty
set PropertyType "S3Location" DefinitionProperty
newValue DefinitionProperty {Maybe (Value Text)
()
haddock_workaround_ :: DefinitionProperty -> ()
content :: DefinitionProperty -> Maybe (Value Text)
s3Location :: DefinitionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
content :: Maybe (Value Text)
s3Location :: Maybe (Value Text)
..}
    = DefinitionProperty {s3Location :: Maybe (Value Text)
s3Location = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "S3Location" DefinitionProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
content :: Maybe (Value Text)
haddock_workaround_ :: ()
content :: Maybe (Value Text)
..}