{-# 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.CloudWatch.Types.DashboardValidationMessage where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data DashboardValidationMessage = DashboardValidationMessage'
{
DashboardValidationMessage -> Maybe Text
dataPath :: Prelude.Maybe Prelude.Text,
DashboardValidationMessage -> Maybe Text
message :: Prelude.Maybe Prelude.Text
}
deriving (DashboardValidationMessage -> DashboardValidationMessage -> Bool
(DashboardValidationMessage -> DashboardValidationMessage -> Bool)
-> (DashboardValidationMessage
-> DashboardValidationMessage -> Bool)
-> Eq DashboardValidationMessage
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DashboardValidationMessage -> DashboardValidationMessage -> Bool
$c/= :: DashboardValidationMessage -> DashboardValidationMessage -> Bool
== :: DashboardValidationMessage -> DashboardValidationMessage -> Bool
$c== :: DashboardValidationMessage -> DashboardValidationMessage -> Bool
Prelude.Eq, ReadPrec [DashboardValidationMessage]
ReadPrec DashboardValidationMessage
Int -> ReadS DashboardValidationMessage
ReadS [DashboardValidationMessage]
(Int -> ReadS DashboardValidationMessage)
-> ReadS [DashboardValidationMessage]
-> ReadPrec DashboardValidationMessage
-> ReadPrec [DashboardValidationMessage]
-> Read DashboardValidationMessage
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DashboardValidationMessage]
$creadListPrec :: ReadPrec [DashboardValidationMessage]
readPrec :: ReadPrec DashboardValidationMessage
$creadPrec :: ReadPrec DashboardValidationMessage
readList :: ReadS [DashboardValidationMessage]
$creadList :: ReadS [DashboardValidationMessage]
readsPrec :: Int -> ReadS DashboardValidationMessage
$creadsPrec :: Int -> ReadS DashboardValidationMessage
Prelude.Read, Int -> DashboardValidationMessage -> ShowS
[DashboardValidationMessage] -> ShowS
DashboardValidationMessage -> String
(Int -> DashboardValidationMessage -> ShowS)
-> (DashboardValidationMessage -> String)
-> ([DashboardValidationMessage] -> ShowS)
-> Show DashboardValidationMessage
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DashboardValidationMessage] -> ShowS
$cshowList :: [DashboardValidationMessage] -> ShowS
show :: DashboardValidationMessage -> String
$cshow :: DashboardValidationMessage -> String
showsPrec :: Int -> DashboardValidationMessage -> ShowS
$cshowsPrec :: Int -> DashboardValidationMessage -> ShowS
Prelude.Show, (forall x.
DashboardValidationMessage -> Rep DashboardValidationMessage x)
-> (forall x.
Rep DashboardValidationMessage x -> DashboardValidationMessage)
-> Generic DashboardValidationMessage
forall x.
Rep DashboardValidationMessage x -> DashboardValidationMessage
forall x.
DashboardValidationMessage -> Rep DashboardValidationMessage x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DashboardValidationMessage x -> DashboardValidationMessage
$cfrom :: forall x.
DashboardValidationMessage -> Rep DashboardValidationMessage x
Prelude.Generic)
newDashboardValidationMessage ::
DashboardValidationMessage
newDashboardValidationMessage :: DashboardValidationMessage
newDashboardValidationMessage =
DashboardValidationMessage' :: Maybe Text -> Maybe Text -> DashboardValidationMessage
DashboardValidationMessage'
{ $sel:dataPath:DashboardValidationMessage' :: Maybe Text
dataPath =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:message:DashboardValidationMessage' :: Maybe Text
message = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
dashboardValidationMessage_dataPath :: Lens.Lens' DashboardValidationMessage (Prelude.Maybe Prelude.Text)
dashboardValidationMessage_dataPath :: (Maybe Text -> f (Maybe Text))
-> DashboardValidationMessage -> f DashboardValidationMessage
dashboardValidationMessage_dataPath = (DashboardValidationMessage -> Maybe Text)
-> (DashboardValidationMessage
-> Maybe Text -> DashboardValidationMessage)
-> Lens
DashboardValidationMessage
DashboardValidationMessage
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DashboardValidationMessage' {Maybe Text
dataPath :: Maybe Text
$sel:dataPath:DashboardValidationMessage' :: DashboardValidationMessage -> Maybe Text
dataPath} -> Maybe Text
dataPath) (\s :: DashboardValidationMessage
s@DashboardValidationMessage' {} Maybe Text
a -> DashboardValidationMessage
s {$sel:dataPath:DashboardValidationMessage' :: Maybe Text
dataPath = Maybe Text
a} :: DashboardValidationMessage)
dashboardValidationMessage_message :: Lens.Lens' DashboardValidationMessage (Prelude.Maybe Prelude.Text)
dashboardValidationMessage_message :: (Maybe Text -> f (Maybe Text))
-> DashboardValidationMessage -> f DashboardValidationMessage
dashboardValidationMessage_message = (DashboardValidationMessage -> Maybe Text)
-> (DashboardValidationMessage
-> Maybe Text -> DashboardValidationMessage)
-> Lens
DashboardValidationMessage
DashboardValidationMessage
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DashboardValidationMessage' {Maybe Text
message :: Maybe Text
$sel:message:DashboardValidationMessage' :: DashboardValidationMessage -> Maybe Text
message} -> Maybe Text
message) (\s :: DashboardValidationMessage
s@DashboardValidationMessage' {} Maybe Text
a -> DashboardValidationMessage
s {$sel:message:DashboardValidationMessage' :: Maybe Text
message = Maybe Text
a} :: DashboardValidationMessage)
instance Core.FromXML DashboardValidationMessage where
parseXML :: [Node] -> Either String DashboardValidationMessage
parseXML [Node]
x =
Maybe Text -> Maybe Text -> DashboardValidationMessage
DashboardValidationMessage'
(Maybe Text -> Maybe Text -> DashboardValidationMessage)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> DashboardValidationMessage)
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
"DataPath")
Either String (Maybe Text -> DashboardValidationMessage)
-> Either String (Maybe Text)
-> Either String DashboardValidationMessage
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 DashboardValidationMessage
instance Prelude.NFData DashboardValidationMessage