{-# 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.Get
(
ContactGroupsGetResource
, contactGroupsGet
, ContactGroupsGet
, cggXgafv
, cggMaxMembers
, cggUploadProtocol
, cggResourceName
, cggAccessToken
, cggUploadType
, cggCallback
) where
import Network.Google.People.Types
import Network.Google.Prelude
type ContactGroupsGetResource =
"v1" :>
Capture "resourceName" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "maxMembers" (Textual Int32) :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] ContactGroup
data ContactGroupsGet = ContactGroupsGet'
{ _cggXgafv :: !(Maybe Xgafv)
, _cggMaxMembers :: !(Maybe (Textual Int32))
, _cggUploadProtocol :: !(Maybe Text)
, _cggResourceName :: !Text
, _cggAccessToken :: !(Maybe Text)
, _cggUploadType :: !(Maybe Text)
, _cggCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
contactGroupsGet
:: Text
-> ContactGroupsGet
contactGroupsGet pCggResourceName_ =
ContactGroupsGet'
{ _cggXgafv = Nothing
, _cggMaxMembers = Nothing
, _cggUploadProtocol = Nothing
, _cggResourceName = pCggResourceName_
, _cggAccessToken = Nothing
, _cggUploadType = Nothing
, _cggCallback = Nothing
}
cggXgafv :: Lens' ContactGroupsGet (Maybe Xgafv)
cggXgafv = lens _cggXgafv (\ s a -> s{_cggXgafv = a})
cggMaxMembers :: Lens' ContactGroupsGet (Maybe Int32)
cggMaxMembers
= lens _cggMaxMembers
(\ s a -> s{_cggMaxMembers = a})
. mapping _Coerce
cggUploadProtocol :: Lens' ContactGroupsGet (Maybe Text)
cggUploadProtocol
= lens _cggUploadProtocol
(\ s a -> s{_cggUploadProtocol = a})
cggResourceName :: Lens' ContactGroupsGet Text
cggResourceName
= lens _cggResourceName
(\ s a -> s{_cggResourceName = a})
cggAccessToken :: Lens' ContactGroupsGet (Maybe Text)
cggAccessToken
= lens _cggAccessToken
(\ s a -> s{_cggAccessToken = a})
cggUploadType :: Lens' ContactGroupsGet (Maybe Text)
cggUploadType
= lens _cggUploadType
(\ s a -> s{_cggUploadType = a})
cggCallback :: Lens' ContactGroupsGet (Maybe Text)
cggCallback
= lens _cggCallback (\ s a -> s{_cggCallback = a})
instance GoogleRequest ContactGroupsGet where
type Rs ContactGroupsGet = ContactGroup
type Scopes ContactGroupsGet =
'["https://www.googleapis.com/auth/contacts",
"https://www.googleapis.com/auth/contacts.readonly"]
requestClient ContactGroupsGet'{..}
= go _cggResourceName _cggXgafv _cggMaxMembers
_cggUploadProtocol
_cggAccessToken
_cggUploadType
_cggCallback
(Just AltJSON)
peopleService
where go
= buildClient
(Proxy :: Proxy ContactGroupsGetResource)
mempty