{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.Resource.Compute.Instances.GetSerialPortOutput
(
InstancesGetSerialPortOutputResource
, instancesGetSerialPortOutput
, InstancesGetSerialPortOutput
, igspoProject
, igspoStart
, 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 "start" (Textual Int64) :>
QueryParam "port" (Textual Int32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] SerialPortOutput
data InstancesGetSerialPortOutput = InstancesGetSerialPortOutput'
{ _igspoProject :: !Text
, _igspoStart :: !(Maybe (Textual Int64))
, _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_
, _igspoStart = Nothing
, _igspoZone = pIgspoZone_
, _igspoPort = 1
, _igspoInstance = pIgspoInstance_
}
igspoProject :: Lens' InstancesGetSerialPortOutput Text
igspoProject
= lens _igspoProject (\ s a -> s{_igspoProject = a})
igspoStart :: Lens' InstancesGetSerialPortOutput (Maybe Int64)
igspoStart
= lens _igspoStart (\ s a -> s{_igspoStart = a}) .
mapping _Coerce
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
_igspoStart
(Just _igspoPort)
(Just AltJSON)
computeService
where go
= buildClient
(Proxy :: Proxy InstancesGetSerialPortOutputResource)
mempty