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