{-# 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.SetDiskAutoDelete
(
InstancesSetDiskAutoDeleteResource
, instancesSetDiskAutoDelete
, InstancesSetDiskAutoDelete
, isdadRequestId
, isdadProject
, isdadAutoDelete
, isdadZone
, isdadDeviceName
, isdadInstance
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type InstancesSetDiskAutoDeleteResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"zones" :>
Capture "zone" Text :>
"instances" :>
Capture "instance" Text :>
"setDiskAutoDelete" :>
QueryParam "autoDelete" Bool :>
QueryParam "deviceName" Text :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :> Post '[JSON] Operation
data InstancesSetDiskAutoDelete = InstancesSetDiskAutoDelete'
{ _isdadRequestId :: !(Maybe Text)
, _isdadProject :: !Text
, _isdadAutoDelete :: !Bool
, _isdadZone :: !Text
, _isdadDeviceName :: !Text
, _isdadInstance :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
instancesSetDiskAutoDelete
:: Text
-> Bool
-> Text
-> Text
-> Text
-> InstancesSetDiskAutoDelete
instancesSetDiskAutoDelete pIsdadProject_ pIsdadAutoDelete_ pIsdadZone_ pIsdadDeviceName_ pIsdadInstance_ =
InstancesSetDiskAutoDelete'
{ _isdadRequestId = Nothing
, _isdadProject = pIsdadProject_
, _isdadAutoDelete = pIsdadAutoDelete_
, _isdadZone = pIsdadZone_
, _isdadDeviceName = pIsdadDeviceName_
, _isdadInstance = pIsdadInstance_
}
isdadRequestId :: Lens' InstancesSetDiskAutoDelete (Maybe Text)
isdadRequestId
= lens _isdadRequestId
(\ s a -> s{_isdadRequestId = a})
isdadProject :: Lens' InstancesSetDiskAutoDelete Text
isdadProject
= lens _isdadProject (\ s a -> s{_isdadProject = a})
isdadAutoDelete :: Lens' InstancesSetDiskAutoDelete Bool
isdadAutoDelete
= lens _isdadAutoDelete
(\ s a -> s{_isdadAutoDelete = a})
isdadZone :: Lens' InstancesSetDiskAutoDelete Text
isdadZone
= lens _isdadZone (\ s a -> s{_isdadZone = a})
isdadDeviceName :: Lens' InstancesSetDiskAutoDelete Text
isdadDeviceName
= lens _isdadDeviceName
(\ s a -> s{_isdadDeviceName = a})
isdadInstance :: Lens' InstancesSetDiskAutoDelete Text
isdadInstance
= lens _isdadInstance
(\ s a -> s{_isdadInstance = a})
instance GoogleRequest InstancesSetDiskAutoDelete
where
type Rs InstancesSetDiskAutoDelete = Operation
type Scopes InstancesSetDiskAutoDelete =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient InstancesSetDiskAutoDelete'{..}
= go _isdadProject _isdadZone _isdadInstance
(Just _isdadAutoDelete)
(Just _isdadDeviceName)
_isdadRequestId
(Just AltJSON)
computeService
where go
= buildClient
(Proxy :: Proxy InstancesSetDiskAutoDeleteResource)
mempty