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