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