{-# 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.Teachers.Get
(
CoursesTeachersGetResource
, coursesTeachersGet
, CoursesTeachersGet
, ctgXgafv
, ctgUploadProtocol
, ctgCourseId
, ctgAccessToken
, ctgUploadType
, ctgUserId
, ctgCallback
) where
import Network.Google.Classroom.Types
import Network.Google.Prelude
type CoursesTeachersGetResource =
"v1" :>
"courses" :>
Capture "courseId" Text :>
"teachers" :>
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] Teacher
data CoursesTeachersGet = CoursesTeachersGet'
{ _ctgXgafv :: !(Maybe Xgafv)
, _ctgUploadProtocol :: !(Maybe Text)
, _ctgCourseId :: !Text
, _ctgAccessToken :: !(Maybe Text)
, _ctgUploadType :: !(Maybe Text)
, _ctgUserId :: !Text
, _ctgCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
coursesTeachersGet
:: Text
-> Text
-> CoursesTeachersGet
coursesTeachersGet pCtgCourseId_ pCtgUserId_ =
CoursesTeachersGet'
{ _ctgXgafv = Nothing
, _ctgUploadProtocol = Nothing
, _ctgCourseId = pCtgCourseId_
, _ctgAccessToken = Nothing
, _ctgUploadType = Nothing
, _ctgUserId = pCtgUserId_
, _ctgCallback = Nothing
}
ctgXgafv :: Lens' CoursesTeachersGet (Maybe Xgafv)
ctgXgafv = lens _ctgXgafv (\ s a -> s{_ctgXgafv = a})
ctgUploadProtocol :: Lens' CoursesTeachersGet (Maybe Text)
ctgUploadProtocol
= lens _ctgUploadProtocol
(\ s a -> s{_ctgUploadProtocol = a})
ctgCourseId :: Lens' CoursesTeachersGet Text
ctgCourseId
= lens _ctgCourseId (\ s a -> s{_ctgCourseId = a})
ctgAccessToken :: Lens' CoursesTeachersGet (Maybe Text)
ctgAccessToken
= lens _ctgAccessToken
(\ s a -> s{_ctgAccessToken = a})
ctgUploadType :: Lens' CoursesTeachersGet (Maybe Text)
ctgUploadType
= lens _ctgUploadType
(\ s a -> s{_ctgUploadType = a})
ctgUserId :: Lens' CoursesTeachersGet Text
ctgUserId
= lens _ctgUserId (\ s a -> s{_ctgUserId = a})
ctgCallback :: Lens' CoursesTeachersGet (Maybe Text)
ctgCallback
= lens _ctgCallback (\ s a -> s{_ctgCallback = a})
instance GoogleRequest CoursesTeachersGet where
type Rs CoursesTeachersGet = Teacher
type Scopes CoursesTeachersGet =
'["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 CoursesTeachersGet'{..}
= go _ctgCourseId _ctgUserId _ctgXgafv
_ctgUploadProtocol
_ctgAccessToken
_ctgUploadType
_ctgCallback
(Just AltJSON)
classroomService
where go
= buildClient
(Proxy :: Proxy CoursesTeachersGetResource)
mempty