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