{-# 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.VpcSecurityGroupMembership where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data VpcSecurityGroupMembership = VpcSecurityGroupMembership'
{
VpcSecurityGroupMembership -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
VpcSecurityGroupMembership -> Maybe Text
vpcSecurityGroupId :: Prelude.Maybe Prelude.Text
}
deriving (VpcSecurityGroupMembership -> VpcSecurityGroupMembership -> Bool
(VpcSecurityGroupMembership -> VpcSecurityGroupMembership -> Bool)
-> (VpcSecurityGroupMembership
-> VpcSecurityGroupMembership -> Bool)
-> Eq VpcSecurityGroupMembership
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VpcSecurityGroupMembership -> VpcSecurityGroupMembership -> Bool
$c/= :: VpcSecurityGroupMembership -> VpcSecurityGroupMembership -> Bool
== :: VpcSecurityGroupMembership -> VpcSecurityGroupMembership -> Bool
$c== :: VpcSecurityGroupMembership -> VpcSecurityGroupMembership -> Bool
Prelude.Eq, ReadPrec [VpcSecurityGroupMembership]
ReadPrec VpcSecurityGroupMembership
Int -> ReadS VpcSecurityGroupMembership
ReadS [VpcSecurityGroupMembership]
(Int -> ReadS VpcSecurityGroupMembership)
-> ReadS [VpcSecurityGroupMembership]
-> ReadPrec VpcSecurityGroupMembership
-> ReadPrec [VpcSecurityGroupMembership]
-> Read VpcSecurityGroupMembership
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [VpcSecurityGroupMembership]
$creadListPrec :: ReadPrec [VpcSecurityGroupMembership]
readPrec :: ReadPrec VpcSecurityGroupMembership
$creadPrec :: ReadPrec VpcSecurityGroupMembership
readList :: ReadS [VpcSecurityGroupMembership]
$creadList :: ReadS [VpcSecurityGroupMembership]
readsPrec :: Int -> ReadS VpcSecurityGroupMembership
$creadsPrec :: Int -> ReadS VpcSecurityGroupMembership
Prelude.Read, Int -> VpcSecurityGroupMembership -> ShowS
[VpcSecurityGroupMembership] -> ShowS
VpcSecurityGroupMembership -> String
(Int -> VpcSecurityGroupMembership -> ShowS)
-> (VpcSecurityGroupMembership -> String)
-> ([VpcSecurityGroupMembership] -> ShowS)
-> Show VpcSecurityGroupMembership
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VpcSecurityGroupMembership] -> ShowS
$cshowList :: [VpcSecurityGroupMembership] -> ShowS
show :: VpcSecurityGroupMembership -> String
$cshow :: VpcSecurityGroupMembership -> String
showsPrec :: Int -> VpcSecurityGroupMembership -> ShowS
$cshowsPrec :: Int -> VpcSecurityGroupMembership -> ShowS
Prelude.Show, (forall x.
VpcSecurityGroupMembership -> Rep VpcSecurityGroupMembership x)
-> (forall x.
Rep VpcSecurityGroupMembership x -> VpcSecurityGroupMembership)
-> Generic VpcSecurityGroupMembership
forall x.
Rep VpcSecurityGroupMembership x -> VpcSecurityGroupMembership
forall x.
VpcSecurityGroupMembership -> Rep VpcSecurityGroupMembership x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep VpcSecurityGroupMembership x -> VpcSecurityGroupMembership
$cfrom :: forall x.
VpcSecurityGroupMembership -> Rep VpcSecurityGroupMembership x
Prelude.Generic)
newVpcSecurityGroupMembership ::
VpcSecurityGroupMembership
newVpcSecurityGroupMembership :: VpcSecurityGroupMembership
newVpcSecurityGroupMembership =
VpcSecurityGroupMembership' :: Maybe Text -> Maybe Text -> VpcSecurityGroupMembership
VpcSecurityGroupMembership'
{ $sel:status:VpcSecurityGroupMembership' :: Maybe Text
status =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:vpcSecurityGroupId:VpcSecurityGroupMembership' :: Maybe Text
vpcSecurityGroupId = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
vpcSecurityGroupMembership_status :: Lens.Lens' VpcSecurityGroupMembership (Prelude.Maybe Prelude.Text)
vpcSecurityGroupMembership_status :: (Maybe Text -> f (Maybe Text))
-> VpcSecurityGroupMembership -> f VpcSecurityGroupMembership
vpcSecurityGroupMembership_status = (VpcSecurityGroupMembership -> Maybe Text)
-> (VpcSecurityGroupMembership
-> Maybe Text -> VpcSecurityGroupMembership)
-> Lens
VpcSecurityGroupMembership
VpcSecurityGroupMembership
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VpcSecurityGroupMembership' {Maybe Text
status :: Maybe Text
$sel:status:VpcSecurityGroupMembership' :: VpcSecurityGroupMembership -> Maybe Text
status} -> Maybe Text
status) (\s :: VpcSecurityGroupMembership
s@VpcSecurityGroupMembership' {} Maybe Text
a -> VpcSecurityGroupMembership
s {$sel:status:VpcSecurityGroupMembership' :: Maybe Text
status = Maybe Text
a} :: VpcSecurityGroupMembership)
vpcSecurityGroupMembership_vpcSecurityGroupId :: Lens.Lens' VpcSecurityGroupMembership (Prelude.Maybe Prelude.Text)
vpcSecurityGroupMembership_vpcSecurityGroupId :: (Maybe Text -> f (Maybe Text))
-> VpcSecurityGroupMembership -> f VpcSecurityGroupMembership
vpcSecurityGroupMembership_vpcSecurityGroupId = (VpcSecurityGroupMembership -> Maybe Text)
-> (VpcSecurityGroupMembership
-> Maybe Text -> VpcSecurityGroupMembership)
-> Lens
VpcSecurityGroupMembership
VpcSecurityGroupMembership
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VpcSecurityGroupMembership' {Maybe Text
vpcSecurityGroupId :: Maybe Text
$sel:vpcSecurityGroupId:VpcSecurityGroupMembership' :: VpcSecurityGroupMembership -> Maybe Text
vpcSecurityGroupId} -> Maybe Text
vpcSecurityGroupId) (\s :: VpcSecurityGroupMembership
s@VpcSecurityGroupMembership' {} Maybe Text
a -> VpcSecurityGroupMembership
s {$sel:vpcSecurityGroupId:VpcSecurityGroupMembership' :: Maybe Text
vpcSecurityGroupId = Maybe Text
a} :: VpcSecurityGroupMembership)
instance Core.FromJSON VpcSecurityGroupMembership where
parseJSON :: Value -> Parser VpcSecurityGroupMembership
parseJSON =
String
-> (Object -> Parser VpcSecurityGroupMembership)
-> Value
-> Parser VpcSecurityGroupMembership
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"VpcSecurityGroupMembership"
( \Object
x ->
Maybe Text -> Maybe Text -> VpcSecurityGroupMembership
VpcSecurityGroupMembership'
(Maybe Text -> Maybe Text -> VpcSecurityGroupMembership)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> VpcSecurityGroupMembership)
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
"Status")
Parser (Maybe Text -> VpcSecurityGroupMembership)
-> Parser (Maybe Text) -> Parser VpcSecurityGroupMembership
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
"VpcSecurityGroupId")
)
instance Prelude.Hashable VpcSecurityGroupMembership
instance Prelude.NFData VpcSecurityGroupMembership