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