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