{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data CacheParameterGroup = CacheParameterGroup'
{
CacheParameterGroup -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
CacheParameterGroup -> Maybe Text
cacheParameterGroupFamily :: Prelude.Maybe Prelude.Text,
CacheParameterGroup -> Maybe Text
cacheParameterGroupName :: Prelude.Maybe Prelude.Text,
CacheParameterGroup -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
CacheParameterGroup -> Maybe Bool
isGlobal :: Prelude.Maybe Prelude.Bool
}
deriving (CacheParameterGroup -> CacheParameterGroup -> Bool
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]
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
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. 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'
{ $sel:arn:CacheParameterGroup' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
$sel:cacheParameterGroupFamily:CacheParameterGroup' :: Maybe Text
cacheParameterGroupFamily = forall a. Maybe a
Prelude.Nothing,
$sel:cacheParameterGroupName:CacheParameterGroup' :: Maybe Text
cacheParameterGroupName = forall a. Maybe a
Prelude.Nothing,
$sel:description:CacheParameterGroup' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:isGlobal:CacheParameterGroup' :: Maybe Bool
isGlobal = forall a. Maybe a
Prelude.Nothing
}
cacheParameterGroup_arn :: Lens.Lens' CacheParameterGroup (Prelude.Maybe Prelude.Text)
cacheParameterGroup_arn :: Lens' CacheParameterGroup (Maybe Text)
cacheParameterGroup_arn = 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_cacheParameterGroupFamily :: Lens.Lens' CacheParameterGroup (Prelude.Maybe Prelude.Text)
cacheParameterGroup_cacheParameterGroupFamily :: Lens' CacheParameterGroup (Maybe Text)
cacheParameterGroup_cacheParameterGroupFamily = 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_cacheParameterGroupName :: Lens.Lens' CacheParameterGroup (Prelude.Maybe Prelude.Text)
cacheParameterGroup_cacheParameterGroupName :: Lens' CacheParameterGroup (Maybe Text)
cacheParameterGroup_cacheParameterGroupName = 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_description :: Lens.Lens' CacheParameterGroup (Prelude.Maybe Prelude.Text)
cacheParameterGroup_description :: Lens' CacheParameterGroup (Maybe Text)
cacheParameterGroup_description = 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)
cacheParameterGroup_isGlobal :: Lens.Lens' CacheParameterGroup (Prelude.Maybe Prelude.Bool)
cacheParameterGroup_isGlobal :: Lens' CacheParameterGroup (Maybe Bool)
cacheParameterGroup_isGlobal = 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)
instance Data.FromXML CacheParameterGroup where
parseXML :: [Node] -> Either String CacheParameterGroup
parseXML [Node]
x =
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> CacheParameterGroup
CacheParameterGroup'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"ARN")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"CacheParameterGroupFamily")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"CacheParameterGroupName")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"Description")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"IsGlobal")
instance Prelude.Hashable CacheParameterGroup where
hashWithSalt :: Int -> CacheParameterGroup -> Int
hashWithSalt Int
_salt CacheParameterGroup' {Maybe Bool
Maybe Text
isGlobal :: Maybe Bool
description :: Maybe Text
cacheParameterGroupName :: Maybe Text
cacheParameterGroupFamily :: Maybe Text
arn :: Maybe Text
$sel:isGlobal:CacheParameterGroup' :: CacheParameterGroup -> Maybe Bool
$sel:description:CacheParameterGroup' :: CacheParameterGroup -> Maybe Text
$sel:cacheParameterGroupName:CacheParameterGroup' :: CacheParameterGroup -> Maybe Text
$sel:cacheParameterGroupFamily:CacheParameterGroup' :: CacheParameterGroup -> Maybe Text
$sel:arn:CacheParameterGroup' :: CacheParameterGroup -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
arn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
cacheParameterGroupFamily
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
cacheParameterGroupName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
isGlobal
instance Prelude.NFData CacheParameterGroup where
rnf :: CacheParameterGroup -> ()
rnf CacheParameterGroup' {Maybe Bool
Maybe Text
isGlobal :: Maybe Bool
description :: Maybe Text
cacheParameterGroupName :: Maybe Text
cacheParameterGroupFamily :: Maybe Text
arn :: Maybe Text
$sel:isGlobal:CacheParameterGroup' :: CacheParameterGroup -> Maybe Bool
$sel:description:CacheParameterGroup' :: CacheParameterGroup -> Maybe Text
$sel:cacheParameterGroupName:CacheParameterGroup' :: CacheParameterGroup -> Maybe Text
$sel:cacheParameterGroupFamily:CacheParameterGroup' :: CacheParameterGroup -> Maybe Text
$sel:arn:CacheParameterGroup' :: CacheParameterGroup -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
cacheParameterGroupFamily
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
cacheParameterGroupName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
isGlobal