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