{-# 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.DBSubnetGroup 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
import Amazonka.RDS.Types.Subnet
data DBSubnetGroup = DBSubnetGroup'
{
DBSubnetGroup -> Maybe Text
dbSubnetGroupArn :: Prelude.Maybe Prelude.Text,
DBSubnetGroup -> Maybe Text
dbSubnetGroupDescription :: Prelude.Maybe Prelude.Text,
DBSubnetGroup -> Maybe Text
dbSubnetGroupName :: Prelude.Maybe Prelude.Text,
DBSubnetGroup -> Maybe Text
subnetGroupStatus :: Prelude.Maybe Prelude.Text,
DBSubnetGroup -> Maybe [Subnet]
subnets :: Prelude.Maybe [Subnet],
DBSubnetGroup -> Maybe [Text]
supportedNetworkTypes :: Prelude.Maybe [Prelude.Text],
DBSubnetGroup -> Maybe Text
vpcId :: Prelude.Maybe Prelude.Text
}
deriving (DBSubnetGroup -> DBSubnetGroup -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DBSubnetGroup -> DBSubnetGroup -> Bool
$c/= :: DBSubnetGroup -> DBSubnetGroup -> Bool
== :: DBSubnetGroup -> DBSubnetGroup -> Bool
$c== :: DBSubnetGroup -> DBSubnetGroup -> Bool
Prelude.Eq, ReadPrec [DBSubnetGroup]
ReadPrec DBSubnetGroup
Int -> ReadS DBSubnetGroup
ReadS [DBSubnetGroup]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DBSubnetGroup]
$creadListPrec :: ReadPrec [DBSubnetGroup]
readPrec :: ReadPrec DBSubnetGroup
$creadPrec :: ReadPrec DBSubnetGroup
readList :: ReadS [DBSubnetGroup]
$creadList :: ReadS [DBSubnetGroup]
readsPrec :: Int -> ReadS DBSubnetGroup
$creadsPrec :: Int -> ReadS DBSubnetGroup
Prelude.Read, Int -> DBSubnetGroup -> ShowS
[DBSubnetGroup] -> ShowS
DBSubnetGroup -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DBSubnetGroup] -> ShowS
$cshowList :: [DBSubnetGroup] -> ShowS
show :: DBSubnetGroup -> String
$cshow :: DBSubnetGroup -> String
showsPrec :: Int -> DBSubnetGroup -> ShowS
$cshowsPrec :: Int -> DBSubnetGroup -> ShowS
Prelude.Show, forall x. Rep DBSubnetGroup x -> DBSubnetGroup
forall x. DBSubnetGroup -> Rep DBSubnetGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DBSubnetGroup x -> DBSubnetGroup
$cfrom :: forall x. DBSubnetGroup -> Rep DBSubnetGroup x
Prelude.Generic)
newDBSubnetGroup ::
DBSubnetGroup
newDBSubnetGroup :: DBSubnetGroup
newDBSubnetGroup =
DBSubnetGroup'
{ $sel:dbSubnetGroupArn:DBSubnetGroup' :: Maybe Text
dbSubnetGroupArn = forall a. Maybe a
Prelude.Nothing,
$sel:dbSubnetGroupDescription:DBSubnetGroup' :: Maybe Text
dbSubnetGroupDescription = forall a. Maybe a
Prelude.Nothing,
$sel:dbSubnetGroupName:DBSubnetGroup' :: Maybe Text
dbSubnetGroupName = forall a. Maybe a
Prelude.Nothing,
$sel:subnetGroupStatus:DBSubnetGroup' :: Maybe Text
subnetGroupStatus = forall a. Maybe a
Prelude.Nothing,
$sel:subnets:DBSubnetGroup' :: Maybe [Subnet]
subnets = forall a. Maybe a
Prelude.Nothing,
$sel:supportedNetworkTypes:DBSubnetGroup' :: Maybe [Text]
supportedNetworkTypes = forall a. Maybe a
Prelude.Nothing,
$sel:vpcId:DBSubnetGroup' :: Maybe Text
vpcId = forall a. Maybe a
Prelude.Nothing
}
dbSubnetGroup_dbSubnetGroupArn :: Lens.Lens' DBSubnetGroup (Prelude.Maybe Prelude.Text)
dbSubnetGroup_dbSubnetGroupArn :: Lens' DBSubnetGroup (Maybe Text)
dbSubnetGroup_dbSubnetGroupArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBSubnetGroup' {Maybe Text
dbSubnetGroupArn :: Maybe Text
$sel:dbSubnetGroupArn:DBSubnetGroup' :: DBSubnetGroup -> Maybe Text
dbSubnetGroupArn} -> Maybe Text
dbSubnetGroupArn) (\s :: DBSubnetGroup
s@DBSubnetGroup' {} Maybe Text
a -> DBSubnetGroup
s {$sel:dbSubnetGroupArn:DBSubnetGroup' :: Maybe Text
dbSubnetGroupArn = Maybe Text
a} :: DBSubnetGroup)
dbSubnetGroup_dbSubnetGroupDescription :: Lens.Lens' DBSubnetGroup (Prelude.Maybe Prelude.Text)
dbSubnetGroup_dbSubnetGroupDescription :: Lens' DBSubnetGroup (Maybe Text)
dbSubnetGroup_dbSubnetGroupDescription = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBSubnetGroup' {Maybe Text
dbSubnetGroupDescription :: Maybe Text
$sel:dbSubnetGroupDescription:DBSubnetGroup' :: DBSubnetGroup -> Maybe Text
dbSubnetGroupDescription} -> Maybe Text
dbSubnetGroupDescription) (\s :: DBSubnetGroup
s@DBSubnetGroup' {} Maybe Text
a -> DBSubnetGroup
s {$sel:dbSubnetGroupDescription:DBSubnetGroup' :: Maybe Text
dbSubnetGroupDescription = Maybe Text
a} :: DBSubnetGroup)
dbSubnetGroup_dbSubnetGroupName :: Lens.Lens' DBSubnetGroup (Prelude.Maybe Prelude.Text)
dbSubnetGroup_dbSubnetGroupName :: Lens' DBSubnetGroup (Maybe Text)
dbSubnetGroup_dbSubnetGroupName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBSubnetGroup' {Maybe Text
dbSubnetGroupName :: Maybe Text
$sel:dbSubnetGroupName:DBSubnetGroup' :: DBSubnetGroup -> Maybe Text
dbSubnetGroupName} -> Maybe Text
dbSubnetGroupName) (\s :: DBSubnetGroup
s@DBSubnetGroup' {} Maybe Text
a -> DBSubnetGroup
s {$sel:dbSubnetGroupName:DBSubnetGroup' :: Maybe Text
dbSubnetGroupName = Maybe Text
a} :: DBSubnetGroup)
dbSubnetGroup_subnetGroupStatus :: Lens.Lens' DBSubnetGroup (Prelude.Maybe Prelude.Text)
dbSubnetGroup_subnetGroupStatus :: Lens' DBSubnetGroup (Maybe Text)
dbSubnetGroup_subnetGroupStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBSubnetGroup' {Maybe Text
subnetGroupStatus :: Maybe Text
$sel:subnetGroupStatus:DBSubnetGroup' :: DBSubnetGroup -> Maybe Text
subnetGroupStatus} -> Maybe Text
subnetGroupStatus) (\s :: DBSubnetGroup
s@DBSubnetGroup' {} Maybe Text
a -> DBSubnetGroup
s {$sel:subnetGroupStatus:DBSubnetGroup' :: Maybe Text
subnetGroupStatus = Maybe Text
a} :: DBSubnetGroup)
dbSubnetGroup_subnets :: Lens.Lens' DBSubnetGroup (Prelude.Maybe [Subnet])
dbSubnetGroup_subnets :: Lens' DBSubnetGroup (Maybe [Subnet])
dbSubnetGroup_subnets = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBSubnetGroup' {Maybe [Subnet]
subnets :: Maybe [Subnet]
$sel:subnets:DBSubnetGroup' :: DBSubnetGroup -> Maybe [Subnet]
subnets} -> Maybe [Subnet]
subnets) (\s :: DBSubnetGroup
s@DBSubnetGroup' {} Maybe [Subnet]
a -> DBSubnetGroup
s {$sel:subnets:DBSubnetGroup' :: Maybe [Subnet]
subnets = Maybe [Subnet]
a} :: DBSubnetGroup) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
dbSubnetGroup_supportedNetworkTypes :: Lens.Lens' DBSubnetGroup (Prelude.Maybe [Prelude.Text])
dbSubnetGroup_supportedNetworkTypes :: Lens' DBSubnetGroup (Maybe [Text])
dbSubnetGroup_supportedNetworkTypes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBSubnetGroup' {Maybe [Text]
supportedNetworkTypes :: Maybe [Text]
$sel:supportedNetworkTypes:DBSubnetGroup' :: DBSubnetGroup -> Maybe [Text]
supportedNetworkTypes} -> Maybe [Text]
supportedNetworkTypes) (\s :: DBSubnetGroup
s@DBSubnetGroup' {} Maybe [Text]
a -> DBSubnetGroup
s {$sel:supportedNetworkTypes:DBSubnetGroup' :: Maybe [Text]
supportedNetworkTypes = Maybe [Text]
a} :: DBSubnetGroup) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
dbSubnetGroup_vpcId :: Lens.Lens' DBSubnetGroup (Prelude.Maybe Prelude.Text)
dbSubnetGroup_vpcId :: Lens' DBSubnetGroup (Maybe Text)
dbSubnetGroup_vpcId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBSubnetGroup' {Maybe Text
vpcId :: Maybe Text
$sel:vpcId:DBSubnetGroup' :: DBSubnetGroup -> Maybe Text
vpcId} -> Maybe Text
vpcId) (\s :: DBSubnetGroup
s@DBSubnetGroup' {} Maybe Text
a -> DBSubnetGroup
s {$sel:vpcId:DBSubnetGroup' :: Maybe Text
vpcId = Maybe Text
a} :: DBSubnetGroup)
instance Data.FromXML DBSubnetGroup where
parseXML :: [Node] -> Either String DBSubnetGroup
parseXML [Node]
x =
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Subnet]
-> Maybe [Text]
-> Maybe Text
-> DBSubnetGroup
DBSubnetGroup'
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
"DBSubnetGroupArn")
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
"DBSubnetGroupDescription")
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
"DBSubnetGroupName")
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
"SubnetGroupStatus")
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
"Subnets"
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (forall a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList Text
"Subnet")
)
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
"SupportedNetworkTypes"
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (forall a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList Text
"member")
)
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
"VpcId")
instance Prelude.Hashable DBSubnetGroup where
hashWithSalt :: Int -> DBSubnetGroup -> Int
hashWithSalt Int
_salt DBSubnetGroup' {Maybe [Text]
Maybe [Subnet]
Maybe Text
vpcId :: Maybe Text
supportedNetworkTypes :: Maybe [Text]
subnets :: Maybe [Subnet]
subnetGroupStatus :: Maybe Text
dbSubnetGroupName :: Maybe Text
dbSubnetGroupDescription :: Maybe Text
dbSubnetGroupArn :: Maybe Text
$sel:vpcId:DBSubnetGroup' :: DBSubnetGroup -> Maybe Text
$sel:supportedNetworkTypes:DBSubnetGroup' :: DBSubnetGroup -> Maybe [Text]
$sel:subnets:DBSubnetGroup' :: DBSubnetGroup -> Maybe [Subnet]
$sel:subnetGroupStatus:DBSubnetGroup' :: DBSubnetGroup -> Maybe Text
$sel:dbSubnetGroupName:DBSubnetGroup' :: DBSubnetGroup -> Maybe Text
$sel:dbSubnetGroupDescription:DBSubnetGroup' :: DBSubnetGroup -> Maybe Text
$sel:dbSubnetGroupArn:DBSubnetGroup' :: DBSubnetGroup -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
dbSubnetGroupArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
dbSubnetGroupDescription
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
dbSubnetGroupName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
subnetGroupStatus
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Subnet]
subnets
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
supportedNetworkTypes
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
vpcId
instance Prelude.NFData DBSubnetGroup where
rnf :: DBSubnetGroup -> ()
rnf DBSubnetGroup' {Maybe [Text]
Maybe [Subnet]
Maybe Text
vpcId :: Maybe Text
supportedNetworkTypes :: Maybe [Text]
subnets :: Maybe [Subnet]
subnetGroupStatus :: Maybe Text
dbSubnetGroupName :: Maybe Text
dbSubnetGroupDescription :: Maybe Text
dbSubnetGroupArn :: Maybe Text
$sel:vpcId:DBSubnetGroup' :: DBSubnetGroup -> Maybe Text
$sel:supportedNetworkTypes:DBSubnetGroup' :: DBSubnetGroup -> Maybe [Text]
$sel:subnets:DBSubnetGroup' :: DBSubnetGroup -> Maybe [Subnet]
$sel:subnetGroupStatus:DBSubnetGroup' :: DBSubnetGroup -> Maybe Text
$sel:dbSubnetGroupName:DBSubnetGroup' :: DBSubnetGroup -> Maybe Text
$sel:dbSubnetGroupDescription:DBSubnetGroup' :: DBSubnetGroup -> Maybe Text
$sel:dbSubnetGroupArn:DBSubnetGroup' :: DBSubnetGroup -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
dbSubnetGroupArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
dbSubnetGroupDescription
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
dbSubnetGroupName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
subnetGroupStatus
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Subnet]
subnets
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
supportedNetworkTypes
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
vpcId