{-# 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.UpdateLeads
(
UpdateLeadsResource
, updateLeads
, UpdateLeads
, ulXgafv
, ulUploadProtocol
, ulUpdateMask
, ulAccessToken
, ulUploadType
, ulPayload
, ulRequestMetadataPartnersSessionId
, ulRequestMetadataLocale
, ulRequestMetadataExperimentIds
, ulRequestMetadataUserOverridesIPAddress
, ulRequestMetadataTrafficSourceTrafficSubId
, ulRequestMetadataUserOverridesUserId
, ulRequestMetadataTrafficSourceTrafficSourceId
, ulCallback
) where
import Network.Google.Partners.Types
import Network.Google.Prelude
type UpdateLeadsResource =
"v2" :>
"leads" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "updateMask" GFieldMask :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "requestMetadata.partnersSessionId" Text
:>
QueryParam "requestMetadata.locale" Text :>
QueryParams "requestMetadata.experimentIds" Text :>
QueryParam "requestMetadata.userOverrides.ipAddress"
Text
:>
QueryParam
"requestMetadata.trafficSource.trafficSubId"
Text
:>
QueryParam "requestMetadata.userOverrides.userId"
Text
:>
QueryParam
"requestMetadata.trafficSource.trafficSourceId"
Text
:>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Lead :> Patch '[JSON] Lead
data UpdateLeads = UpdateLeads'
{ _ulXgafv :: !(Maybe Xgafv)
, _ulUploadProtocol :: !(Maybe Text)
, _ulUpdateMask :: !(Maybe GFieldMask)
, _ulAccessToken :: !(Maybe Text)
, _ulUploadType :: !(Maybe Text)
, _ulPayload :: !Lead
, _ulRequestMetadataPartnersSessionId :: !(Maybe Text)
, _ulRequestMetadataLocale :: !(Maybe Text)
, _ulRequestMetadataExperimentIds :: !(Maybe [Text])
, _ulRequestMetadataUserOverridesIPAddress :: !(Maybe Text)
, _ulRequestMetadataTrafficSourceTrafficSubId :: !(Maybe Text)
, _ulRequestMetadataUserOverridesUserId :: !(Maybe Text)
, _ulRequestMetadataTrafficSourceTrafficSourceId :: !(Maybe Text)
, _ulCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
updateLeads
:: Lead
-> UpdateLeads
updateLeads pUlPayload_ =
UpdateLeads'
{ _ulXgafv = Nothing
, _ulUploadProtocol = Nothing
, _ulUpdateMask = Nothing
, _ulAccessToken = Nothing
, _ulUploadType = Nothing
, _ulPayload = pUlPayload_
, _ulRequestMetadataPartnersSessionId = Nothing
, _ulRequestMetadataLocale = Nothing
, _ulRequestMetadataExperimentIds = Nothing
, _ulRequestMetadataUserOverridesIPAddress = Nothing
, _ulRequestMetadataTrafficSourceTrafficSubId = Nothing
, _ulRequestMetadataUserOverridesUserId = Nothing
, _ulRequestMetadataTrafficSourceTrafficSourceId = Nothing
, _ulCallback = Nothing
}
ulXgafv :: Lens' UpdateLeads (Maybe Xgafv)
ulXgafv = lens _ulXgafv (\ s a -> s{_ulXgafv = a})
ulUploadProtocol :: Lens' UpdateLeads (Maybe Text)
ulUploadProtocol
= lens _ulUploadProtocol
(\ s a -> s{_ulUploadProtocol = a})
ulUpdateMask :: Lens' UpdateLeads (Maybe GFieldMask)
ulUpdateMask
= lens _ulUpdateMask (\ s a -> s{_ulUpdateMask = a})
ulAccessToken :: Lens' UpdateLeads (Maybe Text)
ulAccessToken
= lens _ulAccessToken
(\ s a -> s{_ulAccessToken = a})
ulUploadType :: Lens' UpdateLeads (Maybe Text)
ulUploadType
= lens _ulUploadType (\ s a -> s{_ulUploadType = a})
ulPayload :: Lens' UpdateLeads Lead
ulPayload
= lens _ulPayload (\ s a -> s{_ulPayload = a})
ulRequestMetadataPartnersSessionId :: Lens' UpdateLeads (Maybe Text)
ulRequestMetadataPartnersSessionId
= lens _ulRequestMetadataPartnersSessionId
(\ s a -> s{_ulRequestMetadataPartnersSessionId = a})
ulRequestMetadataLocale :: Lens' UpdateLeads (Maybe Text)
ulRequestMetadataLocale
= lens _ulRequestMetadataLocale
(\ s a -> s{_ulRequestMetadataLocale = a})
ulRequestMetadataExperimentIds :: Lens' UpdateLeads [Text]
ulRequestMetadataExperimentIds
= lens _ulRequestMetadataExperimentIds
(\ s a -> s{_ulRequestMetadataExperimentIds = a})
. _Default
. _Coerce
ulRequestMetadataUserOverridesIPAddress :: Lens' UpdateLeads (Maybe Text)
ulRequestMetadataUserOverridesIPAddress
= lens _ulRequestMetadataUserOverridesIPAddress
(\ s a ->
s{_ulRequestMetadataUserOverridesIPAddress = a})
ulRequestMetadataTrafficSourceTrafficSubId :: Lens' UpdateLeads (Maybe Text)
ulRequestMetadataTrafficSourceTrafficSubId
= lens _ulRequestMetadataTrafficSourceTrafficSubId
(\ s a ->
s{_ulRequestMetadataTrafficSourceTrafficSubId = a})
ulRequestMetadataUserOverridesUserId :: Lens' UpdateLeads (Maybe Text)
ulRequestMetadataUserOverridesUserId
= lens _ulRequestMetadataUserOverridesUserId
(\ s a ->
s{_ulRequestMetadataUserOverridesUserId = a})
ulRequestMetadataTrafficSourceTrafficSourceId :: Lens' UpdateLeads (Maybe Text)
ulRequestMetadataTrafficSourceTrafficSourceId
= lens _ulRequestMetadataTrafficSourceTrafficSourceId
(\ s a ->
s{_ulRequestMetadataTrafficSourceTrafficSourceId =
a})
ulCallback :: Lens' UpdateLeads (Maybe Text)
ulCallback
= lens _ulCallback (\ s a -> s{_ulCallback = a})
instance GoogleRequest UpdateLeads where
type Rs UpdateLeads = Lead
type Scopes UpdateLeads = '[]
requestClient UpdateLeads'{..}
= go _ulXgafv _ulUploadProtocol _ulUpdateMask
_ulAccessToken
_ulUploadType
_ulRequestMetadataPartnersSessionId
_ulRequestMetadataLocale
(_ulRequestMetadataExperimentIds ^. _Default)
_ulRequestMetadataUserOverridesIPAddress
_ulRequestMetadataTrafficSourceTrafficSubId
_ulRequestMetadataUserOverridesUserId
_ulRequestMetadataTrafficSourceTrafficSourceId
_ulCallback
(Just AltJSON)
_ulPayload
partnersService
where go
= buildClient (Proxy :: Proxy UpdateLeadsResource)
mempty