{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.AWS.DirectConnect.Types.Product where
import Network.AWS.DirectConnect.Types.Sum
import Network.AWS.Lens
import Network.AWS.Prelude
data BGPPeer = BGPPeer'
{ _bpCustomerAddress :: !(Maybe Text)
, _bpAmazonAddress :: !(Maybe Text)
, _bpAddressFamily :: !(Maybe AddressFamily)
, _bpBgpStatus :: !(Maybe BGPStatus)
, _bpAsn :: !(Maybe Int)
, _bpAuthKey :: !(Maybe Text)
, _bpBgpPeerState :: !(Maybe BGPPeerState)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
bgpPeer
:: BGPPeer
bgpPeer =
BGPPeer'
{ _bpCustomerAddress = Nothing
, _bpAmazonAddress = Nothing
, _bpAddressFamily = Nothing
, _bpBgpStatus = Nothing
, _bpAsn = Nothing
, _bpAuthKey = Nothing
, _bpBgpPeerState = Nothing
}
bpCustomerAddress :: Lens' BGPPeer (Maybe Text)
bpCustomerAddress = lens _bpCustomerAddress (\ s a -> s{_bpCustomerAddress = a})
bpAmazonAddress :: Lens' BGPPeer (Maybe Text)
bpAmazonAddress = lens _bpAmazonAddress (\ s a -> s{_bpAmazonAddress = a})
bpAddressFamily :: Lens' BGPPeer (Maybe AddressFamily)
bpAddressFamily = lens _bpAddressFamily (\ s a -> s{_bpAddressFamily = a})
bpBgpStatus :: Lens' BGPPeer (Maybe BGPStatus)
bpBgpStatus = lens _bpBgpStatus (\ s a -> s{_bpBgpStatus = a})
bpAsn :: Lens' BGPPeer (Maybe Int)
bpAsn = lens _bpAsn (\ s a -> s{_bpAsn = a})
bpAuthKey :: Lens' BGPPeer (Maybe Text)
bpAuthKey = lens _bpAuthKey (\ s a -> s{_bpAuthKey = a})
bpBgpPeerState :: Lens' BGPPeer (Maybe BGPPeerState)
bpBgpPeerState = lens _bpBgpPeerState (\ s a -> s{_bpBgpPeerState = a})
instance FromJSON BGPPeer where
parseJSON
= withObject "BGPPeer"
(\ x ->
BGPPeer' <$>
(x .:? "customerAddress") <*> (x .:? "amazonAddress")
<*> (x .:? "addressFamily")
<*> (x .:? "bgpStatus")
<*> (x .:? "asn")
<*> (x .:? "authKey")
<*> (x .:? "bgpPeerState"))
instance Hashable BGPPeer where
instance NFData BGPPeer where
data Connection = Connection'
{ _cLagId :: !(Maybe Text)
, _cVlan :: !(Maybe Int)
, _cLocation :: !(Maybe Text)
, _cAwsDevice :: !(Maybe Text)
, _cConnectionId :: !(Maybe Text)
, _cLoaIssueTime :: !(Maybe POSIX)
, _cPartnerName :: !(Maybe Text)
, _cConnectionName :: !(Maybe Text)
, _cBandwidth :: !(Maybe Text)
, _cOwnerAccount :: !(Maybe Text)
, _cRegion :: !(Maybe Text)
, _cConnectionState :: !(Maybe ConnectionState)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
connection
:: Connection
connection =
Connection'
{ _cLagId = Nothing
, _cVlan = Nothing
, _cLocation = Nothing
, _cAwsDevice = Nothing
, _cConnectionId = Nothing
, _cLoaIssueTime = Nothing
, _cPartnerName = Nothing
, _cConnectionName = Nothing
, _cBandwidth = Nothing
, _cOwnerAccount = Nothing
, _cRegion = Nothing
, _cConnectionState = Nothing
}
cLagId :: Lens' Connection (Maybe Text)
cLagId = lens _cLagId (\ s a -> s{_cLagId = a})
cVlan :: Lens' Connection (Maybe Int)
cVlan = lens _cVlan (\ s a -> s{_cVlan = a})
cLocation :: Lens' Connection (Maybe Text)
cLocation = lens _cLocation (\ s a -> s{_cLocation = a})
cAwsDevice :: Lens' Connection (Maybe Text)
cAwsDevice = lens _cAwsDevice (\ s a -> s{_cAwsDevice = a})
cConnectionId :: Lens' Connection (Maybe Text)
cConnectionId = lens _cConnectionId (\ s a -> s{_cConnectionId = a})
cLoaIssueTime :: Lens' Connection (Maybe UTCTime)
cLoaIssueTime = lens _cLoaIssueTime (\ s a -> s{_cLoaIssueTime = a}) . mapping _Time
cPartnerName :: Lens' Connection (Maybe Text)
cPartnerName = lens _cPartnerName (\ s a -> s{_cPartnerName = a})
cConnectionName :: Lens' Connection (Maybe Text)
cConnectionName = lens _cConnectionName (\ s a -> s{_cConnectionName = a})
cBandwidth :: Lens' Connection (Maybe Text)
cBandwidth = lens _cBandwidth (\ s a -> s{_cBandwidth = a})
cOwnerAccount :: Lens' Connection (Maybe Text)
cOwnerAccount = lens _cOwnerAccount (\ s a -> s{_cOwnerAccount = a})
cRegion :: Lens' Connection (Maybe Text)
cRegion = lens _cRegion (\ s a -> s{_cRegion = a})
cConnectionState :: Lens' Connection (Maybe ConnectionState)
cConnectionState = lens _cConnectionState (\ s a -> s{_cConnectionState = a})
instance FromJSON Connection where
parseJSON
= withObject "Connection"
(\ x ->
Connection' <$>
(x .:? "lagId") <*> (x .:? "vlan") <*>
(x .:? "location")
<*> (x .:? "awsDevice")
<*> (x .:? "connectionId")
<*> (x .:? "loaIssueTime")
<*> (x .:? "partnerName")
<*> (x .:? "connectionName")
<*> (x .:? "bandwidth")
<*> (x .:? "ownerAccount")
<*> (x .:? "region")
<*> (x .:? "connectionState"))
instance Hashable Connection where
instance NFData Connection where
newtype Connections = Connections'
{ _cConnections :: Maybe [Connection]
} deriving (Eq, Read, Show, Data, Typeable, Generic)
connections
:: Connections
connections = Connections' {_cConnections = Nothing}
cConnections :: Lens' Connections [Connection]
cConnections = lens _cConnections (\ s a -> s{_cConnections = a}) . _Default . _Coerce
instance FromJSON Connections where
parseJSON
= withObject "Connections"
(\ x ->
Connections' <$> (x .:? "connections" .!= mempty))
instance Hashable Connections where
instance NFData Connections where
data DirectConnectGateway = DirectConnectGateway'
{ _dcgDirectConnectGatewayId :: !(Maybe Text)
, _dcgStateChangeError :: !(Maybe Text)
, _dcgAmazonSideASN :: !(Maybe Integer)
, _dcgDirectConnectGatewayName :: !(Maybe Text)
, _dcgDirectConnectGatewayState :: !(Maybe DirectConnectGatewayState)
, _dcgOwnerAccount :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
directConnectGateway
:: DirectConnectGateway
directConnectGateway =
DirectConnectGateway'
{ _dcgDirectConnectGatewayId = Nothing
, _dcgStateChangeError = Nothing
, _dcgAmazonSideASN = Nothing
, _dcgDirectConnectGatewayName = Nothing
, _dcgDirectConnectGatewayState = Nothing
, _dcgOwnerAccount = Nothing
}
dcgDirectConnectGatewayId :: Lens' DirectConnectGateway (Maybe Text)
dcgDirectConnectGatewayId = lens _dcgDirectConnectGatewayId (\ s a -> s{_dcgDirectConnectGatewayId = a})
dcgStateChangeError :: Lens' DirectConnectGateway (Maybe Text)
dcgStateChangeError = lens _dcgStateChangeError (\ s a -> s{_dcgStateChangeError = a})
dcgAmazonSideASN :: Lens' DirectConnectGateway (Maybe Integer)
dcgAmazonSideASN = lens _dcgAmazonSideASN (\ s a -> s{_dcgAmazonSideASN = a})
dcgDirectConnectGatewayName :: Lens' DirectConnectGateway (Maybe Text)
dcgDirectConnectGatewayName = lens _dcgDirectConnectGatewayName (\ s a -> s{_dcgDirectConnectGatewayName = a})
dcgDirectConnectGatewayState :: Lens' DirectConnectGateway (Maybe DirectConnectGatewayState)
dcgDirectConnectGatewayState = lens _dcgDirectConnectGatewayState (\ s a -> s{_dcgDirectConnectGatewayState = a})
dcgOwnerAccount :: Lens' DirectConnectGateway (Maybe Text)
dcgOwnerAccount = lens _dcgOwnerAccount (\ s a -> s{_dcgOwnerAccount = a})
instance FromJSON DirectConnectGateway where
parseJSON
= withObject "DirectConnectGateway"
(\ x ->
DirectConnectGateway' <$>
(x .:? "directConnectGatewayId") <*>
(x .:? "stateChangeError")
<*> (x .:? "amazonSideAsn")
<*> (x .:? "directConnectGatewayName")
<*> (x .:? "directConnectGatewayState")
<*> (x .:? "ownerAccount"))
instance Hashable DirectConnectGateway where
instance NFData DirectConnectGateway where
data DirectConnectGatewayAssociation = DirectConnectGatewayAssociation'
{ _dcgaVirtualGatewayId :: !(Maybe Text)
, _dcgaDirectConnectGatewayId :: !(Maybe Text)
, _dcgaVirtualGatewayOwnerAccount :: !(Maybe Text)
, _dcgaStateChangeError :: !(Maybe Text)
, _dcgaVirtualGatewayRegion :: !(Maybe Text)
, _dcgaAssociationState :: !(Maybe DirectConnectGatewayAssociationState)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
directConnectGatewayAssociation
:: DirectConnectGatewayAssociation
directConnectGatewayAssociation =
DirectConnectGatewayAssociation'
{ _dcgaVirtualGatewayId = Nothing
, _dcgaDirectConnectGatewayId = Nothing
, _dcgaVirtualGatewayOwnerAccount = Nothing
, _dcgaStateChangeError = Nothing
, _dcgaVirtualGatewayRegion = Nothing
, _dcgaAssociationState = Nothing
}
dcgaVirtualGatewayId :: Lens' DirectConnectGatewayAssociation (Maybe Text)
dcgaVirtualGatewayId = lens _dcgaVirtualGatewayId (\ s a -> s{_dcgaVirtualGatewayId = a})
dcgaDirectConnectGatewayId :: Lens' DirectConnectGatewayAssociation (Maybe Text)
dcgaDirectConnectGatewayId = lens _dcgaDirectConnectGatewayId (\ s a -> s{_dcgaDirectConnectGatewayId = a})
dcgaVirtualGatewayOwnerAccount :: Lens' DirectConnectGatewayAssociation (Maybe Text)
dcgaVirtualGatewayOwnerAccount = lens _dcgaVirtualGatewayOwnerAccount (\ s a -> s{_dcgaVirtualGatewayOwnerAccount = a})
dcgaStateChangeError :: Lens' DirectConnectGatewayAssociation (Maybe Text)
dcgaStateChangeError = lens _dcgaStateChangeError (\ s a -> s{_dcgaStateChangeError = a})
dcgaVirtualGatewayRegion :: Lens' DirectConnectGatewayAssociation (Maybe Text)
dcgaVirtualGatewayRegion = lens _dcgaVirtualGatewayRegion (\ s a -> s{_dcgaVirtualGatewayRegion = a})
dcgaAssociationState :: Lens' DirectConnectGatewayAssociation (Maybe DirectConnectGatewayAssociationState)
dcgaAssociationState = lens _dcgaAssociationState (\ s a -> s{_dcgaAssociationState = a})
instance FromJSON DirectConnectGatewayAssociation
where
parseJSON
= withObject "DirectConnectGatewayAssociation"
(\ x ->
DirectConnectGatewayAssociation' <$>
(x .:? "virtualGatewayId") <*>
(x .:? "directConnectGatewayId")
<*> (x .:? "virtualGatewayOwnerAccount")
<*> (x .:? "stateChangeError")
<*> (x .:? "virtualGatewayRegion")
<*> (x .:? "associationState"))
instance Hashable DirectConnectGatewayAssociation
where
instance NFData DirectConnectGatewayAssociation where
data DirectConnectGatewayAttachment = DirectConnectGatewayAttachment'
{ _dDirectConnectGatewayId :: !(Maybe Text)
, _dAttachmentState :: !(Maybe DirectConnectGatewayAttachmentState)
, _dStateChangeError :: !(Maybe Text)
, _dVirtualInterfaceRegion :: !(Maybe Text)
, _dVirtualInterfaceOwnerAccount :: !(Maybe Text)
, _dVirtualInterfaceId :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
directConnectGatewayAttachment
:: DirectConnectGatewayAttachment
directConnectGatewayAttachment =
DirectConnectGatewayAttachment'
{ _dDirectConnectGatewayId = Nothing
, _dAttachmentState = Nothing
, _dStateChangeError = Nothing
, _dVirtualInterfaceRegion = Nothing
, _dVirtualInterfaceOwnerAccount = Nothing
, _dVirtualInterfaceId = Nothing
}
dDirectConnectGatewayId :: Lens' DirectConnectGatewayAttachment (Maybe Text)
dDirectConnectGatewayId = lens _dDirectConnectGatewayId (\ s a -> s{_dDirectConnectGatewayId = a})
dAttachmentState :: Lens' DirectConnectGatewayAttachment (Maybe DirectConnectGatewayAttachmentState)
dAttachmentState = lens _dAttachmentState (\ s a -> s{_dAttachmentState = a})
dStateChangeError :: Lens' DirectConnectGatewayAttachment (Maybe Text)
dStateChangeError = lens _dStateChangeError (\ s a -> s{_dStateChangeError = a})
dVirtualInterfaceRegion :: Lens' DirectConnectGatewayAttachment (Maybe Text)
dVirtualInterfaceRegion = lens _dVirtualInterfaceRegion (\ s a -> s{_dVirtualInterfaceRegion = a})
dVirtualInterfaceOwnerAccount :: Lens' DirectConnectGatewayAttachment (Maybe Text)
dVirtualInterfaceOwnerAccount = lens _dVirtualInterfaceOwnerAccount (\ s a -> s{_dVirtualInterfaceOwnerAccount = a})
dVirtualInterfaceId :: Lens' DirectConnectGatewayAttachment (Maybe Text)
dVirtualInterfaceId = lens _dVirtualInterfaceId (\ s a -> s{_dVirtualInterfaceId = a})
instance FromJSON DirectConnectGatewayAttachment
where
parseJSON
= withObject "DirectConnectGatewayAttachment"
(\ x ->
DirectConnectGatewayAttachment' <$>
(x .:? "directConnectGatewayId") <*>
(x .:? "attachmentState")
<*> (x .:? "stateChangeError")
<*> (x .:? "virtualInterfaceRegion")
<*> (x .:? "virtualInterfaceOwnerAccount")
<*> (x .:? "virtualInterfaceId"))
instance Hashable DirectConnectGatewayAttachment
where
instance NFData DirectConnectGatewayAttachment where
data Interconnect = Interconnect'
{ _iLagId :: !(Maybe Text)
, _iInterconnectId :: !(Maybe Text)
, _iLocation :: !(Maybe Text)
, _iInterconnectName :: !(Maybe Text)
, _iAwsDevice :: !(Maybe Text)
, _iLoaIssueTime :: !(Maybe POSIX)
, _iBandwidth :: !(Maybe Text)
, _iInterconnectState :: !(Maybe InterconnectState)
, _iRegion :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
interconnect
:: Interconnect
interconnect =
Interconnect'
{ _iLagId = Nothing
, _iInterconnectId = Nothing
, _iLocation = Nothing
, _iInterconnectName = Nothing
, _iAwsDevice = Nothing
, _iLoaIssueTime = Nothing
, _iBandwidth = Nothing
, _iInterconnectState = Nothing
, _iRegion = Nothing
}
iLagId :: Lens' Interconnect (Maybe Text)
iLagId = lens _iLagId (\ s a -> s{_iLagId = a})
iInterconnectId :: Lens' Interconnect (Maybe Text)
iInterconnectId = lens _iInterconnectId (\ s a -> s{_iInterconnectId = a})
iLocation :: Lens' Interconnect (Maybe Text)
iLocation = lens _iLocation (\ s a -> s{_iLocation = a})
iInterconnectName :: Lens' Interconnect (Maybe Text)
iInterconnectName = lens _iInterconnectName (\ s a -> s{_iInterconnectName = a})
iAwsDevice :: Lens' Interconnect (Maybe Text)
iAwsDevice = lens _iAwsDevice (\ s a -> s{_iAwsDevice = a})
iLoaIssueTime :: Lens' Interconnect (Maybe UTCTime)
iLoaIssueTime = lens _iLoaIssueTime (\ s a -> s{_iLoaIssueTime = a}) . mapping _Time
iBandwidth :: Lens' Interconnect (Maybe Text)
iBandwidth = lens _iBandwidth (\ s a -> s{_iBandwidth = a})
iInterconnectState :: Lens' Interconnect (Maybe InterconnectState)
iInterconnectState = lens _iInterconnectState (\ s a -> s{_iInterconnectState = a})
iRegion :: Lens' Interconnect (Maybe Text)
iRegion = lens _iRegion (\ s a -> s{_iRegion = a})
instance FromJSON Interconnect where
parseJSON
= withObject "Interconnect"
(\ x ->
Interconnect' <$>
(x .:? "lagId") <*> (x .:? "interconnectId") <*>
(x .:? "location")
<*> (x .:? "interconnectName")
<*> (x .:? "awsDevice")
<*> (x .:? "loaIssueTime")
<*> (x .:? "bandwidth")
<*> (x .:? "interconnectState")
<*> (x .:? "region"))
instance Hashable Interconnect where
instance NFData Interconnect where
data Lag = Lag'
{ _lagLagId :: !(Maybe Text)
, _lagConnectionsBandwidth :: !(Maybe Text)
, _lagMinimumLinks :: !(Maybe Int)
, _lagLagName :: !(Maybe Text)
, _lagLocation :: !(Maybe Text)
, _lagConnections :: !(Maybe [Connection])
, _lagAwsDevice :: !(Maybe Text)
, _lagAllowsHostedConnections :: !(Maybe Bool)
, _lagNumberOfConnections :: !(Maybe Int)
, _lagLagState :: !(Maybe LagState)
, _lagOwnerAccount :: !(Maybe Text)
, _lagRegion :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
lag
:: Lag
lag =
Lag'
{ _lagLagId = Nothing
, _lagConnectionsBandwidth = Nothing
, _lagMinimumLinks = Nothing
, _lagLagName = Nothing
, _lagLocation = Nothing
, _lagConnections = Nothing
, _lagAwsDevice = Nothing
, _lagAllowsHostedConnections = Nothing
, _lagNumberOfConnections = Nothing
, _lagLagState = Nothing
, _lagOwnerAccount = Nothing
, _lagRegion = Nothing
}
lagLagId :: Lens' Lag (Maybe Text)
lagLagId = lens _lagLagId (\ s a -> s{_lagLagId = a})
lagConnectionsBandwidth :: Lens' Lag (Maybe Text)
lagConnectionsBandwidth = lens _lagConnectionsBandwidth (\ s a -> s{_lagConnectionsBandwidth = a})
lagMinimumLinks :: Lens' Lag (Maybe Int)
lagMinimumLinks = lens _lagMinimumLinks (\ s a -> s{_lagMinimumLinks = a})
lagLagName :: Lens' Lag (Maybe Text)
lagLagName = lens _lagLagName (\ s a -> s{_lagLagName = a})
lagLocation :: Lens' Lag (Maybe Text)
lagLocation = lens _lagLocation (\ s a -> s{_lagLocation = a})
lagConnections :: Lens' Lag [Connection]
lagConnections = lens _lagConnections (\ s a -> s{_lagConnections = a}) . _Default . _Coerce
lagAwsDevice :: Lens' Lag (Maybe Text)
lagAwsDevice = lens _lagAwsDevice (\ s a -> s{_lagAwsDevice = a})
lagAllowsHostedConnections :: Lens' Lag (Maybe Bool)
lagAllowsHostedConnections = lens _lagAllowsHostedConnections (\ s a -> s{_lagAllowsHostedConnections = a})
lagNumberOfConnections :: Lens' Lag (Maybe Int)
lagNumberOfConnections = lens _lagNumberOfConnections (\ s a -> s{_lagNumberOfConnections = a})
lagLagState :: Lens' Lag (Maybe LagState)
lagLagState = lens _lagLagState (\ s a -> s{_lagLagState = a})
lagOwnerAccount :: Lens' Lag (Maybe Text)
lagOwnerAccount = lens _lagOwnerAccount (\ s a -> s{_lagOwnerAccount = a})
lagRegion :: Lens' Lag (Maybe Text)
lagRegion = lens _lagRegion (\ s a -> s{_lagRegion = a})
instance FromJSON Lag where
parseJSON
= withObject "Lag"
(\ x ->
Lag' <$>
(x .:? "lagId") <*> (x .:? "connectionsBandwidth")
<*> (x .:? "minimumLinks")
<*> (x .:? "lagName")
<*> (x .:? "location")
<*> (x .:? "connections" .!= mempty)
<*> (x .:? "awsDevice")
<*> (x .:? "allowsHostedConnections")
<*> (x .:? "numberOfConnections")
<*> (x .:? "lagState")
<*> (x .:? "ownerAccount")
<*> (x .:? "region"))
instance Hashable Lag where
instance NFData Lag where
data Location = Location'
{ _lLocationName :: !(Maybe Text)
, _lLocationCode :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
location
:: Location
location = Location' {_lLocationName = Nothing, _lLocationCode = Nothing}
lLocationName :: Lens' Location (Maybe Text)
lLocationName = lens _lLocationName (\ s a -> s{_lLocationName = a})
lLocationCode :: Lens' Location (Maybe Text)
lLocationCode = lens _lLocationCode (\ s a -> s{_lLocationCode = a})
instance FromJSON Location where
parseJSON
= withObject "Location"
(\ x ->
Location' <$>
(x .:? "locationName") <*> (x .:? "locationCode"))
instance Hashable Location where
instance NFData Location where
data NewBGPPeer = NewBGPPeer'
{ _nbpCustomerAddress :: !(Maybe Text)
, _nbpAmazonAddress :: !(Maybe Text)
, _nbpAddressFamily :: !(Maybe AddressFamily)
, _nbpAsn :: !(Maybe Int)
, _nbpAuthKey :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
newBGPPeer
:: NewBGPPeer
newBGPPeer =
NewBGPPeer'
{ _nbpCustomerAddress = Nothing
, _nbpAmazonAddress = Nothing
, _nbpAddressFamily = Nothing
, _nbpAsn = Nothing
, _nbpAuthKey = Nothing
}
nbpCustomerAddress :: Lens' NewBGPPeer (Maybe Text)
nbpCustomerAddress = lens _nbpCustomerAddress (\ s a -> s{_nbpCustomerAddress = a})
nbpAmazonAddress :: Lens' NewBGPPeer (Maybe Text)
nbpAmazonAddress = lens _nbpAmazonAddress (\ s a -> s{_nbpAmazonAddress = a})
nbpAddressFamily :: Lens' NewBGPPeer (Maybe AddressFamily)
nbpAddressFamily = lens _nbpAddressFamily (\ s a -> s{_nbpAddressFamily = a})
nbpAsn :: Lens' NewBGPPeer (Maybe Int)
nbpAsn = lens _nbpAsn (\ s a -> s{_nbpAsn = a})
nbpAuthKey :: Lens' NewBGPPeer (Maybe Text)
nbpAuthKey = lens _nbpAuthKey (\ s a -> s{_nbpAuthKey = a})
instance Hashable NewBGPPeer where
instance NFData NewBGPPeer where
instance ToJSON NewBGPPeer where
toJSON NewBGPPeer'{..}
= object
(catMaybes
[("customerAddress" .=) <$> _nbpCustomerAddress,
("amazonAddress" .=) <$> _nbpAmazonAddress,
("addressFamily" .=) <$> _nbpAddressFamily,
("asn" .=) <$> _nbpAsn,
("authKey" .=) <$> _nbpAuthKey])
data NewPrivateVirtualInterface = NewPrivateVirtualInterface'
{ _nVirtualGatewayId :: !(Maybe Text)
, _nCustomerAddress :: !(Maybe Text)
, _nAmazonAddress :: !(Maybe Text)
, _nAddressFamily :: !(Maybe AddressFamily)
, _nDirectConnectGatewayId :: !(Maybe Text)
, _nAuthKey :: !(Maybe Text)
, _nVirtualInterfaceName :: !Text
, _nVlan :: !Int
, _nAsn :: !Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
newPrivateVirtualInterface
:: Text
-> Int
-> Int
-> NewPrivateVirtualInterface
newPrivateVirtualInterface pVirtualInterfaceName_ pVlan_ pAsn_ =
NewPrivateVirtualInterface'
{ _nVirtualGatewayId = Nothing
, _nCustomerAddress = Nothing
, _nAmazonAddress = Nothing
, _nAddressFamily = Nothing
, _nDirectConnectGatewayId = Nothing
, _nAuthKey = Nothing
, _nVirtualInterfaceName = pVirtualInterfaceName_
, _nVlan = pVlan_
, _nAsn = pAsn_
}
nVirtualGatewayId :: Lens' NewPrivateVirtualInterface (Maybe Text)
nVirtualGatewayId = lens _nVirtualGatewayId (\ s a -> s{_nVirtualGatewayId = a})
nCustomerAddress :: Lens' NewPrivateVirtualInterface (Maybe Text)
nCustomerAddress = lens _nCustomerAddress (\ s a -> s{_nCustomerAddress = a})
nAmazonAddress :: Lens' NewPrivateVirtualInterface (Maybe Text)
nAmazonAddress = lens _nAmazonAddress (\ s a -> s{_nAmazonAddress = a})
nAddressFamily :: Lens' NewPrivateVirtualInterface (Maybe AddressFamily)
nAddressFamily = lens _nAddressFamily (\ s a -> s{_nAddressFamily = a})
nDirectConnectGatewayId :: Lens' NewPrivateVirtualInterface (Maybe Text)
nDirectConnectGatewayId = lens _nDirectConnectGatewayId (\ s a -> s{_nDirectConnectGatewayId = a})
nAuthKey :: Lens' NewPrivateVirtualInterface (Maybe Text)
nAuthKey = lens _nAuthKey (\ s a -> s{_nAuthKey = a})
nVirtualInterfaceName :: Lens' NewPrivateVirtualInterface Text
nVirtualInterfaceName = lens _nVirtualInterfaceName (\ s a -> s{_nVirtualInterfaceName = a})
nVlan :: Lens' NewPrivateVirtualInterface Int
nVlan = lens _nVlan (\ s a -> s{_nVlan = a})
nAsn :: Lens' NewPrivateVirtualInterface Int
nAsn = lens _nAsn (\ s a -> s{_nAsn = a})
instance Hashable NewPrivateVirtualInterface where
instance NFData NewPrivateVirtualInterface where
instance ToJSON NewPrivateVirtualInterface where
toJSON NewPrivateVirtualInterface'{..}
= object
(catMaybes
[("virtualGatewayId" .=) <$> _nVirtualGatewayId,
("customerAddress" .=) <$> _nCustomerAddress,
("amazonAddress" .=) <$> _nAmazonAddress,
("addressFamily" .=) <$> _nAddressFamily,
("directConnectGatewayId" .=) <$>
_nDirectConnectGatewayId,
("authKey" .=) <$> _nAuthKey,
Just
("virtualInterfaceName" .= _nVirtualInterfaceName),
Just ("vlan" .= _nVlan), Just ("asn" .= _nAsn)])
data NewPrivateVirtualInterfaceAllocation = NewPrivateVirtualInterfaceAllocation'
{ _npviaCustomerAddress :: !(Maybe Text)
, _npviaAmazonAddress :: !(Maybe Text)
, _npviaAddressFamily :: !(Maybe AddressFamily)
, _npviaAuthKey :: !(Maybe Text)
, _npviaVirtualInterfaceName :: !Text
, _npviaVlan :: !Int
, _npviaAsn :: !Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
newPrivateVirtualInterfaceAllocation
:: Text
-> Int
-> Int
-> NewPrivateVirtualInterfaceAllocation
newPrivateVirtualInterfaceAllocation pVirtualInterfaceName_ pVlan_ pAsn_ =
NewPrivateVirtualInterfaceAllocation'
{ _npviaCustomerAddress = Nothing
, _npviaAmazonAddress = Nothing
, _npviaAddressFamily = Nothing
, _npviaAuthKey = Nothing
, _npviaVirtualInterfaceName = pVirtualInterfaceName_
, _npviaVlan = pVlan_
, _npviaAsn = pAsn_
}
npviaCustomerAddress :: Lens' NewPrivateVirtualInterfaceAllocation (Maybe Text)
npviaCustomerAddress = lens _npviaCustomerAddress (\ s a -> s{_npviaCustomerAddress = a})
npviaAmazonAddress :: Lens' NewPrivateVirtualInterfaceAllocation (Maybe Text)
npviaAmazonAddress = lens _npviaAmazonAddress (\ s a -> s{_npviaAmazonAddress = a})
npviaAddressFamily :: Lens' NewPrivateVirtualInterfaceAllocation (Maybe AddressFamily)
npviaAddressFamily = lens _npviaAddressFamily (\ s a -> s{_npviaAddressFamily = a})
npviaAuthKey :: Lens' NewPrivateVirtualInterfaceAllocation (Maybe Text)
npviaAuthKey = lens _npviaAuthKey (\ s a -> s{_npviaAuthKey = a})
npviaVirtualInterfaceName :: Lens' NewPrivateVirtualInterfaceAllocation Text
npviaVirtualInterfaceName = lens _npviaVirtualInterfaceName (\ s a -> s{_npviaVirtualInterfaceName = a})
npviaVlan :: Lens' NewPrivateVirtualInterfaceAllocation Int
npviaVlan = lens _npviaVlan (\ s a -> s{_npviaVlan = a})
npviaAsn :: Lens' NewPrivateVirtualInterfaceAllocation Int
npviaAsn = lens _npviaAsn (\ s a -> s{_npviaAsn = a})
instance Hashable
NewPrivateVirtualInterfaceAllocation
where
instance NFData NewPrivateVirtualInterfaceAllocation
where
instance ToJSON NewPrivateVirtualInterfaceAllocation
where
toJSON NewPrivateVirtualInterfaceAllocation'{..}
= object
(catMaybes
[("customerAddress" .=) <$> _npviaCustomerAddress,
("amazonAddress" .=) <$> _npviaAmazonAddress,
("addressFamily" .=) <$> _npviaAddressFamily,
("authKey" .=) <$> _npviaAuthKey,
Just
("virtualInterfaceName" .=
_npviaVirtualInterfaceName),
Just ("vlan" .= _npviaVlan),
Just ("asn" .= _npviaAsn)])
data NewPublicVirtualInterface = NewPublicVirtualInterface'
{ _npviRouteFilterPrefixes :: !(Maybe [RouteFilterPrefix])
, _npviCustomerAddress :: !(Maybe Text)
, _npviAmazonAddress :: !(Maybe Text)
, _npviAddressFamily :: !(Maybe AddressFamily)
, _npviAuthKey :: !(Maybe Text)
, _npviVirtualInterfaceName :: !Text
, _npviVlan :: !Int
, _npviAsn :: !Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
newPublicVirtualInterface
:: Text
-> Int
-> Int
-> NewPublicVirtualInterface
newPublicVirtualInterface pVirtualInterfaceName_ pVlan_ pAsn_ =
NewPublicVirtualInterface'
{ _npviRouteFilterPrefixes = Nothing
, _npviCustomerAddress = Nothing
, _npviAmazonAddress = Nothing
, _npviAddressFamily = Nothing
, _npviAuthKey = Nothing
, _npviVirtualInterfaceName = pVirtualInterfaceName_
, _npviVlan = pVlan_
, _npviAsn = pAsn_
}
npviRouteFilterPrefixes :: Lens' NewPublicVirtualInterface [RouteFilterPrefix]
npviRouteFilterPrefixes = lens _npviRouteFilterPrefixes (\ s a -> s{_npviRouteFilterPrefixes = a}) . _Default . _Coerce
npviCustomerAddress :: Lens' NewPublicVirtualInterface (Maybe Text)
npviCustomerAddress = lens _npviCustomerAddress (\ s a -> s{_npviCustomerAddress = a})
npviAmazonAddress :: Lens' NewPublicVirtualInterface (Maybe Text)
npviAmazonAddress = lens _npviAmazonAddress (\ s a -> s{_npviAmazonAddress = a})
npviAddressFamily :: Lens' NewPublicVirtualInterface (Maybe AddressFamily)
npviAddressFamily = lens _npviAddressFamily (\ s a -> s{_npviAddressFamily = a})
npviAuthKey :: Lens' NewPublicVirtualInterface (Maybe Text)
npviAuthKey = lens _npviAuthKey (\ s a -> s{_npviAuthKey = a})
npviVirtualInterfaceName :: Lens' NewPublicVirtualInterface Text
npviVirtualInterfaceName = lens _npviVirtualInterfaceName (\ s a -> s{_npviVirtualInterfaceName = a})
npviVlan :: Lens' NewPublicVirtualInterface Int
npviVlan = lens _npviVlan (\ s a -> s{_npviVlan = a})
npviAsn :: Lens' NewPublicVirtualInterface Int
npviAsn = lens _npviAsn (\ s a -> s{_npviAsn = a})
instance Hashable NewPublicVirtualInterface where
instance NFData NewPublicVirtualInterface where
instance ToJSON NewPublicVirtualInterface where
toJSON NewPublicVirtualInterface'{..}
= object
(catMaybes
[("routeFilterPrefixes" .=) <$>
_npviRouteFilterPrefixes,
("customerAddress" .=) <$> _npviCustomerAddress,
("amazonAddress" .=) <$> _npviAmazonAddress,
("addressFamily" .=) <$> _npviAddressFamily,
("authKey" .=) <$> _npviAuthKey,
Just
("virtualInterfaceName" .=
_npviVirtualInterfaceName),
Just ("vlan" .= _npviVlan),
Just ("asn" .= _npviAsn)])
data NewPublicVirtualInterfaceAllocation = NewPublicVirtualInterfaceAllocation'
{ _newRouteFilterPrefixes :: !(Maybe [RouteFilterPrefix])
, _newCustomerAddress :: !(Maybe Text)
, _newAmazonAddress :: !(Maybe Text)
, _newAddressFamily :: !(Maybe AddressFamily)
, _newAuthKey :: !(Maybe Text)
, _newVirtualInterfaceName :: !Text
, _newVlan :: !Int
, _newAsn :: !Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
newPublicVirtualInterfaceAllocation
:: Text
-> Int
-> Int
-> NewPublicVirtualInterfaceAllocation
newPublicVirtualInterfaceAllocation pVirtualInterfaceName_ pVlan_ pAsn_ =
NewPublicVirtualInterfaceAllocation'
{ _newRouteFilterPrefixes = Nothing
, _newCustomerAddress = Nothing
, _newAmazonAddress = Nothing
, _newAddressFamily = Nothing
, _newAuthKey = Nothing
, _newVirtualInterfaceName = pVirtualInterfaceName_
, _newVlan = pVlan_
, _newAsn = pAsn_
}
newRouteFilterPrefixes :: Lens' NewPublicVirtualInterfaceAllocation [RouteFilterPrefix]
newRouteFilterPrefixes = lens _newRouteFilterPrefixes (\ s a -> s{_newRouteFilterPrefixes = a}) . _Default . _Coerce
newCustomerAddress :: Lens' NewPublicVirtualInterfaceAllocation (Maybe Text)
newCustomerAddress = lens _newCustomerAddress (\ s a -> s{_newCustomerAddress = a})
newAmazonAddress :: Lens' NewPublicVirtualInterfaceAllocation (Maybe Text)
newAmazonAddress = lens _newAmazonAddress (\ s a -> s{_newAmazonAddress = a})
newAddressFamily :: Lens' NewPublicVirtualInterfaceAllocation (Maybe AddressFamily)
newAddressFamily = lens _newAddressFamily (\ s a -> s{_newAddressFamily = a})
newAuthKey :: Lens' NewPublicVirtualInterfaceAllocation (Maybe Text)
newAuthKey = lens _newAuthKey (\ s a -> s{_newAuthKey = a})
newVirtualInterfaceName :: Lens' NewPublicVirtualInterfaceAllocation Text
newVirtualInterfaceName = lens _newVirtualInterfaceName (\ s a -> s{_newVirtualInterfaceName = a})
newVlan :: Lens' NewPublicVirtualInterfaceAllocation Int
newVlan = lens _newVlan (\ s a -> s{_newVlan = a})
newAsn :: Lens' NewPublicVirtualInterfaceAllocation Int
newAsn = lens _newAsn (\ s a -> s{_newAsn = a})
instance Hashable NewPublicVirtualInterfaceAllocation
where
instance NFData NewPublicVirtualInterfaceAllocation
where
instance ToJSON NewPublicVirtualInterfaceAllocation
where
toJSON NewPublicVirtualInterfaceAllocation'{..}
= object
(catMaybes
[("routeFilterPrefixes" .=) <$>
_newRouteFilterPrefixes,
("customerAddress" .=) <$> _newCustomerAddress,
("amazonAddress" .=) <$> _newAmazonAddress,
("addressFamily" .=) <$> _newAddressFamily,
("authKey" .=) <$> _newAuthKey,
Just
("virtualInterfaceName" .= _newVirtualInterfaceName),
Just ("vlan" .= _newVlan), Just ("asn" .= _newAsn)])
data ResourceTag = ResourceTag'
{ _rtResourceARN :: !(Maybe Text)
, _rtTags :: !(Maybe (List1 Tag))
} deriving (Eq, Read, Show, Data, Typeable, Generic)
resourceTag
:: ResourceTag
resourceTag = ResourceTag' {_rtResourceARN = Nothing, _rtTags = Nothing}
rtResourceARN :: Lens' ResourceTag (Maybe Text)
rtResourceARN = lens _rtResourceARN (\ s a -> s{_rtResourceARN = a})
rtTags :: Lens' ResourceTag (Maybe (NonEmpty Tag))
rtTags = lens _rtTags (\ s a -> s{_rtTags = a}) . mapping _List1
instance FromJSON ResourceTag where
parseJSON
= withObject "ResourceTag"
(\ x ->
ResourceTag' <$>
(x .:? "resourceArn") <*> (x .:? "tags"))
instance Hashable ResourceTag where
instance NFData ResourceTag where
newtype RouteFilterPrefix = RouteFilterPrefix'
{ _rfpCidr :: Maybe Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
routeFilterPrefix
:: RouteFilterPrefix
routeFilterPrefix = RouteFilterPrefix' {_rfpCidr = Nothing}
rfpCidr :: Lens' RouteFilterPrefix (Maybe Text)
rfpCidr = lens _rfpCidr (\ s a -> s{_rfpCidr = a})
instance FromJSON RouteFilterPrefix where
parseJSON
= withObject "RouteFilterPrefix"
(\ x -> RouteFilterPrefix' <$> (x .:? "cidr"))
instance Hashable RouteFilterPrefix where
instance NFData RouteFilterPrefix where
instance ToJSON RouteFilterPrefix where
toJSON RouteFilterPrefix'{..}
= object (catMaybes [("cidr" .=) <$> _rfpCidr])
data Tag = Tag'
{ _tagValue :: !(Maybe Text)
, _tagKey :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
tag
:: Text
-> Tag
tag pKey_ = Tag' {_tagValue = Nothing, _tagKey = pKey_}
tagValue :: Lens' Tag (Maybe Text)
tagValue = lens _tagValue (\ s a -> s{_tagValue = a})
tagKey :: Lens' Tag Text
tagKey = lens _tagKey (\ s a -> s{_tagKey = a})
instance FromJSON Tag where
parseJSON
= withObject "Tag"
(\ x -> Tag' <$> (x .:? "value") <*> (x .: "key"))
instance Hashable Tag where
instance NFData Tag where
instance ToJSON Tag where
toJSON Tag'{..}
= object
(catMaybes
[("value" .=) <$> _tagValue,
Just ("key" .= _tagKey)])
data VirtualGateway = VirtualGateway'
{ _vgVirtualGatewayId :: !(Maybe Text)
, _vgVirtualGatewayState :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
virtualGateway
:: VirtualGateway
virtualGateway =
VirtualGateway'
{_vgVirtualGatewayId = Nothing, _vgVirtualGatewayState = Nothing}
vgVirtualGatewayId :: Lens' VirtualGateway (Maybe Text)
vgVirtualGatewayId = lens _vgVirtualGatewayId (\ s a -> s{_vgVirtualGatewayId = a})
vgVirtualGatewayState :: Lens' VirtualGateway (Maybe Text)
vgVirtualGatewayState = lens _vgVirtualGatewayState (\ s a -> s{_vgVirtualGatewayState = a})
instance FromJSON VirtualGateway where
parseJSON
= withObject "VirtualGateway"
(\ x ->
VirtualGateway' <$>
(x .:? "virtualGatewayId") <*>
(x .:? "virtualGatewayState"))
instance Hashable VirtualGateway where
instance NFData VirtualGateway where
data VirtualInterface = VirtualInterface'
{ _viBgpPeers :: !(Maybe [BGPPeer])
, _viVirtualGatewayId :: !(Maybe Text)
, _viRouteFilterPrefixes :: !(Maybe [RouteFilterPrefix])
, _viCustomerAddress :: !(Maybe Text)
, _viVlan :: !(Maybe Int)
, _viLocation :: !(Maybe Text)
, _viAmazonAddress :: !(Maybe Text)
, _viAddressFamily :: !(Maybe AddressFamily)
, _viVirtualInterfaceState :: !(Maybe VirtualInterfaceState)
, _viConnectionId :: !(Maybe Text)
, _viDirectConnectGatewayId :: !(Maybe Text)
, _viAmazonSideASN :: !(Maybe Integer)
, _viVirtualInterfaceType :: !(Maybe Text)
, _viAsn :: !(Maybe Int)
, _viAuthKey :: !(Maybe Text)
, _viCustomerRouterConfig :: !(Maybe Text)
, _viOwnerAccount :: !(Maybe Text)
, _viVirtualInterfaceName :: !(Maybe Text)
, _viVirtualInterfaceId :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
virtualInterface
:: VirtualInterface
virtualInterface =
VirtualInterface'
{ _viBgpPeers = Nothing
, _viVirtualGatewayId = Nothing
, _viRouteFilterPrefixes = Nothing
, _viCustomerAddress = Nothing
, _viVlan = Nothing
, _viLocation = Nothing
, _viAmazonAddress = Nothing
, _viAddressFamily = Nothing
, _viVirtualInterfaceState = Nothing
, _viConnectionId = Nothing
, _viDirectConnectGatewayId = Nothing
, _viAmazonSideASN = Nothing
, _viVirtualInterfaceType = Nothing
, _viAsn = Nothing
, _viAuthKey = Nothing
, _viCustomerRouterConfig = Nothing
, _viOwnerAccount = Nothing
, _viVirtualInterfaceName = Nothing
, _viVirtualInterfaceId = Nothing
}
viBgpPeers :: Lens' VirtualInterface [BGPPeer]
viBgpPeers = lens _viBgpPeers (\ s a -> s{_viBgpPeers = a}) . _Default . _Coerce
viVirtualGatewayId :: Lens' VirtualInterface (Maybe Text)
viVirtualGatewayId = lens _viVirtualGatewayId (\ s a -> s{_viVirtualGatewayId = a})
viRouteFilterPrefixes :: Lens' VirtualInterface [RouteFilterPrefix]
viRouteFilterPrefixes = lens _viRouteFilterPrefixes (\ s a -> s{_viRouteFilterPrefixes = a}) . _Default . _Coerce
viCustomerAddress :: Lens' VirtualInterface (Maybe Text)
viCustomerAddress = lens _viCustomerAddress (\ s a -> s{_viCustomerAddress = a})
viVlan :: Lens' VirtualInterface (Maybe Int)
viVlan = lens _viVlan (\ s a -> s{_viVlan = a})
viLocation :: Lens' VirtualInterface (Maybe Text)
viLocation = lens _viLocation (\ s a -> s{_viLocation = a})
viAmazonAddress :: Lens' VirtualInterface (Maybe Text)
viAmazonAddress = lens _viAmazonAddress (\ s a -> s{_viAmazonAddress = a})
viAddressFamily :: Lens' VirtualInterface (Maybe AddressFamily)
viAddressFamily = lens _viAddressFamily (\ s a -> s{_viAddressFamily = a})
viVirtualInterfaceState :: Lens' VirtualInterface (Maybe VirtualInterfaceState)
viVirtualInterfaceState = lens _viVirtualInterfaceState (\ s a -> s{_viVirtualInterfaceState = a})
viConnectionId :: Lens' VirtualInterface (Maybe Text)
viConnectionId = lens _viConnectionId (\ s a -> s{_viConnectionId = a})
viDirectConnectGatewayId :: Lens' VirtualInterface (Maybe Text)
viDirectConnectGatewayId = lens _viDirectConnectGatewayId (\ s a -> s{_viDirectConnectGatewayId = a})
viAmazonSideASN :: Lens' VirtualInterface (Maybe Integer)
viAmazonSideASN = lens _viAmazonSideASN (\ s a -> s{_viAmazonSideASN = a})
viVirtualInterfaceType :: Lens' VirtualInterface (Maybe Text)
viVirtualInterfaceType = lens _viVirtualInterfaceType (\ s a -> s{_viVirtualInterfaceType = a})
viAsn :: Lens' VirtualInterface (Maybe Int)
viAsn = lens _viAsn (\ s a -> s{_viAsn = a})
viAuthKey :: Lens' VirtualInterface (Maybe Text)
viAuthKey = lens _viAuthKey (\ s a -> s{_viAuthKey = a})
viCustomerRouterConfig :: Lens' VirtualInterface (Maybe Text)
viCustomerRouterConfig = lens _viCustomerRouterConfig (\ s a -> s{_viCustomerRouterConfig = a})
viOwnerAccount :: Lens' VirtualInterface (Maybe Text)
viOwnerAccount = lens _viOwnerAccount (\ s a -> s{_viOwnerAccount = a})
viVirtualInterfaceName :: Lens' VirtualInterface (Maybe Text)
viVirtualInterfaceName = lens _viVirtualInterfaceName (\ s a -> s{_viVirtualInterfaceName = a})
viVirtualInterfaceId :: Lens' VirtualInterface (Maybe Text)
viVirtualInterfaceId = lens _viVirtualInterfaceId (\ s a -> s{_viVirtualInterfaceId = a})
instance FromJSON VirtualInterface where
parseJSON
= withObject "VirtualInterface"
(\ x ->
VirtualInterface' <$>
(x .:? "bgpPeers" .!= mempty) <*>
(x .:? "virtualGatewayId")
<*> (x .:? "routeFilterPrefixes" .!= mempty)
<*> (x .:? "customerAddress")
<*> (x .:? "vlan")
<*> (x .:? "location")
<*> (x .:? "amazonAddress")
<*> (x .:? "addressFamily")
<*> (x .:? "virtualInterfaceState")
<*> (x .:? "connectionId")
<*> (x .:? "directConnectGatewayId")
<*> (x .:? "amazonSideAsn")
<*> (x .:? "virtualInterfaceType")
<*> (x .:? "asn")
<*> (x .:? "authKey")
<*> (x .:? "customerRouterConfig")
<*> (x .:? "ownerAccount")
<*> (x .:? "virtualInterfaceName")
<*> (x .:? "virtualInterfaceId"))
instance Hashable VirtualInterface where
instance NFData VirtualInterface where