{-# 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.ConformancePackInputParameter where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ConformancePackInputParameter = ConformancePackInputParameter'
{
ConformancePackInputParameter -> Text
parameterName :: Prelude.Text,
ConformancePackInputParameter -> Text
parameterValue :: Prelude.Text
}
deriving (ConformancePackInputParameter
-> ConformancePackInputParameter -> Bool
(ConformancePackInputParameter
-> ConformancePackInputParameter -> Bool)
-> (ConformancePackInputParameter
-> ConformancePackInputParameter -> Bool)
-> Eq ConformancePackInputParameter
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConformancePackInputParameter
-> ConformancePackInputParameter -> Bool
$c/= :: ConformancePackInputParameter
-> ConformancePackInputParameter -> Bool
== :: ConformancePackInputParameter
-> ConformancePackInputParameter -> Bool
$c== :: ConformancePackInputParameter
-> ConformancePackInputParameter -> Bool
Prelude.Eq, ReadPrec [ConformancePackInputParameter]
ReadPrec ConformancePackInputParameter
Int -> ReadS ConformancePackInputParameter
ReadS [ConformancePackInputParameter]
(Int -> ReadS ConformancePackInputParameter)
-> ReadS [ConformancePackInputParameter]
-> ReadPrec ConformancePackInputParameter
-> ReadPrec [ConformancePackInputParameter]
-> Read ConformancePackInputParameter
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ConformancePackInputParameter]
$creadListPrec :: ReadPrec [ConformancePackInputParameter]
readPrec :: ReadPrec ConformancePackInputParameter
$creadPrec :: ReadPrec ConformancePackInputParameter
readList :: ReadS [ConformancePackInputParameter]
$creadList :: ReadS [ConformancePackInputParameter]
readsPrec :: Int -> ReadS ConformancePackInputParameter
$creadsPrec :: Int -> ReadS ConformancePackInputParameter
Prelude.Read, Int -> ConformancePackInputParameter -> ShowS
[ConformancePackInputParameter] -> ShowS
ConformancePackInputParameter -> String
(Int -> ConformancePackInputParameter -> ShowS)
-> (ConformancePackInputParameter -> String)
-> ([ConformancePackInputParameter] -> ShowS)
-> Show ConformancePackInputParameter
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ConformancePackInputParameter] -> ShowS
$cshowList :: [ConformancePackInputParameter] -> ShowS
show :: ConformancePackInputParameter -> String
$cshow :: ConformancePackInputParameter -> String
showsPrec :: Int -> ConformancePackInputParameter -> ShowS
$cshowsPrec :: Int -> ConformancePackInputParameter -> ShowS
Prelude.Show, (forall x.
ConformancePackInputParameter
-> Rep ConformancePackInputParameter x)
-> (forall x.
Rep ConformancePackInputParameter x
-> ConformancePackInputParameter)
-> Generic ConformancePackInputParameter
forall x.
Rep ConformancePackInputParameter x
-> ConformancePackInputParameter
forall x.
ConformancePackInputParameter
-> Rep ConformancePackInputParameter x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ConformancePackInputParameter x
-> ConformancePackInputParameter
$cfrom :: forall x.
ConformancePackInputParameter
-> Rep ConformancePackInputParameter x
Prelude.Generic)
newConformancePackInputParameter ::
Prelude.Text ->
Prelude.Text ->
ConformancePackInputParameter
newConformancePackInputParameter :: Text -> Text -> ConformancePackInputParameter
newConformancePackInputParameter
Text
pParameterName_
Text
pParameterValue_ =
ConformancePackInputParameter' :: Text -> Text -> ConformancePackInputParameter
ConformancePackInputParameter'
{ $sel:parameterName:ConformancePackInputParameter' :: Text
parameterName =
Text
pParameterName_,
$sel:parameterValue:ConformancePackInputParameter' :: Text
parameterValue = Text
pParameterValue_
}
conformancePackInputParameter_parameterName :: Lens.Lens' ConformancePackInputParameter Prelude.Text
conformancePackInputParameter_parameterName :: (Text -> f Text)
-> ConformancePackInputParameter -> f ConformancePackInputParameter
conformancePackInputParameter_parameterName = (ConformancePackInputParameter -> Text)
-> (ConformancePackInputParameter
-> Text -> ConformancePackInputParameter)
-> Lens
ConformancePackInputParameter
ConformancePackInputParameter
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConformancePackInputParameter' {Text
parameterName :: Text
$sel:parameterName:ConformancePackInputParameter' :: ConformancePackInputParameter -> Text
parameterName} -> Text
parameterName) (\s :: ConformancePackInputParameter
s@ConformancePackInputParameter' {} Text
a -> ConformancePackInputParameter
s {$sel:parameterName:ConformancePackInputParameter' :: Text
parameterName = Text
a} :: ConformancePackInputParameter)
conformancePackInputParameter_parameterValue :: Lens.Lens' ConformancePackInputParameter Prelude.Text
conformancePackInputParameter_parameterValue :: (Text -> f Text)
-> ConformancePackInputParameter -> f ConformancePackInputParameter
conformancePackInputParameter_parameterValue = (ConformancePackInputParameter -> Text)
-> (ConformancePackInputParameter
-> Text -> ConformancePackInputParameter)
-> Lens
ConformancePackInputParameter
ConformancePackInputParameter
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConformancePackInputParameter' {Text
parameterValue :: Text
$sel:parameterValue:ConformancePackInputParameter' :: ConformancePackInputParameter -> Text
parameterValue} -> Text
parameterValue) (\s :: ConformancePackInputParameter
s@ConformancePackInputParameter' {} Text
a -> ConformancePackInputParameter
s {$sel:parameterValue:ConformancePackInputParameter' :: Text
parameterValue = Text
a} :: ConformancePackInputParameter)
instance Core.FromJSON ConformancePackInputParameter where
parseJSON :: Value -> Parser ConformancePackInputParameter
parseJSON =
String
-> (Object -> Parser ConformancePackInputParameter)
-> Value
-> Parser ConformancePackInputParameter
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ConformancePackInputParameter"
( \Object
x ->
Text -> Text -> ConformancePackInputParameter
ConformancePackInputParameter'
(Text -> Text -> ConformancePackInputParameter)
-> Parser Text -> Parser (Text -> ConformancePackInputParameter)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"ParameterName")
Parser (Text -> ConformancePackInputParameter)
-> Parser Text -> Parser ConformancePackInputParameter
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"ParameterValue")
)
instance
Prelude.Hashable
ConformancePackInputParameter
instance Prelude.NFData ConformancePackInputParameter
instance Core.ToJSON ConformancePackInputParameter where
toJSON :: ConformancePackInputParameter -> Value
toJSON ConformancePackInputParameter' {Text
parameterValue :: Text
parameterName :: Text
$sel:parameterValue:ConformancePackInputParameter' :: ConformancePackInputParameter -> Text
$sel:parameterName:ConformancePackInputParameter' :: ConformancePackInputParameter -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"ParameterName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
parameterName),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"ParameterValue" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
parameterValue)
]
)