{-# 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.ElastiCache.Types.CacheNodeTypeSpecificParameter
-- 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.ElastiCache.Types.CacheNodeTypeSpecificParameter where

import qualified Amazonka.Core as Core
import Amazonka.ElastiCache.Types.CacheNodeTypeSpecificValue
import Amazonka.ElastiCache.Types.ChangeType
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | A parameter that has a different value for each cache node type it is
-- applied to. For example, in a Redis cluster, a @cache.m1.large@ cache
-- node type would have a larger @maxmemory@ value than a @cache.m1.small@
-- type.
--
-- /See:/ 'newCacheNodeTypeSpecificParameter' smart constructor.
data CacheNodeTypeSpecificParameter = CacheNodeTypeSpecificParameter'
  { -- | A list of cache node types and their corresponding values for this
    -- parameter.
    CacheNodeTypeSpecificParameter
-> Maybe [CacheNodeTypeSpecificValue]
cacheNodeTypeSpecificValues :: Prelude.Maybe [CacheNodeTypeSpecificValue],
    -- | The earliest cache engine version to which the parameter can apply.
    CacheNodeTypeSpecificParameter -> Maybe Text
minimumEngineVersion :: Prelude.Maybe Prelude.Text,
    -- | The source of the parameter value.
    CacheNodeTypeSpecificParameter -> Maybe Text
source :: Prelude.Maybe Prelude.Text,
    -- | Indicates whether (@true@) or not (@false@) the parameter can be
    -- modified. Some parameters have security or operational implications that
    -- prevent them from being changed.
    CacheNodeTypeSpecificParameter -> Maybe Bool
isModifiable :: Prelude.Maybe Prelude.Bool,
    -- | The valid data type for the parameter.
    CacheNodeTypeSpecificParameter -> Maybe Text
dataType :: Prelude.Maybe Prelude.Text,
    -- | The valid range of values for the parameter.
    CacheNodeTypeSpecificParameter -> Maybe Text
allowedValues :: Prelude.Maybe Prelude.Text,
    -- | The name of the parameter.
    CacheNodeTypeSpecificParameter -> Maybe Text
parameterName :: Prelude.Maybe Prelude.Text,
    -- | A description of the parameter.
    CacheNodeTypeSpecificParameter -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | Indicates whether a change to the parameter is applied immediately or
    -- requires a reboot for the change to be applied. You can force a reboot
    -- or wait until the next maintenance window\'s reboot. For more
    -- information, see
    -- <https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Clusters.Rebooting.html Rebooting a Cluster>.
    CacheNodeTypeSpecificParameter -> Maybe ChangeType
changeType :: Prelude.Maybe ChangeType
  }
  deriving (CacheNodeTypeSpecificParameter
-> CacheNodeTypeSpecificParameter -> Bool
(CacheNodeTypeSpecificParameter
 -> CacheNodeTypeSpecificParameter -> Bool)
-> (CacheNodeTypeSpecificParameter
    -> CacheNodeTypeSpecificParameter -> Bool)
-> Eq CacheNodeTypeSpecificParameter
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CacheNodeTypeSpecificParameter
-> CacheNodeTypeSpecificParameter -> Bool
$c/= :: CacheNodeTypeSpecificParameter
-> CacheNodeTypeSpecificParameter -> Bool
== :: CacheNodeTypeSpecificParameter
-> CacheNodeTypeSpecificParameter -> Bool
$c== :: CacheNodeTypeSpecificParameter
-> CacheNodeTypeSpecificParameter -> Bool
Prelude.Eq, ReadPrec [CacheNodeTypeSpecificParameter]
ReadPrec CacheNodeTypeSpecificParameter
Int -> ReadS CacheNodeTypeSpecificParameter
ReadS [CacheNodeTypeSpecificParameter]
(Int -> ReadS CacheNodeTypeSpecificParameter)
-> ReadS [CacheNodeTypeSpecificParameter]
-> ReadPrec CacheNodeTypeSpecificParameter
-> ReadPrec [CacheNodeTypeSpecificParameter]
-> Read CacheNodeTypeSpecificParameter
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CacheNodeTypeSpecificParameter]
$creadListPrec :: ReadPrec [CacheNodeTypeSpecificParameter]
readPrec :: ReadPrec CacheNodeTypeSpecificParameter
$creadPrec :: ReadPrec CacheNodeTypeSpecificParameter
readList :: ReadS [CacheNodeTypeSpecificParameter]
$creadList :: ReadS [CacheNodeTypeSpecificParameter]
readsPrec :: Int -> ReadS CacheNodeTypeSpecificParameter
$creadsPrec :: Int -> ReadS CacheNodeTypeSpecificParameter
Prelude.Read, Int -> CacheNodeTypeSpecificParameter -> ShowS
[CacheNodeTypeSpecificParameter] -> ShowS
CacheNodeTypeSpecificParameter -> String
(Int -> CacheNodeTypeSpecificParameter -> ShowS)
-> (CacheNodeTypeSpecificParameter -> String)
-> ([CacheNodeTypeSpecificParameter] -> ShowS)
-> Show CacheNodeTypeSpecificParameter
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CacheNodeTypeSpecificParameter] -> ShowS
$cshowList :: [CacheNodeTypeSpecificParameter] -> ShowS
show :: CacheNodeTypeSpecificParameter -> String
$cshow :: CacheNodeTypeSpecificParameter -> String
showsPrec :: Int -> CacheNodeTypeSpecificParameter -> ShowS
$cshowsPrec :: Int -> CacheNodeTypeSpecificParameter -> ShowS
Prelude.Show, (forall x.
 CacheNodeTypeSpecificParameter
 -> Rep CacheNodeTypeSpecificParameter x)
