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