{-# 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.Preset where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaConvert.Types.PresetSettings
import Amazonka.MediaConvert.Types.Type
import qualified Amazonka.Prelude as Prelude
data Preset = Preset'
{
Preset -> Maybe POSIX
lastUpdated :: Prelude.Maybe Core.POSIX,
Preset -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
Preset -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
Preset -> Maybe Text
category :: Prelude.Maybe Prelude.Text,
Preset -> Maybe Type
type' :: Prelude.Maybe Type,
Preset -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
Preset -> PresetSettings
settings :: PresetSettings,
Preset -> Text
name :: Prelude.Text
}
deriving (Preset -> Preset -> Bool
(Preset -> Preset -> Bool)
-> (Preset -> Preset -> Bool) -> Eq Preset
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Preset -> Preset -> Bool
$c/= :: Preset -> Preset -> Bool
== :: Preset -> Preset -> Bool
$c== :: Preset -> Preset -> Bool
Prelude.Eq, ReadPrec [Preset]
ReadPrec Preset
Int -> ReadS Preset
ReadS [Preset]
(Int -> ReadS Preset)
-> ReadS [Preset]
-> ReadPrec Preset
-> ReadPrec [Preset]
-> Read Preset
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Preset]
$creadListPrec :: ReadPrec [Preset]
readPrec :: ReadPrec Preset
$creadPrec :: ReadPrec Preset
readList :: ReadS [Preset]
$creadList :: ReadS [Preset]
readsPrec :: Int -> ReadS Preset
$creadsPrec :: Int -> ReadS Preset
Prelude.Read, Int -> Preset -> ShowS
[Preset] -> ShowS
Preset -> String
(Int -> Preset -> ShowS)
-> (Preset -> String) -> ([Preset] -> ShowS) -> Show Preset
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Preset] -> ShowS
$cshowList :: [Preset] -> ShowS
show :: Preset -> String
$cshow :: Preset -> String
showsPrec :: Int -> Preset -> ShowS
$cshowsPrec :: Int -> Preset -> ShowS
Prelude.Show, (forall x. Preset -> Rep Preset x)
-> (forall x. Rep Preset x -> Preset) -> Generic Preset
forall x. Rep Preset x -> Preset
forall x. Preset -> Rep Preset x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Preset x -> Preset
$cfrom :: forall x. Preset -> Rep Preset x
Prelude.Generic)
newPreset ::
PresetSettings ->
Prelude.Text ->
Preset
newPreset :: PresetSettings -> Text -> Preset
newPreset PresetSettings
pSettings_ Text
pName_ =
Preset' :: Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Type
-> Maybe Text
-> PresetSettings
-> Text
-> Preset
Preset'
{ $sel:lastUpdated:Preset' :: Maybe POSIX
lastUpdated = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:arn:Preset' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:createdAt:Preset' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:category:Preset' :: Maybe Text
category = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:type':Preset' :: Maybe Type
type' = Maybe Type
forall a. Maybe a
Prelude.Nothing,
$sel:description:Preset' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:settings:Preset' :: PresetSettings
settings = PresetSettings
pSettings_,
$sel:name:Preset' :: Text
name = Text
pName_
}
preset_lastUpdated :: Lens.Lens' Preset (Prelude.Maybe Prelude.UTCTime)
preset_lastUpdated :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Preset -> f Preset
preset_lastUpdated = (Preset -> Maybe POSIX)
-> (Preset -> Maybe POSIX -> Preset)
-> Lens Preset Preset (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Preset' {Maybe POSIX
lastUpdated :: Maybe POSIX
$sel:lastUpdated:Preset' :: Preset -> Maybe POSIX
lastUpdated} -> Maybe POSIX
lastUpdated) (\s :: Preset
s@Preset' {} Maybe POSIX
a -> Preset
s {$sel:lastUpdated:Preset' :: Maybe POSIX
lastUpdated = Maybe POSIX
a} :: Preset) ((Maybe POSIX -> f (Maybe POSIX)) -> Preset -> f Preset)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Preset
-> f Preset
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
preset_arn :: Lens.Lens' Preset (Prelude.Maybe Prelude.Text)
preset_arn :: (Maybe Text -> f (Maybe Text)) -> Preset -> f Preset
preset_arn = (Preset -> Maybe Text)
-> (Preset -> Maybe Text -> Preset)
-> Lens Preset Preset (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Preset' {Maybe Text
arn :: Maybe Text
$sel:arn:Preset' :: Preset -> Maybe Text
arn} -> Maybe Text
arn) (\s :: Preset
s@Preset' {} Maybe Text
a -> Preset
s {$sel:arn:Preset' :: Maybe Text
arn = Maybe Text
a} :: Preset)
preset_createdAt :: Lens.Lens' Preset (Prelude.Maybe Prelude.UTCTime)
preset_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Preset -> f Preset
preset_createdAt = (Preset -> Maybe POSIX)
-> (Preset -> Maybe POSIX -> Preset)
-> Lens Preset Preset (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Preset' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:Preset' :: Preset -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: Preset
s@Preset' {} Maybe POSIX
a -> Preset
s {$sel:createdAt:Preset' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: Preset) ((Maybe POSIX -> f (Maybe POSIX)) -> Preset -> f Preset)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Preset
-> f Preset
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
preset_category :: Lens.Lens' Preset (Prelude.Maybe Prelude.Text)
preset_category :: (Maybe Text -> f (Maybe Text)) -> Preset -> f Preset
preset_category = (Preset -> Maybe Text)
-> (Preset -> Maybe Text -> Preset)
-> Lens Preset Preset (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Preset' {Maybe Text
category :: Maybe Text
$sel:category:Preset' :: Preset -> Maybe Text
category} -> Maybe Text
category) (\s :: Preset
s@Preset' {} Maybe Text
a -> Preset
s {$sel:category:Preset' :: Maybe Text
category = Maybe Text
a} :: Preset)
preset_type :: Lens.Lens' Preset (Prelude.Maybe Type)
preset_type :: (Maybe Type -> f (Maybe Type)) -> Preset -> f Preset
preset_type = (Preset -> Maybe Type)
-> (Preset -> Maybe Type -> Preset)
-> Lens Preset Preset (Maybe Type) (Maybe Type)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Preset' {Maybe Type
type' :: Maybe Type
$sel:type':Preset' :: Preset -> Maybe Type
type'} -> Maybe Type
type') (\s :: Preset
s@Preset' {} Maybe Type
a -> Preset
s {$sel:type':Preset' :: Maybe Type
type' = Maybe Type
a} :: Preset)
preset_description :: Lens.Lens' Preset (Prelude.Maybe Prelude.Text)
preset_description :: (Maybe Text -> f (Maybe Text)) -> Preset -> f Preset
preset_description = (Preset -> Maybe Text)
-> (Preset -> Maybe Text -> Preset)
-> Lens Preset Preset (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Preset' {Maybe Text
description :: Maybe Text
$sel:description:Preset' :: Preset -> Maybe Text
description} -> Maybe Text
description) (\s :: Preset
s@Preset' {} Maybe Text
a -> Preset
s {$sel:description:Preset' :: Maybe Text
description = Maybe Text
a} :: Preset)
preset_settings :: Lens.Lens' Preset PresetSettings
preset_settings :: (PresetSettings -> f PresetSettings) -> Preset -> f Preset
preset_settings = (Preset -> PresetSettings)
-> (Preset -> PresetSettings -> Preset)
-> Lens Preset Preset PresetSettings PresetSettings
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Preset' {PresetSettings
settings :: PresetSettings
$sel:settings:Preset' :: Preset -> PresetSettings
settings} -> PresetSettings
settings) (\s :: Preset
s@Preset' {} PresetSettings
a -> Preset
s {$sel:settings:Preset' :: PresetSettings
settings = PresetSettings
a} :: Preset)
preset_name :: Lens.Lens' Preset Prelude.Text
preset_name :: (Text -> f Text) -> Preset -> f Preset
preset_name = (Preset -> Text)
-> (Preset -> Text -> Preset) -> Lens Preset Preset Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Preset' {Text
name :: Text
$sel:name:Preset' :: Preset -> Text
name} -> Text
name) (\s :: Preset
s@Preset' {} Text
a -> Preset
s {$sel:name:Preset' :: Text
name = Text
a} :: Preset)
instance Core.FromJSON Preset where
parseJSON :: Value -> Parser Preset
parseJSON =
String -> (Object -> Parser Preset) -> Value -> Parser Preset
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"Preset"
( \Object
x ->
Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Type
-> Maybe Text
-> PresetSettings
-> Text
-> Preset
Preset'
(Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Type
-> Maybe Text
-> PresetSettings
-> Text
-> Preset)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Type
-> Maybe Text
-> PresetSettings
-> Text
-> Preset)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"lastUpdated")
Parser
(Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Type
-> Maybe Text
-> PresetSettings
-> Text
-> Preset)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX
-> Maybe Text
-> Maybe Type
-> Maybe Text
-> PresetSettings
-> Text
-> Preset)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"arn")
Parser
(Maybe POSIX
-> Maybe Text
-> Maybe Type
-> Maybe Text
-> PresetSettings
-> Text
-> Preset)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text
-> Maybe Type -> Maybe Text -> PresetSettings -> Text -> Preset)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"createdAt")
Parser
(Maybe Text
-> Maybe Type -> Maybe Text -> PresetSettings -> Text -> Preset)
-> Parser (Maybe Text)
-> Parser
(Maybe Type -> Maybe Text -> PresetSettings -> Text -> Preset)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"category")
Parser
(Maybe Type -> Maybe Text -> PresetSettings -> Text -> Preset)
-> Parser (Maybe Type)
-> Parser (Maybe Text -> PresetSettings -> Text -> Preset)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Type)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"type")
Parser (Maybe Text -> PresetSettings -> Text -> Preset)
-> Parser (Maybe Text) -> Parser (PresetSettings -> Text -> Preset)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"description")
Parser (PresetSettings -> Text -> Preset)
-> Parser PresetSettings -> Parser (Text -> Preset)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser PresetSettings
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"settings")
Parser (Text -> Preset) -> Parser Text -> Parser Preset
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"name")
)
instance Prelude.Hashable Preset
instance Prelude.NFData Preset