{-# 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.Create
(
ProjectsReposCreateResource
, projectsReposCreate
, ProjectsReposCreate
, prcParent
, prcXgafv
, prcUploadProtocol
, prcAccessToken
, prcUploadType
, prcPayload
, prcCallback
) where
import Network.Google.Prelude
import Network.Google.SourceRepo.Types
type ProjectsReposCreateResource =
"v1" :>
Capture "parent" Text :>
"repos" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Repo :> Post '[JSON] Repo
data ProjectsReposCreate = ProjectsReposCreate'
{ _prcParent :: !Text
, _prcXgafv :: !(Maybe Xgafv)
, _prcUploadProtocol :: !(Maybe Text)
, _prcAccessToken :: !(Maybe Text)
, _prcUploadType :: !(Maybe Text)
, _prcPayload :: !Repo
, _prcCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsReposCreate
:: Text
-> Repo
-> ProjectsReposCreate
projectsReposCreate pPrcParent_ pPrcPayload_ =
ProjectsReposCreate'
{ _prcParent = pPrcParent_
, _prcXgafv = Nothing
, _prcUploadProtocol = Nothing
, _prcAccessToken = Nothing
, _prcUploadType = Nothing
, _prcPayload = pPrcPayload_
, _prcCallback = Nothing
}
prcParent :: Lens' ProjectsReposCreate Text
prcParent
= lens _prcParent (\ s a -> s{_prcParent = a})
prcXgafv :: Lens' ProjectsReposCreate (Maybe Xgafv)
prcXgafv = lens _prcXgafv (\ s a -> s{_prcXgafv = a})
prcUploadProtocol :: Lens' ProjectsReposCreate (Maybe Text)
prcUploadProtocol
= lens _prcUploadProtocol
(\ s a -> s{_prcUploadProtocol = a})
prcAccessToken :: Lens' ProjectsReposCreate (Maybe Text)
prcAccessToken
= lens _prcAccessToken
(\ s a -> s{_prcAccessToken = a})
prcUploadType :: Lens' ProjectsReposCreate (Maybe Text)
prcUploadType
= lens _prcUploadType
(\ s a -> s{_prcUploadType = a})
prcPayload :: Lens' ProjectsReposCreate Repo
prcPayload
= lens _prcPayload (\ s a -> s{_prcPayload = a})
prcCallback :: Lens' ProjectsReposCreate (Maybe Text)
prcCallback
= lens _prcCallback (\ s a -> s{_prcCallback = a})
instance GoogleRequest ProjectsReposCreate where
type Rs ProjectsReposCreate = Repo
type Scopes ProjectsReposCreate =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/source.full_control"]
requestClient ProjectsReposCreate'{..}
= go _prcParent _prcXgafv _prcUploadProtocol
_prcAccessToken
_prcUploadType
_prcCallback
(Just AltJSON)
_prcPayload
sourceRepoService
where go
= buildClient
(Proxy :: Proxy ProjectsReposCreateResource)
mempty