{-# 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.WellArchitected.Types.QuestionDifference where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import Amazonka.WellArchitected.Types.DifferenceStatus
data QuestionDifference = QuestionDifference'
{
QuestionDifference -> Maybe DifferenceStatus
differenceStatus :: Prelude.Maybe DifferenceStatus,
QuestionDifference -> Maybe Text
questionId :: Prelude.Maybe Prelude.Text,
QuestionDifference -> Maybe Text
questionTitle :: Prelude.Maybe Prelude.Text
}
deriving (QuestionDifference -> QuestionDifference -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: QuestionDifference -> QuestionDifference -> Bool
$c/= :: QuestionDifference -> QuestionDifference -> Bool
== :: QuestionDifference -> QuestionDifference -> Bool
$c== :: QuestionDifference -> QuestionDifference -> Bool
Prelude.Eq, ReadPrec [QuestionDifference]
ReadPrec QuestionDifference
Int -> ReadS QuestionDifference
ReadS [QuestionDifference]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [QuestionDifference]
$creadListPrec :: ReadPrec [QuestionDifference]
readPrec :: ReadPrec QuestionDifference
$creadPrec :: ReadPrec QuestionDifference
readList :: ReadS [QuestionDifference]
$creadList :: ReadS [QuestionDifference]
readsPrec :: Int -> ReadS QuestionDifference
$creadsPrec :: Int -> ReadS QuestionDifference
Prelude.Read, Int -> QuestionDifference -> ShowS
[QuestionDifference] -> ShowS
QuestionDifference -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [QuestionDifference] -> ShowS
$cshowList :: [QuestionDifference] -> ShowS
show :: QuestionDifference -> String
$cshow :: QuestionDifference -> String
showsPrec :: Int -> QuestionDifference -> ShowS
$cshowsPrec :: Int -> QuestionDifference -> ShowS
Prelude.Show, forall x. Rep QuestionDifference x -> QuestionDifference
forall x. QuestionDifference -> Rep QuestionDifference x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep QuestionDifference x -> QuestionDifference
$cfrom :: forall x. QuestionDifference -> Rep QuestionDifference x
Prelude.Generic)
newQuestionDifference ::
QuestionDifference
newQuestionDifference :: QuestionDifference
newQuestionDifference =
QuestionDifference'
{ $sel:differenceStatus:QuestionDifference' :: Maybe DifferenceStatus
differenceStatus =
forall a. Maybe a
Prelude.Nothing,
$sel:questionId:QuestionDifference' :: Maybe Text
questionId = forall a. Maybe a
Prelude.Nothing,
$sel:questionTitle:QuestionDifference' :: Maybe Text
questionTitle = forall a. Maybe a
Prelude.Nothing
}
questionDifference_differenceStatus :: Lens.Lens' QuestionDifference (Prelude.Maybe DifferenceStatus)
questionDifference_differenceStatus :: Lens' QuestionDifference (Maybe DifferenceStatus)
questionDifference_differenceStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\QuestionDifference' {Maybe DifferenceStatus
differenceStatus :: Maybe DifferenceStatus
$sel:differenceStatus:QuestionDifference' :: QuestionDifference -> Maybe DifferenceStatus
differenceStatus} -> Maybe DifferenceStatus
differenceStatus) (\s :: QuestionDifference
s@QuestionDifference' {} Maybe DifferenceStatus
a -> QuestionDifference
s {$sel:differenceStatus:QuestionDifference' :: Maybe DifferenceStatus
differenceStatus = Maybe DifferenceStatus
a} :: QuestionDifference)
questionDifference_questionId :: Lens.Lens' QuestionDifference (Prelude.Maybe Prelude.Text)
questionDifference_questionId :: Lens' QuestionDifference (Maybe Text)
questionDifference_questionId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\QuestionDifference' {Maybe Text
questionId :: Maybe Text
$sel:questionId:QuestionDifference' :: QuestionDifference -> Maybe Text
questionId} -> Maybe Text
questionId) (\s :: QuestionDifference
s@QuestionDifference' {} Maybe Text
a -> QuestionDifference
s {$sel:questionId:QuestionDifference' :: Maybe Text
questionId = Maybe Text
a} :: QuestionDifference)
questionDifference_questionTitle :: Lens.Lens' QuestionDifference (Prelude.Maybe Prelude.Text)
questionDifference_questionTitle :: Lens' QuestionDifference (Maybe Text)
questionDifference_questionTitle = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\QuestionDifference' {Maybe Text
questionTitle :: Maybe Text
$sel:questionTitle:QuestionDifference' :: QuestionDifference -> Maybe Text
questionTitle} -> Maybe Text
questionTitle) (\s :: QuestionDifference
s@QuestionDifference' {} Maybe Text
a -> QuestionDifference
s {$sel:questionTitle:QuestionDifference' :: Maybe Text
questionTitle = Maybe Text
a} :: QuestionDifference)
instance Data.FromJSON QuestionDifference where
parseJSON :: Value -> Parser QuestionDifference
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"QuestionDifference"
( \Object
x ->
Maybe DifferenceStatus
-> Maybe Text -> Maybe Text -> QuestionDifference
QuestionDifference'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"DifferenceStatus")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"QuestionId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"QuestionTitle")
)
instance Prelude.Hashable QuestionDifference where
hashWithSalt :: Int -> QuestionDifference -> Int
hashWithSalt Int
_salt QuestionDifference' {Maybe Text
Maybe DifferenceStatus
questionTitle :: Maybe Text
questionId :: Maybe Text
differenceStatus :: Maybe DifferenceStatus
$sel:questionTitle:QuestionDifference' :: QuestionDifference -> Maybe Text
$sel:questionId:QuestionDifference' :: QuestionDifference -> Maybe Text
$sel:differenceStatus:QuestionDifference' :: QuestionDifference -> Maybe DifferenceStatus
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DifferenceStatus
differenceStatus
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
questionId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
questionTitle
instance Prelude.NFData QuestionDifference where
rnf :: QuestionDifference -> ()
rnf QuestionDifference' {Maybe Text
Maybe DifferenceStatus
questionTitle :: Maybe Text
questionId :: Maybe Text
differenceStatus :: Maybe DifferenceStatus
$sel:questionTitle:QuestionDifference' :: QuestionDifference -> Maybe Text
$sel:questionId:QuestionDifference' :: QuestionDifference -> Maybe Text
$sel:differenceStatus:QuestionDifference' :: QuestionDifference -> Maybe DifferenceStatus
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe DifferenceStatus
differenceStatus
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
questionId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
questionTitle