module Stratosphere.MediaTailor.VodSource (
        module Exports, VodSource(..), mkVodSource
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.MediaTailor.VodSource.HttpPackageConfigurationProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data VodSource
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediatailor-vodsource.html>
    VodSource {VodSource -> ()
haddock_workaround_ :: (),
               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediatailor-vodsource.html#cfn-mediatailor-vodsource-httppackageconfigurations>
               VodSource -> [HttpPackageConfigurationProperty]
httpPackageConfigurations :: [HttpPackageConfigurationProperty],
               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediatailor-vodsource.html#cfn-mediatailor-vodsource-sourcelocationname>
               VodSource -> Value Text
sourceLocationName :: (Value Prelude.Text),
               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediatailor-vodsource.html#cfn-mediatailor-vodsource-tags>
               VodSource -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag]),
               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediatailor-vodsource.html#cfn-mediatailor-vodsource-vodsourcename>
               VodSource -> Value Text
vodSourceName :: (Value Prelude.Text)}
  deriving stock (VodSource -> VodSource -> Bool
(VodSource -> VodSource -> Bool)
-> (VodSource -> VodSource -> Bool) -> Eq VodSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: VodSource -> VodSource -> Bool
== :: VodSource -> VodSource -> Bool
$c/= :: VodSource -> VodSource -> Bool
/= :: VodSource -> VodSource -> Bool
Prelude.Eq, Int -> VodSource -> ShowS
[VodSource] -> ShowS
VodSource -> String
(Int -> VodSource -> ShowS)
-> (VodSource -> String)
-> ([VodSource] -> ShowS)
-> Show VodSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> VodSource -> ShowS
showsPrec :: Int -> VodSource -> ShowS
$cshow :: VodSource -> String
show :: VodSource -> String
$cshowList :: [VodSource] -> ShowS
showList :: [VodSource] -> ShowS
Prelude.Show)
mkVodSource ::
  [HttpPackageConfigurationProperty]
  -> Value Prelude.Text -> Value Prelude.Text -> VodSource
mkVodSource :: [HttpPackageConfigurationProperty]
-> Value Text -> Value Text -> VodSource
mkVodSource
  [HttpPackageConfigurationProperty]
httpPackageConfigurations
  Value Text
sourceLocationName
  Value Text
