{-# 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.Delete
(
ContactGroupsDeleteResource
, contactGroupsDelete
, ContactGroupsDelete
, cgdXgafv
, cgdUploadProtocol
, cgdDeleteContacts
, cgdResourceName
, cgdAccessToken
, cgdUploadType
, cgdCallback
) where
import Network.Google.People.Types
import Network.Google.Prelude
type ContactGroupsDeleteResource =
"v1" :>
Capture "resourceName" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "deleteContacts" Bool :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :> Delete '[JSON] Empty
data ContactGroupsDelete = ContactGroupsDelete'
{ _cgdXgafv :: !(Maybe Xgafv)
, _cgdUploadProtocol :: !(Maybe Text)
, _cgdDeleteContacts :: !(Maybe Bool)
, _cgdResourceName :: !Text
, _cgdAccessToken :: !(Maybe Text)
, _cgdUploadType :: !(Maybe Text)
, _cgdCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
contactGroupsDelete
:: Text
-> ContactGroupsDelete
contactGroupsDelete pCgdResourceName_ =
ContactGroupsDelete'
{ _cgdXgafv = Nothing
, _cgdUploadProtocol = Nothing
, _cgdDeleteContacts = Nothing
, _cgdResourceName = pCgdResourceName_
, _cgdAccessToken = Nothing
, _cgdUploadType = Nothing
, _cgdCallback = Nothing
}
cgdXgafv :: Lens' ContactGroupsDelete (Maybe Xgafv)
cgdXgafv = lens _cgdXgafv (\ s a -> s{_cgdXgafv = a})
cgdUploadProtocol :: Lens' ContactGroupsDelete (Maybe Text)
cgdUploadProtocol
= lens _cgdUploadProtocol
(\ s a -> s{_cgdUploadProtocol = a})
cgdDeleteContacts :: Lens' ContactGroupsDelete (Maybe Bool)
cgdDeleteContacts
= lens _cgdDeleteContacts
(\ s a -> s{_cgdDeleteContacts = a})
cgdResourceName :: Lens' ContactGroupsDelete Text
cgdResourceName
= lens _cgdResourceName
(\ s a -> s{_cgdResourceName = a})
cgdAccessToken :: Lens' ContactGroupsDelete (Maybe Text)
cgdAccessToken
= lens _cgdAccessToken
(\ s a -> s{_cgdAccessToken = a})
cgdUploadType :: Lens' ContactGroupsDelete (Maybe Text)
cgdUploadType
= lens _cgdUploadType
(\ s a -> s{_cgdUploadType = a})
cgdCallback :: Lens' ContactGroupsDelete (Maybe Text)
cgdCallback
= lens _cgdCallback (\ s a -> s{_cgdCallback = a})
instance GoogleRequest ContactGroupsDelete where
type Rs ContactGroupsDelete = Empty
type Scopes ContactGroupsDelete =
'["https://www.googleapis.com/auth/contacts"]
requestClient ContactGroupsDelete'{..}
= go _cgdResourceName _cgdXgafv _cgdUploadProtocol
_cgdDeleteContacts
_cgdAccessToken
_cgdUploadType
_cgdCallback
(Just AltJSON)
peopleService
where go
= buildClient
(Proxy :: Proxy ContactGroupsDeleteResource)
mempty