{-# 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.MediaConvert.Types.Xavc4kIntraCbgProfileSettings
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.MediaConvert.Types.Xavc4kIntraCbgProfileSettings where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaConvert.Types.Xavc4kIntraCbgProfileClass
import qualified Amazonka.Prelude as Prelude

-- | Required when you set (Profile) under
-- (VideoDescription)>(CodecSettings)>(XavcSettings) to the value
-- XAVC_4K_INTRA_CBG.
--
-- /See:/ 'newXavc4kIntraCbgProfileSettings' smart constructor.
data Xavc4kIntraCbgProfileSettings = Xavc4kIntraCbgProfileSettings'
  { -- | Specify the XAVC Intra 4k (CBG) Class to set the bitrate of your output.
    -- Outputs of the same class have similar image quality over the operating
    -- points that are valid for that class.
    Xavc4kIntraCbgProfileSettings -> Maybe Xavc4kIntraCbgProfileClass
xavcClass :: Prelude.Maybe Xavc4kIntraCbgProfileClass
  }
  deriving (Xavc4kIntraCbgProfileSettings
-> Xavc4kIntraCbgProfileSettings -> Bool
(Xavc4kIntraCbgProfileSettings
 -> Xavc4kIntraCbgProfileSettings -> Bool)
-> (Xavc4kIntraCbgProfileSettings
    -> Xavc4kIntraCbgProfileSettings -> Bool)
-> Eq Xavc4kIntraCbgProfileSettings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Xavc4kIntraCbgProfileSettings
-> Xavc4kIntraCbgProfileSettings -> Bool
$c/= :: Xavc4kIntraCbgProfileSettings
-> Xavc4kIntraCbgProfileSettings -> Bool
== :: Xavc4kIntraCbgProfileSettings
-> Xavc4kIntraCbgProfileSettings -> Bool
$c== :: Xavc4kIntraCbgProfileSettings
-> Xavc4kIntraCbgProfileSettings -> Bool
Prelude.Eq, ReadPrec [Xavc4kIntraCbgProfileSettings]
ReadPrec Xavc4kIntraCbgProfileSettings
Int -> ReadS Xavc4kIntraCbgProfileSettings
ReadS [Xavc4kIntraCbgProfileSettings]
(Int -> ReadS Xavc4kIntraCbgProfileSettings)
-> ReadS [Xavc4kIntraCbgProfileSettings]
-> ReadPrec Xavc4kIntraCbgProfileSettings
-> ReadPrec [Xavc4kIntraCbgProfileSettings]
-> Read Xavc4kIntraCbgProfileSettings
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Xavc4kIntraCbgProfileSettings]
$creadListPrec :: ReadPrec [Xavc4kIntraCbgProfileSettings]
readPrec :: ReadPrec Xavc4kIntraCbgProfileSettings
$creadPrec :: ReadPrec Xavc4kIntraCbgProfileSettings
readList :: ReadS [Xavc4kIntraCbgProfileSettings]
$creadList :: ReadS [Xavc4kIntraCbgProfileSettings]
readsPrec :: Int -> ReadS Xavc4kIntraCbgProfileSettings
$creadsPrec :: Int -> ReadS Xavc4kIntraCbgProfileSettings
Prelude.Read, Int -> Xavc4kIntraCbgProfileSettings -> ShowS
[Xavc4kIntraCbgProfileSettings] -> ShowS
Xavc4kIntraCbgProfileSettings -> String
(Int -> Xavc4kIntraCbgProfileSettings -> ShowS)
-> (Xavc4kIntraCbgProfileSettings -> String)
-> ([Xavc4kIntraCbgProfileSettings] -> ShowS)
-> Show Xavc4kIntraCbgProfileSettings
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Xavc4kIntraCbgProfileSettings] -> ShowS
$cshowList :: [Xavc4kIntraCbgProfileSettings] -> ShowS
show :: Xavc4kIntraCbgProfileSettings -> String
$cshow :: Xavc4kIntraCbgProfileSettings -> String
showsPrec :: Int -> Xavc4kIntraCbgProfileSettings -> ShowS
$cshowsPrec :: Int -> Xavc4kIntraCbgProfileSettings -> ShowS
Prelude.Show, (forall x.
 Xavc4kIntraCbgProfileSettings
 -> Rep Xavc4kIntraCbgProfileSettings x)
-> (forall x.
    Rep Xavc4kIntraCbgProfileSettings x
    -> Xavc4kIntraCbgProfileSettings)
-> Generic Xavc4kIntraCbgProfileSettings
forall x.
Rep Xavc4kIntraCbgProfileSettings x
-> Xavc4kIntraCbgProfileSettings
forall x.
Xavc4kIntraCbgProfileSettings
-> Rep Xavc4kIntraCbgProfileSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep Xavc4kIntraCbgProfileSettings x
-> Xavc4kIntraCbgProfileSettings
$cfrom :: forall x.
Xavc4kIntraCbgProfileSettings
-> Rep Xavc4kIntraCbgProfileSettings x
Prelude.Generic)

