{-# 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.QuickSight.Types.VpcConnectionProperties where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data VpcConnectionProperties = VpcConnectionProperties'
{
VpcConnectionProperties -> Text
vpcConnectionArn :: Prelude.Text
}
deriving (VpcConnectionProperties -> VpcConnectionProperties -> Bool
(VpcConnectionProperties -> VpcConnectionProperties -> Bool)
-> (VpcConnectionProperties -> VpcConnectionProperties -> Bool)
-> Eq VpcConnectionProperties
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VpcConnectionProperties -> VpcConnectionProperties -> Bool
$c/= :: VpcConnectionProperties -> VpcConnectionProperties -> Bool
== :: VpcConnectionProperties -> VpcConnectionProperties -> Bool
$c== :: VpcConnectionProperties -> VpcConnectionProperties -> Bool
Prelude.Eq, ReadPrec [VpcConnectionProperties]
ReadPrec VpcConnectionProperties
Int -> ReadS VpcConnectionProperties
ReadS [VpcConnectionProperties]
(Int -> ReadS VpcConnectionProperties)
-> ReadS [VpcConnectionProperties]
-> ReadPrec VpcConnectionProperties
-> ReadPrec [VpcConnectionProperties]
-> Read VpcConnectionProperties
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [VpcConnectionProperties]
$creadListPrec :: ReadPrec [VpcConnectionProperties]
readPrec :: ReadPrec VpcConnectionProperties
$creadPrec :: ReadPrec VpcConnectionProperties
readList :: ReadS [VpcConnectionProperties]
$creadList :: ReadS [VpcConnectionProperties]
readsPrec :: Int -> ReadS VpcConnectionProperties
$creadsPrec :: Int -> ReadS VpcConnectionProperties
Prelude.Read, Int -> VpcConnectionProperties -> ShowS
[VpcConnectionProperties] -> ShowS
VpcConnectionProperties -> String
(Int -> VpcConnectionProperties -> ShowS)
-> (VpcConnectionProperties -> String)
-> ([VpcConnectionProperties] -> ShowS)
-> Show VpcConnectionProperties
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VpcConnectionProperties] -> ShowS
$cshowList :: [VpcConnectionProperties] -> ShowS
show :: VpcConnectionProperties -> String
$cshow :: VpcConnectionProperties -> String
showsPrec :: Int -> VpcConnectionProperties -> ShowS
$cshowsPrec :: Int -> VpcConnectionProperties -> ShowS
Prelude.Show, (forall x.
VpcConnectionProperties -> Rep VpcConnectionProperties x)
-> (forall x.
Rep VpcConnectionProperties x -> VpcConnectionProperties)
-> Generic VpcConnectionProperties
forall x. Rep VpcConnectionProperties x -> VpcConnectionProperties
forall x. VpcConnectionProperties -> Rep VpcConnectionProperties x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep VpcConnectionProperties x -> VpcConnectionProperties
$cfrom :: forall x. VpcConnectionProperties -> Rep VpcConnectionProperties x
Prelude.Generic)
newVpcConnectionProperties ::
Prelude.Text ->
VpcConnectionProperties
newVpcConnectionProperties :: Text -> VpcConnectionProperties
newVpcConnectionProperties Text
pVpcConnectionArn_ =
VpcConnectionProperties' :: Text -> VpcConnectionProperties
VpcConnectionProperties'
{ $sel:vpcConnectionArn:VpcConnectionProperties' :: Text
vpcConnectionArn =
Text
pVpcConnectionArn_
}
vpcConnectionProperties_vpcConnectionArn :: Lens.Lens' VpcConnectionProperties Prelude.Text
vpcConnectionProperties_vpcConnectionArn :: (Text -> f Text)
-> VpcConnectionProperties -> f VpcConnectionProperties
vpcConnectionProperties_vpcConnectionArn = (VpcConnectionProperties -> Text)
-> (VpcConnectionProperties -> Text -> VpcConnectionProperties)
-> Lens VpcConnectionProperties VpcConnectionProperties Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VpcConnectionProperties' {Text
vpcConnectionArn :: Text
$sel:vpcConnectionArn:VpcConnectionProperties' :: VpcConnectionProperties -> Text
vpcConnectionArn} -> Text
vpcConnectionArn) (\s :: VpcConnectionProperties
s@VpcConnectionProperties' {} Text
a -> VpcConnectionProperties
s {$sel:vpcConnectionArn:VpcConnectionProperties' :: Text
vpcConnectionArn = Text
a} :: VpcConnectionProperties)
instance Core.FromJSON VpcConnectionProperties where
parseJSON :: Value -> Parser VpcConnectionProperties
parseJSON =
String
-> (Object -> Parser VpcConnectionProperties)
-> Value
-> Parser VpcConnectionProperties
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"VpcConnectionProperties"
( \Object
x ->
Text -> VpcConnectionProperties
VpcConnectionProperties'
(Text -> VpcConnectionProperties)
-> Parser Text -> Parser VpcConnectionProperties
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"VpcConnectionArn")
)
instance Prelude.Hashable VpcConnectionProperties
instance Prelude.NFData VpcConnectionProperties
instance Core.ToJSON VpcConnectionProperties where
toJSON :: VpcConnectionProperties -> Value
toJSON VpcConnectionProperties' {Text
vpcConnectionArn :: Text
$sel:vpcConnectionArn:VpcConnectionProperties' :: VpcConnectionProperties -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"VpcConnectionArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
vpcConnectionArn)
]
)