{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data ConformancePackInputParameter = ConformancePackInputParameter'
{
ConformancePackInputParameter -> Text
parameterName :: Prelude.Text,
ConformancePackInputParameter -> Text
parameterValue :: Prelude.Text
}
deriving (ConformancePackInputParameter
-> ConformancePackInputParameter -> Bool
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]
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
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.
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'
{ $sel:parameterName:ConformancePackInputParameter' :: Text
parameterName =
Text
pParameterName_,
$sel:parameterValue:ConformancePackInputParameter' :: Text
parameterValue = Text
pParameterValue_
}
conformancePackInputParameter_parameterName :: Lens.Lens' ConformancePackInputParameter Prelude.Text
conformancePackInputParameter_parameterName :: Lens' ConformancePackInputParameter Text
conformancePackInputParameter_parameterName = 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 :: Lens' ConformancePackInputParameter Text
conformancePackInputParameter_parameterValue = 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 Data.FromJSON ConformancePackInputParameter where
parseJSON :: Value -> Parser ConformancePackInputParameter
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ConformancePackInputParameter"
( \Object
x ->
Text -> Text -> ConformancePackInputParameter
ConformancePackInputParameter'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"ParameterName")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"ParameterValue")
)
instance
Prelude.Hashable
ConformancePackInputParameter
where
hashWithSalt :: Int -> ConformancePackInputParameter -> Int
hashWithSalt Int
_salt ConformancePackInputParameter' {Text
parameterValue :: Text
parameterName :: Text
$sel:parameterValue:ConformancePackInputParameter' :: ConformancePackInputParameter -> Text
$sel:parameterName:ConformancePackInputParameter' :: ConformancePackInputParameter -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
parameterName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
parameterValue
instance Prelude.NFData ConformancePackInputParameter where
rnf :: ConformancePackInputParameter -> ()
rnf ConformancePackInputParameter' {Text
parameterValue :: Text
parameterName :: Text
$sel:parameterValue:ConformancePackInputParameter' :: ConformancePackInputParameter -> Text
$sel:parameterName:ConformancePackInputParameter' :: ConformancePackInputParameter -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
parameterName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
parameterValue
instance Data.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
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just
(Key
"ParameterName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
parameterName),
forall a. a -> Maybe a
Prelude.Just
(Key
"ParameterValue" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
parameterValue)
]
)