{-# 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.Parameter where
import qualified Amazonka.Core as Core
import Amazonka.DAX.Types.ChangeType
import Amazonka.DAX.Types.IsModifiable
import Amazonka.DAX.Types.NodeTypeSpecificValue
import Amazonka.DAX.Types.ParameterType
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data Parameter = Parameter'
{
Parameter -> Maybe Text
parameterValue :: Prelude.Maybe Prelude.Text,
Parameter -> Maybe ParameterType
parameterType :: Prelude.Maybe ParameterType,
Parameter -> Maybe Text
source :: Prelude.Maybe Prelude.Text,
Parameter -> Maybe IsModifiable
isModifiable :: Prelude.Maybe IsModifiable,
Parameter -> Maybe Text
dataType :: Prelude.Maybe Prelude.Text,
Parameter -> Maybe [NodeTypeSpecificValue]
nodeTypeSpecificValues :: Prelude.Maybe [NodeTypeSpecificValue],
Parameter -> Maybe Text
allowedValues :: Prelude.Maybe Prelude.Text,
Parameter -> Maybe Text
parameterName :: Prelude.Maybe Prelude.Text,
Parameter -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
Parameter -> Maybe ChangeType
changeType :: Prelude.Maybe ChangeType
}
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 ParameterType
-> Maybe Text
-> Maybe IsModifiable
-> Maybe Text
-> Maybe [NodeTypeSpecificValue]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ChangeType
-> Parameter
Parameter'
{ $sel:parameterValue:Parameter' :: Maybe Text
parameterValue = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:parameterType:Parameter' :: Maybe ParameterType
parameterType = Maybe ParameterType
forall a. Maybe a
Prelude.Nothing,
$sel:source:Parameter' :: Maybe Text
source = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:isModifiable:Parameter' :: Maybe IsModifiable
isModifiable = Maybe IsModifiable
forall a. Maybe a
Prelude.Nothing,
$sel:dataType:Parameter' :: Maybe Text
dataType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:nodeTypeSpecificValues:Parameter' :: Maybe [NodeTypeSpecificValue]
nodeTypeSpecificValues = Maybe [NodeTypeSpecificValue]
forall a. Maybe a
Prelude.Nothing,
$sel:allowedValues:Parameter' :: Maybe Text
allowedValues = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:parameterName:Parameter' :: Maybe Text
parameterName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:description:Parameter' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:changeType:Parameter' :: Maybe ChangeType
changeType = Maybe ChangeType
forall a. Maybe a
Prelude.Nothing
}
parameter_parameterValue :: Lens.Lens' Parameter (Prelude.Maybe Prelude.Text)
parameter_parameterValue :: (Maybe Text -> f (Maybe Text)) -> Parameter -> f Parameter
parameter_parameterValue = (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
parameterValue :: Maybe Text
$sel:parameterValue:Parameter' :: Parameter -> Maybe Text
parameterValue} -> Maybe Text
parameterValue) (\s :: Parameter
s@Parameter' {} Maybe Text
a -> Parameter
s {$sel:parameterValue:Parameter' :: Maybe Text
parameterValue = Maybe Text
a} :: Parameter)
parameter_parameterType :: Lens.Lens' Parameter (Prelude.Maybe ParameterType)
parameter_parameterType :: (Maybe ParameterType -> f (Maybe ParameterType))
-> Parameter -> f Parameter
parameter_parameterType = (Parameter -> Maybe ParameterType)
-> (Parameter -> Maybe ParameterType -> Parameter)
-> Lens
Parameter Parameter (Maybe ParameterType) (Maybe ParameterType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Parameter' {Maybe ParameterType
parameterType :: Maybe ParameterType
$sel:parameterType:Parameter' :: Parameter -> Maybe ParameterType
parameterType} -> Maybe ParameterType
parameterType) (\s :: Parameter
s@Parameter' {} Maybe ParameterType
a -> Parameter
s {$sel:parameterType:Parameter' :: Maybe ParameterType
parameterType = Maybe ParameterType
a} :: Parameter)
parameter_source :: Lens.Lens' Parameter (Prelude.Maybe Prelude.Text)
parameter_source :: (Maybe Text -> f (Maybe Text)) -> Parameter -> f Parameter
parameter_source = (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
source :: Maybe Text
$sel:source:Parameter' :: Parameter -> Maybe Text
source} -> Maybe Text
source) (\s :: Parameter
s@Parameter' {} Maybe Text
a -> Parameter
s {$sel:source:Parameter' :: Maybe Text
source = Maybe Text
a} :: Parameter)
parameter_isModifiable :: Lens.Lens' Parameter (Prelude.Maybe IsModifiable)
parameter_isModifiable :: (Maybe IsModifiable -> f (Maybe IsModifiable))
-> Parameter -> f Parameter
parameter_isModifiable = (Parameter -> Maybe IsModifiable)
-> (Parameter -> Maybe IsModifiable -> Parameter)
-> Lens
Parameter Parameter (Maybe IsModifiable) (Maybe IsModifiable)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Parameter' {Maybe IsModifiable
isModifiable :: Maybe IsModifiable
$sel:isModifiable:Parameter' :: Parameter -> Maybe IsModifiable
isModifiable} -> Maybe IsModifiable
isModifiable) (\s :: Parameter
s@Parameter' {} Maybe IsModifiable
a -> Parameter
s {$sel:isModifiable:Parameter' :: Maybe IsModifiable
isModifiable = Maybe IsModifiable
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_nodeTypeSpecificValues :: Lens.Lens' Parameter (Prelude.Maybe [NodeTypeSpecificValue])
parameter_nodeTypeSpecificValues :: (Maybe [NodeTypeSpecificValue]
-> f (Maybe [NodeTypeSpecificValue]))
-> Parameter -> f Parameter
parameter_nodeTypeSpecificValues = (Parameter -> Maybe [NodeTypeSpecificValue])
-> (Parameter -> Maybe [NodeTypeSpecificValue] -> Parameter)
-> Lens
Parameter
Parameter
(Maybe [NodeTypeSpecificValue])
(Maybe [NodeTypeSpecificValue])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Parameter' {Maybe [NodeTypeSpecificValue]
nodeTypeSpecificValues :: Maybe [NodeTypeSpecificValue]
$sel:nodeTypeSpecificValues:Parameter' :: Parameter -> Maybe [NodeTypeSpecificValue]
nodeTypeSpecificValues} -> Maybe [NodeTypeSpecificValue]
nodeTypeSpecificValues) (\s :: Parameter
s@Parameter' {} Maybe [NodeTypeSpecificValue]
a -> Parameter
s {$sel:nodeTypeSpecificValues:Parameter' :: Maybe [NodeTypeSpecificValue]
nodeTypeSpecificValues = Maybe [NodeTypeSpecificValue]
a} :: Parameter) ((Maybe [NodeTypeSpecificValue]
-> f (Maybe [NodeTypeSpecificValue]))
-> Parameter -> f Parameter)
-> ((Maybe [NodeTypeSpecificValue]
-> f (Maybe [NodeTypeSpecificValue]))
-> Maybe [NodeTypeSpecificValue]
-> f (Maybe [NodeTypeSpecificValue]))
-> (Maybe [NodeTypeSpecificValue]
-> f (Maybe [NodeTypeSpecificValue]))
-> Parameter
-> f Parameter
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[NodeTypeSpecificValue]
[NodeTypeSpecificValue]
[NodeTypeSpecificValue]
[NodeTypeSpecificValue]
-> Iso
(Maybe [NodeTypeSpecificValue])
(Maybe [NodeTypeSpecificValue])
(Maybe [NodeTypeSpecificValue])
(Maybe [NodeTypeSpecificValue])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
[NodeTypeSpecificValue]
[NodeTypeSpecificValue]
[NodeTypeSpecificValue]
[NodeTypeSpecificValue]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
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_parameterName :: Lens.Lens' Parameter (Prelude.Maybe Prelude.Text)
parameter_parameterName :: (Maybe Text -> f (Maybe Text)) -> Parameter -> f Parameter
parameter_parameterName = (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
parameterName :: Maybe Text
$sel:parameterName:Parameter' :: Parameter -> Maybe Text
parameterName} -> Maybe Text
parameterName) (\s :: Parameter
s@Parameter' {} Maybe Text
a -> Parameter
s {$sel:parameterName:Parameter' :: Maybe Text
parameterName = 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)
parameter_changeType :: Lens.Lens' Parameter (Prelude.Maybe ChangeType)
parameter_changeType :: (Maybe ChangeType -> f (Maybe ChangeType))
-> Parameter -> f Parameter
parameter_changeType = (Parameter -> Maybe ChangeType)
-> (Parameter -> Maybe ChangeType -> Parameter)
-> Lens Parameter Parameter (Maybe ChangeType) (Maybe ChangeType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Parameter' {Maybe ChangeType
changeType :: Maybe ChangeType
$sel:changeType:Parameter' :: Parameter -> Maybe ChangeType
changeType} -> Maybe ChangeType
changeType) (\s :: Parameter
s@Parameter' {} Maybe ChangeType
a -> Parameter
s {$sel:changeType:Parameter' :: Maybe ChangeType
changeType = Maybe ChangeType
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 ParameterType
-> Maybe Text
-> Maybe IsModifiable
-> Maybe Text
-> Maybe [NodeTypeSpecificValue]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ChangeType
-> Parameter
Parameter'
(Maybe Text
-> Maybe ParameterType
-> Maybe Text
-> Maybe IsModifiable
-> Maybe Text
-> Maybe [NodeTypeSpecificValue]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ChangeType
-> Parameter)
-> Parser (Maybe Text)
-> Parser
(Maybe ParameterType
-> Maybe Text
-> Maybe IsModifiable
-> Maybe Text
-> Maybe [NodeTypeSpecificValue]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ChangeType
-> 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
"ParameterValue")
Parser
(Maybe ParameterType
-> Maybe Text
-> Maybe IsModifiable
-> Maybe Text
-> Maybe [NodeTypeSpecificValue]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ChangeType
-> Parameter)
-> Parser (Maybe ParameterType)
-> Parser
(Maybe Text
-> Maybe IsModifiable
-> Maybe Text
-> Maybe [NodeTypeSpecificValue]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ChangeType
-> Parameter)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ParameterType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ParameterType")
Parser
(Maybe Text
-> Maybe IsModifiable
-> Maybe Text
-> Maybe [NodeTypeSpecificValue]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ChangeType
-> Parameter)
-> Parser (Maybe Text)
-> Parser
(Maybe IsModifiable
-> Maybe Text
-> Maybe [NodeTypeSpecificValue]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ChangeType
-> 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
"Source")
Parser
(Maybe IsModifiable
-> Maybe Text
-> Maybe [NodeTypeSpecificValue]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ChangeType
-> Parameter)
-> Parser (Maybe IsModifiable)
-> Parser
(Maybe Text
-> Maybe [NodeTypeSpecificValue]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ChangeType
-> Parameter)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe IsModifiable)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"IsModifiable")
Parser
(Maybe Text
-> Maybe [NodeTypeSpecificValue]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ChangeType
-> Parameter)
-> Parser (Maybe Text)
-> Parser
(Maybe [NodeTypeSpecificValue]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ChangeType
-> 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 [NodeTypeSpecificValue]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ChangeType
-> Parameter)
-> Parser (Maybe [NodeTypeSpecificValue])
-> Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe ChangeType -> Parameter)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [NodeTypeSpecificValue]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"NodeTypeSpecificValues"
Parser (Maybe (Maybe [NodeTypeSpecificValue]))
-> Maybe [NodeTypeSpecificValue]
-> Parser (Maybe [NodeTypeSpecificValue])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [NodeTypeSpecificValue]
forall a. Monoid a => a
Prelude.mempty
)
Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe ChangeType -> Parameter)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe Text -> Maybe ChangeType -> 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 -> Maybe Text -> Maybe ChangeType -> Parameter)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe ChangeType -> 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
"ParameterName")
Parser (Maybe Text -> Maybe ChangeType -> Parameter)
-> Parser (Maybe Text) -> Parser (Maybe ChangeType -> 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")
Parser (Maybe ChangeType -> Parameter)
-> Parser (Maybe ChangeType) -> Parser Parameter
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ChangeType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ChangeType")
)
instance Prelude.Hashable Parameter
instance Prelude.NFData Parameter