{-# 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.MoveInstance
(
ProjectsMoveInstanceResource
, projectsMoveInstance
, ProjectsMoveInstance
, pmiRequestId
, pmiProject
, pmiPayload
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type ProjectsMoveInstanceResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"moveInstance" :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] InstanceMoveRequest :>
Post '[JSON] Operation
data ProjectsMoveInstance = ProjectsMoveInstance'
{ _pmiRequestId :: !(Maybe Text)
, _pmiProject :: !Text
, _pmiPayload :: !InstanceMoveRequest
} deriving (Eq,Show,Data,Typeable,Generic)
projectsMoveInstance
:: Text
-> InstanceMoveRequest
-> ProjectsMoveInstance
projectsMoveInstance pPmiProject_ pPmiPayload_ =
ProjectsMoveInstance'
{ _pmiRequestId = Nothing
, _pmiProject = pPmiProject_
, _pmiPayload = pPmiPayload_
}
pmiRequestId :: Lens' ProjectsMoveInstance (Maybe Text)
pmiRequestId
= lens _pmiRequestId (\ s a -> s{_pmiRequestId = a})
pmiProject :: Lens' ProjectsMoveInstance Text
pmiProject
= lens _pmiProject (\ s a -> s{_pmiProject = a})
pmiPayload :: Lens' ProjectsMoveInstance InstanceMoveRequest
pmiPayload
= lens _pmiPayload (\ s a -> s{_pmiPayload = a})
instance GoogleRequest ProjectsMoveInstance where
type Rs ProjectsMoveInstance = Operation
type Scopes ProjectsMoveInstance =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient ProjectsMoveInstance'{..}
= go _pmiProject _pmiRequestId (Just AltJSON)
_pmiPayload
computeService
where go
= buildClient
(Proxy :: Proxy ProjectsMoveInstanceResource)
mempty