| Index: generated/googleapis/lib/classroom/v1.dart
|
| diff --git a/generated/googleapis/lib/classroom/v1.dart b/generated/googleapis/lib/classroom/v1.dart
|
| index 73350f63aad36b85a6bfc9cb5ffaa2ad2d9ac89f..495bb7c7496fe98ee89d6754df3ffda1d55fca0a 100644
|
| --- a/generated/googleapis/lib/classroom/v1.dart
|
| +++ b/generated/googleapis/lib/classroom/v1.dart
|
| @@ -9,121 +9,133 @@ import 'dart:convert' as convert;
|
| import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons;
|
| import 'package:http/http.dart' as http;
|
|
|
| -export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show
|
| - ApiRequestError, DetailedApiRequestError;
|
| +export 'package:_discoveryapis_commons/_discoveryapis_commons.dart'
|
| + show ApiRequestError, DetailedApiRequestError;
|
|
|
| const core.String USER_AGENT = 'dart-api-client classroom/v1';
|
|
|
| -/** Manages classes, rosters, and invitations in Google Classroom. */
|
| +/// Manages classes, rosters, and invitations in Google Classroom.
|
| class ClassroomApi {
|
| - /** Manage your Google Classroom classes */
|
| - static const ClassroomCoursesScope = "https://www.googleapis.com/auth/classroom.courses";
|
| -
|
| - /** View your Google Classroom classes */
|
| - static const ClassroomCoursesReadonlyScope = "https://www.googleapis.com/auth/classroom.courses.readonly";
|
| -
|
| - /** Manage your course work and view your grades in Google Classroom */
|
| - static const ClassroomCourseworkMeScope = "https://www.googleapis.com/auth/classroom.coursework.me";
|
| -
|
| - /** View your course work and grades in Google Classroom */
|
| - static const ClassroomCourseworkMeReadonlyScope = "https://www.googleapis.com/auth/classroom.coursework.me.readonly";
|
| -
|
| - /**
|
| - * Manage course work and grades for students in the Google Classroom classes
|
| - * you teach and view the course work and grades for classes you administer
|
| - */
|
| - static const ClassroomCourseworkStudentsScope = "https://www.googleapis.com/auth/classroom.coursework.students";
|
| -
|
| - /**
|
| - * View course work and grades for students in the Google Classroom classes
|
| - * you teach or administer
|
| - */
|
| - static const ClassroomCourseworkStudentsReadonlyScope = "https://www.googleapis.com/auth/classroom.coursework.students.readonly";
|
| -
|
| - /** View your Google Classroom guardians */
|
| - static const ClassroomGuardianlinksMeReadonlyScope = "https://www.googleapis.com/auth/classroom.guardianlinks.me.readonly";
|
| -
|
| - /**
|
| - * View and manage guardians for students in your Google Classroom classes
|
| - */
|
| - static const ClassroomGuardianlinksStudentsScope = "https://www.googleapis.com/auth/classroom.guardianlinks.students";
|
| -
|
| - /** View guardians for students in your Google Classroom classes */
|
| - static const ClassroomGuardianlinksStudentsReadonlyScope = "https://www.googleapis.com/auth/classroom.guardianlinks.students.readonly";
|
| -
|
| - /** View the email addresses of people in your classes */
|
| - static const ClassroomProfileEmailsScope = "https://www.googleapis.com/auth/classroom.profile.emails";
|
| -
|
| - /** View the profile photos of people in your classes */
|
| - static const ClassroomProfilePhotosScope = "https://www.googleapis.com/auth/classroom.profile.photos";
|
| -
|
| - /** Manage your Google Classroom class rosters */
|
| - static const ClassroomRostersScope = "https://www.googleapis.com/auth/classroom.rosters";
|
| -
|
| - /** View your Google Classroom class rosters */
|
| - static const ClassroomRostersReadonlyScope = "https://www.googleapis.com/auth/classroom.rosters.readonly";
|
| -
|
| - /** View your course work and grades in Google Classroom */
|
| - static const ClassroomStudentSubmissionsMeReadonlyScope = "https://www.googleapis.com/auth/classroom.student-submissions.me.readonly";
|
| -
|
| - /**
|
| - * View course work and grades for students in the Google Classroom classes
|
| - * you teach or administer
|
| - */
|
| - static const ClassroomStudentSubmissionsStudentsReadonlyScope = "https://www.googleapis.com/auth/classroom.student-submissions.students.readonly";
|
| -
|
| + /// Manage your Google Classroom classes
|
| + static const ClassroomCoursesScope =
|
| + "https://www.googleapis.com/auth/classroom.courses";
|
| +
|
| + /// View your Google Classroom classes
|
| + static const ClassroomCoursesReadonlyScope =
|
| + "https://www.googleapis.com/auth/classroom.courses.readonly";
|
| +
|
| + /// Manage your course work and view your grades in Google Classroom
|
| + static const ClassroomCourseworkMeScope =
|
| + "https://www.googleapis.com/auth/classroom.coursework.me";
|
| +
|
| + /// View your course work and grades in Google Classroom
|
| + static const ClassroomCourseworkMeReadonlyScope =
|
| + "https://www.googleapis.com/auth/classroom.coursework.me.readonly";
|
| +
|
| + /// Manage course work and grades for students in the Google Classroom
|
| + /// classes you teach and view the course work and grades for classes you
|
| + /// administer
|
| + static const ClassroomCourseworkStudentsScope =
|
| + "https://www.googleapis.com/auth/classroom.coursework.students";
|
| +
|
| + /// View course work and grades for students in the Google Classroom classes
|
| + /// you teach or administer
|
| + static const ClassroomCourseworkStudentsReadonlyScope =
|
| + "https://www.googleapis.com/auth/classroom.coursework.students.readonly";
|
| +
|
| + /// View your Google Classroom guardians
|
| + static const ClassroomGuardianlinksMeReadonlyScope =
|
| + "https://www.googleapis.com/auth/classroom.guardianlinks.me.readonly";
|
| +
|
| + /// View and manage guardians for students in your Google Classroom classes
|
| + static const ClassroomGuardianlinksStudentsScope =
|
| + "https://www.googleapis.com/auth/classroom.guardianlinks.students";
|
| +
|
| + /// View guardians for students in your Google Classroom classes
|
| + static const ClassroomGuardianlinksStudentsReadonlyScope =
|
| + "https://www.googleapis.com/auth/classroom.guardianlinks.students.readonly";
|
| +
|
| + /// View the email addresses of people in your classes
|
| + static const ClassroomProfileEmailsScope =
|
| + "https://www.googleapis.com/auth/classroom.profile.emails";
|
| +
|
| + /// View the profile photos of people in your classes
|
| + static const ClassroomProfilePhotosScope =
|
| + "https://www.googleapis.com/auth/classroom.profile.photos";
|
| +
|
| + /// Manage your Google Classroom class rosters
|
| + static const ClassroomRostersScope =
|
| + "https://www.googleapis.com/auth/classroom.rosters";
|
| +
|
| + /// View your Google Classroom class rosters
|
| + static const ClassroomRostersReadonlyScope =
|
| + "https://www.googleapis.com/auth/classroom.rosters.readonly";
|
| +
|
| + /// View your course work and grades in Google Classroom
|
| + static const ClassroomStudentSubmissionsMeReadonlyScope =
|
| + "https://www.googleapis.com/auth/classroom.student-submissions.me.readonly";
|
| +
|
| + /// View course work and grades for students in the Google Classroom classes
|
| + /// you teach or administer
|
| + static const ClassroomStudentSubmissionsStudentsReadonlyScope =
|
| + "https://www.googleapis.com/auth/classroom.student-submissions.students.readonly";
|
|
|
| final commons.ApiRequester _requester;
|
|
|
| CoursesResourceApi get courses => new CoursesResourceApi(_requester);
|
| - InvitationsResourceApi get invitations => new InvitationsResourceApi(_requester);
|
| - UserProfilesResourceApi get userProfiles => new UserProfilesResourceApi(_requester);
|
| -
|
| - ClassroomApi(http.Client client, {core.String rootUrl: "https://classroom.googleapis.com/", core.String servicePath: ""}) :
|
| - _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT);
|
| + InvitationsResourceApi get invitations =>
|
| + new InvitationsResourceApi(_requester);
|
| + UserProfilesResourceApi get userProfiles =>
|
| + new UserProfilesResourceApi(_requester);
|
| +
|
| + ClassroomApi(http.Client client,
|
| + {core.String rootUrl: "https://classroom.googleapis.com/",
|
| + core.String servicePath: ""})
|
| + : _requester =
|
| + new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT);
|
| }
|
|
|
| -
|
| class CoursesResourceApi {
|
| final commons.ApiRequester _requester;
|
|
|
| - CoursesAliasesResourceApi get aliases => new CoursesAliasesResourceApi(_requester);
|
| - CoursesCourseWorkResourceApi get courseWork => new CoursesCourseWorkResourceApi(_requester);
|
| - CoursesStudentsResourceApi get students => new CoursesStudentsResourceApi(_requester);
|
| - CoursesTeachersResourceApi get teachers => new CoursesTeachersResourceApi(_requester);
|
| -
|
| - CoursesResourceApi(commons.ApiRequester client) :
|
| - _requester = client;
|
| -
|
| - /**
|
| - * Creates a course.
|
| - *
|
| - * The user specified in `ownerId` is the owner of the created course
|
| - * and added as a teacher.
|
| - *
|
| - * This method returns the following error codes:
|
| - *
|
| - * * `PERMISSION_DENIED` if the requesting user is not permitted to create
|
| - * courses or for access errors.
|
| - * * `NOT_FOUND` if the primary teacher is not a valid user.
|
| - * * `FAILED_PRECONDITION` if the course owner's account is disabled or for
|
| - * the following request errors:
|
| - * * UserGroupsMembershipLimitReached
|
| - * * `ALREADY_EXISTS` if an alias was specified in the `id` and
|
| - * already exists.
|
| - *
|
| - * [request] - The metadata request object.
|
| - *
|
| - * Request parameters:
|
| - *
|
| - * Completes with a [Course].
|
| - *
|
| - * Completes with a [commons.ApiRequestError] if the API endpoint returned an
|
| - * error.
|
| - *
|
| - * If the used [http.Client] completes with an error when making a REST call,
|
| - * this method will complete with the same error.
|
| - */
|
| + CoursesAliasesResourceApi get aliases =>
|
| + new CoursesAliasesResourceApi(_requester);
|
| + CoursesCourseWorkResourceApi get courseWork =>
|
| + new CoursesCourseWorkResourceApi(_requester);
|
| + CoursesStudentsResourceApi get students =>
|
| + new CoursesStudentsResourceApi(_requester);
|
| + CoursesTeachersResourceApi get teachers =>
|
| + new CoursesTeachersResourceApi(_requester);
|
| +
|
| + CoursesResourceApi(commons.ApiRequester client) : _requester = client;
|
| +
|
| + /// Creates a course.
|
| + ///
|
| + /// The user specified in `ownerId` is the owner of the created course
|
| + /// and added as a teacher.
|
| + ///
|
| + /// This method returns the following error codes:
|
| + ///
|
| + /// * `PERMISSION_DENIED` if the requesting user is not permitted to create
|
| + /// courses or for access errors.
|
| + /// * `NOT_FOUND` if the primary teacher is not a valid user.
|
| + /// * `FAILED_PRECONDITION` if the course owner's account is disabled or for
|
| + /// the following request errors:
|
| + /// * UserGroupsMembershipLimitReached
|
| + /// * `ALREADY_EXISTS` if an alias was specified in the `id` and
|
| + /// already exists.
|
| + ///
|
| + /// [request] - The metadata request object.
|
| + ///
|
| + /// Request parameters:
|
| + ///
|
| + /// Completes with a [Course].
|
| + ///
|
| + /// Completes with a [commons.ApiRequestError] if the API endpoint returned
|
| + /// an error.
|
| + ///
|
| + /// If the used [http.Client] completes with an error when making a REST
|
| + /// call, this method will complete with the same error.
|
| async.Future<Course> create(Course request) {
|
| var _url = null;
|
| var _queryParams = new core.Map();
|
| @@ -138,39 +150,37 @@ class CoursesResourceApi {
|
|
|
| _url = 'v1/courses';
|
|
|
| - var _response = _requester.request(_url,
|
| - "POST",
|
| - body: _body,
|
| - queryParams: _queryParams,
|
| - uploadOptions: _uploadOptions,
|
| - uploadMedia: _uploadMedia,
|
| - downloadOptions: _downloadOptions);
|
| + var _response = _requester.request(_url, "POST",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| return _response.then((data) => new Course.fromJson(data));
|
| }
|
|
|
| - /**
|
| - * Deletes a course.
|
| - *
|
| - * This method returns the following error codes:
|
| - *
|
| - * * `PERMISSION_DENIED` if the requesting user is not permitted to delete the
|
| - * requested course or for access errors.
|
| - * * `NOT_FOUND` if no course exists with the requested ID.
|
| - *
|
| - * Request parameters:
|
| - *
|
| - * [id] - Identifier of the course to delete.
|
| - * This identifier can be either the Classroom-assigned identifier or an
|
| - * alias.
|
| - *
|
| - * Completes with a [Empty].
|
| - *
|
| - * Completes with a [commons.ApiRequestError] if the API endpoint returned an
|
| - * error.
|
| - *
|
| - * If the used [http.Client] completes with an error when making a REST call,
|
| - * this method will complete with the same error.
|
| - */
|
| + /// Deletes a course.
|
| + ///
|
| + /// This method returns the following error codes:
|
| + ///
|
| + /// * `PERMISSION_DENIED` if the requesting user is not permitted to delete
|
| + /// the
|
| + /// requested course or for access errors.
|
| + /// * `NOT_FOUND` if no course exists with the requested ID.
|
| + ///
|
| + /// Request parameters:
|
| + ///
|
| + /// [id] - Identifier of the course to delete.
|
| + /// This identifier can be either the Classroom-assigned identifier or an
|
| + /// alias.
|
| + ///
|
| + /// Completes with a [Empty].
|
| + ///
|
| + /// Completes with a [commons.ApiRequestError] if the API endpoint returned
|
| + /// an error.
|
| + ///
|
| + /// If the used [http.Client] completes with an error when making a REST
|
| + /// call, this method will complete with the same error.
|
| async.Future<Empty> delete(core.String id) {
|
| var _url = null;
|
| var _queryParams = new core.Map();
|
| @@ -185,39 +195,37 @@ class CoursesResourceApi {
|
|
|
| _url = 'v1/courses/' + commons.Escaper.ecapeVariable('$id');
|
|
|
| - var _response = _requester.request(_url,
|
| - "DELETE",
|
| - body: _body,
|
| - queryParams: _queryParams,
|
| - uploadOptions: _uploadOptions,
|
| - uploadMedia: _uploadMedia,
|
| - downloadOptions: _downloadOptions);
|
| + var _response = _requester.request(_url, "DELETE",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| return _response.then((data) => new Empty.fromJson(data));
|
| }
|
|
|
| - /**
|
| - * Returns a course.
|
| - *
|
| - * This method returns the following error codes:
|
| - *
|
| - * * `PERMISSION_DENIED` if the requesting user is not permitted to access the
|
| - * requested course or for access errors.
|
| - * * `NOT_FOUND` if no course exists with the requested ID.
|
| - *
|
| - * Request parameters:
|
| - *
|
| - * [id] - Identifier of the course to return.
|
| - * This identifier can be either the Classroom-assigned identifier or an
|
| - * alias.
|
| - *
|
| - * Completes with a [Course].
|
| - *
|
| - * Completes with a [commons.ApiRequestError] if the API endpoint returned an
|
| - * error.
|
| - *
|
| - * If the used [http.Client] completes with an error when making a REST call,
|
| - * this method will complete with the same error.
|
| - */
|
| + /// Returns a course.
|
| + ///
|
| + /// This method returns the following error codes:
|
| + ///
|
| + /// * `PERMISSION_DENIED` if the requesting user is not permitted to access
|
| + /// the
|
| + /// requested course or for access errors.
|
| + /// * `NOT_FOUND` if no course exists with the requested ID.
|
| + ///
|
| + /// Request parameters:
|
| + ///
|
| + /// [id] - Identifier of the course to return.
|
| + /// This identifier can be either the Classroom-assigned identifier or an
|
| + /// alias.
|
| + ///
|
| + /// Completes with a [Course].
|
| + ///
|
| + /// Completes with a [commons.ApiRequestError] if the API endpoint returned
|
| + /// an error.
|
| + ///
|
| + /// If the used [http.Client] completes with an error when making a REST
|
| + /// call, this method will complete with the same error.
|
| async.Future<Course> get(core.String id) {
|
| var _url = null;
|
| var _queryParams = new core.Map();
|
| @@ -232,72 +240,75 @@ class CoursesResourceApi {
|
|
|
| _url = 'v1/courses/' + commons.Escaper.ecapeVariable('$id');
|
|
|
| - var _response = _requester.request(_url,
|
| - "GET",
|
| - body: _body,
|
| - queryParams: _queryParams,
|
| - uploadOptions: _uploadOptions,
|
| - uploadMedia: _uploadMedia,
|
| - downloadOptions: _downloadOptions);
|
| + var _response = _requester.request(_url, "GET",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| return _response.then((data) => new Course.fromJson(data));
|
| }
|
|
|
| - /**
|
| - * Returns a list of courses that the requesting user is permitted to view,
|
| - * restricted to those that match the request. Returned courses are ordered by
|
| - * creation time, with the most recently created coming first.
|
| - *
|
| - * This method returns the following error codes:
|
| - *
|
| - * * `PERMISSION_DENIED` for access errors.
|
| - * * `INVALID_ARGUMENT` if the query argument is malformed.
|
| - * * `NOT_FOUND` if any users specified in the query arguments do not exist.
|
| - *
|
| - * Request parameters:
|
| - *
|
| - * [courseStates] - Restricts returned courses to those in one of the
|
| - * specified states
|
| - * The default value is ACTIVE, ARCHIVED, PROVISIONED, DECLINED.
|
| - *
|
| - * [teacherId] - Restricts returned courses to those having a teacher with the
|
| - * specified
|
| - * identifier. The identifier can be one of the following:
|
| - *
|
| - * * the numeric identifier for the user
|
| - * * the email address of the user
|
| - * * the string literal `"me"`, indicating the requesting user
|
| - *
|
| - * [studentId] - Restricts returned courses to those having a student with the
|
| - * specified
|
| - * identifier. The identifier can be one of the following:
|
| - *
|
| - * * the numeric identifier for the user
|
| - * * the email address of the user
|
| - * * the string literal `"me"`, indicating the requesting user
|
| - *
|
| - * [pageToken] - nextPageToken
|
| - * value returned from a previous
|
| - * list call,
|
| - * indicating that the subsequent page of results should be returned.
|
| - *
|
| - * The list request must be
|
| - * otherwise identical to the one that resulted in this token.
|
| - *
|
| - * [pageSize] - Maximum number of items to return. Zero or unspecified
|
| - * indicates that the
|
| - * server may assign a maximum.
|
| - *
|
| - * The server may return fewer than the specified number of results.
|
| - *
|
| - * Completes with a [ListCoursesResponse].
|
| - *
|
| - * Completes with a [commons.ApiRequestError] if the API endpoint returned an
|
| - * error.
|
| - *
|
| - * If the used [http.Client] completes with an error when making a REST call,
|
| - * this method will complete with the same error.
|
| - */
|
| - async.Future<ListCoursesResponse> list({core.List<core.String> courseStates, core.String teacherId, core.String studentId, core.String pageToken, core.int pageSize}) {
|
| + /// Returns a list of courses that the requesting user is permitted to view,
|
| + /// restricted to those that match the request. Returned courses are ordered
|
| + /// by
|
| + /// creation time, with the most recently created coming first.
|
| + ///
|
| + /// This method returns the following error codes:
|
| + ///
|
| + /// * `PERMISSION_DENIED` for access errors.
|
| + /// * `INVALID_ARGUMENT` if the query argument is malformed.
|
| + /// * `NOT_FOUND` if any users specified in the query arguments do not exist.
|
| + ///
|
| + /// Request parameters:
|
| + ///
|
| + /// [studentId] - Restricts returned courses to those having a student with
|
| + /// the specified
|
| + /// identifier. The identifier can be one of the following:
|
| + ///
|
| + /// * the numeric identifier for the user
|
| + /// * the email address of the user
|
| + /// * the string literal `"me"`, indicating the requesting user
|
| + ///
|
| + /// [pageToken] - nextPageToken
|
| + /// value returned from a previous
|
| + /// list call,
|
| + /// indicating that the subsequent page of results should be returned.
|
| + ///
|
| + /// The list request must be
|
| + /// otherwise identical to the one that resulted in this token.
|
| + ///
|
| + /// [pageSize] - Maximum number of items to return. Zero or unspecified
|
| + /// indicates that the
|
| + /// server may assign a maximum.
|
| + ///
|
| + /// The server may return fewer than the specified number of results.
|
| + ///
|
| + /// [courseStates] - Restricts returned courses to those in one of the
|
| + /// specified states
|
| + /// The default value is ACTIVE, ARCHIVED, PROVISIONED, DECLINED.
|
| + ///
|
| + /// [teacherId] - Restricts returned courses to those having a teacher with
|
| + /// the specified
|
| + /// identifier. The identifier can be one of the following:
|
| + ///
|
| + /// * the numeric identifier for the user
|
| + /// * the email address of the user
|
| + /// * the string literal `"me"`, indicating the requesting user
|
| + ///
|
| + /// Completes with a [ListCoursesResponse].
|
| + ///
|
| + /// Completes with a [commons.ApiRequestError] if the API endpoint returned
|
| + /// an error.
|
| + ///
|
| + /// If the used [http.Client] completes with an error when making a REST
|
| + /// call, this method will complete with the same error.
|
| + async.Future<ListCoursesResponse> list(
|
| + {core.String studentId,
|
| + core.String pageToken,
|
| + core.int pageSize,
|
| + core.List<core.String> courseStates,
|
| + core.String teacherId}) {
|
| var _url = null;
|
| var _queryParams = new core.Map();
|
| var _uploadMedia = null;
|
| @@ -305,12 +316,6 @@ class CoursesResourceApi {
|
| var _downloadOptions = commons.DownloadOptions.Metadata;
|
| var _body = null;
|
|
|
| - if (courseStates != null) {
|
| - _queryParams["courseStates"] = courseStates;
|
| - }
|
| - if (teacherId != null) {
|
| - _queryParams["teacherId"] = [teacherId];
|
| - }
|
| if (studentId != null) {
|
| _queryParams["studentId"] = [studentId];
|
| }
|
| @@ -320,69 +325,76 @@ class CoursesResourceApi {
|
| if (pageSize != null) {
|
| _queryParams["pageSize"] = ["${pageSize}"];
|
| }
|
| + if (courseStates != null) {
|
| + _queryParams["courseStates"] = courseStates;
|
| + }
|
| + if (teacherId != null) {
|
| + _queryParams["teacherId"] = [teacherId];
|
| + }
|
|
|
| _url = 'v1/courses';
|
|
|
| - var _response = _requester.request(_url,
|
| - "GET",
|
| - body: _body,
|
| - queryParams: _queryParams,
|
| - uploadOptions: _uploadOptions,
|
| - uploadMedia: _uploadMedia,
|
| - downloadOptions: _downloadOptions);
|
| + var _response = _requester.request(_url, "GET",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| return _response.then((data) => new ListCoursesResponse.fromJson(data));
|
| }
|
|
|
| - /**
|
| - * Updates one or more fields in a course.
|
| - *
|
| - * This method returns the following error codes:
|
| - *
|
| - * * `PERMISSION_DENIED` if the requesting user is not permitted to modify the
|
| - * requested course or for access errors.
|
| - * * `NOT_FOUND` if no course exists with the requested ID.
|
| - * * `INVALID_ARGUMENT` if invalid fields are specified in the update mask or
|
| - * if no update mask is supplied.
|
| - * * `FAILED_PRECONDITION` for the following request errors:
|
| - * * CourseNotModifiable
|
| - *
|
| - * [request] - The metadata request object.
|
| - *
|
| - * Request parameters:
|
| - *
|
| - * [id] - Identifier of the course to update.
|
| - * This identifier can be either the Classroom-assigned identifier or an
|
| - * alias.
|
| - *
|
| - * [updateMask] - Mask that identifies which fields on the course to update.
|
| - * This field is required to do an update. The update will fail if invalid
|
| - * fields are specified. The following fields are valid:
|
| - *
|
| - * * `name`
|
| - * * `section`
|
| - * * `descriptionHeading`
|
| - * * `description`
|
| - * * `room`
|
| - * * `courseState`
|
| - * * `ownerId`
|
| - *
|
| - * Note: patches to ownerId are treated as being effective immediately, but in
|
| - * practice it may take some time for the ownership transfer of all affected
|
| - * resources to complete.
|
| - *
|
| - * When set in a query parameter, this field should be specified as
|
| - *
|
| - * `updateMask=<field1>,<field2>,...`
|
| - *
|
| - * Completes with a [Course].
|
| - *
|
| - * Completes with a [commons.ApiRequestError] if the API endpoint returned an
|
| - * error.
|
| - *
|
| - * If the used [http.Client] completes with an error when making a REST call,
|
| - * this method will complete with the same error.
|
| - */
|
| - async.Future<Course> patch(Course request, core.String id, {core.String updateMask}) {
|
| + /// Updates one or more fields in a course.
|
| + ///
|
| + /// This method returns the following error codes:
|
| + ///
|
| + /// * `PERMISSION_DENIED` if the requesting user is not permitted to modify
|
| + /// the
|
| + /// requested course or for access errors.
|
| + /// * `NOT_FOUND` if no course exists with the requested ID.
|
| + /// * `INVALID_ARGUMENT` if invalid fields are specified in the update mask
|
| + /// or
|
| + /// if no update mask is supplied.
|
| + /// * `FAILED_PRECONDITION` for the following request errors:
|
| + /// * CourseNotModifiable
|
| + ///
|
| + /// [request] - The metadata request object.
|
| + ///
|
| + /// Request parameters:
|
| + ///
|
| + /// [id] - Identifier of the course to update.
|
| + /// This identifier can be either the Classroom-assigned identifier or an
|
| + /// alias.
|
| + ///
|
| + /// [updateMask] - Mask that identifies which fields on the course to update.
|
| + /// This field is required to do an update. The update will fail if invalid
|
| + /// fields are specified. The following fields are valid:
|
| + ///
|
| + /// * `name`
|
| + /// * `section`
|
| + /// * `descriptionHeading`
|
| + /// * `description`
|
| + /// * `room`
|
| + /// * `courseState`
|
| + /// * `ownerId`
|
| + ///
|
| + /// Note: patches to ownerId are treated as being effective immediately, but
|
| + /// in
|
| + /// practice it may take some time for the ownership transfer of all affected
|
| + /// resources to complete.
|
| + ///
|
| + /// When set in a query parameter, this field should be specified as
|
| + ///
|
| + /// `updateMask=<field1>,<field2>,...`
|
| + ///
|
| + /// Completes with a [Course].
|
| + ///
|
| + /// Completes with a [commons.ApiRequestError] if the API endpoint returned
|
| + /// an error.
|
| + ///
|
| + /// If the used [http.Client] completes with an error when making a REST
|
| + /// call, this method will complete with the same error.
|
| + async.Future<Course> patch(Course request, core.String id,
|
| + {core.String updateMask}) {
|
| var _url = null;
|
| var _queryParams = new core.Map();
|
| var _uploadMedia = null;
|
| @@ -402,43 +414,41 @@ class CoursesResourceApi {
|
|
|
| _url = 'v1/courses/' + commons.Escaper.ecapeVariable('$id');
|
|
|
| - var _response = _requester.request(_url,
|
| - "PATCH",
|
| - body: _body,
|
| - queryParams: _queryParams,
|
| - uploadOptions: _uploadOptions,
|
| - uploadMedia: _uploadMedia,
|
| - downloadOptions: _downloadOptions);
|
| + var _response = _requester.request(_url, "PATCH",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| return _response.then((data) => new Course.fromJson(data));
|
| }
|
|
|
| - /**
|
| - * Updates a course.
|
| - *
|
| - * This method returns the following error codes:
|
| - *
|
| - * * `PERMISSION_DENIED` if the requesting user is not permitted to modify the
|
| - * requested course or for access errors.
|
| - * * `NOT_FOUND` if no course exists with the requested ID.
|
| - * * `FAILED_PRECONDITION` for the following request errors:
|
| - * * CourseNotModifiable
|
| - *
|
| - * [request] - The metadata request object.
|
| - *
|
| - * Request parameters:
|
| - *
|
| - * [id] - Identifier of the course to update.
|
| - * This identifier can be either the Classroom-assigned identifier or an
|
| - * alias.
|
| - *
|
| - * Completes with a [Course].
|
| - *
|
| - * Completes with a [commons.ApiRequestError] if the API endpoint returned an
|
| - * error.
|
| - *
|
| - * If the used [http.Client] completes with an error when making a REST call,
|
| - * this method will complete with the same error.
|
| - */
|
| + /// Updates a course.
|
| + ///
|
| + /// This method returns the following error codes:
|
| + ///
|
| + /// * `PERMISSION_DENIED` if the requesting user is not permitted to modify
|
| + /// the
|
| + /// requested course or for access errors.
|
| + /// * `NOT_FOUND` if no course exists with the requested ID.
|
| + /// * `FAILED_PRECONDITION` for the following request errors:
|
| + /// * CourseNotModifiable
|
| + ///
|
| + /// [request] - The metadata request object.
|
| + ///
|
| + /// Request parameters:
|
| + ///
|
| + /// [id] - Identifier of the course to update.
|
| + /// This identifier can be either the Classroom-assigned identifier or an
|
| + /// alias.
|
| + ///
|
| + /// Completes with a [Course].
|
| + ///
|
| + /// Completes with a [commons.ApiRequestError] if the API endpoint returned
|
| + /// an error.
|
| + ///
|
| + /// If the used [http.Client] completes with an error when making a REST
|
| + /// call, this method will complete with the same error.
|
| async.Future<Course> update(Course request, core.String id) {
|
| var _url = null;
|
| var _queryParams = new core.Map();
|
| @@ -456,54 +466,50 @@ class CoursesResourceApi {
|
|
|
| _url = 'v1/courses/' + commons.Escaper.ecapeVariable('$id');
|
|
|
| - var _response = _requester.request(_url,
|
| - "PUT",
|
| - body: _body,
|
| - queryParams: _queryParams,
|
| - uploadOptions: _uploadOptions,
|
| - uploadMedia: _uploadMedia,
|
| - downloadOptions: _downloadOptions);
|
| + var _response = _requester.request(_url, "PUT",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| return _response.then((data) => new Course.fromJson(data));
|
| }
|
| -
|
| }
|
|
|
| -
|
| class CoursesAliasesResourceApi {
|
| final commons.ApiRequester _requester;
|
|
|
| - CoursesAliasesResourceApi(commons.ApiRequester client) :
|
| - _requester = client;
|
| -
|
| - /**
|
| - * Creates an alias for a course.
|
| - *
|
| - * This method returns the following error codes:
|
| - *
|
| - * * `PERMISSION_DENIED` if the requesting user is not permitted to create the
|
| - * alias or for access errors.
|
| - * * `NOT_FOUND` if the course does not exist.
|
| - * * `ALREADY_EXISTS` if the alias already exists.
|
| - * * `FAILED_PRECONDITION` if the alias requested does not make sense for the
|
| - * requesting user or course (for example, if a user not in a domain
|
| - * attempts to access a domain-scoped alias).
|
| - *
|
| - * [request] - The metadata request object.
|
| - *
|
| - * Request parameters:
|
| - *
|
| - * [courseId] - Identifier of the course to alias.
|
| - * This identifier can be either the Classroom-assigned identifier or an
|
| - * alias.
|
| - *
|
| - * Completes with a [CourseAlias].
|
| - *
|
| - * Completes with a [commons.ApiRequestError] if the API endpoint returned an
|
| - * error.
|
| - *
|
| - * If the used [http.Client] completes with an error when making a REST call,
|
| - * this method will complete with the same error.
|
| - */
|
| + CoursesAliasesResourceApi(commons.ApiRequester client) : _requester = client;
|
| +
|
| + /// Creates an alias for a course.
|
| + ///
|
| + /// This method returns the following error codes:
|
| + ///
|
| + /// * `PERMISSION_DENIED` if the requesting user is not permitted to create
|
| + /// the
|
| + /// alias or for access errors.
|
| + /// * `NOT_FOUND` if the course does not exist.
|
| + /// * `ALREADY_EXISTS` if the alias already exists.
|
| + /// * `FAILED_PRECONDITION` if the alias requested does not make sense for
|
| + /// the
|
| + /// requesting user or course (for example, if a user not in a domain
|
| + /// attempts to access a domain-scoped alias).
|
| + ///
|
| + /// [request] - The metadata request object.
|
| + ///
|
| + /// Request parameters:
|
| + ///
|
| + /// [courseId] - Identifier of the course to alias.
|
| + /// This identifier can be either the Classroom-assigned identifier or an
|
| + /// alias.
|
| + ///
|
| + /// Completes with a [CourseAlias].
|
| + ///
|
| + /// Completes with a [commons.ApiRequestError] if the API endpoint returned
|
| + /// an error.
|
| + ///
|
| + /// If the used [http.Client] completes with an error when making a REST
|
| + /// call, this method will complete with the same error.
|
| async.Future<CourseAlias> create(CourseAlias request, core.String courseId) {
|
| var _url = null;
|
| var _queryParams = new core.Map();
|
| @@ -519,47 +525,47 @@ class CoursesAliasesResourceApi {
|
| throw new core.ArgumentError("Parameter courseId is required.");
|
| }
|
|
|
| - _url = 'v1/courses/' + commons.Escaper.ecapeVariable('$courseId') + '/aliases';
|
| + _url =
|
| + 'v1/courses/' + commons.Escaper.ecapeVariable('$courseId') + '/aliases';
|
|
|
| - var _response = _requester.request(_url,
|
| - "POST",
|
| - body: _body,
|
| - queryParams: _queryParams,
|
| - uploadOptions: _uploadOptions,
|
| - uploadMedia: _uploadMedia,
|
| - downloadOptions: _downloadOptions);
|
| + var _response = _requester.request(_url, "POST",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| return _response.then((data) => new CourseAlias.fromJson(data));
|
| }
|
|
|
| - /**
|
| - * Deletes an alias of a course.
|
| - *
|
| - * This method returns the following error codes:
|
| - *
|
| - * * `PERMISSION_DENIED` if the requesting user is not permitted to remove the
|
| - * alias or for access errors.
|
| - * * `NOT_FOUND` if the alias does not exist.
|
| - * * `FAILED_PRECONDITION` if the alias requested does not make sense for the
|
| - * requesting user or course (for example, if a user not in a domain
|
| - * attempts to delete a domain-scoped alias).
|
| - *
|
| - * Request parameters:
|
| - *
|
| - * [courseId] - Identifier of the course whose alias should be deleted.
|
| - * This identifier can be either the Classroom-assigned identifier or an
|
| - * alias.
|
| - *
|
| - * [alias] - Alias to delete.
|
| - * This may not be the Classroom-assigned identifier.
|
| - *
|
| - * Completes with a [Empty].
|
| - *
|
| - * Completes with a [commons.ApiRequestError] if the API endpoint returned an
|
| - * error.
|
| - *
|
| - * If the used [http.Client] completes with an error when making a REST call,
|
| - * this method will complete with the same error.
|
| - */
|
| + /// Deletes an alias of a course.
|
| + ///
|
| + /// This method returns the following error codes:
|
| + ///
|
| + /// * `PERMISSION_DENIED` if the requesting user is not permitted to remove
|
| + /// the
|
| + /// alias or for access errors.
|
| + /// * `NOT_FOUND` if the alias does not exist.
|
| + /// * `FAILED_PRECONDITION` if the alias requested does not make sense for
|
| + /// the
|
| + /// requesting user or course (for example, if a user not in a domain
|
| + /// attempts to delete a domain-scoped alias).
|
| + ///
|
| + /// Request parameters:
|
| + ///
|
| + /// [courseId] - Identifier of the course whose alias should be deleted.
|
| + /// This identifier can be either the Classroom-assigned identifier or an
|
| + /// alias.
|
| + ///
|
| + /// [alias] - Alias to delete.
|
| + /// This may not be the Classroom-assigned identifier.
|
| + ///
|
| + /// Completes with a [Empty].
|
| + ///
|
| + /// Completes with a [commons.ApiRequestError] if the API endpoint returned
|
| + /// an error.
|
| + ///
|
| + /// If the used [http.Client] completes with an error when making a REST
|
| + /// call, this method will complete with the same error.
|
| async.Future<Empty> delete(core.String courseId, core.String alias) {
|
| var _url = null;
|
| var _queryParams = new core.Map();
|
| @@ -575,56 +581,58 @@ class CoursesAliasesResourceApi {
|
| throw new core.ArgumentError("Parameter alias is required.");
|
| }
|
|
|
| - _url = 'v1/courses/' + commons.Escaper.ecapeVariable('$courseId') + '/aliases/' + commons.Escaper.ecapeVariable('$alias');
|
| + _url = 'v1/courses/' +
|
| + commons.Escaper.ecapeVariable('$courseId') +
|
| + '/aliases/' +
|
| + commons.Escaper.ecapeVariable('$alias');
|
|
|
| - var _response = _requester.request(_url,
|
| - "DELETE",
|
| - body: _body,
|
| - queryParams: _queryParams,
|
| - uploadOptions: _uploadOptions,
|
| - uploadMedia: _uploadMedia,
|
| - downloadOptions: _downloadOptions);
|
| + var _response = _requester.request(_url, "DELETE",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| return _response.then((data) => new Empty.fromJson(data));
|
| }
|
|
|
| - /**
|
| - * Returns a list of aliases for a course.
|
| - *
|
| - * This method returns the following error codes:
|
| - *
|
| - * * `PERMISSION_DENIED` if the requesting user is not permitted to access the
|
| - * course or for access errors.
|
| - * * `NOT_FOUND` if the course does not exist.
|
| - *
|
| - * Request parameters:
|
| - *
|
| - * [courseId] - The identifier of the course.
|
| - * This identifier can be either the Classroom-assigned identifier or an
|
| - * alias.
|
| - *
|
| - * [pageToken] - nextPageToken
|
| - * value returned from a previous
|
| - * list call,
|
| - * indicating that the subsequent page of results should be returned.
|
| - *
|
| - * The list request
|
| - * must be otherwise identical to the one that resulted in this token.
|
| - *
|
| - * [pageSize] - Maximum number of items to return. Zero or unspecified
|
| - * indicates that the
|
| - * server may assign a maximum.
|
| - *
|
| - * The server may return fewer than the specified number of results.
|
| - *
|
| - * Completes with a [ListCourseAliasesResponse].
|
| - *
|
| - * Completes with a [commons.ApiRequestError] if the API endpoint returned an
|
| - * error.
|
| - *
|
| - * If the used [http.Client] completes with an error when making a REST call,
|
| - * this method will complete with the same error.
|
| - */
|
| - async.Future<ListCourseAliasesResponse> list(core.String courseId, {core.String pageToken, core.int pageSize}) {
|
| + /// Returns a list of aliases for a course.
|
| + ///
|
| + /// This method returns the following error codes:
|
| + ///
|
| + /// * `PERMISSION_DENIED` if the requesting user is not permitted to access
|
| + /// the
|
| + /// course or for access errors.
|
| + /// * `NOT_FOUND` if the course does not exist.
|
| + ///
|
| + /// Request parameters:
|
| + ///
|
| + /// [courseId] - The identifier of the course.
|
| + /// This identifier can be either the Classroom-assigned identifier or an
|
| + /// alias.
|
| + ///
|
| + /// [pageToken] - nextPageToken
|
| + /// value returned from a previous
|
| + /// list call,
|
| + /// indicating that the subsequent page of results should be returned.
|
| + ///
|
| + /// The list request
|
| + /// must be otherwise identical to the one that resulted in this token.
|
| + ///
|
| + /// [pageSize] - Maximum number of items to return. Zero or unspecified
|
| + /// indicates that the
|
| + /// server may assign a maximum.
|
| + ///
|
| + /// The server may return fewer than the specified number of results.
|
| + ///
|
| + /// Completes with a [ListCourseAliasesResponse].
|
| + ///
|
| + /// Completes with a [commons.ApiRequestError] if the API endpoint returned
|
| + /// an error.
|
| + ///
|
| + /// If the used [http.Client] completes with an error when making a REST
|
| + /// call, this method will complete with the same error.
|
| + async.Future<ListCourseAliasesResponse> list(core.String courseId,
|
| + {core.String pageToken, core.int pageSize}) {
|
| var _url = null;
|
| var _queryParams = new core.Map();
|
| var _uploadMedia = null;
|
| @@ -642,65 +650,66 @@ class CoursesAliasesResourceApi {
|
| _queryParams["pageSize"] = ["${pageSize}"];
|
| }
|
|
|
| - _url = 'v1/courses/' + commons.Escaper.ecapeVariable('$courseId') + '/aliases';
|
| + _url =
|
| + 'v1/courses/' + commons.Escaper.ecapeVariable('$courseId') + '/aliases';
|
|
|
| - var _response = _requester.request(_url,
|
| - "GET",
|
| - body: _body,
|
| - queryParams: _queryParams,
|
| - uploadOptions: _uploadOptions,
|
| - uploadMedia: _uploadMedia,
|
| - downloadOptions: _downloadOptions);
|
| - return _response.then((data) => new ListCourseAliasesResponse.fromJson(data));
|
| + var _response = _requester.request(_url, "GET",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| + return _response
|
| + .then((data) => new ListCourseAliasesResponse.fromJson(data));
|
| }
|
| -
|
| }
|
|
|
| -
|
| class CoursesCourseWorkResourceApi {
|
| final commons.ApiRequester _requester;
|
|
|
| - CoursesCourseWorkStudentSubmissionsResourceApi get studentSubmissions => new CoursesCourseWorkStudentSubmissionsResourceApi(_requester);
|
| -
|
| - CoursesCourseWorkResourceApi(commons.ApiRequester client) :
|
| - _requester = client;
|
| -
|
| - /**
|
| - * Creates course work.
|
| - *
|
| - * The resulting course work (and corresponding student submissions) are
|
| - * associated with the Developer Console project of the
|
| - * [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to
|
| - * make the request. Classroom API requests to modify course work and student
|
| - * submissions must be made with an OAuth client ID from the associated
|
| - * Developer Console project.
|
| - *
|
| - * This method returns the following error codes:
|
| - *
|
| - * * `PERMISSION_DENIED` if the requesting user is not permitted to access the
|
| - * requested course, create course work in the requested course, share a
|
| - * Drive attachment, or for access errors.
|
| - * * `INVALID_ARGUMENT` if the request is malformed.
|
| - * * `NOT_FOUND` if the requested course does not exist.
|
| - * * `FAILED_PRECONDITION` for the following request error:
|
| - * * AttachmentNotVisible
|
| - *
|
| - * [request] - The metadata request object.
|
| - *
|
| - * Request parameters:
|
| - *
|
| - * [courseId] - Identifier of the course.
|
| - * This identifier can be either the Classroom-assigned identifier or an
|
| - * alias.
|
| - *
|
| - * Completes with a [CourseWork].
|
| - *
|
| - * Completes with a [commons.ApiRequestError] if the API endpoint returned an
|
| - * error.
|
| - *
|
| - * If the used [http.Client] completes with an error when making a REST call,
|
| - * this method will complete with the same error.
|
| - */
|
| + CoursesCourseWorkStudentSubmissionsResourceApi get studentSubmissions =>
|
| + new CoursesCourseWorkStudentSubmissionsResourceApi(_requester);
|
| +
|
| + CoursesCourseWorkResourceApi(commons.ApiRequester client)
|
| + : _requester = client;
|
| +
|
| + /// Creates course work.
|
| + ///
|
| + /// The resulting course work (and corresponding student submissions) are
|
| + /// associated with the Developer Console project of the
|
| + /// [OAuth client ID](https://support.google.com/cloud/answer/6158849) used
|
| + /// to
|
| + /// make the request. Classroom API requests to modify course work and
|
| + /// student
|
| + /// submissions must be made with an OAuth client ID from the associated
|
| + /// Developer Console project.
|
| + ///
|
| + /// This method returns the following error codes:
|
| + ///
|
| + /// * `PERMISSION_DENIED` if the requesting user is not permitted to access
|
| + /// the
|
| + /// requested course, create course work in the requested course, share a
|
| + /// Drive attachment, or for access errors.
|
| + /// * `INVALID_ARGUMENT` if the request is malformed.
|
| + /// * `NOT_FOUND` if the requested course does not exist.
|
| + /// * `FAILED_PRECONDITION` for the following request error:
|
| + /// * AttachmentNotVisible
|
| + ///
|
| + /// [request] - The metadata request object.
|
| + ///
|
| + /// Request parameters:
|
| + ///
|
| + /// [courseId] - Identifier of the course.
|
| + /// This identifier can be either the Classroom-assigned identifier or an
|
| + /// alias.
|
| + ///
|
| + /// Completes with a [CourseWork].
|
| + ///
|
| + /// Completes with a [commons.ApiRequestError] if the API endpoint returned
|
| + /// an error.
|
| + ///
|
| + /// If the used [http.Client] completes with an error when making a REST
|
| + /// call, this method will complete with the same error.
|
| async.Future<CourseWork> create(CourseWork request, core.String courseId) {
|
| var _url = null;
|
| var _queryParams = new core.Map();
|
| @@ -716,51 +725,51 @@ class CoursesCourseWorkResourceApi {
|
| throw new core.ArgumentError("Parameter courseId is required.");
|
| }
|
|
|
| - _url = 'v1/courses/' + commons.Escaper.ecapeVariable('$courseId') + '/courseWork';
|
| + _url = 'v1/courses/' +
|
| + commons.Escaper.ecapeVariable('$courseId') +
|
| + '/courseWork';
|
|
|
| - var _response = _requester.request(_url,
|
| - "POST",
|
| - body: _body,
|
| - queryParams: _queryParams,
|
| - uploadOptions: _uploadOptions,
|
| - uploadMedia: _uploadMedia,
|
| - downloadOptions: _downloadOptions);
|
| + var _response = _requester.request(_url, "POST",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| return _response.then((data) => new CourseWork.fromJson(data));
|
| }
|
|
|
| - /**
|
| - * Deletes a course work.
|
| - *
|
| - * This request must be made by the Developer Console project of the
|
| - * [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to
|
| - * create the corresponding course work item.
|
| - *
|
| - * This method returns the following error codes:
|
| - *
|
| - * * `PERMISSION_DENIED` if the requesting developer project did not create
|
| - * the corresponding course work, if the requesting user is not permitted
|
| - * to delete the requested course or for access errors.
|
| - * * `FAILED_PRECONDITION` if the requested course work has already been
|
| - * deleted.
|
| - * * `NOT_FOUND` if no course exists with the requested ID.
|
| - *
|
| - * Request parameters:
|
| - *
|
| - * [courseId] - Identifier of the course.
|
| - * This identifier can be either the Classroom-assigned identifier or an
|
| - * alias.
|
| - *
|
| - * [id] - Identifier of the course work to delete.
|
| - * This identifier is a Classroom-assigned identifier.
|
| - *
|
| - * Completes with a [Empty].
|
| - *
|
| - * Completes with a [commons.ApiRequestError] if the API endpoint returned an
|
| - * error.
|
| - *
|
| - * If the used [http.Client] completes with an error when making a REST call,
|
| - * this method will complete with the same error.
|
| - */
|
| + /// Deletes a course work.
|
| + ///
|
| + /// This request must be made by the Developer Console project of the
|
| + /// [OAuth client ID](https://support.google.com/cloud/answer/6158849) used
|
| + /// to
|
| + /// create the corresponding course work item.
|
| + ///
|
| + /// This method returns the following error codes:
|
| + ///
|
| + /// * `PERMISSION_DENIED` if the requesting developer project did not create
|
| + /// the corresponding course work, if the requesting user is not permitted
|
| + /// to delete the requested course or for access errors.
|
| + /// * `FAILED_PRECONDITION` if the requested course work has already been
|
| + /// deleted.
|
| + /// * `NOT_FOUND` if no course exists with the requested ID.
|
| + ///
|
| + /// Request parameters:
|
| + ///
|
| + /// [courseId] - Identifier of the course.
|
| + /// This identifier can be either the Classroom-assigned identifier or an
|
| + /// alias.
|
| + ///
|
| + /// [id] - Identifier of the course work to delete.
|
| + /// This identifier is a Classroom-assigned identifier.
|
| + ///
|
| + /// Completes with a [Empty].
|
| + ///
|
| + /// Completes with a [commons.ApiRequestError] if the API endpoint returned
|
| + /// an error.
|
| + ///
|
| + /// If the used [http.Client] completes with an error when making a REST
|
| + /// call, this method will complete with the same error.
|
| async.Future<Empty> delete(core.String courseId, core.String id) {
|
| var _url = null;
|
| var _queryParams = new core.Map();
|
| @@ -776,44 +785,45 @@ class CoursesCourseWorkResourceApi {
|
| throw new core.ArgumentError("Parameter id is required.");
|
| }
|
|
|
| - _url = 'v1/courses/' + commons.Escaper.ecapeVariable('$courseId') + '/courseWork/' + commons.Escaper.ecapeVariable('$id');
|
| + _url = 'v1/courses/' +
|
| + commons.Escaper.ecapeVariable('$courseId') +
|
| + '/courseWork/' +
|
| + commons.Escaper.ecapeVariable('$id');
|
|
|
| - var _response = _requester.request(_url,
|
| - "DELETE",
|
| - body: _body,
|
| - queryParams: _queryParams,
|
| - uploadOptions: _uploadOptions,
|
| - uploadMedia: _uploadMedia,
|
| - downloadOptions: _downloadOptions);
|
| + var _response = _requester.request(_url, "DELETE",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| return _response.then((data) => new Empty.fromJson(data));
|
| }
|
|
|
| - /**
|
| - * Returns course work.
|
| - *
|
| - * This method returns the following error codes:
|
| - *
|
| - * * `PERMISSION_DENIED` if the requesting user is not permitted to access the
|
| - * requested course or course work, or for access errors.
|
| - * * `INVALID_ARGUMENT` if the request is malformed.
|
| - * * `NOT_FOUND` if the requested course or course work does not exist.
|
| - *
|
| - * Request parameters:
|
| - *
|
| - * [courseId] - Identifier of the course.
|
| - * This identifier can be either the Classroom-assigned identifier or an
|
| - * alias.
|
| - *
|
| - * [id] - Identifier of the course work.
|
| - *
|
| - * Completes with a [CourseWork].
|
| - *
|
| - * Completes with a [commons.ApiRequestError] if the API endpoint returned an
|
| - * error.
|
| - *
|
| - * If the used [http.Client] completes with an error when making a REST call,
|
| - * this method will complete with the same error.
|
| - */
|
| + /// Returns course work.
|
| + ///
|
| + /// This method returns the following error codes:
|
| + ///
|
| + /// * `PERMISSION_DENIED` if the requesting user is not permitted to access
|
| + /// the
|
| + /// requested course or course work, or for access errors.
|
| + /// * `INVALID_ARGUMENT` if the request is malformed.
|
| + /// * `NOT_FOUND` if the requested course or course work does not exist.
|
| + ///
|
| + /// Request parameters:
|
| + ///
|
| + /// [courseId] - Identifier of the course.
|
| + /// This identifier can be either the Classroom-assigned identifier or an
|
| + /// alias.
|
| + ///
|
| + /// [id] - Identifier of the course work.
|
| + ///
|
| + /// Completes with a [CourseWork].
|
| + ///
|
| + /// Completes with a [commons.ApiRequestError] if the API endpoint returned
|
| + /// an error.
|
| + ///
|
| + /// If the used [http.Client] completes with an error when making a REST
|
| + /// call, this method will complete with the same error.
|
| async.Future<CourseWork> get(core.String courseId, core.String id) {
|
| var _url = null;
|
| var _queryParams = new core.Map();
|
| @@ -829,72 +839,76 @@ class CoursesCourseWorkResourceApi {
|
| throw new core.ArgumentError("Parameter id is required.");
|
| }
|
|
|
| - _url = 'v1/courses/' + commons.Escaper.ecapeVariable('$courseId') + '/courseWork/' + commons.Escaper.ecapeVariable('$id');
|
| + _url = 'v1/courses/' +
|
| + commons.Escaper.ecapeVariable('$courseId') +
|
| + '/courseWork/' +
|
| + commons.Escaper.ecapeVariable('$id');
|
|
|
| - var _response = _requester.request(_url,
|
| - "GET",
|
| - body: _body,
|
| - queryParams: _queryParams,
|
| - uploadOptions: _uploadOptions,
|
| - uploadMedia: _uploadMedia,
|
| - downloadOptions: _downloadOptions);
|
| + var _response = _requester.request(_url, "GET",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| return _response.then((data) => new CourseWork.fromJson(data));
|
| }
|
|
|
| - /**
|
| - * Returns a list of course work that the requester is permitted to view.
|
| - *
|
| - * Course students may only view `PUBLISHED` course work. Course teachers
|
| - * and domain administrators may view all course work.
|
| - *
|
| - * This method returns the following error codes:
|
| - *
|
| - * * `PERMISSION_DENIED` if the requesting user is not permitted to access
|
| - * the requested course or for access errors.
|
| - * * `INVALID_ARGUMENT` if the request is malformed.
|
| - * * `NOT_FOUND` if the requested course does not exist.
|
| - *
|
| - * Request parameters:
|
| - *
|
| - * [courseId] - Identifier of the course.
|
| - * This identifier can be either the Classroom-assigned identifier or an
|
| - * alias.
|
| - *
|
| - * [pageToken] - nextPageToken
|
| - * value returned from a previous
|
| - * list call,
|
| - * indicating that the subsequent page of results should be returned.
|
| - *
|
| - * The list request
|
| - * must be otherwise identical to the one that resulted in this token.
|
| - *
|
| - * [orderBy] - Optional sort ordering for results. A comma-separated list of
|
| - * fields with
|
| - * an optional sort direction keyword. Supported fields are `updateTime`
|
| - * and `dueDate`. Supported direction keywords are `asc` and `desc`.
|
| - * If not specified, `updateTime desc` is the default behavior.
|
| - * Examples: `dueDate asc,updateTime desc`, `updateTime,dueDate desc`
|
| - *
|
| - * [pageSize] - Maximum number of items to return. Zero or unspecified
|
| - * indicates that the
|
| - * server may assign a maximum.
|
| - *
|
| - * The server may return fewer than the specified number of results.
|
| - *
|
| - * [courseWorkStates] - Restriction on the work status to return. Only
|
| - * courseWork that matches
|
| - * is returned. If unspecified, items with a work status of `PUBLISHED`
|
| - * is returned.
|
| - *
|
| - * Completes with a [ListCourseWorkResponse].
|
| - *
|
| - * Completes with a [commons.ApiRequestError] if the API endpoint returned an
|
| - * error.
|
| - *
|
| - * If the used [http.Client] completes with an error when making a REST call,
|
| - * this method will complete with the same error.
|
| - */
|
| - async.Future<ListCourseWorkResponse> list(core.String courseId, {core.String pageToken, core.String orderBy, core.int pageSize, core.List<core.String> courseWorkStates}) {
|
| + /// Returns a list of course work that the requester is permitted to view.
|
| + ///
|
| + /// Course students may only view `PUBLISHED` course work. Course teachers
|
| + /// and domain administrators may view all course work.
|
| + ///
|
| + /// This method returns the following error codes:
|
| + ///
|
| + /// * `PERMISSION_DENIED` if the requesting user is not permitted to access
|
| + /// the requested course or for access errors.
|
| + /// * `INVALID_ARGUMENT` if the request is malformed.
|
| + /// * `NOT_FOUND` if the requested course does not exist.
|
| + ///
|
| + /// Request parameters:
|
| + ///
|
| + /// [courseId] - Identifier of the course.
|
| + /// This identifier can be either the Classroom-assigned identifier or an
|
| + /// alias.
|
| + ///
|
| + /// [pageToken] - nextPageToken
|
| + /// value returned from a previous
|
| + /// list call,
|
| + /// indicating that the subsequent page of results should be returned.
|
| + ///
|
| + /// The list request
|
| + /// must be otherwise identical to the one that resulted in this token.
|
| + ///
|
| + /// [orderBy] - Optional sort ordering for results. A comma-separated list of
|
| + /// fields with
|
| + /// an optional sort direction keyword. Supported fields are `updateTime`
|
| + /// and `dueDate`. Supported direction keywords are `asc` and `desc`.
|
| + /// If not specified, `updateTime desc` is the default behavior.
|
| + /// Examples: `dueDate asc,updateTime desc`, `updateTime,dueDate desc`
|
| + ///
|
| + /// [pageSize] - Maximum number of items to return. Zero or unspecified
|
| + /// indicates that the
|
| + /// server may assign a maximum.
|
| + ///
|
| + /// The server may return fewer than the specified number of results.
|
| + ///
|
| + /// [courseWorkStates] - Restriction on the work status to return. Only
|
| + /// courseWork that matches
|
| + /// is returned. If unspecified, items with a work status of `PUBLISHED`
|
| + /// is returned.
|
| + ///
|
| + /// Completes with a [ListCourseWorkResponse].
|
| + ///
|
| + /// Completes with a [commons.ApiRequestError] if the API endpoint returned
|
| + /// an error.
|
| + ///
|
| + /// If the used [http.Client] completes with an error when making a REST
|
| + /// call, this method will complete with the same error.
|
| + async.Future<ListCourseWorkResponse> list(core.String courseId,
|
| + {core.String pageToken,
|
| + core.String orderBy,
|
| + core.int pageSize,
|
| + core.List<core.String> courseWorkStates}) {
|
| var _url = null;
|
| var _queryParams = new core.Map();
|
| var _uploadMedia = null;
|
| @@ -918,78 +932,82 @@ class CoursesCourseWorkResourceApi {
|
| _queryParams["courseWorkStates"] = courseWorkStates;
|
| }
|
|
|
| - _url = 'v1/courses/' + commons.Escaper.ecapeVariable('$courseId') + '/courseWork';
|
| + _url = 'v1/courses/' +
|
| + commons.Escaper.ecapeVariable('$courseId') +
|
| + '/courseWork';
|
|
|
| - var _response = _requester.request(_url,
|
| - "GET",
|
| - body: _body,
|
| - queryParams: _queryParams,
|
| - uploadOptions: _uploadOptions,
|
| - uploadMedia: _uploadMedia,
|
| - downloadOptions: _downloadOptions);
|
| + var _response = _requester.request(_url, "GET",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| return _response.then((data) => new ListCourseWorkResponse.fromJson(data));
|
| }
|
|
|
| - /**
|
| - * Updates one or more fields of a course work.
|
| - *
|
| - * See google.classroom.v1.CourseWork for details
|
| - * of which fields may be updated and who may change them.
|
| - *
|
| - * This request must be made by the Developer Console project of the
|
| - * [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to
|
| - * create the corresponding course work item.
|
| - *
|
| - * This method returns the following error codes:
|
| - *
|
| - * * `PERMISSION_DENIED` if the requesting developer project did not create
|
| - * the corresponding course work, if the user is not permitted to make the
|
| - * requested modification to the student submission, or for
|
| - * access errors.
|
| - * * `INVALID_ARGUMENT` if the request is malformed.
|
| - * * `FAILED_PRECONDITION` if the requested course work has already been
|
| - * deleted.
|
| - * * `NOT_FOUND` if the requested course, course work, or student submission
|
| - * does not exist.
|
| - *
|
| - * [request] - The metadata request object.
|
| - *
|
| - * Request parameters:
|
| - *
|
| - * [courseId] - Identifier of the course.
|
| - * This identifier can be either the Classroom-assigned identifier or an
|
| - * alias.
|
| - *
|
| - * [id] - Identifier of the course work.
|
| - *
|
| - * [updateMask] - Mask that identifies which fields on the course work to
|
| - * update.
|
| - * This field is required to do an update. The update fails if invalid
|
| - * fields are specified. If a field supports empty values, it can be cleared
|
| - * by specifying it in the update mask and not in the CourseWork object. If a
|
| - * field that does not support empty values is included in the update mask and
|
| - * not set in the CourseWork object, an `INVALID_ARGUMENT` error will be
|
| - * returned.
|
| - *
|
| - * The following fields may be specified by teachers:
|
| - * * `title`
|
| - * * `description`
|
| - * * `state`
|
| - * * `due_date`
|
| - * * `due_time`
|
| - * * `max_points`
|
| - * * `scheduled_time`
|
| - * * `submission_modification_mode`
|
| - *
|
| - * Completes with a [CourseWork].
|
| - *
|
| - * Completes with a [commons.ApiRequestError] if the API endpoint returned an
|
| - * error.
|
| - *
|
| - * If the used [http.Client] completes with an error when making a REST call,
|
| - * this method will complete with the same error.
|
| - */
|
| - async.Future<CourseWork> patch(CourseWork request, core.String courseId, core.String id, {core.String updateMask}) {
|
| + /// Updates one or more fields of a course work.
|
| + ///
|
| + /// See google.classroom.v1.CourseWork for details
|
| + /// of which fields may be updated and who may change them.
|
| + ///
|
| + /// This request must be made by the Developer Console project of the
|
| + /// [OAuth client ID](https://support.google.com/cloud/answer/6158849) used
|
| + /// to
|
| + /// create the corresponding course work item.
|
| + ///
|
| + /// This method returns the following error codes:
|
| + ///
|
| + /// * `PERMISSION_DENIED` if the requesting developer project did not create
|
| + /// the corresponding course work, if the user is not permitted to make the
|
| + /// requested modification to the student submission, or for
|
| + /// access errors.
|
| + /// * `INVALID_ARGUMENT` if the request is malformed.
|
| + /// * `FAILED_PRECONDITION` if the requested course work has already been
|
| + /// deleted.
|
| + /// * `NOT_FOUND` if the requested course, course work, or student submission
|
| + /// does not exist.
|
| + ///
|
| + /// [request] - The metadata request object.
|
| + ///
|
| + /// Request parameters:
|
| + ///
|
| + /// [courseId] - Identifier of the course.
|
| + /// This identifier can be either the Classroom-assigned identifier or an
|
| + /// alias.
|
| + ///
|
| + /// [id] - Identifier of the course work.
|
| + ///
|
| + /// [updateMask] - Mask that identifies which fields on the course work to
|
| + /// update.
|
| + /// This field is required to do an update. The update fails if invalid
|
| + /// fields are specified. If a field supports empty values, it can be cleared
|
| + /// by specifying it in the update mask and not in the CourseWork object. If
|
| + /// a
|
| + /// field that does not support empty values is included in the update mask
|
| + /// and
|
| + /// not set in the CourseWork object, an `INVALID_ARGUMENT` error will be
|
| + /// returned.
|
| + ///
|
| + /// The following fields may be specified by teachers:
|
| + /// * `title`
|
| + /// * `description`
|
| + /// * `state`
|
| + /// * `due_date`
|
| + /// * `due_time`
|
| + /// * `max_points`
|
| + /// * `scheduled_time`
|
| + /// * `submission_modification_mode`
|
| + ///
|
| + /// Completes with a [CourseWork].
|
| + ///
|
| + /// Completes with a [commons.ApiRequestError] if the API endpoint returned
|
| + /// an error.
|
| + ///
|
| + /// If the used [http.Client] completes with an error when making a REST
|
| + /// call, this method will complete with the same error.
|
| + async.Future<CourseWork> patch(
|
| + CourseWork request, core.String courseId, core.String id,
|
| + {core.String updateMask}) {
|
| var _url = null;
|
| var _queryParams = new core.Map();
|
| var _uploadMedia = null;
|
| @@ -1010,56 +1028,56 @@ class CoursesCourseWorkResourceApi {
|
| _queryParams["updateMask"] = [updateMask];
|
| }
|
|
|
| - _url = 'v1/courses/' + commons.Escaper.ecapeVariable('$courseId') + '/courseWork/' + commons.Escaper.ecapeVariable('$id');
|
| + _url = 'v1/courses/' +
|
| + commons.Escaper.ecapeVariable('$courseId') +
|
| + '/courseWork/' +
|
| + commons.Escaper.ecapeVariable('$id');
|
|
|
| - var _response = _requester.request(_url,
|
| - "PATCH",
|
| - body: _body,
|
| - queryParams: _queryParams,
|
| - uploadOptions: _uploadOptions,
|
| - uploadMedia: _uploadMedia,
|
| - downloadOptions: _downloadOptions);
|
| + var _response = _requester.request(_url, "PATCH",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| return _response.then((data) => new CourseWork.fromJson(data));
|
| }
|
| -
|
| }
|
|
|
| -
|
| class CoursesCourseWorkStudentSubmissionsResourceApi {
|
| final commons.ApiRequester _requester;
|
|
|
| - CoursesCourseWorkStudentSubmissionsResourceApi(commons.ApiRequester client) :
|
| - _requester = client;
|
| -
|
| - /**
|
| - * Returns a student submission.
|
| - *
|
| - * * `PERMISSION_DENIED` if the requesting user is not permitted to access the
|
| - * requested course, course work, or student submission or for
|
| - * access errors.
|
| - * * `INVALID_ARGUMENT` if the request is malformed.
|
| - * * `NOT_FOUND` if the requested course, course work, or student submission
|
| - * does not exist.
|
| - *
|
| - * Request parameters:
|
| - *
|
| - * [courseId] - Identifier of the course.
|
| - * This identifier can be either the Classroom-assigned identifier or an
|
| - * alias.
|
| - *
|
| - * [courseWorkId] - Identifier of the course work.
|
| - *
|
| - * [id] - Identifier of the student submission.
|
| - *
|
| - * Completes with a [StudentSubmission].
|
| - *
|
| - * Completes with a [commons.ApiRequestError] if the API endpoint returned an
|
| - * error.
|
| - *
|
| - * If the used [http.Client] completes with an error when making a REST call,
|
| - * this method will complete with the same error.
|
| - */
|
| - async.Future<StudentSubmission> get(core.String courseId, core.String courseWorkId, core.String id) {
|
| + CoursesCourseWorkStudentSubmissionsResourceApi(commons.ApiRequester client)
|
| + : _requester = client;
|
| +
|
| + /// Returns a student submission.
|
| + ///
|
| + /// * `PERMISSION_DENIED` if the requesting user is not permitted to access
|
| + /// the
|
| + /// requested course, course work, or student submission or for
|
| + /// access errors.
|
| + /// * `INVALID_ARGUMENT` if the request is malformed.
|
| + /// * `NOT_FOUND` if the requested course, course work, or student submission
|
| + /// does not exist.
|
| + ///
|
| + /// Request parameters:
|
| + ///
|
| + /// [courseId] - Identifier of the course.
|
| + /// This identifier can be either the Classroom-assigned identifier or an
|
| + /// alias.
|
| + ///
|
| + /// [courseWorkId] - Identifier of the course work.
|
| + ///
|
| + /// [id] - Identifier of the student submission.
|
| + ///
|
| + /// Completes with a [StudentSubmission].
|
| + ///
|
| + /// Completes with a [commons.ApiRequestError] if the API endpoint returned
|
| + /// an error.
|
| + ///
|
| + /// If the used [http.Client] completes with an error when making a REST
|
| + /// call, this method will complete with the same error.
|
| + async.Future<StudentSubmission> get(
|
| + core.String courseId, core.String courseWorkId, core.String id) {
|
| var _url = null;
|
| var _queryParams = new core.Map();
|
| var _uploadMedia = null;
|
| @@ -1077,89 +1095,98 @@ class CoursesCourseWorkStudentSubmissionsResourceApi {
|
| throw new core.ArgumentError("Parameter id is required.");
|
| }
|
|
|
| - _url = 'v1/courses/' + commons.Escaper.ecapeVariable('$courseId') + '/courseWork/' + commons.Escaper.ecapeVariable('$courseWorkId') + '/studentSubmissions/' + commons.Escaper.ecapeVariable('$id');
|
| + _url = 'v1/courses/' +
|
| + commons.Escaper.ecapeVariable('$courseId') +
|
| + '/courseWork/' +
|
| + commons.Escaper.ecapeVariable('$courseWorkId') +
|
| + '/studentSubmissions/' +
|
| + commons.Escaper.ecapeVariable('$id');
|
|
|
| - var _response = _requester.request(_url,
|
| - "GET",
|
| - body: _body,
|
| - queryParams: _queryParams,
|
| - uploadOptions: _uploadOptions,
|
| - uploadMedia: _uploadMedia,
|
| - downloadOptions: _downloadOptions);
|
| + var _response = _requester.request(_url, "GET",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| return _response.then((data) => new StudentSubmission.fromJson(data));
|
| }
|
|
|
| - /**
|
| - * Returns a list of student submissions that the requester is permitted to
|
| - * view, factoring in the OAuth scopes of the request.
|
| - * `-` may be specified as the `course_work_id` to include student
|
| - * submissions for multiple course work items.
|
| - *
|
| - * Course students may only view their own work. Course teachers
|
| - * and domain administrators may view all student submissions.
|
| - *
|
| - * This method returns the following error codes:
|
| - *
|
| - * * `PERMISSION_DENIED` if the requesting user is not permitted to access the
|
| - * requested course or course work, or for access errors.
|
| - * * `INVALID_ARGUMENT` if the request is malformed.
|
| - * * `NOT_FOUND` if the requested course does not exist.
|
| - *
|
| - * Request parameters:
|
| - *
|
| - * [courseId] - Identifier of the course.
|
| - * This identifier can be either the Classroom-assigned identifier or an
|
| - * alias.
|
| - *
|
| - * [courseWorkId] - Identifier of the student work to request.
|
| - * This may be set to the string literal `"-"` to request student work for
|
| - * all course work in the specified course.
|
| - *
|
| - * [late] - Requested lateness value. If specified, returned student
|
| - * submissions are
|
| - * restricted by the requested value.
|
| - * If unspecified, submissions are returned regardless of `late` value.
|
| - * Possible string values are:
|
| - * - "LATE_VALUES_UNSPECIFIED" : A LATE_VALUES_UNSPECIFIED.
|
| - * - "LATE_ONLY" : A LATE_ONLY.
|
| - * - "NOT_LATE_ONLY" : A NOT_LATE_ONLY.
|
| - *
|
| - * [pageToken] - nextPageToken
|
| - * value returned from a previous
|
| - * list call,
|
| - * indicating that the subsequent page of results should be returned.
|
| - *
|
| - * The list request
|
| - * must be otherwise identical to the one that resulted in this token.
|
| - *
|
| - * [states] - Requested submission states. If specified, returned student
|
| - * submissions
|
| - * match one of the specified submission states.
|
| - *
|
| - * [pageSize] - Maximum number of items to return. Zero or unspecified
|
| - * indicates that the
|
| - * server may assign a maximum.
|
| - *
|
| - * The server may return fewer than the specified number of results.
|
| - *
|
| - * [userId] - Optional argument to restrict returned student work to those
|
| - * owned by the
|
| - * student with the specified identifier. The identifier can be one of the
|
| - * following:
|
| - *
|
| - * * the numeric identifier for the user
|
| - * * the email address of the user
|
| - * * the string literal `"me"`, indicating the requesting user
|
| - *
|
| - * Completes with a [ListStudentSubmissionsResponse].
|
| - *
|
| - * Completes with a [commons.ApiRequestError] if the API endpoint returned an
|
| - * error.
|
| - *
|
| - * If the used [http.Client] completes with an error when making a REST call,
|
| - * this method will complete with the same error.
|
| - */
|
| - async.Future<ListStudentSubmissionsResponse> list(core.String courseId, core.String courseWorkId, {core.String late, core.String pageToken, core.List<core.String> states, core.int pageSize, core.String userId}) {
|
| + /// Returns a list of student submissions that the requester is permitted to
|
| + /// view, factoring in the OAuth scopes of the request.
|
| + /// `-` may be specified as the `course_work_id` to include student
|
| + /// submissions for multiple course work items.
|
| + ///
|
| + /// Course students may only view their own work. Course teachers
|
| + /// and domain administrators may view all student submissions.
|
| + ///
|
| + /// This method returns the following error codes:
|
| + ///
|
| + /// * `PERMISSION_DENIED` if the requesting user is not permitted to access
|
| + /// the
|
| + /// requested course or course work, or for access errors.
|
| + /// * `INVALID_ARGUMENT` if the request is malformed.
|
| + /// * `NOT_FOUND` if the requested course does not exist.
|
| + ///
|
| + /// Request parameters:
|
| + ///
|
| + /// [courseId] - Identifier of the course.
|
| + /// This identifier can be either the Classroom-assigned identifier or an
|
| + /// alias.
|
| + ///
|
| + /// [courseWorkId] - Identifier of the student work to request.
|
| + /// This may be set to the string literal `"-"` to request student work for
|
| + /// all course work in the specified course.
|
| + ///
|
| + /// [late] - Requested lateness value. If specified, returned student
|
| + /// submissions are
|
| + /// restricted by the requested value.
|
| + /// If unspecified, submissions are returned regardless of `late` value.
|
| + /// Possible string values are:
|
| + /// - "LATE_VALUES_UNSPECIFIED" : A LATE_VALUES_UNSPECIFIED.
|
| + /// - "LATE_ONLY" : A LATE_ONLY.
|
| + /// - "NOT_LATE_ONLY" : A NOT_LATE_ONLY.
|
| + ///
|
| + /// [pageToken] - nextPageToken
|
| + /// value returned from a previous
|
| + /// list call,
|
| + /// indicating that the subsequent page of results should be returned.
|
| + ///
|
| + /// The list request
|
| + /// must be otherwise identical to the one that resulted in this token.
|
| + ///
|
| + /// [pageSize] - Maximum number of items to return. Zero or unspecified
|
| + /// indicates that the
|
| + /// server may assign a maximum.
|
| + ///
|
| + /// The server may return fewer than the specified number of results.
|
| + ///
|
| + /// [states] - Requested submission states. If specified, returned student
|
| + /// submissions
|
| + /// match one of the specified submission states.
|
| + ///
|
| + /// [userId] - Optional argument to restrict returned student work to those
|
| + /// owned by the
|
| + /// student with the specified identifier. The identifier can be one of the
|
| + /// following:
|
| + ///
|
| + /// * the numeric identifier for the user
|
| + /// * the email address of the user
|
| + /// * the string literal `"me"`, indicating the requesting user
|
| + ///
|
| + /// Completes with a [ListStudentSubmissionsResponse].
|
| + ///
|
| + /// Completes with a [commons.ApiRequestError] if the API endpoint returned
|
| + /// an error.
|
| + ///
|
| + /// If the used [http.Client] completes with an error when making a REST
|
| + /// call, this method will complete with the same error.
|
| + async.Future<ListStudentSubmissionsResponse> list(
|
| + core.String courseId, core.String courseWorkId,
|
| + {core.String late,
|
| + core.String pageToken,
|
| + core.int pageSize,
|
| + core.List<core.String> states,
|
| + core.String userId}) {
|
| var _url = null;
|
| var _queryParams = new core.Map();
|
| var _uploadMedia = null;
|
| @@ -1179,69 +1206,77 @@ class CoursesCourseWorkStudentSubmissionsResourceApi {
|
| if (pageToken != null) {
|
| _queryParams["pageToken"] = [pageToken];
|
| }
|
| - if (states != null) {
|
| - _queryParams["states"] = states;
|
| - }
|
| if (pageSize != null) {
|
| _queryParams["pageSize"] = ["${pageSize}"];
|
| }
|
| + if (states != null) {
|
| + _queryParams["states"] = states;
|
| + }
|
| if (userId != null) {
|
| _queryParams["userId"] = [userId];
|
| }
|
|
|
| - _url = 'v1/courses/' + commons.Escaper.ecapeVariable('$courseId') + '/courseWork/' + commons.Escaper.ecapeVariable('$courseWorkId') + '/studentSubmissions';
|
| -
|
| - var _response = _requester.request(_url,
|
| - "GET",
|
| - body: _body,
|
| - queryParams: _queryParams,
|
| - uploadOptions: _uploadOptions,
|
| - uploadMedia: _uploadMedia,
|
| - downloadOptions: _downloadOptions);
|
| - return _response.then((data) => new ListStudentSubmissionsResponse.fromJson(data));
|
| - }
|
| -
|
| - /**
|
| - * Modifies attachments of student submission.
|
| - *
|
| - * Attachments may only be added to student submissions belonging to course
|
| - * work objects with a `workType` of `ASSIGNMENT`.
|
| - *
|
| - * This request must be made by the Developer Console project of the
|
| - * [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to
|
| - * create the corresponding course work item.
|
| - *
|
| - * This method returns the following error codes:
|
| - *
|
| - * * `PERMISSION_DENIED` if the requesting user is not permitted to access the
|
| - * requested course or course work, if the user is not permitted to modify
|
| - * attachments on the requested student submission, or for
|
| - * access errors.
|
| - * * `INVALID_ARGUMENT` if the request is malformed.
|
| - * * `NOT_FOUND` if the requested course, course work, or student submission
|
| - * does not exist.
|
| - *
|
| - * [request] - The metadata request object.
|
| - *
|
| - * Request parameters:
|
| - *
|
| - * [courseId] - Identifier of the course.
|
| - * This identifier can be either the Classroom-assigned identifier or an
|
| - * alias.
|
| - *
|
| - * [courseWorkId] - Identifier of the course work.
|
| - *
|
| - * [id] - Identifier of the student submission.
|
| - *
|
| - * Completes with a [StudentSubmission].
|
| - *
|
| - * Completes with a [commons.ApiRequestError] if the API endpoint returned an
|
| - * error.
|
| - *
|
| - * If the used [http.Client] completes with an error when making a REST call,
|
| - * this method will complete with the same error.
|
| - */
|
| - async.Future<StudentSubmission> modifyAttachments(ModifyAttachmentsRequest request, core.String courseId, core.String courseWorkId, core.String id) {
|
| + _url = 'v1/courses/' +
|
| + commons.Escaper.ecapeVariable('$courseId') +
|
| + '/courseWork/' +
|
| + commons.Escaper.ecapeVariable('$courseWorkId') +
|
| + '/studentSubmissions';
|
| +
|
| + var _response = _requester.request(_url, "GET",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| + return _response
|
| + .then((data) => new ListStudentSubmissionsResponse.fromJson(data));
|
| + }
|
| +
|
| + /// Modifies attachments of student submission.
|
| + ///
|
| + /// Attachments may only be added to student submissions belonging to course
|
| + /// work objects with a `workType` of `ASSIGNMENT`.
|
| + ///
|
| + /// This request must be made by the Developer Console project of the
|
| + /// [OAuth client ID](https://support.google.com/cloud/answer/6158849) used
|
| + /// to
|
| + /// create the corresponding course work item.
|
| + ///
|
| + /// This method returns the following error codes:
|
| + ///
|
| + /// * `PERMISSION_DENIED` if the requesting user is not permitted to access
|
| + /// the
|
| + /// requested course or course work, if the user is not permitted to modify
|
| + /// attachments on the requested student submission, or for
|
| + /// access errors.
|
| + /// * `INVALID_ARGUMENT` if the request is malformed.
|
| + /// * `NOT_FOUND` if the requested course, course work, or student submission
|
| + /// does not exist.
|
| + ///
|
| + /// [request] - The metadata request object.
|
| + ///
|
| + /// Request parameters:
|
| + ///
|
| + /// [courseId] - Identifier of the course.
|
| + /// This identifier can be either the Classroom-assigned identifier or an
|
| + /// alias.
|
| + ///
|
| + /// [courseWorkId] - Identifier of the course work.
|
| + ///
|
| + /// [id] - Identifier of the student submission.
|
| + ///
|
| + /// Completes with a [StudentSubmission].
|
| + ///
|
| + /// Completes with a [commons.ApiRequestError] if the API endpoint returned
|
| + /// an error.
|
| + ///
|
| + /// If the used [http.Client] completes with an error when making a REST
|
| + /// call, this method will complete with the same error.
|
| + async.Future<StudentSubmission> modifyAttachments(
|
| + ModifyAttachmentsRequest request,
|
| + core.String courseId,
|
| + core.String courseWorkId,
|
| + core.String id) {
|
| var _url = null;
|
| var _queryParams = new core.Map();
|
| var _uploadMedia = null;
|
| @@ -1262,68 +1297,74 @@ class CoursesCourseWorkStudentSubmissionsResourceApi {
|
| throw new core.ArgumentError("Parameter id is required.");
|
| }
|
|
|
| - _url = 'v1/courses/' + commons.Escaper.ecapeVariable('$courseId') + '/courseWork/' + commons.Escaper.ecapeVariable('$courseWorkId') + '/studentSubmissions/' + commons.Escaper.ecapeVariable('$id') + ':modifyAttachments';
|
| -
|
| - var _response = _requester.request(_url,
|
| - "POST",
|
| - body: _body,
|
| - queryParams: _queryParams,
|
| - uploadOptions: _uploadOptions,
|
| - uploadMedia: _uploadMedia,
|
| - downloadOptions: _downloadOptions);
|
| + _url = 'v1/courses/' +
|
| + commons.Escaper.ecapeVariable('$courseId') +
|
| + '/courseWork/' +
|
| + commons.Escaper.ecapeVariable('$courseWorkId') +
|
| + '/studentSubmissions/' +
|
| + commons.Escaper.ecapeVariable('$id') +
|
| + ':modifyAttachments';
|
| +
|
| + var _response = _requester.request(_url, "POST",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| return _response.then((data) => new StudentSubmission.fromJson(data));
|
| }
|
|
|
| - /**
|
| - * Updates one or more fields of a student submission.
|
| - *
|
| - * See google.classroom.v1.StudentSubmission for details
|
| - * of which fields may be updated and who may change them.
|
| - *
|
| - * This request must be made by the Developer Console project of the
|
| - * [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to
|
| - * create the corresponding course work item.
|
| - *
|
| - * This method returns the following error codes:
|
| - *
|
| - * * `PERMISSION_DENIED` if the requesting developer project did not create
|
| - * the corresponding course work, if the user is not permitted to make the
|
| - * requested modification to the student submission, or for
|
| - * access errors.
|
| - * * `INVALID_ARGUMENT` if the request is malformed.
|
| - * * `NOT_FOUND` if the requested course, course work, or student submission
|
| - * does not exist.
|
| - *
|
| - * [request] - The metadata request object.
|
| - *
|
| - * Request parameters:
|
| - *
|
| - * [courseId] - Identifier of the course.
|
| - * This identifier can be either the Classroom-assigned identifier or an
|
| - * alias.
|
| - *
|
| - * [courseWorkId] - Identifier of the course work.
|
| - *
|
| - * [id] - Identifier of the student submission.
|
| - *
|
| - * [updateMask] - Mask that identifies which fields on the student submission
|
| - * to update.
|
| - * This field is required to do an update. The update fails if invalid
|
| - * fields are specified.
|
| - *
|
| - * The following fields may be specified by teachers:
|
| - * * `draft_grade`
|
| - * * `assigned_grade`
|
| - *
|
| - * Completes with a [StudentSubmission].
|
| - *
|
| - * Completes with a [commons.ApiRequestError] if the API endpoint returned an
|
| - * error.
|
| - *
|
| - * If the used [http.Client] completes with an error when making a REST call,
|
| - * this method will complete with the same error.
|
| - */
|
| - async.Future<StudentSubmission> patch(StudentSubmission request, core.String courseId, core.String courseWorkId, core.String id, {core.String updateMask}) {
|
| + /// Updates one or more fields of a student submission.
|
| + ///
|
| + /// See google.classroom.v1.StudentSubmission for details
|
| + /// of which fields may be updated and who may change them.
|
| + ///
|
| + /// This request must be made by the Developer Console project of the
|
| + /// [OAuth client ID](https://support.google.com/cloud/answer/6158849) used
|
| + /// to
|
| + /// create the corresponding course work item.
|
| + ///
|
| + /// This method returns the following error codes:
|
| + ///
|
| + /// * `PERMISSION_DENIED` if the requesting developer project did not create
|
| + /// the corresponding course work, if the user is not permitted to make the
|
| + /// requested modification to the student submission, or for
|
| + /// access errors.
|
| + /// * `INVALID_ARGUMENT` if the request is malformed.
|
| + /// * `NOT_FOUND` if the requested course, course work, or student submission
|
| + /// does not exist.
|
| + ///
|
| + /// [request] - The metadata request object.
|
| + ///
|
| + /// Request parameters:
|
| + ///
|
| + /// [courseId] - Identifier of the course.
|
| + /// This identifier can be either the Classroom-assigned identifier or an
|
| + /// alias.
|
| + ///
|
| + /// [courseWorkId] - Identifier of the course work.
|
| + ///
|
| + /// [id] - Identifier of the student submission.
|
| + ///
|
| + /// [updateMask] - Mask that identifies which fields on the student
|
| + /// submission to update.
|
| + /// This field is required to do an update. The update fails if invalid
|
| + /// fields are specified.
|
| + ///
|
| + /// The following fields may be specified by teachers:
|
| + /// * `draft_grade`
|
| + /// * `assigned_grade`
|
| + ///
|
| + /// Completes with a [StudentSubmission].
|
| + ///
|
| + /// Completes with a [commons.ApiRequestError] if the API endpoint returned
|
| + /// an error.
|
| + ///
|
| + /// If the used [http.Client] completes with an error when making a REST
|
| + /// call, this method will complete with the same error.
|
| + async.Future<StudentSubmission> patch(StudentSubmission request,
|
| + core.String courseId, core.String courseWorkId, core.String id,
|
| + {core.String updateMask}) {
|
| var _url = null;
|
| var _queryParams = new core.Map();
|
| var _uploadMedia = null;
|
| @@ -1347,62 +1388,68 @@ class CoursesCourseWorkStudentSubmissionsResourceApi {
|
| _queryParams["updateMask"] = [updateMask];
|
| }
|
|
|
| - _url = 'v1/courses/' + commons.Escaper.ecapeVariable('$courseId') + '/courseWork/' + commons.Escaper.ecapeVariable('$courseWorkId') + '/studentSubmissions/' + commons.Escaper.ecapeVariable('$id');
|
| + _url = 'v1/courses/' +
|
| + commons.Escaper.ecapeVariable('$courseId') +
|
| + '/courseWork/' +
|
| + commons.Escaper.ecapeVariable('$courseWorkId') +
|
| + '/studentSubmissions/' +
|
| + commons.Escaper.ecapeVariable('$id');
|
|
|
| - var _response = _requester.request(_url,
|
| - "PATCH",
|
| - body: _body,
|
| - queryParams: _queryParams,
|
| - uploadOptions: _uploadOptions,
|
| - uploadMedia: _uploadMedia,
|
| - downloadOptions: _downloadOptions);
|
| + var _response = _requester.request(_url, "PATCH",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| return _response.then((data) => new StudentSubmission.fromJson(data));
|
| }
|
|
|
| - /**
|
| - * Reclaims a student submission on behalf of the student that owns it.
|
| - *
|
| - * Reclaiming a student submission transfers ownership of attached Drive
|
| - * files to the student and update the submission state.
|
| - *
|
| - * Only the student that owns the requested student submission may call this
|
| - * method, and only for a student submission that has been turned in.
|
| - *
|
| - * This request must be made by the Developer Console project of the
|
| - * [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to
|
| - * create the corresponding course work item.
|
| - *
|
| - * This method returns the following error codes:
|
| - *
|
| - * * `PERMISSION_DENIED` if the requesting user is not permitted to access the
|
| - * requested course or course work, unsubmit the requested student submission,
|
| - * or for access errors.
|
| - * * `FAILED_PRECONDITION` if the student submission has not been turned in.
|
| - * * `INVALID_ARGUMENT` if the request is malformed.
|
| - * * `NOT_FOUND` if the requested course, course work, or student submission
|
| - * does not exist.
|
| - *
|
| - * [request] - The metadata request object.
|
| - *
|
| - * Request parameters:
|
| - *
|
| - * [courseId] - Identifier of the course.
|
| - * This identifier can be either the Classroom-assigned identifier or an
|
| - * alias.
|
| - *
|
| - * [courseWorkId] - Identifier of the course work.
|
| - *
|
| - * [id] - Identifier of the student submission.
|
| - *
|
| - * Completes with a [Empty].
|
| - *
|
| - * Completes with a [commons.ApiRequestError] if the API endpoint returned an
|
| - * error.
|
| - *
|
| - * If the used [http.Client] completes with an error when making a REST call,
|
| - * this method will complete with the same error.
|
| - */
|
| - async.Future<Empty> reclaim(ReclaimStudentSubmissionRequest request, core.String courseId, core.String courseWorkId, core.String id) {
|
| + /// Reclaims a student submission on behalf of the student that owns it.
|
| + ///
|
| + /// Reclaiming a student submission transfers ownership of attached Drive
|
| + /// files to the student and update the submission state.
|
| + ///
|
| + /// Only the student that owns the requested student submission may call this
|
| + /// method, and only for a student submission that has been turned in.
|
| + ///
|
| + /// This request must be made by the Developer Console project of the
|
| + /// [OAuth client ID](https://support.google.com/cloud/answer/6158849) used
|
| + /// to
|
| + /// create the corresponding course work item.
|
| + ///
|
| + /// This method returns the following error codes:
|
| + ///
|
| + /// * `PERMISSION_DENIED` if the requesting user is not permitted to access
|
| + /// the
|
| + /// requested course or course work, unsubmit the requested student
|
| + /// submission,
|
| + /// or for access errors.
|
| + /// * `FAILED_PRECONDITION` if the student submission has not been turned in.
|
| + /// * `INVALID_ARGUMENT` if the request is malformed.
|
| + /// * `NOT_FOUND` if the requested course, course work, or student submission
|
| + /// does not exist.
|
| + ///
|
| + /// [request] - The metadata request object.
|
| + ///
|
| + /// Request parameters:
|
| + ///
|
| + /// [courseId] - Identifier of the course.
|
| + /// This identifier can be either the Classroom-assigned identifier or an
|
| + /// alias.
|
| + ///
|
| + /// [courseWorkId] - Identifier of the course work.
|
| + ///
|
| + /// [id] - Identifier of the student submission.
|
| + ///
|
| + /// Completes with a [Empty].
|
| + ///
|
| + /// Completes with a [commons.ApiRequestError] if the API endpoint returned
|
| + /// an error.
|
| + ///
|
| + /// If the used [http.Client] completes with an error when making a REST
|
| + /// call, this method will complete with the same error.
|
| + async.Future<Empty> reclaim(ReclaimStudentSubmissionRequest request,
|
| + core.String courseId, core.String courseWorkId, core.String id) {
|
| var _url = null;
|
| var _queryParams = new core.Map();
|
| var _uploadMedia = null;
|
| @@ -1423,63 +1470,70 @@ class CoursesCourseWorkStudentSubmissionsResourceApi {
|
| throw new core.ArgumentError("Parameter id is required.");
|
| }
|
|
|
| - _url = 'v1/courses/' + commons.Escaper.ecapeVariable('$courseId') + '/courseWork/' + commons.Escaper.ecapeVariable('$courseWorkId') + '/studentSubmissions/' + commons.Escaper.ecapeVariable('$id') + ':reclaim';
|
| -
|
| - var _response = _requester.request(_url,
|
| - "POST",
|
| - body: _body,
|
| - queryParams: _queryParams,
|
| - uploadOptions: _uploadOptions,
|
| - uploadMedia: _uploadMedia,
|
| - downloadOptions: _downloadOptions);
|
| + _url = 'v1/courses/' +
|
| + commons.Escaper.ecapeVariable('$courseId') +
|
| + '/courseWork/' +
|
| + commons.Escaper.ecapeVariable('$courseWorkId') +
|
| + '/studentSubmissions/' +
|
| + commons.Escaper.ecapeVariable('$id') +
|
| + ':reclaim';
|
| +
|
| + var _response = _requester.request(_url, "POST",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| return _response.then((data) => new Empty.fromJson(data));
|
| }
|
|
|
| - /**
|
| - * Returns a student submission.
|
| - *
|
| - * Returning a student submission transfers ownership of attached Drive
|
| - * files to the student and may also update the submission state.
|
| - * Unlike the Classroom application, returning a student submission does not
|
| - * set assignedGrade to the draftGrade value.
|
| - *
|
| - * Only a teacher of the course that contains the requested student submission
|
| - * may call this method.
|
| - *
|
| - * This request must be made by the Developer Console project of the
|
| - * [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to
|
| - * create the corresponding course work item.
|
| - *
|
| - * This method returns the following error codes:
|
| - *
|
| - * * `PERMISSION_DENIED` if the requesting user is not permitted to access the
|
| - * requested course or course work, return the requested student submission,
|
| - * or for access errors.
|
| - * * `INVALID_ARGUMENT` if the request is malformed.
|
| - * * `NOT_FOUND` if the requested course, course work, or student submission
|
| - * does not exist.
|
| - *
|
| - * [request] - The metadata request object.
|
| - *
|
| - * Request parameters:
|
| - *
|
| - * [courseId] - Identifier of the course.
|
| - * This identifier can be either the Classroom-assigned identifier or an
|
| - * alias.
|
| - *
|
| - * [courseWorkId] - Identifier of the course work.
|
| - *
|
| - * [id] - Identifier of the student submission.
|
| - *
|
| - * Completes with a [Empty].
|
| - *
|
| - * Completes with a [commons.ApiRequestError] if the API endpoint returned an
|
| - * error.
|
| - *
|
| - * If the used [http.Client] completes with an error when making a REST call,
|
| - * this method will complete with the same error.
|
| - */
|
| - async.Future<Empty> return_(ReturnStudentSubmissionRequest request, core.String courseId, core.String courseWorkId, core.String id) {
|
| + /// Returns a student submission.
|
| + ///
|
| + /// Returning a student submission transfers ownership of attached Drive
|
| + /// files to the student and may also update the submission state.
|
| + /// Unlike the Classroom application, returning a student submission does not
|
| + /// set assignedGrade to the draftGrade value.
|
| + ///
|
| + /// Only a teacher of the course that contains the requested student
|
| + /// submission
|
| + /// may call this method.
|
| + ///
|
| + /// This request must be made by the Developer Console project of the
|
| + /// [OAuth client ID](https://support.google.com/cloud/answer/6158849) used
|
| + /// to
|
| + /// create the corresponding course work item.
|
| + ///
|
| + /// This method returns the following error codes:
|
| + ///
|
| + /// * `PERMISSION_DENIED` if the requesting user is not permitted to access
|
| + /// the
|
| + /// requested course or course work, return the requested student submission,
|
| + /// or for access errors.
|
| + /// * `INVALID_ARGUMENT` if the request is malformed.
|
| + /// * `NOT_FOUND` if the requested course, course work, or student submission
|
| + /// does not exist.
|
| + ///
|
| + /// [request] - The metadata request object.
|
| + ///
|
| + /// Request parameters:
|
| + ///
|
| + /// [courseId] - Identifier of the course.
|
| + /// This identifier can be either the Classroom-assigned identifier or an
|
| + /// alias.
|
| + ///
|
| + /// [courseWorkId] - Identifier of the course work.
|
| + ///
|
| + /// [id] - Identifier of the student submission.
|
| + ///
|
| + /// Completes with a [Empty].
|
| + ///
|
| + /// Completes with a [commons.ApiRequestError] if the API endpoint returned
|
| + /// an error.
|
| + ///
|
| + /// If the used [http.Client] completes with an error when making a REST
|
| + /// call, this method will complete with the same error.
|
| + async.Future<Empty> return_(ReturnStudentSubmissionRequest request,
|
| + core.String courseId, core.String courseWorkId, core.String id) {
|
| var _url = null;
|
| var _queryParams = new core.Map();
|
| var _uploadMedia = null;
|
| @@ -1500,61 +1554,68 @@ class CoursesCourseWorkStudentSubmissionsResourceApi {
|
| throw new core.ArgumentError("Parameter id is required.");
|
| }
|
|
|
| - _url = 'v1/courses/' + commons.Escaper.ecapeVariable('$courseId') + '/courseWork/' + commons.Escaper.ecapeVariable('$courseWorkId') + '/studentSubmissions/' + commons.Escaper.ecapeVariable('$id') + ':return';
|
| -
|
| - var _response = _requester.request(_url,
|
| - "POST",
|
| - body: _body,
|
| - queryParams: _queryParams,
|
| - uploadOptions: _uploadOptions,
|
| - uploadMedia: _uploadMedia,
|
| - downloadOptions: _downloadOptions);
|
| + _url = 'v1/courses/' +
|
| + commons.Escaper.ecapeVariable('$courseId') +
|
| + '/courseWork/' +
|
| + commons.Escaper.ecapeVariable('$courseWorkId') +
|
| + '/studentSubmissions/' +
|
| + commons.Escaper.ecapeVariable('$id') +
|
| + ':return';
|
| +
|
| + var _response = _requester.request(_url, "POST",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| return _response.then((data) => new Empty.fromJson(data));
|
| }
|
|
|
| - /**
|
| - * Turns in a student submission.
|
| - *
|
| - * Turning in a student submission transfers ownership of attached Drive
|
| - * files to the teacher and may also update the submission state.
|
| - *
|
| - * This may only be called by the student that owns the specified student
|
| - * submission.
|
| - *
|
| - * This request must be made by the Developer Console project of the
|
| - * [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to
|
| - * create the corresponding course work item.
|
| - *
|
| - * This method returns the following error codes:
|
| - *
|
| - * * `PERMISSION_DENIED` if the requesting user is not permitted to access the
|
| - * requested course or course work, turn in the requested student submission,
|
| - * or for access errors.
|
| - * * `INVALID_ARGUMENT` if the request is malformed.
|
| - * * `NOT_FOUND` if the requested course, course work, or student submission
|
| - * does not exist.
|
| - *
|
| - * [request] - The metadata request object.
|
| - *
|
| - * Request parameters:
|
| - *
|
| - * [courseId] - Identifier of the course.
|
| - * This identifier can be either the Classroom-assigned identifier or an
|
| - * alias.
|
| - *
|
| - * [courseWorkId] - Identifier of the course work.
|
| - *
|
| - * [id] - Identifier of the student submission.
|
| - *
|
| - * Completes with a [Empty].
|
| - *
|
| - * Completes with a [commons.ApiRequestError] if the API endpoint returned an
|
| - * error.
|
| - *
|
| - * If the used [http.Client] completes with an error when making a REST call,
|
| - * this method will complete with the same error.
|
| - */
|
| - async.Future<Empty> turnIn(TurnInStudentSubmissionRequest request, core.String courseId, core.String courseWorkId, core.String id) {
|
| + /// Turns in a student submission.
|
| + ///
|
| + /// Turning in a student submission transfers ownership of attached Drive
|
| + /// files to the teacher and may also update the submission state.
|
| + ///
|
| + /// This may only be called by the student that owns the specified student
|
| + /// submission.
|
| + ///
|
| + /// This request must be made by the Developer Console project of the
|
| + /// [OAuth client ID](https://support.google.com/cloud/answer/6158849) used
|
| + /// to
|
| + /// create the corresponding course work item.
|
| + ///
|
| + /// This method returns the following error codes:
|
| + ///
|
| + /// * `PERMISSION_DENIED` if the requesting user is not permitted to access
|
| + /// the
|
| + /// requested course or course work, turn in the requested student
|
| + /// submission,
|
| + /// or for access errors.
|
| + /// * `INVALID_ARGUMENT` if the request is malformed.
|
| + /// * `NOT_FOUND` if the requested course, course work, or student submission
|
| + /// does not exist.
|
| + ///
|
| + /// [request] - The metadata request object.
|
| + ///
|
| + /// Request parameters:
|
| + ///
|
| + /// [courseId] - Identifier of the course.
|
| + /// This identifier can be either the Classroom-assigned identifier or an
|
| + /// alias.
|
| + ///
|
| + /// [courseWorkId] - Identifier of the course work.
|
| + ///
|
| + /// [id] - Identifier of the student submission.
|
| + ///
|
| + /// Completes with a [Empty].
|
| + ///
|
| + /// Completes with a [commons.ApiRequestError] if the API endpoint returned
|
| + /// an error.
|
| + ///
|
| + /// If the used [http.Client] completes with an error when making a REST
|
| + /// call, this method will complete with the same error.
|
| + async.Future<Empty> turnIn(TurnInStudentSubmissionRequest request,
|
| + core.String courseId, core.String courseWorkId, core.String id) {
|
| var _url = null;
|
| var _queryParams = new core.Map();
|
| var _uploadMedia = null;
|
| @@ -1575,65 +1636,67 @@ class CoursesCourseWorkStudentSubmissionsResourceApi {
|
| throw new core.ArgumentError("Parameter id is required.");
|
| }
|
|
|
| - _url = 'v1/courses/' + commons.Escaper.ecapeVariable('$courseId') + '/courseWork/' + commons.Escaper.ecapeVariable('$courseWorkId') + '/studentSubmissions/' + commons.Escaper.ecapeVariable('$id') + ':turnIn';
|
| -
|
| - var _response = _requester.request(_url,
|
| - "POST",
|
| - body: _body,
|
| - queryParams: _queryParams,
|
| - uploadOptions: _uploadOptions,
|
| - uploadMedia: _uploadMedia,
|
| - downloadOptions: _downloadOptions);
|
| + _url = 'v1/courses/' +
|
| + commons.Escaper.ecapeVariable('$courseId') +
|
| + '/courseWork/' +
|
| + commons.Escaper.ecapeVariable('$courseWorkId') +
|
| + '/studentSubmissions/' +
|
| + commons.Escaper.ecapeVariable('$id') +
|
| + ':turnIn';
|
| +
|
| + var _response = _requester.request(_url, "POST",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| return _response.then((data) => new Empty.fromJson(data));
|
| }
|
| -
|
| }
|
|
|
| -
|
| class CoursesStudentsResourceApi {
|
| final commons.ApiRequester _requester;
|
|
|
| - CoursesStudentsResourceApi(commons.ApiRequester client) :
|
| - _requester = client;
|
| -
|
| - /**
|
| - * 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.
|
| - *
|
| - * [request] - The metadata request object.
|
| - *
|
| - * Request parameters:
|
| - *
|
| - * [courseId] - Identifier of the course to create the student in.
|
| - * This identifier can be either the Classroom-assigned identifier or an
|
| - * alias.
|
| - *
|
| - * [enrollmentCode] - 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.
|
| - *
|
| - * Completes with a [Student].
|
| - *
|
| - * Completes with a [commons.ApiRequestError] if the API endpoint returned an
|
| - * error.
|
| - *
|
| - * If the used [http.Client] completes with an error when making a REST call,
|
| - * this method will complete with the same error.
|
| - */
|
| - async.Future<Student> create(Student request, core.String courseId, {core.String enrollmentCode}) {
|
| + CoursesStudentsResourceApi(commons.ApiRequester client) : _requester = client;
|
| +
|
| + /// 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.
|
| + ///
|
| + /// [request] - The metadata request object.
|
| + ///
|
| + /// Request parameters:
|
| + ///
|
| + /// [courseId] - Identifier of the course to create the student in.
|
| + /// This identifier can be either the Classroom-assigned identifier or an
|
| + /// alias.
|
| + ///
|
| + /// [enrollmentCode] - 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.
|
| + ///
|
| + /// Completes with a [Student].
|
| + ///
|
| + /// Completes with a [commons.ApiRequestError] if the API endpoint returned
|
| + /// an error.
|
| + ///
|
| + /// If the used [http.Client] completes with an error when making a REST
|
| + /// call, this method will complete with the same error.
|
| + async.Future<Student> create(Student request, core.String courseId,
|
| + {core.String enrollmentCode}) {
|
| var _url = null;
|
| var _queryParams = new core.Map();
|
| var _uploadMedia = null;
|
| @@ -1651,50 +1714,49 @@ class CoursesStudentsResourceApi {
|
| _queryParams["enrollmentCode"] = [enrollmentCode];
|
| }
|
|
|
| - _url = 'v1/courses/' + commons.Escaper.ecapeVariable('$courseId') + '/students';
|
| + _url = 'v1/courses/' +
|
| + commons.Escaper.ecapeVariable('$courseId') +
|
| + '/students';
|
|
|
| - var _response = _requester.request(_url,
|
| - "POST",
|
| - body: _body,
|
| - queryParams: _queryParams,
|
| - uploadOptions: _uploadOptions,
|
| - uploadMedia: _uploadMedia,
|
| - downloadOptions: _downloadOptions);
|
| + var _response = _requester.request(_url, "POST",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| return _response.then((data) => new Student.fromJson(data));
|
| }
|
|
|
| - /**
|
| - * Deletes a student of a course.
|
| - *
|
| - * This method returns the following error codes:
|
| - *
|
| - * * `PERMISSION_DENIED` if the requesting user is not permitted to delete
|
| - * students of this course or for access errors.
|
| - * * `NOT_FOUND` if no student of this course has the requested ID or if the
|
| - * course does not exist.
|
| - *
|
| - * Request parameters:
|
| - *
|
| - * [courseId] - Identifier of the course.
|
| - * This identifier can be either the Classroom-assigned identifier or an
|
| - * alias.
|
| - *
|
| - * [userId] - Identifier of the student to delete. The identifier can be one
|
| - * of the
|
| - * following:
|
| - *
|
| - * * the numeric identifier for the user
|
| - * * the email address of the user
|
| - * * the string literal `"me"`, indicating the requesting user
|
| - *
|
| - * Completes with a [Empty].
|
| - *
|
| - * Completes with a [commons.ApiRequestError] if the API endpoint returned an
|
| - * error.
|
| - *
|
| - * If the used [http.Client] completes with an error when making a REST call,
|
| - * this method will complete with the same error.
|
| - */
|
| + /// Deletes a student of a course.
|
| + ///
|
| + /// This method returns the following error codes:
|
| + ///
|
| + /// * `PERMISSION_DENIED` if the requesting user is not permitted to delete
|
| + /// students of this course or for access errors.
|
| + /// * `NOT_FOUND` if no student of this course has the requested ID or if the
|
| + /// course does not exist.
|
| + ///
|
| + /// Request parameters:
|
| + ///
|
| + /// [courseId] - Identifier of the course.
|
| + /// This identifier can be either the Classroom-assigned identifier or an
|
| + /// alias.
|
| + ///
|
| + /// [userId] - Identifier of the student to delete. The identifier can be one
|
| + /// of the
|
| + /// following:
|
| + ///
|
| + /// * the numeric identifier for the user
|
| + /// * the email address of the user
|
| + /// * the string literal `"me"`, indicating the requesting user
|
| + ///
|
| + /// Completes with a [Empty].
|
| + ///
|
| + /// Completes with a [commons.ApiRequestError] if the API endpoint returned
|
| + /// an error.
|
| + ///
|
| + /// If the used [http.Client] completes with an error when making a REST
|
| + /// call, this method will complete with the same error.
|
| async.Future<Empty> delete(core.String courseId, core.String userId) {
|
| var _url = null;
|
| var _queryParams = new core.Map();
|
| @@ -1710,50 +1772,50 @@ class CoursesStudentsResourceApi {
|
| throw new core.ArgumentError("Parameter userId is required.");
|
| }
|
|
|
| - _url = 'v1/courses/' + commons.Escaper.ecapeVariable('$courseId') + '/students/' + commons.Escaper.ecapeVariable('$userId');
|
| + _url = 'v1/courses/' +
|
| + commons.Escaper.ecapeVariable('$courseId') +
|
| + '/students/' +
|
| + commons.Escaper.ecapeVariable('$userId');
|
|
|
| - var _response = _requester.request(_url,
|
| - "DELETE",
|
| - body: _body,
|
| - queryParams: _queryParams,
|
| - uploadOptions: _uploadOptions,
|
| - uploadMedia: _uploadMedia,
|
| - downloadOptions: _downloadOptions);
|
| + var _response = _requester.request(_url, "DELETE",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| return _response.then((data) => new Empty.fromJson(data));
|
| }
|
|
|
| - /**
|
| - * Returns a student of a course.
|
| - *
|
| - * This method returns the following error codes:
|
| - *
|
| - * * `PERMISSION_DENIED` if the requesting user is not permitted to view
|
| - * students of this course or for access errors.
|
| - * * `NOT_FOUND` if no student of this course has the requested ID or if the
|
| - * course does not exist.
|
| - *
|
| - * Request parameters:
|
| - *
|
| - * [courseId] - Identifier of the course.
|
| - * This identifier can be either the Classroom-assigned identifier or an
|
| - * alias.
|
| - *
|
| - * [userId] - Identifier of the student to return. The identifier can be one
|
| - * of the
|
| - * following:
|
| - *
|
| - * * the numeric identifier for the user
|
| - * * the email address of the user
|
| - * * the string literal `"me"`, indicating the requesting user
|
| - *
|
| - * Completes with a [Student].
|
| - *
|
| - * Completes with a [commons.ApiRequestError] if the API endpoint returned an
|
| - * error.
|
| - *
|
| - * If the used [http.Client] completes with an error when making a REST call,
|
| - * this method will complete with the same error.
|
| - */
|
| + /// Returns a student of a course.
|
| + ///
|
| + /// This method returns the following error codes:
|
| + ///
|
| + /// * `PERMISSION_DENIED` if the requesting user is not permitted to view
|
| + /// students of this course or for access errors.
|
| + /// * `NOT_FOUND` if no student of this course has the requested ID or if the
|
| + /// course does not exist.
|
| + ///
|
| + /// Request parameters:
|
| + ///
|
| + /// [courseId] - Identifier of the course.
|
| + /// This identifier can be either the Classroom-assigned identifier or an
|
| + /// alias.
|
| + ///
|
| + /// [userId] - Identifier of the student to return. The identifier can be one
|
| + /// of the
|
| + /// following:
|
| + ///
|
| + /// * the numeric identifier for the user
|
| + /// * the email address of the user
|
| + /// * the string literal `"me"`, indicating the requesting user
|
| + ///
|
| + /// Completes with a [Student].
|
| + ///
|
| + /// Completes with a [commons.ApiRequestError] if the API endpoint returned
|
| + /// an error.
|
| + ///
|
| + /// If the used [http.Client] completes with an error when making a REST
|
| + /// call, this method will complete with the same error.
|
| async.Future<Student> get(core.String courseId, core.String userId) {
|
| var _url = null;
|
| var _queryParams = new core.Map();
|
| @@ -1769,54 +1831,55 @@ class CoursesStudentsResourceApi {
|
| throw new core.ArgumentError("Parameter userId is required.");
|
| }
|
|
|
| - _url = 'v1/courses/' + commons.Escaper.ecapeVariable('$courseId') + '/students/' + commons.Escaper.ecapeVariable('$userId');
|
| + _url = 'v1/courses/' +
|
| + commons.Escaper.ecapeVariable('$courseId') +
|
| + '/students/' +
|
| + commons.Escaper.ecapeVariable('$userId');
|
|
|
| - var _response = _requester.request(_url,
|
| - "GET",
|
| - body: _body,
|
| - queryParams: _queryParams,
|
| - uploadOptions: _uploadOptions,
|
| - uploadMedia: _uploadMedia,
|
| - downloadOptions: _downloadOptions);
|
| + var _response = _requester.request(_url, "GET",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| return _response.then((data) => new Student.fromJson(data));
|
| }
|
|
|
| - /**
|
| - * Returns a list of students of this course that the requester
|
| - * is permitted to view.
|
| - *
|
| - * This method returns the following error codes:
|
| - *
|
| - * * `NOT_FOUND` if the course does not exist.
|
| - * * `PERMISSION_DENIED` for access errors.
|
| - *
|
| - * Request parameters:
|
| - *
|
| - * [courseId] - Identifier of the course.
|
| - * This identifier can be either the Classroom-assigned identifier or an
|
| - * alias.
|
| - *
|
| - * [pageToken] - nextPageToken
|
| - * value returned from a previous
|
| - * list call, indicating that
|
| - * the subsequent page of results should be returned.
|
| - *
|
| - * The list request must be
|
| - * otherwise identical to the one that resulted in this token.
|
| - *
|
| - * [pageSize] - Maximum number of items to return. Zero means no maximum.
|
| - *
|
| - * The server may return fewer than the specified number of results.
|
| - *
|
| - * Completes with a [ListStudentsResponse].
|
| - *
|
| - * Completes with a [commons.ApiRequestError] if the API endpoint returned an
|
| - * error.
|
| - *
|
| - * If the used [http.Client] completes with an error when making a REST call,
|
| - * this method will complete with the same error.
|
| - */
|
| - async.Future<ListStudentsResponse> list(core.String courseId, {core.String pageToken, core.int pageSize}) {
|
| + /// Returns a list of students of this course that the requester
|
| + /// is permitted to view.
|
| + ///
|
| + /// This method returns the following error codes:
|
| + ///
|
| + /// * `NOT_FOUND` if the course does not exist.
|
| + /// * `PERMISSION_DENIED` for access errors.
|
| + ///
|
| + /// Request parameters:
|
| + ///
|
| + /// [courseId] - Identifier of the course.
|
| + /// This identifier can be either the Classroom-assigned identifier or an
|
| + /// alias.
|
| + ///
|
| + /// [pageToken] - nextPageToken
|
| + /// value returned from a previous
|
| + /// list call, indicating that
|
| + /// the subsequent page of results should be returned.
|
| + ///
|
| + /// The list request must be
|
| + /// otherwise identical to the one that resulted in this token.
|
| + ///
|
| + /// [pageSize] - Maximum number of items to return. Zero means no maximum.
|
| + ///
|
| + /// The server may return fewer than the specified number of results.
|
| + ///
|
| + /// Completes with a [ListStudentsResponse].
|
| + ///
|
| + /// Completes with a [commons.ApiRequestError] if the API endpoint returned
|
| + /// an error.
|
| + ///
|
| + /// If the used [http.Client] completes with an error when making a REST
|
| + /// call, this method will complete with the same error.
|
| + async.Future<ListStudentsResponse> list(core.String courseId,
|
| + {core.String pageToken, core.int pageSize}) {
|
| var _url = null;
|
| var _queryParams = new core.Map();
|
| var _uploadMedia = null;
|
| @@ -1834,60 +1897,56 @@ class CoursesStudentsResourceApi {
|
| _queryParams["pageSize"] = ["${pageSize}"];
|
| }
|
|
|
| - _url = 'v1/courses/' + commons.Escaper.ecapeVariable('$courseId') + '/students';
|
| + _url = 'v1/courses/' +
|
| + commons.Escaper.ecapeVariable('$courseId') +
|
| + '/students';
|
|
|
| - var _response = _requester.request(_url,
|
| - "GET",
|
| - body: _body,
|
| - queryParams: _queryParams,
|
| - uploadOptions: _uploadOptions,
|
| - uploadMedia: _uploadMedia,
|
| - downloadOptions: _downloadOptions);
|
| + var _response = _requester.request(_url, "GET",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| return _response.then((data) => new ListStudentsResponse.fromJson(data));
|
| }
|
| -
|
| }
|
|
|
| -
|
| class CoursesTeachersResourceApi {
|
| final commons.ApiRequester _requester;
|
|
|
| - CoursesTeachersResourceApi(commons.ApiRequester client) :
|
| - _requester = client;
|
| -
|
| - /**
|
| - * 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.
|
| - *
|
| - * [request] - The metadata request object.
|
| - *
|
| - * Request parameters:
|
| - *
|
| - * [courseId] - Identifier of the course.
|
| - * This identifier can be either the Classroom-assigned identifier or an
|
| - * alias.
|
| - *
|
| - * Completes with a [Teacher].
|
| - *
|
| - * Completes with a [commons.ApiRequestError] if the API endpoint returned an
|
| - * error.
|
| - *
|
| - * If the used [http.Client] completes with an error when making a REST call,
|
| - * this method will complete with the same error.
|
| - */
|
| + CoursesTeachersResourceApi(commons.ApiRequester client) : _requester = client;
|
| +
|
| + /// 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.
|
| + ///
|
| + /// [request] - The metadata request object.
|
| + ///
|
| + /// Request parameters:
|
| + ///
|
| + /// [courseId] - Identifier of the course.
|
| + /// This identifier can be either the Classroom-assigned identifier or an
|
| + /// alias.
|
| + ///
|
| + /// Completes with a [Teacher].
|
| + ///
|
| + /// Completes with a [commons.ApiRequestError] if the API endpoint returned
|
| + /// an error.
|
| + ///
|
| + /// If the used [http.Client] completes with an error when making a REST
|
| + /// call, this method will complete with the same error.
|
| async.Future<Teacher> create(Teacher request, core.String courseId) {
|
| var _url = null;
|
| var _queryParams = new core.Map();
|
| @@ -1903,52 +1962,52 @@ class CoursesTeachersResourceApi {
|
| throw new core.ArgumentError("Parameter courseId is required.");
|
| }
|
|
|
| - _url = 'v1/courses/' + commons.Escaper.ecapeVariable('$courseId') + '/teachers';
|
| + _url = 'v1/courses/' +
|
| + commons.Escaper.ecapeVariable('$courseId') +
|
| + '/teachers';
|
|
|
| - var _response = _requester.request(_url,
|
| - "POST",
|
| - body: _body,
|
| - queryParams: _queryParams,
|
| - uploadOptions: _uploadOptions,
|
| - uploadMedia: _uploadMedia,
|
| - downloadOptions: _downloadOptions);
|
| + var _response = _requester.request(_url, "POST",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| return _response.then((data) => new Teacher.fromJson(data));
|
| }
|
|
|
| - /**
|
| - * Deletes a teacher of a course.
|
| - *
|
| - * This method returns the following error codes:
|
| - *
|
| - * * `PERMISSION_DENIED` if the requesting user is not permitted to delete
|
| - * teachers of this course or for access errors.
|
| - * * `NOT_FOUND` if no teacher of this course has the requested ID or if the
|
| - * course does not exist.
|
| - * * `FAILED_PRECONDITION` if the requested ID belongs to the primary teacher
|
| - * of this course.
|
| - *
|
| - * Request parameters:
|
| - *
|
| - * [courseId] - Identifier of the course.
|
| - * This identifier can be either the Classroom-assigned identifier or an
|
| - * alias.
|
| - *
|
| - * [userId] - Identifier of the teacher to delete. The identifier can be one
|
| - * of the
|
| - * following:
|
| - *
|
| - * * the numeric identifier for the user
|
| - * * the email address of the user
|
| - * * the string literal `"me"`, indicating the requesting user
|
| - *
|
| - * Completes with a [Empty].
|
| - *
|
| - * Completes with a [commons.ApiRequestError] if the API endpoint returned an
|
| - * error.
|
| - *
|
| - * If the used [http.Client] completes with an error when making a REST call,
|
| - * this method will complete with the same error.
|
| - */
|
| + /// Deletes a teacher of a course.
|
| + ///
|
| + /// This method returns the following error codes:
|
| + ///
|
| + /// * `PERMISSION_DENIED` if the requesting user is not permitted to delete
|
| + /// teachers of this course or for access errors.
|
| + /// * `NOT_FOUND` if no teacher of this course has the requested ID or if the
|
| + /// course does not exist.
|
| + /// * `FAILED_PRECONDITION` if the requested ID belongs to the primary
|
| + /// teacher
|
| + /// of this course.
|
| + ///
|
| + /// Request parameters:
|
| + ///
|
| + /// [courseId] - Identifier of the course.
|
| + /// This identifier can be either the Classroom-assigned identifier or an
|
| + /// alias.
|
| + ///
|
| + /// [userId] - Identifier of the teacher to delete. The identifier can be one
|
| + /// of the
|
| + /// following:
|
| + ///
|
| + /// * the numeric identifier for the user
|
| + /// * the email address of the user
|
| + /// * the string literal `"me"`, indicating the requesting user
|
| + ///
|
| + /// Completes with a [Empty].
|
| + ///
|
| + /// Completes with a [commons.ApiRequestError] if the API endpoint returned
|
| + /// an error.
|
| + ///
|
| + /// If the used [http.Client] completes with an error when making a REST
|
| + /// call, this method will complete with the same error.
|
| async.Future<Empty> delete(core.String courseId, core.String userId) {
|
| var _url = null;
|
| var _queryParams = new core.Map();
|
| @@ -1964,50 +2023,50 @@ class CoursesTeachersResourceApi {
|
| throw new core.ArgumentError("Parameter userId is required.");
|
| }
|
|
|
| - _url = 'v1/courses/' + commons.Escaper.ecapeVariable('$courseId') + '/teachers/' + commons.Escaper.ecapeVariable('$userId');
|
| + _url = 'v1/courses/' +
|
| + commons.Escaper.ecapeVariable('$courseId') +
|
| + '/teachers/' +
|
| + commons.Escaper.ecapeVariable('$userId');
|
|
|
| - var _response = _requester.request(_url,
|
| - "DELETE",
|
| - body: _body,
|
| - queryParams: _queryParams,
|
| - uploadOptions: _uploadOptions,
|
| - uploadMedia: _uploadMedia,
|
| - downloadOptions: _downloadOptions);
|
| + var _response = _requester.request(_url, "DELETE",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| return _response.then((data) => new Empty.fromJson(data));
|
| }
|
|
|
| - /**
|
| - * Returns a teacher of a course.
|
| - *
|
| - * This method returns the following error codes:
|
| - *
|
| - * * `PERMISSION_DENIED` if the requesting user is not permitted to view
|
| - * teachers of this course or for access errors.
|
| - * * `NOT_FOUND` if no teacher of this course has the requested ID or if the
|
| - * course does not exist.
|
| - *
|
| - * Request parameters:
|
| - *
|
| - * [courseId] - Identifier of the course.
|
| - * This identifier can be either the Classroom-assigned identifier or an
|
| - * alias.
|
| - *
|
| - * [userId] - Identifier of the teacher to return. The identifier can be one
|
| - * of the
|
| - * following:
|
| - *
|
| - * * the numeric identifier for the user
|
| - * * the email address of the user
|
| - * * the string literal `"me"`, indicating the requesting user
|
| - *
|
| - * Completes with a [Teacher].
|
| - *
|
| - * Completes with a [commons.ApiRequestError] if the API endpoint returned an
|
| - * error.
|
| - *
|
| - * If the used [http.Client] completes with an error when making a REST call,
|
| - * this method will complete with the same error.
|
| - */
|
| + /// Returns a teacher of a course.
|
| + ///
|
| + /// This method returns the following error codes:
|
| + ///
|
| + /// * `PERMISSION_DENIED` if the requesting user is not permitted to view
|
| + /// teachers of this course or for access errors.
|
| + /// * `NOT_FOUND` if no teacher of this course has the requested ID or if the
|
| + /// course does not exist.
|
| + ///
|
| + /// Request parameters:
|
| + ///
|
| + /// [courseId] - Identifier of the course.
|
| + /// This identifier can be either the Classroom-assigned identifier or an
|
| + /// alias.
|
| + ///
|
| + /// [userId] - Identifier of the teacher to return. The identifier can be one
|
| + /// of the
|
| + /// following:
|
| + ///
|
| + /// * the numeric identifier for the user
|
| + /// * the email address of the user
|
| + /// * the string literal `"me"`, indicating the requesting user
|
| + ///
|
| + /// Completes with a [Teacher].
|
| + ///
|
| + /// Completes with a [commons.ApiRequestError] if the API endpoint returned
|
| + /// an error.
|
| + ///
|
| + /// If the used [http.Client] completes with an error when making a REST
|
| + /// call, this method will complete with the same error.
|
| async.Future<Teacher> get(core.String courseId, core.String userId) {
|
| var _url = null;
|
| var _queryParams = new core.Map();
|
| @@ -2023,54 +2082,55 @@ class CoursesTeachersResourceApi {
|
| throw new core.ArgumentError("Parameter userId is required.");
|
| }
|
|
|
| - _url = 'v1/courses/' + commons.Escaper.ecapeVariable('$courseId') + '/teachers/' + commons.Escaper.ecapeVariable('$userId');
|
| + _url = 'v1/courses/' +
|
| + commons.Escaper.ecapeVariable('$courseId') +
|
| + '/teachers/' +
|
| + commons.Escaper.ecapeVariable('$userId');
|
|
|
| - var _response = _requester.request(_url,
|
| - "GET",
|
| - body: _body,
|
| - queryParams: _queryParams,
|
| - uploadOptions: _uploadOptions,
|
| - uploadMedia: _uploadMedia,
|
| - downloadOptions: _downloadOptions);
|
| + var _response = _requester.request(_url, "GET",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| return _response.then((data) => new Teacher.fromJson(data));
|
| }
|
|
|
| - /**
|
| - * Returns a list of teachers of this course that the requester
|
| - * is permitted to view.
|
| - *
|
| - * This method returns the following error codes:
|
| - *
|
| - * * `NOT_FOUND` if the course does not exist.
|
| - * * `PERMISSION_DENIED` for access errors.
|
| - *
|
| - * Request parameters:
|
| - *
|
| - * [courseId] - Identifier of the course.
|
| - * This identifier can be either the Classroom-assigned identifier or an
|
| - * alias.
|
| - *
|
| - * [pageToken] - nextPageToken
|
| - * value returned from a previous
|
| - * list call, indicating that
|
| - * the subsequent page of results should be returned.
|
| - *
|
| - * The list request must be
|
| - * otherwise identical to the one that resulted in this token.
|
| - *
|
| - * [pageSize] - Maximum number of items to return. Zero means no maximum.
|
| - *
|
| - * The server may return fewer than the specified number of results.
|
| - *
|
| - * Completes with a [ListTeachersResponse].
|
| - *
|
| - * Completes with a [commons.ApiRequestError] if the API endpoint returned an
|
| - * error.
|
| - *
|
| - * If the used [http.Client] completes with an error when making a REST call,
|
| - * this method will complete with the same error.
|
| - */
|
| - async.Future<ListTeachersResponse> list(core.String courseId, {core.String pageToken, core.int pageSize}) {
|
| + /// Returns a list of teachers of this course that the requester
|
| + /// is permitted to view.
|
| + ///
|
| + /// This method returns the following error codes:
|
| + ///
|
| + /// * `NOT_FOUND` if the course does not exist.
|
| + /// * `PERMISSION_DENIED` for access errors.
|
| + ///
|
| + /// Request parameters:
|
| + ///
|
| + /// [courseId] - Identifier of the course.
|
| + /// This identifier can be either the Classroom-assigned identifier or an
|
| + /// alias.
|
| + ///
|
| + /// [pageToken] - nextPageToken
|
| + /// value returned from a previous
|
| + /// list call, indicating that
|
| + /// the subsequent page of results should be returned.
|
| + ///
|
| + /// The list request must be
|
| + /// otherwise identical to the one that resulted in this token.
|
| + ///
|
| + /// [pageSize] - Maximum number of items to return. Zero means no maximum.
|
| + ///
|
| + /// The server may return fewer than the specified number of results.
|
| + ///
|
| + /// Completes with a [ListTeachersResponse].
|
| + ///
|
| + /// Completes with a [commons.ApiRequestError] if the API endpoint returned
|
| + /// an error.
|
| + ///
|
| + /// If the used [http.Client] completes with an error when making a REST
|
| + /// call, this method will complete with the same error.
|
| + async.Future<ListTeachersResponse> list(core.String courseId,
|
| + {core.String pageToken, core.int pageSize}) {
|
| var _url = null;
|
| var _queryParams = new core.Map();
|
| var _uploadMedia = null;
|
| @@ -2088,55 +2148,52 @@ class CoursesTeachersResourceApi {
|
| _queryParams["pageSize"] = ["${pageSize}"];
|
| }
|
|
|
| - _url = 'v1/courses/' + commons.Escaper.ecapeVariable('$courseId') + '/teachers';
|
| + _url = 'v1/courses/' +
|
| + commons.Escaper.ecapeVariable('$courseId') +
|
| + '/teachers';
|
|
|
| - var _response = _requester.request(_url,
|
| - "GET",
|
| - body: _body,
|
| - queryParams: _queryParams,
|
| - uploadOptions: _uploadOptions,
|
| - uploadMedia: _uploadMedia,
|
| - downloadOptions: _downloadOptions);
|
| + var _response = _requester.request(_url, "GET",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| return _response.then((data) => new ListTeachersResponse.fromJson(data));
|
| }
|
| -
|
| }
|
|
|
| -
|
| class InvitationsResourceApi {
|
| final commons.ApiRequester _requester;
|
|
|
| - InvitationsResourceApi(commons.ApiRequester client) :
|
| - _requester = client;
|
| -
|
| - /**
|
| - * Accepts an invitation, removing it and adding the invited user to the
|
| - * teachers or students (as appropriate) of the specified course. Only the
|
| - * invited user may accept an invitation.
|
| - *
|
| - * This method returns the following error codes:
|
| - *
|
| - * * `PERMISSION_DENIED` if the requesting user is not permitted to accept the
|
| - * requested invitation or for access errors.
|
| - * * `FAILED_PRECONDITION` for the following request errors:
|
| - * * CourseMemberLimitReached
|
| - * * CourseNotModifiable
|
| - * * CourseTeacherLimitReached
|
| - * * UserGroupsMembershipLimitReached
|
| - * * `NOT_FOUND` if no invitation exists with the requested ID.
|
| - *
|
| - * Request parameters:
|
| - *
|
| - * [id] - Identifier of the invitation to accept.
|
| - *
|
| - * Completes with a [Empty].
|
| - *
|
| - * Completes with a [commons.ApiRequestError] if the API endpoint returned an
|
| - * error.
|
| - *
|
| - * If the used [http.Client] completes with an error when making a REST call,
|
| - * this method will complete with the same error.
|
| - */
|
| + InvitationsResourceApi(commons.ApiRequester client) : _requester = client;
|
| +
|
| + /// Accepts an invitation, removing it and adding the invited user to the
|
| + /// teachers or students (as appropriate) of the specified course. Only the
|
| + /// invited user may accept an invitation.
|
| + ///
|
| + /// This method returns the following error codes:
|
| + ///
|
| + /// * `PERMISSION_DENIED` if the requesting user is not permitted to accept
|
| + /// the
|
| + /// requested invitation or for access errors.
|
| + /// * `FAILED_PRECONDITION` for the following request errors:
|
| + /// * CourseMemberLimitReached
|
| + /// * CourseNotModifiable
|
| + /// * CourseTeacherLimitReached
|
| + /// * UserGroupsMembershipLimitReached
|
| + /// * `NOT_FOUND` if no invitation exists with the requested ID.
|
| + ///
|
| + /// Request parameters:
|
| + ///
|
| + /// [id] - Identifier of the invitation to accept.
|
| + ///
|
| + /// Completes with a [Empty].
|
| + ///
|
| + /// Completes with a [commons.ApiRequestError] if the API endpoint returned
|
| + /// an error.
|
| + ///
|
| + /// If the used [http.Client] completes with an error when making a REST
|
| + /// call, this method will complete with the same error.
|
| async.Future<Empty> accept(core.String id) {
|
| var _url = null;
|
| var _queryParams = new core.Map();
|
| @@ -2151,42 +2208,40 @@ class InvitationsResourceApi {
|
|
|
| _url = 'v1/invitations/' + commons.Escaper.ecapeVariable('$id') + ':accept';
|
|
|
| - var _response = _requester.request(_url,
|
| - "POST",
|
| - body: _body,
|
| - queryParams: _queryParams,
|
| - uploadOptions: _uploadOptions,
|
| - uploadMedia: _uploadMedia,
|
| - downloadOptions: _downloadOptions);
|
| + var _response = _requester.request(_url, "POST",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| return _response.then((data) => new Empty.fromJson(data));
|
| }
|
|
|
| - /**
|
| - * Creates an invitation. Only one invitation for a user and course may exist
|
| - * at a time. Delete and re-create an invitation to make changes.
|
| - *
|
| - * This method returns the following error codes:
|
| - *
|
| - * * `PERMISSION_DENIED` if the requesting user is not permitted to create
|
| - * invitations for this course or for access errors.
|
| - * * `NOT_FOUND` if the course or the user does not exist.
|
| - * * `FAILED_PRECONDITION` if the requested user's account is disabled or if
|
| - * the user already has this role or a role with greater permissions.
|
| - * * `ALREADY_EXISTS` if an invitation for the specified user and course
|
| - * already exists.
|
| - *
|
| - * [request] - The metadata request object.
|
| - *
|
| - * Request parameters:
|
| - *
|
| - * Completes with a [Invitation].
|
| - *
|
| - * Completes with a [commons.ApiRequestError] if the API endpoint returned an
|
| - * error.
|
| - *
|
| - * If the used [http.Client] completes with an error when making a REST call,
|
| - * this method will complete with the same error.
|
| - */
|
| + /// Creates an invitation. Only one invitation for a user and course may
|
| + /// exist
|
| + /// at a time. Delete and re-create an invitation to make changes.
|
| + ///
|
| + /// This method returns the following error codes:
|
| + ///
|
| + /// * `PERMISSION_DENIED` if the requesting user is not permitted to create
|
| + /// invitations for this course or for access errors.
|
| + /// * `NOT_FOUND` if the course or the user does not exist.
|
| + /// * `FAILED_PRECONDITION` if the requested user's account is disabled or if
|
| + /// the user already has this role or a role with greater permissions.
|
| + /// * `ALREADY_EXISTS` if an invitation for the specified user and course
|
| + /// already exists.
|
| + ///
|
| + /// [request] - The metadata request object.
|
| + ///
|
| + /// Request parameters:
|
| + ///
|
| + /// Completes with a [Invitation].
|
| + ///
|
| + /// Completes with a [commons.ApiRequestError] if the API endpoint returned
|
| + /// an error.
|
| + ///
|
| + /// If the used [http.Client] completes with an error when making a REST
|
| + /// call, this method will complete with the same error.
|
| async.Future<Invitation> create(Invitation request) {
|
| var _url = null;
|
| var _queryParams = new core.Map();
|
| @@ -2201,37 +2256,35 @@ class InvitationsResourceApi {
|
|
|
| _url = 'v1/invitations';
|
|
|
| - var _response = _requester.request(_url,
|
| - "POST",
|
| - body: _body,
|
| - queryParams: _queryParams,
|
| - uploadOptions: _uploadOptions,
|
| - uploadMedia: _uploadMedia,
|
| - downloadOptions: _downloadOptions);
|
| + var _response = _requester.request(_url, "POST",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| return _response.then((data) => new Invitation.fromJson(data));
|
| }
|
|
|
| - /**
|
| - * Deletes an invitation.
|
| - *
|
| - * This method returns the following error codes:
|
| - *
|
| - * * `PERMISSION_DENIED` if the requesting user is not permitted to delete the
|
| - * requested invitation or for access errors.
|
| - * * `NOT_FOUND` if no invitation exists with the requested ID.
|
| - *
|
| - * Request parameters:
|
| - *
|
| - * [id] - Identifier of the invitation to delete.
|
| - *
|
| - * Completes with a [Empty].
|
| - *
|
| - * Completes with a [commons.ApiRequestError] if the API endpoint returned an
|
| - * error.
|
| - *
|
| - * If the used [http.Client] completes with an error when making a REST call,
|
| - * this method will complete with the same error.
|
| - */
|
| + /// Deletes an invitation.
|
| + ///
|
| + /// This method returns the following error codes:
|
| + ///
|
| + /// * `PERMISSION_DENIED` if the requesting user is not permitted to delete
|
| + /// the
|
| + /// requested invitation or for access errors.
|
| + /// * `NOT_FOUND` if no invitation exists with the requested ID.
|
| + ///
|
| + /// Request parameters:
|
| + ///
|
| + /// [id] - Identifier of the invitation to delete.
|
| + ///
|
| + /// Completes with a [Empty].
|
| + ///
|
| + /// Completes with a [commons.ApiRequestError] if the API endpoint returned
|
| + /// an error.
|
| + ///
|
| + /// If the used [http.Client] completes with an error when making a REST
|
| + /// call, this method will complete with the same error.
|
| async.Future<Empty> delete(core.String id) {
|
| var _url = null;
|
| var _queryParams = new core.Map();
|
| @@ -2246,37 +2299,34 @@ class InvitationsResourceApi {
|
|
|
| _url = 'v1/invitations/' + commons.Escaper.ecapeVariable('$id');
|
|
|
| - var _response = _requester.request(_url,
|
| - "DELETE",
|
| - body: _body,
|
| - queryParams: _queryParams,
|
| - uploadOptions: _uploadOptions,
|
| - uploadMedia: _uploadMedia,
|
| - downloadOptions: _downloadOptions);
|
| + var _response = _requester.request(_url, "DELETE",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| return _response.then((data) => new Empty.fromJson(data));
|
| }
|
|
|
| - /**
|
| - * Returns an invitation.
|
| - *
|
| - * This method returns the following error codes:
|
| - *
|
| - * * `PERMISSION_DENIED` if the requesting user is not permitted to view the
|
| - * requested invitation or for access errors.
|
| - * * `NOT_FOUND` if no invitation exists with the requested ID.
|
| - *
|
| - * Request parameters:
|
| - *
|
| - * [id] - Identifier of the invitation to return.
|
| - *
|
| - * Completes with a [Invitation].
|
| - *
|
| - * Completes with a [commons.ApiRequestError] if the API endpoint returned an
|
| - * error.
|
| - *
|
| - * If the used [http.Client] completes with an error when making a REST call,
|
| - * this method will complete with the same error.
|
| - */
|
| + /// Returns an invitation.
|
| + ///
|
| + /// This method returns the following error codes:
|
| + ///
|
| + /// * `PERMISSION_DENIED` if the requesting user is not permitted to view the
|
| + /// requested invitation or for access errors.
|
| + /// * `NOT_FOUND` if no invitation exists with the requested ID.
|
| + ///
|
| + /// Request parameters:
|
| + ///
|
| + /// [id] - Identifier of the invitation to return.
|
| + ///
|
| + /// Completes with a [Invitation].
|
| + ///
|
| + /// Completes with a [commons.ApiRequestError] if the API endpoint returned
|
| + /// an error.
|
| + ///
|
| + /// If the used [http.Client] completes with an error when making a REST
|
| + /// call, this method will complete with the same error.
|
| async.Future<Invitation> get(core.String id) {
|
| var _url = null;
|
| var _queryParams = new core.Map();
|
| @@ -2291,62 +2341,63 @@ class InvitationsResourceApi {
|
|
|
| _url = 'v1/invitations/' + commons.Escaper.ecapeVariable('$id');
|
|
|
| - var _response = _requester.request(_url,
|
| - "GET",
|
| - body: _body,
|
| - queryParams: _queryParams,
|
| - uploadOptions: _uploadOptions,
|
| - uploadMedia: _uploadMedia,
|
| - downloadOptions: _downloadOptions);
|
| + var _response = _requester.request(_url, "GET",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| return _response.then((data) => new Invitation.fromJson(data));
|
| }
|
|
|
| - /**
|
| - * Returns a list of invitations that the requesting user is permitted to
|
| - * view, restricted to those that match the list request.
|
| - *
|
| - * *Note:* At least one of `user_id` or `course_id` must be supplied. Both
|
| - * fields can be supplied.
|
| - *
|
| - * This method returns the following error codes:
|
| - *
|
| - * * `PERMISSION_DENIED` for access errors.
|
| - *
|
| - * Request parameters:
|
| - *
|
| - * [pageToken] - nextPageToken
|
| - * value returned from a previous
|
| - * list call, indicating
|
| - * that the subsequent page of results should be returned.
|
| - *
|
| - * The list request must be
|
| - * otherwise identical to the one that resulted in this token.
|
| - *
|
| - * [userId] - Restricts returned invitations to those for a specific user. The
|
| - * identifier
|
| - * can be one of the following:
|
| - *
|
| - * * the numeric identifier for the user
|
| - * * the email address of the user
|
| - * * the string literal `"me"`, indicating the requesting user
|
| - *
|
| - * [pageSize] - Maximum number of items to return. Zero means no maximum.
|
| - *
|
| - * The server may return fewer than the specified number of results.
|
| - *
|
| - * [courseId] - Restricts returned invitations to those for a course with the
|
| - * specified
|
| - * identifier.
|
| - *
|
| - * Completes with a [ListInvitationsResponse].
|
| - *
|
| - * Completes with a [commons.ApiRequestError] if the API endpoint returned an
|
| - * error.
|
| - *
|
| - * If the used [http.Client] completes with an error when making a REST call,
|
| - * this method will complete with the same error.
|
| - */
|
| - async.Future<ListInvitationsResponse> list({core.String pageToken, core.String userId, core.int pageSize, core.String courseId}) {
|
| + /// Returns a list of invitations that the requesting user is permitted to
|
| + /// view, restricted to those that match the list request.
|
| + ///
|
| + /// *Note:* At least one of `user_id` or `course_id` must be supplied. Both
|
| + /// fields can be supplied.
|
| + ///
|
| + /// This method returns the following error codes:
|
| + ///
|
| + /// * `PERMISSION_DENIED` for access errors.
|
| + ///
|
| + /// Request parameters:
|
| + ///
|
| + /// [pageToken] - nextPageToken
|
| + /// value returned from a previous
|
| + /// list call, indicating
|
| + /// that the subsequent page of results should be returned.
|
| + ///
|
| + /// The list request must be
|
| + /// otherwise identical to the one that resulted in this token.
|
| + ///
|
| + /// [userId] - Restricts returned invitations to those for a specific user.
|
| + /// The identifier
|
| + /// can be one of the following:
|
| + ///
|
| + /// * the numeric identifier for the user
|
| + /// * the email address of the user
|
| + /// * the string literal `"me"`, indicating the requesting user
|
| + ///
|
| + /// [pageSize] - Maximum number of items to return. Zero means no maximum.
|
| + ///
|
| + /// The server may return fewer than the specified number of results.
|
| + ///
|
| + /// [courseId] - Restricts returned invitations to those for a course with
|
| + /// the specified
|
| + /// identifier.
|
| + ///
|
| + /// Completes with a [ListInvitationsResponse].
|
| + ///
|
| + /// Completes with a [commons.ApiRequestError] if the API endpoint returned
|
| + /// an error.
|
| + ///
|
| + /// If the used [http.Client] completes with an error when making a REST
|
| + /// call, this method will complete with the same error.
|
| + async.Future<ListInvitationsResponse> list(
|
| + {core.String pageToken,
|
| + core.String userId,
|
| + core.int pageSize,
|
| + core.String courseId}) {
|
| var _url = null;
|
| var _queryParams = new core.Map();
|
| var _uploadMedia = null;
|
| @@ -2369,55 +2420,51 @@ class InvitationsResourceApi {
|
|
|
| _url = 'v1/invitations';
|
|
|
| - var _response = _requester.request(_url,
|
| - "GET",
|
| - body: _body,
|
| - queryParams: _queryParams,
|
| - uploadOptions: _uploadOptions,
|
| - uploadMedia: _uploadMedia,
|
| - downloadOptions: _downloadOptions);
|
| + var _response = _requester.request(_url, "GET",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| return _response.then((data) => new ListInvitationsResponse.fromJson(data));
|
| }
|
| -
|
| }
|
|
|
| -
|
| class UserProfilesResourceApi {
|
| final commons.ApiRequester _requester;
|
|
|
| - UserProfilesGuardianInvitationsResourceApi get guardianInvitations => new UserProfilesGuardianInvitationsResourceApi(_requester);
|
| - UserProfilesGuardiansResourceApi get guardians => new UserProfilesGuardiansResourceApi(_requester);
|
| -
|
| - UserProfilesResourceApi(commons.ApiRequester client) :
|
| - _requester = client;
|
| -
|
| - /**
|
| - * Returns a user profile.
|
| - *
|
| - * This method returns the following error codes:
|
| - *
|
| - * * `PERMISSION_DENIED` if the requesting user is not permitted to access
|
| - * this user profile, if no profile exists with the requested ID, or for
|
| - * access errors.
|
| - *
|
| - * Request parameters:
|
| - *
|
| - * [userId] - Identifier of the profile to return. The identifier can be one
|
| - * of the
|
| - * following:
|
| - *
|
| - * * the numeric identifier for the user
|
| - * * the email address of the user
|
| - * * the string literal `"me"`, indicating the requesting user
|
| - *
|
| - * Completes with a [UserProfile].
|
| - *
|
| - * Completes with a [commons.ApiRequestError] if the API endpoint returned an
|
| - * error.
|
| - *
|
| - * If the used [http.Client] completes with an error when making a REST call,
|
| - * this method will complete with the same error.
|
| - */
|
| + UserProfilesGuardianInvitationsResourceApi get guardianInvitations =>
|
| + new UserProfilesGuardianInvitationsResourceApi(_requester);
|
| + UserProfilesGuardiansResourceApi get guardians =>
|
| + new UserProfilesGuardiansResourceApi(_requester);
|
| +
|
| + UserProfilesResourceApi(commons.ApiRequester client) : _requester = client;
|
| +
|
| + /// Returns a user profile.
|
| + ///
|
| + /// This method returns the following error codes:
|
| + ///
|
| + /// * `PERMISSION_DENIED` if the requesting user is not permitted to access
|
| + /// this user profile, if no profile exists with the requested ID, or for
|
| + /// access errors.
|
| + ///
|
| + /// Request parameters:
|
| + ///
|
| + /// [userId] - Identifier of the profile to return. The identifier can be one
|
| + /// of the
|
| + /// following:
|
| + ///
|
| + /// * the numeric identifier for the user
|
| + /// * the email address of the user
|
| + /// * the string literal `"me"`, indicating the requesting user
|
| + ///
|
| + /// Completes with a [UserProfile].
|
| + ///
|
| + /// Completes with a [commons.ApiRequestError] if the API endpoint returned
|
| + /// an error.
|
| + ///
|
| + /// If the used [http.Client] completes with an error when making a REST
|
| + /// call, this method will complete with the same error.
|
| async.Future<UserProfile> get(core.String userId) {
|
| var _url = null;
|
| var _queryParams = new core.Map();
|
| @@ -2432,72 +2479,70 @@ class UserProfilesResourceApi {
|
|
|
| _url = 'v1/userProfiles/' + commons.Escaper.ecapeVariable('$userId');
|
|
|
| - var _response = _requester.request(_url,
|
| - "GET",
|
| - body: _body,
|
| - queryParams: _queryParams,
|
| - uploadOptions: _uploadOptions,
|
| - uploadMedia: _uploadMedia,
|
| - downloadOptions: _downloadOptions);
|
| + var _response = _requester.request(_url, "GET",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| return _response.then((data) => new UserProfile.fromJson(data));
|
| }
|
| -
|
| }
|
|
|
| -
|
| class UserProfilesGuardianInvitationsResourceApi {
|
| final commons.ApiRequester _requester;
|
|
|
| - UserProfilesGuardianInvitationsResourceApi(commons.ApiRequester client) :
|
| - _requester = client;
|
| -
|
| - /**
|
| - * Creates a guardian invitation, and sends an email to the guardian asking
|
| - * them to confirm that they are the student's guardian.
|
| - *
|
| - * Once the guardian accepts the invitation, their `state` will change to
|
| - * `COMPLETED` and they will start receiving guardian notifications. A
|
| - * `Guardian` resource will also be created to represent the active guardian.
|
| - *
|
| - * The request object must have the `student_id` and
|
| - * `invited_email_address` fields set. Failing to set these fields, or
|
| - * setting any other fields in the request, will result in an error.
|
| - *
|
| - * This method returns the following error codes:
|
| - *
|
| - * * `PERMISSION_DENIED` if the current user does not have permission to
|
| - * manage guardians, if the guardian in question has already rejected
|
| - * too many requests for that student, if guardians are not enabled for the
|
| - * domain in question, or for other access errors.
|
| - * * `RESOURCE_EXHAUSTED` if the student or guardian has exceeded the guardian
|
| - * link limit.
|
| - * * `INVALID_ARGUMENT` if the guardian email address is not valid (for
|
| - * example, if it is too long), or if the format of the student ID provided
|
| - * cannot be recognized (it is not an email address, nor a `user_id` from
|
| - * this API). This error will also be returned if read-only fields are set,
|
| - * or if the `state` field is set to to a value other than `PENDING`.
|
| - * * `NOT_FOUND` if the student ID provided is a valid student ID, but
|
| - * Classroom has no record of that student.
|
| - * * `ALREADY_EXISTS` if there is already a pending guardian invitation for
|
| - * the student and `invited_email_address` provided, or if the provided
|
| - * `invited_email_address` matches the Google account of an existing
|
| - * `Guardian` for this user.
|
| - *
|
| - * [request] - The metadata request object.
|
| - *
|
| - * Request parameters:
|
| - *
|
| - * [studentId] - ID of the student (in standard format)
|
| - *
|
| - * Completes with a [GuardianInvitation].
|
| - *
|
| - * Completes with a [commons.ApiRequestError] if the API endpoint returned an
|
| - * error.
|
| - *
|
| - * If the used [http.Client] completes with an error when making a REST call,
|
| - * this method will complete with the same error.
|
| - */
|
| - async.Future<GuardianInvitation> create(GuardianInvitation request, core.String studentId) {
|
| + UserProfilesGuardianInvitationsResourceApi(commons.ApiRequester client)
|
| + : _requester = client;
|
| +
|
| + /// Creates a guardian invitation, and sends an email to the guardian asking
|
| + /// them to confirm that they are the student's guardian.
|
| + ///
|
| + /// Once the guardian accepts the invitation, their `state` will change to
|
| + /// `COMPLETED` and they will start receiving guardian notifications. A
|
| + /// `Guardian` resource will also be created to represent the active
|
| + /// guardian.
|
| + ///
|
| + /// The request object must have the `student_id` and
|
| + /// `invited_email_address` fields set. Failing to set these fields, or
|
| + /// setting any other fields in the request, will result in an error.
|
| + ///
|
| + /// This method returns the following error codes:
|
| + ///
|
| + /// * `PERMISSION_DENIED` if the current user does not have permission to
|
| + /// manage guardians, if the guardian in question has already rejected
|
| + /// too many requests for that student, if guardians are not enabled for the
|
| + /// domain in question, or for other access errors.
|
| + /// * `RESOURCE_EXHAUSTED` if the student or guardian has exceeded the
|
| + /// guardian
|
| + /// link limit.
|
| + /// * `INVALID_ARGUMENT` if the guardian email address is not valid (for
|
| + /// example, if it is too long), or if the format of the student ID provided
|
| + /// cannot be recognized (it is not an email address, nor a `user_id` from
|
| + /// this API). This error will also be returned if read-only fields are set,
|
| + /// or if the `state` field is set to to a value other than `PENDING`.
|
| + /// * `NOT_FOUND` if the student ID provided is a valid student ID, but
|
| + /// Classroom has no record of that student.
|
| + /// * `ALREADY_EXISTS` if there is already a pending guardian invitation for
|
| + /// the student and `invited_email_address` provided, or if the provided
|
| + /// `invited_email_address` matches the Google account of an existing
|
| + /// `Guardian` for this user.
|
| + ///
|
| + /// [request] - The metadata request object.
|
| + ///
|
| + /// Request parameters:
|
| + ///
|
| + /// [studentId] - ID of the student (in standard format)
|
| + ///
|
| + /// Completes with a [GuardianInvitation].
|
| + ///
|
| + /// Completes with a [commons.ApiRequestError] if the API endpoint returned
|
| + /// an error.
|
| + ///
|
| + /// If the used [http.Client] completes with an error when making a REST
|
| + /// call, this method will complete with the same error.
|
| + async.Future<GuardianInvitation> create(
|
| + GuardianInvitation request, core.String studentId) {
|
| var _url = null;
|
| var _queryParams = new core.Map();
|
| var _uploadMedia = null;
|
| @@ -2512,51 +2557,52 @@ class UserProfilesGuardianInvitationsResourceApi {
|
| throw new core.ArgumentError("Parameter studentId is required.");
|
| }
|
|
|
| - _url = 'v1/userProfiles/' + commons.Escaper.ecapeVariable('$studentId') + '/guardianInvitations';
|
| + _url = 'v1/userProfiles/' +
|
| + commons.Escaper.ecapeVariable('$studentId') +
|
| + '/guardianInvitations';
|
|
|
| - var _response = _requester.request(_url,
|
| - "POST",
|
| - body: _body,
|
| - queryParams: _queryParams,
|
| - uploadOptions: _uploadOptions,
|
| - uploadMedia: _uploadMedia,
|
| - downloadOptions: _downloadOptions);
|
| + var _response = _requester.request(_url, "POST",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| return _response.then((data) => new GuardianInvitation.fromJson(data));
|
| }
|
|
|
| - /**
|
| - * Returns a specific guardian invitation.
|
| - *
|
| - * This method returns the following error codes:
|
| - *
|
| - * * `PERMISSION_DENIED` if the requesting user is not permitted to view
|
| - * guardian invitations for the student identified by the `student_id`, if
|
| - * guardians are not enabled for the domain in question, or for other
|
| - * access errors.
|
| - * * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot
|
| - * be recognized (it is not an email address, nor a `student_id` from the
|
| - * API, nor the literal string `me`).
|
| - * * `NOT_FOUND` if Classroom cannot find any record of the given student or
|
| - * `invitation_id`. May also be returned if the student exists, but the
|
| - * requesting user does not have access to see that student.
|
| - *
|
| - * Request parameters:
|
| - *
|
| - * [studentId] - The ID of the student whose guardian invitation is being
|
| - * requested.
|
| - *
|
| - * [invitationId] - The `id` field of the `GuardianInvitation` being
|
| - * requested.
|
| - *
|
| - * Completes with a [GuardianInvitation].
|
| - *
|
| - * Completes with a [commons.ApiRequestError] if the API endpoint returned an
|
| - * error.
|
| - *
|
| - * If the used [http.Client] completes with an error when making a REST call,
|
| - * this method will complete with the same error.
|
| - */
|
| - async.Future<GuardianInvitation> get(core.String studentId, core.String invitationId) {
|
| + /// Returns a specific guardian invitation.
|
| + ///
|
| + /// This method returns the following error codes:
|
| + ///
|
| + /// * `PERMISSION_DENIED` if the requesting user is not permitted to view
|
| + /// guardian invitations for the student identified by the `student_id`, if
|
| + /// guardians are not enabled for the domain in question, or for other
|
| + /// access errors.
|
| + /// * `INVALID_ARGUMENT` if a `student_id` is specified, but its format
|
| + /// cannot
|
| + /// be recognized (it is not an email address, nor a `student_id` from the
|
| + /// API, nor the literal string `me`).
|
| + /// * `NOT_FOUND` if Classroom cannot find any record of the given student or
|
| + /// `invitation_id`. May also be returned if the student exists, but the
|
| + /// requesting user does not have access to see that student.
|
| + ///
|
| + /// Request parameters:
|
| + ///
|
| + /// [studentId] - The ID of the student whose guardian invitation is being
|
| + /// requested.
|
| + ///
|
| + /// [invitationId] - The `id` field of the `GuardianInvitation` being
|
| + /// requested.
|
| + ///
|
| + /// Completes with a [GuardianInvitation].
|
| + ///
|
| + /// Completes with a [commons.ApiRequestError] if the API endpoint returned
|
| + /// an error.
|
| + ///
|
| + /// If the used [http.Client] completes with an error when making a REST
|
| + /// call, this method will complete with the same error.
|
| + async.Future<GuardianInvitation> get(
|
| + core.String studentId, core.String invitationId) {
|
| var _url = null;
|
| var _queryParams = new core.Map();
|
| var _uploadMedia = null;
|
| @@ -2571,80 +2617,87 @@ class UserProfilesGuardianInvitationsResourceApi {
|
| throw new core.ArgumentError("Parameter invitationId is required.");
|
| }
|
|
|
| - _url = 'v1/userProfiles/' + commons.Escaper.ecapeVariable('$studentId') + '/guardianInvitations/' + commons.Escaper.ecapeVariable('$invitationId');
|
| + _url = 'v1/userProfiles/' +
|
| + commons.Escaper.ecapeVariable('$studentId') +
|
| + '/guardianInvitations/' +
|
| + commons.Escaper.ecapeVariable('$invitationId');
|
|
|
| - var _response = _requester.request(_url,
|
| - "GET",
|
| - body: _body,
|
| - queryParams: _queryParams,
|
| - uploadOptions: _uploadOptions,
|
| - uploadMedia: _uploadMedia,
|
| - downloadOptions: _downloadOptions);
|
| + var _response = _requester.request(_url, "GET",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| return _response.then((data) => new GuardianInvitation.fromJson(data));
|
| }
|
|
|
| - /**
|
| - * Returns a list of guardian invitations that the requesting user is
|
| - * permitted to view, filtered by the parameters provided.
|
| - *
|
| - * This method returns the following error codes:
|
| - *
|
| - * * `PERMISSION_DENIED` if a `student_id` is specified, and the requesting
|
| - * user is not permitted to view guardian invitations for that student, if
|
| - * `"-"` is specified as the `student_id` and the user is not a domain
|
| - * administrator, if guardians are not enabled for the domain in question,
|
| - * or for other access errors.
|
| - * * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot
|
| - * be recognized (it is not an email address, nor a `student_id` from the
|
| - * API, nor the literal string `me`). May also be returned if an invalid
|
| - * `page_token` or `state` is provided.
|
| - * * `NOT_FOUND` if a `student_id` is specified, and its format can be
|
| - * recognized, but Classroom has no record of that student.
|
| - *
|
| - * Request parameters:
|
| - *
|
| - * [studentId] - The ID of the student whose guardian invitations are to be
|
| - * returned.
|
| - * The identifier can be one of the following:
|
| - *
|
| - * * the numeric identifier for the user
|
| - * * the email address of the user
|
| - * * the string literal `"me"`, indicating the requesting user
|
| - * * the string literal `"-"`, indicating that results should be returned for
|
| - * all students that the requesting user is permitted to view guardian
|
| - * invitations.
|
| - *
|
| - * [pageSize] - Maximum number of items to return. Zero or unspecified
|
| - * indicates that the
|
| - * server may assign a maximum.
|
| - *
|
| - * The server may return fewer than the specified number of results.
|
| - *
|
| - * [states] - If specified, only results with the specified `state` values
|
| - * will be
|
| - * returned. Otherwise, results with a `state` of `PENDING` will be returned.
|
| - *
|
| - * [invitedEmailAddress] - If specified, only results with the specified
|
| - * `invited_email_address`
|
| - * will be returned.
|
| - *
|
| - * [pageToken] - nextPageToken
|
| - * value returned from a previous
|
| - * list call,
|
| - * indicating that the subsequent page of results should be returned.
|
| - *
|
| - * The list request
|
| - * must be otherwise identical to the one that resulted in this token.
|
| - *
|
| - * Completes with a [ListGuardianInvitationsResponse].
|
| - *
|
| - * Completes with a [commons.ApiRequestError] if the API endpoint returned an
|
| - * error.
|
| - *
|
| - * If the used [http.Client] completes with an error when making a REST call,
|
| - * this method will complete with the same error.
|
| - */
|
| - async.Future<ListGuardianInvitationsResponse> list(core.String studentId, {core.int pageSize, core.List<core.String> states, core.String invitedEmailAddress, core.String pageToken}) {
|
| + /// Returns a list of guardian invitations that the requesting user is
|
| + /// permitted to view, filtered by the parameters provided.
|
| + ///
|
| + /// This method returns the following error codes:
|
| + ///
|
| + /// * `PERMISSION_DENIED` if a `student_id` is specified, and the requesting
|
| + /// user is not permitted to view guardian invitations for that student, if
|
| + /// `"-"` is specified as the `student_id` and the user is not a domain
|
| + /// administrator, if guardians are not enabled for the domain in question,
|
| + /// or for other access errors.
|
| + /// * `INVALID_ARGUMENT` if a `student_id` is specified, but its format
|
| + /// cannot
|
| + /// be recognized (it is not an email address, nor a `student_id` from the
|
| + /// API, nor the literal string `me`). May also be returned if an invalid
|
| + /// `page_token` or `state` is provided.
|
| + /// * `NOT_FOUND` if a `student_id` is specified, and its format can be
|
| + /// recognized, but Classroom has no record of that student.
|
| + ///
|
| + /// Request parameters:
|
| + ///
|
| + /// [studentId] - The ID of the student whose guardian invitations are to be
|
| + /// returned.
|
| + /// The identifier can be one of the following:
|
| + ///
|
| + /// * the numeric identifier for the user
|
| + /// * the email address of the user
|
| + /// * the string literal `"me"`, indicating the requesting user
|
| + /// * the string literal `"-"`, indicating that results should be returned
|
| + /// for
|
| + /// all students that the requesting user is permitted to view guardian
|
| + /// invitations.
|
| + ///
|
| + /// [pageToken] - nextPageToken
|
| + /// value returned from a previous
|
| + /// list call,
|
| + /// indicating that the subsequent page of results should be returned.
|
| + ///
|
| + /// The list request
|
| + /// must be otherwise identical to the one that resulted in this token.
|
| + ///
|
| + /// [pageSize] - Maximum number of items to return. Zero or unspecified
|
| + /// indicates that the
|
| + /// server may assign a maximum.
|
| + ///
|
| + /// The server may return fewer than the specified number of results.
|
| + ///
|
| + /// [states] - If specified, only results with the specified `state` values
|
| + /// will be
|
| + /// returned. Otherwise, results with a `state` of `PENDING` will be
|
| + /// returned.
|
| + ///
|
| + /// [invitedEmailAddress] - If specified, only results with the specified
|
| + /// `invited_email_address`
|
| + /// will be returned.
|
| + ///
|
| + /// Completes with a [ListGuardianInvitationsResponse].
|
| + ///
|
| + /// Completes with a [commons.ApiRequestError] if the API endpoint returned
|
| + /// an error.
|
| + ///
|
| + /// If the used [http.Client] completes with an error when making a REST
|
| + /// call, this method will complete with the same error.
|
| + async.Future<ListGuardianInvitationsResponse> list(core.String studentId,
|
| + {core.String pageToken,
|
| + core.int pageSize,
|
| + core.List<core.String> states,
|
| + core.String invitedEmailAddress}) {
|
| var _url = null;
|
| var _queryParams = new core.Map();
|
| var _uploadMedia = null;
|
| @@ -2655,6 +2708,9 @@ class UserProfilesGuardianInvitationsResourceApi {
|
| if (studentId == null) {
|
| throw new core.ArgumentError("Parameter studentId is required.");
|
| }
|
| + if (pageToken != null) {
|
| + _queryParams["pageToken"] = [pageToken];
|
| + }
|
| if (pageSize != null) {
|
| _queryParams["pageSize"] = ["${pageSize}"];
|
| }
|
| @@ -2664,70 +2720,72 @@ class UserProfilesGuardianInvitationsResourceApi {
|
| if (invitedEmailAddress != null) {
|
| _queryParams["invitedEmailAddress"] = [invitedEmailAddress];
|
| }
|
| - if (pageToken != null) {
|
| - _queryParams["pageToken"] = [pageToken];
|
| - }
|
|
|
| - _url = 'v1/userProfiles/' + commons.Escaper.ecapeVariable('$studentId') + '/guardianInvitations';
|
| -
|
| - var _response = _requester.request(_url,
|
| - "GET",
|
| - body: _body,
|
| - queryParams: _queryParams,
|
| - uploadOptions: _uploadOptions,
|
| - uploadMedia: _uploadMedia,
|
| - downloadOptions: _downloadOptions);
|
| - return _response.then((data) => new ListGuardianInvitationsResponse.fromJson(data));
|
| - }
|
| -
|
| - /**
|
| - * Modifies a guardian invitation.
|
| - *
|
| - * Currently, the only valid modification is to change the `state` from
|
| - * `PENDING` to `COMPLETE`. This has the effect of withdrawing the invitation.
|
| - *
|
| - * This method returns the following error codes:
|
| - *
|
| - * * `PERMISSION_DENIED` if the current user does not have permission to
|
| - * manage guardians, if guardians are not enabled for the domain in question
|
| - * or for other access errors.
|
| - * * `FAILED_PRECONDITION` if the guardian link is not in the `PENDING` state.
|
| - * * `INVALID_ARGUMENT` if the format of the student ID provided
|
| - * cannot be recognized (it is not an email address, nor a `user_id` from
|
| - * this API), or if the passed `GuardianInvitation` has a `state` other than
|
| - * `COMPLETE`, or if it modifies fields other than `state`.
|
| - * * `NOT_FOUND` if the student ID provided is a valid student ID, but
|
| - * Classroom has no record of that student, or if the `id` field does not
|
| - * refer to a guardian invitation known to Classroom.
|
| - *
|
| - * [request] - The metadata request object.
|
| - *
|
| - * Request parameters:
|
| - *
|
| - * [studentId] - The ID of the student whose guardian invitation is to be
|
| - * modified.
|
| - *
|
| - * [invitationId] - The `id` field of the `GuardianInvitation` to be modified.
|
| - *
|
| - * [updateMask] - Mask that identifies which fields on the course to update.
|
| - * This field is required to do an update. The update will fail if invalid
|
| - * fields are specified. The following fields are valid:
|
| - *
|
| - * * `state`
|
| - *
|
| - * When set in a query parameter, this field should be specified as
|
| - *
|
| - * `updateMask=<field1>,<field2>,...`
|
| - *
|
| - * Completes with a [GuardianInvitation].
|
| - *
|
| - * Completes with a [commons.ApiRequestError] if the API endpoint returned an
|
| - * error.
|
| - *
|
| - * If the used [http.Client] completes with an error when making a REST call,
|
| - * this method will complete with the same error.
|
| - */
|
| - async.Future<GuardianInvitation> patch(GuardianInvitation request, core.String studentId, core.String invitationId, {core.String updateMask}) {
|
| + _url = 'v1/userProfiles/' +
|
| + commons.Escaper.ecapeVariable('$studentId') +
|
| + '/guardianInvitations';
|
| +
|
| + var _response = _requester.request(_url, "GET",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| + return _response
|
| + .then((data) => new ListGuardianInvitationsResponse.fromJson(data));
|
| + }
|
| +
|
| + /// Modifies a guardian invitation.
|
| + ///
|
| + /// Currently, the only valid modification is to change the `state` from
|
| + /// `PENDING` to `COMPLETE`. This has the effect of withdrawing the
|
| + /// invitation.
|
| + ///
|
| + /// This method returns the following error codes:
|
| + ///
|
| + /// * `PERMISSION_DENIED` if the current user does not have permission to
|
| + /// manage guardians, if guardians are not enabled for the domain in question
|
| + /// or for other access errors.
|
| + /// * `FAILED_PRECONDITION` if the guardian link is not in the `PENDING`
|
| + /// state.
|
| + /// * `INVALID_ARGUMENT` if the format of the student ID provided
|
| + /// cannot be recognized (it is not an email address, nor a `user_id` from
|
| + /// this API), or if the passed `GuardianInvitation` has a `state` other than
|
| + /// `COMPLETE`, or if it modifies fields other than `state`.
|
| + /// * `NOT_FOUND` if the student ID provided is a valid student ID, but
|
| + /// Classroom has no record of that student, or if the `id` field does not
|
| + /// refer to a guardian invitation known to Classroom.
|
| + ///
|
| + /// [request] - The metadata request object.
|
| + ///
|
| + /// Request parameters:
|
| + ///
|
| + /// [studentId] - The ID of the student whose guardian invitation is to be
|
| + /// modified.
|
| + ///
|
| + /// [invitationId] - The `id` field of the `GuardianInvitation` to be
|
| + /// modified.
|
| + ///
|
| + /// [updateMask] - Mask that identifies which fields on the course to update.
|
| + /// This field is required to do an update. The update will fail if invalid
|
| + /// fields are specified. The following fields are valid:
|
| + ///
|
| + /// * `state`
|
| + ///
|
| + /// When set in a query parameter, this field should be specified as
|
| + ///
|
| + /// `updateMask=<field1>,<field2>,...`
|
| + ///
|
| + /// Completes with a [GuardianInvitation].
|
| + ///
|
| + /// Completes with a [commons.ApiRequestError] if the API endpoint returned
|
| + /// an error.
|
| + ///
|
| + /// If the used [http.Client] completes with an error when making a REST
|
| + /// call, this method will complete with the same error.
|
| + async.Future<GuardianInvitation> patch(GuardianInvitation request,
|
| + core.String studentId, core.String invitationId,
|
| + {core.String updateMask}) {
|
| var _url = null;
|
| var _queryParams = new core.Map();
|
| var _uploadMedia = null;
|
| @@ -2748,66 +2806,66 @@ class UserProfilesGuardianInvitationsResourceApi {
|
| _queryParams["updateMask"] = [updateMask];
|
| }
|
|
|
| - _url = 'v1/userProfiles/' + commons.Escaper.ecapeVariable('$studentId') + '/guardianInvitations/' + commons.Escaper.ecapeVariable('$invitationId');
|
| + _url = 'v1/userProfiles/' +
|
| + commons.Escaper.ecapeVariable('$studentId') +
|
| + '/guardianInvitations/' +
|
| + commons.Escaper.ecapeVariable('$invitationId');
|
|
|
| - var _response = _requester.request(_url,
|
| - "PATCH",
|
| - body: _body,
|
| - queryParams: _queryParams,
|
| - uploadOptions: _uploadOptions,
|
| - uploadMedia: _uploadMedia,
|
| - downloadOptions: _downloadOptions);
|
| + var _response = _requester.request(_url, "PATCH",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| return _response.then((data) => new GuardianInvitation.fromJson(data));
|
| }
|
| -
|
| }
|
|
|
| -
|
| class UserProfilesGuardiansResourceApi {
|
| final commons.ApiRequester _requester;
|
|
|
| - UserProfilesGuardiansResourceApi(commons.ApiRequester client) :
|
| - _requester = client;
|
| -
|
| - /**
|
| - * Deletes a guardian.
|
| - *
|
| - * The guardian will no longer receive guardian notifications and the guardian
|
| - * will no longer be accessible via the API.
|
| - *
|
| - * This method returns the following error codes:
|
| - *
|
| - * * `PERMISSION_DENIED` if no user that matches the provided `student_id`
|
| - * is visible to the requesting user, if the requesting user is not
|
| - * permitted to manage guardians for the student identified by the
|
| - * `student_id`, if guardians are not enabled for the domain in question,
|
| - * or for other access errors.
|
| - * * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot
|
| - * be recognized (it is not an email address, nor a `student_id` from the
|
| - * API).
|
| - * * `NOT_FOUND` if the requesting user is permitted to modify guardians for
|
| - * the requested `student_id`, but no `Guardian` record exists for that
|
| - * student with the provided `guardian_id`.
|
| - *
|
| - * Request parameters:
|
| - *
|
| - * [studentId] - The student whose guardian is to be deleted. One of the
|
| - * following:
|
| - *
|
| - * * the numeric identifier for the user
|
| - * * the email address of the user
|
| - * * the string literal `"me"`, indicating the requesting user
|
| - *
|
| - * [guardianId] - The `id` field from a `Guardian`.
|
| - *
|
| - * Completes with a [Empty].
|
| - *
|
| - * Completes with a [commons.ApiRequestError] if the API endpoint returned an
|
| - * error.
|
| - *
|
| - * If the used [http.Client] completes with an error when making a REST call,
|
| - * this method will complete with the same error.
|
| - */
|
| + UserProfilesGuardiansResourceApi(commons.ApiRequester client)
|
| + : _requester = client;
|
| +
|
| + /// Deletes a guardian.
|
| + ///
|
| + /// The guardian will no longer receive guardian notifications and the
|
| + /// guardian
|
| + /// will no longer be accessible via the API.
|
| + ///
|
| + /// This method returns the following error codes:
|
| + ///
|
| + /// * `PERMISSION_DENIED` if no user that matches the provided `student_id`
|
| + /// is visible to the requesting user, if the requesting user is not
|
| + /// permitted to manage guardians for the student identified by the
|
| + /// `student_id`, if guardians are not enabled for the domain in question,
|
| + /// or for other access errors.
|
| + /// * `INVALID_ARGUMENT` if a `student_id` is specified, but its format
|
| + /// cannot
|
| + /// be recognized (it is not an email address, nor a `student_id` from the
|
| + /// API).
|
| + /// * `NOT_FOUND` if the requesting user is permitted to modify guardians for
|
| + /// the requested `student_id`, but no `Guardian` record exists for that
|
| + /// student with the provided `guardian_id`.
|
| + ///
|
| + /// Request parameters:
|
| + ///
|
| + /// [studentId] - The student whose guardian is to be deleted. One of the
|
| + /// following:
|
| + ///
|
| + /// * the numeric identifier for the user
|
| + /// * the email address of the user
|
| + /// * the string literal `"me"`, indicating the requesting user
|
| + ///
|
| + /// [guardianId] - The `id` field from a `Guardian`.
|
| + ///
|
| + /// Completes with a [Empty].
|
| + ///
|
| + /// Completes with a [commons.ApiRequestError] if the API endpoint returned
|
| + /// an error.
|
| + ///
|
| + /// If the used [http.Client] completes with an error when making a REST
|
| + /// call, this method will complete with the same error.
|
| async.Future<Empty> delete(core.String studentId, core.String guardianId) {
|
| var _url = null;
|
| var _queryParams = new core.Map();
|
| @@ -2823,54 +2881,55 @@ class UserProfilesGuardiansResourceApi {
|
| throw new core.ArgumentError("Parameter guardianId is required.");
|
| }
|
|
|
| - _url = 'v1/userProfiles/' + commons.Escaper.ecapeVariable('$studentId') + '/guardians/' + commons.Escaper.ecapeVariable('$guardianId');
|
| + _url = 'v1/userProfiles/' +
|
| + commons.Escaper.ecapeVariable('$studentId') +
|
| + '/guardians/' +
|
| + commons.Escaper.ecapeVariable('$guardianId');
|
|
|
| - var _response = _requester.request(_url,
|
| - "DELETE",
|
| - body: _body,
|
| - queryParams: _queryParams,
|
| - uploadOptions: _uploadOptions,
|
| - uploadMedia: _uploadMedia,
|
| - downloadOptions: _downloadOptions);
|
| + var _response = _requester.request(_url, "DELETE",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| return _response.then((data) => new Empty.fromJson(data));
|
| }
|
|
|
| - /**
|
| - * Returns a specific guardian.
|
| - *
|
| - * This method returns the following error codes:
|
| - *
|
| - * * `PERMISSION_DENIED` if no user that matches the provided `student_id`
|
| - * is visible to the requesting user, if the requesting user is not
|
| - * permitted to view guardian information for the student identified by the
|
| - * `student_id`, if guardians are not enabled for the domain in question,
|
| - * or for other access errors.
|
| - * * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot
|
| - * be recognized (it is not an email address, nor a `student_id` from the
|
| - * API, nor the literal string `me`).
|
| - * * `NOT_FOUND` if the requesting user is permitted to view guardians for
|
| - * the requested `student_id`, but no `Guardian` record exists for that
|
| - * student that matches the provided `guardian_id`.
|
| - *
|
| - * Request parameters:
|
| - *
|
| - * [studentId] - The student whose guardian is being requested. One of the
|
| - * following:
|
| - *
|
| - * * the numeric identifier for the user
|
| - * * the email address of the user
|
| - * * the string literal `"me"`, indicating the requesting user
|
| - *
|
| - * [guardianId] - The `id` field from a `Guardian`.
|
| - *
|
| - * Completes with a [Guardian].
|
| - *
|
| - * Completes with a [commons.ApiRequestError] if the API endpoint returned an
|
| - * error.
|
| - *
|
| - * If the used [http.Client] completes with an error when making a REST call,
|
| - * this method will complete with the same error.
|
| - */
|
| + /// Returns a specific guardian.
|
| + ///
|
| + /// This method returns the following error codes:
|
| + ///
|
| + /// * `PERMISSION_DENIED` if no user that matches the provided `student_id`
|
| + /// is visible to the requesting user, if the requesting user is not
|
| + /// permitted to view guardian information for the student identified by the
|
| + /// `student_id`, if guardians are not enabled for the domain in question,
|
| + /// or for other access errors.
|
| + /// * `INVALID_ARGUMENT` if a `student_id` is specified, but its format
|
| + /// cannot
|
| + /// be recognized (it is not an email address, nor a `student_id` from the
|
| + /// API, nor the literal string `me`).
|
| + /// * `NOT_FOUND` if the requesting user is permitted to view guardians for
|
| + /// the requested `student_id`, but no `Guardian` record exists for that
|
| + /// student that matches the provided `guardian_id`.
|
| + ///
|
| + /// Request parameters:
|
| + ///
|
| + /// [studentId] - The student whose guardian is being requested. One of the
|
| + /// following:
|
| + ///
|
| + /// * the numeric identifier for the user
|
| + /// * the email address of the user
|
| + /// * the string literal `"me"`, indicating the requesting user
|
| + ///
|
| + /// [guardianId] - The `id` field from a `Guardian`.
|
| + ///
|
| + /// Completes with a [Guardian].
|
| + ///
|
| + /// Completes with a [commons.ApiRequestError] if the API endpoint returned
|
| + /// an error.
|
| + ///
|
| + /// If the used [http.Client] completes with an error when making a REST
|
| + /// call, this method will complete with the same error.
|
| async.Future<Guardian> get(core.String studentId, core.String guardianId) {
|
| var _url = null;
|
| var _queryParams = new core.Map();
|
| @@ -2886,79 +2945,85 @@ class UserProfilesGuardiansResourceApi {
|
| throw new core.ArgumentError("Parameter guardianId is required.");
|
| }
|
|
|
| - _url = 'v1/userProfiles/' + commons.Escaper.ecapeVariable('$studentId') + '/guardians/' + commons.Escaper.ecapeVariable('$guardianId');
|
| + _url = 'v1/userProfiles/' +
|
| + commons.Escaper.ecapeVariable('$studentId') +
|
| + '/guardians/' +
|
| + commons.Escaper.ecapeVariable('$guardianId');
|
|
|
| - var _response = _requester.request(_url,
|
| - "GET",
|
| - body: _body,
|
| - queryParams: _queryParams,
|
| - uploadOptions: _uploadOptions,
|
| - uploadMedia: _uploadMedia,
|
| - downloadOptions: _downloadOptions);
|
| + var _response = _requester.request(_url, "GET",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| return _response.then((data) => new Guardian.fromJson(data));
|
| }
|
|
|
| - /**
|
| - * Returns a list of guardians that the requesting user is permitted to
|
| - * view, restricted to those that match the request.
|
| - *
|
| - * To list guardians for any student that the requesting user may view
|
| - * guardians for, use the literal character `-` for the student ID.
|
| - *
|
| - * This method returns the following error codes:
|
| - *
|
| - * * `PERMISSION_DENIED` if a `student_id` is specified, and the requesting
|
| - * user is not permitted to view guardian information for that student, if
|
| - * `"-"` is specified as the `student_id` and the user is not a domain
|
| - * administrator, if guardians are not enabled for the domain in question,
|
| - * if the `invited_email_address` filter is set by a user who is not a
|
| - * domain administrator, or for other access errors.
|
| - * * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot
|
| - * be recognized (it is not an email address, nor a `student_id` from the
|
| - * API, nor the literal string `me`). May also be returned if an invalid
|
| - * `page_token` is provided.
|
| - * * `NOT_FOUND` if a `student_id` is specified, and its format can be
|
| - * recognized, but Classroom has no record of that student.
|
| - *
|
| - * Request parameters:
|
| - *
|
| - * [studentId] - Filter results by the student who the guardian is linked to.
|
| - * The identifier can be one of the following:
|
| - *
|
| - * * the numeric identifier for the user
|
| - * * the email address of the user
|
| - * * the string literal `"me"`, indicating the requesting user
|
| - * * the string literal `"-"`, indicating that results should be returned for
|
| - * all students that the requesting user has access to view.
|
| - *
|
| - * [pageToken] - nextPageToken
|
| - * value returned from a previous
|
| - * list call,
|
| - * indicating that the subsequent page of results should be returned.
|
| - *
|
| - * The list request
|
| - * must be otherwise identical to the one that resulted in this token.
|
| - *
|
| - * [pageSize] - Maximum number of items to return. Zero or unspecified
|
| - * indicates that the
|
| - * server may assign a maximum.
|
| - *
|
| - * The server may return fewer than the specified number of results.
|
| - *
|
| - * [invitedEmailAddress] - Filter results by the email address that the
|
| - * original invitation was sent
|
| - * to, resulting in this guardian link.
|
| - * This filter can only be used by domain administrators.
|
| - *
|
| - * Completes with a [ListGuardiansResponse].
|
| - *
|
| - * Completes with a [commons.ApiRequestError] if the API endpoint returned an
|
| - * error.
|
| - *
|
| - * If the used [http.Client] completes with an error when making a REST call,
|
| - * this method will complete with the same error.
|
| - */
|
| - async.Future<ListGuardiansResponse> list(core.String studentId, {core.String pageToken, core.int pageSize, core.String invitedEmailAddress}) {
|
| + /// Returns a list of guardians that the requesting user is permitted to
|
| + /// view, restricted to those that match the request.
|
| + ///
|
| + /// To list guardians for any student that the requesting user may view
|
| + /// guardians for, use the literal character `-` for the student ID.
|
| + ///
|
| + /// This method returns the following error codes:
|
| + ///
|
| + /// * `PERMISSION_DENIED` if a `student_id` is specified, and the requesting
|
| + /// user is not permitted to view guardian information for that student, if
|
| + /// `"-"` is specified as the `student_id` and the user is not a domain
|
| + /// administrator, if guardians are not enabled for the domain in question,
|
| + /// if the `invited_email_address` filter is set by a user who is not a
|
| + /// domain administrator, or for other access errors.
|
| + /// * `INVALID_ARGUMENT` if a `student_id` is specified, but its format
|
| + /// cannot
|
| + /// be recognized (it is not an email address, nor a `student_id` from the
|
| + /// API, nor the literal string `me`). May also be returned if an invalid
|
| + /// `page_token` is provided.
|
| + /// * `NOT_FOUND` if a `student_id` is specified, and its format can be
|
| + /// recognized, but Classroom has no record of that student.
|
| + ///
|
| + /// Request parameters:
|
| + ///
|
| + /// [studentId] - Filter results by the student who the guardian is linked
|
| + /// to.
|
| + /// The identifier can be one of the following:
|
| + ///
|
| + /// * the numeric identifier for the user
|
| + /// * the email address of the user
|
| + /// * the string literal `"me"`, indicating the requesting user
|
| + /// * the string literal `"-"`, indicating that results should be returned
|
| + /// for
|
| + /// all students that the requesting user has access to view.
|
| + ///
|
| + /// [pageToken] - nextPageToken
|
| + /// value returned from a previous
|
| + /// list call,
|
| + /// indicating that the subsequent page of results should be returned.
|
| + ///
|
| + /// The list request
|
| + /// must be otherwise identical to the one that resulted in this token.
|
| + ///
|
| + /// [pageSize] - Maximum number of items to return. Zero or unspecified
|
| + /// indicates that the
|
| + /// server may assign a maximum.
|
| + ///
|
| + /// The server may return fewer than the specified number of results.
|
| + ///
|
| + /// [invitedEmailAddress] - Filter results by the email address that the
|
| + /// original invitation was sent
|
| + /// to, resulting in this guardian link.
|
| + /// This filter can only be used by domain administrators.
|
| + ///
|
| + /// Completes with a [ListGuardiansResponse].
|
| + ///
|
| + /// Completes with a [commons.ApiRequestError] if the API endpoint returned
|
| + /// an error.
|
| + ///
|
| + /// If the used [http.Client] completes with an error when making a REST
|
| + /// call, this method will complete with the same error.
|
| + async.Future<ListGuardiansResponse> list(core.String studentId,
|
| + {core.String pageToken,
|
| + core.int pageSize,
|
| + core.String invitedEmailAddress}) {
|
| var _url = null;
|
| var _queryParams = new core.Map();
|
| var _uploadMedia = null;
|
| @@ -2979,28 +3044,24 @@ class UserProfilesGuardiansResourceApi {
|
| _queryParams["invitedEmailAddress"] = [invitedEmailAddress];
|
| }
|
|
|
| - _url = 'v1/userProfiles/' + commons.Escaper.ecapeVariable('$studentId') + '/guardians';
|
| + _url = 'v1/userProfiles/' +
|
| + commons.Escaper.ecapeVariable('$studentId') +
|
| + '/guardians';
|
|
|
| - var _response = _requester.request(_url,
|
| - "GET",
|
| - body: _body,
|
| - queryParams: _queryParams,
|
| - uploadOptions: _uploadOptions,
|
| - uploadMedia: _uploadMedia,
|
| - downloadOptions: _downloadOptions);
|
| + var _response = _requester.request(_url, "GET",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| return _response.then((data) => new ListGuardiansResponse.fromJson(data));
|
| }
|
| -
|
| }
|
|
|
| -
|
| -
|
| -/** Additional details for assignments. */
|
| +/// Additional details for assignments.
|
| class Assignment {
|
| - /**
|
| - * Drive folder where attachments from student submissions are placed.
|
| - * This is only populated for course teachers and administrators.
|
| - */
|
| + /// Drive folder where attachments from student submissions are placed.
|
| + /// This is only populated for course teachers and administrators.
|
| DriveFolder studentWorkFolder;
|
|
|
| Assignment();
|
| @@ -3012,7 +3073,8 @@ class Assignment {
|
| }
|
|
|
| core.Map<core.String, core.Object> toJson() {
|
| - final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>();
|
| + final core.Map<core.String, core.Object> _json =
|
| + new core.Map<core.String, core.Object>();
|
| if (studentWorkFolder != null) {
|
| _json["studentWorkFolder"] = (studentWorkFolder).toJson();
|
| }
|
| @@ -3020,50 +3082,53 @@ class Assignment {
|
| }
|
| }
|
|
|
| -/** Student work for an assignment. */
|
| +/// Student work for an assignment.
|
| class AssignmentSubmission {
|
| - /**
|
| - * Attachments added by the student.
|
| - * Drive files that correspond to materials with a share mode of
|
| - * STUDENT_COPY may not exist yet if the student has not accessed the
|
| - * assignment in Classroom.
|
| - *
|
| - * Some attachment metadata is only populated if the requesting user has
|
| - * permission to access it. Identifier and alternate_link fields are always
|
| - * available, but others (e.g. title) may not be.
|
| - */
|
| + /// Attachments added by the student.
|
| + /// Drive files that correspond to materials with a share mode of
|
| + /// STUDENT_COPY may not exist yet if the student has not accessed the
|
| + /// assignment in Classroom.
|
| + ///
|
| + /// Some attachment metadata is only populated if the requesting user has
|
| + /// permission to access it. Identifier and alternate_link fields are always
|
| + /// available, but others (e.g. title) may not be.
|
| core.List<Attachment> attachments;
|
|
|
| AssignmentSubmission();
|
|
|
| AssignmentSubmission.fromJson(core.Map _json) {
|
| if (_json.containsKey("attachments")) {
|
| - attachments = _json["attachments"].map((value) => new Attachment.fromJson(value)).toList();
|
| + attachments = _json["attachments"]
|
| + .map((value) => new Attachment.fromJson(value))
|
| + .toList();
|
| }
|
| }
|
|
|
| core.Map<core.String, core.Object> toJson() {
|
| - final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>();
|
| + final core.Map<core.String, core.Object> _json =
|
| + new core.Map<core.String, core.Object>();
|
| if (attachments != null) {
|
| - _json["attachments"] = attachments.map((value) => (value).toJson()).toList();
|
| + _json["attachments"] =
|
| + attachments.map((value) => (value).toJson()).toList();
|
| }
|
| return _json;
|
| }
|
| }
|
|
|
| -/**
|
| - * Attachment added to student assignment work.
|
| - *
|
| - * When creating attachments, setting the `form` field is not supported.
|
| - */
|
| +/// Attachment added to student assignment work.
|
| +///
|
| +/// When creating attachments, setting the `form` field is not supported.
|
| class Attachment {
|
| - /** Google Drive file attachment. */
|
| + /// Google Drive file attachment.
|
| DriveFile driveFile;
|
| - /** Google Forms attachment. */
|
| +
|
| + /// Google Forms attachment.
|
| Form form;
|
| - /** Link attachment. */
|
| +
|
| + /// Link attachment.
|
| Link link;
|
| - /** Youtube video attachment. */
|
| +
|
| + /// Youtube video attachment.
|
| YouTubeVideo youTubeVideo;
|
|
|
| Attachment();
|
| @@ -3084,7 +3149,8 @@ class Attachment {
|
| }
|
|
|
| core.Map<core.String, core.Object> toJson() {
|
| - final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>();
|
| + final core.Map<core.String, core.Object> _json =
|
| + new core.Map<core.String, core.Object>();
|
| if (driveFile != null) {
|
| _json["driveFile"] = (driveFile).toJson();
|
| }
|
| @@ -3101,174 +3167,156 @@ class Attachment {
|
| }
|
| }
|
|
|
| -/** A Course in Classroom. */
|
| +/// A Course in Classroom.
|
| class Course {
|
| - /**
|
| - * Absolute link to this course in the Classroom web UI.
|
| - *
|
| - * Read-only.
|
| - */
|
| + /// Absolute link to this course in the Classroom web UI.
|
| + ///
|
| + /// Read-only.
|
| core.String alternateLink;
|
| - /**
|
| - * The Calendar ID for a calendar that all course members can see, to which
|
| - * Classroom adds events for course work and announcements in the course.
|
| - *
|
| - * Read-only.
|
| - */
|
| +
|
| + /// The Calendar ID for a calendar that all course members can see, to which
|
| + /// Classroom adds events for course work and announcements in the course.
|
| + ///
|
| + /// Read-only.
|
| core.String calendarId;
|
| - /**
|
| - * The email address of a Google group containing all members of the course.
|
| - * This group does not accept email and can only be used for permissions.
|
| - *
|
| - * Read-only.
|
| - */
|
| +
|
| + /// The email address of a Google group containing all members of the course.
|
| + /// This group does not accept email and can only be used for permissions.
|
| + ///
|
| + /// Read-only.
|
| core.String courseGroupEmail;
|
| - /**
|
| - * Sets of materials that appear on the "about" page of this course.
|
| - *
|
| - * Read-only.
|
| - */
|
| +
|
| + /// Sets of materials that appear on the "about" page of this course.
|
| + ///
|
| + /// Read-only.
|
| core.List<CourseMaterialSet> courseMaterialSets;
|
| - /**
|
| - * State of the course.
|
| - * If unspecified, the default state is `PROVISIONED`.
|
| - * Possible string values are:
|
| - * - "COURSE_STATE_UNSPECIFIED" : No course state. No returned Course message
|
| - * will use this value.
|
| - * - "ACTIVE" : The course is active.
|
| - * - "ARCHIVED" : The course has been archived. You cannot modify it except to
|
| - * change it
|
| - * to a different state.
|
| - * - "PROVISIONED" : The course has been created, but not yet activated. It is
|
| - * accessible by
|
| - * the primary teacher and domain administrators, who may modify it or
|
| - * change it to the `ACTIVE` or `DECLINED` states.
|
| - * A course may only be changed to `PROVISIONED` if it is in the `DECLINED`
|
| - * state.
|
| - * - "DECLINED" : The course has been created, but declined. It is accessible
|
| - * by the
|
| - * course owner and domain administrators, though it will not be
|
| - * displayed in the web UI. You cannot modify the course except to change it
|
| - * to the `PROVISIONED` state.
|
| - * A course may only be changed to `DECLINED` if it is in the `PROVISIONED`
|
| - * state.
|
| - * - "SUSPENDED" : The course has been suspended. You cannot modify the
|
| - * course, and only the
|
| - * user identified by the `owner_id` can view the course.
|
| - * A course may be placed in this state if it potentially violates the
|
| - * Terms of Service.
|
| - */
|
| +
|
| + /// State of the course.
|
| + /// If unspecified, the default state is `PROVISIONED`.
|
| + /// Possible string values are:
|
| + /// - "COURSE_STATE_UNSPECIFIED" : No course state. No returned Course
|
| + /// message will use this value.
|
| + /// - "ACTIVE" : The course is active.
|
| + /// - "ARCHIVED" : The course has been archived. You cannot modify it except
|
| + /// to change it
|
| + /// to a different state.
|
| + /// - "PROVISIONED" : The course has been created, but not yet activated. It
|
| + /// is accessible by
|
| + /// the primary teacher and domain administrators, who may modify it or
|
| + /// change it to the `ACTIVE` or `DECLINED` states.
|
| + /// A course may only be changed to `PROVISIONED` if it is in the `DECLINED`
|
| + /// state.
|
| + /// - "DECLINED" : The course has been created, but declined. It is
|
| + /// accessible by the
|
| + /// course owner and domain administrators, though it will not be
|
| + /// displayed in the web UI. You cannot modify the course except to change it
|
| + /// to the `PROVISIONED` state.
|
| + /// A course may only be changed to `DECLINED` if it is in the `PROVISIONED`
|
| + /// state.
|
| + /// - "SUSPENDED" : The course has been suspended. You cannot modify the
|
| + /// course, and only the
|
| + /// user identified by the `owner_id` can view the course.
|
| + /// A course may be placed in this state if it potentially violates the
|
| + /// Terms of Service.
|
| core.String courseState;
|
| - /**
|
| - * Creation time of the course.
|
| - * Specifying this field in a course update mask results in an error.
|
| - *
|
| - * Read-only.
|
| - */
|
| +
|
| + /// Creation time of the course.
|
| + /// Specifying this field in a course update mask results in an error.
|
| + ///
|
| + /// Read-only.
|
| core.String creationTime;
|
| - /**
|
| - * Optional description.
|
| - * For example, "We'll be learning about the structure of living
|
| - * creatures from a combination of textbooks, guest lectures, and lab work.
|
| - * Expect to be excited!"
|
| - * If set, this field must be a valid UTF-8 string and no longer than 30,000
|
| - * characters.
|
| - */
|
| +
|
| + /// Optional description.
|
| + /// For example, "We'll be learning about the structure of living
|
| + /// creatures from a combination of textbooks, guest lectures, and lab work.
|
| + /// Expect to be excited!"
|
| + /// If set, this field must be a valid UTF-8 string and no longer than 30,000
|
| + /// characters.
|
| core.String description;
|
| - /**
|
| - * Optional heading for the description.
|
| - * For example, "Welcome to 10th Grade Biology."
|
| - * If set, this field must be a valid UTF-8 string and no longer than 3600
|
| - * characters.
|
| - */
|
| +
|
| + /// Optional heading for the description.
|
| + /// For example, "Welcome to 10th Grade Biology."
|
| + /// If set, this field must be a valid UTF-8 string and no longer than 3600
|
| + /// characters.
|
| core.String descriptionHeading;
|
| - /**
|
| - * Enrollment code to use when joining this course.
|
| - * Specifying this field in a course update mask results in an error.
|
| - *
|
| - * Read-only.
|
| - */
|
| +
|
| + /// Enrollment code to use when joining this course.
|
| + /// Specifying this field in a course update mask results in an error.
|
| + ///
|
| + /// Read-only.
|
| core.String enrollmentCode;
|
| - /**
|
| - * Whether or not guardian notifications are enabled for this course.
|
| - *
|
| - * Read-only.
|
| - */
|
| +
|
| + /// Whether or not guardian notifications are enabled for this course.
|
| + ///
|
| + /// Read-only.
|
| core.bool guardiansEnabled;
|
| - /**
|
| - * Identifier for this course assigned by Classroom.
|
| - *
|
| - * When
|
| - * creating a course,
|
| - * you may optionally set this identifier to an
|
| - * alias string in the
|
| - * request to create a corresponding alias. The `id` is still assigned by
|
| - * Classroom and cannot be updated after the course is created.
|
| - *
|
| - * Specifying this field in a course update mask results in an error.
|
| - */
|
| +
|
| + /// Identifier for this course assigned by Classroom.
|
| + ///
|
| + /// When
|
| + /// creating a course,
|
| + /// you may optionally set this identifier to an
|
| + /// alias string in the
|
| + /// request to create a corresponding alias. The `id` is still assigned by
|
| + /// Classroom and cannot be updated after the course is created.
|
| + ///
|
| + /// Specifying this field in a course update mask results in an error.
|
| core.String id;
|
| - /**
|
| - * Name of the course.
|
| - * For example, "10th Grade Biology".
|
| - * The name is required. It must be between 1 and 750 characters and a valid
|
| - * UTF-8 string.
|
| - */
|
| +
|
| + /// Name of the course.
|
| + /// For example, "10th Grade Biology".
|
| + /// The name is required. It must be between 1 and 750 characters and a valid
|
| + /// UTF-8 string.
|
| core.String name;
|
| - /**
|
| - * The identifier of the owner of a course.
|
| - *
|
| - * When specified as a parameter of a
|
| - * create course request, this
|
| - * field is required.
|
| - * The identifier can be one of the following:
|
| - *
|
| - * * the numeric identifier for the user
|
| - * * the email address of the user
|
| - * * the string literal `"me"`, indicating the requesting user
|
| - *
|
| - * This must be set in a create request. Admins can also specify this field
|
| - * in a patch course request to
|
| - * transfer ownership. In other contexts, it is read-only.
|
| - */
|
| +
|
| + /// The identifier of the owner of a course.
|
| + ///
|
| + /// When specified as a parameter of a
|
| + /// create course request, this
|
| + /// field is required.
|
| + /// The identifier can be one of the following:
|
| + ///
|
| + /// * the numeric identifier for the user
|
| + /// * the email address of the user
|
| + /// * the string literal `"me"`, indicating the requesting user
|
| + ///
|
| + /// This must be set in a create request. Admins can also specify this field
|
| + /// in a patch course request to
|
| + /// transfer ownership. In other contexts, it is read-only.
|
| core.String ownerId;
|
| - /**
|
| - * Optional room location.
|
| - * For example, "301".
|
| - * If set, this field must be a valid UTF-8 string and no longer than 650
|
| - * characters.
|
| - */
|
| +
|
| + /// Optional room location.
|
| + /// For example, "301".
|
| + /// If set, this field must be a valid UTF-8 string and no longer than 650
|
| + /// characters.
|
| core.String room;
|
| - /**
|
| - * Section of the course.
|
| - * For example, "Period 2".
|
| - * If set, this field must be a valid UTF-8 string and no longer than 2800
|
| - * characters.
|
| - */
|
| +
|
| + /// Section of the course.
|
| + /// For example, "Period 2".
|
| + /// If set, this field must be a valid UTF-8 string and no longer than 2800
|
| + /// characters.
|
| core.String section;
|
| - /**
|
| - * Information about a Drive Folder that is shared with all teachers of the
|
| - * course.
|
| - *
|
| - * This field will only be set for teachers of the course and domain
|
| - * administrators.
|
| - *
|
| - * Read-only.
|
| - */
|
| +
|
| + /// Information about a Drive Folder that is shared with all teachers of the
|
| + /// course.
|
| + ///
|
| + /// This field will only be set for teachers of the course and domain
|
| + /// administrators.
|
| + ///
|
| + /// Read-only.
|
| DriveFolder teacherFolder;
|
| - /**
|
| - * The email address of a Google group containing all teachers of the course.
|
| - * This group does not accept email and can only be used for permissions.
|
| - *
|
| - * Read-only.
|
| - */
|
| +
|
| + /// The email address of a Google group containing all teachers of the
|
| + /// course.
|
| + /// This group does not accept email and can only be used for permissions.
|
| + ///
|
| + /// Read-only.
|
| core.String teacherGroupEmail;
|
| - /**
|
| - * Time of the most recent update to this course.
|
| - * Specifying this field in a course update mask results in an error.
|
| - *
|
| - * Read-only.
|
| - */
|
| +
|
| + /// Time of the most recent update to this course.
|
| + /// Specifying this field in a course update mask results in an error.
|
| + ///
|
| + /// Read-only.
|
| core.String updateTime;
|
|
|
| Course();
|
| @@ -3284,7 +3332,9 @@ class Course {
|
| courseGroupEmail = _json["courseGroupEmail"];
|
| }
|
| if (_json.containsKey("courseMaterialSets")) {
|
| - courseMaterialSets = _json["courseMaterialSets"].map((value) => new CourseMaterialSet.fromJson(value)).toList();
|
| + courseMaterialSets = _json["courseMaterialSets"]
|
| + .map((value) => new CourseMaterialSet.fromJson(value))
|
| + .toList();
|
| }
|
| if (_json.containsKey("courseState")) {
|
| courseState = _json["courseState"];
|
| @@ -3331,7 +3381,8 @@ class Course {
|
| }
|
|
|
| core.Map<core.String, core.Object> toJson() {
|
| - final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>();
|
| + final core.Map<core.String, core.Object> _json =
|
| + new core.Map<core.String, core.Object>();
|
| if (alternateLink != null) {
|
| _json["alternateLink"] = alternateLink;
|
| }
|
| @@ -3342,7 +3393,8 @@ class Course {
|
| _json["courseGroupEmail"] = courseGroupEmail;
|
| }
|
| if (courseMaterialSets != null) {
|
| - _json["courseMaterialSets"] = courseMaterialSets.map((value) => (value).toJson()).toList();
|
| + _json["courseMaterialSets"] =
|
| + courseMaterialSets.map((value) => (value).toJson()).toList();
|
| }
|
| if (courseState != null) {
|
| _json["courseState"] = courseState;
|
| @@ -3390,34 +3442,33 @@ class Course {
|
| }
|
| }
|
|
|
| -/**
|
| - * Alternative identifier for a course.
|
| - *
|
| - * An alias uniquely identifies a course. It must be unique within one of the
|
| - * following scopes:
|
| - *
|
| - * * domain: A domain-scoped alias is visible to all users within the alias
|
| - * creator's domain and can be created only by a domain admin. A domain-scoped
|
| - * alias is often used when a course has an identifier external to Classroom.
|
| - *
|
| - * * project: A project-scoped alias is visible to any request from an
|
| - * application using the Developer Console project ID that created the alias
|
| - * and can be created by any project. A project-scoped alias is often used when
|
| - * an application has alternative identifiers. A random value can also be used
|
| - * to avoid duplicate courses in the event of transmission failures, as retrying
|
| - * a request will return `ALREADY_EXISTS` if a previous one has succeeded.
|
| - */
|
| +/// Alternative identifier for a course.
|
| +///
|
| +/// An alias uniquely identifies a course. It must be unique within one of the
|
| +/// following scopes:
|
| +///
|
| +/// * domain: A domain-scoped alias is visible to all users within the alias
|
| +/// creator's domain and can be created only by a domain admin. A domain-scoped
|
| +/// alias is often used when a course has an identifier external to Classroom.
|
| +///
|
| +/// * project: A project-scoped alias is visible to any request from an
|
| +/// application using the Developer Console project ID that created the alias
|
| +/// and can be created by any project. A project-scoped alias is often used
|
| +/// when
|
| +/// an application has alternative identifiers. A random value can also be used
|
| +/// to avoid duplicate courses in the event of transmission failures, as
|
| +/// retrying
|
| +/// a request will return `ALREADY_EXISTS` if a previous one has succeeded.
|
| class CourseAlias {
|
| - /**
|
| - * Alias string. The format of the string indicates the desired alias scoping.
|
| - *
|
| - * * `d:<name>` indicates a domain-scoped alias.
|
| - * Example: `d:math_101`
|
| - * * `p:<name>` indicates a project-scoped alias.
|
| - * Example: `p:abc123`
|
| - *
|
| - * This field has a maximum length of 256 characters.
|
| - */
|
| + /// Alias string. The format of the string indicates the desired alias
|
| + /// scoping.
|
| + ///
|
| + /// * `d:<name>` indicates a domain-scoped alias.
|
| + /// Example: `d:math_101`
|
| + /// * `p:<name>` indicates a project-scoped alias.
|
| + /// Example: `p:abc123`
|
| + ///
|
| + /// This field has a maximum length of 256 characters.
|
| core.String alias;
|
|
|
| CourseAlias();
|
| @@ -3429,7 +3480,8 @@ class CourseAlias {
|
| }
|
|
|
| core.Map<core.String, core.Object> toJson() {
|
| - final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>();
|
| + final core.Map<core.String, core.Object> _json =
|
| + new core.Map<core.String, core.Object>();
|
| if (alias != null) {
|
| _json["alias"] = alias;
|
| }
|
| @@ -3437,15 +3489,18 @@ class CourseAlias {
|
| }
|
| }
|
|
|
| -/** A material attached to a course as part of a material set. */
|
| +/// A material attached to a course as part of a material set.
|
| class CourseMaterial {
|
| - /** Google Drive file attachment. */
|
| + /// Google Drive file attachment.
|
| DriveFile driveFile;
|
| - /** Google Forms attachment. */
|
| +
|
| + /// Google Forms attachment.
|
| Form form;
|
| - /** Link atatchment. */
|
| +
|
| + /// Link atatchment.
|
| Link link;
|
| - /** Youtube video attachment. */
|
| +
|
| + /// Youtube video attachment.
|
| YouTubeVideo youTubeVideo;
|
|
|
| CourseMaterial();
|
| @@ -3466,7 +3521,8 @@ class CourseMaterial {
|
| }
|
|
|
| core.Map<core.String, core.Object> toJson() {
|
| - final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>();
|
| + final core.Map<core.String, core.Object> _json =
|
| + new core.Map<core.String, core.Object>();
|
| if (driveFile != null) {
|
| _json["driveFile"] = (driveFile).toJson();
|
| }
|
| @@ -3483,22 +3539,23 @@ class CourseMaterial {
|
| }
|
| }
|
|
|
| -/**
|
| - * A set of materials that appears on the "About" page of the course.
|
| - * These materials might include a syllabus, schedule, or other background
|
| - * information relating to the course as a whole.
|
| - */
|
| +/// A set of materials that appears on the "About" page of the course.
|
| +/// These materials might include a syllabus, schedule, or other background
|
| +/// information relating to the course as a whole.
|
| class CourseMaterialSet {
|
| - /** Materials attached to this set. */
|
| + /// Materials attached to this set.
|
| core.List<CourseMaterial> materials;
|
| - /** Title for this set. */
|
| +
|
| + /// Title for this set.
|
| core.String title;
|
|
|
| CourseMaterialSet();
|
|
|
| CourseMaterialSet.fromJson(core.Map _json) {
|
| if (_json.containsKey("materials")) {
|
| - materials = _json["materials"].map((value) => new CourseMaterial.fromJson(value)).toList();
|
| + materials = _json["materials"]
|
| + .map((value) => new CourseMaterial.fromJson(value))
|
| + .toList();
|
| }
|
| if (_json.containsKey("title")) {
|
| title = _json["title"];
|
| @@ -3506,7 +3563,8 @@ class CourseMaterialSet {
|
| }
|
|
|
| core.Map<core.String, core.Object> toJson() {
|
| - final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>();
|
| + final core.Map<core.String, core.Object> _json =
|
| + new core.Map<core.String, core.Object>();
|
| if (materials != null) {
|
| _json["materials"] = materials.map((value) => (value).toJson()).toList();
|
| }
|
| @@ -3517,141 +3575,125 @@ class CourseMaterialSet {
|
| }
|
| }
|
|
|
| -/** Course work created by a teacher for students of the course. */
|
| +/// Course work created by a teacher for students of the course.
|
| class CourseWork {
|
| - /**
|
| - * Absolute link to this course work in the Classroom web UI.
|
| - * This is only populated if `state` is `PUBLISHED`.
|
| - *
|
| - * Read-only.
|
| - */
|
| + /// Absolute link to this course work in the Classroom web UI.
|
| + /// This is only populated if `state` is `PUBLISHED`.
|
| + ///
|
| + /// Read-only.
|
| core.String alternateLink;
|
| - /**
|
| - * Assignment details.
|
| - * This is populated only when `work_type` is `ASSIGNMENT`.
|
| - *
|
| - * Read-only.
|
| - */
|
| +
|
| + /// Assignment details.
|
| + /// This is populated only when `work_type` is `ASSIGNMENT`.
|
| + ///
|
| + /// Read-only.
|
| Assignment assignment;
|
| - /**
|
| - * Whether this course work item is associated with the Developer Console
|
| - * project making the request.
|
| - *
|
| - * See google.classroom.Work.CreateCourseWork for more
|
| - * details.
|
| - *
|
| - * Read-only.
|
| - */
|
| +
|
| + /// Whether this course work item is associated with the Developer Console
|
| + /// project making the request.
|
| + ///
|
| + /// See google.classroom.Work.CreateCourseWork for more
|
| + /// details.
|
| + ///
|
| + /// Read-only.
|
| core.bool associatedWithDeveloper;
|
| - /**
|
| - * Identifier of the course.
|
| - *
|
| - * Read-only.
|
| - */
|
| +
|
| + /// Identifier of the course.
|
| + ///
|
| + /// Read-only.
|
| core.String courseId;
|
| - /**
|
| - * Timestamp when this course work was created.
|
| - *
|
| - * Read-only.
|
| - */
|
| +
|
| + /// Timestamp when this course work was created.
|
| + ///
|
| + /// Read-only.
|
| core.String creationTime;
|
| - /**
|
| - * Optional description of this course work.
|
| - * If set, the description must be a valid UTF-8 string containing no more
|
| - * than 30,000 characters.
|
| - */
|
| +
|
| + /// Optional description of this course work.
|
| + /// If set, the description must be a valid UTF-8 string containing no more
|
| + /// than 30,000 characters.
|
| core.String description;
|
| - /**
|
| - * Optional date, in UTC, that submissions for this this course work are due.
|
| - * This must be specified if `due_time` is specified.
|
| - */
|
| +
|
| + /// Optional date, in UTC, that submissions for this this course work are
|
| + /// due.
|
| + /// This must be specified if `due_time` is specified.
|
| Date dueDate;
|
| - /**
|
| - * Optional time of day, in UTC, that submissions for this this course work
|
| - * are due.
|
| - * This must be specified if `due_date` is specified.
|
| - */
|
| +
|
| + /// Optional time of day, in UTC, that submissions for this this course work
|
| + /// are due.
|
| + /// This must be specified if `due_date` is specified.
|
| TimeOfDay dueTime;
|
| - /**
|
| - * Classroom-assigned identifier of this course work, unique per course.
|
| - *
|
| - * Read-only.
|
| - */
|
| +
|
| + /// Classroom-assigned identifier of this course work, unique per course.
|
| + ///
|
| + /// Read-only.
|
| core.String id;
|
| - /**
|
| - * Additional materials.
|
| - *
|
| - * CourseWork must have no more than 20 material items.
|
| - */
|
| +
|
| + /// Additional materials.
|
| + ///
|
| + /// CourseWork must have no more than 20 material items.
|
| core.List<Material> materials;
|
| - /**
|
| - * Maximum grade for this course work.
|
| - * If zero or unspecified, this assignment is considered ungraded.
|
| - * This must be a non-negative integer value.
|
| - */
|
| +
|
| + /// Maximum grade for this course work.
|
| + /// If zero or unspecified, this assignment is considered ungraded.
|
| + /// This must be a non-negative integer value.
|
| core.double maxPoints;
|
| - /**
|
| - * Multiple choice question details.
|
| - * For read operations, this field is populated only when `work_type` is
|
| - * `MULTIPLE_CHOICE_QUESTION`.
|
| - * For write operations, this field must be specified when creating course
|
| - * work with a `work_type` of `MULTIPLE_CHOICE_QUESTION`, and it must not be
|
| - * set otherwise.
|
| - */
|
| +
|
| + /// Multiple choice question details.
|
| + /// For read operations, this field is populated only when `work_type` is
|
| + /// `MULTIPLE_CHOICE_QUESTION`.
|
| + /// For write operations, this field must be specified when creating course
|
| + /// work with a `work_type` of `MULTIPLE_CHOICE_QUESTION`, and it must not be
|
| + /// set otherwise.
|
| MultipleChoiceQuestion multipleChoiceQuestion;
|
| - /** Optional timestamp when this course work is scheduled to be published. */
|
| +
|
| + /// Optional timestamp when this course work is scheduled to be published.
|
| core.String scheduledTime;
|
| - /**
|
| - * Status of this course work.
|
| - * If unspecified, the default state is `DRAFT`.
|
| - * Possible string values are:
|
| - * - "COURSE_WORK_STATE_UNSPECIFIED" : No state specified. This is never
|
| - * returned.
|
| - * - "PUBLISHED" : Status for work that has been published.
|
| - * This is the default state.
|
| - * - "DRAFT" : Status for work that is not yet published.
|
| - * Work in this state is visible only to course teachers and domain
|
| - * administrators.
|
| - * - "DELETED" : Status for work that was published but is now deleted.
|
| - * Work in this state is visible only to course teachers and domain
|
| - * administrators.
|
| - * Work in this state is deleted after some time.
|
| - */
|
| +
|
| + /// Status of this course work.
|
| + /// If unspecified, the default state is `DRAFT`.
|
| + /// Possible string values are:
|
| + /// - "COURSE_WORK_STATE_UNSPECIFIED" : No state specified. This is never
|
| + /// returned.
|
| + /// - "PUBLISHED" : Status for work that has been published.
|
| + /// This is the default state.
|
| + /// - "DRAFT" : Status for work that is not yet published.
|
| + /// Work in this state is visible only to course teachers and domain
|
| + /// administrators.
|
| + /// - "DELETED" : Status for work that was published but is now deleted.
|
| + /// Work in this state is visible only to course teachers and domain
|
| + /// administrators.
|
| + /// Work in this state is deleted after some time.
|
| core.String state;
|
| - /**
|
| - * Setting to determine when students are allowed to modify submissions.
|
| - * If unspecified, the default value is `MODIFIABLE_UNTIL_TURNED_IN`.
|
| - * Possible string values are:
|
| - * - "SUBMISSION_MODIFICATION_MODE_UNSPECIFIED" : No modification mode
|
| - * specified. This is never returned.
|
| - * - "MODIFIABLE_UNTIL_TURNED_IN" : Submisisons can be modified before being
|
| - * turned in.
|
| - * - "MODIFIABLE" : Submisisons can be modified at any time.
|
| - */
|
| +
|
| + /// Setting to determine when students are allowed to modify submissions.
|
| + /// If unspecified, the default value is `MODIFIABLE_UNTIL_TURNED_IN`.
|
| + /// Possible string values are:
|
| + /// - "SUBMISSION_MODIFICATION_MODE_UNSPECIFIED" : No modification mode
|
| + /// specified. This is never returned.
|
| + /// - "MODIFIABLE_UNTIL_TURNED_IN" : Submisisons can be modified before being
|
| + /// turned in.
|
| + /// - "MODIFIABLE" : Submisisons can be modified at any time.
|
| core.String submissionModificationMode;
|
| - /**
|
| - * Title of this course work.
|
| - * The title must be a valid UTF-8 string containing between 1 and 3000
|
| - * characters.
|
| - */
|
| +
|
| + /// Title of this course work.
|
| + /// The title must be a valid UTF-8 string containing between 1 and 3000
|
| + /// characters.
|
| core.String title;
|
| - /**
|
| - * Timestamp of the most recent change to this course work.
|
| - *
|
| - * Read-only.
|
| - */
|
| +
|
| + /// Timestamp of the most recent change to this course work.
|
| + ///
|
| + /// Read-only.
|
| core.String updateTime;
|
| - /**
|
| - * Type of this course work.
|
| - *
|
| - * The type is set when the course work is created and cannot be changed.
|
| - * Possible string values are:
|
| - * - "COURSE_WORK_TYPE_UNSPECIFIED" : No work type specified. This is never
|
| - * returned.
|
| - * - "ASSIGNMENT" : An assignment.
|
| - * - "SHORT_ANSWER_QUESTION" : A short answer question.
|
| - * - "MULTIPLE_CHOICE_QUESTION" : A multiple-choice question.
|
| - */
|
| +
|
| + /// Type of this course work.
|
| + ///
|
| + /// The type is set when the course work is created and cannot be changed.
|
| + /// Possible string values are:
|
| + /// - "COURSE_WORK_TYPE_UNSPECIFIED" : No work type specified. This is never
|
| + /// returned.
|
| + /// - "ASSIGNMENT" : An assignment.
|
| + /// - "SHORT_ANSWER_QUESTION" : A short answer question.
|
| + /// - "MULTIPLE_CHOICE_QUESTION" : A multiple-choice question.
|
| core.String workType;
|
|
|
| CourseWork();
|
| @@ -3685,13 +3727,16 @@ class CourseWork {
|
| id = _json["id"];
|
| }
|
| if (_json.containsKey("materials")) {
|
| - materials = _json["materials"].map((value) => new Material.fromJson(value)).toList();
|
| + materials = _json["materials"]
|
| + .map((value) => new Material.fromJson(value))
|
| + .toList();
|
| }
|
| if (_json.containsKey("maxPoints")) {
|
| maxPoints = _json["maxPoints"];
|
| }
|
| if (_json.containsKey("multipleChoiceQuestion")) {
|
| - multipleChoiceQuestion = new MultipleChoiceQuestion.fromJson(_json["multipleChoiceQuestion"]);
|
| + multipleChoiceQuestion =
|
| + new MultipleChoiceQuestion.fromJson(_json["multipleChoiceQuestion"]);
|
| }
|
| if (_json.containsKey("scheduledTime")) {
|
| scheduledTime = _json["scheduledTime"];
|
| @@ -3714,7 +3759,8 @@ class CourseWork {
|
| }
|
|
|
| core.Map<core.String, core.Object> toJson() {
|
| - final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>();
|
| + final core.Map<core.String, core.Object> _json =
|
| + new core.Map<core.String, core.Object>();
|
| if (alternateLink != null) {
|
| _json["alternateLink"] = alternateLink;
|
| }
|
| @@ -3773,27 +3819,24 @@ class CourseWork {
|
| }
|
| }
|
|
|
| -/**
|
| - * Represents a whole calendar date, e.g. date of birth. The time of day and
|
| - * time zone are either specified elsewhere or are not significant. The date
|
| - * is relative to the Proleptic Gregorian Calendar. The day may be 0 to
|
| - * represent a year and month where the day is not significant, e.g. credit card
|
| - * expiration date. The year may be 0 to represent a month and day independent
|
| - * of year, e.g. anniversary date. Related types are google.type.TimeOfDay
|
| - * and `google.protobuf.Timestamp`.
|
| - */
|
| +/// Represents a whole calendar date, e.g. date of birth. The time of day and
|
| +/// time zone are either specified elsewhere or are not significant. The date
|
| +/// is relative to the Proleptic Gregorian Calendar. The day may be 0 to
|
| +/// represent a year and month where the day is not significant, e.g. credit
|
| +/// card
|
| +/// expiration date. The year may be 0 to represent a month and day independent
|
| +/// of year, e.g. anniversary date. Related types are google.type.TimeOfDay
|
| +/// and `google.protobuf.Timestamp`.
|
| class Date {
|
| - /**
|
| - * Day of month. Must be from 1 to 31 and valid for the year and month, or 0
|
| - * if specifying a year/month where the day is not significant.
|
| - */
|
| + /// Day of month. Must be from 1 to 31 and valid for the year and month, or 0
|
| + /// if specifying a year/month where the day is not significant.
|
| core.int day;
|
| - /** Month of year. Must be from 1 to 12. */
|
| +
|
| + /// Month of year. Must be from 1 to 12.
|
| core.int month;
|
| - /**
|
| - * Year of date. Must be from 1 to 9999, or 0 if specifying a date without
|
| - * a year.
|
| - */
|
| +
|
| + /// Year of date. Must be from 1 to 9999, or 0 if specifying a date without
|
| + /// a year.
|
| core.int year;
|
|
|
| Date();
|
| @@ -3811,7 +3854,8 @@ class Date {
|
| }
|
|
|
| core.Map<core.String, core.Object> toJson() {
|
| - final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>();
|
| + final core.Map<core.String, core.Object> _json =
|
| + new core.Map<core.String, core.Object>();
|
| if (day != null) {
|
| _json["day"] = day;
|
| }
|
| @@ -3825,27 +3869,24 @@ class Date {
|
| }
|
| }
|
|
|
| -/** Representation of a Google Drive file. */
|
| +/// Representation of a Google Drive file.
|
| class DriveFile {
|
| - /**
|
| - * URL that can be used to access the Drive item.
|
| - *
|
| - * Read-only.
|
| - */
|
| + /// URL that can be used to access the Drive item.
|
| + ///
|
| + /// Read-only.
|
| core.String alternateLink;
|
| - /** Drive API resource ID. */
|
| +
|
| + /// Drive API resource ID.
|
| core.String id;
|
| - /**
|
| - * URL of a thumbnail image of the Drive item.
|
| - *
|
| - * Read-only.
|
| - */
|
| +
|
| + /// URL of a thumbnail image of the Drive item.
|
| + ///
|
| + /// Read-only.
|
| core.String thumbnailUrl;
|
| - /**
|
| - * Title of the Drive item.
|
| - *
|
| - * Read-only.
|
| - */
|
| +
|
| + /// Title of the Drive item.
|
| + ///
|
| + /// Read-only.
|
| core.String title;
|
|
|
| DriveFile();
|
| @@ -3866,7 +3907,8 @@ class DriveFile {
|
| }
|
|
|
| core.Map<core.String, core.Object> toJson() {
|
| - final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>();
|
| + final core.Map<core.String, core.Object> _json =
|
| + new core.Map<core.String, core.Object>();
|
| if (alternateLink != null) {
|
| _json["alternateLink"] = alternateLink;
|
| }
|
| @@ -3883,21 +3925,19 @@ class DriveFile {
|
| }
|
| }
|
|
|
| -/** Representation of a Google Drive folder. */
|
| +/// Representation of a Google Drive folder.
|
| class DriveFolder {
|
| - /**
|
| - * URL that can be used to access the Drive folder.
|
| - *
|
| - * Read-only.
|
| - */
|
| + /// URL that can be used to access the Drive folder.
|
| + ///
|
| + /// Read-only.
|
| core.String alternateLink;
|
| - /** Drive API resource ID. */
|
| +
|
| + /// Drive API resource ID.
|
| core.String id;
|
| - /**
|
| - * Title of the Drive folder.
|
| - *
|
| - * Read-only.
|
| - */
|
| +
|
| + /// Title of the Drive folder.
|
| + ///
|
| + /// Read-only.
|
| core.String title;
|
|
|
| DriveFolder();
|
| @@ -3915,7 +3955,8 @@ class DriveFolder {
|
| }
|
|
|
| core.Map<core.String, core.Object> toJson() {
|
| - final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>();
|
| + final core.Map<core.String, core.Object> _json =
|
| + new core.Map<core.String, core.Object>();
|
| if (alternateLink != null) {
|
| _json["alternateLink"] = alternateLink;
|
| }
|
| @@ -3929,53 +3970,47 @@ class DriveFolder {
|
| }
|
| }
|
|
|
| -/**
|
| - * A generic empty message that you can re-use to avoid defining duplicated
|
| - * empty messages in your APIs. A typical example is to use it as the request
|
| - * or the response type of an API method. For instance:
|
| - *
|
| - * service Foo {
|
| - * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
|
| - * }
|
| - *
|
| - * The JSON representation for `Empty` is empty JSON object `{}`.
|
| - */
|
| +/// A generic empty message that you can re-use to avoid defining duplicated
|
| +/// empty messages in your APIs. A typical example is to use it as the request
|
| +/// or the response type of an API method. For instance:
|
| +///
|
| +/// service Foo {
|
| +/// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
|
| +/// }
|
| +///
|
| +/// The JSON representation for `Empty` is empty JSON object `{}`.
|
| class Empty {
|
| -
|
| Empty();
|
|
|
| - Empty.fromJson(core.Map _json) {
|
| - }
|
| + Empty.fromJson(core.Map _json) {}
|
|
|
| core.Map<core.String, core.Object> toJson() {
|
| - final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>();
|
| + final core.Map<core.String, core.Object> _json =
|
| + new core.Map<core.String, core.Object>();
|
| return _json;
|
| }
|
| }
|
|
|
| -/** Google Forms item. */
|
| +/// Google Forms item.
|
| class Form {
|
| - /** URL of the form. */
|
| + /// URL of the form.
|
| core.String formUrl;
|
| - /**
|
| - * URL of the form responses document.
|
| - * Only set if respsonses have been recorded and only when the
|
| - * requesting user is an editor of the form.
|
| - *
|
| - * Read-only.
|
| - */
|
| +
|
| + /// URL of the form responses document.
|
| + /// Only set if respsonses have been recorded and only when the
|
| + /// requesting user is an editor of the form.
|
| + ///
|
| + /// Read-only.
|
| core.String responseUrl;
|
| - /**
|
| - * URL of a thumbnail image of the Form.
|
| - *
|
| - * Read-only.
|
| - */
|
| +
|
| + /// URL of a thumbnail image of the Form.
|
| + ///
|
| + /// Read-only.
|
| core.String thumbnailUrl;
|
| - /**
|
| - * Title of the Form.
|
| - *
|
| - * Read-only.
|
| - */
|
| +
|
| + /// Title of the Form.
|
| + ///
|
| + /// Read-only.
|
| core.String title;
|
|
|
| Form();
|
| @@ -3996,7 +4031,8 @@ class Form {
|
| }
|
|
|
| core.Map<core.String, core.Object> toJson() {
|
| - final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>();
|
| + final core.Map<core.String, core.Object> _json =
|
| + new core.Map<core.String, core.Object>();
|
| if (formUrl != null) {
|
| _json["formUrl"] = formUrl;
|
| }
|
| @@ -4013,16 +4049,14 @@ class Form {
|
| }
|
| }
|
|
|
| -/** Global user permission description. */
|
| +/// Global user permission description.
|
| class GlobalPermission {
|
| - /**
|
| - * Permission value.
|
| - * Possible string values are:
|
| - * - "PERMISSION_UNSPECIFIED" : No permission is specified. This is not
|
| - * returned and is not a
|
| - * valid value.
|
| - * - "CREATE_COURSE" : User is permitted to create a course.
|
| - */
|
| + /// Permission value.
|
| + /// Possible string values are:
|
| + /// - "PERMISSION_UNSPECIFIED" : No permission is specified. This is not
|
| + /// returned and is not a
|
| + /// valid value.
|
| + /// - "CREATE_COURSE" : User is permitted to create a course.
|
| core.String permission;
|
|
|
| GlobalPermission();
|
| @@ -4034,7 +4068,8 @@ class GlobalPermission {
|
| }
|
|
|
| core.Map<core.String, core.Object> toJson() {
|
| - final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>();
|
| + final core.Map<core.String, core.Object> _json =
|
| + new core.Map<core.String, core.Object>();
|
| if (permission != null) {
|
| _json["permission"] = permission;
|
| }
|
| @@ -4042,32 +4077,30 @@ class GlobalPermission {
|
| }
|
| }
|
|
|
| -/** The history of each grade on this submission. */
|
| +/// The history of each grade on this submission.
|
| class GradeHistory {
|
| - /** The teacher who made the grade change. */
|
| + /// The teacher who made the grade change.
|
| core.String actorUserId;
|
| - /**
|
| - * The type of grade change at this time in the submission grade history.
|
| - * Possible string values are:
|
| - * - "UNKNOWN_GRADE_CHANGE_TYPE" : No grade change type specified. This should
|
| - * never be returned.
|
| - * - "DRAFT_GRADE_POINTS_EARNED_CHANGE" : A change in the numerator of the
|
| - * draft grade.
|
| - * - "ASSIGNED_GRADE_POINTS_EARNED_CHANGE" : A change in the numerator of the
|
| - * assigned grade.
|
| - * - "MAX_POINTS_CHANGE" : A change in the denominator of the grade.
|
| - */
|
| +
|
| + /// The type of grade change at this time in the submission grade history.
|
| + /// Possible string values are:
|
| + /// - "UNKNOWN_GRADE_CHANGE_TYPE" : No grade change type specified. This
|
| + /// should never be returned.
|
| + /// - "DRAFT_GRADE_POINTS_EARNED_CHANGE" : A change in the numerator of the
|
| + /// draft grade.
|
| + /// - "ASSIGNED_GRADE_POINTS_EARNED_CHANGE" : A change in the numerator of
|
| + /// the assigned grade.
|
| + /// - "MAX_POINTS_CHANGE" : A change in the denominator of the grade.
|
| core.String gradeChangeType;
|
| - /** When the grade of the submission was changed. */
|
| +
|
| + /// When the grade of the submission was changed.
|
| core.String gradeTimestamp;
|
| - /**
|
| - * The denominator of the grade at this time in the submission grade
|
| - * history.
|
| - */
|
| +
|
| + /// The denominator of the grade at this time in the submission grade
|
| + /// history.
|
| core.double maxPoints;
|
| - /**
|
| - * The numerator of the grade at this time in the submission grade history.
|
| - */
|
| +
|
| + /// The numerator of the grade at this time in the submission grade history.
|
| core.double pointsEarned;
|
|
|
| GradeHistory();
|
| @@ -4091,7 +4124,8 @@ class GradeHistory {
|
| }
|
|
|
| core.Map<core.String, core.Object> toJson() {
|
| - final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>();
|
| + final core.Map<core.String, core.Object> _json =
|
| + new core.Map<core.String, core.Object>();
|
| if (actorUserId != null) {
|
| _json["actorUserId"] = actorUserId;
|
| }
|
| @@ -4111,21 +4145,20 @@ class GradeHistory {
|
| }
|
| }
|
|
|
| -/**
|
| - * Association between a student and a guardian of that student. The guardian
|
| - * may receive information about the student's course work.
|
| - */
|
| +/// Association between a student and a guardian of that student. The guardian
|
| +/// may receive information about the student's course work.
|
| class Guardian {
|
| - /** Identifier for the guardian. */
|
| + /// Identifier for the guardian.
|
| core.String guardianId;
|
| - /** User profile for the guardian. */
|
| +
|
| + /// User profile for the guardian.
|
| UserProfile guardianProfile;
|
| - /**
|
| - * The email address to which the initial guardian invitation was sent.
|
| - * This field is only visible to domain administrators.
|
| - */
|
| +
|
| + /// The email address to which the initial guardian invitation was sent.
|
| + /// This field is only visible to domain administrators.
|
| core.String invitedEmailAddress;
|
| - /** Identifier for the student to whom the guardian relationship applies. */
|
| +
|
| + /// Identifier for the student to whom the guardian relationship applies.
|
| core.String studentId;
|
|
|
| Guardian();
|
| @@ -4146,7 +4179,8 @@ class Guardian {
|
| }
|
|
|
| core.Map<core.String, core.Object> toJson() {
|
| - final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>();
|
| + final core.Map<core.String, core.Object> _json =
|
| + new core.Map<core.String, core.Object>();
|
| if (guardianId != null) {
|
| _json["guardianId"] = guardianId;
|
| }
|
| @@ -4163,39 +4197,34 @@ class Guardian {
|
| }
|
| }
|
|
|
| -/**
|
| - * An invitation to become the guardian of a specified user, sent to a specified
|
| - * email address.
|
| - */
|
| +/// An invitation to become the guardian of a specified user, sent to a
|
| +/// specified
|
| +/// email address.
|
| class GuardianInvitation {
|
| - /**
|
| - * The time that this invitation was created.
|
| - *
|
| - * Read-only.
|
| - */
|
| + /// The time that this invitation was created.
|
| + ///
|
| + /// Read-only.
|
| core.String creationTime;
|
| - /**
|
| - * Unique identifier for this invitation.
|
| - *
|
| - * Read-only.
|
| - */
|
| +
|
| + /// Unique identifier for this invitation.
|
| + ///
|
| + /// Read-only.
|
| core.String invitationId;
|
| - /**
|
| - * Email address that the invitation was sent to.
|
| - * This field is only visible to domain administrators.
|
| - */
|
| +
|
| + /// Email address that the invitation was sent to.
|
| + /// This field is only visible to domain administrators.
|
| core.String invitedEmailAddress;
|
| - /**
|
| - * The state that this invitation is in.
|
| - * Possible string values are:
|
| - * - "GUARDIAN_INVITATION_STATE_UNSPECIFIED" : Should never be returned.
|
| - * - "PENDING" : The invitation is active and awaiting a response.
|
| - * - "COMPLETE" : The invitation is no longer active. It may have been
|
| - * accepted, declined,
|
| - * withdrawn or it may have expired.
|
| - */
|
| +
|
| + /// The state that this invitation is in.
|
| + /// Possible string values are:
|
| + /// - "GUARDIAN_INVITATION_STATE_UNSPECIFIED" : Should never be returned.
|
| + /// - "PENDING" : The invitation is active and awaiting a response.
|
| + /// - "COMPLETE" : The invitation is no longer active. It may have been
|
| + /// accepted, declined,
|
| + /// withdrawn or it may have expired.
|
| core.String state;
|
| - /** ID of the student (in standard format) */
|
| +
|
| + /// ID of the student (in standard format)
|
| core.String studentId;
|
|
|
| GuardianInvitation();
|
| @@ -4219,7 +4248,8 @@ class GuardianInvitation {
|
| }
|
|
|
| core.Map<core.String, core.Object> toJson() {
|
| - final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>();
|
| + final core.Map<core.String, core.Object> _json =
|
| + new core.Map<core.String, core.Object>();
|
| if (creationTime != null) {
|
| _json["creationTime"] = creationTime;
|
| }
|
| @@ -4239,36 +4269,33 @@ class GuardianInvitation {
|
| }
|
| }
|
|
|
| -/** An invitation to join a course. */
|
| +/// An invitation to join a course.
|
| class Invitation {
|
| - /** Identifier of the course to invite the user to. */
|
| + /// Identifier of the course to invite the user to.
|
| core.String courseId;
|
| - /**
|
| - * Identifier assigned by Classroom.
|
| - *
|
| - * Read-only.
|
| - */
|
| +
|
| + /// Identifier assigned by Classroom.
|
| + ///
|
| + /// Read-only.
|
| core.String id;
|
| - /**
|
| - * Role to invite the user to have.
|
| - * Must not be `COURSE_ROLE_UNSPECIFIED`.
|
| - * Possible string values are:
|
| - * - "COURSE_ROLE_UNSPECIFIED" : No course role.
|
| - * - "STUDENT" : Student in the course.
|
| - * - "TEACHER" : Teacher of the course.
|
| - * - "OWNER" : Owner of the course.
|
| - */
|
| +
|
| + /// Role to invite the user to have.
|
| + /// Must not be `COURSE_ROLE_UNSPECIFIED`.
|
| + /// Possible string values are:
|
| + /// - "COURSE_ROLE_UNSPECIFIED" : No course role.
|
| + /// - "STUDENT" : Student in the course.
|
| + /// - "TEACHER" : Teacher of the course.
|
| + /// - "OWNER" : Owner of the course.
|
| core.String role;
|
| - /**
|
| - * Identifier of the invited user.
|
| - *
|
| - * When specified as a parameter of a request, this identifier can be set to
|
| - * one of the following:
|
| - *
|
| - * * the numeric identifier for the user
|
| - * * the email address of the user
|
| - * * the string literal `"me"`, indicating the requesting user
|
| - */
|
| +
|
| + /// Identifier of the invited user.
|
| + ///
|
| + /// When specified as a parameter of a request, this identifier can be set to
|
| + /// one of the following:
|
| + ///
|
| + /// * the numeric identifier for the user
|
| + /// * the email address of the user
|
| + /// * the string literal `"me"`, indicating the requesting user
|
| core.String userId;
|
|
|
| Invitation();
|
| @@ -4289,7 +4316,8 @@ class Invitation {
|
| }
|
|
|
| core.Map<core.String, core.Object> toJson() {
|
| - final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>();
|
| + final core.Map<core.String, core.Object> _json =
|
| + new core.Map<core.String, core.Object>();
|
| if (courseId != null) {
|
| _json["courseId"] = courseId;
|
| }
|
| @@ -4306,24 +4334,21 @@ class Invitation {
|
| }
|
| }
|
|
|
| -/** URL item. */
|
| +/// URL item.
|
| class Link {
|
| - /**
|
| - * URL of a thumbnail image of the target URL.
|
| - *
|
| - * Read-only.
|
| - */
|
| + /// URL of a thumbnail image of the target URL.
|
| + ///
|
| + /// Read-only.
|
| core.String thumbnailUrl;
|
| - /**
|
| - * Title of the target of the URL.
|
| - *
|
| - * Read-only.
|
| - */
|
| +
|
| + /// Title of the target of the URL.
|
| + ///
|
| + /// Read-only.
|
| core.String title;
|
| - /**
|
| - * URL to link to.
|
| - * This must be a valid UTF-8 string containing between 1 and 2024 characters.
|
| - */
|
| +
|
| + /// URL to link to.
|
| + /// This must be a valid UTF-8 string containing between 1 and 2024
|
| + /// characters.
|
| core.String url;
|
|
|
| Link();
|
| @@ -4341,7 +4366,8 @@ class Link {
|
| }
|
|
|
| core.Map<core.String, core.Object> toJson() {
|
| - final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>();
|
| + final core.Map<core.String, core.Object> _json =
|
| + new core.Map<core.String, core.Object>();
|
| if (thumbnailUrl != null) {
|
| _json["thumbnailUrl"] = thumbnailUrl;
|
| }
|
| @@ -4355,21 +4381,23 @@ class Link {
|
| }
|
| }
|
|
|
| -/** Response when listing course aliases. */
|
| +/// Response when listing course aliases.
|
| class ListCourseAliasesResponse {
|
| - /** The course aliases. */
|
| + /// The course aliases.
|
| core.List<CourseAlias> aliases;
|
| - /**
|
| - * Token identifying the next page of results to return. If empty, no further
|
| - * results are available.
|
| - */
|
| +
|
| + /// Token identifying the next page of results to return. If empty, no
|
| + /// further
|
| + /// results are available.
|
| core.String nextPageToken;
|
|
|
| ListCourseAliasesResponse();
|
|
|
| ListCourseAliasesResponse.fromJson(core.Map _json) {
|
| if (_json.containsKey("aliases")) {
|
| - aliases = _json["aliases"].map((value) => new CourseAlias.fromJson(value)).toList();
|
| + aliases = _json["aliases"]
|
| + .map((value) => new CourseAlias.fromJson(value))
|
| + .toList();
|
| }
|
| if (_json.containsKey("nextPageToken")) {
|
| nextPageToken = _json["nextPageToken"];
|
| @@ -4377,7 +4405,8 @@ class ListCourseAliasesResponse {
|
| }
|
|
|
| core.Map<core.String, core.Object> toJson() {
|
| - final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>();
|
| + final core.Map<core.String, core.Object> _json =
|
| + new core.Map<core.String, core.Object>();
|
| if (aliases != null) {
|
| _json["aliases"] = aliases.map((value) => (value).toJson()).toList();
|
| }
|
| @@ -4388,21 +4417,23 @@ class ListCourseAliasesResponse {
|
| }
|
| }
|
|
|
| -/** Response when listing course work. */
|
| +/// Response when listing course work.
|
| class ListCourseWorkResponse {
|
| - /** Course work items that match the request. */
|
| + /// Course work items that match the request.
|
| core.List<CourseWork> courseWork;
|
| - /**
|
| - * Token identifying the next page of results to return. If empty, no further
|
| - * results are available.
|
| - */
|
| +
|
| + /// Token identifying the next page of results to return. If empty, no
|
| + /// further
|
| + /// results are available.
|
| core.String nextPageToken;
|
|
|
| ListCourseWorkResponse();
|
|
|
| ListCourseWorkResponse.fromJson(core.Map _json) {
|
| if (_json.containsKey("courseWork")) {
|
| - courseWork = _json["courseWork"].map((value) => new CourseWork.fromJson(value)).toList();
|
| + courseWork = _json["courseWork"]
|
| + .map((value) => new CourseWork.fromJson(value))
|
| + .toList();
|
| }
|
| if (_json.containsKey("nextPageToken")) {
|
| nextPageToken = _json["nextPageToken"];
|
| @@ -4410,9 +4441,11 @@ class ListCourseWorkResponse {
|
| }
|
|
|
| core.Map<core.String, core.Object> toJson() {
|
| - final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>();
|
| + final core.Map<core.String, core.Object> _json =
|
| + new core.Map<core.String, core.Object>();
|
| if (courseWork != null) {
|
| - _json["courseWork"] = courseWork.map((value) => (value).toJson()).toList();
|
| + _json["courseWork"] =
|
| + courseWork.map((value) => (value).toJson()).toList();
|
| }
|
| if (nextPageToken != null) {
|
| _json["nextPageToken"] = nextPageToken;
|
| @@ -4421,21 +4454,22 @@ class ListCourseWorkResponse {
|
| }
|
| }
|
|
|
| -/** Response when listing courses. */
|
| +/// Response when listing courses.
|
| class ListCoursesResponse {
|
| - /** Courses that match the list request. */
|
| + /// Courses that match the list request.
|
| core.List<Course> courses;
|
| - /**
|
| - * Token identifying the next page of results to return. If empty, no further
|
| - * results are available.
|
| - */
|
| +
|
| + /// Token identifying the next page of results to return. If empty, no
|
| + /// further
|
| + /// results are available.
|
| core.String nextPageToken;
|
|
|
| ListCoursesResponse();
|
|
|
| ListCoursesResponse.fromJson(core.Map _json) {
|
| if (_json.containsKey("courses")) {
|
| - courses = _json["courses"].map((value) => new Course.fromJson(value)).toList();
|
| + courses =
|
| + _json["courses"].map((value) => new Course.fromJson(value)).toList();
|
| }
|
| if (_json.containsKey("nextPageToken")) {
|
| nextPageToken = _json["nextPageToken"];
|
| @@ -4443,7 +4477,8 @@ class ListCoursesResponse {
|
| }
|
|
|
| core.Map<core.String, core.Object> toJson() {
|
| - final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>();
|
| + final core.Map<core.String, core.Object> _json =
|
| + new core.Map<core.String, core.Object>();
|
| if (courses != null) {
|
| _json["courses"] = courses.map((value) => (value).toJson()).toList();
|
| }
|
| @@ -4454,21 +4489,23 @@ class ListCoursesResponse {
|
| }
|
| }
|
|
|
| -/** Response when listing guardian invitations. */
|
| +/// Response when listing guardian invitations.
|
| class ListGuardianInvitationsResponse {
|
| - /** Guardian invitations that matched the list request. */
|
| + /// Guardian invitations that matched the list request.
|
| core.List<GuardianInvitation> guardianInvitations;
|
| - /**
|
| - * Token identifying the next page of results to return. If empty, no further
|
| - * results are available.
|
| - */
|
| +
|
| + /// Token identifying the next page of results to return. If empty, no
|
| + /// further
|
| + /// results are available.
|
| core.String nextPageToken;
|
|
|
| ListGuardianInvitationsResponse();
|
|
|
| ListGuardianInvitationsResponse.fromJson(core.Map _json) {
|
| if (_json.containsKey("guardianInvitations")) {
|
| - guardianInvitations = _json["guardianInvitations"].map((value) => new GuardianInvitation.fromJson(value)).toList();
|
| + guardianInvitations = _json["guardianInvitations"]
|
| + .map((value) => new GuardianInvitation.fromJson(value))
|
| + .toList();
|
| }
|
| if (_json.containsKey("nextPageToken")) {
|
| nextPageToken = _json["nextPageToken"];
|
| @@ -4476,9 +4513,11 @@ class ListGuardianInvitationsResponse {
|
| }
|
|
|
| core.Map<core.String, core.Object> toJson() {
|
| - final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>();
|
| + final core.Map<core.String, core.Object> _json =
|
| + new core.Map<core.String, core.Object>();
|
| if (guardianInvitations != null) {
|
| - _json["guardianInvitations"] = guardianInvitations.map((value) => (value).toJson()).toList();
|
| + _json["guardianInvitations"] =
|
| + guardianInvitations.map((value) => (value).toJson()).toList();
|
| }
|
| if (nextPageToken != null) {
|
| _json["nextPageToken"] = nextPageToken;
|
| @@ -4487,24 +4526,24 @@ class ListGuardianInvitationsResponse {
|
| }
|
| }
|
|
|
| -/** Response when listing guardians. */
|
| +/// Response when listing guardians.
|
| class ListGuardiansResponse {
|
| - /**
|
| - * Guardians on this page of results that met the criteria specified in
|
| - * the request.
|
| - */
|
| + /// Guardians on this page of results that met the criteria specified in
|
| + /// the request.
|
| core.List<Guardian> guardians;
|
| - /**
|
| - * Token identifying the next page of results to return. If empty, no further
|
| - * results are available.
|
| - */
|
| +
|
| + /// Token identifying the next page of results to return. If empty, no
|
| + /// further
|
| + /// results are available.
|
| core.String nextPageToken;
|
|
|
| ListGuardiansResponse();
|
|
|
| ListGuardiansResponse.fromJson(core.Map _json) {
|
| if (_json.containsKey("guardians")) {
|
| - guardians = _json["guardians"].map((value) => new Guardian.fromJson(value)).toList();
|
| + guardians = _json["guardians"]
|
| + .map((value) => new Guardian.fromJson(value))
|
| + .toList();
|
| }
|
| if (_json.containsKey("nextPageToken")) {
|
| nextPageToken = _json["nextPageToken"];
|
| @@ -4512,7 +4551,8 @@ class ListGuardiansResponse {
|
| }
|
|
|
| core.Map<core.String, core.Object> toJson() {
|
| - final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>();
|
| + final core.Map<core.String, core.Object> _json =
|
| + new core.Map<core.String, core.Object>();
|
| if (guardians != null) {
|
| _json["guardians"] = guardians.map((value) => (value).toJson()).toList();
|
| }
|
| @@ -4523,21 +4563,23 @@ class ListGuardiansResponse {
|
| }
|
| }
|
|
|
| -/** Response when listing invitations. */
|
| +/// Response when listing invitations.
|
| class ListInvitationsResponse {
|
| - /** Invitations that match the list request. */
|
| + /// Invitations that match the list request.
|
| core.List<Invitation> invitations;
|
| - /**
|
| - * Token identifying the next page of results to return. If empty, no further
|
| - * results are available.
|
| - */
|
| +
|
| + /// Token identifying the next page of results to return. If empty, no
|
| + /// further
|
| + /// results are available.
|
| core.String nextPageToken;
|
|
|
| ListInvitationsResponse();
|
|
|
| ListInvitationsResponse.fromJson(core.Map _json) {
|
| if (_json.containsKey("invitations")) {
|
| - invitations = _json["invitations"].map((value) => new Invitation.fromJson(value)).toList();
|
| + invitations = _json["invitations"]
|
| + .map((value) => new Invitation.fromJson(value))
|
| + .toList();
|
| }
|
| if (_json.containsKey("nextPageToken")) {
|
| nextPageToken = _json["nextPageToken"];
|
| @@ -4545,9 +4587,11 @@ class ListInvitationsResponse {
|
| }
|
|
|
| core.Map<core.String, core.Object> toJson() {
|
| - final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>();
|
| + final core.Map<core.String, core.Object> _json =
|
| + new core.Map<core.String, core.Object>();
|
| if (invitations != null) {
|
| - _json["invitations"] = invitations.map((value) => (value).toJson()).toList();
|
| + _json["invitations"] =
|
| + invitations.map((value) => (value).toJson()).toList();
|
| }
|
| if (nextPageToken != null) {
|
| _json["nextPageToken"] = nextPageToken;
|
| @@ -4556,14 +4600,14 @@ class ListInvitationsResponse {
|
| }
|
| }
|
|
|
| -/** Response when listing student submissions. */
|
| +/// Response when listing student submissions.
|
| class ListStudentSubmissionsResponse {
|
| - /**
|
| - * Token identifying the next page of results to return. If empty, no further
|
| - * results are available.
|
| - */
|
| + /// Token identifying the next page of results to return. If empty, no
|
| + /// further
|
| + /// results are available.
|
| core.String nextPageToken;
|
| - /** Student work that matches the request. */
|
| +
|
| + /// Student work that matches the request.
|
| core.List<StudentSubmission> studentSubmissions;
|
|
|
| ListStudentSubmissionsResponse();
|
| @@ -4573,30 +4617,34 @@ class ListStudentSubmissionsResponse {
|
| nextPageToken = _json["nextPageToken"];
|
| }
|
| if (_json.containsKey("studentSubmissions")) {
|
| - studentSubmissions = _json["studentSubmissions"].map((value) => new StudentSubmission.fromJson(value)).toList();
|
| + studentSubmissions = _json["studentSubmissions"]
|
| + .map((value) => new StudentSubmission.fromJson(value))
|
| + .toList();
|
| }
|
| }
|
|
|
| core.Map<core.String, core.Object> toJson() {
|
| - final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>();
|
| + final core.Map<core.String, core.Object> _json =
|
| + new core.Map<core.String, core.Object>();
|
| if (nextPageToken != null) {
|
| _json["nextPageToken"] = nextPageToken;
|
| }
|
| if (studentSubmissions != null) {
|
| - _json["studentSubmissions"] = studentSubmissions.map((value) => (value).toJson()).toList();
|
| + _json["studentSubmissions"] =
|
| + studentSubmissions.map((value) => (value).toJson()).toList();
|
| }
|
| return _json;
|
| }
|
| }
|
|
|
| -/** Response when listing students. */
|
| +/// Response when listing students.
|
| class ListStudentsResponse {
|
| - /**
|
| - * Token identifying the next page of results to return. If empty, no further
|
| - * results are available.
|
| - */
|
| + /// Token identifying the next page of results to return. If empty, no
|
| + /// further
|
| + /// results are available.
|
| core.String nextPageToken;
|
| - /** Students who match the list request. */
|
| +
|
| + /// Students who match the list request.
|
| core.List<Student> students;
|
|
|
| ListStudentsResponse();
|
| @@ -4606,12 +4654,15 @@ class ListStudentsResponse {
|
| nextPageToken = _json["nextPageToken"];
|
| }
|
| if (_json.containsKey("students")) {
|
| - students = _json["students"].map((value) => new Student.fromJson(value)).toList();
|
| + students = _json["students"]
|
| + .map((value) => new Student.fromJson(value))
|
| + .toList();
|
| }
|
| }
|
|
|
| core.Map<core.String, core.Object> toJson() {
|
| - final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>();
|
| + final core.Map<core.String, core.Object> _json =
|
| + new core.Map<core.String, core.Object>();
|
| if (nextPageToken != null) {
|
| _json["nextPageToken"] = nextPageToken;
|
| }
|
| @@ -4622,14 +4673,14 @@ class ListStudentsResponse {
|
| }
|
| }
|
|
|
| -/** Response when listing teachers. */
|
| +/// Response when listing teachers.
|
| class ListTeachersResponse {
|
| - /**
|
| - * Token identifying the next page of results to return. If empty, no further
|
| - * results are available.
|
| - */
|
| + /// Token identifying the next page of results to return. If empty, no
|
| + /// further
|
| + /// results are available.
|
| core.String nextPageToken;
|
| - /** Teachers who match the list request. */
|
| +
|
| + /// Teachers who match the list request.
|
| core.List<Teacher> teachers;
|
|
|
| ListTeachersResponse();
|
| @@ -4639,12 +4690,15 @@ class ListTeachersResponse {
|
| nextPageToken = _json["nextPageToken"];
|
| }
|
| if (_json.containsKey("teachers")) {
|
| - teachers = _json["teachers"].map((value) => new Teacher.fromJson(value)).toList();
|
| + teachers = _json["teachers"]
|
| + .map((value) => new Teacher.fromJson(value))
|
| + .toList();
|
| }
|
| }
|
|
|
| core.Map<core.String, core.Object> toJson() {
|
| - final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>();
|
| + final core.Map<core.String, core.Object> _json =
|
| + new core.Map<core.String, core.Object>();
|
| if (nextPageToken != null) {
|
| _json["nextPageToken"] = nextPageToken;
|
| }
|
| @@ -4655,22 +4709,21 @@ class ListTeachersResponse {
|
| }
|
| }
|
|
|
| -/**
|
| - * Material attached to course work.
|
| - *
|
| - * When creating attachments, setting the `form` field is not supported.
|
| - */
|
| +/// Material attached to course work.
|
| +///
|
| +/// When creating attachments, setting the `form` field is not supported.
|
| class Material {
|
| - /** Google Drive file material. */
|
| + /// Google Drive file material.
|
| SharedDriveFile driveFile;
|
| - /** Google Forms material. */
|
| +
|
| + /// Google Forms material.
|
| Form form;
|
| - /**
|
| - * Link material. On creation, will be upgraded to a more appropriate type
|
| - * if possible, and this will be reflected in the response.
|
| - */
|
| +
|
| + /// Link material. On creation, will be upgraded to a more appropriate type
|
| + /// if possible, and this will be reflected in the response.
|
| Link link;
|
| - /** YouTube video material. */
|
| +
|
| + /// YouTube video material.
|
| YouTubeVideo youtubeVideo;
|
|
|
| Material();
|
| @@ -4691,7 +4744,8 @@ class Material {
|
| }
|
|
|
| core.Map<core.String, core.Object> toJson() {
|
| - final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>();
|
| + final core.Map<core.String, core.Object> _json =
|
| + new core.Map<core.String, core.Object>();
|
| if (driveFile != null) {
|
| _json["driveFile"] = (driveFile).toJson();
|
| }
|
| @@ -4708,36 +4762,38 @@ class Material {
|
| }
|
| }
|
|
|
| -/** Request to modify the attachments of a student submission. */
|
| +/// Request to modify the attachments of a student submission.
|
| class ModifyAttachmentsRequest {
|
| - /**
|
| - * Attachments to add.
|
| - * A student submission may not have more than 20 attachments.
|
| - *
|
| - * Form attachments are not supported.
|
| - */
|
| + /// Attachments to add.
|
| + /// A student submission may not have more than 20 attachments.
|
| + ///
|
| + /// Form attachments are not supported.
|
| core.List<Attachment> addAttachments;
|
|
|
| ModifyAttachmentsRequest();
|
|
|
| ModifyAttachmentsRequest.fromJson(core.Map _json) {
|
| if (_json.containsKey("addAttachments")) {
|
| - addAttachments = _json["addAttachments"].map((value) => new Attachment.fromJson(value)).toList();
|
| + addAttachments = _json["addAttachments"]
|
| + .map((value) => new Attachment.fromJson(value))
|
| + .toList();
|
| }
|
| }
|
|
|
| core.Map<core.String, core.Object> toJson() {
|
| - final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>();
|
| + final core.Map<core.String, core.Object> _json =
|
| + new core.Map<core.String, core.Object>();
|
| if (addAttachments != null) {
|
| - _json["addAttachments"] = addAttachments.map((value) => (value).toJson()).toList();
|
| + _json["addAttachments"] =
|
| + addAttachments.map((value) => (value).toJson()).toList();
|
| }
|
| return _json;
|
| }
|
| }
|
|
|
| -/** Additional details for multiple-choice questions. */
|
| +/// Additional details for multiple-choice questions.
|
| class MultipleChoiceQuestion {
|
| - /** Possible choices. */
|
| + /// Possible choices.
|
| core.List<core.String> choices;
|
|
|
| MultipleChoiceQuestion();
|
| @@ -4749,7 +4805,8 @@ class MultipleChoiceQuestion {
|
| }
|
|
|
| core.Map<core.String, core.Object> toJson() {
|
| - final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>();
|
| + final core.Map<core.String, core.Object> _json =
|
| + new core.Map<core.String, core.Object>();
|
| if (choices != null) {
|
| _json["choices"] = choices;
|
| }
|
| @@ -4757,9 +4814,9 @@ class MultipleChoiceQuestion {
|
| }
|
| }
|
|
|
| -/** Student work for a multiple-choice question. */
|
| +/// Student work for a multiple-choice question.
|
| class MultipleChoiceSubmission {
|
| - /** Student's select choice. */
|
| + /// Student's select choice.
|
| core.String answer;
|
|
|
| MultipleChoiceSubmission();
|
| @@ -4771,7 +4828,8 @@ class MultipleChoiceSubmission {
|
| }
|
|
|
| core.Map<core.String, core.Object> toJson() {
|
| - final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>();
|
| + final core.Map<core.String, core.Object> _json =
|
| + new core.Map<core.String, core.Object>();
|
| if (answer != null) {
|
| _json["answer"] = answer;
|
| }
|
| @@ -4779,26 +4837,22 @@ class MultipleChoiceSubmission {
|
| }
|
| }
|
|
|
| -/** Details of the user's name. */
|
| +/// Details of the user's name.
|
| class Name {
|
| - /**
|
| - * The user's last name.
|
| - *
|
| - * Read-only.
|
| - */
|
| + /// The user's last name.
|
| + ///
|
| + /// Read-only.
|
| core.String familyName;
|
| - /**
|
| - * The user's full name formed by concatenating the first and last name
|
| - * values.
|
| - *
|
| - * Read-only.
|
| - */
|
| +
|
| + /// The user's full name formed by concatenating the first and last name
|
| + /// values.
|
| + ///
|
| + /// Read-only.
|
| core.String fullName;
|
| - /**
|
| - * The user's first name.
|
| - *
|
| - * Read-only.
|
| - */
|
| +
|
| + /// The user's first name.
|
| + ///
|
| + /// Read-only.
|
| core.String givenName;
|
|
|
| Name();
|
| @@ -4816,7 +4870,8 @@ class Name {
|
| }
|
|
|
| core.Map<core.String, core.Object> toJson() {
|
| - final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>();
|
| + final core.Map<core.String, core.Object> _json =
|
| + new core.Map<core.String, core.Object>();
|
| if (familyName != null) {
|
| _json["familyName"] = familyName;
|
| }
|
| @@ -4830,47 +4885,44 @@ class Name {
|
| }
|
| }
|
|
|
| -/** Request to reclaim a student submission. */
|
| +/// Request to reclaim a student submission.
|
| class ReclaimStudentSubmissionRequest {
|
| -
|
| ReclaimStudentSubmissionRequest();
|
|
|
| - ReclaimStudentSubmissionRequest.fromJson(core.Map _json) {
|
| - }
|
| + ReclaimStudentSubmissionRequest.fromJson(core.Map _json) {}
|
|
|
| core.Map<core.String, core.Object> toJson() {
|
| - final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>();
|
| + final core.Map<core.String, core.Object> _json =
|
| + new core.Map<core.String, core.Object>();
|
| return _json;
|
| }
|
| }
|
|
|
| -/** Request to return a student submission. */
|
| +/// Request to return a student submission.
|
| class ReturnStudentSubmissionRequest {
|
| -
|
| ReturnStudentSubmissionRequest();
|
|
|
| - ReturnStudentSubmissionRequest.fromJson(core.Map _json) {
|
| - }
|
| + ReturnStudentSubmissionRequest.fromJson(core.Map _json) {}
|
|
|
| core.Map<core.String, core.Object> toJson() {
|
| - final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>();
|
| + final core.Map<core.String, core.Object> _json =
|
| + new core.Map<core.String, core.Object>();
|
| return _json;
|
| }
|
| }
|
|
|
| -/** Drive file that is used as material for course work. */
|
| +/// Drive file that is used as material for course work.
|
| class SharedDriveFile {
|
| - /** Drive file details. */
|
| + /// Drive file details.
|
| DriveFile driveFile;
|
| - /**
|
| - * Mechanism by which students access the Drive item.
|
| - * Possible string values are:
|
| - * - "UNKNOWN_SHARE_MODE" : No sharing mode specified. This should never be
|
| - * returned.
|
| - * - "VIEW" : Students can view the shared file.
|
| - * - "EDIT" : Students can edit the shared file.
|
| - * - "STUDENT_COPY" : Students have a personal copy of the shared file.
|
| - */
|
| +
|
| + /// Mechanism by which students access the Drive item.
|
| + /// Possible string values are:
|
| + /// - "UNKNOWN_SHARE_MODE" : No sharing mode specified. This should never be
|
| + /// returned.
|
| + /// - "VIEW" : Students can view the shared file.
|
| + /// - "EDIT" : Students can edit the shared file.
|
| + /// - "STUDENT_COPY" : Students have a personal copy of the shared file.
|
| core.String shareMode;
|
|
|
| SharedDriveFile();
|
| @@ -4885,7 +4937,8 @@ class SharedDriveFile {
|
| }
|
|
|
| core.Map<core.String, core.Object> toJson() {
|
| - final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>();
|
| + final core.Map<core.String, core.Object> _json =
|
| + new core.Map<core.String, core.Object>();
|
| if (driveFile != null) {
|
| _json["driveFile"] = (driveFile).toJson();
|
| }
|
| @@ -4896,9 +4949,9 @@ class SharedDriveFile {
|
| }
|
| }
|
|
|
| -/** Student work for a short answer question. */
|
| +/// Student work for a short answer question.
|
| class ShortAnswerSubmission {
|
| - /** Student response to a short-answer question. */
|
| + /// Student response to a short-answer question.
|
| core.String answer;
|
|
|
| ShortAnswerSubmission();
|
| @@ -4910,7 +4963,8 @@ class ShortAnswerSubmission {
|
| }
|
|
|
| core.Map<core.String, core.Object> toJson() {
|
| - final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>();
|
| + final core.Map<core.String, core.Object> _json =
|
| + new core.Map<core.String, core.Object>();
|
| if (answer != null) {
|
| _json["answer"] = answer;
|
| }
|
| @@ -4918,30 +4972,31 @@ class ShortAnswerSubmission {
|
| }
|
| }
|
|
|
| -/** The history of each state this submission has been in. */
|
| +/// The history of each state this submission has been in.
|
| class StateHistory {
|
| - /** The teacher or student who made the change */
|
| + /// The teacher or student who made the change
|
| core.String actorUserId;
|
| - /**
|
| - * The workflow pipeline stage.
|
| - * Possible string values are:
|
| - * - "STATE_UNSPECIFIED" : No state specified. This should never be returned.
|
| - * - "CREATED" : The Submission has been created.
|
| - * - "TURNED_IN" : The student has turned in an assigned document, which may
|
| - * or may not be
|
| - * a template.
|
| - * - "RETURNED" : The teacher has returned the assigned document to the
|
| - * student.
|
| - * - "RECLAIMED_BY_STUDENT" : The student turned in the assigned document, and
|
| - * then chose to
|
| - * "unsubmit" the assignment, giving the student control again as the
|
| - * owner.
|
| - * - "STUDENT_EDITED_AFTER_TURN_IN" : The student edited their submission
|
| - * after turning it in. Currently,
|
| - * only used by Questions, when the student edits their answer.
|
| - */
|
| +
|
| + /// The workflow pipeline stage.
|
| + /// Possible string values are:
|
| + /// - "STATE_UNSPECIFIED" : No state specified. This should never be
|
| + /// returned.
|
| + /// - "CREATED" : The Submission has been created.
|
| + /// - "TURNED_IN" : The student has turned in an assigned document, which may
|
| + /// or may not be
|
| + /// a template.
|
| + /// - "RETURNED" : The teacher has returned the assigned document to the
|
| + /// student.
|
| + /// - "RECLAIMED_BY_STUDENT" : The student turned in the assigned document,
|
| + /// and then chose to
|
| + /// "unsubmit" the assignment, giving the student control again as the
|
| + /// owner.
|
| + /// - "STUDENT_EDITED_AFTER_TURN_IN" : The student edited their submission
|
| + /// after turning it in. Currently,
|
| + /// only used by Questions, when the student edits their answer.
|
| core.String state;
|
| - /** When the submission entered this state. */
|
| +
|
| + /// When the submission entered this state.
|
| core.String stateTimestamp;
|
|
|
| StateHistory();
|
| @@ -4959,7 +5014,8 @@ class StateHistory {
|
| }
|
|
|
| core.Map<core.String, core.Object> toJson() {
|
| - final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>();
|
| + final core.Map<core.String, core.Object> _json =
|
| + new core.Map<core.String, core.Object>();
|
| if (actorUserId != null) {
|
| _json["actorUserId"] = actorUserId;
|
| }
|
| @@ -4973,37 +5029,32 @@ class StateHistory {
|
| }
|
| }
|
|
|
| -/** Student in a course. */
|
| +/// Student in a course.
|
| class Student {
|
| - /**
|
| - * Identifier of the course.
|
| - *
|
| - * Read-only.
|
| - */
|
| + /// Identifier of the course.
|
| + ///
|
| + /// Read-only.
|
| core.String courseId;
|
| - /**
|
| - * Global user information for the student.
|
| - *
|
| - * Read-only.
|
| - */
|
| +
|
| + /// Global user information for the student.
|
| + ///
|
| + /// Read-only.
|
| UserProfile profile;
|
| - /**
|
| - * Information about a Drive Folder for this student's work in this course.
|
| - * Only visible to the student and domain administrators.
|
| - *
|
| - * Read-only.
|
| - */
|
| +
|
| + /// Information about a Drive Folder for this student's work in this course.
|
| + /// Only visible to the student and domain administrators.
|
| + ///
|
| + /// Read-only.
|
| DriveFolder studentWorkFolder;
|
| - /**
|
| - * Identifier of the user.
|
| - *
|
| - * When specified as a parameter of a request, this identifier can be one of
|
| - * the following:
|
| - *
|
| - * * the numeric identifier for the user
|
| - * * the email address of the user
|
| - * * the string literal `"me"`, indicating the requesting user
|
| - */
|
| +
|
| + /// Identifier of the user.
|
| + ///
|
| + /// When specified as a parameter of a request, this identifier can be one of
|
| + /// the following:
|
| + ///
|
| + /// * the numeric identifier for the user
|
| + /// * the email address of the user
|
| + /// * the string literal `"me"`, indicating the requesting user
|
| core.String userId;
|
|
|
| Student();
|
| @@ -5024,7 +5075,8 @@ class Student {
|
| }
|
|
|
| core.Map<core.String, core.Object> toJson() {
|
| - final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>();
|
| + final core.Map<core.String, core.Object> _json =
|
| + new core.Map<core.String, core.Object>();
|
| if (courseId != null) {
|
| _json["courseId"] = courseId;
|
| }
|
| @@ -5041,131 +5093,117 @@ class Student {
|
| }
|
| }
|
|
|
| -/**
|
| - * Student submission for course work.
|
| - *
|
| - * StudentSubmission items are generated when a CourseWork item is created.
|
| - *
|
| - * StudentSubmissions that have never been accessed (i.e. with `state` = NEW)
|
| - * may not have a creation time or update time.
|
| - */
|
| +/// Student submission for course work.
|
| +///
|
| +/// StudentSubmission items are generated when a CourseWork item is created.
|
| +///
|
| +/// StudentSubmissions that have never been accessed (i.e. with `state` = NEW)
|
| +/// may not have a creation time or update time.
|
| class StudentSubmission {
|
| - /**
|
| - * Absolute link to the submission in the Classroom web UI.
|
| - *
|
| - * Read-only.
|
| - */
|
| + /// Absolute link to the submission in the Classroom web UI.
|
| + ///
|
| + /// Read-only.
|
| core.String alternateLink;
|
| - /**
|
| - * Optional grade. If unset, no grade was set.
|
| - * This value must be non-negative. Decimal (i.e. non-integer) values are
|
| - * allowed, but will be rounded to two decimal places.
|
| - *
|
| - * This may be modified only by course teachers.
|
| - */
|
| +
|
| + /// Optional grade. If unset, no grade was set.
|
| + /// This value must be non-negative. Decimal (i.e. non-integer) values are
|
| + /// allowed, but will be rounded to two decimal places.
|
| + ///
|
| + /// This may be modified only by course teachers.
|
| core.double assignedGrade;
|
| - /** Submission content when course_work_type is ASSIGNMENT . */
|
| +
|
| + /// Submission content when course_work_type is ASSIGNMENT .
|
| AssignmentSubmission assignmentSubmission;
|
| - /**
|
| - * Whether this student submission is associated with the Developer Console
|
| - * project making the request.
|
| - *
|
| - * See google.classroom.Work.CreateCourseWork for more
|
| - * details.
|
| - *
|
| - * Read-only.
|
| - */
|
| +
|
| + /// Whether this student submission is associated with the Developer Console
|
| + /// project making the request.
|
| + ///
|
| + /// See google.classroom.Work.CreateCourseWork for more
|
| + /// details.
|
| + ///
|
| + /// Read-only.
|
| core.bool associatedWithDeveloper;
|
| - /**
|
| - * Identifier of the course.
|
| - *
|
| - * Read-only.
|
| - */
|
| +
|
| + /// Identifier of the course.
|
| + ///
|
| + /// Read-only.
|
| core.String courseId;
|
| - /**
|
| - * Identifier for the course work this corresponds to.
|
| - *
|
| - * Read-only.
|
| - */
|
| +
|
| + /// Identifier for the course work this corresponds to.
|
| + ///
|
| + /// Read-only.
|
| core.String courseWorkId;
|
| - /**
|
| - * Type of course work this submission is for.
|
| - *
|
| - * Read-only.
|
| - * Possible string values are:
|
| - * - "COURSE_WORK_TYPE_UNSPECIFIED" : No work type specified. This is never
|
| - * returned.
|
| - * - "ASSIGNMENT" : An assignment.
|
| - * - "SHORT_ANSWER_QUESTION" : A short answer question.
|
| - * - "MULTIPLE_CHOICE_QUESTION" : A multiple-choice question.
|
| - */
|
| +
|
| + /// Type of course work this submission is for.
|
| + ///
|
| + /// Read-only.
|
| + /// Possible string values are:
|
| + /// - "COURSE_WORK_TYPE_UNSPECIFIED" : No work type specified. This is never
|
| + /// returned.
|
| + /// - "ASSIGNMENT" : An assignment.
|
| + /// - "SHORT_ANSWER_QUESTION" : A short answer question.
|
| + /// - "MULTIPLE_CHOICE_QUESTION" : A multiple-choice question.
|
| core.String courseWorkType;
|
| - /**
|
| - * Creation time of this submission.
|
| - * This may be unset if the student has not accessed this item.
|
| - *
|
| - * Read-only.
|
| - */
|
| +
|
| + /// Creation time of this submission.
|
| + /// This may be unset if the student has not accessed this item.
|
| + ///
|
| + /// Read-only.
|
| core.String creationTime;
|
| - /**
|
| - * Optional pending grade. If unset, no grade was set.
|
| - * This value must be non-negative. Decimal (i.e. non-integer) values are
|
| - * allowed, but will be rounded to two decimal places.
|
| - *
|
| - * This is only visible to and modifiable by course teachers.
|
| - */
|
| +
|
| + /// Optional pending grade. If unset, no grade was set.
|
| + /// This value must be non-negative. Decimal (i.e. non-integer) values are
|
| + /// allowed, but will be rounded to two decimal places.
|
| + ///
|
| + /// This is only visible to and modifiable by course teachers.
|
| core.double draftGrade;
|
| - /**
|
| - * Classroom-assigned Identifier for the student submission.
|
| - * This is unique among submissions for the relevant course work.
|
| - *
|
| - * Read-only.
|
| - */
|
| +
|
| + /// Classroom-assigned Identifier for the student submission.
|
| + /// This is unique among submissions for the relevant course work.
|
| + ///
|
| + /// Read-only.
|
| core.String id;
|
| - /**
|
| - * Whether this submission is late.
|
| - *
|
| - * Read-only.
|
| - */
|
| +
|
| + /// Whether this submission is late.
|
| + ///
|
| + /// Read-only.
|
| core.bool late;
|
| - /** Submission content when course_work_type is MULTIPLE_CHOICE_QUESTION. */
|
| +
|
| + /// Submission content when course_work_type is MULTIPLE_CHOICE_QUESTION.
|
| MultipleChoiceSubmission multipleChoiceSubmission;
|
| - /** Submission content when course_work_type is SHORT_ANSWER_QUESTION. */
|
| +
|
| + /// Submission content when course_work_type is SHORT_ANSWER_QUESTION.
|
| ShortAnswerSubmission shortAnswerSubmission;
|
| - /**
|
| - * State of this submission.
|
| - *
|
| - * Read-only.
|
| - * Possible string values are:
|
| - * - "SUBMISSION_STATE_UNSPECIFIED" : No state specified. This should never be
|
| - * returned.
|
| - * - "NEW" : The student has never accessed this submission. Attachments are
|
| - * not
|
| - * returned and timestamps is not set.
|
| - * - "CREATED" : Has been created.
|
| - * - "TURNED_IN" : Has been turned in to the teacher.
|
| - * - "RETURNED" : Has been returned to the student.
|
| - * - "RECLAIMED_BY_STUDENT" : Student chose to "unsubmit" the assignment.
|
| - */
|
| +
|
| + /// State of this submission.
|
| + ///
|
| + /// Read-only.
|
| + /// Possible string values are:
|
| + /// - "SUBMISSION_STATE_UNSPECIFIED" : No state specified. This should never
|
| + /// be returned.
|
| + /// - "NEW" : The student has never accessed this submission. Attachments are
|
| + /// not
|
| + /// returned and timestamps is not set.
|
| + /// - "CREATED" : Has been created.
|
| + /// - "TURNED_IN" : Has been turned in to the teacher.
|
| + /// - "RETURNED" : Has been returned to the student.
|
| + /// - "RECLAIMED_BY_STUDENT" : Student chose to "unsubmit" the assignment.
|
| core.String state;
|
| - /**
|
| - * The history of the submission (includes state and grade histories).
|
| - *
|
| - * Read-only.
|
| - */
|
| +
|
| + /// The history of the submission (includes state and grade histories).
|
| + ///
|
| + /// Read-only.
|
| core.List<SubmissionHistory> submissionHistory;
|
| - /**
|
| - * Last update time of this submission.
|
| - * This may be unset if the student has not accessed this item.
|
| - *
|
| - * Read-only.
|
| - */
|
| +
|
| + /// Last update time of this submission.
|
| + /// This may be unset if the student has not accessed this item.
|
| + ///
|
| + /// Read-only.
|
| core.String updateTime;
|
| - /**
|
| - * Identifier for the student that owns this submission.
|
| - *
|
| - * Read-only.
|
| - */
|
| +
|
| + /// Identifier for the student that owns this submission.
|
| + ///
|
| + /// Read-only.
|
| core.String userId;
|
|
|
| StudentSubmission();
|
| @@ -5178,7 +5216,8 @@ class StudentSubmission {
|
| assignedGrade = _json["assignedGrade"];
|
| }
|
| if (_json.containsKey("assignmentSubmission")) {
|
| - assignmentSubmission = new AssignmentSubmission.fromJson(_json["assignmentSubmission"]);
|
| + assignmentSubmission =
|
| + new AssignmentSubmission.fromJson(_json["assignmentSubmission"]);
|
| }
|
| if (_json.containsKey("associatedWithDeveloper")) {
|
| associatedWithDeveloper = _json["associatedWithDeveloper"];
|
| @@ -5205,16 +5244,20 @@ class StudentSubmission {
|
| late = _json["late"];
|
| }
|
| if (_json.containsKey("multipleChoiceSubmission")) {
|
| - multipleChoiceSubmission = new MultipleChoiceSubmission.fromJson(_json["multipleChoiceSubmission"]);
|
| + multipleChoiceSubmission = new MultipleChoiceSubmission.fromJson(
|
| + _json["multipleChoiceSubmission"]);
|
| }
|
| if (_json.containsKey("shortAnswerSubmission")) {
|
| - shortAnswerSubmission = new ShortAnswerSubmission.fromJson(_json["shortAnswerSubmission"]);
|
| + shortAnswerSubmission =
|
| + new ShortAnswerSubmission.fromJson(_json["shortAnswerSubmission"]);
|
| }
|
| if (_json.containsKey("state")) {
|
| state = _json["state"];
|
| }
|
| if (_json.containsKey("submissionHistory")) {
|
| - submissionHistory = _json["submissionHistory"].map((value) => new SubmissionHistory.fromJson(value)).toList();
|
| + submissionHistory = _json["submissionHistory"]
|
| + .map((value) => new SubmissionHistory.fromJson(value))
|
| + .toList();
|
| }
|
| if (_json.containsKey("updateTime")) {
|
| updateTime = _json["updateTime"];
|
| @@ -5225,7 +5268,8 @@ class StudentSubmission {
|
| }
|
|
|
| core.Map<core.String, core.Object> toJson() {
|
| - final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>();
|
| + final core.Map<core.String, core.Object> _json =
|
| + new core.Map<core.String, core.Object>();
|
| if (alternateLink != null) {
|
| _json["alternateLink"] = alternateLink;
|
| }
|
| @@ -5269,7 +5313,8 @@ class StudentSubmission {
|
| _json["state"] = state;
|
| }
|
| if (submissionHistory != null) {
|
| - _json["submissionHistory"] = submissionHistory.map((value) => (value).toJson()).toList();
|
| + _json["submissionHistory"] =
|
| + submissionHistory.map((value) => (value).toJson()).toList();
|
| }
|
| if (updateTime != null) {
|
| _json["updateTime"] = updateTime;
|
| @@ -5281,14 +5326,13 @@ class StudentSubmission {
|
| }
|
| }
|
|
|
| -/**
|
| - * The history of the submission. This currently includes state and grade
|
| - * histories.
|
| - */
|
| +/// The history of the submission. This currently includes state and grade
|
| +/// histories.
|
| class SubmissionHistory {
|
| - /** The grade history information of the submission, if present. */
|
| + /// The grade history information of the submission, if present.
|
| GradeHistory gradeHistory;
|
| - /** The state history information of the submission, if present. */
|
| +
|
| + /// The state history information of the submission, if present.
|
| StateHistory stateHistory;
|
|
|
| SubmissionHistory();
|
| @@ -5303,7 +5347,8 @@ class SubmissionHistory {
|
| }
|
|
|
| core.Map<core.String, core.Object> toJson() {
|
| - final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>();
|
| + final core.Map<core.String, core.Object> _json =
|
| + new core.Map<core.String, core.Object>();
|
| if (gradeHistory != null) {
|
| _json["gradeHistory"] = (gradeHistory).toJson();
|
| }
|
| @@ -5314,30 +5359,26 @@ class SubmissionHistory {
|
| }
|
| }
|
|
|
| -/** Teacher of a course. */
|
| +/// Teacher of a course.
|
| class Teacher {
|
| - /**
|
| - * Identifier of the course.
|
| - *
|
| - * Read-only.
|
| - */
|
| + /// Identifier of the course.
|
| + ///
|
| + /// Read-only.
|
| core.String courseId;
|
| - /**
|
| - * Global user information for the teacher.
|
| - *
|
| - * Read-only.
|
| - */
|
| +
|
| + /// Global user information for the teacher.
|
| + ///
|
| + /// Read-only.
|
| UserProfile profile;
|
| - /**
|
| - * Identifier of the user.
|
| - *
|
| - * When specified as a parameter of a request, this identifier can be one of
|
| - * the following:
|
| - *
|
| - * * the numeric identifier for the user
|
| - * * the email address of the user
|
| - * * the string literal `"me"`, indicating the requesting user
|
| - */
|
| +
|
| + /// Identifier of the user.
|
| + ///
|
| + /// When specified as a parameter of a request, this identifier can be one of
|
| + /// the following:
|
| + ///
|
| + /// * the numeric identifier for the user
|
| + /// * the email address of the user
|
| + /// * the string literal `"me"`, indicating the requesting user
|
| core.String userId;
|
|
|
| Teacher();
|
| @@ -5355,7 +5396,8 @@ class Teacher {
|
| }
|
|
|
| core.Map<core.String, core.Object> toJson() {
|
| - final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>();
|
| + final core.Map<core.String, core.Object> _json =
|
| + new core.Map<core.String, core.Object>();
|
| if (courseId != null) {
|
| _json["courseId"] = courseId;
|
| }
|
| @@ -5369,25 +5411,23 @@ class Teacher {
|
| }
|
| }
|
|
|
| -/**
|
| - * Represents a time of day. The date and time zone are either not significant
|
| - * or are specified elsewhere. An API may choose to allow leap seconds. Related
|
| - * types are google.type.Date and `google.protobuf.Timestamp`.
|
| - */
|
| +/// Represents a time of day. The date and time zone are either not significant
|
| +/// or are specified elsewhere. An API may choose to allow leap seconds.
|
| +/// Related
|
| +/// types are google.type.Date and `google.protobuf.Timestamp`.
|
| class TimeOfDay {
|
| - /**
|
| - * Hours of day in 24 hour format. Should be from 0 to 23. An API may choose
|
| - * to allow the value "24:00:00" for scenarios like business closing time.
|
| - */
|
| + /// Hours of day in 24 hour format. Should be from 0 to 23. An API may choose
|
| + /// to allow the value "24:00:00" for scenarios like business closing time.
|
| core.int hours;
|
| - /** Minutes of hour of day. Must be from 0 to 59. */
|
| +
|
| + /// Minutes of hour of day. Must be from 0 to 59.
|
| core.int minutes;
|
| - /** Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. */
|
| +
|
| + /// Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
|
| core.int nanos;
|
| - /**
|
| - * Seconds of minutes of the time. Must normally be from 0 to 59. An API may
|
| - * allow the value 60 if it allows leap-seconds.
|
| - */
|
| +
|
| + /// Seconds of minutes of the time. Must normally be from 0 to 59. An API may
|
| + /// allow the value 60 if it allows leap-seconds.
|
| core.int seconds;
|
|
|
| TimeOfDay();
|
| @@ -5408,7 +5448,8 @@ class TimeOfDay {
|
| }
|
|
|
| core.Map<core.String, core.Object> toJson() {
|
| - final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>();
|
| + final core.Map<core.String, core.Object> _json =
|
| + new core.Map<core.String, core.Object>();
|
| if (hours != null) {
|
| _json["hours"] = hours;
|
| }
|
| @@ -5425,59 +5466,53 @@ class TimeOfDay {
|
| }
|
| }
|
|
|
| -/** Request to turn in a student submission. */
|
| +/// Request to turn in a student submission.
|
| class TurnInStudentSubmissionRequest {
|
| -
|
| TurnInStudentSubmissionRequest();
|
|
|
| - TurnInStudentSubmissionRequest.fromJson(core.Map _json) {
|
| - }
|
| + TurnInStudentSubmissionRequest.fromJson(core.Map _json) {}
|
|
|
| core.Map<core.String, core.Object> toJson() {
|
| - final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>();
|
| + final core.Map<core.String, core.Object> _json =
|
| + new core.Map<core.String, core.Object>();
|
| return _json;
|
| }
|
| }
|
|
|
| -/** Global information for a user. */
|
| +/// Global information for a user.
|
| class UserProfile {
|
| - /**
|
| - * Email address of the user.
|
| - *
|
| - * Read-only.
|
| - */
|
| + /// Email address of the user.
|
| + ///
|
| + /// Read-only.
|
| core.String emailAddress;
|
| - /**
|
| - * Identifier of the user.
|
| - *
|
| - * Read-only.
|
| - */
|
| +
|
| + /// Identifier of the user.
|
| + ///
|
| + /// Read-only.
|
| core.String id;
|
| - /**
|
| - * Name of the user.
|
| - *
|
| - * Read-only.
|
| - */
|
| +
|
| + /// Name of the user.
|
| + ///
|
| + /// Read-only.
|
| Name name;
|
| - /**
|
| - * Global permissions of the user.
|
| - *
|
| - * Read-only.
|
| - */
|
| +
|
| + /// Global permissions of the user.
|
| + ///
|
| + /// Read-only.
|
| core.List<GlobalPermission> permissions;
|
| - /**
|
| - * URL of user's profile photo.
|
| - *
|
| - * Read-only.
|
| - */
|
| +
|
| + /// URL of user's profile photo.
|
| + ///
|
| + /// Read-only.
|
| core.String photoUrl;
|
| - /**
|
| - * Represents whether a G Suite for Education user's domain administrator has
|
| - * explicitly verified them as being a teacher. If the user is not a member of
|
| - * a G Suite for Education domain, than this field will always be false.
|
| - *
|
| - * Read-only
|
| - */
|
| +
|
| + /// Represents whether a G Suite for Education user's domain administrator
|
| + /// has
|
| + /// explicitly verified them as being a teacher. If the user is not a member
|
| + /// of
|
| + /// a G Suite for Education domain, than this field will always be false.
|
| + ///
|
| + /// Read-only
|
| core.bool verifiedTeacher;
|
|
|
| UserProfile();
|
| @@ -5493,7 +5528,9 @@ class UserProfile {
|
| name = new Name.fromJson(_json["name"]);
|
| }
|
| if (_json.containsKey("permissions")) {
|
| - permissions = _json["permissions"].map((value) => new GlobalPermission.fromJson(value)).toList();
|
| + permissions = _json["permissions"]
|
| + .map((value) => new GlobalPermission.fromJson(value))
|
| + .toList();
|
| }
|
| if (_json.containsKey("photoUrl")) {
|
| photoUrl = _json["photoUrl"];
|
| @@ -5504,7 +5541,8 @@ class UserProfile {
|
| }
|
|
|
| core.Map<core.String, core.Object> toJson() {
|
| - final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>();
|
| + final core.Map<core.String, core.Object> _json =
|
| + new core.Map<core.String, core.Object>();
|
| if (emailAddress != null) {
|
| _json["emailAddress"] = emailAddress;
|
| }
|
| @@ -5515,7 +5553,8 @@ class UserProfile {
|
| _json["name"] = (name).toJson();
|
| }
|
| if (permissions != null) {
|
| - _json["permissions"] = permissions.map((value) => (value).toJson()).toList();
|
| + _json["permissions"] =
|
| + permissions.map((value) => (value).toJson()).toList();
|
| }
|
| if (photoUrl != null) {
|
| _json["photoUrl"] = photoUrl;
|
| @@ -5527,27 +5566,24 @@ class UserProfile {
|
| }
|
| }
|
|
|
| -/** YouTube video item. */
|
| +/// YouTube video item.
|
| class YouTubeVideo {
|
| - /**
|
| - * URL that can be used to view the YouTube video.
|
| - *
|
| - * Read-only.
|
| - */
|
| + /// URL that can be used to view the YouTube video.
|
| + ///
|
| + /// Read-only.
|
| core.String alternateLink;
|
| - /** YouTube API resource ID. */
|
| +
|
| + /// YouTube API resource ID.
|
| core.String id;
|
| - /**
|
| - * URL of a thumbnail image of the YouTube video.
|
| - *
|
| - * Read-only.
|
| - */
|
| +
|
| + /// URL of a thumbnail image of the YouTube video.
|
| + ///
|
| + /// Read-only.
|
| core.String thumbnailUrl;
|
| - /**
|
| - * Title of the YouTube video.
|
| - *
|
| - * Read-only.
|
| - */
|
| +
|
| + /// Title of the YouTube video.
|
| + ///
|
| + /// Read-only.
|
| core.String title;
|
|
|
| YouTubeVideo();
|
| @@ -5568,7 +5604,8 @@ class YouTubeVideo {
|
| }
|
|
|
| core.Map<core.String, core.Object> toJson() {
|
| - final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>();
|
| + final core.Map<core.String, core.Object> _json =
|
| + new core.Map<core.String, core.Object>();
|
| if (alternateLink != null) {
|
| _json["alternateLink"] = alternateLink;
|
| }
|
|
|