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