{-# 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.Disks.Resize
(
DisksResizeResource
, disksResize
, DisksResize
, drRequestId
, drProject
, drDisk
, drZone
, drPayload
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type DisksResizeResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"zones" :>
Capture "zone" Text :>
"disks" :>
Capture "disk" Text :>
"resize" :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] DisksResizeRequest :>
Post '[JSON] Operation
data DisksResize = DisksResize'
{ _drRequestId :: !(Maybe Text)
, _drProject :: !Text
, _drDisk :: !Text
, _drZone :: !Text
, _drPayload :: !DisksResizeRequest
} deriving (Eq,Show,Data,Typeable,Generic)
disksResize
:: Text
-> Text
-> Text
-> DisksResizeRequest
-> DisksResize
disksResize pDrProject_ pDrDisk_ pDrZone_ pDrPayload_ =
DisksResize'
{ _drRequestId = Nothing
, _drProject = pDrProject_
, _drDisk = pDrDisk_
, _drZone = pDrZone_
, _drPayload = pDrPayload_
}
drRequestId :: Lens' DisksResize (Maybe Text)
drRequestId
= lens _drRequestId (\ s a -> s{_drRequestId = a})
drProject :: Lens' DisksResize Text
drProject
= lens _drProject (\ s a -> s{_drProject = a})
drDisk :: Lens' DisksResize Text
drDisk = lens _drDisk (\ s a -> s{_drDisk = a})
drZone :: Lens' DisksResize Text
drZone = lens _drZone (\ s a -> s{_drZone = a})
drPayload :: Lens' DisksResize DisksResizeRequest
drPayload
= lens _drPayload (\ s a -> s{_drPayload = a})
instance GoogleRequest DisksResize where
type Rs DisksResize = Operation
type Scopes DisksResize =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient DisksResize'{..}
= go _drProject _drZone _drDisk _drRequestId
(Just AltJSON)
_drPayload
computeService
where go
= buildClient (Proxy :: Proxy DisksResizeResource)
mempty