{-# 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.SetMachineResources
(
InstancesSetMachineResourcesResource
, instancesSetMachineResources
, InstancesSetMachineResources
, ismrRequestId
, ismrProject
, ismrZone
, ismrPayload
, ismrInstance
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type InstancesSetMachineResourcesResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"zones" :>
Capture "zone" Text :>
"instances" :>
Capture "instance" Text :>
"setMachineResources" :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] InstancesSetMachineResourcesRequest
:> Post '[JSON] Operation
data InstancesSetMachineResources = InstancesSetMachineResources'
{ _ismrRequestId :: !(Maybe Text)
, _ismrProject :: !Text
, _ismrZone :: !Text
, _ismrPayload :: !InstancesSetMachineResourcesRequest
, _ismrInstance :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
instancesSetMachineResources
:: Text
-> Text
-> InstancesSetMachineResourcesRequest
-> Text
-> InstancesSetMachineResources
instancesSetMachineResources pIsmrProject_ pIsmrZone_ pIsmrPayload_ pIsmrInstance_ =
InstancesSetMachineResources'
{ _ismrRequestId = Nothing
, _ismrProject = pIsmrProject_
, _ismrZone = pIsmrZone_
, _ismrPayload = pIsmrPayload_
, _ismrInstance = pIsmrInstance_
}
ismrRequestId :: Lens' InstancesSetMachineResources (Maybe Text)
ismrRequestId
= lens _ismrRequestId
(\ s a -> s{_ismrRequestId = a})
ismrProject :: Lens' InstancesSetMachineResources Text
ismrProject
= lens _ismrProject (\ s a -> s{_ismrProject = a})
ismrZone :: Lens' InstancesSetMachineResources Text
ismrZone = lens _ismrZone (\ s a -> s{_ismrZone = a})
ismrPayload :: Lens' InstancesSetMachineResources InstancesSetMachineResourcesRequest
ismrPayload
= lens _ismrPayload (\ s a -> s{_ismrPayload = a})
ismrInstance :: Lens' InstancesSetMachineResources Text
ismrInstance
= lens _ismrInstance (\ s a -> s{_ismrInstance = a})
instance GoogleRequest InstancesSetMachineResources
where
type Rs InstancesSetMachineResources = Operation
type Scopes InstancesSetMachineResources =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient InstancesSetMachineResources'{..}
= go _ismrProject _ismrZone _ismrInstance
_ismrRequestId
(Just AltJSON)
_ismrPayload
computeService
where go
= buildClient
(Proxy :: Proxy InstancesSetMachineResourcesResource)
mempty