{-# 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.DeviceFarm.GetVPCEConfiguration
(
getVPCEConfiguration
, GetVPCEConfiguration
, gvecArn
, getVPCEConfigurationResponse
, GetVPCEConfigurationResponse
, gvecrsVpceConfiguration
, gvecrsResponseStatus
) where
import Network.AWS.DeviceFarm.Types
import Network.AWS.DeviceFarm.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype GetVPCEConfiguration = GetVPCEConfiguration'
{ _gvecArn :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
getVPCEConfiguration
:: Text
-> GetVPCEConfiguration
getVPCEConfiguration pArn_ = GetVPCEConfiguration' {_gvecArn = pArn_}
gvecArn :: Lens' GetVPCEConfiguration Text
gvecArn = lens _gvecArn (\ s a -> s{_gvecArn = a})
instance AWSRequest GetVPCEConfiguration where
type Rs GetVPCEConfiguration =
GetVPCEConfigurationResponse
request = postJSON deviceFarm
response
= receiveJSON
(\ s h x ->
GetVPCEConfigurationResponse' <$>
(x .?> "vpceConfiguration") <*> (pure (fromEnum s)))
instance Hashable GetVPCEConfiguration where
instance NFData GetVPCEConfiguration where
instance ToHeaders GetVPCEConfiguration where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("DeviceFarm_20150623.GetVPCEConfiguration" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON GetVPCEConfiguration where
toJSON GetVPCEConfiguration'{..}
= object (catMaybes [Just ("arn" .= _gvecArn)])
instance ToPath GetVPCEConfiguration where
toPath = const "/"
instance ToQuery GetVPCEConfiguration where
toQuery = const mempty
data GetVPCEConfigurationResponse = GetVPCEConfigurationResponse'
{ _gvecrsVpceConfiguration :: !(Maybe VPCEConfiguration)
, _gvecrsResponseStatus :: !Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
getVPCEConfigurationResponse
:: Int
-> GetVPCEConfigurationResponse
getVPCEConfigurationResponse pResponseStatus_ =
GetVPCEConfigurationResponse'
{ _gvecrsVpceConfiguration = Nothing
, _gvecrsResponseStatus = pResponseStatus_
}
gvecrsVpceConfiguration :: Lens' GetVPCEConfigurationResponse (Maybe VPCEConfiguration)
gvecrsVpceConfiguration = lens _gvecrsVpceConfiguration (\ s a -> s{_gvecrsVpceConfiguration = a})
gvecrsResponseStatus :: Lens' GetVPCEConfigurationResponse Int
gvecrsResponseStatus = lens _gvecrsResponseStatus (\ s a -> s{_gvecrsResponseStatus = a})
instance NFData GetVPCEConfigurationResponse where