{-# 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.OptionGroupMembership 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 OptionGroupMembership = OptionGroupMembership'
{
OptionGroupMembership -> Maybe Text
optionGroupName :: Prelude.Maybe Prelude.Text,
OptionGroupMembership -> Maybe Text
status :: Prelude.Maybe Prelude.Text
}
deriving (OptionGroupMembership -> OptionGroupMembership -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OptionGroupMembership -> OptionGroupMembership -> Bool
$c/= :: OptionGroupMembership -> OptionGroupMembership -> Bool
== :: OptionGroupMembership -> OptionGroupMembership -> Bool
$c== :: OptionGroupMembership -> OptionGroupMembership -> Bool
Prelude.Eq, ReadPrec [OptionGroupMembership]
ReadPrec OptionGroupMembership
Int -> ReadS OptionGroupMembership
ReadS [OptionGroupMembership]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [OptionGroupMembership]
$creadListPrec :: ReadPrec [OptionGroupMembership]
readPrec :: ReadPrec OptionGroupMembership
$creadPrec :: ReadPrec OptionGroupMembership
readList :: ReadS [OptionGroupMembership]
$creadList :: ReadS [OptionGroupMembership]
readsPrec :: Int -> ReadS OptionGroupMembership
$creadsPrec :: Int -> ReadS OptionGroupMembership
Prelude.Read, Int -> OptionGroupMembership -> ShowS
[OptionGroupMembership] -> ShowS
OptionGroupMembership -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [OptionGroupMembership] -> ShowS
$cshowList :: [OptionGroupMembership] -> ShowS
show :: OptionGroupMembership -> String
$cshow :: OptionGroupMembership -> String
showsPrec :: Int -> OptionGroupMembership -> ShowS
$cshowsPrec :: Int -> OptionGroupMembership -> ShowS
Prelude.Show, forall x. Rep OptionGroupMembership x -> OptionGroupMembership
forall x. OptionGroupMembership -> Rep OptionGroupMembership x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep OptionGroupMembership x -> OptionGroupMembership
$cfrom :: forall x. OptionGroupMembership -> Rep OptionGroupMembership x
Prelude.Generic)
newOptionGroupMembership ::
OptionGroupMembership
newOptionGroupMembership :: OptionGroupMembership
newOptionGroupMembership =
OptionGroupMembership'
{ $sel:optionGroupName:OptionGroupMembership' :: Maybe Text
optionGroupName =
forall a. Maybe a
Prelude.Nothing,
$sel:status:OptionGroupMembership' :: Maybe Text
status = forall a. Maybe a
Prelude.Nothing
}
optionGroupMembership_optionGroupName :: Lens.Lens' OptionGroupMembership (Prelude.Maybe Prelude.Text)
optionGroupMembership_optionGroupName :: Lens' OptionGroupMembership (Maybe Text)
optionGroupMembership_optionGroupName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OptionGroupMembership' {Maybe Text
optionGroupName :: Maybe Text
$sel:optionGroupName:OptionGroupMembership' :: OptionGroupMembership -> Maybe Text
optionGroupName} -> Maybe Text
optionGroupName) (\s :: OptionGroupMembership
s@OptionGroupMembership' {} Maybe Text
a -> OptionGroupMembership
s {$sel:optionGroupName:OptionGroupMembership' :: Maybe Text
optionGroupName = Maybe Text
a} :: OptionGroupMembership)
optionGroupMembership_status :: Lens.Lens' OptionGroupMembership (Prelude.Maybe Prelude.Text)
optionGroupMembership_status :: Lens' OptionGroupMembership (Maybe Text)
optionGroupMembership_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OptionGroupMembership' {Maybe Text
status :: Maybe Text
$sel:status:OptionGroupMembership' :: OptionGroupMembership -> Maybe Text
status} -> Maybe Text
status) (\s :: OptionGroupMembership
s@OptionGroupMembership' {} Maybe Text
a -> OptionGroupMembership
s {$sel:status:OptionGroupMembership' :: Maybe Text
status = Maybe Text
a} :: OptionGroupMembership)
instance Data.FromXML OptionGroupMembership where
parseXML :: [Node] -> Either String OptionGroupMembership
parseXML [Node]
x =
Maybe Text -> Maybe Text -> OptionGroupMembership
OptionGroupMembership'
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
"OptionGroupName")
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
"Status")
instance Prelude.Hashable OptionGroupMembership where
hashWithSalt :: Int -> OptionGroupMembership -> Int
hashWithSalt Int
_salt OptionGroupMembership' {Maybe Text
status :: Maybe Text
optionGroupName :: Maybe Text
$sel:status:OptionGroupMembership' :: OptionGroupMembership -> Maybe Text
$sel:optionGroupName:OptionGroupMembership' :: OptionGroupMembership -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
optionGroupName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
status
instance Prelude.NFData OptionGroupMembership where
rnf :: OptionGroupMembership -> ()
rnf OptionGroupMembership' {Maybe Text
status :: Maybe Text
optionGroupName :: Maybe Text
$sel:status:OptionGroupMembership' :: OptionGroupMembership -> Maybe Text
$sel:optionGroupName:OptionGroupMembership' :: OptionGroupMembership -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
optionGroupName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
status