{-# 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.ElastiCache.Types.CacheNodeTypeSpecificValue where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data CacheNodeTypeSpecificValue = CacheNodeTypeSpecificValue'
{
CacheNodeTypeSpecificValue -> Maybe Text
cacheNodeType :: Prelude.Maybe Prelude.Text,
CacheNodeTypeSpecificValue -> Maybe Text
value :: Prelude.Maybe Prelude.Text
}
deriving (CacheNodeTypeSpecificValue -> CacheNodeTypeSpecificValue -> Bool
(CacheNodeTypeSpecificValue -> CacheNodeTypeSpecificValue -> Bool)
-> (CacheNodeTypeSpecificValue
-> CacheNodeTypeSpecificValue -> Bool)
-> Eq CacheNodeTypeSpecificValue
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CacheNodeTypeSpecificValue -> CacheNodeTypeSpecificValue -> Bool
$c/= :: CacheNodeTypeSpecificValue -> CacheNodeTypeSpecificValue -> Bool
== :: CacheNodeTypeSpecificValue -> CacheNodeTypeSpecificValue -> Bool
$c== :: CacheNodeTypeSpecificValue -> CacheNodeTypeSpecificValue -> Bool
Prelude.Eq, ReadPrec [CacheNodeTypeSpecificValue]
ReadPrec CacheNodeTypeSpecificValue
Int -> ReadS CacheNodeTypeSpecificValue
ReadS [CacheNodeTypeSpecificValue]
(Int -> ReadS CacheNodeTypeSpecificValue)
-> ReadS [CacheNodeTypeSpecificValue]
-> ReadPrec CacheNodeTypeSpecificValue
-> ReadPrec [CacheNodeTypeSpecificValue]
-> Read CacheNodeTypeSpecificValue
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CacheNodeTypeSpecificValue]
$creadListPrec :: ReadPrec [CacheNodeTypeSpecificValue]
readPrec :: ReadPrec CacheNodeTypeSpecificValue
$creadPrec :: ReadPrec CacheNodeTypeSpecificValue
readList :: ReadS [CacheNodeTypeSpecificValue]
$creadList :: ReadS [CacheNodeTypeSpecificValue]
readsPrec :: Int -> ReadS CacheNodeTypeSpecificValue
$creadsPrec :: Int -> ReadS CacheNodeTypeSpecificValue
Prelude.Read, Int -> CacheNodeTypeSpecificValue -> ShowS
[CacheNodeTypeSpecificValue] -> ShowS
CacheNodeTypeSpecificValue -> String
(Int -> CacheNodeTypeSpecificValue -> ShowS)
-> (CacheNodeTypeSpecificValue -> String)
-> ([CacheNodeTypeSpecificValue] -> ShowS)
-> Show CacheNodeTypeSpecificValue
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CacheNodeTypeSpecificValue] -> ShowS
$cshowList :: [CacheNodeTypeSpecificValue] -> ShowS
show :: CacheNodeTypeSpecificValue -> String
$cshow :: CacheNodeTypeSpecificValue -> String
showsPrec :: Int -> CacheNodeTypeSpecificValue -> ShowS
$cshowsPrec :: Int -> CacheNodeTypeSpecificValue -> ShowS
Prelude.Show, (forall x.
CacheNodeTypeSpecificValue -> Rep CacheNodeTypeSpecificValue x)
-> (forall x.
Rep CacheNodeTypeSpecificValue x -> CacheNodeTypeSpecificValue)
-> Generic CacheNodeTypeSpecificValue
forall x.
Rep CacheNodeTypeSpecificValue x -> CacheNodeTypeSpecificValue
forall x.
CacheNodeTypeSpecificValue -> Rep CacheNodeTypeSpecificValue x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CacheNodeTypeSpecificValue x -> CacheNodeTypeSpecificValue
$cfrom :: forall x.
CacheNodeTypeSpecificValue -> Rep CacheNodeTypeSpecificValue x
Prelude.Generic)
newCacheNodeTypeSpecificValue ::
CacheNodeTypeSpecificValue
newCacheNodeTypeSpecificValue :: CacheNodeTypeSpecificValue
newCacheNodeTypeSpecificValue =
CacheNodeTypeSpecificValue' :: Maybe Text -> Maybe Text -> CacheNodeTypeSpecificValue
CacheNodeTypeSpecificValue'
{ $sel:cacheNodeType:CacheNodeTypeSpecificValue' :: Maybe Text
cacheNodeType =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:value:CacheNodeTypeSpecificValue' :: Maybe Text
value = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
cacheNodeTypeSpecificValue_cacheNodeType :: Lens.Lens' CacheNodeTypeSpecificValue (Prelude.Maybe Prelude.Text)
cacheNodeTypeSpecificValue_cacheNodeType :: (Maybe Text -> f (Maybe Text))
-> CacheNodeTypeSpecificValue -> f CacheNodeTypeSpecificValue
cacheNodeTypeSpecificValue_cacheNodeType = (CacheNodeTypeSpecificValue -> Maybe Text)
-> (CacheNodeTypeSpecificValue
-> Maybe Text -> CacheNodeTypeSpecificValue)
-> Lens
CacheNodeTypeSpecificValue
CacheNodeTypeSpecificValue
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheNodeTypeSpecificValue' {Maybe Text
cacheNodeType :: Maybe Text
$sel:cacheNodeType:CacheNodeTypeSpecificValue' :: CacheNodeTypeSpecificValue -> Maybe Text
cacheNodeType} -> Maybe Text
cacheNodeType) (\s :: CacheNodeTypeSpecificValue
s@CacheNodeTypeSpecificValue' {} Maybe Text
a -> CacheNodeTypeSpecificValue
s {$sel:cacheNodeType:CacheNodeTypeSpecificValue' :: Maybe Text
cacheNodeType = Maybe Text
a} :: CacheNodeTypeSpecificValue)
cacheNodeTypeSpecificValue_value :: Lens.Lens' CacheNodeTypeSpecificValue (Prelude.Maybe Prelude.Text)
cacheNodeTypeSpecificValue_value :: (Maybe Text -> f (Maybe Text))
-> CacheNodeTypeSpecificValue -> f CacheNodeTypeSpecificValue
cacheNodeTypeSpecificValue_value = (CacheNodeTypeSpecificValue -> Maybe Text)
-> (CacheNodeTypeSpecificValue
-> Maybe Text -> CacheNodeTypeSpecificValue)
-> Lens
CacheNodeTypeSpecificValue
CacheNodeTypeSpecificValue
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheNodeTypeSpecificValue' {Maybe Text
value :: Maybe Text
$sel:value:CacheNodeTypeSpecificValue' :: CacheNodeTypeSpecificValue -> Maybe Text
value} -> Maybe Text
value) (\s :: CacheNodeTypeSpecificValue
s@CacheNodeTypeSpecificValue' {} Maybe Text
a -> CacheNodeTypeSpecificValue
s {$sel:value:CacheNodeTypeSpecificValue' :: Maybe Text
value = Maybe Text
a} :: CacheNodeTypeSpecificValue)
instance Core.FromXML CacheNodeTypeSpecificValue where
parseXML :: [Node] -> Either String CacheNodeTypeSpecificValue
parseXML [Node]
x =
Maybe Text -> Maybe Text -> CacheNodeTypeSpecificValue
CacheNodeTypeSpecificValue'
(Maybe Text -> Maybe Text -> CacheNodeTypeSpecificValue)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> CacheNodeTypeSpecificValue)
forall (f :: * -> *) a b. Functor 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
"CacheNodeType")
Either String (Maybe Text -> CacheNodeTypeSpecificValue)
-> Either String (Maybe Text)
-> Either String CacheNodeTypeSpecificValue
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
"Value")
instance Prelude.Hashable CacheNodeTypeSpecificValue
instance Prelude.NFData CacheNodeTypeSpecificValue