{-# 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.Script.Projects.Deployments.Update
(
ProjectsDeploymentsUpdateResource
, projectsDeploymentsUpdate
, ProjectsDeploymentsUpdate
, pduDeploymentId
, pduXgafv
, pduUploadProtocol
, pduAccessToken
, pduUploadType
, pduPayload
, pduScriptId
, pduCallback
) where
import Network.Google.Prelude
import Network.Google.Script.Types
type ProjectsDeploymentsUpdateResource =
"v1" :>
"projects" :>
Capture "scriptId" Text :>
"deployments" :>
Capture "deploymentId" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] UpdateDeploymentRequest :>
Put '[JSON] Deployment
data ProjectsDeploymentsUpdate = ProjectsDeploymentsUpdate'
{ _pduDeploymentId :: !Text
, _pduXgafv :: !(Maybe Xgafv)
, _pduUploadProtocol :: !(Maybe Text)
, _pduAccessToken :: !(Maybe Text)
, _pduUploadType :: !(Maybe Text)
, _pduPayload :: !UpdateDeploymentRequest
, _pduScriptId :: !Text
, _pduCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsDeploymentsUpdate
:: Text
-> UpdateDeploymentRequest
-> Text
-> ProjectsDeploymentsUpdate
projectsDeploymentsUpdate pPduDeploymentId_ pPduPayload_ pPduScriptId_ =
ProjectsDeploymentsUpdate'
{ _pduDeploymentId = pPduDeploymentId_
, _pduXgafv = Nothing
, _pduUploadProtocol = Nothing
, _pduAccessToken = Nothing
, _pduUploadType = Nothing
, _pduPayload = pPduPayload_
, _pduScriptId = pPduScriptId_
, _pduCallback = Nothing
}
pduDeploymentId :: Lens' ProjectsDeploymentsUpdate Text
pduDeploymentId
= lens _pduDeploymentId
(\ s a -> s{_pduDeploymentId = a})
pduXgafv :: Lens' ProjectsDeploymentsUpdate (Maybe Xgafv)
pduXgafv = lens _pduXgafv (\ s a -> s{_pduXgafv = a})
pduUploadProtocol :: Lens' ProjectsDeploymentsUpdate (Maybe Text)
pduUploadProtocol
= lens _pduUploadProtocol
(\ s a -> s{_pduUploadProtocol = a})
pduAccessToken :: Lens' ProjectsDeploymentsUpdate (Maybe Text)
pduAccessToken
= lens _pduAccessToken
(\ s a -> s{_pduAccessToken = a})
pduUploadType :: Lens' ProjectsDeploymentsUpdate (Maybe Text)
pduUploadType
= lens _pduUploadType
(\ s a -> s{_pduUploadType = a})
pduPayload :: Lens' ProjectsDeploymentsUpdate UpdateDeploymentRequest
pduPayload
= lens _pduPayload (\ s a -> s{_pduPayload = a})
pduScriptId :: Lens' ProjectsDeploymentsUpdate Text
pduScriptId
= lens _pduScriptId (\ s a -> s{_pduScriptId = a})
pduCallback :: Lens' ProjectsDeploymentsUpdate (Maybe Text)
pduCallback
= lens _pduCallback (\ s a -> s{_pduCallback = a})
instance GoogleRequest ProjectsDeploymentsUpdate
where
type Rs ProjectsDeploymentsUpdate = Deployment
type Scopes ProjectsDeploymentsUpdate =
'["https://www.googleapis.com/auth/script.deployments"]
requestClient ProjectsDeploymentsUpdate'{..}
= go _pduScriptId _pduDeploymentId _pduXgafv
_pduUploadProtocol
_pduAccessToken
_pduUploadType
_pduCallback
(Just AltJSON)
_pduPayload
scriptService
where go
= buildClient
(Proxy :: Proxy ProjectsDeploymentsUpdateResource)
mempty