{-# 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.DMS.Types.ReplicationSubnetGroup where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import Amazonka.DMS.Types.Subnet
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data ReplicationSubnetGroup = ReplicationSubnetGroup'
{
ReplicationSubnetGroup -> Maybe Text
replicationSubnetGroupDescription :: Prelude.Maybe Prelude.Text,
ReplicationSubnetGroup -> Maybe Text
replicationSubnetGroupIdentifier :: Prelude.Maybe Prelude.Text,
ReplicationSubnetGroup -> Maybe Text
subnetGroupStatus :: Prelude.Maybe Prelude.Text,
ReplicationSubnetGroup -> Maybe [Subnet]
subnets :: Prelude.Maybe [Subnet],
ReplicationSubnetGroup -> Maybe [Text]
supportedNetworkTypes :: Prelude.Maybe [Prelude.Text],
ReplicationSubnetGroup -> Maybe Text
vpcId :: Prelude.Maybe Prelude.Text
}
deriving (ReplicationSubnetGroup -> ReplicationSubnetGroup -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ReplicationSubnetGroup -> ReplicationSubnetGroup -> Bool
$c/= :: ReplicationSubnetGroup -> ReplicationSubnetGroup -> Bool
== :: ReplicationSubnetGroup -> ReplicationSubnetGroup -> Bool
$c== :: ReplicationSubnetGroup -> ReplicationSubnetGroup -> Bool
Prelude.Eq, ReadPrec [ReplicationSubnetGroup]
ReadPrec ReplicationSubnetGroup
Int -> ReadS ReplicationSubnetGroup
ReadS [ReplicationSubnetGroup]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ReplicationSubnetGroup]
$creadListPrec :: ReadPrec [ReplicationSubnetGroup]
readPrec :: ReadPrec ReplicationSubnetGroup
$creadPrec :: ReadPrec ReplicationSubnetGroup
readList :: ReadS [ReplicationSubnetGroup]
$creadList :: ReadS [ReplicationSubnetGroup]
readsPrec :: Int -> ReadS ReplicationSubnetGroup
$creadsPrec :: Int -> ReadS ReplicationSubnetGroup
Prelude.Read, Int -> ReplicationSubnetGroup -> ShowS
[ReplicationSubnetGroup] -> ShowS
ReplicationSubnetGroup -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ReplicationSubnetGroup] -> ShowS
$cshowList :: [ReplicationSubnetGroup] -> ShowS
show :: ReplicationSubnetGroup -> String
$cshow :: ReplicationSubnetGroup -> String
showsPrec :: Int -> ReplicationSubnetGroup -> ShowS
$cshowsPrec :: Int -> ReplicationSubnetGroup -> ShowS
Prelude.Show, forall x. Rep ReplicationSubnetGroup x -> ReplicationSubnetGroup
forall x. ReplicationSubnetGroup -> Rep ReplicationSubnetGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ReplicationSubnetGroup x -> ReplicationSubnetGroup
$cfrom :: forall x. ReplicationSubnetGroup -> Rep ReplicationSubnetGroup x
Prelude.Generic)
newReplicationSubnetGroup ::
ReplicationSubnetGroup
newReplicationSubnetGroup :: ReplicationSubnetGroup
newReplicationSubnetGroup =
ReplicationSubnetGroup'
{ $sel:replicationSubnetGroupDescription:ReplicationSubnetGroup' :: Maybe Text
replicationSubnetGroupDescription =
forall a. Maybe a
Prelude.Nothing,
$sel:replicationSubnetGroupIdentifier:ReplicationSubnetGroup' :: Maybe Text
replicationSubnetGroupIdentifier = forall a. Maybe a
Prelude.Nothing,
$sel:subnetGroupStatus:ReplicationSubnetGroup' :: Maybe Text
subnetGroupStatus = forall a. Maybe a
Prelude.Nothing,
$sel:subnets:ReplicationSubnetGroup' :: Maybe [Subnet]
subnets = forall a. Maybe a
Prelude.Nothing,
$sel:supportedNetworkTypes:ReplicationSubnetGroup' :: Maybe [Text]
supportedNetworkTypes = forall a. Maybe a
Prelude.Nothing,
$sel:vpcId:ReplicationSubnetGroup' :: Maybe Text
vpcId = forall a. Maybe a
Prelude.Nothing
}
replicationSubnetGroup_replicationSubnetGroupDescription :: Lens.Lens' ReplicationSubnetGroup (Prelude.Maybe Prelude.Text)
replicationSubnetGroup_replicationSubnetGroupDescription :: Lens' ReplicationSubnetGroup (Maybe Text)
replicationSubnetGroup_replicationSubnetGroupDescription = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicationSubnetGroup' {Maybe Text
replicationSubnetGroupDescription :: Maybe Text
$sel:replicationSubnetGroupDescription:ReplicationSubnetGroup' :: ReplicationSubnetGroup -> Maybe Text
replicationSubnetGroupDescription} -> Maybe Text
replicationSubnetGroupDescription) (\s :: ReplicationSubnetGroup
s@ReplicationSubnetGroup' {} Maybe Text
a -> ReplicationSubnetGroup
s {$sel:replicationSubnetGroupDescription:ReplicationSubnetGroup' :: Maybe Text
replicationSubnetGroupDescription = Maybe Text
a} :: ReplicationSubnetGroup)
replicationSubnetGroup_replicationSubnetGroupIdentifier :: Lens.Lens' ReplicationSubnetGroup (Prelude.Maybe Prelude.Text)
replicationSubnetGroup_replicationSubnetGroupIdentifier :: Lens' ReplicationSubnetGroup (Maybe Text)
replicationSubnetGroup_replicationSubnetGroupIdentifier = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicationSubnetGroup' {Maybe Text
replicationSubnetGroupIdentifier :: Maybe Text
$sel:replicationSubnetGroupIdentifier:ReplicationSubnetGroup' :: ReplicationSubnetGroup -> Maybe Text
replicationSubnetGroupIdentifier} -> Maybe Text
replicationSubnetGroupIdentifier) (\s :: ReplicationSubnetGroup
s@ReplicationSubnetGroup' {} Maybe Text
a -> ReplicationSubnetGroup
s {$sel:replicationSubnetGroupIdentifier:ReplicationSubnetGroup' :: Maybe Text
replicationSubnetGroupIdentifier = Maybe Text
a} :: ReplicationSubnetGroup)
replicationSubnetGroup_subnetGroupStatus :: Lens.Lens' ReplicationSubnetGroup (Prelude.Maybe Prelude.Text)
replicationSubnetGroup_subnetGroupStatus :: Lens' ReplicationSubnetGroup (Maybe Text)
replicationSubnetGroup_subnetGroupStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicationSubnetGroup' {Maybe Text
subnetGroupStatus :: Maybe Text
$sel:subnetGroupStatus:ReplicationSubnetGroup' :: ReplicationSubnetGroup -> Maybe Text
subnetGroupStatus} -> Maybe Text
subnetGroupStatus) (\s :: ReplicationSubnetGroup
s@ReplicationSubnetGroup' {} Maybe Text
a -> ReplicationSubnetGroup
s {$sel:subnetGroupStatus:ReplicationSubnetGroup' :: Maybe Text
subnetGroupStatus = Maybe Text
a} :: ReplicationSubnetGroup)
replicationSubnetGroup_subnets :: Lens.Lens' ReplicationSubnetGroup (Prelude.Maybe [Subnet])
replicationSubnetGroup_subnets :: Lens' ReplicationSubnetGroup (Maybe [Subnet])
replicationSubnetGroup_subnets = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicationSubnetGroup' {Maybe [Subnet]
subnets :: Maybe [Subnet]
$sel:subnets:ReplicationSubnetGroup' :: ReplicationSubnetGroup -> Maybe [Subnet]
subnets} -> Maybe [Subnet]
subnets) (\s :: ReplicationSubnetGroup
s@ReplicationSubnetGroup' {} Maybe [Subnet]
a -> ReplicationSubnetGroup
s {$sel:subnets:ReplicationSubnetGroup' :: Maybe [Subnet]
subnets = Maybe [Subnet]
a} :: ReplicationSubnetGroup) 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
replicationSubnetGroup_supportedNetworkTypes :: Lens.Lens' ReplicationSubnetGroup (Prelude.Maybe [Prelude.Text])
replicationSubnetGroup_supportedNetworkTypes :: Lens' ReplicationSubnetGroup (Maybe [Text])
replicationSubnetGroup_supportedNetworkTypes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicationSubnetGroup' {Maybe [Text]
supportedNetworkTypes :: Maybe [Text]
$sel:supportedNetworkTypes:ReplicationSubnetGroup' :: ReplicationSubnetGroup -> Maybe [Text]
supportedNetworkTypes} -> Maybe [Text]
supportedNetworkTypes) (\s :: ReplicationSubnetGroup
s@ReplicationSubnetGroup' {} Maybe [Text]
a -> ReplicationSubnetGroup
s {$sel:supportedNetworkTypes:ReplicationSubnetGroup' :: Maybe [Text]
supportedNetworkTypes = Maybe [Text]
a} :: ReplicationSubnetGroup) 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
replicationSubnetGroup_vpcId :: Lens.Lens' ReplicationSubnetGroup (Prelude.Maybe Prelude.Text)
replicationSubnetGroup_vpcId :: Lens' ReplicationSubnetGroup (Maybe Text)
replicationSubnetGroup_vpcId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicationSubnetGroup' {Maybe Text
vpcId :: Maybe Text
$sel:vpcId:ReplicationSubnetGroup' :: ReplicationSubnetGroup -> Maybe Text
vpcId} -> Maybe Text
vpcId) (\s :: ReplicationSubnetGroup
s@ReplicationSubnetGroup' {} Maybe Text
a -> ReplicationSubnetGroup
s {$sel:vpcId:ReplicationSubnetGroup' :: Maybe Text
vpcId = Maybe Text
a} :: ReplicationSubnetGroup)
instance Data.FromJSON ReplicationSubnetGroup where
parseJSON :: Value -> Parser ReplicationSubnetGroup
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ReplicationSubnetGroup"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Subnet]
-> Maybe [Text]
-> Maybe Text
-> ReplicationSubnetGroup
ReplicationSubnetGroup'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ReplicationSubnetGroupDescription")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ReplicationSubnetGroupIdentifier")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"SubnetGroupStatus")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Subnets" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"SupportedNetworkTypes"
forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"VpcId")
)
instance Prelude.Hashable ReplicationSubnetGroup where
hashWithSalt :: Int -> ReplicationSubnetGroup -> Int
hashWithSalt Int
_salt ReplicationSubnetGroup' {Maybe [Text]
Maybe [Subnet]
Maybe Text
vpcId :: Maybe Text
supportedNetworkTypes :: Maybe [Text]
subnets :: Maybe [Subnet]
subnetGroupStatus :: Maybe Text
replicationSubnetGroupIdentifier :: Maybe Text
replicationSubnetGroupDescription :: Maybe Text
$sel:vpcId:ReplicationSubnetGroup' :: ReplicationSubnetGroup -> Maybe Text
$sel:supportedNetworkTypes:ReplicationSubnetGroup' :: ReplicationSubnetGroup -> Maybe [Text]
$sel:subnets:ReplicationSubnetGroup' :: ReplicationSubnetGroup -> Maybe [Subnet]
$sel:subnetGroupStatus:ReplicationSubnetGroup' :: ReplicationSubnetGroup -> Maybe Text
$sel:replicationSubnetGroupIdentifier:ReplicationSubnetGroup' :: ReplicationSubnetGroup -> Maybe Text
$sel:replicationSubnetGroupDescription:ReplicationSubnetGroup' :: ReplicationSubnetGroup -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
replicationSubnetGroupDescription
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
replicationSubnetGroupIdentifier
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 ReplicationSubnetGroup where
rnf :: ReplicationSubnetGroup -> ()
rnf ReplicationSubnetGroup' {Maybe [Text]
Maybe [Subnet]
Maybe Text
vpcId :: Maybe Text
supportedNetworkTypes :: Maybe [Text]
subnets :: Maybe [Subnet]
subnetGroupStatus :: Maybe Text
replicationSubnetGroupIdentifier :: Maybe Text
replicationSubnetGroupDescription :: Maybe Text
$sel:vpcId:ReplicationSubnetGroup' :: ReplicationSubnetGroup -> Maybe Text
$sel:supportedNetworkTypes:ReplicationSubnetGroup' :: ReplicationSubnetGroup -> Maybe [Text]
$sel:subnets:ReplicationSubnetGroup' :: ReplicationSubnetGroup -> Maybe [Subnet]
$sel:subnetGroupStatus:ReplicationSubnetGroup' :: ReplicationSubnetGroup -> Maybe Text
$sel:replicationSubnetGroupIdentifier:ReplicationSubnetGroup' :: ReplicationSubnetGroup -> Maybe Text
$sel:replicationSubnetGroupDescription:ReplicationSubnetGroup' :: ReplicationSubnetGroup -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
replicationSubnetGroupDescription
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
replicationSubnetGroupIdentifier
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