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