{-# 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.ContentModerationDetection 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.ModerationLabel
data ContentModerationDetection = ContentModerationDetection'
{
ContentModerationDetection -> Maybe ModerationLabel
moderationLabel :: Prelude.Maybe ModerationLabel,
ContentModerationDetection -> Maybe Integer
timestamp :: Prelude.Maybe Prelude.Integer
}
deriving (ContentModerationDetection -> ContentModerationDetection -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ContentModerationDetection -> ContentModerationDetection -> Bool
$c/= :: ContentModerationDetection -> ContentModerationDetection -> Bool
== :: ContentModerationDetection -> ContentModerationDetection -> Bool
$c== :: ContentModerationDetection -> ContentModerationDetection -> Bool
Prelude.Eq, ReadPrec [ContentModerationDetection]
ReadPrec ContentModerationDetection
Int -> ReadS ContentModerationDetection
ReadS [ContentModerationDetection]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ContentModerationDetection]
$creadListPrec :: ReadPrec [ContentModerationDetection]
readPrec :: ReadPrec ContentModerationDetection
$creadPrec :: ReadPrec ContentModerationDetection
readList :: ReadS [ContentModerationDetection]
$creadList :: ReadS [ContentModerationDetection]
readsPrec :: Int -> ReadS ContentModerationDetection
$creadsPrec :: Int -> ReadS ContentModerationDetection
Prelude.Read, Int -> ContentModerationDetection -> ShowS
[ContentModerationDetection] -> ShowS
ContentModerationDetection -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ContentModerationDetection] -> ShowS
$cshowList :: [ContentModerationDetection] -> ShowS
show :: ContentModerationDetection -> String
$cshow :: ContentModerationDetection -> String
showsPrec :: Int -> ContentModerationDetection -> ShowS
$cshowsPrec :: Int -> ContentModerationDetection -> ShowS
Prelude.Show, forall x.
Rep ContentModerationDetection x -> ContentModerationDetection
forall x.
ContentModerationDetection -> Rep ContentModerationDetection x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ContentModerationDetection x -> ContentModerationDetection
$cfrom :: forall x.
ContentModerationDetection -> Rep ContentModerationDetection x
Prelude.Generic)
newContentModerationDetection ::
ContentModerationDetection
newContentModerationDetection :: ContentModerationDetection
newContentModerationDetection =
ContentModerationDetection'
{ $sel:moderationLabel:ContentModerationDetection' :: Maybe ModerationLabel
moderationLabel =
forall a. Maybe a
Prelude.Nothing,
$sel:timestamp:ContentModerationDetection' :: Maybe Integer
timestamp = forall a. Maybe a
Prelude.Nothing
}
contentModerationDetection_moderationLabel :: Lens.Lens' ContentModerationDetection (Prelude.Maybe ModerationLabel)
contentModerationDetection_moderationLabel :: Lens' ContentModerationDetection (Maybe ModerationLabel)
contentModerationDetection_moderationLabel = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContentModerationDetection' {Maybe ModerationLabel
moderationLabel :: Maybe ModerationLabel
$sel:moderationLabel:ContentModerationDetection' :: ContentModerationDetection -> Maybe ModerationLabel
moderationLabel} -> Maybe ModerationLabel
moderationLabel) (\s :: ContentModerationDetection
s@ContentModerationDetection' {} Maybe ModerationLabel
a -> ContentModerationDetection
s {$sel:moderationLabel:ContentModerationDetection' :: Maybe ModerationLabel
moderationLabel = Maybe ModerationLabel
a} :: ContentModerationDetection)
contentModerationDetection_timestamp :: Lens.Lens' ContentModerationDetection (Prelude.Maybe Prelude.Integer)
contentModerationDetection_timestamp :: Lens' ContentModerationDetection (Maybe Integer)
contentModerationDetection_timestamp = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContentModerationDetection' {Maybe Integer
timestamp :: Maybe Integer
$sel:timestamp:ContentModerationDetection' :: ContentModerationDetection -> Maybe Integer
timestamp} -> Maybe Integer
timestamp) (\s :: ContentModerationDetection
s@ContentModerationDetection' {} Maybe Integer
a -> ContentModerationDetection
s {$sel:timestamp:ContentModerationDetection' :: Maybe Integer
timestamp = Maybe Integer
a} :: ContentModerationDetection)
instance Data.FromJSON ContentModerationDetection where
parseJSON :: Value -> Parser ContentModerationDetection
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ContentModerationDetection"
( \Object
x ->
Maybe ModerationLabel
-> Maybe Integer -> ContentModerationDetection
ContentModerationDetection'
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
"ModerationLabel")
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
"Timestamp")
)
instance Prelude.Hashable ContentModerationDetection where
hashWithSalt :: Int -> ContentModerationDetection -> Int
hashWithSalt Int
_salt ContentModerationDetection' {Maybe Integer
Maybe ModerationLabel
timestamp :: Maybe Integer
moderationLabel :: Maybe ModerationLabel
$sel:timestamp:ContentModerationDetection' :: ContentModerationDetection -> Maybe Integer
$sel:moderationLabel:ContentModerationDetection' :: ContentModerationDetection -> Maybe ModerationLabel
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ModerationLabel
moderationLabel
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
timestamp
instance Prelude.NFData ContentModerationDetection where
rnf :: ContentModerationDetection -> ()
rnf ContentModerationDetection' {Maybe Integer
Maybe ModerationLabel
timestamp :: Maybe Integer
moderationLabel :: Maybe ModerationLabel
$sel:timestamp:ContentModerationDetection' :: ContentModerationDetection -> Maybe Integer
$sel:moderationLabel:ContentModerationDetection' :: ContentModerationDetection -> Maybe ModerationLabel
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe ModerationLabel
moderationLabel
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
timestamp