module Network.AWS.DirectConnect.AllocateConnectionOnInterconnect
(
AllocateConnectionOnInterconnect
, allocateConnectionOnInterconnect
, acoiBandwidth
, acoiConnectionName
, acoiInterconnectId
, acoiOwnerAccount
, acoiVlan
, AllocateConnectionOnInterconnectResponse
, allocateConnectionOnInterconnectResponse
, acoirBandwidth
, acoirConnectionId
, acoirConnectionName
, acoirConnectionState
, acoirLocation
, acoirOwnerAccount
, acoirPartnerName
, acoirRegion
, acoirVlan
) where
import Network.AWS.Prelude
import Network.AWS.Request.JSON
import Network.AWS.DirectConnect.Types
import qualified GHC.Exts
data AllocateConnectionOnInterconnect = AllocateConnectionOnInterconnect
{ _acoiBandwidth :: Text
, _acoiConnectionName :: Text
, _acoiInterconnectId :: Text
, _acoiOwnerAccount :: Text
, _acoiVlan :: Int
} deriving (Eq, Ord, Show)
allocateConnectionOnInterconnect :: Text
-> Text
-> Text
-> Text
-> Int
-> AllocateConnectionOnInterconnect
allocateConnectionOnInterconnect p1 p2 p3 p4 p5 = AllocateConnectionOnInterconnect
{ _acoiBandwidth = p1
, _acoiConnectionName = p2
, _acoiOwnerAccount = p3
, _acoiInterconnectId = p4
, _acoiVlan = p5
}
acoiBandwidth :: Lens' AllocateConnectionOnInterconnect Text
acoiBandwidth = lens _acoiBandwidth (\s a -> s { _acoiBandwidth = a })
acoiConnectionName :: Lens' AllocateConnectionOnInterconnect Text
acoiConnectionName =
lens _acoiConnectionName (\s a -> s { _acoiConnectionName = a })
acoiInterconnectId :: Lens' AllocateConnectionOnInterconnect Text
acoiInterconnectId =
lens _acoiInterconnectId (\s a -> s { _acoiInterconnectId = a })
acoiOwnerAccount :: Lens' AllocateConnectionOnInterconnect Text
acoiOwnerAccount = lens _acoiOwnerAccount (\s a -> s { _acoiOwnerAccount = a })
acoiVlan :: Lens' AllocateConnectionOnInterconnect Int
acoiVlan = lens _acoiVlan (\s a -> s { _acoiVlan = a })
data AllocateConnectionOnInterconnectResponse = AllocateConnectionOnInterconnectResponse
{ _acoirBandwidth :: Maybe Text
, _acoirConnectionId :: Maybe Text
, _acoirConnectionName :: Maybe Text
, _acoirConnectionState :: Maybe ConnectionState
, _acoirLocation :: Maybe Text
, _acoirOwnerAccount :: Maybe Text
, _acoirPartnerName :: Maybe Text
, _acoirRegion :: Maybe Text
, _acoirVlan :: Maybe Int
} deriving (Eq, Show)
allocateConnectionOnInterconnectResponse :: AllocateConnectionOnInterconnectResponse
allocateConnectionOnInterconnectResponse = AllocateConnectionOnInterconnectResponse
{ _acoirOwnerAccount = Nothing
, _acoirConnectionId = Nothing
, _acoirConnectionName = Nothing
, _acoirConnectionState = Nothing
, _acoirRegion = Nothing
, _acoirLocation = Nothing
, _acoirBandwidth = Nothing
, _acoirVlan = Nothing
, _acoirPartnerName = Nothing
}
acoirBandwidth :: Lens' AllocateConnectionOnInterconnectResponse (Maybe Text)
acoirBandwidth = lens _acoirBandwidth (\s a -> s { _acoirBandwidth = a })
acoirConnectionId :: Lens' AllocateConnectionOnInterconnectResponse (Maybe Text)
acoirConnectionId =
lens _acoirConnectionId (\s a -> s { _acoirConnectionId = a })
acoirConnectionName :: Lens' AllocateConnectionOnInterconnectResponse (Maybe Text)
acoirConnectionName =
lens _acoirConnectionName (\s a -> s { _acoirConnectionName = a })
acoirConnectionState :: Lens' AllocateConnectionOnInterconnectResponse (Maybe ConnectionState)
acoirConnectionState =
lens _acoirConnectionState (\s a -> s { _acoirConnectionState = a })
acoirLocation :: Lens' AllocateConnectionOnInterconnectResponse (Maybe Text)
acoirLocation = lens _acoirLocation (\s a -> s { _acoirLocation = a })
acoirOwnerAccount :: Lens' AllocateConnectionOnInterconnectResponse (Maybe Text)
acoirOwnerAccount =
lens _acoirOwnerAccount (\s a -> s { _acoirOwnerAccount = a })
acoirPartnerName :: Lens' AllocateConnectionOnInterconnectResponse (Maybe Text)
acoirPartnerName = lens _acoirPartnerName (\s a -> s { _acoirPartnerName = a })
acoirRegion :: Lens' AllocateConnectionOnInterconnectResponse (Maybe Text)
acoirRegion = lens _acoirRegion (\s a -> s { _acoirRegion = a })
acoirVlan :: Lens' AllocateConnectionOnInterconnectResponse (Maybe Int)
acoirVlan = lens _acoirVlan (\s a -> s { _acoirVlan = a })
instance ToPath AllocateConnectionOnInterconnect where
toPath = const "/"
instance ToQuery AllocateConnectionOnInterconnect where
toQuery = const mempty
instance ToHeaders AllocateConnectionOnInterconnect
instance ToJSON AllocateConnectionOnInterconnect where
toJSON AllocateConnectionOnInterconnect{..} = object
[ "bandwidth" .= _acoiBandwidth
, "connectionName" .= _acoiConnectionName
, "ownerAccount" .= _acoiOwnerAccount
, "interconnectId" .= _acoiInterconnectId
, "vlan" .= _acoiVlan
]
instance AWSRequest AllocateConnectionOnInterconnect where
type Sv AllocateConnectionOnInterconnect = DirectConnect
type Rs AllocateConnectionOnInterconnect = AllocateConnectionOnInterconnectResponse
request = post "AllocateConnectionOnInterconnect"
response = jsonResponse
instance FromJSON AllocateConnectionOnInterconnectResponse where
parseJSON = withObject "AllocateConnectionOnInterconnectResponse" $ \o -> AllocateConnectionOnInterconnectResponse
<$> o .:? "bandwidth"
<*> o .:? "connectionId"
<*> o .:? "connectionName"
<*> o .:? "connectionState"
<*> o .:? "location"
<*> o .:? "ownerAccount"
<*> o .:? "partnerName"
<*> o .:? "region"
<*> o .:? "vlan"