{-# 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.XavcHdIntraCbgProfileSettings
-- 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.MediaConvert.Types.XavcHdIntraCbgProfileSettings where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MediaConvert.Types.XavcHdIntraCbgProfileClass
import qualified Amazonka.Prelude as Prelude

-- | Required when you set (Profile) under
-- (VideoDescription)>(CodecSettings)>(XavcSettings) to the value
-- XAVC_HD_INTRA_CBG.
--
-- /See:/ 'newXavcHdIntraCbgProfileSettings' smart constructor.
data XavcHdIntraCbgProfileSettings = XavcHdIntraCbgProfileSettings'
  { -- | Specify the XAVC Intra HD (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.
    XavcHdIntraCbgProfileSettings -> Maybe XavcHdIntraCbgProfileClass
xavcClass :: Prelude.Maybe XavcHdIntraCbgProfileClass
  }
  deriving (XavcHdIntraCbgProfileSettings
-> XavcHdIntraCbgProfileSettings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: XavcHdIntraCbgProfileSettings
-> XavcHdIntraCbgProfileSettings -> Bool
$c/= :: XavcHdIntraCbgProfileSettings
-> XavcHdIntraCbgProfileSettings -> Bool
== :: XavcHdIntraCbgProfileSettings
-> XavcHdIntraCbgProfileSettings -> Bool
$c== :: XavcHdIntraCbgProfileSettings
-> XavcHdIntraCbgProfileSettings -> Bool
Prelude.Eq, ReadPrec [XavcHdIntraCbgProfileSettings]
ReadPrec XavcHdIntraCbgProfileSettings
Int -> ReadS XavcHdIntraCbgProfileSettings
ReadS [XavcHdIntraCbgProfileSettings]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [XavcHdIntraCbgProfileSettings]
$creadListPrec :: ReadPrec [XavcHdIntraCbgProfileSettings]
readPrec :: ReadPrec XavcHdIntraCbgProfileSettings
$creadPrec :: ReadPrec XavcHdIntraCbgProfileSettings
readList :: ReadS [XavcHdIntraCbgProfileSettings]
$creadList :: ReadS [XavcHdIntraCbgProfileSettings]
readsPrec :: Int -> ReadS XavcHdIntraCbgProfileSettings
$creadsPrec :: Int -> ReadS XavcHdIntraCbgProfileSettings
Prelude.Read, Int -> XavcHdIntraCbgProfileSettings -> ShowS
[XavcHdIntraCbgProfileSettings] -> ShowS
XavcHdIntraCbgProfileSettings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [XavcHdIntraCbgProfileSettings] -> ShowS
$cshowList :: [XavcHdIntraCbgProfileSettings] -> ShowS
show :: XavcHdIntraCbgProfileSettings -> String
$cshow :: XavcHdIntraCbgProfileSettings -> String
showsPrec :: Int -> XavcHdIntraCbgProfileSettings -> ShowS
$cshowsPrec :: Int -> XavcHdIntraCbgProfileSettings -> ShowS
Prelude.Show, forall x.
Rep XavcHdIntraCbgProfileSettings x
-> XavcHdIntraCbgProfileSettings
forall x.
XavcHdIntraCbgProfileSettings
-> Rep XavcHdIntraCbgProfileSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep XavcHdIntraCbgProfileSettings x
-> XavcHdIntraCbgProfileSettings
$cfrom :: forall x.
XavcHdIntraCbgProfileSettings
-> Rep XavcHdIntraCbgProfileSettings x
Prelude.Generic)

-- |
-- Create a value of 'XavcHdIntraCbgProfileSettings' 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', 'xavcHdIntraCbgProfileSettings_xavcClass' - Specify the XAVC Intra HD (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.
newXavcHdIntraCbgProfileSettings ::
  XavcHdIntraCbgProfileSettings
newXavcHdIntraCbgProfileSettings :: XavcHdIntraCbgProfileSettings
newXavcHdIntraCbgProfileSettings =
  XavcHdIntraCbgProfileSettings'
    { $sel:xavcClass:XavcHdIntraCbgProfileSettings' :: Maybe XavcHdIntraCbgProfileClass
xavcClass =
        forall a. Maybe a
Prelude.Nothing
    }

-- | Specify the XAVC Intra HD (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.
xavcHdIntraCbgProfileSettings_xavcClass :: Lens.Lens' XavcHdIntraCbgProfileSettings (Prelude.Maybe XavcHdIntraCbgProfileClass)
xavcHdIntraCbgProfileSettings_xavcClass :: Lens'
  XavcHdIntraCbgProfileSettings (Maybe XavcHdIntraCbgProfileClass)
xavcHdIntraCbgProfileSettings_xavcClass = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\XavcHdIntraCbgProfileSettings' {Maybe XavcHdIntraCbgProfileClass
xavcClass :: Maybe XavcHdIntraCbgProfileClass
$sel:xavcClass:XavcHdIntraCbgProfileSettings' :: XavcHdIntraCbgProfileSettings -> Maybe XavcHdIntraCbgProfileClass
xavcClass} -> Maybe XavcHdIntraCbgProfileClass
xavcClass) (\s :: XavcHdIntraCbgProfileSettings
s@XavcHdIntraCbgProfileSettings' {} Maybe XavcHdIntraCbgProfileClass
a -> XavcHdIntraCbgProfileSettings
s {$sel:xavcClass:XavcHdIntraCbgProfileSettings' :: Maybe XavcHdIntraCbgProfileClass
xavcClass = Maybe XavcHdIntraCbgProfileClass
a} :: XavcHdIntraCbgProfileSettings)

instance Data.FromJSON XavcHdIntraCbgProfileSettings where
  parseJSON :: Value -> Parser XavcHdIntraCbgProfileSettings
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"XavcHdIntraCbgProfileSettings"
      ( \Object
x ->
          Maybe XavcHdIntraCbgProfileClass -> XavcHdIntraCbgProfileSettings
XavcHdIntraCbgProfileSettings'
            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
"xavcClass")
      )

