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