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