{-# 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.TrainingDataResult where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Rekognition.Types.TrainingData
import Amazonka.Rekognition.Types.ValidationData
data TrainingDataResult = TrainingDataResult'
{
TrainingDataResult -> Maybe TrainingData
input :: Prelude.Maybe TrainingData,
TrainingDataResult -> Maybe TrainingData
output :: Prelude.Maybe TrainingData,
TrainingDataResult -> Maybe ValidationData
validation :: Prelude.Maybe ValidationData
}
deriving (TrainingDataResult -> TrainingDataResult -> Bool
(TrainingDataResult -> TrainingDataResult -> Bool)
-> (TrainingDataResult -> TrainingDataResult -> Bool)
-> Eq TrainingDataResult
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TrainingDataResult -> TrainingDataResult -> Bool
$c/= :: TrainingDataResult -> TrainingDataResult -> Bool
== :: TrainingDataResult -> TrainingDataResult -> Bool
$c== :: TrainingDataResult -> TrainingDataResult -> Bool
Prelude.Eq, ReadPrec [TrainingDataResult]
ReadPrec TrainingDataResult
Int -> ReadS TrainingDataResult
ReadS [TrainingDataResult]
(Int -> ReadS TrainingDataResult)
-> ReadS [TrainingDataResult]
-> ReadPrec TrainingDataResult
-> ReadPrec [TrainingDataResult]
-> Read TrainingDataResult
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TrainingDataResult]
$creadListPrec :: ReadPrec [TrainingDataResult]
readPrec :: ReadPrec TrainingDataResult
$creadPrec :: ReadPrec TrainingDataResult
readList :: ReadS [TrainingDataResult]
$creadList :: ReadS [TrainingDataResult]
readsPrec :: Int -> ReadS TrainingDataResult
$creadsPrec :: Int -> ReadS TrainingDataResult
Prelude.Read, Int -> TrainingDataResult -> ShowS
[TrainingDataResult] -> ShowS
TrainingDataResult -> String
(Int -> TrainingDataResult -> ShowS)
-> (TrainingDataResult -> String)
-> ([TrainingDataResult] -> ShowS)
-> Show TrainingDataResult
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TrainingDataResult] -> ShowS
$cshowList :: [TrainingDataResult] -> ShowS
show :: TrainingDataResult -> String
$cshow :: TrainingDataResult -> String
showsPrec :: Int -> TrainingDataResult -> ShowS
$cshowsPrec :: Int -> TrainingDataResult -> ShowS
Prelude.Show, (forall x. TrainingDataResult -> Rep TrainingDataResult x)
-> (forall x. Rep TrainingDataResult x -> TrainingDataResult)
-> Generic TrainingDataResult
forall x. Rep TrainingDataResult x -> TrainingDataResult
forall x. TrainingDataResult -> Rep TrainingDataResult x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TrainingDataResult x -> TrainingDataResult
$cfrom :: forall x. TrainingDataResult -> Rep TrainingDataResult x
Prelude.Generic)
newTrainingDataResult ::
TrainingDataResult
newTrainingDataResult :: TrainingDataResult
newTrainingDataResult =
TrainingDataResult' :: Maybe TrainingData
-> Maybe TrainingData -> Maybe ValidationData -> TrainingDataResult
TrainingDataResult'
{ $sel:input:TrainingDataResult' :: Maybe TrainingData
input = Maybe TrainingData
forall a. Maybe a
Prelude.Nothing,
$sel:output:TrainingDataResult' :: Maybe TrainingData
output = Maybe TrainingData
forall a. Maybe a
Prelude.Nothing,
$sel:validation:TrainingDataResult' :: Maybe ValidationData
validation = Maybe ValidationData
forall a. Maybe a
Prelude.Nothing
}
trainingDataResult_input :: Lens.Lens' TrainingDataResult (Prelude.Maybe TrainingData)
trainingDataResult_input :: (Maybe TrainingData -> f (Maybe TrainingData))
-> TrainingDataResult -> f TrainingDataResult
trainingDataResult_input = (TrainingDataResult -> Maybe TrainingData)
-> (TrainingDataResult -> Maybe TrainingData -> TrainingDataResult)
-> Lens
TrainingDataResult
TrainingDataResult
(Maybe TrainingData)
(Maybe TrainingData)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrainingDataResult' {Maybe TrainingData
input :: Maybe TrainingData
$sel:input:TrainingDataResult' :: TrainingDataResult -> Maybe TrainingData
input} -> Maybe TrainingData
input) (\s :: TrainingDataResult
s@TrainingDataResult' {} Maybe TrainingData
a -> TrainingDataResult
s {$sel:input:TrainingDataResult' :: Maybe TrainingData
input = Maybe TrainingData
a} :: TrainingDataResult)
trainingDataResult_output :: Lens.Lens' TrainingDataResult (Prelude.Maybe TrainingData)
trainingDataResult_output :: (Maybe TrainingData -> f (Maybe TrainingData))
-> TrainingDataResult -> f TrainingDataResult
trainingDataResult_output = (TrainingDataResult -> Maybe TrainingData)
-> (TrainingDataResult -> Maybe TrainingData -> TrainingDataResult)
-> Lens
TrainingDataResult
TrainingDataResult
(Maybe TrainingData)
(Maybe TrainingData)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrainingDataResult' {Maybe TrainingData
output :: Maybe TrainingData
$sel:output:TrainingDataResult' :: TrainingDataResult -> Maybe TrainingData
output} -> Maybe TrainingData
output) (\s :: TrainingDataResult
s@TrainingDataResult' {} Maybe TrainingData
a -> TrainingDataResult
s {$sel:output:TrainingDataResult' :: Maybe TrainingData
output = Maybe TrainingData
a} :: TrainingDataResult)
trainingDataResult_validation :: Lens.Lens' TrainingDataResult (Prelude.Maybe ValidationData)
trainingDataResult_validation :: (Maybe ValidationData -> f (Maybe ValidationData))
-> TrainingDataResult -> f TrainingDataResult
trainingDataResult_validation = (TrainingDataResult -> Maybe ValidationData)
-> (TrainingDataResult
-> Maybe ValidationData -> TrainingDataResult)
-> Lens
TrainingDataResult
TrainingDataResult
(Maybe ValidationData)
(Maybe ValidationData)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrainingDataResult' {Maybe ValidationData
validation :: Maybe ValidationData
$sel:validation:TrainingDataResult' :: TrainingDataResult -> Maybe ValidationData
validation} -> Maybe ValidationData
validation) (\s :: TrainingDataResult
s@TrainingDataResult' {} Maybe ValidationData
a -> TrainingDataResult
s {$sel:validation:TrainingDataResult' :: Maybe ValidationData
validation = Maybe ValidationData
a} :: TrainingDataResult)
instance Core.FromJSON TrainingDataResult where
parseJSON :: Value -> Parser TrainingDataResult
parseJSON =
String
-> (Object -> Parser TrainingDataResult)
-> Value
-> Parser TrainingDataResult
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"TrainingDataResult"
( \Object
x ->
Maybe TrainingData
-> Maybe TrainingData -> Maybe ValidationData -> TrainingDataResult
TrainingDataResult'
(Maybe TrainingData
-> Maybe TrainingData
-> Maybe ValidationData
-> TrainingDataResult)
-> Parser (Maybe TrainingData)
-> Parser
(Maybe TrainingData -> Maybe ValidationData -> TrainingDataResult)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe TrainingData)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Input")
Parser
(Maybe TrainingData -> Maybe ValidationData -> TrainingDataResult)
-> Parser (Maybe TrainingData)
-> Parser (Maybe ValidationData -> TrainingDataResult)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe TrainingData)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Output")
Parser (Maybe ValidationData -> TrainingDataResult)
-> Parser (Maybe ValidationData) -> Parser TrainingDataResult
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ValidationData)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Validation")
)
instance Prelude.Hashable TrainingDataResult
instance Prelude.NFData TrainingDataResult