@maxim_mazurok/gapi.client.classroom-v1 0.0.20220806

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts ADDED
@@ -0,0 +1,3712 @@
1
+ /* Type definitions for non-npm package Google Classroom API v1 0.0 */
2
+ // Project: https://developers.google.com/classroom/
3
+ // Definitions by: Maxim Mazurok <https://github.com/Maxim-Mazurok>
4
+ // Nick Amoscato <https://github.com/namoscato>
5
+ // Declan Vong <https://github.com/declanvong>
6
+ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
7
+ // TypeScript Version: 2.8
8
+
9
+ // IMPORTANT
10
+ // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
11
+ // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
12
+ // Generated from: https://classroom.googleapis.com/$discovery/rest?version=v1
13
+ // Revision: 20220806
14
+
15
+ /// <reference types="gapi.client" />
16
+
17
+ declare namespace gapi.client {
18
+ /** Load Google Classroom API v1 */
19
+ function load(urlOrObject: "https://classroom.googleapis.com/$discovery/rest?version=v1"): Promise<void>;
20
+ /** @deprecated Please load APIs with discovery documents. */
21
+ function load(name: "classroom", version: "v1"): Promise<void>;
22
+ /** @deprecated Please load APIs with discovery documents. */
23
+ function load(name: "classroom", version: "v1", callback: () => any): void;
24
+
25
+ namespace classroom {
26
+ interface Announcement {
27
+ /** Absolute link to this announcement in the Classroom web UI. This is only populated if `state` is `PUBLISHED`. Read-only. */
28
+ alternateLink?: string;
29
+ /** Assignee mode of the announcement. If unspecified, the default value is `ALL_STUDENTS`. */
30
+ assigneeMode?: string;
31
+ /** Identifier of the course. Read-only. */
32
+ courseId?: string;
33
+ /** Timestamp when this announcement was created. Read-only. */
34
+ creationTime?: string;
35
+ /** Identifier for the user that created the announcement. Read-only. */
36
+ creatorUserId?: string;
37
+ /** Classroom-assigned identifier of this announcement, unique per course. Read-only. */
38
+ id?: string;
39
+ /**
40
+ * Identifiers of students with access to the announcement. This field is set only if `assigneeMode` is `INDIVIDUAL_STUDENTS`. If the `assigneeMode` is `INDIVIDUAL_STUDENTS`, then only
41
+ * students specified in this field can see the announcement.
42
+ */
43
+ individualStudentsOptions?: IndividualStudentsOptions;
44
+ /** Additional materials. Announcements must have no more than 20 material items. */
45
+ materials?: Material[];
46
+ /** Optional timestamp when this announcement is scheduled to be published. */
47
+ scheduledTime?: string;
48
+ /** Status of this announcement. If unspecified, the default state is `DRAFT`. */
49
+ state?: string;
50
+ /** Description of this announcement. The text must be a valid UTF-8 string containing no more than 30,000 characters. */
51
+ text?: string;
52
+ /** Timestamp of the most recent change to this announcement. Read-only. */
53
+ updateTime?: string;
54
+ }
55
+ interface Assignment {
56
+ /** Drive folder where attachments from student submissions are placed. This is only populated for course teachers and administrators. */
57
+ studentWorkFolder?: DriveFolder;
58
+ }
59
+ interface AssignmentSubmission {
60
+ /**
61
+ * Attachments added by the student. Drive files that correspond to materials with a share mode of STUDENT_COPY may not exist yet if the student has not accessed the assignment in
62
+ * Classroom. Some attachment metadata is only populated if the requesting user has permission to access it. Identifier and alternate_link fields are always available, but others (for
63
+ * example, title) may not be.
64
+ */
65
+ attachments?: Attachment[];
66
+ }
67
+ interface Attachment {
68
+ /** Google Drive file attachment. */
69
+ driveFile?: DriveFile;
70
+ /** Google Forms attachment. */
71
+ form?: Form;
72
+ /** Link attachment. */
73
+ link?: Link;
74
+ /** Youtube video attachment. */
75
+ youTubeVideo?: YouTubeVideo;
76
+ }
77
+ interface CloudPubsubTopic {
78
+ /** The `name` field of a Cloud Pub/Sub [Topic](https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.topics#Topic). */
79
+ topicName?: string;
80
+ }
81
+ interface Course {
82
+ /** Absolute link to this course in the Classroom web UI. Read-only. */
83
+ alternateLink?: string;
84
+ /** The Calendar ID for a calendar that all course members can see, to which Classroom adds events for course work and announcements in the course. Read-only. */
85
+ calendarId?: string;
86
+ /** The email address of a Google group containing all members of the course. This group does not accept email and can only be used for permissions. Read-only. */
87
+ courseGroupEmail?: string;
88
+ /** Sets of materials that appear on the "about" page of this course. Read-only. */
89
+ courseMaterialSets?: CourseMaterialSet[];
90
+ /** State of the course. If unspecified, the default state is `PROVISIONED`. */
91
+ courseState?: string;
92
+ /** Creation time of the course. Specifying this field in a course update mask results in an error. Read-only. */
93
+ creationTime?: string;
94
+ /**
95
+ * Optional description. For example, "We'll be learning about the structure of living creatures from a combination of textbooks, guest lectures, and lab work. Expect to be excited!"
96
+ * If set, this field must be a valid UTF-8 string and no longer than 30,000 characters.
97
+ */
98
+ description?: string;
99
+ /** Optional heading for the description. For example, "Welcome to 10th Grade Biology." If set, this field must be a valid UTF-8 string and no longer than 3600 characters. */
100
+ descriptionHeading?: string;
101
+ /** Enrollment code to use when joining this course. Specifying this field in a course update mask results in an error. Read-only. */
102
+ enrollmentCode?: string;
103
+ /** The gradebook settings that specify how a student's overall grade for the course will be calculated and who it will be displayed to. Read-only */
104
+ gradebookSettings?: GradebookSettings;
105
+ /** Whether or not guardian notifications are enabled for this course. Read-only. */
106
+ guardiansEnabled?: boolean;
107
+ /**
108
+ * Identifier for this course assigned by Classroom. When creating a course, you may optionally set this identifier to an alias string in the request to create a corresponding alias.
109
+ * The `id` is still assigned by Classroom and cannot be updated after the course is created. Specifying this field in a course update mask results in an error.
110
+ */
111
+ id?: string;
112
+ /** Name of the course. For example, "10th Grade Biology". The name is required. It must be between 1 and 750 characters and a valid UTF-8 string. */
113
+ name?: string;
114
+ /**
115
+ * The identifier of the owner of a course. When specified as a parameter of a create course request, this field is required. The identifier can be one of the following: * the numeric
116
+ * identifier for the user * the email address of the user * the string literal `"me"`, indicating the requesting user This must be set in a create request. Admins can also specify
117
+ * this field in a patch course request to transfer ownership. In other contexts, it is read-only.
118
+ */
119
+ ownerId?: string;
120
+ /** Optional room location. For example, "301". If set, this field must be a valid UTF-8 string and no longer than 650 characters. */
121
+ room?: string;
122
+ /** Section of the course. For example, "Period 2". If set, this field must be a valid UTF-8 string and no longer than 2800 characters. */
123
+ section?: string;
124
+ /** Information about a Drive Folder that is shared with all teachers of the course. This field will only be set for teachers of the course and domain administrators. Read-only. */
125
+ teacherFolder?: DriveFolder;
126
+ /** The email address of a Google group containing all teachers of the course. This group does not accept email and can only be used for permissions. Read-only. */
127
+ teacherGroupEmail?: string;
128
+ /** Time of the most recent update to this course. Specifying this field in a course update mask results in an error. Read-only. */
129
+ updateTime?: string;
130
+ }
131
+ interface CourseAlias {
132
+ /**
133
+ * Alias string. The format of the string indicates the desired alias scoping. * `d:` indicates a domain-scoped alias. Example: `d:math_101` * `p:` indicates a project-scoped alias.
134
+ * Example: `p:abc123` This field has a maximum length of 256 characters.
135
+ */
136
+ alias?: string;
137
+ }
138
+ interface CourseMaterial {
139
+ /** Google Drive file attachment. */
140
+ driveFile?: DriveFile;
141
+ /** Google Forms attachment. */
142
+ form?: Form;
143
+ /** Link atatchment. */
144
+ link?: Link;
145
+ /** Youtube video attachment. */
146
+ youTubeVideo?: YouTubeVideo;
147
+ }
148
+ interface CourseMaterialSet {
149
+ /** Materials attached to this set. */
150
+ materials?: CourseMaterial[];
151
+ /** Title for this set. */
152
+ title?: string;
153
+ }
154
+ interface CourseRosterChangesInfo {
155
+ /** The `course_id` of the course to subscribe to roster changes for. */
156
+ courseId?: string;
157
+ }
158
+ interface CourseWork {
159
+ /** Absolute link to this course work in the Classroom web UI. This is only populated if `state` is `PUBLISHED`. Read-only. */
160
+ alternateLink?: string;
161
+ /** Assignee mode of the coursework. If unspecified, the default value is `ALL_STUDENTS`. */
162
+ assigneeMode?: string;
163
+ /** Assignment details. This is populated only when `work_type` is `ASSIGNMENT`. Read-only. */
164
+ assignment?: Assignment;
165
+ /** Whether this course work item is associated with the Developer Console project making the request. See CreateCourseWork for more details. Read-only. */
166
+ associatedWithDeveloper?: boolean;
167
+ /** Identifier of the course. Read-only. */
168
+ courseId?: string;
169
+ /** Timestamp when this course work was created. Read-only. */
170
+ creationTime?: string;
171
+ /** Identifier for the user that created the coursework. Read-only. */
172
+ creatorUserId?: string;
173
+ /** Optional description of this course work. If set, the description must be a valid UTF-8 string containing no more than 30,000 characters. */
174
+ description?: string;
175
+ /** Optional date, in UTC, that submissions for this course work are due. This must be specified if `due_time` is specified. */
176
+ dueDate?: Date;
177
+ /** Optional time of day, in UTC, that submissions for this course work are due. This must be specified if `due_date` is specified. */
178
+ dueTime?: TimeOfDay;
179
+ /** The category that this coursework's grade contributes to. Present only when a category has been chosen for the coursework. May be used in calculating the overall grade. Read-only. */
180
+ gradeCategory?: GradeCategory;
181
+ /** Classroom-assigned identifier of this course work, unique per course. Read-only. */
182
+ id?: string;
183
+ /**
184
+ * Identifiers of students with access to the coursework. This field is set only if `assigneeMode` is `INDIVIDUAL_STUDENTS`. If the `assigneeMode` is `INDIVIDUAL_STUDENTS`, then only
185
+ * students specified in this field are assigned the coursework.
186
+ */
187
+ individualStudentsOptions?: IndividualStudentsOptions;
188
+ /** Additional materials. CourseWork must have no more than 20 material items. */
189
+ materials?: Material[];
190
+ /** Maximum grade for this course work. If zero or unspecified, this assignment is considered ungraded. This must be a non-negative integer value. */
191
+ maxPoints?: number;
192
+ /**
193
+ * Multiple choice question details. For read operations, this field is populated only when `work_type` is `MULTIPLE_CHOICE_QUESTION`. For write operations, this field must be
194
+ * specified when creating course work with a `work_type` of `MULTIPLE_CHOICE_QUESTION`, and it must not be set otherwise.
195
+ */
196
+ multipleChoiceQuestion?: MultipleChoiceQuestion;
197
+ /** Optional timestamp when this course work is scheduled to be published. */
198
+ scheduledTime?: string;
199
+ /** Status of this course work. If unspecified, the default state is `DRAFT`. */
200
+ state?: string;
201
+ /** Setting to determine when students are allowed to modify submissions. If unspecified, the default value is `MODIFIABLE_UNTIL_TURNED_IN`. */
202
+ submissionModificationMode?: string;
203
+ /** Title of this course work. The title must be a valid UTF-8 string containing between 1 and 3000 characters. */
204
+ title?: string;
205
+ /** Identifier for the topic that this coursework is associated with. Must match an existing topic in the course. */
206
+ topicId?: string;
207
+ /** Timestamp of the most recent change to this course work. Read-only. */
208
+ updateTime?: string;
209
+ /** Type of this course work. The type is set when the course work is created and cannot be changed. */
210
+ workType?: string;
211
+ }
212
+ interface CourseWorkChangesInfo {
213
+ /** The `course_id` of the course to subscribe to work changes for. */
214
+ courseId?: string;
215
+ }
216
+ interface CourseWorkMaterial {
217
+ /** Absolute link to this course work material in the Classroom web UI. This is only populated if `state` is `PUBLISHED`. Read-only. */
218
+ alternateLink?: string;
219
+ /** Assignee mode of the course work material. If unspecified, the default value is `ALL_STUDENTS`. */
220
+ assigneeMode?: string;
221
+ /** Identifier of the course. Read-only. */
222
+ courseId?: string;
223
+ /** Timestamp when this course work material was created. Read-only. */
224
+ creationTime?: string;
225
+ /** Identifier for the user that created the course work material. Read-only. */
226
+ creatorUserId?: string;
227
+ /** Optional description of this course work material. The text must be a valid UTF-8 string containing no more than 30,000 characters. */
228
+ description?: string;
229
+ /** Classroom-assigned identifier of this course work material, unique per course. Read-only. */
230
+ id?: string;
231
+ /**
232
+ * Identifiers of students with access to the course work material. This field is set only if `assigneeMode` is `INDIVIDUAL_STUDENTS`. If the `assigneeMode` is `INDIVIDUAL_STUDENTS`,
233
+ * then only students specified in this field can see the course work material.
234
+ */
235
+ individualStudentsOptions?: IndividualStudentsOptions;
236
+ /** Additional materials. A course work material must have no more than 20 material items. */
237
+ materials?: Material[];
238
+ /** Optional timestamp when this course work material is scheduled to be published. */
239
+ scheduledTime?: string;
240
+ /** Status of this course work material. If unspecified, the default state is `DRAFT`. */
241
+ state?: string;
242
+ /** Title of this course work material. The title must be a valid UTF-8 string containing between 1 and 3000 characters. */
243
+ title?: string;
244
+ /** Identifier for the topic that this course work material is associated with. Must match an existing topic in the course. */
245
+ topicId?: string;
246
+ /** Timestamp of the most recent change to this course work material. Read-only. */
247
+ updateTime?: string;
248
+ }
249
+ interface Date {
250
+ /** Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant. */
251
+ day?: number;
252
+ /** Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. */
253
+ month?: number;
254
+ /** Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. */
255
+ year?: number;
256
+ }
257
+ interface DriveFile {
258
+ /** URL that can be used to access the Drive item. Read-only. */
259
+ alternateLink?: string;
260
+ /** Drive API resource ID. */
261
+ id?: string;
262
+ /** URL of a thumbnail image of the Drive item. Read-only. */
263
+ thumbnailUrl?: string;
264
+ /** Title of the Drive item. Read-only. */
265
+ title?: string;
266
+ }
267
+ interface DriveFolder {
268
+ /** URL that can be used to access the Drive folder. Read-only. */
269
+ alternateLink?: string;
270
+ /** Drive API resource ID. */
271
+ id?: string;
272
+ /** Title of the Drive folder. Read-only. */
273
+ title?: string;
274
+ }
275
+ // tslint:disable-next-line:no-empty-interface
276
+ interface Empty {
277
+ }
278
+ interface Feed {
279
+ /** Information about a `Feed` with a `feed_type` of `COURSE_ROSTER_CHANGES`. This field must be specified if `feed_type` is `COURSE_ROSTER_CHANGES`. */
280
+ courseRosterChangesInfo?: CourseRosterChangesInfo;
281
+ /** Information about a `Feed` with a `feed_type` of `COURSE_WORK_CHANGES`. This field must be specified if `feed_type` is `COURSE_WORK_CHANGES`. */
282
+ courseWorkChangesInfo?: CourseWorkChangesInfo;
283
+ /** The type of feed. */
284
+ feedType?: string;
285
+ }
286
+ interface Form {
287
+ /** URL of the form. */
288
+ formUrl?: string;
289
+ /** URL of the form responses document. Only set if respsonses have been recorded and only when the requesting user is an editor of the form. Read-only. */
290
+ responseUrl?: string;
291
+ /** URL of a thumbnail image of the Form. Read-only. */
292
+ thumbnailUrl?: string;
293
+ /** Title of the Form. Read-only. */
294
+ title?: string;
295
+ }
296
+ interface GlobalPermission {
297
+ /** Permission value. */
298
+ permission?: string;
299
+ }
300
+ interface GradebookSettings {
301
+ /** Indicates how the overall grade is calculated. */
302
+ calculationType?: string;
303
+ /** Indicates who can see the overall grade.. */
304
+ displaySetting?: string;
305
+ /** Grade categories that are available for coursework in the course. */
306
+ gradeCategories?: GradeCategory[];
307
+ }
308
+ interface GradeCategory {
309
+ /** Default value of denominator. Only applicable when grade calculation type is TOTAL_POINTS. */
310
+ defaultGradeDenominator?: number;
311
+ /** ID of the grade category. */
312
+ id?: string;
313
+ /** Name of the grade category. */
314
+ name?: string;
315
+ /**
316
+ * The weight of the category average as part of overall average. A weight of 12.34% is represented as 123400 (100% is 1,000,000). The last two digits should always be zero since we
317
+ * use two decimal precision. Only applicable when grade calculation type is WEIGHTED_CATEGORIES.
318
+ */
319
+ weight?: number;
320
+ }
321
+ interface GradeHistory {
322
+ /** The teacher who made the grade change. */
323
+ actorUserId?: string;
324
+ /** The type of grade change at this time in the submission grade history. */
325
+ gradeChangeType?: string;
326
+ /** When the grade of the submission was changed. */
327
+ gradeTimestamp?: string;
328
+ /** The denominator of the grade at this time in the submission grade history. */
329
+ maxPoints?: number;
330
+ /** The numerator of the grade at this time in the submission grade history. */
331
+ pointsEarned?: number;
332
+ }
333
+ interface Guardian {
334
+ /** Identifier for the guardian. */
335
+ guardianId?: string;
336
+ /** User profile for the guardian. */
337
+ guardianProfile?: UserProfile;
338
+ /** The email address to which the initial guardian invitation was sent. This field is only visible to domain administrators. */
339
+ invitedEmailAddress?: string;
340
+ /** Identifier for the student to whom the guardian relationship applies. */
341
+ studentId?: string;
342
+ }
343
+ interface GuardianInvitation {
344
+ /** The time that this invitation was created. Read-only. */
345
+ creationTime?: string;
346
+ /** Unique identifier for this invitation. Read-only. */
347
+ invitationId?: string;
348
+ /** Email address that the invitation was sent to. This field is only visible to domain administrators. */
349
+ invitedEmailAddress?: string;
350
+ /** The state that this invitation is in. */
351
+ state?: string;
352
+ /** ID of the student (in standard format) */
353
+ studentId?: string;
354
+ }
355
+ interface IndividualStudentsOptions {
356
+ /** Identifiers for the students that have access to the coursework/announcement. */
357
+ studentIds?: string[];
358
+ }
359
+ interface Invitation {
360
+ /** Identifier of the course to invite the user to. */
361
+ courseId?: string;
362
+ /** Identifier assigned by Classroom. Read-only. */
363
+ id?: string;
364
+ /** Role to invite the user to have. Must not be `COURSE_ROLE_UNSPECIFIED`. */
365
+ role?: string;
366
+ /**
367
+ * Identifier of the invited user. When specified as a parameter of a request, this identifier can be set to one of the following: * the numeric identifier for the user * the email
368
+ * address of the user * the string literal `"me"`, indicating the requesting user
369
+ */
370
+ userId?: string;
371
+ }
372
+ interface Link {
373
+ /** URL of a thumbnail image of the target URL. Read-only. */
374
+ thumbnailUrl?: string;
375
+ /** Title of the target of the URL. Read-only. */
376
+ title?: string;
377
+ /** URL to link to. This must be a valid UTF-8 string containing between 1 and 2024 characters. */
378
+ url?: string;
379
+ }
380
+ interface ListAnnouncementsResponse {
381
+ /** Announcement items that match the request. */
382
+ announcements?: Announcement[];
383
+ /** Token identifying the next page of results to return. If empty, no further results are available. */
384
+ nextPageToken?: string;
385
+ }
386
+ interface ListCourseAliasesResponse {
387
+ /** The course aliases. */
388
+ aliases?: CourseAlias[];
389
+ /** Token identifying the next page of results to return. If empty, no further results are available. */
390
+ nextPageToken?: string;
391
+ }
392
+ interface ListCoursesResponse {
393
+ /** Courses that match the list request. */
394
+ courses?: Course[];
395
+ /** Token identifying the next page of results to return. If empty, no further results are available. */
396
+ nextPageToken?: string;
397
+ }
398
+ interface ListCourseWorkMaterialResponse {
399
+ /** Course work material items that match the request. */
400
+ courseWorkMaterial?: CourseWorkMaterial[];
401
+ /** Token identifying the next page of results to return. If empty, no further results are available. */
402
+ nextPageToken?: string;
403
+ }
404
+ interface ListCourseWorkResponse {
405
+ /** Course work items that match the request. */
406
+ courseWork?: CourseWork[];
407
+ /** Token identifying the next page of results to return. If empty, no further results are available. */
408
+ nextPageToken?: string;
409
+ }
410
+ interface ListGuardianInvitationsResponse {
411
+ /** Guardian invitations that matched the list request. */
412
+ guardianInvitations?: GuardianInvitation[];
413
+ /** Token identifying the next page of results to return. If empty, no further results are available. */
414
+ nextPageToken?: string;
415
+ }
416
+ interface ListGuardiansResponse {
417
+ /** Guardians on this page of results that met the criteria specified in the request. */
418
+ guardians?: Guardian[];
419
+ /** Token identifying the next page of results to return. If empty, no further results are available. */
420
+ nextPageToken?: string;
421
+ }
422
+ interface ListInvitationsResponse {
423
+ /** Invitations that match the list request. */
424
+ invitations?: Invitation[];
425
+ /** Token identifying the next page of results to return. If empty, no further results are available. */
426
+ nextPageToken?: string;
427
+ }
428
+ interface ListStudentsResponse {
429
+ /** Token identifying the next page of results to return. If empty, no further results are available. */
430
+ nextPageToken?: string;
431
+ /** Students who match the list request. */
432
+ students?: Student[];
433
+ }
434
+ interface ListStudentSubmissionsResponse {
435
+ /** Token identifying the next page of results to return. If empty, no further results are available. */
436
+ nextPageToken?: string;
437
+ /** Student work that matches the request. */
438
+ studentSubmissions?: StudentSubmission[];
439
+ }
440
+ interface ListTeachersResponse {
441
+ /** Token identifying the next page of results to return. If empty, no further results are available. */
442
+ nextPageToken?: string;
443
+ /** Teachers who match the list request. */
444
+ teachers?: Teacher[];
445
+ }
446
+ interface ListTopicResponse {
447
+ /** Token identifying the next page of results to return. If empty, no further results are available. */
448
+ nextPageToken?: string;
449
+ /** Topic items that match the request. */
450
+ topic?: Topic[];
451
+ }
452
+ interface Material {
453
+ /** Google Drive file material. */
454
+ driveFile?: SharedDriveFile;
455
+ /** Google Forms material. */
456
+ form?: Form;
457
+ /** Link material. On creation, this is upgraded to a more appropriate type if possible, and this is reflected in the response. */
458
+ link?: Link;
459
+ /** YouTube video material. */
460
+ youtubeVideo?: YouTubeVideo;
461
+ }
462
+ interface ModifyAnnouncementAssigneesRequest {
463
+ /** Mode of the announcement describing whether it is accessible by all students or specified individual students. */
464
+ assigneeMode?: string;
465
+ /** Set which students can view or cannot view the announcement. Must be specified only when `assigneeMode` is `INDIVIDUAL_STUDENTS`. */
466
+ modifyIndividualStudentsOptions?: ModifyIndividualStudentsOptions;
467
+ }
468
+ interface ModifyAttachmentsRequest {
469
+ /** Attachments to add. A student submission may not have more than 20 attachments. Form attachments are not supported. */
470
+ addAttachments?: Attachment[];
471
+ }
472
+ interface ModifyCourseWorkAssigneesRequest {
473
+ /** Mode of the coursework describing whether it will be assigned to all students or specified individual students. */
474
+ assigneeMode?: string;
475
+ /** Set which students are assigned or not assigned to the coursework. Must be specified only when `assigneeMode` is `INDIVIDUAL_STUDENTS`. */
476
+ modifyIndividualStudentsOptions?: ModifyIndividualStudentsOptions;
477
+ }
478
+ interface ModifyIndividualStudentsOptions {
479
+ /** IDs of students to be added as having access to this coursework/announcement. */
480
+ addStudentIds?: string[];
481
+ /** IDs of students to be removed from having access to this coursework/announcement. */
482
+ removeStudentIds?: string[];
483
+ }
484
+ interface MultipleChoiceQuestion {
485
+ /** Possible choices. */
486
+ choices?: string[];
487
+ }
488
+ interface MultipleChoiceSubmission {
489
+ /** Student's select choice. */
490
+ answer?: string;
491
+ }
492
+ interface Name {
493
+ /** The user's last name. Read-only. */
494
+ familyName?: string;
495
+ /** The user's full name formed by concatenating the first and last name values. Read-only. */
496
+ fullName?: string;
497
+ /** The user's first name. Read-only. */
498
+ givenName?: string;
499
+ }
500
+ // tslint:disable-next-line:no-empty-interface
501
+ interface ReclaimStudentSubmissionRequest {
502
+ }
503
+ interface Registration {
504
+ /** The Cloud Pub/Sub topic that notifications are to be sent to. */
505
+ cloudPubsubTopic?: CloudPubsubTopic;
506
+ /** The time until which the `Registration` is effective. This is a read-only field assigned by the server. */
507
+ expiryTime?: string;
508
+ /** Specification for the class of notifications that Classroom should deliver to the destination. */
509
+ feed?: Feed;
510
+ /** A server-generated unique identifier for this `Registration`. Read-only. */
511
+ registrationId?: string;
512
+ }
513
+ // tslint:disable-next-line:no-empty-interface
514
+ interface ReturnStudentSubmissionRequest {
515
+ }
516
+ interface SharedDriveFile {
517
+ /** Drive file details. */
518
+ driveFile?: DriveFile;
519
+ /** Mechanism by which students access the Drive item. */
520
+ shareMode?: string;
521
+ }
522
+ interface ShortAnswerSubmission {
523
+ /** Student response to a short-answer question. */
524
+ answer?: string;
525
+ }
526
+ interface StateHistory {
527
+ /** The teacher or student who made the change. */
528
+ actorUserId?: string;
529
+ /** The workflow pipeline stage. */
530
+ state?: string;
531
+ /** When the submission entered this state. */
532
+ stateTimestamp?: string;
533
+ }
534
+ interface Student {
535
+ /** Identifier of the course. Read-only. */
536
+ courseId?: string;
537
+ /** Global user information for the student. Read-only. */
538
+ profile?: UserProfile;
539
+ /** Information about a Drive Folder for this student's work in this course. Only visible to the student and domain administrators. Read-only. */
540
+ studentWorkFolder?: DriveFolder;
541
+ /**
542
+ * Identifier of the user. When specified as a parameter of a request, this identifier can be one of the following: * the numeric identifier for the user * the email address of the
543
+ * user * the string literal `"me"`, indicating the requesting user
544
+ */
545
+ userId?: string;
546
+ }
547
+ interface StudentSubmission {
548
+ /** Absolute link to the submission in the Classroom web UI. Read-only. */
549
+ alternateLink?: string;
550
+ /**
551
+ * Optional grade. If unset, no grade was set. This value must be non-negative. Decimal (that is, non-integer) values are allowed, but are rounded to two decimal places. This may be
552
+ * modified only by course teachers.
553
+ */
554
+ assignedGrade?: number;
555
+ /** Submission content when course_work_type is ASSIGNMENT. Students can modify this content using ModifyAttachments. */
556
+ assignmentSubmission?: AssignmentSubmission;
557
+ /** Whether this student submission is associated with the Developer Console project making the request. See CreateCourseWork for more details. Read-only. */
558
+ associatedWithDeveloper?: boolean;
559
+ /** Identifier of the course. Read-only. */
560
+ courseId?: string;
561
+ /** Identifier for the course work this corresponds to. Read-only. */
562
+ courseWorkId?: string;
563
+ /** Type of course work this submission is for. Read-only. */
564
+ courseWorkType?: string;
565
+ /** Creation time of this submission. This may be unset if the student has not accessed this item. Read-only. */
566
+ creationTime?: string;
567
+ /**
568
+ * Optional pending grade. If unset, no grade was set. This value must be non-negative. Decimal (that is, non-integer) values are allowed, but are rounded to two decimal places. This
569
+ * is only visible to and modifiable by course teachers.
570
+ */
571
+ draftGrade?: number;
572
+ /** Classroom-assigned Identifier for the student submission. This is unique among submissions for the relevant course work. Read-only. */
573
+ id?: string;
574
+ /** Whether this submission is late. Read-only. */
575
+ late?: boolean;
576
+ /** Submission content when course_work_type is MULTIPLE_CHOICE_QUESTION. */
577
+ multipleChoiceSubmission?: MultipleChoiceSubmission;
578
+ /** Submission content when course_work_type is SHORT_ANSWER_QUESTION. */
579
+ shortAnswerSubmission?: ShortAnswerSubmission;
580
+ /** State of this submission. Read-only. */
581
+ state?: string;
582
+ /** The history of the submission (includes state and grade histories). Read-only. */
583
+ submissionHistory?: SubmissionHistory[];
584
+ /** Last update time of this submission. This may be unset if the student has not accessed this item. Read-only. */
585
+ updateTime?: string;
586
+ /** Identifier for the student that owns this submission. Read-only. */
587
+ userId?: string;
588
+ }
589
+ interface SubmissionHistory {
590
+ /** The grade history information of the submission, if present. */
591
+ gradeHistory?: GradeHistory;
592
+ /** The state history information of the submission, if present. */
593
+ stateHistory?: StateHistory;
594
+ }
595
+ interface Teacher {
596
+ /** Identifier of the course. Read-only. */
597
+ courseId?: string;
598
+ /** Global user information for the teacher. Read-only. */
599
+ profile?: UserProfile;
600
+ /**
601
+ * Identifier of the user. When specified as a parameter of a request, this identifier can be one of the following: * the numeric identifier for the user * the email address of the
602
+ * user * the string literal `"me"`, indicating the requesting user
603
+ */
604
+ userId?: string;
605
+ }
606
+ interface TimeOfDay {
607
+ /** Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value "24:00:00" for scenarios like business closing time. */
608
+ hours?: number;
609
+ /** Minutes of hour of day. Must be from 0 to 59. */
610
+ minutes?: number;
611
+ /** Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. */
612
+ nanos?: number;
613
+ /** Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds. */
614
+ seconds?: number;
615
+ }
616
+ interface Topic {
617
+ /** Identifier of the course. Read-only. */
618
+ courseId?: string;
619
+ /**
620
+ * The name of the topic, generated by the user. Leading and trailing whitespaces, if any, are trimmed. Also, multiple consecutive whitespaces are collapsed into one inside the name.
621
+ * The result must be a non-empty string. Topic names are case sensitive, and must be no longer than 100 characters.
622
+ */
623
+ name?: string;
624
+ /** Unique identifier for the topic. Read-only. */
625
+ topicId?: string;
626
+ /** The time the topic was last updated by the system. Read-only. */
627
+ updateTime?: string;
628
+ }
629
+ // tslint:disable-next-line:no-empty-interface
630
+ interface TurnInStudentSubmissionRequest {
631
+ }
632
+ interface UserProfile {
633
+ /** Email address of the user. Read-only. */
634
+ emailAddress?: string;
635
+ /** Identifier of the user. Read-only. */
636
+ id?: string;
637
+ /** Name of the user. Read-only. */
638
+ name?: Name;
639
+ /** Global permissions of the user. Read-only. */
640
+ permissions?: GlobalPermission[];
641
+ /** URL of user's profile photo. Read-only. */
642
+ photoUrl?: string;
643
+ /**
644
+ * Represents whether a G Suite for Education user's domain administrator has explicitly verified them as being a teacher. If the user is not a member of a G Suite for Education
645
+ * domain, than this field is always false. Read-only
646
+ */
647
+ verifiedTeacher?: boolean;
648
+ }
649
+ interface YouTubeVideo {
650
+ /** URL that can be used to view the YouTube video. Read-only. */
651
+ alternateLink?: string;
652
+ /** YouTube API resource ID. */
653
+ id?: string;
654
+ /** URL of a thumbnail image of the YouTube video. Read-only. */
655
+ thumbnailUrl?: string;
656
+ /** Title of the YouTube video. Read-only. */
657
+ title?: string;
658
+ }
659
+ interface AliasesResource {
660
+ /**
661
+ * Creates an alias for a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to create the alias or for access errors.
662
+ * * `NOT_FOUND` if the course does not exist. * `ALREADY_EXISTS` if the alias already exists. * `FAILED_PRECONDITION` if the alias requested does not make sense for the requesting
663
+ * user or course (for example, if a user not in a domain attempts to access a domain-scoped alias).
664
+ */
665
+ create(request: {
666
+ /** V1 error format. */
667
+ "$.xgafv"?: string;
668
+ /** OAuth access token. */
669
+ access_token?: string;
670
+ /** Data format for response. */
671
+ alt?: string;
672
+ /** JSONP */
673
+ callback?: string;
674
+ /** Identifier of the course to alias. This identifier can be either the Classroom-assigned identifier or an alias. */
675
+ courseId: string;
676
+ /** Selector specifying which fields to include in a partial response. */
677
+ fields?: string;
678
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
679
+ key?: string;
680
+ /** OAuth 2.0 token for the current user. */
681
+ oauth_token?: string;
682
+ /** Returns response with indentations and line breaks. */
683
+ prettyPrint?: boolean;
684
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
685
+ quotaUser?: string;
686
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
687
+ upload_protocol?: string;
688
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
689
+ uploadType?: string;
690
+ /** Request body */
691
+ resource: CourseAlias;
692
+ }): Request<CourseAlias>;
693
+ create(request: {
694
+ /** V1 error format. */
695
+ "$.xgafv"?: string;
696
+ /** OAuth access token. */
697
+ access_token?: string;
698
+ /** Data format for response. */
699
+ alt?: string;
700
+ /** JSONP */
701
+ callback?: string;
702
+ /** Identifier of the course to alias. This identifier can be either the Classroom-assigned identifier or an alias. */
703
+ courseId: string;
704
+ /** Selector specifying which fields to include in a partial response. */
705
+ fields?: string;
706
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
707
+ key?: string;
708
+ /** OAuth 2.0 token for the current user. */
709
+ oauth_token?: string;
710
+ /** Returns response with indentations and line breaks. */
711
+ prettyPrint?: boolean;
712
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
713
+ quotaUser?: string;
714
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
715
+ upload_protocol?: string;
716
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
717
+ uploadType?: string;
718
+ },
719
+ body: CourseAlias): Request<CourseAlias>;
720
+ /**
721
+ * Deletes an alias of a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to remove the alias or for access errors.
722
+ * * `NOT_FOUND` if the alias does not exist. * `FAILED_PRECONDITION` if the alias requested does not make sense for the requesting user or course (for example, if a user not in a
723
+ * domain attempts to delete a domain-scoped alias).
724
+ */
725
+ delete(request?: {
726
+ /** V1 error format. */
727
+ "$.xgafv"?: string;
728
+ /** OAuth access token. */
729
+ access_token?: string;
730
+ /** Alias to delete. This may not be the Classroom-assigned identifier. */
731
+ alias: string;
732
+ /** Data format for response. */
733
+ alt?: string;
734
+ /** JSONP */
735
+ callback?: string;
736
+ /** Identifier of the course whose alias should be deleted. This identifier can be either the Classroom-assigned identifier or an alias. */
737
+ courseId: string;
738
+ /** Selector specifying which fields to include in a partial response. */
739
+ fields?: string;
740
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
741
+ key?: string;
742
+ /** OAuth 2.0 token for the current user. */
743
+ oauth_token?: string;
744
+ /** Returns response with indentations and line breaks. */
745
+ prettyPrint?: boolean;
746
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
747
+ quotaUser?: string;
748
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
749
+ upload_protocol?: string;
750
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
751
+ uploadType?: string;
752
+ }): Request<{}>;
753
+ /**
754
+ * Returns a list of aliases for a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the course or for
755
+ * access errors. * `NOT_FOUND` if the course does not exist.
756
+ */
757
+ list(request?: {
758
+ /** V1 error format. */
759
+ "$.xgafv"?: string;
760
+ /** OAuth access token. */
761
+ access_token?: string;
762
+ /** Data format for response. */
763
+ alt?: string;
764
+ /** JSONP */
765
+ callback?: string;
766
+ /** The identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
767
+ courseId: string;
768
+ /** Selector specifying which fields to include in a partial response. */
769
+ fields?: string;
770
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
771
+ key?: string;
772
+ /** OAuth 2.0 token for the current user. */
773
+ oauth_token?: string;
774
+ /** Maximum number of items to return. Zero or unspecified indicates that the server may assign a maximum. The server may return fewer than the specified number of results. */
775
+ pageSize?: number;
776
+ /**
777
+ * nextPageToken value returned from a previous list call, indicating that the subsequent page of results should be returned. The list request must be otherwise identical to the
778
+ * one that resulted in this token.
779
+ */
780
+ pageToken?: string;
781
+ /** Returns response with indentations and line breaks. */
782
+ prettyPrint?: boolean;
783
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
784
+ quotaUser?: string;
785
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
786
+ upload_protocol?: string;
787
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
788
+ uploadType?: string;
789
+ }): Request<ListCourseAliasesResponse>;
790
+ }
791
+ interface AnnouncementsResource {
792
+ /**
793
+ * Creates an announcement. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course, create
794
+ * announcements in the requested course, share a Drive attachment, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course does
795
+ * not exist. * `FAILED_PRECONDITION` for the following request error: * AttachmentNotVisible
796
+ */
797
+ create(request: {
798
+ /** V1 error format. */
799
+ "$.xgafv"?: string;
800
+ /** OAuth access token. */
801
+ access_token?: string;
802
+ /** Data format for response. */
803
+ alt?: string;
804
+ /** JSONP */
805
+ callback?: string;
806
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
807
+ courseId: string;
808
+ /** Selector specifying which fields to include in a partial response. */
809
+ fields?: string;
810
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
811
+ key?: string;
812
+ /** OAuth 2.0 token for the current user. */
813
+ oauth_token?: string;
814
+ /** Returns response with indentations and line breaks. */
815
+ prettyPrint?: boolean;
816
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
817
+ quotaUser?: string;
818
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
819
+ upload_protocol?: string;
820
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
821
+ uploadType?: string;
822
+ /** Request body */
823
+ resource: Announcement;
824
+ }): Request<Announcement>;
825
+ create(request: {
826
+ /** V1 error format. */
827
+ "$.xgafv"?: string;
828
+ /** OAuth access token. */
829
+ access_token?: string;
830
+ /** Data format for response. */
831
+ alt?: string;
832
+ /** JSONP */
833
+ callback?: string;
834
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
835
+ courseId: string;
836
+ /** Selector specifying which fields to include in a partial response. */
837
+ fields?: string;
838
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
839
+ key?: string;
840
+ /** OAuth 2.0 token for the current user. */
841
+ oauth_token?: string;
842
+ /** Returns response with indentations and line breaks. */
843
+ prettyPrint?: boolean;
844
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
845
+ quotaUser?: string;
846
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
847
+ upload_protocol?: string;
848
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
849
+ uploadType?: string;
850
+ },
851
+ body: Announcement): Request<Announcement>;
852
+ /**
853
+ * Deletes an announcement. This request must be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the
854
+ * corresponding announcement item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting developer project did not create the corresponding
855
+ * announcement, if the requesting user is not permitted to delete the requested course or for access errors. * `FAILED_PRECONDITION` if the requested announcement has already been
856
+ * deleted. * `NOT_FOUND` if no course exists with the requested ID.
857
+ */
858
+ delete(request?: {
859
+ /** V1 error format. */
860
+ "$.xgafv"?: string;
861
+ /** OAuth access token. */
862
+ access_token?: string;
863
+ /** Data format for response. */
864
+ alt?: string;
865
+ /** JSONP */
866
+ callback?: string;
867
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
868
+ courseId: string;
869
+ /** Selector specifying which fields to include in a partial response. */
870
+ fields?: string;
871
+ /** Identifier of the announcement to delete. This identifier is a Classroom-assigned identifier. */
872
+ id: string;
873
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
874
+ key?: string;
875
+ /** OAuth 2.0 token for the current user. */
876
+ oauth_token?: string;
877
+ /** Returns response with indentations and line breaks. */
878
+ prettyPrint?: boolean;
879
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
880
+ quotaUser?: string;
881
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
882
+ upload_protocol?: string;
883
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
884
+ uploadType?: string;
885
+ }): Request<{}>;
886
+ /**
887
+ * Returns an announcement. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or announcement,
888
+ * or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course or announcement does not exist.
889
+ */
890
+ get(request?: {
891
+ /** V1 error format. */
892
+ "$.xgafv"?: string;
893
+ /** OAuth access token. */
894
+ access_token?: string;
895
+ /** Data format for response. */
896
+ alt?: string;
897
+ /** JSONP */
898
+ callback?: string;
899
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
900
+ courseId: string;
901
+ /** Selector specifying which fields to include in a partial response. */
902
+ fields?: string;
903
+ /** Identifier of the announcement. */
904
+ id: string;
905
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
906
+ key?: string;
907
+ /** OAuth 2.0 token for the current user. */
908
+ oauth_token?: string;
909
+ /** Returns response with indentations and line breaks. */
910
+ prettyPrint?: boolean;
911
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
912
+ quotaUser?: string;
913
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
914
+ upload_protocol?: string;
915
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
916
+ uploadType?: string;
917
+ }): Request<Announcement>;
918
+ /**
919
+ * Returns a list of announcements that the requester is permitted to view. Course students may only view `PUBLISHED` announcements. Course teachers and domain administrators may view
920
+ * all announcements. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or for access errors.
921
+ * * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course does not exist.
922
+ */
923
+ list(request?: {
924
+ /** V1 error format. */
925
+ "$.xgafv"?: string;
926
+ /** OAuth access token. */
927
+ access_token?: string;
928
+ /** Data format for response. */
929
+ alt?: string;
930
+ /** Restriction on the `state` of announcements returned. If this argument is left unspecified, the default value is `PUBLISHED`. */
931
+ announcementStates?: string | string[];
932
+ /** JSONP */
933
+ callback?: string;
934
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
935
+ courseId: string;
936
+ /** Selector specifying which fields to include in a partial response. */
937
+ fields?: string;
938
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
939
+ key?: string;
940
+ /** OAuth 2.0 token for the current user. */
941
+ oauth_token?: string;
942
+ /**
943
+ * Optional sort ordering for results. A comma-separated list of fields with an optional sort direction keyword. Supported field is `updateTime`. Supported direction keywords are
944
+ * `asc` and `desc`. If not specified, `updateTime desc` is the default behavior. Examples: `updateTime asc`, `updateTime`
945
+ */
946
+ orderBy?: string;
947
+ /** Maximum number of items to return. Zero or unspecified indicates that the server may assign a maximum. The server may return fewer than the specified number of results. */
948
+ pageSize?: number;
949
+ /**
950
+ * nextPageToken value returned from a previous list call, indicating that the subsequent page of results should be returned. The list request must be otherwise identical to the
951
+ * one that resulted in this token.
952
+ */
953
+ pageToken?: string;
954
+ /** Returns response with indentations and line breaks. */
955
+ prettyPrint?: boolean;
956
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
957
+ quotaUser?: string;
958
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
959
+ upload_protocol?: string;
960
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
961
+ uploadType?: string;
962
+ }): Request<ListAnnouncementsResponse>;
963
+ /**
964
+ * Modifies assignee mode and options of an announcement. Only a teacher of the course that contains the announcement may call this method. This method returns the following error
965
+ * codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work or for access errors. * `INVALID_ARGUMENT` if the request is
966
+ * malformed. * `NOT_FOUND` if the requested course or course work does not exist.
967
+ */
968
+ modifyAssignees(request: {
969
+ /** V1 error format. */
970
+ "$.xgafv"?: string;
971
+ /** OAuth access token. */
972
+ access_token?: string;
973
+ /** Data format for response. */
974
+ alt?: string;
975
+ /** JSONP */
976
+ callback?: string;
977
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
978
+ courseId: string;
979
+ /** Selector specifying which fields to include in a partial response. */
980
+ fields?: string;
981
+ /** Identifier of the announcement. */
982
+ id: string;
983
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
984
+ key?: string;
985
+ /** OAuth 2.0 token for the current user. */
986
+ oauth_token?: string;
987
+ /** Returns response with indentations and line breaks. */
988
+ prettyPrint?: boolean;
989
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
990
+ quotaUser?: string;
991
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
992
+ upload_protocol?: string;
993
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
994
+ uploadType?: string;
995
+ /** Request body */
996
+ resource: ModifyAnnouncementAssigneesRequest;
997
+ }): Request<Announcement>;
998
+ modifyAssignees(request: {
999
+ /** V1 error format. */
1000
+ "$.xgafv"?: string;
1001
+ /** OAuth access token. */
1002
+ access_token?: string;
1003
+ /** Data format for response. */
1004
+ alt?: string;
1005
+ /** JSONP */
1006
+ callback?: string;
1007
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
1008
+ courseId: string;
1009
+ /** Selector specifying which fields to include in a partial response. */
1010
+ fields?: string;
1011
+ /** Identifier of the announcement. */
1012
+ id: string;
1013
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1014
+ key?: string;
1015
+ /** OAuth 2.0 token for the current user. */
1016
+ oauth_token?: string;
1017
+ /** Returns response with indentations and line breaks. */
1018
+ prettyPrint?: boolean;
1019
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1020
+ quotaUser?: string;
1021
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1022
+ upload_protocol?: string;
1023
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1024
+ uploadType?: string;
1025
+ },
1026
+ body: ModifyAnnouncementAssigneesRequest): Request<Announcement>;
1027
+ /**
1028
+ * Updates one or more fields of an announcement. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting developer project did not create the
1029
+ * corresponding announcement or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `FAILED_PRECONDITION` if the requested announcement has already been deleted. *
1030
+ * `NOT_FOUND` if the requested course or announcement does not exist
1031
+ */
1032
+ patch(request: {
1033
+ /** V1 error format. */
1034
+ "$.xgafv"?: string;
1035
+ /** OAuth access token. */
1036
+ access_token?: string;
1037
+ /** Data format for response. */
1038
+ alt?: string;
1039
+ /** JSONP */
1040
+ callback?: string;
1041
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
1042
+ courseId: string;
1043
+ /** Selector specifying which fields to include in a partial response. */
1044
+ fields?: string;
1045
+ /** Identifier of the announcement. */
1046
+ id: string;
1047
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1048
+ key?: string;
1049
+ /** OAuth 2.0 token for the current user. */
1050
+ oauth_token?: string;
1051
+ /** Returns response with indentations and line breaks. */
1052
+ prettyPrint?: boolean;
1053
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1054
+ quotaUser?: string;
1055
+ /**
1056
+ * Mask that identifies which fields on the announcement to update. This field is required to do an update. The update fails if invalid fields are specified. If a field supports
1057
+ * empty values, it can be cleared by specifying it in the update mask and not in the Announcement object. If a field that does not support empty values is included in the update
1058
+ * mask and not set in the Announcement object, an `INVALID_ARGUMENT` error is returned. The following fields may be specified by teachers: * `text` * `state` * `scheduled_time`
1059
+ */
1060
+ updateMask?: string;
1061
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1062
+ upload_protocol?: string;
1063
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1064
+ uploadType?: string;
1065
+ /** Request body */
1066
+ resource: Announcement;
1067
+ }): Request<Announcement>;
1068
+ patch(request: {
1069
+ /** V1 error format. */
1070
+ "$.xgafv"?: string;
1071
+ /** OAuth access token. */
1072
+ access_token?: string;
1073
+ /** Data format for response. */
1074
+ alt?: string;
1075
+ /** JSONP */
1076
+ callback?: string;
1077
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
1078
+ courseId: string;
1079
+ /** Selector specifying which fields to include in a partial response. */
1080
+ fields?: string;
1081
+ /** Identifier of the announcement. */
1082
+ id: string;
1083
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1084
+ key?: string;
1085
+ /** OAuth 2.0 token for the current user. */
1086
+ oauth_token?: string;
1087
+ /** Returns response with indentations and line breaks. */
1088
+ prettyPrint?: boolean;
1089
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1090
+ quotaUser?: string;
1091
+ /**
1092
+ * Mask that identifies which fields on the announcement to update. This field is required to do an update. The update fails if invalid fields are specified. If a field supports
1093
+ * empty values, it can be cleared by specifying it in the update mask and not in the Announcement object. If a field that does not support empty values is included in the update
1094
+ * mask and not set in the Announcement object, an `INVALID_ARGUMENT` error is returned. The following fields may be specified by teachers: * `text` * `state` * `scheduled_time`
1095
+ */
1096
+ updateMask?: string;
1097
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1098
+ upload_protocol?: string;
1099
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1100
+ uploadType?: string;
1101
+ },
1102
+ body: Announcement): Request<Announcement>;
1103
+ }
1104
+ interface StudentSubmissionsResource {
1105
+ /**
1106
+ * Returns a student submission. * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course, course work, or student submission or for access errors.
1107
+ * * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course work, or student submission does not exist.
1108
+ */
1109
+ get(request?: {
1110
+ /** V1 error format. */
1111
+ "$.xgafv"?: string;
1112
+ /** OAuth access token. */
1113
+ access_token?: string;
1114
+ /** Data format for response. */
1115
+ alt?: string;
1116
+ /** JSONP */
1117
+ callback?: string;
1118
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
1119
+ courseId: string;
1120
+ /** Identifier of the course work. */
1121
+ courseWorkId: string;
1122
+ /** Selector specifying which fields to include in a partial response. */
1123
+ fields?: string;
1124
+ /** Identifier of the student submission. */
1125
+ id: string;
1126
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1127
+ key?: string;
1128
+ /** OAuth 2.0 token for the current user. */
1129
+ oauth_token?: string;
1130
+ /** Returns response with indentations and line breaks. */
1131
+ prettyPrint?: boolean;
1132
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1133
+ quotaUser?: string;
1134
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1135
+ upload_protocol?: string;
1136
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1137
+ uploadType?: string;
1138
+ }): Request<StudentSubmission>;
1139
+ /**
1140
+ * Returns a list of student submissions that the requester is permitted to view, factoring in the OAuth scopes of the request. `-` may be specified as the `course_work_id` to include
1141
+ * student submissions for multiple course work items. Course students may only view their own work. Course teachers and domain administrators may view all student submissions. This
1142
+ * method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work, or for access errors. *
1143
+ * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course does not exist.
1144
+ */
1145
+ list(request?: {
1146
+ /** V1 error format. */
1147
+ "$.xgafv"?: string;
1148
+ /** OAuth access token. */
1149
+ access_token?: string;
1150
+ /** Data format for response. */
1151
+ alt?: string;
1152
+ /** JSONP */
1153
+ callback?: string;
1154
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
1155
+ courseId: string;
1156
+ /** Identifier of the student work to request. This may be set to the string literal `"-"` to request student work for all course work in the specified course. */
1157
+ courseWorkId: string;
1158
+ /** Selector specifying which fields to include in a partial response. */
1159
+ fields?: string;
1160
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1161
+ key?: string;
1162
+ /** Requested lateness value. If specified, returned student submissions are restricted by the requested value. If unspecified, submissions are returned regardless of `late` value. */
1163
+ late?: string;
1164
+ /** OAuth 2.0 token for the current user. */
1165
+ oauth_token?: string;
1166
+ /** Maximum number of items to return. Zero or unspecified indicates that the server may assign a maximum. The server may return fewer than the specified number of results. */
1167
+ pageSize?: number;
1168
+ /**
1169
+ * nextPageToken value returned from a previous list call, indicating that the subsequent page of results should be returned. The list request must be otherwise identical to the
1170
+ * one that resulted in this token.
1171
+ */
1172
+ pageToken?: string;
1173
+ /** Returns response with indentations and line breaks. */
1174
+ prettyPrint?: boolean;
1175
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1176
+ quotaUser?: string;
1177
+ /** Requested submission states. If specified, returned student submissions match one of the specified submission states. */
1178
+ states?: string | string[];
1179
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1180
+ upload_protocol?: string;
1181
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1182
+ uploadType?: string;
1183
+ /**
1184
+ * Optional argument to restrict returned student work to those owned by the student with the specified identifier. The identifier can be one of the following: * the numeric
1185
+ * identifier for the user * the email address of the user * the string literal `"me"`, indicating the requesting user
1186
+ */
1187
+ userId?: string;
1188
+ }): Request<ListStudentSubmissionsResponse>;
1189
+ /**
1190
+ * Modifies attachments of student submission. Attachments may only be added to student submissions belonging to course work objects with a `workType` of `ASSIGNMENT`. This request
1191
+ * must be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the corresponding course work item. This
1192
+ * method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work, if the user is not permitted
1193
+ * to modify attachments on the requested student submission, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course
1194
+ * work, or student submission does not exist.
1195
+ */
1196
+ modifyAttachments(request: {
1197
+ /** V1 error format. */
1198
+ "$.xgafv"?: string;
1199
+ /** OAuth access token. */
1200
+ access_token?: string;
1201
+ /** Data format for response. */
1202
+ alt?: string;
1203
+ /** JSONP */
1204
+ callback?: string;
1205
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
1206
+ courseId: string;
1207
+ /** Identifier of the course work. */
1208
+ courseWorkId: string;
1209
+ /** Selector specifying which fields to include in a partial response. */
1210
+ fields?: string;
1211
+ /** Identifier of the student submission. */
1212
+ id: string;
1213
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1214
+ key?: string;
1215
+ /** OAuth 2.0 token for the current user. */
1216
+ oauth_token?: string;
1217
+ /** Returns response with indentations and line breaks. */
1218
+ prettyPrint?: boolean;
1219
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1220
+ quotaUser?: string;
1221
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1222
+ upload_protocol?: string;
1223
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1224
+ uploadType?: string;
1225
+ /** Request body */
1226
+ resource: ModifyAttachmentsRequest;
1227
+ }): Request<StudentSubmission>;
1228
+ modifyAttachments(request: {
1229
+ /** V1 error format. */
1230
+ "$.xgafv"?: string;
1231
+ /** OAuth access token. */
1232
+ access_token?: string;
1233
+ /** Data format for response. */
1234
+ alt?: string;
1235
+ /** JSONP */
1236
+ callback?: string;
1237
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
1238
+ courseId: string;
1239
+ /** Identifier of the course work. */
1240
+ courseWorkId: string;
1241
+ /** Selector specifying which fields to include in a partial response. */
1242
+ fields?: string;
1243
+ /** Identifier of the student submission. */
1244
+ id: string;
1245
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1246
+ key?: string;
1247
+ /** OAuth 2.0 token for the current user. */
1248
+ oauth_token?: string;
1249
+ /** Returns response with indentations and line breaks. */
1250
+ prettyPrint?: boolean;
1251
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1252
+ quotaUser?: string;
1253
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1254
+ upload_protocol?: string;
1255
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1256
+ uploadType?: string;
1257
+ },
1258
+ body: ModifyAttachmentsRequest): Request<StudentSubmission>;
1259
+ /**
1260
+ * Updates one or more fields of a student submission. See google.classroom.v1.StudentSubmission for details of which fields may be updated and who may change them. This request must
1261
+ * be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the corresponding course work item. This method
1262
+ * returns the following error codes: * `PERMISSION_DENIED` if the requesting developer project did not create the corresponding course work, if the user is not permitted to make the
1263
+ * requested modification to the student submission, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course work, or
1264
+ * student submission does not exist.
1265
+ */
1266
+ patch(request: {
1267
+ /** V1 error format. */
1268
+ "$.xgafv"?: string;
1269
+ /** OAuth access token. */
1270
+ access_token?: string;
1271
+ /** Data format for response. */
1272
+ alt?: string;
1273
+ /** JSONP */
1274
+ callback?: string;
1275
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
1276
+ courseId: string;
1277
+ /** Identifier of the course work. */
1278
+ courseWorkId: string;
1279
+ /** Selector specifying which fields to include in a partial response. */
1280
+ fields?: string;
1281
+ /** Identifier of the student submission. */
1282
+ id: string;
1283
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1284
+ key?: string;
1285
+ /** OAuth 2.0 token for the current user. */
1286
+ oauth_token?: string;
1287
+ /** Returns response with indentations and line breaks. */
1288
+ prettyPrint?: boolean;
1289
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1290
+ quotaUser?: string;
1291
+ /**
1292
+ * Mask that identifies which fields on the student submission to update. This field is required to do an update. The update fails if invalid fields are specified. The following
1293
+ * fields may be specified by teachers: * `draft_grade` * `assigned_grade`
1294
+ */
1295
+ updateMask?: string;
1296
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1297
+ upload_protocol?: string;
1298
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1299
+ uploadType?: string;
1300
+ /** Request body */
1301
+ resource: StudentSubmission;
1302
+ }): Request<StudentSubmission>;
1303
+ patch(request: {
1304
+ /** V1 error format. */
1305
+ "$.xgafv"?: string;
1306
+ /** OAuth access token. */
1307
+ access_token?: string;
1308
+ /** Data format for response. */
1309
+ alt?: string;
1310
+ /** JSONP */
1311
+ callback?: string;
1312
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
1313
+ courseId: string;
1314
+ /** Identifier of the course work. */
1315
+ courseWorkId: string;
1316
+ /** Selector specifying which fields to include in a partial response. */
1317
+ fields?: string;
1318
+ /** Identifier of the student submission. */
1319
+ id: string;
1320
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1321
+ key?: string;
1322
+ /** OAuth 2.0 token for the current user. */
1323
+ oauth_token?: string;
1324
+ /** Returns response with indentations and line breaks. */
1325
+ prettyPrint?: boolean;
1326
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1327
+ quotaUser?: string;
1328
+ /**
1329
+ * Mask that identifies which fields on the student submission to update. This field is required to do an update. The update fails if invalid fields are specified. The following
1330
+ * fields may be specified by teachers: * `draft_grade` * `assigned_grade`
1331
+ */
1332
+ updateMask?: string;
1333
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1334
+ upload_protocol?: string;
1335
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1336
+ uploadType?: string;
1337
+ },
1338
+ body: StudentSubmission): Request<StudentSubmission>;
1339
+ /**
1340
+ * Reclaims a student submission on behalf of the student that owns it. Reclaiming a student submission transfers ownership of attached Drive files to the student and updates the
1341
+ * submission state. Only the student that owns the requested student submission may call this method, and only for a student submission that has been turned in. This request must be
1342
+ * made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the corresponding course work item. This method
1343
+ * returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work, unsubmit the requested student
1344
+ * submission, or for access errors. * `FAILED_PRECONDITION` if the student submission has not been turned in. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the
1345
+ * requested course, course work, or student submission does not exist.
1346
+ */
1347
+ reclaim(request: {
1348
+ /** V1 error format. */
1349
+ "$.xgafv"?: string;
1350
+ /** OAuth access token. */
1351
+ access_token?: string;
1352
+ /** Data format for response. */
1353
+ alt?: string;
1354
+ /** JSONP */
1355
+ callback?: string;
1356
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
1357
+ courseId: string;
1358
+ /** Identifier of the course work. */
1359
+ courseWorkId: string;
1360
+ /** Selector specifying which fields to include in a partial response. */
1361
+ fields?: string;
1362
+ /** Identifier of the student submission. */
1363
+ id: string;
1364
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1365
+ key?: string;
1366
+ /** OAuth 2.0 token for the current user. */
1367
+ oauth_token?: string;
1368
+ /** Returns response with indentations and line breaks. */
1369
+ prettyPrint?: boolean;
1370
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1371
+ quotaUser?: string;
1372
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1373
+ upload_protocol?: string;
1374
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1375
+ uploadType?: string;
1376
+ /** Request body */
1377
+ resource: ReclaimStudentSubmissionRequest;
1378
+ }): Request<{}>;
1379
+ reclaim(request: {
1380
+ /** V1 error format. */
1381
+ "$.xgafv"?: string;
1382
+ /** OAuth access token. */
1383
+ access_token?: string;
1384
+ /** Data format for response. */
1385
+ alt?: string;
1386
+ /** JSONP */
1387
+ callback?: string;
1388
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
1389
+ courseId: string;
1390
+ /** Identifier of the course work. */
1391
+ courseWorkId: string;
1392
+ /** Selector specifying which fields to include in a partial response. */
1393
+ fields?: string;
1394
+ /** Identifier of the student submission. */
1395
+ id: string;
1396
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1397
+ key?: string;
1398
+ /** OAuth 2.0 token for the current user. */
1399
+ oauth_token?: string;
1400
+ /** Returns response with indentations and line breaks. */
1401
+ prettyPrint?: boolean;
1402
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1403
+ quotaUser?: string;
1404
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1405
+ upload_protocol?: string;
1406
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1407
+ uploadType?: string;
1408
+ },
1409
+ body: ReclaimStudentSubmissionRequest): Request<{}>;
1410
+ /**
1411
+ * Returns a student submission. Returning a student submission transfers ownership of attached Drive files to the student and may also update the submission state. Unlike the
1412
+ * Classroom application, returning a student submission does not set assignedGrade to the draftGrade value. Only a teacher of the course that contains the requested student submission
1413
+ * may call this method. This request must be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the
1414
+ * corresponding course work item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course
1415
+ * work, return the requested student submission, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course work, or student
1416
+ * submission does not exist.
1417
+ */
1418
+ return(request: {
1419
+ /** V1 error format. */
1420
+ "$.xgafv"?: string;
1421
+ /** OAuth access token. */
1422
+ access_token?: string;
1423
+ /** Data format for response. */
1424
+ alt?: string;
1425
+ /** JSONP */
1426
+ callback?: string;
1427
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
1428
+ courseId: string;
1429
+ /** Identifier of the course work. */
1430
+ courseWorkId: string;
1431
+ /** Selector specifying which fields to include in a partial response. */
1432
+ fields?: string;
1433
+ /** Identifier of the student submission. */
1434
+ id: string;
1435
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1436
+ key?: string;
1437
+ /** OAuth 2.0 token for the current user. */
1438
+ oauth_token?: string;
1439
+ /** Returns response with indentations and line breaks. */
1440
+ prettyPrint?: boolean;
1441
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1442
+ quotaUser?: string;
1443
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1444
+ upload_protocol?: string;
1445
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1446
+ uploadType?: string;
1447
+ /** Request body */
1448
+ resource: ReturnStudentSubmissionRequest;
1449
+ }): Request<{}>;
1450
+ return(request: {
1451
+ /** V1 error format. */
1452
+ "$.xgafv"?: string;
1453
+ /** OAuth access token. */
1454
+ access_token?: string;
1455
+ /** Data format for response. */
1456
+ alt?: string;
1457
+ /** JSONP */
1458
+ callback?: string;
1459
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
1460
+ courseId: string;
1461
+ /** Identifier of the course work. */
1462
+ courseWorkId: string;
1463
+ /** Selector specifying which fields to include in a partial response. */
1464
+ fields?: string;
1465
+ /** Identifier of the student submission. */
1466
+ id: string;
1467
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1468
+ key?: string;
1469
+ /** OAuth 2.0 token for the current user. */
1470
+ oauth_token?: string;
1471
+ /** Returns response with indentations and line breaks. */
1472
+ prettyPrint?: boolean;
1473
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1474
+ quotaUser?: string;
1475
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1476
+ upload_protocol?: string;
1477
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1478
+ uploadType?: string;
1479
+ },
1480
+ body: ReturnStudentSubmissionRequest): Request<{}>;
1481
+ /**
1482
+ * Turns in a student submission. Turning in a student submission transfers ownership of attached Drive files to the teacher and may also update the submission state. This may only be
1483
+ * called by the student that owns the specified student submission. This request must be made by the Developer Console project of the [OAuth client
1484
+ * ID](https://support.google.com/cloud/answer/6158849) used to create the corresponding course work item. This method returns the following error codes: * `PERMISSION_DENIED` if the
1485
+ * requesting user is not permitted to access the requested course or course work, turn in the requested student submission, or for access errors. * `INVALID_ARGUMENT` if the request
1486
+ * is malformed. * `NOT_FOUND` if the requested course, course work, or student submission does not exist.
1487
+ */
1488
+ turnIn(request: {
1489
+ /** V1 error format. */
1490
+ "$.xgafv"?: string;
1491
+ /** OAuth access token. */
1492
+ access_token?: string;
1493
+ /** Data format for response. */
1494
+ alt?: string;
1495
+ /** JSONP */
1496
+ callback?: string;
1497
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
1498
+ courseId: string;
1499
+ /** Identifier of the course work. */
1500
+ courseWorkId: string;
1501
+ /** Selector specifying which fields to include in a partial response. */
1502
+ fields?: string;
1503
+ /** Identifier of the student submission. */
1504
+ id: string;
1505
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1506
+ key?: string;
1507
+ /** OAuth 2.0 token for the current user. */
1508
+ oauth_token?: string;
1509
+ /** Returns response with indentations and line breaks. */
1510
+ prettyPrint?: boolean;
1511
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1512
+ quotaUser?: string;
1513
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1514
+ upload_protocol?: string;
1515
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1516
+ uploadType?: string;
1517
+ /** Request body */
1518
+ resource: TurnInStudentSubmissionRequest;
1519
+ }): Request<{}>;
1520
+ turnIn(request: {
1521
+ /** V1 error format. */
1522
+ "$.xgafv"?: string;
1523
+ /** OAuth access token. */
1524
+ access_token?: string;
1525
+ /** Data format for response. */
1526
+ alt?: string;
1527
+ /** JSONP */
1528
+ callback?: string;
1529
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
1530
+ courseId: string;
1531
+ /** Identifier of the course work. */
1532
+ courseWorkId: string;
1533
+ /** Selector specifying which fields to include in a partial response. */
1534
+ fields?: string;
1535
+ /** Identifier of the student submission. */
1536
+ id: string;
1537
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1538
+ key?: string;
1539
+ /** OAuth 2.0 token for the current user. */
1540
+ oauth_token?: string;
1541
+ /** Returns response with indentations and line breaks. */
1542
+ prettyPrint?: boolean;
1543
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1544
+ quotaUser?: string;
1545
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1546
+ upload_protocol?: string;
1547
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1548
+ uploadType?: string;
1549
+ },
1550
+ body: TurnInStudentSubmissionRequest): Request<{}>;
1551
+ }
1552
+ interface CourseWorkResource {
1553
+ /**
1554
+ * Creates course work. The resulting course work (and corresponding student submissions) are associated with the Developer Console project of the [OAuth client
1555
+ * ID](https://support.google.com/cloud/answer/6158849) used to make the request. Classroom API requests to modify course work and student submissions must be made with an OAuth client
1556
+ * ID from the associated Developer Console project. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the
1557
+ * requested course, create course work in the requested course, share a Drive attachment, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the
1558
+ * requested course does not exist. * `FAILED_PRECONDITION` for the following request error: * AttachmentNotVisible
1559
+ */
1560
+ create(request: {
1561
+ /** V1 error format. */
1562
+ "$.xgafv"?: string;
1563
+ /** OAuth access token. */
1564
+ access_token?: string;
1565
+ /** Data format for response. */
1566
+ alt?: string;
1567
+ /** JSONP */
1568
+ callback?: string;
1569
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
1570
+ courseId: string;
1571
+ /** Selector specifying which fields to include in a partial response. */
1572
+ fields?: string;
1573
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1574
+ key?: string;
1575
+ /** OAuth 2.0 token for the current user. */
1576
+ oauth_token?: string;
1577
+ /** Returns response with indentations and line breaks. */
1578
+ prettyPrint?: boolean;
1579
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1580
+ quotaUser?: string;
1581
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1582
+ upload_protocol?: string;
1583
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1584
+ uploadType?: string;
1585
+ /** Request body */
1586
+ resource: CourseWork;
1587
+ }): Request<CourseWork>;
1588
+ create(request: {
1589
+ /** V1 error format. */
1590
+ "$.xgafv"?: string;
1591
+ /** OAuth access token. */
1592
+ access_token?: string;
1593
+ /** Data format for response. */
1594
+ alt?: string;
1595
+ /** JSONP */
1596
+ callback?: string;
1597
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
1598
+ courseId: string;
1599
+ /** Selector specifying which fields to include in a partial response. */
1600
+ fields?: string;
1601
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1602
+ key?: string;
1603
+ /** OAuth 2.0 token for the current user. */
1604
+ oauth_token?: string;
1605
+ /** Returns response with indentations and line breaks. */
1606
+ prettyPrint?: boolean;
1607
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1608
+ quotaUser?: string;
1609
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1610
+ upload_protocol?: string;
1611
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1612
+ uploadType?: string;
1613
+ },
1614
+ body: CourseWork): Request<CourseWork>;
1615
+ /**
1616
+ * Deletes a course work. This request must be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the
1617
+ * corresponding course work item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting developer project did not create the corresponding course
1618
+ * work, if the requesting user is not permitted to delete the requested course or for access errors. * `FAILED_PRECONDITION` if the requested course work has already been deleted. *
1619
+ * `NOT_FOUND` if no course exists with the requested ID.
1620
+ */
1621
+ delete(request?: {
1622
+ /** V1 error format. */
1623
+ "$.xgafv"?: string;
1624
+ /** OAuth access token. */
1625
+ access_token?: string;
1626
+ /** Data format for response. */
1627
+ alt?: string;
1628
+ /** JSONP */
1629
+ callback?: string;
1630
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
1631
+ courseId: string;
1632
+ /** Selector specifying which fields to include in a partial response. */
1633
+ fields?: string;
1634
+ /** Identifier of the course work to delete. This identifier is a Classroom-assigned identifier. */
1635
+ id: string;
1636
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1637
+ key?: string;
1638
+ /** OAuth 2.0 token for the current user. */
1639
+ oauth_token?: string;
1640
+ /** Returns response with indentations and line breaks. */
1641
+ prettyPrint?: boolean;
1642
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1643
+ quotaUser?: string;
1644
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1645
+ upload_protocol?: string;
1646
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1647
+ uploadType?: string;
1648
+ }): Request<{}>;
1649
+ /**
1650
+ * Returns course work. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work, or
1651
+ * for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course or course work does not exist.
1652
+ */
1653
+ get(request?: {
1654
+ /** V1 error format. */
1655
+ "$.xgafv"?: string;
1656
+ /** OAuth access token. */
1657
+ access_token?: string;
1658
+ /** Data format for response. */
1659
+ alt?: string;
1660
+ /** JSONP */
1661
+ callback?: string;
1662
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
1663
+ courseId: string;
1664
+ /** Selector specifying which fields to include in a partial response. */
1665
+ fields?: string;
1666
+ /** Identifier of the course work. */
1667
+ id: string;
1668
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1669
+ key?: string;
1670
+ /** OAuth 2.0 token for the current user. */
1671
+ oauth_token?: string;
1672
+ /** Returns response with indentations and line breaks. */
1673
+ prettyPrint?: boolean;
1674
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1675
+ quotaUser?: string;
1676
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1677
+ upload_protocol?: string;
1678
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1679
+ uploadType?: string;
1680
+ }): Request<CourseWork>;
1681
+ /**
1682
+ * Returns a list of course work that the requester is permitted to view. Course students may only view `PUBLISHED` course work. Course teachers and domain administrators may view all
1683
+ * course work. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or for access errors. *
1684
+ * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course does not exist.
1685
+ */
1686
+ list(request?: {
1687
+ /** V1 error format. */
1688
+ "$.xgafv"?: string;
1689
+ /** OAuth access token. */
1690
+ access_token?: string;
1691
+ /** Data format for response. */
1692
+ alt?: string;
1693
+ /** JSONP */
1694
+ callback?: string;
1695
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
1696
+ courseId: string;
1697
+ /** Restriction on the work status to return. Only courseWork that matches is returned. If unspecified, items with a work status of `PUBLISHED` is returned. */
1698
+ courseWorkStates?: string | string[];
1699
+ /** Selector specifying which fields to include in a partial response. */
1700
+ fields?: string;
1701
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1702
+ key?: string;
1703
+ /** OAuth 2.0 token for the current user. */
1704
+ oauth_token?: string;
1705
+ /**
1706
+ * Optional sort ordering for results. A comma-separated list of fields with an optional sort direction keyword. Supported fields are `updateTime` and `dueDate`. Supported
1707
+ * direction keywords are `asc` and `desc`. If not specified, `updateTime desc` is the default behavior. Examples: `dueDate asc,updateTime desc`, `updateTime,dueDate desc`
1708
+ */
1709
+ orderBy?: string;
1710
+ /** Maximum number of items to return. Zero or unspecified indicates that the server may assign a maximum. The server may return fewer than the specified number of results. */
1711
+ pageSize?: number;
1712
+ /**
1713
+ * nextPageToken value returned from a previous list call, indicating that the subsequent page of results should be returned. The list request must be otherwise identical to the
1714
+ * one that resulted in this token.
1715
+ */
1716
+ pageToken?: string;
1717
+ /** Returns response with indentations and line breaks. */
1718
+ prettyPrint?: boolean;
1719
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1720
+ quotaUser?: string;
1721
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1722
+ upload_protocol?: string;
1723
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1724
+ uploadType?: string;
1725
+ }): Request<ListCourseWorkResponse>;
1726
+ /**
1727
+ * Modifies assignee mode and options of a coursework. Only a teacher of the course that contains the coursework may call this method. This method returns the following error codes: *
1728
+ * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work or for access errors. * `INVALID_ARGUMENT` if the request is malformed. *
1729
+ * `NOT_FOUND` if the requested course or course work does not exist.
1730
+ */
1731
+ modifyAssignees(request: {
1732
+ /** V1 error format. */
1733
+ "$.xgafv"?: string;
1734
+ /** OAuth access token. */
1735
+ access_token?: string;
1736
+ /** Data format for response. */
1737
+ alt?: string;
1738
+ /** JSONP */
1739
+ callback?: string;
1740
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
1741
+ courseId: string;
1742
+ /** Selector specifying which fields to include in a partial response. */
1743
+ fields?: string;
1744
+ /** Identifier of the coursework. */
1745
+ id: string;
1746
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1747
+ key?: string;
1748
+ /** OAuth 2.0 token for the current user. */
1749
+ oauth_token?: string;
1750
+ /** Returns response with indentations and line breaks. */
1751
+ prettyPrint?: boolean;
1752
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1753
+ quotaUser?: string;
1754
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1755
+ upload_protocol?: string;
1756
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1757
+ uploadType?: string;
1758
+ /** Request body */
1759
+ resource: ModifyCourseWorkAssigneesRequest;
1760
+ }): Request<CourseWork>;
1761
+ modifyAssignees(request: {
1762
+ /** V1 error format. */
1763
+ "$.xgafv"?: string;
1764
+ /** OAuth access token. */
1765
+ access_token?: string;
1766
+ /** Data format for response. */
1767
+ alt?: string;
1768
+ /** JSONP */
1769
+ callback?: string;
1770
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
1771
+ courseId: string;
1772
+ /** Selector specifying which fields to include in a partial response. */
1773
+ fields?: string;
1774
+ /** Identifier of the coursework. */
1775
+ id: string;
1776
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1777
+ key?: string;
1778
+ /** OAuth 2.0 token for the current user. */
1779
+ oauth_token?: string;
1780
+ /** Returns response with indentations and line breaks. */
1781
+ prettyPrint?: boolean;
1782
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1783
+ quotaUser?: string;
1784
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1785
+ upload_protocol?: string;
1786
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1787
+ uploadType?: string;
1788
+ },
1789
+ body: ModifyCourseWorkAssigneesRequest): Request<CourseWork>;
1790
+ /**
1791
+ * Updates one or more fields of a course work. See google.classroom.v1.CourseWork for details of which fields may be updated and who may change them. This request must be made by the
1792
+ * Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the corresponding course work item. This method returns the
1793
+ * following error codes: * `PERMISSION_DENIED` if the requesting developer project did not create the corresponding course work, if the user is not permitted to make the requested
1794
+ * modification to the student submission, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `FAILED_PRECONDITION` if the requested course work has already been
1795
+ * deleted. * `NOT_FOUND` if the requested course, course work, or student submission does not exist.
1796
+ */
1797
+ patch(request: {
1798
+ /** V1 error format. */
1799
+ "$.xgafv"?: string;
1800
+ /** OAuth access token. */
1801
+ access_token?: string;
1802
+ /** Data format for response. */
1803
+ alt?: string;
1804
+ /** JSONP */
1805
+ callback?: string;
1806
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
1807
+ courseId: string;
1808
+ /** Selector specifying which fields to include in a partial response. */
1809
+ fields?: string;
1810
+ /** Identifier of the course work. */
1811
+ id: string;
1812
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1813
+ key?: string;
1814
+ /** OAuth 2.0 token for the current user. */
1815
+ oauth_token?: string;
1816
+ /** Returns response with indentations and line breaks. */
1817
+ prettyPrint?: boolean;
1818
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1819
+ quotaUser?: string;
1820
+ /**
1821
+ * Mask that identifies which fields on the course work to update. This field is required to do an update. The update fails if invalid fields are specified. If a field supports
1822
+ * empty values, it can be cleared by specifying it in the update mask and not in the CourseWork object. If a field that does not support empty values is included in the update
1823
+ * mask and not set in the CourseWork object, an `INVALID_ARGUMENT` error is returned. The following fields may be specified by teachers: * `title` * `description` * `state` *
1824
+ * `due_date` * `due_time` * `max_points` * `scheduled_time` * `submission_modification_mode` * `topic_id`
1825
+ */
1826
+ updateMask?: string;
1827
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1828
+ upload_protocol?: string;
1829
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1830
+ uploadType?: string;
1831
+ /** Request body */
1832
+ resource: CourseWork;
1833
+ }): Request<CourseWork>;
1834
+ patch(request: {
1835
+ /** V1 error format. */
1836
+ "$.xgafv"?: string;
1837
+ /** OAuth access token. */
1838
+ access_token?: string;
1839
+ /** Data format for response. */
1840
+ alt?: string;
1841
+ /** JSONP */
1842
+ callback?: string;
1843
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
1844
+ courseId: string;
1845
+ /** Selector specifying which fields to include in a partial response. */
1846
+ fields?: string;
1847
+ /** Identifier of the course work. */
1848
+ id: string;
1849
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1850
+ key?: string;
1851
+ /** OAuth 2.0 token for the current user. */
1852
+ oauth_token?: string;
1853
+ /** Returns response with indentations and line breaks. */
1854
+ prettyPrint?: boolean;
1855
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1856
+ quotaUser?: string;
1857
+ /**
1858
+ * Mask that identifies which fields on the course work to update. This field is required to do an update. The update fails if invalid fields are specified. If a field supports
1859
+ * empty values, it can be cleared by specifying it in the update mask and not in the CourseWork object. If a field that does not support empty values is included in the update
1860
+ * mask and not set in the CourseWork object, an `INVALID_ARGUMENT` error is returned. The following fields may be specified by teachers: * `title` * `description` * `state` *
1861
+ * `due_date` * `due_time` * `max_points` * `scheduled_time` * `submission_modification_mode` * `topic_id`
1862
+ */
1863
+ updateMask?: string;
1864
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1865
+ upload_protocol?: string;
1866
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1867
+ uploadType?: string;
1868
+ },
1869
+ body: CourseWork): Request<CourseWork>;
1870
+ studentSubmissions: StudentSubmissionsResource;
1871
+ }
1872
+ interface CourseWorkMaterialsResource {
1873
+ /**
1874
+ * Creates a course work material. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course, create
1875
+ * course work material in the requested course, share a Drive attachment, or for access errors. * `INVALID_ARGUMENT` if the request is malformed or if more than 20 * materials are
1876
+ * provided. * `NOT_FOUND` if the requested course does not exist. * `FAILED_PRECONDITION` for the following request error: * AttachmentNotVisible
1877
+ */
1878
+ create(request: {
1879
+ /** V1 error format. */
1880
+ "$.xgafv"?: string;
1881
+ /** OAuth access token. */
1882
+ access_token?: string;
1883
+ /** Data format for response. */
1884
+ alt?: string;
1885
+ /** JSONP */
1886
+ callback?: string;
1887
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
1888
+ courseId: string;
1889
+ /** Selector specifying which fields to include in a partial response. */
1890
+ fields?: string;
1891
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1892
+ key?: string;
1893
+ /** OAuth 2.0 token for the current user. */
1894
+ oauth_token?: string;
1895
+ /** Returns response with indentations and line breaks. */
1896
+ prettyPrint?: boolean;
1897
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1898
+ quotaUser?: string;
1899
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1900
+ upload_protocol?: string;
1901
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1902
+ uploadType?: string;
1903
+ /** Request body */
1904
+ resource: CourseWorkMaterial;
1905
+ }): Request<CourseWorkMaterial>;
1906
+ create(request: {
1907
+ /** V1 error format. */
1908
+ "$.xgafv"?: string;
1909
+ /** OAuth access token. */
1910
+ access_token?: string;
1911
+ /** Data format for response. */
1912
+ alt?: string;
1913
+ /** JSONP */
1914
+ callback?: string;
1915
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
1916
+ courseId: string;
1917
+ /** Selector specifying which fields to include in a partial response. */
1918
+ fields?: string;
1919
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1920
+ key?: string;
1921
+ /** OAuth 2.0 token for the current user. */
1922
+ oauth_token?: string;
1923
+ /** Returns response with indentations and line breaks. */
1924
+ prettyPrint?: boolean;
1925
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1926
+ quotaUser?: string;
1927
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1928
+ upload_protocol?: string;
1929
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1930
+ uploadType?: string;
1931
+ },
1932
+ body: CourseWorkMaterial): Request<CourseWorkMaterial>;
1933
+ /**
1934
+ * Deletes a course work material. This request must be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create
1935
+ * the corresponding course work material item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting developer project did not create the
1936
+ * corresponding course work material, if the requesting user is not permitted to delete the requested course or for access errors. * `FAILED_PRECONDITION` if the requested course work
1937
+ * material has already been deleted. * `NOT_FOUND` if no course exists with the requested ID.
1938
+ */
1939
+ delete(request?: {
1940
+ /** V1 error format. */
1941
+ "$.xgafv"?: string;
1942
+ /** OAuth access token. */
1943
+ access_token?: string;
1944
+ /** Data format for response. */
1945
+ alt?: string;
1946
+ /** JSONP */
1947
+ callback?: string;
1948
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
1949
+ courseId: string;
1950
+ /** Selector specifying which fields to include in a partial response. */
1951
+ fields?: string;
1952
+ /** Identifier of the course work material to delete. This identifier is a Classroom-assigned identifier. */
1953
+ id: string;
1954
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1955
+ key?: string;
1956
+ /** OAuth 2.0 token for the current user. */
1957
+ oauth_token?: string;
1958
+ /** Returns response with indentations and line breaks. */
1959
+ prettyPrint?: boolean;
1960
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1961
+ quotaUser?: string;
1962
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1963
+ upload_protocol?: string;
1964
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1965
+ uploadType?: string;
1966
+ }): Request<{}>;
1967
+ /**
1968
+ * Returns a course work material. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course
1969
+ * work material, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course or course work material does not exist.
1970
+ */
1971
+ get(request?: {
1972
+ /** V1 error format. */
1973
+ "$.xgafv"?: string;
1974
+ /** OAuth access token. */
1975
+ access_token?: string;
1976
+ /** Data format for response. */
1977
+ alt?: string;
1978
+ /** JSONP */
1979
+ callback?: string;
1980
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
1981
+ courseId: string;
1982
+ /** Selector specifying which fields to include in a partial response. */
1983
+ fields?: string;
1984
+ /** Identifier of the course work material. */
1985
+ id: string;
1986
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1987
+ key?: string;
1988
+ /** OAuth 2.0 token for the current user. */
1989
+ oauth_token?: string;
1990
+ /** Returns response with indentations and line breaks. */
1991
+ prettyPrint?: boolean;
1992
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1993
+ quotaUser?: string;
1994
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1995
+ upload_protocol?: string;
1996
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1997
+ uploadType?: string;
1998
+ }): Request<CourseWorkMaterial>;
1999
+ /**
2000
+ * Returns a list of course work material that the requester is permitted to view. Course students may only view `PUBLISHED` course work material. Course teachers and domain
2001
+ * administrators may view all course work material. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the
2002
+ * requested course or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course does not exist.
2003
+ */
2004
+ list(request?: {
2005
+ /** V1 error format. */
2006
+ "$.xgafv"?: string;
2007
+ /** OAuth access token. */
2008
+ access_token?: string;
2009
+ /** Data format for response. */
2010
+ alt?: string;
2011
+ /** JSONP */
2012
+ callback?: string;
2013
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
2014
+ courseId: string;
2015
+ /** Restriction on the work status to return. Only course work material that matches is returned. If unspecified, items with a work status of `PUBLISHED` is returned. */
2016
+ courseWorkMaterialStates?: string | string[];
2017
+ /** Selector specifying which fields to include in a partial response. */
2018
+ fields?: string;
2019
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
2020
+ key?: string;
2021
+ /**
2022
+ * Optional filtering for course work material with at least one Drive material whose ID matches the provided string. If `material_link` is also specified, course work material
2023
+ * must have materials matching both filters.
2024
+ */
2025
+ materialDriveId?: string;
2026
+ /** Optional filtering for course work material with at least one link material whose URL partially matches the provided string. */
2027
+ materialLink?: string;
2028
+ /** OAuth 2.0 token for the current user. */
2029
+ oauth_token?: string;
2030
+ /**
2031
+ * Optional sort ordering for results. A comma-separated list of fields with an optional sort direction keyword. Supported field is `updateTime`. Supported direction keywords are
2032
+ * `asc` and `desc`. If not specified, `updateTime desc` is the default behavior. Examples: `updateTime asc`, `updateTime`
2033
+ */
2034
+ orderBy?: string;
2035
+ /** Maximum number of items to return. Zero or unspecified indicates that the server may assign a maximum. The server may return fewer than the specified number of results. */
2036
+ pageSize?: number;
2037
+ /**
2038
+ * nextPageToken value returned from a previous list call, indicating that the subsequent page of results should be returned. The list request must be otherwise identical to the
2039
+ * one that resulted in this token.
2040
+ */
2041
+ pageToken?: string;
2042
+ /** Returns response with indentations and line breaks. */
2043
+ prettyPrint?: boolean;
2044
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
2045
+ quotaUser?: string;
2046
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2047
+ upload_protocol?: string;
2048
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2049
+ uploadType?: string;
2050
+ }): Request<ListCourseWorkMaterialResponse>;
2051
+ /**
2052
+ * Updates one or more fields of a course work material. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting developer project for access errors. *
2053
+ * `INVALID_ARGUMENT` if the request is malformed. * `FAILED_PRECONDITION` if the requested course work material has already been deleted. * `NOT_FOUND` if the requested course or
2054
+ * course work material does not exist
2055
+ */
2056
+ patch(request: {
2057
+ /** V1 error format. */
2058
+ "$.xgafv"?: string;
2059
+ /** OAuth access token. */
2060
+ access_token?: string;
2061
+ /** Data format for response. */
2062
+ alt?: string;
2063
+ /** JSONP */
2064
+ callback?: string;
2065
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
2066
+ courseId: string;
2067
+ /** Selector specifying which fields to include in a partial response. */
2068
+ fields?: string;
2069
+ /** Identifier of the course work material. */
2070
+ id: string;
2071
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
2072
+ key?: string;
2073
+ /** OAuth 2.0 token for the current user. */
2074
+ oauth_token?: string;
2075
+ /** Returns response with indentations and line breaks. */
2076
+ prettyPrint?: boolean;
2077
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
2078
+ quotaUser?: string;
2079
+ /**
2080
+ * Mask that identifies which fields on the course work material to update. This field is required to do an update. The update fails if invalid fields are specified. If a field
2081
+ * supports empty values, it can be cleared by specifying it in the update mask and not in the course work material object. If a field that does not support empty values is
2082
+ * included in the update mask and not set in the course work material object, an `INVALID_ARGUMENT` error is returned. The following fields may be specified by teachers: * `title`
2083
+ * * `description` * `state` * `scheduled_time` * `topic_id`
2084
+ */
2085
+ updateMask?: string;
2086
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2087
+ upload_protocol?: string;
2088
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2089
+ uploadType?: string;
2090
+ /** Request body */
2091
+ resource: CourseWorkMaterial;
2092
+ }): Request<CourseWorkMaterial>;
2093
+ patch(request: {
2094
+ /** V1 error format. */
2095
+ "$.xgafv"?: string;
2096
+ /** OAuth access token. */
2097
+ access_token?: string;
2098
+ /** Data format for response. */
2099
+ alt?: string;
2100
+ /** JSONP */
2101
+ callback?: string;
2102
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
2103
+ courseId: string;
2104
+ /** Selector specifying which fields to include in a partial response. */
2105
+ fields?: string;
2106
+ /** Identifier of the course work material. */
2107
+ id: string;
2108
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
2109
+ key?: string;
2110
+ /** OAuth 2.0 token for the current user. */
2111
+ oauth_token?: string;
2112
+ /** Returns response with indentations and line breaks. */
2113
+ prettyPrint?: boolean;
2114
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
2115
+ quotaUser?: string;
2116
+ /**
2117
+ * Mask that identifies which fields on the course work material to update. This field is required to do an update. The update fails if invalid fields are specified. If a field
2118
+ * supports empty values, it can be cleared by specifying it in the update mask and not in the course work material object. If a field that does not support empty values is
2119
+ * included in the update mask and not set in the course work material object, an `INVALID_ARGUMENT` error is returned. The following fields may be specified by teachers: * `title`
2120
+ * * `description` * `state` * `scheduled_time` * `topic_id`
2121
+ */
2122
+ updateMask?: string;
2123
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2124
+ upload_protocol?: string;
2125
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2126
+ uploadType?: string;
2127
+ },
2128
+ body: CourseWorkMaterial): Request<CourseWorkMaterial>;
2129
+ }
2130
+ interface StudentsResource {
2131
+ /**
2132
+ * Adds a user as a student of a course. Domain administrators are permitted to [directly add](https://developers.google.com/classroom/guides/manage-users) users within their domain as
2133
+ * students to courses within their domain. Students are permitted to add themselves to a course using an enrollment code. This method returns the following error codes: *
2134
+ * `PERMISSION_DENIED` if the requesting user is not permitted to create students in this course or for access errors. * `NOT_FOUND` if the requested course ID does not exist. *
2135
+ * `FAILED_PRECONDITION` if the requested user's account is disabled, for the following request errors: * CourseMemberLimitReached * CourseNotModifiable *
2136
+ * UserGroupsMembershipLimitReached * InactiveCourseOwner * `ALREADY_EXISTS` if the user is already a student or teacher in the course.
2137
+ */
2138
+ create(request: {
2139
+ /** V1 error format. */
2140
+ "$.xgafv"?: string;
2141
+ /** OAuth access token. */
2142
+ access_token?: string;
2143
+ /** Data format for response. */
2144
+ alt?: string;
2145
+ /** JSONP */
2146
+ callback?: string;
2147
+ /** Identifier of the course to create the student in. This identifier can be either the Classroom-assigned identifier or an alias. */
2148
+ courseId: string;
2149
+ /**
2150
+ * Enrollment code of the course to create the student in. This code is required if userId corresponds to the requesting user; it may be omitted if the requesting user has
2151
+ * administrative permissions to create students for any user.
2152
+ */
2153
+ enrollmentCode?: string;
2154
+ /** Selector specifying which fields to include in a partial response. */
2155
+ fields?: string;
2156
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
2157
+ key?: string;
2158
+ /** OAuth 2.0 token for the current user. */
2159
+ oauth_token?: string;
2160
+ /** Returns response with indentations and line breaks. */
2161
+ prettyPrint?: boolean;
2162
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
2163
+ quotaUser?: string;
2164
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2165
+ upload_protocol?: string;
2166
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2167
+ uploadType?: string;
2168
+ /** Request body */
2169
+ resource: Student;
2170
+ }): Request<Student>;
2171
+ create(request: {
2172
+ /** V1 error format. */
2173
+ "$.xgafv"?: string;
2174
+ /** OAuth access token. */
2175
+ access_token?: string;
2176
+ /** Data format for response. */
2177
+ alt?: string;
2178
+ /** JSONP */
2179
+ callback?: string;
2180
+ /** Identifier of the course to create the student in. This identifier can be either the Classroom-assigned identifier or an alias. */
2181
+ courseId: string;
2182
+ /**
2183
+ * Enrollment code of the course to create the student in. This code is required if userId corresponds to the requesting user; it may be omitted if the requesting user has
2184
+ * administrative permissions to create students for any user.
2185
+ */
2186
+ enrollmentCode?: string;
2187
+ /** Selector specifying which fields to include in a partial response. */
2188
+ fields?: string;
2189
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
2190
+ key?: string;
2191
+ /** OAuth 2.0 token for the current user. */
2192
+ oauth_token?: string;
2193
+ /** Returns response with indentations and line breaks. */
2194
+ prettyPrint?: boolean;
2195
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
2196
+ quotaUser?: string;
2197
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2198
+ upload_protocol?: string;
2199
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2200
+ uploadType?: string;
2201
+ },
2202
+ body: Student): Request<Student>;
2203
+ /**
2204
+ * Deletes a student of a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to delete students of this course or for
2205
+ * access errors. * `NOT_FOUND` if no student of this course has the requested ID or if the course does not exist.
2206
+ */
2207
+ delete(request?: {
2208
+ /** V1 error format. */
2209
+ "$.xgafv"?: string;
2210
+ /** OAuth access token. */
2211
+ access_token?: string;
2212
+ /** Data format for response. */
2213
+ alt?: string;
2214
+ /** JSONP */
2215
+ callback?: string;
2216
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
2217
+ courseId: string;
2218
+ /** Selector specifying which fields to include in a partial response. */
2219
+ fields?: string;
2220
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
2221
+ key?: string;
2222
+ /** OAuth 2.0 token for the current user. */
2223
+ oauth_token?: string;
2224
+ /** Returns response with indentations and line breaks. */
2225
+ prettyPrint?: boolean;
2226
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
2227
+ quotaUser?: string;
2228
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2229
+ upload_protocol?: string;
2230
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2231
+ uploadType?: string;
2232
+ /**
2233
+ * Identifier of the student to delete. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal
2234
+ * `"me"`, indicating the requesting user
2235
+ */
2236
+ userId: string;
2237
+ }): Request<{}>;
2238
+ /**
2239
+ * Returns a student of a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to view students of this course or for
2240
+ * access errors. * `NOT_FOUND` if no student of this course has the requested ID or if the course does not exist.
2241
+ */
2242
+ get(request?: {
2243
+ /** V1 error format. */
2244
+ "$.xgafv"?: string;
2245
+ /** OAuth access token. */
2246
+ access_token?: string;
2247
+ /** Data format for response. */
2248
+ alt?: string;
2249
+ /** JSONP */
2250
+ callback?: string;
2251
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
2252
+ courseId: string;
2253
+ /** Selector specifying which fields to include in a partial response. */
2254
+ fields?: string;
2255
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
2256
+ key?: string;
2257
+ /** OAuth 2.0 token for the current user. */
2258
+ oauth_token?: string;
2259
+ /** Returns response with indentations and line breaks. */
2260
+ prettyPrint?: boolean;
2261
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
2262
+ quotaUser?: string;
2263
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2264
+ upload_protocol?: string;
2265
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2266
+ uploadType?: string;
2267
+ /**
2268
+ * Identifier of the student to return. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal
2269
+ * `"me"`, indicating the requesting user
2270
+ */
2271
+ userId: string;
2272
+ }): Request<Student>;
2273
+ /**
2274
+ * Returns a list of students of this course that the requester is permitted to view. This method returns the following error codes: * `NOT_FOUND` if the course does not exist. *
2275
+ * `PERMISSION_DENIED` for access errors.
2276
+ */
2277
+ list(request?: {
2278
+ /** V1 error format. */
2279
+ "$.xgafv"?: string;
2280
+ /** OAuth access token. */
2281
+ access_token?: string;
2282
+ /** Data format for response. */
2283
+ alt?: string;
2284
+ /** JSONP */
2285
+ callback?: string;
2286
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
2287
+ courseId: string;
2288
+ /** Selector specifying which fields to include in a partial response. */
2289
+ fields?: string;
2290
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
2291
+ key?: string;
2292
+ /** OAuth 2.0 token for the current user. */
2293
+ oauth_token?: string;
2294
+ /** Maximum number of items to return. The default is 30 if unspecified or `0`. The server may return fewer than the specified number of results. */
2295
+ pageSize?: number;
2296
+ /**
2297
+ * nextPageToken value returned from a previous list call, indicating that the subsequent page of results should be returned. The list request must be otherwise identical to the
2298
+ * one that resulted in this token.
2299
+ */
2300
+ pageToken?: string;
2301
+ /** Returns response with indentations and line breaks. */
2302
+ prettyPrint?: boolean;
2303
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
2304
+ quotaUser?: string;
2305
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2306
+ upload_protocol?: string;
2307
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2308
+ uploadType?: string;
2309
+ }): Request<ListStudentsResponse>;
2310
+ }
2311
+ interface TeachersResource {
2312
+ /**
2313
+ * Creates a teacher of a course. Domain administrators are permitted to [directly add](https://developers.google.com/classroom/guides/manage-users) users within their domain as
2314
+ * teachers to courses within their domain. Non-admin users should send an Invitation instead. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting
2315
+ * user is not permitted to create teachers in this course or for access errors. * `NOT_FOUND` if the requested course ID does not exist. * `FAILED_PRECONDITION` if the requested
2316
+ * user's account is disabled, for the following request errors: * CourseMemberLimitReached * CourseNotModifiable * CourseTeacherLimitReached * UserGroupsMembershipLimitReached *
2317
+ * InactiveCourseOwner * `ALREADY_EXISTS` if the user is already a teacher or student in the course.
2318
+ */
2319
+ create(request: {
2320
+ /** V1 error format. */
2321
+ "$.xgafv"?: string;
2322
+ /** OAuth access token. */
2323
+ access_token?: string;
2324
+ /** Data format for response. */
2325
+ alt?: string;
2326
+ /** JSONP */
2327
+ callback?: string;
2328
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
2329
+ courseId: string;
2330
+ /** Selector specifying which fields to include in a partial response. */
2331
+ fields?: string;
2332
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
2333
+ key?: string;
2334
+ /** OAuth 2.0 token for the current user. */
2335
+ oauth_token?: string;
2336
+ /** Returns response with indentations and line breaks. */
2337
+ prettyPrint?: boolean;
2338
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
2339
+ quotaUser?: string;
2340
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2341
+ upload_protocol?: string;
2342
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2343
+ uploadType?: string;
2344
+ /** Request body */
2345
+ resource: Teacher;
2346
+ }): Request<Teacher>;
2347
+ create(request: {
2348
+ /** V1 error format. */
2349
+ "$.xgafv"?: string;
2350
+ /** OAuth access token. */
2351
+ access_token?: string;
2352
+ /** Data format for response. */
2353
+ alt?: string;
2354
+ /** JSONP */
2355
+ callback?: string;
2356
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
2357
+ courseId: string;
2358
+ /** Selector specifying which fields to include in a partial response. */
2359
+ fields?: string;
2360
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
2361
+ key?: string;
2362
+ /** OAuth 2.0 token for the current user. */
2363
+ oauth_token?: string;
2364
+ /** Returns response with indentations and line breaks. */
2365
+ prettyPrint?: boolean;
2366
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
2367
+ quotaUser?: string;
2368
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2369
+ upload_protocol?: string;
2370
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2371
+ uploadType?: string;
2372
+ },
2373
+ body: Teacher): Request<Teacher>;
2374
+ /**
2375
+ * Removes the specified teacher from the specified course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to delete
2376
+ * teachers of this course or for access errors. * `NOT_FOUND` if no teacher of this course has the requested ID or if the course does not exist. * `FAILED_PRECONDITION` if the
2377
+ * requested ID belongs to the primary teacher of this course. * `FAILED_PRECONDITION` if the requested ID belongs to the owner of the course Drive folder. * `FAILED_PRECONDITION` if
2378
+ * the course no longer has an active owner.
2379
+ */
2380
+ delete(request?: {
2381
+ /** V1 error format. */
2382
+ "$.xgafv"?: string;
2383
+ /** OAuth access token. */
2384
+ access_token?: string;
2385
+ /** Data format for response. */
2386
+ alt?: string;
2387
+ /** JSONP */
2388
+ callback?: string;
2389
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
2390
+ courseId: string;
2391
+ /** Selector specifying which fields to include in a partial response. */
2392
+ fields?: string;
2393
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
2394
+ key?: string;
2395
+ /** OAuth 2.0 token for the current user. */
2396
+ oauth_token?: string;
2397
+ /** Returns response with indentations and line breaks. */
2398
+ prettyPrint?: boolean;
2399
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
2400
+ quotaUser?: string;
2401
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2402
+ upload_protocol?: string;
2403
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2404
+ uploadType?: string;
2405
+ /**
2406
+ * Identifier of the teacher to delete. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal
2407
+ * `"me"`, indicating the requesting user
2408
+ */
2409
+ userId: string;
2410
+ }): Request<{}>;
2411
+ /**
2412
+ * Returns a teacher of a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to view teachers of this course or for
2413
+ * access errors. * `NOT_FOUND` if no teacher of this course has the requested ID or if the course does not exist.
2414
+ */
2415
+ get(request?: {
2416
+ /** V1 error format. */
2417
+ "$.xgafv"?: string;
2418
+ /** OAuth access token. */
2419
+ access_token?: string;
2420
+ /** Data format for response. */
2421
+ alt?: string;
2422
+ /** JSONP */
2423
+ callback?: string;
2424
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
2425
+ courseId: string;
2426
+ /** Selector specifying which fields to include in a partial response. */
2427
+ fields?: string;
2428
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
2429
+ key?: string;
2430
+ /** OAuth 2.0 token for the current user. */
2431
+ oauth_token?: string;
2432
+ /** Returns response with indentations and line breaks. */
2433
+ prettyPrint?: boolean;
2434
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
2435
+ quotaUser?: string;
2436
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2437
+ upload_protocol?: string;
2438
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2439
+ uploadType?: string;
2440
+ /**
2441
+ * Identifier of the teacher to return. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal
2442
+ * `"me"`, indicating the requesting user
2443
+ */
2444
+ userId: string;
2445
+ }): Request<Teacher>;
2446
+ /**
2447
+ * Returns a list of teachers of this course that the requester is permitted to view. This method returns the following error codes: * `NOT_FOUND` if the course does not exist. *
2448
+ * `PERMISSION_DENIED` for access errors.
2449
+ */
2450
+ list(request?: {
2451
+ /** V1 error format. */
2452
+ "$.xgafv"?: string;
2453
+ /** OAuth access token. */
2454
+ access_token?: string;
2455
+ /** Data format for response. */
2456
+ alt?: string;
2457
+ /** JSONP */
2458
+ callback?: string;
2459
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
2460
+ courseId: string;
2461
+ /** Selector specifying which fields to include in a partial response. */
2462
+ fields?: string;
2463
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
2464
+ key?: string;
2465
+ /** OAuth 2.0 token for the current user. */
2466
+ oauth_token?: string;
2467
+ /** Maximum number of items to return. The default is 30 if unspecified or `0`. The server may return fewer than the specified number of results. */
2468
+ pageSize?: number;
2469
+ /**
2470
+ * nextPageToken value returned from a previous list call, indicating that the subsequent page of results should be returned. The list request must be otherwise identical to the
2471
+ * one that resulted in this token.
2472
+ */
2473
+ pageToken?: string;
2474
+ /** Returns response with indentations and line breaks. */
2475
+ prettyPrint?: boolean;
2476
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
2477
+ quotaUser?: string;
2478
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2479
+ upload_protocol?: string;
2480
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2481
+ uploadType?: string;
2482
+ }): Request<ListTeachersResponse>;
2483
+ }
2484
+ interface TopicsResource {
2485
+ /**
2486
+ * Creates a topic. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course, create a topic in the
2487
+ * requested course, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course does not exist.
2488
+ */
2489
+ create(request: {
2490
+ /** V1 error format. */
2491
+ "$.xgafv"?: string;
2492
+ /** OAuth access token. */
2493
+ access_token?: string;
2494
+ /** Data format for response. */
2495
+ alt?: string;
2496
+ /** JSONP */
2497
+ callback?: string;
2498
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
2499
+ courseId: string;
2500
+ /** Selector specifying which fields to include in a partial response. */
2501
+ fields?: string;
2502
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
2503
+ key?: string;
2504
+ /** OAuth 2.0 token for the current user. */
2505
+ oauth_token?: string;
2506
+ /** Returns response with indentations and line breaks. */
2507
+ prettyPrint?: boolean;
2508
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
2509
+ quotaUser?: string;
2510
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2511
+ upload_protocol?: string;
2512
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2513
+ uploadType?: string;
2514
+ /** Request body */
2515
+ resource: Topic;
2516
+ }): Request<Topic>;
2517
+ create(request: {
2518
+ /** V1 error format. */
2519
+ "$.xgafv"?: string;
2520
+ /** OAuth access token. */
2521
+ access_token?: string;
2522
+ /** Data format for response. */
2523
+ alt?: string;
2524
+ /** JSONP */
2525
+ callback?: string;
2526
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
2527
+ courseId: string;
2528
+ /** Selector specifying which fields to include in a partial response. */
2529
+ fields?: string;
2530
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
2531
+ key?: string;
2532
+ /** OAuth 2.0 token for the current user. */
2533
+ oauth_token?: string;
2534
+ /** Returns response with indentations and line breaks. */
2535
+ prettyPrint?: boolean;
2536
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
2537
+ quotaUser?: string;
2538
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2539
+ upload_protocol?: string;
2540
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2541
+ uploadType?: string;
2542
+ },
2543
+ body: Topic): Request<Topic>;
2544
+ /**
2545
+ * Deletes a topic. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not allowed to delete the requested topic or for access errors. *
2546
+ * `FAILED_PRECONDITION` if the requested topic has already been deleted. * `NOT_FOUND` if no course or topic exists with the requested ID.
2547
+ */
2548
+ delete(request?: {
2549
+ /** V1 error format. */
2550
+ "$.xgafv"?: string;
2551
+ /** OAuth access token. */
2552
+ access_token?: string;
2553
+ /** Data format for response. */
2554
+ alt?: string;
2555
+ /** JSONP */
2556
+ callback?: string;
2557
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
2558
+ courseId: string;
2559
+ /** Selector specifying which fields to include in a partial response. */
2560
+ fields?: string;
2561
+ /** Identifier of the topic to delete. */
2562
+ id: string;
2563
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
2564
+ key?: string;
2565
+ /** OAuth 2.0 token for the current user. */
2566
+ oauth_token?: string;
2567
+ /** Returns response with indentations and line breaks. */
2568
+ prettyPrint?: boolean;
2569
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
2570
+ quotaUser?: string;
2571
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2572
+ upload_protocol?: string;
2573
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2574
+ uploadType?: string;
2575
+ }): Request<{}>;
2576
+ /**
2577
+ * Returns a topic. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or topic, or for access
2578
+ * errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course or topic does not exist.
2579
+ */
2580
+ get(request?: {
2581
+ /** V1 error format. */
2582
+ "$.xgafv"?: string;
2583
+ /** OAuth access token. */
2584
+ access_token?: string;
2585
+ /** Data format for response. */
2586
+ alt?: string;
2587
+ /** JSONP */
2588
+ callback?: string;
2589
+ /** Identifier of the course. */
2590
+ courseId: string;
2591
+ /** Selector specifying which fields to include in a partial response. */
2592
+ fields?: string;
2593
+ /** Identifier of the topic. */
2594
+ id: string;
2595
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
2596
+ key?: string;
2597
+ /** OAuth 2.0 token for the current user. */
2598
+ oauth_token?: string;
2599
+ /** Returns response with indentations and line breaks. */
2600
+ prettyPrint?: boolean;
2601
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
2602
+ quotaUser?: string;
2603
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2604
+ upload_protocol?: string;
2605
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2606
+ uploadType?: string;
2607
+ }): Request<Topic>;
2608
+ /**
2609
+ * Returns the list of topics that the requester is permitted to view. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to
2610
+ * access the requested course or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course does not exist.
2611
+ */
2612
+ list(request?: {
2613
+ /** V1 error format. */
2614
+ "$.xgafv"?: string;
2615
+ /** OAuth access token. */
2616
+ access_token?: string;
2617
+ /** Data format for response. */
2618
+ alt?: string;
2619
+ /** JSONP */
2620
+ callback?: string;
2621
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
2622
+ courseId: string;
2623
+ /** Selector specifying which fields to include in a partial response. */
2624
+ fields?: string;
2625
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
2626
+ key?: string;
2627
+ /** OAuth 2.0 token for the current user. */
2628
+ oauth_token?: string;
2629
+ /** Maximum number of items to return. Zero or unspecified indicates that the server may assign a maximum. The server may return fewer than the specified number of results. */
2630
+ pageSize?: number;
2631
+ /**
2632
+ * nextPageToken value returned from a previous list call, indicating that the subsequent page of results should be returned. The list request must be otherwise identical to the
2633
+ * one that resulted in this token.
2634
+ */
2635
+ pageToken?: string;
2636
+ /** Returns response with indentations and line breaks. */
2637
+ prettyPrint?: boolean;
2638
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
2639
+ quotaUser?: string;
2640
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2641
+ upload_protocol?: string;
2642
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2643
+ uploadType?: string;
2644
+ }): Request<ListTopicResponse>;
2645
+ /**
2646
+ * Updates one or more fields of a topic. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting developer project did not create the corresponding
2647
+ * topic or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course or topic does not exist
2648
+ */
2649
+ patch(request: {
2650
+ /** V1 error format. */
2651
+ "$.xgafv"?: string;
2652
+ /** OAuth access token. */
2653
+ access_token?: string;
2654
+ /** Data format for response. */
2655
+ alt?: string;
2656
+ /** JSONP */
2657
+ callback?: string;
2658
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
2659
+ courseId: string;
2660
+ /** Selector specifying which fields to include in a partial response. */
2661
+ fields?: string;
2662
+ /** Identifier of the topic. */
2663
+ id: string;
2664
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
2665
+ key?: string;
2666
+ /** OAuth 2.0 token for the current user. */
2667
+ oauth_token?: string;
2668
+ /** Returns response with indentations and line breaks. */
2669
+ prettyPrint?: boolean;
2670
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
2671
+ quotaUser?: string;
2672
+ /**
2673
+ * Mask that identifies which fields on the topic to update. This field is required to do an update. The update fails if invalid fields are specified. If a field supports empty
2674
+ * values, it can be cleared by specifying it in the update mask and not in the Topic object. If a field that does not support empty values is included in the update mask and not
2675
+ * set in the Topic object, an `INVALID_ARGUMENT` error is returned. The following fields may be specified: * `name`
2676
+ */
2677
+ updateMask?: string;
2678
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2679
+ upload_protocol?: string;
2680
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2681
+ uploadType?: string;
2682
+ /** Request body */
2683
+ resource: Topic;
2684
+ }): Request<Topic>;
2685
+ patch(request: {
2686
+ /** V1 error format. */
2687
+ "$.xgafv"?: string;
2688
+ /** OAuth access token. */
2689
+ access_token?: string;
2690
+ /** Data format for response. */
2691
+ alt?: string;
2692
+ /** JSONP */
2693
+ callback?: string;
2694
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
2695
+ courseId: string;
2696
+ /** Selector specifying which fields to include in a partial response. */
2697
+ fields?: string;
2698
+ /** Identifier of the topic. */
2699
+ id: string;
2700
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
2701
+ key?: string;
2702
+ /** OAuth 2.0 token for the current user. */
2703
+ oauth_token?: string;
2704
+ /** Returns response with indentations and line breaks. */
2705
+ prettyPrint?: boolean;
2706
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
2707
+ quotaUser?: string;
2708
+ /**
2709
+ * Mask that identifies which fields on the topic to update. This field is required to do an update. The update fails if invalid fields are specified. If a field supports empty
2710
+ * values, it can be cleared by specifying it in the update mask and not in the Topic object. If a field that does not support empty values is included in the update mask and not
2711
+ * set in the Topic object, an `INVALID_ARGUMENT` error is returned. The following fields may be specified: * `name`
2712
+ */
2713
+ updateMask?: string;
2714
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2715
+ upload_protocol?: string;
2716
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2717
+ uploadType?: string;
2718
+ },
2719
+ body: Topic): Request<Topic>;
2720
+ }
2721
+ interface CoursesResource {
2722
+ /**
2723
+ * Creates a course. The user specified in `ownerId` is the owner of the created course and added as a teacher. A non-admin requesting user can only create a course with themselves as
2724
+ * the owner. Domain admins can create courses owned by any user within their domain. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not
2725
+ * permitted to create courses or for access errors. * `NOT_FOUND` if the primary teacher is not a valid user. * `FAILED_PRECONDITION` if the course owner's account is disabled or for
2726
+ * the following request errors: * UserGroupsMembershipLimitReached * `ALREADY_EXISTS` if an alias was specified in the `id` and already exists.
2727
+ */
2728
+ create(request: {
2729
+ /** V1 error format. */
2730
+ "$.xgafv"?: string;
2731
+ /** OAuth access token. */
2732
+ access_token?: string;
2733
+ /** Data format for response. */
2734
+ alt?: string;
2735
+ /** JSONP */
2736
+ callback?: string;
2737
+ /** Selector specifying which fields to include in a partial response. */
2738
+ fields?: string;
2739
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
2740
+ key?: string;
2741
+ /** OAuth 2.0 token for the current user. */
2742
+ oauth_token?: string;
2743
+ /** Returns response with indentations and line breaks. */
2744
+ prettyPrint?: boolean;
2745
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
2746
+ quotaUser?: string;
2747
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2748
+ upload_protocol?: string;
2749
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2750
+ uploadType?: string;
2751
+ /** Request body */
2752
+ resource: Course;
2753
+ }): Request<Course>;
2754
+ create(request: {
2755
+ /** V1 error format. */
2756
+ "$.xgafv"?: string;
2757
+ /** OAuth access token. */
2758
+ access_token?: string;
2759
+ /** Data format for response. */
2760
+ alt?: string;
2761
+ /** JSONP */
2762
+ callback?: string;
2763
+ /** Selector specifying which fields to include in a partial response. */
2764
+ fields?: string;
2765
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
2766
+ key?: string;
2767
+ /** OAuth 2.0 token for the current user. */
2768
+ oauth_token?: string;
2769
+ /** Returns response with indentations and line breaks. */
2770
+ prettyPrint?: boolean;
2771
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
2772
+ quotaUser?: string;
2773
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2774
+ upload_protocol?: string;
2775
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2776
+ uploadType?: string;
2777
+ },
2778
+ body: Course): Request<Course>;
2779
+ /**
2780
+ * Deletes a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to delete the requested course or for access errors. *
2781
+ * `NOT_FOUND` if no course exists with the requested ID.
2782
+ */
2783
+ delete(request?: {
2784
+ /** V1 error format. */
2785
+ "$.xgafv"?: string;
2786
+ /** OAuth access token. */
2787
+ access_token?: string;
2788
+ /** Data format for response. */
2789
+ alt?: string;
2790
+ /** JSONP */
2791
+ callback?: string;
2792
+ /** Selector specifying which fields to include in a partial response. */
2793
+ fields?: string;
2794
+ /** Identifier of the course to delete. This identifier can be either the Classroom-assigned identifier or an alias. */
2795
+ id: string;
2796
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
2797
+ key?: string;
2798
+ /** OAuth 2.0 token for the current user. */
2799
+ oauth_token?: string;
2800
+ /** Returns response with indentations and line breaks. */
2801
+ prettyPrint?: boolean;
2802
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
2803
+ quotaUser?: string;
2804
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2805
+ upload_protocol?: string;
2806
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2807
+ uploadType?: string;
2808
+ }): Request<{}>;
2809
+ /**
2810
+ * Returns a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or for access errors. *
2811
+ * `NOT_FOUND` if no course exists with the requested ID.
2812
+ */
2813
+ get(request?: {
2814
+ /** V1 error format. */
2815
+ "$.xgafv"?: string;
2816
+ /** OAuth access token. */
2817
+ access_token?: string;
2818
+ /** Data format for response. */
2819
+ alt?: string;
2820
+ /** JSONP */
2821
+ callback?: string;
2822
+ /** Selector specifying which fields to include in a partial response. */
2823
+ fields?: string;
2824
+ /** Identifier of the course to return. This identifier can be either the Classroom-assigned identifier or an alias. */
2825
+ id: string;
2826
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
2827
+ key?: string;
2828
+ /** OAuth 2.0 token for the current user. */
2829
+ oauth_token?: string;
2830
+ /** Returns response with indentations and line breaks. */
2831
+ prettyPrint?: boolean;
2832
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
2833
+ quotaUser?: string;
2834
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2835
+ upload_protocol?: string;
2836
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2837
+ uploadType?: string;
2838
+ }): Request<Course>;
2839
+ /**
2840
+ * Returns a list of courses that the requesting user is permitted to view, restricted to those that match the request. Returned courses are ordered by creation time, with the most
2841
+ * recently created coming first. This method returns the following error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the query argument is malformed. *
2842
+ * `NOT_FOUND` if any users specified in the query arguments do not exist.
2843
+ */
2844
+ list(request?: {
2845
+ /** V1 error format. */
2846
+ "$.xgafv"?: string;
2847
+ /** OAuth access token. */
2848
+ access_token?: string;
2849
+ /** Data format for response. */
2850
+ alt?: string;
2851
+ /** JSONP */
2852
+ callback?: string;
2853
+ /** Restricts returned courses to those in one of the specified states The default value is ACTIVE, ARCHIVED, PROVISIONED, DECLINED. */
2854
+ courseStates?: string | string[];
2855
+ /** Selector specifying which fields to include in a partial response. */
2856
+ fields?: string;
2857
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
2858
+ key?: string;
2859
+ /** OAuth 2.0 token for the current user. */
2860
+ oauth_token?: string;
2861
+ /** Maximum number of items to return. Zero or unspecified indicates that the server may assign a maximum. The server may return fewer than the specified number of results. */
2862
+ pageSize?: number;
2863
+ /**
2864
+ * nextPageToken value returned from a previous list call, indicating that the subsequent page of results should be returned. The list request must be otherwise identical to the
2865
+ * one that resulted in this token.
2866
+ */
2867
+ pageToken?: string;
2868
+ /** Returns response with indentations and line breaks. */
2869
+ prettyPrint?: boolean;
2870
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
2871
+ quotaUser?: string;
2872
+ /**
2873
+ * Restricts returned courses to those having a student with the specified identifier. The identifier can be one of the following: * the numeric identifier for the user * the email
2874
+ * address of the user * the string literal `"me"`, indicating the requesting user
2875
+ */
2876
+ studentId?: string;
2877
+ /**
2878
+ * Restricts returned courses to those having a teacher with the specified identifier. The identifier can be one of the following: * the numeric identifier for the user * the email
2879
+ * address of the user * the string literal `"me"`, indicating the requesting user
2880
+ */
2881
+ teacherId?: string;
2882
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2883
+ upload_protocol?: string;
2884
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2885
+ uploadType?: string;
2886
+ }): Request<ListCoursesResponse>;
2887
+ /**
2888
+ * Updates one or more fields in a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to modify the requested course
2889
+ * or for access errors. * `NOT_FOUND` if no course exists with the requested ID. * `INVALID_ARGUMENT` if invalid fields are specified in the update mask or if no update mask is
2890
+ * supplied. * `FAILED_PRECONDITION` for the following request errors: * CourseNotModifiable * InactiveCourseOwner
2891
+ */
2892
+ patch(request: {
2893
+ /** V1 error format. */
2894
+ "$.xgafv"?: string;
2895
+ /** OAuth access token. */
2896
+ access_token?: string;
2897
+ /** Data format for response. */
2898
+ alt?: string;
2899
+ /** JSONP */
2900
+ callback?: string;
2901
+ /** Selector specifying which fields to include in a partial response. */
2902
+ fields?: string;
2903
+ /** Identifier of the course to update. This identifier can be either the Classroom-assigned identifier or an alias. */
2904
+ id: string;
2905
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
2906
+ key?: string;
2907
+ /** OAuth 2.0 token for the current user. */
2908
+ oauth_token?: string;
2909
+ /** Returns response with indentations and line breaks. */
2910
+ prettyPrint?: boolean;
2911
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
2912
+ quotaUser?: string;
2913
+ /**
2914
+ * Mask that identifies which fields on the course to update. This field is required to do an update. The update will fail if invalid fields are specified. The following fields are
2915
+ * valid: * `name` * `section` * `descriptionHeading` * `description` * `room` * `courseState` * `ownerId` Note: patches to ownerId are treated as being effective immediately, but
2916
+ * in practice it may take some time for the ownership transfer of all affected resources to complete. When set in a query parameter, this field should be specified as
2917
+ * `updateMask=,,...`
2918
+ */
2919
+ updateMask?: string;
2920
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2921
+ upload_protocol?: string;
2922
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2923
+ uploadType?: string;
2924
+ /** Request body */
2925
+ resource: Course;
2926
+ }): Request<Course>;
2927
+ patch(request: {
2928
+ /** V1 error format. */
2929
+ "$.xgafv"?: string;
2930
+ /** OAuth access token. */
2931
+ access_token?: string;
2932
+ /** Data format for response. */
2933
+ alt?: string;
2934
+ /** JSONP */
2935
+ callback?: string;
2936
+ /** Selector specifying which fields to include in a partial response. */
2937
+ fields?: string;
2938
+ /** Identifier of the course to update. This identifier can be either the Classroom-assigned identifier or an alias. */
2939
+ id: string;
2940
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
2941
+ key?: string;
2942
+ /** OAuth 2.0 token for the current user. */
2943
+ oauth_token?: string;
2944
+ /** Returns response with indentations and line breaks. */
2945
+ prettyPrint?: boolean;
2946
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
2947
+ quotaUser?: string;
2948
+ /**
2949
+ * Mask that identifies which fields on the course to update. This field is required to do an update. The update will fail if invalid fields are specified. The following fields are
2950
+ * valid: * `name` * `section` * `descriptionHeading` * `description` * `room` * `courseState` * `ownerId` Note: patches to ownerId are treated as being effective immediately, but
2951
+ * in practice it may take some time for the ownership transfer of all affected resources to complete. When set in a query parameter, this field should be specified as
2952
+ * `updateMask=,,...`
2953
+ */
2954
+ updateMask?: string;
2955
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2956
+ upload_protocol?: string;
2957
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2958
+ uploadType?: string;
2959
+ },
2960
+ body: Course): Request<Course>;
2961
+ /**
2962
+ * Updates a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to modify the requested course or for access errors. *
2963
+ * `NOT_FOUND` if no course exists with the requested ID. * `FAILED_PRECONDITION` for the following request errors: * CourseNotModifiable
2964
+ */
2965
+ update(request: {
2966
+ /** V1 error format. */
2967
+ "$.xgafv"?: string;
2968
+ /** OAuth access token. */
2969
+ access_token?: string;
2970
+ /** Data format for response. */
2971
+ alt?: string;
2972
+ /** JSONP */
2973
+ callback?: string;
2974
+ /** Selector specifying which fields to include in a partial response. */
2975
+ fields?: string;
2976
+ /** Identifier of the course to update. This identifier can be either the Classroom-assigned identifier or an alias. */
2977
+ id: string;
2978
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
2979
+ key?: string;
2980
+ /** OAuth 2.0 token for the current user. */
2981
+ oauth_token?: string;
2982
+ /** Returns response with indentations and line breaks. */
2983
+ prettyPrint?: boolean;
2984
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
2985
+ quotaUser?: string;
2986
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2987
+ upload_protocol?: string;
2988
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2989
+ uploadType?: string;
2990
+ /** Request body */
2991
+ resource: Course;
2992
+ }): Request<Course>;
2993
+ update(request: {
2994
+ /** V1 error format. */
2995
+ "$.xgafv"?: string;
2996
+ /** OAuth access token. */
2997
+ access_token?: string;
2998
+ /** Data format for response. */
2999
+ alt?: string;
3000
+ /** JSONP */
3001
+ callback?: string;
3002
+ /** Selector specifying which fields to include in a partial response. */
3003
+ fields?: string;
3004
+ /** Identifier of the course to update. This identifier can be either the Classroom-assigned identifier or an alias. */
3005
+ id: string;
3006
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
3007
+ key?: string;
3008
+ /** OAuth 2.0 token for the current user. */
3009
+ oauth_token?: string;
3010
+ /** Returns response with indentations and line breaks. */
3011
+ prettyPrint?: boolean;
3012
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
3013
+ quotaUser?: string;
3014
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
3015
+ upload_protocol?: string;
3016
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
3017
+ uploadType?: string;
3018
+ },
3019
+ body: Course): Request<Course>;
3020
+ aliases: AliasesResource;
3021
+ announcements: AnnouncementsResource;
3022
+ courseWork: CourseWorkResource;
3023
+ courseWorkMaterials: CourseWorkMaterialsResource;
3024
+ students: StudentsResource;
3025
+ teachers: TeachersResource;
3026
+ topics: TopicsResource;
3027
+ }
3028
+ interface InvitationsResource {
3029
+ /**
3030
+ * Accepts an invitation, removing it and adding the invited user to the teachers or students (as appropriate) of the specified course. Only the invited user may accept an invitation.
3031
+ * This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to accept the requested invitation or for access errors. *
3032
+ * `FAILED_PRECONDITION` for the following request errors: * CourseMemberLimitReached * CourseNotModifiable * CourseTeacherLimitReached * UserGroupsMembershipLimitReached * `NOT_FOUND`
3033
+ * if no invitation exists with the requested ID.
3034
+ */
3035
+ accept(request?: {
3036
+ /** V1 error format. */
3037
+ "$.xgafv"?: string;
3038
+ /** OAuth access token. */
3039
+ access_token?: string;
3040
+ /** Data format for response. */
3041
+ alt?: string;
3042
+ /** JSONP */
3043
+ callback?: string;
3044
+ /** Selector specifying which fields to include in a partial response. */
3045
+ fields?: string;
3046
+ /** Identifier of the invitation to accept. */
3047
+ id: string;
3048
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
3049
+ key?: string;
3050
+ /** OAuth 2.0 token for the current user. */
3051
+ oauth_token?: string;
3052
+ /** Returns response with indentations and line breaks. */
3053
+ prettyPrint?: boolean;
3054
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
3055
+ quotaUser?: string;
3056
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
3057
+ upload_protocol?: string;
3058
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
3059
+ uploadType?: string;
3060
+ }): Request<{}>;
3061
+ /**
3062
+ * Creates an invitation. Only one invitation for a user and course may exist at a time. Delete and re-create an invitation to make changes. This method returns the following error
3063
+ * codes: * `PERMISSION_DENIED` if the requesting user is not permitted to create invitations for this course or for access errors. * `NOT_FOUND` if the course or the user does not
3064
+ * exist. * `FAILED_PRECONDITION` if the requested user's account is disabled or if the user already has this role or a role with greater permissions. * `ALREADY_EXISTS` if an
3065
+ * invitation for the specified user and course already exists.
3066
+ */
3067
+ create(request: {
3068
+ /** V1 error format. */
3069
+ "$.xgafv"?: string;
3070
+ /** OAuth access token. */
3071
+ access_token?: string;
3072
+ /** Data format for response. */
3073
+ alt?: string;
3074
+ /** JSONP */
3075
+ callback?: string;
3076
+ /** Selector specifying which fields to include in a partial response. */
3077
+ fields?: string;
3078
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
3079
+ key?: string;
3080
+ /** OAuth 2.0 token for the current user. */
3081
+ oauth_token?: string;
3082
+ /** Returns response with indentations and line breaks. */
3083
+ prettyPrint?: boolean;
3084
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
3085
+ quotaUser?: string;
3086
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
3087
+ upload_protocol?: string;
3088
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
3089
+ uploadType?: string;
3090
+ /** Request body */
3091
+ resource: Invitation;
3092
+ }): Request<Invitation>;
3093
+ create(request: {
3094
+ /** V1 error format. */
3095
+ "$.xgafv"?: string;
3096
+ /** OAuth access token. */
3097
+ access_token?: string;
3098
+ /** Data format for response. */
3099
+ alt?: string;
3100
+ /** JSONP */
3101
+ callback?: string;
3102
+ /** Selector specifying which fields to include in a partial response. */
3103
+ fields?: string;
3104
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
3105
+ key?: string;
3106
+ /** OAuth 2.0 token for the current user. */
3107
+ oauth_token?: string;
3108
+ /** Returns response with indentations and line breaks. */
3109
+ prettyPrint?: boolean;
3110
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
3111
+ quotaUser?: string;
3112
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
3113
+ upload_protocol?: string;
3114
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
3115
+ uploadType?: string;
3116
+ },
3117
+ body: Invitation): Request<Invitation>;
3118
+ /**
3119
+ * Deletes an invitation. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to delete the requested invitation or for access
3120
+ * errors. * `NOT_FOUND` if no invitation exists with the requested ID.
3121
+ */
3122
+ delete(request?: {
3123
+ /** V1 error format. */
3124
+ "$.xgafv"?: string;
3125
+ /** OAuth access token. */
3126
+ access_token?: string;
3127
+ /** Data format for response. */
3128
+ alt?: string;
3129
+ /** JSONP */
3130
+ callback?: string;
3131
+ /** Selector specifying which fields to include in a partial response. */
3132
+ fields?: string;
3133
+ /** Identifier of the invitation to delete. */
3134
+ id: string;
3135
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
3136
+ key?: string;
3137
+ /** OAuth 2.0 token for the current user. */
3138
+ oauth_token?: string;
3139
+ /** Returns response with indentations and line breaks. */
3140
+ prettyPrint?: boolean;
3141
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
3142
+ quotaUser?: string;
3143
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
3144
+ upload_protocol?: string;
3145
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
3146
+ uploadType?: string;
3147
+ }): Request<{}>;
3148
+ /**
3149
+ * Returns an invitation. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to view the requested invitation or for access
3150
+ * errors. * `NOT_FOUND` if no invitation exists with the requested ID.
3151
+ */
3152
+ get(request?: {
3153
+ /** V1 error format. */
3154
+ "$.xgafv"?: string;
3155
+ /** OAuth access token. */
3156
+ access_token?: string;
3157
+ /** Data format for response. */
3158
+ alt?: string;
3159
+ /** JSONP */
3160
+ callback?: string;
3161
+ /** Selector specifying which fields to include in a partial response. */
3162
+ fields?: string;
3163
+ /** Identifier of the invitation to return. */
3164
+ id: string;
3165
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
3166
+ key?: string;
3167
+ /** OAuth 2.0 token for the current user. */
3168
+ oauth_token?: string;
3169
+ /** Returns response with indentations and line breaks. */
3170
+ prettyPrint?: boolean;
3171
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
3172
+ quotaUser?: string;
3173
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
3174
+ upload_protocol?: string;
3175
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
3176
+ uploadType?: string;
3177
+ }): Request<Invitation>;
3178
+ /**
3179
+ * Returns a list of invitations that the requesting user is permitted to view, restricted to those that match the list request. *Note:* At least one of `user_id` or `course_id` must
3180
+ * be supplied. Both fields can be supplied. This method returns the following error codes: * `PERMISSION_DENIED` for access errors.
3181
+ */
3182
+ list(request?: {
3183
+ /** V1 error format. */
3184
+ "$.xgafv"?: string;
3185
+ /** OAuth access token. */
3186
+ access_token?: string;
3187
+ /** Data format for response. */
3188
+ alt?: string;
3189
+ /** JSONP */
3190
+ callback?: string;
3191
+ /** Restricts returned invitations to those for a course with the specified identifier. */
3192
+ courseId?: string;
3193
+ /** Selector specifying which fields to include in a partial response. */
3194
+ fields?: string;
3195
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
3196
+ key?: string;
3197
+ /** OAuth 2.0 token for the current user. */
3198
+ oauth_token?: string;
3199
+ /** Maximum number of items to return. The default is 500 if unspecified or `0`. The server may return fewer than the specified number of results. */
3200
+ pageSize?: number;
3201
+ /**
3202
+ * nextPageToken value returned from a previous list call, indicating that the subsequent page of results should be returned. The list request must be otherwise identical to the
3203
+ * one that resulted in this token.
3204
+ */
3205
+ pageToken?: string;
3206
+ /** Returns response with indentations and line breaks. */
3207
+ prettyPrint?: boolean;
3208
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
3209
+ quotaUser?: string;
3210
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
3211
+ upload_protocol?: string;
3212
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
3213
+ uploadType?: string;
3214
+ /**
3215
+ * Restricts returned invitations to those for a specific user. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user *
3216
+ * the string literal `"me"`, indicating the requesting user
3217
+ */
3218
+ userId?: string;
3219
+ }): Request<ListInvitationsResponse>;
3220
+ }
3221
+ interface RegistrationsResource {
3222
+ /**
3223
+ * Creates a `Registration`, causing Classroom to start sending notifications from the provided `feed` to the destination provided in `cloudPubSubTopic`. Returns the created
3224
+ * `Registration`. Currently, this will be the same as the argument, but with server-assigned fields such as `expiry_time` and `id` filled in. Note that any value specified for the
3225
+ * `expiry_time` or `id` fields will be ignored. While Classroom may validate the `cloudPubSubTopic` and return errors on a best effort basis, it is the caller's responsibility to
3226
+ * ensure that it exists and that Classroom has permission to publish to it. This method may return the following error codes: * `PERMISSION_DENIED` if: * the authenticated user does
3227
+ * not have permission to receive notifications from the requested field; or * the current user has not granted access to the current Cloud project with the appropriate scope for the
3228
+ * requested feed. Note that domain-wide delegation of authority is not currently supported for this purpose. If the request has the appropriate scope, but no grant exists, a Request
3229
+ * Errors is returned. * another access error is encountered. * `INVALID_ARGUMENT` if: * no `cloudPubsubTopic` is specified, or the specified `cloudPubsubTopic` is not valid; or * no
3230
+ * `feed` is specified, or the specified `feed` is not valid. * `NOT_FOUND` if: * the specified `feed` cannot be located, or the requesting user does not have permission to determine
3231
+ * whether or not it exists; or * the specified `cloudPubsubTopic` cannot be located, or Classroom has not been granted permission to publish to it.
3232
+ */
3233
+ create(request: {
3234
+ /** V1 error format. */
3235
+ "$.xgafv"?: string;
3236
+ /** OAuth access token. */
3237
+ access_token?: string;
3238
+ /** Data format for response. */
3239
+ alt?: string;
3240
+ /** JSONP */
3241
+ callback?: string;
3242
+ /** Selector specifying which fields to include in a partial response. */
3243
+ fields?: string;
3244
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
3245
+ key?: string;
3246
+ /** OAuth 2.0 token for the current user. */
3247
+ oauth_token?: string;
3248
+ /** Returns response with indentations and line breaks. */
3249
+ prettyPrint?: boolean;
3250
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
3251
+ quotaUser?: string;
3252
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
3253
+ upload_protocol?: string;
3254
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
3255
+ uploadType?: string;
3256
+ /** Request body */
3257
+ resource: Registration;
3258
+ }): Request<Registration>;
3259
+ create(request: {
3260
+ /** V1 error format. */
3261
+ "$.xgafv"?: string;
3262
+ /** OAuth access token. */
3263
+ access_token?: string;
3264
+ /** Data format for response. */
3265
+ alt?: string;
3266
+ /** JSONP */
3267
+ callback?: string;
3268
+ /** Selector specifying which fields to include in a partial response. */
3269
+ fields?: string;
3270
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
3271
+ key?: string;
3272
+ /** OAuth 2.0 token for the current user. */
3273
+ oauth_token?: string;
3274
+ /** Returns response with indentations and line breaks. */
3275
+ prettyPrint?: boolean;
3276
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
3277
+ quotaUser?: string;
3278
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
3279
+ upload_protocol?: string;
3280
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
3281
+ uploadType?: string;
3282
+ },
3283
+ body: Registration): Request<Registration>;
3284
+ /** Deletes a `Registration`, causing Classroom to stop sending notifications for that `Registration`. */
3285
+ delete(request?: {
3286
+ /** V1 error format. */
3287
+ "$.xgafv"?: string;
3288
+ /** OAuth access token. */
3289
+ access_token?: string;
3290
+ /** Data format for response. */
3291
+ alt?: string;
3292
+ /** JSONP */
3293
+ callback?: string;
3294
+ /** Selector specifying which fields to include in a partial response. */
3295
+ fields?: string;
3296
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
3297
+ key?: string;
3298
+ /** OAuth 2.0 token for the current user. */
3299
+ oauth_token?: string;
3300
+ /** Returns response with indentations and line breaks. */
3301
+ prettyPrint?: boolean;
3302
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
3303
+ quotaUser?: string;
3304
+ /** The `registration_id` of the `Registration` to be deleted. */
3305
+ registrationId: string;
3306
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
3307
+ upload_protocol?: string;
3308
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
3309
+ uploadType?: string;
3310
+ }): Request<{}>;
3311
+ }
3312
+ interface GuardianInvitationsResource {
3313
+ /**
3314
+ * Creates a guardian invitation, and sends an email to the guardian asking them to confirm that they are the student's guardian. Once the guardian accepts the invitation, their
3315
+ * `state` will change to `COMPLETED` and they will start receiving guardian notifications. A `Guardian` resource will also be created to represent the active guardian. The request
3316
+ * object must have the `student_id` and `invited_email_address` fields set. Failing to set these fields, or setting any other fields in the request, will result in an error. This
3317
+ * method returns the following error codes: * `PERMISSION_DENIED` if the current user does not have permission to manage guardians, if the guardian in question has already rejected
3318
+ * too many requests for that student, if guardians are not enabled for the domain in question, or for other access errors. * `RESOURCE_EXHAUSTED` if the student or guardian has
3319
+ * exceeded the guardian link limit. * `INVALID_ARGUMENT` if the guardian email address is not valid (for example, if it is too long), or if the format of the student ID provided
3320
+ * cannot be recognized (it is not an email address, nor a `user_id` from this API). This error will also be returned if read-only fields are set, or if the `state` field is set to to
3321
+ * a value other than `PENDING`. * `NOT_FOUND` if the student ID provided is a valid student ID, but Classroom has no record of that student. * `ALREADY_EXISTS` if there is already a
3322
+ * pending guardian invitation for the student and `invited_email_address` provided, or if the provided `invited_email_address` matches the Google account of an existing `Guardian` for
3323
+ * this user.
3324
+ */
3325
+ create(request: {
3326
+ /** V1 error format. */
3327
+ "$.xgafv"?: string;
3328
+ /** OAuth access token. */
3329
+ access_token?: string;
3330
+ /** Data format for response. */
3331
+ alt?: string;
3332
+ /** JSONP */
3333
+ callback?: string;
3334
+ /** Selector specifying which fields to include in a partial response. */
3335
+ fields?: string;
3336
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
3337
+ key?: string;
3338
+ /** OAuth 2.0 token for the current user. */
3339
+ oauth_token?: string;
3340
+ /** Returns response with indentations and line breaks. */
3341
+ prettyPrint?: boolean;
3342
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
3343
+ quotaUser?: string;
3344
+ /** ID of the student (in standard format) */
3345
+ studentId: string;
3346
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
3347
+ upload_protocol?: string;
3348
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
3349
+ uploadType?: string;
3350
+ /** Request body */
3351
+ resource: GuardianInvitation;
3352
+ }): Request<GuardianInvitation>;
3353
+ create(request: {
3354
+ /** V1 error format. */
3355
+ "$.xgafv"?: string;
3356
+ /** OAuth access token. */
3357
+ access_token?: string;
3358
+ /** Data format for response. */
3359
+ alt?: string;
3360
+ /** JSONP */
3361
+ callback?: string;
3362
+ /** Selector specifying which fields to include in a partial response. */
3363
+ fields?: string;
3364
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
3365
+ key?: string;
3366
+ /** OAuth 2.0 token for the current user. */
3367
+ oauth_token?: string;
3368
+ /** Returns response with indentations and line breaks. */
3369
+ prettyPrint?: boolean;
3370
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
3371
+ quotaUser?: string;
3372
+ /** ID of the student (in standard format) */
3373
+ studentId: string;
3374
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
3375
+ upload_protocol?: string;
3376
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
3377
+ uploadType?: string;
3378
+ },
3379
+ body: GuardianInvitation): Request<GuardianInvitation>;
3380
+ /**
3381
+ * Returns a specific guardian invitation. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to view guardian invitations for
3382
+ * the student identified by the `student_id`, if guardians are not enabled for the domain in question, or for other access errors. * `INVALID_ARGUMENT` if a `student_id` is specified,
3383
+ * but its format cannot be recognized (it is not an email address, nor a `student_id` from the API, nor the literal string `me`). * `NOT_FOUND` if Classroom cannot find any record of
3384
+ * the given student or `invitation_id`. May also be returned if the student exists, but the requesting user does not have access to see that student.
3385
+ */
3386
+ get(request?: {
3387
+ /** V1 error format. */
3388
+ "$.xgafv"?: string;
3389
+ /** OAuth access token. */
3390
+ access_token?: string;
3391
+ /** Data format for response. */
3392
+ alt?: string;
3393
+ /** JSONP */
3394
+ callback?: string;
3395
+ /** Selector specifying which fields to include in a partial response. */
3396
+ fields?: string;
3397
+ /** The `id` field of the `GuardianInvitation` being requested. */
3398
+ invitationId: string;
3399
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
3400
+ key?: string;
3401
+ /** OAuth 2.0 token for the current user. */
3402
+ oauth_token?: string;
3403
+ /** Returns response with indentations and line breaks. */
3404
+ prettyPrint?: boolean;
3405
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
3406
+ quotaUser?: string;
3407
+ /** The ID of the student whose guardian invitation is being requested. */
3408
+ studentId: string;
3409
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
3410
+ upload_protocol?: string;
3411
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
3412
+ uploadType?: string;
3413
+ }): Request<GuardianInvitation>;
3414
+ /**
3415
+ * Returns a list of guardian invitations that the requesting user is permitted to view, filtered by the parameters provided. This method returns the following error codes: *
3416
+ * `PERMISSION_DENIED` if a `student_id` is specified, and the requesting user is not permitted to view guardian invitations for that student, if `"-"` is specified as the `student_id`
3417
+ * and the user is not a domain administrator, if guardians are not enabled for the domain in question, or for other access errors. * `INVALID_ARGUMENT` if a `student_id` is specified,
3418
+ * but its format cannot be recognized (it is not an email address, nor a `student_id` from the API, nor the literal string `me`). May also be returned if an invalid `page_token` or
3419
+ * `state` is provided. * `NOT_FOUND` if a `student_id` is specified, and its format can be recognized, but Classroom has no record of that student.
3420
+ */
3421
+ list(request?: {
3422
+ /** V1 error format. */
3423
+ "$.xgafv"?: string;
3424
+ /** OAuth access token. */
3425
+ access_token?: string;
3426
+ /** Data format for response. */
3427
+ alt?: string;
3428
+ /** JSONP */
3429
+ callback?: string;
3430
+ /** Selector specifying which fields to include in a partial response. */
3431
+ fields?: string;
3432
+ /** If specified, only results with the specified `invited_email_address` are returned. */
3433
+ invitedEmailAddress?: string;
3434
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
3435
+ key?: string;
3436
+ /** OAuth 2.0 token for the current user. */
3437
+ oauth_token?: string;
3438
+ /** Maximum number of items to return. Zero or unspecified indicates that the server may assign a maximum. The server may return fewer than the specified number of results. */
3439
+ pageSize?: number;
3440
+ /**
3441
+ * nextPageToken value returned from a previous list call, indicating that the subsequent page of results should be returned. The list request must be otherwise identical to the
3442
+ * one that resulted in this token.
3443
+ */
3444
+ pageToken?: string;
3445
+ /** Returns response with indentations and line breaks. */
3446
+ prettyPrint?: boolean;
3447
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
3448
+ quotaUser?: string;
3449
+ /** If specified, only results with the specified `state` values are returned. Otherwise, results with a `state` of `PENDING` are returned. */
3450
+ states?: string | string[];
3451
+ /**
3452
+ * The ID of the student whose guardian invitations are to be returned. The identifier can be one of the following: * the numeric identifier for the user * the email address of the
3453
+ * user * the string literal `"me"`, indicating the requesting user * the string literal `"-"`, indicating that results should be returned for all students that the requesting user
3454
+ * is permitted to view guardian invitations.
3455
+ */
3456
+ studentId: string;
3457
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
3458
+ upload_protocol?: string;
3459
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
3460
+ uploadType?: string;
3461
+ }): Request<ListGuardianInvitationsResponse>;
3462
+ /**
3463
+ * Modifies a guardian invitation. Currently, the only valid modification is to change the `state` from `PENDING` to `COMPLETE`. This has the effect of withdrawing the invitation. This
3464
+ * method returns the following error codes: * `PERMISSION_DENIED` if the current user does not have permission to manage guardians, if guardians are not enabled for the domain in
3465
+ * question or for other access errors. * `FAILED_PRECONDITION` if the guardian link is not in the `PENDING` state. * `INVALID_ARGUMENT` if the format of the student ID provided cannot
3466
+ * be recognized (it is not an email address, nor a `user_id` from this API), or if the passed `GuardianInvitation` has a `state` other than `COMPLETE`, or if it modifies fields other
3467
+ * than `state`. * `NOT_FOUND` if the student ID provided is a valid student ID, but Classroom has no record of that student, or if the `id` field does not refer to a guardian
3468
+ * invitation known to Classroom.
3469
+ */
3470
+ patch(request: {
3471
+ /** V1 error format. */
3472
+ "$.xgafv"?: string;
3473
+ /** OAuth access token. */
3474
+ access_token?: string;
3475
+ /** Data format for response. */
3476
+ alt?: string;
3477
+ /** JSONP */
3478
+ callback?: string;
3479
+ /** Selector specifying which fields to include in a partial response. */
3480
+ fields?: string;
3481
+ /** The `id` field of the `GuardianInvitation` to be modified. */
3482
+ invitationId: string;
3483
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
3484
+ key?: string;
3485
+ /** OAuth 2.0 token for the current user. */
3486
+ oauth_token?: string;
3487
+ /** Returns response with indentations and line breaks. */
3488
+ prettyPrint?: boolean;
3489
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
3490
+ quotaUser?: string;
3491
+ /** The ID of the student whose guardian invitation is to be modified. */
3492
+ studentId: string;
3493
+ /**
3494
+ * Mask that identifies which fields on the course to update. This field is required to do an update. The update fails if invalid fields are specified. The following fields are
3495
+ * valid: * `state` When set in a query parameter, this field should be specified as `updateMask=,,...`
3496
+ */
3497
+ updateMask?: string;
3498
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
3499
+ upload_protocol?: string;
3500
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
3501
+ uploadType?: string;
3502
+ /** Request body */
3503
+ resource: GuardianInvitation;
3504
+ }): Request<GuardianInvitation>;
3505
+ patch(request: {
3506
+ /** V1 error format. */
3507
+ "$.xgafv"?: string;
3508
+ /** OAuth access token. */
3509
+ access_token?: string;
3510
+ /** Data format for response. */
3511
+ alt?: string;
3512
+ /** JSONP */
3513
+ callback?: string;
3514
+ /** Selector specifying which fields to include in a partial response. */
3515
+ fields?: string;
3516
+ /** The `id` field of the `GuardianInvitation` to be modified. */
3517
+ invitationId: string;
3518
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
3519
+ key?: string;
3520
+ /** OAuth 2.0 token for the current user. */
3521
+ oauth_token?: string;
3522
+ /** Returns response with indentations and line breaks. */
3523
+ prettyPrint?: boolean;
3524
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
3525
+ quotaUser?: string;
3526
+ /** The ID of the student whose guardian invitation is to be modified. */
3527
+ studentId: string;
3528
+ /**
3529
+ * Mask that identifies which fields on the course to update. This field is required to do an update. The update fails if invalid fields are specified. The following fields are
3530
+ * valid: * `state` When set in a query parameter, this field should be specified as `updateMask=,,...`
3531
+ */
3532
+ updateMask?: string;
3533
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
3534
+ upload_protocol?: string;
3535
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
3536
+ uploadType?: string;
3537
+ },
3538
+ body: GuardianInvitation): Request<GuardianInvitation>;
3539
+ }
3540
+ interface GuardiansResource {
3541
+ /**
3542
+ * Deletes a guardian. The guardian will no longer receive guardian notifications and the guardian will no longer be accessible via the API. This method returns the following error
3543
+ * codes: * `PERMISSION_DENIED` if no user that matches the provided `student_id` is visible to the requesting user, if the requesting user is not permitted to manage guardians for the
3544
+ * student identified by the `student_id`, if guardians are not enabled for the domain in question, or for other access errors. * `INVALID_ARGUMENT` if a `student_id` is specified, but
3545
+ * its format cannot be recognized (it is not an email address, nor a `student_id` from the API). * `NOT_FOUND` if the requesting user is permitted to modify guardians for the
3546
+ * requested `student_id`, but no `Guardian` record exists for that student with the provided `guardian_id`.
3547
+ */
3548
+ delete(request?: {
3549
+ /** V1 error format. */
3550
+ "$.xgafv"?: string;
3551
+ /** OAuth access token. */
3552
+ access_token?: string;
3553
+ /** Data format for response. */
3554
+ alt?: string;
3555
+ /** JSONP */
3556
+ callback?: string;
3557
+ /** Selector specifying which fields to include in a partial response. */
3558
+ fields?: string;
3559
+ /** The `id` field from a `Guardian`. */
3560
+ guardianId: string;
3561
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
3562
+ key?: string;
3563
+ /** OAuth 2.0 token for the current user. */
3564
+ oauth_token?: string;
3565
+ /** Returns response with indentations and line breaks. */
3566
+ prettyPrint?: boolean;
3567
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
3568
+ quotaUser?: string;
3569
+ /**
3570
+ * The student whose guardian is to be deleted. One of the following: * the numeric identifier for the user * the email address of the user * the string literal `"me"`, indicating
3571
+ * the requesting user
3572
+ */
3573
+ studentId: string;
3574
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
3575
+ upload_protocol?: string;
3576
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
3577
+ uploadType?: string;
3578
+ }): Request<{}>;
3579
+ /**
3580
+ * Returns a specific guardian. This method returns the following error codes: * `PERMISSION_DENIED` if no user that matches the provided `student_id` is visible to the requesting
3581
+ * user, if the requesting user is not permitted to view guardian information for the student identified by the `student_id`, if guardians are not enabled for the domain in question,
3582
+ * or for other access errors. * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot be recognized (it is not an email address, nor a `student_id` from the API,
3583
+ * nor the literal string `me`). * `NOT_FOUND` if the requesting user is permitted to view guardians for the requested `student_id`, but no `Guardian` record exists for that student
3584
+ * that matches the provided `guardian_id`.
3585
+ */
3586
+ get(request?: {
3587
+ /** V1 error format. */
3588
+ "$.xgafv"?: string;
3589
+ /** OAuth access token. */
3590
+ access_token?: string;
3591
+ /** Data format for response. */
3592
+ alt?: string;
3593
+ /** JSONP */
3594
+ callback?: string;
3595
+ /** Selector specifying which fields to include in a partial response. */
3596
+ fields?: string;
3597
+ /** The `id` field from a `Guardian`. */
3598
+ guardianId: string;
3599
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
3600
+ key?: string;
3601
+ /** OAuth 2.0 token for the current user. */
3602
+ oauth_token?: string;
3603
+ /** Returns response with indentations and line breaks. */
3604
+ prettyPrint?: boolean;
3605
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
3606
+ quotaUser?: string;
3607
+ /**
3608
+ * The student whose guardian is being requested. One of the following: * the numeric identifier for the user * the email address of the user * the string literal `"me"`,
3609
+ * indicating the requesting user
3610
+ */
3611
+ studentId: string;
3612
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
3613
+ upload_protocol?: string;
3614
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
3615
+ uploadType?: string;
3616
+ }): Request<Guardian>;
3617
+ /**
3618
+ * Returns a list of guardians that the requesting user is permitted to view, restricted to those that match the request. To list guardians for any student that the requesting user may
3619
+ * view guardians for, use the literal character `-` for the student ID. This method returns the following error codes: * `PERMISSION_DENIED` if a `student_id` is specified, and the
3620
+ * requesting user is not permitted to view guardian information for that student, if `"-"` is specified as the `student_id` and the user is not a domain administrator, if guardians
3621
+ * are not enabled for the domain in question, if the `invited_email_address` filter is set by a user who is not a domain administrator, or for other access errors. *
3622
+ * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot be recognized (it is not an email address, nor a `student_id` from the API, nor the literal string `me`).
3623
+ * May also be returned if an invalid `page_token` is provided. * `NOT_FOUND` if a `student_id` is specified, and its format can be recognized, but Classroom has no record of that
3624
+ * student.
3625
+ */
3626
+ list(request?: {
3627
+ /** V1 error format. */
3628
+ "$.xgafv"?: string;
3629
+ /** OAuth access token. */
3630
+ access_token?: string;
3631
+ /** Data format for response. */
3632
+ alt?: string;
3633
+ /** JSONP */
3634
+ callback?: string;
3635
+ /** Selector specifying which fields to include in a partial response. */
3636
+ fields?: string;
3637
+ /** Filter results by the email address that the original invitation was sent to, resulting in this guardian link. This filter can only be used by domain administrators. */
3638
+ invitedEmailAddress?: string;
3639
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
3640
+ key?: string;
3641
+ /** OAuth 2.0 token for the current user. */
3642
+ oauth_token?: string;
3643
+ /** Maximum number of items to return. Zero or unspecified indicates that the server may assign a maximum. The server may return fewer than the specified number of results. */
3644
+ pageSize?: number;
3645
+ /**
3646
+ * nextPageToken value returned from a previous list call, indicating that the subsequent page of results should be returned. The list request must be otherwise identical to the
3647
+ * one that resulted in this token.
3648
+ */
3649
+ pageToken?: string;
3650
+ /** Returns response with indentations and line breaks. */
3651
+ prettyPrint?: boolean;
3652
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
3653
+ quotaUser?: string;
3654
+ /**
3655
+ * Filter results by the student who the guardian is linked to. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user *
3656
+ * the string literal `"me"`, indicating the requesting user * the string literal `"-"`, indicating that results should be returned for all students that the requesting user has
3657
+ * access to view.
3658
+ */
3659
+ studentId: string;
3660
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
3661
+ upload_protocol?: string;
3662
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
3663
+ uploadType?: string;
3664
+ }): Request<ListGuardiansResponse>;
3665
+ }
3666
+ interface UserProfilesResource {
3667
+ /**
3668
+ * Returns a user profile. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access this user profile, if no profile
3669
+ * exists with the requested ID, or for access errors.
3670
+ */
3671
+ get(request?: {
3672
+ /** V1 error format. */
3673
+ "$.xgafv"?: string;
3674
+ /** OAuth access token. */
3675
+ access_token?: string;
3676
+ /** Data format for response. */
3677
+ alt?: string;
3678
+ /** JSONP */
3679
+ callback?: string;
3680
+ /** Selector specifying which fields to include in a partial response. */
3681
+ fields?: string;
3682
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
3683
+ key?: string;
3684
+ /** OAuth 2.0 token for the current user. */
3685
+ oauth_token?: string;
3686
+ /** Returns response with indentations and line breaks. */
3687
+ prettyPrint?: boolean;
3688
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
3689
+ quotaUser?: string;
3690
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
3691
+ upload_protocol?: string;
3692
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
3693
+ uploadType?: string;
3694
+ /**
3695
+ * Identifier of the profile to return. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal
3696
+ * `"me"`, indicating the requesting user
3697
+ */
3698
+ userId: string;
3699
+ }): Request<UserProfile>;
3700
+ guardianInvitations: GuardianInvitationsResource;
3701
+ guardians: GuardiansResource;
3702
+ }
3703
+
3704
+ const courses: CoursesResource;
3705
+
3706
+ const invitations: InvitationsResource;
3707
+
3708
+ const registrations: RegistrationsResource;
3709
+
3710
+ const userProfiles: UserProfilesResource;
3711
+ }
3712
+ }