{-# 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.OutputGroupDetail
-- 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.OutputGroupDetail 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.OutputDetail
import qualified Amazonka.Prelude as Prelude

-- | Contains details about the output groups specified in the job settings.
--
-- /See:/ 'newOutputGroupDetail' smart constructor.
data OutputGroupDetail = OutputGroupDetail'
  { -- | Details about the output
    OutputGroupDetail -> Maybe [OutputDetail]
outputDetails :: Prelude.Maybe [OutputDetail]
  }
  deriving (OutputGroupDetail -> OutputGroupDetail -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OutputGroupDetail -> OutputGroupDetail -> Bool
$c/= :: OutputGroupDetail -> OutputGroupDetail -> Bool
== :: OutputGroupDetail -> OutputGroupDetail -> Bool
$c== :: OutputGroupDetail -> OutputGroupDetail -> Bool
Prelude.Eq, ReadPrec [OutputGroupDetail]
ReadPrec OutputGroupDetail
Int -> ReadS OutputGroupDetail
ReadS [OutputGroupDetail]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [OutputGroupDetail]
$creadListPrec :: ReadPrec [OutputGroupDetail]
readPrec :: ReadPrec OutputGroupDetail
$creadPrec :: ReadPrec OutputGroupDetail
readList :: ReadS [OutputGroupDetail]
$creadList :: ReadS [OutputGroupDetail]
readsPrec :: Int -> ReadS OutputGroupDetail
$creadsPrec :: Int -> ReadS OutputGroupDetail
Prelude.Read, Int -> OutputGroupDetail -> ShowS
[OutputGroupDetail] -> ShowS
OutputGroupDetail -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [OutputGroupDetail] -> ShowS
$cshowList :: [OutputGroupDetail] -> ShowS
show :: OutputGroupDetail -> String
$cshow :: OutputGroupDetail -> String
showsPrec :: Int -> OutputGroupDetail -> ShowS
$cshowsPrec :: Int -> OutputGroupDetail -> ShowS
Prelude.Show, forall x. Rep OutputGroupDetail x -> OutputGroupDetail
forall x. OutputGroupDetail -> Rep OutputGroupDetail x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep OutputGroupDetail x -> OutputGroupDetail
$cfrom :: forall x. OutputGroupDetail -> Rep OutputGroupDetail x
Prelude.Generic)

-- |
-- Create a value of 'OutputGroupDetail' 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:
--
-- 'outputDetails', 'outputGroupDetail_outputDetails' - Details about the output
newOutputGroupDetail ::
  OutputGroupDetail
newOutputGroupDetail :: OutputGroupDetail
newOutputGroupDetail =
  OutputGroupDetail' {$sel:outputDetails:OutputGroupDetail' :: Maybe [OutputDetail]
outputDetails = forall a. Maybe a
Prelude.Nothing}

-- | Details about the output
outputGroupDetail_outputDetails :: Lens.Lens' OutputGroupDetail (Prelude.Maybe [OutputDetail])
outputGroupDetail_outputDetails :: Lens' OutputGroupDetail (Maybe [OutputDetail])
outputGroupDetail_outputDetails = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OutputGroupDetail' {Maybe [OutputDetail]
outputDetails :: Maybe [OutputDetail]
$sel:outputDetails:OutputGroupDetail' :: OutputGroupDetail -> Maybe [OutputDetail]
outputDetails} -> Maybe [OutputDetail]
outputDetails) (\s :: OutputGroupDetail
s@OutputGroupDetail' {} Maybe [OutputDetail]
a -> OutputGroupDetail
s {$sel:outputDetails:OutputGroupDetail' :: Maybe [OutputDetail]
outputDetails = Maybe [OutputDetail]
a} :: OutputGroupDetail) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Data.FromJSON OutputGroupDetail where
  parseJSON :: Value -> Parser OutputGroupDetail
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"OutputGroupDetail"
      ( \Object
x ->
          Maybe [OutputDetail] -> OutputGroupDetail
OutputGroupDetail'
            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
"outputDetails" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
      )

instance Prelude.Hashable OutputGroupDetail where
  hashWithSalt :: Int -> OutputGroupDetail -> Int
hashWithSalt Int
_salt OutputGroupDetail' {Maybe [OutputDetail]
outputDetails :: Maybe [OutputDetail]
$sel:outputDetails:OutputGroupDetail' :: OutputGroupDetail -> Maybe [OutputDetail]
..} =
    Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [OutputDetail]
outputDetails

instance Prelude.NFData OutputGroupDetail where
  rnf :: OutputGroupDetail -> ()
rnf OutputGroupDetail' {Maybe [OutputDetail]
outputDetails :: Maybe [OutputDetail]
$sel:outputDetails:OutputGroupDetail' :: OutputGroupDetail -> Maybe [OutputDetail]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [OutputDetail]
outputDetails