{-# 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.Summary 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 Summary = Summary'
{ Summary -> Maybe S3Object
s3Object :: Prelude.Maybe S3Object
}
deriving (Summary -> Summary -> Bool
(Summary -> Summary -> Bool)
-> (Summary -> Summary -> Bool) -> Eq Summary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Summary -> Summary -> Bool
$c/= :: Summary -> Summary -> Bool
== :: Summary -> Summary -> Bool
$c== :: Summary -> Summary -> Bool
Prelude.Eq, ReadPrec [Summary]
ReadPrec Summary
Int -> ReadS Summary
ReadS [Summary]
(Int -> ReadS Summary)
-> ReadS [Summary]
-> ReadPrec Summary
-> ReadPrec [Summary]
-> Read Summary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Summary]
$creadListPrec :: ReadPrec [Summary]
readPrec :: ReadPrec Summary
$creadPrec :: ReadPrec Summary
readList :: ReadS [Summary]
$creadList :: ReadS [Summary]
readsPrec :: Int -> ReadS Summary
$creadsPrec :: Int -> ReadS Summary
Prelude.Read, Int -> Summary -> ShowS
[Summary] -> ShowS
Summary -> String
(Int -> Summary -> ShowS)
-> (Summary -> String) -> ([Summary] -> ShowS) -> Show Summary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Summary] -> ShowS
$cshowList :: [Summary] -> ShowS
show :: Summary -> String
$cshow :: Summary -> String
showsPrec :: Int -> Summary -> ShowS
$cshowsPrec :: Int -> Summary -> ShowS
Prelude.Show, (forall x. Summary -> Rep Summary x)
-> (forall x. Rep Summary x -> Summary) -> Generic Summary
forall x. Rep Summary x -> Summary
forall x. Summary -> Rep Summary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Summary x -> Summary
$cfrom :: forall x. Summary -> Rep Summary x
Prelude.Generic)
newSummary ::
Summary
newSummary :: Summary
newSummary = Summary' :: Maybe S3Object -> Summary
Summary' {$sel:s3Object:Summary' :: Maybe S3Object
s3Object = Maybe S3Object
forall a. Maybe a
Prelude.Nothing}
summary_s3Object :: Lens.Lens' Summary (Prelude.Maybe S3Object)
summary_s3Object :: (Maybe S3Object -> f (Maybe S3Object)) -> Summary -> f Summary
summary_s3Object = (Summary -> Maybe S3Object)
-> (Summary -> Maybe S3Object -> Summary)
-> Lens Summary Summary (Maybe S3Object) (Maybe S3Object)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Summary' {Maybe S3Object
s3Object :: Maybe S3Object
$sel:s3Object:Summary' :: Summary -> Maybe S3Object
s3Object} -> Maybe S3Object
s3Object) (\s :: Summary
s@Summary' {} Maybe S3Object
a -> Summary
s {$sel:s3Object:Summary' :: Maybe S3Object
s3Object = Maybe S3Object
a} :: Summary)
instance Core.FromJSON Summary where
parseJSON :: Value -> Parser Summary
parseJSON =
String -> (Object -> Parser Summary) -> Value -> Parser Summary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"Summary"
(\Object
x -> Maybe S3Object -> Summary
Summary' (Maybe S3Object -> Summary)
-> Parser (Maybe S3Object) -> Parser Summary
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 Summary
instance Prelude.NFData Summary