{-# 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.Route53.Types.VPC 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
import Amazonka.Route53.Internal
import Amazonka.Route53.Types.VPCRegion
data VPC = VPC'
{ VPC -> Maybe Text
vPCId :: Prelude.Maybe Prelude.Text,
VPC -> Maybe VPCRegion
vPCRegion :: Prelude.Maybe VPCRegion
}
deriving (VPC -> VPC -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VPC -> VPC -> Bool
$c/= :: VPC -> VPC -> Bool
== :: VPC -> VPC -> Bool
$c== :: VPC -> VPC -> Bool
Prelude.Eq, ReadPrec [VPC]
ReadPrec VPC
Int -> ReadS VPC
ReadS [VPC]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [VPC]
$creadListPrec :: ReadPrec [VPC]
readPrec :: ReadPrec VPC
$creadPrec :: ReadPrec VPC
readList :: ReadS [VPC]
$creadList :: ReadS [VPC]
readsPrec :: Int -> ReadS VPC
$creadsPrec :: Int -> ReadS VPC
Prelude.Read, Int -> VPC -> ShowS
[VPC] -> ShowS
VPC -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VPC] -> ShowS
$cshowList :: [VPC] -> ShowS
show :: VPC -> String
$cshow :: VPC -> String
showsPrec :: Int -> VPC -> ShowS
$cshowsPrec :: Int -> VPC -> ShowS
Prelude.Show, forall x. Rep VPC x -> VPC
forall x. VPC -> Rep VPC x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep VPC x -> VPC
$cfrom :: forall x. VPC -> Rep VPC x
Prelude.Generic)
newVPC ::
VPC
newVPC :: VPC
newVPC =
VPC'
{ $sel:vPCId:VPC' :: Maybe Text
vPCId = forall a. Maybe a
Prelude.Nothing,
$sel:vPCRegion:VPC' :: Maybe VPCRegion
vPCRegion = forall a. Maybe a
Prelude.Nothing
}
vpc_vPCId :: Lens.Lens' VPC (Prelude.Maybe Prelude.Text)
vpc_vPCId :: Lens' VPC (Maybe Text)
vpc_vPCId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VPC' {Maybe Text
vPCId :: Maybe Text
$sel:vPCId:VPC' :: VPC -> Maybe Text
vPCId} -> Maybe Text
vPCId) (\s :: VPC
s@VPC' {} Maybe Text
a -> VPC
s {$sel:vPCId:VPC' :: Maybe Text
vPCId = Maybe Text
a} :: VPC)
vpc_vPCRegion :: Lens.Lens' VPC (Prelude.Maybe VPCRegion)
vpc_vPCRegion :: Lens' VPC (Maybe VPCRegion)
vpc_vPCRegion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VPC' {Maybe VPCRegion
vPCRegion :: Maybe VPCRegion
$sel:vPCRegion:VPC' :: VPC -> Maybe VPCRegion
vPCRegion} -> Maybe VPCRegion
vPCRegion) (\s :: VPC
s@VPC' {} Maybe VPCRegion
a -> VPC
s {$sel:vPCRegion:VPC' :: Maybe VPCRegion
vPCRegion = Maybe VPCRegion
a} :: VPC)
instance Data.FromXML VPC where
parseXML :: [Node] -> Either String VPC
parseXML [Node]
x =
Maybe Text -> Maybe VPCRegion -> VPC
VPC'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"VPCId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"VPCRegion")
instance Prelude.Hashable VPC where
hashWithSalt :: Int -> VPC -> Int
hashWithSalt Int
_salt VPC' {Maybe Text
Maybe VPCRegion
vPCRegion :: Maybe VPCRegion
vPCId :: Maybe Text
$sel:vPCRegion:VPC' :: VPC -> Maybe VPCRegion
$sel:vPCId:VPC' :: VPC -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
vPCId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe VPCRegion
vPCRegion
instance Prelude.NFData VPC where
rnf :: VPC -> ()
rnf VPC' {Maybe Text
Maybe VPCRegion
vPCRegion :: Maybe VPCRegion
vPCId :: Maybe Text
$sel:vPCRegion:VPC' :: VPC -> Maybe VPCRegion
$sel:vPCId:VPC' :: VPC -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
vPCId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe VPCRegion
vPCRegion
instance Data.ToXML VPC where
toXML :: VPC -> XML
toXML VPC' {Maybe Text
Maybe VPCRegion
vPCRegion :: Maybe VPCRegion
vPCId :: Maybe Text
$sel:vPCRegion:VPC' :: VPC -> Maybe VPCRegion
$sel:vPCId:VPC' :: VPC -> Maybe Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ Name
"VPCId" forall a. ToXML a => Name -> a -> XML
Data.@= Maybe Text
vPCId,
Name
"VPCRegion" forall a. ToXML a => Name -> a -> XML
Data.@= Maybe VPCRegion
vPCRegion
]