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