{-# 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.MultiplexSettingsSummary
-- 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.MultiplexSettingsSummary where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude

-- | Contains summary configuration for a Multiplex event.
--
-- /See:/ 'newMultiplexSettingsSummary' smart constructor.
data MultiplexSettingsSummary = MultiplexSettingsSummary'
  { -- | Transport stream bit rate.
    MultiplexSettingsSummary -> Maybe Natural
transportStreamBitrate :: Prelude.Maybe Prelude.Natural
  }
  deriving (MultiplexSettingsSummary -> MultiplexSettingsSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MultiplexSettingsSummary -> MultiplexSettingsSummary -> Bool
$c/= :: MultiplexSettingsSummary -> MultiplexSettingsSummary -> Bool
== :: MultiplexSettingsSummary -> MultiplexSettingsSummary -> Bool
$c== :: MultiplexSettingsSummary -> MultiplexSettingsSummary -> Bool
Prelude.Eq, ReadPrec [MultiplexSettingsSummary]
ReadPrec MultiplexSettingsSummary
Int -> ReadS MultiplexSettingsSummary
ReadS [MultiplexSettingsSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MultiplexSettingsSummary]
$creadListPrec :: ReadPrec [MultiplexSettingsSummary]
readPrec :: ReadPrec MultiplexSettingsSummary
$creadPrec :: ReadPrec MultiplexSettingsSummary
readList :: ReadS [MultiplexSettingsSummary]
$creadList :: ReadS [MultiplexSettingsSummary]
readsPrec :: Int -> ReadS MultiplexSettingsSummary
$creadsPrec :: Int -> ReadS MultiplexSettingsSummary
Prelude.Read, Int -> MultiplexSettingsSummary -> ShowS
[MultiplexSettingsSummary] -> ShowS
MultiplexSettingsSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MultiplexSettingsSummary] -> ShowS
$cshowList :: [MultiplexSettingsSummary] -> ShowS
show :: MultiplexSettingsSummary -> String
$cshow :: MultiplexSettingsSummary -> String
showsPrec :: Int -> MultiplexSettingsSummary -> ShowS
$cshowsPrec :: Int -> MultiplexSettingsSummary -> ShowS
Prelude.Show, forall x.
Rep MultiplexSettingsSummary x -> MultiplexSettingsSummary
forall x.
MultiplexSettingsSummary -> Rep MultiplexSettingsSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep MultiplexSettingsSummary x -> MultiplexSettingsSummary
$cfrom :: forall x.
MultiplexSettingsSummary -> Rep MultiplexSettingsSummary x
Prelude.Generic)

-- |
-- Create a value of 'MultiplexSettingsSummary' 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:
--
-- 'transportStreamBitrate', 'multiplexSettingsSummary_transportStreamBitrate' - Transport stream bit rate.
newMultiplexSettingsSummary ::
  MultiplexSettingsSummary
newMultiplexSettingsSummary :: MultiplexSettingsSummary
newMultiplexSettingsSummary =
  MultiplexSettingsSummary'
    { $sel:transportStreamBitrate:MultiplexSettingsSummary' :: Maybe Natural
transportStreamBitrate =
        forall a. Maybe a
Prelude.Nothing
    }

-- | Transport stream bit rate.
multiplexSettingsSummary_transportStreamBitrate :: Lens.Lens' MultiplexSettingsSummary (Prelude.Maybe Prelude.Natural)
multiplexSettingsSummary_transportStreamBitrate :: Lens' MultiplexSettingsSummary (Maybe Natural)
multiplexSettingsSummary_transportStreamBitrate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MultiplexSettingsSummary' {Maybe Natural
transportStreamBitrate :: Maybe Natural
$sel:transportStreamBitrate:MultiplexSettingsSummary' :: MultiplexSettingsSummary -> Maybe Natural
transportStreamBitrate} -> Maybe Natural
transportStreamBitrate) (\s :: MultiplexSettingsSummary
s@MultiplexSettingsSummary' {} Maybe Natural
a -> MultiplexSettingsSummary
s {$sel:transportStreamBitrate:MultiplexSettingsSummary' :: Maybe Natural
transportStreamBitrate = Maybe Natural
a} :: MultiplexSettingsSummary)

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

instance Prelude.Hashable MultiplexSettingsSummary where
  hashWithSalt :: Int -> MultiplexSettingsSummary -> Int
hashWithSalt Int
_salt MultiplexSettingsSummary' {Maybe Natural
transportStreamBitrate :: Maybe Natural
$sel:transportStreamBitrate:MultiplexSettingsSummary' :: MultiplexSettingsSummary -> Maybe Natural
..} =
    Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
transportStreamBitrate

instance Prelude.NFData MultiplexSettingsSummary where
  rnf :: MultiplexSettingsSummary -> ()
rnf MultiplexSettingsSummary' {Maybe Natural
transportStreamBitrate :: Maybe Natural
$sel:transportStreamBitrate:MultiplexSettingsSummary' :: MultiplexSettingsSummary -> Maybe Natural
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
transportStreamBitrate