-> (forall x.
    Rep CacheNodeTypeSpecificParameter x
    -> CacheNodeTypeSpecificParameter)
-> Generic CacheNodeTypeSpecificParameter
forall x.
Rep CacheNodeTypeSpecificParameter x
-> CacheNodeTypeSpecificParameter
forall x.
CacheNodeTypeSpecificParameter
-> Rep CacheNodeTypeSpecificParameter x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CacheNodeTypeSpecificParameter x
-> CacheNodeTypeSpecificParameter
$cfrom :: forall x.
CacheNodeTypeSpecificParameter
-> Rep CacheNodeTypeSpecificParameter x
Prelude.Generic)

-- |
-- Create a value of 'CacheNodeTypeSpecificParameter' 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:
--
-- 'cacheNodeTypeSpecificValues', 'cacheNodeTypeSpecificParameter_cacheNodeTypeSpecificValues' - A list of cache node types and their corresponding values for this
-- parameter.
--
-- 'minimumEngineVersion', 'cacheNodeTypeSpecificParameter_minimumEngineVersion' - The earliest cache engine version to which the parameter can apply.
--
-- 'source', 'cacheNodeTypeSpecificParameter_source' - The source of the parameter value.
--
-- 'isModifiable', 'cacheNodeTypeSpecificParameter_isModifiable' - Indicates whether (@true@) or not (@false@) the parameter can be
-- modified. Some parameters have security or operational implications that
-- prevent them from being changed.
--
-- 'dataType', 'cacheNodeTypeSpecificParameter_dataType' - The valid data type for the parameter.
--
-- 'allowedValues', 'cacheNodeTypeSpecificParameter_allowedValues' - The valid range of values for the parameter.
--
-- 'parameterName', 'cacheNodeTypeSpecificParameter_parameterName' - The name of the parameter.
--
-- 'description', 'cacheNodeTypeSpecificParameter_description' - A description of the parameter.
--
-- 'changeType', 'cacheNodeTypeSpecificParameter_changeType' - Indicates whether a change to the parameter is applied immediately or
-- requires a reboot for the change to be applied. You can force a reboot
-- or wait until the next maintenance window\'s reboot. For more
-- information, see
-- <https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Clusters.Rebooting.html Rebooting a Cluster>.
newCacheNodeTypeSpecificParameter ::
  CacheNodeTypeSpecificParameter
