{-# 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.List
(
ProjectsVersionsListResource
, projectsVersionsList
, ProjectsVersionsList
, pvlXgafv
, pvlUploadProtocol
, pvlAccessToken
, pvlUploadType
, pvlScriptId
, pvlPageToken
, pvlPageSize
, pvlCallback
) where
import Network.Google.Prelude
import Network.Google.Script.Types
type ProjectsVersionsListResource =
"v1" :>
"projects" :>
Capture "scriptId" Text :>
"versions" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "pageToken" Text :>
QueryParam "pageSize" (Textual Int32) :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] ListVersionsResponse
data ProjectsVersionsList = ProjectsVersionsList'
{ _pvlXgafv :: !(Maybe Xgafv)
, _pvlUploadProtocol :: !(Maybe Text)
, _pvlAccessToken :: !(Maybe Text)
, _pvlUploadType :: !(Maybe Text)
, _pvlScriptId :: !Text
, _pvlPageToken :: !(Maybe Text)
, _pvlPageSize :: !(Maybe (Textual Int32))
, _pvlCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsVersionsList
:: Text
-> ProjectsVersionsList
projectsVersionsList pPvlScriptId_ =
ProjectsVersionsList'
{ _pvlXgafv = Nothing
, _pvlUploadProtocol = Nothing
, _pvlAccessToken = Nothing
, _pvlUploadType = Nothing
, _pvlScriptId = pPvlScriptId_
, _pvlPageToken = Nothing
, _pvlPageSize = Nothing
, _pvlCallback = Nothing
}
pvlXgafv :: Lens' ProjectsVersionsList (Maybe Xgafv)
pvlXgafv = lens _pvlXgafv (\ s a -> s{_pvlXgafv = a})
pvlUploadProtocol :: Lens' ProjectsVersionsList (Maybe Text)
pvlUploadProtocol
= lens _pvlUploadProtocol
(\ s a -> s{_pvlUploadProtocol = a})
pvlAccessToken :: Lens' ProjectsVersionsList (Maybe Text)
pvlAccessToken
= lens _pvlAccessToken
(\ s a -> s{_pvlAccessToken = a})
pvlUploadType :: Lens' ProjectsVersionsList (Maybe Text)
pvlUploadType
= lens _pvlUploadType
(\ s a -> s{_pvlUploadType = a})
pvlScriptId :: Lens' ProjectsVersionsList Text
pvlScriptId
= lens _pvlScriptId (\ s a -> s{_pvlScriptId = a})
pvlPageToken :: Lens' ProjectsVersionsList (Maybe Text)
pvlPageToken
= lens _pvlPageToken (\ s a -> s{_pvlPageToken = a})
pvlPageSize :: Lens' ProjectsVersionsList (Maybe Int32)
pvlPageSize
= lens _pvlPageSize (\ s a -> s{_pvlPageSize = a}) .
mapping _Coerce
pvlCallback :: Lens' ProjectsVersionsList (Maybe Text)
pvlCallback
= lens _pvlCallback (\ s a -> s{_pvlCallback = a})
instance GoogleRequest ProjectsVersionsList where
type Rs ProjectsVersionsList = ListVersionsResponse
type Scopes ProjectsVersionsList =
'["https://www.googleapis.com/auth/script.projects",
"https://www.googleapis.com/auth/script.projects.readonly"]
requestClient ProjectsVersionsList'{..}
= go _pvlScriptId _pvlXgafv _pvlUploadProtocol
_pvlAccessToken
_pvlUploadType
_pvlPageToken
_pvlPageSize
_pvlCallback
(Just AltJSON)
scriptService
where go
= buildClient
(Proxy :: Proxy ProjectsVersionsListResource)
mempty