{-# 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.People.People.UpdateContact
(
PeopleUpdateContactResource
, peopleUpdateContact
, PeopleUpdateContact
, pucXgafv
, pucUploadProtocol
, pucResourceName
, pucUpdatePersonFields
, pucAccessToken
, pucUploadType
, pucPayload
, pucCallback
) where
import Network.Google.People.Types
import Network.Google.Prelude
type PeopleUpdateContactResource =
"v1" :>
CaptureMode "resourceName" "updateContact" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "updatePersonFields" GFieldMask :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Person :> Patch '[JSON] Person
data PeopleUpdateContact = PeopleUpdateContact'
{ _pucXgafv :: !(Maybe Xgafv)
, _pucUploadProtocol :: !(Maybe Text)
, _pucResourceName :: !Text
, _pucUpdatePersonFields :: !(Maybe GFieldMask)
, _pucAccessToken :: !(Maybe Text)
, _pucUploadType :: !(Maybe Text)
, _pucPayload :: !Person
, _pucCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
peopleUpdateContact
:: Text
-> Person
-> PeopleUpdateContact
peopleUpdateContact pPucResourceName_ pPucPayload_ =
PeopleUpdateContact'
{ _pucXgafv = Nothing
, _pucUploadProtocol = Nothing
, _pucResourceName = pPucResourceName_
, _pucUpdatePersonFields = Nothing
, _pucAccessToken = Nothing
, _pucUploadType = Nothing
, _pucPayload = pPucPayload_
, _pucCallback = Nothing
}
pucXgafv :: Lens' PeopleUpdateContact (Maybe Xgafv)
pucXgafv = lens _pucXgafv (\ s a -> s{_pucXgafv = a})
pucUploadProtocol :: Lens' PeopleUpdateContact (Maybe Text)
pucUploadProtocol
= lens _pucUploadProtocol
(\ s a -> s{_pucUploadProtocol = a})
pucResourceName :: Lens' PeopleUpdateContact Text
pucResourceName
= lens _pucResourceName
(\ s a -> s{_pucResourceName = a})
pucUpdatePersonFields :: Lens' PeopleUpdateContact (Maybe GFieldMask)
pucUpdatePersonFields
= lens _pucUpdatePersonFields
(\ s a -> s{_pucUpdatePersonFields = a})
pucAccessToken :: Lens' PeopleUpdateContact (Maybe Text)
pucAccessToken
= lens _pucAccessToken
(\ s a -> s{_pucAccessToken = a})
pucUploadType :: Lens' PeopleUpdateContact (Maybe Text)
pucUploadType
= lens _pucUploadType
(\ s a -> s{_pucUploadType = a})
pucPayload :: Lens' PeopleUpdateContact Person
pucPayload
= lens _pucPayload (\ s a -> s{_pucPayload = a})
pucCallback :: Lens' PeopleUpdateContact (Maybe Text)
pucCallback
= lens _pucCallback (\ s a -> s{_pucCallback = a})
instance GoogleRequest PeopleUpdateContact where
type Rs PeopleUpdateContact = Person
type Scopes PeopleUpdateContact =
'["https://www.googleapis.com/auth/contacts"]
requestClient PeopleUpdateContact'{..}
= go _pucResourceName _pucXgafv _pucUploadProtocol
_pucUpdatePersonFields
_pucAccessToken
_pucUploadType
_pucCallback
(Just AltJSON)
_pucPayload
peopleService
where go
= buildClient
(Proxy :: Proxy PeopleUpdateContactResource)
mempty