@maxim_mazurok/gapi.client.classroom-v1 0.0.20240604 → 0.0.20240617

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/index.d.ts +1663 -223
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -9,7 +9,7 @@
9
9
  // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
10
10
  // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
11
11
  // Generated from: https://classroom.googleapis.com/$discovery/rest?version=v1
12
- // Revision: 20240604
12
+ // Revision: 20240617
13
13
 
14
14
  /// <reference types="gapi.client" />
15
15
 
@@ -24,6 +24,54 @@ declare namespace gapi.client {
24
24
  function load(name: 'classroom', version: 'v1', callback: () => any): void;
25
25
 
26
26
  namespace classroom {
27
+ interface AddOnAttachment {
28
+ /** Output only. Identifiers of attachments that were previous copies of this attachment. If the attachment was previously copied by virtue of its parent post being copied, this enumerates the identifiers of attachments that were its previous copies in ascending chronological order of copy. */
29
+ copyHistory?: CopyHistory[];
30
+ /** Immutable. Identifier of the course. */
31
+ courseId?: string;
32
+ /** Date, in UTC, that work on this attachment is due. This must be specified if `due_time` is specified. */
33
+ dueDate?: Date;
34
+ /** Time of day, in UTC, that work on this attachment is due. This must be specified if `due_date` is specified. */
35
+ dueTime?: TimeOfDay;
36
+ /** Immutable. Classroom-assigned identifier for this attachment, unique per post. */
37
+ id?: string;
38
+ /** Immutable. Identifier of the announcement, courseWork, or courseWorkMaterial under which the attachment is attached. Unique per course. */
39
+ itemId?: string;
40
+ /** Maximum grade for this attachment. Can only be set if `studentWorkReviewUri` is set. Set to a non-zero value to indicate that the attachment supports grade passback. If set, this must be a non-negative integer value. When set to zero, the attachment will not support grade passback. */
41
+ maxPoints?: number;
42
+ /** Immutable. Deprecated, use item_id instead. */
43
+ postId?: string;
44
+ /** Required. URI to show the student view of the attachment. The URI will be opened in an iframe with the `courseId`, `postId`, and `attachmentId` query parameters set. */
45
+ studentViewUri?: EmbedUri;
46
+ /** URI for the teacher to see student work on the attachment, if applicable. The URI will be opened in an iframe with the `courseId`, `postId`, `attachmentId`, and `submissionId` query parameters set. This is the same `submissionId` returned by google.classroom.AddOns.GetAddOnContext when a student views the attachment. If the URI is omitted or removed, `max_points` will also be discarded. */
47
+ studentWorkReviewUri?: EmbedUri;
48
+ /** Required. URI to show the teacher view of the attachment. The URI will be opened in an iframe with the `courseId`, `postId`, and `attachmentId` query parameters set. */
49
+ teacherViewUri?: EmbedUri;
50
+ /** Required. Title of this attachment. The title must be between 1 and 1000 characters. */
51
+ title?: string;
52
+ }
53
+ interface AddOnAttachmentStudentSubmission {
54
+ /** Student grade on this attachment. If unset, no grade was set. */
55
+ pointsEarned?: number;
56
+ /** Submission state of add-on attachment's parent post (i.e. assignment). */
57
+ postSubmissionState?: string;
58
+ /** Identifier for the student that owns this submission. This field is part of an experimental API change and is populated only if sufficient scopes are granted. */
59
+ userId?: string;
60
+ }
61
+ interface AddOnContext {
62
+ /** Immutable. Identifier of the course. */
63
+ courseId?: string;
64
+ /** Immutable. Identifier of the announcement, courseWork, or courseWorkMaterial under which the attachment is attached. */
65
+ itemId?: string;
66
+ /** Immutable. Deprecated, use item_id instead. */
67
+ postId?: string;
68
+ /** Add-on context corresponding to the requesting user's role as a student. Its presence implies that the requesting user is a student in the course. */
69
+ studentContext?: StudentContext;
70
+ /** Optional. Whether the post allows the teacher to see student work and passback grades. */
71
+ supportsStudentWork?: boolean;
72
+ /** Add-on context corresponding to the requesting user's role as a teacher. Its presence implies that the requesting user is a teacher in the course. */
73
+ teacherContext?: any;
74
+ }
27
75
  interface Announcement {
28
76
  /** Absolute link to this announcement in the Classroom web UI. This is only populated if `state` is `PUBLISHED`. Read-only. */
29
77
  alternateLink?: string;
@@ -72,6 +120,16 @@ declare namespace gapi.client {
72
120
  /** The `name` field of a Cloud Pub/Sub [Topic](https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.topics#Topic). */
73
121
  topicName?: string;
74
122
  }
123
+ interface CopyHistory {
124
+ /** Immutable. Identifier of the attachment. */
125
+ attachmentId?: string;
126
+ /** Immutable. Identifier of the course. */
127
+ courseId?: string;
128
+ /** Immutable. Identifier of the announcement, courseWork, or courseWorkMaterial under which the attachment is attached. */
129
+ itemId?: string;
130
+ /** Immutable. Deprecated, use item_id instead. */
131
+ postId?: string;
132
+ }
75
133
  interface Course {
76
134
  /** Absolute link to this course in the Classroom web UI. Read-only. */
77
135
  alternateLink?: string;
@@ -244,6 +302,10 @@ declare namespace gapi.client {
244
302
  /** Title of the Drive folder. Read-only. */
245
303
  title?: string;
246
304
  }
305
+ interface EmbedUri {
306
+ /** Required. URI to be iframed after being populated with query parameters. This must be a valid UTF-8 string containing between 1 and 1800 characters. */
307
+ uri?: string;
308
+ }
247
309
  interface Empty {}
248
310
  interface Feed {
249
311
  /** Information about a `Feed` with a `feed_type` of `COURSE_ROSTER_CHANGES`. This field must be specified if `feed_type` is `COURSE_ROSTER_CHANGES`. */
@@ -341,6 +403,12 @@ declare namespace gapi.client {
341
403
  /** URL to link to. This must be a valid UTF-8 string containing between 1 and 2024 characters. */
342
404
  url?: string;
343
405
  }
406
+ interface ListAddOnAttachmentsResponse {
407
+ /** Attachments under the given post. */
408
+ addOnAttachments?: AddOnAttachment[];
409
+ /** A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted, there are no subsequent pages. */
410
+ nextPageToken?: string;
411
+ }
344
412
  interface ListAnnouncementsResponse {
345
413
  /** Announcement items that match the request. */
346
414
  announcements?: Announcement[];
@@ -501,6 +569,10 @@ declare namespace gapi.client {
501
569
  /** Identifier of the user. When specified as a parameter of a request, this identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal `"me"`, indicating the requesting user */
502
570
  userId?: string;
503
571
  }
572
+ interface StudentContext {
573
+ /** Requesting user's submission id to be used for grade passback and to identify the student when showing student work to the teacher. This is set exactly when `supportsStudentWork` is `true`. */
574
+ submissionId?: string;
575
+ }
504
576
  interface StudentSubmission {
505
577
  /** Absolute link to the submission in the Classroom web UI. Read-only. */
506
578
  alternateLink?: string;
@@ -551,6 +623,7 @@ declare namespace gapi.client {
551
623
  /** Identifier of the user. When specified as a parameter of a request, this identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal `"me"`, indicating the requesting user */
552
624
  userId?: string;
553
625
  }
626
+ interface TeacherContext {}
554
627
  interface TimeOfDay {
555
628
  /** 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. */
556
629
  hours?: number;
@@ -716,25 +789,31 @@ declare namespace gapi.client {
716
789
  uploadType?: string;
717
790
  }): Request<ListCourseAliasesResponse>;
718
791
  }
719
- interface AnnouncementsResource {
720
- /** 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 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 not exist. * `FAILED_PRECONDITION` for the following request error: * AttachmentNotVisible */
792
+ interface AddOnAttachmentsResource {
793
+ /** Creates an add-on attachment under a post. Requires the add-on to have permission to create new attachments on the post. This method returns the following error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the identified resources does not exist. */
721
794
  create(request: {
722
795
  /** V1 error format. */
723
796
  '$.xgafv'?: string;
724
797
  /** OAuth access token. */
725
798
  access_token?: string;
799
+ /** Optional. Token that authorizes the request. The token is passed as a query parameter when the user is redirected from Classroom to the add-on's URL. This authorization token is required for in-Classroom attachment creation but optional for partner-first attachment creation. Returns an error if not provided for partner-first attachment creation and the developer projects that created the attachment and its parent stream item do not match. */
800
+ addOnToken?: string;
726
801
  /** Data format for response. */
727
802
  alt?: string;
728
803
  /** JSONP */
729
804
  callback?: string;
730
- /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
805
+ /** Required. Identifier of the course. */
731
806
  courseId: string;
732
807
  /** Selector specifying which fields to include in a partial response. */
733
808
  fields?: string;
809
+ /** Identifier of the announcement, courseWork, or courseWorkMaterial under which to create the attachment. This field is required, but is not marked as such while we are migrating from post_id. */
810
+ itemId: string;
734
811
  /** 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. */
735
812
  key?: string;
736
813
  /** OAuth 2.0 token for the current user. */
737
814
  oauth_token?: string;
815
+ /** Optional. Deprecated, use item_id instead. */
816
+ postId?: string;
738
817
  /** Returns response with indentations and line breaks. */
739
818
  prettyPrint?: boolean;
740
819
  /** 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. */
@@ -744,26 +823,32 @@ declare namespace gapi.client {
744
823
  /** Legacy upload protocol for media (e.g. "media", "multipart"). */
745
824
  uploadType?: string;
746
825
  /** Request body */
747
- resource: Announcement;
748
- }): Request<Announcement>;
826
+ resource: AddOnAttachment;
827
+ }): Request<AddOnAttachment>;
749
828
  create(
750
829
  request: {
751
830
  /** V1 error format. */
752
831
  '$.xgafv'?: string;
753
832
  /** OAuth access token. */
754
833
  access_token?: string;
834
+ /** Optional. Token that authorizes the request. The token is passed as a query parameter when the user is redirected from Classroom to the add-on's URL. This authorization token is required for in-Classroom attachment creation but optional for partner-first attachment creation. Returns an error if not provided for partner-first attachment creation and the developer projects that created the attachment and its parent stream item do not match. */
835
+ addOnToken?: string;
755
836
  /** Data format for response. */
756
837
  alt?: string;
757
838
  /** JSONP */
758
839
  callback?: string;
759
- /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
840
+ /** Required. Identifier of the course. */
760
841
  courseId: string;
761
842
  /** Selector specifying which fields to include in a partial response. */
762
843
  fields?: string;
844
+ /** Identifier of the announcement, courseWork, or courseWorkMaterial under which to create the attachment. This field is required, but is not marked as such while we are migrating from post_id. */
845
+ itemId: string;
763
846
  /** 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. */
764
847
  key?: string;
765
848
  /** OAuth 2.0 token for the current user. */
766
849
  oauth_token?: string;
850
+ /** Optional. Deprecated, use item_id instead. */
851
+ postId?: string;
767
852
  /** Returns response with indentations and line breaks. */
768
853
  prettyPrint?: boolean;
769
854
  /** 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. */
@@ -773,9 +858,9 @@ declare namespace gapi.client {
773
858
  /** Legacy upload protocol for media (e.g. "media", "multipart"). */
774
859
  uploadType?: string;
775
860
  },
776
- body: Announcement
777
- ): Request<Announcement>;
778
- /** 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 corresponding announcement item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting developer project did not create the corresponding 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 deleted. * `NOT_FOUND` if no course exists with the requested ID. */
861
+ body: AddOnAttachment
862
+ ): Request<AddOnAttachment>;
863
+ /** Deletes an add-on attachment. Requires the add-on to have been the original creator of the attachment. This method returns the following error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the identified resources does not exist. */
779
864
  delete(request?: {
780
865
  /** V1 error format. */
781
866
  '$.xgafv'?: string;
@@ -783,18 +868,22 @@ declare namespace gapi.client {
783
868
  access_token?: string;
784
869
  /** Data format for response. */
785
870
  alt?: string;
871
+ /** Required. Identifier of the attachment. */
872
+ attachmentId: string;
786
873
  /** JSONP */
787
874
  callback?: string;
788
- /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
875
+ /** Required. Identifier of the course. */
789
876
  courseId: string;
790
877
  /** Selector specifying which fields to include in a partial response. */
791
878
  fields?: string;
792
- /** Identifier of the announcement to delete. This identifier is a Classroom-assigned identifier. */
793
- id: string;
879
+ /** Identifier of the announcement, courseWork, or courseWorkMaterial under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id. */
880
+ itemId: string;
794
881
  /** 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. */
795
882
  key?: string;
796
883
  /** OAuth 2.0 token for the current user. */
797
884
  oauth_token?: string;
885
+ /** Optional. Deprecated, use item_id instead. */
886
+ postId?: string;
798
887
  /** Returns response with indentations and line breaks. */
799
888
  prettyPrint?: boolean;
800
889
  /** 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. */
@@ -804,7 +893,7 @@ declare namespace gapi.client {
804
893
  /** Legacy upload protocol for media (e.g. "media", "multipart"). */
805
894
  uploadType?: string;
806
895
  }): Request<{}>;
807
- /** 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, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course or announcement does not exist. */
896
+ /** Returns an add-on attachment. Requires the add-on requesting the attachment to be the original creator of the attachment. This method returns the following error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the identified resources does not exist. */
808
897
  get(request?: {
809
898
  /** V1 error format. */
810
899
  '$.xgafv'?: string;
@@ -812,18 +901,22 @@ declare namespace gapi.client {
812
901
  access_token?: string;
813
902
  /** Data format for response. */
814
903
  alt?: string;
904
+ /** Required. Identifier of the attachment. */
905
+ attachmentId: string;
815
906
  /** JSONP */
816
907
  callback?: string;
817
- /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
908
+ /** Required. Identifier of the course. */
818
909
  courseId: string;
819
910
  /** Selector specifying which fields to include in a partial response. */
820
911
  fields?: string;
821
- /** Identifier of the announcement. */
822
- id: string;
912
+ /** Identifier of the announcement, courseWork, or courseWorkMaterial under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id. */
913
+ itemId: string;
823
914
  /** 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. */
824
915
  key?: string;
825
916
  /** OAuth 2.0 token for the current user. */
826
917
  oauth_token?: string;
918
+ /** Optional. Deprecated, use item_id instead. */
919
+ postId?: string;
827
920
  /** Returns response with indentations and line breaks. */
828
921
  prettyPrint?: boolean;
829
922
  /** 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. */
@@ -832,8 +925,8 @@ declare namespace gapi.client {
832
925
  upload_protocol?: string;
833
926
  /** Legacy upload protocol for media (e.g. "media", "multipart"). */
834
927
  uploadType?: string;
835
- }): Request<Announcement>;
836
- /** 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 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. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course does not exist. */
928
+ }): Request<AddOnAttachment>;
929
+ /** Returns all attachments created by an add-on under the post. Requires the add-on to have active attachments on the post or have permission to create new attachments on the post. This method returns the following error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the identified resources does not exist. */
837
930
  list(request?: {
838
931
  /** V1 error format. */
839
932
  '$.xgafv'?: string;
@@ -841,24 +934,24 @@ declare namespace gapi.client {
841
934
  access_token?: string;
842
935
  /** Data format for response. */
843
936
  alt?: string;
844
- /** Restriction on the `state` of announcements returned. If this argument is left unspecified, the default value is `PUBLISHED`. */
845
- announcementStates?: string | string[];
846
937
  /** JSONP */
847
938
  callback?: string;
848
- /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
939
+ /** Required. Identifier of the course. */
849
940
  courseId: string;
850
941
  /** Selector specifying which fields to include in a partial response. */
851
942
  fields?: string;
943
+ /** Identifier of the announcement, courseWork, or courseWorkMaterial whose attachments should be enumerated. This field is required, but is not marked as such while we are migrating from post_id. */
944
+ itemId: string;
852
945
  /** 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. */
853
946
  key?: string;
854
947
  /** OAuth 2.0 token for the current user. */
855
948
  oauth_token?: string;
856
- /** 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 `asc` and `desc`. If not specified, `updateTime desc` is the default behavior. Examples: `updateTime asc`, `updateTime` */
857
- orderBy?: string;
858
- /** 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. */
949
+ /** The maximum number of attachments to return. The service may return fewer than this value. If unspecified, at most 20 attachments will be returned. The maximum value is 20; values above 20 will be coerced to 20. */
859
950
  pageSize?: number;
860
- /** nextPageToken value returned from a previous list call, indicating that the subsequent page of results should be returned. The list request must be otherwise identical to the one that resulted in this token. */
951
+ /** A page token, received from a previous `ListAddOnAttachments` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListAddOnAttachments` must match the call that provided the page token. */
861
952
  pageToken?: string;
953
+ /** Optional. Identifier of the post under the course whose attachments to enumerate. Deprecated, use item_id instead. */
954
+ postId?: string;
862
955
  /** Returns response with indentations and line breaks. */
863
956
  prettyPrint?: boolean;
864
957
  /** 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. */
@@ -867,39 +960,45 @@ declare namespace gapi.client {
867
960
  upload_protocol?: string;
868
961
  /** Legacy upload protocol for media (e.g. "media", "multipart"). */
869
962
  uploadType?: string;
870
- }): Request<ListAnnouncementsResponse>;
871
- /** 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 codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course or course work does not exist. */
872
- modifyAssignees(request: {
963
+ }): Request<ListAddOnAttachmentsResponse>;
964
+ /** Updates an add-on attachment. Requires the add-on to have been the original creator of the attachment. This method returns the following error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the identified resources does not exist. */
965
+ patch(request: {
873
966
  /** V1 error format. */
874
967
  '$.xgafv'?: string;
875
968
  /** OAuth access token. */
876
969
  access_token?: string;
877
970
  /** Data format for response. */
878
971
  alt?: string;
972
+ /** Required. Identifier of the attachment. */
973
+ attachmentId: string;
879
974
  /** JSONP */
880
975
  callback?: string;
881
- /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
976
+ /** Required. Identifier of the course. */
882
977
  courseId: string;
883
978
  /** Selector specifying which fields to include in a partial response. */
884
979
  fields?: string;
885
- /** Identifier of the announcement. */
886
- id: string;
980
+ /** Identifier of the post under which the attachment is attached. */
981
+ itemId: string;
887
982
  /** 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. */
888
983
  key?: string;
889
984
  /** OAuth 2.0 token for the current user. */
890
985
  oauth_token?: string;
986
+ /** Required. Identifier of the post under which the attachment is attached. */
987
+ postId?: string;
891
988
  /** Returns response with indentations and line breaks. */
892
989
  prettyPrint?: boolean;
893
990
  /** 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. */
894
991
  quotaUser?: string;
992
+ /** Required. Mask that identifies which fields on the attachment to update. The update fails if invalid fields are specified. If a field supports empty values, it can be cleared by specifying it in the update mask and not in the `AddOnAttachment` object. If a field that does not support empty values is included in the update mask and not set in the `AddOnAttachment` object, an `INVALID_ARGUMENT` error is returned. The following fields may be specified by teachers: * `title` * `teacher_view_uri` * `student_view_uri` * `student_work_review_uri` * `due_date` * `due_time` * `max_points` */
993
+ updateMask?: string;
895
994
  /** Upload protocol for media (e.g. "raw", "multipart"). */
896
995
  upload_protocol?: string;
897
996
  /** Legacy upload protocol for media (e.g. "media", "multipart"). */
898
997
  uploadType?: string;
899
998
  /** Request body */
900
- resource: ModifyAnnouncementAssigneesRequest;
901
- }): Request<Announcement>;
902
- modifyAssignees(
999
+ resource: AddOnAttachment;
1000
+ }): Request<AddOnAttachment>;
1001
+ patch(
903
1002
  request: {
904
1003
  /** V1 error format. */
905
1004
  '$.xgafv'?: string;
@@ -907,31 +1006,39 @@ declare namespace gapi.client {
907
1006
  access_token?: string;
908
1007
  /** Data format for response. */
909
1008
  alt?: string;
1009
+ /** Required. Identifier of the attachment. */
1010
+ attachmentId: string;
910
1011
  /** JSONP */
911
1012
  callback?: string;
912
- /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
1013
+ /** Required. Identifier of the course. */
913
1014
  courseId: string;
914
1015
  /** Selector specifying which fields to include in a partial response. */
915
1016
  fields?: string;
916
- /** Identifier of the announcement. */
917
- id: string;
1017
+ /** Identifier of the post under which the attachment is attached. */
1018
+ itemId: string;
918
1019
  /** 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. */
919
1020
  key?: string;
920
1021
  /** OAuth 2.0 token for the current user. */
921
1022
  oauth_token?: string;
1023
+ /** Required. Identifier of the post under which the attachment is attached. */
1024
+ postId?: string;
922
1025
  /** Returns response with indentations and line breaks. */
923
1026
  prettyPrint?: boolean;
924
1027
  /** 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. */
925
1028
  quotaUser?: string;
1029
+ /** Required. Mask that identifies which fields on the attachment to update. The update fails if invalid fields are specified. If a field supports empty values, it can be cleared by specifying it in the update mask and not in the `AddOnAttachment` object. If a field that does not support empty values is included in the update mask and not set in the `AddOnAttachment` object, an `INVALID_ARGUMENT` error is returned. The following fields may be specified by teachers: * `title` * `teacher_view_uri` * `student_view_uri` * `student_work_review_uri` * `due_date` * `due_time` * `max_points` */
1030
+ updateMask?: string;
926
1031
  /** Upload protocol for media (e.g. "raw", "multipart"). */
927
1032
  upload_protocol?: string;
928
1033
  /** Legacy upload protocol for media (e.g. "media", "multipart"). */
929
1034
  uploadType?: string;
930
1035
  },
931
- body: ModifyAnnouncementAssigneesRequest
932
- ): Request<Announcement>;
933
- /** 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 corresponding announcement or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `FAILED_PRECONDITION` if the requested announcement has already been deleted. * `NOT_FOUND` if the requested course or announcement does not exist */
934
- patch(request: {
1036
+ body: AddOnAttachment
1037
+ ): Request<AddOnAttachment>;
1038
+ }
1039
+ interface AnnouncementsResource {
1040
+ /** 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 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 not exist. * `FAILED_PRECONDITION` for the following request error: * AttachmentNotVisible */
1041
+ create(request: {
935
1042
  /** V1 error format. */
936
1043
  '$.xgafv'?: string;
937
1044
  /** OAuth access token. */
@@ -944,8 +1051,6 @@ declare namespace gapi.client {
944
1051
  courseId: string;
945
1052
  /** Selector specifying which fields to include in a partial response. */
946
1053
  fields?: string;
947
- /** Identifier of the announcement. */
948
- id: string;
949
1054
  /** 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. */
950
1055
  key?: string;
951
1056
  /** OAuth 2.0 token for the current user. */
@@ -954,8 +1059,6 @@ declare namespace gapi.client {
954
1059
  prettyPrint?: boolean;
955
1060
  /** 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. */
956
1061
  quotaUser?: string;
957
- /** 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 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 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` */
958
- updateMask?: string;
959
1062
  /** Upload protocol for media (e.g. "raw", "multipart"). */
960
1063
  upload_protocol?: string;
961
1064
  /** Legacy upload protocol for media (e.g. "media", "multipart"). */
@@ -963,7 +1066,7 @@ declare namespace gapi.client {
963
1066
  /** Request body */
964
1067
  resource: Announcement;
965
1068
  }): Request<Announcement>;
966
- patch(
1069
+ create(
967
1070
  request: {
968
1071
  /** V1 error format. */
969
1072
  '$.xgafv'?: string;
@@ -977,8 +1080,6 @@ declare namespace gapi.client {
977
1080
  courseId: string;
978
1081
  /** Selector specifying which fields to include in a partial response. */
979
1082
  fields?: string;
980
- /** Identifier of the announcement. */
981
- id: string;
982
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. */
983
1084
  key?: string;
984
1085
  /** OAuth 2.0 token for the current user. */
@@ -987,8 +1088,6 @@ declare namespace gapi.client {
987
1088
  prettyPrint?: boolean;
988
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. */
989
1090
  quotaUser?: string;
990
- /** 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 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 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` */
991
- updateMask?: string;
992
1091
  /** Upload protocol for media (e.g. "raw", "multipart"). */
993
1092
  upload_protocol?: string;
994
1093
  /** Legacy upload protocol for media (e.g. "media", "multipart"). */
@@ -996,9 +1095,36 @@ declare namespace gapi.client {
996
1095
  },
997
1096
  body: Announcement
998
1097
  ): Request<Announcement>;
999
- }
1000
- interface StudentSubmissionsResource {
1001
- /** Returns a student submission. * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course, course work, or student submission or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course work, or student submission does not exist. */
1098
+ /** 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 corresponding announcement item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting developer project did not create the corresponding 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 deleted. * `NOT_FOUND` if no course exists with the requested ID. */
1099
+ delete(request?: {
1100
+ /** V1 error format. */
1101
+ '$.xgafv'?: string;
1102
+ /** OAuth access token. */
1103
+ access_token?: string;
1104
+ /** Data format for response. */
1105
+ alt?: string;
1106
+ /** JSONP */
1107
+ callback?: string;
1108
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
1109
+ courseId: string;
1110
+ /** Selector specifying which fields to include in a partial response. */
1111
+ fields?: string;
1112
+ /** Identifier of the announcement to delete. This identifier is a Classroom-assigned identifier. */
1113
+ id: string;
1114
+ /** 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. */
1115
+ key?: string;
1116
+ /** OAuth 2.0 token for the current user. */
1117
+ oauth_token?: string;
1118
+ /** Returns response with indentations and line breaks. */
1119
+ prettyPrint?: boolean;
1120
+ /** 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. */
1121
+ quotaUser?: string;
1122
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1123
+ upload_protocol?: string;
1124
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1125
+ uploadType?: string;
1126
+ }): Request<{}>;
1127
+ /** 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, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course or announcement does not exist. */
1002
1128
  get(request?: {
1003
1129
  /** V1 error format. */
1004
1130
  '$.xgafv'?: string;
@@ -1010,11 +1136,9 @@ declare namespace gapi.client {
1010
1136
  callback?: string;
1011
1137
  /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
1012
1138
  courseId: string;
1013
- /** Identifier of the course work. */
1014
- courseWorkId: string;
1015
1139
  /** Selector specifying which fields to include in a partial response. */
1016
1140
  fields?: string;
1017
- /** Identifier of the student submission. */
1141
+ /** Identifier of the announcement. */
1018
1142
  id: string;
1019
1143
  /** 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. */
1020
1144
  key?: string;
@@ -1028,8 +1152,43 @@ declare namespace gapi.client {
1028
1152
  upload_protocol?: string;
1029
1153
  /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1030
1154
  uploadType?: string;
1031
- }): Request<StudentSubmission>;
1032
- /** Returns a list of student submissions that the requester is permitted to view, factoring in the OAuth scopes of the request. `-` may be specified as the `course_work_id` to include student submissions for multiple course work items. Course students may only view their own work. Course teachers and domain administrators may view all student submissions. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course does not exist. */
1155
+ }): Request<Announcement>;
1156
+ /** Gets metadata for Classroom add-ons in the context of a specific post. To maintain the integrity of its own data and permissions model, an add-on should call this to validate query parameters and the requesting user's role whenever the add-on is opened in an [iframe](https://developers.google.com/classroom/add-ons/get-started/iframes/iframes-overview). This method returns the following error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the identified resources does not exist. */
1157
+ getAddOnContext(request?: {
1158
+ /** V1 error format. */
1159
+ '$.xgafv'?: string;
1160
+ /** OAuth access token. */
1161
+ access_token?: string;
1162
+ /** Optional. Token that authorizes the request. The token is passed as a query parameter when the user is redirected from Classroom to the add-on's URL. The authorization token is required when neither of the following is true: * The add-on has attachments on the post. * The developer project issuing the request is the same project that created the post. */
1163
+ addOnToken?: string;
1164
+ /** Data format for response. */
1165
+ alt?: string;
1166
+ /** Optional. The identifier of the attachment. This field is required for student users and optional for teacher users. If not provided in the student case, an error is returned. */
1167
+ attachmentId?: string;
1168
+ /** JSONP */
1169
+ callback?: string;
1170
+ /** Required. Identifier of the course. */
1171
+ courseId: string;
1172
+ /** Selector specifying which fields to include in a partial response. */
1173
+ fields?: string;
1174
+ /** Identifier of the announcement, courseWork, or courseWorkMaterial under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id. */
1175
+ itemId: string;
1176
+ /** 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. */
1177
+ key?: string;
1178
+ /** OAuth 2.0 token for the current user. */
1179
+ oauth_token?: string;
1180
+ /** Optional. Deprecated, use item_id instead. */
1181
+ postId?: string;
1182
+ /** Returns response with indentations and line breaks. */
1183
+ prettyPrint?: boolean;
1184
+ /** 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. */
1185
+ quotaUser?: string;
1186
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1187
+ upload_protocol?: string;
1188
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1189
+ uploadType?: string;
1190
+ }): Request<AddOnContext>;
1191
+ /** 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 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. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course does not exist. */
1033
1192
  list(request?: {
1034
1193
  /** V1 error format. */
1035
1194
  '$.xgafv'?: string;
@@ -1037,20 +1196,20 @@ declare namespace gapi.client {
1037
1196
  access_token?: string;
1038
1197
  /** Data format for response. */
1039
1198
  alt?: string;
1199
+ /** Restriction on the `state` of announcements returned. If this argument is left unspecified, the default value is `PUBLISHED`. */
1200
+ announcementStates?: string | string[];
1040
1201
  /** JSONP */
1041
1202
  callback?: string;
1042
1203
  /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
1043
1204
  courseId: string;
1044
- /** 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. */
1045
- courseWorkId: string;
1046
1205
  /** Selector specifying which fields to include in a partial response. */
1047
1206
  fields?: string;
1048
1207
  /** 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. */
1049
1208
  key?: string;
1050
- /** Requested lateness value. If specified, returned student submissions are restricted by the requested value. If unspecified, submissions are returned regardless of `late` value. */
1051
- late?: string;
1052
1209
  /** OAuth 2.0 token for the current user. */
1053
1210
  oauth_token?: string;
1211
+ /** 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 `asc` and `desc`. If not specified, `updateTime desc` is the default behavior. Examples: `updateTime asc`, `updateTime` */
1212
+ orderBy?: string;
1054
1213
  /** 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. */
1055
1214
  pageSize?: number;
1056
1215
  /** nextPageToken value returned from a previous list call, indicating that the subsequent page of results should be returned. The list request must be otherwise identical to the one that resulted in this token. */
@@ -1059,17 +1218,13 @@ declare namespace gapi.client {
1059
1218
  prettyPrint?: boolean;
1060
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. */
1061
1220
  quotaUser?: string;
1062
- /** Requested submission states. If specified, returned student submissions match one of the specified submission states. */
1063
- states?: string | string[];
1064
1221
  /** Upload protocol for media (e.g. "raw", "multipart"). */
1065
1222
  upload_protocol?: string;
1066
1223
  /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1067
1224
  uploadType?: string;
1068
- /** Optional argument to restrict returned student work to those owned by the student with the specified identifier. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal `"me"`, indicating the requesting user */
1069
- userId?: string;
1070
- }): Request<ListStudentSubmissionsResponse>;
1071
- /** Modifies attachments of student submission. Attachments may only be added to student submissions belonging to course work objects with a `workType` of `ASSIGNMENT`. This request must be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the corresponding course work item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work, if the user is not permitted to modify attachments on the requested student submission, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course work, or student submission does not exist. */
1072
- modifyAttachments(request: {
1225
+ }): Request<ListAnnouncementsResponse>;
1226
+ /** 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 codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course or course work does not exist. */
1227
+ modifyAssignees(request: {
1073
1228
  /** V1 error format. */
1074
1229
  '$.xgafv'?: string;
1075
1230
  /** OAuth access token. */
@@ -1080,11 +1235,9 @@ declare namespace gapi.client {
1080
1235
  callback?: string;
1081
1236
  /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
1082
1237
  courseId: string;
1083
- /** Identifier of the course work. */
1084
- courseWorkId: string;
1085
1238
  /** Selector specifying which fields to include in a partial response. */
1086
1239
  fields?: string;
1087
- /** Identifier of the student submission. */
1240
+ /** Identifier of the announcement. */
1088
1241
  id: string;
1089
1242
  /** 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. */
1090
1243
  key?: string;
@@ -1099,9 +1252,9 @@ declare namespace gapi.client {
1099
1252
  /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1100
1253
  uploadType?: string;
1101
1254
  /** Request body */
1102
- resource: ModifyAttachmentsRequest;
1103
- }): Request<StudentSubmission>;
1104
- modifyAttachments(
1255
+ resource: ModifyAnnouncementAssigneesRequest;
1256
+ }): Request<Announcement>;
1257
+ modifyAssignees(
1105
1258
  request: {
1106
1259
  /** V1 error format. */
1107
1260
  '$.xgafv'?: string;
@@ -1113,11 +1266,9 @@ declare namespace gapi.client {
1113
1266
  callback?: string;
1114
1267
  /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
1115
1268
  courseId: string;
1116
- /** Identifier of the course work. */
1117
- courseWorkId: string;
1118
1269
  /** Selector specifying which fields to include in a partial response. */
1119
1270
  fields?: string;
1120
- /** Identifier of the student submission. */
1271
+ /** Identifier of the announcement. */
1121
1272
  id: string;
1122
1273
  /** 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. */
1123
1274
  key?: string;
@@ -1132,9 +1283,9 @@ declare namespace gapi.client {
1132
1283
  /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1133
1284
  uploadType?: string;
1134
1285
  },
1135
- body: ModifyAttachmentsRequest
1136
- ): Request<StudentSubmission>;
1137
- /** Updates one or more fields of a student submission. See google.classroom.v1.StudentSubmission for details of which fields may be updated and who may change them. This request must be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the corresponding course work item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting developer project did not create the corresponding course work, if the user is not permitted to make the requested modification to the student submission, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course work, or student submission does not exist. */
1286
+ body: ModifyAnnouncementAssigneesRequest
1287
+ ): Request<Announcement>;
1288
+ /** 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 corresponding announcement or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `FAILED_PRECONDITION` if the requested announcement has already been deleted. * `NOT_FOUND` if the requested course or announcement does not exist */
1138
1289
  patch(request: {
1139
1290
  /** V1 error format. */
1140
1291
  '$.xgafv'?: string;
@@ -1146,11 +1297,9 @@ declare namespace gapi.client {
1146
1297
  callback?: string;
1147
1298
  /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
1148
1299
  courseId: string;
1149
- /** Identifier of the course work. */
1150
- courseWorkId: string;
1151
1300
  /** Selector specifying which fields to include in a partial response. */
1152
1301
  fields?: string;
1153
- /** Identifier of the student submission. */
1302
+ /** Identifier of the announcement. */
1154
1303
  id: string;
1155
1304
  /** 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. */
1156
1305
  key?: string;
@@ -1160,15 +1309,15 @@ declare namespace gapi.client {
1160
1309
  prettyPrint?: boolean;
1161
1310
  /** 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. */
1162
1311
  quotaUser?: string;
1163
- /** Mask that identifies which fields on the student submission to update. This field is required to do an update. The update fails if invalid fields are specified. The following fields may be specified by teachers: * `draft_grade` * `assigned_grade` */
1312
+ /** 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 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 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` */
1164
1313
  updateMask?: string;
1165
1314
  /** Upload protocol for media (e.g. "raw", "multipart"). */
1166
1315
  upload_protocol?: string;
1167
1316
  /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1168
1317
  uploadType?: string;
1169
1318
  /** Request body */
1170
- resource: StudentSubmission;
1171
- }): Request<StudentSubmission>;
1319
+ resource: Announcement;
1320
+ }): Request<Announcement>;
1172
1321
  patch(
1173
1322
  request: {
1174
1323
  /** V1 error format. */
@@ -1181,11 +1330,9 @@ declare namespace gapi.client {
1181
1330
  callback?: string;
1182
1331
  /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
1183
1332
  courseId: string;
1184
- /** Identifier of the course work. */
1185
- courseWorkId: string;
1186
1333
  /** Selector specifying which fields to include in a partial response. */
1187
1334
  fields?: string;
1188
- /** Identifier of the student submission. */
1335
+ /** Identifier of the announcement. */
1189
1336
  id: string;
1190
1337
  /** 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. */
1191
1338
  key?: string;
@@ -1195,49 +1342,93 @@ declare namespace gapi.client {
1195
1342
  prettyPrint?: boolean;
1196
1343
  /** 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. */
1197
1344
  quotaUser?: string;
1198
- /** Mask that identifies which fields on the student submission to update. This field is required to do an update. The update fails if invalid fields are specified. The following fields may be specified by teachers: * `draft_grade` * `assigned_grade` */
1345
+ /** 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 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 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` */
1199
1346
  updateMask?: string;
1200
1347
  /** Upload protocol for media (e.g. "raw", "multipart"). */
1201
1348
  upload_protocol?: string;
1202
1349
  /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1203
1350
  uploadType?: string;
1204
1351
  },
1205
- body: StudentSubmission
1206
- ): Request<StudentSubmission>;
1207
- /** 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 submission state. Only the student that owns the requested student submission may call this method, and only for a student submission that has been turned in. This request must be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the corresponding course work item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work, unsubmit the requested student submission, or for access errors. * `FAILED_PRECONDITION` if the student submission has not been turned in. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course work, or student submission does not exist. */
1208
- reclaim(request: {
1352
+ body: Announcement
1353
+ ): Request<Announcement>;
1354
+ addOnAttachments: AddOnAttachmentsResource;
1355
+ }
1356
+ interface StudentSubmissionsResource {
1357
+ /** Returns a student submission for an add-on attachment. This method returns the following error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the identified resources does not exist. */
1358
+ get(request?: {
1209
1359
  /** V1 error format. */
1210
1360
  '$.xgafv'?: string;
1211
1361
  /** OAuth access token. */
1212
1362
  access_token?: string;
1213
1363
  /** Data format for response. */
1214
1364
  alt?: string;
1365
+ /** Required. Identifier of the attachment. */
1366
+ attachmentId: string;
1215
1367
  /** JSONP */
1216
1368
  callback?: string;
1217
- /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
1369
+ /** Required. Identifier of the course. */
1218
1370
  courseId: string;
1219
- /** Identifier of the course work. */
1220
- courseWorkId: string;
1221
1371
  /** Selector specifying which fields to include in a partial response. */
1222
1372
  fields?: string;
1223
- /** Identifier of the student submission. */
1224
- id: string;
1373
+ /** Identifier of the announcement, courseWork, or courseWorkMaterial under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id. */
1374
+ itemId: string;
1375
+ /** 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. */
1376
+ key?: string;
1377
+ /** OAuth 2.0 token for the current user. */
1378
+ oauth_token?: string;
1379
+ /** Optional. Deprecated, use item_id instead. */
1380
+ postId?: string;
1381
+ /** Returns response with indentations and line breaks. */
1382
+ prettyPrint?: boolean;
1383
+ /** 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. */
1384
+ quotaUser?: string;
1385
+ /** Required. Identifier of the student’s submission. */
1386
+ submissionId: string;
1387
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1388
+ upload_protocol?: string;
1389
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1390
+ uploadType?: string;
1391
+ }): Request<AddOnAttachmentStudentSubmission>;
1392
+ /** Updates data associated with an add-on attachment submission. Requires the add-on to have been the original creator of the attachment and the attachment to have a positive `max_points` value set. This method returns the following error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the identified resources does not exist. */
1393
+ patch(request: {
1394
+ /** V1 error format. */
1395
+ '$.xgafv'?: string;
1396
+ /** OAuth access token. */
1397
+ access_token?: string;
1398
+ /** Data format for response. */
1399
+ alt?: string;
1400
+ /** Required. Identifier of the attachment. */
1401
+ attachmentId: string;
1402
+ /** JSONP */
1403
+ callback?: string;
1404
+ /** Required. Identifier of the course. */
1405
+ courseId: string;
1406
+ /** Selector specifying which fields to include in a partial response. */
1407
+ fields?: string;
1408
+ /** Identifier of the announcement, courseWork, or courseWorkMaterial under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id. */
1409
+ itemId: string;
1225
1410
  /** 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. */
1226
1411
  key?: string;
1227
1412
  /** OAuth 2.0 token for the current user. */
1228
1413
  oauth_token?: string;
1414
+ /** Optional. Deprecated, use item_id instead. */
1415
+ postId?: string;
1229
1416
  /** Returns response with indentations and line breaks. */
1230
1417
  prettyPrint?: boolean;
1231
1418
  /** 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. */
1232
1419
  quotaUser?: string;
1420
+ /** Required. Identifier of the student's submission. */
1421
+ submissionId: string;
1422
+ /** Required. Mask that identifies which fields on the attachment to update. The update fails if invalid fields are specified. If a field supports empty values, it can be cleared by specifying it in the update mask and not in the `AddOnAttachmentStudentSubmission` object. The following fields may be specified by teachers: * `points_earned` */
1423
+ updateMask?: string;
1233
1424
  /** Upload protocol for media (e.g. "raw", "multipart"). */
1234
1425
  upload_protocol?: string;
1235
1426
  /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1236
1427
  uploadType?: string;
1237
1428
  /** Request body */
1238
- resource: ReclaimStudentSubmissionRequest;
1239
- }): Request<{}>;
1240
- reclaim(
1429
+ resource: AddOnAttachmentStudentSubmission;
1430
+ }): Request<AddOnAttachmentStudentSubmission>;
1431
+ patch(
1241
1432
  request: {
1242
1433
  /** V1 error format. */
1243
1434
  '$.xgafv'?: string;
@@ -1245,53 +1436,63 @@ declare namespace gapi.client {
1245
1436
  access_token?: string;
1246
1437
  /** Data format for response. */
1247
1438
  alt?: string;
1439
+ /** Required. Identifier of the attachment. */
1440
+ attachmentId: string;
1248
1441
  /** JSONP */
1249
1442
  callback?: string;
1250
- /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
1443
+ /** Required. Identifier of the course. */
1251
1444
  courseId: string;
1252
- /** Identifier of the course work. */
1253
- courseWorkId: string;
1254
1445
  /** Selector specifying which fields to include in a partial response. */
1255
1446
  fields?: string;
1256
- /** Identifier of the student submission. */
1257
- id: string;
1447
+ /** Identifier of the announcement, courseWork, or courseWorkMaterial under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id. */
1448
+ itemId: string;
1258
1449
  /** 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. */
1259
1450
  key?: string;
1260
1451
  /** OAuth 2.0 token for the current user. */
1261
1452
  oauth_token?: string;
1453
+ /** Optional. Deprecated, use item_id instead. */
1454
+ postId?: string;
1262
1455
  /** Returns response with indentations and line breaks. */
1263
1456
  prettyPrint?: boolean;
1264
1457
  /** 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. */
1265
1458
  quotaUser?: string;
1459
+ /** Required. Identifier of the student's submission. */
1460
+ submissionId: string;
1461
+ /** Required. Mask that identifies which fields on the attachment to update. The update fails if invalid fields are specified. If a field supports empty values, it can be cleared by specifying it in the update mask and not in the `AddOnAttachmentStudentSubmission` object. The following fields may be specified by teachers: * `points_earned` */
1462
+ updateMask?: string;
1266
1463
  /** Upload protocol for media (e.g. "raw", "multipart"). */
1267
1464
  upload_protocol?: string;
1268
1465
  /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1269
1466
  uploadType?: string;
1270
1467
  },
1271
- body: ReclaimStudentSubmissionRequest
1272
- ): Request<{}>;
1273
- /** Returns a student submission. Returning a student submission transfers ownership of attached Drive files to the student and may also update the submission state. Unlike the Classroom application, returning a student submission does not set assignedGrade to the draftGrade value. Only a teacher of the course that contains the requested student submission may call this method. This request must be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the corresponding course work item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work, return the requested student submission, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course work, or student submission does not exist. */
1274
- return(request: {
1468
+ body: AddOnAttachmentStudentSubmission
1469
+ ): Request<AddOnAttachmentStudentSubmission>;
1470
+ }
1471
+ interface AddOnAttachmentsResource {
1472
+ /** Creates an add-on attachment under a post. Requires the add-on to have permission to create new attachments on the post. This method returns the following error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the identified resources does not exist. */
1473
+ create(request: {
1275
1474
  /** V1 error format. */
1276
1475
  '$.xgafv'?: string;
1277
1476
  /** OAuth access token. */
1278
1477
  access_token?: string;
1478
+ /** Optional. Token that authorizes the request. The token is passed as a query parameter when the user is redirected from Classroom to the add-on's URL. This authorization token is required for in-Classroom attachment creation but optional for partner-first attachment creation. Returns an error if not provided for partner-first attachment creation and the developer projects that created the attachment and its parent stream item do not match. */
1479
+ addOnToken?: string;
1279
1480
  /** Data format for response. */
1280
1481
  alt?: string;
1281
1482
  /** JSONP */
1282
1483
  callback?: string;
1283
- /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
1484
+ /** Required. Identifier of the course. */
1284
1485
  courseId: string;
1285
- /** Identifier of the course work. */
1286
- courseWorkId: string;
1287
1486
  /** Selector specifying which fields to include in a partial response. */
1288
1487
  fields?: string;
1289
- /** Identifier of the student submission. */
1290
- id: string;
1488
+ /** Identifier of the announcement, courseWork, or courseWorkMaterial under which to create the attachment. This field is required, but is not marked as such while we are migrating from post_id. */
1489
+ itemId: string;
1291
1490
  /** 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. */
1292
1491
  key?: string;
1293
1492
  /** OAuth 2.0 token for the current user. */
1294
1493
  oauth_token?: string;
1494
+ /** Optional. Deprecated, use item_id instead. */
1495
+ postId?: string;
1295
1496
  /** Returns response with indentations and line breaks. */
1296
1497
  prettyPrint?: boolean;
1297
1498
  /** 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. */
@@ -1301,7 +1502,525 @@ declare namespace gapi.client {
1301
1502
  /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1302
1503
  uploadType?: string;
1303
1504
  /** Request body */
1304
- resource: ReturnStudentSubmissionRequest;
1505
+ resource: AddOnAttachment;
1506
+ }): Request<AddOnAttachment>;
1507
+ create(
1508
+ request: {
1509
+ /** V1 error format. */
1510
+ '$.xgafv'?: string;
1511
+ /** OAuth access token. */
1512
+ access_token?: string;
1513
+ /** Optional. Token that authorizes the request. The token is passed as a query parameter when the user is redirected from Classroom to the add-on's URL. This authorization token is required for in-Classroom attachment creation but optional for partner-first attachment creation. Returns an error if not provided for partner-first attachment creation and the developer projects that created the attachment and its parent stream item do not match. */
1514
+ addOnToken?: string;
1515
+ /** Data format for response. */
1516
+ alt?: string;
1517
+ /** JSONP */
1518
+ callback?: string;
1519
+ /** Required. Identifier of the course. */
1520
+ courseId: string;
1521
+ /** Selector specifying which fields to include in a partial response. */
1522
+ fields?: string;
1523
+ /** Identifier of the announcement, courseWork, or courseWorkMaterial under which to create the attachment. This field is required, but is not marked as such while we are migrating from post_id. */
1524
+ itemId: string;
1525
+ /** 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. */
1526
+ key?: string;
1527
+ /** OAuth 2.0 token for the current user. */
1528
+ oauth_token?: string;
1529
+ /** Optional. Deprecated, use item_id instead. */
1530
+ postId?: string;
1531
+ /** Returns response with indentations and line breaks. */
1532
+ prettyPrint?: boolean;
1533
+ /** 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. */
1534
+ quotaUser?: string;
1535
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1536
+ upload_protocol?: string;
1537
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1538
+ uploadType?: string;
1539
+ },
1540
+ body: AddOnAttachment
1541
+ ): Request<AddOnAttachment>;
1542
+ /** Deletes an add-on attachment. Requires the add-on to have been the original creator of the attachment. This method returns the following error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the identified resources does not exist. */
1543
+ delete(request?: {
1544
+ /** V1 error format. */
1545
+ '$.xgafv'?: string;
1546
+ /** OAuth access token. */
1547
+ access_token?: string;
1548
+ /** Data format for response. */
1549
+ alt?: string;
1550
+ /** Required. Identifier of the attachment. */
1551
+ attachmentId: string;
1552
+ /** JSONP */
1553
+ callback?: string;
1554
+ /** Required. Identifier of the course. */
1555
+ courseId: string;
1556
+ /** Selector specifying which fields to include in a partial response. */
1557
+ fields?: string;
1558
+ /** Identifier of the announcement, courseWork, or courseWorkMaterial under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id. */
1559
+ itemId: string;
1560
+ /** 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. */
1561
+ key?: string;
1562
+ /** OAuth 2.0 token for the current user. */
1563
+ oauth_token?: string;
1564
+ /** Optional. Deprecated, use item_id instead. */
1565
+ postId?: string;
1566
+ /** Returns response with indentations and line breaks. */
1567
+ prettyPrint?: boolean;
1568
+ /** 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. */
1569
+ quotaUser?: string;
1570
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1571
+ upload_protocol?: string;
1572
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1573
+ uploadType?: string;
1574
+ }): Request<{}>;
1575
+ /** Returns an add-on attachment. Requires the add-on requesting the attachment to be the original creator of the attachment. This method returns the following error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the identified resources does not exist. */
1576
+ get(request?: {
1577
+ /** V1 error format. */
1578
+ '$.xgafv'?: string;
1579
+ /** OAuth access token. */
1580
+ access_token?: string;
1581
+ /** Data format for response. */
1582
+ alt?: string;
1583
+ /** Required. Identifier of the attachment. */
1584
+ attachmentId: string;
1585
+ /** JSONP */
1586
+ callback?: string;
1587
+ /** Required. Identifier of the course. */
1588
+ courseId: string;
1589
+ /** Selector specifying which fields to include in a partial response. */
1590
+ fields?: string;
1591
+ /** Identifier of the announcement, courseWork, or courseWorkMaterial under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id. */
1592
+ itemId: string;
1593
+ /** 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. */
1594
+ key?: string;
1595
+ /** OAuth 2.0 token for the current user. */
1596
+ oauth_token?: string;
1597
+ /** Optional. Deprecated, use item_id instead. */
1598
+ postId?: string;
1599
+ /** Returns response with indentations and line breaks. */
1600
+ prettyPrint?: boolean;
1601
+ /** 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. */
1602
+ quotaUser?: string;
1603
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1604
+ upload_protocol?: string;
1605
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1606
+ uploadType?: string;
1607
+ }): Request<AddOnAttachment>;
1608
+ /** Returns all attachments created by an add-on under the post. Requires the add-on to have active attachments on the post or have permission to create new attachments on the post. This method returns the following error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the identified resources does not exist. */
1609
+ list(request?: {
1610
+ /** V1 error format. */
1611
+ '$.xgafv'?: string;
1612
+ /** OAuth access token. */
1613
+ access_token?: string;
1614
+ /** Data format for response. */
1615
+ alt?: string;
1616
+ /** JSONP */
1617
+ callback?: string;
1618
+ /** Required. Identifier of the course. */
1619
+ courseId: string;
1620
+ /** Selector specifying which fields to include in a partial response. */
1621
+ fields?: string;
1622
+ /** Identifier of the announcement, courseWork, or courseWorkMaterial whose attachments should be enumerated. This field is required, but is not marked as such while we are migrating from post_id. */
1623
+ itemId: string;
1624
+ /** 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. */
1625
+ key?: string;
1626
+ /** OAuth 2.0 token for the current user. */
1627
+ oauth_token?: string;
1628
+ /** The maximum number of attachments to return. The service may return fewer than this value. If unspecified, at most 20 attachments will be returned. The maximum value is 20; values above 20 will be coerced to 20. */
1629
+ pageSize?: number;
1630
+ /** A page token, received from a previous `ListAddOnAttachments` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListAddOnAttachments` must match the call that provided the page token. */
1631
+ pageToken?: string;
1632
+ /** Optional. Identifier of the post under the course whose attachments to enumerate. Deprecated, use item_id instead. */
1633
+ postId?: string;
1634
+ /** Returns response with indentations and line breaks. */
1635
+ prettyPrint?: boolean;
1636
+ /** 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. */
1637
+ quotaUser?: string;
1638
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1639
+ upload_protocol?: string;
1640
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1641
+ uploadType?: string;
1642
+ }): Request<ListAddOnAttachmentsResponse>;
1643
+ /** Updates an add-on attachment. Requires the add-on to have been the original creator of the attachment. This method returns the following error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the identified resources does not exist. */
1644
+ patch(request: {
1645
+ /** V1 error format. */
1646
+ '$.xgafv'?: string;
1647
+ /** OAuth access token. */
1648
+ access_token?: string;
1649
+ /** Data format for response. */
1650
+ alt?: string;
1651
+ /** Required. Identifier of the attachment. */
1652
+ attachmentId: string;
1653
+ /** JSONP */
1654
+ callback?: string;
1655
+ /** Required. Identifier of the course. */
1656
+ courseId: string;
1657
+ /** Selector specifying which fields to include in a partial response. */
1658
+ fields?: string;
1659
+ /** Identifier of the post under which the attachment is attached. */
1660
+ itemId: string;
1661
+ /** 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. */
1662
+ key?: string;
1663
+ /** OAuth 2.0 token for the current user. */
1664
+ oauth_token?: string;
1665
+ /** Required. Identifier of the post under which the attachment is attached. */
1666
+ postId?: string;
1667
+ /** Returns response with indentations and line breaks. */
1668
+ prettyPrint?: boolean;
1669
+ /** 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. */
1670
+ quotaUser?: string;
1671
+ /** Required. Mask that identifies which fields on the attachment to update. The update fails if invalid fields are specified. If a field supports empty values, it can be cleared by specifying it in the update mask and not in the `AddOnAttachment` object. If a field that does not support empty values is included in the update mask and not set in the `AddOnAttachment` object, an `INVALID_ARGUMENT` error is returned. The following fields may be specified by teachers: * `title` * `teacher_view_uri` * `student_view_uri` * `student_work_review_uri` * `due_date` * `due_time` * `max_points` */
1672
+ updateMask?: string;
1673
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1674
+ upload_protocol?: string;
1675
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1676
+ uploadType?: string;
1677
+ /** Request body */
1678
+ resource: AddOnAttachment;
1679
+ }): Request<AddOnAttachment>;
1680
+ patch(
1681
+ request: {
1682
+ /** V1 error format. */
1683
+ '$.xgafv'?: string;
1684
+ /** OAuth access token. */
1685
+ access_token?: string;
1686
+ /** Data format for response. */
1687
+ alt?: string;
1688
+ /** Required. Identifier of the attachment. */
1689
+ attachmentId: string;
1690
+ /** JSONP */
1691
+ callback?: string;
1692
+ /** Required. Identifier of the course. */
1693
+ courseId: string;
1694
+ /** Selector specifying which fields to include in a partial response. */
1695
+ fields?: string;
1696
+ /** Identifier of the post under which the attachment is attached. */
1697
+ itemId: string;
1698
+ /** 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. */
1699
+ key?: string;
1700
+ /** OAuth 2.0 token for the current user. */
1701
+ oauth_token?: string;
1702
+ /** Required. Identifier of the post under which the attachment is attached. */
1703
+ postId?: string;
1704
+ /** Returns response with indentations and line breaks. */
1705
+ prettyPrint?: boolean;
1706
+ /** 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. */
1707
+ quotaUser?: string;
1708
+ /** Required. Mask that identifies which fields on the attachment to update. The update fails if invalid fields are specified. If a field supports empty values, it can be cleared by specifying it in the update mask and not in the `AddOnAttachment` object. If a field that does not support empty values is included in the update mask and not set in the `AddOnAttachment` object, an `INVALID_ARGUMENT` error is returned. The following fields may be specified by teachers: * `title` * `teacher_view_uri` * `student_view_uri` * `student_work_review_uri` * `due_date` * `due_time` * `max_points` */
1709
+ updateMask?: string;
1710
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1711
+ upload_protocol?: string;
1712
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1713
+ uploadType?: string;
1714
+ },
1715
+ body: AddOnAttachment
1716
+ ): Request<AddOnAttachment>;
1717
+ studentSubmissions: StudentSubmissionsResource;
1718
+ }
1719
+ interface StudentSubmissionsResource {
1720
+ /** Returns a student submission. * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course, course work, or student submission or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course work, or student submission does not exist. */
1721
+ get(request?: {
1722
+ /** V1 error format. */
1723
+ '$.xgafv'?: string;
1724
+ /** OAuth access token. */
1725
+ access_token?: string;
1726
+ /** Data format for response. */
1727
+ alt?: string;
1728
+ /** JSONP */
1729
+ callback?: string;
1730
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
1731
+ courseId: string;
1732
+ /** Identifier of the course work. */
1733
+ courseWorkId: string;
1734
+ /** Selector specifying which fields to include in a partial response. */
1735
+ fields?: string;
1736
+ /** Identifier of the student submission. */
1737
+ id: string;
1738
+ /** 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. */
1739
+ key?: string;
1740
+ /** OAuth 2.0 token for the current user. */
1741
+ oauth_token?: string;
1742
+ /** Returns response with indentations and line breaks. */
1743
+ prettyPrint?: boolean;
1744
+ /** 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. */
1745
+ quotaUser?: string;
1746
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1747
+ upload_protocol?: string;
1748
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1749
+ uploadType?: string;
1750
+ }): Request<StudentSubmission>;
1751
+ /** Returns a list of student submissions that the requester is permitted to view, factoring in the OAuth scopes of the request. `-` may be specified as the `course_work_id` to include student submissions for multiple course work items. Course students may only view their own work. Course teachers and domain administrators may view all student submissions. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course does not exist. */
1752
+ list(request?: {
1753
+ /** V1 error format. */
1754
+ '$.xgafv'?: string;
1755
+ /** OAuth access token. */
1756
+ access_token?: string;
1757
+ /** Data format for response. */
1758
+ alt?: string;
1759
+ /** JSONP */
1760
+ callback?: string;
1761
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
1762
+ courseId: string;
1763
+ /** 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. */
1764
+ courseWorkId: string;
1765
+ /** Selector specifying which fields to include in a partial response. */
1766
+ fields?: string;
1767
+ /** 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. */
1768
+ key?: string;
1769
+ /** Requested lateness value. If specified, returned student submissions are restricted by the requested value. If unspecified, submissions are returned regardless of `late` value. */
1770
+ late?: string;
1771
+ /** OAuth 2.0 token for the current user. */
1772
+ oauth_token?: string;
1773
+ /** 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. */
1774
+ pageSize?: number;
1775
+ /** nextPageToken value returned from a previous list call, indicating that the subsequent page of results should be returned. The list request must be otherwise identical to the one that resulted in this token. */
1776
+ pageToken?: string;
1777
+ /** Returns response with indentations and line breaks. */
1778
+ prettyPrint?: boolean;
1779
+ /** 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. */
1780
+ quotaUser?: string;
1781
+ /** Requested submission states. If specified, returned student submissions match one of the specified submission states. */
1782
+ states?: string | string[];
1783
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1784
+ upload_protocol?: string;
1785
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1786
+ uploadType?: string;
1787
+ /** Optional argument to restrict returned student work to those owned by the student with the specified identifier. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal `"me"`, indicating the requesting user */
1788
+ userId?: string;
1789
+ }): Request<ListStudentSubmissionsResponse>;
1790
+ /** Modifies attachments of student submission. Attachments may only be added to student submissions belonging to course work objects with a `workType` of `ASSIGNMENT`. This request must be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the corresponding course work item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work, if the user is not permitted to modify attachments on the requested student submission, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course work, or student submission does not exist. */
1791
+ modifyAttachments(request: {
1792
+ /** V1 error format. */
1793
+ '$.xgafv'?: string;
1794
+ /** OAuth access token. */
1795
+ access_token?: string;
1796
+ /** Data format for response. */
1797
+ alt?: string;
1798
+ /** JSONP */
1799
+ callback?: string;
1800
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
1801
+ courseId: string;
1802
+ /** Identifier of the course work. */
1803
+ courseWorkId: string;
1804
+ /** Selector specifying which fields to include in a partial response. */
1805
+ fields?: string;
1806
+ /** Identifier of the student submission. */
1807
+ id: string;
1808
+ /** 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. */
1809
+ key?: string;
1810
+ /** OAuth 2.0 token for the current user. */
1811
+ oauth_token?: string;
1812
+ /** Returns response with indentations and line breaks. */
1813
+ prettyPrint?: boolean;
1814
+ /** 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. */
1815
+ quotaUser?: string;
1816
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1817
+ upload_protocol?: string;
1818
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1819
+ uploadType?: string;
1820
+ /** Request body */
1821
+ resource: ModifyAttachmentsRequest;
1822
+ }): Request<StudentSubmission>;
1823
+ modifyAttachments(
1824
+ request: {
1825
+ /** V1 error format. */
1826
+ '$.xgafv'?: string;
1827
+ /** OAuth access token. */
1828
+ access_token?: string;
1829
+ /** Data format for response. */
1830
+ alt?: string;
1831
+ /** JSONP */
1832
+ callback?: string;
1833
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
1834
+ courseId: string;
1835
+ /** Identifier of the course work. */
1836
+ courseWorkId: string;
1837
+ /** Selector specifying which fields to include in a partial response. */
1838
+ fields?: string;
1839
+ /** Identifier of the student submission. */
1840
+ id: string;
1841
+ /** 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. */
1842
+ key?: string;
1843
+ /** OAuth 2.0 token for the current user. */
1844
+ oauth_token?: string;
1845
+ /** Returns response with indentations and line breaks. */
1846
+ prettyPrint?: boolean;
1847
+ /** 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. */
1848
+ quotaUser?: string;
1849
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1850
+ upload_protocol?: string;
1851
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1852
+ uploadType?: string;
1853
+ },
1854
+ body: ModifyAttachmentsRequest
1855
+ ): Request<StudentSubmission>;
1856
+ /** Updates one or more fields of a student submission. See google.classroom.v1.StudentSubmission for details of which fields may be updated and who may change them. This request must be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the corresponding course work item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting developer project did not create the corresponding course work, if the user is not permitted to make the requested modification to the student submission, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course work, or student submission does not exist. */
1857
+ patch(request: {
1858
+ /** V1 error format. */
1859
+ '$.xgafv'?: string;
1860
+ /** OAuth access token. */
1861
+ access_token?: string;
1862
+ /** Data format for response. */
1863
+ alt?: string;
1864
+ /** JSONP */
1865
+ callback?: string;
1866
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
1867
+ courseId: string;
1868
+ /** Identifier of the course work. */
1869
+ courseWorkId: string;
1870
+ /** Selector specifying which fields to include in a partial response. */
1871
+ fields?: string;
1872
+ /** Identifier of the student submission. */
1873
+ id: string;
1874
+ /** 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. */
1875
+ key?: string;
1876
+ /** OAuth 2.0 token for the current user. */
1877
+ oauth_token?: string;
1878
+ /** Returns response with indentations and line breaks. */
1879
+ prettyPrint?: boolean;
1880
+ /** 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. */
1881
+ quotaUser?: string;
1882
+ /** Mask that identifies which fields on the student submission to update. This field is required to do an update. The update fails if invalid fields are specified. The following fields may be specified by teachers: * `draft_grade` * `assigned_grade` */
1883
+ updateMask?: string;
1884
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1885
+ upload_protocol?: string;
1886
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1887
+ uploadType?: string;
1888
+ /** Request body */
1889
+ resource: StudentSubmission;
1890
+ }): Request<StudentSubmission>;
1891
+ patch(
1892
+ request: {
1893
+ /** V1 error format. */
1894
+ '$.xgafv'?: string;
1895
+ /** OAuth access token. */
1896
+ access_token?: string;
1897
+ /** Data format for response. */
1898
+ alt?: string;
1899
+ /** JSONP */
1900
+ callback?: string;
1901
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
1902
+ courseId: string;
1903
+ /** Identifier of the course work. */
1904
+ courseWorkId: string;
1905
+ /** Selector specifying which fields to include in a partial response. */
1906
+ fields?: string;
1907
+ /** Identifier of the student submission. */
1908
+ id: string;
1909
+ /** 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. */
1910
+ key?: string;
1911
+ /** OAuth 2.0 token for the current user. */
1912
+ oauth_token?: string;
1913
+ /** Returns response with indentations and line breaks. */
1914
+ prettyPrint?: boolean;
1915
+ /** 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. */
1916
+ quotaUser?: string;
1917
+ /** Mask that identifies which fields on the student submission to update. This field is required to do an update. The update fails if invalid fields are specified. The following fields may be specified by teachers: * `draft_grade` * `assigned_grade` */
1918
+ updateMask?: string;
1919
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1920
+ upload_protocol?: string;
1921
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1922
+ uploadType?: string;
1923
+ },
1924
+ body: StudentSubmission
1925
+ ): Request<StudentSubmission>;
1926
+ /** 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 submission state. Only the student that owns the requested student submission may call this method, and only for a student submission that has been turned in. This request must be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the corresponding course work item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work, unsubmit the requested student submission, or for access errors. * `FAILED_PRECONDITION` if the student submission has not been turned in. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course work, or student submission does not exist. */
1927
+ reclaim(request: {
1928
+ /** V1 error format. */
1929
+ '$.xgafv'?: string;
1930
+ /** OAuth access token. */
1931
+ access_token?: string;
1932
+ /** Data format for response. */
1933
+ alt?: string;
1934
+ /** JSONP */
1935
+ callback?: string;
1936
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
1937
+ courseId: string;
1938
+ /** Identifier of the course work. */
1939
+ courseWorkId: string;
1940
+ /** Selector specifying which fields to include in a partial response. */
1941
+ fields?: string;
1942
+ /** Identifier of the student submission. */
1943
+ id: string;
1944
+ /** 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. */
1945
+ key?: string;
1946
+ /** OAuth 2.0 token for the current user. */
1947
+ oauth_token?: string;
1948
+ /** Returns response with indentations and line breaks. */
1949
+ prettyPrint?: boolean;
1950
+ /** 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. */
1951
+ quotaUser?: string;
1952
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1953
+ upload_protocol?: string;
1954
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1955
+ uploadType?: string;
1956
+ /** Request body */
1957
+ resource: ReclaimStudentSubmissionRequest;
1958
+ }): Request<{}>;
1959
+ reclaim(
1960
+ request: {
1961
+ /** V1 error format. */
1962
+ '$.xgafv'?: string;
1963
+ /** OAuth access token. */
1964
+ access_token?: string;
1965
+ /** Data format for response. */
1966
+ alt?: string;
1967
+ /** JSONP */
1968
+ callback?: string;
1969
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
1970
+ courseId: string;
1971
+ /** Identifier of the course work. */
1972
+ courseWorkId: string;
1973
+ /** Selector specifying which fields to include in a partial response. */
1974
+ fields?: string;
1975
+ /** Identifier of the student submission. */
1976
+ id: string;
1977
+ /** 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. */
1978
+ key?: string;
1979
+ /** OAuth 2.0 token for the current user. */
1980
+ oauth_token?: string;
1981
+ /** Returns response with indentations and line breaks. */
1982
+ prettyPrint?: boolean;
1983
+ /** 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. */
1984
+ quotaUser?: string;
1985
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1986
+ upload_protocol?: string;
1987
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1988
+ uploadType?: string;
1989
+ },
1990
+ body: ReclaimStudentSubmissionRequest
1991
+ ): Request<{}>;
1992
+ /** Returns a student submission. Returning a student submission transfers ownership of attached Drive files to the student and may also update the submission state. Unlike the Classroom application, returning a student submission does not set assignedGrade to the draftGrade value. Only a teacher of the course that contains the requested student submission may call this method. This request must be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the corresponding course work item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work, return the requested student submission, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course work, or student submission does not exist. */
1993
+ return(request: {
1994
+ /** V1 error format. */
1995
+ '$.xgafv'?: string;
1996
+ /** OAuth access token. */
1997
+ access_token?: string;
1998
+ /** Data format for response. */
1999
+ alt?: string;
2000
+ /** JSONP */
2001
+ callback?: string;
2002
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
2003
+ courseId: string;
2004
+ /** Identifier of the course work. */
2005
+ courseWorkId: string;
2006
+ /** Selector specifying which fields to include in a partial response. */
2007
+ fields?: string;
2008
+ /** Identifier of the student submission. */
2009
+ id: string;
2010
+ /** 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. */
2011
+ key?: string;
2012
+ /** OAuth 2.0 token for the current user. */
2013
+ oauth_token?: string;
2014
+ /** Returns response with indentations and line breaks. */
2015
+ prettyPrint?: boolean;
2016
+ /** 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. */
2017
+ quotaUser?: string;
2018
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2019
+ upload_protocol?: string;
2020
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2021
+ uploadType?: string;
2022
+ /** Request body */
2023
+ resource: ReturnStudentSubmissionRequest;
1305
2024
  }): Request<{}>;
1306
2025
  return(
1307
2026
  request: {
@@ -1315,11 +2034,327 @@ declare namespace gapi.client {
1315
2034
  callback?: string;
1316
2035
  /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
1317
2036
  courseId: string;
1318
- /** Identifier of the course work. */
1319
- courseWorkId: string;
2037
+ /** Identifier of the course work. */
2038
+ courseWorkId: string;
2039
+ /** Selector specifying which fields to include in a partial response. */
2040
+ fields?: string;
2041
+ /** Identifier of the student submission. */
2042
+ id: string;
2043
+ /** 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. */
2044
+ key?: string;
2045
+ /** OAuth 2.0 token for the current user. */
2046
+ oauth_token?: string;
2047
+ /** Returns response with indentations and line breaks. */
2048
+ prettyPrint?: boolean;
2049
+ /** 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. */
2050
+ quotaUser?: string;
2051
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2052
+ upload_protocol?: string;
2053
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2054
+ uploadType?: string;
2055
+ },
2056
+ body: ReturnStudentSubmissionRequest
2057
+ ): Request<{}>;
2058
+ /** Turns in a student submission. Turning in a student submission transfers ownership of attached Drive files to the teacher and may also update the submission state. This may only be called by the student that owns the specified student submission. This request must be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the corresponding course work item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work, turn in the requested student submission, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course work, or student submission does not exist. */
2059
+ turnIn(request: {
2060
+ /** V1 error format. */
2061
+ '$.xgafv'?: string;
2062
+ /** OAuth access token. */
2063
+ access_token?: string;
2064
+ /** Data format for response. */
2065
+ alt?: string;
2066
+ /** JSONP */
2067
+ callback?: string;
2068
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
2069
+ courseId: string;
2070
+ /** Identifier of the course work. */
2071
+ courseWorkId: string;
2072
+ /** Selector specifying which fields to include in a partial response. */
2073
+ fields?: string;
2074
+ /** Identifier of the student submission. */
2075
+ id: string;
2076
+ /** 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. */
2077
+ key?: string;
2078
+ /** OAuth 2.0 token for the current user. */
2079
+ oauth_token?: string;
2080
+ /** Returns response with indentations and line breaks. */
2081
+ prettyPrint?: boolean;
2082
+ /** 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. */
2083
+ quotaUser?: string;
2084
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2085
+ upload_protocol?: string;
2086
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2087
+ uploadType?: string;
2088
+ /** Request body */
2089
+ resource: TurnInStudentSubmissionRequest;
2090
+ }): Request<{}>;
2091
+ turnIn(
2092
+ request: {
2093
+ /** V1 error format. */
2094
+ '$.xgafv'?: string;
2095
+ /** OAuth access token. */
2096
+ access_token?: string;
2097
+ /** Data format for response. */
2098
+ alt?: string;
2099
+ /** JSONP */
2100
+ callback?: string;
2101
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
2102
+ courseId: string;
2103
+ /** Identifier of the course work. */
2104
+ courseWorkId: string;
2105
+ /** Selector specifying which fields to include in a partial response. */
2106
+ fields?: string;
2107
+ /** Identifier of the student submission. */
2108
+ id: string;
2109
+ /** 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. */
2110
+ key?: string;
2111
+ /** OAuth 2.0 token for the current user. */
2112
+ oauth_token?: string;
2113
+ /** Returns response with indentations and line breaks. */
2114
+ prettyPrint?: boolean;
2115
+ /** 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. */
2116
+ quotaUser?: string;
2117
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2118
+ upload_protocol?: string;
2119
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2120
+ uploadType?: string;
2121
+ },
2122
+ body: TurnInStudentSubmissionRequest
2123
+ ): Request<{}>;
2124
+ }
2125
+ interface CourseWorkResource {
2126
+ /** Creates course work. The resulting course work (and corresponding student submissions) are associated with the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to make the request. Classroom API requests to modify course work and student submissions must be made with an OAuth client ID from the associated Developer Console project. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course, create course work in the requested course, share a Drive attachment, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course does not exist. * `FAILED_PRECONDITION` for the following request error: * AttachmentNotVisible */
2127
+ create(request: {
2128
+ /** V1 error format. */
2129
+ '$.xgafv'?: string;
2130
+ /** OAuth access token. */
2131
+ access_token?: string;
2132
+ /** Data format for response. */
2133
+ alt?: string;
2134
+ /** JSONP */
2135
+ callback?: string;
2136
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
2137
+ courseId: string;
2138
+ /** Selector specifying which fields to include in a partial response. */
2139
+ fields?: string;
2140
+ /** 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. */
2141
+ key?: string;
2142
+ /** OAuth 2.0 token for the current user. */
2143
+ oauth_token?: string;
2144
+ /** Returns response with indentations and line breaks. */
2145
+ prettyPrint?: boolean;
2146
+ /** 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. */
2147
+ quotaUser?: string;
2148
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2149
+ upload_protocol?: string;
2150
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2151
+ uploadType?: string;
2152
+ /** Request body */
2153
+ resource: CourseWork;
2154
+ }): Request<CourseWork>;
2155
+ create(
2156
+ request: {
2157
+ /** V1 error format. */
2158
+ '$.xgafv'?: string;
2159
+ /** OAuth access token. */
2160
+ access_token?: string;
2161
+ /** Data format for response. */
2162
+ alt?: string;
2163
+ /** JSONP */
2164
+ callback?: string;
2165
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
2166
+ courseId: string;
2167
+ /** Selector specifying which fields to include in a partial response. */
2168
+ fields?: string;
2169
+ /** 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. */
2170
+ key?: string;
2171
+ /** OAuth 2.0 token for the current user. */
2172
+ oauth_token?: string;
2173
+ /** Returns response with indentations and line breaks. */
2174
+ prettyPrint?: boolean;
2175
+ /** 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. */
2176
+ quotaUser?: string;
2177
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2178
+ upload_protocol?: string;
2179
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2180
+ uploadType?: string;
2181
+ },
2182
+ body: CourseWork
2183
+ ): Request<CourseWork>;
2184
+ /** Deletes a course work. This request must be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the corresponding course work item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting developer project did not create the corresponding course work, if the requesting user is not permitted to delete the requested course or for access errors. * `FAILED_PRECONDITION` if the requested course work has already been deleted. * `NOT_FOUND` if no course exists with the requested ID. */
2185
+ delete(request?: {
2186
+ /** V1 error format. */
2187
+ '$.xgafv'?: string;
2188
+ /** OAuth access token. */
2189
+ access_token?: string;
2190
+ /** Data format for response. */
2191
+ alt?: string;
2192
+ /** JSONP */
2193
+ callback?: string;
2194
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
2195
+ courseId: string;
2196
+ /** Selector specifying which fields to include in a partial response. */
2197
+ fields?: string;
2198
+ /** Identifier of the course work to delete. This identifier is a Classroom-assigned identifier. */
2199
+ id: string;
2200
+ /** 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. */
2201
+ key?: string;
2202
+ /** OAuth 2.0 token for the current user. */
2203
+ oauth_token?: string;
2204
+ /** Returns response with indentations and line breaks. */
2205
+ prettyPrint?: boolean;
2206
+ /** 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. */
2207
+ quotaUser?: string;
2208
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2209
+ upload_protocol?: string;
2210
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2211
+ uploadType?: string;
2212
+ }): Request<{}>;
2213
+ /** Returns course work. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course or course work does not exist. */
2214
+ get(request?: {
2215
+ /** V1 error format. */
2216
+ '$.xgafv'?: string;
2217
+ /** OAuth access token. */
2218
+ access_token?: string;
2219
+ /** Data format for response. */
2220
+ alt?: string;
2221
+ /** JSONP */
2222
+ callback?: string;
2223
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
2224
+ courseId: string;
2225
+ /** Selector specifying which fields to include in a partial response. */
2226
+ fields?: string;
2227
+ /** Identifier of the course work. */
2228
+ id: string;
2229
+ /** 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. */
2230
+ key?: string;
2231
+ /** OAuth 2.0 token for the current user. */
2232
+ oauth_token?: string;
2233
+ /** Returns response with indentations and line breaks. */
2234
+ prettyPrint?: boolean;
2235
+ /** 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. */
2236
+ quotaUser?: string;
2237
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2238
+ upload_protocol?: string;
2239
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2240
+ uploadType?: string;
2241
+ }): Request<CourseWork>;
2242
+ /** Gets metadata for Classroom add-ons in the context of a specific post. To maintain the integrity of its own data and permissions model, an add-on should call this to validate query parameters and the requesting user's role whenever the add-on is opened in an [iframe](https://developers.google.com/classroom/add-ons/get-started/iframes/iframes-overview). This method returns the following error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the identified resources does not exist. */
2243
+ getAddOnContext(request?: {
2244
+ /** V1 error format. */
2245
+ '$.xgafv'?: string;
2246
+ /** OAuth access token. */
2247
+ access_token?: string;
2248
+ /** Optional. Token that authorizes the request. The token is passed as a query parameter when the user is redirected from Classroom to the add-on's URL. The authorization token is required when neither of the following is true: * The add-on has attachments on the post. * The developer project issuing the request is the same project that created the post. */
2249
+ addOnToken?: string;
2250
+ /** Data format for response. */
2251
+ alt?: string;
2252
+ /** Optional. The identifier of the attachment. This field is required for student users and optional for teacher users. If not provided in the student case, an error is returned. */
2253
+ attachmentId?: string;
2254
+ /** JSONP */
2255
+ callback?: string;
2256
+ /** Required. Identifier of the course. */
2257
+ courseId: string;
2258
+ /** Selector specifying which fields to include in a partial response. */
2259
+ fields?: string;
2260
+ /** Identifier of the announcement, courseWork, or courseWorkMaterial under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id. */
2261
+ itemId: string;
2262
+ /** 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. */
2263
+ key?: string;
2264
+ /** OAuth 2.0 token for the current user. */
2265
+ oauth_token?: string;
2266
+ /** Optional. Deprecated, use item_id instead. */
2267
+ postId?: string;
2268
+ /** Returns response with indentations and line breaks. */
2269
+ prettyPrint?: boolean;
2270
+ /** 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. */
2271
+ quotaUser?: string;
2272
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2273
+ upload_protocol?: string;
2274
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2275
+ uploadType?: string;
2276
+ }): Request<AddOnContext>;
2277
+ /** Returns a list of course work that the requester is permitted to view. Course students may only view `PUBLISHED` course work. Course teachers and domain administrators may view all course work. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course does not exist. */
2278
+ list(request?: {
2279
+ /** V1 error format. */
2280
+ '$.xgafv'?: string;
2281
+ /** OAuth access token. */
2282
+ access_token?: string;
2283
+ /** Data format for response. */
2284
+ alt?: string;
2285
+ /** JSONP */
2286
+ callback?: string;
2287
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
2288
+ courseId: string;
2289
+ /** Restriction on the work status to return. Only courseWork that matches is returned. If unspecified, items with a work status of `PUBLISHED` is returned. */
2290
+ courseWorkStates?: string | string[];
2291
+ /** Selector specifying which fields to include in a partial response. */
2292
+ fields?: string;
2293
+ /** 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. */
2294
+ key?: string;
2295
+ /** OAuth 2.0 token for the current user. */
2296
+ oauth_token?: string;
2297
+ /** Optional sort ordering for results. A comma-separated list of fields with an optional sort direction keyword. Supported fields are `updateTime` and `dueDate`. Supported direction keywords are `asc` and `desc`. If not specified, `updateTime desc` is the default behavior. Examples: `dueDate asc,updateTime desc`, `updateTime,dueDate desc` */
2298
+ orderBy?: string;
2299
+ /** 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. */
2300
+ pageSize?: number;
2301
+ /** nextPageToken value returned from a previous list call, indicating that the subsequent page of results should be returned. The list request must be otherwise identical to the one that resulted in this token. */
2302
+ pageToken?: string;
2303
+ /** Returns response with indentations and line breaks. */
2304
+ prettyPrint?: boolean;
2305
+ /** 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. */
2306
+ quotaUser?: string;
2307
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2308
+ upload_protocol?: string;
2309
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2310
+ uploadType?: string;
2311
+ }): Request<ListCourseWorkResponse>;
2312
+ /** 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: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course or course work does not exist. */
2313
+ modifyAssignees(request: {
2314
+ /** V1 error format. */
2315
+ '$.xgafv'?: string;
2316
+ /** OAuth access token. */
2317
+ access_token?: string;
2318
+ /** Data format for response. */
2319
+ alt?: string;
2320
+ /** JSONP */
2321
+ callback?: string;
2322
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
2323
+ courseId: string;
2324
+ /** Selector specifying which fields to include in a partial response. */
2325
+ fields?: string;
2326
+ /** Identifier of the coursework. */
2327
+ id: string;
2328
+ /** 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. */
2329
+ key?: string;
2330
+ /** OAuth 2.0 token for the current user. */
2331
+ oauth_token?: string;
2332
+ /** Returns response with indentations and line breaks. */
2333
+ prettyPrint?: boolean;
2334
+ /** 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. */
2335
+ quotaUser?: string;
2336
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2337
+ upload_protocol?: string;
2338
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2339
+ uploadType?: string;
2340
+ /** Request body */
2341
+ resource: ModifyCourseWorkAssigneesRequest;
2342
+ }): Request<CourseWork>;
2343
+ modifyAssignees(
2344
+ request: {
2345
+ /** V1 error format. */
2346
+ '$.xgafv'?: string;
2347
+ /** OAuth access token. */
2348
+ access_token?: string;
2349
+ /** Data format for response. */
2350
+ alt?: string;
2351
+ /** JSONP */
2352
+ callback?: string;
2353
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
2354
+ courseId: string;
1320
2355
  /** Selector specifying which fields to include in a partial response. */
1321
2356
  fields?: string;
1322
- /** Identifier of the student submission. */
2357
+ /** Identifier of the coursework. */
1323
2358
  id: string;
1324
2359
  /** 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. */
1325
2360
  key?: string;
@@ -1334,10 +2369,216 @@ declare namespace gapi.client {
1334
2369
  /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1335
2370
  uploadType?: string;
1336
2371
  },
1337
- body: ReturnStudentSubmissionRequest
1338
- ): Request<{}>;
1339
- /** Turns in a student submission. Turning in a student submission transfers ownership of attached Drive files to the teacher and may also update the submission state. This may only be called by the student that owns the specified student submission. This request must be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the corresponding course work item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work, turn in the requested student submission, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course, course work, or student submission does not exist. */
1340
- turnIn(request: {
2372
+ body: ModifyCourseWorkAssigneesRequest
2373
+ ): Request<CourseWork>;
2374
+ /** Updates one or more fields of a course work. See google.classroom.v1.CourseWork for details of which fields may be updated and who may change them. This request must be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the corresponding course work item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting developer project did not create the corresponding course work, if the user is not permitted to make the requested modification to the student submission, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `FAILED_PRECONDITION` if the requested course work has already been deleted. * `NOT_FOUND` if the requested course, course work, or student submission does not exist. */
2375
+ patch(request: {
2376
+ /** V1 error format. */
2377
+ '$.xgafv'?: string;
2378
+ /** OAuth access token. */
2379
+ access_token?: string;
2380
+ /** Data format for response. */
2381
+ alt?: string;
2382
+ /** JSONP */
2383
+ callback?: string;
2384
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
2385
+ courseId: string;
2386
+ /** Selector specifying which fields to include in a partial response. */
2387
+ fields?: string;
2388
+ /** Identifier of the course work. */
2389
+ id: string;
2390
+ /** 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. */
2391
+ key?: string;
2392
+ /** OAuth 2.0 token for the current user. */
2393
+ oauth_token?: string;
2394
+ /** Returns response with indentations and line breaks. */
2395
+ prettyPrint?: boolean;
2396
+ /** 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. */
2397
+ quotaUser?: string;
2398
+ /** Mask that identifies which fields on the course work to update. This field is required to do an update. The update fails if invalid fields are specified. If a field supports empty values, it can be cleared by specifying it in the update mask and not in the `CourseWork` object. If a field that does not support empty values is included in the update mask and not set in the `CourseWork` object, an `INVALID_ARGUMENT` error is returned. The following fields may be specified by teachers: * `title` * `description` * `state` * `due_date` * `due_time` * `max_points` * `scheduled_time` * `submission_modification_mode` * `topic_id` */
2399
+ updateMask?: string;
2400
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2401
+ upload_protocol?: string;
2402
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2403
+ uploadType?: string;
2404
+ /** Request body */
2405
+ resource: CourseWork;
2406
+ }): Request<CourseWork>;
2407
+ patch(
2408
+ request: {
2409
+ /** V1 error format. */
2410
+ '$.xgafv'?: string;
2411
+ /** OAuth access token. */
2412
+ access_token?: string;
2413
+ /** Data format for response. */
2414
+ alt?: string;
2415
+ /** JSONP */
2416
+ callback?: string;
2417
+ /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
2418
+ courseId: string;
2419
+ /** Selector specifying which fields to include in a partial response. */
2420
+ fields?: string;
2421
+ /** Identifier of the course work. */
2422
+ id: string;
2423
+ /** 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. */
2424
+ key?: string;
2425
+ /** OAuth 2.0 token for the current user. */
2426
+ oauth_token?: string;
2427
+ /** Returns response with indentations and line breaks. */
2428
+ prettyPrint?: boolean;
2429
+ /** 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. */
2430
+ quotaUser?: string;
2431
+ /** Mask that identifies which fields on the course work to update. This field is required to do an update. The update fails if invalid fields are specified. If a field supports empty values, it can be cleared by specifying it in the update mask and not in the `CourseWork` object. If a field that does not support empty values is included in the update mask and not set in the `CourseWork` object, an `INVALID_ARGUMENT` error is returned. The following fields may be specified by teachers: * `title` * `description` * `state` * `due_date` * `due_time` * `max_points` * `scheduled_time` * `submission_modification_mode` * `topic_id` */
2432
+ updateMask?: string;
2433
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2434
+ upload_protocol?: string;
2435
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2436
+ uploadType?: string;
2437
+ },
2438
+ body: CourseWork
2439
+ ): Request<CourseWork>;
2440
+ addOnAttachments: AddOnAttachmentsResource;
2441
+ studentSubmissions: StudentSubmissionsResource;
2442
+ }
2443
+ interface AddOnAttachmentsResource {
2444
+ /** Creates an add-on attachment under a post. Requires the add-on to have permission to create new attachments on the post. This method returns the following error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the identified resources does not exist. */
2445
+ create(request: {
2446
+ /** V1 error format. */
2447
+ '$.xgafv'?: string;
2448
+ /** OAuth access token. */
2449
+ access_token?: string;
2450
+ /** Optional. Token that authorizes the request. The token is passed as a query parameter when the user is redirected from Classroom to the add-on's URL. This authorization token is required for in-Classroom attachment creation but optional for partner-first attachment creation. Returns an error if not provided for partner-first attachment creation and the developer projects that created the attachment and its parent stream item do not match. */
2451
+ addOnToken?: string;
2452
+ /** Data format for response. */
2453
+ alt?: string;
2454
+ /** JSONP */
2455
+ callback?: string;
2456
+ /** Required. Identifier of the course. */
2457
+ courseId: string;
2458
+ /** Selector specifying which fields to include in a partial response. */
2459
+ fields?: string;
2460
+ /** Identifier of the announcement, courseWork, or courseWorkMaterial under which to create the attachment. This field is required, but is not marked as such while we are migrating from post_id. */
2461
+ itemId: string;
2462
+ /** 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. */
2463
+ key?: string;
2464
+ /** OAuth 2.0 token for the current user. */
2465
+ oauth_token?: string;
2466
+ /** Optional. Deprecated, use item_id instead. */
2467
+ postId?: string;
2468
+ /** Returns response with indentations and line breaks. */
2469
+ prettyPrint?: boolean;
2470
+ /** 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. */
2471
+ quotaUser?: string;
2472
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2473
+ upload_protocol?: string;
2474
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2475
+ uploadType?: string;
2476
+ /** Request body */
2477
+ resource: AddOnAttachment;
2478
+ }): Request<AddOnAttachment>;
2479
+ create(
2480
+ request: {
2481
+ /** V1 error format. */
2482
+ '$.xgafv'?: string;
2483
+ /** OAuth access token. */
2484
+ access_token?: string;
2485
+ /** Optional. Token that authorizes the request. The token is passed as a query parameter when the user is redirected from Classroom to the add-on's URL. This authorization token is required for in-Classroom attachment creation but optional for partner-first attachment creation. Returns an error if not provided for partner-first attachment creation and the developer projects that created the attachment and its parent stream item do not match. */
2486
+ addOnToken?: string;
2487
+ /** Data format for response. */
2488
+ alt?: string;
2489
+ /** JSONP */
2490
+ callback?: string;
2491
+ /** Required. Identifier of the course. */
2492
+ courseId: string;
2493
+ /** Selector specifying which fields to include in a partial response. */
2494
+ fields?: string;
2495
+ /** Identifier of the announcement, courseWork, or courseWorkMaterial under which to create the attachment. This field is required, but is not marked as such while we are migrating from post_id. */
2496
+ itemId: string;
2497
+ /** 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. */
2498
+ key?: string;
2499
+ /** OAuth 2.0 token for the current user. */
2500
+ oauth_token?: string;
2501
+ /** Optional. Deprecated, use item_id instead. */
2502
+ postId?: string;
2503
+ /** Returns response with indentations and line breaks. */
2504
+ prettyPrint?: boolean;
2505
+ /** 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. */
2506
+ quotaUser?: string;
2507
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2508
+ upload_protocol?: string;
2509
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2510
+ uploadType?: string;
2511
+ },
2512
+ body: AddOnAttachment
2513
+ ): Request<AddOnAttachment>;
2514
+ /** Deletes an add-on attachment. Requires the add-on to have been the original creator of the attachment. This method returns the following error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the identified resources does not exist. */
2515
+ delete(request?: {
2516
+ /** V1 error format. */
2517
+ '$.xgafv'?: string;
2518
+ /** OAuth access token. */
2519
+ access_token?: string;
2520
+ /** Data format for response. */
2521
+ alt?: string;
2522
+ /** Required. Identifier of the attachment. */
2523
+ attachmentId: string;
2524
+ /** JSONP */
2525
+ callback?: string;
2526
+ /** Required. Identifier of the course. */
2527
+ courseId: string;
2528
+ /** Selector specifying which fields to include in a partial response. */
2529
+ fields?: string;
2530
+ /** Identifier of the announcement, courseWork, or courseWorkMaterial under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id. */
2531
+ itemId: string;
2532
+ /** 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. */
2533
+ key?: string;
2534
+ /** OAuth 2.0 token for the current user. */
2535
+ oauth_token?: string;
2536
+ /** Optional. Deprecated, use item_id instead. */
2537
+ postId?: string;
2538
+ /** Returns response with indentations and line breaks. */
2539
+ prettyPrint?: boolean;
2540
+ /** 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. */
2541
+ quotaUser?: string;
2542
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2543
+ upload_protocol?: string;
2544
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2545
+ uploadType?: string;
2546
+ }): Request<{}>;
2547
+ /** Returns an add-on attachment. Requires the add-on requesting the attachment to be the original creator of the attachment. This method returns the following error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the identified resources does not exist. */
2548
+ get(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
+ /** Required. Identifier of the attachment. */
2556
+ attachmentId: string;
2557
+ /** JSONP */
2558
+ callback?: string;
2559
+ /** Required. Identifier of the course. */
2560
+ courseId: string;
2561
+ /** Selector specifying which fields to include in a partial response. */
2562
+ fields?: string;
2563
+ /** Identifier of the announcement, courseWork, or courseWorkMaterial under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id. */
2564
+ itemId: string;
2565
+ /** 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. */
2566
+ key?: string;
2567
+ /** OAuth 2.0 token for the current user. */
2568
+ oauth_token?: string;
2569
+ /** Optional. Deprecated, use item_id instead. */
2570
+ postId?: string;
2571
+ /** Returns response with indentations and line breaks. */
2572
+ prettyPrint?: boolean;
2573
+ /** 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. */
2574
+ quotaUser?: string;
2575
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2576
+ upload_protocol?: string;
2577
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2578
+ uploadType?: string;
2579
+ }): Request<AddOnAttachment>;
2580
+ /** Returns all attachments created by an add-on under the post. Requires the add-on to have active attachments on the post or have permission to create new attachments on the post. This method returns the following error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the identified resources does not exist. */
2581
+ list(request?: {
1341
2582
  /** V1 error format. */
1342
2583
  '$.xgafv'?: string;
1343
2584
  /** OAuth access token. */
@@ -1346,30 +2587,69 @@ declare namespace gapi.client {
1346
2587
  alt?: string;
1347
2588
  /** JSONP */
1348
2589
  callback?: string;
1349
- /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
2590
+ /** Required. Identifier of the course. */
1350
2591
  courseId: string;
1351
- /** Identifier of the course work. */
1352
- courseWorkId: string;
1353
2592
  /** Selector specifying which fields to include in a partial response. */
1354
2593
  fields?: string;
1355
- /** Identifier of the student submission. */
1356
- id: string;
2594
+ /** Identifier of the announcement, courseWork, or courseWorkMaterial whose attachments should be enumerated. This field is required, but is not marked as such while we are migrating from post_id. */
2595
+ itemId: string;
2596
+ /** 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. */
2597
+ key?: string;
2598
+ /** OAuth 2.0 token for the current user. */
2599
+ oauth_token?: string;
2600
+ /** The maximum number of attachments to return. The service may return fewer than this value. If unspecified, at most 20 attachments will be returned. The maximum value is 20; values above 20 will be coerced to 20. */
2601
+ pageSize?: number;
2602
+ /** A page token, received from a previous `ListAddOnAttachments` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListAddOnAttachments` must match the call that provided the page token. */
2603
+ pageToken?: string;
2604
+ /** Optional. Identifier of the post under the course whose attachments to enumerate. Deprecated, use item_id instead. */
2605
+ postId?: string;
2606
+ /** Returns response with indentations and line breaks. */
2607
+ prettyPrint?: boolean;
2608
+ /** 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. */
2609
+ quotaUser?: string;
2610
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2611
+ upload_protocol?: string;
2612
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2613
+ uploadType?: string;
2614
+ }): Request<ListAddOnAttachmentsResponse>;
2615
+ /** Updates an add-on attachment. Requires the add-on to have been the original creator of the attachment. This method returns the following error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the identified resources does not exist. */
2616
+ patch(request: {
2617
+ /** V1 error format. */
2618
+ '$.xgafv'?: string;
2619
+ /** OAuth access token. */
2620
+ access_token?: string;
2621
+ /** Data format for response. */
2622
+ alt?: string;
2623
+ /** Required. Identifier of the attachment. */
2624
+ attachmentId: string;
2625
+ /** JSONP */
2626
+ callback?: string;
2627
+ /** Required. Identifier of the course. */
2628
+ courseId: string;
2629
+ /** Selector specifying which fields to include in a partial response. */
2630
+ fields?: string;
2631
+ /** Identifier of the post under which the attachment is attached. */
2632
+ itemId: string;
1357
2633
  /** 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. */
1358
2634
  key?: string;
1359
2635
  /** OAuth 2.0 token for the current user. */
1360
2636
  oauth_token?: string;
2637
+ /** Required. Identifier of the post under which the attachment is attached. */
2638
+ postId?: string;
1361
2639
  /** Returns response with indentations and line breaks. */
1362
2640
  prettyPrint?: boolean;
1363
2641
  /** 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. */
1364
2642
  quotaUser?: string;
2643
+ /** Required. Mask that identifies which fields on the attachment to update. The update fails if invalid fields are specified. If a field supports empty values, it can be cleared by specifying it in the update mask and not in the `AddOnAttachment` object. If a field that does not support empty values is included in the update mask and not set in the `AddOnAttachment` object, an `INVALID_ARGUMENT` error is returned. The following fields may be specified by teachers: * `title` * `teacher_view_uri` * `student_view_uri` * `student_work_review_uri` * `due_date` * `due_time` * `max_points` */
2644
+ updateMask?: string;
1365
2645
  /** Upload protocol for media (e.g. "raw", "multipart"). */
1366
2646
  upload_protocol?: string;
1367
2647
  /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1368
2648
  uploadType?: string;
1369
2649
  /** Request body */
1370
- resource: TurnInStudentSubmissionRequest;
1371
- }): Request<{}>;
1372
- turnIn(
2650
+ resource: AddOnAttachment;
2651
+ }): Request<AddOnAttachment>;
2652
+ patch(
1373
2653
  request: {
1374
2654
  /** V1 error format. */
1375
2655
  '$.xgafv'?: string;
@@ -1377,34 +2657,38 @@ declare namespace gapi.client {
1377
2657
  access_token?: string;
1378
2658
  /** Data format for response. */
1379
2659
  alt?: string;
2660
+ /** Required. Identifier of the attachment. */
2661
+ attachmentId: string;
1380
2662
  /** JSONP */
1381
2663
  callback?: string;
1382
- /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
2664
+ /** Required. Identifier of the course. */
1383
2665
  courseId: string;
1384
- /** Identifier of the course work. */
1385
- courseWorkId: string;
1386
2666
  /** Selector specifying which fields to include in a partial response. */
1387
2667
  fields?: string;
1388
- /** Identifier of the student submission. */
1389
- id: string;
2668
+ /** Identifier of the post under which the attachment is attached. */
2669
+ itemId: string;
1390
2670
  /** 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. */
1391
2671
  key?: string;
1392
2672
  /** OAuth 2.0 token for the current user. */
1393
2673
  oauth_token?: string;
2674
+ /** Required. Identifier of the post under which the attachment is attached. */
2675
+ postId?: string;
1394
2676
  /** Returns response with indentations and line breaks. */
1395
2677
  prettyPrint?: boolean;
1396
2678
  /** 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. */
1397
2679
  quotaUser?: string;
2680
+ /** Required. Mask that identifies which fields on the attachment to update. The update fails if invalid fields are specified. If a field supports empty values, it can be cleared by specifying it in the update mask and not in the `AddOnAttachment` object. If a field that does not support empty values is included in the update mask and not set in the `AddOnAttachment` object, an `INVALID_ARGUMENT` error is returned. The following fields may be specified by teachers: * `title` * `teacher_view_uri` * `student_view_uri` * `student_work_review_uri` * `due_date` * `due_time` * `max_points` */
2681
+ updateMask?: string;
1398
2682
  /** Upload protocol for media (e.g. "raw", "multipart"). */
1399
2683
  upload_protocol?: string;
1400
2684
  /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1401
2685
  uploadType?: string;
1402
2686
  },
1403
- body: TurnInStudentSubmissionRequest
1404
- ): Request<{}>;
2687
+ body: AddOnAttachment
2688
+ ): Request<AddOnAttachment>;
1405
2689
  }
1406
- interface CourseWorkResource {
1407
- /** Creates course work. The resulting course work (and corresponding student submissions) are associated with the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to make the request. Classroom API requests to modify course work and student submissions must be made with an OAuth client ID from the associated Developer Console project. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course, create course work in the requested course, share a Drive attachment, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course does not exist. * `FAILED_PRECONDITION` for the following request error: * AttachmentNotVisible */
2690
+ interface CourseWorkMaterialsResource {
2691
+ /** 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 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 provided. * `NOT_FOUND` if the requested course does not exist. * `FAILED_PRECONDITION` for the following request error: * AttachmentNotVisible */
1408
2692
  create(request: {
1409
2693
  /** V1 error format. */
1410
2694
  '$.xgafv'?: string;
@@ -1431,8 +2715,8 @@ declare namespace gapi.client {
1431
2715
  /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1432
2716
  uploadType?: string;
1433
2717
  /** Request body */
1434
- resource: CourseWork;
1435
- }): Request<CourseWork>;
2718
+ resource: CourseWorkMaterial;
2719
+ }): Request<CourseWorkMaterial>;
1436
2720
  create(
1437
2721
  request: {
1438
2722
  /** V1 error format. */
@@ -1460,9 +2744,9 @@ declare namespace gapi.client {
1460
2744
  /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1461
2745
  uploadType?: string;
1462
2746
  },
1463
- body: CourseWork
1464
- ): Request<CourseWork>;
1465
- /** Deletes a course work. This request must be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the corresponding course work item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting developer project did not create the corresponding course work, if the requesting user is not permitted to delete the requested course or for access errors. * `FAILED_PRECONDITION` if the requested course work has already been deleted. * `NOT_FOUND` if no course exists with the requested ID. */
2747
+ body: CourseWorkMaterial
2748
+ ): Request<CourseWorkMaterial>;
2749
+ /** 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 the corresponding course work material item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting developer project did not create the 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 material has already been deleted. * `NOT_FOUND` if no course exists with the requested ID. */
1466
2750
  delete(request?: {
1467
2751
  /** V1 error format. */
1468
2752
  '$.xgafv'?: string;
@@ -1476,7 +2760,7 @@ declare namespace gapi.client {
1476
2760
  courseId: string;
1477
2761
  /** Selector specifying which fields to include in a partial response. */
1478
2762
  fields?: string;
1479
- /** Identifier of the course work to delete. This identifier is a Classroom-assigned identifier. */
2763
+ /** Identifier of the course work material to delete. This identifier is a Classroom-assigned identifier. */
1480
2764
  id: string;
1481
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. */
1482
2766
  key?: string;
@@ -1491,7 +2775,7 @@ declare namespace gapi.client {
1491
2775
  /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1492
2776
  uploadType?: string;
1493
2777
  }): Request<{}>;
1494
- /** Returns course work. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course or course work does not exist. */
2778
+ /** 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 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. */
1495
2779
  get(request?: {
1496
2780
  /** V1 error format. */
1497
2781
  '$.xgafv'?: string;
@@ -1505,7 +2789,7 @@ declare namespace gapi.client {
1505
2789
  courseId: string;
1506
2790
  /** Selector specifying which fields to include in a partial response. */
1507
2791
  fields?: string;
1508
- /** Identifier of the course work. */
2792
+ /** Identifier of the course work material. */
1509
2793
  id: string;
1510
2794
  /** 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. */
1511
2795
  key?: string;
@@ -1519,8 +2803,43 @@ declare namespace gapi.client {
1519
2803
  upload_protocol?: string;
1520
2804
  /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1521
2805
  uploadType?: string;
1522
- }): Request<CourseWork>;
1523
- /** Returns a list of course work that the requester is permitted to view. Course students may only view `PUBLISHED` course work. Course teachers and domain administrators may view all course work. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course does not exist. */
2806
+ }): Request<CourseWorkMaterial>;
2807
+ /** Gets metadata for Classroom add-ons in the context of a specific post. To maintain the integrity of its own data and permissions model, an add-on should call this to validate query parameters and the requesting user's role whenever the add-on is opened in an [iframe](https://developers.google.com/classroom/add-ons/get-started/iframes/iframes-overview). This method returns the following error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the identified resources does not exist. */
2808
+ getAddOnContext(request?: {
2809
+ /** V1 error format. */
2810
+ '$.xgafv'?: string;
2811
+ /** OAuth access token. */
2812
+ access_token?: string;
2813
+ /** Optional. Token that authorizes the request. The token is passed as a query parameter when the user is redirected from Classroom to the add-on's URL. The authorization token is required when neither of the following is true: * The add-on has attachments on the post. * The developer project issuing the request is the same project that created the post. */
2814
+ addOnToken?: string;
2815
+ /** Data format for response. */
2816
+ alt?: string;
2817
+ /** Optional. The identifier of the attachment. This field is required for student users and optional for teacher users. If not provided in the student case, an error is returned. */
2818
+ attachmentId?: string;
2819
+ /** JSONP */
2820
+ callback?: string;
2821
+ /** Required. Identifier of the course. */
2822
+ courseId: string;
2823
+ /** Selector specifying which fields to include in a partial response. */
2824
+ fields?: string;
2825
+ /** Identifier of the announcement, courseWork, or courseWorkMaterial under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id. */
2826
+ itemId: string;
2827
+ /** 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. */
2828
+ key?: string;
2829
+ /** OAuth 2.0 token for the current user. */
2830
+ oauth_token?: string;
2831
+ /** Optional. Deprecated, use item_id instead. */
2832
+ postId?: string;
2833
+ /** Returns response with indentations and line breaks. */
2834
+ prettyPrint?: boolean;
2835
+ /** 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. */
2836
+ quotaUser?: string;
2837
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2838
+ upload_protocol?: string;
2839
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2840
+ uploadType?: string;
2841
+ }): Request<AddOnContext>;
2842
+ /** 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 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 requested course or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course does not exist. */
1524
2843
  list(request?: {
1525
2844
  /** V1 error format. */
1526
2845
  '$.xgafv'?: string;
@@ -1532,15 +2851,19 @@ declare namespace gapi.client {
1532
2851
  callback?: string;
1533
2852
  /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
1534
2853
  courseId: string;
1535
- /** Restriction on the work status to return. Only courseWork that matches is returned. If unspecified, items with a work status of `PUBLISHED` is returned. */
1536
- courseWorkStates?: string | string[];
2854
+ /** 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. */
2855
+ courseWorkMaterialStates?: string | string[];
1537
2856
  /** Selector specifying which fields to include in a partial response. */
1538
2857
  fields?: string;
1539
2858
  /** 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. */
1540
2859
  key?: string;
2860
+ /** 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 must have materials matching both filters. */
2861
+ materialDriveId?: string;
2862
+ /** Optional filtering for course work material with at least one link material whose URL partially matches the provided string. */
2863
+ materialLink?: string;
1541
2864
  /** OAuth 2.0 token for the current user. */
1542
2865
  oauth_token?: string;
1543
- /** Optional sort ordering for results. A comma-separated list of fields with an optional sort direction keyword. Supported fields are `updateTime` and `dueDate`. Supported direction keywords are `asc` and `desc`. If not specified, `updateTime desc` is the default behavior. Examples: `dueDate asc,updateTime desc`, `updateTime,dueDate desc` */
2866
+ /** 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 `asc` and `desc`. If not specified, `updateTime desc` is the default behavior. Examples: `updateTime asc`, `updateTime` */
1544
2867
  orderBy?: string;
1545
2868
  /** 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. */
1546
2869
  pageSize?: number;
@@ -1554,9 +2877,9 @@ declare namespace gapi.client {
1554
2877
  upload_protocol?: string;
1555
2878
  /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1556
2879
  uploadType?: string;
1557
- }): Request<ListCourseWorkResponse>;
1558
- /** 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: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course or course work does not exist. */
1559
- modifyAssignees(request: {
2880
+ }): Request<ListCourseWorkMaterialResponse>;
2881
+ /** 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. * `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 course work material does not exist */
2882
+ patch(request: {
1560
2883
  /** V1 error format. */
1561
2884
  '$.xgafv'?: string;
1562
2885
  /** OAuth access token. */
@@ -1569,7 +2892,7 @@ declare namespace gapi.client {
1569
2892
  courseId: string;
1570
2893
  /** Selector specifying which fields to include in a partial response. */
1571
2894
  fields?: string;
1572
- /** Identifier of the coursework. */
2895
+ /** Identifier of the course work material. */
1573
2896
  id: string;
1574
2897
  /** 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. */
1575
2898
  key?: string;
@@ -1579,14 +2902,16 @@ declare namespace gapi.client {
1579
2902
  prettyPrint?: boolean;
1580
2903
  /** 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. */
1581
2904
  quotaUser?: string;
2905
+ /** 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 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 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` * `description` * `state` * `scheduled_time` * `topic_id` */
2906
+ updateMask?: string;
1582
2907
  /** Upload protocol for media (e.g. "raw", "multipart"). */
1583
2908
  upload_protocol?: string;
1584
2909
  /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1585
2910
  uploadType?: string;
1586
2911
  /** Request body */
1587
- resource: ModifyCourseWorkAssigneesRequest;
1588
- }): Request<CourseWork>;
1589
- modifyAssignees(
2912
+ resource: CourseWorkMaterial;
2913
+ }): Request<CourseWorkMaterial>;
2914
+ patch(
1590
2915
  request: {
1591
2916
  /** V1 error format. */
1592
2917
  '$.xgafv'?: string;
@@ -1600,7 +2925,7 @@ declare namespace gapi.client {
1600
2925
  courseId: string;
1601
2926
  /** Selector specifying which fields to include in a partial response. */
1602
2927
  fields?: string;
1603
- /** Identifier of the coursework. */
2928
+ /** Identifier of the course work material. */
1604
2929
  id: string;
1605
2930
  /** 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. */
1606
2931
  key?: string;
@@ -1610,14 +2935,54 @@ declare namespace gapi.client {
1610
2935
  prettyPrint?: boolean;
1611
2936
  /** 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. */
1612
2937
  quotaUser?: string;
2938
+ /** 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 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 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` * `description` * `state` * `scheduled_time` * `topic_id` */
2939
+ updateMask?: string;
1613
2940
  /** Upload protocol for media (e.g. "raw", "multipart"). */
1614
2941
  upload_protocol?: string;
1615
2942
  /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1616
2943
  uploadType?: string;
1617
2944
  },
1618
- body: ModifyCourseWorkAssigneesRequest
1619
- ): Request<CourseWork>;
1620
- /** Updates one or more fields of a course work. See google.classroom.v1.CourseWork for details of which fields may be updated and who may change them. This request must be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the corresponding course work item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting developer project did not create the corresponding course work, if the user is not permitted to make the requested modification to the student submission, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `FAILED_PRECONDITION` if the requested course work has already been deleted. * `NOT_FOUND` if the requested course, course work, or student submission does not exist. */
2945
+ body: CourseWorkMaterial
2946
+ ): Request<CourseWorkMaterial>;
2947
+ addOnAttachments: AddOnAttachmentsResource;
2948
+ }
2949
+ interface StudentSubmissionsResource {
2950
+ /** Returns a student submission for an add-on attachment. This method returns the following error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the identified resources does not exist. */
2951
+ get(request?: {
2952
+ /** V1 error format. */
2953
+ '$.xgafv'?: string;
2954
+ /** OAuth access token. */
2955
+ access_token?: string;
2956
+ /** Data format for response. */
2957
+ alt?: string;
2958
+ /** Required. Identifier of the attachment. */
2959
+ attachmentId: string;
2960
+ /** JSONP */
2961
+ callback?: string;
2962
+ /** Required. Identifier of the course. */
2963
+ courseId: string;
2964
+ /** Selector specifying which fields to include in a partial response. */
2965
+ fields?: string;
2966
+ /** Identifier of the announcement, courseWork, or courseWorkMaterial under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id. */
2967
+ itemId?: string;
2968
+ /** 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. */
2969
+ key?: string;
2970
+ /** OAuth 2.0 token for the current user. */
2971
+ oauth_token?: string;
2972
+ /** Optional. Deprecated, use item_id instead. */
2973
+ postId: string;
2974
+ /** Returns response with indentations and line breaks. */
2975
+ prettyPrint?: boolean;
2976
+ /** 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. */
2977
+ quotaUser?: string;
2978
+ /** Required. Identifier of the student’s submission. */
2979
+ submissionId: string;
2980
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2981
+ upload_protocol?: string;
2982
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2983
+ uploadType?: string;
2984
+ }): Request<AddOnAttachmentStudentSubmission>;
2985
+ /** Updates data associated with an add-on attachment submission. Requires the add-on to have been the original creator of the attachment and the attachment to have a positive `max_points` value set. This method returns the following error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the identified resources does not exist. */
1621
2986
  patch(request: {
1622
2987
  /** V1 error format. */
1623
2988
  '$.xgafv'?: string;
@@ -1625,31 +2990,37 @@ declare namespace gapi.client {
1625
2990
  access_token?: string;
1626
2991
  /** Data format for response. */
1627
2992
  alt?: string;
2993
+ /** Required. Identifier of the attachment. */
2994
+ attachmentId: string;
1628
2995
  /** JSONP */
1629
2996
  callback?: string;
1630
- /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
2997
+ /** Required. Identifier of the course. */
1631
2998
  courseId: string;
1632
2999
  /** Selector specifying which fields to include in a partial response. */
1633
3000
  fields?: string;
1634
- /** Identifier of the course work. */
1635
- id: string;
3001
+ /** Identifier of the announcement, courseWork, or courseWorkMaterial under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id. */
3002
+ itemId?: string;
1636
3003
  /** 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
3004
  key?: string;
1638
3005
  /** OAuth 2.0 token for the current user. */
1639
3006
  oauth_token?: string;
3007
+ /** Optional. Deprecated, use item_id instead. */
3008
+ postId: string;
1640
3009
  /** Returns response with indentations and line breaks. */
1641
3010
  prettyPrint?: boolean;
1642
3011
  /** 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
3012
  quotaUser?: string;
1644
- /** Mask that identifies which fields on the course work to update. This field is required to do an update. The update fails if invalid fields are specified. If a field supports empty values, it can be cleared by specifying it in the update mask and not in the `CourseWork` object. If a field that does not support empty values is included in the update mask and not set in the `CourseWork` object, an `INVALID_ARGUMENT` error is returned. The following fields may be specified by teachers: * `title` * `description` * `state` * `due_date` * `due_time` * `max_points` * `scheduled_time` * `submission_modification_mode` * `topic_id` */
3013
+ /** Required. Identifier of the student's submission. */
3014
+ submissionId: string;
3015
+ /** Required. Mask that identifies which fields on the attachment to update. The update fails if invalid fields are specified. If a field supports empty values, it can be cleared by specifying it in the update mask and not in the `AddOnAttachmentStudentSubmission` object. The following fields may be specified by teachers: * `points_earned` */
1645
3016
  updateMask?: string;
1646
3017
  /** Upload protocol for media (e.g. "raw", "multipart"). */
1647
3018
  upload_protocol?: string;
1648
3019
  /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1649
3020
  uploadType?: string;
1650
3021
  /** Request body */
1651
- resource: CourseWork;
1652
- }): Request<CourseWork>;
3022
+ resource: AddOnAttachmentStudentSubmission;
3023
+ }): Request<AddOnAttachmentStudentSubmission>;
1653
3024
  patch(
1654
3025
  request: {
1655
3026
  /** V1 error format. */
@@ -1658,52 +3029,63 @@ declare namespace gapi.client {
1658
3029
  access_token?: string;
1659
3030
  /** Data format for response. */
1660
3031
  alt?: string;
3032
+ /** Required. Identifier of the attachment. */
3033
+ attachmentId: string;
1661
3034
  /** JSONP */
1662
3035
  callback?: string;
1663
- /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
3036
+ /** Required. Identifier of the course. */
1664
3037
  courseId: string;
1665
3038
  /** Selector specifying which fields to include in a partial response. */
1666
3039
  fields?: string;
1667
- /** Identifier of the course work. */
1668
- id: string;
3040
+ /** Identifier of the announcement, courseWork, or courseWorkMaterial under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id. */
3041
+ itemId?: string;
1669
3042
  /** 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. */
1670
3043
  key?: string;
1671
3044
  /** OAuth 2.0 token for the current user. */
1672
3045
  oauth_token?: string;
3046
+ /** Optional. Deprecated, use item_id instead. */
3047
+ postId: string;
1673
3048
  /** Returns response with indentations and line breaks. */
1674
3049
  prettyPrint?: boolean;
1675
3050
  /** 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. */
1676
3051
  quotaUser?: string;
1677
- /** Mask that identifies which fields on the course work to update. This field is required to do an update. The update fails if invalid fields are specified. If a field supports empty values, it can be cleared by specifying it in the update mask and not in the `CourseWork` object. If a field that does not support empty values is included in the update mask and not set in the `CourseWork` object, an `INVALID_ARGUMENT` error is returned. The following fields may be specified by teachers: * `title` * `description` * `state` * `due_date` * `due_time` * `max_points` * `scheduled_time` * `submission_modification_mode` * `topic_id` */
3052
+ /** Required. Identifier of the student's submission. */
3053
+ submissionId: string;
3054
+ /** Required. Mask that identifies which fields on the attachment to update. The update fails if invalid fields are specified. If a field supports empty values, it can be cleared by specifying it in the update mask and not in the `AddOnAttachmentStudentSubmission` object. The following fields may be specified by teachers: * `points_earned` */
1678
3055
  updateMask?: string;
1679
3056
  /** Upload protocol for media (e.g. "raw", "multipart"). */
1680
3057
  upload_protocol?: string;
1681
3058
  /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1682
3059
  uploadType?: string;
1683
3060
  },
1684
- body: CourseWork
1685
- ): Request<CourseWork>;
1686
- studentSubmissions: StudentSubmissionsResource;
3061
+ body: AddOnAttachmentStudentSubmission
3062
+ ): Request<AddOnAttachmentStudentSubmission>;
1687
3063
  }
1688
- interface CourseWorkMaterialsResource {
1689
- /** 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 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 provided. * `NOT_FOUND` if the requested course does not exist. * `FAILED_PRECONDITION` for the following request error: * AttachmentNotVisible */
3064
+ interface AddOnAttachmentsResource {
3065
+ /** Creates an add-on attachment under a post. Requires the add-on to have permission to create new attachments on the post. This method returns the following error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the identified resources does not exist. */
1690
3066
  create(request: {
1691
3067
  /** V1 error format. */
1692
3068
  '$.xgafv'?: string;
1693
3069
  /** OAuth access token. */
1694
3070
  access_token?: string;
3071
+ /** Optional. Token that authorizes the request. The token is passed as a query parameter when the user is redirected from Classroom to the add-on's URL. This authorization token is required for in-Classroom attachment creation but optional for partner-first attachment creation. Returns an error if not provided for partner-first attachment creation and the developer projects that created the attachment and its parent stream item do not match. */
3072
+ addOnToken?: string;
1695
3073
  /** Data format for response. */
1696
3074
  alt?: string;
1697
3075
  /** JSONP */
1698
3076
  callback?: string;
1699
- /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
3077
+ /** Required. Identifier of the course. */
1700
3078
  courseId: string;
1701
3079
  /** Selector specifying which fields to include in a partial response. */
1702
3080
  fields?: string;
3081
+ /** Identifier of the announcement, courseWork, or courseWorkMaterial under which to create the attachment. This field is required, but is not marked as such while we are migrating from post_id. */
3082
+ itemId?: string;
1703
3083
  /** 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. */
1704
3084
  key?: string;
1705
3085
  /** OAuth 2.0 token for the current user. */
1706
3086
  oauth_token?: string;
3087
+ /** Optional. Deprecated, use item_id instead. */
3088
+ postId: string;
1707
3089
  /** Returns response with indentations and line breaks. */
1708
3090
  prettyPrint?: boolean;
1709
3091
  /** 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. */
@@ -1713,26 +3095,32 @@ declare namespace gapi.client {
1713
3095
  /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1714
3096
  uploadType?: string;
1715
3097
  /** Request body */
1716
- resource: CourseWorkMaterial;
1717
- }): Request<CourseWorkMaterial>;
3098
+ resource: AddOnAttachment;
3099
+ }): Request<AddOnAttachment>;
1718
3100
  create(
1719
3101
  request: {
1720
3102
  /** V1 error format. */
1721
3103
  '$.xgafv'?: string;
1722
3104
  /** OAuth access token. */
1723
3105
  access_token?: string;
3106
+ /** Optional. Token that authorizes the request. The token is passed as a query parameter when the user is redirected from Classroom to the add-on's URL. This authorization token is required for in-Classroom attachment creation but optional for partner-first attachment creation. Returns an error if not provided for partner-first attachment creation and the developer projects that created the attachment and its parent stream item do not match. */
3107
+ addOnToken?: string;
1724
3108
  /** Data format for response. */
1725
3109
  alt?: string;
1726
3110
  /** JSONP */
1727
3111
  callback?: string;
1728
- /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
3112
+ /** Required. Identifier of the course. */
1729
3113
  courseId: string;
1730
3114
  /** Selector specifying which fields to include in a partial response. */
1731
3115
  fields?: string;
3116
+ /** Identifier of the announcement, courseWork, or courseWorkMaterial under which to create the attachment. This field is required, but is not marked as such while we are migrating from post_id. */
3117
+ itemId?: string;
1732
3118
  /** 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. */
1733
3119
  key?: string;
1734
3120
  /** OAuth 2.0 token for the current user. */
1735
3121
  oauth_token?: string;
3122
+ /** Optional. Deprecated, use item_id instead. */
3123
+ postId: string;
1736
3124
  /** Returns response with indentations and line breaks. */
1737
3125
  prettyPrint?: boolean;
1738
3126
  /** 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. */
@@ -1742,9 +3130,9 @@ declare namespace gapi.client {
1742
3130
  /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1743
3131
  uploadType?: string;
1744
3132
  },
1745
- body: CourseWorkMaterial
1746
- ): Request<CourseWorkMaterial>;
1747
- /** 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 the corresponding course work material item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting developer project did not create the 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 material has already been deleted. * `NOT_FOUND` if no course exists with the requested ID. */
3133
+ body: AddOnAttachment
3134
+ ): Request<AddOnAttachment>;
3135
+ /** Deletes an add-on attachment. Requires the add-on to have been the original creator of the attachment. This method returns the following error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the identified resources does not exist. */
1748
3136
  delete(request?: {
1749
3137
  /** V1 error format. */
1750
3138
  '$.xgafv'?: string;
@@ -1752,18 +3140,22 @@ declare namespace gapi.client {
1752
3140
  access_token?: string;
1753
3141
  /** Data format for response. */
1754
3142
  alt?: string;
3143
+ /** Required. Identifier of the attachment. */
3144
+ attachmentId: string;
1755
3145
  /** JSONP */
1756
3146
  callback?: string;
1757
- /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
3147
+ /** Required. Identifier of the course. */
1758
3148
  courseId: string;
1759
3149
  /** Selector specifying which fields to include in a partial response. */
1760
3150
  fields?: string;
1761
- /** Identifier of the course work material to delete. This identifier is a Classroom-assigned identifier. */
1762
- id: string;
3151
+ /** Identifier of the announcement, courseWork, or courseWorkMaterial under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id. */
3152
+ itemId?: string;
1763
3153
  /** 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. */
1764
3154
  key?: string;
1765
3155
  /** OAuth 2.0 token for the current user. */
1766
3156
  oauth_token?: string;
3157
+ /** Optional. Deprecated, use item_id instead. */
3158
+ postId: string;
1767
3159
  /** Returns response with indentations and line breaks. */
1768
3160
  prettyPrint?: boolean;
1769
3161
  /** 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. */
@@ -1773,7 +3165,7 @@ declare namespace gapi.client {
1773
3165
  /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1774
3166
  uploadType?: string;
1775
3167
  }): Request<{}>;
1776
- /** 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 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. */
3168
+ /** Returns an add-on attachment. Requires the add-on requesting the attachment to be the original creator of the attachment. This method returns the following error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the identified resources does not exist. */
1777
3169
  get(request?: {
1778
3170
  /** V1 error format. */
1779
3171
  '$.xgafv'?: string;
@@ -1781,18 +3173,22 @@ declare namespace gapi.client {
1781
3173
  access_token?: string;
1782
3174
  /** Data format for response. */
1783
3175
  alt?: string;
3176
+ /** Required. Identifier of the attachment. */
3177
+ attachmentId: string;
1784
3178
  /** JSONP */
1785
3179
  callback?: string;
1786
- /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
3180
+ /** Required. Identifier of the course. */
1787
3181
  courseId: string;
1788
3182
  /** Selector specifying which fields to include in a partial response. */
1789
3183
  fields?: string;
1790
- /** Identifier of the course work material. */
1791
- id: string;
3184
+ /** Identifier of the announcement, courseWork, or courseWorkMaterial under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id. */
3185
+ itemId?: string;
1792
3186
  /** 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. */
1793
3187
  key?: string;
1794
3188
  /** OAuth 2.0 token for the current user. */
1795
3189
  oauth_token?: string;
3190
+ /** Optional. Deprecated, use item_id instead. */
3191
+ postId: string;
1796
3192
  /** Returns response with indentations and line breaks. */
1797
3193
  prettyPrint?: boolean;
1798
3194
  /** 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. */
@@ -1801,8 +3197,8 @@ declare namespace gapi.client {
1801
3197
  upload_protocol?: string;
1802
3198
  /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1803
3199
  uploadType?: string;
1804
- }): Request<CourseWorkMaterial>;
1805
- /** 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 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 requested course or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course does not exist. */
3200
+ }): Request<AddOnAttachment>;
3201
+ /** Returns all attachments created by an add-on under the post. Requires the add-on to have active attachments on the post or have permission to create new attachments on the post. This method returns the following error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the identified resources does not exist. */
1806
3202
  list(request?: {
1807
3203
  /** V1 error format. */
1808
3204
  '$.xgafv'?: string;
@@ -1812,26 +3208,22 @@ declare namespace gapi.client {
1812
3208
  alt?: string;
1813
3209
  /** JSONP */
1814
3210
  callback?: string;
1815
- /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
3211
+ /** Required. Identifier of the course. */
1816
3212
  courseId: string;
1817
- /** 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. */
1818
- courseWorkMaterialStates?: string | string[];
1819
3213
  /** Selector specifying which fields to include in a partial response. */
1820
3214
  fields?: string;
3215
+ /** Identifier of the announcement, courseWork, or courseWorkMaterial whose attachments should be enumerated. This field is required, but is not marked as such while we are migrating from post_id. */
3216
+ itemId?: string;
1821
3217
  /** 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. */
1822
3218
  key?: string;
1823
- /** 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 must have materials matching both filters. */
1824
- materialDriveId?: string;
1825
- /** Optional filtering for course work material with at least one link material whose URL partially matches the provided string. */
1826
- materialLink?: string;
1827
3219
  /** OAuth 2.0 token for the current user. */
1828
3220
  oauth_token?: string;
1829
- /** 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 `asc` and `desc`. If not specified, `updateTime desc` is the default behavior. Examples: `updateTime asc`, `updateTime` */
1830
- orderBy?: string;
1831
- /** 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. */
3221
+ /** The maximum number of attachments to return. The service may return fewer than this value. If unspecified, at most 20 attachments will be returned. The maximum value is 20; values above 20 will be coerced to 20. */
1832
3222
  pageSize?: number;
1833
- /** nextPageToken value returned from a previous list call, indicating that the subsequent page of results should be returned. The list request must be otherwise identical to the one that resulted in this token. */
3223
+ /** A page token, received from a previous `ListAddOnAttachments` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListAddOnAttachments` must match the call that provided the page token. */
1834
3224
  pageToken?: string;
3225
+ /** Optional. Identifier of the post under the course whose attachments to enumerate. Deprecated, use item_id instead. */
3226
+ postId: string;
1835
3227
  /** Returns response with indentations and line breaks. */
1836
3228
  prettyPrint?: boolean;
1837
3229
  /** 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. */
@@ -1840,8 +3232,8 @@ declare namespace gapi.client {
1840
3232
  upload_protocol?: string;
1841
3233
  /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1842
3234
  uploadType?: string;
1843
- }): Request<ListCourseWorkMaterialResponse>;
1844
- /** 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. * `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 course work material does not exist */
3235
+ }): Request<ListAddOnAttachmentsResponse>;
3236
+ /** Updates an add-on attachment. Requires the add-on to have been the original creator of the attachment. This method returns the following error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the identified resources does not exist. */
1845
3237
  patch(request: {
1846
3238
  /** V1 error format. */
1847
3239
  '$.xgafv'?: string;
@@ -1849,31 +3241,35 @@ declare namespace gapi.client {
1849
3241
  access_token?: string;
1850
3242
  /** Data format for response. */
1851
3243
  alt?: string;
3244
+ /** Required. Identifier of the attachment. */
3245
+ attachmentId: string;
1852
3246
  /** JSONP */
1853
3247
  callback?: string;
1854
- /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
3248
+ /** Required. Identifier of the course. */
1855
3249
  courseId: string;
1856
3250
  /** Selector specifying which fields to include in a partial response. */
1857
3251
  fields?: string;
1858
- /** Identifier of the course work material. */
1859
- id: string;
3252
+ /** Identifier of the post under which the attachment is attached. */
3253
+ itemId?: string;
1860
3254
  /** 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. */
1861
3255
  key?: string;
1862
3256
  /** OAuth 2.0 token for the current user. */
1863
3257
  oauth_token?: string;
3258
+ /** Required. Identifier of the post under which the attachment is attached. */
3259
+ postId: string;
1864
3260
  /** Returns response with indentations and line breaks. */
1865
3261
  prettyPrint?: boolean;
1866
3262
  /** 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. */
1867
3263
  quotaUser?: string;
1868
- /** 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 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 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` * `description` * `state` * `scheduled_time` * `topic_id` */
3264
+ /** Required. Mask that identifies which fields on the attachment to update. The update fails if invalid fields are specified. If a field supports empty values, it can be cleared by specifying it in the update mask and not in the `AddOnAttachment` object. If a field that does not support empty values is included in the update mask and not set in the `AddOnAttachment` object, an `INVALID_ARGUMENT` error is returned. The following fields may be specified by teachers: * `title` * `teacher_view_uri` * `student_view_uri` * `student_work_review_uri` * `due_date` * `due_time` * `max_points` */
1869
3265
  updateMask?: string;
1870
3266
  /** Upload protocol for media (e.g. "raw", "multipart"). */
1871
3267
  upload_protocol?: string;
1872
3268
  /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1873
3269
  uploadType?: string;
1874
3270
  /** Request body */
1875
- resource: CourseWorkMaterial;
1876
- }): Request<CourseWorkMaterial>;
3271
+ resource: AddOnAttachment;
3272
+ }): Request<AddOnAttachment>;
1877
3273
  patch(
1878
3274
  request: {
1879
3275
  /** V1 error format. */
@@ -1882,31 +3278,74 @@ declare namespace gapi.client {
1882
3278
  access_token?: string;
1883
3279
  /** Data format for response. */
1884
3280
  alt?: string;
3281
+ /** Required. Identifier of the attachment. */
3282
+ attachmentId: string;
1885
3283
  /** JSONP */
1886
3284
  callback?: string;
1887
- /** Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. */
3285
+ /** Required. Identifier of the course. */
1888
3286
  courseId: string;
1889
3287
  /** Selector specifying which fields to include in a partial response. */
1890
3288
  fields?: string;
1891
- /** Identifier of the course work material. */
1892
- id: string;
3289
+ /** Identifier of the post under which the attachment is attached. */
3290
+ itemId?: string;
1893
3291
  /** 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. */
1894
3292
  key?: string;
1895
3293
  /** OAuth 2.0 token for the current user. */
1896
3294
  oauth_token?: string;
3295
+ /** Required. Identifier of the post under which the attachment is attached. */
3296
+ postId: string;
1897
3297
  /** Returns response with indentations and line breaks. */
1898
3298
  prettyPrint?: boolean;
1899
3299
  /** 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. */
1900
3300
  quotaUser?: string;
1901
- /** 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 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 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` * `description` * `state` * `scheduled_time` * `topic_id` */
3301
+ /** Required. Mask that identifies which fields on the attachment to update. The update fails if invalid fields are specified. If a field supports empty values, it can be cleared by specifying it in the update mask and not in the `AddOnAttachment` object. If a field that does not support empty values is included in the update mask and not set in the `AddOnAttachment` object, an `INVALID_ARGUMENT` error is returned. The following fields may be specified by teachers: * `title` * `teacher_view_uri` * `student_view_uri` * `student_work_review_uri` * `due_date` * `due_time` * `max_points` */
1902
3302
  updateMask?: string;
1903
3303
  /** Upload protocol for media (e.g. "raw", "multipart"). */
1904
3304
  upload_protocol?: string;
1905
3305
  /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1906
3306
  uploadType?: string;
1907
3307
  },
1908
- body: CourseWorkMaterial
1909
- ): Request<CourseWorkMaterial>;
3308
+ body: AddOnAttachment
3309
+ ): Request<AddOnAttachment>;
3310
+ studentSubmissions: StudentSubmissionsResource;
3311
+ }
3312
+ interface PostsResource {
3313
+ /** Gets metadata for Classroom add-ons in the context of a specific post. To maintain the integrity of its own data and permissions model, an add-on should call this to validate query parameters and the requesting user's role whenever the add-on is opened in an [iframe](https://developers.google.com/classroom/add-ons/get-started/iframes/iframes-overview). This method returns the following error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the identified resources does not exist. */
3314
+ getAddOnContext(request?: {
3315
+ /** V1 error format. */
3316
+ '$.xgafv'?: string;
3317
+ /** OAuth access token. */
3318
+ access_token?: string;
3319
+ /** Optional. Token that authorizes the request. The token is passed as a query parameter when the user is redirected from Classroom to the add-on's URL. The authorization token is required when neither of the following is true: * The add-on has attachments on the post. * The developer project issuing the request is the same project that created the post. */
3320
+ addOnToken?: string;
3321
+ /** Data format for response. */
3322
+ alt?: string;
3323
+ /** Optional. The identifier of the attachment. This field is required for student users and optional for teacher users. If not provided in the student case, an error is returned. */
3324
+ attachmentId?: string;
3325
+ /** JSONP */
3326
+ callback?: string;
3327
+ /** Required. Identifier of the course. */
3328
+ courseId: string;
3329
+ /** Selector specifying which fields to include in a partial response. */
3330
+ fields?: string;
3331
+ /** Identifier of the announcement, courseWork, or courseWorkMaterial under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id. */
3332
+ itemId?: string;
3333
+ /** 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. */
3334
+ key?: string;
3335
+ /** OAuth 2.0 token for the current user. */
3336
+ oauth_token?: string;
3337
+ /** Optional. Deprecated, use item_id instead. */
3338
+ postId: string;
3339
+ /** Returns response with indentations and line breaks. */
3340
+ prettyPrint?: boolean;
3341
+ /** 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. */
3342
+ quotaUser?: string;
3343
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
3344
+ upload_protocol?: string;
3345
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
3346
+ uploadType?: string;
3347
+ }): Request<AddOnContext>;
3348
+ addOnAttachments: AddOnAttachmentsResource;
1910
3349
  }
1911
3350
  interface StudentsResource {
1912
3351
  /** 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 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: * `PERMISSION_DENIED` if the requesting user is not permitted to create students in this course or for access errors. * `NOT_FOUND` if the requested course ID does not exist. * `FAILED_PRECONDITION` if the requested user's account is disabled, for the following request errors: * CourseMemberLimitReached * CourseNotModifiable * UserGroupsMembershipLimitReached * InactiveCourseOwner * `ALREADY_EXISTS` if the user is already a student or teacher in the course. */
@@ -2693,6 +4132,7 @@ declare namespace gapi.client {
2693
4132
  announcements: AnnouncementsResource;
2694
4133
  courseWork: CourseWorkResource;
2695
4134
  courseWorkMaterials: CourseWorkMaterialsResource;
4135
+ posts: PostsResource;
2696
4136
  students: StudentsResource;
2697
4137
  teachers: TeachersResource;
2698
4138
  topics: TopicsResource;