{-# 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.DetectLabelsSettings 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.DetectLabelsImagePropertiesSettings
import Amazonka.Rekognition.Types.GeneralLabelsSettings
data DetectLabelsSettings = DetectLabelsSettings'
{
DetectLabelsSettings -> Maybe GeneralLabelsSettings
generalLabels :: Prelude.Maybe GeneralLabelsSettings,
DetectLabelsSettings -> Maybe DetectLabelsImagePropertiesSettings
imageProperties :: Prelude.Maybe DetectLabelsImagePropertiesSettings
}
deriving (DetectLabelsSettings -> DetectLabelsSettings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DetectLabelsSettings -> DetectLabelsSettings -> Bool
$c/= :: DetectLabelsSettings -> DetectLabelsSettings -> Bool
== :: DetectLabelsSettings -> DetectLabelsSettings -> Bool
$c== :: DetectLabelsSettings -> DetectLabelsSettings -> Bool
Prelude.Eq, ReadPrec [DetectLabelsSettings]
ReadPrec DetectLabelsSettings
Int -> ReadS DetectLabelsSettings
ReadS [DetectLabelsSettings]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DetectLabelsSettings]
$creadListPrec :: ReadPrec [DetectLabelsSettings]
readPrec :: ReadPrec DetectLabelsSettings
$creadPrec :: ReadPrec DetectLabelsSettings
readList :: ReadS [DetectLabelsSettings]
$creadList :: ReadS [DetectLabelsSettings]
readsPrec :: Int -> ReadS DetectLabelsSettings
$creadsPrec :: Int -> ReadS DetectLabelsSettings
Prelude.Read, Int -> DetectLabelsSettings -> ShowS
[DetectLabelsSettings] -> ShowS
DetectLabelsSettings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DetectLabelsSettings] -> ShowS
$cshowList :: [DetectLabelsSettings] -> ShowS
show :: DetectLabelsSettings -> String
$cshow :: DetectLabelsSettings -> String
showsPrec :: Int -> DetectLabelsSettings -> ShowS
$cshowsPrec :: Int -> DetectLabelsSettings -> ShowS
Prelude.Show, forall x. Rep DetectLabelsSettings x -> DetectLabelsSettings
forall x. DetectLabelsSettings -> Rep DetectLabelsSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DetectLabelsSettings x -> DetectLabelsSettings
$cfrom :: forall x. DetectLabelsSettings -> Rep DetectLabelsSettings x
Prelude.Generic)
newDetectLabelsSettings ::
DetectLabelsSettings
newDetectLabelsSettings :: DetectLabelsSettings
newDetectLabelsSettings =
DetectLabelsSettings'
{ $sel:generalLabels:DetectLabelsSettings' :: Maybe GeneralLabelsSettings
generalLabels =
forall a. Maybe a
Prelude.Nothing,
$sel:imageProperties:DetectLabelsSettings' :: Maybe DetectLabelsImagePropertiesSettings
imageProperties = forall a. Maybe a
Prelude.Nothing
}
detectLabelsSettings_generalLabels :: Lens.Lens' DetectLabelsSettings (Prelude.Maybe GeneralLabelsSettings)
detectLabelsSettings_generalLabels :: Lens' DetectLabelsSettings (Maybe GeneralLabelsSettings)
detectLabelsSettings_generalLabels = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DetectLabelsSettings' {Maybe GeneralLabelsSettings
generalLabels :: Maybe GeneralLabelsSettings
$sel:generalLabels:DetectLabelsSettings' :: DetectLabelsSettings -> Maybe GeneralLabelsSettings
generalLabels} -> Maybe GeneralLabelsSettings
generalLabels) (\s :: DetectLabelsSettings
s@DetectLabelsSettings' {} Maybe GeneralLabelsSettings
a -> DetectLabelsSettings
s {$sel:generalLabels:DetectLabelsSettings' :: Maybe GeneralLabelsSettings
generalLabels = Maybe GeneralLabelsSettings
a} :: DetectLabelsSettings)
detectLabelsSettings_imageProperties :: Lens.Lens' DetectLabelsSettings (Prelude.Maybe DetectLabelsImagePropertiesSettings)
detectLabelsSettings_imageProperties :: Lens'
DetectLabelsSettings (Maybe DetectLabelsImagePropertiesSettings)
detectLabelsSettings_imageProperties = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DetectLabelsSettings' {Maybe DetectLabelsImagePropertiesSettings
imageProperties :: Maybe DetectLabelsImagePropertiesSettings
$sel:imageProperties:DetectLabelsSettings' :: DetectLabelsSettings -> Maybe DetectLabelsImagePropertiesSettings
imageProperties} -> Maybe DetectLabelsImagePropertiesSettings
imageProperties) (\s :: DetectLabelsSettings
s@DetectLabelsSettings' {} Maybe DetectLabelsImagePropertiesSettings
a -> DetectLabelsSettings
s {$sel:imageProperties:DetectLabelsSettings' :: Maybe DetectLabelsImagePropertiesSettings
imageProperties = Maybe DetectLabelsImagePropertiesSettings
a} :: DetectLabelsSettings)
instance Prelude.Hashable DetectLabelsSettings where
hashWithSalt :: Int -> DetectLabelsSettings -> Int
hashWithSalt Int
_salt DetectLabelsSettings' {Maybe DetectLabelsImagePropertiesSettings
Maybe GeneralLabelsSettings
imageProperties :: Maybe DetectLabelsImagePropertiesSettings
generalLabels :: Maybe GeneralLabelsSettings
$sel:imageProperties:DetectLabelsSettings' :: DetectLabelsSettings -> Maybe DetectLabelsImagePropertiesSettings
$sel:generalLabels:DetectLabelsSettings' :: DetectLabelsSettings -> Maybe GeneralLabelsSettings
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe GeneralLabelsSettings
generalLabels
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DetectLabelsImagePropertiesSettings
imageProperties
instance Prelude.NFData DetectLabelsSettings where
rnf :: DetectLabelsSettings -> ()
rnf DetectLabelsSettings' {Maybe DetectLabelsImagePropertiesSettings
Maybe GeneralLabelsSettings
imageProperties :: Maybe DetectLabelsImagePropertiesSettings
generalLabels :: Maybe GeneralLabelsSettings
$sel:imageProperties:DetectLabelsSettings' :: DetectLabelsSettings -> Maybe DetectLabelsImagePropertiesSettings
$sel:generalLabels:DetectLabelsSettings' :: DetectLabelsSettings -> Maybe GeneralLabelsSettings
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe GeneralLabelsSettings
generalLabels
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe DetectLabelsImagePropertiesSettings
imageProperties
instance Data.ToJSON DetectLabelsSettings where
toJSON :: DetectLabelsSettings -> Value
toJSON DetectLabelsSettings' {Maybe DetectLabelsImagePropertiesSettings
Maybe GeneralLabelsSettings
imageProperties :: Maybe DetectLabelsImagePropertiesSettings
generalLabels :: Maybe GeneralLabelsSettings
$sel:imageProperties:DetectLabelsSettings' :: DetectLabelsSettings -> Maybe DetectLabelsImagePropertiesSettings
$sel:generalLabels:DetectLabelsSettings' :: DetectLabelsSettings -> Maybe GeneralLabelsSettings
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"GeneralLabels" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe GeneralLabelsSettings
generalLabels,
(Key
"ImageProperties" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DetectLabelsImagePropertiesSettings
imageProperties
]
)