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