{-# 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.Rekognition.Types.VideoMetadata 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
import Amazonka.Rekognition.Types.VideoColorRange
data VideoMetadata = VideoMetadata'
{
VideoMetadata -> Maybe Text
codec :: Prelude.Maybe Prelude.Text,
VideoMetadata -> Maybe VideoColorRange
colorRange :: Prelude.Maybe VideoColorRange,
VideoMetadata -> Maybe Natural
durationMillis :: Prelude.Maybe Prelude.Natural,
VideoMetadata -> Maybe Text
format :: Prelude.Maybe Prelude.Text,
VideoMetadata -> Maybe Natural
frameHeight :: Prelude.Maybe Prelude.Natural,
VideoMetadata -> Maybe Double
frameRate :: Prelude.Maybe Prelude.Double,
VideoMetadata -> Maybe Natural
frameWidth :: Prelude.Maybe Prelude.Natural
}
deriving (VideoMetadata -> VideoMetadata -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VideoMetadata -> VideoMetadata -> Bool
$c/= :: VideoMetadata -> VideoMetadata -> Bool
== :: VideoMetadata -> VideoMetadata -> Bool
$c== :: VideoMetadata -> VideoMetadata -> Bool
Prelude.Eq, ReadPrec [VideoMetadata]
ReadPrec VideoMetadata
Int -> ReadS VideoMetadata
ReadS [VideoMetadata]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [VideoMetadata]
$creadListPrec :: ReadPrec [VideoMetadata]
readPrec :: ReadPrec VideoMetadata
$creadPrec :: ReadPrec VideoMetadata
readList :: ReadS [VideoMetadata]
$creadList :: ReadS [VideoMetadata]
readsPrec :: Int -> ReadS VideoMetadata
$creadsPrec :: Int -> ReadS VideoMetadata
Prelude.Read, Int -> VideoMetadata -> ShowS
[VideoMetadata] -> ShowS
VideoMetadata -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VideoMetadata] -> ShowS
$cshowList :: [VideoMetadata] -> ShowS
show :: VideoMetadata -> String
$cshow :: VideoMetadata -> String
showsPrec :: Int -> VideoMetadata -> ShowS
$cshowsPrec :: Int -> VideoMetadata -> ShowS
Prelude.Show, forall x. Rep VideoMetadata x -> VideoMetadata
forall x. VideoMetadata -> Rep VideoMetadata x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep VideoMetadata x -> VideoMetadata
$cfrom :: forall x. VideoMetadata -> Rep VideoMetadata x
Prelude.Generic)
newVideoMetadata ::
VideoMetadata
newVideoMetadata :: VideoMetadata
newVideoMetadata =
VideoMetadata'
{ $sel:codec:VideoMetadata' :: Maybe Text
codec = forall a. Maybe a
Prelude.Nothing,
$sel:colorRange:VideoMetadata' :: Maybe VideoColorRange
colorRange = forall a. Maybe a
Prelude.Nothing,
$sel:durationMillis:VideoMetadata' :: Maybe Natural
durationMillis = forall a. Maybe a
Prelude.Nothing,
$sel:format:VideoMetadata' :: Maybe Text
format = forall a. Maybe a
Prelude.Nothing,
$sel:frameHeight:VideoMetadata' :: Maybe Natural
frameHeight = forall a. Maybe a
Prelude.Nothing,
$sel:frameRate:VideoMetadata' :: Maybe Double
frameRate = forall a. Maybe a
Prelude.Nothing,
$sel:frameWidth:VideoMetadata' :: Maybe Natural
frameWidth = forall a. Maybe a
Prelude.Nothing
}
videoMetadata_codec :: Lens.Lens' VideoMetadata (Prelude.Maybe Prelude.Text)
videoMetadata_codec :: Lens' VideoMetadata (Maybe Text)
videoMetadata_codec = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoMetadata' {Maybe Text
codec :: Maybe Text
$sel:codec:VideoMetadata' :: VideoMetadata -> Maybe Text
codec} -> Maybe Text
codec) (\s :: VideoMetadata
s@VideoMetadata' {} Maybe Text
a -> VideoMetadata
s {$sel:codec:VideoMetadata' :: Maybe Text
codec = Maybe Text
a} :: VideoMetadata)
videoMetadata_colorRange :: Lens.Lens' VideoMetadata (Prelude.Maybe VideoColorRange)
videoMetadata_colorRange :: Lens' VideoMetadata (Maybe VideoColorRange)
videoMetadata_colorRange = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoMetadata' {Maybe VideoColorRange
colorRange :: Maybe VideoColorRange
$sel:colorRange:VideoMetadata' :: VideoMetadata -> Maybe VideoColorRange
colorRange} -> Maybe VideoColorRange
colorRange) (\s :: VideoMetadata
s@VideoMetadata' {} Maybe VideoColorRange
a -> VideoMetadata
s {$sel:colorRange:VideoMetadata' :: Maybe VideoColorRange
colorRange = Maybe VideoColorRange
a} :: VideoMetadata)
videoMetadata_durationMillis :: Lens.Lens' VideoMetadata (Prelude.Maybe Prelude.Natural)
videoMetadata_durationMillis :: Lens' VideoMetadata (Maybe Natural)
videoMetadata_durationMillis = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoMetadata' {Maybe Natural
durationMillis :: Maybe Natural
$sel:durationMillis:VideoMetadata' :: VideoMetadata -> Maybe Natural
durationMillis} -> Maybe Natural
durationMillis) (\s :: VideoMetadata
s@VideoMetadata' {} Maybe Natural
a -> VideoMetadata
s {$sel:durationMillis:VideoMetadata' :: Maybe Natural
durationMillis = Maybe Natural
a} :: VideoMetadata)
videoMetadata_format :: Lens.Lens' VideoMetadata (Prelude.Maybe Prelude.Text)
videoMetadata_format :: Lens' VideoMetadata (Maybe Text)
videoMetadata_format = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoMetadata' {Maybe Text
format :: Maybe Text
$sel:format:VideoMetadata' :: VideoMetadata -> Maybe Text
format} -> Maybe Text
format) (\s :: VideoMetadata
s@VideoMetadata' {} Maybe Text
a -> VideoMetadata
s {$sel:format:VideoMetadata' :: Maybe Text
format = Maybe Text
a} :: VideoMetadata)
videoMetadata_frameHeight :: Lens.Lens' VideoMetadata (Prelude.Maybe Prelude.Natural)
videoMetadata_frameHeight :: Lens' VideoMetadata (Maybe Natural)
videoMetadata_frameHeight = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoMetadata' {Maybe Natural
frameHeight :: Maybe Natural
$sel:frameHeight:VideoMetadata' :: VideoMetadata -> Maybe Natural
frameHeight} -> Maybe Natural
frameHeight) (\s :: VideoMetadata
s@VideoMetadata' {} Maybe Natural
a -> VideoMetadata
s {$sel:frameHeight:VideoMetadata' :: Maybe Natural
frameHeight = Maybe Natural
a} :: VideoMetadata)
videoMetadata_frameRate :: Lens.Lens' VideoMetadata (Prelude.Maybe Prelude.Double)
videoMetadata_frameRate :: Lens' VideoMetadata (Maybe Double)
videoMetadata_frameRate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoMetadata' {Maybe Double
frameRate :: Maybe Double
$sel:frameRate:VideoMetadata' :: VideoMetadata -> Maybe Double
frameRate} -> Maybe Double
frameRate) (\s :: VideoMetadata
s@VideoMetadata' {} Maybe Double
a -> VideoMetadata
s {$sel:frameRate:VideoMetadata' :: Maybe Double
frameRate = Maybe Double
a} :: VideoMetadata)
videoMetadata_frameWidth :: Lens.Lens' VideoMetadata (Prelude.Maybe Prelude.Natural)
videoMetadata_frameWidth :: Lens' VideoMetadata (Maybe Natural)
videoMetadata_frameWidth = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoMetadata' {Maybe Natural
frameWidth :: Maybe Natural
$sel:frameWidth:VideoMetadata' :: VideoMetadata -> Maybe Natural
frameWidth} -> Maybe Natural
frameWidth) (\s :: VideoMetadata
s@VideoMetadata' {} Maybe Natural
a -> VideoMetadata
s {$sel:frameWidth:VideoMetadata' :: Maybe Natural
frameWidth = Maybe Natural
a} :: VideoMetadata)
instance Data.FromJSON VideoMetadata where
parseJSON :: Value -> Parser VideoMetadata
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"VideoMetadata"
( \Object
x ->
Maybe Text
-> Maybe VideoColorRange
-> Maybe Natural
-> Maybe Text
-> Maybe Natural
-> Maybe Double
-> Maybe Natural
-> VideoMetadata
VideoMetadata'
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
"Codec")
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
"ColorRange")
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
"DurationMillis")
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
"Format")
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
"FrameHeight")
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
"FrameRate")
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
"FrameWidth")
)
instance Prelude.Hashable VideoMetadata where
hashWithSalt :: Int -> VideoMetadata -> Int
hashWithSalt Int
_salt VideoMetadata' {Maybe Double
Maybe Natural
Maybe Text
Maybe VideoColorRange
frameWidth :: Maybe Natural
frameRate :: Maybe Double
frameHeight :: Maybe Natural
format :: Maybe Text
durationMillis :: Maybe Natural
colorRange :: Maybe VideoColorRange
codec :: Maybe Text
$sel:frameWidth:VideoMetadata' :: VideoMetadata -> Maybe Natural
$sel:frameRate:VideoMetadata' :: VideoMetadata -> Maybe Double
$sel:frameHeight:VideoMetadata' :: VideoMetadata -> Maybe Natural
$sel:format:VideoMetadata' :: VideoMetadata -> Maybe Text
$sel:durationMillis:VideoMetadata' :: VideoMetadata -> Maybe Natural
$sel:colorRange:VideoMetadata' :: VideoMetadata -> Maybe VideoColorRange
$sel:codec:VideoMetadata' :: VideoMetadata -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
codec
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe VideoColorRange
colorRange
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
durationMillis
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
format
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
frameHeight
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Double
frameRate
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
frameWidth
instance Prelude.NFData VideoMetadata where
rnf :: VideoMetadata -> ()
rnf VideoMetadata' {Maybe Double
Maybe Natural
Maybe Text
Maybe VideoColorRange
frameWidth :: Maybe Natural
frameRate :: Maybe Double
frameHeight :: Maybe Natural
format :: Maybe Text
durationMillis :: Maybe Natural
colorRange :: Maybe VideoColorRange
codec :: Maybe Text
$sel:frameWidth:VideoMetadata' :: VideoMetadata -> Maybe Natural
$sel:frameRate:VideoMetadata' :: VideoMetadata -> Maybe Double
$sel:frameHeight:VideoMetadata' :: VideoMetadata -> Maybe Natural
$sel:format:VideoMetadata' :: VideoMetadata -> Maybe Text
$sel:durationMillis:VideoMetadata' :: VideoMetadata -> Maybe Natural
$sel:colorRange:VideoMetadata' :: VideoMetadata -> Maybe VideoColorRange
$sel:codec:VideoMetadata' :: VideoMetadata -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
codec
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe VideoColorRange
colorRange
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
durationMillis
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
format
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
frameHeight
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Double
frameRate
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
frameWidth