module Stratosphere.MediaLive.Channel.Mp2SettingsProperty (
Mp2SettingsProperty(..), mkMp2SettingsProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data Mp2SettingsProperty
=
Mp2SettingsProperty {Mp2SettingsProperty -> ()
haddock_workaround_ :: (),
Mp2SettingsProperty -> Maybe (Value Double)
bitrate :: (Prelude.Maybe (Value Prelude.Double)),
Mp2SettingsProperty -> Maybe (Value Text)
codingMode :: (Prelude.Maybe (Value Prelude.Text)),
Mp2SettingsProperty -> Maybe (Value Double)
sampleRate :: (Prelude.Maybe (Value Prelude.Double))}
deriving stock (Mp2SettingsProperty -> Mp2SettingsProperty -> Bool
(Mp2SettingsProperty -> Mp2SettingsProperty -> Bool)
-> (Mp2SettingsProperty -> Mp2SettingsProperty -> Bool)
-> Eq Mp2SettingsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Mp2SettingsProperty -> Mp2SettingsProperty -> Bool
== :: Mp2SettingsProperty -> Mp2SettingsProperty -> Bool
$c/= :: Mp2SettingsProperty -> Mp2SettingsProperty -> Bool
/= :: Mp2SettingsProperty -> Mp2SettingsProperty -> Bool
Prelude.Eq, Int -> Mp2SettingsProperty -> ShowS
[Mp2SettingsProperty] -> ShowS
Mp2SettingsProperty -> String
(Int -> Mp2SettingsProperty -> ShowS)
-> (Mp2SettingsProperty -> String)
-> ([Mp2SettingsProperty] -> ShowS)
-> Show Mp2SettingsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Mp2SettingsProperty -> ShowS
showsPrec :: Int -> Mp2SettingsProperty -> ShowS
$cshow :: Mp2SettingsProperty -> String
show :: Mp2SettingsProperty -> String
$cshowList :: [Mp2SettingsProperty] -> ShowS
showList :: [Mp2SettingsProperty] -> ShowS
Prelude.Show)
mkMp2SettingsProperty :: Mp2SettingsProperty
mkMp2SettingsProperty :: Mp2SettingsProperty
mkMp2SettingsProperty
= Mp2SettingsProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), bitrate :: Maybe (Value Double)
bitrate = Maybe (Value Double)
forall a. Maybe a
Prelude.Nothing,
codingMode :: Maybe (Value Text)
codingMode = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, sampleRate :: Maybe (Value Double)
sampleRate = Maybe (Value Double)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Mp2SettingsProperty where
toResourceProperties :: Mp2SettingsProperty -> ResourceProperties
toResourceProperties Mp2SettingsProperty {Maybe (Value Double)
Maybe (Value Text)
()
haddock_workaround_ :: Mp2SettingsProperty -> ()
bitrate :: Mp2SettingsProperty -> Maybe (Value Double)
codingMode :: Mp2SettingsProperty -> Maybe (Value Text)
sampleRate :: Mp2SettingsProperty -> Maybe (Value Double)
haddock_workaround_ :: ()
bitrate :: Maybe (Value Double)
codingMode :: Maybe (Value Text)
sampleRate :: Maybe (Value Double)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::MediaLive::Channel.Mp2Settings",
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 Double -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Bitrate" (Value Double -> (Key, Value))
-> Maybe (Value Double) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Double)
bitrate,
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
"CodingMode" (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)
codingMode,
Key -> Value Double -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SampleRate" (Value Double -> (Key, Value))
-> Maybe (Value Double) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Double)
sampleRate])}
instance JSON.ToJSON Mp2SettingsProperty where
toJSON :: Mp2SettingsProperty -> Value
toJSON Mp2SettingsProperty {Maybe (Value Double)
Maybe (Value Text)
()
haddock_workaround_ :: Mp2SettingsProperty -> ()
bitrate :: Mp2SettingsProperty -> Maybe (Value Double)
codingMode :: Mp2SettingsProperty -> Maybe (Value Text)
sampleRate :: Mp2SettingsProperty -> Maybe (Value Double)
haddock_workaround_ :: ()
bitrate :: Maybe (Value Double)
codingMode :: Maybe (Value Text)
sampleRate :: Maybe (Value Double)
..}
= [(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 Double -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Bitrate" (Value Double -> (Key, Value))
-> Maybe (Value Double) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Double)
bitrate,
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
"CodingMode" (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)
codingMode,
Key -> Value Double -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SampleRate" (Value Double -> (Key, Value))
-> Maybe (Value Double) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Double)
sampleRate]))
instance Property "Bitrate" Mp2SettingsProperty where
type PropertyType "Bitrate" Mp2SettingsProperty = Value Prelude.Double
set :: PropertyType "Bitrate" Mp2SettingsProperty
-> Mp2SettingsProperty -> Mp2SettingsProperty
set PropertyType "Bitrate" Mp2SettingsProperty
newValue Mp2SettingsProperty {Maybe (Value Double)
Maybe (Value Text)
()
haddock_workaround_ :: Mp2SettingsProperty -> ()
bitrate :: Mp2SettingsProperty -> Maybe (Value Double)
codingMode :: Mp2SettingsProperty -> Maybe (Value Text)
sampleRate :: Mp2SettingsProperty -> Maybe (Value Double)
haddock_workaround_ :: ()
bitrate :: Maybe (Value Double)
codingMode :: Maybe (Value Text)
sampleRate :: Maybe (Value Double)
..}
= Mp2SettingsProperty {bitrate :: Maybe (Value Double)
bitrate = Value Double -> Maybe (Value Double)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Bitrate" Mp2SettingsProperty
Value Double
newValue, Maybe (Value Double)
Maybe (Value Text)
()
haddock_workaround_ :: ()
codingMode :: Maybe (Value Text)
sampleRate :: Maybe (Value Double)
haddock_workaround_ :: ()
codingMode :: Maybe (Value Text)
sampleRate :: Maybe (Value Double)
..}
instance Property "CodingMode" Mp2SettingsProperty where
type PropertyType "CodingMode" Mp2SettingsProperty = Value Prelude.Text
set :: PropertyType "CodingMode" Mp2SettingsProperty
-> Mp2SettingsProperty -> Mp2SettingsProperty
set PropertyType "CodingMode" Mp2SettingsProperty
newValue Mp2SettingsProperty {Maybe (Value Double)
Maybe (Value Text)
()
haddock_workaround_ :: Mp2SettingsProperty -> ()
bitrate :: Mp2SettingsProperty -> Maybe (Value Double)
codingMode :: Mp2SettingsProperty -> Maybe (Value Text)
sampleRate :: Mp2SettingsProperty -> Maybe (Value Double)
haddock_workaround_ :: ()
bitrate :: Maybe (Value Double)
codingMode :: Maybe (Value Text)
sampleRate :: Maybe (Value Double)
..}
= Mp2SettingsProperty {codingMode :: Maybe (Value Text)
codingMode = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "CodingMode" Mp2SettingsProperty
Value Text
newValue, Maybe (Value Double)
()
haddock_workaround_ :: ()
bitrate :: Maybe (Value Double)
sampleRate :: Maybe (Value Double)
haddock_workaround_ :: ()
bitrate :: Maybe (Value Double)
sampleRate :: Maybe (Value Double)
..}
instance Property "SampleRate" Mp2SettingsProperty where
type PropertyType "SampleRate" Mp2SettingsProperty = Value Prelude.Double
set :: PropertyType "SampleRate" Mp2SettingsProperty
-> Mp2SettingsProperty -> Mp2SettingsProperty
set PropertyType "SampleRate" Mp2SettingsProperty
newValue Mp2SettingsProperty {Maybe (Value Double)
Maybe (Value Text)
()
haddock_workaround_ :: Mp2SettingsProperty -> ()
bitrate :: Mp2SettingsProperty -> Maybe (Value Double)
codingMode :: Mp2SettingsProperty -> Maybe (Value Text)
sampleRate :: Mp2SettingsProperty -> Maybe (Value Double)
haddock_workaround_ :: ()
bitrate :: Maybe (Value Double)
codingMode :: Maybe (Value Text)
sampleRate :: Maybe (Value Double)
..}
= Mp2SettingsProperty {sampleRate :: Maybe (Value Double)
sampleRate = Value Double -> Maybe (Value Double)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SampleRate" Mp2SettingsProperty
Value Double
newValue, Maybe (Value Double)
Maybe (Value Text)
()
haddock_workaround_ :: ()
bitrate :: Maybe (Value Double)
codingMode :: Maybe (Value Text)
haddock_workaround_ :: ()
bitrate :: Maybe (Value Double)
codingMode :: Maybe (Value Text)
..}