module Stratosphere.MediaTailor.PlaybackConfiguration.CdnConfigurationProperty (
        CdnConfigurationProperty(..), mkCdnConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data CdnConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediatailor-playbackconfiguration-cdnconfiguration.html>
    CdnConfigurationProperty {CdnConfigurationProperty -> ()
haddock_workaround_ :: (),
                              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediatailor-playbackconfiguration-cdnconfiguration.html#cfn-mediatailor-playbackconfiguration-cdnconfiguration-adsegmenturlprefix>
                              CdnConfigurationProperty -> Maybe (Value Text)
adSegmentUrlPrefix :: (Prelude.Maybe (Value Prelude.Text)),
                              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediatailor-playbackconfiguration-cdnconfiguration.html#cfn-mediatailor-playbackconfiguration-cdnconfiguration-contentsegmenturlprefix>
                              CdnConfigurationProperty -> Maybe (Value Text)
contentSegmentUrlPrefix :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (CdnConfigurationProperty -> CdnConfigurationProperty -> Bool
(CdnConfigurationProperty -> CdnConfigurationProperty -> Bool)
-> (CdnConfigurationProperty -> CdnConfigurationProperty -> Bool)
-> Eq CdnConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CdnConfigurationProperty -> CdnConfigurationProperty -> Bool
== :: CdnConfigurationProperty -> CdnConfigurationProperty -> Bool
$c/= :: CdnConfigurationProperty -> CdnConfigurationProperty -> Bool
/= :: CdnConfigurationProperty -> CdnConfigurationProperty -> Bool
Prelude.Eq, Int -> CdnConfigurationProperty -> ShowS
[CdnConfigurationProperty] -> ShowS
CdnConfigurationProperty -> String
(Int -> CdnConfigurationProperty -> ShowS)
-> (CdnConfigurationProperty -> String)
-> ([CdnConfigurationProperty] -> ShowS)
-> Show CdnConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CdnConfigurationProperty -> ShowS
showsPrec :: Int -> CdnConfigurationProperty -> ShowS
$cshow :: CdnConfigurationProperty -> String
show :: CdnConfigurationProperty -> String
$cshowList :: [CdnConfigurationProperty] -> ShowS
showList :: [CdnConfigurationProperty] -> ShowS
Prelude.Show)
mkCdnConfigurationProperty :: CdnConfigurationProperty
mkCdnConfigurationProperty :: CdnConfigurationProperty
mkCdnConfigurationProperty
  = CdnConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), adSegmentUrlPrefix :: Maybe (Value Text)
adSegmentUrlPrefix = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       contentSegmentUrlPrefix :: Maybe (Value Text)
contentSegmentUrlPrefix = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CdnConfigurationProperty where
  toResourceProperties :: CdnConfigurationProperty -> ResourceProperties
toResourceProperties CdnConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: CdnConfigurationProperty -> ()
adSegmentUrlPrefix :: CdnConfigurationProperty -> Maybe (Value Text)
contentSegmentUrlPrefix :: CdnConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
adSegmentUrlPrefix :: Maybe (Value Text)
contentSegmentUrlPrefix :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::MediaTailor::PlaybackConfiguration.CdnConfiguration",
         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
"AdSegmentUrlPrefix" (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)
adSegmentUrlPrefix,
                            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
"ContentSegmentUrlPrefix"
                              (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)
contentSegmentUrlPrefix])}
instance JSON.ToJSON CdnConfigurationProperty where
  toJSON :: CdnConfigurationProperty -> Value
toJSON CdnConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: CdnConfigurationProperty -> ()
adSegmentUrlPrefix :: CdnConfigurationProperty -> Maybe (Value Text)
contentSegmentUrlPrefix :: CdnConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
adSegmentUrlPrefix :: Maybe (Value Text)
contentSegmentUrlPrefix :: 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
"AdSegmentUrlPrefix" (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)
adSegmentUrlPrefix,
               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
"ContentSegmentUrlPrefix"
                 (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)
contentSegmentUrlPrefix]))
instance Property "AdSegmentUrlPrefix" CdnConfigurationProperty where
  type PropertyType "AdSegmentUrlPrefix" CdnConfigurationProperty = Value Prelude.Text
  set :: PropertyType "AdSegmentUrlPrefix" CdnConfigurationProperty
-> CdnConfigurationProperty -> CdnConfigurationProperty
set PropertyType "AdSegmentUrlPrefix" CdnConfigurationProperty
newValue CdnConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: CdnConfigurationProperty -> ()
adSegmentUrlPrefix :: CdnConfigurationProperty -> Maybe (Value Text)
contentSegmentUrlPrefix :: CdnConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
adSegmentUrlPrefix :: Maybe (Value Text)
contentSegmentUrlPrefix :: Maybe (Value Text)
..}
    = CdnConfigurationProperty
        {adSegmentUrlPrefix :: Maybe (Value Text)
adSegmentUrlPrefix = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "AdSegmentUrlPrefix" CdnConfigurationProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
contentSegmentUrlPrefix :: Maybe (Value Text)
haddock_workaround_ :: ()
contentSegmentUrlPrefix :: Maybe (Value Text)
..}
instance Property "ContentSegmentUrlPrefix" CdnConfigurationProperty where
  type PropertyType "ContentSegmentUrlPrefix" CdnConfigurationProperty = Value Prelude.Text
  set :: PropertyType "ContentSegmentUrlPrefix" CdnConfigurationProperty
-> CdnConfigurationProperty -> CdnConfigurationProperty
set PropertyType "ContentSegmentUrlPrefix" CdnConfigurationProperty
newValue CdnConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: CdnConfigurationProperty -> ()
adSegmentUrlPrefix :: CdnConfigurationProperty -> Maybe (Value Text)
contentSegmentUrlPrefix :: CdnConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
adSegmentUrlPrefix :: Maybe (Value Text)
contentSegmentUrlPrefix :: Maybe (Value Text)
..}
    = CdnConfigurationProperty
        {contentSegmentUrlPrefix :: Maybe (Value Text)
contentSegmentUrlPrefix = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ContentSegmentUrlPrefix" CdnConfigurationProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
adSegmentUrlPrefix :: Maybe (Value Text)
haddock_workaround_ :: ()
adSegmentUrlPrefix :: Maybe (Value Text)
..}