module Stratosphere.EMR.Cluster.KeyValueProperty (
        KeyValueProperty(..), mkKeyValueProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data KeyValueProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-keyvalue.html>
    KeyValueProperty {KeyValueProperty -> ()
haddock_workaround_ :: (),
                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-keyvalue.html#cfn-elasticmapreduce-cluster-keyvalue-key>
                      KeyValueProperty -> Maybe (Value Text)
key :: (Prelude.Maybe (Value Prelude.Text)),
                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-keyvalue.html#cfn-elasticmapreduce-cluster-keyvalue-value>
                      KeyValueProperty -> Maybe (Value Text)
value :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (KeyValueProperty -> KeyValueProperty -> Bool
(KeyValueProperty -> KeyValueProperty -> Bool)
-> (KeyValueProperty -> KeyValueProperty -> Bool)
-> Eq KeyValueProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: KeyValueProperty -> KeyValueProperty -> Bool
== :: KeyValueProperty -> KeyValueProperty -> Bool
$c/= :: KeyValueProperty -> KeyValueProperty -> Bool
/= :: KeyValueProperty -> KeyValueProperty -> Bool
Prelude.Eq, Int -> KeyValueProperty -> ShowS
[KeyValueProperty] -> ShowS
KeyValueProperty -> String
(Int -> KeyValueProperty -> ShowS)
-> (KeyValueProperty -> String)
-> ([KeyValueProperty] -> ShowS)
-> Show KeyValueProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> KeyValueProperty -> ShowS
showsPrec :: Int -> KeyValueProperty -> ShowS
$cshow :: KeyValueProperty -> String
show :: KeyValueProperty -> String
$cshowList :: [KeyValueProperty] -> ShowS
showList :: [KeyValueProperty] -> ShowS
Prelude.Show)
mkKeyValueProperty :: KeyValueProperty
mkKeyValueProperty :: KeyValueProperty
mkKeyValueProperty
  = KeyValueProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), key :: Maybe (Value Text)
key = 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 KeyValueProperty where
  toResourceProperties :: KeyValueProperty -> ResourceProperties
toResourceProperties KeyValueProperty {Maybe (Value Text)
()
haddock_workaround_ :: KeyValueProperty -> ()
key :: KeyValueProperty -> Maybe (Value Text)
value :: KeyValueProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
key :: Maybe (Value Text)
value :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::EMR::Cluster.KeyValue",
         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
"Key" (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)
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..=) 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 KeyValueProperty where
  toJSON :: KeyValueProperty -> Value
toJSON KeyValueProperty {Maybe (Value Text)
()
haddock_workaround_ :: KeyValueProperty -> ()
key :: KeyValueProperty -> Maybe (Value Text)
value :: KeyValueProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
key :: 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
"Key" (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)
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..=) 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 "Key" KeyValueProperty where
  type PropertyType "Key" KeyValueProperty = Value Prelude.Text
  set :: PropertyType "Key" KeyValueProperty
-> KeyValueProperty -> KeyValueProperty
set PropertyType "Key" KeyValueProperty
newValue KeyValueProperty {Maybe (Value Text)
()
haddock_workaround_ :: KeyValueProperty -> ()
key :: KeyValueProperty -> Maybe (Value Text)
value :: KeyValueProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
key :: Maybe (Value Text)
value :: Maybe (Value Text)
..}
    = KeyValueProperty {key :: Maybe (Value Text)
key = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Key" KeyValueProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
value :: Maybe (Value Text)
haddock_workaround_ :: ()
value :: Maybe (Value Text)
..}
instance Property "Value" KeyValueProperty where
  type PropertyType "Value" KeyValueProperty = Value Prelude.Text
  set :: PropertyType "Value" KeyValueProperty
-> KeyValueProperty -> KeyValueProperty
set PropertyType "Value" KeyValueProperty
newValue KeyValueProperty {Maybe (Value Text)
()
haddock_workaround_ :: KeyValueProperty -> ()
key :: KeyValueProperty -> Maybe (Value Text)
value :: KeyValueProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
key :: Maybe (Value Text)
value :: Maybe (Value Text)
..}
    = KeyValueProperty {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" KeyValueProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
key :: Maybe (Value Text)
haddock_workaround_ :: ()
key :: Maybe (Value Text)
..}