{-# 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.Jobs.Projects.Companies.Create
(
ProjectsCompaniesCreateResource
, projectsCompaniesCreate
, ProjectsCompaniesCreate
, pccParent
, pccXgafv
, pccUploadProtocol
, pccAccessToken
, pccUploadType
, pccPayload
, pccCallback
) where
import Network.Google.Jobs.Types
import Network.Google.Prelude
type ProjectsCompaniesCreateResource =
"v3p1beta1" :>
Capture "parent" Text :>
"companies" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] CreateCompanyRequest :>
Post '[JSON] Company
data ProjectsCompaniesCreate = ProjectsCompaniesCreate'
{ _pccParent :: !Text
, _pccXgafv :: !(Maybe Xgafv)
, _pccUploadProtocol :: !(Maybe Text)
, _pccAccessToken :: !(Maybe Text)
, _pccUploadType :: !(Maybe Text)
, _pccPayload :: !CreateCompanyRequest
, _pccCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsCompaniesCreate
:: Text
-> CreateCompanyRequest
-> ProjectsCompaniesCreate
projectsCompaniesCreate pPccParent_ pPccPayload_ =
ProjectsCompaniesCreate'
{ _pccParent = pPccParent_
, _pccXgafv = Nothing
, _pccUploadProtocol = Nothing
, _pccAccessToken = Nothing
, _pccUploadType = Nothing
, _pccPayload = pPccPayload_
, _pccCallback = Nothing
}
pccParent :: Lens' ProjectsCompaniesCreate Text
pccParent
= lens _pccParent (\ s a -> s{_pccParent = a})
pccXgafv :: Lens' ProjectsCompaniesCreate (Maybe Xgafv)
pccXgafv = lens _pccXgafv (\ s a -> s{_pccXgafv = a})
pccUploadProtocol :: Lens' ProjectsCompaniesCreate (Maybe Text)
pccUploadProtocol
= lens _pccUploadProtocol
(\ s a -> s{_pccUploadProtocol = a})
pccAccessToken :: Lens' ProjectsCompaniesCreate (Maybe Text)
pccAccessToken
= lens _pccAccessToken
(\ s a -> s{_pccAccessToken = a})
pccUploadType :: Lens' ProjectsCompaniesCreate (Maybe Text)
pccUploadType
= lens _pccUploadType
(\ s a -> s{_pccUploadType = a})
pccPayload :: Lens' ProjectsCompaniesCreate CreateCompanyRequest
pccPayload
= lens _pccPayload (\ s a -> s{_pccPayload = a})
pccCallback :: Lens' ProjectsCompaniesCreate (Maybe Text)
pccCallback
= lens _pccCallback (\ s a -> s{_pccCallback = a})
instance GoogleRequest ProjectsCompaniesCreate where
type Rs ProjectsCompaniesCreate = Company
type Scopes ProjectsCompaniesCreate =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/jobs"]
requestClient ProjectsCompaniesCreate'{..}
= go _pccParent _pccXgafv _pccUploadProtocol
_pccAccessToken
_pccUploadType
_pccCallback
(Just AltJSON)
_pccPayload
jobsService
where go
= buildClient
(Proxy :: Proxy ProjectsCompaniesCreateResource)
mempty