{-# 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 Amazonka.GameLift.Types.VpcPeeringConnectionStatus
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data VpcPeeringConnection = VpcPeeringConnection'
{
VpcPeeringConnection -> Maybe Text
vpcPeeringConnectionId :: Prelude.Maybe Prelude.Text,
VpcPeeringConnection -> Maybe VpcPeeringConnectionStatus
status :: Prelude.Maybe VpcPeeringConnectionStatus,
VpcPeeringConnection -> Maybe Text
peerVpcId :: Prelude.Maybe Prelude.Text,
VpcPeeringConnection -> Maybe Text
fleetArn :: Prelude.Maybe Prelude.Text,
VpcPeeringConnection -> Maybe Text
ipV4CidrBlock :: Prelude.Maybe Prelude.Text,
VpcPeeringConnection -> Maybe Text
gameLiftVpcId :: Prelude.Maybe Prelude.Text,
VpcPeeringConnection -> Maybe Text
fleetId :: Prelude.Maybe Prelude.Text
}
deriving (VpcPeeringConnection -> VpcPeeringConnection -> Bool
(VpcPeeringConnection -> VpcPeeringConnection -> Bool)
-> (VpcPeeringConnection -> VpcPeeringConnection -> Bool)
-> Eq VpcPeeringConnection
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]
(Int -> ReadS VpcPeeringConnection)
-> ReadS [VpcPeeringConnection]
-> ReadPrec VpcPeeringConnection
-> ReadPrec [VpcPeeringConnection]
-> Read 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
(Int -> VpcPeeringConnection -> ShowS)
-> (VpcPeeringConnection -> String)
-> ([VpcPeeringConnection] -> ShowS)
-> Show VpcPeeringConnection
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. VpcPeeringConnection -> Rep VpcPeeringConnection x)
-> (forall x. Rep VpcPeeringConnection x -> VpcPeeringConnection)
-> Generic VpcPeeringConnection
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' :: Maybe Text
-> Maybe VpcPeeringConnectionStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> VpcPeeringConnection
VpcPeeringConnection'
{ $sel:vpcPeeringConnectionId:VpcPeeringConnection' :: Maybe Text
vpcPeeringConnectionId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:status:VpcPeeringConnection' :: Maybe VpcPeeringConnectionStatus
status = Maybe VpcPeeringConnectionStatus
forall a. Maybe a
Prelude.Nothing,
$sel:peerVpcId:VpcPeeringConnection' :: Maybe Text
peerVpcId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:fleetArn:VpcPeeringConnection' :: Maybe Text
fleetArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:ipV4CidrBlock:VpcPeeringConnection' :: Maybe Text
ipV4CidrBlock = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:gameLiftVpcId:VpcPeeringConnection' :: Maybe Text
gameLiftVpcId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:fleetId:VpcPeeringConnection' :: Maybe Text
fleetId = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
vpcPeeringConnection_vpcPeeringConnectionId :: Lens.Lens' VpcPeeringConnection (Prelude.Maybe Prelude.Text)
vpcPeeringConnection_vpcPeeringConnectionId :: (Maybe Text -> f (Maybe Text))
-> VpcPeeringConnection -> f VpcPeeringConnection
vpcPeeringConnection_vpcPeeringConnectionId = (VpcPeeringConnection -> Maybe Text)
-> (VpcPeeringConnection -> Maybe Text -> VpcPeeringConnection)
-> Lens
VpcPeeringConnection VpcPeeringConnection (Maybe Text) (Maybe Text)
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)
vpcPeeringConnection_status :: Lens.Lens' VpcPeeringConnection (Prelude.Maybe VpcPeeringConnectionStatus)
vpcPeeringConnection_status :: (Maybe VpcPeeringConnectionStatus
-> f (Maybe VpcPeeringConnectionStatus))
-> VpcPeeringConnection -> f VpcPeeringConnection
vpcPeeringConnection_status = (VpcPeeringConnection -> Maybe VpcPeeringConnectionStatus)
-> (VpcPeeringConnection
-> Maybe VpcPeeringConnectionStatus -> VpcPeeringConnection)
-> Lens
VpcPeeringConnection
VpcPeeringConnection
(Maybe VpcPeeringConnectionStatus)
(Maybe VpcPeeringConnectionStatus)
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_peerVpcId :: Lens.Lens' VpcPeeringConnection (Prelude.Maybe Prelude.Text)
vpcPeeringConnection_peerVpcId :: (Maybe Text -> f (Maybe Text))
-> VpcPeeringConnection -> f VpcPeeringConnection
vpcPeeringConnection_peerVpcId = (VpcPeeringConnection -> Maybe Text)
-> (VpcPeeringConnection -> Maybe Text -> VpcPeeringConnection)
-> Lens
VpcPeeringConnection VpcPeeringConnection (Maybe Text) (Maybe Text)
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_fleetArn :: Lens.Lens' VpcPeeringConnection (Prelude.Maybe Prelude.Text)
vpcPeeringConnection_fleetArn :: (Maybe Text -> f (Maybe Text))
-> VpcPeeringConnection -> f VpcPeeringConnection
vpcPeeringConnection_fleetArn = (VpcPeeringConnection -> Maybe Text)
-> (VpcPeeringConnection -> Maybe Text -> VpcPeeringConnection)
-> Lens
VpcPeeringConnection VpcPeeringConnection (Maybe Text) (Maybe Text)
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_ipV4CidrBlock :: Lens.Lens' VpcPeeringConnection (Prelude.Maybe Prelude.Text)
vpcPeeringConnection_ipV4CidrBlock :: (Maybe Text -> f (Maybe Text))
-> VpcPeeringConnection -> f VpcPeeringConnection
vpcPeeringConnection_ipV4CidrBlock = (VpcPeeringConnection -> Maybe Text)
-> (VpcPeeringConnection -> Maybe Text -> VpcPeeringConnection)
-> Lens
VpcPeeringConnection VpcPeeringConnection (Maybe Text) (Maybe Text)
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_gameLiftVpcId :: Lens.Lens' VpcPeeringConnection (Prelude.Maybe Prelude.Text)
vpcPeeringConnection_gameLiftVpcId :: (Maybe Text -> f (Maybe Text))
-> VpcPeeringConnection -> f VpcPeeringConnection
vpcPeeringConnection_gameLiftVpcId = (VpcPeeringConnection -> Maybe Text)
-> (VpcPeeringConnection -> Maybe Text -> VpcPeeringConnection)
-> Lens
VpcPeeringConnection VpcPeeringConnection (Maybe Text) (Maybe Text)
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_fleetId :: Lens.Lens' VpcPeeringConnection (Prelude.Maybe Prelude.Text)
vpcPeeringConnection_fleetId :: (Maybe Text -> f (Maybe Text))
-> VpcPeeringConnection -> f VpcPeeringConnection
vpcPeeringConnection_fleetId = (VpcPeeringConnection -> Maybe Text)
-> (VpcPeeringConnection -> Maybe Text -> VpcPeeringConnection)
-> Lens
VpcPeeringConnection VpcPeeringConnection (Maybe Text) (Maybe Text)
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)
instance Core.FromJSON VpcPeeringConnection where
parseJSON :: Value -> Parser VpcPeeringConnection
parseJSON =
String
-> (Object -> Parser VpcPeeringConnection)
-> Value
-> Parser VpcPeeringConnection
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"VpcPeeringConnection"
( \Object
x ->
Maybe Text
-> Maybe VpcPeeringConnectionStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> VpcPeeringConnection
VpcPeeringConnection'
(Maybe Text
-> Maybe VpcPeeringConnectionStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> VpcPeeringConnection)
-> Parser (Maybe Text)
-> Parser
(Maybe VpcPeeringConnectionStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> VpcPeeringConnection)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"VpcPeeringConnectionId")
Parser
(Maybe VpcPeeringConnectionStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> VpcPeeringConnection)
-> Parser (Maybe VpcPeeringConnectionStatus)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> VpcPeeringConnection)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe VpcPeeringConnectionStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> VpcPeeringConnection)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> VpcPeeringConnection)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"PeerVpcId")
Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> VpcPeeringConnection)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe Text -> Maybe Text -> VpcPeeringConnection)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"FleetArn")
Parser
(Maybe Text -> Maybe Text -> Maybe Text -> VpcPeeringConnection)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> VpcPeeringConnection)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"IpV4CidrBlock")
Parser (Maybe Text -> Maybe Text -> VpcPeeringConnection)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> VpcPeeringConnection)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"GameLiftVpcId")
Parser (Maybe Text -> VpcPeeringConnection)
-> Parser (Maybe Text) -> Parser VpcPeeringConnection
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"FleetId")
)
instance Prelude.Hashable VpcPeeringConnection
instance Prelude.NFData VpcPeeringConnection