{-# 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.Users.UpdateProFile
(
UsersUpdateProFileResource
, usersUpdateProFile
, UsersUpdateProFile
, uupfXgafv
, uupfUploadProtocol
, uupfAccessToken
, uupfUploadType
, uupfPayload
, uupfRequestMetadataPartnersSessionId
, uupfRequestMetadataLocale
, uupfRequestMetadataExperimentIds
, uupfRequestMetadataUserOverridesIPAddress
, uupfRequestMetadataTrafficSourceTrafficSubId
, uupfRequestMetadataUserOverridesUserId
, uupfRequestMetadataTrafficSourceTrafficSourceId
, uupfCallback
) where
import Network.Google.Partners.Types
import Network.Google.Prelude
type UsersUpdateProFileResource =
"v2" :>
"users" :>
"profile" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
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] UserProFile :>
Patch '[JSON] UserProFile
data UsersUpdateProFile = UsersUpdateProFile'
{ _uupfXgafv :: !(Maybe Xgafv)
, _uupfUploadProtocol :: !(Maybe Text)
, _uupfAccessToken :: !(Maybe Text)
, _uupfUploadType :: !(Maybe Text)
, _uupfPayload :: !UserProFile
, _uupfRequestMetadataPartnersSessionId :: !(Maybe Text)
, _uupfRequestMetadataLocale :: !(Maybe Text)
, _uupfRequestMetadataExperimentIds :: !(Maybe [Text])
, _uupfRequestMetadataUserOverridesIPAddress :: !(Maybe Text)
, _uupfRequestMetadataTrafficSourceTrafficSubId :: !(Maybe Text)
, _uupfRequestMetadataUserOverridesUserId :: !(Maybe Text)
, _uupfRequestMetadataTrafficSourceTrafficSourceId :: !(Maybe Text)
, _uupfCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
usersUpdateProFile
:: UserProFile
-> UsersUpdateProFile
usersUpdateProFile pUupfPayload_ =
UsersUpdateProFile'
{ _uupfXgafv = Nothing
, _uupfUploadProtocol = Nothing
, _uupfAccessToken = Nothing
, _uupfUploadType = Nothing
, _uupfPayload = pUupfPayload_
, _uupfRequestMetadataPartnersSessionId = Nothing
, _uupfRequestMetadataLocale = Nothing
, _uupfRequestMetadataExperimentIds = Nothing
, _uupfRequestMetadataUserOverridesIPAddress = Nothing
, _uupfRequestMetadataTrafficSourceTrafficSubId = Nothing
, _uupfRequestMetadataUserOverridesUserId = Nothing
, _uupfRequestMetadataTrafficSourceTrafficSourceId = Nothing
, _uupfCallback = Nothing
}
uupfXgafv :: Lens' UsersUpdateProFile (Maybe Xgafv)
uupfXgafv
= lens _uupfXgafv (\ s a -> s{_uupfXgafv = a})
uupfUploadProtocol :: Lens' UsersUpdateProFile (Maybe Text)
uupfUploadProtocol
= lens _uupfUploadProtocol
(\ s a -> s{_uupfUploadProtocol = a})
uupfAccessToken :: Lens' UsersUpdateProFile (Maybe Text)
uupfAccessToken
= lens _uupfAccessToken
(\ s a -> s{_uupfAccessToken = a})
uupfUploadType :: Lens' UsersUpdateProFile (Maybe Text)
uupfUploadType
= lens _uupfUploadType
(\ s a -> s{_uupfUploadType = a})
uupfPayload :: Lens' UsersUpdateProFile UserProFile
uupfPayload
= lens _uupfPayload (\ s a -> s{_uupfPayload = a})
uupfRequestMetadataPartnersSessionId :: Lens' UsersUpdateProFile (Maybe Text)
uupfRequestMetadataPartnersSessionId
= lens _uupfRequestMetadataPartnersSessionId
(\ s a ->
s{_uupfRequestMetadataPartnersSessionId = a})
uupfRequestMetadataLocale :: Lens' UsersUpdateProFile (Maybe Text)
uupfRequestMetadataLocale
= lens _uupfRequestMetadataLocale
(\ s a -> s{_uupfRequestMetadataLocale = a})
uupfRequestMetadataExperimentIds :: Lens' UsersUpdateProFile [Text]
uupfRequestMetadataExperimentIds
= lens _uupfRequestMetadataExperimentIds
(\ s a -> s{_uupfRequestMetadataExperimentIds = a})
. _Default
. _Coerce
uupfRequestMetadataUserOverridesIPAddress :: Lens' UsersUpdateProFile (Maybe Text)
uupfRequestMetadataUserOverridesIPAddress
= lens _uupfRequestMetadataUserOverridesIPAddress
(\ s a ->
s{_uupfRequestMetadataUserOverridesIPAddress = a})
uupfRequestMetadataTrafficSourceTrafficSubId :: Lens' UsersUpdateProFile (Maybe Text)
uupfRequestMetadataTrafficSourceTrafficSubId
= lens _uupfRequestMetadataTrafficSourceTrafficSubId
(\ s a ->
s{_uupfRequestMetadataTrafficSourceTrafficSubId = a})
uupfRequestMetadataUserOverridesUserId :: Lens' UsersUpdateProFile (Maybe Text)
uupfRequestMetadataUserOverridesUserId
= lens _uupfRequestMetadataUserOverridesUserId
(\ s a ->
s{_uupfRequestMetadataUserOverridesUserId = a})
uupfRequestMetadataTrafficSourceTrafficSourceId :: Lens' UsersUpdateProFile (Maybe Text)
uupfRequestMetadataTrafficSourceTrafficSourceId
= lens
_uupfRequestMetadataTrafficSourceTrafficSourceId
(\ s a ->
s{_uupfRequestMetadataTrafficSourceTrafficSourceId =
a})
uupfCallback :: Lens' UsersUpdateProFile (Maybe Text)
uupfCallback
= lens _uupfCallback (\ s a -> s{_uupfCallback = a})
instance GoogleRequest UsersUpdateProFile where
type Rs UsersUpdateProFile = UserProFile
type Scopes UsersUpdateProFile = '[]
requestClient UsersUpdateProFile'{..}
= go _uupfXgafv _uupfUploadProtocol _uupfAccessToken
_uupfUploadType
_uupfRequestMetadataPartnersSessionId
_uupfRequestMetadataLocale
(_uupfRequestMetadataExperimentIds ^. _Default)
_uupfRequestMetadataUserOverridesIPAddress
_uupfRequestMetadataTrafficSourceTrafficSubId
_uupfRequestMetadataUserOverridesUserId
_uupfRequestMetadataTrafficSourceTrafficSourceId
_uupfCallback
(Just AltJSON)
_uupfPayload
partnersService
where go
= buildClient
(Proxy :: Proxy UsersUpdateProFileResource)
mempty