module Stratosphere.CodePipeline.Pipeline.VariableDeclarationProperty (
        VariableDeclarationProperty(..), mkVariableDeclarationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data VariableDeclarationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codepipeline-pipeline-variabledeclaration.html>
    VariableDeclarationProperty {VariableDeclarationProperty -> ()
haddock_workaround_ :: (),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codepipeline-pipeline-variabledeclaration.html#cfn-codepipeline-pipeline-variabledeclaration-defaultvalue>
                                 VariableDeclarationProperty -> Maybe (Value Text)
defaultValue :: (Prelude.Maybe (Value Prelude.Text)),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codepipeline-pipeline-variabledeclaration.html#cfn-codepipeline-pipeline-variabledeclaration-description>
                                 VariableDeclarationProperty -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text)),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codepipeline-pipeline-variabledeclaration.html#cfn-codepipeline-pipeline-variabledeclaration-name>
                                 VariableDeclarationProperty -> Value Text
name :: (Value Prelude.Text)}
  deriving stock (VariableDeclarationProperty -> VariableDeclarationProperty -> Bool
(VariableDeclarationProperty
 -> VariableDeclarationProperty -> Bool)
-> (VariableDeclarationProperty
    -> VariableDeclarationProperty -> Bool)
-> Eq VariableDeclarationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: VariableDeclarationProperty -> VariableDeclarationProperty -> Bool
== :: VariableDeclarationProperty -> VariableDeclarationProperty -> Bool
$c/= :: VariableDeclarationProperty -> VariableDeclarationProperty -> Bool
/= :: VariableDeclarationProperty -> VariableDeclarationProperty -> Bool
Prelude.Eq, Int -> VariableDeclarationProperty -> ShowS
[VariableDeclarationProperty] -> ShowS
VariableDeclarationProperty -> String
(Int -> VariableDeclarationProperty -> ShowS)
-> (VariableDeclarationProperty -> String)
-> ([VariableDeclarationProperty] -> ShowS)
-> Show VariableDeclarationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> VariableDeclarationProperty -> ShowS
showsPrec :: Int -> VariableDeclarationProperty -> ShowS
$cshow :: VariableDeclarationProperty -> String
show :: VariableDeclarationProperty -> String
$cshowList :: [VariableDeclarationProperty] -> ShowS
showList :: [VariableDeclarationProperty] -> ShowS
Prelude.Show)
mkVariableDeclarationProperty ::
  Value Prelude.Text -> VariableDeclarationProperty
mkVariableDeclarationProperty :: Value Text -> VariableDeclarationProperty
mkVariableDeclarationProperty Value Text
name
  = VariableDeclarationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), name :: Value Text
name = Value Text
name,
       defaultValue :: Maybe (Value Text)
defaultValue = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, description :: Maybe (Value Text)
description = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties VariableDeclarationProperty where
  toResourceProperties :: VariableDeclarationProperty -> ResourceProperties
toResourceProperties VariableDeclarationProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: VariableDeclarationProperty -> ()
defaultValue :: VariableDeclarationProperty -> Maybe (Value Text)
description :: VariableDeclarationProperty -> Maybe (Value Text)
name :: VariableDeclarationProperty -> Value Text
haddock_workaround_ :: ()
defaultValue :: Maybe (Value Text)
description :: Maybe (Value Text)
name :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::CodePipeline::Pipeline.VariableDeclaration",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         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
"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
"DefaultValue" (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)
defaultValue,
                               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]))}
instance JSON.ToJSON VariableDeclarationProperty where
  toJSON :: VariableDeclarationProperty -> Value
toJSON VariableDeclarationProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: VariableDeclarationProperty -> ()
defaultValue :: VariableDeclarationProperty -> Maybe (Value Text)
description :: VariableDeclarationProperty -> Maybe (Value Text)
name :: VariableDeclarationProperty -> Value Text
haddock_workaround_ :: ()
defaultValue :: Maybe (Value Text)
description :: Maybe (Value Text)
name :: Value Text
..}
    = [(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
"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
"DefaultValue" (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)
defaultValue,
                  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])))
instance Property "DefaultValue" VariableDeclarationProperty where
  type PropertyType "DefaultValue" VariableDeclarationProperty = Value Prelude.Text
  set :: PropertyType "DefaultValue" VariableDeclarationProperty
-> VariableDeclarationProperty -> VariableDeclarationProperty
set PropertyType "DefaultValue" VariableDeclarationProperty
newValue VariableDeclarationProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: VariableDeclarationProperty -> ()
defaultValue :: VariableDeclarationProperty -> Maybe (Value Text)
description :: VariableDeclarationProperty -> Maybe (Value Text)
name :: VariableDeclarationProperty -> Value Text
haddock_workaround_ :: ()
defaultValue :: Maybe (Value Text)
description :: Maybe (Value Text)
name :: Value Text
..}
    = VariableDeclarationProperty
        {defaultValue :: Maybe (Value Text)
defaultValue = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "DefaultValue" VariableDeclarationProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
..}
instance Property "Description" VariableDeclarationProperty where
  type PropertyType "Description" VariableDeclarationProperty = Value Prelude.Text
  set :: PropertyType "Description" VariableDeclarationProperty
-> VariableDeclarationProperty -> VariableDeclarationProperty
set PropertyType "Description" VariableDeclarationProperty
newValue VariableDeclarationProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: VariableDeclarationProperty -> ()
defaultValue :: VariableDeclarationProperty -> Maybe (Value Text)
description :: VariableDeclarationProperty -> Maybe (Value Text)
name :: VariableDeclarationProperty -> Value Text
haddock_workaround_ :: ()
defaultValue :: Maybe (Value Text)
description :: Maybe (Value Text)
name :: Value Text
..}
    = VariableDeclarationProperty
        {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" VariableDeclarationProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
defaultValue :: Maybe (Value Text)
name :: Value Text
haddock_workaround_ :: ()
defaultValue :: Maybe (Value Text)
name :: Value Text
..}
instance Property "Name" VariableDeclarationProperty where
  type PropertyType "Name" VariableDeclarationProperty = Value Prelude.Text
  set :: PropertyType "Name" VariableDeclarationProperty
-> VariableDeclarationProperty -> VariableDeclarationProperty
set PropertyType "Name" VariableDeclarationProperty
newValue VariableDeclarationProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: VariableDeclarationProperty -> ()
defaultValue :: VariableDeclarationProperty -> Maybe (Value Text)
description :: VariableDeclarationProperty -> Maybe (Value Text)
name :: VariableDeclarationProperty -> Value Text
haddock_workaround_ :: ()
defaultValue :: Maybe (Value Text)
description :: Maybe (Value Text)
name :: Value Text
..}
    = VariableDeclarationProperty {name :: Value Text
name = PropertyType "Name" VariableDeclarationProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
defaultValue :: Maybe (Value Text)
description :: Maybe (Value Text)
haddock_workaround_ :: ()
defaultValue :: Maybe (Value Text)
description :: Maybe (Value Text)
..}