module Stratosphere.Events.Connection.ParameterProperty (
        ParameterProperty(..), mkParameterProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ParameterProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-connection-parameter.html>
    ParameterProperty {ParameterProperty -> ()
haddock_workaround_ :: (),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-connection-parameter.html#cfn-events-connection-parameter-isvaluesecret>
                       ParameterProperty -> Maybe (Value Bool)
isValueSecret :: (Prelude.Maybe (Value Prelude.Bool)),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-connection-parameter.html#cfn-events-connection-parameter-key>
                       ParameterProperty -> Value Text
key :: (Value Prelude.Text),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-connection-parameter.html#cfn-events-connection-parameter-value>
                       ParameterProperty -> Value Text
value :: (Value Prelude.Text)}
  deriving stock (ParameterProperty -> ParameterProperty -> Bool
(ParameterProperty -> ParameterProperty -> Bool)
-> (ParameterProperty -> ParameterProperty -> Bool)
-> Eq ParameterProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ParameterProperty -> ParameterProperty -> Bool
== :: ParameterProperty -> ParameterProperty -> Bool
$c/= :: ParameterProperty -> ParameterProperty -> Bool
/= :: ParameterProperty -> ParameterProperty -> Bool
Prelude.Eq, Int -> ParameterProperty -> ShowS
[ParameterProperty] -> ShowS
ParameterProperty -> String
(Int -> ParameterProperty -> ShowS)
-> (ParameterProperty -> String)
-> ([ParameterProperty] -> ShowS)
-> Show ParameterProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ParameterProperty -> ShowS
showsPrec :: Int -> ParameterProperty -> ShowS
$cshow :: ParameterProperty -> String
show :: ParameterProperty -> String
$cshowList :: [ParameterProperty] -> ShowS
showList :: [ParameterProperty] -> ShowS
Prelude.Show)
mkParameterProperty ::
  Value Prelude.Text -> Value Prelude.Text -> ParameterProperty
mkParameterProperty :: Value Text -> Value Text -> ParameterProperty
mkParameterProperty Value Text
key Value Text
value
  = ParameterProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), key :: Value Text
key = Value Text
key, value :: Value Text
value = Value Text
value,
       isValueSecret :: Maybe (Value Bool)
isValueSecret = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ParameterProperty where
  toResourceProperties :: ParameterProperty -> ResourceProperties
toResourceProperties ParameterProperty {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: ParameterProperty -> ()
isValueSecret :: ParameterProperty -> Maybe (Value Bool)
key :: ParameterProperty -> Value Text
value :: ParameterProperty -> Value Text
haddock_workaround_ :: ()
isValueSecret :: Maybe (Value Bool)
key :: Value Text
value :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Events::Connection.Parameter",
         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
"Key" 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
key, Key
"Value" 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
value]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"IsValueSecret" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
isValueSecret]))}
instance JSON.ToJSON ParameterProperty where
  toJSON :: ParameterProperty -> Value
toJSON ParameterProperty {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: ParameterProperty -> ()
isValueSecret :: ParameterProperty -> Maybe (Value Bool)
key :: ParameterProperty -> Value Text
value :: ParameterProperty -> Value Text
haddock_workaround_ :: ()
isValueSecret :: Maybe (Value Bool)
key :: Value Text
value :: 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
"Key" 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
key, Key
"Value" 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
value]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"IsValueSecret" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
isValueSecret])))
instance Property "IsValueSecret" ParameterProperty where
  type PropertyType "IsValueSecret" ParameterProperty = Value Prelude.Bool
  set :: PropertyType "IsValueSecret" ParameterProperty
-> ParameterProperty -> ParameterProperty
set PropertyType "IsValueSecret" ParameterProperty
newValue ParameterProperty {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: ParameterProperty -> ()
isValueSecret :: ParameterProperty -> Maybe (Value Bool)
key :: ParameterProperty -> Value Text
value :: ParameterProperty -> Value Text
haddock_workaround_ :: ()
isValueSecret :: Maybe (Value Bool)
key :: Value Text
value :: Value Text
..}
    = ParameterProperty {isValueSecret :: Maybe (Value Bool)
isValueSecret = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "IsValueSecret" ParameterProperty
Value Bool
newValue, ()
Value Text
haddock_workaround_ :: ()
key :: Value Text
value :: Value Text
haddock_workaround_ :: ()
key :: Value Text
value :: Value Text
..}
instance Property "Key" ParameterProperty where
  type PropertyType "Key" ParameterProperty = Value Prelude.Text
  set :: PropertyType "Key" ParameterProperty
-> ParameterProperty -> ParameterProperty
set PropertyType "Key" ParameterProperty
newValue ParameterProperty {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: ParameterProperty -> ()
isValueSecret :: ParameterProperty -> Maybe (Value Bool)
key :: ParameterProperty -> Value Text
value :: ParameterProperty -> Value Text
haddock_workaround_ :: ()
isValueSecret :: Maybe (Value Bool)
key :: Value Text
value :: Value Text
..}
    = ParameterProperty {key :: Value Text
key = PropertyType "Key" ParameterProperty
Value Text
newValue, Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: ()
isValueSecret :: Maybe (Value Bool)
value :: Value Text
haddock_workaround_ :: ()
isValueSecret :: Maybe (Value Bool)
value :: Value Text
..}
instance Property "Value" ParameterProperty where
  type PropertyType "Value" ParameterProperty = Value Prelude.Text
  set :: PropertyType "Value" ParameterProperty
-> ParameterProperty -> ParameterProperty
set PropertyType "Value" ParameterProperty
newValue ParameterProperty {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: ParameterProperty -> ()
isValueSecret :: ParameterProperty -> Maybe (Value Bool)
key :: ParameterProperty -> Value Text
value :: ParameterProperty -> Value Text
haddock_workaround_ :: ()
isValueSecret :: Maybe (Value Bool)
key :: Value Text
value :: Value Text
..}
    = ParameterProperty {value :: Value Text
value = PropertyType "Value" ParameterProperty
Value Text
newValue, Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: ()
isValueSecret :: Maybe (Value Bool)
key :: Value Text
haddock_workaround_ :: ()
isValueSecret :: Maybe (Value Bool)
key :: Value Text
..}