{-# 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.Get
(
ProjectsDeploymentsGetResource
, projectsDeploymentsGet
, ProjectsDeploymentsGet
, pdgDeploymentId
, pdgXgafv
, pdgUploadProtocol
, pdgAccessToken
, pdgUploadType
, pdgScriptId
, pdgCallback
) where
import Network.Google.Prelude
import Network.Google.Script.Types
type ProjectsDeploymentsGetResource =
"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 :> Get '[JSON] Deployment
data ProjectsDeploymentsGet = ProjectsDeploymentsGet'
{ _pdgDeploymentId :: !Text
, _pdgXgafv :: !(Maybe Xgafv)
, _pdgUploadProtocol :: !(Maybe Text)
, _pdgAccessToken :: !(Maybe Text)
, _pdgUploadType :: !(Maybe Text)
, _pdgScriptId :: !Text
, _pdgCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsDeploymentsGet
:: Text
-> Text
-> ProjectsDeploymentsGet
projectsDeploymentsGet pPdgDeploymentId_ pPdgScriptId_ =
ProjectsDeploymentsGet'
{ _pdgDeploymentId = pPdgDeploymentId_
, _pdgXgafv = Nothing
, _pdgUploadProtocol = Nothing
, _pdgAccessToken = Nothing
, _pdgUploadType = Nothing
, _pdgScriptId = pPdgScriptId_
, _pdgCallback = Nothing
}
pdgDeploymentId :: Lens' ProjectsDeploymentsGet Text
pdgDeploymentId
= lens _pdgDeploymentId
(\ s a -> s{_pdgDeploymentId = a})
pdgXgafv :: Lens' ProjectsDeploymentsGet (Maybe Xgafv)
pdgXgafv = lens _pdgXgafv (\ s a -> s{_pdgXgafv = a})
pdgUploadProtocol :: Lens' ProjectsDeploymentsGet (Maybe Text)
pdgUploadProtocol
= lens _pdgUploadProtocol
(\ s a -> s{_pdgUploadProtocol = a})
pdgAccessToken :: Lens' ProjectsDeploymentsGet (Maybe Text)
pdgAccessToken
= lens _pdgAccessToken
(\ s a -> s{_pdgAccessToken = a})
pdgUploadType :: Lens' ProjectsDeploymentsGet (Maybe Text)
pdgUploadType
= lens _pdgUploadType
(\ s a -> s{_pdgUploadType = a})
pdgScriptId :: Lens' ProjectsDeploymentsGet Text
pdgScriptId
= lens _pdgScriptId (\ s a -> s{_pdgScriptId = a})
pdgCallback :: Lens' ProjectsDeploymentsGet (Maybe Text)
pdgCallback
= lens _pdgCallback (\ s a -> s{_pdgCallback = a})
instance GoogleRequest ProjectsDeploymentsGet where
type Rs ProjectsDeploymentsGet = Deployment
type Scopes ProjectsDeploymentsGet =
'["https://www.googleapis.com/auth/script.deployments",
"https://www.googleapis.com/auth/script.deployments.readonly"]
requestClient ProjectsDeploymentsGet'{..}
= go _pdgScriptId _pdgDeploymentId _pdgXgafv
_pdgUploadProtocol
_pdgAccessToken
_pdgUploadType
_pdgCallback
(Just AltJSON)
scriptService
where go
= buildClient
(Proxy :: Proxy ProjectsDeploymentsGetResource)
mempty