{-# 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.MinBottomRenditionSize 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 MinBottomRenditionSize = MinBottomRenditionSize'
{
MinBottomRenditionSize -> Maybe Natural
height :: Prelude.Maybe Prelude.Natural,
MinBottomRenditionSize -> Maybe Natural
width :: Prelude.Maybe Prelude.Natural
}
deriving (MinBottomRenditionSize -> MinBottomRenditionSize -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MinBottomRenditionSize -> MinBottomRenditionSize -> Bool
$c/= :: MinBottomRenditionSize -> MinBottomRenditionSize -> Bool
== :: MinBottomRenditionSize -> MinBottomRenditionSize -> Bool
$c== :: MinBottomRenditionSize -> MinBottomRenditionSize -> Bool
Prelude.Eq, ReadPrec [MinBottomRenditionSize]
ReadPrec MinBottomRenditionSize
Int -> ReadS MinBottomRenditionSize
ReadS [MinBottomRenditionSize]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MinBottomRenditionSize]
$creadListPrec :: ReadPrec [MinBottomRenditionSize]
readPrec :: ReadPrec MinBottomRenditionSize
$creadPrec :: ReadPrec MinBottomRenditionSize
readList :: ReadS [MinBottomRenditionSize]
$creadList :: ReadS [MinBottomRenditionSize]
readsPrec :: Int -> ReadS MinBottomRenditionSize
$creadsPrec :: Int -> ReadS MinBottomRenditionSize
Prelude.Read, Int -> MinBottomRenditionSize -> ShowS
[MinBottomRenditionSize] -> ShowS
MinBottomRenditionSize -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MinBottomRenditionSize] -> ShowS
$cshowList :: [MinBottomRenditionSize] -> ShowS
show :: MinBottomRenditionSize -> String
$cshow :: MinBottomRenditionSize -> String
showsPrec :: Int -> MinBottomRenditionSize -> ShowS
$cshowsPrec :: Int -> MinBottomRenditionSize -> ShowS
Prelude.Show, forall x. Rep MinBottomRenditionSize x -> MinBottomRenditionSize
forall x. MinBottomRenditionSize -> Rep MinBottomRenditionSize x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep MinBottomRenditionSize x -> MinBottomRenditionSize
$cfrom :: forall x. MinBottomRenditionSize -> Rep MinBottomRenditionSize x
Prelude.Generic)
newMinBottomRenditionSize ::
MinBottomRenditionSize
newMinBottomRenditionSize :: MinBottomRenditionSize
newMinBottomRenditionSize =
MinBottomRenditionSize'
{ $sel:height:MinBottomRenditionSize' :: Maybe Natural
height = forall a. Maybe a
Prelude.Nothing,
$sel:width:MinBottomRenditionSize' :: Maybe Natural
width = forall a. Maybe a
Prelude.Nothing
}
minBottomRenditionSize_height :: Lens.Lens' MinBottomRenditionSize (Prelude.Maybe Prelude.Natural)
minBottomRenditionSize_height :: Lens' MinBottomRenditionSize (Maybe Natural)
minBottomRenditionSize_height = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MinBottomRenditionSize' {Maybe Natural
height :: Maybe Natural
$sel:height:MinBottomRenditionSize' :: MinBottomRenditionSize -> Maybe Natural
height} -> Maybe Natural
height) (\s :: MinBottomRenditionSize
s@MinBottomRenditionSize' {} Maybe Natural
a -> MinBottomRenditionSize
s {$sel:height:MinBottomRenditionSize' :: Maybe Natural
height = Maybe Natural
a} :: MinBottomRenditionSize)
minBottomRenditionSize_width :: Lens.Lens' MinBottomRenditionSize (Prelude.Maybe Prelude.Natural)
minBottomRenditionSize_width :: Lens' MinBottomRenditionSize (Maybe Natural)
minBottomRenditionSize_width = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MinBottomRenditionSize' {Maybe Natural
width :: Maybe Natural
$sel:width:MinBottomRenditionSize' :: MinBottomRenditionSize -> Maybe Natural
width} -> Maybe Natural
width) (\s :: MinBottomRenditionSize
s@MinBottomRenditionSize' {} Maybe Natural
a -> MinBottomRenditionSize
s {$sel:width:MinBottomRenditionSize' :: Maybe Natural
width = Maybe Natural
a} :: MinBottomRenditionSize)
instance Data.FromJSON MinBottomRenditionSize where
parseJSON :: Value -> Parser MinBottomRenditionSize
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"MinBottomRenditionSize"
( \Object
x ->
Maybe Natural -> Maybe Natural -> MinBottomRenditionSize
MinBottomRenditionSize'
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 MinBottomRenditionSize where
hashWithSalt :: Int -> MinBottomRenditionSize -> Int
hashWithSalt Int
_salt MinBottomRenditionSize' {Maybe Natural
width :: Maybe Natural
height :: Maybe Natural
$sel:width:MinBottomRenditionSize' :: MinBottomRenditionSize -> Maybe Natural
$sel:height:MinBottomRenditionSize' :: MinBottomRenditionSize -> 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 MinBottomRenditionSize where
rnf :: MinBottomRenditionSize -> ()
rnf MinBottomRenditionSize' {Maybe Natural
width :: Maybe Natural
height :: Maybe Natural
$sel:width:MinBottomRenditionSize' :: MinBottomRenditionSize -> Maybe Natural
$sel:height:MinBottomRenditionSize' :: MinBottomRenditionSize -> 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 MinBottomRenditionSize where
toJSON :: MinBottomRenditionSize -> Value
toJSON MinBottomRenditionSize' {Maybe Natural
width :: Maybe Natural
height :: Maybe Natural
$sel:width:MinBottomRenditionSize' :: MinBottomRenditionSize -> Maybe Natural
$sel:height:MinBottomRenditionSize' :: MinBottomRenditionSize -> 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
]
)