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