{-# 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.ElasticBeanstalk.Types.ValidationMessage where
import qualified Amazonka.Core as Core
import Amazonka.ElasticBeanstalk.Types.ValidationSeverity
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ValidationMessage = ValidationMessage'
{
ValidationMessage -> Maybe Text
optionName :: Prelude.Maybe Prelude.Text,
ValidationMessage -> Maybe ValidationSeverity
severity :: Prelude.Maybe ValidationSeverity,
ValidationMessage -> Maybe Text
namespace :: Prelude.Maybe Prelude.Text,
ValidationMessage -> Maybe Text
message :: Prelude.Maybe Prelude.Text
}
deriving (ValidationMessage -> ValidationMessage -> Bool
(ValidationMessage -> ValidationMessage -> Bool)
-> (ValidationMessage -> ValidationMessage -> Bool)
-> Eq ValidationMessage
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ValidationMessage -> ValidationMessage -> Bool
$c/= :: ValidationMessage -> ValidationMessage -> Bool
== :: ValidationMessage -> ValidationMessage -> Bool
$c== :: ValidationMessage -> ValidationMessage -> Bool
Prelude.Eq, ReadPrec [ValidationMessage]
ReadPrec ValidationMessage
Int -> ReadS ValidationMessage
ReadS [ValidationMessage]
(Int -> ReadS ValidationMessage)
-> ReadS [ValidationMessage]
-> ReadPrec ValidationMessage
-> ReadPrec [ValidationMessage]
-> Read ValidationMessage
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ValidationMessage]
$creadListPrec :: ReadPrec [ValidationMessage]
readPrec :: ReadPrec ValidationMessage
$creadPrec :: ReadPrec ValidationMessage
readList :: ReadS [ValidationMessage]
$creadList :: ReadS [ValidationMessage]
readsPrec :: Int -> ReadS ValidationMessage
$creadsPrec :: Int -> ReadS ValidationMessage
Prelude.Read, Int -> ValidationMessage -> ShowS
[ValidationMessage] -> ShowS
ValidationMessage -> String
(Int -> ValidationMessage -> ShowS)
-> (ValidationMessage -> String)
-> ([ValidationMessage] -> ShowS)
-> Show ValidationMessage
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ValidationMessage] -> ShowS
$cshowList :: [ValidationMessage] -> ShowS
show :: ValidationMessage -> String
$cshow :: ValidationMessage -> String
showsPrec :: Int -> ValidationMessage -> ShowS
$cshowsPrec :: Int -> ValidationMessage -> ShowS
Prelude.Show, (forall x. ValidationMessage -> Rep ValidationMessage x)
-> (forall x. Rep ValidationMessage x -> ValidationMessage)
-> Generic ValidationMessage
forall x. Rep ValidationMessage x -> ValidationMessage
forall x. ValidationMessage -> Rep ValidationMessage x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ValidationMessage x -> ValidationMessage
$cfrom :: forall x. ValidationMessage -> Rep ValidationMessage x
Prelude.Generic)
newValidationMessage ::
ValidationMessage
newValidationMessage :: ValidationMessage
newValidationMessage =
ValidationMessage' :: Maybe Text
-> Maybe ValidationSeverity
-> Maybe Text
-> Maybe Text
-> ValidationMessage
ValidationMessage'
{ $sel:optionName:ValidationMessage' :: Maybe Text
optionName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:severity:ValidationMessage' :: Maybe ValidationSeverity
severity = Maybe ValidationSeverity
forall a. Maybe a
Prelude.Nothing,
$sel:namespace:ValidationMessage' :: Maybe Text
namespace = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:message:ValidationMessage' :: Maybe Text
message = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
validationMessage_optionName :: Lens.Lens' ValidationMessage (Prelude.Maybe Prelude.Text)
validationMessage_optionName :: (Maybe Text -> f (Maybe Text))
-> ValidationMessage -> f ValidationMessage
validationMessage_optionName = (ValidationMessage -> Maybe Text)
-> (ValidationMessage -> Maybe Text -> ValidationMessage)
-> Lens
ValidationMessage ValidationMessage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ValidationMessage' {Maybe Text
optionName :: Maybe Text
$sel:optionName:ValidationMessage' :: ValidationMessage -> Maybe Text
optionName} -> Maybe Text
optionName) (\s :: ValidationMessage
s@ValidationMessage' {} Maybe Text
a -> ValidationMessage
s {$sel:optionName:ValidationMessage' :: Maybe Text
optionName = Maybe Text
a} :: ValidationMessage)
validationMessage_severity :: Lens.Lens' ValidationMessage (Prelude.Maybe ValidationSeverity)
validationMessage_severity :: (Maybe ValidationSeverity -> f (Maybe ValidationSeverity))
-> ValidationMessage -> f ValidationMessage
validationMessage_severity = (ValidationMessage -> Maybe ValidationSeverity)
-> (ValidationMessage
-> Maybe ValidationSeverity -> ValidationMessage)
-> Lens
ValidationMessage
ValidationMessage
(Maybe ValidationSeverity)
(Maybe ValidationSeverity)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ValidationMessage' {Maybe ValidationSeverity
severity :: Maybe ValidationSeverity
$sel:severity:ValidationMessage' :: ValidationMessage -> Maybe ValidationSeverity
severity} -> Maybe ValidationSeverity
severity) (\s :: ValidationMessage
s@ValidationMessage' {} Maybe ValidationSeverity
a -> ValidationMessage
s {$sel:severity:ValidationMessage' :: Maybe ValidationSeverity
severity = Maybe ValidationSeverity
a} :: ValidationMessage)
validationMessage_namespace :: Lens.Lens' ValidationMessage (Prelude.Maybe Prelude.Text)
validationMessage_namespace :: (Maybe Text -> f (Maybe Text))
-> ValidationMessage -> f ValidationMessage
validationMessage_namespace = (ValidationMessage -> Maybe Text)
-> (ValidationMessage -> Maybe Text -> ValidationMessage)
-> Lens
ValidationMessage ValidationMessage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ValidationMessage' {Maybe Text
namespace :: Maybe Text
$sel:namespace:ValidationMessage' :: ValidationMessage -> Maybe Text
namespace} -> Maybe Text
namespace) (\s :: ValidationMessage
s@ValidationMessage' {} Maybe Text
a -> ValidationMessage
s {$sel:namespace:ValidationMessage' :: Maybe Text
namespace = Maybe Text
a} :: ValidationMessage)
validationMessage_message :: Lens.Lens' ValidationMessage (Prelude.Maybe Prelude.Text)
validationMessage_message :: (Maybe Text -> f (Maybe Text))
-> ValidationMessage -> f ValidationMessage
validationMessage_message = (ValidationMessage -> Maybe Text)
-> (ValidationMessage -> Maybe Text -> ValidationMessage)
-> Lens
ValidationMessage ValidationMessage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ValidationMessage' {Maybe Text
message :: Maybe Text
$sel:message:ValidationMessage' :: ValidationMessage -> Maybe Text
message} -> Maybe Text
message) (\s :: ValidationMessage
s@ValidationMessage' {} Maybe Text
a -> ValidationMessage
s {$sel:message:ValidationMessage' :: Maybe Text
message = Maybe Text
a} :: ValidationMessage)
instance Core.FromXML ValidationMessage where
parseXML :: [Node] -> Either String ValidationMessage
parseXML [Node]
x =
Maybe Text
-> Maybe ValidationSeverity
-> Maybe Text
-> Maybe Text
-> ValidationMessage
ValidationMessage'
(Maybe Text
-> Maybe ValidationSeverity
-> Maybe Text
-> Maybe Text
-> ValidationMessage)
-> Either String (Maybe Text)
-> Either
String
(Maybe ValidationSeverity
-> Maybe Text -> Maybe Text -> ValidationMessage)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"OptionName")
Either
String
(Maybe ValidationSeverity
-> Maybe Text -> Maybe Text -> ValidationMessage)
-> Either String (Maybe ValidationSeverity)
-> Either String (Maybe Text -> Maybe Text -> ValidationMessage)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe ValidationSeverity)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Severity")
Either String (Maybe Text -> Maybe Text -> ValidationMessage)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> ValidationMessage)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Namespace")
Either String (Maybe Text -> ValidationMessage)
-> Either String (Maybe Text) -> Either String ValidationMessage
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Message")
instance Prelude.Hashable ValidationMessage
instance Prelude.NFData ValidationMessage