{-# 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.Get
(
ProjectsGetResource
, projectsGet
, ProjectsGet
, pgXgafv
, pgUploadProtocol
, pgAccessToken
, pgUploadType
, pgScriptId
, pgCallback
) where
import Network.Google.Prelude
import Network.Google.Script.Types
type ProjectsGetResource =
"v1" :>
"projects" :>
Capture "scriptId" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Project
data ProjectsGet = ProjectsGet'
{ _pgXgafv :: !(Maybe Xgafv)
, _pgUploadProtocol :: !(Maybe Text)
, _pgAccessToken :: !(Maybe Text)
, _pgUploadType :: !(Maybe Text)
, _pgScriptId :: !Text
, _pgCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsGet
:: Text
-> ProjectsGet
projectsGet pPgScriptId_ =
ProjectsGet'
{ _pgXgafv = Nothing
, _pgUploadProtocol = Nothing
, _pgAccessToken = Nothing
, _pgUploadType = Nothing
, _pgScriptId = pPgScriptId_
, _pgCallback = Nothing
}
pgXgafv :: Lens' ProjectsGet (Maybe Xgafv)
pgXgafv = lens _pgXgafv (\ s a -> s{_pgXgafv = a})
pgUploadProtocol :: Lens' ProjectsGet (Maybe Text)
pgUploadProtocol
= lens _pgUploadProtocol
(\ s a -> s{_pgUploadProtocol = a})
pgAccessToken :: Lens' ProjectsGet (Maybe Text)
pgAccessToken
= lens _pgAccessToken
(\ s a -> s{_pgAccessToken = a})
pgUploadType :: Lens' ProjectsGet (Maybe Text)
pgUploadType
= lens _pgUploadType (\ s a -> s{_pgUploadType = a})
pgScriptId :: Lens' ProjectsGet Text
pgScriptId
= lens _pgScriptId (\ s a -> s{_pgScriptId = a})
pgCallback :: Lens' ProjectsGet (Maybe Text)
pgCallback
= lens _pgCallback (\ s a -> s{_pgCallback = a})
instance GoogleRequest ProjectsGet where
type Rs ProjectsGet = Project
type Scopes ProjectsGet =
'["https://www.googleapis.com/auth/script.projects",
"https://www.googleapis.com/auth/script.projects.readonly"]
requestClient ProjectsGet'{..}
= go _pgScriptId _pgXgafv _pgUploadProtocol
_pgAccessToken
_pgUploadType
_pgCallback
(Just AltJSON)
scriptService
where go
= buildClient (Proxy :: Proxy ProjectsGetResource)
mempty