{-# 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.Classroom.UserProFiles.Get
(
UserProFilesGetResource
, userProFilesGet
, UserProFilesGet
, upfgXgafv
, upfgUploadProtocol
, upfgAccessToken
, upfgUploadType
, upfgUserId
, upfgCallback
) where
import Network.Google.Classroom.Types
import Network.Google.Prelude
type UserProFilesGetResource =
"v1" :>
"userProfiles" :>
Capture "userId" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] UserProFile
data UserProFilesGet = UserProFilesGet'
{ _upfgXgafv :: !(Maybe Xgafv)
, _upfgUploadProtocol :: !(Maybe Text)
, _upfgAccessToken :: !(Maybe Text)
, _upfgUploadType :: !(Maybe Text)
, _upfgUserId :: !Text
, _upfgCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
userProFilesGet
:: Text
-> UserProFilesGet
userProFilesGet pUpfgUserId_ =
UserProFilesGet'
{ _upfgXgafv = Nothing
, _upfgUploadProtocol = Nothing
, _upfgAccessToken = Nothing
, _upfgUploadType = Nothing
, _upfgUserId = pUpfgUserId_
, _upfgCallback = Nothing
}
upfgXgafv :: Lens' UserProFilesGet (Maybe Xgafv)
upfgXgafv
= lens _upfgXgafv (\ s a -> s{_upfgXgafv = a})
upfgUploadProtocol :: Lens' UserProFilesGet (Maybe Text)
upfgUploadProtocol
= lens _upfgUploadProtocol
(\ s a -> s{_upfgUploadProtocol = a})
upfgAccessToken :: Lens' UserProFilesGet (Maybe Text)
upfgAccessToken
= lens _upfgAccessToken
(\ s a -> s{_upfgAccessToken = a})
upfgUploadType :: Lens' UserProFilesGet (Maybe Text)
upfgUploadType
= lens _upfgUploadType
(\ s a -> s{_upfgUploadType = a})
upfgUserId :: Lens' UserProFilesGet Text
upfgUserId
= lens _upfgUserId (\ s a -> s{_upfgUserId = a})
upfgCallback :: Lens' UserProFilesGet (Maybe Text)
upfgCallback
= lens _upfgCallback (\ s a -> s{_upfgCallback = a})
instance GoogleRequest UserProFilesGet where
type Rs UserProFilesGet = UserProFile
type Scopes UserProFilesGet =
'["https://www.googleapis.com/auth/classroom.profile.emails",
"https://www.googleapis.com/auth/classroom.profile.photos",
"https://www.googleapis.com/auth/classroom.rosters",
"https://www.googleapis.com/auth/classroom.rosters.readonly"]
requestClient UserProFilesGet'{..}
= go _upfgUserId _upfgXgafv _upfgUploadProtocol
_upfgAccessToken
_upfgUploadType
_upfgCallback
(Just AltJSON)
classroomService
where go
= buildClient
(Proxy :: Proxy UserProFilesGetResource)
mempty