{-# 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.MechanicalTurk.Types.ReviewResultDetail where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ReviewResultDetail = ReviewResultDetail'
{
ReviewResultDetail -> Maybe Text
value :: Prelude.Maybe Prelude.Text,
ReviewResultDetail -> Maybe Text
actionId :: Prelude.Maybe Prelude.Text,
ReviewResultDetail -> Maybe Text
subjectType :: Prelude.Maybe Prelude.Text,
ReviewResultDetail -> Maybe Text
key :: Prelude.Maybe Prelude.Text,
ReviewResultDetail -> Maybe Text
questionId :: Prelude.Maybe Prelude.Text,
ReviewResultDetail -> Maybe Text
subjectId :: Prelude.Maybe Prelude.Text
}
deriving (ReviewResultDetail -> ReviewResultDetail -> Bool
(ReviewResultDetail -> ReviewResultDetail -> Bool)
-> (ReviewResultDetail -> ReviewResultDetail -> Bool)
-> Eq ReviewResultDetail
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ReviewResultDetail -> ReviewResultDetail -> Bool
$c/= :: ReviewResultDetail -> ReviewResultDetail -> Bool
== :: ReviewResultDetail -> ReviewResultDetail -> Bool
$c== :: ReviewResultDetail -> ReviewResultDetail -> Bool
Prelude.Eq, ReadPrec [ReviewResultDetail]
ReadPrec ReviewResultDetail
Int -> ReadS ReviewResultDetail
ReadS [ReviewResultDetail]
(Int -> ReadS ReviewResultDetail)
-> ReadS [ReviewResultDetail]
-> ReadPrec ReviewResultDetail
-> ReadPrec [ReviewResultDetail]
-> Read ReviewResultDetail
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ReviewResultDetail]
$creadListPrec :: ReadPrec [ReviewResultDetail]
readPrec :: ReadPrec ReviewResultDetail
$creadPrec :: ReadPrec ReviewResultDetail
readList :: ReadS [ReviewResultDetail]
$creadList :: ReadS [ReviewResultDetail]
readsPrec :: Int -> ReadS ReviewResultDetail
$creadsPrec :: Int -> ReadS ReviewResultDetail
Prelude.Read, Int -> ReviewResultDetail -> ShowS
[ReviewResultDetail] -> ShowS
ReviewResultDetail -> String
(Int -> ReviewResultDetail -> ShowS)
-> (ReviewResultDetail -> String)
-> ([ReviewResultDetail] -> ShowS)
-> Show ReviewResultDetail
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ReviewResultDetail] -> ShowS
$cshowList :: [ReviewResultDetail] -> ShowS
show :: ReviewResultDetail -> String
$cshow :: ReviewResultDetail -> String
showsPrec :: Int -> ReviewResultDetail -> ShowS
$cshowsPrec :: Int -> ReviewResultDetail -> ShowS
Prelude.Show, (forall x. ReviewResultDetail -> Rep ReviewResultDetail x)
-> (forall x. Rep ReviewResultDetail x -> ReviewResultDetail)
-> Generic ReviewResultDetail
forall x. Rep ReviewResultDetail x -> ReviewResultDetail
forall x. ReviewResultDetail -> Rep ReviewResultDetail x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ReviewResultDetail x -> ReviewResultDetail
$cfrom :: forall x. ReviewResultDetail -> Rep ReviewResultDetail x
Prelude.Generic)
newReviewResultDetail ::
ReviewResultDetail
newReviewResultDetail :: ReviewResultDetail
newReviewResultDetail =
ReviewResultDetail' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ReviewResultDetail
ReviewResultDetail'
{ $sel:value:ReviewResultDetail' :: Maybe Text
value = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:actionId:ReviewResultDetail' :: Maybe Text
actionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:subjectType:ReviewResultDetail' :: Maybe Text
subjectType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:key:ReviewResultDetail' :: Maybe Text
key = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:questionId:ReviewResultDetail' :: Maybe Text
questionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:subjectId:ReviewResultDetail' :: Maybe Text
subjectId = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
reviewResultDetail_value :: Lens.Lens' ReviewResultDetail (Prelude.Maybe Prelude.Text)
reviewResultDetail_value :: (Maybe Text -> f (Maybe Text))
-> ReviewResultDetail -> f ReviewResultDetail
reviewResultDetail_value = (ReviewResultDetail -> Maybe Text)
-> (ReviewResultDetail -> Maybe Text -> ReviewResultDetail)
-> Lens
ReviewResultDetail ReviewResultDetail (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReviewResultDetail' {Maybe Text
value :: Maybe Text
$sel:value:ReviewResultDetail' :: ReviewResultDetail -> Maybe Text
value} -> Maybe Text
value) (\s :: ReviewResultDetail
s@ReviewResultDetail' {} Maybe Text
a -> ReviewResultDetail
s {$sel:value:ReviewResultDetail' :: Maybe Text
value = Maybe Text
a} :: ReviewResultDetail)
reviewResultDetail_actionId :: Lens.Lens' ReviewResultDetail (Prelude.Maybe Prelude.Text)
reviewResultDetail_actionId :: (Maybe Text -> f (Maybe Text))
-> ReviewResultDetail -> f ReviewResultDetail
reviewResultDetail_actionId = (ReviewResultDetail -> Maybe Text)
-> (ReviewResultDetail -> Maybe Text -> ReviewResultDetail)
-> Lens
ReviewResultDetail ReviewResultDetail (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReviewResultDetail' {Maybe Text
actionId :: Maybe Text
$sel:actionId:ReviewResultDetail' :: ReviewResultDetail -> Maybe Text
actionId} -> Maybe Text
actionId) (\s :: ReviewResultDetail
s@ReviewResultDetail' {} Maybe Text
a -> ReviewResultDetail
s {$sel:actionId:ReviewResultDetail' :: Maybe Text
actionId = Maybe Text
a} :: ReviewResultDetail)
reviewResultDetail_subjectType :: Lens.Lens' ReviewResultDetail (Prelude.Maybe Prelude.Text)
reviewResultDetail_subjectType :: (Maybe Text -> f (Maybe Text))
-> ReviewResultDetail -> f ReviewResultDetail
reviewResultDetail_subjectType = (ReviewResultDetail -> Maybe Text)
-> (ReviewResultDetail -> Maybe Text -> ReviewResultDetail)
-> Lens
ReviewResultDetail ReviewResultDetail (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReviewResultDetail' {Maybe Text
subjectType :: Maybe Text
$sel:subjectType:ReviewResultDetail' :: ReviewResultDetail -> Maybe Text
subjectType} -> Maybe Text
subjectType) (\s :: ReviewResultDetail
s@ReviewResultDetail' {} Maybe Text
a -> ReviewResultDetail
s {$sel:subjectType:ReviewResultDetail' :: Maybe Text
subjectType = Maybe Text
a} :: ReviewResultDetail)
reviewResultDetail_key :: Lens.Lens' ReviewResultDetail (Prelude.Maybe Prelude.Text)
reviewResultDetail_key :: (Maybe Text -> f (Maybe Text))
-> ReviewResultDetail -> f ReviewResultDetail
reviewResultDetail_key = (ReviewResultDetail -> Maybe Text)
-> (ReviewResultDetail -> Maybe Text -> ReviewResultDetail)
-> Lens
ReviewResultDetail ReviewResultDetail (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReviewResultDetail' {Maybe Text
key :: Maybe Text
$sel:key:ReviewResultDetail' :: ReviewResultDetail -> Maybe Text
key} -> Maybe Text
key) (\s :: ReviewResultDetail
s@ReviewResultDetail' {} Maybe Text
a -> ReviewResultDetail
s {$sel:key:ReviewResultDetail' :: Maybe Text
key = Maybe Text
a} :: ReviewResultDetail)
reviewResultDetail_questionId :: Lens.Lens' ReviewResultDetail (Prelude.Maybe Prelude.Text)
reviewResultDetail_questionId :: (Maybe Text -> f (Maybe Text))
-> ReviewResultDetail -> f ReviewResultDetail
reviewResultDetail_questionId = (ReviewResultDetail -> Maybe Text)
-> (ReviewResultDetail -> Maybe Text -> ReviewResultDetail)
-> Lens
ReviewResultDetail ReviewResultDetail (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReviewResultDetail' {Maybe Text
questionId :: Maybe Text
$sel:questionId:ReviewResultDetail' :: ReviewResultDetail -> Maybe Text
questionId} -> Maybe Text
questionId) (\s :: ReviewResultDetail
s@ReviewResultDetail' {} Maybe Text
a -> ReviewResultDetail
s {$sel:questionId:ReviewResultDetail' :: Maybe Text
questionId = Maybe Text
a} :: ReviewResultDetail)
reviewResultDetail_subjectId :: Lens.Lens' ReviewResultDetail (Prelude.Maybe Prelude.Text)
reviewResultDetail_subjectId :: (Maybe Text -> f (Maybe Text))
-> ReviewResultDetail -> f ReviewResultDetail
reviewResultDetail_subjectId = (ReviewResultDetail -> Maybe Text)
-> (ReviewResultDetail -> Maybe Text -> ReviewResultDetail)
-> Lens
ReviewResultDetail ReviewResultDetail (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReviewResultDetail' {Maybe Text
subjectId :: Maybe Text
$sel:subjectId:ReviewResultDetail' :: ReviewResultDetail -> Maybe Text
subjectId} -> Maybe Text
subjectId) (\s :: ReviewResultDetail
s@ReviewResultDetail' {} Maybe Text
a -> ReviewResultDetail
s {$sel:subjectId:ReviewResultDetail' :: Maybe Text
subjectId = Maybe Text
a} :: ReviewResultDetail)
instance Core.FromJSON ReviewResultDetail where
parseJSON :: Value -> Parser ReviewResultDetail
parseJSON =
String
-> (Object -> Parser ReviewResultDetail)
-> Value
-> Parser ReviewResultDetail
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ReviewResultDetail"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ReviewResultDetail
ReviewResultDetail'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ReviewResultDetail)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ReviewResultDetail)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Value")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ReviewResultDetail)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> ReviewResultDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ActionId")
Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> ReviewResultDetail)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe Text -> Maybe Text -> ReviewResultDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SubjectType")
Parser
(Maybe Text -> Maybe Text -> Maybe Text -> ReviewResultDetail)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> ReviewResultDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Key")
Parser (Maybe Text -> Maybe Text -> ReviewResultDetail)
-> Parser (Maybe Text) -> Parser (Maybe Text -> ReviewResultDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"QuestionId")
Parser (Maybe Text -> ReviewResultDetail)
-> Parser (Maybe Text) -> Parser ReviewResultDetail
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SubjectId")
)
instance Prelude.Hashable ReviewResultDetail
instance Prelude.NFData ReviewResultDetail