{-# 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.CacheParameterGroup where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data CacheParameterGroup = CacheParameterGroup'
{
CacheParameterGroup -> Maybe Text
cacheParameterGroupFamily :: Prelude.Maybe Prelude.Text,
CacheParameterGroup -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
CacheParameterGroup -> Maybe Text
cacheParameterGroupName :: Prelude.Maybe Prelude.Text,
CacheParameterGroup -> Maybe Bool
isGlobal :: Prelude.Maybe Prelude.Bool,
CacheParameterGroup -> Maybe Text
description :: Prelude.Maybe Prelude.Text
}
deriving (CacheParameterGroup -> CacheParameterGroup -> Bool
(CacheParameterGroup -> CacheParameterGroup -> Bool)
-> (CacheParameterGroup -> CacheParameterGroup -> Bool)
-> Eq CacheParameterGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CacheParameterGroup -> CacheParameterGroup -> Bool
$c/= :: CacheParameterGroup -> CacheParameterGroup -> Bool
== :: CacheParameterGroup -> CacheParameterGroup -> Bool
$c== :: CacheParameterGroup -> CacheParameterGroup -> Bool
Prelude.Eq, ReadPrec [CacheParameterGroup]
ReadPrec CacheParameterGroup
Int -> ReadS CacheParameterGroup
ReadS [CacheParameterGroup]
(Int -> ReadS CacheParameterGroup)
-> ReadS [CacheParameterGroup]
-> ReadPrec CacheParameterGroup
-> ReadPrec [CacheParameterGroup]
-> Read CacheParameterGroup
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CacheParameterGroup]
$creadListPrec :: ReadPrec [CacheParameterGroup]
readPrec :: ReadPrec CacheParameterGroup
$creadPrec :: ReadPrec CacheParameterGroup
readList :: ReadS [CacheParameterGroup]
$creadList :: ReadS [CacheParameterGroup]
readsPrec :: Int -> ReadS CacheParameterGroup
$creadsPrec :: Int -> ReadS CacheParameterGroup
Prelude.Read, Int -> CacheParameterGroup -> ShowS
[CacheParameterGroup] -> ShowS
CacheParameterGroup -> String
(Int -> CacheParameterGroup -> ShowS)
-> (CacheParameterGroup -> String)
-> ([CacheParameterGroup] -> ShowS)
-> Show CacheParameterGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CacheParameterGroup] -> ShowS
$cshowList :: [CacheParameterGroup] -> ShowS
show :: CacheParameterGroup -> String
$cshow :: CacheParameterGroup -> String
showsPrec :: Int -> CacheParameterGroup -> ShowS
$cshowsPrec :: Int -> CacheParameterGroup -> ShowS
Prelude.Show, (forall x. CacheParameterGroup -> Rep CacheParameterGroup x)
-> (forall x. Rep CacheParameterGroup x -> CacheParameterGroup)
-> Generic CacheParameterGroup
forall x. Rep CacheParameterGroup x -> CacheParameterGroup
forall x. CacheParameterGroup -> Rep CacheParameterGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CacheParameterGroup x -> CacheParameterGroup
$cfrom :: forall x. CacheParameterGroup -> Rep CacheParameterGroup x
Prelude.Generic)
newCacheParameterGroup ::
CacheParameterGroup
newCacheParameterGroup :: CacheParameterGroup
newCacheParameterGroup =
CacheParameterGroup' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> CacheParameterGroup
CacheParameterGroup'
{ $sel:cacheParameterGroupFamily:CacheParameterGroup' :: Maybe Text
cacheParameterGroupFamily =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:arn:CacheParameterGroup' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:cacheParameterGroupName:CacheParameterGroup' :: Maybe Text
cacheParameterGroupName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:isGlobal:CacheParameterGroup' :: Maybe Bool
isGlobal = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:description:CacheParameterGroup' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
cacheParameterGroup_cacheParameterGroupFamily :: Lens.Lens' CacheParameterGroup (Prelude.Maybe Prelude.Text)
cacheParameterGroup_cacheParameterGroupFamily :: (Maybe Text -> f (Maybe Text))
-> CacheParameterGroup -> f CacheParameterGroup
cacheParameterGroup_cacheParameterGroupFamily = (CacheParameterGroup -> Maybe Text)
-> (CacheParameterGroup -> Maybe Text -> CacheParameterGroup)
-> Lens
CacheParameterGroup CacheParameterGroup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheParameterGroup' {Maybe Text
cacheParameterGroupFamily :: Maybe Text
$sel:cacheParameterGroupFamily:CacheParameterGroup' :: CacheParameterGroup -> Maybe Text
cacheParameterGroupFamily} -> Maybe Text
cacheParameterGroupFamily) (\s :: CacheParameterGroup
s@CacheParameterGroup' {} Maybe Text
a -> CacheParameterGroup
s {$sel:cacheParameterGroupFamily:CacheParameterGroup' :: Maybe Text
cacheParameterGroupFamily = Maybe Text
a} :: CacheParameterGroup)
cacheParameterGroup_arn :: Lens.Lens' CacheParameterGroup (Prelude.Maybe Prelude.Text)
cacheParameterGroup_arn :: (Maybe Text -> f (Maybe Text))
-> CacheParameterGroup -> f CacheParameterGroup
cacheParameterGroup_arn = (CacheParameterGroup -> Maybe Text)
-> (CacheParameterGroup -> Maybe Text -> CacheParameterGroup)
-> Lens
CacheParameterGroup CacheParameterGroup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheParameterGroup' {Maybe Text
arn :: Maybe Text
$sel:arn:CacheParameterGroup' :: CacheParameterGroup -> Maybe Text
arn} -> Maybe Text
arn) (\s :: CacheParameterGroup
s@CacheParameterGroup' {} Maybe Text
a -> CacheParameterGroup
s {$sel:arn:CacheParameterGroup' :: Maybe Text
arn = Maybe Text
a} :: CacheParameterGroup)
cacheParameterGroup_cacheParameterGroupName :: Lens.Lens' CacheParameterGroup (Prelude.Maybe Prelude.Text)
cacheParameterGroup_cacheParameterGroupName :: (Maybe Text -> f (Maybe Text))
-> CacheParameterGroup -> f CacheParameterGroup
cacheParameterGroup_cacheParameterGroupName = (CacheParameterGroup -> Maybe Text)
-> (CacheParameterGroup -> Maybe Text -> CacheParameterGroup)
-> Lens
CacheParameterGroup CacheParameterGroup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheParameterGroup' {Maybe Text
cacheParameterGroupName :: Maybe Text
$sel:cacheParameterGroupName:CacheParameterGroup' :: CacheParameterGroup -> Maybe Text
cacheParameterGroupName} -> Maybe Text
cacheParameterGroupName) (\s :: CacheParameterGroup
s@CacheParameterGroup' {} Maybe Text
a -> CacheParameterGroup
s {$sel:cacheParameterGroupName:CacheParameterGroup' :: Maybe Text
cacheParameterGroupName = Maybe Text
a} :: CacheParameterGroup)
cacheParameterGroup_isGlobal :: Lens.Lens' CacheParameterGroup (Prelude.Maybe Prelude.Bool)
cacheParameterGroup_isGlobal :: (Maybe Bool -> f (Maybe Bool))
-> CacheParameterGroup -> f CacheParameterGroup
cacheParameterGroup_isGlobal = (CacheParameterGroup -> Maybe Bool)
-> (CacheParameterGroup -> Maybe Bool -> CacheParameterGroup)
-> Lens
CacheParameterGroup CacheParameterGroup (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheParameterGroup' {Maybe Bool
isGlobal :: Maybe Bool
$sel:isGlobal:CacheParameterGroup' :: CacheParameterGroup -> Maybe Bool
isGlobal} -> Maybe Bool
isGlobal) (\s :: CacheParameterGroup
s@CacheParameterGroup' {} Maybe Bool
a -> CacheParameterGroup
s {$sel:isGlobal:CacheParameterGroup' :: Maybe Bool
isGlobal = Maybe Bool
a} :: CacheParameterGroup)
cacheParameterGroup_description :: Lens.Lens' CacheParameterGroup (Prelude.Maybe Prelude.Text)
cacheParameterGroup_description :: (Maybe Text -> f (Maybe Text))
-> CacheParameterGroup -> f CacheParameterGroup
cacheParameterGroup_description = (CacheParameterGroup -> Maybe Text)
-> (CacheParameterGroup -> Maybe Text -> CacheParameterGroup)
-> Lens
CacheParameterGroup CacheParameterGroup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheParameterGroup' {Maybe Text
description :: Maybe Text
$sel:description:CacheParameterGroup' :: CacheParameterGroup -> Maybe Text
description} -> Maybe Text
description) (\s :: CacheParameterGroup
s@CacheParameterGroup' {} Maybe Text
a -> CacheParameterGroup
s {$sel:description:CacheParameterGroup' :: Maybe Text
description = Maybe Text
a} :: CacheParameterGroup)
instance Core.FromXML CacheParameterGroup where
parseXML :: [Node] -> Either String CacheParameterGroup
parseXML [Node]
x =
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> CacheParameterGroup
CacheParameterGroup'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> CacheParameterGroup)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text -> Maybe Bool -> Maybe Text -> CacheParameterGroup)
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
"CacheParameterGroupFamily")
Either
String
(Maybe Text
-> Maybe Text -> Maybe Bool -> Maybe Text -> CacheParameterGroup)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text -> Maybe Bool -> Maybe Text -> CacheParameterGroup)
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
"ARN")
Either
String
(Maybe Text -> Maybe Bool -> Maybe Text -> CacheParameterGroup)
-> Either String (Maybe Text)
-> Either String (Maybe Bool -> Maybe Text -> CacheParameterGroup)
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
"CacheParameterGroupName")
Either String (Maybe Bool -> Maybe Text -> CacheParameterGroup)
-> Either String (Maybe Bool)
-> Either String (Maybe Text -> CacheParameterGroup)
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
"IsGlobal")
Either String (Maybe Text -> CacheParameterGroup)
-> Either String (Maybe Text) -> Either String CacheParameterGroup
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")
instance Prelude.Hashable CacheParameterGroup
instance Prelude.NFData CacheParameterGroup