module Stratosphere.AppRunner.Service.KeyValuePairProperty (
KeyValuePairProperty(..), mkKeyValuePairProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data KeyValuePairProperty
=
KeyValuePairProperty {KeyValuePairProperty -> ()
haddock_workaround_ :: (),
KeyValuePairProperty -> Maybe (Value Text)
name :: (Prelude.Maybe (Value Prelude.Text)),
KeyValuePairProperty -> Maybe (Value Text)
value :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (KeyValuePairProperty -> KeyValuePairProperty -> Bool
(KeyValuePairProperty -> KeyValuePairProperty -> Bool)
-> (KeyValuePairProperty -> KeyValuePairProperty -> Bool)
-> Eq KeyValuePairProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: KeyValuePairProperty -> KeyValuePairProperty -> Bool
== :: KeyValuePairProperty -> KeyValuePairProperty -> Bool
$c/= :: KeyValuePairProperty -> KeyValuePairProperty -> Bool
/= :: KeyValuePairProperty -> KeyValuePairProperty -> Bool
Prelude.Eq, Int -> KeyValuePairProperty -> ShowS
[KeyValuePairProperty] -> ShowS
KeyValuePairProperty -> String
(Int -> KeyValuePairProperty -> ShowS)
-> (KeyValuePairProperty -> String)
-> ([KeyValuePairProperty] -> ShowS)
-> Show KeyValuePairProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> KeyValuePairProperty -> ShowS
showsPrec :: Int -> KeyValuePairProperty -> ShowS
$cshow :: KeyValuePairProperty -> String
show :: KeyValuePairProperty -> String
$cshowList :: [KeyValuePairProperty] -> ShowS
showList :: [KeyValuePairProperty] -> ShowS
Prelude.Show)
mkKeyValuePairProperty :: KeyValuePairProperty
mkKeyValuePairProperty :: KeyValuePairProperty
mkKeyValuePairProperty
= KeyValuePairProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), name :: Maybe (Value Text)
name = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
value :: Maybe (Value Text)
value = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties KeyValuePairProperty where
toResourceProperties :: KeyValuePairProperty -> ResourceProperties
toResourceProperties KeyValuePairProperty {Maybe (Value Text)
()
haddock_workaround_ :: KeyValuePairProperty -> ()
name :: KeyValuePairProperty -> Maybe (Value Text)
value :: KeyValuePairProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
name :: Maybe (Value Text)
value :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::AppRunner::Service.KeyValuePair",
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
"Name" (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)
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..=) Key
"Value" (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)
value])}
instance JSON.ToJSON KeyValuePairProperty where
toJSON :: KeyValuePairProperty -> Value
toJSON KeyValuePairProperty {Maybe (Value Text)
()
haddock_workaround_ :: KeyValuePairProperty -> ()
name :: KeyValuePairProperty -> Maybe (Value Text)
value :: KeyValuePairProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
name :: Maybe (Value Text)
value :: 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
"Name" (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)
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..=) Key
"Value" (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)
value]))
instance Property "Name" KeyValuePairProperty where
type PropertyType "Name" KeyValuePairProperty = Value Prelude.Text
set :: PropertyType "Name" KeyValuePairProperty
-> KeyValuePairProperty -> KeyValuePairProperty
set PropertyType "Name" KeyValuePairProperty
newValue KeyValuePairProperty {Maybe (Value Text)
()
haddock_workaround_ :: KeyValuePairProperty -> ()
name :: KeyValuePairProperty -> Maybe (Value Text)
value :: KeyValuePairProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
name :: Maybe (Value Text)
value :: Maybe (Value Text)
..}
= KeyValuePairProperty {name :: Maybe (Value Text)
name = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Name" KeyValuePairProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
value :: Maybe (Value Text)
haddock_workaround_ :: ()
value :: Maybe (Value Text)
..}
instance Property "Value" KeyValuePairProperty where
type PropertyType "Value" KeyValuePairProperty = Value Prelude.Text
set :: PropertyType "Value" KeyValuePairProperty
-> KeyValuePairProperty -> KeyValuePairProperty
set PropertyType "Value" KeyValuePairProperty
newValue KeyValuePairProperty {Maybe (Value Text)
()
haddock_workaround_ :: KeyValuePairProperty -> ()
name :: KeyValuePairProperty -> Maybe (Value Text)
value :: KeyValuePairProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
name :: Maybe (Value Text)
value :: Maybe (Value Text)
..}
= KeyValuePairProperty {value :: Maybe (Value Text)
value = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Value" KeyValuePairProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
name :: Maybe (Value Text)
haddock_workaround_ :: ()
name :: Maybe (Value Text)
..}