{-# 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.SetMachineType
(
InstancesSetMachineTypeResource
, instancesSetMachineType
, InstancesSetMachineType
, ismtRequestId
, ismtProject
, ismtZone
, ismtPayload
, ismtInstance
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type InstancesSetMachineTypeResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"zones" :>
Capture "zone" Text :>
"instances" :>
Capture "instance" Text :>
"setMachineType" :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] InstancesSetMachineTypeRequest :>
Post '[JSON] Operation
data InstancesSetMachineType = InstancesSetMachineType'
{ _ismtRequestId :: !(Maybe Text)
, _ismtProject :: !Text
, _ismtZone :: !Text
, _ismtPayload :: !InstancesSetMachineTypeRequest
, _ismtInstance :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
instancesSetMachineType
:: Text
-> Text
-> InstancesSetMachineTypeRequest
-> Text
-> InstancesSetMachineType
instancesSetMachineType pIsmtProject_ pIsmtZone_ pIsmtPayload_ pIsmtInstance_ =
InstancesSetMachineType'
{ _ismtRequestId = Nothing
, _ismtProject = pIsmtProject_
, _ismtZone = pIsmtZone_
, _ismtPayload = pIsmtPayload_
, _ismtInstance = pIsmtInstance_
}
ismtRequestId :: Lens' InstancesSetMachineType (Maybe Text)
ismtRequestId
= lens _ismtRequestId
(\ s a -> s{_ismtRequestId = a})
ismtProject :: Lens' InstancesSetMachineType Text
ismtProject
= lens _ismtProject (\ s a -> s{_ismtProject = a})
ismtZone :: Lens' InstancesSetMachineType Text
ismtZone = lens _ismtZone (\ s a -> s{_ismtZone = a})
ismtPayload :: Lens' InstancesSetMachineType InstancesSetMachineTypeRequest
ismtPayload
= lens _ismtPayload (\ s a -> s{_ismtPayload = a})
ismtInstance :: Lens' InstancesSetMachineType Text
ismtInstance
= lens _ismtInstance (\ s a -> s{_ismtInstance = a})
instance GoogleRequest InstancesSetMachineType where
type Rs InstancesSetMachineType = Operation
type Scopes InstancesSetMachineType =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient InstancesSetMachineType'{..}
= go _ismtProject _ismtZone _ismtInstance
_ismtRequestId
(Just AltJSON)
_ismtPayload
computeService
where go
= buildClient
(Proxy :: Proxy InstancesSetMachineTypeResource)
mempty