-- |
-- Create a value of 'Xavc4kIntraCbgProfileSettings' 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:
--
-- 'xavcClass', 'xavc4kIntraCbgProfileSettings_xavcClass' - Specify the XAVC Intra 4k (CBG) Class to set the bitrate of your output.
-- Outputs of the same class have similar image quality over the operating
-- points that are valid for that class.
newXavc4kIntraCbgProfileSettings ::
  Xavc4kIntraCbgProfileSettings
newXavc4kIntraCbgProfileSettings :: Xavc4kIntraCbgProfileSettings
newXavc4kIntraCbgProfileSettings =
  Xavc4kIntraCbgProfileSettings' :: Maybe Xavc4kIntraCbgProfileClass -> Xavc4kIntraCbgProfileSettings
Xavc4kIntraCbgProfileSettings'
    { $sel:xavcClass:Xavc4kIntraCbgProfileSettings' :: Maybe Xavc4kIntraCbgProfileClass
xavcClass =
        Maybe Xavc4kIntraCbgProfileClass
forall a. Maybe a
Prelude.Nothing
    }

-- | Specify the XAVC Intra 4k (CBG) Class to set the bitrate of your output.
-- Outputs of the same class have similar image quality over the operating
-- points that are valid for that class.
xavc4kIntraCbgProfileSettings_xavcClass :: Lens.Lens' Xavc4kIntraCbgProfileSettings (Prelude.Maybe Xavc4kIntraCbgProfileClass)
xavc4kIntraCbgProfileSettings_xavcClass :: (Maybe Xavc4kIntraCbgProfileClass
 -> f (Maybe Xavc4kIntraCbgProfileClass))
-> Xavc4kIntraCbgProfileSettings -> f Xavc4kIntraCbgProfileSettings
xavc4kIntraCbgProfileSettings_xavcClass = (Xavc4kIntraCbgProfileSettings -> Maybe Xavc4kIntraCbgProfileClass)
-> (Xavc4kIntraCbgProfileSettings
    -> Maybe Xavc4kIntraCbgProfileClass
    -> Xavc4kIntraCbgProfileSettings)
-> Lens
     Xavc4kIntraCbgProfileSettings
     Xavc4kIntraCbgProfileSettings
     (Maybe Xavc4kIntraCbgProfileClass)
     (Maybe Xavc4kIntraCbgProfileClass)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Xavc4kIntraCbgProfileSettings' {Maybe Xavc4kIntraCbgProfileClass
xavcClass :: Maybe Xavc4kIntraCbgProfileClass
$sel:xavcClass:Xavc4kIntraCbgProfileSettings' :: Xavc4kIntraCbgProfileSettings -> Maybe Xavc4kIntraCbgProfileClass
xavcClass} -> Maybe Xavc4kIntraCbgProfileClass
xavcClass) (\s :: Xavc4kIntraCbgProfileSettings
s@Xavc4kIntraCbgProfileSettings' {} Maybe Xavc4kIntraCbgProfileClass
a -> Xavc4kIntraCbgProfileSettings
s {$sel:xavcClass:Xavc4kIntraCbgProfileSettings' :: Maybe Xavc4kIntraCbgProfileClass
xavcClass = Maybe Xavc4kIntraCbgProfileClass
a} :: Xavc4kIntraCbgProfileSettings)

instance Core.FromJSON Xavc4kIntraCbgProfileSettings where
  parseJSON :: Value -> Parser Xavc4kIntraCbgProfileSettings
parseJSON =
    String
-> (Object -> Parser Xavc4kIntraCbgProfileSettings)
-> Value
-> Parser Xavc4kIntraCbgProfileSettings
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"Xavc4kIntraCbgProfileSettings"
      ( \Object
x ->
          Maybe Xavc4kIntraCbgProfileClass -> Xavc4kIntraCbgProfileSettings
Xavc4kIntraCbgProfileSettings'
            (Maybe Xavc4kIntraCbgProfileClass -> Xavc4kIntraCbgProfileSettings)
-> Parser (Maybe Xavc4kIntraCbgProfileClass)
-> Parser Xavc4kIntraCbgProfileSettings
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Xavc4kIntraCbgProfileClass)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"xavcClass")
      )

instance
  Prelude.Hashable
    Xavc4kIntraCbgProfileSettings

instance Prelude.NFData Xavc4kIntraCbgProfileSettings

instance Core.ToJSON Xavc4kIntraCbgProfileSettings where
  toJSON :: Xavc4kIntraCbgProfileSettings -> Value
toJSON Xavc4kIntraCbgProfileSettings' {Maybe Xavc4kIntraCbgProfileClass
xavcClass :: Maybe Xavc4kIntraCbgProfileClass
$sel:xavcClass:Xavc4kIntraCbgProfileSettings' :: Xavc4kIntraCbgProfileSettings -> Maybe Xavc4kIntraCbgProfileClass
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [(Text
"xavcClass" Text -> Xavc4kIntraCbgProfileClass -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Xavc4kIntraCbgProfileClass -> Pair)
-> Maybe Xavc4kIntraCbgProfileClass -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Xavc4kIntraCbgProfileClass
xavcClass]
      )