{-# 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.Versions.Get
(
ProjectsVersionsGetResource
, projectsVersionsGet
, ProjectsVersionsGet
, pvgXgafv
, pvgUploadProtocol
, pvgAccessToken
, pvgUploadType
, pvgVersionNumber
, pvgScriptId
, pvgCallback
) where
import Network.Google.Prelude
import Network.Google.Script.Types
type ProjectsVersionsGetResource =
"v1" :>
"projects" :>
Capture "scriptId" Text :>
"versions" :>
Capture "versionNumber" (Textual Int32) :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Version
data ProjectsVersionsGet = ProjectsVersionsGet'
{ _pvgXgafv :: !(Maybe Xgafv)
, _pvgUploadProtocol :: !(Maybe Text)
, _pvgAccessToken :: !(Maybe Text)
, _pvgUploadType :: !(Maybe Text)
, _pvgVersionNumber :: !(Textual Int32)
, _pvgScriptId :: !Text
, _pvgCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsVersionsGet
:: Int32
-> Text
-> ProjectsVersionsGet
projectsVersionsGet pPvgVersionNumber_ pPvgScriptId_ =
ProjectsVersionsGet'
{ _pvgXgafv = Nothing
, _pvgUploadProtocol = Nothing
, _pvgAccessToken = Nothing
, _pvgUploadType = Nothing
, _pvgVersionNumber = _Coerce # pPvgVersionNumber_
, _pvgScriptId = pPvgScriptId_
, _pvgCallback = Nothing
}
pvgXgafv :: Lens' ProjectsVersionsGet (Maybe Xgafv)
pvgXgafv = lens _pvgXgafv (\ s a -> s{_pvgXgafv = a})
pvgUploadProtocol :: Lens' ProjectsVersionsGet (Maybe Text)
pvgUploadProtocol
= lens _pvgUploadProtocol
(\ s a -> s{_pvgUploadProtocol = a})
pvgAccessToken :: Lens' ProjectsVersionsGet (Maybe Text)
pvgAccessToken
= lens _pvgAccessToken
(\ s a -> s{_pvgAccessToken = a})
pvgUploadType :: Lens' ProjectsVersionsGet (Maybe Text)
pvgUploadType
= lens _pvgUploadType
(\ s a -> s{_pvgUploadType = a})
pvgVersionNumber :: Lens' ProjectsVersionsGet Int32
pvgVersionNumber
= lens _pvgVersionNumber
(\ s a -> s{_pvgVersionNumber = a})
. _Coerce
pvgScriptId :: Lens' ProjectsVersionsGet Text
pvgScriptId
= lens _pvgScriptId (\ s a -> s{_pvgScriptId = a})
pvgCallback :: Lens' ProjectsVersionsGet (Maybe Text)
pvgCallback
= lens _pvgCallback (\ s a -> s{_pvgCallback = a})
instance GoogleRequest ProjectsVersionsGet where
type Rs ProjectsVersionsGet = Version
type Scopes ProjectsVersionsGet =
'["https://www.googleapis.com/auth/script.projects",
"https://www.googleapis.com/auth/script.projects.readonly"]
requestClient ProjectsVersionsGet'{..}
= go _pvgScriptId _pvgVersionNumber _pvgXgafv
_pvgUploadProtocol
_pvgAccessToken
_pvgUploadType
_pvgCallback
(Just AltJSON)
scriptService
where go
= buildClient
(Proxy :: Proxy ProjectsVersionsGetResource)
mempty