newCacheNodeTypeSpecificParameter :: CacheNodeTypeSpecificParameter
newCacheNodeTypeSpecificParameter =
  CacheNodeTypeSpecificParameter' :: Maybe [CacheNodeTypeSpecificValue]
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ChangeType
-> CacheNodeTypeSpecificParameter
CacheNodeTypeSpecificParameter'
    { $sel:cacheNodeTypeSpecificValues:CacheNodeTypeSpecificParameter' :: Maybe [CacheNodeTypeSpecificValue]
cacheNodeTypeSpecificValues =
        Maybe [CacheNodeTypeSpecificValue]
forall a. Maybe a
Prelude.Nothing,
      $sel:minimumEngineVersion:CacheNodeTypeSpecificParameter' :: Maybe Text
minimumEngineVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:source:CacheNodeTypeSpecificParameter' :: Maybe Text
source = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:isModifiable:CacheNodeTypeSpecificParameter' :: Maybe Bool
isModifiable = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:dataType:CacheNodeTypeSpecificParameter' :: Maybe Text
dataType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:allowedValues:CacheNodeTypeSpecificParameter' :: Maybe Text
allowedValues = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:parameterName:CacheNodeTypeSpecificParameter' :: Maybe Text
parameterName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:description:CacheNodeTypeSpecificParameter' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:changeType:CacheNodeTypeSpecificParameter' :: Maybe ChangeType
changeType = Maybe ChangeType
forall a. Maybe a
Prelude.Nothing
    }

-- | A list of cache node types and their corresponding values for this
-- parameter.
cacheNodeTypeSpecificParameter_cacheNodeTypeSpecificValues :: Lens.Lens' CacheNodeTypeSpecificParameter (Prelude.Maybe [CacheNodeTypeSpecificValue])
cacheNodeTypeSpecificParameter_cacheNodeTypeSpecificValues :: (Maybe [CacheNodeTypeSpecificValue]
 -> f (Maybe [CacheNodeTypeSpecificValue]))
-> CacheNodeTypeSpecificParameter
-> f CacheNodeTypeSpecificParameter
cacheNodeTypeSpecificParameter_cacheNodeTypeSpecificValues = (CacheNodeTypeSpecificParameter
 -> Maybe [CacheNodeTypeSpecificValue])
-> (CacheNodeTypeSpecificParameter
    -> Maybe [CacheNodeTypeSpecificValue]
    -> CacheNodeTypeSpecificParameter)
-> Lens
     CacheNodeTypeSpecificParameter
     CacheNodeTypeSpecificParameter
     (Maybe [CacheNodeTypeSpecificValue])
     (Maybe [CacheNodeTypeSpecificValue])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheNodeTypeSpecificParameter' {Maybe [CacheNodeTypeSpecificValue]
cacheNodeTypeSpecificValues :: Maybe [CacheNodeTypeSpecificValue]
$sel:cacheNodeTypeSpecificValues:CacheNodeTypeSpecificParameter' :: CacheNodeTypeSpecificParameter
-> Maybe [CacheNodeTypeSpecificValue]
cacheNodeTypeSpecificValues} -> Maybe [CacheNodeTypeSpecificValue]
cacheNodeTypeSpecificValues) (\s :: CacheNodeTypeSpecificParameter
s@CacheNodeTypeSpecificParameter' {} Maybe [CacheNodeTypeSpecificValue]
a -> CacheNodeTypeSpecificParameter
s {$sel:cacheNodeTypeSpecificValues:CacheNodeTypeSpecificParameter' :: Maybe [CacheNodeTypeSpecificValue]
cacheNodeTypeSpecificValues = Maybe [CacheNodeTypeSpecificValue]
a} :: CacheNodeTypeSpecificParameter) ((Maybe [CacheNodeTypeSpecificValue]
  -> f (Maybe [CacheNodeTypeSpecificValue]))
 -> CacheNodeTypeSpecificParameter
 -> f CacheNodeTypeSpecificParameter)
