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