module Stratosphere.MediaLive.Channel.AudioPidSelectionProperty (
AudioPidSelectionProperty(..), mkAudioPidSelectionProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data AudioPidSelectionProperty
=
AudioPidSelectionProperty {AudioPidSelectionProperty -> ()
haddock_workaround_ :: (),
AudioPidSelectionProperty -> Maybe (Value Integer)
pid :: (Prelude.Maybe (Value Prelude.Integer))}
deriving stock (AudioPidSelectionProperty -> AudioPidSelectionProperty -> Bool
(AudioPidSelectionProperty -> AudioPidSelectionProperty -> Bool)
-> (AudioPidSelectionProperty -> AudioPidSelectionProperty -> Bool)
-> Eq AudioPidSelectionProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AudioPidSelectionProperty -> AudioPidSelectionProperty -> Bool
== :: AudioPidSelectionProperty -> AudioPidSelectionProperty -> Bool
$c/= :: AudioPidSelectionProperty -> AudioPidSelectionProperty -> Bool
/= :: AudioPidSelectionProperty -> AudioPidSelectionProperty -> Bool
Prelude.Eq, Int -> AudioPidSelectionProperty -> ShowS
[AudioPidSelectionProperty] -> ShowS
AudioPidSelectionProperty -> String
(Int -> AudioPidSelectionProperty -> ShowS)
-> (AudioPidSelectionProperty -> String)
-> ([AudioPidSelectionProperty] -> ShowS)
-> Show AudioPidSelectionProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AudioPidSelectionProperty -> ShowS
showsPrec :: Int -> AudioPidSelectionProperty -> ShowS
$cshow :: AudioPidSelectionProperty -> String
show :: AudioPidSelectionProperty -> String
$cshowList :: [AudioPidSelectionProperty] -> ShowS
showList :: [AudioPidSelectionProperty] -> ShowS
Prelude.Show)
mkAudioPidSelectionProperty :: AudioPidSelectionProperty
mkAudioPidSelectionProperty :: AudioPidSelectionProperty
mkAudioPidSelectionProperty
= AudioPidSelectionProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), pid :: Maybe (Value Integer)
pid = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties AudioPidSelectionProperty where
toResourceProperties :: AudioPidSelectionProperty -> ResourceProperties
toResourceProperties AudioPidSelectionProperty {Maybe (Value Integer)
()
haddock_workaround_ :: AudioPidSelectionProperty -> ()
pid :: AudioPidSelectionProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
pid :: Maybe (Value Integer)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::MediaLive::Channel.AudioPidSelection",
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
"Pid" (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)
pid])}
instance JSON.ToJSON AudioPidSelectionProperty where
toJSON :: AudioPidSelectionProperty -> Value
toJSON AudioPidSelectionProperty {Maybe (Value Integer)
()
haddock_workaround_ :: AudioPidSelectionProperty -> ()
pid :: AudioPidSelectionProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
pid :: Maybe (Value Integer)
..}
= [(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
"Pid" (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)
pid]))
instance Property "Pid" AudioPidSelectionProperty where
type PropertyType "Pid" AudioPidSelectionProperty = Value Prelude.Integer
set :: PropertyType "Pid" AudioPidSelectionProperty
-> AudioPidSelectionProperty -> AudioPidSelectionProperty
set PropertyType "Pid" AudioPidSelectionProperty
newValue AudioPidSelectionProperty {Maybe (Value Integer)
()
haddock_workaround_ :: AudioPidSelectionProperty -> ()
pid :: AudioPidSelectionProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
pid :: Maybe (Value Integer)
..}
= AudioPidSelectionProperty {pid :: Maybe (Value Integer)
pid = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Pid" AudioPidSelectionProperty
Value Integer
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}