vodSourceName
  = VodSource
      {haddock_workaround_ :: ()
haddock_workaround_ = (),
       httpPackageConfigurations :: [HttpPackageConfigurationProperty]
httpPackageConfigurations = [HttpPackageConfigurationProperty]
httpPackageConfigurations,
       sourceLocationName :: Value Text
sourceLocationName = Value Text
sourceLocationName,
       vodSourceName :: Value Text
vodSourceName = Value Text
vodSourceName, tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties VodSource where
  toResourceProperties :: VodSource -> ResourceProperties
toResourceProperties VodSource {[HttpPackageConfigurationProperty]
Maybe [Tag]
()
Value Text
haddock_workaround_ :: VodSource -> ()
httpPackageConfigurations :: VodSource -> [HttpPackageConfigurationProperty]
sourceLocationName :: VodSource -> Value Text
tags :: VodSource -> Maybe [Tag]
vodSourceName :: VodSource -> Value Text
haddock_workaround_ :: ()
httpPackageConfigurations :: [HttpPackageConfigurationProperty]
sourceLocationName :: Value Text
tags :: Maybe [Tag]
vodSourceName :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::MediaTailor::VodSource",
         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
"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,
                            Key
"VodSourceName" 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
vodSourceName]
                           ([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 VodSource where
  toJSON :: VodSource -> Value
toJSON VodSource {[HttpPackageConfigurationProperty]
Maybe [Tag]
()
Value Text
haddock_workaround_ :: VodSource -> ()
httpPackageConfigurations :: VodSource -> [HttpPackageConfigurationProperty]
sourceLocationName :: VodSource -> Value Text
tags :: VodSource -> Maybe [Tag]
vodSourceName :: VodSource -> Value Text
haddock_workaround_ :: ()
httpPackageConfigurations :: [HttpPackageConfigurationProperty]
sourceLocationName :: Value Text
tags :: Maybe [Tag]
vodSourceName :: Value Text
..}
    = [(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
"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,
               Key
"VodSourceName" 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
vodSourceName]
              ([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" VodSource where
  type PropertyType "HttpPackageConfigurations" VodSource = [HttpPackageConfigurationProperty]
  set :: PropertyType "HttpPackageConfigurations" VodSource
-> VodSource -> VodSource
set PropertyType "HttpPackageConfigurations" VodSource
newValue VodSource {[HttpPackageConfigurationProperty]
Maybe [Tag]
()
Value Text
haddock_workaround_ :: VodSource -> ()
httpPackageConfigurations :: VodSource -> [HttpPackageConfigurationProperty]
sourceLocationName :: VodSource -> Value Text
tags :: VodSource -> Maybe [Tag]
vodSourceName :: VodSource -> Value Text
haddock_workaround_ :: ()
httpPackageConfigurations :: [HttpPackageConfigurationProperty]
sourceLocationName :: Value Text
tags :: Maybe [Tag]
vodSourceName :: Value Text
..}
    = VodSource {httpPackageConfigurations :: [HttpPackageConfigurationProperty]
httpPackageConfigurations = [HttpPackageConfigurationProperty]
PropertyType "HttpPackageConfigurations" VodSource
newValue, Maybe [Tag]
()
Value Text
haddock_workaround_ :: ()
sourceLocationName :: Value Text
tags :: Maybe [Tag]
vodSourceName :: Value Text
haddock_workaround_ :: ()
sourceLocationName :: Value Text
tags :: Maybe [Tag]
vodSourceName :: Value Text
..}
instance Property "SourceLocationName" VodSource where
  type PropertyType "SourceLocationName" VodSource = Value Prelude.Text
  set :: PropertyType "SourceLocationName" VodSource
-> VodSource -> VodSource
set PropertyType "SourceLocationName" VodSource
newValue VodSource {[HttpPackageConfigurationProperty]
Maybe [Tag]
()
Value Text
haddock_workaround_ :: VodSource -> ()
httpPackageConfigurations :: VodSource -> [HttpPackageConfigurationProperty]
sourceLocationName :: VodSource -> Value Text
tags :: VodSource -> Maybe [Tag]
vodSourceName :: VodSource -> Value Text
haddock_workaround_ :: ()
httpPackageConfigurations :: [HttpPackageConfigurationProperty]
sourceLocationName :: Value Text
tags :: Maybe [Tag]
vodSourceName :: Value Text
..}
    = VodSource {sourceLocationName :: Value Text
sourceLocationName = PropertyType "SourceLocationName" VodSource
Value Text
newValue, [HttpPackageConfigurationProperty]
Maybe [Tag]
()
Value Text
haddock_workaround_ :: ()
httpPackageConfigurations :: [HttpPackageConfigurationProperty]
tags :: Maybe [Tag]
vodSourceName :: Value Text
haddock_workaround_ :: ()
httpPackageConfigurations :: [HttpPackageConfigurationProperty]
tags :: Maybe [Tag]
vodSourceName :: Value Text
..}
instance Property "Tags" VodSource where
  type PropertyType "Tags" VodSource = [Tag]
  set :: PropertyType "Tags" VodSource -> VodSource -> VodSource
set PropertyType "Tags" VodSource
newValue VodSource {[HttpPackageConfigurationProperty]
Maybe [Tag]
()
Value Text
haddock_workaround_ :: VodSource -> ()
httpPackageConfigurations :: VodSource -> [HttpPackageConfigurationProperty]
sourceLocationName :: VodSource -> Value Text
tags :: VodSource -> Maybe [Tag]
vodSourceName :: VodSource -> Value Text
haddock_workaround_ :: ()
httpPackageConfigurations :: [HttpPackageConfigurationProperty]
sourceLocationName :: Value Text
tags :: Maybe [Tag]
vodSourceName :: Value Text
..}
    = VodSource {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" VodSource
newValue, [HttpPackageConfigurationProperty]
()
Value Text
haddock_workaround_ :: ()
httpPackageConfigurations :: [HttpPackageConfigurationProperty]
sourceLocationName :: Value Text
vodSourceName :: Value Text
haddock_workaround_ :: ()
httpPackageConfigurations :: [HttpPackageConfigurationProperty]
sourceLocationName :: Value Text
vodSourceName :: Value Text
..}
instance Property "VodSourceName" VodSource where
  type PropertyType "VodSourceName" VodSource = Value Prelude.Text
  set :: PropertyType "VodSourceName" VodSource -> VodSource -> VodSource
set PropertyType "VodSourceName" VodSource
newValue VodSource {[HttpPackageConfigurationProperty]
Maybe [Tag]
()
Value Text
haddock_workaround_ :: VodSource -> ()
httpPackageConfigurations :: VodSource -> [HttpPackageConfigurationProperty]
sourceLocationName :: VodSource -> Value Text
tags :: VodSource -> Maybe [Tag]
vodSourceName :: VodSource -> Value Text
haddock_workaround_ :: ()
httpPackageConfigurations :: [HttpPackageConfigurationProperty]
sourceLocationName :: Value Text
tags :: Maybe [Tag]
vodSourceName :: Value Text
..}
    = VodSource {vodSourceName :: Value Text
vodSourceName = PropertyType "VodSourceName" VodSource
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]
..}