{-# 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.ReviewActionDetail where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MechanicalTurk.Types.ReviewActionStatus
import qualified Amazonka.Prelude as Prelude
data ReviewActionDetail = ReviewActionDetail'
{
ReviewActionDetail -> Maybe ReviewActionStatus
status :: Prelude.Maybe ReviewActionStatus,
ReviewActionDetail -> Maybe Text
targetId :: Prelude.Maybe Prelude.Text,
ReviewActionDetail -> Maybe Text
actionId :: Prelude.Maybe Prelude.Text,
ReviewActionDetail -> Maybe Text
targetType :: Prelude.Maybe Prelude.Text,
ReviewActionDetail -> Maybe Text
result :: Prelude.Maybe Prelude.Text,
ReviewActionDetail -> Maybe Text
actionName :: Prelude.Maybe Prelude.Text,
ReviewActionDetail -> Maybe POSIX
completeTime :: Prelude.Maybe Core.POSIX,
ReviewActionDetail -> Maybe Text
errorCode :: Prelude.Maybe Prelude.Text
}
deriving (ReviewActionDetail -> ReviewActionDetail -> Bool
(ReviewActionDetail -> ReviewActionDetail -> Bool)
-> (ReviewActionDetail -> ReviewActionDetail -> Bool)
-> Eq ReviewActionDetail
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ReviewActionDetail -> ReviewActionDetail -> Bool
$c/= :: ReviewActionDetail -> ReviewActionDetail -> Bool
== :: ReviewActionDetail -> ReviewActionDetail -> Bool
$c== :: ReviewActionDetail -> ReviewActionDetail -> Bool
Prelude.Eq, ReadPrec [ReviewActionDetail]
ReadPrec ReviewActionDetail
Int -> ReadS ReviewActionDetail
ReadS [ReviewActionDetail]
(Int -> ReadS ReviewActionDetail)
-> ReadS [ReviewActionDetail]
-> ReadPrec ReviewActionDetail
-> ReadPrec [ReviewActionDetail]
-> Read ReviewActionDetail
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ReviewActionDetail]
$creadListPrec :: ReadPrec [ReviewActionDetail]
readPrec :: ReadPrec ReviewActionDetail
$creadPrec :: ReadPrec ReviewActionDetail
readList :: ReadS [ReviewActionDetail]
$creadList :: ReadS [ReviewActionDetail]
readsPrec :: Int -> ReadS ReviewActionDetail
$creadsPrec :: Int -> ReadS ReviewActionDetail
Prelude.Read, Int -> ReviewActionDetail -> ShowS
[ReviewActionDetail] -> ShowS
ReviewActionDetail -> String
(Int -> ReviewActionDetail -> ShowS)
-> (ReviewActionDetail -> String)
-> ([ReviewActionDetail] -> ShowS)
-> Show ReviewActionDetail
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ReviewActionDetail] -> ShowS
$cshowList :: [ReviewActionDetail] -> ShowS
show :: ReviewActionDetail -> String
$cshow :: ReviewActionDetail -> String
showsPrec :: Int -> ReviewActionDetail -> ShowS
$cshowsPrec :: Int -> ReviewActionDetail -> ShowS
Prelude.Show, (forall x. ReviewActionDetail -> Rep ReviewActionDetail x)
-> (forall x. Rep ReviewActionDetail x -> ReviewActionDetail)
-> Generic ReviewActionDetail
forall x. Rep ReviewActionDetail x -> ReviewActionDetail
forall x. ReviewActionDetail -> Rep ReviewActionDetail x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ReviewActionDetail x -> ReviewActionDetail
$cfrom :: forall x. ReviewActionDetail -> Rep ReviewActionDetail x
Prelude.Generic)
newReviewActionDetail ::
ReviewActionDetail
newReviewActionDetail :: ReviewActionDetail
newReviewActionDetail =
ReviewActionDetail' :: Maybe ReviewActionStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> ReviewActionDetail
ReviewActionDetail'
{ $sel:status:ReviewActionDetail' :: Maybe ReviewActionStatus
status = Maybe ReviewActionStatus
forall a. Maybe a
Prelude.Nothing,
$sel:targetId:ReviewActionDetail' :: Maybe Text
targetId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:actionId:ReviewActionDetail' :: Maybe Text
actionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:targetType:ReviewActionDetail' :: Maybe Text
targetType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:result:ReviewActionDetail' :: Maybe Text
result = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:actionName:ReviewActionDetail' :: Maybe Text
actionName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:completeTime:ReviewActionDetail' :: Maybe POSIX
completeTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:errorCode:ReviewActionDetail' :: Maybe Text
errorCode = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
reviewActionDetail_status :: Lens.Lens' ReviewActionDetail (Prelude.Maybe ReviewActionStatus)
reviewActionDetail_status :: (Maybe ReviewActionStatus -> f (Maybe ReviewActionStatus))
-> ReviewActionDetail -> f ReviewActionDetail
reviewActionDetail_status = (ReviewActionDetail -> Maybe ReviewActionStatus)
-> (ReviewActionDetail
-> Maybe ReviewActionStatus -> ReviewActionDetail)
-> Lens
ReviewActionDetail
ReviewActionDetail
(Maybe ReviewActionStatus)
(Maybe ReviewActionStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReviewActionDetail' {Maybe ReviewActionStatus
status :: Maybe ReviewActionStatus
$sel:status:ReviewActionDetail' :: ReviewActionDetail -> Maybe ReviewActionStatus
status} -> Maybe ReviewActionStatus
status) (\s :: ReviewActionDetail
s@ReviewActionDetail' {} Maybe ReviewActionStatus
a -> ReviewActionDetail
s {$sel:status:ReviewActionDetail' :: Maybe ReviewActionStatus
status = Maybe ReviewActionStatus
a} :: ReviewActionDetail)
reviewActionDetail_targetId :: Lens.Lens' ReviewActionDetail (Prelude.Maybe Prelude.Text)
reviewActionDetail_targetId :: (Maybe Text -> f (Maybe Text))
-> ReviewActionDetail -> f ReviewActionDetail
reviewActionDetail_targetId = (ReviewActionDetail -> Maybe Text)
-> (ReviewActionDetail -> Maybe Text -> ReviewActionDetail)
-> Lens
ReviewActionDetail ReviewActionDetail (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReviewActionDetail' {Maybe Text
targetId :: Maybe Text
$sel:targetId:ReviewActionDetail' :: ReviewActionDetail -> Maybe Text
targetId} -> Maybe Text
targetId) (\s :: ReviewActionDetail
s@ReviewActionDetail' {} Maybe Text
a -> ReviewActionDetail
s {$sel:targetId:ReviewActionDetail' :: Maybe Text
targetId = Maybe Text
a} :: ReviewActionDetail)
reviewActionDetail_actionId :: Lens.Lens' ReviewActionDetail (Prelude.Maybe Prelude.Text)
reviewActionDetail_actionId :: (Maybe Text -> f (Maybe Text))
-> ReviewActionDetail -> f ReviewActionDetail
reviewActionDetail_actionId = (ReviewActionDetail -> Maybe Text)
-> (ReviewActionDetail -> Maybe Text -> ReviewActionDetail)
-> Lens
ReviewActionDetail ReviewActionDetail (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReviewActionDetail' {Maybe Text
actionId :: Maybe Text
$sel:actionId:ReviewActionDetail' :: ReviewActionDetail -> Maybe Text
actionId} -> Maybe Text
actionId) (\s :: ReviewActionDetail
s@ReviewActionDetail' {} Maybe Text
a -> ReviewActionDetail
s {$sel:actionId:ReviewActionDetail' :: Maybe Text
actionId = Maybe Text
a} :: ReviewActionDetail)
reviewActionDetail_targetType :: Lens.Lens' ReviewActionDetail (Prelude.Maybe Prelude.Text)
reviewActionDetail_targetType :: (Maybe Text -> f (Maybe Text))
-> ReviewActionDetail -> f ReviewActionDetail
reviewActionDetail_targetType = (ReviewActionDetail -> Maybe Text)
-> (ReviewActionDetail -> Maybe Text -> ReviewActionDetail)
-> Lens
ReviewActionDetail ReviewActionDetail (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReviewActionDetail' {Maybe Text
targetType :: Maybe Text
$sel:targetType:ReviewActionDetail' :: ReviewActionDetail -> Maybe Text
targetType} -> Maybe Text
targetType) (\s :: ReviewActionDetail
s@ReviewActionDetail' {} Maybe Text
a -> ReviewActionDetail
s {$sel:targetType:ReviewActionDetail' :: Maybe Text
targetType = Maybe Text
a} :: ReviewActionDetail)
reviewActionDetail_result :: Lens.Lens' ReviewActionDetail (Prelude.Maybe Prelude.Text)
reviewActionDetail_result :: (Maybe Text -> f (Maybe Text))
-> ReviewActionDetail -> f ReviewActionDetail
reviewActionDetail_result = (ReviewActionDetail -> Maybe Text)
-> (ReviewActionDetail -> Maybe Text -> ReviewActionDetail)
-> Lens
ReviewActionDetail ReviewActionDetail (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReviewActionDetail' {Maybe Text
result :: Maybe Text
$sel:result:ReviewActionDetail' :: ReviewActionDetail -> Maybe Text
result} -> Maybe Text
result) (\s :: ReviewActionDetail
s@ReviewActionDetail' {} Maybe Text
a -> ReviewActionDetail
s {$sel:result:ReviewActionDetail' :: Maybe Text
result = Maybe Text
a} :: ReviewActionDetail)
reviewActionDetail_actionName :: Lens.Lens' ReviewActionDetail (Prelude.Maybe Prelude.Text)
reviewActionDetail_actionName :: (Maybe Text -> f (Maybe Text))
-> ReviewActionDetail -> f ReviewActionDetail
reviewActionDetail_actionName = (ReviewActionDetail -> Maybe Text)
-> (ReviewActionDetail -> Maybe Text -> ReviewActionDetail)
-> Lens
ReviewActionDetail ReviewActionDetail (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReviewActionDetail' {Maybe Text
actionName :: Maybe Text
$sel:actionName:ReviewActionDetail' :: ReviewActionDetail -> Maybe Text
actionName} -> Maybe Text
actionName) (\s :: ReviewActionDetail
s@ReviewActionDetail' {} Maybe Text
a -> ReviewActionDetail
s {$sel:actionName:ReviewActionDetail' :: Maybe Text
actionName = Maybe Text
a} :: ReviewActionDetail)
reviewActionDetail_completeTime :: Lens.Lens' ReviewActionDetail (Prelude.Maybe Prelude.UTCTime)
reviewActionDetail_completeTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ReviewActionDetail -> f ReviewActionDetail
reviewActionDetail_completeTime = (ReviewActionDetail -> Maybe POSIX)
-> (ReviewActionDetail -> Maybe POSIX -> ReviewActionDetail)
-> Lens
ReviewActionDetail ReviewActionDetail (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReviewActionDetail' {Maybe POSIX
completeTime :: Maybe POSIX
$sel:completeTime:ReviewActionDetail' :: ReviewActionDetail -> Maybe POSIX
completeTime} -> Maybe POSIX
completeTime) (\s :: ReviewActionDetail
s@ReviewActionDetail' {} Maybe POSIX
a -> ReviewActionDetail
s {$sel:completeTime:ReviewActionDetail' :: Maybe POSIX
completeTime = Maybe POSIX
a} :: ReviewActionDetail) ((Maybe POSIX -> f (Maybe POSIX))
-> ReviewActionDetail -> f ReviewActionDetail)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ReviewActionDetail
-> f ReviewActionDetail
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
reviewActionDetail_errorCode :: Lens.Lens' ReviewActionDetail (Prelude.Maybe Prelude.Text)
reviewActionDetail_errorCode :: (Maybe Text -> f (Maybe Text))
-> ReviewActionDetail -> f ReviewActionDetail
reviewActionDetail_errorCode = (ReviewActionDetail -> Maybe Text)
-> (ReviewActionDetail -> Maybe Text -> ReviewActionDetail)
-> Lens
ReviewActionDetail ReviewActionDetail (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReviewActionDetail' {Maybe Text
errorCode :: Maybe Text
$sel:errorCode:ReviewActionDetail' :: ReviewActionDetail -> Maybe Text
errorCode} -> Maybe Text
errorCode) (\s :: ReviewActionDetail
s@ReviewActionDetail' {} Maybe Text
a -> ReviewActionDetail
s {$sel:errorCode:ReviewActionDetail' :: Maybe Text
errorCode = Maybe Text
a} :: ReviewActionDetail)
instance Core.FromJSON ReviewActionDetail where
parseJSON :: Value -> Parser ReviewActionDetail
parseJSON =
String
-> (Object -> Parser ReviewActionDetail)
-> Value
-> Parser ReviewActionDetail
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ReviewActionDetail"
( \Object
x ->
Maybe ReviewActionStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> ReviewActionDetail
ReviewActionDetail'
(Maybe ReviewActionStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> ReviewActionDetail)
-> Parser (Maybe ReviewActionStatus)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> ReviewActionDetail)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe ReviewActionStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> ReviewActionDetail)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> ReviewActionDetail)
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
"TargetId")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> ReviewActionDetail)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> ReviewActionDetail)
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 POSIX
-> Maybe Text
-> ReviewActionDetail)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text -> Maybe POSIX -> Maybe Text -> ReviewActionDetail)
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
"TargetType")
Parser
(Maybe Text
-> Maybe Text -> Maybe POSIX -> Maybe Text -> ReviewActionDetail)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe POSIX -> Maybe Text -> ReviewActionDetail)
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
"Result")
Parser
(Maybe Text -> Maybe POSIX -> Maybe Text -> ReviewActionDetail)
-> Parser (Maybe Text)
-> Parser (Maybe POSIX -> Maybe Text -> ReviewActionDetail)
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
"ActionName")
Parser (Maybe POSIX -> Maybe Text -> ReviewActionDetail)
-> Parser (Maybe POSIX)
-> Parser (Maybe Text -> ReviewActionDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CompleteTime")
Parser (Maybe Text -> ReviewActionDetail)
-> Parser (Maybe Text) -> Parser ReviewActionDetail
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
"ErrorCode")
)
instance Prelude.Hashable ReviewActionDetail
instance Prelude.NFData ReviewActionDetail