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

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
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
(MultiplexSettingsSummary -> MultiplexSettingsSummary -> Bool)
-> (MultiplexSettingsSummary -> MultiplexSettingsSummary -> Bool)
-> Eq MultiplexSettingsSummary
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]
(Int -> ReadS MultiplexSettingsSummary)
-> ReadS [MultiplexSettingsSummary]
-> ReadPrec MultiplexSettingsSummary
-> ReadPrec [MultiplexSettingsSummary]
-> Read 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
(Int -> MultiplexSettingsSummary -> ShowS)
-> (MultiplexSettingsSummary -> String)
-> ([MultiplexSettingsSummary] -> ShowS)
-> Show MultiplexSettingsSummary
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.
 MultiplexSettingsSummary -> Rep MultiplexSettingsSummary x)
-> (forall x.
    Rep MultiplexSettingsSummary x -> MultiplexSettingsSummary)
-> Generic MultiplexSettingsSummary
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' :: Maybe Natural -> MultiplexSettingsSummary
MultiplexSettingsSummary'
    { $sel:transportStreamBitrate:MultiplexSettingsSummary' :: Maybe Natural
transportStreamBitrate =
        Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | Transport stream bit rate.
multiplexSettingsSummary_transportStreamBitrate :: Lens.Lens' MultiplexSettingsSummary (Prelude.Maybe Prelude.Natural)
multiplexSettingsSummary_transportStreamBitrate :: (Maybe Natural -> f (Maybe Natural))
-> MultiplexSettingsSummary -> f MultiplexSettingsSummary
multiplexSettingsSummary_transportStreamBitrate = (MultiplexSettingsSummary -> Maybe Natural)
-> (MultiplexSettingsSummary
    -> Maybe Natural -> MultiplexSettingsSummary)
-> Lens
     MultiplexSettingsSummary
     MultiplexSettingsSummary
     (Maybe Natural)
     (Maybe Natural)
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 Core.FromJSON MultiplexSettingsSummary where
  parseJSON :: Value -> Parser MultiplexSettingsSummary
parseJSON =
    String
-> (Object -> Parser MultiplexSettingsSummary)
-> Value
-> Parser MultiplexSettingsSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"MultiplexSettingsSummary"
      ( \Object
x ->
          Maybe Natural -> MultiplexSettingsSummary
MultiplexSettingsSummary'
            (Maybe Natural -> MultiplexSettingsSummary)
-> Parser (Maybe Natural) -> Parser MultiplexSettingsSummary
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"transportStreamBitrate")
      )

instance Prelude.Hashable MultiplexSettingsSummary

instance Prelude.NFData MultiplexSettingsSummary