module Stratosphere.MediaLive.Multiplex (
        module Exports, Multiplex(..), mkMultiplex
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.MediaLive.Multiplex.MultiplexOutputDestinationProperty as Exports
import {-# SOURCE #-} Stratosphere.MediaLive.Multiplex.MultiplexSettingsProperty as Exports
import {-# SOURCE #-} Stratosphere.MediaLive.Multiplex.TagsProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data Multiplex
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-medialive-multiplex.html>
    Multiplex {Multiplex -> ()
haddock_workaround_ :: (),
               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-medialive-multiplex.html#cfn-medialive-multiplex-availabilityzones>
               Multiplex -> ValueList Text
availabilityZones :: (ValueList Prelude.Text),
               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-medialive-multiplex.html#cfn-medialive-multiplex-destinations>
               Multiplex -> Maybe [MultiplexOutputDestinationProperty]
destinations :: (Prelude.Maybe [MultiplexOutputDestinationProperty]),
               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-medialive-multiplex.html#cfn-medialive-multiplex-multiplexsettings>
               Multiplex -> MultiplexSettingsProperty
multiplexSettings :: MultiplexSettingsProperty,
               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-medialive-multiplex.html#cfn-medialive-multiplex-name>
               Multiplex -> Value Text
name :: (Value Prelude.Text),
               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-medialive-multiplex.html#cfn-medialive-multiplex-tags>
               Multiplex -> Maybe [TagsProperty]
tags :: (Prelude.Maybe [TagsProperty])}
  deriving stock (Multiplex -> Multiplex -> Bool
(Multiplex -> Multiplex -> Bool)
-> (Multiplex -> Multiplex -> Bool) -> Eq Multiplex
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Multiplex -> Multiplex -> Bool
== :: Multiplex -> Multiplex -> Bool
$c/= :: Multiplex -> Multiplex -> Bool
/= :: Multiplex -> Multiplex -> Bool
Prelude.Eq, Int -> Multiplex -> ShowS
[Multiplex] -> ShowS
Multiplex -> String
(Int -> Multiplex -> ShowS)
-> (Multiplex -> String)
-> ([Multiplex] -> ShowS)
-> Show Multiplex
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Multiplex -> ShowS
showsPrec :: Int -> Multiplex -> ShowS
$cshow :: Multiplex -> String
show :: Multiplex -> String
$cshowList :: [Multiplex] -> ShowS
showList :: [Multiplex] -> ShowS
Prelude.Show)
mkMultiplex ::
  ValueList Prelude.Text
  -> MultiplexSettingsProperty -> Value Prelude.Text -> Multiplex
mkMultiplex :: ValueList Text
-> MultiplexSettingsProperty -> Value Text -> Multiplex
mkMultiplex ValueList Text
availabilityZones MultiplexSettingsProperty
multiplexSettings Value Text
name
  = Multiplex
      {haddock_workaround_ :: ()
haddock_workaround_ = (), availabilityZones :: ValueList Text
availabilityZones = ValueList Text
availabilityZones,
       multiplexSettings :: MultiplexSettingsProperty
multiplexSettings = MultiplexSettingsProperty
multiplexSettings, name :: Value Text
name = Value Text
name,
       destinations :: Maybe [MultiplexOutputDestinationProperty]
destinations = Maybe [MultiplexOutputDestinationProperty]
forall a. Maybe a
Prelude.Nothing, tags :: Maybe [TagsProperty]
tags = Maybe [TagsProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Multiplex where
  toResourceProperties :: Multiplex -> ResourceProperties
toResourceProperties Multiplex {Maybe [MultiplexOutputDestinationProperty]
Maybe [TagsProperty]
()
ValueList Text
Value Text
MultiplexSettingsProperty
haddock_workaround_ :: Multiplex -> ()
availabilityZones :: Multiplex -> ValueList Text
destinations :: Multiplex -> Maybe [MultiplexOutputDestinationProperty]
multiplexSettings :: Multiplex -> MultiplexSettingsProperty
name :: Multiplex -> Value Text
tags :: Multiplex -> Maybe [TagsProperty]
haddock_workaround_ :: ()
availabilityZones :: ValueList Text
destinations :: Maybe [MultiplexOutputDestinationProperty]
multiplexSettings :: MultiplexSettingsProperty
name :: Value Text
tags :: Maybe [TagsProperty]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::MediaLive::Multiplex",
         supportsTags :: Bool
supportsTags = Bool
Prelude.True,
         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
"AvailabilityZones" Key -> ValueList Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= ValueList Text
availabilityZones,
                            Key
"MultiplexSettings" Key -> MultiplexSettingsProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= MultiplexSettingsProperty
multiplexSettings, Key
"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..= Value Text
name]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> [MultiplexOutputDestinationProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Destinations" ([MultiplexOutputDestinationProperty] -> (Key, Value))
-> Maybe [MultiplexOutputDestinationProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [MultiplexOutputDestinationProperty]
destinations,
                               Key -> [TagsProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([TagsProperty] -> (Key, Value))
-> Maybe [TagsProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [TagsProperty]
tags]))}
instance JSON.ToJSON Multiplex where
  toJSON :: Multiplex -> Value
toJSON Multiplex {Maybe [MultiplexOutputDestinationProperty]
Maybe [TagsProperty]
()
ValueList Text
Value Text
MultiplexSettingsProperty
haddock_workaround_ :: Multiplex -> ()
availabilityZones :: Multiplex -> ValueList Text
destinations :: Multiplex -> Maybe [MultiplexOutputDestinationProperty]
multiplexSettings :: Multiplex -> MultiplexSettingsProperty
name :: Multiplex -> Value Text
tags :: Multiplex -> Maybe [TagsProperty]
haddock_workaround_ :: ()
availabilityZones :: ValueList Text
destinations :: Maybe [MultiplexOutputDestinationProperty]
multiplexSettings :: MultiplexSettingsProperty
name :: Value Text
tags :: Maybe [TagsProperty]
..}
    = [(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
"AvailabilityZones" Key -> ValueList Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= ValueList Text
availabilityZones,
               Key
"MultiplexSettings" Key -> MultiplexSettingsProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= MultiplexSettingsProperty
multiplexSettings, Key
"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..= Value Text
name]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> [MultiplexOutputDestinationProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Destinations" ([MultiplexOutputDestinationProperty] -> (Key, Value))
-> Maybe [MultiplexOutputDestinationProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [MultiplexOutputDestinationProperty]
destinations,
                  Key -> [TagsProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([TagsProperty] -> (Key, Value))
-> Maybe [TagsProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [TagsProperty]
tags])))
instance Property "AvailabilityZones" Multiplex where
  type PropertyType "AvailabilityZones" Multiplex = ValueList Prelude.Text
  set :: PropertyType "AvailabilityZones" Multiplex
-> Multiplex -> Multiplex
set PropertyType "AvailabilityZones" Multiplex
newValue Multiplex {Maybe [MultiplexOutputDestinationProperty]
Maybe [TagsProperty]
()
ValueList Text
Value Text
MultiplexSettingsProperty
haddock_workaround_ :: Multiplex -> ()
availabilityZones :: Multiplex -> ValueList Text
destinations :: Multiplex -> Maybe [MultiplexOutputDestinationProperty]
multiplexSettings :: Multiplex -> MultiplexSettingsProperty
name :: Multiplex -> Value Text
tags :: Multiplex -> Maybe [TagsProperty]
haddock_workaround_ :: ()
availabilityZones :: ValueList Text
destinations :: Maybe [MultiplexOutputDestinationProperty]
multiplexSettings :: MultiplexSettingsProperty
name :: Value Text
tags :: Maybe [TagsProperty]
..}
    = Multiplex {availabilityZones :: ValueList Text
availabilityZones = PropertyType "AvailabilityZones" Multiplex
ValueList Text
newValue, Maybe [MultiplexOutputDestinationProperty]
Maybe [TagsProperty]
()
Value Text
MultiplexSettingsProperty
haddock_workaround_ :: ()
destinations :: Maybe [MultiplexOutputDestinationProperty]
multiplexSettings :: MultiplexSettingsProperty
name :: Value Text
tags :: Maybe [TagsProperty]
haddock_workaround_ :: ()
destinations :: Maybe [MultiplexOutputDestinationProperty]
multiplexSettings :: MultiplexSettingsProperty
name :: Value Text
tags :: Maybe [TagsProperty]
..}
instance Property "Destinations" Multiplex where
  type PropertyType "Destinations" Multiplex = [MultiplexOutputDestinationProperty]
  set :: PropertyType "Destinations" Multiplex -> Multiplex -> Multiplex
set PropertyType "Destinations" Multiplex
newValue Multiplex {Maybe [MultiplexOutputDestinationProperty]
Maybe [TagsProperty]
()
ValueList Text
Value Text
MultiplexSettingsProperty
haddock_workaround_ :: Multiplex -> ()
availabilityZones :: Multiplex -> ValueList Text
destinations :: Multiplex -> Maybe [MultiplexOutputDestinationProperty]
multiplexSettings :: Multiplex -> MultiplexSettingsProperty
name :: Multiplex -> Value Text
tags :: Multiplex -> Maybe [TagsProperty]
haddock_workaround_ :: ()
availabilityZones :: ValueList Text
destinations :: Maybe [MultiplexOutputDestinationProperty]
multiplexSettings :: MultiplexSettingsProperty
name :: Value Text
tags :: Maybe [TagsProperty]
..}
    = Multiplex {destinations :: Maybe [MultiplexOutputDestinationProperty]
destinations = [MultiplexOutputDestinationProperty]
-> Maybe [MultiplexOutputDestinationProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [MultiplexOutputDestinationProperty]
PropertyType "Destinations" Multiplex
newValue, Maybe [TagsProperty]
()
ValueList Text
Value Text
MultiplexSettingsProperty
haddock_workaround_ :: ()
availabilityZones :: ValueList Text
multiplexSettings :: MultiplexSettingsProperty
name :: Value Text
tags :: Maybe [TagsProperty]
haddock_workaround_ :: ()
availabilityZones :: ValueList Text
multiplexSettings :: MultiplexSettingsProperty
name :: Value Text
tags :: Maybe [TagsProperty]
..}
instance Property "MultiplexSettings" Multiplex where
  type PropertyType "MultiplexSettings" Multiplex = MultiplexSettingsProperty
  set :: PropertyType "MultiplexSettings" Multiplex
-> Multiplex -> Multiplex
set PropertyType "MultiplexSettings" Multiplex
newValue Multiplex {Maybe [MultiplexOutputDestinationProperty]
Maybe [TagsProperty]
()
ValueList Text
Value Text
MultiplexSettingsProperty
haddock_workaround_ :: Multiplex -> ()
availabilityZones :: Multiplex -> ValueList Text
destinations :: Multiplex -> Maybe [MultiplexOutputDestinationProperty]
multiplexSettings :: Multiplex -> MultiplexSettingsProperty
name :: Multiplex -> Value Text
tags :: Multiplex -> Maybe [TagsProperty]
haddock_workaround_ :: ()
availabilityZones :: ValueList Text
destinations :: Maybe [MultiplexOutputDestinationProperty]
multiplexSettings :: MultiplexSettingsProperty
name :: Value Text
tags :: Maybe [TagsProperty]
..}
    = Multiplex {multiplexSettings :: MultiplexSettingsProperty
multiplexSettings = PropertyType "MultiplexSettings" Multiplex
MultiplexSettingsProperty
newValue, Maybe [MultiplexOutputDestinationProperty]
Maybe [TagsProperty]
()
ValueList Text
Value Text
haddock_workaround_ :: ()
availabilityZones :: ValueList Text
destinations :: Maybe [MultiplexOutputDestinationProperty]
name :: Value Text
tags :: Maybe [TagsProperty]
haddock_workaround_ :: ()
availabilityZones :: ValueList Text
destinations :: Maybe [MultiplexOutputDestinationProperty]
name :: Value Text
tags :: Maybe [TagsProperty]
..}
instance Property "Name" Multiplex where
  type PropertyType "Name" Multiplex = Value Prelude.Text
  set :: PropertyType "Name" Multiplex -> Multiplex -> Multiplex
set PropertyType "Name" Multiplex
newValue Multiplex {Maybe [MultiplexOutputDestinationProperty]
Maybe [TagsProperty]
()
ValueList Text
Value Text
MultiplexSettingsProperty
haddock_workaround_ :: Multiplex -> ()
availabilityZones :: Multiplex -> ValueList Text
destinations :: Multiplex -> Maybe [MultiplexOutputDestinationProperty]
multiplexSettings :: Multiplex -> MultiplexSettingsProperty
name :: Multiplex -> Value Text
tags :: Multiplex -> Maybe [TagsProperty]
haddock_workaround_ :: ()
availabilityZones :: ValueList Text
destinations :: Maybe [MultiplexOutputDestinationProperty]
multiplexSettings :: MultiplexSettingsProperty
name :: Value Text
tags :: Maybe [TagsProperty]
..} = Multiplex {name :: Value Text
name = PropertyType "Name" Multiplex
Value Text
newValue, Maybe [MultiplexOutputDestinationProperty]
Maybe [TagsProperty]
()
ValueList Text
MultiplexSettingsProperty
haddock_workaround_ :: ()
availabilityZones :: ValueList Text
destinations :: Maybe [MultiplexOutputDestinationProperty]
multiplexSettings :: MultiplexSettingsProperty
tags :: Maybe [TagsProperty]
haddock_workaround_ :: ()
availabilityZones :: ValueList Text
destinations :: Maybe [MultiplexOutputDestinationProperty]
multiplexSettings :: MultiplexSettingsProperty
tags :: Maybe [TagsProperty]
..}
instance Property "Tags" Multiplex where
  type PropertyType "Tags" Multiplex = [TagsProperty]
  set :: PropertyType "Tags" Multiplex -> Multiplex -> Multiplex
set PropertyType "Tags" Multiplex
newValue Multiplex {Maybe [MultiplexOutputDestinationProperty]
Maybe [TagsProperty]
()
ValueList Text
Value Text
MultiplexSettingsProperty
haddock_workaround_ :: Multiplex -> ()
availabilityZones :: Multiplex -> ValueList Text
destinations :: Multiplex -> Maybe [MultiplexOutputDestinationProperty]
multiplexSettings :: Multiplex -> MultiplexSettingsProperty
name :: Multiplex -> Value Text
tags :: Multiplex -> Maybe [TagsProperty]
haddock_workaround_ :: ()
availabilityZones :: ValueList Text
destinations :: Maybe [MultiplexOutputDestinationProperty]
multiplexSettings :: MultiplexSettingsProperty
name :: Value Text
tags :: Maybe [TagsProperty]
..}
    = Multiplex {tags :: Maybe [TagsProperty]
tags = [TagsProperty] -> Maybe [TagsProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [TagsProperty]
PropertyType "Tags" Multiplex
newValue, Maybe [MultiplexOutputDestinationProperty]
()
ValueList Text
Value Text
MultiplexSettingsProperty
haddock_workaround_ :: ()
availabilityZones :: ValueList Text
destinations :: Maybe [MultiplexOutputDestinationProperty]
multiplexSettings :: MultiplexSettingsProperty
name :: Value Text
haddock_workaround_ :: ()
availabilityZones :: ValueList Text
destinations :: Maybe [MultiplexOutputDestinationProperty]
multiplexSettings :: MultiplexSettingsProperty
name :: Value Text
..}