{-# 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.SageMaker.Types.LabelingJobDataAttributes 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.SageMaker.Types.ContentClassifier
data LabelingJobDataAttributes = LabelingJobDataAttributes'
{
LabelingJobDataAttributes -> Maybe [ContentClassifier]
contentClassifiers :: Prelude.Maybe [ContentClassifier]
}
deriving (LabelingJobDataAttributes -> LabelingJobDataAttributes -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LabelingJobDataAttributes -> LabelingJobDataAttributes -> Bool
$c/= :: LabelingJobDataAttributes -> LabelingJobDataAttributes -> Bool
== :: LabelingJobDataAttributes -> LabelingJobDataAttributes -> Bool
$c== :: LabelingJobDataAttributes -> LabelingJobDataAttributes -> Bool
Prelude.Eq, ReadPrec [LabelingJobDataAttributes]
ReadPrec LabelingJobDataAttributes
Int -> ReadS LabelingJobDataAttributes
ReadS [LabelingJobDataAttributes]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LabelingJobDataAttributes]
$creadListPrec :: ReadPrec [LabelingJobDataAttributes]
readPrec :: ReadPrec LabelingJobDataAttributes
$creadPrec :: ReadPrec LabelingJobDataAttributes
readList :: ReadS [LabelingJobDataAttributes]
$creadList :: ReadS [LabelingJobDataAttributes]
readsPrec :: Int -> ReadS LabelingJobDataAttributes
$creadsPrec :: Int -> ReadS LabelingJobDataAttributes
Prelude.Read, Int -> LabelingJobDataAttributes -> ShowS
[LabelingJobDataAttributes] -> ShowS
LabelingJobDataAttributes -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LabelingJobDataAttributes] -> ShowS
$cshowList :: [LabelingJobDataAttributes] -> ShowS
show :: LabelingJobDataAttributes -> String
$cshow :: LabelingJobDataAttributes -> String
showsPrec :: Int -> LabelingJobDataAttributes -> ShowS
$cshowsPrec :: Int -> LabelingJobDataAttributes -> ShowS
Prelude.Show, forall x.
Rep LabelingJobDataAttributes x -> LabelingJobDataAttributes
forall x.
LabelingJobDataAttributes -> Rep LabelingJobDataAttributes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep LabelingJobDataAttributes x -> LabelingJobDataAttributes
$cfrom :: forall x.
LabelingJobDataAttributes -> Rep LabelingJobDataAttributes x
Prelude.Generic)
newLabelingJobDataAttributes ::
LabelingJobDataAttributes
newLabelingJobDataAttributes :: LabelingJobDataAttributes
newLabelingJobDataAttributes =
LabelingJobDataAttributes'
{ $sel:contentClassifiers:LabelingJobDataAttributes' :: Maybe [ContentClassifier]
contentClassifiers =
forall a. Maybe a
Prelude.Nothing
}
labelingJobDataAttributes_contentClassifiers :: Lens.Lens' LabelingJobDataAttributes (Prelude.Maybe [ContentClassifier])
labelingJobDataAttributes_contentClassifiers :: Lens' LabelingJobDataAttributes (Maybe [ContentClassifier])
labelingJobDataAttributes_contentClassifiers = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LabelingJobDataAttributes' {Maybe [ContentClassifier]
contentClassifiers :: Maybe [ContentClassifier]
$sel:contentClassifiers:LabelingJobDataAttributes' :: LabelingJobDataAttributes -> Maybe [ContentClassifier]
contentClassifiers} -> Maybe [ContentClassifier]
contentClassifiers) (\s :: LabelingJobDataAttributes
s@LabelingJobDataAttributes' {} Maybe [ContentClassifier]
a -> LabelingJobDataAttributes
s {$sel:contentClassifiers:LabelingJobDataAttributes' :: Maybe [ContentClassifier]
contentClassifiers = Maybe [ContentClassifier]
a} :: LabelingJobDataAttributes) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Data.FromJSON LabelingJobDataAttributes where
parseJSON :: Value -> Parser LabelingJobDataAttributes
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"LabelingJobDataAttributes"
( \Object
x ->
Maybe [ContentClassifier] -> LabelingJobDataAttributes
LabelingJobDataAttributes'
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
"ContentClassifiers"
forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
)
)
instance Prelude.Hashable LabelingJobDataAttributes where
hashWithSalt :: Int -> LabelingJobDataAttributes -> Int
hashWithSalt Int
_salt LabelingJobDataAttributes' {Maybe [ContentClassifier]
contentClassifiers :: Maybe [ContentClassifier]
$sel:contentClassifiers:LabelingJobDataAttributes' :: LabelingJobDataAttributes -> Maybe [ContentClassifier]
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [ContentClassifier]
contentClassifiers
instance Prelude.NFData LabelingJobDataAttributes where
rnf :: LabelingJobDataAttributes -> ()
rnf LabelingJobDataAttributes' {Maybe [ContentClassifier]
contentClassifiers :: Maybe [ContentClassifier]
$sel:contentClassifiers:LabelingJobDataAttributes' :: LabelingJobDataAttributes -> Maybe [ContentClassifier]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [ContentClassifier]
contentClassifiers
instance Data.ToJSON LabelingJobDataAttributes where
toJSON :: LabelingJobDataAttributes -> Value
toJSON LabelingJobDataAttributes' {Maybe [ContentClassifier]
contentClassifiers :: Maybe [ContentClassifier]
$sel:contentClassifiers:LabelingJobDataAttributes' :: LabelingJobDataAttributes -> Maybe [ContentClassifier]
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"ContentClassifiers" 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 [ContentClassifier]
contentClassifiers
]
)