module Network.Google.Resource.Compute.Instances.GetSerialPortOutput
(
InstancesGetSerialPortOutputResource
, instancesGetSerialPortOutput
, InstancesGetSerialPortOutput
, igspoProject
, igspoZone
, igspoPort
, igspoInstance
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type InstancesGetSerialPortOutputResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"zones" :>
Capture "zone" Text :>
"instances" :>
Capture "instance" Text :>
"serialPort" :>
QueryParam "port" (Textual Int32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] SerialPortOutput
data InstancesGetSerialPortOutput = InstancesGetSerialPortOutput'
{ _igspoProject :: !Text
, _igspoZone :: !Text
, _igspoPort :: !(Textual Int32)
, _igspoInstance :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
instancesGetSerialPortOutput
:: Text
-> Text
-> Text
-> InstancesGetSerialPortOutput
instancesGetSerialPortOutput pIgspoProject_ pIgspoZone_ pIgspoInstance_ =
InstancesGetSerialPortOutput'
{ _igspoProject = pIgspoProject_
, _igspoZone = pIgspoZone_
, _igspoPort = 1
, _igspoInstance = pIgspoInstance_
}
igspoProject :: Lens' InstancesGetSerialPortOutput Text
igspoProject
= lens _igspoProject (\ s a -> s{_igspoProject = a})
igspoZone :: Lens' InstancesGetSerialPortOutput Text
igspoZone
= lens _igspoZone (\ s a -> s{_igspoZone = a})
igspoPort :: Lens' InstancesGetSerialPortOutput Int32
igspoPort
= lens _igspoPort (\ s a -> s{_igspoPort = a}) .
_Coerce
igspoInstance :: Lens' InstancesGetSerialPortOutput Text
igspoInstance
= lens _igspoInstance
(\ s a -> s{_igspoInstance = a})
instance GoogleRequest InstancesGetSerialPortOutput
where
type Rs InstancesGetSerialPortOutput =
SerialPortOutput
type Scopes InstancesGetSerialPortOutput =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/compute.readonly"]
requestClient InstancesGetSerialPortOutput'{..}
= go _igspoProject _igspoZone _igspoInstance
(Just _igspoPort)
(Just AltJSON)
computeService
where go
= buildClient
(Proxy :: Proxy InstancesGetSerialPortOutputResource)
mempty