{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.MediaLive.Types.TtmlDestinationSettings
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.MediaLive.Types.TtmlDestinationSettings where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MediaLive.Types.TtmlDestinationStyleControl
import qualified Amazonka.Prelude as Prelude

-- | Ttml Destination Settings
--
-- /See:/ 'newTtmlDestinationSettings' smart constructor.
data TtmlDestinationSettings = TtmlDestinationSettings'
  { -- | This field is not currently supported and will not affect the output
    -- styling. Leave the default value.
    TtmlDestinationSettings -> Maybe TtmlDestinationStyleControl
styleControl :: Prelude.Maybe TtmlDestinationStyleControl
  }
  deriving (TtmlDestinationSettings -> TtmlDestinationSettings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TtmlDestinationSettings -> TtmlDestinationSettings -> Bool
$c/= :: TtmlDestinationSettings -> TtmlDestinationSettings -> Bool
== :: TtmlDestinationSettings -> TtmlDestinationSettings -> Bool
$c== :: TtmlDestinationSettings -> TtmlDestinationSettings -> Bool
Prelude.Eq, ReadPrec [TtmlDestinationSettings]
ReadPrec TtmlDestinationSettings
Int -> ReadS TtmlDestinationSettings
ReadS [TtmlDestinationSettings]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TtmlDestinationSettings]
$creadListPrec :: ReadPrec [TtmlDestinationSettings]
readPrec :: ReadPrec TtmlDestinationSettings
$creadPrec :: ReadPrec TtmlDestinationSettings
readList :: ReadS [TtmlDestinationSettings]
$creadList :: ReadS [TtmlDestinationSettings]
readsPrec :: Int -> ReadS TtmlDestinationSettings
$creadsPrec :: Int -> ReadS TtmlDestinationSettings
Prelude.Read, Int -> TtmlDestinationSettings -> ShowS
[TtmlDestinationSettings] -> ShowS
TtmlDestinationSettings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TtmlDestinationSettings] -> ShowS
$cshowList :: [TtmlDestinationSettings] -> ShowS
show :: TtmlDestinationSettings -> String
$cshow :: TtmlDestinationSettings -> String
showsPrec :: Int -> TtmlDestinationSettings -> ShowS
$cshowsPrec :: Int -> TtmlDestinationSettings -> ShowS
Prelude.Show, forall x. Rep TtmlDestinationSettings x -> TtmlDestinationSettings
forall x. TtmlDestinationSettings -> Rep TtmlDestinationSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TtmlDestinationSettings x -> TtmlDestinationSettings
$cfrom :: forall x. TtmlDestinationSettings -> Rep TtmlDestinationSettings x
Prelude.Generic)

-- |
-- Create a value of 'TtmlDestinationSettings' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'styleControl', 'ttmlDestinationSettings_styleControl' - This field is not currently supported and will not affect the output
-- styling. Leave the default value.
newTtmlDestinationSettings ::
  TtmlDestinationSettings
newTtmlDestinationSettings :: TtmlDestinationSettings
newTtmlDestinationSettings =
  TtmlDestinationSettings'
    { $sel:styleControl:TtmlDestinationSettings' :: Maybe TtmlDestinationStyleControl
styleControl =
        forall a. Maybe a
Prelude.Nothing
    }

-- | This field is not currently supported and will not affect the output
-- styling. Leave the default value.
ttmlDestinationSettings_styleControl :: Lens.Lens' TtmlDestinationSettings (Prelude.Maybe TtmlDestinationStyleControl)
ttmlDestinationSettings_styleControl :: Lens' TtmlDestinationSettings (Maybe TtmlDestinationStyleControl)
ttmlDestinationSettings_styleControl = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TtmlDestinationSettings' {Maybe TtmlDestinationStyleControl
styleControl :: Maybe TtmlDestinationStyleControl
$sel:styleControl:TtmlDestinationSettings' :: TtmlDestinationSettings -> Maybe TtmlDestinationStyleControl
styleControl} -> Maybe TtmlDestinationStyleControl
styleControl) (\s :: TtmlDestinationSettings
s@TtmlDestinationSettings' {} Maybe TtmlDestinationStyleControl
a -> TtmlDestinationSettings
s {$sel:styleControl:TtmlDestinationSettings' :: Maybe TtmlDestinationStyleControl
styleControl = Maybe TtmlDestinationStyleControl
a} :: TtmlDestinationSettings)

instance Data.FromJSON TtmlDestinationSettings where
  parseJSON :: Value -> Parser TtmlDestinationSettings
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"TtmlDestinationSettings"
      ( \Object
x ->
          Maybe TtmlDestinationStyleControl -> TtmlDestinationSettings
TtmlDestinationSettings'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"styleControl")
      )

instance Prelude.Hashable TtmlDestinationSettings where
  hashWithSalt :: Int -> TtmlDestinationSettings -> Int
hashWithSalt Int
_salt TtmlDestinationSettings' {Maybe TtmlDestinationStyleControl
styleControl :: Maybe TtmlDestinationStyleControl
$sel:styleControl:TtmlDestinationSettings' :: TtmlDestinationSettings -> Maybe TtmlDestinationStyleControl
..} =
    Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe TtmlDestinationStyleControl
styleControl

instance Prelude.NFData TtmlDestinationSettings where
  rnf :: TtmlDestinationSettings -> ()
rnf TtmlDestinationSettings' {Maybe TtmlDestinationStyleControl
styleControl :: Maybe TtmlDestinationStyleControl
$sel:styleControl:TtmlDestinationSettings' :: TtmlDestinationSettings -> Maybe TtmlDestinationStyleControl
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe TtmlDestinationStyleControl
styleControl

instance Data.ToJSON TtmlDestinationSettings where
  toJSON :: TtmlDestinationSettings -> Value
toJSON TtmlDestinationSettings' {Maybe TtmlDestinationStyleControl
styleControl :: Maybe TtmlDestinationStyleControl
$sel:styleControl:TtmlDestinationSettings' :: TtmlDestinationSettings -> Maybe TtmlDestinationStyleControl
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [(Key
"styleControl" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TtmlDestinationStyleControl
styleControl]
      )