module Stratosphere.MediaLive.Channel.CmafIngestCaptionLanguageMappingProperty (
        CmafIngestCaptionLanguageMappingProperty(..),
        mkCmafIngestCaptionLanguageMappingProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data CmafIngestCaptionLanguageMappingProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-channel-cmafingestcaptionlanguagemapping.html>
    CmafIngestCaptionLanguageMappingProperty {CmafIngestCaptionLanguageMappingProperty -> ()
haddock_workaround_ :: (),
                                              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-channel-cmafingestcaptionlanguagemapping.html#cfn-medialive-channel-cmafingestcaptionlanguagemapping-captionchannel>
                                              CmafIngestCaptionLanguageMappingProperty -> Maybe (Value Integer)
captionChannel :: (Prelude.Maybe (Value Prelude.Integer)),
                                              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-channel-cmafingestcaptionlanguagemapping.html#cfn-medialive-channel-cmafingestcaptionlanguagemapping-languagecode>
                                              CmafIngestCaptionLanguageMappingProperty -> Maybe (Value Text)
languageCode :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (CmafIngestCaptionLanguageMappingProperty
-> CmafIngestCaptionLanguageMappingProperty -> Bool
(CmafIngestCaptionLanguageMappingProperty
 -> CmafIngestCaptionLanguageMappingProperty -> Bool)
-> (CmafIngestCaptionLanguageMappingProperty
    -> CmafIngestCaptionLanguageMappingProperty -> Bool)
-> Eq CmafIngestCaptionLanguageMappingProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CmafIngestCaptionLanguageMappingProperty
-> CmafIngestCaptionLanguageMappingProperty -> Bool
== :: CmafIngestCaptionLanguageMappingProperty
-> CmafIngestCaptionLanguageMappingProperty -> Bool
$c/= :: CmafIngestCaptionLanguageMappingProperty
-> CmafIngestCaptionLanguageMappingProperty -> Bool
/= :: CmafIngestCaptionLanguageMappingProperty
-> CmafIngestCaptionLanguageMappingProperty -> Bool
Prelude.Eq, Int -> CmafIngestCaptionLanguageMappingProperty -> ShowS
[CmafIngestCaptionLanguageMappingProperty] -> ShowS
CmafIngestCaptionLanguageMappingProperty -> String
(Int -> CmafIngestCaptionLanguageMappingProperty -> ShowS)
-> (CmafIngestCaptionLanguageMappingProperty -> String)
-> ([CmafIngestCaptionLanguageMappingProperty] -> ShowS)
-> Show CmafIngestCaptionLanguageMappingProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CmafIngestCaptionLanguageMappingProperty -> ShowS
showsPrec :: Int -> CmafIngestCaptionLanguageMappingProperty -> ShowS
$cshow :: CmafIngestCaptionLanguageMappingProperty -> String
show :: CmafIngestCaptionLanguageMappingProperty -> String
$cshowList :: [CmafIngestCaptionLanguageMappingProperty] -> ShowS
showList :: [CmafIngestCaptionLanguageMappingProperty] -> ShowS
Prelude.Show)
mkCmafIngestCaptionLanguageMappingProperty ::
  CmafIngestCaptionLanguageMappingProperty
mkCmafIngestCaptionLanguageMappingProperty :: CmafIngestCaptionLanguageMappingProperty
mkCmafIngestCaptionLanguageMappingProperty
  = CmafIngestCaptionLanguageMappingProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), captionChannel :: Maybe (Value Integer)
captionChannel = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing,
       languageCode :: Maybe (Value Text)
languageCode = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CmafIngestCaptionLanguageMappingProperty where
  toResourceProperties :: CmafIngestCaptionLanguageMappingProperty -> ResourceProperties
toResourceProperties CmafIngestCaptionLanguageMappingProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: CmafIngestCaptionLanguageMappingProperty -> ()
captionChannel :: CmafIngestCaptionLanguageMappingProperty -> Maybe (Value Integer)
languageCode :: CmafIngestCaptionLanguageMappingProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
captionChannel :: Maybe (Value Integer)
languageCode :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::MediaLive::Channel.CmafIngestCaptionLanguageMapping",
         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 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
"CaptionChannel" (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)
captionChannel,
                            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])}
instance JSON.ToJSON CmafIngestCaptionLanguageMappingProperty where
  toJSON :: CmafIngestCaptionLanguageMappingProperty -> Value
toJSON CmafIngestCaptionLanguageMappingProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: CmafIngestCaptionLanguageMappingProperty -> ()
captionChannel :: CmafIngestCaptionLanguageMappingProperty -> Maybe (Value Integer)
languageCode :: CmafIngestCaptionLanguageMappingProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
captionChannel :: Maybe (Value Integer)
languageCode :: Maybe (Value Text)
..}
    = [(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 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
"CaptionChannel" (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)
captionChannel,
               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]))
instance Property "CaptionChannel" CmafIngestCaptionLanguageMappingProperty where
  type PropertyType "CaptionChannel" CmafIngestCaptionLanguageMappingProperty = Value Prelude.Integer
  set :: PropertyType
  "CaptionChannel" CmafIngestCaptionLanguageMappingProperty
-> CmafIngestCaptionLanguageMappingProperty
-> CmafIngestCaptionLanguageMappingProperty
set PropertyType
  "CaptionChannel" CmafIngestCaptionLanguageMappingProperty
newValue CmafIngestCaptionLanguageMappingProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: CmafIngestCaptionLanguageMappingProperty -> ()
captionChannel :: CmafIngestCaptionLanguageMappingProperty -> Maybe (Value Integer)
languageCode :: CmafIngestCaptionLanguageMappingProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
captionChannel :: Maybe (Value Integer)
languageCode :: Maybe (Value Text)
..}
    = CmafIngestCaptionLanguageMappingProperty
        {captionChannel :: Maybe (Value Integer)
captionChannel = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "CaptionChannel" CmafIngestCaptionLanguageMappingProperty
Value Integer
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
languageCode :: Maybe (Value Text)
haddock_workaround_ :: ()
languageCode :: Maybe (Value Text)
..}
instance Property "LanguageCode" CmafIngestCaptionLanguageMappingProperty where
  type PropertyType "LanguageCode" CmafIngestCaptionLanguageMappingProperty = Value Prelude.Text
  set :: PropertyType
  "LanguageCode" CmafIngestCaptionLanguageMappingProperty
-> CmafIngestCaptionLanguageMappingProperty
-> CmafIngestCaptionLanguageMappingProperty
set PropertyType
  "LanguageCode" CmafIngestCaptionLanguageMappingProperty
newValue CmafIngestCaptionLanguageMappingProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: CmafIngestCaptionLanguageMappingProperty -> ()
captionChannel :: CmafIngestCaptionLanguageMappingProperty -> Maybe (Value Integer)
languageCode :: CmafIngestCaptionLanguageMappingProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
captionChannel :: Maybe (Value Integer)
languageCode :: Maybe (Value Text)
..}
    = CmafIngestCaptionLanguageMappingProperty
        {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" CmafIngestCaptionLanguageMappingProperty
Value Text
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
captionChannel :: Maybe (Value Integer)
haddock_workaround_ :: ()
captionChannel :: Maybe (Value Integer)
..}