{-# 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.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Rekognition.Types.VideoColorRange
data VideoMetadata = VideoMetadata'
{
VideoMetadata -> Maybe Double
frameRate :: Prelude.Maybe Prelude.Double,
VideoMetadata -> Maybe VideoColorRange
colorRange :: Prelude.Maybe VideoColorRange,
VideoMetadata -> Maybe Text
format :: Prelude.Maybe Prelude.Text,
VideoMetadata -> Maybe Text
codec :: Prelude.Maybe Prelude.Text,
VideoMetadata -> Maybe Natural
frameHeight :: Prelude.Maybe Prelude.Natural,
VideoMetadata -> Maybe Natural
durationMillis :: Prelude.Maybe Prelude.Natural,
VideoMetadata -> Maybe Natural
frameWidth :: Prelude.Maybe Prelude.Natural
}
deriving (VideoMetadata -> VideoMetadata -> Bool
(VideoMetadata -> VideoMetadata -> Bool)
-> (VideoMetadata -> VideoMetadata -> Bool) -> Eq VideoMetadata
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]
(Int -> ReadS VideoMetadata)
-> ReadS [VideoMetadata]
-> ReadPrec VideoMetadata
-> ReadPrec [VideoMetadata]
-> Read 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
(Int -> VideoMetadata -> ShowS)
-> (VideoMetadata -> String)
-> ([VideoMetadata] -> ShowS)
-> Show VideoMetadata
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. VideoMetadata -> Rep VideoMetadata x)
-> (forall x. Rep VideoMetadata x -> VideoMetadata)
-> Generic VideoMetadata
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' :: Maybe Double
-> Maybe VideoColorRange
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> VideoMetadata
VideoMetadata'
{ $sel:frameRate:VideoMetadata' :: Maybe Double
frameRate = Maybe Double
forall a. Maybe a
Prelude.Nothing,
$sel:colorRange:VideoMetadata' :: Maybe VideoColorRange
colorRange = Maybe VideoColorRange
forall a. Maybe a
Prelude.Nothing,
$sel:format:VideoMetadata' :: Maybe Text
format = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:codec:VideoMetadata' :: Maybe Text
codec = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:frameHeight:VideoMetadata' :: Maybe Natural
frameHeight = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:durationMillis:VideoMetadata' :: Maybe Natural
durationMillis = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:frameWidth:VideoMetadata' :: Maybe Natural
frameWidth = Maybe Natural
forall a. Maybe a
Prelude.Nothing
}
videoMetadata_frameRate :: Lens.Lens' VideoMetadata (Prelude.Maybe Prelude.Double)
videoMetadata_frameRate :: (Maybe Double -> f (Maybe Double))
-> VideoMetadata -> f VideoMetadata
videoMetadata_frameRate = (VideoMetadata -> Maybe Double)
-> (VideoMetadata -> Maybe Double -> VideoMetadata)
-> Lens VideoMetadata VideoMetadata (Maybe Double) (Maybe Double)
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_colorRange :: Lens.Lens' VideoMetadata (Prelude.Maybe VideoColorRange)
videoMetadata_colorRange :: (Maybe VideoColorRange -> f (Maybe VideoColorRange))
-> VideoMetadata -> f VideoMetadata
videoMetadata_colorRange = (VideoMetadata -> Maybe VideoColorRange)
-> (VideoMetadata -> Maybe VideoColorRange -> VideoMetadata)
-> Lens
VideoMetadata
VideoMetadata
(Maybe VideoColorRange)
(Maybe VideoColorRange)
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_format :: Lens.Lens' VideoMetadata (Prelude.Maybe Prelude.Text)
videoMetadata_format :: (Maybe Text -> f (Maybe Text)) -> VideoMetadata -> f VideoMetadata
videoMetadata_format = (VideoMetadata -> Maybe Text)
-> (VideoMetadata -> Maybe Text -> VideoMetadata)
-> Lens VideoMetadata VideoMetadata (Maybe Text) (Maybe Text)
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_codec :: Lens.Lens' VideoMetadata (Prelude.Maybe Prelude.Text)
videoMetadata_codec :: (Maybe Text -> f (Maybe Text)) -> VideoMetadata -> f VideoMetadata
videoMetadata_codec = (VideoMetadata -> Maybe Text)
-> (VideoMetadata -> Maybe Text -> VideoMetadata)
-> Lens VideoMetadata VideoMetadata (Maybe Text) (Maybe Text)
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_frameHeight :: Lens.Lens' VideoMetadata (Prelude.Maybe Prelude.Natural)
videoMetadata_frameHeight :: (Maybe Natural -> f (Maybe Natural))
-> VideoMetadata -> f VideoMetadata
videoMetadata_frameHeight = (VideoMetadata -> Maybe Natural)
-> (VideoMetadata -> Maybe Natural -> VideoMetadata)
-> Lens VideoMetadata VideoMetadata (Maybe Natural) (Maybe Natural)
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_durationMillis :: Lens.Lens' VideoMetadata (Prelude.Maybe Prelude.Natural)
videoMetadata_durationMillis :: (Maybe Natural -> f (Maybe Natural))
-> VideoMetadata -> f VideoMetadata
videoMetadata_durationMillis = (VideoMetadata -> Maybe Natural)
-> (VideoMetadata -> Maybe Natural -> VideoMetadata)
-> Lens VideoMetadata VideoMetadata (Maybe Natural) (Maybe Natural)
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_frameWidth :: Lens.Lens' VideoMetadata (Prelude.Maybe Prelude.Natural)
videoMetadata_frameWidth :: (Maybe Natural -> f (Maybe Natural))
-> VideoMetadata -> f VideoMetadata
videoMetadata_frameWidth = (VideoMetadata -> Maybe Natural)
-> (VideoMetadata -> Maybe Natural -> VideoMetadata)
-> Lens VideoMetadata VideoMetadata (Maybe Natural) (Maybe Natural)
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 Core.FromJSON VideoMetadata where
parseJSON :: Value -> Parser VideoMetadata
parseJSON =
String
-> (Object -> Parser VideoMetadata)
-> Value
-> Parser VideoMetadata
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"VideoMetadata"
( \Object
x ->
Maybe Double
-> Maybe VideoColorRange
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> VideoMetadata
VideoMetadata'
(Maybe Double
-> Maybe VideoColorRange
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> VideoMetadata)
-> Parser (Maybe Double)
-> Parser
(Maybe VideoColorRange
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> VideoMetadata)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Double)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"FrameRate")
Parser
(Maybe VideoColorRange
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> VideoMetadata)
-> Parser (Maybe VideoColorRange)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> VideoMetadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe VideoColorRange)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ColorRange")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> VideoMetadata)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> VideoMetadata)
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
"Format")
Parser
(Maybe Text
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> VideoMetadata)
-> Parser (Maybe Text)
-> Parser
(Maybe Natural -> Maybe Natural -> Maybe Natural -> VideoMetadata)
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
"Codec")
Parser
(Maybe Natural -> Maybe Natural -> Maybe Natural -> VideoMetadata)
-> Parser (Maybe Natural)
-> Parser (Maybe Natural -> Maybe Natural -> VideoMetadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"FrameHeight")
Parser (Maybe Natural -> Maybe Natural -> VideoMetadata)
-> Parser (Maybe Natural)
-> Parser (Maybe Natural -> VideoMetadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DurationMillis")
Parser (Maybe Natural -> VideoMetadata)
-> Parser (Maybe Natural) -> Parser VideoMetadata
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"FrameWidth")
)
instance Prelude.Hashable VideoMetadata
instance Prelude.NFData VideoMetadata