{-# 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.UnpeerVPC
(
unpeerVPC
, UnpeerVPC
, unpeerVPCResponse
, UnpeerVPCResponse
, uvrsOperation
, uvrsResponseStatus
) 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 UnpeerVPC =
UnpeerVPC'
deriving (Eq, Read, Show, Data, Typeable, Generic)
unpeerVPC
:: UnpeerVPC
unpeerVPC = UnpeerVPC'
instance AWSRequest UnpeerVPC where
type Rs UnpeerVPC = UnpeerVPCResponse
request = postJSON lightsail
response
= receiveJSON
(\ s h x ->
UnpeerVPCResponse' <$>
(x .?> "operation") <*> (pure (fromEnum s)))
instance Hashable UnpeerVPC where
instance NFData UnpeerVPC where
instance ToHeaders UnpeerVPC where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("Lightsail_20161128.UnpeerVpc" :: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON UnpeerVPC where
toJSON = const (Object mempty)
instance ToPath UnpeerVPC where
toPath = const "/"
instance ToQuery UnpeerVPC where
toQuery = const mempty
data UnpeerVPCResponse = UnpeerVPCResponse'
{ _uvrsOperation :: !(Maybe Operation)
, _uvrsResponseStatus :: !Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
unpeerVPCResponse
:: Int
-> UnpeerVPCResponse
unpeerVPCResponse pResponseStatus_ =
UnpeerVPCResponse'
{_uvrsOperation = Nothing, _uvrsResponseStatus = pResponseStatus_}
uvrsOperation :: Lens' UnpeerVPCResponse (Maybe Operation)
uvrsOperation = lens _uvrsOperation (\ s a -> s{_uvrsOperation = a})
uvrsResponseStatus :: Lens' UnpeerVPCResponse Int
uvrsResponseStatus = lens _uvrsResponseStatus (\ s a -> s{_uvrsResponseStatus = a})
instance NFData UnpeerVPCResponse where