{-# 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.BatchGet
(
ContactGroupsBatchGetResource
, contactGroupsBatchGet
, ContactGroupsBatchGet
, cgbgXgafv
, cgbgMaxMembers
, cgbgUploadProtocol
, cgbgAccessToken
, cgbgUploadType
, cgbgResourceNames
, cgbgCallback
) where
import Network.Google.People.Types
import Network.Google.Prelude
type ContactGroupsBatchGetResource =
"v1" :>
"contactGroups:batchGet" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "maxMembers" (Textual Int32) :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParams "resourceNames" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] BatchGetContactGroupsResponse
data ContactGroupsBatchGet = ContactGroupsBatchGet'
{ _cgbgXgafv :: !(Maybe Xgafv)
, _cgbgMaxMembers :: !(Maybe (Textual Int32))
, _cgbgUploadProtocol :: !(Maybe Text)
, _cgbgAccessToken :: !(Maybe Text)
, _cgbgUploadType :: !(Maybe Text)
, _cgbgResourceNames :: !(Maybe [Text])
, _cgbgCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
contactGroupsBatchGet
:: ContactGroupsBatchGet
contactGroupsBatchGet =
ContactGroupsBatchGet'
{ _cgbgXgafv = Nothing
, _cgbgMaxMembers = Nothing
, _cgbgUploadProtocol = Nothing
, _cgbgAccessToken = Nothing
, _cgbgUploadType = Nothing
, _cgbgResourceNames = Nothing
, _cgbgCallback = Nothing
}
cgbgXgafv :: Lens' ContactGroupsBatchGet (Maybe Xgafv)
cgbgXgafv
= lens _cgbgXgafv (\ s a -> s{_cgbgXgafv = a})
cgbgMaxMembers :: Lens' ContactGroupsBatchGet (Maybe Int32)
cgbgMaxMembers
= lens _cgbgMaxMembers
(\ s a -> s{_cgbgMaxMembers = a})
. mapping _Coerce
cgbgUploadProtocol :: Lens' ContactGroupsBatchGet (Maybe Text)
cgbgUploadProtocol
= lens _cgbgUploadProtocol
(\ s a -> s{_cgbgUploadProtocol = a})
cgbgAccessToken :: Lens' ContactGroupsBatchGet (Maybe Text)
cgbgAccessToken
= lens _cgbgAccessToken
(\ s a -> s{_cgbgAccessToken = a})
cgbgUploadType :: Lens' ContactGroupsBatchGet (Maybe Text)
cgbgUploadType
= lens _cgbgUploadType
(\ s a -> s{_cgbgUploadType = a})
cgbgResourceNames :: Lens' ContactGroupsBatchGet [Text]
cgbgResourceNames
= lens _cgbgResourceNames
(\ s a -> s{_cgbgResourceNames = a})
. _Default
. _Coerce
cgbgCallback :: Lens' ContactGroupsBatchGet (Maybe Text)
cgbgCallback
= lens _cgbgCallback (\ s a -> s{_cgbgCallback = a})
instance GoogleRequest ContactGroupsBatchGet where
type Rs ContactGroupsBatchGet =
BatchGetContactGroupsResponse
type Scopes ContactGroupsBatchGet =
'["https://www.googleapis.com/auth/contacts",
"https://www.googleapis.com/auth/contacts.readonly"]
requestClient ContactGroupsBatchGet'{..}
= go _cgbgXgafv _cgbgMaxMembers _cgbgUploadProtocol
_cgbgAccessToken
_cgbgUploadType
(_cgbgResourceNames ^. _Default)
_cgbgCallback
(Just AltJSON)
peopleService
where go
= buildClient
(Proxy :: Proxy ContactGroupsBatchGetResource)
mempty