{-# 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.Synthetics.Types.VpcConfigOutput 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 VpcConfigOutput = VpcConfigOutput'
{
VpcConfigOutput -> Maybe [Text]
securityGroupIds :: Prelude.Maybe [Prelude.Text],
VpcConfigOutput -> Maybe [Text]
subnetIds :: Prelude.Maybe [Prelude.Text],
VpcConfigOutput -> Maybe Text
vpcId :: Prelude.Maybe Prelude.Text
}
deriving (VpcConfigOutput -> VpcConfigOutput -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VpcConfigOutput -> VpcConfigOutput -> Bool
$c/= :: VpcConfigOutput -> VpcConfigOutput -> Bool
== :: VpcConfigOutput -> VpcConfigOutput -> Bool
$c== :: VpcConfigOutput -> VpcConfigOutput -> Bool
Prelude.Eq, ReadPrec [VpcConfigOutput]
ReadPrec VpcConfigOutput
Int -> ReadS VpcConfigOutput
ReadS [VpcConfigOutput]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [VpcConfigOutput]
$creadListPrec :: ReadPrec [VpcConfigOutput]
readPrec :: ReadPrec VpcConfigOutput
$creadPrec :: ReadPrec VpcConfigOutput
readList :: ReadS [VpcConfigOutput]
$creadList :: ReadS [VpcConfigOutput]
readsPrec :: Int -> ReadS VpcConfigOutput
$creadsPrec :: Int -> ReadS VpcConfigOutput
Prelude.Read, Int -> VpcConfigOutput -> ShowS
[VpcConfigOutput] -> ShowS
VpcConfigOutput -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VpcConfigOutput] -> ShowS
$cshowList :: [VpcConfigOutput] -> ShowS
show :: VpcConfigOutput -> String
$cshow :: VpcConfigOutput -> String
showsPrec :: Int -> VpcConfigOutput -> ShowS
$cshowsPrec :: Int -> VpcConfigOutput -> ShowS
Prelude.Show, forall x. Rep VpcConfigOutput x -> VpcConfigOutput
forall x. VpcConfigOutput -> Rep VpcConfigOutput x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep VpcConfigOutput x -> VpcConfigOutput
$cfrom :: forall x. VpcConfigOutput -> Rep VpcConfigOutput x
Prelude.Generic)
newVpcConfigOutput ::
VpcConfigOutput
newVpcConfigOutput :: VpcConfigOutput
newVpcConfigOutput =
VpcConfigOutput'
{ $sel:securityGroupIds:VpcConfigOutput' :: Maybe [Text]
securityGroupIds =
forall a. Maybe a
Prelude.Nothing,
$sel:subnetIds:VpcConfigOutput' :: Maybe [Text]
subnetIds = forall a. Maybe a
Prelude.Nothing,
$sel:vpcId:VpcConfigOutput' :: Maybe Text
vpcId = forall a. Maybe a
Prelude.Nothing
}
vpcConfigOutput_securityGroupIds :: Lens.Lens' VpcConfigOutput (Prelude.Maybe [Prelude.Text])
vpcConfigOutput_securityGroupIds :: Lens' VpcConfigOutput (Maybe [Text])
vpcConfigOutput_securityGroupIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VpcConfigOutput' {Maybe [Text]
securityGroupIds :: Maybe [Text]
$sel:securityGroupIds:VpcConfigOutput' :: VpcConfigOutput -> Maybe [Text]
securityGroupIds} -> Maybe [Text]
securityGroupIds) (\s :: VpcConfigOutput
s@VpcConfigOutput' {} Maybe [Text]
a -> VpcConfigOutput
s {$sel:securityGroupIds:VpcConfigOutput' :: Maybe [Text]
securityGroupIds = Maybe [Text]
a} :: VpcConfigOutput) 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
vpcConfigOutput_subnetIds :: Lens.Lens' VpcConfigOutput (Prelude.Maybe [Prelude.Text])
vpcConfigOutput_subnetIds :: Lens' VpcConfigOutput (Maybe [Text])
vpcConfigOutput_subnetIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VpcConfigOutput' {Maybe [Text]
subnetIds :: Maybe [Text]
$sel:subnetIds:VpcConfigOutput' :: VpcConfigOutput -> Maybe [Text]
subnetIds} -> Maybe [Text]
subnetIds) (\s :: VpcConfigOutput
s@VpcConfigOutput' {} Maybe [Text]
a -> VpcConfigOutput
s {$sel:subnetIds:VpcConfigOutput' :: Maybe [Text]
subnetIds = Maybe [Text]
a} :: VpcConfigOutput) 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
vpcConfigOutput_vpcId :: Lens.Lens' VpcConfigOutput (Prelude.Maybe Prelude.Text)
vpcConfigOutput_vpcId :: Lens' VpcConfigOutput (Maybe Text)
vpcConfigOutput_vpcId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VpcConfigOutput' {Maybe Text
vpcId :: Maybe Text
$sel:vpcId:VpcConfigOutput' :: VpcConfigOutput -> Maybe Text
vpcId} -> Maybe Text
vpcId) (\s :: VpcConfigOutput
s@VpcConfigOutput' {} Maybe Text
a -> VpcConfigOutput
s {$sel:vpcId:VpcConfigOutput' :: Maybe Text
vpcId = Maybe Text
a} :: VpcConfigOutput)
instance Data.FromJSON VpcConfigOutput where
parseJSON :: Value -> Parser VpcConfigOutput
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"VpcConfigOutput"
( \Object
x ->
Maybe [Text] -> Maybe [Text] -> Maybe Text -> VpcConfigOutput
VpcConfigOutput'
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
"SecurityGroupIds"
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
"SubnetIds" 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 VpcConfigOutput where
hashWithSalt :: Int -> VpcConfigOutput -> Int
hashWithSalt Int
_salt VpcConfigOutput' {Maybe [Text]
Maybe Text
vpcId :: Maybe Text
subnetIds :: Maybe [Text]
securityGroupIds :: Maybe [Text]
$sel:vpcId:VpcConfigOutput' :: VpcConfigOutput -> Maybe Text
$sel:subnetIds:VpcConfigOutput' :: VpcConfigOutput -> Maybe [Text]
$sel:securityGroupIds:VpcConfigOutput' :: VpcConfigOutput -> Maybe [Text]
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
securityGroupIds
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
subnetIds
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
vpcId
instance Prelude.NFData VpcConfigOutput where
rnf :: VpcConfigOutput -> ()
rnf VpcConfigOutput' {Maybe [Text]
Maybe Text
vpcId :: Maybe Text
subnetIds :: Maybe [Text]
securityGroupIds :: Maybe [Text]
$sel:vpcId:VpcConfigOutput' :: VpcConfigOutput -> Maybe Text
$sel:subnetIds:VpcConfigOutput' :: VpcConfigOutput -> Maybe [Text]
$sel:securityGroupIds:VpcConfigOutput' :: VpcConfigOutput -> Maybe [Text]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
securityGroupIds
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
subnetIds
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
vpcId