{-# 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.CacheEngineVersion where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data CacheEngineVersion = CacheEngineVersion'
{
CacheEngineVersion -> Maybe Text
engineVersion :: Prelude.Maybe Prelude.Text,
CacheEngineVersion -> Maybe Text
cacheParameterGroupFamily :: Prelude.Maybe Prelude.Text,
CacheEngineVersion -> Maybe Text
cacheEngineDescription :: Prelude.Maybe Prelude.Text,
CacheEngineVersion -> Maybe Text
engine :: Prelude.Maybe Prelude.Text,
CacheEngineVersion -> Maybe Text
cacheEngineVersionDescription :: Prelude.Maybe Prelude.Text
}
deriving (CacheEngineVersion -> CacheEngineVersion -> Bool
(CacheEngineVersion -> CacheEngineVersion -> Bool)
-> (CacheEngineVersion -> CacheEngineVersion -> Bool)
-> Eq CacheEngineVersion
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CacheEngineVersion -> CacheEngineVersion -> Bool
$c/= :: CacheEngineVersion -> CacheEngineVersion -> Bool
== :: CacheEngineVersion -> CacheEngineVersion -> Bool
$c== :: CacheEngineVersion -> CacheEngineVersion -> Bool
Prelude.Eq, ReadPrec [CacheEngineVersion]
ReadPrec CacheEngineVersion
Int -> ReadS CacheEngineVersion
ReadS [CacheEngineVersion]
(Int -> ReadS CacheEngineVersion)
-> ReadS [CacheEngineVersion]
-> ReadPrec CacheEngineVersion
-> ReadPrec [CacheEngineVersion]
-> Read CacheEngineVersion
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CacheEngineVersion]
$creadListPrec :: ReadPrec [CacheEngineVersion]
readPrec :: ReadPrec CacheEngineVersion
$creadPrec :: ReadPrec CacheEngineVersion
readList :: ReadS [CacheEngineVersion]
$creadList :: ReadS [CacheEngineVersion]
readsPrec :: Int -> ReadS CacheEngineVersion
$creadsPrec :: Int -> ReadS CacheEngineVersion
Prelude.Read, Int -> CacheEngineVersion -> ShowS
[CacheEngineVersion] -> ShowS
CacheEngineVersion -> String
(Int -> CacheEngineVersion -> ShowS)
-> (CacheEngineVersion -> String)
-> ([CacheEngineVersion] -> ShowS)
-> Show CacheEngineVersion
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CacheEngineVersion] -> ShowS
$cshowList :: [CacheEngineVersion] -> ShowS
show :: CacheEngineVersion -> String
$cshow :: CacheEngineVersion -> String
showsPrec :: Int -> CacheEngineVersion -> ShowS
$cshowsPrec :: Int -> CacheEngineVersion -> ShowS
Prelude.Show, (forall x. CacheEngineVersion -> Rep CacheEngineVersion x)
-> (forall x. Rep CacheEngineVersion x -> CacheEngineVersion)
-> Generic CacheEngineVersion
forall x. Rep CacheEngineVersion x -> CacheEngineVersion
forall x. CacheEngineVersion -> Rep CacheEngineVersion x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CacheEngineVersion x -> CacheEngineVersion
$cfrom :: forall x. CacheEngineVersion -> Rep CacheEngineVersion x
Prelude.Generic)
newCacheEngineVersion ::
CacheEngineVersion
newCacheEngineVersion :: CacheEngineVersion
newCacheEngineVersion =
CacheEngineVersion' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> CacheEngineVersion
CacheEngineVersion'
{ $sel:engineVersion:CacheEngineVersion' :: Maybe Text
engineVersion =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:cacheParameterGroupFamily:CacheEngineVersion' :: Maybe Text
cacheParameterGroupFamily = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:cacheEngineDescription:CacheEngineVersion' :: Maybe Text
cacheEngineDescription = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:engine:CacheEngineVersion' :: Maybe Text
engine = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:cacheEngineVersionDescription:CacheEngineVersion' :: Maybe Text
cacheEngineVersionDescription = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
cacheEngineVersion_engineVersion :: Lens.Lens' CacheEngineVersion (Prelude.Maybe Prelude.Text)
cacheEngineVersion_engineVersion :: (Maybe Text -> f (Maybe Text))
-> CacheEngineVersion -> f CacheEngineVersion
cacheEngineVersion_engineVersion = (CacheEngineVersion -> Maybe Text)
-> (CacheEngineVersion -> Maybe Text -> CacheEngineVersion)
-> Lens
CacheEngineVersion CacheEngineVersion (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheEngineVersion' {Maybe Text
engineVersion :: Maybe Text
$sel:engineVersion:CacheEngineVersion' :: CacheEngineVersion -> Maybe Text
engineVersion} -> Maybe Text
engineVersion) (\s :: CacheEngineVersion
s@CacheEngineVersion' {} Maybe Text
a -> CacheEngineVersion
s {$sel:engineVersion:CacheEngineVersion' :: Maybe Text
engineVersion = Maybe Text
a} :: CacheEngineVersion)
cacheEngineVersion_cacheParameterGroupFamily :: Lens.Lens' CacheEngineVersion (Prelude.Maybe Prelude.Text)
cacheEngineVersion_cacheParameterGroupFamily :: (Maybe Text -> f (Maybe Text))
-> CacheEngineVersion -> f CacheEngineVersion
cacheEngineVersion_cacheParameterGroupFamily = (CacheEngineVersion -> Maybe Text)
-> (CacheEngineVersion -> Maybe Text -> CacheEngineVersion)
-> Lens
CacheEngineVersion CacheEngineVersion (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheEngineVersion' {Maybe Text
cacheParameterGroupFamily :: Maybe Text
$sel:cacheParameterGroupFamily:CacheEngineVersion' :: CacheEngineVersion -> Maybe Text
cacheParameterGroupFamily} -> Maybe Text
cacheParameterGroupFamily) (\s :: CacheEngineVersion
s@CacheEngineVersion' {} Maybe Text
a -> CacheEngineVersion
s {$sel:cacheParameterGroupFamily:CacheEngineVersion' :: Maybe Text
cacheParameterGroupFamily = Maybe Text
a} :: CacheEngineVersion)
cacheEngineVersion_cacheEngineDescription :: Lens.Lens' CacheEngineVersion (Prelude.Maybe Prelude.Text)
cacheEngineVersion_cacheEngineDescription :: (Maybe Text -> f (Maybe Text))
-> CacheEngineVersion -> f CacheEngineVersion
cacheEngineVersion_cacheEngineDescription = (CacheEngineVersion -> Maybe Text)
-> (CacheEngineVersion -> Maybe Text -> CacheEngineVersion)
-> Lens
CacheEngineVersion CacheEngineVersion (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheEngineVersion' {Maybe Text
cacheEngineDescription :: Maybe Text
$sel:cacheEngineDescription:CacheEngineVersion' :: CacheEngineVersion -> Maybe Text
cacheEngineDescription} -> Maybe Text
cacheEngineDescription) (\s :: CacheEngineVersion
s@CacheEngineVersion' {} Maybe Text
a -> CacheEngineVersion
s {$sel:cacheEngineDescription:CacheEngineVersion' :: Maybe Text
cacheEngineDescription = Maybe Text
a} :: CacheEngineVersion)
cacheEngineVersion_engine :: Lens.Lens' CacheEngineVersion (Prelude.Maybe Prelude.Text)
cacheEngineVersion_engine :: (Maybe Text -> f (Maybe Text))
-> CacheEngineVersion -> f CacheEngineVersion
cacheEngineVersion_engine = (CacheEngineVersion -> Maybe Text)
-> (CacheEngineVersion -> Maybe Text -> CacheEngineVersion)
-> Lens
CacheEngineVersion CacheEngineVersion (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheEngineVersion' {Maybe Text
engine :: Maybe Text
$sel:engine:CacheEngineVersion' :: CacheEngineVersion -> Maybe Text
engine} -> Maybe Text
engine) (\s :: CacheEngineVersion
s@CacheEngineVersion' {} Maybe Text
a -> CacheEngineVersion
s {$sel:engine:CacheEngineVersion' :: Maybe Text
engine = Maybe Text
a} :: CacheEngineVersion)
cacheEngineVersion_cacheEngineVersionDescription :: Lens.Lens' CacheEngineVersion (Prelude.Maybe Prelude.Text)
cacheEngineVersion_cacheEngineVersionDescription :: (Maybe Text -> f (Maybe Text))
-> CacheEngineVersion -> f CacheEngineVersion
cacheEngineVersion_cacheEngineVersionDescription = (CacheEngineVersion -> Maybe Text)
-> (CacheEngineVersion -> Maybe Text -> CacheEngineVersion)
-> Lens
CacheEngineVersion CacheEngineVersion (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheEngineVersion' {Maybe Text
cacheEngineVersionDescription :: Maybe Text
$sel:cacheEngineVersionDescription:CacheEngineVersion' :: CacheEngineVersion -> Maybe Text
cacheEngineVersionDescription} -> Maybe Text
cacheEngineVersionDescription) (\s :: CacheEngineVersion
s@CacheEngineVersion' {} Maybe Text
a -> CacheEngineVersion
s {$sel:cacheEngineVersionDescription:CacheEngineVersion' :: Maybe Text
cacheEngineVersionDescription = Maybe Text
a} :: CacheEngineVersion)
instance Core.FromXML CacheEngineVersion where
parseXML :: [Node] -> Either String CacheEngineVersion
parseXML [Node]
x =
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> CacheEngineVersion
CacheEngineVersion'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> CacheEngineVersion)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> CacheEngineVersion)
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
"EngineVersion")
Either
String
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> CacheEngineVersion)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text -> Maybe Text -> Maybe Text -> CacheEngineVersion)
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
"CacheParameterGroupFamily")
Either
String
(Maybe Text -> Maybe Text -> Maybe Text -> CacheEngineVersion)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Maybe Text -> CacheEngineVersion)
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
"CacheEngineDescription")
Either String (Maybe Text -> Maybe Text -> CacheEngineVersion)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> CacheEngineVersion)
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
"Engine")
Either String (Maybe Text -> CacheEngineVersion)
-> Either String (Maybe Text) -> Either String CacheEngineVersion
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
"CacheEngineVersionDescription")
instance Prelude.Hashable CacheEngineVersion
instance Prelude.NFData CacheEngineVersion