-> ((Maybe [CacheNodeTypeSpecificValue]
     -> f (Maybe [CacheNodeTypeSpecificValue]))
    -> Maybe [CacheNodeTypeSpecificValue]
    -> f (Maybe [CacheNodeTypeSpecificValue]))
-> (Maybe [CacheNodeTypeSpecificValue]
    -> f (Maybe [CacheNodeTypeSpecificValue]))
-> CacheNodeTypeSpecificParameter
-> f CacheNodeTypeSpecificParameter
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [CacheNodeTypeSpecificValue]
  [CacheNodeTypeSpecificValue]
  [CacheNodeTypeSpecificValue]
  [CacheNodeTypeSpecificValue]
-> Iso
     (Maybe [CacheNodeTypeSpecificValue])
     (Maybe [CacheNodeTypeSpecificValue])
     (Maybe [CacheNodeTypeSpecificValue])
     (Maybe [CacheNodeTypeSpecificValue])
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
  [CacheNodeTypeSpecificValue]
  [CacheNodeTypeSpecificValue]
  [CacheNodeTypeSpecificValue]
  [CacheNodeTypeSpecificValue]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The earliest cache engine version to which the parameter can apply.
cacheNodeTypeSpecificParameter_minimumEngineVersion :: Lens.Lens' CacheNodeTypeSpecificParameter (Prelude.Maybe Prelude.Text)
cacheNodeTypeSpecificParameter_minimumEngineVersion :: (Maybe Text -> f (Maybe Text))
-> CacheNodeTypeSpecificParameter
-> f CacheNodeTypeSpecificParameter
cacheNodeTypeSpecificParameter_minimumEngineVersion = (CacheNodeTypeSpecificParameter -> Maybe Text)
-> (CacheNodeTypeSpecificParameter
    -> Maybe Text -> CacheNodeTypeSpecificParameter)
-> Lens
     CacheNodeTypeSpecificParameter
     CacheNodeTypeSpecificParameter
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheNodeTypeSpecificParameter' {Maybe Text
minimumEngineVersion :: Maybe Text
$sel:minimumEngineVersion:CacheNodeTypeSpecificParameter' :: CacheNodeTypeSpecificParameter -> Maybe Text
minimumEngineVersion} -> Maybe Text
minimumEngineVersion) (\s :: CacheNodeTypeSpecificParameter
s@CacheNodeTypeSpecificParameter' {} Maybe Text
a -> CacheNodeTypeSpecificParameter
s {$sel:minimumEngineVersion:CacheNodeTypeSpecificParameter' :: Maybe Text
minimumEngineVersion = Maybe Text
a} :: CacheNodeTypeSpecificParameter)

-- | The source of the parameter value.
cacheNodeTypeSpecificParameter_source :: Lens.Lens' CacheNodeTypeSpecificParameter (Prelude.Maybe Prelude.Text)
cacheNodeTypeSpecificParameter_source :: (Maybe Text -> f (Maybe Text))
-> CacheNodeTypeSpecificParameter
-> f CacheNodeTypeSpecificParameter
cacheNodeTypeSpecificParameter_source = (CacheNodeTypeSpecificParameter -> Maybe Text)
-> (CacheNodeTypeSpecificParameter
    -> Maybe Text -> CacheNodeTypeSpecificParameter)
-> Lens
     CacheNodeTypeSpecificParameter
     CacheNodeTypeSpecificParameter
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheNodeTypeSpecificParameter' {Maybe Text
source :: Maybe Text
$sel:source:CacheNodeTypeSpecificParameter' :: CacheNodeTypeSpecificParameter -> Maybe Text
source} -> Maybe Text
source) (\s :: CacheNodeTypeSpecificParameter
s@CacheNodeTypeSpecificParameter' {} Maybe Text
a -> CacheNodeTypeSpecificParameter
s {$sel:source:CacheNodeTypeSpecificParameter' :: Maybe Text
source = Maybe Text
a} :: CacheNodeTypeSpecificParameter)

