{-# 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.Create
(
CoursesTeachersCreateResource
, coursesTeachersCreate
, CoursesTeachersCreate
, ctcXgafv
, ctcUploadProtocol
, ctcCourseId
, ctcAccessToken
, ctcUploadType
, ctcPayload
, ctcCallback
) where
import Network.Google.Classroom.Types
import Network.Google.Prelude
type CoursesTeachersCreateResource =
"v1" :>
"courses" :>
Capture "courseId" Text :>
"teachers" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Teacher :> Post '[JSON] Teacher
data CoursesTeachersCreate = CoursesTeachersCreate'
{ _ctcXgafv :: !(Maybe Xgafv)
, _ctcUploadProtocol :: !(Maybe Text)
, _ctcCourseId :: !Text
, _ctcAccessToken :: !(Maybe Text)
, _ctcUploadType :: !(Maybe Text)
, _ctcPayload :: !Teacher
, _ctcCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
coursesTeachersCreate
:: Text
-> Teacher
-> CoursesTeachersCreate
coursesTeachersCreate pCtcCourseId_ pCtcPayload_ =
CoursesTeachersCreate'
{ _ctcXgafv = Nothing
, _ctcUploadProtocol = Nothing
, _ctcCourseId = pCtcCourseId_
, _ctcAccessToken = Nothing
, _ctcUploadType = Nothing
, _ctcPayload = pCtcPayload_
, _ctcCallback = Nothing
}
ctcXgafv :: Lens' CoursesTeachersCreate (Maybe Xgafv)
ctcXgafv = lens _ctcXgafv (\ s a -> s{_ctcXgafv = a})
ctcUploadProtocol :: Lens' CoursesTeachersCreate (Maybe Text)
ctcUploadProtocol
= lens _ctcUploadProtocol
(\ s a -> s{_ctcUploadProtocol = a})
ctcCourseId :: Lens' CoursesTeachersCreate Text
ctcCourseId
= lens _ctcCourseId (\ s a -> s{_ctcCourseId = a})
ctcAccessToken :: Lens' CoursesTeachersCreate (Maybe Text)
ctcAccessToken
= lens _ctcAccessToken
(\ s a -> s{_ctcAccessToken = a})
ctcUploadType :: Lens' CoursesTeachersCreate (Maybe Text)
ctcUploadType
= lens _ctcUploadType
(\ s a -> s{_ctcUploadType = a})
ctcPayload :: Lens' CoursesTeachersCreate Teacher
ctcPayload
= lens _ctcPayload (\ s a -> s{_ctcPayload = a})
ctcCallback :: Lens' CoursesTeachersCreate (Maybe Text)
ctcCallback
= lens _ctcCallback (\ s a -> s{_ctcCallback = a})
instance GoogleRequest CoursesTeachersCreate where
type Rs CoursesTeachersCreate = Teacher
type Scopes CoursesTeachersCreate =
'["https://www.googleapis.com/auth/classroom.profile.emails",
"https://www.googleapis.com/auth/classroom.profile.photos",
"https://www.googleapis.com/auth/classroom.rosters"]
requestClient CoursesTeachersCreate'{..}
= go _ctcCourseId _ctcXgafv _ctcUploadProtocol
_ctcAccessToken
_ctcUploadType
_ctcCallback
(Just AltJSON)
_ctcPayload
classroomService
where go
= buildClient
(Proxy :: Proxy CoursesTeachersCreateResource)
mempty