gogol-classroom-0.1.1: Google Classroom SDK.

Copyright(c) 2015-2016 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.Google.Resource.Classroom.Courses.Teachers.Create

Contents

Description

Creates a teacher of a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to create teachers in this course or for access errors. * `NOT_FOUND` if the requested course ID does not exist. * `FAILED_PRECONDITION` if the requested user's account is disabled, for the following request errors: * CourseMemberLimitReached * CourseNotModifiable * CourseTeacherLimitReached * UserGroupsMembershipLimitReached * `ALREADY_EXISTS` if the user is already a teacher or student in the course.

See: Google Classroom API Reference for classroom.courses.teachers.create.

Synopsis

REST Resource

type CoursesTeachersCreateResource = "v1" :> ("courses" :> (Capture "courseId" Text :> ("teachers" :> (QueryParam "$.xgafv" Text :> (QueryParam "upload_protocol" Text :> (QueryParam "pp" Bool :> (QueryParam "access_token" Text :> (QueryParam "uploadType" Text :> (QueryParam "bearer_token" Text :> (QueryParam "callback" Text :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] Teacher :> Post '[JSON] Teacher)))))))))))) Source #

A resource alias for classroom.courses.teachers.create method which the CoursesTeachersCreate request conforms to.

Creating a Request

coursesTeachersCreate Source #

Creates a value of CoursesTeachersCreate with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

data CoursesTeachersCreate Source #

Creates a teacher of a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to create teachers in this course or for access errors. * `NOT_FOUND` if the requested course ID does not exist. * `FAILED_PRECONDITION` if the requested user's account is disabled, for the following request errors: * CourseMemberLimitReached * CourseNotModifiable * CourseTeacherLimitReached * UserGroupsMembershipLimitReached * `ALREADY_EXISTS` if the user is already a teacher or student in the course.

See: coursesTeachersCreate smart constructor.

Instances

Eq CoursesTeachersCreate Source # 
Data CoursesTeachersCreate Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CoursesTeachersCreate -> c CoursesTeachersCreate #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CoursesTeachersCreate #

toConstr :: CoursesTeachersCreate -> Constr #

dataTypeOf :: CoursesTeachersCreate -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c CoursesTeachersCreate) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CoursesTeachersCreate) #

gmapT :: (forall b. Data b => b -> b) -> CoursesTeachersCreate -> CoursesTeachersCreate #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CoursesTeachersCreate -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CoursesTeachersCreate -> r #

gmapQ :: (forall d. Data d => d -> u) -> CoursesTeachersCreate -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CoursesTeachersCreate -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CoursesTeachersCreate -> m CoursesTeachersCreate #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CoursesTeachersCreate -> m CoursesTeachersCreate #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CoursesTeachersCreate -> m CoursesTeachersCreate #

Show CoursesTeachersCreate Source # 
Generic CoursesTeachersCreate Source # 
GoogleRequest CoursesTeachersCreate Source # 
type Rep CoursesTeachersCreate Source # 
type Scopes CoursesTeachersCreate Source # 
type Scopes CoursesTeachersCreate = (:) Symbol "https://www.googleapis.com/auth/classroom.profile.emails" ((:) Symbol "https://www.googleapis.com/auth/classroom.profile.photos" ((:) Symbol "https://www.googleapis.com/auth/classroom.rosters" ([] Symbol)))
type Rs CoursesTeachersCreate Source # 

Request Lenses

ctcUploadProtocol :: Lens' CoursesTeachersCreate (Maybe Text) Source #

Upload protocol for media (e.g. "raw", "multipart").

ctcPp :: Lens' CoursesTeachersCreate Bool Source #

Pretty-print response.

ctcCourseId :: Lens' CoursesTeachersCreate Text Source #

Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.

ctcUploadType :: Lens' CoursesTeachersCreate (Maybe Text) Source #

Legacy upload protocol for media (e.g. "media", "multipart").

ctcPayload :: Lens' CoursesTeachersCreate Teacher Source #

Multipart request metadata.