{-# 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.SESV2.Types.ReviewDetails where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SESV2.Types.ReviewStatus
data ReviewDetails = ReviewDetails'
{
ReviewDetails -> Maybe ReviewStatus
status :: Prelude.Maybe ReviewStatus,
ReviewDetails -> Maybe Text
caseId :: Prelude.Maybe Prelude.Text
}
deriving (ReviewDetails -> ReviewDetails -> Bool
(ReviewDetails -> ReviewDetails -> Bool)
-> (ReviewDetails -> ReviewDetails -> Bool) -> Eq ReviewDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ReviewDetails -> ReviewDetails -> Bool
$c/= :: ReviewDetails -> ReviewDetails -> Bool
== :: ReviewDetails -> ReviewDetails -> Bool
$c== :: ReviewDetails -> ReviewDetails -> Bool
Prelude.Eq, ReadPrec [ReviewDetails]
ReadPrec ReviewDetails
Int -> ReadS ReviewDetails
ReadS [ReviewDetails]
(Int -> ReadS ReviewDetails)
-> ReadS [ReviewDetails]
-> ReadPrec ReviewDetails
-> ReadPrec [ReviewDetails]
-> Read ReviewDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ReviewDetails]
$creadListPrec :: ReadPrec [ReviewDetails]
readPrec :: ReadPrec ReviewDetails
$creadPrec :: ReadPrec ReviewDetails
readList :: ReadS [ReviewDetails]
$creadList :: ReadS [ReviewDetails]
readsPrec :: Int -> ReadS ReviewDetails
$creadsPrec :: Int -> ReadS ReviewDetails
Prelude.Read, Int -> ReviewDetails -> ShowS
[ReviewDetails] -> ShowS
ReviewDetails -> String
(Int -> ReviewDetails -> ShowS)
-> (ReviewDetails -> String)
-> ([ReviewDetails] -> ShowS)
-> Show ReviewDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ReviewDetails] -> ShowS
$cshowList :: [ReviewDetails] -> ShowS
show :: ReviewDetails -> String
$cshow :: ReviewDetails -> String
showsPrec :: Int -> ReviewDetails -> ShowS
$cshowsPrec :: Int -> ReviewDetails -> ShowS
Prelude.Show, (forall x. ReviewDetails -> Rep ReviewDetails x)
-> (forall x. Rep ReviewDetails x -> ReviewDetails)
-> Generic ReviewDetails
forall x. Rep ReviewDetails x -> ReviewDetails
forall x. ReviewDetails -> Rep ReviewDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ReviewDetails x -> ReviewDetails
$cfrom :: forall x. ReviewDetails -> Rep ReviewDetails x
Prelude.Generic)
newReviewDetails ::
ReviewDetails
newReviewDetails :: ReviewDetails
newReviewDetails =
ReviewDetails' :: Maybe ReviewStatus -> Maybe Text -> ReviewDetails
ReviewDetails'
{ $sel:status:ReviewDetails' :: Maybe ReviewStatus
status = Maybe ReviewStatus
forall a. Maybe a
Prelude.Nothing,
$sel:caseId:ReviewDetails' :: Maybe Text
caseId = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
reviewDetails_status :: Lens.Lens' ReviewDetails (Prelude.Maybe ReviewStatus)
reviewDetails_status :: (Maybe ReviewStatus -> f (Maybe ReviewStatus))
-> ReviewDetails -> f ReviewDetails
reviewDetails_status = (ReviewDetails -> Maybe ReviewStatus)
-> (ReviewDetails -> Maybe ReviewStatus -> ReviewDetails)
-> Lens
ReviewDetails
ReviewDetails
(Maybe ReviewStatus)
(Maybe ReviewStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReviewDetails' {Maybe ReviewStatus
status :: Maybe ReviewStatus
$sel:status:ReviewDetails' :: ReviewDetails -> Maybe ReviewStatus
status} -> Maybe ReviewStatus
status) (\s :: ReviewDetails
s@ReviewDetails' {} Maybe ReviewStatus
a -> ReviewDetails
s {$sel:status:ReviewDetails' :: Maybe ReviewStatus
status = Maybe ReviewStatus
a} :: ReviewDetails)
reviewDetails_caseId :: Lens.Lens' ReviewDetails (Prelude.Maybe Prelude.Text)
reviewDetails_caseId :: (Maybe Text -> f (Maybe Text)) -> ReviewDetails -> f ReviewDetails
reviewDetails_caseId = (ReviewDetails -> Maybe Text)
-> (ReviewDetails -> Maybe Text -> ReviewDetails)
-> Lens ReviewDetails ReviewDetails (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReviewDetails' {Maybe Text
caseId :: Maybe Text
$sel:caseId:ReviewDetails' :: ReviewDetails -> Maybe Text
caseId} -> Maybe Text
caseId) (\s :: ReviewDetails
s@ReviewDetails' {} Maybe Text
a -> ReviewDetails
s {$sel:caseId:ReviewDetails' :: Maybe Text
caseId = Maybe Text
a} :: ReviewDetails)
instance Core.FromJSON ReviewDetails where
parseJSON :: Value -> Parser ReviewDetails
parseJSON =
String
-> (Object -> Parser ReviewDetails)
-> Value
-> Parser ReviewDetails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ReviewDetails"
( \Object
x ->
Maybe ReviewStatus -> Maybe Text -> ReviewDetails
ReviewDetails'
(Maybe ReviewStatus -> Maybe Text -> ReviewDetails)
-> Parser (Maybe ReviewStatus)
-> Parser (Maybe Text -> ReviewDetails)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe ReviewStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
Parser (Maybe Text -> ReviewDetails)
-> Parser (Maybe Text) -> Parser ReviewDetails
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
"CaseId")
)
instance Prelude.Hashable ReviewDetails
instance Prelude.NFData ReviewDetails