module Network.Google.Resource.Compute.Instances.DetachDisk
(
InstancesDetachDiskResource
, instancesDetachDisk
, InstancesDetachDisk
, iddProject
, iddZone
, iddDeviceName
, iddInstance
) 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 "alt" AltJSON :> Post '[JSON] Operation
data InstancesDetachDisk = InstancesDetachDisk'
{ _iddProject :: !Text
, _iddZone :: !Text
, _iddDeviceName :: !Text
, _iddInstance :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
instancesDetachDisk
:: Text
-> Text
-> Text
-> Text
-> InstancesDetachDisk
instancesDetachDisk pIddProject_ pIddZone_ pIddDeviceName_ pIddInstance_ =
InstancesDetachDisk'
{ _iddProject = pIddProject_
, _iddZone = pIddZone_
, _iddDeviceName = pIddDeviceName_
, _iddInstance = pIddInstance_
}
iddProject :: Lens' InstancesDetachDisk Text
iddProject
= lens _iddProject (\ s a -> s{_iddProject = a})
iddZone :: Lens' InstancesDetachDisk Text
iddZone = lens _iddZone (\ s a -> s{_iddZone = a})
iddDeviceName :: Lens' InstancesDetachDisk Text
iddDeviceName
= lens _iddDeviceName
(\ s a -> s{_iddDeviceName = a})
iddInstance :: Lens' InstancesDetachDisk Text
iddInstance
= lens _iddInstance (\ s a -> s{_iddInstance = 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 _iddProject _iddZone _iddInstance
(Just _iddDeviceName)
(Just AltJSON)
computeService
where go
= buildClient
(Proxy :: Proxy InstancesDetachDiskResource)
mempty