{-# 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.SourceRepo.Projects.Repos.Patch
(
ProjectsReposPatchResource
, projectsReposPatch
, ProjectsReposPatch
, prpXgafv
, prpUploadProtocol
, prpAccessToken
, prpUploadType
, prpPayload
, prpName
, prpCallback
) where
import Network.Google.Prelude
import Network.Google.SourceRepo.Types
type ProjectsReposPatchResource =
"v1" :>
Capture "name" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] UpdateRepoRequest :>
Patch '[JSON] Repo
data ProjectsReposPatch = ProjectsReposPatch'
{ _prpXgafv :: !(Maybe Xgafv)
, _prpUploadProtocol :: !(Maybe Text)
, _prpAccessToken :: !(Maybe Text)
, _prpUploadType :: !(Maybe Text)
, _prpPayload :: !UpdateRepoRequest
, _prpName :: !Text
, _prpCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsReposPatch
:: UpdateRepoRequest
-> Text
-> ProjectsReposPatch
projectsReposPatch pPrpPayload_ pPrpName_ =
ProjectsReposPatch'
{ _prpXgafv = Nothing
, _prpUploadProtocol = Nothing
, _prpAccessToken = Nothing
, _prpUploadType = Nothing
, _prpPayload = pPrpPayload_
, _prpName = pPrpName_
, _prpCallback = Nothing
}
prpXgafv :: Lens' ProjectsReposPatch (Maybe Xgafv)
prpXgafv = lens _prpXgafv (\ s a -> s{_prpXgafv = a})
prpUploadProtocol :: Lens' ProjectsReposPatch (Maybe Text)
prpUploadProtocol
= lens _prpUploadProtocol
(\ s a -> s{_prpUploadProtocol = a})
prpAccessToken :: Lens' ProjectsReposPatch (Maybe Text)
prpAccessToken
= lens _prpAccessToken
(\ s a -> s{_prpAccessToken = a})
prpUploadType :: Lens' ProjectsReposPatch (Maybe Text)
prpUploadType
= lens _prpUploadType
(\ s a -> s{_prpUploadType = a})
prpPayload :: Lens' ProjectsReposPatch UpdateRepoRequest
prpPayload
= lens _prpPayload (\ s a -> s{_prpPayload = a})
prpName :: Lens' ProjectsReposPatch Text
prpName = lens _prpName (\ s a -> s{_prpName = a})
prpCallback :: Lens' ProjectsReposPatch (Maybe Text)
prpCallback
= lens _prpCallback (\ s a -> s{_prpCallback = a})
instance GoogleRequest ProjectsReposPatch where
type Rs ProjectsReposPatch = Repo
type Scopes ProjectsReposPatch =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsReposPatch'{..}
= go _prpName _prpXgafv _prpUploadProtocol
_prpAccessToken
_prpUploadType
_prpCallback
(Just AltJSON)
_prpPayload
sourceRepoService
where go
= buildClient
(Proxy :: Proxy ProjectsReposPatchResource)
mempty