{-# 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.List
(
ContactGroupsListResource
, contactGroupsList
, ContactGroupsList
, cglSyncToken
, cglXgafv
, cglUploadProtocol
, cglAccessToken
, cglUploadType
, cglPageToken
, cglPageSize
, cglCallback
) where
import Network.Google.People.Types
import Network.Google.Prelude
type ContactGroupsListResource =
"v1" :>
"contactGroups" :>
QueryParam "syncToken" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "pageToken" Text :>
QueryParam "pageSize" (Textual Int32) :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] ListContactGroupsResponse
data ContactGroupsList = ContactGroupsList'
{ _cglSyncToken :: !(Maybe Text)
, _cglXgafv :: !(Maybe Xgafv)
, _cglUploadProtocol :: !(Maybe Text)
, _cglAccessToken :: !(Maybe Text)
, _cglUploadType :: !(Maybe Text)
, _cglPageToken :: !(Maybe Text)
, _cglPageSize :: !(Maybe (Textual Int32))
, _cglCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
contactGroupsList
:: ContactGroupsList
contactGroupsList =
ContactGroupsList'
{ _cglSyncToken = Nothing
, _cglXgafv = Nothing
, _cglUploadProtocol = Nothing
, _cglAccessToken = Nothing
, _cglUploadType = Nothing
, _cglPageToken = Nothing
, _cglPageSize = Nothing
, _cglCallback = Nothing
}
cglSyncToken :: Lens' ContactGroupsList (Maybe Text)
cglSyncToken
= lens _cglSyncToken (\ s a -> s{_cglSyncToken = a})
cglXgafv :: Lens' ContactGroupsList (Maybe Xgafv)
cglXgafv = lens _cglXgafv (\ s a -> s{_cglXgafv = a})
cglUploadProtocol :: Lens' ContactGroupsList (Maybe Text)
cglUploadProtocol
= lens _cglUploadProtocol
(\ s a -> s{_cglUploadProtocol = a})
cglAccessToken :: Lens' ContactGroupsList (Maybe Text)
cglAccessToken
= lens _cglAccessToken
(\ s a -> s{_cglAccessToken = a})
cglUploadType :: Lens' ContactGroupsList (Maybe Text)
cglUploadType
= lens _cglUploadType
(\ s a -> s{_cglUploadType = a})
cglPageToken :: Lens' ContactGroupsList (Maybe Text)
cglPageToken
= lens _cglPageToken (\ s a -> s{_cglPageToken = a})
cglPageSize :: Lens' ContactGroupsList (Maybe Int32)
cglPageSize
= lens _cglPageSize (\ s a -> s{_cglPageSize = a}) .
mapping _Coerce
cglCallback :: Lens' ContactGroupsList (Maybe Text)
cglCallback
= lens _cglCallback (\ s a -> s{_cglCallback = a})
instance GoogleRequest ContactGroupsList where
type Rs ContactGroupsList = ListContactGroupsResponse
type Scopes ContactGroupsList =
'["https://www.googleapis.com/auth/contacts",
"https://www.googleapis.com/auth/contacts.readonly"]
requestClient ContactGroupsList'{..}
= go _cglSyncToken _cglXgafv _cglUploadProtocol
_cglAccessToken
_cglUploadType
_cglPageToken
_cglPageSize
_cglCallback
(Just AltJSON)
peopleService
where go
= buildClient
(Proxy :: Proxy ContactGroupsListResource)
mempty