module Stratosphere.MediaLive.Input.InputSdpLocationProperty (
        InputSdpLocationProperty(..), mkInputSdpLocationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data InputSdpLocationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-input-inputsdplocation.html>
    InputSdpLocationProperty {InputSdpLocationProperty -> ()
haddock_workaround_ :: (),
                              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-input-inputsdplocation.html#cfn-medialive-input-inputsdplocation-mediaindex>
                              InputSdpLocationProperty -> Maybe (Value Integer)
mediaIndex :: (Prelude.Maybe (Value Prelude.Integer)),
                              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-input-inputsdplocation.html#cfn-medialive-input-inputsdplocation-sdpurl>
                              InputSdpLocationProperty -> Maybe (Value Text)
sdpUrl :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (InputSdpLocationProperty -> InputSdpLocationProperty -> Bool
(InputSdpLocationProperty -> InputSdpLocationProperty -> Bool)
-> (InputSdpLocationProperty -> InputSdpLocationProperty -> Bool)
-> Eq InputSdpLocationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: InputSdpLocationProperty -> InputSdpLocationProperty -> Bool
== :: InputSdpLocationProperty -> InputSdpLocationProperty -> Bool
$c/= :: InputSdpLocationProperty -> InputSdpLocationProperty -> Bool
/= :: InputSdpLocationProperty -> InputSdpLocationProperty -> Bool
Prelude.Eq, Int -> InputSdpLocationProperty -> ShowS
[InputSdpLocationProperty] -> ShowS
InputSdpLocationProperty -> String
(Int -> InputSdpLocationProperty -> ShowS)
-> (InputSdpLocationProperty -> String)
-> ([InputSdpLocationProperty] -> ShowS)
-> Show InputSdpLocationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> InputSdpLocationProperty -> ShowS
showsPrec :: Int -> InputSdpLocationProperty -> ShowS
$cshow :: InputSdpLocationProperty -> String
show :: InputSdpLocationProperty -> String
$cshowList :: [InputSdpLocationProperty] -> ShowS
showList :: [InputSdpLocationProperty] -> ShowS
Prelude.Show)
mkInputSdpLocationProperty :: InputSdpLocationProperty
mkInputSdpLocationProperty :: InputSdpLocationProperty
mkInputSdpLocationProperty
  = InputSdpLocationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), mediaIndex :: Maybe (Value Integer)
mediaIndex = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing,
       sdpUrl :: Maybe (Value Text)
sdpUrl = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties InputSdpLocationProperty where
  toResourceProperties :: InputSdpLocationProperty -> ResourceProperties
toResourceProperties InputSdpLocationProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: InputSdpLocationProperty -> ()
mediaIndex :: InputSdpLocationProperty -> Maybe (Value Integer)
sdpUrl :: InputSdpLocationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
mediaIndex :: Maybe (Value Integer)
sdpUrl :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::MediaLive::Input.InputSdpLocation",
         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 Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"MediaIndex" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
mediaIndex,
                            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
"SdpUrl" (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)
sdpUrl])}
instance JSON.ToJSON InputSdpLocationProperty where
  toJSON :: InputSdpLocationProperty -> Value
toJSON InputSdpLocationProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: InputSdpLocationProperty -> ()
mediaIndex :: InputSdpLocationProperty -> Maybe (Value Integer)
sdpUrl :: InputSdpLocationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
mediaIndex :: Maybe (Value Integer)
sdpUrl :: 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 Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"MediaIndex" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
mediaIndex,
               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
"SdpUrl" (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)
sdpUrl]))
instance Property "MediaIndex" InputSdpLocationProperty where
  type PropertyType "MediaIndex" InputSdpLocationProperty = Value Prelude.Integer
  set :: PropertyType "MediaIndex" InputSdpLocationProperty
-> InputSdpLocationProperty -> InputSdpLocationProperty
set PropertyType "MediaIndex" InputSdpLocationProperty
newValue InputSdpLocationProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: InputSdpLocationProperty -> ()
mediaIndex :: InputSdpLocationProperty -> Maybe (Value Integer)
sdpUrl :: InputSdpLocationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
mediaIndex :: Maybe (Value Integer)
sdpUrl :: Maybe (Value Text)
..}
    = InputSdpLocationProperty {mediaIndex :: Maybe (Value Integer)
mediaIndex = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "MediaIndex" InputSdpLocationProperty
Value Integer
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
sdpUrl :: Maybe (Value Text)
haddock_workaround_ :: ()
sdpUrl :: Maybe (Value Text)
..}
instance Property "SdpUrl" InputSdpLocationProperty where
  type PropertyType "SdpUrl" InputSdpLocationProperty = Value Prelude.Text
  set :: PropertyType "SdpUrl" InputSdpLocationProperty
-> InputSdpLocationProperty -> InputSdpLocationProperty
set PropertyType "SdpUrl" InputSdpLocationProperty
newValue InputSdpLocationProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: InputSdpLocationProperty -> ()
mediaIndex :: InputSdpLocationProperty -> Maybe (Value Integer)
sdpUrl :: InputSdpLocationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
mediaIndex :: Maybe (Value Integer)
sdpUrl :: Maybe (Value Text)
..}
    = InputSdpLocationProperty {sdpUrl :: Maybe (Value Text)
sdpUrl = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SdpUrl" InputSdpLocationProperty
Value Text
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
mediaIndex :: Maybe (Value Integer)
haddock_workaround_ :: ()
mediaIndex :: Maybe (Value Integer)
..}