{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Network.AWS.Lightsail.PeerVPC
(
peerVPC
, PeerVPC
, peerVPCResponse
, PeerVPCResponse
, pvrsOperation
, pvrsResponseStatus
) where
import Network.AWS.Lens
import Network.AWS.Lightsail.Types
import Network.AWS.Lightsail.Types.Product
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data PeerVPC =
PeerVPC'
deriving (Eq, Read, Show, Data, Typeable, Generic)
peerVPC
:: PeerVPC
peerVPC = PeerVPC'
instance AWSRequest PeerVPC where
type Rs PeerVPC = PeerVPCResponse
request = postJSON lightsail
response
= receiveJSON
(\ s h x ->
PeerVPCResponse' <$>
(x .?> "operation") <*> (pure (fromEnum s)))
instance Hashable PeerVPC where
instance NFData PeerVPC where
instance ToHeaders PeerVPC where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("Lightsail_20161128.PeerVpc" :: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON PeerVPC where
toJSON = const (Object mempty)
instance ToPath PeerVPC where
toPath = const "/"
instance ToQuery PeerVPC where
toQuery = const mempty
data PeerVPCResponse = PeerVPCResponse'
{ _pvrsOperation :: !(Maybe Operation)
, _pvrsResponseStatus :: !Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
peerVPCResponse
:: Int
-> PeerVPCResponse
peerVPCResponse pResponseStatus_ =
PeerVPCResponse'
{_pvrsOperation = Nothing, _pvrsResponseStatus = pResponseStatus_}
pvrsOperation :: Lens' PeerVPCResponse (Maybe Operation)
pvrsOperation = lens _pvrsOperation (\ s a -> s{_pvrsOperation = a})
pvrsResponseStatus :: Lens' PeerVPCResponse Int
pvrsResponseStatus = lens _pvrsResponseStatus (\ s a -> s{_pvrsResponseStatus = a})
instance NFData PeerVPCResponse where