{-# 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.UpdateContent
(
ProjectsUpdateContentResource
, projectsUpdateContent
, ProjectsUpdateContent
, pucXgafv
, pucUploadProtocol
, pucAccessToken
, pucUploadType
, pucPayload
, pucScriptId
, pucCallback
) where
import Network.Google.Prelude
import Network.Google.Script.Types
type ProjectsUpdateContentResource =
"v1" :>
"projects" :>
Capture "scriptId" Text :>
"content" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Content :> Put '[JSON] Content
data ProjectsUpdateContent = ProjectsUpdateContent'
{ _pucXgafv :: !(Maybe Xgafv)
, _pucUploadProtocol :: !(Maybe Text)
, _pucAccessToken :: !(Maybe Text)
, _pucUploadType :: !(Maybe Text)
, _pucPayload :: !Content
, _pucScriptId :: !Text
, _pucCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsUpdateContent
:: Content
-> Text
-> ProjectsUpdateContent
projectsUpdateContent pPucPayload_ pPucScriptId_ =
ProjectsUpdateContent'
{ _pucXgafv = Nothing
, _pucUploadProtocol = Nothing
, _pucAccessToken = Nothing
, _pucUploadType = Nothing
, _pucPayload = pPucPayload_
, _pucScriptId = pPucScriptId_
, _pucCallback = Nothing
}
pucXgafv :: Lens' ProjectsUpdateContent (Maybe Xgafv)
pucXgafv = lens _pucXgafv (\ s a -> s{_pucXgafv = a})
pucUploadProtocol :: Lens' ProjectsUpdateContent (Maybe Text)
pucUploadProtocol
= lens _pucUploadProtocol
(\ s a -> s{_pucUploadProtocol = a})
pucAccessToken :: Lens' ProjectsUpdateContent (Maybe Text)
pucAccessToken
= lens _pucAccessToken
(\ s a -> s{_pucAccessToken = a})
pucUploadType :: Lens' ProjectsUpdateContent (Maybe Text)
pucUploadType
= lens _pucUploadType
(\ s a -> s{_pucUploadType = a})
pucPayload :: Lens' ProjectsUpdateContent Content
pucPayload
= lens _pucPayload (\ s a -> s{_pucPayload = a})
pucScriptId :: Lens' ProjectsUpdateContent Text
pucScriptId
= lens _pucScriptId (\ s a -> s{_pucScriptId = a})
pucCallback :: Lens' ProjectsUpdateContent (Maybe Text)
pucCallback
= lens _pucCallback (\ s a -> s{_pucCallback = a})
instance GoogleRequest ProjectsUpdateContent where
type Rs ProjectsUpdateContent = Content
type Scopes ProjectsUpdateContent =
'["https://www.googleapis.com/auth/script.projects"]
requestClient ProjectsUpdateContent'{..}
= go _pucScriptId _pucXgafv _pucUploadProtocol
_pucAccessToken
_pucUploadType
_pucCallback
(Just AltJSON)
_pucPayload
scriptService
where go
= buildClient
(Proxy :: Proxy ProjectsUpdateContentResource)
mempty