instance
  Prelude.Hashable
    XavcHdIntraCbgProfileSettings
  where
  hashWithSalt :: Int -> XavcHdIntraCbgProfileSettings -> Int
hashWithSalt Int
_salt XavcHdIntraCbgProfileSettings' {Maybe XavcHdIntraCbgProfileClass
xavcClass :: Maybe XavcHdIntraCbgProfileClass
$sel:xavcClass:XavcHdIntraCbgProfileSettings' :: XavcHdIntraCbgProfileSettings -> Maybe XavcHdIntraCbgProfileClass
..} =
    Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe XavcHdIntraCbgProfileClass
xavcClass

instance Prelude.NFData XavcHdIntraCbgProfileSettings where
  rnf :: XavcHdIntraCbgProfileSettings -> ()
rnf XavcHdIntraCbgProfileSettings' {Maybe XavcHdIntraCbgProfileClass
xavcClass :: Maybe XavcHdIntraCbgProfileClass
$sel:xavcClass:XavcHdIntraCbgProfileSettings' :: XavcHdIntraCbgProfileSettings -> Maybe XavcHdIntraCbgProfileClass
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe XavcHdIntraCbgProfileClass
xavcClass

instance Data.ToJSON XavcHdIntraCbgProfileSettings where
  toJSON :: XavcHdIntraCbgProfileSettings -> Value
toJSON XavcHdIntraCbgProfileSettings' {Maybe XavcHdIntraCbgProfileClass
xavcClass :: Maybe XavcHdIntraCbgProfileClass
$sel:xavcClass:XavcHdIntraCbgProfileSettings' :: XavcHdIntraCbgProfileSettings -> Maybe XavcHdIntraCbgProfileClass
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [(Key
"xavcClass" 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 XavcHdIntraCbgProfileClass
xavcClass]
      )