| OLD | NEW |
| 1 // This is a generated file (see the discoveryapis_generator project). | 1 // This is a generated file (see the discoveryapis_generator project). |
| 2 | 2 |
| 3 library googleapis.classroom.v1; | 3 library googleapis.classroom.v1; |
| 4 | 4 |
| 5 import 'dart:core' as core; | 5 import 'dart:core' as core; |
| 6 import 'dart:async' as async; | 6 import 'dart:async' as async; |
| 7 import 'dart:convert' as convert; | 7 import 'dart:convert' as convert; |
| 8 | 8 |
| 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; | 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
| 10 import 'package:http/http.dart' as http; | 10 import 'package:http/http.dart' as http; |
| (...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 580 _requester = client; | 580 _requester = client; |
| 581 | 581 |
| 582 /** | 582 /** |
| 583 * Creates course work. The resulting course work (and corresponding student | 583 * Creates course work. The resulting course work (and corresponding student |
| 584 * submissions) are associated with the Developer Console project of the | 584 * submissions) are associated with the Developer Console project of the |
| 585 * [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to | 585 * [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to |
| 586 * make the request. Classroom API requests to modify course work and student | 586 * make the request. Classroom API requests to modify course work and student |
| 587 * submissions must be made with an OAuth client ID from the associated | 587 * submissions must be made with an OAuth client ID from the associated |
| 588 * Developer Console project. This method returns the following error codes: * | 588 * Developer Console project. This method returns the following error codes: * |
| 589 * `PERMISSION_DENIED` if the requesting user is not permitted to access the | 589 * `PERMISSION_DENIED` if the requesting user is not permitted to access the |
| 590 * requested course, create course work in the requested course, or for access | 590 * requested course, create course work in the requested course, share a Drive |
| 591 * errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if | 591 * attachment, or for access errors. * `INVALID_ARGUMENT` if the request is |
| 592 * the requested course does not exist. | 592 * malformed. * `NOT_FOUND` if the requested course does not exist. * |
| 593 * `FAILED_PRECONDITION` for the following request error: * |
| 594 * AttachmentNotVisible |
| 593 * | 595 * |
| 594 * [request] - The metadata request object. | 596 * [request] - The metadata request object. |
| 595 * | 597 * |
| 596 * Request parameters: | 598 * Request parameters: |
| 597 * | 599 * |
| 598 * [courseId] - Identifier of the course. This identifier can be either the | 600 * [courseId] - Identifier of the course. This identifier can be either the |
| 599 * Classroom-assigned identifier or an alias. | 601 * Classroom-assigned identifier or an alias. |
| 600 * | 602 * |
| 601 * Completes with a [CourseWork]. | 603 * Completes with a [CourseWork]. |
| 602 * | 604 * |
| (...skipping 24 matching lines...) Expand all Loading... |
| 627 "POST", | 629 "POST", |
| 628 body: _body, | 630 body: _body, |
| 629 queryParams: _queryParams, | 631 queryParams: _queryParams, |
| 630 uploadOptions: _uploadOptions, | 632 uploadOptions: _uploadOptions, |
| 631 uploadMedia: _uploadMedia, | 633 uploadMedia: _uploadMedia, |
| 632 downloadOptions: _downloadOptions); | 634 downloadOptions: _downloadOptions); |
| 633 return _response.then((data) => new CourseWork.fromJson(data)); | 635 return _response.then((data) => new CourseWork.fromJson(data)); |
| 634 } | 636 } |
| 635 | 637 |
| 636 /** | 638 /** |
| 639 * Deletes a course work. This request must be made by the Developer Console |
| 640 * project of the [OAuth client |
| 641 * ID](https://support.google.com/cloud/answer/6158849) used to create the |
| 642 * corresponding course work item. This method returns the following error |
| 643 * codes: * `PERMISSION_DENIED` if the requesting developer project did not |
| 644 * create the corresponding course work, if the requesting user is not |
| 645 * permitted to delete the requested course or for access errors. * |
| 646 * `FAILED_PRECONDITION` if the requested course work has already been |
| 647 * deleted. * `NOT_FOUND` if no course exists with the requested ID. |
| 648 * |
| 649 * Request parameters: |
| 650 * |
| 651 * [courseId] - Identifier of the course. This identifier can be either the |
| 652 * Classroom-assigned identifier or an alias. |
| 653 * |
| 654 * [id] - Identifier of the course work to delete. This identifier is a |
| 655 * Classroom-assigned identifier. |
| 656 * |
| 657 * Completes with a [Empty]. |
| 658 * |
| 659 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 660 * error. |
| 661 * |
| 662 * If the used [http.Client] completes with an error when making a REST call, |
| 663 * this method will complete with the same error. |
| 664 */ |
| 665 async.Future<Empty> delete(core.String courseId, core.String id) { |
| 666 var _url = null; |
| 667 var _queryParams = new core.Map(); |
| 668 var _uploadMedia = null; |
| 669 var _uploadOptions = null; |
| 670 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 671 var _body = null; |
| 672 |
| 673 if (courseId == null) { |
| 674 throw new core.ArgumentError("Parameter courseId is required."); |
| 675 } |
| 676 if (id == null) { |
| 677 throw new core.ArgumentError("Parameter id is required."); |
| 678 } |
| 679 |
| 680 _url = 'v1/courses/' + commons.Escaper.ecapeVariable('$courseId') + '/course
Work/' + commons.Escaper.ecapeVariable('$id'); |
| 681 |
| 682 var _response = _requester.request(_url, |
| 683 "DELETE", |
| 684 body: _body, |
| 685 queryParams: _queryParams, |
| 686 uploadOptions: _uploadOptions, |
| 687 uploadMedia: _uploadMedia, |
| 688 downloadOptions: _downloadOptions); |
| 689 return _response.then((data) => new Empty.fromJson(data)); |
| 690 } |
| 691 |
| 692 /** |
| 637 * Returns course work. This method returns the following error codes: * | 693 * Returns course work. This method returns the following error codes: * |
| 638 * `PERMISSION_DENIED` if the requesting user is not permitted to access the | 694 * `PERMISSION_DENIED` if the requesting user is not permitted to access the |
| 639 * requested course or course work, or for access errors. * `INVALID_ARGUMENT` | 695 * requested course or course work, or for access errors. * `INVALID_ARGUMENT` |
| 640 * if the request is malformed. * `NOT_FOUND` if the requested course or | 696 * if the request is malformed. * `NOT_FOUND` if the requested course or |
| 641 * course work does not exist. | 697 * course work does not exist. |
| 642 * | 698 * |
| 643 * Request parameters: | 699 * Request parameters: |
| 644 * | 700 * |
| 645 * [courseId] - Identifier of the course. This identifier can be either the | 701 * [courseId] - Identifier of the course. This identifier can be either the |
| 646 * Classroom-assigned identifier or an alias. | 702 * Classroom-assigned identifier or an alias. |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 751 var _response = _requester.request(_url, | 807 var _response = _requester.request(_url, |
| 752 "GET", | 808 "GET", |
| 753 body: _body, | 809 body: _body, |
| 754 queryParams: _queryParams, | 810 queryParams: _queryParams, |
| 755 uploadOptions: _uploadOptions, | 811 uploadOptions: _uploadOptions, |
| 756 uploadMedia: _uploadMedia, | 812 uploadMedia: _uploadMedia, |
| 757 downloadOptions: _downloadOptions); | 813 downloadOptions: _downloadOptions); |
| 758 return _response.then((data) => new ListCourseWorkResponse.fromJson(data)); | 814 return _response.then((data) => new ListCourseWorkResponse.fromJson(data)); |
| 759 } | 815 } |
| 760 | 816 |
| 817 /** |
| 818 * Updates one or more fields of a course work. See |
| 819 * google.classroom.v1.CourseWork for details of which fields may be updated |
| 820 * and who may change them. This request must be made by the Developer Console |
| 821 * project of the [OAuth client |
| 822 * ID](https://support.google.com/cloud/answer/6158849) used to create the |
| 823 * corresponding course work item. This method returns the following error |
| 824 * codes: * `PERMISSION_DENIED` if the requesting developer project did not |
| 825 * create the corresponding course work, if the user is not permitted to make |
| 826 * the requested modification to the student submission, or for access errors. |
| 827 * * `INVALID_ARGUMENT` if the request is malformed. * `FAILED_PRECONDITION` |
| 828 * if the requested course work has already been deleted. * `NOT_FOUND` if the |
| 829 * requested course, course work, or student submission does not exist. |
| 830 * |
| 831 * [request] - The metadata request object. |
| 832 * |
| 833 * Request parameters: |
| 834 * |
| 835 * [courseId] - Identifier of the course. This identifier can be either the |
| 836 * Classroom-assigned identifier or an alias. |
| 837 * |
| 838 * [id] - Identifier of the course work. |
| 839 * |
| 840 * [updateMask] - Mask that identifies which fields on the course work to |
| 841 * update. This field is required to do an update. The update fails if invalid |
| 842 * fields are specified. If a field supports empty values, it can be cleared |
| 843 * by specifying it in the update mask and not in the CourseWork object. If a |
| 844 * field that does not support empty values is included in the update mask and |
| 845 * not set in the CourseWork object, an `INVALID_ARGUMENT` error will be |
| 846 * returned. The following fields may be specified by teachers: * `title` * |
| 847 * `description` * `state` * `due_date` * `due_time` * `max_points` * |
| 848 * `submission_modification_mode` |
| 849 * |
| 850 * Completes with a [CourseWork]. |
| 851 * |
| 852 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 853 * error. |
| 854 * |
| 855 * If the used [http.Client] completes with an error when making a REST call, |
| 856 * this method will complete with the same error. |
| 857 */ |
| 858 async.Future<CourseWork> patch(CourseWork request, core.String courseId, core.
String id, {core.String updateMask}) { |
| 859 var _url = null; |
| 860 var _queryParams = new core.Map(); |
| 861 var _uploadMedia = null; |
| 862 var _uploadOptions = null; |
| 863 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 864 var _body = null; |
| 865 |
| 866 if (request != null) { |
| 867 _body = convert.JSON.encode((request).toJson()); |
| 868 } |
| 869 if (courseId == null) { |
| 870 throw new core.ArgumentError("Parameter courseId is required."); |
| 871 } |
| 872 if (id == null) { |
| 873 throw new core.ArgumentError("Parameter id is required."); |
| 874 } |
| 875 if (updateMask != null) { |
| 876 _queryParams["updateMask"] = [updateMask]; |
| 877 } |
| 878 |
| 879 _url = 'v1/courses/' + commons.Escaper.ecapeVariable('$courseId') + '/course
Work/' + commons.Escaper.ecapeVariable('$id'); |
| 880 |
| 881 var _response = _requester.request(_url, |
| 882 "PATCH", |
| 883 body: _body, |
| 884 queryParams: _queryParams, |
| 885 uploadOptions: _uploadOptions, |
| 886 uploadMedia: _uploadMedia, |
| 887 downloadOptions: _downloadOptions); |
| 888 return _response.then((data) => new CourseWork.fromJson(data)); |
| 889 } |
| 890 |
| 761 } | 891 } |
| 762 | 892 |
| 763 | 893 |
| 764 class CoursesCourseWorkStudentSubmissionsResourceApi { | 894 class CoursesCourseWorkStudentSubmissionsResourceApi { |
| 765 final commons.ApiRequester _requester; | 895 final commons.ApiRequester _requester; |
| 766 | 896 |
| 767 CoursesCourseWorkStudentSubmissionsResourceApi(commons.ApiRequester client) : | 897 CoursesCourseWorkStudentSubmissionsResourceApi(commons.ApiRequester client) : |
| 768 _requester = client; | 898 _requester = client; |
| 769 | 899 |
| 770 /** | 900 /** |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 911 body: _body, | 1041 body: _body, |
| 912 queryParams: _queryParams, | 1042 queryParams: _queryParams, |
| 913 uploadOptions: _uploadOptions, | 1043 uploadOptions: _uploadOptions, |
| 914 uploadMedia: _uploadMedia, | 1044 uploadMedia: _uploadMedia, |
| 915 downloadOptions: _downloadOptions); | 1045 downloadOptions: _downloadOptions); |
| 916 return _response.then((data) => new ListStudentSubmissionsResponse.fromJson(
data)); | 1046 return _response.then((data) => new ListStudentSubmissionsResponse.fromJson(
data)); |
| 917 } | 1047 } |
| 918 | 1048 |
| 919 /** | 1049 /** |
| 920 * Modifies attachments of student submission. Attachments may only be added | 1050 * Modifies attachments of student submission. Attachments may only be added |
| 921 * to student submissions whose type is `ASSIGNMENT`. This request must be | 1051 * to student submissions belonging to course work objects with a `workType` |
| 922 * made by the Developer Console project of the [OAuth client | 1052 * of `ASSIGNMENT`. This request must be made by the Developer Console project |
| 923 * ID](https://support.google.com/cloud/answer/6158849) used to create the | 1053 * of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) |
| 924 * corresponding course work item. This method returns the following error | 1054 * used to create the corresponding course work item. This method returns the |
| 925 * codes: * `PERMISSION_DENIED` if the requesting user is not permitted to | 1055 * following error codes: * `PERMISSION_DENIED` if the requesting user is not |
| 926 * access the requested course or course work, if the user is not permitted to | 1056 * permitted to access the requested course or course work, if the user is not |
| 927 * modify attachments on the requested student submission, or for access | 1057 * permitted to modify attachments on the requested student submission, or for |
| 928 * errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if | 1058 * access errors. * `INVALID_ARGUMENT` if the request is malformed. * |
| 929 * the requested course, course work, or student submission does not exist. | 1059 * `NOT_FOUND` if the requested course, course work, or student submission |
| 1060 * does not exist. |
| 930 * | 1061 * |
| 931 * [request] - The metadata request object. | 1062 * [request] - The metadata request object. |
| 932 * | 1063 * |
| 933 * Request parameters: | 1064 * Request parameters: |
| 934 * | 1065 * |
| 935 * [courseId] - Identifier of the course. This identifier can be either the | 1066 * [courseId] - Identifier of the course. This identifier can be either the |
| 936 * Classroom-assigned identifier or an alias. | 1067 * Classroom-assigned identifier or an alias. |
| 937 * | 1068 * |
| 938 * [courseWorkId] - Identifier of the course work. | 1069 * [courseWorkId] - Identifier of the course work. |
| 939 * | 1070 * |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1049 queryParams: _queryParams, | 1180 queryParams: _queryParams, |
| 1050 uploadOptions: _uploadOptions, | 1181 uploadOptions: _uploadOptions, |
| 1051 uploadMedia: _uploadMedia, | 1182 uploadMedia: _uploadMedia, |
| 1052 downloadOptions: _downloadOptions); | 1183 downloadOptions: _downloadOptions); |
| 1053 return _response.then((data) => new StudentSubmission.fromJson(data)); | 1184 return _response.then((data) => new StudentSubmission.fromJson(data)); |
| 1054 } | 1185 } |
| 1055 | 1186 |
| 1056 /** | 1187 /** |
| 1057 * Reclaims a student submission on behalf of the student that owns it. | 1188 * Reclaims a student submission on behalf of the student that owns it. |
| 1058 * Reclaiming a student submission transfers ownership of attached Drive files | 1189 * Reclaiming a student submission transfers ownership of attached Drive files |
| 1059 * to the student and update the submission state. Only the student that ownes | 1190 * to the student and update the submission state. Only the student that owns |
| 1060 * the requested student submission may call this method, and only for a | 1191 * the requested student submission may call this method, and only for a |
| 1061 * student submission that has been turned in. This request must be made by | 1192 * student submission that has been turned in. This request must be made by |
| 1062 * the Developer Console project of the [OAuth client | 1193 * the Developer Console project of the [OAuth client |
| 1063 * ID](https://support.google.com/cloud/answer/6158849) used to create the | 1194 * ID](https://support.google.com/cloud/answer/6158849) used to create the |
| 1064 * corresponding course work item. This method returns the following error | 1195 * corresponding course work item. This method returns the following error |
| 1065 * codes: * `PERMISSION_DENIED` if the requesting user is not permitted to | 1196 * codes: * `PERMISSION_DENIED` if the requesting user is not permitted to |
| 1066 * access the requested course or course work, unsubmit the requested student | 1197 * access the requested course or course work, unsubmit the requested student |
| 1067 * submission, or for access errors. * `FAILED_PRECONDITION` if the student | 1198 * submission, or for access errors. * `FAILED_PRECONDITION` if the student |
| 1068 * submission has not been turned in. * `INVALID_ARGUMENT` if the request is | 1199 * submission has not been turned in. * `INVALID_ARGUMENT` if the request is |
| 1069 * malformed. * `NOT_FOUND` if the requested course, course work, or student | 1200 * malformed. * `NOT_FOUND` if the requested course, course work, or student |
| (...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1960 | 2091 |
| 1961 UserProfilesGuardianInvitationsResourceApi get guardianInvitations => new User
ProfilesGuardianInvitationsResourceApi(_requester); | 2092 UserProfilesGuardianInvitationsResourceApi get guardianInvitations => new User
ProfilesGuardianInvitationsResourceApi(_requester); |
| 1962 UserProfilesGuardiansResourceApi get guardians => new UserProfilesGuardiansRes
ourceApi(_requester); | 2093 UserProfilesGuardiansResourceApi get guardians => new UserProfilesGuardiansRes
ourceApi(_requester); |
| 1963 | 2094 |
| 1964 UserProfilesResourceApi(commons.ApiRequester client) : | 2095 UserProfilesResourceApi(commons.ApiRequester client) : |
| 1965 _requester = client; | 2096 _requester = client; |
| 1966 | 2097 |
| 1967 /** | 2098 /** |
| 1968 * Returns a user profile. This method returns the following error codes: * | 2099 * Returns a user profile. This method returns the following error codes: * |
| 1969 * `PERMISSION_DENIED` if the requesting user is not permitted to access this | 2100 * `PERMISSION_DENIED` if the requesting user is not permitted to access this |
| 1970 * user profile or if no profile exists with the requested ID or for access | 2101 * user profile, if no profile exists with the requested ID, or for access |
| 1971 * errors. | 2102 * errors. |
| 1972 * | 2103 * |
| 1973 * Request parameters: | 2104 * Request parameters: |
| 1974 * | 2105 * |
| 1975 * [userId] - Identifier of the profile to return. The identifier can be one | 2106 * [userId] - Identifier of the profile to return. The identifier can be one |
| 1976 * of the following: * the numeric identifier for the user * the email address | 2107 * of the following: * the numeric identifier for the user * the email address |
| 1977 * of the user * the string literal `"me"`, indicating the requesting user | 2108 * of the user * the string literal `"me"`, indicating the requesting user |
| 1978 * | 2109 * |
| 1979 * Completes with a [UserProfile]. | 2110 * Completes with a [UserProfile]. |
| 1980 * | 2111 * |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2295 | 2426 |
| 2296 class UserProfilesGuardiansResourceApi { | 2427 class UserProfilesGuardiansResourceApi { |
| 2297 final commons.ApiRequester _requester; | 2428 final commons.ApiRequester _requester; |
| 2298 | 2429 |
| 2299 UserProfilesGuardiansResourceApi(commons.ApiRequester client) : | 2430 UserProfilesGuardiansResourceApi(commons.ApiRequester client) : |
| 2300 _requester = client; | 2431 _requester = client; |
| 2301 | 2432 |
| 2302 /** | 2433 /** |
| 2303 * Deletes a guardian. The guardian will no longer receive guardian | 2434 * Deletes a guardian. The guardian will no longer receive guardian |
| 2304 * notifications and the guardian will no longer be accessible via the API. | 2435 * notifications and the guardian will no longer be accessible via the API. |
| 2305 * This method returns the following error codes: * `PERMISSION_DENIED` if the | 2436 * This method returns the following error codes: * `PERMISSION_DENIED` if no |
| 2306 * requesting user is not permitted to manage guardians for the student | 2437 * user that matches the provided `student_id` is visible to the requesting |
| 2307 * identified by the `student_id`, if guardians are not enabled for the domain | 2438 * user, if the requesting user is not permitted to manage guardians for the |
| 2308 * in question, or for other access errors. * `INVALID_ARGUMENT` if a | 2439 * student identified by the `student_id`, if guardians are not enabled for |
| 2309 * `student_id` is specified, but its format cannot be recognized (it is not | 2440 * the domain in question, or for other access errors. * `INVALID_ARGUMENT` if |
| 2310 * an email address, nor a `student_id` from the API). * `NOT_FOUND` if | 2441 * a `student_id` is specified, but its format cannot be recognized (it is not |
| 2311 * Classroom cannot find any record of the given `student_id` or | 2442 * an email address, nor a `student_id` from the API). * `NOT_FOUND` if the |
| 2312 * `guardian_id`, or if the guardian has already been disabled. | 2443 * requesting user is permitted to modify guardians for the requested |
| 2444 * `student_id`, but no `Guardian` record exists for that student with the |
| 2445 * provided `guardian_id`. |
| 2313 * | 2446 * |
| 2314 * Request parameters: | 2447 * Request parameters: |
| 2315 * | 2448 * |
| 2316 * [studentId] - The student whose guardian is to be deleted. One of the | 2449 * [studentId] - The student whose guardian is to be deleted. One of the |
| 2317 * following: * the numeric identifier for the user * the email address of the | 2450 * following: * the numeric identifier for the user * the email address of the |
| 2318 * user * the string literal `"me"`, indicating the requesting user | 2451 * user * the string literal `"me"`, indicating the requesting user |
| 2319 * | 2452 * |
| 2320 * [guardianId] - The `id` field from a `Guardian`. | 2453 * [guardianId] - The `id` field from a `Guardian`. |
| 2321 * | 2454 * |
| 2322 * Completes with a [Empty]. | 2455 * Completes with a [Empty]. |
| (...skipping 26 matching lines...) Expand all Loading... |
| 2349 body: _body, | 2482 body: _body, |
| 2350 queryParams: _queryParams, | 2483 queryParams: _queryParams, |
| 2351 uploadOptions: _uploadOptions, | 2484 uploadOptions: _uploadOptions, |
| 2352 uploadMedia: _uploadMedia, | 2485 uploadMedia: _uploadMedia, |
| 2353 downloadOptions: _downloadOptions); | 2486 downloadOptions: _downloadOptions); |
| 2354 return _response.then((data) => new Empty.fromJson(data)); | 2487 return _response.then((data) => new Empty.fromJson(data)); |
| 2355 } | 2488 } |
| 2356 | 2489 |
| 2357 /** | 2490 /** |
| 2358 * Returns a specific guardian. This method returns the following error codes: | 2491 * Returns a specific guardian. This method returns the following error codes: |
| 2359 * * `PERMISSION_DENIED` if the requesting user is not permitted to view | 2492 * * `PERMISSION_DENIED` if no user that matches the provided `student_id` is |
| 2360 * guardian information for the student identified by the `student_id`, if | 2493 * visible to the requesting user, if the requesting user is not permitted to |
| 2361 * guardians are not enabled for the domain in question, or for other access | 2494 * view guardian information for the student identified by the `student_id`, |
| 2362 * errors. * `INVALID_ARGUMENT` if a `student_id` is specified, but its format | 2495 * if guardians are not enabled for the domain in question, or for other |
| 2363 * cannot be recognized (it is not an email address, nor a `student_id` from | 2496 * access errors. * `INVALID_ARGUMENT` if a `student_id` is specified, but its |
| 2364 * the API, nor the literal string `me`). * `NOT_FOUND` if Classroom cannot | 2497 * format cannot be recognized (it is not an email address, nor a `student_id` |
| 2365 * find any record of the given student or `guardian_id`, or if the guardian | 2498 * from the API, nor the literal string `me`). * `NOT_FOUND` if the requesting |
| 2366 * has been disabled. | 2499 * user is permitted to view guardians for the requested `student_id`, but no |
| 2500 * `Guardian` record exists for that student that matches the provided |
| 2501 * `guardian_id`. |
| 2367 * | 2502 * |
| 2368 * Request parameters: | 2503 * Request parameters: |
| 2369 * | 2504 * |
| 2370 * [studentId] - The student whose guardian is being requested. One of the | 2505 * [studentId] - The student whose guardian is being requested. One of the |
| 2371 * following: * the numeric identifier for the user * the email address of the | 2506 * following: * the numeric identifier for the user * the email address of the |
| 2372 * user * the string literal `"me"`, indicating the requesting user | 2507 * user * the string literal `"me"`, indicating the requesting user |
| 2373 * | 2508 * |
| 2374 * [guardianId] - The `id` field from a `Guardian`. | 2509 * [guardianId] - The `id` field from a `Guardian`. |
| 2375 * | 2510 * |
| 2376 * Completes with a [Guardian]. | 2511 * Completes with a [Guardian]. |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2513 _json["studentWorkFolder"] = (studentWorkFolder).toJson(); | 2648 _json["studentWorkFolder"] = (studentWorkFolder).toJson(); |
| 2514 } | 2649 } |
| 2515 return _json; | 2650 return _json; |
| 2516 } | 2651 } |
| 2517 } | 2652 } |
| 2518 | 2653 |
| 2519 /** Student work for an assignment. */ | 2654 /** Student work for an assignment. */ |
| 2520 class AssignmentSubmission { | 2655 class AssignmentSubmission { |
| 2521 /** | 2656 /** |
| 2522 * Attachments added by the student. Drive files that correspond to materials | 2657 * Attachments added by the student. Drive files that correspond to materials |
| 2523 * with a share mode of SUBMISSION_COPY may not exist yet if the student has | 2658 * with a share mode of STUDENT_COPY may not exist yet if the student has not |
| 2524 * not accessed the assignment in Classroom. Some attachment metadata is only | 2659 * accessed the assignment in Classroom. Some attachment metadata is only |
| 2525 * populated if the requesting user has permission to access it. Identifier | 2660 * populated if the requesting user has permission to access it. Identifier |
| 2526 * and alternate_link fields are available, but others (e.g. title) may not | 2661 * and alternate_link fields are always available, but others (e.g. title) may |
| 2527 * be. | 2662 * not be. |
| 2528 */ | 2663 */ |
| 2529 core.List<Attachment> attachments; | 2664 core.List<Attachment> attachments; |
| 2530 | 2665 |
| 2531 AssignmentSubmission(); | 2666 AssignmentSubmission(); |
| 2532 | 2667 |
| 2533 AssignmentSubmission.fromJson(core.Map _json) { | 2668 AssignmentSubmission.fromJson(core.Map _json) { |
| 2534 if (_json.containsKey("attachments")) { | 2669 if (_json.containsKey("attachments")) { |
| 2535 attachments = _json["attachments"].map((value) => new Attachment.fromJson(
value)).toList(); | 2670 attachments = _json["attachments"].map((value) => new Attachment.fromJson(
value)).toList(); |
| 2536 } | 2671 } |
| 2537 } | 2672 } |
| 2538 | 2673 |
| 2539 core.Map toJson() { | 2674 core.Map toJson() { |
| 2540 var _json = new core.Map(); | 2675 var _json = new core.Map(); |
| 2541 if (attachments != null) { | 2676 if (attachments != null) { |
| 2542 _json["attachments"] = attachments.map((value) => (value).toJson()).toList
(); | 2677 _json["attachments"] = attachments.map((value) => (value).toJson()).toList
(); |
| 2543 } | 2678 } |
| 2544 return _json; | 2679 return _json; |
| 2545 } | 2680 } |
| 2546 } | 2681 } |
| 2547 | 2682 |
| 2548 /** | 2683 /** |
| 2549 * Attachment added to student assignment work. When creating attachments, only | 2684 * Attachment added to student assignment work. When creating attachments, |
| 2550 * the Link field may be specified. | 2685 * setting the `form` field is not supported. |
| 2551 */ | 2686 */ |
| 2552 class Attachment { | 2687 class Attachment { |
| 2553 /** Google Drive file attachment. */ | 2688 /** Google Drive file attachment. */ |
| 2554 DriveFile driveFile; | 2689 DriveFile driveFile; |
| 2555 /** Google Forms attachment. */ | 2690 /** Google Forms attachment. */ |
| 2556 Form form; | 2691 Form form; |
| 2557 /** Link attachment. */ | 2692 /** Link attachment. */ |
| 2558 Link link; | 2693 Link link; |
| 2559 /** Youtube video attachment. */ | 2694 /** Youtube video attachment. */ |
| 2560 YouTubeVideo youTubeVideo; | 2695 YouTubeVideo youTubeVideo; |
| (...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2931 | 3066 |
| 2932 /** Course work created by a teacher for students of the course. */ | 3067 /** Course work created by a teacher for students of the course. */ |
| 2933 class CourseWork { | 3068 class CourseWork { |
| 2934 /** | 3069 /** |
| 2935 * Absolute link to this course work in the Classroom web UI. This is only | 3070 * Absolute link to this course work in the Classroom web UI. This is only |
| 2936 * populated if `state` is `PUBLISHED`. Read-only. | 3071 * populated if `state` is `PUBLISHED`. Read-only. |
| 2937 */ | 3072 */ |
| 2938 core.String alternateLink; | 3073 core.String alternateLink; |
| 2939 /** | 3074 /** |
| 2940 * Assignment details. This is populated only when `work_type` is | 3075 * Assignment details. This is populated only when `work_type` is |
| 2941 * `ASSIGNMENT`. | 3076 * `ASSIGNMENT`. Read-only. |
| 2942 */ | 3077 */ |
| 2943 Assignment assignment; | 3078 Assignment assignment; |
| 2944 /** | 3079 /** |
| 2945 * Whether this course work item is associated with the Developer Console | 3080 * Whether this course work item is associated with the Developer Console |
| 2946 * project making the request. See google.classroom.Work.CreateCourseWork for | 3081 * project making the request. See google.classroom.Work.CreateCourseWork for |
| 2947 * more details. Read-only. | 3082 * more details. Read-only. |
| 2948 */ | 3083 */ |
| 2949 core.bool associatedWithDeveloper; | 3084 core.bool associatedWithDeveloper; |
| 2950 /** Identifier of the course. Read-only. */ | 3085 /** Identifier of the course. Read-only. */ |
| 2951 core.String courseId; | 3086 core.String courseId; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 2974 /** | 3109 /** |
| 2975 * Additional materials. CourseWork must have no more than 20 material items. | 3110 * Additional materials. CourseWork must have no more than 20 material items. |
| 2976 */ | 3111 */ |
| 2977 core.List<Material> materials; | 3112 core.List<Material> materials; |
| 2978 /** | 3113 /** |
| 2979 * Maximum grade for this course work. If zero or unspecified, this assignment | 3114 * Maximum grade for this course work. If zero or unspecified, this assignment |
| 2980 * is considered ungraded. This must be a non-negative integer value. | 3115 * is considered ungraded. This must be a non-negative integer value. |
| 2981 */ | 3116 */ |
| 2982 core.double maxPoints; | 3117 core.double maxPoints; |
| 2983 /** | 3118 /** |
| 2984 * Multiple choice question details. This is populated only when `work_type` | 3119 * Multiple choice question details. For read operations, this field is |
| 2985 * is `MULTIPLE_CHOICE_QUESTION`. | 3120 * populated only when `work_type` is `MULTIPLE_CHOICE_QUESTION`. For write |
| 3121 * operations, this field must be specified when creating course work with a |
| 3122 * `work_type` of `MULTIPLE_CHOICE_QUESTION`, and it must not be set |
| 3123 * otherwise. |
| 2986 */ | 3124 */ |
| 2987 MultipleChoiceQuestion multipleChoiceQuestion; | 3125 MultipleChoiceQuestion multipleChoiceQuestion; |
| 2988 /** | 3126 /** |
| 2989 * Status of this course work. If unspecified, the default state is `DRAFT`. | 3127 * Status of this course work. If unspecified, the default state is `DRAFT`. |
| 2990 * Possible string values are: | 3128 * Possible string values are: |
| 2991 * - "COURSE_WORK_STATE_UNSPECIFIED" : A COURSE_WORK_STATE_UNSPECIFIED. | 3129 * - "COURSE_WORK_STATE_UNSPECIFIED" : A COURSE_WORK_STATE_UNSPECIFIED. |
| 2992 * - "PUBLISHED" : A PUBLISHED. | 3130 * - "PUBLISHED" : A PUBLISHED. |
| 2993 * - "DRAFT" : A DRAFT. | 3131 * - "DRAFT" : A DRAFT. |
| 2994 * - "DELETED" : A DELETED. | 3132 * - "DELETED" : A DELETED. |
| 2995 */ | 3133 */ |
| (...skipping 10 matching lines...) Expand all Loading... |
| 3006 core.String submissionModificationMode; | 3144 core.String submissionModificationMode; |
| 3007 /** | 3145 /** |
| 3008 * Title of this course work. The title must be a valid UTF-8 string | 3146 * Title of this course work. The title must be a valid UTF-8 string |
| 3009 * containing between 1 and 3000 characters. | 3147 * containing between 1 and 3000 characters. |
| 3010 */ | 3148 */ |
| 3011 core.String title; | 3149 core.String title; |
| 3012 /** Timestamp of the most recent change to this course work. Read-only. */ | 3150 /** Timestamp of the most recent change to this course work. Read-only. */ |
| 3013 core.String updateTime; | 3151 core.String updateTime; |
| 3014 /** | 3152 /** |
| 3015 * Type of this course work. The type is set when the course work is created | 3153 * Type of this course work. The type is set when the course work is created |
| 3016 * and cannot be changed. When creating course work, this must be | 3154 * and cannot be changed. |
| 3017 * `ASSIGNMENT`. | |
| 3018 * Possible string values are: | 3155 * Possible string values are: |
| 3019 * - "COURSE_WORK_TYPE_UNSPECIFIED" : A COURSE_WORK_TYPE_UNSPECIFIED. | 3156 * - "COURSE_WORK_TYPE_UNSPECIFIED" : A COURSE_WORK_TYPE_UNSPECIFIED. |
| 3020 * - "ASSIGNMENT" : A ASSIGNMENT. | 3157 * - "ASSIGNMENT" : A ASSIGNMENT. |
| 3021 * - "SHORT_ANSWER_QUESTION" : A SHORT_ANSWER_QUESTION. | 3158 * - "SHORT_ANSWER_QUESTION" : A SHORT_ANSWER_QUESTION. |
| 3022 * - "MULTIPLE_CHOICE_QUESTION" : A MULTIPLE_CHOICE_QUESTION. | 3159 * - "MULTIPLE_CHOICE_QUESTION" : A MULTIPLE_CHOICE_QUESTION. |
| 3023 */ | 3160 */ |
| 3024 core.String workType; | 3161 core.String workType; |
| 3025 | 3162 |
| 3026 CourseWork(); | 3163 CourseWork(); |
| 3027 | 3164 |
| (...skipping 852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3880 _json["nextPageToken"] = nextPageToken; | 4017 _json["nextPageToken"] = nextPageToken; |
| 3881 } | 4018 } |
| 3882 if (teachers != null) { | 4019 if (teachers != null) { |
| 3883 _json["teachers"] = teachers.map((value) => (value).toJson()).toList(); | 4020 _json["teachers"] = teachers.map((value) => (value).toJson()).toList(); |
| 3884 } | 4021 } |
| 3885 return _json; | 4022 return _json; |
| 3886 } | 4023 } |
| 3887 } | 4024 } |
| 3888 | 4025 |
| 3889 /** | 4026 /** |
| 3890 * Material attached to course work. When creating attachments, only the Link | 4027 * Material attached to course work. When creating attachments, setting the |
| 3891 * field may be specified. | 4028 * `form` field is not supported. |
| 3892 */ | 4029 */ |
| 3893 class Material { | 4030 class Material { |
| 3894 /** Google Drive file material. */ | 4031 /** Google Drive file material. */ |
| 3895 SharedDriveFile driveFile; | 4032 SharedDriveFile driveFile; |
| 3896 /** Google Forms material. */ | 4033 /** Google Forms material. */ |
| 3897 Form form; | 4034 Form form; |
| 3898 /** Link material. */ | 4035 /** |
| 4036 * Link material. On creation, will be upgraded to a more appropriate type if |
| 4037 * possible, and this will be reflected in the response. |
| 4038 */ |
| 3899 Link link; | 4039 Link link; |
| 3900 /** YouTube video material. */ | 4040 /** YouTube video material. */ |
| 3901 YouTubeVideo youtubeVideo; | 4041 YouTubeVideo youtubeVideo; |
| 3902 | 4042 |
| 3903 Material(); | 4043 Material(); |
| 3904 | 4044 |
| 3905 Material.fromJson(core.Map _json) { | 4045 Material.fromJson(core.Map _json) { |
| 3906 if (_json.containsKey("driveFile")) { | 4046 if (_json.containsKey("driveFile")) { |
| 3907 driveFile = new SharedDriveFile.fromJson(_json["driveFile"]); | 4047 driveFile = new SharedDriveFile.fromJson(_json["driveFile"]); |
| 3908 } | 4048 } |
| (...skipping 23 matching lines...) Expand all Loading... |
| 3932 _json["youtubeVideo"] = (youtubeVideo).toJson(); | 4072 _json["youtubeVideo"] = (youtubeVideo).toJson(); |
| 3933 } | 4073 } |
| 3934 return _json; | 4074 return _json; |
| 3935 } | 4075 } |
| 3936 } | 4076 } |
| 3937 | 4077 |
| 3938 /** Request to modify the attachments of a student submission. */ | 4078 /** Request to modify the attachments of a student submission. */ |
| 3939 class ModifyAttachmentsRequest { | 4079 class ModifyAttachmentsRequest { |
| 3940 /** | 4080 /** |
| 3941 * Attachments to add. A student submission may not have more than 20 | 4081 * Attachments to add. A student submission may not have more than 20 |
| 3942 * attachments. This may only contain link attachments. | 4082 * attachments. Form attachments are not supported. |
| 3943 */ | 4083 */ |
| 3944 core.List<Attachment> addAttachments; | 4084 core.List<Attachment> addAttachments; |
| 3945 | 4085 |
| 3946 ModifyAttachmentsRequest(); | 4086 ModifyAttachmentsRequest(); |
| 3947 | 4087 |
| 3948 ModifyAttachmentsRequest.fromJson(core.Map _json) { | 4088 ModifyAttachmentsRequest.fromJson(core.Map _json) { |
| 3949 if (_json.containsKey("addAttachments")) { | 4089 if (_json.containsKey("addAttachments")) { |
| 3950 addAttachments = _json["addAttachments"].map((value) => new Attachment.fro
mJson(value)).toList(); | 4090 addAttachments = _json["addAttachments"].map((value) => new Attachment.fro
mJson(value)).toList(); |
| 3951 } | 4091 } |
| 3952 } | 4092 } |
| (...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4574 } | 4714 } |
| 4575 if (thumbnailUrl != null) { | 4715 if (thumbnailUrl != null) { |
| 4576 _json["thumbnailUrl"] = thumbnailUrl; | 4716 _json["thumbnailUrl"] = thumbnailUrl; |
| 4577 } | 4717 } |
| 4578 if (title != null) { | 4718 if (title != null) { |
| 4579 _json["title"] = title; | 4719 _json["title"] = title; |
| 4580 } | 4720 } |
| 4581 return _json; | 4721 return _json; |
| 4582 } | 4722 } |
| 4583 } | 4723 } |
| OLD | NEW |