{-# 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.MemoryDb.Types.Parameter where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data Parameter = Parameter'
{
Parameter -> Maybe Text
value :: Prelude.Maybe Prelude.Text,
Parameter -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
Parameter -> Maybe Text
minimumEngineVersion :: Prelude.Maybe Prelude.Text,
Parameter -> Maybe Text
dataType :: Prelude.Maybe Prelude.Text,
Parameter -> Maybe Text
allowedValues :: Prelude.Maybe Prelude.Text,
Parameter -> Maybe Text
description :: Prelude.Maybe Prelude.Text
}
deriving (Parameter -> Parameter -> Bool
(Parameter -> Parameter -> Bool)
-> (Parameter -> Parameter -> Bool) -> Eq Parameter
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Parameter -> Parameter -> Bool
$c/= :: Parameter -> Parameter -> Bool
== :: Parameter -> Parameter -> Bool
$c== :: Parameter -> Parameter -> Bool
Prelude.Eq, ReadPrec [Parameter]
ReadPrec Parameter
Int -> ReadS Parameter
ReadS [Parameter]
(Int -> ReadS Parameter)
-> ReadS [Parameter]
-> ReadPrec Parameter
-> ReadPrec [Parameter]
-> Read Parameter
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Parameter]
$creadListPrec :: ReadPrec [Parameter]
readPrec :: ReadPrec Parameter
$creadPrec :: ReadPrec Parameter
readList :: ReadS [Parameter]
$creadList :: ReadS [Parameter]
readsPrec :: Int -> ReadS Parameter
$creadsPrec :: Int -> ReadS Parameter
Prelude.Read, Int -> Parameter -> ShowS
[Parameter] -> ShowS
Parameter -> String
(Int -> Parameter -> ShowS)
-> (Parameter -> String)
-> ([Parameter] -> ShowS)
-> Show Parameter
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Parameter] -> ShowS
$cshowList :: [Parameter] -> ShowS
show :: Parameter -> String
$cshow :: Parameter -> String
showsPrec :: Int -> Parameter -> ShowS
$cshowsPrec :: Int -> Parameter -> ShowS
Prelude.Show, (forall x. Parameter -> Rep Parameter x)
-> (forall x. Rep Parameter x -> Parameter) -> Generic Parameter
forall x. Rep Parameter x -> Parameter
forall x. Parameter -> Rep Parameter x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Parameter x -> Parameter
$cfrom :: forall x. Parameter -> Rep Parameter x
Prelude.Generic)
newParameter ::
Parameter
newParameter :: Parameter
newParameter =
Parameter' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Parameter
Parameter'
{ $sel:value:Parameter' :: Maybe Text
value = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:Parameter' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:minimumEngineVersion:Parameter' :: Maybe Text
minimumEngineVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:dataType:Parameter' :: Maybe Text
dataType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:allowedValues:Parameter' :: Maybe Text
allowedValues = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:description:Parameter' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
parameter_value :: Lens.Lens' Parameter (Prelude.Maybe Prelude.Text)
parameter_value :: (Maybe Text -> f (Maybe Text)) -> Parameter -> f Parameter
parameter_value = (Parameter -> Maybe Text)
-> (Parameter -> Maybe Text -> Parameter)
-> Lens Parameter Parameter (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Parameter' {Maybe Text
value :: Maybe Text
$sel:value:Parameter' :: Parameter -> Maybe Text
value} -> Maybe Text
value) (\s :: Parameter
s@Parameter' {} Maybe Text
a -> Parameter
s {$sel:value:Parameter' :: Maybe Text
value = Maybe Text
a} :: Parameter)
parameter_name :: Lens.Lens' Parameter (Prelude.Maybe Prelude.Text)
parameter_name :: (Maybe Text -> f (Maybe Text)) -> Parameter -> f Parameter
parameter_name = (Parameter -> Maybe Text)
-> (Parameter -> Maybe Text -> Parameter)
-> Lens Parameter Parameter (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Parameter' {Maybe Text
name :: Maybe Text
$sel:name:Parameter' :: Parameter -> Maybe Text
name} -> Maybe Text
name) (\s :: Parameter
s@Parameter' {} Maybe Text
a -> Parameter
s {$sel:name:Parameter' :: Maybe Text
name = Maybe Text
a} :: Parameter)
parameter_minimumEngineVersion :: Lens.Lens' Parameter (Prelude.Maybe Prelude.Text)
parameter_minimumEngineVersion :: (Maybe Text -> f (Maybe Text)) -> Parameter -> f Parameter
parameter_minimumEngineVersion = (Parameter -> Maybe Text)
-> (Parameter -> Maybe Text -> Parameter)
-> Lens Parameter Parameter (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Parameter' {Maybe Text
minimumEngineVersion :: Maybe Text
$sel:minimumEngineVersion:Parameter' :: Parameter -> Maybe Text
minimumEngineVersion} -> Maybe Text
minimumEngineVersion) (\s :: Parameter
s@Parameter' {} Maybe Text
a -> Parameter
s {$sel:minimumEngineVersion:Parameter' :: Maybe Text
minimumEngineVersion = Maybe Text
a} :: Parameter)
parameter_dataType :: Lens.Lens' Parameter (Prelude.Maybe Prelude.Text)
parameter_dataType :: (Maybe Text -> f (Maybe Text)) -> Parameter -> f Parameter
parameter_dataType = (Parameter -> Maybe Text)
-> (Parameter -> Maybe Text -> Parameter)
-> Lens Parameter Parameter (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Parameter' {Maybe Text
dataType :: Maybe Text
$sel:dataType:Parameter' :: Parameter -> Maybe Text
dataType} -> Maybe Text
dataType) (\s :: Parameter
s@Parameter' {} Maybe Text
a -> Parameter
s {$sel:dataType:Parameter' :: Maybe Text
dataType = Maybe Text
a} :: Parameter)
parameter_allowedValues :: Lens.Lens' Parameter (Prelude.Maybe Prelude.Text)
parameter_allowedValues :: (Maybe Text -> f (Maybe Text)) -> Parameter -> f Parameter
parameter_allowedValues = (Parameter -> Maybe Text)
-> (Parameter -> Maybe Text -> Parameter)
-> Lens Parameter Parameter (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Parameter' {Maybe Text
allowedValues :: Maybe Text
$sel:allowedValues:Parameter' :: Parameter -> Maybe Text
allowedValues} -> Maybe Text
allowedValues) (\s :: Parameter
s@Parameter' {} Maybe Text
a -> Parameter
s {$sel:allowedValues:Parameter' :: Maybe Text
allowedValues = Maybe Text
a} :: Parameter)
parameter_description :: Lens.Lens' Parameter (Prelude.Maybe Prelude.Text)
parameter_description :: (Maybe Text -> f (Maybe Text)) -> Parameter -> f Parameter
parameter_description = (Parameter -> Maybe Text)
-> (Parameter -> Maybe Text -> Parameter)
-> Lens Parameter Parameter (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Parameter' {Maybe Text
description :: Maybe Text
$sel:description:Parameter' :: Parameter -> Maybe Text
description} -> Maybe Text
description) (\s :: Parameter
s@Parameter' {} Maybe Text
a -> Parameter
s {$sel:description:Parameter' :: Maybe Text
description = Maybe Text
a} :: Parameter)
instance Core.FromJSON Parameter where
parseJSON :: Value -> Parser Parameter
parseJSON =
String -> (Object -> Parser Parameter) -> Value -> Parser Parameter
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"Parameter"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Parameter
Parameter'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Parameter)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Parameter)
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
"Value")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Parameter)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Parameter)
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
"Name")
Parser
(Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Parameter)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> Maybe Text -> Parameter)
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
"MinimumEngineVersion")
Parser (Maybe Text -> Maybe Text -> Maybe Text -> Parameter)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> Parameter)
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
"DataType")
Parser (Maybe Text -> Maybe Text -> Parameter)
-> Parser (Maybe Text) -> Parser (Maybe Text -> Parameter)
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
"AllowedValues")
Parser (Maybe Text -> Parameter)
-> Parser (Maybe Text) -> Parser Parameter
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
"Description")
)
instance Prelude.Hashable Parameter
instance Prelude.NFData Parameter