-- | Indicates whether (@true@) or not (@false@) the parameter can be
-- modified. Some parameters have security or operational implications that
-- prevent them from being changed.
cacheNodeTypeSpecificParameter_isModifiable :: Lens.Lens' CacheNodeTypeSpecificParameter (Prelude.Maybe Prelude.Bool)
cacheNodeTypeSpecificParameter_isModifiable :: (Maybe Bool -> f (Maybe Bool))
-> CacheNodeTypeSpecificParameter
-> f CacheNodeTypeSpecificParameter
cacheNodeTypeSpecificParameter_isModifiable = (CacheNodeTypeSpecificParameter -> Maybe Bool)
-> (CacheNodeTypeSpecificParameter
    -> Maybe Bool -> CacheNodeTypeSpecificParameter)
-> Lens
     CacheNodeTypeSpecificParameter
     CacheNodeTypeSpecificParameter
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheNodeTypeSpecificParameter' {Maybe Bool
isModifiable :: Maybe Bool
$sel:isModifiable:CacheNodeTypeSpecificParameter' :: CacheNodeTypeSpecificParameter -> Maybe Bool
isModifiable} -> Maybe Bool
isModifiable) (\s :: CacheNodeTypeSpecificParameter
s@CacheNodeTypeSpecificParameter' {} Maybe Bool
a -> CacheNodeTypeSpecificParameter
s {$sel:isModifiable:CacheNodeTypeSpecificParameter' :: Maybe Bool
isModifiable = Maybe Bool
a} :: CacheNodeTypeSpecificParameter)

-- | The valid data type for the parameter.
cacheNodeTypeSpecificParameter_dataType :: Lens.Lens' CacheNodeTypeSpecificParameter (Prelude.Maybe Prelude.Text)
cacheNodeTypeSpecificParameter_dataType :: (Maybe Text -> f (Maybe Text))
-> CacheNodeTypeSpecificParameter
-> f CacheNodeTypeSpecificParameter
cacheNodeTypeSpecificParameter_dataType = (CacheNodeTypeSpecificParameter -> Maybe Text)
-> (CacheNodeTypeSpecificParameter
    -> Maybe Text -> CacheNodeTypeSpecificParameter)
-> Lens
     CacheNodeTypeSpecificParameter
     CacheNodeTypeSpecificParameter
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheNodeTypeSpecificParameter' {Maybe Text
dataType :: Maybe Text
$sel:dataType:CacheNodeTypeSpecificParameter' :: CacheNodeTypeSpecificParameter -> Maybe Text
dataType} -> Maybe Text
dataType) (\s :: CacheNodeTypeSpecificParameter
s@CacheNodeTypeSpecificParameter' {} Maybe Text
a -> CacheNodeTypeSpecificParameter
s {$sel:dataType:CacheNodeTypeSpecificParameter' :: Maybe Text
dataType = Maybe Text
a} :: CacheNodeTypeSpecificParameter)

-- | The valid range of values for the parameter.
cacheNodeTypeSpecificParameter_allowedValues :: Lens.Lens' CacheNodeTypeSpecificParameter (Prelude.Maybe Prelude.Text)
cacheNodeTypeSpecificParameter_allowedValues :: (Maybe Text -> f (Maybe Text))
-> CacheNodeTypeSpecificParameter
-> f CacheNodeTypeSpecificParameter
cacheNodeTypeSpecificParameter_allowedValues = (CacheNodeTypeSpecificParameter -> Maybe Text)
-> (CacheNodeTypeSpecificParameter
    -> Maybe Text -> CacheNodeTypeSpecificParameter)
