{-# 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.MediaConvert.Types.FileGroupSettings 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.DestinationSettings
import qualified Amazonka.Prelude as Prelude
data FileGroupSettings = FileGroupSettings'
{
FileGroupSettings -> Maybe Text
destination :: Prelude.Maybe Prelude.Text,
FileGroupSettings -> Maybe DestinationSettings
destinationSettings :: Prelude.Maybe DestinationSettings
}
deriving (FileGroupSettings -> FileGroupSettings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FileGroupSettings -> FileGroupSettings -> Bool
$c/= :: FileGroupSettings -> FileGroupSettings -> Bool
== :: FileGroupSettings -> FileGroupSettings -> Bool
$c== :: FileGroupSettings -> FileGroupSettings -> Bool
Prelude.Eq, ReadPrec [FileGroupSettings]
ReadPrec FileGroupSettings
Int -> ReadS FileGroupSettings
ReadS [FileGroupSettings]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [FileGroupSettings]
$creadListPrec :: ReadPrec [FileGroupSettings]
readPrec :: ReadPrec FileGroupSettings
$creadPrec :: ReadPrec FileGroupSettings
readList :: ReadS [FileGroupSettings]
$creadList :: ReadS [FileGroupSettings]
readsPrec :: Int -> ReadS FileGroupSettings
$creadsPrec :: Int -> ReadS FileGroupSettings
Prelude.Read, Int -> FileGroupSettings -> ShowS
[FileGroupSettings] -> ShowS
FileGroupSettings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FileGroupSettings] -> ShowS
$cshowList :: [FileGroupSettings] -> ShowS
show :: FileGroupSettings -> String
$cshow :: FileGroupSettings -> String
showsPrec :: Int -> FileGroupSettings -> ShowS
$cshowsPrec :: Int -> FileGroupSettings -> ShowS
Prelude.Show, forall x. Rep FileGroupSettings x -> FileGroupSettings
forall x. FileGroupSettings -> Rep FileGroupSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep FileGroupSettings x -> FileGroupSettings
$cfrom :: forall x. FileGroupSettings -> Rep FileGroupSettings x
Prelude.Generic)
newFileGroupSettings ::
FileGroupSettings
newFileGroupSettings :: FileGroupSettings
newFileGroupSettings =
FileGroupSettings'
{ $sel:destination:FileGroupSettings' :: Maybe Text
destination = forall a. Maybe a
Prelude.Nothing,
$sel:destinationSettings:FileGroupSettings' :: Maybe DestinationSettings
destinationSettings = forall a. Maybe a
Prelude.Nothing
}
fileGroupSettings_destination :: Lens.Lens' FileGroupSettings (Prelude.Maybe Prelude.Text)
fileGroupSettings_destination :: Lens' FileGroupSettings (Maybe Text)
fileGroupSettings_destination = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FileGroupSettings' {Maybe Text
destination :: Maybe Text
$sel:destination:FileGroupSettings' :: FileGroupSettings -> Maybe Text
destination} -> Maybe Text
destination) (\s :: FileGroupSettings
s@FileGroupSettings' {} Maybe Text
a -> FileGroupSettings
s {$sel:destination:FileGroupSettings' :: Maybe Text
destination = Maybe Text
a} :: FileGroupSettings)
fileGroupSettings_destinationSettings :: Lens.Lens' FileGroupSettings (Prelude.Maybe DestinationSettings)
fileGroupSettings_destinationSettings :: Lens' FileGroupSettings (Maybe DestinationSettings)
fileGroupSettings_destinationSettings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FileGroupSettings' {Maybe DestinationSettings
destinationSettings :: Maybe DestinationSettings
$sel:destinationSettings:FileGroupSettings' :: FileGroupSettings -> Maybe DestinationSettings
destinationSettings} -> Maybe DestinationSettings
destinationSettings) (\s :: FileGroupSettings
s@FileGroupSettings' {} Maybe DestinationSettings
a -> FileGroupSettings
s {$sel:destinationSettings:FileGroupSettings' :: Maybe DestinationSettings
destinationSettings = Maybe DestinationSettings
a} :: FileGroupSettings)
instance Data.FromJSON FileGroupSettings where
parseJSON :: Value -> Parser FileGroupSettings
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"FileGroupSettings"
( \Object
x ->
Maybe Text -> Maybe DestinationSettings -> FileGroupSettings
FileGroupSettings'
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
"destination")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"destinationSettings")
)
instance Prelude.Hashable FileGroupSettings where
hashWithSalt :: Int -> FileGroupSettings -> Int
hashWithSalt Int
_salt FileGroupSettings' {Maybe Text
Maybe DestinationSettings
destinationSettings :: Maybe DestinationSettings
destination :: Maybe Text
$sel:destinationSettings:FileGroupSettings' :: FileGroupSettings -> Maybe DestinationSettings
$sel:destination:FileGroupSettings' :: FileGroupSettings -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
destination
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DestinationSettings
destinationSettings
instance Prelude.NFData FileGroupSettings where
rnf :: FileGroupSettings -> ()
rnf FileGroupSettings' {Maybe Text
Maybe DestinationSettings
destinationSettings :: Maybe DestinationSettings
destination :: Maybe Text
$sel:destinationSettings:FileGroupSettings' :: FileGroupSettings -> Maybe DestinationSettings
$sel:destination:FileGroupSettings' :: FileGroupSettings -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
destination
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe DestinationSettings
destinationSettings
instance Data.ToJSON FileGroupSettings where
toJSON :: FileGroupSettings -> Value
toJSON FileGroupSettings' {Maybe Text
Maybe DestinationSettings
destinationSettings :: Maybe DestinationSettings
destination :: Maybe Text
$sel:destinationSettings:FileGroupSettings' :: FileGroupSettings -> Maybe DestinationSettings
$sel:destination:FileGroupSettings' :: FileGroupSettings -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"destination" 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 Text
destination,
(Key
"destinationSettings" 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 DestinationSettings
destinationSettings
]
)