{-# 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.DetachDisk
(
InstancesDetachDiskResource
, instancesDetachDisk
, InstancesDetachDisk
, idddRequestId
, idddProject
, idddZone
, idddDeviceName
, idddInstance
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type InstancesDetachDiskResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"zones" :>
Capture "zone" Text :>
"instances" :>
Capture "instance" Text :>
"detachDisk" :>
QueryParam "deviceName" Text :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :> Post '[JSON] Operation
data InstancesDetachDisk = InstancesDetachDisk'
{ _idddRequestId :: !(Maybe Text)
, _idddProject :: !Text
, _idddZone :: !Text
, _idddDeviceName :: !Text
, _idddInstance :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
instancesDetachDisk
:: Text
-> Text
-> Text
-> Text
-> InstancesDetachDisk
instancesDetachDisk pIdddProject_ pIdddZone_ pIdddDeviceName_ pIdddInstance_ =
InstancesDetachDisk'
{ _idddRequestId = Nothing
, _idddProject = pIdddProject_
, _idddZone = pIdddZone_
, _idddDeviceName = pIdddDeviceName_
, _idddInstance = pIdddInstance_
}
idddRequestId :: Lens' InstancesDetachDisk (Maybe Text)
idddRequestId
= lens _idddRequestId
(\ s a -> s{_idddRequestId = a})
idddProject :: Lens' InstancesDetachDisk Text
idddProject
= lens _idddProject (\ s a -> s{_idddProject = a})
idddZone :: Lens' InstancesDetachDisk Text
idddZone = lens _idddZone (\ s a -> s{_idddZone = a})
idddDeviceName :: Lens' InstancesDetachDisk Text
idddDeviceName
= lens _idddDeviceName
(\ s a -> s{_idddDeviceName = a})
idddInstance :: Lens' InstancesDetachDisk Text
idddInstance
= lens _idddInstance (\ s a -> s{_idddInstance = a})
instance GoogleRequest InstancesDetachDisk where
type Rs InstancesDetachDisk = Operation
type Scopes InstancesDetachDisk =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient InstancesDetachDisk'{..}
= go _idddProject _idddZone _idddInstance
(Just _idddDeviceName)
_idddRequestId
(Just AltJSON)
computeService
where go
= buildClient
(Proxy :: Proxy InstancesDetachDiskResource)
mempty