{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.DAX.Types.Parameter
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
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

-- | Describes an individual setting that controls some aspect of DAX
-- behavior.
--
-- /See:/ 'newParameter' smart constructor.
data Parameter = Parameter'
  { -- | The value for the parameter.
    Parameter -> Maybe Text
parameterValue :: Prelude.Maybe Prelude.Text,
    -- | Determines whether the parameter can be applied to any nodes, or only
    -- nodes of a particular type.
    Parameter -> Maybe ParameterType
parameterType :: Prelude.Maybe ParameterType,
    -- | How the parameter is defined. For example, @system@ denotes a
    -- system-defined parameter.
    Parameter -> Maybe Text
source :: Prelude.Maybe Prelude.Text,
    -- | Whether the customer is allowed to modify the parameter.
    Parameter -> Maybe IsModifiable
isModifiable :: Prelude.Maybe IsModifiable,
    -- | The data type of the parameter. For example, @integer@:
    Parameter -> Maybe Text
dataType :: Prelude.Maybe Prelude.Text,
    -- | A list of node types, and specific parameter values for each node.
    Parameter -> Maybe [NodeTypeSpecificValue]
nodeTypeSpecificValues :: Prelude.Maybe [NodeTypeSpecificValue],
    -- | A range of values within which the parameter can be set.
    Parameter -> Maybe Text
allowedValues :: Prelude.Maybe Prelude.Text,
    -- | The name of the parameter.
    Parameter -> Maybe Text
parameterName :: Prelude.Maybe Prelude.Text,
    -- | A description of the parameter
    Parameter -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The conditions under which changes to this parameter can be applied. For
    -- example, @requires-reboot@ indicates that a new value for this parameter
    -- will only take effect if a node is rebooted.
    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)

-- |
-- Create a value of 'Parameter' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'parameterValue', 'parameter_parameterValue' - The value for the parameter.
--
-- 'parameterType', 'parameter_parameterType' - Determines whether the parameter can be applied to any nodes, or only
-- nodes of a particular type.
--
-- 'source', 'parameter_source' - How the parameter is defined. For example, @system@ denotes a
-- system-defined parameter.
--
-- 'isModifiable', 'parameter_isModifiable' - Whether the customer is allowed to modify the parameter.
--
-- 'dataType', 'parameter_dataType' - The data type of the parameter. For example, @integer@:
--
-- 'nodeTypeSpecificValues', 'parameter_nodeTypeSpecificValues' - A list of node types, and specific parameter values for each node.
--
-- 'allowedValues', 'parameter_allowedValues' - A range of values within which the parameter can be set.
--
-- 'parameterName', 'parameter_parameterName' - The name of the parameter.
--
-- 'description', 'parameter_description' - A description of the parameter
--
-- 'changeType', 'parameter_changeType' - The conditions under which changes to this parameter can be applied. For
-- example, @requires-reboot@ indicates that a new value for this parameter
-- will only take effect if a node is rebooted.
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
    }

-- | The value for the parameter.
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)

-- | Determines whether the parameter can be applied to any nodes, or only
-- nodes of a particular type.
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)

-- | How the parameter is defined. For example, @system@ denotes a
-- system-defined 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)

-- | Whether the customer is allowed to modify the 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)

-- | The data type of the parameter. For example, @integer@:
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)

-- | A list of node types, and specific parameter values for each node.
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

-- | A range of values within which the parameter can be set.
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)

-- | The name of the 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)

-- | A description of the 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)

-- | The conditions under which changes to this parameter can be applied. For
-- example, @requires-reboot@ indicates that a new value for this parameter
-- will only take effect if a node is rebooted.
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