module Stratosphere.MediaTailor.LiveSource (
        module Exports, LiveSource(..), mkLiveSource
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.MediaTailor.LiveSource.HttpPackageConfigurationProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data LiveSource
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediatailor-livesource.html>
    LiveSource {LiveSource -> ()
haddock_workaround_ :: (),
                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediatailor-livesource.html#cfn-mediatailor-livesource-httppackageconfigurations>
                LiveSource -> [HttpPackageConfigurationProperty]
httpPackageConfigurations :: [HttpPackageConfigurationProperty],
                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediatailor-livesource.html#cfn-mediatailor-livesource-livesourcename>
                LiveSource -> Value Text
liveSourceName :: (Value Prelude.Text),
                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediatailor-livesource.html#cfn-mediatailor-livesource-sourcelocationname>
                LiveSource -> Value Text
sourceLocationName :: (Value Prelude.Text),
                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediatailor-livesource.html#cfn-mediatailor-livesource-tags>
                LiveSource -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
  deriving stock (LiveSource -> LiveSource -> Bool
(LiveSource -> LiveSource -> Bool)
-> (LiveSource -> LiveSource -> Bool) -> Eq LiveSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: LiveSource -> LiveSource -> Bool
== :: LiveSource -> LiveSource -> Bool
$c/= :: LiveSource -> LiveSource -> Bool
/= :: LiveSource -> LiveSource -> Bool
Prelude.Eq, Int -> LiveSource -> ShowS
[LiveSource] -> ShowS
LiveSource -> String
(Int -> LiveSource -> ShowS)
-> (LiveSource -> String)
-> ([LiveSource] -> ShowS)
-> Show LiveSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> LiveSource -> ShowS
showsPrec :: Int -> LiveSource -> ShowS
$cshow :: LiveSource -> String
show :: LiveSource -> String
$cshowList :: [LiveSource] -> ShowS
showList :: [LiveSource] -> ShowS
Prelude.Show)
mkLiveSource ::
  [HttpPackageConfigurationProperty]
  -> Value Prelude.Text -> Value Prelude.Text -> LiveSource
mkLiveSource :: [HttpPackageConfigurationProperty]
-> Value Text -> Value Text -> LiveSource
mkLiveSource
  [HttpPackageConfigurationProperty]
httpPackageConfigurations
  Value Text
liveSourceName
  Value Text
sourceLocationName
  = LiveSource
      {haddock_workaround_ :: ()
haddock_workaround_ = (),
       httpPackageConfigurations :: [HttpPackageConfigurationProperty]
httpPackageConfigurations = [HttpPackageConfigurationProperty]
httpPackageConfigurations,
       liveSourceName :: Value Text
liveSourceName = Value Text
liveSourceName,
       sourceLocationName :: Value Text
sourceLocationName = Value Text
sourceLocationName, tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties LiveSource where
  toResourceProperties :: LiveSource -> ResourceProperties
toResourceProperties LiveSource {[HttpPackageConfigurationProperty]
Maybe [Tag]
()
Value Text
haddock_workaround_ :: LiveSource -> ()
httpPackageConfigurations :: LiveSource -> [HttpPackageConfigurationProperty]
liveSourceName :: LiveSource -> Value Text
sourceLocationName :: LiveSource -> Value Text
tags :: LiveSource -> Maybe [Tag]
haddock_workaround_ :: ()
httpPackageConfigurations :: [HttpPackageConfigurationProperty]
liveSourceName :: Value Text
sourceLocationName :: Value Text
tags :: Maybe [Tag]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::MediaTailor::LiveSource",
         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
"HttpPackageConfigurations" Key -> [HttpPackageConfigurationProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [HttpPackageConfigurationProperty]
httpPackageConfigurations,
                            Key
"LiveSourceName" 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
liveSourceName,
                            Key
"SourceLocationName" 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
sourceLocationName]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [Key -> [Tag] -> (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" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags]))}
instance JSON.ToJSON LiveSource where
  toJSON :: LiveSource -> Value
toJSON LiveSource {[HttpPackageConfigurationProperty]
Maybe [Tag]
()
Value Text
haddock_workaround_ :: LiveSource -> ()
httpPackageConfigurations :: LiveSource -> [HttpPackageConfigurationProperty]
liveSourceName :: LiveSource -> Value Text
sourceLocationName :: LiveSource -> Value Text
tags :: LiveSource -> Maybe [Tag]
haddock_workaround_ :: ()
httpPackageConfigurations :: [HttpPackageConfigurationProperty]
liveSourceName :: Value Text
sourceLocationName :: Value Text
tags :: Maybe [Tag]
..}
    = [(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
"HttpPackageConfigurations" Key -> [HttpPackageConfigurationProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [HttpPackageConfigurationProperty]
httpPackageConfigurations,
               Key
"LiveSourceName" 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
liveSourceName,
               Key
"SourceLocationName" 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
sourceLocationName]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [Key -> [Tag] -> (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" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags])))
instance Property "HttpPackageConfigurations" LiveSource where
  type PropertyType "HttpPackageConfigurations" LiveSource = [HttpPackageConfigurationProperty]
  set :: PropertyType "HttpPackageConfigurations" LiveSource
-> LiveSource -> LiveSource
set PropertyType "HttpPackageConfigurations" LiveSource
newValue LiveSource {[HttpPackageConfigurationProperty]
Maybe [Tag]
()
Value Text
haddock_workaround_ :: LiveSource -> ()
httpPackageConfigurations :: LiveSource -> [HttpPackageConfigurationProperty]
liveSourceName :: LiveSource -> Value Text
sourceLocationName :: LiveSource -> Value Text
tags :: LiveSource -> Maybe [Tag]
haddock_workaround_ :: ()
httpPackageConfigurations :: [HttpPackageConfigurationProperty]
liveSourceName :: Value Text
sourceLocationName :: Value Text
tags :: Maybe [Tag]
..}
    = LiveSource {httpPackageConfigurations :: [HttpPackageConfigurationProperty]
httpPackageConfigurations = [HttpPackageConfigurationProperty]
PropertyType "HttpPackageConfigurations" LiveSource
newValue, Maybe [Tag]
()
Value Text
haddock_workaround_ :: ()
liveSourceName :: Value Text
sourceLocationName :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
liveSourceName :: Value Text
sourceLocationName :: Value Text
tags :: Maybe [Tag]
..}
instance Property "LiveSourceName" LiveSource where
  type PropertyType "LiveSourceName" LiveSource = Value Prelude.Text
  set :: PropertyType "LiveSourceName" LiveSource
-> LiveSource -> LiveSource
set PropertyType "LiveSourceName" LiveSource
newValue LiveSource {[HttpPackageConfigurationProperty]
Maybe [Tag]
()
Value Text
haddock_workaround_ :: LiveSource -> ()
httpPackageConfigurations :: LiveSource -> [HttpPackageConfigurationProperty]
liveSourceName :: LiveSource -> Value Text
sourceLocationName :: LiveSource -> Value Text
tags :: LiveSource -> Maybe [Tag]
haddock_workaround_ :: ()
httpPackageConfigurations :: [HttpPackageConfigurationProperty]
liveSourceName :: Value Text
sourceLocationName :: Value Text
tags :: Maybe [Tag]
..}
    = LiveSource {liveSourceName :: Value Text
liveSourceName = PropertyType "LiveSourceName" LiveSource
Value Text
newValue, [HttpPackageConfigurationProperty]
Maybe [Tag]
()
Value Text
haddock_workaround_ :: ()
httpPackageConfigurations :: [HttpPackageConfigurationProperty]
sourceLocationName :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
httpPackageConfigurations :: [HttpPackageConfigurationProperty]
sourceLocationName :: Value Text
tags :: Maybe [Tag]
..}
instance Property "SourceLocationName" LiveSource where
  type PropertyType "SourceLocationName" LiveSource = Value Prelude.Text
  set :: PropertyType "SourceLocationName" LiveSource
-> LiveSource -> LiveSource
set PropertyType "SourceLocationName" LiveSource
newValue LiveSource {[HttpPackageConfigurationProperty]
Maybe [Tag]
()
Value Text
haddock_workaround_ :: LiveSource -> ()
httpPackageConfigurations :: LiveSource -> [HttpPackageConfigurationProperty]
liveSourceName :: LiveSource -> Value Text
sourceLocationName :: LiveSource -> Value Text
tags :: LiveSource -> Maybe [Tag]
haddock_workaround_ :: ()
httpPackageConfigurations :: [HttpPackageConfigurationProperty]
liveSourceName :: Value Text
sourceLocationName :: Value Text
tags :: Maybe [Tag]
..}
    = LiveSource {sourceLocationName :: Value Text
sourceLocationName = PropertyType "SourceLocationName" LiveSource
Value Text
newValue, [HttpPackageConfigurationProperty]
Maybe [Tag]
()
Value Text
haddock_workaround_ :: ()
httpPackageConfigurations :: [HttpPackageConfigurationProperty]
liveSourceName :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
httpPackageConfigurations :: [HttpPackageConfigurationProperty]
liveSourceName :: Value Text
tags :: Maybe [Tag]
..}
instance Property "Tags" LiveSource where
  type PropertyType "Tags" LiveSource = [Tag]
  set :: PropertyType "Tags" LiveSource -> LiveSource -> LiveSource
set PropertyType "Tags" LiveSource
newValue LiveSource {[HttpPackageConfigurationProperty]
Maybe [Tag]
()
Value Text
haddock_workaround_ :: LiveSource -> ()
httpPackageConfigurations :: LiveSource -> [HttpPackageConfigurationProperty]
liveSourceName :: LiveSource -> Value Text
sourceLocationName :: LiveSource -> Value Text
tags :: LiveSource -> Maybe [Tag]
haddock_workaround_ :: ()
httpPackageConfigurations :: [HttpPackageConfigurationProperty]
liveSourceName :: Value Text
sourceLocationName :: Value Text
tags :: Maybe [Tag]
..}
    = LiveSource {tags :: Maybe [Tag]
tags = [Tag] -> Maybe [Tag]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [Tag]
PropertyType "Tags" LiveSource
newValue, [HttpPackageConfigurationProperty]
()
Value Text
haddock_workaround_ :: ()
httpPackageConfigurations :: [HttpPackageConfigurationProperty]
liveSourceName :: Value Text
sourceLocationName :: Value Text
haddock_workaround_ :: ()
httpPackageConfigurations :: [HttpPackageConfigurationProperty]
liveSourceName :: Value Text
sourceLocationName :: Value Text
..}