{-# 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.MemoryDb.Types.ParameterGroup where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ParameterGroup = ParameterGroup'
{
ParameterGroup -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
ParameterGroup -> Maybe Text
family :: Prelude.Maybe Prelude.Text,
ParameterGroup -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
ParameterGroup -> Maybe Text
description :: Prelude.Maybe Prelude.Text
}
deriving (ParameterGroup -> ParameterGroup -> Bool
(ParameterGroup -> ParameterGroup -> Bool)
-> (ParameterGroup -> ParameterGroup -> Bool) -> Eq ParameterGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ParameterGroup -> ParameterGroup -> Bool
$c/= :: ParameterGroup -> ParameterGroup -> Bool
== :: ParameterGroup -> ParameterGroup -> Bool
$c== :: ParameterGroup -> ParameterGroup -> Bool
Prelude.Eq, ReadPrec [ParameterGroup]
ReadPrec ParameterGroup
Int -> ReadS ParameterGroup
ReadS [ParameterGroup]
(Int -> ReadS ParameterGroup)
-> ReadS [ParameterGroup]
-> ReadPrec ParameterGroup
-> ReadPrec [ParameterGroup]
-> Read ParameterGroup
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ParameterGroup]
$creadListPrec :: ReadPrec [ParameterGroup]
readPrec :: ReadPrec ParameterGroup
$creadPrec :: ReadPrec ParameterGroup
readList :: ReadS [ParameterGroup]
$creadList :: ReadS [ParameterGroup]
readsPrec :: Int -> ReadS ParameterGroup
$creadsPrec :: Int -> ReadS ParameterGroup
Prelude.Read, Int -> ParameterGroup -> ShowS
[ParameterGroup] -> ShowS
ParameterGroup -> String
(Int -> ParameterGroup -> ShowS)
-> (ParameterGroup -> String)
-> ([ParameterGroup] -> ShowS)
-> Show ParameterGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ParameterGroup] -> ShowS
$cshowList :: [ParameterGroup] -> ShowS
show :: ParameterGroup -> String
$cshow :: ParameterGroup -> String
showsPrec :: Int -> ParameterGroup -> ShowS
$cshowsPrec :: Int -> ParameterGroup -> ShowS
Prelude.Show, (forall x. ParameterGroup -> Rep ParameterGroup x)
-> (forall x. Rep ParameterGroup x -> ParameterGroup)
-> Generic ParameterGroup
forall x. Rep ParameterGroup x -> ParameterGroup
forall x. ParameterGroup -> Rep ParameterGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ParameterGroup x -> ParameterGroup
$cfrom :: forall x. ParameterGroup -> Rep ParameterGroup x
Prelude.Generic)
newParameterGroup ::
ParameterGroup
newParameterGroup :: ParameterGroup
newParameterGroup =
ParameterGroup' :: Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> ParameterGroup
ParameterGroup'
{ $sel:arn:ParameterGroup' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:family:ParameterGroup' :: Maybe Text
family = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:ParameterGroup' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:description:ParameterGroup' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
parameterGroup_arn :: Lens.Lens' ParameterGroup (Prelude.Maybe Prelude.Text)
parameterGroup_arn :: (Maybe Text -> f (Maybe Text))
-> ParameterGroup -> f ParameterGroup
parameterGroup_arn = (ParameterGroup -> Maybe Text)
-> (ParameterGroup -> Maybe Text -> ParameterGroup)
-> Lens ParameterGroup ParameterGroup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ParameterGroup' {Maybe Text
arn :: Maybe Text
$sel:arn:ParameterGroup' :: ParameterGroup -> Maybe Text
arn} -> Maybe Text
arn) (\s :: ParameterGroup
s@ParameterGroup' {} Maybe Text
a -> ParameterGroup
s {$sel:arn:ParameterGroup' :: Maybe Text
arn = Maybe Text
a} :: ParameterGroup)
parameterGroup_family :: Lens.Lens' ParameterGroup (Prelude.Maybe Prelude.Text)
parameterGroup_family :: (Maybe Text -> f (Maybe Text))
-> ParameterGroup -> f ParameterGroup
parameterGroup_family = (ParameterGroup -> Maybe Text)
-> (ParameterGroup -> Maybe Text -> ParameterGroup)
-> Lens ParameterGroup ParameterGroup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ParameterGroup' {Maybe Text
family :: Maybe Text
$sel:family:ParameterGroup' :: ParameterGroup -> Maybe Text
family} -> Maybe Text
family) (\s :: ParameterGroup
s@ParameterGroup' {} Maybe Text
a -> ParameterGroup
s {$sel:family:ParameterGroup' :: Maybe Text
family = Maybe Text
a} :: ParameterGroup)
parameterGroup_name :: Lens.Lens' ParameterGroup (Prelude.Maybe Prelude.Text)
parameterGroup_name :: (Maybe Text -> f (Maybe Text))
-> ParameterGroup -> f ParameterGroup
parameterGroup_name = (ParameterGroup -> Maybe Text)
-> (ParameterGroup -> Maybe Text -> ParameterGroup)
-> Lens ParameterGroup ParameterGroup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ParameterGroup' {Maybe Text
name :: Maybe Text
$sel:name:ParameterGroup' :: ParameterGroup -> Maybe Text
name} -> Maybe Text
name) (\s :: ParameterGroup
s@ParameterGroup' {} Maybe Text
a -> ParameterGroup
s {$sel:name:ParameterGroup' :: Maybe Text
name = Maybe Text
a} :: ParameterGroup)
parameterGroup_description :: Lens.Lens' ParameterGroup (Prelude.Maybe Prelude.Text)
parameterGroup_description :: (Maybe Text -> f (Maybe Text))
-> ParameterGroup -> f ParameterGroup
parameterGroup_description = (ParameterGroup -> Maybe Text)
-> (ParameterGroup -> Maybe Text -> ParameterGroup)
-> Lens ParameterGroup ParameterGroup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ParameterGroup' {Maybe Text
description :: Maybe Text
$sel:description:ParameterGroup' :: ParameterGroup -> Maybe Text
description} -> Maybe Text
description) (\s :: ParameterGroup
s@ParameterGroup' {} Maybe Text
a -> ParameterGroup
s {$sel:description:ParameterGroup' :: Maybe Text
description = Maybe Text
a} :: ParameterGroup)
instance Core.FromJSON ParameterGroup where
parseJSON :: Value -> Parser ParameterGroup
parseJSON =
String
-> (Object -> Parser ParameterGroup)
-> Value
-> Parser ParameterGroup
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ParameterGroup"
( \Object
x ->
Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> ParameterGroup
ParameterGroup'
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> ParameterGroup)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe Text -> Maybe Text -> ParameterGroup)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ARN")
Parser (Maybe Text -> Maybe Text -> Maybe Text -> ParameterGroup)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> ParameterGroup)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Family")
Parser (Maybe Text -> Maybe Text -> ParameterGroup)
-> Parser (Maybe Text) -> Parser (Maybe Text -> ParameterGroup)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Name")
Parser (Maybe Text -> ParameterGroup)
-> Parser (Maybe Text) -> Parser ParameterGroup
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Description")
)
instance Prelude.Hashable ParameterGroup
instance Prelude.NFData ParameterGroup