{-# 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.GameLift.Types.VpcPeeringConnection where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.GameLift.Types.VpcPeeringConnectionStatus
import qualified Amazonka.Prelude as Prelude
data VpcPeeringConnection = VpcPeeringConnection'
{
VpcPeeringConnection -> Maybe Text
fleetArn :: Prelude.Maybe Prelude.Text,
VpcPeeringConnection -> Maybe Text
fleetId :: Prelude.Maybe Prelude.Text,
VpcPeeringConnection -> Maybe Text
gameLiftVpcId :: Prelude.Maybe Prelude.Text,
VpcPeeringConnection -> Maybe Text
ipV4CidrBlock :: Prelude.Maybe Prelude.Text,
VpcPeeringConnection -> Maybe Text
peerVpcId :: Prelude.Maybe Prelude.Text,
VpcPeeringConnection -> Maybe VpcPeeringConnectionStatus
status :: Prelude.Maybe VpcPeeringConnectionStatus,
VpcPeeringConnection -> Maybe Text
vpcPeeringConnectionId :: Prelude.Maybe Prelude.Text
}
deriving (VpcPeeringConnection -> VpcPeeringConnection -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VpcPeeringConnection -> VpcPeeringConnection -> Bool
$c/= :: VpcPeeringConnection -> VpcPeeringConnection -> Bool
== :: VpcPeeringConnection -> VpcPeeringConnection -> Bool
$c== :: VpcPeeringConnection -> VpcPeeringConnection -> Bool
Prelude.Eq, ReadPrec [VpcPeeringConnection]
ReadPrec VpcPeeringConnection
Int -> ReadS VpcPeeringConnection
ReadS [VpcPeeringConnection]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [VpcPeeringConnection]
$creadListPrec :: ReadPrec [VpcPeeringConnection]
readPrec :: ReadPrec VpcPeeringConnection
$creadPrec :: ReadPrec VpcPeeringConnection
readList :: ReadS [VpcPeeringConnection]
$creadList :: ReadS [VpcPeeringConnection]
readsPrec :: Int -> ReadS VpcPeeringConnection
$creadsPrec :: Int -> ReadS VpcPeeringConnection
Prelude.Read, Int -> VpcPeeringConnection -> ShowS
[VpcPeeringConnection] -> ShowS
VpcPeeringConnection -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VpcPeeringConnection] -> ShowS
$cshowList :: [VpcPeeringConnection] -> ShowS
show :: VpcPeeringConnection -> String
$cshow :: VpcPeeringConnection -> String
showsPrec :: Int -> VpcPeeringConnection -> ShowS
$cshowsPrec :: Int -> VpcPeeringConnection -> ShowS
Prelude.Show, forall x. Rep VpcPeeringConnection x -> VpcPeeringConnection
forall x. VpcPeeringConnection -> Rep VpcPeeringConnection x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep VpcPeeringConnection x -> VpcPeeringConnection
$cfrom :: forall x. VpcPeeringConnection -> Rep VpcPeeringConnection x
Prelude.Generic)
newVpcPeeringConnection ::
VpcPeeringConnection
newVpcPeeringConnection :: VpcPeeringConnection
newVpcPeeringConnection =
VpcPeeringConnection'
{ $sel:fleetArn:VpcPeeringConnection' :: Maybe Text
fleetArn = forall a. Maybe a
Prelude.Nothing,
$sel:fleetId:VpcPeeringConnection' :: Maybe Text
fleetId = forall a. Maybe a
Prelude.Nothing,
$sel:gameLiftVpcId:VpcPeeringConnection' :: Maybe Text
gameLiftVpcId = forall a. Maybe a
Prelude.Nothing,
$sel:ipV4CidrBlock:VpcPeeringConnection' :: Maybe Text
ipV4CidrBlock = forall a. Maybe a
Prelude.Nothing,
$sel:peerVpcId:VpcPeeringConnection' :: Maybe Text
peerVpcId = forall a. Maybe a
Prelude.Nothing,
$sel:status:VpcPeeringConnection' :: Maybe VpcPeeringConnectionStatus
status = forall a. Maybe a
Prelude.Nothing,
$sel:vpcPeeringConnectionId:VpcPeeringConnection' :: Maybe Text
vpcPeeringConnectionId = forall a. Maybe a
Prelude.Nothing
}
vpcPeeringConnection_fleetArn :: Lens.Lens' VpcPeeringConnection (Prelude.Maybe Prelude.Text)
vpcPeeringConnection_fleetArn :: Lens' VpcPeeringConnection (Maybe Text)
vpcPeeringConnection_fleetArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VpcPeeringConnection' {Maybe Text
fleetArn :: Maybe Text
$sel:fleetArn:VpcPeeringConnection' :: VpcPeeringConnection -> Maybe Text
fleetArn} -> Maybe Text
fleetArn) (\s :: VpcPeeringConnection
s@VpcPeeringConnection' {} Maybe Text
a -> VpcPeeringConnection
s {$sel:fleetArn:VpcPeeringConnection' :: Maybe Text
fleetArn = Maybe Text
a} :: VpcPeeringConnection)
vpcPeeringConnection_fleetId :: Lens.Lens' VpcPeeringConnection (Prelude.Maybe Prelude.Text)
vpcPeeringConnection_fleetId :: Lens' VpcPeeringConnection (Maybe Text)
vpcPeeringConnection_fleetId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VpcPeeringConnection' {Maybe Text
fleetId :: Maybe Text
$sel:fleetId:VpcPeeringConnection' :: VpcPeeringConnection -> Maybe Text
fleetId} -> Maybe Text
fleetId) (\s :: VpcPeeringConnection
s@VpcPeeringConnection' {} Maybe Text
a -> VpcPeeringConnection
s {$sel:fleetId:VpcPeeringConnection' :: Maybe Text
fleetId = Maybe Text
a} :: VpcPeeringConnection)
vpcPeeringConnection_gameLiftVpcId :: Lens.Lens' VpcPeeringConnection (Prelude.Maybe Prelude.Text)
vpcPeeringConnection_gameLiftVpcId :: Lens' VpcPeeringConnection (Maybe Text)
vpcPeeringConnection_gameLiftVpcId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VpcPeeringConnection' {Maybe Text
gameLiftVpcId :: Maybe Text
$sel:gameLiftVpcId:VpcPeeringConnection' :: VpcPeeringConnection -> Maybe Text
gameLiftVpcId} -> Maybe Text
gameLiftVpcId) (\s :: VpcPeeringConnection
s@VpcPeeringConnection' {} Maybe Text
a -> VpcPeeringConnection
s {$sel:gameLiftVpcId:VpcPeeringConnection' :: Maybe Text
gameLiftVpcId = Maybe Text
a} :: VpcPeeringConnection)
vpcPeeringConnection_ipV4CidrBlock :: Lens.Lens' VpcPeeringConnection (Prelude.Maybe Prelude.Text)
vpcPeeringConnection_ipV4CidrBlock :: Lens' VpcPeeringConnection (Maybe Text)
vpcPeeringConnection_ipV4CidrBlock = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VpcPeeringConnection' {Maybe Text
ipV4CidrBlock :: Maybe Text
$sel:ipV4CidrBlock:VpcPeeringConnection' :: VpcPeeringConnection -> Maybe Text
ipV4CidrBlock} -> Maybe Text
ipV4CidrBlock) (\s :: VpcPeeringConnection
s@VpcPeeringConnection' {} Maybe Text
a -> VpcPeeringConnection
s {$sel:ipV4CidrBlock:VpcPeeringConnection' :: Maybe Text
ipV4CidrBlock = Maybe Text
a} :: VpcPeeringConnection)
vpcPeeringConnection_peerVpcId :: Lens.Lens' VpcPeeringConnection (Prelude.Maybe Prelude.Text)
vpcPeeringConnection_peerVpcId :: Lens' VpcPeeringConnection (Maybe Text)
vpcPeeringConnection_peerVpcId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VpcPeeringConnection' {Maybe Text
peerVpcId :: Maybe Text
$sel:peerVpcId:VpcPeeringConnection' :: VpcPeeringConnection -> Maybe Text
peerVpcId} -> Maybe Text
peerVpcId) (\s :: VpcPeeringConnection
s@VpcPeeringConnection' {} Maybe Text
a -> VpcPeeringConnection
s {$sel:peerVpcId:VpcPeeringConnection' :: Maybe Text
peerVpcId = Maybe Text
a} :: VpcPeeringConnection)
vpcPeeringConnection_status :: Lens.Lens' VpcPeeringConnection (Prelude.Maybe VpcPeeringConnectionStatus)
vpcPeeringConnection_status :: Lens' VpcPeeringConnection (Maybe VpcPeeringConnectionStatus)
vpcPeeringConnection_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VpcPeeringConnection' {Maybe VpcPeeringConnectionStatus
status :: Maybe VpcPeeringConnectionStatus
$sel:status:VpcPeeringConnection' :: VpcPeeringConnection -> Maybe VpcPeeringConnectionStatus
status} -> Maybe VpcPeeringConnectionStatus
status) (\s :: VpcPeeringConnection
s@VpcPeeringConnection' {} Maybe VpcPeeringConnectionStatus
a -> VpcPeeringConnection
s {$sel:status:VpcPeeringConnection' :: Maybe VpcPeeringConnectionStatus
status = Maybe VpcPeeringConnectionStatus
a} :: VpcPeeringConnection)
vpcPeeringConnection_vpcPeeringConnectionId :: Lens.Lens' VpcPeeringConnection (Prelude.Maybe Prelude.Text)
vpcPeeringConnection_vpcPeeringConnectionId :: Lens' VpcPeeringConnection (Maybe Text)
vpcPeeringConnection_vpcPeeringConnectionId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VpcPeeringConnection' {Maybe Text
vpcPeeringConnectionId :: Maybe Text
$sel:vpcPeeringConnectionId:VpcPeeringConnection' :: VpcPeeringConnection -> Maybe Text
vpcPeeringConnectionId} -> Maybe Text
vpcPeeringConnectionId) (\s :: VpcPeeringConnection
s@VpcPeeringConnection' {} Maybe Text
a -> VpcPeeringConnection
s {$sel:vpcPeeringConnectionId:VpcPeeringConnection' :: Maybe Text
vpcPeeringConnectionId = Maybe Text
a} :: VpcPeeringConnection)
instance Data.FromJSON VpcPeeringConnection where
parseJSON :: Value -> Parser VpcPeeringConnection
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"VpcPeeringConnection"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe VpcPeeringConnectionStatus
-> Maybe Text
-> VpcPeeringConnection
VpcPeeringConnection'
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
"FleetArn")
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
"FleetId")
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
"GameLiftVpcId")
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
"IpV4CidrBlock")
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
"PeerVpcId")
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
"Status")
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
"VpcPeeringConnectionId")
)
instance Prelude.Hashable VpcPeeringConnection where
hashWithSalt :: Int -> VpcPeeringConnection -> Int
hashWithSalt Int
_salt VpcPeeringConnection' {Maybe Text
Maybe VpcPeeringConnectionStatus
vpcPeeringConnectionId :: Maybe Text
status :: Maybe VpcPeeringConnectionStatus
peerVpcId :: Maybe Text
ipV4CidrBlock :: Maybe Text
gameLiftVpcId :: Maybe Text
fleetId :: Maybe Text
fleetArn :: Maybe Text
$sel:vpcPeeringConnectionId:VpcPeeringConnection' :: VpcPeeringConnection -> Maybe Text
$sel:status:VpcPeeringConnection' :: VpcPeeringConnection -> Maybe VpcPeeringConnectionStatus
$sel:peerVpcId:VpcPeeringConnection' :: VpcPeeringConnection -> Maybe Text
$sel:ipV4CidrBlock:VpcPeeringConnection' :: VpcPeeringConnection -> Maybe Text
$sel:gameLiftVpcId:VpcPeeringConnection' :: VpcPeeringConnection -> Maybe Text
$sel:fleetId:VpcPeeringConnection' :: VpcPeeringConnection -> Maybe Text
$sel:fleetArn:VpcPeeringConnection' :: VpcPeeringConnection -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
fleetArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
fleetId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
gameLiftVpcId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
ipV4CidrBlock
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
peerVpcId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe VpcPeeringConnectionStatus
status
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
vpcPeeringConnectionId
instance Prelude.NFData VpcPeeringConnection where
rnf :: VpcPeeringConnection -> ()
rnf VpcPeeringConnection' {Maybe Text
Maybe VpcPeeringConnectionStatus
vpcPeeringConnectionId :: Maybe Text
status :: Maybe VpcPeeringConnectionStatus
peerVpcId :: Maybe Text
ipV4CidrBlock :: Maybe Text
gameLiftVpcId :: Maybe Text
fleetId :: Maybe Text
fleetArn :: Maybe Text
$sel:vpcPeeringConnectionId:VpcPeeringConnection' :: VpcPeeringConnection -> Maybe Text
$sel:status:VpcPeeringConnection' :: VpcPeeringConnection -> Maybe VpcPeeringConnectionStatus
$sel:peerVpcId:VpcPeeringConnection' :: VpcPeeringConnection -> Maybe Text
$sel:ipV4CidrBlock:VpcPeeringConnection' :: VpcPeeringConnection -> Maybe Text
$sel:gameLiftVpcId:VpcPeeringConnection' :: VpcPeeringConnection -> Maybe Text
$sel:fleetId:VpcPeeringConnection' :: VpcPeeringConnection -> Maybe Text
$sel:fleetArn:VpcPeeringConnection' :: VpcPeeringConnection -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
fleetArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
fleetId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
gameLiftVpcId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
ipV4CidrBlock
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
peerVpcId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe VpcPeeringConnectionStatus
status
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
vpcPeeringConnectionId