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