gogol-classroom-0.4.0: 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.Students.Create

Contents

Description

Adds a user as a student of a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to create students 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 * UserGroupsMembershipLimitReached * `ALREADY_EXISTS` if the user is already a student or teacher in the course.

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

Synopsis

REST Resource

type CoursesStudentsCreateResource = "v1" :> ("courses" :> (Capture "courseId" Text :> ("students" :> (QueryParam "$.xgafv" Xgafv :> (QueryParam "upload_protocol" Text :> (QueryParam "access_token" Text :> (QueryParam "uploadType" Text :> (QueryParam "enrollmentCode" Text :> (QueryParam "callback" Text :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] Student :> Post '[JSON] Student))))))))))) Source #

A resource alias for classroom.courses.students.create method which the CoursesStudentsCreate request conforms to.

Creating a Request

coursesStudentsCreate Source #

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

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

data CoursesStudentsCreate Source #

Adds a user as a student of a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to create students 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 * UserGroupsMembershipLimitReached * `ALREADY_EXISTS` if the user is already a student or teacher in the course.

See: coursesStudentsCreate smart constructor.

Instances
Eq CoursesStudentsCreate Source # 
Instance details

Defined in Network.Google.Resource.Classroom.Courses.Students.Create

Data CoursesStudentsCreate Source # 
Instance details

Defined in Network.Google.Resource.Classroom.Courses.Students.Create

Methods

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

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

toConstr :: CoursesStudentsCreate -> Constr #

dataTypeOf :: CoursesStudentsCreate -> DataType #

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

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

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

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

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

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

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

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

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

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

Show CoursesStudentsCreate Source # 
Instance details

Defined in Network.Google.Resource.Classroom.Courses.Students.Create

Generic CoursesStudentsCreate Source # 
Instance details

Defined in Network.Google.Resource.Classroom.Courses.Students.Create

Associated Types

type Rep CoursesStudentsCreate :: Type -> Type #

GoogleRequest CoursesStudentsCreate Source # 
Instance details

Defined in Network.Google.Resource.Classroom.Courses.Students.Create

type Rep CoursesStudentsCreate Source # 
Instance details

Defined in Network.Google.Resource.Classroom.Courses.Students.Create

type Rep CoursesStudentsCreate = D1 (MetaData "CoursesStudentsCreate" "Network.Google.Resource.Classroom.Courses.Students.Create" "gogol-classroom-0.4.0-8aa8kYGMMJyCKn01TYMpOR" False) (C1 (MetaCons "CoursesStudentsCreate'" PrefixI True) (((S1 (MetaSel (Just "_cscXgafv") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Xgafv)) :*: S1 (MetaSel (Just "_cscUploadProtocol") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 (MetaSel (Just "_cscCourseId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text) :*: S1 (MetaSel (Just "_cscAccessToken") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)))) :*: ((S1 (MetaSel (Just "_cscUploadType") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "_cscPayload") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Student)) :*: (S1 (MetaSel (Just "_cscEnrollmentCode") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "_cscCallback") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))))))
type Scopes CoursesStudentsCreate Source # 
Instance details

Defined in Network.Google.Resource.Classroom.Courses.Students.Create

type Scopes CoursesStudentsCreate = "https://www.googleapis.com/auth/classroom.profile.emails" ': ("https://www.googleapis.com/auth/classroom.profile.photos" ': ("https://www.googleapis.com/auth/classroom.rosters" ': ([] :: [Symbol])))
type Rs CoursesStudentsCreate Source # 
Instance details

Defined in Network.Google.Resource.Classroom.Courses.Students.Create

Request Lenses

cscUploadProtocol :: Lens' CoursesStudentsCreate (Maybe Text) Source #

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

cscCourseId :: Lens' CoursesStudentsCreate Text Source #

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

cscUploadType :: Lens' CoursesStudentsCreate (Maybe Text) Source #

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

cscPayload :: Lens' CoursesStudentsCreate Student Source #

Multipart request metadata.

cscEnrollmentCode :: Lens' CoursesStudentsCreate (Maybe Text) Source #

Enrollment code of the course to create the student in. This code is required if userId corresponds to the requesting user; it may be omitted if the requesting user has administrative permissions to create students for any user.