{-# 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.Projects.MoveDisk
(
ProjectsMoveDiskResource
, projectsMoveDisk
, ProjectsMoveDisk
, pmdRequestId
, pmdProject
, pmdPayload
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type ProjectsMoveDiskResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"moveDisk" :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] DiskMoveRequest :>
Post '[JSON] Operation
data ProjectsMoveDisk = ProjectsMoveDisk'
{ _pmdRequestId :: !(Maybe Text)
, _pmdProject :: !Text
, _pmdPayload :: !DiskMoveRequest
} deriving (Eq,Show,Data,Typeable,Generic)
projectsMoveDisk
:: Text
-> DiskMoveRequest
-> ProjectsMoveDisk
projectsMoveDisk pPmdProject_ pPmdPayload_ =
ProjectsMoveDisk'
{ _pmdRequestId = Nothing
, _pmdProject = pPmdProject_
, _pmdPayload = pPmdPayload_
}
pmdRequestId :: Lens' ProjectsMoveDisk (Maybe Text)
pmdRequestId
= lens _pmdRequestId (\ s a -> s{_pmdRequestId = a})
pmdProject :: Lens' ProjectsMoveDisk Text
pmdProject
= lens _pmdProject (\ s a -> s{_pmdProject = a})
pmdPayload :: Lens' ProjectsMoveDisk DiskMoveRequest
pmdPayload
= lens _pmdPayload (\ s a -> s{_pmdPayload = a})
instance GoogleRequest ProjectsMoveDisk where
type Rs ProjectsMoveDisk = Operation
type Scopes ProjectsMoveDisk =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient ProjectsMoveDisk'{..}
= go _pmdProject _pmdRequestId (Just AltJSON)
_pmdPayload
computeService
where go
= buildClient
(Proxy :: Proxy ProjectsMoveDiskResource)
mempty