module Stratosphere.MediaTailor.SourceLocation.SegmentDeliveryConfigurationProperty (
        SegmentDeliveryConfigurationProperty(..),
        mkSegmentDeliveryConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data SegmentDeliveryConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediatailor-sourcelocation-segmentdeliveryconfiguration.html>
    SegmentDeliveryConfigurationProperty {SegmentDeliveryConfigurationProperty -> ()
haddock_workaround_ :: (),
                                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediatailor-sourcelocation-segmentdeliveryconfiguration.html#cfn-mediatailor-sourcelocation-segmentdeliveryconfiguration-baseurl>
                                          SegmentDeliveryConfigurationProperty -> Maybe (Value Text)
baseUrl :: (Prelude.Maybe (Value Prelude.Text)),
                                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediatailor-sourcelocation-segmentdeliveryconfiguration.html#cfn-mediatailor-sourcelocation-segmentdeliveryconfiguration-name>
                                          SegmentDeliveryConfigurationProperty -> Maybe (Value Text)
name :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (SegmentDeliveryConfigurationProperty
-> SegmentDeliveryConfigurationProperty -> Bool
(SegmentDeliveryConfigurationProperty
 -> SegmentDeliveryConfigurationProperty -> Bool)
-> (SegmentDeliveryConfigurationProperty
    -> SegmentDeliveryConfigurationProperty -> Bool)
-> Eq SegmentDeliveryConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SegmentDeliveryConfigurationProperty
-> SegmentDeliveryConfigurationProperty -> Bool
== :: SegmentDeliveryConfigurationProperty
-> SegmentDeliveryConfigurationProperty -> Bool
$c/= :: SegmentDeliveryConfigurationProperty
-> SegmentDeliveryConfigurationProperty -> Bool
/= :: SegmentDeliveryConfigurationProperty
-> SegmentDeliveryConfigurationProperty -> Bool
Prelude.Eq, Int -> SegmentDeliveryConfigurationProperty -> ShowS
[SegmentDeliveryConfigurationProperty] -> ShowS
SegmentDeliveryConfigurationProperty -> String
(Int -> SegmentDeliveryConfigurationProperty -> ShowS)
-> (SegmentDeliveryConfigurationProperty -> String)
-> ([SegmentDeliveryConfigurationProperty] -> ShowS)
-> Show SegmentDeliveryConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SegmentDeliveryConfigurationProperty -> ShowS
showsPrec :: Int -> SegmentDeliveryConfigurationProperty -> ShowS
$cshow :: SegmentDeliveryConfigurationProperty -> String
show :: SegmentDeliveryConfigurationProperty -> String
$cshowList :: [SegmentDeliveryConfigurationProperty] -> ShowS
showList :: [SegmentDeliveryConfigurationProperty] -> ShowS
Prelude.Show)
mkSegmentDeliveryConfigurationProperty ::
  SegmentDeliveryConfigurationProperty
mkSegmentDeliveryConfigurationProperty :: SegmentDeliveryConfigurationProperty
mkSegmentDeliveryConfigurationProperty
  = SegmentDeliveryConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), baseUrl :: Maybe (Value Text)
baseUrl = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       name :: Maybe (Value Text)
name = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties SegmentDeliveryConfigurationProperty where
  toResourceProperties :: SegmentDeliveryConfigurationProperty -> ResourceProperties
toResourceProperties SegmentDeliveryConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: SegmentDeliveryConfigurationProperty -> ()
baseUrl :: SegmentDeliveryConfigurationProperty -> Maybe (Value Text)
name :: SegmentDeliveryConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
baseUrl :: Maybe (Value Text)
name :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::MediaTailor::SourceLocation.SegmentDeliveryConfiguration",
         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
"BaseUrl" (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)
baseUrl,
                            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
"Name" (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)
name])}
instance JSON.ToJSON SegmentDeliveryConfigurationProperty where
  toJSON :: SegmentDeliveryConfigurationProperty -> Value
toJSON SegmentDeliveryConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: SegmentDeliveryConfigurationProperty -> ()
baseUrl :: SegmentDeliveryConfigurationProperty -> Maybe (Value Text)
name :: SegmentDeliveryConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
baseUrl :: Maybe (Value Text)
name :: 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
"BaseUrl" (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)
baseUrl,
               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
"Name" (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)
name]))
instance Property "BaseUrl" SegmentDeliveryConfigurationProperty where
  type PropertyType "BaseUrl" SegmentDeliveryConfigurationProperty = Value Prelude.Text
  set :: PropertyType "BaseUrl" SegmentDeliveryConfigurationProperty
-> SegmentDeliveryConfigurationProperty
-> SegmentDeliveryConfigurationProperty
set PropertyType "BaseUrl" SegmentDeliveryConfigurationProperty
newValue SegmentDeliveryConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: SegmentDeliveryConfigurationProperty -> ()
baseUrl :: SegmentDeliveryConfigurationProperty -> Maybe (Value Text)
name :: SegmentDeliveryConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
baseUrl :: Maybe (Value Text)
name :: Maybe (Value Text)
..}
    = SegmentDeliveryConfigurationProperty
        {baseUrl :: Maybe (Value Text)
baseUrl = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "BaseUrl" SegmentDeliveryConfigurationProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
name :: Maybe (Value Text)
haddock_workaround_ :: ()
name :: Maybe (Value Text)
..}
instance Property "Name" SegmentDeliveryConfigurationProperty where
  type PropertyType "Name" SegmentDeliveryConfigurationProperty = Value Prelude.Text
  set :: PropertyType "Name" SegmentDeliveryConfigurationProperty
-> SegmentDeliveryConfigurationProperty
-> SegmentDeliveryConfigurationProperty
set PropertyType "Name" SegmentDeliveryConfigurationProperty
newValue SegmentDeliveryConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: SegmentDeliveryConfigurationProperty -> ()
baseUrl :: SegmentDeliveryConfigurationProperty -> Maybe (Value Text)
name :: SegmentDeliveryConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
baseUrl :: Maybe (Value Text)
name :: Maybe (Value Text)
..}
    = SegmentDeliveryConfigurationProperty
        {name :: Maybe (Value Text)
name = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Name" SegmentDeliveryConfigurationProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
baseUrl :: Maybe (Value Text)
haddock_workaround_ :: ()
baseUrl :: Maybe (Value Text)
..}