{-# 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.People.GetBatchGet
(
PeopleGetBatchGetResource
, peopleGetBatchGet
, PeopleGetBatchGet
, pgbgXgafv
, pgbgUploadProtocol
, pgbgRequestMaskIncludeField
, pgbgAccessToken
, pgbgUploadType
, pgbgPersonFields
, pgbgResourceNames
, pgbgCallback
) where
import Network.Google.People.Types
import Network.Google.Prelude
type PeopleGetBatchGetResource =
"v1" :>
"people:batchGet" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "requestMask.includeField" GFieldMask :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "personFields" GFieldMask :>
QueryParams "resourceNames" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] GetPeopleResponse
data PeopleGetBatchGet = PeopleGetBatchGet'
{ _pgbgXgafv :: !(Maybe Xgafv)
, _pgbgUploadProtocol :: !(Maybe Text)
, _pgbgRequestMaskIncludeField :: !(Maybe GFieldMask)
, _pgbgAccessToken :: !(Maybe Text)
, _pgbgUploadType :: !(Maybe Text)
, _pgbgPersonFields :: !(Maybe GFieldMask)
, _pgbgResourceNames :: !(Maybe [Text])
, _pgbgCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
peopleGetBatchGet
:: PeopleGetBatchGet
peopleGetBatchGet =
PeopleGetBatchGet'
{ _pgbgXgafv = Nothing
, _pgbgUploadProtocol = Nothing
, _pgbgRequestMaskIncludeField = Nothing
, _pgbgAccessToken = Nothing
, _pgbgUploadType = Nothing
, _pgbgPersonFields = Nothing
, _pgbgResourceNames = Nothing
, _pgbgCallback = Nothing
}
pgbgXgafv :: Lens' PeopleGetBatchGet (Maybe Xgafv)
pgbgXgafv
= lens _pgbgXgafv (\ s a -> s{_pgbgXgafv = a})
pgbgUploadProtocol :: Lens' PeopleGetBatchGet (Maybe Text)
pgbgUploadProtocol
= lens _pgbgUploadProtocol
(\ s a -> s{_pgbgUploadProtocol = a})
pgbgRequestMaskIncludeField :: Lens' PeopleGetBatchGet (Maybe GFieldMask)
pgbgRequestMaskIncludeField
= lens _pgbgRequestMaskIncludeField
(\ s a -> s{_pgbgRequestMaskIncludeField = a})
pgbgAccessToken :: Lens' PeopleGetBatchGet (Maybe Text)
pgbgAccessToken
= lens _pgbgAccessToken
(\ s a -> s{_pgbgAccessToken = a})
pgbgUploadType :: Lens' PeopleGetBatchGet (Maybe Text)
pgbgUploadType
= lens _pgbgUploadType
(\ s a -> s{_pgbgUploadType = a})
pgbgPersonFields :: Lens' PeopleGetBatchGet (Maybe GFieldMask)
pgbgPersonFields
= lens _pgbgPersonFields
(\ s a -> s{_pgbgPersonFields = a})
pgbgResourceNames :: Lens' PeopleGetBatchGet [Text]
pgbgResourceNames
= lens _pgbgResourceNames
(\ s a -> s{_pgbgResourceNames = a})
. _Default
. _Coerce
pgbgCallback :: Lens' PeopleGetBatchGet (Maybe Text)
pgbgCallback
= lens _pgbgCallback (\ s a -> s{_pgbgCallback = a})
instance GoogleRequest PeopleGetBatchGet where
type Rs PeopleGetBatchGet = GetPeopleResponse
type Scopes PeopleGetBatchGet =
'["https://www.googleapis.com/auth/contacts",
"https://www.googleapis.com/auth/contacts.readonly",
"https://www.googleapis.com/auth/plus.login",
"https://www.googleapis.com/auth/user.addresses.read",
"https://www.googleapis.com/auth/user.birthday.read",
"https://www.googleapis.com/auth/user.emails.read",
"https://www.googleapis.com/auth/user.phonenumbers.read",
"https://www.googleapis.com/auth/userinfo.email",
"https://www.googleapis.com/auth/userinfo.profile"]
requestClient PeopleGetBatchGet'{..}
= go _pgbgXgafv _pgbgUploadProtocol
_pgbgRequestMaskIncludeField
_pgbgAccessToken
_pgbgUploadType
_pgbgPersonFields
(_pgbgResourceNames ^. _Default)
_pgbgCallback
(Just AltJSON)
peopleService
where go
= buildClient
(Proxy :: Proxy PeopleGetBatchGetResource)
mempty