{-# 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.ContactGroups.Update
(
ContactGroupsUpdateResource
, contactGroupsUpdate
, ContactGroupsUpdate
, cguXgafv
, cguUploadProtocol
, cguResourceName
, cguAccessToken
, cguUploadType
, cguPayload
, cguCallback
) where
import Network.Google.People.Types
import Network.Google.Prelude
type ContactGroupsUpdateResource =
"v1" :>
Capture "resourceName" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] UpdateContactGroupRequest :>
Put '[JSON] ContactGroup
data ContactGroupsUpdate = ContactGroupsUpdate'
{ _cguXgafv :: !(Maybe Xgafv)
, _cguUploadProtocol :: !(Maybe Text)
, _cguResourceName :: !Text
, _cguAccessToken :: !(Maybe Text)
, _cguUploadType :: !(Maybe Text)
, _cguPayload :: !UpdateContactGroupRequest
, _cguCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
contactGroupsUpdate
:: Text
-> UpdateContactGroupRequest
-> ContactGroupsUpdate
contactGroupsUpdate pCguResourceName_ pCguPayload_ =
ContactGroupsUpdate'
{ _cguXgafv = Nothing
, _cguUploadProtocol = Nothing
, _cguResourceName = pCguResourceName_
, _cguAccessToken = Nothing
, _cguUploadType = Nothing
, _cguPayload = pCguPayload_
, _cguCallback = Nothing
}
cguXgafv :: Lens' ContactGroupsUpdate (Maybe Xgafv)
cguXgafv = lens _cguXgafv (\ s a -> s{_cguXgafv = a})
cguUploadProtocol :: Lens' ContactGroupsUpdate (Maybe Text)
cguUploadProtocol
= lens _cguUploadProtocol
(\ s a -> s{_cguUploadProtocol = a})
cguResourceName :: Lens' ContactGroupsUpdate Text
cguResourceName
= lens _cguResourceName
(\ s a -> s{_cguResourceName = a})
cguAccessToken :: Lens' ContactGroupsUpdate (Maybe Text)
cguAccessToken
= lens _cguAccessToken
(\ s a -> s{_cguAccessToken = a})
cguUploadType :: Lens' ContactGroupsUpdate (Maybe Text)
cguUploadType
= lens _cguUploadType
(\ s a -> s{_cguUploadType = a})
cguPayload :: Lens' ContactGroupsUpdate UpdateContactGroupRequest
cguPayload
= lens _cguPayload (\ s a -> s{_cguPayload = a})
cguCallback :: Lens' ContactGroupsUpdate (Maybe Text)
cguCallback
= lens _cguCallback (\ s a -> s{_cguCallback = a})
instance GoogleRequest ContactGroupsUpdate where
type Rs ContactGroupsUpdate = ContactGroup
type Scopes ContactGroupsUpdate =
'["https://www.googleapis.com/auth/contacts"]
requestClient ContactGroupsUpdate'{..}
= go _cguResourceName _cguXgafv _cguUploadProtocol
_cguAccessToken
_cguUploadType
_cguCallback
(Just AltJSON)
_cguPayload
peopleService
where go
= buildClient
(Proxy :: Proxy ContactGroupsUpdateResource)
mempty