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