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