-> Lens
     CacheNodeTypeSpecificParameter
     CacheNodeTypeSpecificParameter
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheNodeTypeSpecificParameter' {Maybe Text
allowedValues :: Maybe Text
$sel:allowedValues:CacheNodeTypeSpecificParameter' :: CacheNodeTypeSpecificParameter -> Maybe Text
allowedValues} -> Maybe Text
allowedValues) (\s :: CacheNodeTypeSpecificParameter
s@CacheNodeTypeSpecificParameter' {} Maybe Text
a -> CacheNodeTypeSpecificParameter
s {$sel:allowedValues:CacheNodeTypeSpecificParameter' :: Maybe Text
allowedValues = Maybe Text
a} :: CacheNodeTypeSpecificParameter)

-- | The name of the parameter.
cacheNodeTypeSpecificParameter_parameterName :: Lens.Lens' CacheNodeTypeSpecificParameter (Prelude.Maybe Prelude.Text)
cacheNodeTypeSpecificParameter_parameterName :: (Maybe Text -> f (Maybe Text))
-> CacheNodeTypeSpecificParameter
-> f CacheNodeTypeSpecificParameter
cacheNodeTypeSpecificParameter_parameterName = (CacheNodeTypeSpecificParameter -> Maybe Text)
-> (CacheNodeTypeSpecificParameter
    -> Maybe Text -> CacheNodeTypeSpecificParameter)
-> Lens
     CacheNodeTypeSpecificParameter
     CacheNodeTypeSpecificParameter
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheNodeTypeSpecificParameter' {Maybe Text
parameterName :: Maybe Text
$sel:parameterName:CacheNodeTypeSpecificParameter' :: CacheNodeTypeSpecificParameter -> Maybe Text
parameterName} -> Maybe Text
parameterName) (\s :: CacheNodeTypeSpecificParameter
s@CacheNodeTypeSpecificParameter' {} Maybe Text
a -> CacheNodeTypeSpecificParameter
s {$sel:parameterName:CacheNodeTypeSpecificParameter' :: Maybe Text
parameterName = Maybe Text
a} :: CacheNodeTypeSpecificParameter)

-- | A description of the parameter.
cacheNodeTypeSpecificParameter_description :: Lens.Lens' CacheNodeTypeSpecificParameter (Prelude.Maybe Prelude.Text)
cacheNodeTypeSpecificParameter_description :: (Maybe Text -> f (Maybe Text))
-> CacheNodeTypeSpecificParameter
-> f CacheNodeTypeSpecificParameter
cacheNodeTypeSpecificParameter_description = (CacheNodeTypeSpecificParameter -> Maybe Text)
-> (CacheNodeTypeSpecificParameter
    -> Maybe Text -> CacheNodeTypeSpecificParameter)
-> Lens
     CacheNodeTypeSpecificParameter
     CacheNodeTypeSpecificParameter
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheNodeTypeSpecificParameter' {Maybe Text
description :: Maybe Text
$sel:description:CacheNodeTypeSpecificParameter' :: CacheNodeTypeSpecificParameter -> Maybe Text
description} -> Maybe Text
description) (\s :: CacheNodeTypeSpecificParameter
s@CacheNodeTypeSpecificParameter' {} Maybe Text
a -> CacheNodeTypeSpecificParameter
s {$sel:description:CacheNodeTypeSpecificParameter' :: Maybe Text
description = Maybe Text
a} :: CacheNodeTypeSpecificParameter)

-- | Indicates whether a change to the parameter is applied immediately or
-- requires a reboot for the change to be applied. You can force a reboot
-- or wait until the next maintenance window\'s reboot. For more
-- information, see
-- <https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Clusters.Rebooting.html Rebooting a Cluster>.
cacheNodeTypeSpecificParameter_changeType :: Lens.Lens' CacheNodeTypeSpecificParameter (Prelude.Maybe ChangeType)
cacheNodeTypeSpecificParameter_changeType :: (Maybe ChangeType -> f (Maybe ChangeType))
-> CacheNodeTypeSpecificParameter
-> f CacheNodeTypeSpecificParameter
cacheNodeTypeSpecificParameter_changeType = (CacheNodeTypeSpecificParameter -> Maybe ChangeType)
-> (CacheNodeTypeSpecificParameter
    -> Maybe ChangeType -> CacheNodeTypeSpecificParameter)
