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

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