{-# 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.KafkaConnect.Types.VpcDescription 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
data VpcDescription = VpcDescription'
{
VpcDescription -> Maybe [Text]
securityGroups :: Prelude.Maybe [Prelude.Text],
VpcDescription -> Maybe [Text]
subnets :: Prelude.Maybe [Prelude.Text]
}
deriving (VpcDescription -> VpcDescription -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VpcDescription -> VpcDescription -> Bool
$c/= :: VpcDescription -> VpcDescription -> Bool
== :: VpcDescription -> VpcDescription -> Bool
$c== :: VpcDescription -> VpcDescription -> Bool
Prelude.Eq, ReadPrec [VpcDescription]
ReadPrec VpcDescription
Int -> ReadS VpcDescription
ReadS [VpcDescription]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [VpcDescription]
$creadListPrec :: ReadPrec [VpcDescription]
readPrec :: ReadPrec VpcDescription
$creadPrec :: ReadPrec VpcDescription
readList :: ReadS [VpcDescription]
$creadList :: ReadS [VpcDescription]
readsPrec :: Int -> ReadS VpcDescription
$creadsPrec :: Int -> ReadS VpcDescription
Prelude.Read, Int -> VpcDescription -> ShowS
[VpcDescription] -> ShowS
VpcDescription -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VpcDescription] -> ShowS
$cshowList :: [VpcDescription] -> ShowS
show :: VpcDescription -> String
$cshow :: VpcDescription -> String
showsPrec :: Int -> VpcDescription -> ShowS
$cshowsPrec :: Int -> VpcDescription -> ShowS
Prelude.Show, forall x. Rep VpcDescription x -> VpcDescription
forall x. VpcDescription -> Rep VpcDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep VpcDescription x -> VpcDescription
$cfrom :: forall x. VpcDescription -> Rep VpcDescription x
Prelude.Generic)
newVpcDescription ::
VpcDescription
newVpcDescription :: VpcDescription
newVpcDescription =
VpcDescription'
{ $sel:securityGroups:VpcDescription' :: Maybe [Text]
securityGroups = forall a. Maybe a
Prelude.Nothing,
$sel:subnets:VpcDescription' :: Maybe [Text]
subnets = forall a. Maybe a
Prelude.Nothing
}
vpcDescription_securityGroups :: Lens.Lens' VpcDescription (Prelude.Maybe [Prelude.Text])
vpcDescription_securityGroups :: Lens' VpcDescription (Maybe [Text])
vpcDescription_securityGroups = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VpcDescription' {Maybe [Text]
securityGroups :: Maybe [Text]
$sel:securityGroups:VpcDescription' :: VpcDescription -> Maybe [Text]
securityGroups} -> Maybe [Text]
securityGroups) (\s :: VpcDescription
s@VpcDescription' {} Maybe [Text]
a -> VpcDescription
s {$sel:securityGroups:VpcDescription' :: Maybe [Text]
securityGroups = Maybe [Text]
a} :: VpcDescription) 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
vpcDescription_subnets :: Lens.Lens' VpcDescription (Prelude.Maybe [Prelude.Text])
vpcDescription_subnets :: Lens' VpcDescription (Maybe [Text])
vpcDescription_subnets = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VpcDescription' {Maybe [Text]
subnets :: Maybe [Text]
$sel:subnets:VpcDescription' :: VpcDescription -> Maybe [Text]
subnets} -> Maybe [Text]
subnets) (\s :: VpcDescription
s@VpcDescription' {} Maybe [Text]
a -> VpcDescription
s {$sel:subnets:VpcDescription' :: Maybe [Text]
subnets = Maybe [Text]
a} :: VpcDescription) 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
instance Data.FromJSON VpcDescription where
parseJSON :: Value -> Parser VpcDescription
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"VpcDescription"
( \Object
x ->
Maybe [Text] -> Maybe [Text] -> VpcDescription
VpcDescription'
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
"securityGroups" 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
"subnets" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
)
instance Prelude.Hashable VpcDescription where
hashWithSalt :: Int -> VpcDescription -> Int
hashWithSalt Int
_salt VpcDescription' {Maybe [Text]
subnets :: Maybe [Text]
securityGroups :: Maybe [Text]
$sel:subnets:VpcDescription' :: VpcDescription -> Maybe [Text]
$sel:securityGroups:VpcDescription' :: VpcDescription -> Maybe [Text]
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
securityGroups
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
subnets
instance Prelude.NFData VpcDescription where
rnf :: VpcDescription -> ()
rnf VpcDescription' {Maybe [Text]
subnets :: Maybe [Text]
securityGroups :: Maybe [Text]
$sel:subnets:VpcDescription' :: VpcDescription -> Maybe [Text]
$sel:securityGroups:VpcDescription' :: VpcDescription -> Maybe [Text]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
securityGroups
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
subnets