-> Lens
     CacheNodeTypeSpecificParameter
     CacheNodeTypeSpecificParameter
     (Maybe ChangeType)
     (Maybe ChangeType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheNodeTypeSpecificParameter' {Maybe ChangeType
changeType :: Maybe ChangeType
$sel:changeType:CacheNodeTypeSpecificParameter' :: CacheNodeTypeSpecificParameter -> Maybe ChangeType
changeType} -> Maybe ChangeType
changeType) (\s :: CacheNodeTypeSpecificParameter
s@CacheNodeTypeSpecificParameter' {} Maybe ChangeType
a -> CacheNodeTypeSpecificParameter
s {$sel:changeType:CacheNodeTypeSpecificParameter' :: Maybe ChangeType
changeType = Maybe ChangeType
a} :: CacheNodeTypeSpecificParameter)

instance Core.FromXML CacheNodeTypeSpecificParameter where
  parseXML :: [Node] -> Either String CacheNodeTypeSpecificParameter
parseXML [Node]
x =
    Maybe [CacheNodeTypeSpecificValue]
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ChangeType
-> CacheNodeTypeSpecificParameter
CacheNodeTypeSpecificParameter'
      (Maybe [CacheNodeTypeSpecificValue]
 -> Maybe Text
 -> Maybe Text
 -> Maybe Bool
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe ChangeType
 -> CacheNodeTypeSpecificParameter)
-> Either String (Maybe [CacheNodeTypeSpecificValue])
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ChangeType
      -> CacheNodeTypeSpecificParameter)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"CacheNodeTypeSpecificValues"
                      Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
                      Either String [Node]
-> ([Node] -> Either String (Maybe [CacheNodeTypeSpecificValue]))
-> Either String (Maybe [CacheNodeTypeSpecificValue])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [CacheNodeTypeSpecificValue])
-> [Node] -> Either String (Maybe [CacheNodeTypeSpecificValue])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may
                        (Text -> [Node] -> Either String [CacheNodeTypeSpecificValue]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"CacheNodeTypeSpecificValue")
                  )
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe ChangeType
   -> CacheNodeTypeSpecificParameter)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ChangeType
      -> CacheNodeTypeSpecificParameter)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"MinimumEngineVersion")
      Either
  String
  (Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe ChangeType
   -> CacheNodeTypeSpecificParameter)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ChangeType
      -> CacheNodeTypeSpecificParameter)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Source")
      Either
  String
  (Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe ChangeType
   -> CacheNodeTypeSpecificParameter)
-> Either String (Maybe Bool)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ChangeType
      -> CacheNodeTypeSpecificParameter)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Bool)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"IsModifiable")
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe ChangeType
   -> CacheNodeTypeSpecificParameter)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ChangeType
      -> CacheNodeTypeSpecificParameter)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"DataType")
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe ChangeType
   -> CacheNodeTypeSpecificParameter)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe ChangeType
      -> CacheNodeTypeSpecificParameter)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"AllowedValues")
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe ChangeType
   -> CacheNodeTypeSpecificParameter)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text -> Maybe ChangeType -> CacheNodeTypeSpecificParameter)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ParameterName")
      Either
  String
  (Maybe Text -> Maybe ChangeType -> CacheNodeTypeSpecificParameter)
-> Either String (Maybe Text)
-> Either
     String (Maybe ChangeType -> CacheNodeTypeSpecificParameter)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Description")
      Either String (Maybe ChangeType -> CacheNodeTypeSpecificParameter)
-> Either String (Maybe ChangeType)
-> Either String CacheNodeTypeSpecificParameter
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe ChangeType)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ChangeType")

instance
  Prelude.Hashable
    CacheNodeTypeSpecificParameter

instance
  Prelude.NFData
    CacheNodeTypeSpecificParameter