{-# 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.Get
(
PeopleGetResource
, peopleGet
, PeopleGet
, pgXgafv
, pgUploadProtocol
, pgResourceName
, pgRequestMaskIncludeField
, pgAccessToken
, pgUploadType
, pgPersonFields
, pgCallback
) where
import Network.Google.People.Types
import Network.Google.Prelude
type PeopleGetResource =
"v1" :>
Capture "resourceName" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "requestMask.includeField" GFieldMask :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "personFields" GFieldMask :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Person
data PeopleGet = PeopleGet'
{ _pgXgafv :: !(Maybe Xgafv)
, _pgUploadProtocol :: !(Maybe Text)
, _pgResourceName :: !Text
, _pgRequestMaskIncludeField :: !(Maybe GFieldMask)
, _pgAccessToken :: !(Maybe Text)
, _pgUploadType :: !(Maybe Text)
, _pgPersonFields :: !(Maybe GFieldMask)
, _pgCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
peopleGet
:: Text
-> PeopleGet
peopleGet pPgResourceName_ =
PeopleGet'
{ _pgXgafv = Nothing
, _pgUploadProtocol = Nothing
, _pgResourceName = pPgResourceName_
, _pgRequestMaskIncludeField = Nothing
, _pgAccessToken = Nothing
, _pgUploadType = Nothing
, _pgPersonFields = Nothing
, _pgCallback = Nothing
}
pgXgafv :: Lens' PeopleGet (Maybe Xgafv)
pgXgafv = lens _pgXgafv (\ s a -> s{_pgXgafv = a})
pgUploadProtocol :: Lens' PeopleGet (Maybe Text)
pgUploadProtocol
= lens _pgUploadProtocol
(\ s a -> s{_pgUploadProtocol = a})
pgResourceName :: Lens' PeopleGet Text
pgResourceName
= lens _pgResourceName
(\ s a -> s{_pgResourceName = a})
pgRequestMaskIncludeField :: Lens' PeopleGet (Maybe GFieldMask)
pgRequestMaskIncludeField
= lens _pgRequestMaskIncludeField
(\ s a -> s{_pgRequestMaskIncludeField = a})
pgAccessToken :: Lens' PeopleGet (Maybe Text)
pgAccessToken
= lens _pgAccessToken
(\ s a -> s{_pgAccessToken = a})
pgUploadType :: Lens' PeopleGet (Maybe Text)
pgUploadType
= lens _pgUploadType (\ s a -> s{_pgUploadType = a})
pgPersonFields :: Lens' PeopleGet (Maybe GFieldMask)
pgPersonFields
= lens _pgPersonFields
(\ s a -> s{_pgPersonFields = a})
pgCallback :: Lens' PeopleGet (Maybe Text)
pgCallback
= lens _pgCallback (\ s a -> s{_pgCallback = a})
instance GoogleRequest PeopleGet where
type Rs PeopleGet = Person
type Scopes PeopleGet =
'["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 PeopleGet'{..}
= go _pgResourceName _pgXgafv _pgUploadProtocol
_pgRequestMaskIncludeField
_pgAccessToken
_pgUploadType
_pgPersonFields
_pgCallback
(Just AltJSON)
peopleService
where go
= buildClient (Proxy :: Proxy PeopleGetResource)
mempty