{-# 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.AppRunner.Types.IngressVpcConfiguration 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 IngressVpcConfiguration = IngressVpcConfiguration'
{
IngressVpcConfiguration -> Maybe Text
vpcEndpointId :: Prelude.Maybe Prelude.Text,
IngressVpcConfiguration -> Maybe Text
vpcId :: Prelude.Maybe Prelude.Text
}
deriving (IngressVpcConfiguration -> IngressVpcConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: IngressVpcConfiguration -> IngressVpcConfiguration -> Bool
$c/= :: IngressVpcConfiguration -> IngressVpcConfiguration -> Bool
== :: IngressVpcConfiguration -> IngressVpcConfiguration -> Bool
$c== :: IngressVpcConfiguration -> IngressVpcConfiguration -> Bool
Prelude.Eq, ReadPrec [IngressVpcConfiguration]
ReadPrec IngressVpcConfiguration
Int -> ReadS IngressVpcConfiguration
ReadS [IngressVpcConfiguration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [IngressVpcConfiguration]
$creadListPrec :: ReadPrec [IngressVpcConfiguration]
readPrec :: ReadPrec IngressVpcConfiguration
$creadPrec :: ReadPrec IngressVpcConfiguration
readList :: ReadS [IngressVpcConfiguration]
$creadList :: ReadS [IngressVpcConfiguration]
readsPrec :: Int -> ReadS IngressVpcConfiguration
$creadsPrec :: Int -> ReadS IngressVpcConfiguration
Prelude.Read, Int -> IngressVpcConfiguration -> ShowS
[IngressVpcConfiguration] -> ShowS
IngressVpcConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [IngressVpcConfiguration] -> ShowS
$cshowList :: [IngressVpcConfiguration] -> ShowS
show :: IngressVpcConfiguration -> String
$cshow :: IngressVpcConfiguration -> String
showsPrec :: Int -> IngressVpcConfiguration -> ShowS
$cshowsPrec :: Int -> IngressVpcConfiguration -> ShowS
Prelude.Show, forall x. Rep IngressVpcConfiguration x -> IngressVpcConfiguration
forall x. IngressVpcConfiguration -> Rep IngressVpcConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep IngressVpcConfiguration x -> IngressVpcConfiguration
$cfrom :: forall x. IngressVpcConfiguration -> Rep IngressVpcConfiguration x
Prelude.Generic)
newIngressVpcConfiguration ::
IngressVpcConfiguration
newIngressVpcConfiguration :: IngressVpcConfiguration
newIngressVpcConfiguration =
IngressVpcConfiguration'
{ $sel:vpcEndpointId:IngressVpcConfiguration' :: Maybe Text
vpcEndpointId =
forall a. Maybe a
Prelude.Nothing,
$sel:vpcId:IngressVpcConfiguration' :: Maybe Text
vpcId = forall a. Maybe a
Prelude.Nothing
}
ingressVpcConfiguration_vpcEndpointId :: Lens.Lens' IngressVpcConfiguration (Prelude.Maybe Prelude.Text)
ingressVpcConfiguration_vpcEndpointId :: Lens' IngressVpcConfiguration (Maybe Text)
ingressVpcConfiguration_vpcEndpointId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IngressVpcConfiguration' {Maybe Text
vpcEndpointId :: Maybe Text
$sel:vpcEndpointId:IngressVpcConfiguration' :: IngressVpcConfiguration -> Maybe Text
vpcEndpointId} -> Maybe Text
vpcEndpointId) (\s :: IngressVpcConfiguration
s@IngressVpcConfiguration' {} Maybe Text
a -> IngressVpcConfiguration
s {$sel:vpcEndpointId:IngressVpcConfiguration' :: Maybe Text
vpcEndpointId = Maybe Text
a} :: IngressVpcConfiguration)
ingressVpcConfiguration_vpcId :: Lens.Lens' IngressVpcConfiguration (Prelude.Maybe Prelude.Text)
ingressVpcConfiguration_vpcId :: Lens' IngressVpcConfiguration (Maybe Text)
ingressVpcConfiguration_vpcId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IngressVpcConfiguration' {Maybe Text
vpcId :: Maybe Text
$sel:vpcId:IngressVpcConfiguration' :: IngressVpcConfiguration -> Maybe Text
vpcId} -> Maybe Text
vpcId) (\s :: IngressVpcConfiguration
s@IngressVpcConfiguration' {} Maybe Text
a -> IngressVpcConfiguration
s {$sel:vpcId:IngressVpcConfiguration' :: Maybe Text
vpcId = Maybe Text
a} :: IngressVpcConfiguration)
instance Data.FromJSON IngressVpcConfiguration where
parseJSON :: Value -> Parser IngressVpcConfiguration
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"IngressVpcConfiguration"
( \Object
x ->
Maybe Text -> Maybe Text -> IngressVpcConfiguration
IngressVpcConfiguration'
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
"VpcEndpointId")
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 IngressVpcConfiguration where
hashWithSalt :: Int -> IngressVpcConfiguration -> Int
hashWithSalt Int
_salt IngressVpcConfiguration' {Maybe Text
vpcId :: Maybe Text
vpcEndpointId :: Maybe Text
$sel:vpcId:IngressVpcConfiguration' :: IngressVpcConfiguration -> Maybe Text
$sel:vpcEndpointId:IngressVpcConfiguration' :: IngressVpcConfiguration -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
vpcEndpointId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
vpcId
instance Prelude.NFData IngressVpcConfiguration where
rnf :: IngressVpcConfiguration -> ()
rnf IngressVpcConfiguration' {Maybe Text
vpcId :: Maybe Text
vpcEndpointId :: Maybe Text
$sel:vpcId:IngressVpcConfiguration' :: IngressVpcConfiguration -> Maybe Text
$sel:vpcEndpointId:IngressVpcConfiguration' :: IngressVpcConfiguration -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
vpcEndpointId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
vpcId
instance Data.ToJSON IngressVpcConfiguration where
toJSON :: IngressVpcConfiguration -> Value
toJSON IngressVpcConfiguration' {Maybe Text
vpcId :: Maybe Text
vpcEndpointId :: Maybe Text
$sel:vpcId:IngressVpcConfiguration' :: IngressVpcConfiguration -> Maybe Text
$sel:vpcEndpointId:IngressVpcConfiguration' :: IngressVpcConfiguration -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"VpcEndpointId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
vpcEndpointId,
(Key
"VpcId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
vpcId
]
)