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; |
11 | 11 |
12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show | 12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show |
13 ApiRequestError, DetailedApiRequestError; | 13 ApiRequestError, DetailedApiRequestError; |
14 | 14 |
15 const core.String USER_AGENT = 'dart-api-client classroom/v1'; | 15 const core.String USER_AGENT = 'dart-api-client classroom/v1'; |
16 | 16 |
17 /** Manages classes, rosters, and invitations in Google Classroom. */ | 17 /** Manages classes, rosters, and invitations in Google Classroom. */ |
18 class ClassroomApi { | 18 class ClassroomApi { |
19 /** | |
20 * View instructions for teacher-assigned work in your Google Classroom | |
21 * classes | |
22 */ | |
23 static const ClassroomCourseWorkReadonlyScope = "https://www.googleapis.com/au
th/classroom.course-work.readonly"; | |
24 | |
25 /** Manage your Google Classroom classes */ | 19 /** Manage your Google Classroom classes */ |
26 static const ClassroomCoursesScope = "https://www.googleapis.com/auth/classroo
m.courses"; | 20 static const ClassroomCoursesScope = "https://www.googleapis.com/auth/classroo
m.courses"; |
27 | 21 |
28 /** View your Google Classroom classes */ | 22 /** View your Google Classroom classes */ |
29 static const ClassroomCoursesReadonlyScope = "https://www.googleapis.com/auth/
classroom.courses.readonly"; | 23 static const ClassroomCoursesReadonlyScope = "https://www.googleapis.com/auth/
classroom.courses.readonly"; |
30 | 24 |
31 /** Manage your course work and view your grades in Google Classroom */ | 25 /** Manage your course work and view your grades in Google Classroom */ |
32 static const ClassroomCourseworkMeScope = "https://www.googleapis.com/auth/cla
ssroom.coursework.me"; | 26 static const ClassroomCourseworkMeScope = "https://www.googleapis.com/auth/cla
ssroom.coursework.me"; |
33 | 27 |
34 /** View your course work and grades in Google Classroom */ | 28 /** View your course work and grades in Google Classroom */ |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 | 78 |
85 CoursesAliasesResourceApi get aliases => new CoursesAliasesResourceApi(_reques
ter); | 79 CoursesAliasesResourceApi get aliases => new CoursesAliasesResourceApi(_reques
ter); |
86 CoursesCourseWorkResourceApi get courseWork => new CoursesCourseWorkResourceAp
i(_requester); | 80 CoursesCourseWorkResourceApi get courseWork => new CoursesCourseWorkResourceAp
i(_requester); |
87 CoursesStudentsResourceApi get students => new CoursesStudentsResourceApi(_req
uester); | 81 CoursesStudentsResourceApi get students => new CoursesStudentsResourceApi(_req
uester); |
88 CoursesTeachersResourceApi get teachers => new CoursesTeachersResourceApi(_req
uester); | 82 CoursesTeachersResourceApi get teachers => new CoursesTeachersResourceApi(_req
uester); |
89 | 83 |
90 CoursesResourceApi(commons.ApiRequester client) : | 84 CoursesResourceApi(commons.ApiRequester client) : |
91 _requester = client; | 85 _requester = client; |
92 | 86 |
93 /** | 87 /** |
94 * Creates a course. The user specified in `ownerId` is the owner of the | 88 * Creates a course. |
95 * created course and added as a teacher. This method returns the following | 89 * |
96 * error codes: * `PERMISSION_DENIED` if the requesting user is not permitted | 90 * The user specified in `ownerId` is the owner of the created course |
97 * to create courses or for access errors. * `NOT_FOUND` if the primary | 91 * and added as a teacher. |
98 * teacher is not a valid user. * `FAILED_PRECONDITION` if the course owner's | 92 * |
99 * account is disabled or for the following request errors: * | 93 * This method returns the following error codes: |
100 * UserGroupsMembershipLimitReached * `ALREADY_EXISTS` if an alias was | 94 * |
101 * specified in the `id` and already exists. | 95 * * `PERMISSION_DENIED` if the requesting user is not permitted to create |
| 96 * courses or for access errors. |
| 97 * * `NOT_FOUND` if the primary teacher is not a valid user. |
| 98 * * `FAILED_PRECONDITION` if the course owner's account is disabled or for |
| 99 * the following request errors: |
| 100 * * UserGroupsMembershipLimitReached |
| 101 * * `ALREADY_EXISTS` if an alias was specified in the `id` and |
| 102 * already exists. |
102 * | 103 * |
103 * [request] - The metadata request object. | 104 * [request] - The metadata request object. |
104 * | 105 * |
105 * Request parameters: | 106 * Request parameters: |
106 * | 107 * |
107 * Completes with a [Course]. | 108 * Completes with a [Course]. |
108 * | 109 * |
109 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 110 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
110 * error. | 111 * error. |
111 * | 112 * |
(...skipping 18 matching lines...) Expand all Loading... |
130 "POST", | 131 "POST", |
131 body: _body, | 132 body: _body, |
132 queryParams: _queryParams, | 133 queryParams: _queryParams, |
133 uploadOptions: _uploadOptions, | 134 uploadOptions: _uploadOptions, |
134 uploadMedia: _uploadMedia, | 135 uploadMedia: _uploadMedia, |
135 downloadOptions: _downloadOptions); | 136 downloadOptions: _downloadOptions); |
136 return _response.then((data) => new Course.fromJson(data)); | 137 return _response.then((data) => new Course.fromJson(data)); |
137 } | 138 } |
138 | 139 |
139 /** | 140 /** |
140 * Deletes a course. This method returns the following error codes: * | 141 * Deletes a course. |
141 * `PERMISSION_DENIED` if the requesting user is not permitted to delete the | 142 * |
142 * requested course or for access errors. * `NOT_FOUND` if no course exists | 143 * This method returns the following error codes: |
143 * with the requested ID. | 144 * |
| 145 * * `PERMISSION_DENIED` if the requesting user is not permitted to delete the |
| 146 * requested course or for access errors. |
| 147 * * `NOT_FOUND` if no course exists with the requested ID. |
144 * | 148 * |
145 * Request parameters: | 149 * Request parameters: |
146 * | 150 * |
147 * [id] - Identifier of the course to delete. This identifier can be either | 151 * [id] - Identifier of the course to delete. |
148 * the Classroom-assigned identifier or an alias. | 152 * This identifier can be either the Classroom-assigned identifier or an |
| 153 * alias. |
149 * | 154 * |
150 * Completes with a [Empty]. | 155 * Completes with a [Empty]. |
151 * | 156 * |
152 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 157 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
153 * error. | 158 * error. |
154 * | 159 * |
155 * If the used [http.Client] completes with an error when making a REST call, | 160 * If the used [http.Client] completes with an error when making a REST call, |
156 * this method will complete with the same error. | 161 * this method will complete with the same error. |
157 */ | 162 */ |
158 async.Future<Empty> delete(core.String id) { | 163 async.Future<Empty> delete(core.String id) { |
(...skipping 14 matching lines...) Expand all Loading... |
173 "DELETE", | 178 "DELETE", |
174 body: _body, | 179 body: _body, |
175 queryParams: _queryParams, | 180 queryParams: _queryParams, |
176 uploadOptions: _uploadOptions, | 181 uploadOptions: _uploadOptions, |
177 uploadMedia: _uploadMedia, | 182 uploadMedia: _uploadMedia, |
178 downloadOptions: _downloadOptions); | 183 downloadOptions: _downloadOptions); |
179 return _response.then((data) => new Empty.fromJson(data)); | 184 return _response.then((data) => new Empty.fromJson(data)); |
180 } | 185 } |
181 | 186 |
182 /** | 187 /** |
183 * Returns a course. This method returns the following error codes: * | 188 * Returns a course. |
184 * `PERMISSION_DENIED` if the requesting user is not permitted to access the | 189 * |
185 * requested course or for access errors. * `NOT_FOUND` if no course exists | 190 * This method returns the following error codes: |
186 * with the requested ID. | 191 * |
| 192 * * `PERMISSION_DENIED` if the requesting user is not permitted to access the |
| 193 * requested course or for access errors. |
| 194 * * `NOT_FOUND` if no course exists with the requested ID. |
187 * | 195 * |
188 * Request parameters: | 196 * Request parameters: |
189 * | 197 * |
190 * [id] - Identifier of the course to return. This identifier can be either | 198 * [id] - Identifier of the course to return. |
191 * the Classroom-assigned identifier or an alias. | 199 * This identifier can be either the Classroom-assigned identifier or an |
| 200 * alias. |
192 * | 201 * |
193 * Completes with a [Course]. | 202 * Completes with a [Course]. |
194 * | 203 * |
195 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 204 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
196 * error. | 205 * error. |
197 * | 206 * |
198 * If the used [http.Client] completes with an error when making a REST call, | 207 * If the used [http.Client] completes with an error when making a REST call, |
199 * this method will complete with the same error. | 208 * this method will complete with the same error. |
200 */ | 209 */ |
201 async.Future<Course> get(core.String id) { | 210 async.Future<Course> get(core.String id) { |
(...skipping 15 matching lines...) Expand all Loading... |
217 body: _body, | 226 body: _body, |
218 queryParams: _queryParams, | 227 queryParams: _queryParams, |
219 uploadOptions: _uploadOptions, | 228 uploadOptions: _uploadOptions, |
220 uploadMedia: _uploadMedia, | 229 uploadMedia: _uploadMedia, |
221 downloadOptions: _downloadOptions); | 230 downloadOptions: _downloadOptions); |
222 return _response.then((data) => new Course.fromJson(data)); | 231 return _response.then((data) => new Course.fromJson(data)); |
223 } | 232 } |
224 | 233 |
225 /** | 234 /** |
226 * Returns a list of courses that the requesting user is permitted to view, | 235 * Returns a list of courses that the requesting user is permitted to view, |
227 * restricted to those that match the request. This method returns the | 236 * restricted to those that match the request. |
228 * following error codes: * `PERMISSION_DENIED` for access errors. * | 237 * |
229 * `INVALID_ARGUMENT` if the query argument is malformed. * `NOT_FOUND` if any | 238 * This method returns the following error codes: |
230 * users specified in the query arguments do not exist. | 239 * |
| 240 * * `PERMISSION_DENIED` for access errors. |
| 241 * * `INVALID_ARGUMENT` if the query argument is malformed. |
| 242 * * `NOT_FOUND` if any users specified in the query arguments do not exist. |
231 * | 243 * |
232 * Request parameters: | 244 * Request parameters: |
233 * | 245 * |
234 * [studentId] - Restricts returned courses to those having a student with the | 246 * [courseStates] - Restricts returned courses to those in one of the |
235 * specified identifier. The identifier can be one of the following: * the | 247 * specified states |
236 * numeric identifier for the user * the email address of the user * the | 248 * The default value is ACTIVE, ARCHIVED, PROVISIONED, DECLINED. |
237 * string literal `"me"`, indicating the requesting user | 249 * |
| 250 * [pageSize] - Maximum number of items to return. Zero or unspecified |
| 251 * indicates that the |
| 252 * server may assign a maximum. |
| 253 * |
| 254 * The server may return fewer than the specified number of results. |
238 * | 255 * |
239 * [teacherId] - Restricts returned courses to those having a teacher with the | 256 * [teacherId] - Restricts returned courses to those having a teacher with the |
240 * specified identifier. The identifier can be one of the following: * the | 257 * specified |
241 * numeric identifier for the user * the email address of the user * the | 258 * identifier. The identifier can be one of the following: |
242 * string literal `"me"`, indicating the requesting user | |
243 * | 259 * |
244 * [courseStates] - Restricts returned courses to those in one of the | 260 * * the numeric identifier for the user |
245 * specified states | 261 * * the email address of the user |
| 262 * * the string literal `"me"`, indicating the requesting user |
246 * | 263 * |
247 * [pageSize] - Maximum number of items to return. Zero or unspecified | 264 * [studentId] - Restricts returned courses to those having a student with the |
248 * indicates that the server may assign a maximum. The server may return fewer | 265 * specified |
249 * than the specified number of results. | 266 * identifier. The identifier can be one of the following: |
250 * | 267 * |
251 * [pageToken] - nextPageToken value returned from a previous list call, | 268 * * the numeric identifier for the user |
252 * indicating that the subsequent page of results should be returned. The list | 269 * * the email address of the user |
253 * request must be otherwise identical to the one that resulted in this token. | 270 * * the string literal `"me"`, indicating the requesting user |
| 271 * |
| 272 * [pageToken] - nextPageToken |
| 273 * value returned from a previous |
| 274 * list call, |
| 275 * indicating that the subsequent page of results should be returned. |
| 276 * |
| 277 * The list request must be |
| 278 * otherwise identical to the one that resulted in this token. |
254 * | 279 * |
255 * Completes with a [ListCoursesResponse]. | 280 * Completes with a [ListCoursesResponse]. |
256 * | 281 * |
257 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 282 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
258 * error. | 283 * error. |
259 * | 284 * |
260 * If the used [http.Client] completes with an error when making a REST call, | 285 * If the used [http.Client] completes with an error when making a REST call, |
261 * this method will complete with the same error. | 286 * this method will complete with the same error. |
262 */ | 287 */ |
263 async.Future<ListCoursesResponse> list({core.String studentId, core.String tea
cherId, core.List<core.String> courseStates, core.int pageSize, core.String page
Token}) { | 288 async.Future<ListCoursesResponse> list({core.List<core.String> courseStates, c
ore.int pageSize, core.String teacherId, core.String studentId, core.String page
Token}) { |
264 var _url = null; | 289 var _url = null; |
265 var _queryParams = new core.Map(); | 290 var _queryParams = new core.Map(); |
266 var _uploadMedia = null; | 291 var _uploadMedia = null; |
267 var _uploadOptions = null; | 292 var _uploadOptions = null; |
268 var _downloadOptions = commons.DownloadOptions.Metadata; | 293 var _downloadOptions = commons.DownloadOptions.Metadata; |
269 var _body = null; | 294 var _body = null; |
270 | 295 |
271 if (studentId != null) { | |
272 _queryParams["studentId"] = [studentId]; | |
273 } | |
274 if (teacherId != null) { | |
275 _queryParams["teacherId"] = [teacherId]; | |
276 } | |
277 if (courseStates != null) { | 296 if (courseStates != null) { |
278 _queryParams["courseStates"] = courseStates; | 297 _queryParams["courseStates"] = courseStates; |
279 } | 298 } |
280 if (pageSize != null) { | 299 if (pageSize != null) { |
281 _queryParams["pageSize"] = ["${pageSize}"]; | 300 _queryParams["pageSize"] = ["${pageSize}"]; |
282 } | 301 } |
| 302 if (teacherId != null) { |
| 303 _queryParams["teacherId"] = [teacherId]; |
| 304 } |
| 305 if (studentId != null) { |
| 306 _queryParams["studentId"] = [studentId]; |
| 307 } |
283 if (pageToken != null) { | 308 if (pageToken != null) { |
284 _queryParams["pageToken"] = [pageToken]; | 309 _queryParams["pageToken"] = [pageToken]; |
285 } | 310 } |
286 | 311 |
287 _url = 'v1/courses'; | 312 _url = 'v1/courses'; |
288 | 313 |
289 var _response = _requester.request(_url, | 314 var _response = _requester.request(_url, |
290 "GET", | 315 "GET", |
291 body: _body, | 316 body: _body, |
292 queryParams: _queryParams, | 317 queryParams: _queryParams, |
293 uploadOptions: _uploadOptions, | 318 uploadOptions: _uploadOptions, |
294 uploadMedia: _uploadMedia, | 319 uploadMedia: _uploadMedia, |
295 downloadOptions: _downloadOptions); | 320 downloadOptions: _downloadOptions); |
296 return _response.then((data) => new ListCoursesResponse.fromJson(data)); | 321 return _response.then((data) => new ListCoursesResponse.fromJson(data)); |
297 } | 322 } |
298 | 323 |
299 /** | 324 /** |
300 * Updates one or more fields in a course. This method returns the following | 325 * Updates one or more fields in a course. |
301 * error codes: * `PERMISSION_DENIED` if the requesting user is not permitted | 326 * |
302 * to modify the requested course or for access errors. * `NOT_FOUND` if no | 327 * This method returns the following error codes: |
303 * course exists with the requested ID. * `INVALID_ARGUMENT` if invalid fields | 328 * |
304 * are specified in the update mask or if no update mask is supplied. * | 329 * * `PERMISSION_DENIED` if the requesting user is not permitted to modify the |
305 * `FAILED_PRECONDITION` for the following request errors: * | 330 * requested course or for access errors. |
306 * CourseNotModifiable | 331 * * `NOT_FOUND` if no course exists with the requested ID. |
| 332 * * `INVALID_ARGUMENT` if invalid fields are specified in the update mask or |
| 333 * if no update mask is supplied. |
| 334 * * `FAILED_PRECONDITION` for the following request errors: |
| 335 * * CourseNotModifiable |
307 * | 336 * |
308 * [request] - The metadata request object. | 337 * [request] - The metadata request object. |
309 * | 338 * |
310 * Request parameters: | 339 * Request parameters: |
311 * | 340 * |
312 * [id] - Identifier of the course to update. This identifier can be either | 341 * [id] - Identifier of the course to update. |
313 * the Classroom-assigned identifier or an alias. | 342 * This identifier can be either the Classroom-assigned identifier or an |
| 343 * alias. |
314 * | 344 * |
315 * [updateMask] - Mask that identifies which fields on the course to update. | 345 * [updateMask] - Mask that identifies which fields on the course to update. |
316 * This field is required to do an update. The update will fail if invalid | 346 * This field is required to do an update. The update will fail if invalid |
317 * fields are specified. The following fields are valid: * `name` * `section` | 347 * fields are specified. The following fields are valid: |
318 * * `descriptionHeading` * `description` * `room` * `courseState` When set in | 348 * |
319 * a query parameter, this field should be specified as `updateMask=,,...` | 349 * * `name` |
| 350 * * `section` |
| 351 * * `descriptionHeading` |
| 352 * * `description` |
| 353 * * `room` |
| 354 * * `courseState` |
| 355 * |
| 356 * When set in a query parameter, this field should be specified as |
| 357 * |
| 358 * `updateMask=<field1>,<field2>,...` |
320 * | 359 * |
321 * Completes with a [Course]. | 360 * Completes with a [Course]. |
322 * | 361 * |
323 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 362 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
324 * error. | 363 * error. |
325 * | 364 * |
326 * If the used [http.Client] completes with an error when making a REST call, | 365 * If the used [http.Client] completes with an error when making a REST call, |
327 * this method will complete with the same error. | 366 * this method will complete with the same error. |
328 */ | 367 */ |
329 async.Future<Course> patch(Course request, core.String id, {core.String update
Mask}) { | 368 async.Future<Course> patch(Course request, core.String id, {core.String update
Mask}) { |
(...skipping 20 matching lines...) Expand all Loading... |
350 "PATCH", | 389 "PATCH", |
351 body: _body, | 390 body: _body, |
352 queryParams: _queryParams, | 391 queryParams: _queryParams, |
353 uploadOptions: _uploadOptions, | 392 uploadOptions: _uploadOptions, |
354 uploadMedia: _uploadMedia, | 393 uploadMedia: _uploadMedia, |
355 downloadOptions: _downloadOptions); | 394 downloadOptions: _downloadOptions); |
356 return _response.then((data) => new Course.fromJson(data)); | 395 return _response.then((data) => new Course.fromJson(data)); |
357 } | 396 } |
358 | 397 |
359 /** | 398 /** |
360 * Updates a course. This method returns the following error codes: * | 399 * Updates a course. |
361 * `PERMISSION_DENIED` if the requesting user is not permitted to modify the | 400 * |
362 * requested course or for access errors. * `NOT_FOUND` if no course exists | 401 * This method returns the following error codes: |
363 * with the requested ID. * `FAILED_PRECONDITION` for the following request | 402 * |
364 * errors: * CourseNotModifiable | 403 * * `PERMISSION_DENIED` if the requesting user is not permitted to modify the |
| 404 * requested course or for access errors. |
| 405 * * `NOT_FOUND` if no course exists with the requested ID. |
| 406 * * `FAILED_PRECONDITION` for the following request errors: |
| 407 * * CourseNotModifiable |
365 * | 408 * |
366 * [request] - The metadata request object. | 409 * [request] - The metadata request object. |
367 * | 410 * |
368 * Request parameters: | 411 * Request parameters: |
369 * | 412 * |
370 * [id] - Identifier of the course to update. This identifier can be either | 413 * [id] - Identifier of the course to update. |
371 * the Classroom-assigned identifier or an alias. | 414 * This identifier can be either the Classroom-assigned identifier or an |
| 415 * alias. |
372 * | 416 * |
373 * Completes with a [Course]. | 417 * Completes with a [Course]. |
374 * | 418 * |
375 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 419 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
376 * error. | 420 * error. |
377 * | 421 * |
378 * If the used [http.Client] completes with an error when making a REST call, | 422 * If the used [http.Client] completes with an error when making a REST call, |
379 * this method will complete with the same error. | 423 * this method will complete with the same error. |
380 */ | 424 */ |
381 async.Future<Course> update(Course request, core.String id) { | 425 async.Future<Course> update(Course request, core.String id) { |
(...skipping 26 matching lines...) Expand all Loading... |
408 } | 452 } |
409 | 453 |
410 | 454 |
411 class CoursesAliasesResourceApi { | 455 class CoursesAliasesResourceApi { |
412 final commons.ApiRequester _requester; | 456 final commons.ApiRequester _requester; |
413 | 457 |
414 CoursesAliasesResourceApi(commons.ApiRequester client) : | 458 CoursesAliasesResourceApi(commons.ApiRequester client) : |
415 _requester = client; | 459 _requester = client; |
416 | 460 |
417 /** | 461 /** |
418 * Creates an alias for a course. This method returns the following error | 462 * Creates an alias for a course. |
419 * codes: * `PERMISSION_DENIED` if the requesting user is not permitted to | 463 * |
420 * create the alias or for access errors. * `NOT_FOUND` if the course does not | 464 * This method returns the following error codes: |
421 * exist. * `ALREADY_EXISTS` if the alias already exists. | 465 * |
| 466 * * `PERMISSION_DENIED` if the requesting user is not permitted to create the |
| 467 * alias or for access errors. |
| 468 * * `NOT_FOUND` if the course does not exist. |
| 469 * * `ALREADY_EXISTS` if the alias already exists. |
| 470 * * `FAILED_PRECONDITION` if the alias requested does not make sense for the |
| 471 * requesting user or course (for example, if a user not in a domain |
| 472 * attempts to access a domain-scoped alias). |
422 * | 473 * |
423 * [request] - The metadata request object. | 474 * [request] - The metadata request object. |
424 * | 475 * |
425 * Request parameters: | 476 * Request parameters: |
426 * | 477 * |
427 * [courseId] - Identifier of the course to alias. This identifier can be | 478 * [courseId] - Identifier of the course to alias. |
428 * either the Classroom-assigned identifier or an alias. | 479 * This identifier can be either the Classroom-assigned identifier or an |
| 480 * alias. |
429 * | 481 * |
430 * Completes with a [CourseAlias]. | 482 * Completes with a [CourseAlias]. |
431 * | 483 * |
432 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 484 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
433 * error. | 485 * error. |
434 * | 486 * |
435 * If the used [http.Client] completes with an error when making a REST call, | 487 * If the used [http.Client] completes with an error when making a REST call, |
436 * this method will complete with the same error. | 488 * this method will complete with the same error. |
437 */ | 489 */ |
438 async.Future<CourseAlias> create(CourseAlias request, core.String courseId) { | 490 async.Future<CourseAlias> create(CourseAlias request, core.String courseId) { |
(...skipping 17 matching lines...) Expand all Loading... |
456 "POST", | 508 "POST", |
457 body: _body, | 509 body: _body, |
458 queryParams: _queryParams, | 510 queryParams: _queryParams, |
459 uploadOptions: _uploadOptions, | 511 uploadOptions: _uploadOptions, |
460 uploadMedia: _uploadMedia, | 512 uploadMedia: _uploadMedia, |
461 downloadOptions: _downloadOptions); | 513 downloadOptions: _downloadOptions); |
462 return _response.then((data) => new CourseAlias.fromJson(data)); | 514 return _response.then((data) => new CourseAlias.fromJson(data)); |
463 } | 515 } |
464 | 516 |
465 /** | 517 /** |
466 * Deletes an alias of a course. This method returns the following error | 518 * Deletes an alias of a course. |
467 * codes: * `PERMISSION_DENIED` if the requesting user is not permitted to | 519 * |
468 * remove the alias or for access errors. * `NOT_FOUND` if the alias does not | 520 * This method returns the following error codes: |
469 * exist. | 521 * |
| 522 * * `PERMISSION_DENIED` if the requesting user is not permitted to remove the |
| 523 * alias or for access errors. |
| 524 * * `NOT_FOUND` if the alias does not exist. |
| 525 * * `FAILED_PRECONDITION` if the alias requested does not make sense for the |
| 526 * requesting user or course (for example, if a user not in a domain |
| 527 * attempts to delete a domain-scoped alias). |
470 * | 528 * |
471 * Request parameters: | 529 * Request parameters: |
472 * | 530 * |
473 * [courseId] - Identifier of the course whose alias should be deleted. This | 531 * [courseId] - Identifier of the course whose alias should be deleted. |
474 * identifier can be either the Classroom-assigned identifier or an alias. | 532 * This identifier can be either the Classroom-assigned identifier or an |
| 533 * alias. |
475 * | 534 * |
476 * [alias] - Alias to delete. This may not be the Classroom-assigned | 535 * [alias] - Alias to delete. |
477 * identifier. | 536 * This may not be the Classroom-assigned identifier. |
478 * | 537 * |
479 * Completes with a [Empty]. | 538 * Completes with a [Empty]. |
480 * | 539 * |
481 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 540 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
482 * error. | 541 * error. |
483 * | 542 * |
484 * If the used [http.Client] completes with an error when making a REST call, | 543 * If the used [http.Client] completes with an error when making a REST call, |
485 * this method will complete with the same error. | 544 * this method will complete with the same error. |
486 */ | 545 */ |
487 async.Future<Empty> delete(core.String courseId, core.String alias) { | 546 async.Future<Empty> delete(core.String courseId, core.String alias) { |
(...skipping 17 matching lines...) Expand all Loading... |
505 "DELETE", | 564 "DELETE", |
506 body: _body, | 565 body: _body, |
507 queryParams: _queryParams, | 566 queryParams: _queryParams, |
508 uploadOptions: _uploadOptions, | 567 uploadOptions: _uploadOptions, |
509 uploadMedia: _uploadMedia, | 568 uploadMedia: _uploadMedia, |
510 downloadOptions: _downloadOptions); | 569 downloadOptions: _downloadOptions); |
511 return _response.then((data) => new Empty.fromJson(data)); | 570 return _response.then((data) => new Empty.fromJson(data)); |
512 } | 571 } |
513 | 572 |
514 /** | 573 /** |
515 * Returns a list of aliases for a course. This method returns the following | 574 * Returns a list of aliases for a course. |
516 * error codes: * `PERMISSION_DENIED` if the requesting user is not permitted | 575 * |
517 * to access the course or for access errors. * `NOT_FOUND` if the course does | 576 * This method returns the following error codes: |
518 * not exist. | 577 * |
| 578 * * `PERMISSION_DENIED` if the requesting user is not permitted to access the |
| 579 * course or for access errors. |
| 580 * * `NOT_FOUND` if the course does not exist. |
519 * | 581 * |
520 * Request parameters: | 582 * Request parameters: |
521 * | 583 * |
522 * [courseId] - The identifier of the course. This identifier can be either | 584 * [courseId] - The identifier of the course. |
523 * the Classroom-assigned identifier or an alias. | 585 * This identifier can be either the Classroom-assigned identifier or an |
| 586 * alias. |
524 * | 587 * |
525 * [pageSize] - Maximum number of items to return. Zero or unspecified | 588 * [pageSize] - Maximum number of items to return. Zero or unspecified |
526 * indicates that the server may assign a maximum. The server may return fewer | 589 * indicates that the |
527 * than the specified number of results. | 590 * server may assign a maximum. |
528 * | 591 * |
529 * [pageToken] - nextPageToken value returned from a previous list call, | 592 * The server may return fewer than the specified number of results. |
530 * indicating that the subsequent page of results should be returned. The list | 593 * |
531 * request must be otherwise identical to the one that resulted in this token. | 594 * [pageToken] - nextPageToken |
| 595 * value returned from a previous |
| 596 * list call, |
| 597 * indicating that the subsequent page of results should be returned. |
| 598 * |
| 599 * The list request |
| 600 * must be otherwise identical to the one that resulted in this token. |
532 * | 601 * |
533 * Completes with a [ListCourseAliasesResponse]. | 602 * Completes with a [ListCourseAliasesResponse]. |
534 * | 603 * |
535 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 604 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
536 * error. | 605 * error. |
537 * | 606 * |
538 * If the used [http.Client] completes with an error when making a REST call, | 607 * If the used [http.Client] completes with an error when making a REST call, |
539 * this method will complete with the same error. | 608 * this method will complete with the same error. |
540 */ | 609 */ |
541 async.Future<ListCourseAliasesResponse> list(core.String courseId, {core.int p
ageSize, core.String pageToken}) { | 610 async.Future<ListCourseAliasesResponse> list(core.String courseId, {core.int p
ageSize, core.String pageToken}) { |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
573 | 642 |
574 class CoursesCourseWorkResourceApi { | 643 class CoursesCourseWorkResourceApi { |
575 final commons.ApiRequester _requester; | 644 final commons.ApiRequester _requester; |
576 | 645 |
577 CoursesCourseWorkStudentSubmissionsResourceApi get studentSubmissions => new C
oursesCourseWorkStudentSubmissionsResourceApi(_requester); | 646 CoursesCourseWorkStudentSubmissionsResourceApi get studentSubmissions => new C
oursesCourseWorkStudentSubmissionsResourceApi(_requester); |
578 | 647 |
579 CoursesCourseWorkResourceApi(commons.ApiRequester client) : | 648 CoursesCourseWorkResourceApi(commons.ApiRequester client) : |
580 _requester = client; | 649 _requester = client; |
581 | 650 |
582 /** | 651 /** |
583 * Creates course work. The resulting course work (and corresponding student | 652 * Creates course work. |
584 * submissions) are associated with the Developer Console project of the | 653 * |
| 654 * The resulting course work (and corresponding student submissions) are |
| 655 * associated with the Developer Console project of the |
585 * [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to | 656 * [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 | 657 * 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 | 658 * submissions must be made with an OAuth client ID from the associated |
588 * Developer Console project. This method returns the following error codes: * | 659 * Developer Console project. |
589 * `PERMISSION_DENIED` if the requesting user is not permitted to access the | 660 * |
590 * requested course, create course work in the requested course, share a Drive | 661 * This method returns the following error codes: |
591 * attachment, or for access errors. * `INVALID_ARGUMENT` if the request is | 662 * |
592 * malformed. * `NOT_FOUND` if the requested course does not exist. * | 663 * * `PERMISSION_DENIED` if the requesting user is not permitted to access the |
593 * `FAILED_PRECONDITION` for the following request error: * | 664 * requested course, create course work in the requested course, share a |
594 * AttachmentNotVisible | 665 * Drive attachment, or for access errors. |
| 666 * * `INVALID_ARGUMENT` if the request is malformed. |
| 667 * * `NOT_FOUND` if the requested course does not exist. |
| 668 * * `FAILED_PRECONDITION` for the following request error: |
| 669 * * AttachmentNotVisible |
595 * | 670 * |
596 * [request] - The metadata request object. | 671 * [request] - The metadata request object. |
597 * | 672 * |
598 * Request parameters: | 673 * Request parameters: |
599 * | 674 * |
600 * [courseId] - Identifier of the course. This identifier can be either the | 675 * [courseId] - Identifier of the course. |
601 * Classroom-assigned identifier or an alias. | 676 * This identifier can be either the Classroom-assigned identifier or an |
| 677 * alias. |
602 * | 678 * |
603 * Completes with a [CourseWork]. | 679 * Completes with a [CourseWork]. |
604 * | 680 * |
605 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 681 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
606 * error. | 682 * error. |
607 * | 683 * |
608 * If the used [http.Client] completes with an error when making a REST call, | 684 * If the used [http.Client] completes with an error when making a REST call, |
609 * this method will complete with the same error. | 685 * this method will complete with the same error. |
610 */ | 686 */ |
611 async.Future<CourseWork> create(CourseWork request, core.String courseId) { | 687 async.Future<CourseWork> create(CourseWork request, core.String courseId) { |
(...skipping 17 matching lines...) Expand all Loading... |
629 "POST", | 705 "POST", |
630 body: _body, | 706 body: _body, |
631 queryParams: _queryParams, | 707 queryParams: _queryParams, |
632 uploadOptions: _uploadOptions, | 708 uploadOptions: _uploadOptions, |
633 uploadMedia: _uploadMedia, | 709 uploadMedia: _uploadMedia, |
634 downloadOptions: _downloadOptions); | 710 downloadOptions: _downloadOptions); |
635 return _response.then((data) => new CourseWork.fromJson(data)); | 711 return _response.then((data) => new CourseWork.fromJson(data)); |
636 } | 712 } |
637 | 713 |
638 /** | 714 /** |
639 * Deletes a course work. This request must be made by the Developer Console | 715 * Deletes a course work. |
640 * project of the [OAuth client | 716 * |
641 * ID](https://support.google.com/cloud/answer/6158849) used to create the | 717 * This request must be made by the Developer Console project of the |
642 * corresponding course work item. This method returns the following error | 718 * [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to |
643 * codes: * `PERMISSION_DENIED` if the requesting developer project did not | 719 * create the corresponding course work item. |
644 * create the corresponding course work, if the requesting user is not | 720 * |
645 * permitted to delete the requested course or for access errors. * | 721 * This method returns the following error codes: |
646 * `FAILED_PRECONDITION` if the requested course work has already been | 722 * |
647 * deleted. * `NOT_FOUND` if no course exists with the requested ID. | 723 * * `PERMISSION_DENIED` if the requesting developer project did not create |
| 724 * the corresponding course work, if the requesting user is not permitted |
| 725 * to delete the requested course or for access errors. |
| 726 * * `FAILED_PRECONDITION` if the requested course work has already been |
| 727 * deleted. |
| 728 * * `NOT_FOUND` if no course exists with the requested ID. |
648 * | 729 * |
649 * Request parameters: | 730 * Request parameters: |
650 * | 731 * |
651 * [courseId] - Identifier of the course. This identifier can be either the | 732 * [courseId] - Identifier of the course. |
652 * Classroom-assigned identifier or an alias. | 733 * This identifier can be either the Classroom-assigned identifier or an |
| 734 * alias. |
653 * | 735 * |
654 * [id] - Identifier of the course work to delete. This identifier is a | 736 * [id] - Identifier of the course work to delete. |
655 * Classroom-assigned identifier. | 737 * This identifier is a Classroom-assigned identifier. |
656 * | 738 * |
657 * Completes with a [Empty]. | 739 * Completes with a [Empty]. |
658 * | 740 * |
659 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 741 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
660 * error. | 742 * error. |
661 * | 743 * |
662 * If the used [http.Client] completes with an error when making a REST call, | 744 * If the used [http.Client] completes with an error when making a REST call, |
663 * this method will complete with the same error. | 745 * this method will complete with the same error. |
664 */ | 746 */ |
665 async.Future<Empty> delete(core.String courseId, core.String id) { | 747 async.Future<Empty> delete(core.String courseId, core.String id) { |
(...skipping 17 matching lines...) Expand all Loading... |
683 "DELETE", | 765 "DELETE", |
684 body: _body, | 766 body: _body, |
685 queryParams: _queryParams, | 767 queryParams: _queryParams, |
686 uploadOptions: _uploadOptions, | 768 uploadOptions: _uploadOptions, |
687 uploadMedia: _uploadMedia, | 769 uploadMedia: _uploadMedia, |
688 downloadOptions: _downloadOptions); | 770 downloadOptions: _downloadOptions); |
689 return _response.then((data) => new Empty.fromJson(data)); | 771 return _response.then((data) => new Empty.fromJson(data)); |
690 } | 772 } |
691 | 773 |
692 /** | 774 /** |
693 * Returns course work. This method returns the following error codes: * | 775 * Returns course work. |
694 * `PERMISSION_DENIED` if the requesting user is not permitted to access the | 776 * |
695 * requested course or course work, or for access errors. * `INVALID_ARGUMENT` | 777 * This method returns the following error codes: |
696 * if the request is malformed. * `NOT_FOUND` if the requested course or | 778 * |
697 * course work does not exist. | 779 * * `PERMISSION_DENIED` if the requesting user is not permitted to access the |
| 780 * requested course or course work, or for access errors. |
| 781 * * `INVALID_ARGUMENT` if the request is malformed. |
| 782 * * `NOT_FOUND` if the requested course or course work does not exist. |
698 * | 783 * |
699 * Request parameters: | 784 * Request parameters: |
700 * | 785 * |
701 * [courseId] - Identifier of the course. This identifier can be either the | 786 * [courseId] - Identifier of the course. |
702 * Classroom-assigned identifier or an alias. | 787 * This identifier can be either the Classroom-assigned identifier or an |
| 788 * alias. |
703 * | 789 * |
704 * [id] - Identifier of the course work. | 790 * [id] - Identifier of the course work. |
705 * | 791 * |
706 * Completes with a [CourseWork]. | 792 * Completes with a [CourseWork]. |
707 * | 793 * |
708 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 794 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
709 * error. | 795 * error. |
710 * | 796 * |
711 * If the used [http.Client] completes with an error when making a REST call, | 797 * If the used [http.Client] completes with an error when making a REST call, |
712 * this method will complete with the same error. | 798 * this method will complete with the same error. |
(...skipping 20 matching lines...) Expand all Loading... |
733 body: _body, | 819 body: _body, |
734 queryParams: _queryParams, | 820 queryParams: _queryParams, |
735 uploadOptions: _uploadOptions, | 821 uploadOptions: _uploadOptions, |
736 uploadMedia: _uploadMedia, | 822 uploadMedia: _uploadMedia, |
737 downloadOptions: _downloadOptions); | 823 downloadOptions: _downloadOptions); |
738 return _response.then((data) => new CourseWork.fromJson(data)); | 824 return _response.then((data) => new CourseWork.fromJson(data)); |
739 } | 825 } |
740 | 826 |
741 /** | 827 /** |
742 * Returns a list of course work that the requester is permitted to view. | 828 * Returns a list of course work that the requester is permitted to view. |
743 * Course students may only view `PUBLISHED` course work. Course teachers and | 829 * |
744 * domain administrators may view all course work. This method returns the | 830 * Course students may only view `PUBLISHED` course work. Course teachers |
745 * following error codes: * `PERMISSION_DENIED` if the requesting user is not | 831 * and domain administrators may view all course work. |
746 * permitted to access the requested course or for access errors. * | 832 * |
747 * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the | 833 * This method returns the following error codes: |
748 * requested course does not exist. | 834 * |
| 835 * * `PERMISSION_DENIED` if the requesting user is not permitted to access |
| 836 * the requested course or for access errors. |
| 837 * * `INVALID_ARGUMENT` if the request is malformed. |
| 838 * * `NOT_FOUND` if the requested course does not exist. |
749 * | 839 * |
750 * Request parameters: | 840 * Request parameters: |
751 * | 841 * |
752 * [courseId] - Identifier of the course. This identifier can be either the | 842 * [courseId] - Identifier of the course. |
753 * Classroom-assigned identifier or an alias. | 843 * This identifier can be either the Classroom-assigned identifier or an |
| 844 * alias. |
754 * | 845 * |
755 * [courseWorkStates] - Restriction on the work status to return. Only | 846 * [courseWorkStates] - Restriction on the work status to return. Only |
756 * courseWork that matches is returned. If unspecified, items with a work | 847 * courseWork that matches |
757 * status of `PUBLISHED` is returned. | 848 * is returned. If unspecified, items with a work status of `PUBLISHED` |
| 849 * is returned. |
| 850 * |
| 851 * [pageSize] - Maximum number of items to return. Zero or unspecified |
| 852 * indicates that the |
| 853 * server may assign a maximum. |
| 854 * |
| 855 * The server may return fewer than the specified number of results. |
758 * | 856 * |
759 * [orderBy] - Optional sort ordering for results. A comma-separated list of | 857 * [orderBy] - Optional sort ordering for results. A comma-separated list of |
760 * fields with an optional sort direction keyword. Supported fields are | 858 * fields with |
761 * `updateTime` and `dueDate`. Supported direction keywords are `asc` and | 859 * an optional sort direction keyword. Supported fields are `updateTime` |
762 * `desc`. If not specified, `updateTime desc` is the default behavior. | 860 * and `dueDate`. Supported direction keywords are `asc` and `desc`. |
| 861 * If not specified, `updateTime desc` is the default behavior. |
763 * Examples: `dueDate asc,updateTime desc`, `updateTime,dueDate desc` | 862 * Examples: `dueDate asc,updateTime desc`, `updateTime,dueDate desc` |
764 * | 863 * |
765 * [pageSize] - Maximum number of items to return. Zero or unspecified | 864 * [pageToken] - nextPageToken |
766 * indicates that the server may assign a maximum. The server may return fewer | 865 * value returned from a previous |
767 * than the specified number of results. | 866 * list call, |
| 867 * indicating that the subsequent page of results should be returned. |
768 * | 868 * |
769 * [pageToken] - nextPageToken value returned from a previous list call, | 869 * The list request |
770 * indicating that the subsequent page of results should be returned. The list | 870 * must be otherwise identical to the one that resulted in this token. |
771 * request must be otherwise identical to the one that resulted in this token. | |
772 * | 871 * |
773 * Completes with a [ListCourseWorkResponse]. | 872 * Completes with a [ListCourseWorkResponse]. |
774 * | 873 * |
775 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 874 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
776 * error. | 875 * error. |
777 * | 876 * |
778 * If the used [http.Client] completes with an error when making a REST call, | 877 * If the used [http.Client] completes with an error when making a REST call, |
779 * this method will complete with the same error. | 878 * this method will complete with the same error. |
780 */ | 879 */ |
781 async.Future<ListCourseWorkResponse> list(core.String courseId, {core.List<cor
e.String> courseWorkStates, core.String orderBy, core.int pageSize, core.String
pageToken}) { | 880 async.Future<ListCourseWorkResponse> list(core.String courseId, {core.List<cor
e.String> courseWorkStates, core.int pageSize, core.String orderBy, core.String
pageToken}) { |
782 var _url = null; | 881 var _url = null; |
783 var _queryParams = new core.Map(); | 882 var _queryParams = new core.Map(); |
784 var _uploadMedia = null; | 883 var _uploadMedia = null; |
785 var _uploadOptions = null; | 884 var _uploadOptions = null; |
786 var _downloadOptions = commons.DownloadOptions.Metadata; | 885 var _downloadOptions = commons.DownloadOptions.Metadata; |
787 var _body = null; | 886 var _body = null; |
788 | 887 |
789 if (courseId == null) { | 888 if (courseId == null) { |
790 throw new core.ArgumentError("Parameter courseId is required."); | 889 throw new core.ArgumentError("Parameter courseId is required."); |
791 } | 890 } |
792 if (courseWorkStates != null) { | 891 if (courseWorkStates != null) { |
793 _queryParams["courseWorkStates"] = courseWorkStates; | 892 _queryParams["courseWorkStates"] = courseWorkStates; |
794 } | 893 } |
| 894 if (pageSize != null) { |
| 895 _queryParams["pageSize"] = ["${pageSize}"]; |
| 896 } |
795 if (orderBy != null) { | 897 if (orderBy != null) { |
796 _queryParams["orderBy"] = [orderBy]; | 898 _queryParams["orderBy"] = [orderBy]; |
797 } | 899 } |
798 if (pageSize != null) { | |
799 _queryParams["pageSize"] = ["${pageSize}"]; | |
800 } | |
801 if (pageToken != null) { | 900 if (pageToken != null) { |
802 _queryParams["pageToken"] = [pageToken]; | 901 _queryParams["pageToken"] = [pageToken]; |
803 } | 902 } |
804 | 903 |
805 _url = 'v1/courses/' + commons.Escaper.ecapeVariable('$courseId') + '/course
Work'; | 904 _url = 'v1/courses/' + commons.Escaper.ecapeVariable('$courseId') + '/course
Work'; |
806 | 905 |
807 var _response = _requester.request(_url, | 906 var _response = _requester.request(_url, |
808 "GET", | 907 "GET", |
809 body: _body, | 908 body: _body, |
810 queryParams: _queryParams, | 909 queryParams: _queryParams, |
811 uploadOptions: _uploadOptions, | 910 uploadOptions: _uploadOptions, |
812 uploadMedia: _uploadMedia, | 911 uploadMedia: _uploadMedia, |
813 downloadOptions: _downloadOptions); | 912 downloadOptions: _downloadOptions); |
814 return _response.then((data) => new ListCourseWorkResponse.fromJson(data)); | 913 return _response.then((data) => new ListCourseWorkResponse.fromJson(data)); |
815 } | 914 } |
816 | 915 |
817 /** | 916 /** |
818 * Updates one or more fields of a course work. See | 917 * Updates one or more fields of a course work. |
819 * google.classroom.v1.CourseWork for details of which fields may be updated | 918 * |
820 * and who may change them. This request must be made by the Developer Console | 919 * See google.classroom.v1.CourseWork for details |
821 * project of the [OAuth client | 920 * of which fields may be updated and who may change them. |
822 * ID](https://support.google.com/cloud/answer/6158849) used to create the | 921 * |
823 * corresponding course work item. This method returns the following error | 922 * This request must be made by the Developer Console project of the |
824 * codes: * `PERMISSION_DENIED` if the requesting developer project did not | 923 * [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to |
825 * create the corresponding course work, if the user is not permitted to make | 924 * create the corresponding course work item. |
826 * the requested modification to the student submission, or for access errors. | 925 * |
827 * * `INVALID_ARGUMENT` if the request is malformed. * `FAILED_PRECONDITION` | 926 * This method returns the following error codes: |
828 * if the requested course work has already been deleted. * `NOT_FOUND` if the | 927 * |
829 * requested course, course work, or student submission does not exist. | 928 * * `PERMISSION_DENIED` if the requesting developer project did not create |
| 929 * the corresponding course work, if the user is not permitted to make the |
| 930 * requested modification to the student submission, or for |
| 931 * access errors. |
| 932 * * `INVALID_ARGUMENT` if the request is malformed. |
| 933 * * `FAILED_PRECONDITION` if the requested course work has already been |
| 934 * deleted. |
| 935 * * `NOT_FOUND` if the requested course, course work, or student submission |
| 936 * does not exist. |
830 * | 937 * |
831 * [request] - The metadata request object. | 938 * [request] - The metadata request object. |
832 * | 939 * |
833 * Request parameters: | 940 * Request parameters: |
834 * | 941 * |
835 * [courseId] - Identifier of the course. This identifier can be either the | 942 * [courseId] - Identifier of the course. |
836 * Classroom-assigned identifier or an alias. | 943 * This identifier can be either the Classroom-assigned identifier or an |
| 944 * alias. |
837 * | 945 * |
838 * [id] - Identifier of the course work. | 946 * [id] - Identifier of the course work. |
839 * | 947 * |
840 * [updateMask] - Mask that identifies which fields on the course work to | 948 * [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 | 949 * update. |
| 950 * 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 | 951 * 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 | 952 * 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 | 953 * 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 | 954 * not set in the CourseWork object, an `INVALID_ARGUMENT` error will be |
846 * returned. The following fields may be specified by teachers: * `title` * | 955 * returned. |
847 * `description` * `state` * `due_date` * `due_time` * `max_points` * | 956 * |
848 * `submission_modification_mode` | 957 * The following fields may be specified by teachers: |
| 958 * * `title` |
| 959 * * `description` |
| 960 * * `state` |
| 961 * * `due_date` |
| 962 * * `due_time` |
| 963 * * `max_points` |
| 964 * * `submission_modification_mode` |
849 * | 965 * |
850 * Completes with a [CourseWork]. | 966 * Completes with a [CourseWork]. |
851 * | 967 * |
852 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 968 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
853 * error. | 969 * error. |
854 * | 970 * |
855 * If the used [http.Client] completes with an error when making a REST call, | 971 * If the used [http.Client] completes with an error when making a REST call, |
856 * this method will complete with the same error. | 972 * this method will complete with the same error. |
857 */ | 973 */ |
858 async.Future<CourseWork> patch(CourseWork request, core.String courseId, core.
String id, {core.String updateMask}) { | 974 async.Future<CourseWork> patch(CourseWork request, core.String courseId, core.
String id, {core.String updateMask}) { |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
891 } | 1007 } |
892 | 1008 |
893 | 1009 |
894 class CoursesCourseWorkStudentSubmissionsResourceApi { | 1010 class CoursesCourseWorkStudentSubmissionsResourceApi { |
895 final commons.ApiRequester _requester; | 1011 final commons.ApiRequester _requester; |
896 | 1012 |
897 CoursesCourseWorkStudentSubmissionsResourceApi(commons.ApiRequester client) : | 1013 CoursesCourseWorkStudentSubmissionsResourceApi(commons.ApiRequester client) : |
898 _requester = client; | 1014 _requester = client; |
899 | 1015 |
900 /** | 1016 /** |
901 * Returns a student submission. * `PERMISSION_DENIED` if the requesting user | 1017 * Returns a student submission. |
902 * is not permitted to access the requested course, course work, or student | 1018 * |
903 * submission or for access errors. * `INVALID_ARGUMENT` if the request is | 1019 * * `PERMISSION_DENIED` if the requesting user is not permitted to access the |
904 * malformed. * `NOT_FOUND` if the requested course, course work, or student | 1020 * requested course, course work, or student submission or for |
905 * submission does not exist. | 1021 * access errors. |
| 1022 * * `INVALID_ARGUMENT` if the request is malformed. |
| 1023 * * `NOT_FOUND` if the requested course, course work, or student submission |
| 1024 * does not exist. |
906 * | 1025 * |
907 * Request parameters: | 1026 * Request parameters: |
908 * | 1027 * |
909 * [courseId] - Identifier of the course. This identifier can be either the | 1028 * [courseId] - Identifier of the course. |
910 * Classroom-assigned identifier or an alias. | 1029 * This identifier can be either the Classroom-assigned identifier or an |
| 1030 * alias. |
911 * | 1031 * |
912 * [courseWorkId] - Identifier of the course work. | 1032 * [courseWorkId] - Identifier of the course work. |
913 * | 1033 * |
914 * [id] - Identifier of the student submission. | 1034 * [id] - Identifier of the student submission. |
915 * | 1035 * |
916 * Completes with a [StudentSubmission]. | 1036 * Completes with a [StudentSubmission]. |
917 * | 1037 * |
918 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1038 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
919 * error. | 1039 * error. |
920 * | 1040 * |
(...skipping 25 matching lines...) Expand all Loading... |
946 body: _body, | 1066 body: _body, |
947 queryParams: _queryParams, | 1067 queryParams: _queryParams, |
948 uploadOptions: _uploadOptions, | 1068 uploadOptions: _uploadOptions, |
949 uploadMedia: _uploadMedia, | 1069 uploadMedia: _uploadMedia, |
950 downloadOptions: _downloadOptions); | 1070 downloadOptions: _downloadOptions); |
951 return _response.then((data) => new StudentSubmission.fromJson(data)); | 1071 return _response.then((data) => new StudentSubmission.fromJson(data)); |
952 } | 1072 } |
953 | 1073 |
954 /** | 1074 /** |
955 * Returns a list of student submissions that the requester is permitted to | 1075 * Returns a list of student submissions that the requester is permitted to |
956 * view, factoring in the OAuth scopes of the request. `-` may be specified as | 1076 * view, factoring in the OAuth scopes of the request. |
957 * the `course_work_id` to include student submissions for multiple course | 1077 * `-` may be specified as the `course_work_id` to include student |
958 * work items. Course students may only view their own work. Course teachers | 1078 * submissions for multiple course work items. |
959 * and domain administrators may view all student submissions. This method | 1079 * |
960 * returns the following error codes: * `PERMISSION_DENIED` if the requesting | 1080 * Course students may only view their own work. Course teachers |
961 * user is not permitted to access the requested course or course work, or for | 1081 * and domain administrators may view all student submissions. |
962 * access errors. * `INVALID_ARGUMENT` if the request is malformed. * | 1082 * |
963 * `NOT_FOUND` if the requested course does not exist. | 1083 * This method returns the following error codes: |
| 1084 * |
| 1085 * * `PERMISSION_DENIED` if the requesting user is not permitted to access the |
| 1086 * requested course or course work, or for access errors. |
| 1087 * * `INVALID_ARGUMENT` if the request is malformed. |
| 1088 * * `NOT_FOUND` if the requested course does not exist. |
964 * | 1089 * |
965 * Request parameters: | 1090 * Request parameters: |
966 * | 1091 * |
967 * [courseId] - Identifier of the course. This identifier can be either the | 1092 * [courseId] - Identifier of the course. |
968 * Classroom-assigned identifier or an alias. | 1093 * This identifier can be either the Classroom-assigned identifier or an |
| 1094 * alias. |
969 * | 1095 * |
970 * [courseWorkId] - Identifer of the student work to request. This may be set | 1096 * [courseWorkId] - Identifer of the student work to request. |
971 * to the string literal `"-"` to request student work for all course work in | 1097 * This may be set to the string literal `"-"` to request student work for |
972 * the specified course. | 1098 * all course work in the specified course. |
| 1099 * |
| 1100 * [states] - Requested submission states. If specified, returned student |
| 1101 * submissions |
| 1102 * match one of the specified submission states. |
973 * | 1103 * |
974 * [userId] - Optional argument to restrict returned student work to those | 1104 * [userId] - Optional argument to restrict returned student work to those |
975 * owned by the student with the specified identifier. The identifier can be | 1105 * owned by the |
976 * one of the following: * the numeric identifier for the user * the email | 1106 * student with the specified identifier. The identifier can be one of the |
977 * address of the user * the string literal `"me"`, indicating the requesting | 1107 * following: |
978 * user | |
979 * | 1108 * |
980 * [states] - Requested submission states. If specified, returned student | 1109 * * the numeric identifier for the user |
981 * submissions match one of the specified submission states. | 1110 * * the email address of the user |
| 1111 * * the string literal `"me"`, indicating the requesting user |
| 1112 * |
| 1113 * [pageSize] - Maximum number of items to return. Zero or unspecified |
| 1114 * indicates that the |
| 1115 * server may assign a maximum. |
| 1116 * |
| 1117 * The server may return fewer than the specified number of results. |
982 * | 1118 * |
983 * [late] - Requested lateness value. If specified, returned student | 1119 * [late] - Requested lateness value. If specified, returned student |
984 * submissions are restricted by the requested value. If unspecified, | 1120 * submissions are |
985 * submissions are returned regardless of `late` value. | 1121 * restricted by the requested value. |
| 1122 * If unspecified, submissions are returned regardless of `late` value. |
986 * Possible string values are: | 1123 * Possible string values are: |
987 * - "LATE_VALUES_UNSPECIFIED" : A LATE_VALUES_UNSPECIFIED. | 1124 * - "LATE_VALUES_UNSPECIFIED" : A LATE_VALUES_UNSPECIFIED. |
988 * - "LATE_ONLY" : A LATE_ONLY. | 1125 * - "LATE_ONLY" : A LATE_ONLY. |
989 * - "NOT_LATE_ONLY" : A NOT_LATE_ONLY. | 1126 * - "NOT_LATE_ONLY" : A NOT_LATE_ONLY. |
990 * | 1127 * |
991 * [pageSize] - Maximum number of items to return. Zero or unspecified | 1128 * [pageToken] - nextPageToken |
992 * indicates that the server may assign a maximum. The server may return fewer | 1129 * value returned from a previous |
993 * than the specified number of results. | 1130 * list call, |
| 1131 * indicating that the subsequent page of results should be returned. |
994 * | 1132 * |
995 * [pageToken] - nextPageToken value returned from a previous list call, | 1133 * The list request |
996 * indicating that the subsequent page of results should be returned. The list | 1134 * must be otherwise identical to the one that resulted in this token. |
997 * request must be otherwise identical to the one that resulted in this token. | |
998 * | 1135 * |
999 * Completes with a [ListStudentSubmissionsResponse]. | 1136 * Completes with a [ListStudentSubmissionsResponse]. |
1000 * | 1137 * |
1001 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1138 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1002 * error. | 1139 * error. |
1003 * | 1140 * |
1004 * If the used [http.Client] completes with an error when making a REST call, | 1141 * If the used [http.Client] completes with an error when making a REST call, |
1005 * this method will complete with the same error. | 1142 * this method will complete with the same error. |
1006 */ | 1143 */ |
1007 async.Future<ListStudentSubmissionsResponse> list(core.String courseId, core.S
tring courseWorkId, {core.String userId, core.List<core.String> states, core.Str
ing late, core.int pageSize, core.String pageToken}) { | 1144 async.Future<ListStudentSubmissionsResponse> list(core.String courseId, core.S
tring courseWorkId, {core.List<core.String> states, core.String userId, core.int
pageSize, core.String late, core.String pageToken}) { |
1008 var _url = null; | 1145 var _url = null; |
1009 var _queryParams = new core.Map(); | 1146 var _queryParams = new core.Map(); |
1010 var _uploadMedia = null; | 1147 var _uploadMedia = null; |
1011 var _uploadOptions = null; | 1148 var _uploadOptions = null; |
1012 var _downloadOptions = commons.DownloadOptions.Metadata; | 1149 var _downloadOptions = commons.DownloadOptions.Metadata; |
1013 var _body = null; | 1150 var _body = null; |
1014 | 1151 |
1015 if (courseId == null) { | 1152 if (courseId == null) { |
1016 throw new core.ArgumentError("Parameter courseId is required."); | 1153 throw new core.ArgumentError("Parameter courseId is required."); |
1017 } | 1154 } |
1018 if (courseWorkId == null) { | 1155 if (courseWorkId == null) { |
1019 throw new core.ArgumentError("Parameter courseWorkId is required."); | 1156 throw new core.ArgumentError("Parameter courseWorkId is required."); |
1020 } | 1157 } |
| 1158 if (states != null) { |
| 1159 _queryParams["states"] = states; |
| 1160 } |
1021 if (userId != null) { | 1161 if (userId != null) { |
1022 _queryParams["userId"] = [userId]; | 1162 _queryParams["userId"] = [userId]; |
1023 } | 1163 } |
1024 if (states != null) { | 1164 if (pageSize != null) { |
1025 _queryParams["states"] = states; | 1165 _queryParams["pageSize"] = ["${pageSize}"]; |
1026 } | 1166 } |
1027 if (late != null) { | 1167 if (late != null) { |
1028 _queryParams["late"] = [late]; | 1168 _queryParams["late"] = [late]; |
1029 } | 1169 } |
1030 if (pageSize != null) { | |
1031 _queryParams["pageSize"] = ["${pageSize}"]; | |
1032 } | |
1033 if (pageToken != null) { | 1170 if (pageToken != null) { |
1034 _queryParams["pageToken"] = [pageToken]; | 1171 _queryParams["pageToken"] = [pageToken]; |
1035 } | 1172 } |
1036 | 1173 |
1037 _url = 'v1/courses/' + commons.Escaper.ecapeVariable('$courseId') + '/course
Work/' + commons.Escaper.ecapeVariable('$courseWorkId') + '/studentSubmissions'; | 1174 _url = 'v1/courses/' + commons.Escaper.ecapeVariable('$courseId') + '/course
Work/' + commons.Escaper.ecapeVariable('$courseWorkId') + '/studentSubmissions'; |
1038 | 1175 |
1039 var _response = _requester.request(_url, | 1176 var _response = _requester.request(_url, |
1040 "GET", | 1177 "GET", |
1041 body: _body, | 1178 body: _body, |
1042 queryParams: _queryParams, | 1179 queryParams: _queryParams, |
1043 uploadOptions: _uploadOptions, | 1180 uploadOptions: _uploadOptions, |
1044 uploadMedia: _uploadMedia, | 1181 uploadMedia: _uploadMedia, |
1045 downloadOptions: _downloadOptions); | 1182 downloadOptions: _downloadOptions); |
1046 return _response.then((data) => new ListStudentSubmissionsResponse.fromJson(
data)); | 1183 return _response.then((data) => new ListStudentSubmissionsResponse.fromJson(
data)); |
1047 } | 1184 } |
1048 | 1185 |
1049 /** | 1186 /** |
1050 * Modifies attachments of student submission. Attachments may only be added | 1187 * Modifies attachments of student submission. |
1051 * to student submissions belonging to course work objects with a `workType` | 1188 * |
1052 * of `ASSIGNMENT`. This request must be made by the Developer Console project | 1189 * Attachments may only be added to student submissions belonging to course |
1053 * of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) | 1190 * work objects with a `workType` of `ASSIGNMENT`. |
1054 * used to create the corresponding course work item. This method returns the | 1191 * |
1055 * following error codes: * `PERMISSION_DENIED` if the requesting user is not | 1192 * This request must be made by the Developer Console project of the |
1056 * permitted to access the requested course or course work, if the user is not | 1193 * [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to |
1057 * permitted to modify attachments on the requested student submission, or for | 1194 * create the corresponding course work item. |
1058 * access errors. * `INVALID_ARGUMENT` if the request is malformed. * | 1195 * |
1059 * `NOT_FOUND` if the requested course, course work, or student submission | 1196 * This method returns the following error codes: |
| 1197 * |
| 1198 * * `PERMISSION_DENIED` if the requesting user is not permitted to access the |
| 1199 * requested course or course work, if the user is not permitted to modify |
| 1200 * attachments on the requested student submission, or for |
| 1201 * access errors. |
| 1202 * * `INVALID_ARGUMENT` if the request is malformed. |
| 1203 * * `NOT_FOUND` if the requested course, course work, or student submission |
1060 * does not exist. | 1204 * does not exist. |
1061 * | 1205 * |
1062 * [request] - The metadata request object. | 1206 * [request] - The metadata request object. |
1063 * | 1207 * |
1064 * Request parameters: | 1208 * Request parameters: |
1065 * | 1209 * |
1066 * [courseId] - Identifier of the course. This identifier can be either the | 1210 * [courseId] - Identifier of the course. |
1067 * Classroom-assigned identifier or an alias. | 1211 * This identifier can be either the Classroom-assigned identifier or an |
| 1212 * alias. |
1068 * | 1213 * |
1069 * [courseWorkId] - Identifier of the course work. | 1214 * [courseWorkId] - Identifier of the course work. |
1070 * | 1215 * |
1071 * [id] - Identifier of the student submission. | 1216 * [id] - Identifier of the student submission. |
1072 * | 1217 * |
1073 * Completes with a [StudentSubmission]. | 1218 * Completes with a [StudentSubmission]. |
1074 * | 1219 * |
1075 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1220 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1076 * error. | 1221 * error. |
1077 * | 1222 * |
(...skipping 27 matching lines...) Expand all Loading... |
1105 "POST", | 1250 "POST", |
1106 body: _body, | 1251 body: _body, |
1107 queryParams: _queryParams, | 1252 queryParams: _queryParams, |
1108 uploadOptions: _uploadOptions, | 1253 uploadOptions: _uploadOptions, |
1109 uploadMedia: _uploadMedia, | 1254 uploadMedia: _uploadMedia, |
1110 downloadOptions: _downloadOptions); | 1255 downloadOptions: _downloadOptions); |
1111 return _response.then((data) => new StudentSubmission.fromJson(data)); | 1256 return _response.then((data) => new StudentSubmission.fromJson(data)); |
1112 } | 1257 } |
1113 | 1258 |
1114 /** | 1259 /** |
1115 * Updates one or more fields of a student submission. See | 1260 * Updates one or more fields of a student submission. |
1116 * google.classroom.v1.StudentSubmission for details of which fields may be | 1261 * |
1117 * updated and who may change them. This request must be made by the Developer | 1262 * See google.classroom.v1.StudentSubmission for details |
1118 * Console project of the [OAuth client | 1263 * of which fields may be updated and who may change them. |
1119 * ID](https://support.google.com/cloud/answer/6158849) used to create the | 1264 * |
1120 * corresponding course work item. This method returns the following error | 1265 * This request must be made by the Developer Console project of the |
1121 * codes: * `PERMISSION_DENIED` if the requesting developer project did not | 1266 * [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to |
1122 * create the corresponding course work, if the user is not permitted to make | 1267 * create the corresponding course work item. |
1123 * the requested modification to the student submission, or for access errors. | 1268 * |
1124 * * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the | 1269 * This method returns the following error codes: |
1125 * requested course, course work, or student submission does not exist. | 1270 * |
| 1271 * * `PERMISSION_DENIED` if the requesting developer project did not create |
| 1272 * the corresponding course work, if the user is not permitted to make the |
| 1273 * requested modification to the student submission, or for |
| 1274 * access errors. |
| 1275 * * `INVALID_ARGUMENT` if the request is malformed. |
| 1276 * * `NOT_FOUND` if the requested course, course work, or student submission |
| 1277 * does not exist. |
1126 * | 1278 * |
1127 * [request] - The metadata request object. | 1279 * [request] - The metadata request object. |
1128 * | 1280 * |
1129 * Request parameters: | 1281 * Request parameters: |
1130 * | 1282 * |
1131 * [courseId] - Identifier of the course. This identifier can be either the | 1283 * [courseId] - Identifier of the course. |
1132 * Classroom-assigned identifier or an alias. | 1284 * This identifier can be either the Classroom-assigned identifier or an |
| 1285 * alias. |
1133 * | 1286 * |
1134 * [courseWorkId] - Identifier of the course work. | 1287 * [courseWorkId] - Identifier of the course work. |
1135 * | 1288 * |
1136 * [id] - Identifier of the student submission. | 1289 * [id] - Identifier of the student submission. |
1137 * | 1290 * |
1138 * [updateMask] - Mask that identifies which fields on the student submission | 1291 * [updateMask] - Mask that identifies which fields on the student submission |
1139 * to update. This field is required to do an update. The update fails if | 1292 * to update. |
1140 * invalid fields are specified. The following fields may be specified by | 1293 * This field is required to do an update. The update fails if invalid |
1141 * teachers: * `draft_grade` * `assigned_grade` | 1294 * fields are specified. |
| 1295 * |
| 1296 * The following fields may be specified by teachers: |
| 1297 * * `draft_grade` |
| 1298 * * `assigned_grade` |
1142 * | 1299 * |
1143 * Completes with a [StudentSubmission]. | 1300 * Completes with a [StudentSubmission]. |
1144 * | 1301 * |
1145 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1302 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1146 * error. | 1303 * error. |
1147 * | 1304 * |
1148 * If the used [http.Client] completes with an error when making a REST call, | 1305 * If the used [http.Client] completes with an error when making a REST call, |
1149 * this method will complete with the same error. | 1306 * this method will complete with the same error. |
1150 */ | 1307 */ |
1151 async.Future<StudentSubmission> patch(StudentSubmission request, core.String c
ourseId, core.String courseWorkId, core.String id, {core.String updateMask}) { | 1308 async.Future<StudentSubmission> patch(StudentSubmission request, core.String c
ourseId, core.String courseWorkId, core.String id, {core.String updateMask}) { |
(...skipping 27 matching lines...) Expand all Loading... |
1179 body: _body, | 1336 body: _body, |
1180 queryParams: _queryParams, | 1337 queryParams: _queryParams, |
1181 uploadOptions: _uploadOptions, | 1338 uploadOptions: _uploadOptions, |
1182 uploadMedia: _uploadMedia, | 1339 uploadMedia: _uploadMedia, |
1183 downloadOptions: _downloadOptions); | 1340 downloadOptions: _downloadOptions); |
1184 return _response.then((data) => new StudentSubmission.fromJson(data)); | 1341 return _response.then((data) => new StudentSubmission.fromJson(data)); |
1185 } | 1342 } |
1186 | 1343 |
1187 /** | 1344 /** |
1188 * Reclaims a student submission on behalf of the student that owns it. | 1345 * Reclaims a student submission on behalf of the student that owns it. |
1189 * Reclaiming a student submission transfers ownership of attached Drive files | 1346 * |
1190 * to the student and update the submission state. Only the student that owns | 1347 * Reclaiming a student submission transfers ownership of attached Drive |
1191 * the requested student submission may call this method, and only for a | 1348 * files to the student and update the submission state. |
1192 * student submission that has been turned in. This request must be made by | 1349 * |
1193 * the Developer Console project of the [OAuth client | 1350 * Only the student that owns the requested student submission may call this |
1194 * ID](https://support.google.com/cloud/answer/6158849) used to create the | 1351 * method, and only for a student submission that has been turned in. |
1195 * corresponding course work item. This method returns the following error | 1352 * |
1196 * codes: * `PERMISSION_DENIED` if the requesting user is not permitted to | 1353 * This request must be made by the Developer Console project of the |
1197 * access the requested course or course work, unsubmit the requested student | 1354 * [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to |
1198 * submission, or for access errors. * `FAILED_PRECONDITION` if the student | 1355 * create the corresponding course work item. |
1199 * submission has not been turned in. * `INVALID_ARGUMENT` if the request is | 1356 * |
1200 * malformed. * `NOT_FOUND` if the requested course, course work, or student | 1357 * This method returns the following error codes: |
1201 * submission does not exist. | 1358 * |
| 1359 * * `PERMISSION_DENIED` if the requesting user is not permitted to access the |
| 1360 * requested course or course work, unsubmit the requested student submission, |
| 1361 * or for access errors. |
| 1362 * * `FAILED_PRECONDITION` if the student submission has not been turned in. |
| 1363 * * `INVALID_ARGUMENT` if the request is malformed. |
| 1364 * * `NOT_FOUND` if the requested course, course work, or student submission |
| 1365 * does not exist. |
1202 * | 1366 * |
1203 * [request] - The metadata request object. | 1367 * [request] - The metadata request object. |
1204 * | 1368 * |
1205 * Request parameters: | 1369 * Request parameters: |
1206 * | 1370 * |
1207 * [courseId] - Identifier of the course. This identifier can be either the | 1371 * [courseId] - Identifier of the course. |
1208 * Classroom-assigned identifier or an alias. | 1372 * This identifier can be either the Classroom-assigned identifier or an |
| 1373 * alias. |
1209 * | 1374 * |
1210 * [courseWorkId] - Identifier of the course work. | 1375 * [courseWorkId] - Identifier of the course work. |
1211 * | 1376 * |
1212 * [id] - Identifier of the student submission. | 1377 * [id] - Identifier of the student submission. |
1213 * | 1378 * |
1214 * Completes with a [Empty]. | 1379 * Completes with a [Empty]. |
1215 * | 1380 * |
1216 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1381 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1217 * error. | 1382 * error. |
1218 * | 1383 * |
(...skipping 27 matching lines...) Expand all Loading... |
1246 "POST", | 1411 "POST", |
1247 body: _body, | 1412 body: _body, |
1248 queryParams: _queryParams, | 1413 queryParams: _queryParams, |
1249 uploadOptions: _uploadOptions, | 1414 uploadOptions: _uploadOptions, |
1250 uploadMedia: _uploadMedia, | 1415 uploadMedia: _uploadMedia, |
1251 downloadOptions: _downloadOptions); | 1416 downloadOptions: _downloadOptions); |
1252 return _response.then((data) => new Empty.fromJson(data)); | 1417 return _response.then((data) => new Empty.fromJson(data)); |
1253 } | 1418 } |
1254 | 1419 |
1255 /** | 1420 /** |
1256 * Returns a student submission. Returning a student submission transfers | 1421 * Returns a student submission. |
1257 * ownership of attached Drive files to the student and may also update the | 1422 * |
1258 * submission state. Unlike the Classroom application, returning a student | 1423 * Returning a student submission transfers ownership of attached Drive |
1259 * submission does not set assignedGrade to the draftGrade value. Only a | 1424 * files to the student and may also update the submission state. |
1260 * teacher of the course that contains the requested student submission may | 1425 * Unlike the Classroom application, returning a student submission does not |
1261 * call this method. This request must be made by the Developer Console | 1426 * set assignedGrade to the draftGrade value. |
1262 * project of the [OAuth client | 1427 * |
1263 * ID](https://support.google.com/cloud/answer/6158849) used to create the | 1428 * Only a teacher of the course that contains the requested student submission |
1264 * corresponding course work item. This method returns the following error | 1429 * may call this method. |
1265 * codes: * `PERMISSION_DENIED` if the requesting user is not permitted to | 1430 * |
1266 * access the requested course or course work, return the requested student | 1431 * This request must be made by the Developer Console project of the |
1267 * submission, or for access errors. * `INVALID_ARGUMENT` if the request is | 1432 * [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to |
1268 * malformed. * `NOT_FOUND` if the requested course, course work, or student | 1433 * create the corresponding course work item. |
1269 * submission does not exist. | 1434 * |
| 1435 * This method returns the following error codes: |
| 1436 * |
| 1437 * * `PERMISSION_DENIED` if the requesting user is not permitted to access the |
| 1438 * requested course or course work, return the requested student submission, |
| 1439 * or for access errors. |
| 1440 * * `INVALID_ARGUMENT` if the request is malformed. |
| 1441 * * `NOT_FOUND` if the requested course, course work, or student submission |
| 1442 * does not exist. |
1270 * | 1443 * |
1271 * [request] - The metadata request object. | 1444 * [request] - The metadata request object. |
1272 * | 1445 * |
1273 * Request parameters: | 1446 * Request parameters: |
1274 * | 1447 * |
1275 * [courseId] - Identifier of the course. This identifier can be either the | 1448 * [courseId] - Identifier of the course. |
1276 * Classroom-assigned identifier or an alias. | 1449 * This identifier can be either the Classroom-assigned identifier or an |
| 1450 * alias. |
1277 * | 1451 * |
1278 * [courseWorkId] - Identifier of the course work. | 1452 * [courseWorkId] - Identifier of the course work. |
1279 * | 1453 * |
1280 * [id] - Identifier of the student submission. | 1454 * [id] - Identifier of the student submission. |
1281 * | 1455 * |
1282 * Completes with a [Empty]. | 1456 * Completes with a [Empty]. |
1283 * | 1457 * |
1284 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1458 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1285 * error. | 1459 * error. |
1286 * | 1460 * |
(...skipping 27 matching lines...) Expand all Loading... |
1314 "POST", | 1488 "POST", |
1315 body: _body, | 1489 body: _body, |
1316 queryParams: _queryParams, | 1490 queryParams: _queryParams, |
1317 uploadOptions: _uploadOptions, | 1491 uploadOptions: _uploadOptions, |
1318 uploadMedia: _uploadMedia, | 1492 uploadMedia: _uploadMedia, |
1319 downloadOptions: _downloadOptions); | 1493 downloadOptions: _downloadOptions); |
1320 return _response.then((data) => new Empty.fromJson(data)); | 1494 return _response.then((data) => new Empty.fromJson(data)); |
1321 } | 1495 } |
1322 | 1496 |
1323 /** | 1497 /** |
1324 * Turns in a student submission. Turning in a student submission transfers | 1498 * Turns in a student submission. |
1325 * ownership of attached Drive files to the teacher and may also update the | 1499 * |
1326 * submission state. This may only be called by the student that owns the | 1500 * Turning in a student submission transfers ownership of attached Drive |
1327 * specified student submission. This request must be made by the Developer | 1501 * files to the teacher and may also update the submission state. |
1328 * Console project of the [OAuth client | 1502 * |
1329 * ID](https://support.google.com/cloud/answer/6158849) used to create the | 1503 * This may only be called by the student that owns the specified student |
1330 * corresponding course work item. This method returns the following error | 1504 * submission. |
1331 * codes: * `PERMISSION_DENIED` if the requesting user is not permitted to | 1505 * |
1332 * access the requested course or course work, turn in the requested student | 1506 * This request must be made by the Developer Console project of the |
1333 * submission, or for access errors. * `INVALID_ARGUMENT` if the request is | 1507 * [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to |
1334 * malformed. * `NOT_FOUND` if the requested course, course work, or student | 1508 * create the corresponding course work item. |
1335 * submission does not exist. | 1509 * |
| 1510 * This method returns the following error codes: |
| 1511 * |
| 1512 * * `PERMISSION_DENIED` if the requesting user is not permitted to access the |
| 1513 * requested course or course work, turn in the requested student submission, |
| 1514 * or for access errors. |
| 1515 * * `INVALID_ARGUMENT` if the request is malformed. |
| 1516 * * `NOT_FOUND` if the requested course, course work, or student submission |
| 1517 * does not exist. |
1336 * | 1518 * |
1337 * [request] - The metadata request object. | 1519 * [request] - The metadata request object. |
1338 * | 1520 * |
1339 * Request parameters: | 1521 * Request parameters: |
1340 * | 1522 * |
1341 * [courseId] - Identifier of the course. This identifier can be either the | 1523 * [courseId] - Identifier of the course. |
1342 * Classroom-assigned identifier or an alias. | 1524 * This identifier can be either the Classroom-assigned identifier or an |
| 1525 * alias. |
1343 * | 1526 * |
1344 * [courseWorkId] - Identifier of the course work. | 1527 * [courseWorkId] - Identifier of the course work. |
1345 * | 1528 * |
1346 * [id] - Identifier of the student submission. | 1529 * [id] - Identifier of the student submission. |
1347 * | 1530 * |
1348 * Completes with a [Empty]. | 1531 * Completes with a [Empty]. |
1349 * | 1532 * |
1350 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1533 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1351 * error. | 1534 * error. |
1352 * | 1535 * |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1389 } | 1572 } |
1390 | 1573 |
1391 | 1574 |
1392 class CoursesStudentsResourceApi { | 1575 class CoursesStudentsResourceApi { |
1393 final commons.ApiRequester _requester; | 1576 final commons.ApiRequester _requester; |
1394 | 1577 |
1395 CoursesStudentsResourceApi(commons.ApiRequester client) : | 1578 CoursesStudentsResourceApi(commons.ApiRequester client) : |
1396 _requester = client; | 1579 _requester = client; |
1397 | 1580 |
1398 /** | 1581 /** |
1399 * Adds a user as a student of a course. This method returns the following | 1582 * Adds a user as a student of a course. |
1400 * error codes: * `PERMISSION_DENIED` if the requesting user is not permitted | 1583 * |
1401 * to create students in this course or for access errors. * `NOT_FOUND` if | 1584 * This method returns the following error codes: |
1402 * the requested course ID does not exist. * `FAILED_PRECONDITION` if the | 1585 * |
1403 * requested user's account is disabled, for the following request errors: * | 1586 * * `PERMISSION_DENIED` if the requesting user is not permitted to create |
1404 * CourseMemberLimitReached * CourseNotModifiable * | 1587 * students in this course or for access errors. |
1405 * UserGroupsMembershipLimitReached * `ALREADY_EXISTS` if the user is already | 1588 * * `NOT_FOUND` if the requested course ID does not exist. |
1406 * a student or teacher in the course. | 1589 * * `FAILED_PRECONDITION` if the requested user's account is disabled, |
| 1590 * for the following request errors: |
| 1591 * * CourseMemberLimitReached |
| 1592 * * CourseNotModifiable |
| 1593 * * UserGroupsMembershipLimitReached |
| 1594 * * `ALREADY_EXISTS` if the user is already a student or teacher in the |
| 1595 * course. |
1407 * | 1596 * |
1408 * [request] - The metadata request object. | 1597 * [request] - The metadata request object. |
1409 * | 1598 * |
1410 * Request parameters: | 1599 * Request parameters: |
1411 * | 1600 * |
1412 * [courseId] - Identifier of the course to create the student in. This | 1601 * [courseId] - Identifier of the course to create the student in. |
1413 * identifier can be either the Classroom-assigned identifier or an alias. | 1602 * This identifier can be either the Classroom-assigned identifier or an |
| 1603 * alias. |
1414 * | 1604 * |
1415 * [enrollmentCode] - Enrollment code of the course to create the student in. | 1605 * [enrollmentCode] - Enrollment code of the course to create the student in. |
1416 * This code is required if userId corresponds to the requesting user; it may | 1606 * This code is required if userId |
1417 * be omitted if the requesting user has administrative permissions to create | 1607 * corresponds to the requesting user; it may be omitted if the requesting |
1418 * students for any user. | 1608 * user has administrative permissions to create students for any user. |
1419 * | 1609 * |
1420 * Completes with a [Student]. | 1610 * Completes with a [Student]. |
1421 * | 1611 * |
1422 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1612 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1423 * error. | 1613 * error. |
1424 * | 1614 * |
1425 * If the used [http.Client] completes with an error when making a REST call, | 1615 * If the used [http.Client] completes with an error when making a REST call, |
1426 * this method will complete with the same error. | 1616 * this method will complete with the same error. |
1427 */ | 1617 */ |
1428 async.Future<Student> create(Student request, core.String courseId, {core.Stri
ng enrollmentCode}) { | 1618 async.Future<Student> create(Student request, core.String courseId, {core.Stri
ng enrollmentCode}) { |
(...skipping 20 matching lines...) Expand all Loading... |
1449 "POST", | 1639 "POST", |
1450 body: _body, | 1640 body: _body, |
1451 queryParams: _queryParams, | 1641 queryParams: _queryParams, |
1452 uploadOptions: _uploadOptions, | 1642 uploadOptions: _uploadOptions, |
1453 uploadMedia: _uploadMedia, | 1643 uploadMedia: _uploadMedia, |
1454 downloadOptions: _downloadOptions); | 1644 downloadOptions: _downloadOptions); |
1455 return _response.then((data) => new Student.fromJson(data)); | 1645 return _response.then((data) => new Student.fromJson(data)); |
1456 } | 1646 } |
1457 | 1647 |
1458 /** | 1648 /** |
1459 * Deletes a student of a course. This method returns the following error | 1649 * Deletes a student of a course. |
1460 * codes: * `PERMISSION_DENIED` if the requesting user is not permitted to | 1650 * |
1461 * delete students of this course or for access errors. * `NOT_FOUND` if no | 1651 * This method returns the following error codes: |
1462 * student of this course has the requested ID or if the course does not | 1652 * |
1463 * exist. | 1653 * * `PERMISSION_DENIED` if the requesting user is not permitted to delete |
| 1654 * students of this course or for access errors. |
| 1655 * * `NOT_FOUND` if no student of this course has the requested ID or if the |
| 1656 * course does not exist. |
1464 * | 1657 * |
1465 * Request parameters: | 1658 * Request parameters: |
1466 * | 1659 * |
1467 * [courseId] - Identifier of the course. This identifier can be either the | 1660 * [courseId] - Identifier of the course. |
1468 * Classroom-assigned identifier or an alias. | 1661 * This identifier can be either the Classroom-assigned identifier or an |
| 1662 * alias. |
1469 * | 1663 * |
1470 * [userId] - Identifier of the student to delete. The identifier can be one | 1664 * [userId] - Identifier of the student to delete. The identifier can be one |
1471 * of the following: * the numeric identifier for the user * the email address | 1665 * of the |
1472 * of the user * the string literal `"me"`, indicating the requesting user | 1666 * following: |
| 1667 * |
| 1668 * * the numeric identifier for the user |
| 1669 * * the email address of the user |
| 1670 * * the string literal `"me"`, indicating the requesting user |
1473 * | 1671 * |
1474 * Completes with a [Empty]. | 1672 * Completes with a [Empty]. |
1475 * | 1673 * |
1476 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1674 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1477 * error. | 1675 * error. |
1478 * | 1676 * |
1479 * If the used [http.Client] completes with an error when making a REST call, | 1677 * If the used [http.Client] completes with an error when making a REST call, |
1480 * this method will complete with the same error. | 1678 * this method will complete with the same error. |
1481 */ | 1679 */ |
1482 async.Future<Empty> delete(core.String courseId, core.String userId) { | 1680 async.Future<Empty> delete(core.String courseId, core.String userId) { |
(...skipping 17 matching lines...) Expand all Loading... |
1500 "DELETE", | 1698 "DELETE", |
1501 body: _body, | 1699 body: _body, |
1502 queryParams: _queryParams, | 1700 queryParams: _queryParams, |
1503 uploadOptions: _uploadOptions, | 1701 uploadOptions: _uploadOptions, |
1504 uploadMedia: _uploadMedia, | 1702 uploadMedia: _uploadMedia, |
1505 downloadOptions: _downloadOptions); | 1703 downloadOptions: _downloadOptions); |
1506 return _response.then((data) => new Empty.fromJson(data)); | 1704 return _response.then((data) => new Empty.fromJson(data)); |
1507 } | 1705 } |
1508 | 1706 |
1509 /** | 1707 /** |
1510 * Returns a student of a course. This method returns the following error | 1708 * Returns a student of a course. |
1511 * codes: * `PERMISSION_DENIED` if the requesting user is not permitted to | 1709 * |
1512 * view students of this course or for access errors. * `NOT_FOUND` if no | 1710 * This method returns the following error codes: |
1513 * student of this course has the requested ID or if the course does not | 1711 * |
1514 * exist. | 1712 * * `PERMISSION_DENIED` if the requesting user is not permitted to view |
| 1713 * students of this course or for access errors. |
| 1714 * * `NOT_FOUND` if no student of this course has the requested ID or if the |
| 1715 * course does not exist. |
1515 * | 1716 * |
1516 * Request parameters: | 1717 * Request parameters: |
1517 * | 1718 * |
1518 * [courseId] - Identifier of the course. This identifier can be either the | 1719 * [courseId] - Identifier of the course. |
1519 * Classroom-assigned identifier or an alias. | 1720 * This identifier can be either the Classroom-assigned identifier or an |
| 1721 * alias. |
1520 * | 1722 * |
1521 * [userId] - Identifier of the student to return. The identifier can be one | 1723 * [userId] - Identifier of the student to return. The identifier can be one |
1522 * of the following: * the numeric identifier for the user * the email address | 1724 * of the |
1523 * of the user * the string literal `"me"`, indicating the requesting user | 1725 * following: |
| 1726 * |
| 1727 * * the numeric identifier for the user |
| 1728 * * the email address of the user |
| 1729 * * the string literal `"me"`, indicating the requesting user |
1524 * | 1730 * |
1525 * Completes with a [Student]. | 1731 * Completes with a [Student]. |
1526 * | 1732 * |
1527 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1733 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1528 * error. | 1734 * error. |
1529 * | 1735 * |
1530 * If the used [http.Client] completes with an error when making a REST call, | 1736 * If the used [http.Client] completes with an error when making a REST call, |
1531 * this method will complete with the same error. | 1737 * this method will complete with the same error. |
1532 */ | 1738 */ |
1533 async.Future<Student> get(core.String courseId, core.String userId) { | 1739 async.Future<Student> get(core.String courseId, core.String userId) { |
(...skipping 17 matching lines...) Expand all Loading... |
1551 "GET", | 1757 "GET", |
1552 body: _body, | 1758 body: _body, |
1553 queryParams: _queryParams, | 1759 queryParams: _queryParams, |
1554 uploadOptions: _uploadOptions, | 1760 uploadOptions: _uploadOptions, |
1555 uploadMedia: _uploadMedia, | 1761 uploadMedia: _uploadMedia, |
1556 downloadOptions: _downloadOptions); | 1762 downloadOptions: _downloadOptions); |
1557 return _response.then((data) => new Student.fromJson(data)); | 1763 return _response.then((data) => new Student.fromJson(data)); |
1558 } | 1764 } |
1559 | 1765 |
1560 /** | 1766 /** |
1561 * Returns a list of students of this course that the requester is permitted | 1767 * Returns a list of students of this course that the requester |
1562 * to view. This method returns the following error codes: * `NOT_FOUND` if | 1768 * is permitted to view. |
1563 * the course does not exist. * `PERMISSION_DENIED` for access errors. | 1769 * |
| 1770 * This method returns the following error codes: |
| 1771 * |
| 1772 * * `NOT_FOUND` if the course does not exist. |
| 1773 * * `PERMISSION_DENIED` for access errors. |
1564 * | 1774 * |
1565 * Request parameters: | 1775 * Request parameters: |
1566 * | 1776 * |
1567 * [courseId] - Identifier of the course. This identifier can be either the | 1777 * [courseId] - Identifier of the course. |
1568 * Classroom-assigned identifier or an alias. | 1778 * This identifier can be either the Classroom-assigned identifier or an |
| 1779 * alias. |
1569 * | 1780 * |
1570 * [pageSize] - Maximum number of items to return. Zero means no maximum. The | 1781 * [pageSize] - Maximum number of items to return. Zero means no maximum. |
1571 * server may return fewer than the specified number of results. | |
1572 * | 1782 * |
1573 * [pageToken] - nextPageToken value returned from a previous list call, | 1783 * The server may return fewer than the specified number of results. |
1574 * indicating that the subsequent page of results should be returned. The list | 1784 * |
1575 * request must be otherwise identical to the one that resulted in this token. | 1785 * [pageToken] - nextPageToken |
| 1786 * value returned from a previous |
| 1787 * list call, indicating that |
| 1788 * the subsequent page of results should be returned. |
| 1789 * |
| 1790 * The list request must be |
| 1791 * otherwise identical to the one that resulted in this token. |
1576 * | 1792 * |
1577 * Completes with a [ListStudentsResponse]. | 1793 * Completes with a [ListStudentsResponse]. |
1578 * | 1794 * |
1579 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1795 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1580 * error. | 1796 * error. |
1581 * | 1797 * |
1582 * If the used [http.Client] completes with an error when making a REST call, | 1798 * If the used [http.Client] completes with an error when making a REST call, |
1583 * this method will complete with the same error. | 1799 * this method will complete with the same error. |
1584 */ | 1800 */ |
1585 async.Future<ListStudentsResponse> list(core.String courseId, {core.int pageSi
ze, core.String pageToken}) { | 1801 async.Future<ListStudentsResponse> list(core.String courseId, {core.int pageSi
ze, core.String pageToken}) { |
(...skipping 29 matching lines...) Expand all Loading... |
1615 } | 1831 } |
1616 | 1832 |
1617 | 1833 |
1618 class CoursesTeachersResourceApi { | 1834 class CoursesTeachersResourceApi { |
1619 final commons.ApiRequester _requester; | 1835 final commons.ApiRequester _requester; |
1620 | 1836 |
1621 CoursesTeachersResourceApi(commons.ApiRequester client) : | 1837 CoursesTeachersResourceApi(commons.ApiRequester client) : |
1622 _requester = client; | 1838 _requester = client; |
1623 | 1839 |
1624 /** | 1840 /** |
1625 * Creates a teacher of a course. This method returns the following error | 1841 * Creates a teacher of a course. |
1626 * codes: * `PERMISSION_DENIED` if the requesting user is not permitted to | 1842 * |
1627 * create teachers in this course or for access errors. * `NOT_FOUND` if the | 1843 * This method returns the following error codes: |
1628 * requested course ID does not exist. * `FAILED_PRECONDITION` if the | 1844 * |
1629 * requested user's account is disabled, for the following request errors: * | 1845 * * `PERMISSION_DENIED` if the requesting user is not permitted to create |
1630 * CourseMemberLimitReached * CourseNotModifiable * CourseTeacherLimitReached | 1846 * teachers in this course or for access errors. |
1631 * * UserGroupsMembershipLimitReached * `ALREADY_EXISTS` if the user is | 1847 * * `NOT_FOUND` if the requested course ID does not exist. |
1632 * already a teacher or student in the course. | 1848 * * `FAILED_PRECONDITION` if the requested user's account is disabled, |
| 1849 * for the following request errors: |
| 1850 * * CourseMemberLimitReached |
| 1851 * * CourseNotModifiable |
| 1852 * * CourseTeacherLimitReached |
| 1853 * * UserGroupsMembershipLimitReached |
| 1854 * * `ALREADY_EXISTS` if the user is already a teacher or student in the |
| 1855 * course. |
1633 * | 1856 * |
1634 * [request] - The metadata request object. | 1857 * [request] - The metadata request object. |
1635 * | 1858 * |
1636 * Request parameters: | 1859 * Request parameters: |
1637 * | 1860 * |
1638 * [courseId] - Identifier of the course. This identifier can be either the | 1861 * [courseId] - Identifier of the course. |
1639 * Classroom-assigned identifier or an alias. | 1862 * This identifier can be either the Classroom-assigned identifier or an |
| 1863 * alias. |
1640 * | 1864 * |
1641 * Completes with a [Teacher]. | 1865 * Completes with a [Teacher]. |
1642 * | 1866 * |
1643 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1867 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1644 * error. | 1868 * error. |
1645 * | 1869 * |
1646 * If the used [http.Client] completes with an error when making a REST call, | 1870 * If the used [http.Client] completes with an error when making a REST call, |
1647 * this method will complete with the same error. | 1871 * this method will complete with the same error. |
1648 */ | 1872 */ |
1649 async.Future<Teacher> create(Teacher request, core.String courseId) { | 1873 async.Future<Teacher> create(Teacher request, core.String courseId) { |
(...skipping 17 matching lines...) Expand all Loading... |
1667 "POST", | 1891 "POST", |
1668 body: _body, | 1892 body: _body, |
1669 queryParams: _queryParams, | 1893 queryParams: _queryParams, |
1670 uploadOptions: _uploadOptions, | 1894 uploadOptions: _uploadOptions, |
1671 uploadMedia: _uploadMedia, | 1895 uploadMedia: _uploadMedia, |
1672 downloadOptions: _downloadOptions); | 1896 downloadOptions: _downloadOptions); |
1673 return _response.then((data) => new Teacher.fromJson(data)); | 1897 return _response.then((data) => new Teacher.fromJson(data)); |
1674 } | 1898 } |
1675 | 1899 |
1676 /** | 1900 /** |
1677 * Deletes a teacher of a course. This method returns the following error | 1901 * Deletes a teacher of a course. |
1678 * codes: * `PERMISSION_DENIED` if the requesting user is not permitted to | 1902 * |
1679 * delete teachers of this course or for access errors. * `NOT_FOUND` if no | 1903 * This method returns the following error codes: |
1680 * teacher of this course has the requested ID or if the course does not | 1904 * |
1681 * exist. * `FAILED_PRECONDITION` if the requested ID belongs to the primary | 1905 * * `PERMISSION_DENIED` if the requesting user is not permitted to delete |
1682 * teacher of this course. | 1906 * teachers of this course or for access errors. |
| 1907 * * `NOT_FOUND` if no teacher of this course has the requested ID or if the |
| 1908 * course does not exist. |
| 1909 * * `FAILED_PRECONDITION` if the requested ID belongs to the primary teacher |
| 1910 * of this course. |
1683 * | 1911 * |
1684 * Request parameters: | 1912 * Request parameters: |
1685 * | 1913 * |
1686 * [courseId] - Identifier of the course. This identifier can be either the | 1914 * [courseId] - Identifier of the course. |
1687 * Classroom-assigned identifier or an alias. | 1915 * This identifier can be either the Classroom-assigned identifier or an |
| 1916 * alias. |
1688 * | 1917 * |
1689 * [userId] - Identifier of the teacher to delete. The identifier can be one | 1918 * [userId] - Identifier of the teacher to delete. The identifier can be one |
1690 * of the following: * the numeric identifier for the user * the email address | 1919 * of the |
1691 * of the user * the string literal `"me"`, indicating the requesting user | 1920 * following: |
| 1921 * |
| 1922 * * the numeric identifier for the user |
| 1923 * * the email address of the user |
| 1924 * * the string literal `"me"`, indicating the requesting user |
1692 * | 1925 * |
1693 * Completes with a [Empty]. | 1926 * Completes with a [Empty]. |
1694 * | 1927 * |
1695 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1928 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1696 * error. | 1929 * error. |
1697 * | 1930 * |
1698 * If the used [http.Client] completes with an error when making a REST call, | 1931 * If the used [http.Client] completes with an error when making a REST call, |
1699 * this method will complete with the same error. | 1932 * this method will complete with the same error. |
1700 */ | 1933 */ |
1701 async.Future<Empty> delete(core.String courseId, core.String userId) { | 1934 async.Future<Empty> delete(core.String courseId, core.String userId) { |
(...skipping 17 matching lines...) Expand all Loading... |
1719 "DELETE", | 1952 "DELETE", |
1720 body: _body, | 1953 body: _body, |
1721 queryParams: _queryParams, | 1954 queryParams: _queryParams, |
1722 uploadOptions: _uploadOptions, | 1955 uploadOptions: _uploadOptions, |
1723 uploadMedia: _uploadMedia, | 1956 uploadMedia: _uploadMedia, |
1724 downloadOptions: _downloadOptions); | 1957 downloadOptions: _downloadOptions); |
1725 return _response.then((data) => new Empty.fromJson(data)); | 1958 return _response.then((data) => new Empty.fromJson(data)); |
1726 } | 1959 } |
1727 | 1960 |
1728 /** | 1961 /** |
1729 * Returns a teacher of a course. This method returns the following error | 1962 * Returns a teacher of a course. |
1730 * codes: * `PERMISSION_DENIED` if the requesting user is not permitted to | 1963 * |
1731 * view teachers of this course or for access errors. * `NOT_FOUND` if no | 1964 * This method returns the following error codes: |
1732 * teacher of this course has the requested ID or if the course does not | 1965 * |
1733 * exist. | 1966 * * `PERMISSION_DENIED` if the requesting user is not permitted to view |
| 1967 * teachers of this course or for access errors. |
| 1968 * * `NOT_FOUND` if no teacher of this course has the requested ID or if the |
| 1969 * course does not exist. |
1734 * | 1970 * |
1735 * Request parameters: | 1971 * Request parameters: |
1736 * | 1972 * |
1737 * [courseId] - Identifier of the course. This identifier can be either the | 1973 * [courseId] - Identifier of the course. |
1738 * Classroom-assigned identifier or an alias. | 1974 * This identifier can be either the Classroom-assigned identifier or an |
| 1975 * alias. |
1739 * | 1976 * |
1740 * [userId] - Identifier of the teacher to return. The identifier can be one | 1977 * [userId] - Identifier of the teacher to return. The identifier can be one |
1741 * of the following: * the numeric identifier for the user * the email address | 1978 * of the |
1742 * of the user * the string literal `"me"`, indicating the requesting user | 1979 * following: |
| 1980 * |
| 1981 * * the numeric identifier for the user |
| 1982 * * the email address of the user |
| 1983 * * the string literal `"me"`, indicating the requesting user |
1743 * | 1984 * |
1744 * Completes with a [Teacher]. | 1985 * Completes with a [Teacher]. |
1745 * | 1986 * |
1746 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1987 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1747 * error. | 1988 * error. |
1748 * | 1989 * |
1749 * If the used [http.Client] completes with an error when making a REST call, | 1990 * If the used [http.Client] completes with an error when making a REST call, |
1750 * this method will complete with the same error. | 1991 * this method will complete with the same error. |
1751 */ | 1992 */ |
1752 async.Future<Teacher> get(core.String courseId, core.String userId) { | 1993 async.Future<Teacher> get(core.String courseId, core.String userId) { |
(...skipping 17 matching lines...) Expand all Loading... |
1770 "GET", | 2011 "GET", |
1771 body: _body, | 2012 body: _body, |
1772 queryParams: _queryParams, | 2013 queryParams: _queryParams, |
1773 uploadOptions: _uploadOptions, | 2014 uploadOptions: _uploadOptions, |
1774 uploadMedia: _uploadMedia, | 2015 uploadMedia: _uploadMedia, |
1775 downloadOptions: _downloadOptions); | 2016 downloadOptions: _downloadOptions); |
1776 return _response.then((data) => new Teacher.fromJson(data)); | 2017 return _response.then((data) => new Teacher.fromJson(data)); |
1777 } | 2018 } |
1778 | 2019 |
1779 /** | 2020 /** |
1780 * Returns a list of teachers of this course that the requester is permitted | 2021 * Returns a list of teachers of this course that the requester |
1781 * to view. This method returns the following error codes: * `NOT_FOUND` if | 2022 * is permitted to view. |
1782 * the course does not exist. * `PERMISSION_DENIED` for access errors. | 2023 * |
| 2024 * This method returns the following error codes: |
| 2025 * |
| 2026 * * `NOT_FOUND` if the course does not exist. |
| 2027 * * `PERMISSION_DENIED` for access errors. |
1783 * | 2028 * |
1784 * Request parameters: | 2029 * Request parameters: |
1785 * | 2030 * |
1786 * [courseId] - Identifier of the course. This identifier can be either the | 2031 * [courseId] - Identifier of the course. |
1787 * Classroom-assigned identifier or an alias. | 2032 * This identifier can be either the Classroom-assigned identifier or an |
| 2033 * alias. |
1788 * | 2034 * |
1789 * [pageSize] - Maximum number of items to return. Zero means no maximum. The | 2035 * [pageSize] - Maximum number of items to return. Zero means no maximum. |
1790 * server may return fewer than the specified number of results. | |
1791 * | 2036 * |
1792 * [pageToken] - nextPageToken value returned from a previous list call, | 2037 * The server may return fewer than the specified number of results. |
1793 * indicating that the subsequent page of results should be returned. The list | 2038 * |
1794 * request must be otherwise identical to the one that resulted in this token. | 2039 * [pageToken] - nextPageToken |
| 2040 * value returned from a previous |
| 2041 * list call, indicating that |
| 2042 * the subsequent page of results should be returned. |
| 2043 * |
| 2044 * The list request must be |
| 2045 * otherwise identical to the one that resulted in this token. |
1795 * | 2046 * |
1796 * Completes with a [ListTeachersResponse]. | 2047 * Completes with a [ListTeachersResponse]. |
1797 * | 2048 * |
1798 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2049 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1799 * error. | 2050 * error. |
1800 * | 2051 * |
1801 * If the used [http.Client] completes with an error when making a REST call, | 2052 * If the used [http.Client] completes with an error when making a REST call, |
1802 * this method will complete with the same error. | 2053 * this method will complete with the same error. |
1803 */ | 2054 */ |
1804 async.Future<ListTeachersResponse> list(core.String courseId, {core.int pageSi
ze, core.String pageToken}) { | 2055 async.Future<ListTeachersResponse> list(core.String courseId, {core.int pageSi
ze, core.String pageToken}) { |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1836 | 2087 |
1837 class InvitationsResourceApi { | 2088 class InvitationsResourceApi { |
1838 final commons.ApiRequester _requester; | 2089 final commons.ApiRequester _requester; |
1839 | 2090 |
1840 InvitationsResourceApi(commons.ApiRequester client) : | 2091 InvitationsResourceApi(commons.ApiRequester client) : |
1841 _requester = client; | 2092 _requester = client; |
1842 | 2093 |
1843 /** | 2094 /** |
1844 * Accepts an invitation, removing it and adding the invited user to the | 2095 * Accepts an invitation, removing it and adding the invited user to the |
1845 * teachers or students (as appropriate) of the specified course. Only the | 2096 * teachers or students (as appropriate) of the specified course. Only the |
1846 * invited user may accept an invitation. This method returns the following | 2097 * invited user may accept an invitation. |
1847 * error codes: * `PERMISSION_DENIED` if the requesting user is not permitted | 2098 * |
1848 * to accept the requested invitation or for access errors. * | 2099 * This method returns the following error codes: |
1849 * `FAILED_PRECONDITION` for the following request errors: * | 2100 * |
1850 * CourseMemberLimitReached * CourseNotModifiable * CourseTeacherLimitReached | 2101 * * `PERMISSION_DENIED` if the requesting user is not permitted to accept the |
1851 * * UserGroupsMembershipLimitReached * `NOT_FOUND` if no invitation exists | 2102 * requested invitation or for access errors. |
1852 * with the requested ID. | 2103 * * `FAILED_PRECONDITION` for the following request errors: |
| 2104 * * CourseMemberLimitReached |
| 2105 * * CourseNotModifiable |
| 2106 * * CourseTeacherLimitReached |
| 2107 * * UserGroupsMembershipLimitReached |
| 2108 * * `NOT_FOUND` if no invitation exists with the requested ID. |
1853 * | 2109 * |
1854 * Request parameters: | 2110 * Request parameters: |
1855 * | 2111 * |
1856 * [id] - Identifier of the invitation to accept. | 2112 * [id] - Identifier of the invitation to accept. |
1857 * | 2113 * |
1858 * Completes with a [Empty]. | 2114 * Completes with a [Empty]. |
1859 * | 2115 * |
1860 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2116 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1861 * error. | 2117 * error. |
1862 * | 2118 * |
(...skipping 19 matching lines...) Expand all Loading... |
1882 body: _body, | 2138 body: _body, |
1883 queryParams: _queryParams, | 2139 queryParams: _queryParams, |
1884 uploadOptions: _uploadOptions, | 2140 uploadOptions: _uploadOptions, |
1885 uploadMedia: _uploadMedia, | 2141 uploadMedia: _uploadMedia, |
1886 downloadOptions: _downloadOptions); | 2142 downloadOptions: _downloadOptions); |
1887 return _response.then((data) => new Empty.fromJson(data)); | 2143 return _response.then((data) => new Empty.fromJson(data)); |
1888 } | 2144 } |
1889 | 2145 |
1890 /** | 2146 /** |
1891 * Creates an invitation. Only one invitation for a user and course may exist | 2147 * Creates an invitation. Only one invitation for a user and course may exist |
1892 * at a time. Delete and re-create an invitation to make changes. This method | 2148 * at a time. Delete and re-create an invitation to make changes. |
1893 * returns the following error codes: * `PERMISSION_DENIED` if the requesting | 2149 * |
1894 * user is not permitted to create invitations for this course or for access | 2150 * This method returns the following error codes: |
1895 * errors. * `NOT_FOUND` if the course or the user does not exist. * | 2151 * |
1896 * `FAILED_PRECONDITION` if the requested user's account is disabled or if the | 2152 * * `PERMISSION_DENIED` if the requesting user is not permitted to create |
1897 * user already has this role or a role with greater permissions. * | 2153 * invitations for this course or for access errors. |
1898 * `ALREADY_EXISTS` if an invitation for the specified user and course already | 2154 * * `NOT_FOUND` if the course or the user does not exist. |
1899 * exists. | 2155 * * `FAILED_PRECONDITION` if the requested user's account is disabled or if |
| 2156 * the user already has this role or a role with greater permissions. |
| 2157 * * `ALREADY_EXISTS` if an invitation for the specified user and course |
| 2158 * already exists. |
1900 * | 2159 * |
1901 * [request] - The metadata request object. | 2160 * [request] - The metadata request object. |
1902 * | 2161 * |
1903 * Request parameters: | 2162 * Request parameters: |
1904 * | 2163 * |
1905 * Completes with a [Invitation]. | 2164 * Completes with a [Invitation]. |
1906 * | 2165 * |
1907 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2166 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1908 * error. | 2167 * error. |
1909 * | 2168 * |
(...skipping 18 matching lines...) Expand all Loading... |
1928 "POST", | 2187 "POST", |
1929 body: _body, | 2188 body: _body, |
1930 queryParams: _queryParams, | 2189 queryParams: _queryParams, |
1931 uploadOptions: _uploadOptions, | 2190 uploadOptions: _uploadOptions, |
1932 uploadMedia: _uploadMedia, | 2191 uploadMedia: _uploadMedia, |
1933 downloadOptions: _downloadOptions); | 2192 downloadOptions: _downloadOptions); |
1934 return _response.then((data) => new Invitation.fromJson(data)); | 2193 return _response.then((data) => new Invitation.fromJson(data)); |
1935 } | 2194 } |
1936 | 2195 |
1937 /** | 2196 /** |
1938 * Deletes an invitation. This method returns the following error codes: * | 2197 * Deletes an invitation. |
1939 * `PERMISSION_DENIED` if the requesting user is not permitted to delete the | 2198 * |
1940 * requested invitation or for access errors. * `NOT_FOUND` if no invitation | 2199 * This method returns the following error codes: |
1941 * exists with the requested ID. | 2200 * |
| 2201 * * `PERMISSION_DENIED` if the requesting user is not permitted to delete the |
| 2202 * requested invitation or for access errors. |
| 2203 * * `NOT_FOUND` if no invitation exists with the requested ID. |
1942 * | 2204 * |
1943 * Request parameters: | 2205 * Request parameters: |
1944 * | 2206 * |
1945 * [id] - Identifier of the invitation to delete. | 2207 * [id] - Identifier of the invitation to delete. |
1946 * | 2208 * |
1947 * Completes with a [Empty]. | 2209 * Completes with a [Empty]. |
1948 * | 2210 * |
1949 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2211 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1950 * error. | 2212 * error. |
1951 * | 2213 * |
(...skipping 18 matching lines...) Expand all Loading... |
1970 "DELETE", | 2232 "DELETE", |
1971 body: _body, | 2233 body: _body, |
1972 queryParams: _queryParams, | 2234 queryParams: _queryParams, |
1973 uploadOptions: _uploadOptions, | 2235 uploadOptions: _uploadOptions, |
1974 uploadMedia: _uploadMedia, | 2236 uploadMedia: _uploadMedia, |
1975 downloadOptions: _downloadOptions); | 2237 downloadOptions: _downloadOptions); |
1976 return _response.then((data) => new Empty.fromJson(data)); | 2238 return _response.then((data) => new Empty.fromJson(data)); |
1977 } | 2239 } |
1978 | 2240 |
1979 /** | 2241 /** |
1980 * Returns an invitation. This method returns the following error codes: * | 2242 * Returns an invitation. |
1981 * `PERMISSION_DENIED` if the requesting user is not permitted to view the | 2243 * |
1982 * requested invitation or for access errors. * `NOT_FOUND` if no invitation | 2244 * This method returns the following error codes: |
1983 * exists with the requested ID. | 2245 * |
| 2246 * * `PERMISSION_DENIED` if the requesting user is not permitted to view the |
| 2247 * requested invitation or for access errors. |
| 2248 * * `NOT_FOUND` if no invitation exists with the requested ID. |
1984 * | 2249 * |
1985 * Request parameters: | 2250 * Request parameters: |
1986 * | 2251 * |
1987 * [id] - Identifier of the invitation to return. | 2252 * [id] - Identifier of the invitation to return. |
1988 * | 2253 * |
1989 * Completes with a [Invitation]. | 2254 * Completes with a [Invitation]. |
1990 * | 2255 * |
1991 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2256 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1992 * error. | 2257 * error. |
1993 * | 2258 * |
(...skipping 19 matching lines...) Expand all Loading... |
2013 body: _body, | 2278 body: _body, |
2014 queryParams: _queryParams, | 2279 queryParams: _queryParams, |
2015 uploadOptions: _uploadOptions, | 2280 uploadOptions: _uploadOptions, |
2016 uploadMedia: _uploadMedia, | 2281 uploadMedia: _uploadMedia, |
2017 downloadOptions: _downloadOptions); | 2282 downloadOptions: _downloadOptions); |
2018 return _response.then((data) => new Invitation.fromJson(data)); | 2283 return _response.then((data) => new Invitation.fromJson(data)); |
2019 } | 2284 } |
2020 | 2285 |
2021 /** | 2286 /** |
2022 * Returns a list of invitations that the requesting user is permitted to | 2287 * Returns a list of invitations that the requesting user is permitted to |
2023 * view, restricted to those that match the list request. *Note:* At least one | 2288 * view, restricted to those that match the list request. |
2024 * of `user_id` or `course_id` must be supplied. Both fields can be supplied. | 2289 * |
2025 * This method returns the following error codes: * `PERMISSION_DENIED` for | 2290 * *Note:* At least one of `user_id` or `course_id` must be supplied. Both |
2026 * access errors. | 2291 * fields can be supplied. |
| 2292 * |
| 2293 * This method returns the following error codes: |
| 2294 * |
| 2295 * * `PERMISSION_DENIED` for access errors. |
2027 * | 2296 * |
2028 * Request parameters: | 2297 * Request parameters: |
2029 * | 2298 * |
| 2299 * [courseId] - Restricts returned invitations to those for a course with the |
| 2300 * specified |
| 2301 * identifier. |
| 2302 * |
| 2303 * [pageSize] - Maximum number of items to return. Zero means no maximum. |
| 2304 * |
| 2305 * The server may return fewer than the specified number of results. |
| 2306 * |
2030 * [userId] - Restricts returned invitations to those for a specific user. The | 2307 * [userId] - Restricts returned invitations to those for a specific user. The |
2031 * identifier can be one of the following: * the numeric identifier for the | 2308 * identifier |
2032 * user * the email address of the user * the string literal `"me"`, | 2309 * can be one of the following: |
2033 * indicating the requesting user | |
2034 * | 2310 * |
2035 * [courseId] - Restricts returned invitations to those for a course with the | 2311 * * the numeric identifier for the user |
2036 * specified identifier. | 2312 * * the email address of the user |
| 2313 * * the string literal `"me"`, indicating the requesting user |
2037 * | 2314 * |
2038 * [pageSize] - Maximum number of items to return. Zero means no maximum. The | 2315 * [pageToken] - nextPageToken |
2039 * server may return fewer than the specified number of results. | 2316 * value returned from a previous |
| 2317 * list call, indicating |
| 2318 * that the subsequent page of results should be returned. |
2040 * | 2319 * |
2041 * [pageToken] - nextPageToken value returned from a previous list call, | 2320 * The list request must be |
2042 * indicating that the subsequent page of results should be returned. The list | 2321 * otherwise identical to the one that resulted in this token. |
2043 * request must be otherwise identical to the one that resulted in this token. | |
2044 * | 2322 * |
2045 * Completes with a [ListInvitationsResponse]. | 2323 * Completes with a [ListInvitationsResponse]. |
2046 * | 2324 * |
2047 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2325 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2048 * error. | 2326 * error. |
2049 * | 2327 * |
2050 * If the used [http.Client] completes with an error when making a REST call, | 2328 * If the used [http.Client] completes with an error when making a REST call, |
2051 * this method will complete with the same error. | 2329 * this method will complete with the same error. |
2052 */ | 2330 */ |
2053 async.Future<ListInvitationsResponse> list({core.String userId, core.String co
urseId, core.int pageSize, core.String pageToken}) { | 2331 async.Future<ListInvitationsResponse> list({core.String courseId, core.int pag
eSize, core.String userId, core.String pageToken}) { |
2054 var _url = null; | 2332 var _url = null; |
2055 var _queryParams = new core.Map(); | 2333 var _queryParams = new core.Map(); |
2056 var _uploadMedia = null; | 2334 var _uploadMedia = null; |
2057 var _uploadOptions = null; | 2335 var _uploadOptions = null; |
2058 var _downloadOptions = commons.DownloadOptions.Metadata; | 2336 var _downloadOptions = commons.DownloadOptions.Metadata; |
2059 var _body = null; | 2337 var _body = null; |
2060 | 2338 |
2061 if (userId != null) { | |
2062 _queryParams["userId"] = [userId]; | |
2063 } | |
2064 if (courseId != null) { | 2339 if (courseId != null) { |
2065 _queryParams["courseId"] = [courseId]; | 2340 _queryParams["courseId"] = [courseId]; |
2066 } | 2341 } |
2067 if (pageSize != null) { | 2342 if (pageSize != null) { |
2068 _queryParams["pageSize"] = ["${pageSize}"]; | 2343 _queryParams["pageSize"] = ["${pageSize}"]; |
2069 } | 2344 } |
| 2345 if (userId != null) { |
| 2346 _queryParams["userId"] = [userId]; |
| 2347 } |
2070 if (pageToken != null) { | 2348 if (pageToken != null) { |
2071 _queryParams["pageToken"] = [pageToken]; | 2349 _queryParams["pageToken"] = [pageToken]; |
2072 } | 2350 } |
2073 | 2351 |
2074 _url = 'v1/invitations'; | 2352 _url = 'v1/invitations'; |
2075 | 2353 |
2076 var _response = _requester.request(_url, | 2354 var _response = _requester.request(_url, |
2077 "GET", | 2355 "GET", |
2078 body: _body, | 2356 body: _body, |
2079 queryParams: _queryParams, | 2357 queryParams: _queryParams, |
2080 uploadOptions: _uploadOptions, | 2358 uploadOptions: _uploadOptions, |
2081 uploadMedia: _uploadMedia, | 2359 uploadMedia: _uploadMedia, |
2082 downloadOptions: _downloadOptions); | 2360 downloadOptions: _downloadOptions); |
2083 return _response.then((data) => new ListInvitationsResponse.fromJson(data)); | 2361 return _response.then((data) => new ListInvitationsResponse.fromJson(data)); |
2084 } | 2362 } |
2085 | 2363 |
2086 } | 2364 } |
2087 | 2365 |
2088 | 2366 |
2089 class UserProfilesResourceApi { | 2367 class UserProfilesResourceApi { |
2090 final commons.ApiRequester _requester; | 2368 final commons.ApiRequester _requester; |
2091 | 2369 |
2092 UserProfilesGuardianInvitationsResourceApi get guardianInvitations => new User
ProfilesGuardianInvitationsResourceApi(_requester); | 2370 UserProfilesGuardianInvitationsResourceApi get guardianInvitations => new User
ProfilesGuardianInvitationsResourceApi(_requester); |
2093 UserProfilesGuardiansResourceApi get guardians => new UserProfilesGuardiansRes
ourceApi(_requester); | 2371 UserProfilesGuardiansResourceApi get guardians => new UserProfilesGuardiansRes
ourceApi(_requester); |
2094 | 2372 |
2095 UserProfilesResourceApi(commons.ApiRequester client) : | 2373 UserProfilesResourceApi(commons.ApiRequester client) : |
2096 _requester = client; | 2374 _requester = client; |
2097 | 2375 |
2098 /** | 2376 /** |
2099 * Returns a user profile. This method returns the following error codes: * | 2377 * Returns a user profile. |
2100 * `PERMISSION_DENIED` if the requesting user is not permitted to access this | 2378 * |
2101 * user profile, if no profile exists with the requested ID, or for access | 2379 * This method returns the following error codes: |
2102 * errors. | 2380 * |
| 2381 * * `PERMISSION_DENIED` if the requesting user is not permitted to access |
| 2382 * this user profile, if no profile exists with the requested ID, or for |
| 2383 * access errors. |
2103 * | 2384 * |
2104 * Request parameters: | 2385 * Request parameters: |
2105 * | 2386 * |
2106 * [userId] - Identifier of the profile to return. The identifier can be one | 2387 * [userId] - Identifier of the profile to return. The identifier can be one |
2107 * of the following: * the numeric identifier for the user * the email address | 2388 * of the |
2108 * of the user * the string literal `"me"`, indicating the requesting user | 2389 * following: |
| 2390 * |
| 2391 * * the numeric identifier for the user |
| 2392 * * the email address of the user |
| 2393 * * the string literal `"me"`, indicating the requesting user |
2109 * | 2394 * |
2110 * Completes with a [UserProfile]. | 2395 * Completes with a [UserProfile]. |
2111 * | 2396 * |
2112 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2397 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2113 * error. | 2398 * error. |
2114 * | 2399 * |
2115 * If the used [http.Client] completes with an error when making a REST call, | 2400 * If the used [http.Client] completes with an error when making a REST call, |
2116 * this method will complete with the same error. | 2401 * this method will complete with the same error. |
2117 */ | 2402 */ |
2118 async.Future<UserProfile> get(core.String userId) { | 2403 async.Future<UserProfile> get(core.String userId) { |
(...skipping 24 matching lines...) Expand all Loading... |
2143 | 2428 |
2144 | 2429 |
2145 class UserProfilesGuardianInvitationsResourceApi { | 2430 class UserProfilesGuardianInvitationsResourceApi { |
2146 final commons.ApiRequester _requester; | 2431 final commons.ApiRequester _requester; |
2147 | 2432 |
2148 UserProfilesGuardianInvitationsResourceApi(commons.ApiRequester client) : | 2433 UserProfilesGuardianInvitationsResourceApi(commons.ApiRequester client) : |
2149 _requester = client; | 2434 _requester = client; |
2150 | 2435 |
2151 /** | 2436 /** |
2152 * Creates a guardian invitation, and sends an email to the guardian asking | 2437 * Creates a guardian invitation, and sends an email to the guardian asking |
2153 * them to confirm that they are the student's guardian. Once the guardian | 2438 * them to confirm that they are the student's guardian. |
2154 * accepts the invitation, their `state` will change to `COMPLETED` and they | 2439 * |
2155 * will start receiving guardian notifications. A `Guardian` resource will | 2440 * Once the guardian accepts the invitation, their `state` will change to |
2156 * also be created to represent the active guardian. The request object must | 2441 * `COMPLETED` and they will start receiving guardian notifications. A |
2157 * have the `student_id` and `invited_email_address` fields set. Failing to | 2442 * `Guardian` resource will also be created to represent the active guardian. |
2158 * set these fields, or setting any other fields in the request, will result | 2443 * |
2159 * in an error. This method returns the following error codes: * | 2444 * The request object must have the `student_id` and |
2160 * `PERMISSION_DENIED` if the current user does not have permission to manage | 2445 * `invited_email_address` fields set. Failing to set these fields, or |
2161 * guardians, if the guardian in question has already rejected too many | 2446 * setting any other fields in the request, will result in an error. |
2162 * requests for that student, if guardians are not enabled for the domain in | 2447 * |
2163 * question, or for other access errors. * `RESOURCE_EXHAUSTED` if the student | 2448 * This method returns the following error codes: |
2164 * or guardian has exceeded the guardian link limit. * `INVALID_ARGUMENT` if | 2449 * |
2165 * the guardian email address is not valid (for example, if it is too long), | 2450 * * `PERMISSION_DENIED` if the current user does not have permission to |
2166 * or if the format of the student ID provided cannot be recognized (it is not | 2451 * manage guardians, if the guardian in question has already rejected |
2167 * an email address, nor a `user_id` from this API). This error will also be | 2452 * too many requests for that student, if guardians are not enabled for the |
2168 * returned if read-only fields are set, or if the `state` field is set to to | 2453 * domain in question, or for other access errors. |
2169 * a value other than `PENDING`. * `NOT_FOUND` if the student ID provided is a | 2454 * * `RESOURCE_EXHAUSTED` if the student or guardian has exceeded the guardian |
2170 * valid student ID, but Classroom has no record of that student. * | 2455 * link limit. |
2171 * `ALREADY_EXISTS` if there is already a pending guardian invitation for the | 2456 * * `INVALID_ARGUMENT` if the guardian email address is not valid (for |
2172 * student and `invited_email_address` provided, or if the provided | 2457 * example, if it is too long), or if the format of the student ID provided |
2173 * `invited_email_address` matches the Google account of an existing | 2458 * cannot be recognized (it is not an email address, nor a `user_id` from |
2174 * `Guardian` for this user. | 2459 * this API). This error will also be returned if read-only fields are set, |
| 2460 * or if the `state` field is set to to a value other than `PENDING`. |
| 2461 * * `NOT_FOUND` if the student ID provided is a valid student ID, but |
| 2462 * Classroom has no record of that student. |
| 2463 * * `ALREADY_EXISTS` if there is already a pending guardian invitation for |
| 2464 * the student and `invited_email_address` provided, or if the provided |
| 2465 * `invited_email_address` matches the Google account of an existing |
| 2466 * `Guardian` for this user. |
2175 * | 2467 * |
2176 * [request] - The metadata request object. | 2468 * [request] - The metadata request object. |
2177 * | 2469 * |
2178 * Request parameters: | 2470 * Request parameters: |
2179 * | 2471 * |
2180 * [studentId] - ID of the student (in standard format) | 2472 * [studentId] - ID of the student (in standard format) |
2181 * | 2473 * |
2182 * Completes with a [GuardianInvitation]. | 2474 * Completes with a [GuardianInvitation]. |
2183 * | 2475 * |
2184 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2476 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
(...skipping 23 matching lines...) Expand all Loading... |
2208 "POST", | 2500 "POST", |
2209 body: _body, | 2501 body: _body, |
2210 queryParams: _queryParams, | 2502 queryParams: _queryParams, |
2211 uploadOptions: _uploadOptions, | 2503 uploadOptions: _uploadOptions, |
2212 uploadMedia: _uploadMedia, | 2504 uploadMedia: _uploadMedia, |
2213 downloadOptions: _downloadOptions); | 2505 downloadOptions: _downloadOptions); |
2214 return _response.then((data) => new GuardianInvitation.fromJson(data)); | 2506 return _response.then((data) => new GuardianInvitation.fromJson(data)); |
2215 } | 2507 } |
2216 | 2508 |
2217 /** | 2509 /** |
2218 * Returns a specific guardian invitation. This method returns the following | 2510 * Returns a specific guardian invitation. |
2219 * error codes: * `PERMISSION_DENIED` if the requesting user is not permitted | 2511 * |
2220 * to view guardian invitations for the student identified by the | 2512 * This method returns the following error codes: |
2221 * `student_id`, if guardians are not enabled for the domain in question, or | 2513 * |
2222 * for other access errors. * `INVALID_ARGUMENT` if a `student_id` is | 2514 * * `PERMISSION_DENIED` if the requesting user is not permitted to view |
2223 * specified, but its format cannot be recognized (it is not an email address, | 2515 * guardian invitations for the student identified by the `student_id`, if |
2224 * nor a `student_id` from the API, nor the literal string `me`). * | 2516 * guardians are not enabled for the domain in question, or for other |
2225 * `NOT_FOUND` if Classroom cannot find any record of the given student or | 2517 * access errors. |
2226 * `invitation_id`. May also be returned if the student exists, but the | 2518 * * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot |
2227 * requesting user does not have access to see that student. | 2519 * be recognized (it is not an email address, nor a `student_id` from the |
| 2520 * API, nor the literal string `me`). |
| 2521 * * `NOT_FOUND` if Classroom cannot find any record of the given student or |
| 2522 * `invitation_id`. May also be returned if the student exists, but the |
| 2523 * requesting user does not have access to see that student. |
2228 * | 2524 * |
2229 * Request parameters: | 2525 * Request parameters: |
2230 * | 2526 * |
2231 * [studentId] - The ID of the student whose guardian invitation is being | 2527 * [studentId] - The ID of the student whose guardian invitation is being |
2232 * requested. | 2528 * requested. |
2233 * | 2529 * |
2234 * [invitationId] - The `id` field of the `GuardianInvitation` being | 2530 * [invitationId] - The `id` field of the `GuardianInvitation` being |
2235 * requested. | 2531 * requested. |
2236 * | 2532 * |
2237 * Completes with a [GuardianInvitation]. | 2533 * Completes with a [GuardianInvitation]. |
(...skipping 26 matching lines...) Expand all Loading... |
2264 body: _body, | 2560 body: _body, |
2265 queryParams: _queryParams, | 2561 queryParams: _queryParams, |
2266 uploadOptions: _uploadOptions, | 2562 uploadOptions: _uploadOptions, |
2267 uploadMedia: _uploadMedia, | 2563 uploadMedia: _uploadMedia, |
2268 downloadOptions: _downloadOptions); | 2564 downloadOptions: _downloadOptions); |
2269 return _response.then((data) => new GuardianInvitation.fromJson(data)); | 2565 return _response.then((data) => new GuardianInvitation.fromJson(data)); |
2270 } | 2566 } |
2271 | 2567 |
2272 /** | 2568 /** |
2273 * Returns a list of guardian invitations that the requesting user is | 2569 * Returns a list of guardian invitations that the requesting user is |
2274 * permitted to view, filtered by the parameters provided. This method returns | 2570 * permitted to view, filtered by the parameters provided. |
2275 * the following error codes: * `PERMISSION_DENIED` if a `student_id` is | 2571 * |
2276 * specified, and the requesting user is not permitted to view guardian | 2572 * This method returns the following error codes: |
2277 * invitations for that student, if `"-"` is specified as the `student_id` and | 2573 * |
2278 * the user is not a domain administrator, if guardians are not enabled for | 2574 * * `PERMISSION_DENIED` if a `student_id` is specified, and the requesting |
2279 * the domain in question, or for other access errors. * `INVALID_ARGUMENT` if | 2575 * user is not permitted to view guardian invitations for that student, if |
2280 * a `student_id` is specified, but its format cannot be recognized (it is not | 2576 * `"-"` is specified as the `student_id` and the user is not a domain |
2281 * an email address, nor a `student_id` from the API, nor the literal string | 2577 * administrator, if guardians are not enabled for the domain in question, |
2282 * `me`). May also be returned if an invalid `page_token` or `state` is | 2578 * or for other access errors. |
2283 * provided. * `NOT_FOUND` if a `student_id` is specified, and its format can | 2579 * * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot |
2284 * be recognized, but Classroom has no record of that student. | 2580 * be recognized (it is not an email address, nor a `student_id` from the |
| 2581 * API, nor the literal string `me`). May also be returned if an invalid |
| 2582 * `page_token` or `state` is provided. |
| 2583 * * `NOT_FOUND` if a `student_id` is specified, and its format can be |
| 2584 * recognized, but Classroom has no record of that student. |
2285 * | 2585 * |
2286 * Request parameters: | 2586 * Request parameters: |
2287 * | 2587 * |
2288 * [studentId] - The ID of the student whose guardian invitations are to be | 2588 * [studentId] - The ID of the student whose guardian invitations are to be |
2289 * returned. The identifier can be one of the following: * the numeric | 2589 * returned. |
2290 * identifier for the user * the email address of the user * the string | 2590 * The identifier can be one of the following: |
2291 * literal `"me"`, indicating the requesting user * the string literal `"-"`, | 2591 * |
2292 * indicating that results should be returned for all students that the | 2592 * * the numeric identifier for the user |
2293 * requesting user is permitted to view guardian invitations. | 2593 * * the email address of the user |
| 2594 * * the string literal `"me"`, indicating the requesting user |
| 2595 * * the string literal `"-"`, indicating that results should be returned for |
| 2596 * all students that the requesting user is permitted to view guardian |
| 2597 * invitations. |
| 2598 * |
| 2599 * [pageSize] - Maximum number of items to return. Zero or unspecified |
| 2600 * indicates that the |
| 2601 * server may assign a maximum. |
| 2602 * |
| 2603 * The server may return fewer than the specified number of results. |
2294 * | 2604 * |
2295 * [invitedEmailAddress] - If specified, only results with the specified | 2605 * [invitedEmailAddress] - If specified, only results with the specified |
2296 * `invited_email_address` will be returned. | 2606 * `invited_email_address` |
| 2607 * will be returned. |
2297 * | 2608 * |
2298 * [states] - If specified, only results with the specified `state` values | 2609 * [states] - If specified, only results with the specified `state` values |
2299 * will be returned. Otherwise, results with a `state` of `PENDING` will be | 2610 * will be |
2300 * returned. | 2611 * returned. Otherwise, results with a `state` of `PENDING` will be returned. |
2301 * | 2612 * |
2302 * [pageToken] - nextPageToken value returned from a previous list call, | 2613 * [pageToken] - nextPageToken |
2303 * indicating that the subsequent page of results should be returned. The list | 2614 * value returned from a previous |
2304 * request must be otherwise identical to the one that resulted in this token. | 2615 * list call, |
| 2616 * indicating that the subsequent page of results should be returned. |
2305 * | 2617 * |
2306 * [pageSize] - Maximum number of items to return. Zero or unspecified | 2618 * The list request |
2307 * indicates that the server may assign a maximum. The server may return fewer | 2619 * must be otherwise identical to the one that resulted in this token. |
2308 * than the specified number of results. | |
2309 * | 2620 * |
2310 * Completes with a [ListGuardianInvitationsResponse]. | 2621 * Completes with a [ListGuardianInvitationsResponse]. |
2311 * | 2622 * |
2312 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2623 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2313 * error. | 2624 * error. |
2314 * | 2625 * |
2315 * If the used [http.Client] completes with an error when making a REST call, | 2626 * If the used [http.Client] completes with an error when making a REST call, |
2316 * this method will complete with the same error. | 2627 * this method will complete with the same error. |
2317 */ | 2628 */ |
2318 async.Future<ListGuardianInvitationsResponse> list(core.String studentId, {cor
e.String invitedEmailAddress, core.List<core.String> states, core.String pageTok
en, core.int pageSize}) { | 2629 async.Future<ListGuardianInvitationsResponse> list(core.String studentId, {cor
e.int pageSize, core.String invitedEmailAddress, core.List<core.String> states,
core.String pageToken}) { |
2319 var _url = null; | 2630 var _url = null; |
2320 var _queryParams = new core.Map(); | 2631 var _queryParams = new core.Map(); |
2321 var _uploadMedia = null; | 2632 var _uploadMedia = null; |
2322 var _uploadOptions = null; | 2633 var _uploadOptions = null; |
2323 var _downloadOptions = commons.DownloadOptions.Metadata; | 2634 var _downloadOptions = commons.DownloadOptions.Metadata; |
2324 var _body = null; | 2635 var _body = null; |
2325 | 2636 |
2326 if (studentId == null) { | 2637 if (studentId == null) { |
2327 throw new core.ArgumentError("Parameter studentId is required."); | 2638 throw new core.ArgumentError("Parameter studentId is required."); |
2328 } | 2639 } |
| 2640 if (pageSize != null) { |
| 2641 _queryParams["pageSize"] = ["${pageSize}"]; |
| 2642 } |
2329 if (invitedEmailAddress != null) { | 2643 if (invitedEmailAddress != null) { |
2330 _queryParams["invitedEmailAddress"] = [invitedEmailAddress]; | 2644 _queryParams["invitedEmailAddress"] = [invitedEmailAddress]; |
2331 } | 2645 } |
2332 if (states != null) { | 2646 if (states != null) { |
2333 _queryParams["states"] = states; | 2647 _queryParams["states"] = states; |
2334 } | 2648 } |
2335 if (pageToken != null) { | 2649 if (pageToken != null) { |
2336 _queryParams["pageToken"] = [pageToken]; | 2650 _queryParams["pageToken"] = [pageToken]; |
2337 } | 2651 } |
2338 if (pageSize != null) { | |
2339 _queryParams["pageSize"] = ["${pageSize}"]; | |
2340 } | |
2341 | 2652 |
2342 _url = 'v1/userProfiles/' + commons.Escaper.ecapeVariable('$studentId') + '/
guardianInvitations'; | 2653 _url = 'v1/userProfiles/' + commons.Escaper.ecapeVariable('$studentId') + '/
guardianInvitations'; |
2343 | 2654 |
2344 var _response = _requester.request(_url, | 2655 var _response = _requester.request(_url, |
2345 "GET", | 2656 "GET", |
2346 body: _body, | 2657 body: _body, |
2347 queryParams: _queryParams, | 2658 queryParams: _queryParams, |
2348 uploadOptions: _uploadOptions, | 2659 uploadOptions: _uploadOptions, |
2349 uploadMedia: _uploadMedia, | 2660 uploadMedia: _uploadMedia, |
2350 downloadOptions: _downloadOptions); | 2661 downloadOptions: _downloadOptions); |
2351 return _response.then((data) => new ListGuardianInvitationsResponse.fromJson
(data)); | 2662 return _response.then((data) => new ListGuardianInvitationsResponse.fromJson
(data)); |
2352 } | 2663 } |
2353 | 2664 |
2354 /** | 2665 /** |
2355 * Modifies a guardian invitation. Currently, the only valid modification is | 2666 * Modifies a guardian invitation. |
2356 * to change the `state` from `PENDING` to `COMPLETE`. This has the effect of | 2667 * |
2357 * withdrawing the invitation. This method returns the following error codes: | 2668 * Currently, the only valid modification is to change the `state` from |
| 2669 * `PENDING` to `COMPLETE`. This has the effect of withdrawing the invitation. |
| 2670 * |
| 2671 * This method returns the following error codes: |
| 2672 * |
2358 * * `PERMISSION_DENIED` if the current user does not have permission to | 2673 * * `PERMISSION_DENIED` if the current user does not have permission to |
2359 * manage guardians, if guardians are not enabled for the domain in question | 2674 * manage guardians, if guardians are not enabled for the domain in question |
2360 * or for other access errors. * `FAILED_PRECONDITION` if the guardian link is | 2675 * or for other access errors. |
2361 * not in the `PENDING` state. * `INVALID_ARGUMENT` if the format of the | 2676 * * `FAILED_PRECONDITION` if the guardian link is not in the `PENDING` state. |
2362 * student ID provided cannot be recognized (it is not an email address, nor a | 2677 * * `INVALID_ARGUMENT` if the format of the student ID provided |
2363 * `user_id` from this API), or if the passed `GuardianInvitation` has a | 2678 * cannot be recognized (it is not an email address, nor a `user_id` from |
2364 * `state` other than `COMPLETE`, or if it modifies fields other than `state`. | 2679 * this API), or if the passed `GuardianInvitation` has a `state` other than |
| 2680 * `COMPLETE`, or if it modifies fields other than `state`. |
2365 * * `NOT_FOUND` if the student ID provided is a valid student ID, but | 2681 * * `NOT_FOUND` if the student ID provided is a valid student ID, but |
2366 * Classroom has no record of that student, or if the `id` field does not | 2682 * Classroom has no record of that student, or if the `id` field does not |
2367 * refer to a guardian invitation known to Classroom. | 2683 * refer to a guardian invitation known to Classroom. |
2368 * | 2684 * |
2369 * [request] - The metadata request object. | 2685 * [request] - The metadata request object. |
2370 * | 2686 * |
2371 * Request parameters: | 2687 * Request parameters: |
2372 * | 2688 * |
2373 * [studentId] - The ID of the student whose guardian invitation is to be | 2689 * [studentId] - The ID of the student whose guardian invitation is to be |
2374 * modified. | 2690 * modified. |
2375 * | 2691 * |
2376 * [invitationId] - The `id` field of the `GuardianInvitation` to be modified. | 2692 * [invitationId] - The `id` field of the `GuardianInvitation` to be modified. |
2377 * | 2693 * |
2378 * [updateMask] - Mask that identifies which fields on the course to update. | 2694 * [updateMask] - Mask that identifies which fields on the course to update. |
2379 * This field is required to do an update. The update will fail if invalid | 2695 * This field is required to do an update. The update will fail if invalid |
2380 * fields are specified. The following fields are valid: * `state` When set in | 2696 * fields are specified. The following fields are valid: |
2381 * a query parameter, this field should be specified as `updateMask=,,...` | 2697 * |
| 2698 * * `state` |
| 2699 * |
| 2700 * When set in a query parameter, this field should be specified as |
| 2701 * |
| 2702 * `updateMask=<field1>,<field2>,...` |
2382 * | 2703 * |
2383 * Completes with a [GuardianInvitation]. | 2704 * Completes with a [GuardianInvitation]. |
2384 * | 2705 * |
2385 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2706 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2386 * error. | 2707 * error. |
2387 * | 2708 * |
2388 * If the used [http.Client] completes with an error when making a REST call, | 2709 * If the used [http.Client] completes with an error when making a REST call, |
2389 * this method will complete with the same error. | 2710 * this method will complete with the same error. |
2390 */ | 2711 */ |
2391 async.Future<GuardianInvitation> patch(GuardianInvitation request, core.String
studentId, core.String invitationId, {core.String updateMask}) { | 2712 async.Future<GuardianInvitation> patch(GuardianInvitation request, core.String
studentId, core.String invitationId, {core.String updateMask}) { |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2424 } | 2745 } |
2425 | 2746 |
2426 | 2747 |
2427 class UserProfilesGuardiansResourceApi { | 2748 class UserProfilesGuardiansResourceApi { |
2428 final commons.ApiRequester _requester; | 2749 final commons.ApiRequester _requester; |
2429 | 2750 |
2430 UserProfilesGuardiansResourceApi(commons.ApiRequester client) : | 2751 UserProfilesGuardiansResourceApi(commons.ApiRequester client) : |
2431 _requester = client; | 2752 _requester = client; |
2432 | 2753 |
2433 /** | 2754 /** |
2434 * Deletes a guardian. The guardian will no longer receive guardian | 2755 * Deletes a guardian. |
2435 * notifications and the guardian will no longer be accessible via the API. | 2756 * |
2436 * This method returns the following error codes: * `PERMISSION_DENIED` if no | 2757 * The guardian will no longer receive guardian notifications and the guardian |
2437 * user that matches the provided `student_id` is visible to the requesting | 2758 * will no longer be accessible via the API. |
2438 * user, if the requesting user is not permitted to manage guardians for the | 2759 * |
2439 * student identified by the `student_id`, if guardians are not enabled for | 2760 * This method returns the following error codes: |
2440 * the domain in question, or for other access errors. * `INVALID_ARGUMENT` if | 2761 * |
2441 * a `student_id` is specified, but its format cannot be recognized (it is not | 2762 * * `PERMISSION_DENIED` if no user that matches the provided `student_id` |
2442 * an email address, nor a `student_id` from the API). * `NOT_FOUND` if the | 2763 * is visible to the requesting user, if the requesting user is not |
2443 * requesting user is permitted to modify guardians for the requested | 2764 * permitted to manage guardians for the student identified by the |
2444 * `student_id`, but no `Guardian` record exists for that student with the | 2765 * `student_id`, if guardians are not enabled for the domain in question, |
2445 * provided `guardian_id`. | 2766 * or for other access errors. |
| 2767 * * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot |
| 2768 * be recognized (it is not an email address, nor a `student_id` from the |
| 2769 * API). |
| 2770 * * `NOT_FOUND` if the requesting user is permitted to modify guardians for |
| 2771 * the requested `student_id`, but no `Guardian` record exists for that |
| 2772 * student with the provided `guardian_id`. |
2446 * | 2773 * |
2447 * Request parameters: | 2774 * Request parameters: |
2448 * | 2775 * |
2449 * [studentId] - The student whose guardian is to be deleted. One of the | 2776 * [studentId] - The student whose guardian is to be deleted. One of the |
2450 * following: * the numeric identifier for the user * the email address of the | 2777 * following: |
2451 * user * the string literal `"me"`, indicating the requesting user | 2778 * |
| 2779 * * the numeric identifier for the user |
| 2780 * * the email address of the user |
| 2781 * * the string literal `"me"`, indicating the requesting user |
2452 * | 2782 * |
2453 * [guardianId] - The `id` field from a `Guardian`. | 2783 * [guardianId] - The `id` field from a `Guardian`. |
2454 * | 2784 * |
2455 * Completes with a [Empty]. | 2785 * Completes with a [Empty]. |
2456 * | 2786 * |
2457 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2787 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2458 * error. | 2788 * error. |
2459 * | 2789 * |
2460 * If the used [http.Client] completes with an error when making a REST call, | 2790 * If the used [http.Client] completes with an error when making a REST call, |
2461 * this method will complete with the same error. | 2791 * this method will complete with the same error. |
(...skipping 19 matching lines...) Expand all Loading... |
2481 "DELETE", | 2811 "DELETE", |
2482 body: _body, | 2812 body: _body, |
2483 queryParams: _queryParams, | 2813 queryParams: _queryParams, |
2484 uploadOptions: _uploadOptions, | 2814 uploadOptions: _uploadOptions, |
2485 uploadMedia: _uploadMedia, | 2815 uploadMedia: _uploadMedia, |
2486 downloadOptions: _downloadOptions); | 2816 downloadOptions: _downloadOptions); |
2487 return _response.then((data) => new Empty.fromJson(data)); | 2817 return _response.then((data) => new Empty.fromJson(data)); |
2488 } | 2818 } |
2489 | 2819 |
2490 /** | 2820 /** |
2491 * Returns a specific guardian. This method returns the following error codes: | 2821 * Returns a specific guardian. |
2492 * * `PERMISSION_DENIED` if no user that matches the provided `student_id` is | 2822 * |
2493 * visible to the requesting user, if the requesting user is not permitted to | 2823 * This method returns the following error codes: |
2494 * view guardian information for the student identified by the `student_id`, | 2824 * |
2495 * if guardians are not enabled for the domain in question, or for other | 2825 * * `PERMISSION_DENIED` if no user that matches the provided `student_id` |
2496 * access errors. * `INVALID_ARGUMENT` if a `student_id` is specified, but its | 2826 * is visible to the requesting user, if the requesting user is not |
2497 * format cannot be recognized (it is not an email address, nor a `student_id` | 2827 * permitted to view guardian information for the student identified by the |
2498 * from the API, nor the literal string `me`). * `NOT_FOUND` if the requesting | 2828 * `student_id`, if guardians are not enabled for the domain in question, |
2499 * user is permitted to view guardians for the requested `student_id`, but no | 2829 * or for other access errors. |
2500 * `Guardian` record exists for that student that matches the provided | 2830 * * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot |
2501 * `guardian_id`. | 2831 * be recognized (it is not an email address, nor a `student_id` from the |
| 2832 * API, nor the literal string `me`). |
| 2833 * * `NOT_FOUND` if the requesting user is permitted to view guardians for |
| 2834 * the requested `student_id`, but no `Guardian` record exists for that |
| 2835 * student that matches the provided `guardian_id`. |
2502 * | 2836 * |
2503 * Request parameters: | 2837 * Request parameters: |
2504 * | 2838 * |
2505 * [studentId] - The student whose guardian is being requested. One of the | 2839 * [studentId] - The student whose guardian is being requested. One of the |
2506 * following: * the numeric identifier for the user * the email address of the | 2840 * following: |
2507 * user * the string literal `"me"`, indicating the requesting user | 2841 * |
| 2842 * * the numeric identifier for the user |
| 2843 * * the email address of the user |
| 2844 * * the string literal `"me"`, indicating the requesting user |
2508 * | 2845 * |
2509 * [guardianId] - The `id` field from a `Guardian`. | 2846 * [guardianId] - The `id` field from a `Guardian`. |
2510 * | 2847 * |
2511 * Completes with a [Guardian]. | 2848 * Completes with a [Guardian]. |
2512 * | 2849 * |
2513 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2850 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2514 * error. | 2851 * error. |
2515 * | 2852 * |
2516 * If the used [http.Client] completes with an error when making a REST call, | 2853 * If the used [http.Client] completes with an error when making a REST call, |
2517 * this method will complete with the same error. | 2854 * this method will complete with the same error. |
(...skipping 19 matching lines...) Expand all Loading... |
2537 "GET", | 2874 "GET", |
2538 body: _body, | 2875 body: _body, |
2539 queryParams: _queryParams, | 2876 queryParams: _queryParams, |
2540 uploadOptions: _uploadOptions, | 2877 uploadOptions: _uploadOptions, |
2541 uploadMedia: _uploadMedia, | 2878 uploadMedia: _uploadMedia, |
2542 downloadOptions: _downloadOptions); | 2879 downloadOptions: _downloadOptions); |
2543 return _response.then((data) => new Guardian.fromJson(data)); | 2880 return _response.then((data) => new Guardian.fromJson(data)); |
2544 } | 2881 } |
2545 | 2882 |
2546 /** | 2883 /** |
2547 * Returns a list of guardians that the requesting user is permitted to view, | 2884 * Returns a list of guardians that the requesting user is permitted to |
2548 * restricted to those that match the request. To list guardians for any | 2885 * view, restricted to those that match the request. |
2549 * student that the requesting user may view guardians for, use the literal | 2886 * |
2550 * character `-` for the student ID. This method returns the following error | 2887 * To list guardians for any student that the requesting user may view |
2551 * codes: * `PERMISSION_DENIED` if a `student_id` is specified, and the | 2888 * guardians for, use the literal character `-` for the student ID. |
2552 * requesting user is not permitted to view guardian information for that | 2889 * |
2553 * student, if `"-"` is specified as the `student_id` and the user is not a | 2890 * This method returns the following error codes: |
2554 * domain administrator, if guardians are not enabled for the domain in | 2891 * |
2555 * question, if the `invited_email_address` filter is set by a user who is not | 2892 * * `PERMISSION_DENIED` if a `student_id` is specified, and the requesting |
2556 * a domain administrator, or for other access errors. * `INVALID_ARGUMENT` if | 2893 * user is not permitted to view guardian information for that student, if |
2557 * a `student_id` is specified, but its format cannot be recognized (it is not | 2894 * `"-"` is specified as the `student_id` and the user is not a domain |
2558 * an email address, nor a `student_id` from the API, nor the literal string | 2895 * administrator, if guardians are not enabled for the domain in question, |
2559 * `me`). May also be returned if an invalid `page_token` is provided. * | 2896 * if the `invited_email_address` filter is set by a user who is not a |
2560 * `NOT_FOUND` if a `student_id` is specified, and its format can be | 2897 * domain administrator, or for other access errors. |
2561 * recognized, but Classroom has no record of that student. | 2898 * * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot |
| 2899 * be recognized (it is not an email address, nor a `student_id` from the |
| 2900 * API, nor the literal string `me`). May also be returned if an invalid |
| 2901 * `page_token` is provided. |
| 2902 * * `NOT_FOUND` if a `student_id` is specified, and its format can be |
| 2903 * recognized, but Classroom has no record of that student. |
2562 * | 2904 * |
2563 * Request parameters: | 2905 * Request parameters: |
2564 * | 2906 * |
2565 * [studentId] - Filter results by the student who the guardian is linked to. | 2907 * [studentId] - Filter results by the student who the guardian is linked to. |
2566 * The identifier can be one of the following: * the numeric identifier for | 2908 * The identifier can be one of the following: |
2567 * the user * the email address of the user * the string literal `"me"`, | 2909 * |
2568 * indicating the requesting user * the string literal `"-"`, indicating that | 2910 * * the numeric identifier for the user |
2569 * results should be returned for all students that the requesting user has | 2911 * * the email address of the user |
2570 * access to view. | 2912 * * the string literal `"me"`, indicating the requesting user |
| 2913 * * the string literal `"-"`, indicating that results should be returned for |
| 2914 * all students that the requesting user has access to view. |
| 2915 * |
| 2916 * [pageSize] - Maximum number of items to return. Zero or unspecified |
| 2917 * indicates that the |
| 2918 * server may assign a maximum. |
| 2919 * |
| 2920 * The server may return fewer than the specified number of results. |
2571 * | 2921 * |
2572 * [invitedEmailAddress] - Filter results by the email address that the | 2922 * [invitedEmailAddress] - Filter results by the email address that the |
2573 * original invitation was sent to, resulting in this guardian link. This | 2923 * original invitation was sent |
2574 * filter can only be used by domain administrators. | 2924 * to, resulting in this guardian link. |
| 2925 * This filter can only be used by domain administrators. |
2575 * | 2926 * |
2576 * [pageToken] - nextPageToken value returned from a previous list call, | 2927 * [pageToken] - nextPageToken |
2577 * indicating that the subsequent page of results should be returned. The list | 2928 * value returned from a previous |
2578 * request must be otherwise identical to the one that resulted in this token. | 2929 * list call, |
| 2930 * indicating that the subsequent page of results should be returned. |
2579 * | 2931 * |
2580 * [pageSize] - Maximum number of items to return. Zero or unspecified | 2932 * The list request |
2581 * indicates that the server may assign a maximum. The server may return fewer | 2933 * must be otherwise identical to the one that resulted in this token. |
2582 * than the specified number of results. | |
2583 * | 2934 * |
2584 * Completes with a [ListGuardiansResponse]. | 2935 * Completes with a [ListGuardiansResponse]. |
2585 * | 2936 * |
2586 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2937 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2587 * error. | 2938 * error. |
2588 * | 2939 * |
2589 * If the used [http.Client] completes with an error when making a REST call, | 2940 * If the used [http.Client] completes with an error when making a REST call, |
2590 * this method will complete with the same error. | 2941 * this method will complete with the same error. |
2591 */ | 2942 */ |
2592 async.Future<ListGuardiansResponse> list(core.String studentId, {core.String i
nvitedEmailAddress, core.String pageToken, core.int pageSize}) { | 2943 async.Future<ListGuardiansResponse> list(core.String studentId, {core.int page
Size, core.String invitedEmailAddress, core.String pageToken}) { |
2593 var _url = null; | 2944 var _url = null; |
2594 var _queryParams = new core.Map(); | 2945 var _queryParams = new core.Map(); |
2595 var _uploadMedia = null; | 2946 var _uploadMedia = null; |
2596 var _uploadOptions = null; | 2947 var _uploadOptions = null; |
2597 var _downloadOptions = commons.DownloadOptions.Metadata; | 2948 var _downloadOptions = commons.DownloadOptions.Metadata; |
2598 var _body = null; | 2949 var _body = null; |
2599 | 2950 |
2600 if (studentId == null) { | 2951 if (studentId == null) { |
2601 throw new core.ArgumentError("Parameter studentId is required."); | 2952 throw new core.ArgumentError("Parameter studentId is required."); |
2602 } | 2953 } |
| 2954 if (pageSize != null) { |
| 2955 _queryParams["pageSize"] = ["${pageSize}"]; |
| 2956 } |
2603 if (invitedEmailAddress != null) { | 2957 if (invitedEmailAddress != null) { |
2604 _queryParams["invitedEmailAddress"] = [invitedEmailAddress]; | 2958 _queryParams["invitedEmailAddress"] = [invitedEmailAddress]; |
2605 } | 2959 } |
2606 if (pageToken != null) { | 2960 if (pageToken != null) { |
2607 _queryParams["pageToken"] = [pageToken]; | 2961 _queryParams["pageToken"] = [pageToken]; |
2608 } | 2962 } |
2609 if (pageSize != null) { | |
2610 _queryParams["pageSize"] = ["${pageSize}"]; | |
2611 } | |
2612 | 2963 |
2613 _url = 'v1/userProfiles/' + commons.Escaper.ecapeVariable('$studentId') + '/
guardians'; | 2964 _url = 'v1/userProfiles/' + commons.Escaper.ecapeVariable('$studentId') + '/
guardians'; |
2614 | 2965 |
2615 var _response = _requester.request(_url, | 2966 var _response = _requester.request(_url, |
2616 "GET", | 2967 "GET", |
2617 body: _body, | 2968 body: _body, |
2618 queryParams: _queryParams, | 2969 queryParams: _queryParams, |
2619 uploadOptions: _uploadOptions, | 2970 uploadOptions: _uploadOptions, |
2620 uploadMedia: _uploadMedia, | 2971 uploadMedia: _uploadMedia, |
2621 downloadOptions: _downloadOptions); | 2972 downloadOptions: _downloadOptions); |
2622 return _response.then((data) => new ListGuardiansResponse.fromJson(data)); | 2973 return _response.then((data) => new ListGuardiansResponse.fromJson(data)); |
2623 } | 2974 } |
2624 | 2975 |
2625 } | 2976 } |
2626 | 2977 |
2627 | 2978 |
2628 | 2979 |
2629 /** Additional details for assignments. */ | 2980 /** Additional details for assignments. */ |
2630 class Assignment { | 2981 class Assignment { |
2631 /** | 2982 /** |
2632 * Drive folder where attachments from student submissions are placed. This is | 2983 * Drive folder where attachments from student submissions are placed. |
2633 * only populated for course teachers. | 2984 * This is only populated for course teachers. |
2634 */ | 2985 */ |
2635 DriveFolder studentWorkFolder; | 2986 DriveFolder studentWorkFolder; |
2636 | 2987 |
2637 Assignment(); | 2988 Assignment(); |
2638 | 2989 |
2639 Assignment.fromJson(core.Map _json) { | 2990 Assignment.fromJson(core.Map _json) { |
2640 if (_json.containsKey("studentWorkFolder")) { | 2991 if (_json.containsKey("studentWorkFolder")) { |
2641 studentWorkFolder = new DriveFolder.fromJson(_json["studentWorkFolder"]); | 2992 studentWorkFolder = new DriveFolder.fromJson(_json["studentWorkFolder"]); |
2642 } | 2993 } |
2643 } | 2994 } |
2644 | 2995 |
2645 core.Map toJson() { | 2996 core.Map toJson() { |
2646 var _json = new core.Map(); | 2997 var _json = new core.Map(); |
2647 if (studentWorkFolder != null) { | 2998 if (studentWorkFolder != null) { |
2648 _json["studentWorkFolder"] = (studentWorkFolder).toJson(); | 2999 _json["studentWorkFolder"] = (studentWorkFolder).toJson(); |
2649 } | 3000 } |
2650 return _json; | 3001 return _json; |
2651 } | 3002 } |
2652 } | 3003 } |
2653 | 3004 |
2654 /** Student work for an assignment. */ | 3005 /** Student work for an assignment. */ |
2655 class AssignmentSubmission { | 3006 class AssignmentSubmission { |
2656 /** | 3007 /** |
2657 * Attachments added by the student. Drive files that correspond to materials | 3008 * Attachments added by the student. |
2658 * with a share mode of STUDENT_COPY may not exist yet if the student has not | 3009 * Drive files that correspond to materials with a share mode of |
2659 * accessed the assignment in Classroom. Some attachment metadata is only | 3010 * STUDENT_COPY may not exist yet if the student has not accessed the |
2660 * populated if the requesting user has permission to access it. Identifier | 3011 * assignment in Classroom. |
2661 * and alternate_link fields are always available, but others (e.g. title) may | 3012 * |
2662 * not be. | 3013 * Some attachment metadata is only populated if the requesting user has |
| 3014 * permission to access it. Identifier and alternate_link fields are always |
| 3015 * available, but others (e.g. title) may not be. |
2663 */ | 3016 */ |
2664 core.List<Attachment> attachments; | 3017 core.List<Attachment> attachments; |
2665 | 3018 |
2666 AssignmentSubmission(); | 3019 AssignmentSubmission(); |
2667 | 3020 |
2668 AssignmentSubmission.fromJson(core.Map _json) { | 3021 AssignmentSubmission.fromJson(core.Map _json) { |
2669 if (_json.containsKey("attachments")) { | 3022 if (_json.containsKey("attachments")) { |
2670 attachments = _json["attachments"].map((value) => new Attachment.fromJson(
value)).toList(); | 3023 attachments = _json["attachments"].map((value) => new Attachment.fromJson(
value)).toList(); |
2671 } | 3024 } |
2672 } | 3025 } |
2673 | 3026 |
2674 core.Map toJson() { | 3027 core.Map toJson() { |
2675 var _json = new core.Map(); | 3028 var _json = new core.Map(); |
2676 if (attachments != null) { | 3029 if (attachments != null) { |
2677 _json["attachments"] = attachments.map((value) => (value).toJson()).toList
(); | 3030 _json["attachments"] = attachments.map((value) => (value).toJson()).toList
(); |
2678 } | 3031 } |
2679 return _json; | 3032 return _json; |
2680 } | 3033 } |
2681 } | 3034 } |
2682 | 3035 |
2683 /** | 3036 /** |
2684 * Attachment added to student assignment work. When creating attachments, | 3037 * Attachment added to student assignment work. |
2685 * setting the `form` field is not supported. | 3038 * |
| 3039 * When creating attachments, setting the `form` field is not supported. |
2686 */ | 3040 */ |
2687 class Attachment { | 3041 class Attachment { |
2688 /** Google Drive file attachment. */ | 3042 /** Google Drive file attachment. */ |
2689 DriveFile driveFile; | 3043 DriveFile driveFile; |
2690 /** Google Forms attachment. */ | 3044 /** Google Forms attachment. */ |
2691 Form form; | 3045 Form form; |
2692 /** Link attachment. */ | 3046 /** Link attachment. */ |
2693 Link link; | 3047 Link link; |
2694 /** Youtube video attachment. */ | 3048 /** Youtube video attachment. */ |
2695 YouTubeVideo youTubeVideo; | 3049 YouTubeVideo youTubeVideo; |
(...skipping 28 matching lines...) Expand all Loading... |
2724 } | 3078 } |
2725 if (youTubeVideo != null) { | 3079 if (youTubeVideo != null) { |
2726 _json["youTubeVideo"] = (youTubeVideo).toJson(); | 3080 _json["youTubeVideo"] = (youTubeVideo).toJson(); |
2727 } | 3081 } |
2728 return _json; | 3082 return _json; |
2729 } | 3083 } |
2730 } | 3084 } |
2731 | 3085 |
2732 /** A Course in Classroom. */ | 3086 /** A Course in Classroom. */ |
2733 class Course { | 3087 class Course { |
2734 /** Absolute link to this course in the Classroom web UI. Read-only. */ | 3088 /** |
| 3089 * Absolute link to this course in the Classroom web UI. |
| 3090 * |
| 3091 * Read-only. |
| 3092 */ |
2735 core.String alternateLink; | 3093 core.String alternateLink; |
2736 /** | 3094 /** |
2737 * The email address of a Google group containing all members of the course. | 3095 * The email address of a Google group containing all members of the course. |
2738 * This group does not accept email and can only be used for permissions. | 3096 * This group does not accept email and can only be used for permissions. |
| 3097 * |
2739 * Read-only. | 3098 * Read-only. |
2740 */ | 3099 */ |
2741 core.String courseGroupEmail; | 3100 core.String courseGroupEmail; |
2742 /** | 3101 /** |
2743 * Sets of materials that appear on the "about" page of this course. | 3102 * Sets of materials that appear on the "about" page of this course. |
| 3103 * |
2744 * Read-only. | 3104 * Read-only. |
2745 */ | 3105 */ |
2746 core.List<CourseMaterialSet> courseMaterialSets; | 3106 core.List<CourseMaterialSet> courseMaterialSets; |
2747 /** | 3107 /** |
2748 * State of the course. If unspecified, the default state is `PROVISIONED`. | 3108 * State of the course. |
| 3109 * If unspecified, the default state is `PROVISIONED`. |
2749 * Possible string values are: | 3110 * Possible string values are: |
2750 * - "COURSE_STATE_UNSPECIFIED" : A COURSE_STATE_UNSPECIFIED. | 3111 * - "COURSE_STATE_UNSPECIFIED" : No course state. No returned Course message |
2751 * - "ACTIVE" : A ACTIVE. | 3112 * will use this value. |
2752 * - "ARCHIVED" : A ARCHIVED. | 3113 * - "ACTIVE" : The course is active. |
2753 * - "PROVISIONED" : A PROVISIONED. | 3114 * - "ARCHIVED" : The course has been archived. You cannot modify it except to |
2754 * - "DECLINED" : A DECLINED. | 3115 * change it |
| 3116 * to a different state. |
| 3117 * - "PROVISIONED" : The course has been created, but not yet activated. It is |
| 3118 * accessible by |
| 3119 * the primary teacher and domain administrators, who may modify it or |
| 3120 * change it to the `ACTIVE` or `DECLINED` states. |
| 3121 * A course may only be changed to `PROVISIONED` if it is in the `DECLINED` |
| 3122 * state. |
| 3123 * - "DECLINED" : The course has been created, but declined. It is accessible |
| 3124 * by the |
| 3125 * course owner and domain administrators, though it will not be |
| 3126 * displayed in the web UI. You cannot modify the course except to change it |
| 3127 * to the `PROVISIONED` state. |
| 3128 * A course may only be changed to `DECLINED` if it is in the `PROVISIONED` |
| 3129 * state. |
| 3130 * - "SUSPENDED" : The course has been suspended. You cannot modify the |
| 3131 * course, and only the |
| 3132 * user identified by the `owner_id` can view the course. |
| 3133 * A course may be placed in this state if it potentially violates the |
| 3134 * Terms of Service. |
2755 */ | 3135 */ |
2756 core.String courseState; | 3136 core.String courseState; |
2757 /** | 3137 /** |
2758 * Creation time of the course. Specifying this field in a course update mask | 3138 * Creation time of the course. |
2759 * results in an error. Read-only. | 3139 * Specifying this field in a course update mask results in an error. |
| 3140 * |
| 3141 * Read-only. |
2760 */ | 3142 */ |
2761 core.String creationTime; | 3143 core.String creationTime; |
2762 /** | 3144 /** |
2763 * Optional description. For example, "We'll be learning about the structure | 3145 * Optional description. |
2764 * of living creatures from a combination of textbooks, guest lectures, and | 3146 * For example, "We'll be learning about the structure of living |
2765 * lab work. Expect to be excited!" If set, this field must be a valid UTF-8 | 3147 * creatures from a combination of textbooks, guest lectures, and lab work. |
2766 * string and no longer than 30,000 characters. | 3148 * Expect to be excited!" |
| 3149 * If set, this field must be a valid UTF-8 string and no longer than 30,000 |
| 3150 * characters. |
2767 */ | 3151 */ |
2768 core.String description; | 3152 core.String description; |
2769 /** | 3153 /** |
2770 * Optional heading for the description. For example, "Welcome to 10th Grade | 3154 * Optional heading for the description. |
2771 * Biology." If set, this field must be a valid UTF-8 string and no longer | 3155 * For example, "Welcome to 10th Grade Biology." |
2772 * than 3600 characters. | 3156 * If set, this field must be a valid UTF-8 string and no longer than 3600 |
| 3157 * characters. |
2773 */ | 3158 */ |
2774 core.String descriptionHeading; | 3159 core.String descriptionHeading; |
2775 /** | 3160 /** |
2776 * Enrollment code to use when joining this course. Specifying this field in a | 3161 * Enrollment code to use when joining this course. |
2777 * course update mask results in an error. Read-only. | 3162 * Specifying this field in a course update mask results in an error. |
| 3163 * |
| 3164 * Read-only. |
2778 */ | 3165 */ |
2779 core.String enrollmentCode; | 3166 core.String enrollmentCode; |
2780 /** | 3167 /** |
2781 * Whether or not guardian notifications are enabled for this course. | 3168 * Whether or not guardian notifications are enabled for this course. |
| 3169 * |
2782 * Read-only. | 3170 * Read-only. |
2783 */ | 3171 */ |
2784 core.bool guardiansEnabled; | 3172 core.bool guardiansEnabled; |
2785 /** | 3173 /** |
2786 * Identifier for this course assigned by Classroom. When creating a course, | 3174 * Identifier for this course assigned by Classroom. |
2787 * you may optionally set this identifier to an alias string in the request to | 3175 * |
2788 * create a corresponding alias. The `id` is still assigned by Classroom and | 3176 * When |
2789 * cannot be updated after the course is created. Specifying this field in a | 3177 * creating a course, |
2790 * course update mask results in an error. | 3178 * you may optionally set this identifier to an |
| 3179 * alias string in the |
| 3180 * request to create a corresponding alias. The `id` is still assigned by |
| 3181 * Classroom and cannot be updated after the course is created. |
| 3182 * |
| 3183 * Specifying this field in a course update mask results in an error. |
2791 */ | 3184 */ |
2792 core.String id; | 3185 core.String id; |
2793 /** | 3186 /** |
2794 * Name of the course. For example, "10th Grade Biology". The name is | 3187 * Name of the course. |
2795 * required. It must be between 1 and 750 characters and a valid UTF-8 string. | 3188 * For example, "10th Grade Biology". |
| 3189 * The name is required. It must be between 1 and 750 characters and a valid |
| 3190 * UTF-8 string. |
2796 */ | 3191 */ |
2797 core.String name; | 3192 core.String name; |
2798 /** | 3193 /** |
2799 * The identifier of the owner of a course. When specified as a parameter of a | 3194 * The identifier of the owner of a course. |
2800 * create course request, this field is required. The identifier can be one of | 3195 * |
2801 * the following: * the numeric identifier for the user * the email address of | 3196 * When specified as a parameter of a |
2802 * the user * the string literal `"me"`, indicating the requesting user This | 3197 * create course request, this |
2803 * must be set in a create request. Specifying this field in a course update | 3198 * field is required. |
2804 * mask results in an `INVALID_ARGUMENT` error. | 3199 * The identifier can be one of the following: |
| 3200 * |
| 3201 * * the numeric identifier for the user |
| 3202 * * the email address of the user |
| 3203 * * the string literal `"me"`, indicating the requesting user |
| 3204 * |
| 3205 * This must be set in a create request. Specifying this field in a course |
| 3206 * update mask results in an `INVALID_ARGUMENT` error. |
2805 */ | 3207 */ |
2806 core.String ownerId; | 3208 core.String ownerId; |
2807 /** | 3209 /** |
2808 * Optional room location. For example, "301". If set, this field must be a | 3210 * Optional room location. |
2809 * valid UTF-8 string and no longer than 650 characters. | 3211 * For example, "301". |
| 3212 * If set, this field must be a valid UTF-8 string and no longer than 650 |
| 3213 * characters. |
2810 */ | 3214 */ |
2811 core.String room; | 3215 core.String room; |
2812 /** | 3216 /** |
2813 * Section of the course. For example, "Period 2". If set, this field must be | 3217 * Section of the course. |
2814 * a valid UTF-8 string and no longer than 2800 characters. | 3218 * For example, "Period 2". |
| 3219 * If set, this field must be a valid UTF-8 string and no longer than 2800 |
| 3220 * characters. |
2815 */ | 3221 */ |
2816 core.String section; | 3222 core.String section; |
2817 /** | 3223 /** |
2818 * Information about a Drive Folder that is shared with all teachers of the | 3224 * Information about a Drive Folder that is shared with all teachers of the |
2819 * course. This field will only be set for teachers of the course and domain | 3225 * course. |
2820 * administrators. Read-only. | 3226 * |
| 3227 * This field will only be set for teachers of the course and domain |
| 3228 * administrators. |
| 3229 * |
| 3230 * Read-only. |
2821 */ | 3231 */ |
2822 DriveFolder teacherFolder; | 3232 DriveFolder teacherFolder; |
2823 /** | 3233 /** |
2824 * The email address of a Google group containing all teachers of the course. | 3234 * The email address of a Google group containing all teachers of the course. |
2825 * This group does not accept email and can only be used for permissions. | 3235 * This group does not accept email and can only be used for permissions. |
| 3236 * |
2826 * Read-only. | 3237 * Read-only. |
2827 */ | 3238 */ |
2828 core.String teacherGroupEmail; | 3239 core.String teacherGroupEmail; |
2829 /** | 3240 /** |
2830 * Time of the most recent update to this course. Specifying this field in a | 3241 * Time of the most recent update to this course. |
2831 * course update mask results in an error. Read-only. | 3242 * Specifying this field in a course update mask results in an error. |
| 3243 * |
| 3244 * Read-only. |
2832 */ | 3245 */ |
2833 core.String updateTime; | 3246 core.String updateTime; |
2834 | 3247 |
2835 Course(); | 3248 Course(); |
2836 | 3249 |
2837 Course.fromJson(core.Map _json) { | 3250 Course.fromJson(core.Map _json) { |
2838 if (_json.containsKey("alternateLink")) { | 3251 if (_json.containsKey("alternateLink")) { |
2839 alternateLink = _json["alternateLink"]; | 3252 alternateLink = _json["alternateLink"]; |
2840 } | 3253 } |
2841 if (_json.containsKey("courseGroupEmail")) { | 3254 if (_json.containsKey("courseGroupEmail")) { |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2939 _json["teacherGroupEmail"] = teacherGroupEmail; | 3352 _json["teacherGroupEmail"] = teacherGroupEmail; |
2940 } | 3353 } |
2941 if (updateTime != null) { | 3354 if (updateTime != null) { |
2942 _json["updateTime"] = updateTime; | 3355 _json["updateTime"] = updateTime; |
2943 } | 3356 } |
2944 return _json; | 3357 return _json; |
2945 } | 3358 } |
2946 } | 3359 } |
2947 | 3360 |
2948 /** | 3361 /** |
2949 * Alternative identifier for a course. An alias uniquely identifies a course. | 3362 * Alternative identifier for a course. |
2950 * It must be unique within one of the following scopes: * domain: A | 3363 * |
2951 * domain-scoped alias is visible to all users within the alias creator's domain | 3364 * An alias uniquely identifies a course. It must be unique within one of the |
2952 * and can be created only by a domain admin. A domain-scoped alias is often | 3365 * following scopes: |
2953 * used when a course has an identifier external to Classroom. * project: A | 3366 * |
2954 * project-scoped alias is visible to any request from an application using the | 3367 * * domain: A domain-scoped alias is visible to all users within the alias |
2955 * Developer Console project ID that created the alias and can be created by any | 3368 * creator's domain and can be created only by a domain admin. A domain-scoped |
2956 * project. A project-scoped alias is often used when an application has | 3369 * alias is often used when a course has an identifier external to Classroom. |
2957 * alternative identifiers. A random value can also be used to avoid duplicate | 3370 * |
2958 * courses in the event of transmission failures, as retrying a request will | 3371 * * project: A project-scoped alias is visible to any request from an |
2959 * return `ALREADY_EXISTS` if a previous one has succeeded. | 3372 * application using the Developer Console project ID that created the alias |
| 3373 * and can be created by any project. A project-scoped alias is often used when |
| 3374 * an application has alternative identifiers. A random value can also be used |
| 3375 * to avoid duplicate courses in the event of transmission failures, as retrying |
| 3376 * a request will return `ALREADY_EXISTS` if a previous one has succeeded. |
2960 */ | 3377 */ |
2961 class CourseAlias { | 3378 class CourseAlias { |
2962 /** | 3379 /** |
2963 * Alias string. The format of the string indicates the desired alias scoping. | 3380 * Alias string. The format of the string indicates the desired alias scoping. |
2964 * * `d:` indicates a domain-scoped alias. Example: `d:math_101` * `p:` | 3381 * |
2965 * indicates a project-scoped alias. Example: `p:abc123` This field has a | 3382 * * `d:<name>` indicates a domain-scoped alias. |
2966 * maximum length of 256 characters. | 3383 * Example: `d:math_101` |
| 3384 * * `p:<name>` indicates a project-scoped alias. |
| 3385 * Example: `p:abc123` |
| 3386 * |
| 3387 * This field has a maximum length of 256 characters. |
2967 */ | 3388 */ |
2968 core.String alias; | 3389 core.String alias; |
2969 | 3390 |
2970 CourseAlias(); | 3391 CourseAlias(); |
2971 | 3392 |
2972 CourseAlias.fromJson(core.Map _json) { | 3393 CourseAlias.fromJson(core.Map _json) { |
2973 if (_json.containsKey("alias")) { | 3394 if (_json.containsKey("alias")) { |
2974 alias = _json["alias"]; | 3395 alias = _json["alias"]; |
2975 } | 3396 } |
2976 } | 3397 } |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3024 _json["link"] = (link).toJson(); | 3445 _json["link"] = (link).toJson(); |
3025 } | 3446 } |
3026 if (youTubeVideo != null) { | 3447 if (youTubeVideo != null) { |
3027 _json["youTubeVideo"] = (youTubeVideo).toJson(); | 3448 _json["youTubeVideo"] = (youTubeVideo).toJson(); |
3028 } | 3449 } |
3029 return _json; | 3450 return _json; |
3030 } | 3451 } |
3031 } | 3452 } |
3032 | 3453 |
3033 /** | 3454 /** |
3034 * A set of materials that appears on the "About" page of the course. These | 3455 * A set of materials that appears on the "About" page of the course. |
3035 * materials might include a syllabus, schedule, or other background information | 3456 * These materials might include a syllabus, schedule, or other background |
3036 * relating to the course as a whole. | 3457 * information relating to the course as a whole. |
3037 */ | 3458 */ |
3038 class CourseMaterialSet { | 3459 class CourseMaterialSet { |
3039 /** Materials attached to this set. */ | 3460 /** Materials attached to this set. */ |
3040 core.List<CourseMaterial> materials; | 3461 core.List<CourseMaterial> materials; |
3041 /** Title for this set. */ | 3462 /** Title for this set. */ |
3042 core.String title; | 3463 core.String title; |
3043 | 3464 |
3044 CourseMaterialSet(); | 3465 CourseMaterialSet(); |
3045 | 3466 |
3046 CourseMaterialSet.fromJson(core.Map _json) { | 3467 CourseMaterialSet.fromJson(core.Map _json) { |
(...skipping 13 matching lines...) Expand all Loading... |
3060 if (title != null) { | 3481 if (title != null) { |
3061 _json["title"] = title; | 3482 _json["title"] = title; |
3062 } | 3483 } |
3063 return _json; | 3484 return _json; |
3064 } | 3485 } |
3065 } | 3486 } |
3066 | 3487 |
3067 /** Course work created by a teacher for students of the course. */ | 3488 /** Course work created by a teacher for students of the course. */ |
3068 class CourseWork { | 3489 class CourseWork { |
3069 /** | 3490 /** |
3070 * Absolute link to this course work in the Classroom web UI. This is only | 3491 * Absolute link to this course work in the Classroom web UI. |
3071 * populated if `state` is `PUBLISHED`. Read-only. | 3492 * This is only populated if `state` is `PUBLISHED`. |
| 3493 * |
| 3494 * Read-only. |
3072 */ | 3495 */ |
3073 core.String alternateLink; | 3496 core.String alternateLink; |
3074 /** | 3497 /** |
3075 * Assignment details. This is populated only when `work_type` is | 3498 * Assignment details. |
3076 * `ASSIGNMENT`. Read-only. | 3499 * This is populated only when `work_type` is `ASSIGNMENT`. |
| 3500 * |
| 3501 * Read-only. |
3077 */ | 3502 */ |
3078 Assignment assignment; | 3503 Assignment assignment; |
3079 /** | 3504 /** |
3080 * Whether this course work item is associated with the Developer Console | 3505 * Whether this course work item is associated with the Developer Console |
3081 * project making the request. See google.classroom.Work.CreateCourseWork for | 3506 * project making the request. |
3082 * more details. Read-only. | 3507 * |
| 3508 * See google.classroom.Work.CreateCourseWork for more |
| 3509 * details. |
| 3510 * |
| 3511 * Read-only. |
3083 */ | 3512 */ |
3084 core.bool associatedWithDeveloper; | 3513 core.bool associatedWithDeveloper; |
3085 /** Identifier of the course. Read-only. */ | 3514 /** |
| 3515 * Identifier of the course. |
| 3516 * |
| 3517 * Read-only. |
| 3518 */ |
3086 core.String courseId; | 3519 core.String courseId; |
3087 /** Timestamp when this course work was created. Read-only. */ | 3520 /** |
| 3521 * Timestamp when this course work was created. |
| 3522 * |
| 3523 * Read-only. |
| 3524 */ |
3088 core.String creationTime; | 3525 core.String creationTime; |
3089 /** | 3526 /** |
3090 * Optional description of this course work. If set, the description must be a | 3527 * Optional description of this course work. |
3091 * valid UTF-8 string containing no more than 30,000 characters. | 3528 * If set, the description must be a valid UTF-8 string containing no more |
| 3529 * than 30,000 characters. |
3092 */ | 3530 */ |
3093 core.String description; | 3531 core.String description; |
3094 /** | 3532 /** |
3095 * Optional date, in UTC, that submissions for this this course work are due. | 3533 * Optional date, in UTC, that submissions for this this course work are due. |
3096 * This must be specified if `due_time` is specified. | 3534 * This must be specified if `due_time` is specified. |
3097 */ | 3535 */ |
3098 Date dueDate; | 3536 Date dueDate; |
3099 /** | 3537 /** |
3100 * Optional time of day, in UTC, that submissions for this this course work | 3538 * Optional time of day, in UTC, that submissions for this this course work |
3101 * are due. This must be specified if `due_date` is specified. | 3539 * are due. |
| 3540 * This must be specified if `due_date` is specified. |
3102 */ | 3541 */ |
3103 TimeOfDay dueTime; | 3542 TimeOfDay dueTime; |
3104 /** | 3543 /** |
3105 * Classroom-assigned identifier of this course work, unique per course. | 3544 * Classroom-assigned identifier of this course work, unique per course. |
| 3545 * |
3106 * Read-only. | 3546 * Read-only. |
3107 */ | 3547 */ |
3108 core.String id; | 3548 core.String id; |
3109 /** | 3549 /** |
3110 * Additional materials. CourseWork must have no more than 20 material items. | 3550 * Additional materials. |
| 3551 * |
| 3552 * CourseWork must have no more than 20 material items. |
3111 */ | 3553 */ |
3112 core.List<Material> materials; | 3554 core.List<Material> materials; |
3113 /** | 3555 /** |
3114 * Maximum grade for this course work. If zero or unspecified, this assignment | 3556 * Maximum grade for this course work. |
3115 * is considered ungraded. This must be a non-negative integer value. | 3557 * If zero or unspecified, this assignment is considered ungraded. |
| 3558 * This must be a non-negative integer value. |
3116 */ | 3559 */ |
3117 core.double maxPoints; | 3560 core.double maxPoints; |
3118 /** | 3561 /** |
3119 * Multiple choice question details. For read operations, this field is | 3562 * Multiple choice question details. |
3120 * populated only when `work_type` is `MULTIPLE_CHOICE_QUESTION`. For write | 3563 * For read operations, this field is populated only when `work_type` is |
3121 * operations, this field must be specified when creating course work with a | 3564 * `MULTIPLE_CHOICE_QUESTION`. |
3122 * `work_type` of `MULTIPLE_CHOICE_QUESTION`, and it must not be set | 3565 * For write operations, this field must be specified when creating course |
3123 * otherwise. | 3566 * work with a `work_type` of `MULTIPLE_CHOICE_QUESTION`, and it must not be |
| 3567 * set otherwise. |
3124 */ | 3568 */ |
3125 MultipleChoiceQuestion multipleChoiceQuestion; | 3569 MultipleChoiceQuestion multipleChoiceQuestion; |
3126 /** | 3570 /** |
3127 * Status of this course work. If unspecified, the default state is `DRAFT`. | 3571 * Status of this course work. |
| 3572 * If unspecified, the default state is `DRAFT`. |
3128 * Possible string values are: | 3573 * Possible string values are: |
3129 * - "COURSE_WORK_STATE_UNSPECIFIED" : A COURSE_WORK_STATE_UNSPECIFIED. | 3574 * - "COURSE_WORK_STATE_UNSPECIFIED" : No state specified. This is never |
3130 * - "PUBLISHED" : A PUBLISHED. | 3575 * returned. |
3131 * - "DRAFT" : A DRAFT. | 3576 * - "PUBLISHED" : Status for work that has been published. |
3132 * - "DELETED" : A DELETED. | 3577 * This is the default state. |
| 3578 * - "DRAFT" : Status for work that is not yet published. |
| 3579 * Work in this state is visible only to course teachers and domain |
| 3580 * administrators. |
| 3581 * - "DELETED" : Status for work that was published but is now deleted. |
| 3582 * Work in this state is visible only to course teachers and domain |
| 3583 * administrators. |
| 3584 * Work in this state is deleted after some time. |
3133 */ | 3585 */ |
3134 core.String state; | 3586 core.String state; |
3135 /** | 3587 /** |
3136 * Setting to determine when students are allowed to modify submissions. If | 3588 * Setting to determine when students are allowed to modify submissions. |
3137 * unspecified, the default value is `MODIFIABLE_UNTIL_TURNED_IN`. | 3589 * If unspecified, the default value is `MODIFIABLE_UNTIL_TURNED_IN`. |
3138 * Possible string values are: | 3590 * Possible string values are: |
3139 * - "SUBMISSION_MODIFICATION_MODE_UNSPECIFIED" : A | 3591 * - "SUBMISSION_MODIFICATION_MODE_UNSPECIFIED" : No modification mode |
3140 * SUBMISSION_MODIFICATION_MODE_UNSPECIFIED. | 3592 * specified. This is never returned. |
3141 * - "MODIFIABLE_UNTIL_TURNED_IN" : A MODIFIABLE_UNTIL_TURNED_IN. | 3593 * - "MODIFIABLE_UNTIL_TURNED_IN" : Submisisons can be modified before being |
3142 * - "MODIFIABLE" : A MODIFIABLE. | 3594 * turned in. |
| 3595 * - "MODIFIABLE" : Submisisons can be modified at any time. |
3143 */ | 3596 */ |
3144 core.String submissionModificationMode; | 3597 core.String submissionModificationMode; |
3145 /** | 3598 /** |
3146 * Title of this course work. The title must be a valid UTF-8 string | 3599 * Title of this course work. |
3147 * containing between 1 and 3000 characters. | 3600 * The title must be a valid UTF-8 string containing between 1 and 3000 |
| 3601 * characters. |
3148 */ | 3602 */ |
3149 core.String title; | 3603 core.String title; |
3150 /** Timestamp of the most recent change to this course work. Read-only. */ | 3604 /** |
| 3605 * Timestamp of the most recent change to this course work. |
| 3606 * |
| 3607 * Read-only. |
| 3608 */ |
3151 core.String updateTime; | 3609 core.String updateTime; |
3152 /** | 3610 /** |
3153 * Type of this course work. The type is set when the course work is created | 3611 * Type of this course work. |
3154 * and cannot be changed. | 3612 * |
| 3613 * The type is set when the course work is created and cannot be changed. |
3155 * Possible string values are: | 3614 * Possible string values are: |
3156 * - "COURSE_WORK_TYPE_UNSPECIFIED" : A COURSE_WORK_TYPE_UNSPECIFIED. | 3615 * - "COURSE_WORK_TYPE_UNSPECIFIED" : No work type specified. This is never |
3157 * - "ASSIGNMENT" : A ASSIGNMENT. | 3616 * returned. |
3158 * - "SHORT_ANSWER_QUESTION" : A SHORT_ANSWER_QUESTION. | 3617 * - "ASSIGNMENT" : An assignment. |
3159 * - "MULTIPLE_CHOICE_QUESTION" : A MULTIPLE_CHOICE_QUESTION. | 3618 * - "SHORT_ANSWER_QUESTION" : A short answer question. |
| 3619 * - "MULTIPLE_CHOICE_QUESTION" : A multiple-choice question. |
3160 */ | 3620 */ |
3161 core.String workType; | 3621 core.String workType; |
3162 | 3622 |
3163 CourseWork(); | 3623 CourseWork(); |
3164 | 3624 |
3165 CourseWork.fromJson(core.Map _json) { | 3625 CourseWork.fromJson(core.Map _json) { |
3166 if (_json.containsKey("alternateLink")) { | 3626 if (_json.containsKey("alternateLink")) { |
3167 alternateLink = _json["alternateLink"]; | 3627 alternateLink = _json["alternateLink"]; |
3168 } | 3628 } |
3169 if (_json.containsKey("assignment")) { | 3629 if (_json.containsKey("assignment")) { |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3268 } | 3728 } |
3269 if (workType != null) { | 3729 if (workType != null) { |
3270 _json["workType"] = workType; | 3730 _json["workType"] = workType; |
3271 } | 3731 } |
3272 return _json; | 3732 return _json; |
3273 } | 3733 } |
3274 } | 3734 } |
3275 | 3735 |
3276 /** | 3736 /** |
3277 * Represents a whole calendar date, e.g. date of birth. The time of day and | 3737 * Represents a whole calendar date, e.g. date of birth. The time of day and |
3278 * time zone are either specified elsewhere or are not significant. The date is | 3738 * time zone are either specified elsewhere or are not significant. The date |
3279 * relative to the Proleptic Gregorian Calendar. The day may be 0 to represent a | 3739 * is relative to the Proleptic Gregorian Calendar. The day may be 0 to |
3280 * year and month where the day is not significant, e.g. credit card expiration | 3740 * represent a year and month where the day is not significant, e.g. credit card |
3281 * date. The year may be 0 to represent a month and day independent of year, | 3741 * expiration date. The year may be 0 to represent a month and day independent |
3282 * e.g. anniversary date. Related types are google.type.TimeOfDay and | 3742 * of year, e.g. anniversary date. Related types are google.type.TimeOfDay |
3283 * `google.protobuf.Timestamp`. | 3743 * and `google.protobuf.Timestamp`. |
3284 */ | 3744 */ |
3285 class Date { | 3745 class Date { |
3286 /** | 3746 /** |
3287 * Day of month. Must be from 1 to 31 and valid for the year and month, or 0 | 3747 * Day of month. Must be from 1 to 31 and valid for the year and month, or 0 |
3288 * if specifying a year/month where the day is not significant. | 3748 * if specifying a year/month where the day is not significant. |
3289 */ | 3749 */ |
3290 core.int day; | 3750 core.int day; |
3291 /** Month of year. Must be from 1 to 12. */ | 3751 /** Month of year. Must be from 1 to 12. */ |
3292 core.int month; | 3752 core.int month; |
3293 /** | 3753 /** |
3294 * Year of date. Must be from 1 to 9999, or 0 if specifying a date without a | 3754 * Year of date. Must be from 1 to 9999, or 0 if specifying a date without |
3295 * year. | 3755 * a year. |
3296 */ | 3756 */ |
3297 core.int year; | 3757 core.int year; |
3298 | 3758 |
3299 Date(); | 3759 Date(); |
3300 | 3760 |
3301 Date.fromJson(core.Map _json) { | 3761 Date.fromJson(core.Map _json) { |
3302 if (_json.containsKey("day")) { | 3762 if (_json.containsKey("day")) { |
3303 day = _json["day"]; | 3763 day = _json["day"]; |
3304 } | 3764 } |
3305 if (_json.containsKey("month")) { | 3765 if (_json.containsKey("month")) { |
(...skipping 14 matching lines...) Expand all Loading... |
3320 } | 3780 } |
3321 if (year != null) { | 3781 if (year != null) { |
3322 _json["year"] = year; | 3782 _json["year"] = year; |
3323 } | 3783 } |
3324 return _json; | 3784 return _json; |
3325 } | 3785 } |
3326 } | 3786 } |
3327 | 3787 |
3328 /** Representation of a Google Drive file. */ | 3788 /** Representation of a Google Drive file. */ |
3329 class DriveFile { | 3789 class DriveFile { |
3330 /** URL that can be used to access the Drive item. Read-only. */ | 3790 /** |
| 3791 * URL that can be used to access the Drive item. |
| 3792 * |
| 3793 * Read-only. |
| 3794 */ |
3331 core.String alternateLink; | 3795 core.String alternateLink; |
3332 /** Drive API resource ID. */ | 3796 /** Drive API resource ID. */ |
3333 core.String id; | 3797 core.String id; |
3334 /** URL of a thumbnail image of the Drive item. Read-only. */ | 3798 /** |
| 3799 * URL of a thumbnail image of the Drive item. |
| 3800 * |
| 3801 * Read-only. |
| 3802 */ |
3335 core.String thumbnailUrl; | 3803 core.String thumbnailUrl; |
3336 /** Title of the Drive item. Read-only. */ | 3804 /** |
| 3805 * Title of the Drive item. |
| 3806 * |
| 3807 * Read-only. |
| 3808 */ |
3337 core.String title; | 3809 core.String title; |
3338 | 3810 |
3339 DriveFile(); | 3811 DriveFile(); |
3340 | 3812 |
3341 DriveFile.fromJson(core.Map _json) { | 3813 DriveFile.fromJson(core.Map _json) { |
3342 if (_json.containsKey("alternateLink")) { | 3814 if (_json.containsKey("alternateLink")) { |
3343 alternateLink = _json["alternateLink"]; | 3815 alternateLink = _json["alternateLink"]; |
3344 } | 3816 } |
3345 if (_json.containsKey("id")) { | 3817 if (_json.containsKey("id")) { |
3346 id = _json["id"]; | 3818 id = _json["id"]; |
(...skipping 19 matching lines...) Expand all Loading... |
3366 } | 3838 } |
3367 if (title != null) { | 3839 if (title != null) { |
3368 _json["title"] = title; | 3840 _json["title"] = title; |
3369 } | 3841 } |
3370 return _json; | 3842 return _json; |
3371 } | 3843 } |
3372 } | 3844 } |
3373 | 3845 |
3374 /** Representation of a Google Drive folder. */ | 3846 /** Representation of a Google Drive folder. */ |
3375 class DriveFolder { | 3847 class DriveFolder { |
3376 /** URL that can be used to access the Drive folder. Read-only. */ | 3848 /** |
| 3849 * URL that can be used to access the Drive folder. |
| 3850 * |
| 3851 * Read-only. |
| 3852 */ |
3377 core.String alternateLink; | 3853 core.String alternateLink; |
3378 /** Drive API resource ID. */ | 3854 /** Drive API resource ID. */ |
3379 core.String id; | 3855 core.String id; |
3380 /** Title of the Drive folder. Read-only. */ | 3856 /** |
| 3857 * Title of the Drive folder. |
| 3858 * |
| 3859 * Read-only. |
| 3860 */ |
3381 core.String title; | 3861 core.String title; |
3382 | 3862 |
3383 DriveFolder(); | 3863 DriveFolder(); |
3384 | 3864 |
3385 DriveFolder.fromJson(core.Map _json) { | 3865 DriveFolder.fromJson(core.Map _json) { |
3386 if (_json.containsKey("alternateLink")) { | 3866 if (_json.containsKey("alternateLink")) { |
3387 alternateLink = _json["alternateLink"]; | 3867 alternateLink = _json["alternateLink"]; |
3388 } | 3868 } |
3389 if (_json.containsKey("id")) { | 3869 if (_json.containsKey("id")) { |
3390 id = _json["id"]; | 3870 id = _json["id"]; |
(...skipping 13 matching lines...) Expand all Loading... |
3404 } | 3884 } |
3405 if (title != null) { | 3885 if (title != null) { |
3406 _json["title"] = title; | 3886 _json["title"] = title; |
3407 } | 3887 } |
3408 return _json; | 3888 return _json; |
3409 } | 3889 } |
3410 } | 3890 } |
3411 | 3891 |
3412 /** | 3892 /** |
3413 * A generic empty message that you can re-use to avoid defining duplicated | 3893 * A generic empty message that you can re-use to avoid defining duplicated |
3414 * empty messages in your APIs. A typical example is to use it as the request or | 3894 * empty messages in your APIs. A typical example is to use it as the request |
3415 * the response type of an API method. For instance: service Foo { rpc | 3895 * or the response type of an API method. For instance: |
3416 * Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON | 3896 * |
3417 * representation for `Empty` is empty JSON object `{}`. | 3897 * service Foo { |
| 3898 * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); |
| 3899 * } |
| 3900 * |
| 3901 * The JSON representation for `Empty` is empty JSON object `{}`. |
3418 */ | 3902 */ |
3419 class Empty { | 3903 class Empty { |
3420 | 3904 |
3421 Empty(); | 3905 Empty(); |
3422 | 3906 |
3423 Empty.fromJson(core.Map _json) { | 3907 Empty.fromJson(core.Map _json) { |
3424 } | 3908 } |
3425 | 3909 |
3426 core.Map toJson() { | 3910 core.Map toJson() { |
3427 var _json = new core.Map(); | 3911 var _json = new core.Map(); |
3428 return _json; | 3912 return _json; |
3429 } | 3913 } |
3430 } | 3914 } |
3431 | 3915 |
3432 /** Google Forms item. */ | 3916 /** Google Forms item. */ |
3433 class Form { | 3917 class Form { |
3434 /** URL of the form. */ | 3918 /** URL of the form. */ |
3435 core.String formUrl; | 3919 core.String formUrl; |
3436 /** | 3920 /** |
3437 * URL of the form responses document. Only set if respsonses have been | 3921 * URL of the form responses document. |
3438 * recorded and only when the requesting user is an editor of the form. | 3922 * Only set if respsonses have been recorded and only when the |
| 3923 * requesting user is an editor of the form. |
| 3924 * |
3439 * Read-only. | 3925 * Read-only. |
3440 */ | 3926 */ |
3441 core.String responseUrl; | 3927 core.String responseUrl; |
3442 /** URL of a thumbnail image of the Form. Read-only. */ | 3928 /** |
| 3929 * URL of a thumbnail image of the Form. |
| 3930 * |
| 3931 * Read-only. |
| 3932 */ |
3443 core.String thumbnailUrl; | 3933 core.String thumbnailUrl; |
3444 /** Title of the Form. Read-only. */ | 3934 /** |
| 3935 * Title of the Form. |
| 3936 * |
| 3937 * Read-only. |
| 3938 */ |
3445 core.String title; | 3939 core.String title; |
3446 | 3940 |
3447 Form(); | 3941 Form(); |
3448 | 3942 |
3449 Form.fromJson(core.Map _json) { | 3943 Form.fromJson(core.Map _json) { |
3450 if (_json.containsKey("formUrl")) { | 3944 if (_json.containsKey("formUrl")) { |
3451 formUrl = _json["formUrl"]; | 3945 formUrl = _json["formUrl"]; |
3452 } | 3946 } |
3453 if (_json.containsKey("responseUrl")) { | 3947 if (_json.containsKey("responseUrl")) { |
3454 responseUrl = _json["responseUrl"]; | 3948 responseUrl = _json["responseUrl"]; |
(...skipping 22 matching lines...) Expand all Loading... |
3477 } | 3971 } |
3478 return _json; | 3972 return _json; |
3479 } | 3973 } |
3480 } | 3974 } |
3481 | 3975 |
3482 /** Global user permission description. */ | 3976 /** Global user permission description. */ |
3483 class GlobalPermission { | 3977 class GlobalPermission { |
3484 /** | 3978 /** |
3485 * Permission value. | 3979 * Permission value. |
3486 * Possible string values are: | 3980 * Possible string values are: |
3487 * - "PERMISSION_UNSPECIFIED" : A PERMISSION_UNSPECIFIED. | 3981 * - "PERMISSION_UNSPECIFIED" : No permission is specified. This is not |
3488 * - "CREATE_COURSE" : A CREATE_COURSE. | 3982 * returned and is not a |
| 3983 * valid value. |
| 3984 * - "CREATE_COURSE" : User is permitted to create a course. |
3489 */ | 3985 */ |
3490 core.String permission; | 3986 core.String permission; |
3491 | 3987 |
3492 GlobalPermission(); | 3988 GlobalPermission(); |
3493 | 3989 |
3494 GlobalPermission.fromJson(core.Map _json) { | 3990 GlobalPermission.fromJson(core.Map _json) { |
3495 if (_json.containsKey("permission")) { | 3991 if (_json.containsKey("permission")) { |
3496 permission = _json["permission"]; | 3992 permission = _json["permission"]; |
3497 } | 3993 } |
3498 } | 3994 } |
(...skipping 10 matching lines...) Expand all Loading... |
3509 /** | 4005 /** |
3510 * Association between a student and a guardian of that student. The guardian | 4006 * Association between a student and a guardian of that student. The guardian |
3511 * may receive information about the student's course work. | 4007 * may receive information about the student's course work. |
3512 */ | 4008 */ |
3513 class Guardian { | 4009 class Guardian { |
3514 /** Identifier for the guardian. */ | 4010 /** Identifier for the guardian. */ |
3515 core.String guardianId; | 4011 core.String guardianId; |
3516 /** User profile for the guardian. */ | 4012 /** User profile for the guardian. */ |
3517 UserProfile guardianProfile; | 4013 UserProfile guardianProfile; |
3518 /** | 4014 /** |
3519 * The email address to which the initial guardian invitation was sent. This | 4015 * The email address to which the initial guardian invitation was sent. |
3520 * field is only visible to domain administrators. | 4016 * This field is only visible to domain administrators. |
3521 */ | 4017 */ |
3522 core.String invitedEmailAddress; | 4018 core.String invitedEmailAddress; |
3523 /** Identifier for the student to whom the guardian relationship applies. */ | 4019 /** Identifier for the student to whom the guardian relationship applies. */ |
3524 core.String studentId; | 4020 core.String studentId; |
3525 | 4021 |
3526 Guardian(); | 4022 Guardian(); |
3527 | 4023 |
3528 Guardian.fromJson(core.Map _json) { | 4024 Guardian.fromJson(core.Map _json) { |
3529 if (_json.containsKey("guardianId")) { | 4025 if (_json.containsKey("guardianId")) { |
3530 guardianId = _json["guardianId"]; | 4026 guardianId = _json["guardianId"]; |
(...skipping 25 matching lines...) Expand all Loading... |
3556 } | 4052 } |
3557 return _json; | 4053 return _json; |
3558 } | 4054 } |
3559 } | 4055 } |
3560 | 4056 |
3561 /** | 4057 /** |
3562 * An invitation to become the guardian of a specified user, sent to a specified | 4058 * An invitation to become the guardian of a specified user, sent to a specified |
3563 * email address. | 4059 * email address. |
3564 */ | 4060 */ |
3565 class GuardianInvitation { | 4061 class GuardianInvitation { |
3566 /** The time that this invitation was created. Read-only. */ | 4062 /** |
| 4063 * The time that this invitation was created. |
| 4064 * |
| 4065 * Read-only. |
| 4066 */ |
3567 core.String creationTime; | 4067 core.String creationTime; |
3568 /** Unique identifier for this invitation. Read-only. */ | 4068 /** |
| 4069 * Unique identifier for this invitation. |
| 4070 * |
| 4071 * Read-only. |
| 4072 */ |
3569 core.String invitationId; | 4073 core.String invitationId; |
3570 /** | 4074 /** |
3571 * Email address that the invitation was sent to. This field is only visible | 4075 * Email address that the invitation was sent to. |
3572 * to domain administrators. | 4076 * This field is only visible to domain administrators. |
3573 */ | 4077 */ |
3574 core.String invitedEmailAddress; | 4078 core.String invitedEmailAddress; |
3575 /** | 4079 /** |
3576 * The state that this invitation is in. | 4080 * The state that this invitation is in. |
3577 * Possible string values are: | 4081 * Possible string values are: |
3578 * - "GUARDIAN_INVITATION_STATE_UNSPECIFIED" : A | 4082 * - "GUARDIAN_INVITATION_STATE_UNSPECIFIED" : Should never be returned. |
3579 * GUARDIAN_INVITATION_STATE_UNSPECIFIED. | 4083 * - "PENDING" : The invitation is active and awaiting a response. |
3580 * - "PENDING" : A PENDING. | 4084 * - "COMPLETE" : The invitation is no longer active. It may have been |
3581 * - "COMPLETE" : A COMPLETE. | 4085 * accepted, declined, |
| 4086 * withdrawn or it may have expired. |
3582 */ | 4087 */ |
3583 core.String state; | 4088 core.String state; |
3584 /** ID of the student (in standard format) */ | 4089 /** ID of the student (in standard format) */ |
3585 core.String studentId; | 4090 core.String studentId; |
3586 | 4091 |
3587 GuardianInvitation(); | 4092 GuardianInvitation(); |
3588 | 4093 |
3589 GuardianInvitation.fromJson(core.Map _json) { | 4094 GuardianInvitation.fromJson(core.Map _json) { |
3590 if (_json.containsKey("creationTime")) { | 4095 if (_json.containsKey("creationTime")) { |
3591 creationTime = _json["creationTime"]; | 4096 creationTime = _json["creationTime"]; |
(...skipping 30 matching lines...) Expand all Loading... |
3622 _json["studentId"] = studentId; | 4127 _json["studentId"] = studentId; |
3623 } | 4128 } |
3624 return _json; | 4129 return _json; |
3625 } | 4130 } |
3626 } | 4131 } |
3627 | 4132 |
3628 /** An invitation to join a course. */ | 4133 /** An invitation to join a course. */ |
3629 class Invitation { | 4134 class Invitation { |
3630 /** Identifier of the course to invite the user to. */ | 4135 /** Identifier of the course to invite the user to. */ |
3631 core.String courseId; | 4136 core.String courseId; |
3632 /** Identifier assigned by Classroom. Read-only. */ | 4137 /** |
| 4138 * Identifier assigned by Classroom. |
| 4139 * |
| 4140 * Read-only. |
| 4141 */ |
3633 core.String id; | 4142 core.String id; |
3634 /** | 4143 /** |
3635 * Role to invite the user to have. Must not be `COURSE_ROLE_UNSPECIFIED`. | 4144 * Role to invite the user to have. |
| 4145 * Must not be `COURSE_ROLE_UNSPECIFIED`. |
3636 * Possible string values are: | 4146 * Possible string values are: |
3637 * - "COURSE_ROLE_UNSPECIFIED" : A COURSE_ROLE_UNSPECIFIED. | 4147 * - "COURSE_ROLE_UNSPECIFIED" : No course role. |
3638 * - "STUDENT" : A STUDENT. | 4148 * - "STUDENT" : Student in the course. |
3639 * - "TEACHER" : A TEACHER. | 4149 * - "TEACHER" : Teacher of the course. |
3640 */ | 4150 */ |
3641 core.String role; | 4151 core.String role; |
3642 /** | 4152 /** |
3643 * Identifier of the invited user. When specified as a parameter of a request, | 4153 * Identifier of the invited user. |
3644 * this identifier can be set to one of the following: * the numeric | 4154 * |
3645 * identifier for the user * the email address of the user * the string | 4155 * When specified as a parameter of a request, this identifier can be set to |
3646 * literal `"me"`, indicating the requesting user | 4156 * one of the following: |
| 4157 * |
| 4158 * * the numeric identifier for the user |
| 4159 * * the email address of the user |
| 4160 * * the string literal `"me"`, indicating the requesting user |
3647 */ | 4161 */ |
3648 core.String userId; | 4162 core.String userId; |
3649 | 4163 |
3650 Invitation(); | 4164 Invitation(); |
3651 | 4165 |
3652 Invitation.fromJson(core.Map _json) { | 4166 Invitation.fromJson(core.Map _json) { |
3653 if (_json.containsKey("courseId")) { | 4167 if (_json.containsKey("courseId")) { |
3654 courseId = _json["courseId"]; | 4168 courseId = _json["courseId"]; |
3655 } | 4169 } |
3656 if (_json.containsKey("id")) { | 4170 if (_json.containsKey("id")) { |
(...skipping 20 matching lines...) Expand all Loading... |
3677 } | 4191 } |
3678 if (userId != null) { | 4192 if (userId != null) { |
3679 _json["userId"] = userId; | 4193 _json["userId"] = userId; |
3680 } | 4194 } |
3681 return _json; | 4195 return _json; |
3682 } | 4196 } |
3683 } | 4197 } |
3684 | 4198 |
3685 /** URL item. */ | 4199 /** URL item. */ |
3686 class Link { | 4200 class Link { |
3687 /** URL of a thumbnail image of the target URL. Read-only. */ | 4201 /** |
| 4202 * URL of a thumbnail image of the target URL. |
| 4203 * |
| 4204 * Read-only. |
| 4205 */ |
3688 core.String thumbnailUrl; | 4206 core.String thumbnailUrl; |
3689 /** Title of the target of the URL. Read-only. */ | 4207 /** |
| 4208 * Title of the target of the URL. |
| 4209 * |
| 4210 * Read-only. |
| 4211 */ |
3690 core.String title; | 4212 core.String title; |
3691 /** | 4213 /** |
3692 * URL to link to. This must be a valid UTF-8 string containing between 1 and | 4214 * URL to link to. |
3693 * 2024 characters. | 4215 * This must be a valid UTF-8 string containing between 1 and 2024 characters. |
3694 */ | 4216 */ |
3695 core.String url; | 4217 core.String url; |
3696 | 4218 |
3697 Link(); | 4219 Link(); |
3698 | 4220 |
3699 Link.fromJson(core.Map _json) { | 4221 Link.fromJson(core.Map _json) { |
3700 if (_json.containsKey("thumbnailUrl")) { | 4222 if (_json.containsKey("thumbnailUrl")) { |
3701 thumbnailUrl = _json["thumbnailUrl"]; | 4223 thumbnailUrl = _json["thumbnailUrl"]; |
3702 } | 4224 } |
3703 if (_json.containsKey("title")) { | 4225 if (_json.containsKey("title")) { |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3851 if (nextPageToken != null) { | 4373 if (nextPageToken != null) { |
3852 _json["nextPageToken"] = nextPageToken; | 4374 _json["nextPageToken"] = nextPageToken; |
3853 } | 4375 } |
3854 return _json; | 4376 return _json; |
3855 } | 4377 } |
3856 } | 4378 } |
3857 | 4379 |
3858 /** Response when listing guardians. */ | 4380 /** Response when listing guardians. */ |
3859 class ListGuardiansResponse { | 4381 class ListGuardiansResponse { |
3860 /** | 4382 /** |
3861 * Guardians on this page of results that met the criteria specified in the | 4383 * Guardians on this page of results that met the criteria specified in |
3862 * request. | 4384 * the request. |
3863 */ | 4385 */ |
3864 core.List<Guardian> guardians; | 4386 core.List<Guardian> guardians; |
3865 /** | 4387 /** |
3866 * Token identifying the next page of results to return. If empty, no further | 4388 * Token identifying the next page of results to return. If empty, no further |
3867 * results are available. | 4389 * results are available. |
3868 */ | 4390 */ |
3869 core.String nextPageToken; | 4391 core.String nextPageToken; |
3870 | 4392 |
3871 ListGuardiansResponse(); | 4393 ListGuardiansResponse(); |
3872 | 4394 |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4017 _json["nextPageToken"] = nextPageToken; | 4539 _json["nextPageToken"] = nextPageToken; |
4018 } | 4540 } |
4019 if (teachers != null) { | 4541 if (teachers != null) { |
4020 _json["teachers"] = teachers.map((value) => (value).toJson()).toList(); | 4542 _json["teachers"] = teachers.map((value) => (value).toJson()).toList(); |
4021 } | 4543 } |
4022 return _json; | 4544 return _json; |
4023 } | 4545 } |
4024 } | 4546 } |
4025 | 4547 |
4026 /** | 4548 /** |
4027 * Material attached to course work. When creating attachments, setting the | 4549 * Material attached to course work. |
4028 * `form` field is not supported. | 4550 * |
| 4551 * When creating attachments, setting the `form` field is not supported. |
4029 */ | 4552 */ |
4030 class Material { | 4553 class Material { |
4031 /** Google Drive file material. */ | 4554 /** Google Drive file material. */ |
4032 SharedDriveFile driveFile; | 4555 SharedDriveFile driveFile; |
4033 /** Google Forms material. */ | 4556 /** Google Forms material. */ |
4034 Form form; | 4557 Form form; |
4035 /** | 4558 /** |
4036 * Link material. On creation, will be upgraded to a more appropriate type if | 4559 * Link material. On creation, will be upgraded to a more appropriate type |
4037 * possible, and this will be reflected in the response. | 4560 * if possible, and this will be reflected in the response. |
4038 */ | 4561 */ |
4039 Link link; | 4562 Link link; |
4040 /** YouTube video material. */ | 4563 /** YouTube video material. */ |
4041 YouTubeVideo youtubeVideo; | 4564 YouTubeVideo youtubeVideo; |
4042 | 4565 |
4043 Material(); | 4566 Material(); |
4044 | 4567 |
4045 Material.fromJson(core.Map _json) { | 4568 Material.fromJson(core.Map _json) { |
4046 if (_json.containsKey("driveFile")) { | 4569 if (_json.containsKey("driveFile")) { |
4047 driveFile = new SharedDriveFile.fromJson(_json["driveFile"]); | 4570 driveFile = new SharedDriveFile.fromJson(_json["driveFile"]); |
(...skipping 23 matching lines...) Expand all Loading... |
4071 if (youtubeVideo != null) { | 4594 if (youtubeVideo != null) { |
4072 _json["youtubeVideo"] = (youtubeVideo).toJson(); | 4595 _json["youtubeVideo"] = (youtubeVideo).toJson(); |
4073 } | 4596 } |
4074 return _json; | 4597 return _json; |
4075 } | 4598 } |
4076 } | 4599 } |
4077 | 4600 |
4078 /** Request to modify the attachments of a student submission. */ | 4601 /** Request to modify the attachments of a student submission. */ |
4079 class ModifyAttachmentsRequest { | 4602 class ModifyAttachmentsRequest { |
4080 /** | 4603 /** |
4081 * Attachments to add. A student submission may not have more than 20 | 4604 * Attachments to add. |
4082 * attachments. Form attachments are not supported. | 4605 * A student submission may not have more than 20 attachments. |
| 4606 * |
| 4607 * Form attachments are not supported. |
4083 */ | 4608 */ |
4084 core.List<Attachment> addAttachments; | 4609 core.List<Attachment> addAttachments; |
4085 | 4610 |
4086 ModifyAttachmentsRequest(); | 4611 ModifyAttachmentsRequest(); |
4087 | 4612 |
4088 ModifyAttachmentsRequest.fromJson(core.Map _json) { | 4613 ModifyAttachmentsRequest.fromJson(core.Map _json) { |
4089 if (_json.containsKey("addAttachments")) { | 4614 if (_json.containsKey("addAttachments")) { |
4090 addAttachments = _json["addAttachments"].map((value) => new Attachment.fro
mJson(value)).toList(); | 4615 addAttachments = _json["addAttachments"].map((value) => new Attachment.fro
mJson(value)).toList(); |
4091 } | 4616 } |
4092 } | 4617 } |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4139 var _json = new core.Map(); | 4664 var _json = new core.Map(); |
4140 if (answer != null) { | 4665 if (answer != null) { |
4141 _json["answer"] = answer; | 4666 _json["answer"] = answer; |
4142 } | 4667 } |
4143 return _json; | 4668 return _json; |
4144 } | 4669 } |
4145 } | 4670 } |
4146 | 4671 |
4147 /** Details of the user's name. */ | 4672 /** Details of the user's name. */ |
4148 class Name { | 4673 class Name { |
4149 /** The user's last name. Read-only. */ | 4674 /** |
| 4675 * The user's last name. |
| 4676 * |
| 4677 * Read-only. |
| 4678 */ |
4150 core.String familyName; | 4679 core.String familyName; |
4151 /** | 4680 /** |
4152 * The user's full name formed by concatenating the first and last name | 4681 * The user's full name formed by concatenating the first and last name |
4153 * values. Read-only. | 4682 * values. |
| 4683 * |
| 4684 * Read-only. |
4154 */ | 4685 */ |
4155 core.String fullName; | 4686 core.String fullName; |
4156 /** The user's first name. Read-only. */ | 4687 /** |
| 4688 * The user's first name. |
| 4689 * |
| 4690 * Read-only. |
| 4691 */ |
4157 core.String givenName; | 4692 core.String givenName; |
4158 | 4693 |
4159 Name(); | 4694 Name(); |
4160 | 4695 |
4161 Name.fromJson(core.Map _json) { | 4696 Name.fromJson(core.Map _json) { |
4162 if (_json.containsKey("familyName")) { | 4697 if (_json.containsKey("familyName")) { |
4163 familyName = _json["familyName"]; | 4698 familyName = _json["familyName"]; |
4164 } | 4699 } |
4165 if (_json.containsKey("fullName")) { | 4700 if (_json.containsKey("fullName")) { |
4166 fullName = _json["fullName"]; | 4701 fullName = _json["fullName"]; |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4213 } | 4748 } |
4214 } | 4749 } |
4215 | 4750 |
4216 /** Drive file that is used as material for course work. */ | 4751 /** Drive file that is used as material for course work. */ |
4217 class SharedDriveFile { | 4752 class SharedDriveFile { |
4218 /** Drive file details. */ | 4753 /** Drive file details. */ |
4219 DriveFile driveFile; | 4754 DriveFile driveFile; |
4220 /** | 4755 /** |
4221 * Mechanism by which students access the Drive item. | 4756 * Mechanism by which students access the Drive item. |
4222 * Possible string values are: | 4757 * Possible string values are: |
4223 * - "UNKNOWN_SHARE_MODE" : A UNKNOWN_SHARE_MODE. | 4758 * - "UNKNOWN_SHARE_MODE" : No sharing mode specified. This should never be |
4224 * - "VIEW" : A VIEW. | 4759 * returned. |
4225 * - "EDIT" : A EDIT. | 4760 * - "VIEW" : Students can view the shared file. |
4226 * - "STUDENT_COPY" : A STUDENT_COPY. | 4761 * - "EDIT" : Students can edit the shared file. |
| 4762 * - "STUDENT_COPY" : Students have a personal copy of the shared file. |
4227 */ | 4763 */ |
4228 core.String shareMode; | 4764 core.String shareMode; |
4229 | 4765 |
4230 SharedDriveFile(); | 4766 SharedDriveFile(); |
4231 | 4767 |
4232 SharedDriveFile.fromJson(core.Map _json) { | 4768 SharedDriveFile.fromJson(core.Map _json) { |
4233 if (_json.containsKey("driveFile")) { | 4769 if (_json.containsKey("driveFile")) { |
4234 driveFile = new DriveFile.fromJson(_json["driveFile"]); | 4770 driveFile = new DriveFile.fromJson(_json["driveFile"]); |
4235 } | 4771 } |
4236 if (_json.containsKey("shareMode")) { | 4772 if (_json.containsKey("shareMode")) { |
(...skipping 30 matching lines...) Expand all Loading... |
4267 var _json = new core.Map(); | 4803 var _json = new core.Map(); |
4268 if (answer != null) { | 4804 if (answer != null) { |
4269 _json["answer"] = answer; | 4805 _json["answer"] = answer; |
4270 } | 4806 } |
4271 return _json; | 4807 return _json; |
4272 } | 4808 } |
4273 } | 4809 } |
4274 | 4810 |
4275 /** Student in a course. */ | 4811 /** Student in a course. */ |
4276 class Student { | 4812 class Student { |
4277 /** Identifier of the course. Read-only. */ | 4813 /** |
| 4814 * Identifier of the course. |
| 4815 * |
| 4816 * Read-only. |
| 4817 */ |
4278 core.String courseId; | 4818 core.String courseId; |
4279 /** Global user information for the student. Read-only. */ | 4819 /** |
| 4820 * Global user information for the student. |
| 4821 * |
| 4822 * Read-only. |
| 4823 */ |
4280 UserProfile profile; | 4824 UserProfile profile; |
4281 /** | 4825 /** |
4282 * Information about a Drive Folder for this student's work in this course. | 4826 * Information about a Drive Folder for this student's work in this course. |
4283 * Only visible to the student and domain administrators. Read-only. | 4827 * Only visible to the student and domain administrators. |
| 4828 * |
| 4829 * Read-only. |
4284 */ | 4830 */ |
4285 DriveFolder studentWorkFolder; | 4831 DriveFolder studentWorkFolder; |
4286 /** | 4832 /** |
4287 * Identifier of the user. When specified as a parameter of a request, this | 4833 * Identifier of the user. |
4288 * identifier can be one of the following: * the numeric identifier for the | 4834 * |
4289 * user * the email address of the user * the string literal `"me"`, | 4835 * When specified as a parameter of a request, this identifier can be one of |
4290 * indicating the requesting user | 4836 * the following: |
| 4837 * |
| 4838 * * the numeric identifier for the user |
| 4839 * * the email address of the user |
| 4840 * * the string literal `"me"`, indicating the requesting user |
4291 */ | 4841 */ |
4292 core.String userId; | 4842 core.String userId; |
4293 | 4843 |
4294 Student(); | 4844 Student(); |
4295 | 4845 |
4296 Student.fromJson(core.Map _json) { | 4846 Student.fromJson(core.Map _json) { |
4297 if (_json.containsKey("courseId")) { | 4847 if (_json.containsKey("courseId")) { |
4298 courseId = _json["courseId"]; | 4848 courseId = _json["courseId"]; |
4299 } | 4849 } |
4300 if (_json.containsKey("profile")) { | 4850 if (_json.containsKey("profile")) { |
(...skipping 19 matching lines...) Expand all Loading... |
4320 _json["studentWorkFolder"] = (studentWorkFolder).toJson(); | 4870 _json["studentWorkFolder"] = (studentWorkFolder).toJson(); |
4321 } | 4871 } |
4322 if (userId != null) { | 4872 if (userId != null) { |
4323 _json["userId"] = userId; | 4873 _json["userId"] = userId; |
4324 } | 4874 } |
4325 return _json; | 4875 return _json; |
4326 } | 4876 } |
4327 } | 4877 } |
4328 | 4878 |
4329 /** | 4879 /** |
4330 * Student submission for course work. StudentSubmission items are generated | 4880 * Student submission for course work. |
4331 * when a CourseWork item is created. StudentSubmissions that have never been | 4881 * |
4332 * accessed (i.e. with `state` = NEW) may not have a creation time or update | 4882 * StudentSubmission items are generated when a CourseWork item is created. |
4333 * time. | 4883 * |
| 4884 * StudentSubmissions that have never been accessed (i.e. with `state` = NEW) |
| 4885 * may not have a creation time or update time. |
4334 */ | 4886 */ |
4335 class StudentSubmission { | 4887 class StudentSubmission { |
4336 /** Absolute link to the submission in the Classroom web UI. Read-only. */ | 4888 /** |
| 4889 * Absolute link to the submission in the Classroom web UI. |
| 4890 * |
| 4891 * Read-only. |
| 4892 */ |
4337 core.String alternateLink; | 4893 core.String alternateLink; |
4338 /** | 4894 /** |
4339 * Optional grade. If unset, no grade was set. This must be a non-negative | 4895 * Optional grade. If unset, no grade was set. |
4340 * integer value. This may be modified only by course teachers. | 4896 * This must be a non-negative integer value. |
| 4897 * |
| 4898 * This may be modified only by course teachers. |
4341 */ | 4899 */ |
4342 core.double assignedGrade; | 4900 core.double assignedGrade; |
4343 /** Submission content when course_work_type is ASSIGNMENT . */ | 4901 /** Submission content when course_work_type is ASSIGNMENT . */ |
4344 AssignmentSubmission assignmentSubmission; | 4902 AssignmentSubmission assignmentSubmission; |
4345 /** | 4903 /** |
4346 * Whether this student submission is associated with the Developer Console | 4904 * Whether this student submission is associated with the Developer Console |
4347 * project making the request. See google.classroom.Work.CreateCourseWork for | 4905 * project making the request. |
4348 * more details. Read-only. | 4906 * |
| 4907 * See google.classroom.Work.CreateCourseWork for more |
| 4908 * details. |
| 4909 * |
| 4910 * Read-only. |
4349 */ | 4911 */ |
4350 core.bool associatedWithDeveloper; | 4912 core.bool associatedWithDeveloper; |
4351 /** Identifier of the course. Read-only. */ | 4913 /** |
| 4914 * Identifier of the course. |
| 4915 * |
| 4916 * Read-only. |
| 4917 */ |
4352 core.String courseId; | 4918 core.String courseId; |
4353 /** Identifier for the course work this corresponds to. Read-only. */ | 4919 /** |
| 4920 * Identifier for the course work this corresponds to. |
| 4921 * |
| 4922 * Read-only. |
| 4923 */ |
4354 core.String courseWorkId; | 4924 core.String courseWorkId; |
4355 /** | 4925 /** |
4356 * Type of course work this submission is for. Read-only. | 4926 * Type of course work this submission is for. |
| 4927 * |
| 4928 * Read-only. |
4357 * Possible string values are: | 4929 * Possible string values are: |
4358 * - "COURSE_WORK_TYPE_UNSPECIFIED" : A COURSE_WORK_TYPE_UNSPECIFIED. | 4930 * - "COURSE_WORK_TYPE_UNSPECIFIED" : No work type specified. This is never |
4359 * - "ASSIGNMENT" : A ASSIGNMENT. | 4931 * returned. |
4360 * - "SHORT_ANSWER_QUESTION" : A SHORT_ANSWER_QUESTION. | 4932 * - "ASSIGNMENT" : An assignment. |
4361 * - "MULTIPLE_CHOICE_QUESTION" : A MULTIPLE_CHOICE_QUESTION. | 4933 * - "SHORT_ANSWER_QUESTION" : A short answer question. |
| 4934 * - "MULTIPLE_CHOICE_QUESTION" : A multiple-choice question. |
4362 */ | 4935 */ |
4363 core.String courseWorkType; | 4936 core.String courseWorkType; |
4364 /** | 4937 /** |
4365 * Creation time of this submission. This may be unset if the student has not | 4938 * Creation time of this submission. |
4366 * accessed this item. Read-only. | 4939 * This may be unset if the student has not accessed this item. |
| 4940 * |
| 4941 * Read-only. |
4367 */ | 4942 */ |
4368 core.String creationTime; | 4943 core.String creationTime; |
4369 /** | 4944 /** |
4370 * Optional pending grade. If unset, no grade was set. This must be a | 4945 * Optional pending grade. If unset, no grade was set. |
4371 * non-negative integer value. This is only visible to and modifiable by | 4946 * This must be a non-negative integer value. |
4372 * course teachers. | 4947 * |
| 4948 * This is only visible to and modifiable by course teachers. |
4373 */ | 4949 */ |
4374 core.double draftGrade; | 4950 core.double draftGrade; |
4375 /** | 4951 /** |
4376 * Classroom-assigned Identifier for the student submission. This is unique | 4952 * Classroom-assigned Identifier for the student submission. |
4377 * among submissions for the relevant course work. Read-only. | 4953 * This is unique among submissions for the relevant course work. |
| 4954 * |
| 4955 * Read-only. |
4378 */ | 4956 */ |
4379 core.String id; | 4957 core.String id; |
4380 /** Whether this submission is late. Read-only. */ | 4958 /** |
| 4959 * Whether this submission is late. |
| 4960 * |
| 4961 * Read-only. |
| 4962 */ |
4381 core.bool late; | 4963 core.bool late; |
4382 /** Submission content when course_work_type is MULTIPLE_CHOICE_QUESTION. */ | 4964 /** Submission content when course_work_type is MULTIPLE_CHOICE_QUESTION. */ |
4383 MultipleChoiceSubmission multipleChoiceSubmission; | 4965 MultipleChoiceSubmission multipleChoiceSubmission; |
4384 /** Submission content when course_work_type is SHORT_ANSWER_QUESTION. */ | 4966 /** Submission content when course_work_type is SHORT_ANSWER_QUESTION. */ |
4385 ShortAnswerSubmission shortAnswerSubmission; | 4967 ShortAnswerSubmission shortAnswerSubmission; |
4386 /** | 4968 /** |
4387 * State of this submission. Read-only. | 4969 * State of this submission. |
| 4970 * |
| 4971 * Read-only. |
4388 * Possible string values are: | 4972 * Possible string values are: |
4389 * - "SUBMISSION_STATE_UNSPECIFIED" : A SUBMISSION_STATE_UNSPECIFIED. | 4973 * - "SUBMISSION_STATE_UNSPECIFIED" : No state specified. This should never be |
4390 * - "NEW" : A NEW. | 4974 * returned. |
4391 * - "CREATED" : A CREATED. | 4975 * - "NEW" : The student has never accessed this submission. Attachments are |
4392 * - "TURNED_IN" : A TURNED_IN. | 4976 * not |
4393 * - "RETURNED" : A RETURNED. | 4977 * returned and timestamps is not set. |
4394 * - "RECLAIMED_BY_STUDENT" : A RECLAIMED_BY_STUDENT. | 4978 * - "CREATED" : Has been created. |
| 4979 * - "TURNED_IN" : Has been turned in to the teacher. |
| 4980 * - "RETURNED" : Has been returned to the student. |
| 4981 * - "RECLAIMED_BY_STUDENT" : Student chose to "unsubmit" the assignment. |
4395 */ | 4982 */ |
4396 core.String state; | 4983 core.String state; |
4397 /** | 4984 /** |
4398 * Last update time of this submission. This may be unset if the student has | 4985 * Last update time of this submission. |
4399 * not accessed this item. Read-only. | 4986 * This may be unset if the student has not accessed this item. |
| 4987 * |
| 4988 * Read-only. |
4400 */ | 4989 */ |
4401 core.String updateTime; | 4990 core.String updateTime; |
4402 /** Identifier for the student that owns this submission. Read-only. */ | 4991 /** |
| 4992 * Identifier for the student that owns this submission. |
| 4993 * |
| 4994 * Read-only. |
| 4995 */ |
4403 core.String userId; | 4996 core.String userId; |
4404 | 4997 |
4405 StudentSubmission(); | 4998 StudentSubmission(); |
4406 | 4999 |
4407 StudentSubmission.fromJson(core.Map _json) { | 5000 StudentSubmission.fromJson(core.Map _json) { |
4408 if (_json.containsKey("alternateLink")) { | 5001 if (_json.containsKey("alternateLink")) { |
4409 alternateLink = _json["alternateLink"]; | 5002 alternateLink = _json["alternateLink"]; |
4410 } | 5003 } |
4411 if (_json.containsKey("assignedGrade")) { | 5004 if (_json.containsKey("assignedGrade")) { |
4412 assignedGrade = _json["assignedGrade"]; | 5005 assignedGrade = _json["assignedGrade"]; |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4504 } | 5097 } |
4505 if (userId != null) { | 5098 if (userId != null) { |
4506 _json["userId"] = userId; | 5099 _json["userId"] = userId; |
4507 } | 5100 } |
4508 return _json; | 5101 return _json; |
4509 } | 5102 } |
4510 } | 5103 } |
4511 | 5104 |
4512 /** Teacher of a course. */ | 5105 /** Teacher of a course. */ |
4513 class Teacher { | 5106 class Teacher { |
4514 /** Identifier of the course. Read-only. */ | 5107 /** |
| 5108 * Identifier of the course. |
| 5109 * |
| 5110 * Read-only. |
| 5111 */ |
4515 core.String courseId; | 5112 core.String courseId; |
4516 /** Global user information for the teacher. Read-only. */ | 5113 /** |
| 5114 * Global user information for the teacher. |
| 5115 * |
| 5116 * Read-only. |
| 5117 */ |
4517 UserProfile profile; | 5118 UserProfile profile; |
4518 /** | 5119 /** |
4519 * Identifier of the user. When specified as a parameter of a request, this | 5120 * Identifier of the user. |
4520 * identifier can be one of the following: * the numeric identifier for the | 5121 * |
4521 * user * the email address of the user * the string literal `"me"`, | 5122 * When specified as a parameter of a request, this identifier can be one of |
4522 * indicating the requesting user | 5123 * the following: |
| 5124 * |
| 5125 * * the numeric identifier for the user |
| 5126 * * the email address of the user |
| 5127 * * the string literal `"me"`, indicating the requesting user |
4523 */ | 5128 */ |
4524 core.String userId; | 5129 core.String userId; |
4525 | 5130 |
4526 Teacher(); | 5131 Teacher(); |
4527 | 5132 |
4528 Teacher.fromJson(core.Map _json) { | 5133 Teacher.fromJson(core.Map _json) { |
4529 if (_json.containsKey("courseId")) { | 5134 if (_json.containsKey("courseId")) { |
4530 courseId = _json["courseId"]; | 5135 courseId = _json["courseId"]; |
4531 } | 5136 } |
4532 if (_json.containsKey("profile")) { | 5137 if (_json.containsKey("profile")) { |
(...skipping 14 matching lines...) Expand all Loading... |
4547 } | 5152 } |
4548 if (userId != null) { | 5153 if (userId != null) { |
4549 _json["userId"] = userId; | 5154 _json["userId"] = userId; |
4550 } | 5155 } |
4551 return _json; | 5156 return _json; |
4552 } | 5157 } |
4553 } | 5158 } |
4554 | 5159 |
4555 /** | 5160 /** |
4556 * Represents a time of day. The date and time zone are either not significant | 5161 * Represents a time of day. The date and time zone are either not significant |
4557 * or are specified elsewhere. An API may chose to allow leap seconds. Related | 5162 * or are specified elsewhere. An API may choose to allow leap seconds. Related |
4558 * types are google.type.Date and `google.protobuf.Timestamp`. | 5163 * types are google.type.Date and `google.protobuf.Timestamp`. |
4559 */ | 5164 */ |
4560 class TimeOfDay { | 5165 class TimeOfDay { |
4561 /** | 5166 /** |
4562 * Hours of day in 24 hour format. Should be from 0 to 23. An API may choose | 5167 * Hours of day in 24 hour format. Should be from 0 to 23. An API may choose |
4563 * to allow the value "24:00:00" for scenarios like business closing time. | 5168 * to allow the value "24:00:00" for scenarios like business closing time. |
4564 */ | 5169 */ |
4565 core.int hours; | 5170 core.int hours; |
4566 /** Minutes of hour of day. Must be from 0 to 59. */ | 5171 /** Minutes of hour of day. Must be from 0 to 59. */ |
4567 core.int minutes; | 5172 core.int minutes; |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4617 } | 5222 } |
4618 | 5223 |
4619 core.Map toJson() { | 5224 core.Map toJson() { |
4620 var _json = new core.Map(); | 5225 var _json = new core.Map(); |
4621 return _json; | 5226 return _json; |
4622 } | 5227 } |
4623 } | 5228 } |
4624 | 5229 |
4625 /** Global information for a user. */ | 5230 /** Global information for a user. */ |
4626 class UserProfile { | 5231 class UserProfile { |
4627 /** Email address of the user. Read-only. */ | 5232 /** |
| 5233 * Email address of the user. |
| 5234 * |
| 5235 * Read-only. |
| 5236 */ |
4628 core.String emailAddress; | 5237 core.String emailAddress; |
4629 /** Identifier of the user. Read-only. */ | 5238 /** |
| 5239 * Identifier of the user. |
| 5240 * |
| 5241 * Read-only. |
| 5242 */ |
4630 core.String id; | 5243 core.String id; |
4631 /** Name of the user. Read-only. */ | 5244 /** |
| 5245 * Name of the user. |
| 5246 * |
| 5247 * Read-only. |
| 5248 */ |
4632 Name name; | 5249 Name name; |
4633 /** Global permissions of the user. Read-only. */ | 5250 /** |
| 5251 * Global permissions of the user. |
| 5252 * |
| 5253 * Read-only. |
| 5254 */ |
4634 core.List<GlobalPermission> permissions; | 5255 core.List<GlobalPermission> permissions; |
4635 /** URL of user's profile photo. Read-only. */ | 5256 /** |
| 5257 * URL of user's profile photo. |
| 5258 * |
| 5259 * Read-only. |
| 5260 */ |
4636 core.String photoUrl; | 5261 core.String photoUrl; |
4637 | 5262 |
4638 UserProfile(); | 5263 UserProfile(); |
4639 | 5264 |
4640 UserProfile.fromJson(core.Map _json) { | 5265 UserProfile.fromJson(core.Map _json) { |
4641 if (_json.containsKey("emailAddress")) { | 5266 if (_json.containsKey("emailAddress")) { |
4642 emailAddress = _json["emailAddress"]; | 5267 emailAddress = _json["emailAddress"]; |
4643 } | 5268 } |
4644 if (_json.containsKey("id")) { | 5269 if (_json.containsKey("id")) { |
4645 id = _json["id"]; | 5270 id = _json["id"]; |
(...skipping 25 matching lines...) Expand all Loading... |
4671 } | 5296 } |
4672 if (photoUrl != null) { | 5297 if (photoUrl != null) { |
4673 _json["photoUrl"] = photoUrl; | 5298 _json["photoUrl"] = photoUrl; |
4674 } | 5299 } |
4675 return _json; | 5300 return _json; |
4676 } | 5301 } |
4677 } | 5302 } |
4678 | 5303 |
4679 /** YouTube video item. */ | 5304 /** YouTube video item. */ |
4680 class YouTubeVideo { | 5305 class YouTubeVideo { |
4681 /** URL that can be used to view the YouTube video. Read-only. */ | 5306 /** |
| 5307 * URL that can be used to view the YouTube video. |
| 5308 * |
| 5309 * Read-only. |
| 5310 */ |
4682 core.String alternateLink; | 5311 core.String alternateLink; |
4683 /** YouTube API resource ID. */ | 5312 /** YouTube API resource ID. */ |
4684 core.String id; | 5313 core.String id; |
4685 /** URL of a thumbnail image of the YouTube video. Read-only. */ | 5314 /** |
| 5315 * URL of a thumbnail image of the YouTube video. |
| 5316 * |
| 5317 * Read-only. |
| 5318 */ |
4686 core.String thumbnailUrl; | 5319 core.String thumbnailUrl; |
4687 /** Title of the YouTube video. Read-only. */ | 5320 /** |
| 5321 * Title of the YouTube video. |
| 5322 * |
| 5323 * Read-only. |
| 5324 */ |
4688 core.String title; | 5325 core.String title; |
4689 | 5326 |
4690 YouTubeVideo(); | 5327 YouTubeVideo(); |
4691 | 5328 |
4692 YouTubeVideo.fromJson(core.Map _json) { | 5329 YouTubeVideo.fromJson(core.Map _json) { |
4693 if (_json.containsKey("alternateLink")) { | 5330 if (_json.containsKey("alternateLink")) { |
4694 alternateLink = _json["alternateLink"]; | 5331 alternateLink = _json["alternateLink"]; |
4695 } | 5332 } |
4696 if (_json.containsKey("id")) { | 5333 if (_json.containsKey("id")) { |
4697 id = _json["id"]; | 5334 id = _json["id"]; |
(...skipping 16 matching lines...) Expand all Loading... |
4714 } | 5351 } |
4715 if (thumbnailUrl != null) { | 5352 if (thumbnailUrl != null) { |
4716 _json["thumbnailUrl"] = thumbnailUrl; | 5353 _json["thumbnailUrl"] = thumbnailUrl; |
4717 } | 5354 } |
4718 if (title != null) { | 5355 if (title != null) { |
4719 _json["title"] = title; | 5356 _json["title"] = title; |
4720 } | 5357 } |
4721 return _json; | 5358 return _json; |
4722 } | 5359 } |
4723 } | 5360 } |
OLD | NEW |