{-# 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 Amazonka.DMS.Types.Subnet
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ReplicationSubnetGroup = ReplicationSubnetGroup'
{
ReplicationSubnetGroup -> Maybe Text
vpcId :: Prelude.Maybe Prelude.Text,
ReplicationSubnetGroup -> Maybe [Subnet]
subnets :: Prelude.Maybe [Subnet],
ReplicationSubnetGroup -> Maybe Text
replicationSubnetGroupIdentifier :: Prelude.Maybe Prelude.Text,
ReplicationSubnetGroup -> Maybe Text
subnetGroupStatus :: Prelude.Maybe Prelude.Text,
ReplicationSubnetGroup -> Maybe Text
replicationSubnetGroupDescription :: Prelude.Maybe Prelude.Text
}
deriving (ReplicationSubnetGroup -> ReplicationSubnetGroup -> Bool
(ReplicationSubnetGroup -> ReplicationSubnetGroup -> Bool)
-> (ReplicationSubnetGroup -> ReplicationSubnetGroup -> Bool)
-> Eq ReplicationSubnetGroup
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]
(Int -> ReadS ReplicationSubnetGroup)
-> ReadS [ReplicationSubnetGroup]
-> ReadPrec ReplicationSubnetGroup
-> ReadPrec [ReplicationSubnetGroup]
-> Read 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
(Int -> ReplicationSubnetGroup -> ShowS)
-> (ReplicationSubnetGroup -> String)
-> ([ReplicationSubnetGroup] -> ShowS)
-> Show ReplicationSubnetGroup
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. ReplicationSubnetGroup -> Rep ReplicationSubnetGroup x)
-> (forall x.
Rep ReplicationSubnetGroup x -> ReplicationSubnetGroup)
-> Generic ReplicationSubnetGroup
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' :: Maybe Text
-> Maybe [Subnet]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ReplicationSubnetGroup
ReplicationSubnetGroup'
{ $sel:vpcId:ReplicationSubnetGroup' :: Maybe Text
vpcId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:subnets:ReplicationSubnetGroup' :: Maybe [Subnet]
subnets = Maybe [Subnet]
forall a. Maybe a
Prelude.Nothing,
$sel:replicationSubnetGroupIdentifier:ReplicationSubnetGroup' :: Maybe Text
replicationSubnetGroupIdentifier = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:subnetGroupStatus:ReplicationSubnetGroup' :: Maybe Text
subnetGroupStatus = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:replicationSubnetGroupDescription:ReplicationSubnetGroup' :: Maybe Text
replicationSubnetGroupDescription = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
replicationSubnetGroup_vpcId :: Lens.Lens' ReplicationSubnetGroup (Prelude.Maybe Prelude.Text)
replicationSubnetGroup_vpcId :: (Maybe Text -> f (Maybe Text))
-> ReplicationSubnetGroup -> f ReplicationSubnetGroup
replicationSubnetGroup_vpcId = (ReplicationSubnetGroup -> Maybe Text)
-> (ReplicationSubnetGroup -> Maybe Text -> ReplicationSubnetGroup)
-> Lens
ReplicationSubnetGroup
ReplicationSubnetGroup
(Maybe Text)
(Maybe Text)
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)
replicationSubnetGroup_subnets :: Lens.Lens' ReplicationSubnetGroup (Prelude.Maybe [Subnet])
replicationSubnetGroup_subnets :: (Maybe [Subnet] -> f (Maybe [Subnet]))
-> ReplicationSubnetGroup -> f ReplicationSubnetGroup
replicationSubnetGroup_subnets = (ReplicationSubnetGroup -> Maybe [Subnet])
-> (ReplicationSubnetGroup
-> Maybe [Subnet] -> ReplicationSubnetGroup)
-> Lens
ReplicationSubnetGroup
ReplicationSubnetGroup
(Maybe [Subnet])
(Maybe [Subnet])
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) ((Maybe [Subnet] -> f (Maybe [Subnet]))
-> ReplicationSubnetGroup -> f ReplicationSubnetGroup)
-> ((Maybe [Subnet] -> f (Maybe [Subnet]))
-> Maybe [Subnet] -> f (Maybe [Subnet]))
-> (Maybe [Subnet] -> f (Maybe [Subnet]))
-> ReplicationSubnetGroup
-> f ReplicationSubnetGroup
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Subnet] [Subnet] [Subnet] [Subnet]
-> Iso
(Maybe [Subnet]) (Maybe [Subnet]) (Maybe [Subnet]) (Maybe [Subnet])
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 AnIso [Subnet] [Subnet] [Subnet] [Subnet]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
replicationSubnetGroup_replicationSubnetGroupIdentifier :: Lens.Lens' ReplicationSubnetGroup (Prelude.Maybe Prelude.Text)
replicationSubnetGroup_replicationSubnetGroupIdentifier :: (Maybe Text -> f (Maybe Text))
-> ReplicationSubnetGroup -> f ReplicationSubnetGroup
replicationSubnetGroup_replicationSubnetGroupIdentifier = (ReplicationSubnetGroup -> Maybe Text)
-> (ReplicationSubnetGroup -> Maybe Text -> ReplicationSubnetGroup)
-> Lens
ReplicationSubnetGroup
ReplicationSubnetGroup
(Maybe Text)
(Maybe Text)
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 :: (Maybe Text -> f (Maybe Text))
-> ReplicationSubnetGroup -> f ReplicationSubnetGroup
replicationSubnetGroup_subnetGroupStatus = (ReplicationSubnetGroup -> Maybe Text)
-> (ReplicationSubnetGroup -> Maybe Text -> ReplicationSubnetGroup)
-> Lens
ReplicationSubnetGroup
ReplicationSubnetGroup
(Maybe Text)
(Maybe Text)
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_replicationSubnetGroupDescription :: Lens.Lens' ReplicationSubnetGroup (Prelude.Maybe Prelude.Text)
replicationSubnetGroup_replicationSubnetGroupDescription :: (Maybe Text -> f (Maybe Text))
-> ReplicationSubnetGroup -> f ReplicationSubnetGroup
replicationSubnetGroup_replicationSubnetGroupDescription = (ReplicationSubnetGroup -> Maybe Text)
-> (ReplicationSubnetGroup -> Maybe Text -> ReplicationSubnetGroup)
-> Lens
ReplicationSubnetGroup
ReplicationSubnetGroup
(Maybe Text)
(Maybe Text)
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)
instance Core.FromJSON ReplicationSubnetGroup where
parseJSON :: Value -> Parser ReplicationSubnetGroup
parseJSON =
String
-> (Object -> Parser ReplicationSubnetGroup)
-> Value
-> Parser ReplicationSubnetGroup
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ReplicationSubnetGroup"
( \Object
x ->
Maybe Text
-> Maybe [Subnet]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ReplicationSubnetGroup
ReplicationSubnetGroup'
(Maybe Text
-> Maybe [Subnet]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ReplicationSubnetGroup)
-> Parser (Maybe Text)
-> Parser
(Maybe [Subnet]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ReplicationSubnetGroup)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"VpcId")
Parser
(Maybe [Subnet]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ReplicationSubnetGroup)
-> Parser (Maybe [Subnet])
-> Parser
(Maybe Text -> Maybe Text -> Maybe Text -> ReplicationSubnetGroup)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Subnet]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Subnets" Parser (Maybe (Maybe [Subnet]))
-> Maybe [Subnet] -> Parser (Maybe [Subnet])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Subnet]
forall a. Monoid a => a
Prelude.mempty)
Parser
(Maybe Text -> Maybe Text -> Maybe Text -> ReplicationSubnetGroup)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> ReplicationSubnetGroup)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ReplicationSubnetGroupIdentifier")
Parser (Maybe Text -> Maybe Text -> ReplicationSubnetGroup)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> ReplicationSubnetGroup)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SubnetGroupStatus")
Parser (Maybe Text -> ReplicationSubnetGroup)
-> Parser (Maybe Text) -> Parser ReplicationSubnetGroup
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ReplicationSubnetGroupDescription")
)
instance Prelude.Hashable ReplicationSubnetGroup
instance Prelude.NFData ReplicationSubnetGroup