{-# 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 #-}
module Amazonka.MediaLive.Types.FrameCaptureGroupSettings where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MediaLive.Types.FrameCaptureCdnSettings
import Amazonka.MediaLive.Types.OutputLocationRef
import qualified Amazonka.Prelude as Prelude
data FrameCaptureGroupSettings = FrameCaptureGroupSettings'
{
FrameCaptureGroupSettings -> Maybe FrameCaptureCdnSettings
frameCaptureCdnSettings :: Prelude.Maybe FrameCaptureCdnSettings,
FrameCaptureGroupSettings -> OutputLocationRef
destination :: OutputLocationRef
}
deriving (FrameCaptureGroupSettings -> FrameCaptureGroupSettings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FrameCaptureGroupSettings -> FrameCaptureGroupSettings -> Bool
$c/= :: FrameCaptureGroupSettings -> FrameCaptureGroupSettings -> Bool
== :: FrameCaptureGroupSettings -> FrameCaptureGroupSettings -> Bool
$c== :: FrameCaptureGroupSettings -> FrameCaptureGroupSettings -> Bool
Prelude.Eq, ReadPrec [FrameCaptureGroupSettings]
ReadPrec FrameCaptureGroupSettings
Int -> ReadS FrameCaptureGroupSettings
ReadS [FrameCaptureGroupSettings]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [FrameCaptureGroupSettings]
$creadListPrec :: ReadPrec [FrameCaptureGroupSettings]
readPrec :: ReadPrec FrameCaptureGroupSettings
$creadPrec :: ReadPrec FrameCaptureGroupSettings
readList :: ReadS [FrameCaptureGroupSettings]
$creadList :: ReadS [FrameCaptureGroupSettings]
readsPrec :: Int -> ReadS FrameCaptureGroupSettings
$creadsPrec :: Int -> ReadS FrameCaptureGroupSettings
Prelude.Read, Int -> FrameCaptureGroupSettings -> ShowS
[FrameCaptureGroupSettings] -> ShowS
FrameCaptureGroupSettings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FrameCaptureGroupSettings] -> ShowS
$cshowList :: [FrameCaptureGroupSettings] -> ShowS
show :: FrameCaptureGroupSettings -> String
$cshow :: FrameCaptureGroupSettings -> String
showsPrec :: Int -> FrameCaptureGroupSettings -> ShowS
$cshowsPrec :: Int -> FrameCaptureGroupSettings -> ShowS
Prelude.Show, forall x.
Rep FrameCaptureGroupSettings x -> FrameCaptureGroupSettings
forall x.
FrameCaptureGroupSettings -> Rep FrameCaptureGroupSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep FrameCaptureGroupSettings x -> FrameCaptureGroupSettings
$cfrom :: forall x.
FrameCaptureGroupSettings -> Rep FrameCaptureGroupSettings x
Prelude.Generic)
newFrameCaptureGroupSettings ::
OutputLocationRef ->
FrameCaptureGroupSettings
newFrameCaptureGroupSettings :: OutputLocationRef -> FrameCaptureGroupSettings
newFrameCaptureGroupSettings OutputLocationRef
pDestination_ =
FrameCaptureGroupSettings'
{ $sel:frameCaptureCdnSettings:FrameCaptureGroupSettings' :: Maybe FrameCaptureCdnSettings
frameCaptureCdnSettings =
forall a. Maybe a
Prelude.Nothing,
$sel:destination:FrameCaptureGroupSettings' :: OutputLocationRef
destination = OutputLocationRef
pDestination_
}
frameCaptureGroupSettings_frameCaptureCdnSettings :: Lens.Lens' FrameCaptureGroupSettings (Prelude.Maybe FrameCaptureCdnSettings)
frameCaptureGroupSettings_frameCaptureCdnSettings :: Lens' FrameCaptureGroupSettings (Maybe FrameCaptureCdnSettings)
frameCaptureGroupSettings_frameCaptureCdnSettings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FrameCaptureGroupSettings' {Maybe FrameCaptureCdnSettings
frameCaptureCdnSettings :: Maybe FrameCaptureCdnSettings
$sel:frameCaptureCdnSettings:FrameCaptureGroupSettings' :: FrameCaptureGroupSettings -> Maybe FrameCaptureCdnSettings
frameCaptureCdnSettings} -> Maybe FrameCaptureCdnSettings
frameCaptureCdnSettings) (\s :: FrameCaptureGroupSettings
s@FrameCaptureGroupSettings' {} Maybe FrameCaptureCdnSettings
a -> FrameCaptureGroupSettings
s {$sel:frameCaptureCdnSettings:FrameCaptureGroupSettings' :: Maybe FrameCaptureCdnSettings
frameCaptureCdnSettings = Maybe FrameCaptureCdnSettings
a} :: FrameCaptureGroupSettings)
frameCaptureGroupSettings_destination :: Lens.Lens' FrameCaptureGroupSettings OutputLocationRef
frameCaptureGroupSettings_destination :: Lens' FrameCaptureGroupSettings OutputLocationRef
frameCaptureGroupSettings_destination = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FrameCaptureGroupSettings' {OutputLocationRef
destination :: OutputLocationRef
$sel:destination:FrameCaptureGroupSettings' :: FrameCaptureGroupSettings -> OutputLocationRef
destination} -> OutputLocationRef
destination) (\s :: FrameCaptureGroupSettings
s@FrameCaptureGroupSettings' {} OutputLocationRef
a -> FrameCaptureGroupSettings
s {$sel:destination:FrameCaptureGroupSettings' :: OutputLocationRef
destination = OutputLocationRef
a} :: FrameCaptureGroupSettings)
instance Data.FromJSON FrameCaptureGroupSettings where
parseJSON :: Value -> Parser FrameCaptureGroupSettings
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"FrameCaptureGroupSettings"
( \Object
x ->
Maybe FrameCaptureCdnSettings
-> OutputLocationRef -> FrameCaptureGroupSettings
FrameCaptureGroupSettings'
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
"frameCaptureCdnSettings")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"destination")
)
instance Prelude.Hashable FrameCaptureGroupSettings where
hashWithSalt :: Int -> FrameCaptureGroupSettings -> Int
hashWithSalt Int
_salt FrameCaptureGroupSettings' {Maybe FrameCaptureCdnSettings
OutputLocationRef
destination :: OutputLocationRef
frameCaptureCdnSettings :: Maybe FrameCaptureCdnSettings
$sel:destination:FrameCaptureGroupSettings' :: FrameCaptureGroupSettings -> OutputLocationRef
$sel:frameCaptureCdnSettings:FrameCaptureGroupSettings' :: FrameCaptureGroupSettings -> Maybe FrameCaptureCdnSettings
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe FrameCaptureCdnSettings
frameCaptureCdnSettings
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` OutputLocationRef
destination
instance Prelude.NFData FrameCaptureGroupSettings where
rnf :: FrameCaptureGroupSettings -> ()
rnf FrameCaptureGroupSettings' {Maybe FrameCaptureCdnSettings
OutputLocationRef
destination :: OutputLocationRef
frameCaptureCdnSettings :: Maybe FrameCaptureCdnSettings
$sel:destination:FrameCaptureGroupSettings' :: FrameCaptureGroupSettings -> OutputLocationRef
$sel:frameCaptureCdnSettings:FrameCaptureGroupSettings' :: FrameCaptureGroupSettings -> Maybe FrameCaptureCdnSettings
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe FrameCaptureCdnSettings
frameCaptureCdnSettings
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf OutputLocationRef
destination
instance Data.ToJSON FrameCaptureGroupSettings where
toJSON :: FrameCaptureGroupSettings -> Value
toJSON FrameCaptureGroupSettings' {Maybe FrameCaptureCdnSettings
OutputLocationRef
destination :: OutputLocationRef
frameCaptureCdnSettings :: Maybe FrameCaptureCdnSettings
$sel:destination:FrameCaptureGroupSettings' :: FrameCaptureGroupSettings -> OutputLocationRef
$sel:frameCaptureCdnSettings:FrameCaptureGroupSettings' :: FrameCaptureGroupSettings -> Maybe FrameCaptureCdnSettings
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"frameCaptureCdnSettings" 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 FrameCaptureCdnSettings
frameCaptureCdnSettings,
forall a. a -> Maybe a
Prelude.Just (Key
"destination" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= OutputLocationRef
destination)
]
)