{-# 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.Courses.Students.Get
(
CoursesStudentsGetResource
, coursesStudentsGet
, CoursesStudentsGet
, csgXgafv
, csgUploadProtocol
, csgCourseId
, csgAccessToken
, csgUploadType
, csgUserId
, csgCallback
) where
import Network.Google.Classroom.Types
import Network.Google.Prelude
type CoursesStudentsGetResource =
"v1" :>
"courses" :>
Capture "courseId" Text :>
"students" :>
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] Student
data CoursesStudentsGet = CoursesStudentsGet'
{ _csgXgafv :: !(Maybe Xgafv)
, _csgUploadProtocol :: !(Maybe Text)
, _csgCourseId :: !Text
, _csgAccessToken :: !(Maybe Text)
, _csgUploadType :: !(Maybe Text)
, _csgUserId :: !Text
, _csgCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
coursesStudentsGet
:: Text
-> Text
-> CoursesStudentsGet
coursesStudentsGet pCsgCourseId_ pCsgUserId_ =
CoursesStudentsGet'
{ _csgXgafv = Nothing
, _csgUploadProtocol = Nothing
, _csgCourseId = pCsgCourseId_
, _csgAccessToken = Nothing
, _csgUploadType = Nothing
, _csgUserId = pCsgUserId_
, _csgCallback = Nothing
}
csgXgafv :: Lens' CoursesStudentsGet (Maybe Xgafv)
csgXgafv = lens _csgXgafv (\ s a -> s{_csgXgafv = a})
csgUploadProtocol :: Lens' CoursesStudentsGet (Maybe Text)
csgUploadProtocol
= lens _csgUploadProtocol
(\ s a -> s{_csgUploadProtocol = a})
csgCourseId :: Lens' CoursesStudentsGet Text
csgCourseId
= lens _csgCourseId (\ s a -> s{_csgCourseId = a})
csgAccessToken :: Lens' CoursesStudentsGet (Maybe Text)
csgAccessToken
= lens _csgAccessToken
(\ s a -> s{_csgAccessToken = a})
csgUploadType :: Lens' CoursesStudentsGet (Maybe Text)
csgUploadType
= lens _csgUploadType
(\ s a -> s{_csgUploadType = a})
csgUserId :: Lens' CoursesStudentsGet Text
csgUserId
= lens _csgUserId (\ s a -> s{_csgUserId = a})
csgCallback :: Lens' CoursesStudentsGet (Maybe Text)
csgCallback
= lens _csgCallback (\ s a -> s{_csgCallback = a})
instance GoogleRequest CoursesStudentsGet where
type Rs CoursesStudentsGet = Student
type Scopes CoursesStudentsGet =
'["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 CoursesStudentsGet'{..}
= go _csgCourseId _csgUserId _csgXgafv
_csgUploadProtocol
_csgAccessToken
_csgUploadType
_csgCallback
(Just AltJSON)
classroomService
where go
= buildClient
(Proxy :: Proxy CoursesStudentsGetResource)
mempty