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