{-# 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.Partners.Companies.Leads.Create
(
CompaniesLeadsCreateResource
, companiesLeadsCreate
, CompaniesLeadsCreate
, clcXgafv
, clcUploadProtocol
, clcCompanyId
, clcAccessToken
, clcUploadType
, clcPayload
, clcCallback
) where
import Network.Google.Partners.Types
import Network.Google.Prelude
type CompaniesLeadsCreateResource =
"v2" :>
"companies" :>
Capture "companyId" Text :>
"leads" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] CreateLeadRequest :>
Post '[JSON] CreateLeadResponse
data CompaniesLeadsCreate = CompaniesLeadsCreate'
{ _clcXgafv :: !(Maybe Xgafv)
, _clcUploadProtocol :: !(Maybe Text)
, _clcCompanyId :: !Text
, _clcAccessToken :: !(Maybe Text)
, _clcUploadType :: !(Maybe Text)
, _clcPayload :: !CreateLeadRequest
, _clcCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
companiesLeadsCreate
:: Text
-> CreateLeadRequest
-> CompaniesLeadsCreate
companiesLeadsCreate pClcCompanyId_ pClcPayload_ =
CompaniesLeadsCreate'
{ _clcXgafv = Nothing
, _clcUploadProtocol = Nothing
, _clcCompanyId = pClcCompanyId_
, _clcAccessToken = Nothing
, _clcUploadType = Nothing
, _clcPayload = pClcPayload_
, _clcCallback = Nothing
}
clcXgafv :: Lens' CompaniesLeadsCreate (Maybe Xgafv)
clcXgafv = lens _clcXgafv (\ s a -> s{_clcXgafv = a})
clcUploadProtocol :: Lens' CompaniesLeadsCreate (Maybe Text)
clcUploadProtocol
= lens _clcUploadProtocol
(\ s a -> s{_clcUploadProtocol = a})
clcCompanyId :: Lens' CompaniesLeadsCreate Text
clcCompanyId
= lens _clcCompanyId (\ s a -> s{_clcCompanyId = a})
clcAccessToken :: Lens' CompaniesLeadsCreate (Maybe Text)
clcAccessToken
= lens _clcAccessToken
(\ s a -> s{_clcAccessToken = a})
clcUploadType :: Lens' CompaniesLeadsCreate (Maybe Text)
clcUploadType
= lens _clcUploadType
(\ s a -> s{_clcUploadType = a})
clcPayload :: Lens' CompaniesLeadsCreate CreateLeadRequest
clcPayload
= lens _clcPayload (\ s a -> s{_clcPayload = a})
clcCallback :: Lens' CompaniesLeadsCreate (Maybe Text)
clcCallback
= lens _clcCallback (\ s a -> s{_clcCallback = a})
instance GoogleRequest CompaniesLeadsCreate where
type Rs CompaniesLeadsCreate = CreateLeadResponse
type Scopes CompaniesLeadsCreate = '[]
requestClient CompaniesLeadsCreate'{..}
= go _clcCompanyId _clcXgafv _clcUploadProtocol
_clcAccessToken
_clcUploadType
_clcCallback
(Just AltJSON)
_clcPayload
partnersService
where go
= buildClient
(Proxy :: Proxy CompaniesLeadsCreateResource)
mempty