{-# 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.KinesisVideoStream where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data KinesisVideoStream = KinesisVideoStream'
{
KinesisVideoStream -> Maybe Text
arn :: Prelude.Maybe Prelude.Text
}
deriving (KinesisVideoStream -> KinesisVideoStream -> Bool
(KinesisVideoStream -> KinesisVideoStream -> Bool)
-> (KinesisVideoStream -> KinesisVideoStream -> Bool)
-> Eq KinesisVideoStream
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: KinesisVideoStream -> KinesisVideoStream -> Bool
$c/= :: KinesisVideoStream -> KinesisVideoStream -> Bool
== :: KinesisVideoStream -> KinesisVideoStream -> Bool
$c== :: KinesisVideoStream -> KinesisVideoStream -> Bool
Prelude.Eq, ReadPrec [KinesisVideoStream]
ReadPrec KinesisVideoStream
Int -> ReadS KinesisVideoStream
ReadS [KinesisVideoStream]
(Int -> ReadS KinesisVideoStream)
-> ReadS [KinesisVideoStream]
-> ReadPrec KinesisVideoStream
-> ReadPrec [KinesisVideoStream]
-> Read KinesisVideoStream
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [KinesisVideoStream]
$creadListPrec :: ReadPrec [KinesisVideoStream]
readPrec :: ReadPrec KinesisVideoStream
$creadPrec :: ReadPrec KinesisVideoStream
readList :: ReadS [KinesisVideoStream]
$creadList :: ReadS [KinesisVideoStream]
readsPrec :: Int -> ReadS KinesisVideoStream
$creadsPrec :: Int -> ReadS KinesisVideoStream
Prelude.Read, Int -> KinesisVideoStream -> ShowS
[KinesisVideoStream] -> ShowS
KinesisVideoStream -> String
(Int -> KinesisVideoStream -> ShowS)
-> (KinesisVideoStream -> String)
-> ([KinesisVideoStream] -> ShowS)
-> Show KinesisVideoStream
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [KinesisVideoStream] -> ShowS
$cshowList :: [KinesisVideoStream] -> ShowS
show :: KinesisVideoStream -> String
$cshow :: KinesisVideoStream -> String
showsPrec :: Int -> KinesisVideoStream -> ShowS
$cshowsPrec :: Int -> KinesisVideoStream -> ShowS
Prelude.Show, (forall x. KinesisVideoStream -> Rep KinesisVideoStream x)
-> (forall x. Rep KinesisVideoStream x -> KinesisVideoStream)
-> Generic KinesisVideoStream
forall x. Rep KinesisVideoStream x -> KinesisVideoStream
forall x. KinesisVideoStream -> Rep KinesisVideoStream x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep KinesisVideoStream x -> KinesisVideoStream
$cfrom :: forall x. KinesisVideoStream -> Rep KinesisVideoStream x
Prelude.Generic)
newKinesisVideoStream ::
KinesisVideoStream
newKinesisVideoStream :: KinesisVideoStream
newKinesisVideoStream =
KinesisVideoStream' :: Maybe Text -> KinesisVideoStream
KinesisVideoStream' {$sel:arn:KinesisVideoStream' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing}
kinesisVideoStream_arn :: Lens.Lens' KinesisVideoStream (Prelude.Maybe Prelude.Text)
kinesisVideoStream_arn :: (Maybe Text -> f (Maybe Text))
-> KinesisVideoStream -> f KinesisVideoStream
kinesisVideoStream_arn = (KinesisVideoStream -> Maybe Text)
-> (KinesisVideoStream -> Maybe Text -> KinesisVideoStream)
-> Lens
KinesisVideoStream KinesisVideoStream (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KinesisVideoStream' {Maybe Text
arn :: Maybe Text
$sel:arn:KinesisVideoStream' :: KinesisVideoStream -> Maybe Text
arn} -> Maybe Text
arn) (\s :: KinesisVideoStream
s@KinesisVideoStream' {} Maybe Text
a -> KinesisVideoStream
s {$sel:arn:KinesisVideoStream' :: Maybe Text
arn = Maybe Text
a} :: KinesisVideoStream)
instance Core.FromJSON KinesisVideoStream where
parseJSON :: Value -> Parser KinesisVideoStream
parseJSON =
String
-> (Object -> Parser KinesisVideoStream)
-> Value
-> Parser KinesisVideoStream
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"KinesisVideoStream"
( \Object
x ->
Maybe Text -> KinesisVideoStream
KinesisVideoStream' (Maybe Text -> KinesisVideoStream)
-> Parser (Maybe Text) -> Parser KinesisVideoStream
forall (f :: * -> *) a b. Functor 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
"Arn")
)
instance Prelude.Hashable KinesisVideoStream
instance Prelude.NFData KinesisVideoStream
instance Core.ToJSON KinesisVideoStream where
toJSON :: KinesisVideoStream -> Value
toJSON KinesisVideoStream' {Maybe Text
arn :: Maybe Text
$sel:arn:KinesisVideoStream' :: KinesisVideoStream -> Maybe Text
..} =
[Pair] -> Value
Core.object
([Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [(Text
"Arn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
arn])