Debian Codegraph @

docs/dyn/classroom_v1.courses.courseWorkMaterials.html

raw
1 <html><body>
2 <style>
3
4 body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13 }
14
15 body {
16 font-size: 13px;
17 padding: 1em;
18 }
19
20 h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23 }
24
25 h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28 }
29
30 h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34 }
35
36 pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39 }
40
41 pre {
42 margin-top: 0.5em;
43 }
44
45 h1, h2, h3, p {
46 font-family: Arial, sans serif;
47 }
48
49 h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51 }
52
53 .toc_element {
54 margin-top: 0.5em;
55 }
56
57 .firstline {
58 margin-left: 2 em;
59 }
60
61 .method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66 }
67
68 .details {
69 font-weight: bold;
70 font-size: 14px;
71 }
72
73 </style>
74
75 <h1><a href="classroom_v1.html">Google Classroom API</a> . <a href="classroom_v1.courses.html">courses</a> . <a href="classroom_v1.courses.courseWorkMaterials.html">courseWorkMaterials</a></h1>
76 <h2>Instance Methods</h2>
77 <p class="toc_element">
78 <code><a href="classroom_v1.courses.courseWorkMaterials.addOnAttachments.html">addOnAttachments()</a></code>
79 </p>
80 <p class="firstline">Returns the addOnAttachments Resource.</p>
81
82 <p class="toc_element">
83 <code><a href="#close">close()</a></code></p>
84 <p class="firstline">Close httplib2 connections.</p>
85 <p class="toc_element">
86 <code><a href="#create">create(courseId, body=None, x__xgafv=None)</a></code></p>
87 <p class="firstline">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</p>
88 <p class="toc_element">
89 <code><a href="#delete">delete(courseId, id, x__xgafv=None)</a></code></p>
90 <p class="firstline">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.</p>
91 <p class="toc_element">
92 <code><a href="#get">get(courseId, id, x__xgafv=None)</a></code></p>
93 <p class="firstline">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.</p>
94 <p class="toc_element">
95 <code><a href="#getAddOnContext">getAddOnContext(courseId, itemId, addOnToken=None, attachmentId=None, postId=None, x__xgafv=None)</a></code></p>
96 <p class="firstline">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/workspace/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.</p>
97 <p class="toc_element">
98 <code><a href="#list">list(courseId, courseWorkMaterialStates=None, materialDriveId=None, materialLink=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
99 <p class="firstline">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.</p>
100 <p class="toc_element">
101 <code><a href="#list_next">list_next()</a></code></p>
102 <p class="firstline">Retrieves the next page of results.</p>
103 <p class="toc_element">
104 <code><a href="#patch">patch(courseId, id, body=None, updateMask=None, x__xgafv=None)</a></code></p>
105 <p class="firstline">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</p>
106 <h3>Method Details</h3>
107 <div class="method">
108 <code class="details" id="close">close()</code>
109 <pre>Close httplib2 connections.</pre>
110 </div>
111
112 <div class="method">
113 <code class="details" id="create">create(courseId, body=None, x__xgafv=None)</code>
114 <pre>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
115
116 Args:
117 courseId: string, Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. (required)
118 body: object, The request body.
119 The object takes the form of:
120
121 { # Course work material created by a teacher for students of the course
122 &quot;alternateLink&quot;: &quot;A String&quot;, # Absolute link to this course work material in the Classroom web UI. This is only populated if `state` is `PUBLISHED`. Read-only.
123 &quot;assigneeMode&quot;: &quot;A String&quot;, # Assignee mode of the course work material. If unspecified, the default value is `ALL_STUDENTS`.
124 &quot;courseId&quot;: &quot;A String&quot;, # Identifier of the course. Read-only.
125 &quot;creationTime&quot;: &quot;A String&quot;, # Timestamp when this course work material was created. Read-only.
126 &quot;creatorUserId&quot;: &quot;A String&quot;, # Identifier for the user that created the course work material. Read-only.
127 &quot;description&quot;: &quot;A String&quot;, # Optional description of this course work material. The text must be a valid UTF-8 string containing no more than 30,000 characters.
128 &quot;id&quot;: &quot;A String&quot;, # Classroom-assigned identifier of this course work material, unique per course. Read-only.
129 &quot;individualStudentsOptions&quot;: { # Assignee details about a coursework/announcement. This field is set if and only if `assigneeMode` is `INDIVIDUAL_STUDENTS`. # Identifiers of students with access to the course work material. This field is set only if `assigneeMode` is `INDIVIDUAL_STUDENTS`. If the `assigneeMode` is `INDIVIDUAL_STUDENTS`, then only students specified in this field can see the course work material.
130 &quot;studentIds&quot;: [ # Identifiers for the students that have access to the coursework/announcement.
131 &quot;A String&quot;,
132 ],
133 },
134 &quot;materials&quot;: [ # Additional materials. A course work material must have no more than 20 material items.
135 { # Material attached to course work. When creating attachments, setting the `form`, `gem`, or `notebook` field is not supported.
136 &quot;driveFile&quot;: { # Drive file that is used as material for course work. # Google Drive file material.
137 &quot;driveFile&quot;: { # Representation of a Google Drive file. # Drive file details.
138 &quot;alternateLink&quot;: &quot;A String&quot;, # URL that can be used to access the Drive item. Read-only.
139 &quot;id&quot;: &quot;A String&quot;, # Drive API resource ID.
140 &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the Drive item. Read-only.
141 &quot;title&quot;: &quot;A String&quot;, # Title of the Drive item. Read-only.
142 },
143 &quot;shareMode&quot;: &quot;A String&quot;, # Mechanism by which students access the Drive item.
144 },
145 &quot;form&quot;: { # Google Forms item. # Google Forms material. Read-only.
146 &quot;formUrl&quot;: &quot;A String&quot;, # URL of the form.
147 &quot;responseUrl&quot;: &quot;A String&quot;, # URL of the form responses document. Only set if responses have been recorded and only when the requesting user is an editor of the form. Read-only.
148 &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the Form. Read-only.
149 &quot;title&quot;: &quot;A String&quot;, # Title of the Form. Read-only.
150 },
151 &quot;gem&quot;: { # Gemini Gem link. # Gemini Gem material. Read-only.
152 &quot;id&quot;: &quot;A String&quot;, # Gems resource id.
153 &quot;title&quot;: &quot;A String&quot;, # Title of the Gem.
154 &quot;url&quot;: &quot;A String&quot;, # URL that can be used to access the Gem.
155 },
156 &quot;link&quot;: { # URL item. # Link material. On creation, this is upgraded to a more appropriate type if possible, and this is reflected in the response.
157 &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the target URL. Read-only.
158 &quot;title&quot;: &quot;A String&quot;, # Title of the target of the URL. Read-only.
159 &quot;url&quot;: &quot;A String&quot;, # URL to link to. This must be a valid UTF-8 string containing between 1 and 2024 characters.
160 },
161 &quot;notebook&quot;: { # NotebookLM Notebook link. # NotebookLM Notebook material. Read-only.
162 &quot;id&quot;: &quot;A String&quot;, # Notebook resource id.
163 &quot;title&quot;: &quot;A String&quot;, # Title of the Notebook.
164 &quot;url&quot;: &quot;A String&quot;, # URL that can be used to access the Notebook.
165 },
166 &quot;youtubeVideo&quot;: { # YouTube video item. # YouTube video material.
167 &quot;alternateLink&quot;: &quot;A String&quot;, # URL that can be used to view the YouTube video. Read-only.
168 &quot;id&quot;: &quot;A String&quot;, # YouTube API resource ID.
169 &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the YouTube video. Read-only.
170 &quot;title&quot;: &quot;A String&quot;, # Title of the YouTube video. Read-only.
171 },
172 },
173 ],
174 &quot;scheduledTime&quot;: &quot;A String&quot;, # Optional timestamp when this course work material is scheduled to be published.
175 &quot;state&quot;: &quot;A String&quot;, # Status of this course work material. If unspecified, the default state is `DRAFT`.
176 &quot;title&quot;: &quot;A String&quot;, # Title of this course work material. The title must be a valid UTF-8 string containing between 1 and 3000 characters.
177 &quot;topicId&quot;: &quot;A String&quot;, # Identifier for the topic that this course work material is associated with. Must match an existing topic in the course.
178 &quot;updateTime&quot;: &quot;A String&quot;, # Timestamp of the most recent change to this course work material. Read-only.
179 }
180
181 x__xgafv: string, V1 error format.
182 Allowed values
183 1 - v1 error format
184 2 - v2 error format
185
186 Returns:
187 An object of the form:
188
189 { # Course work material created by a teacher for students of the course
190 &quot;alternateLink&quot;: &quot;A String&quot;, # Absolute link to this course work material in the Classroom web UI. This is only populated if `state` is `PUBLISHED`. Read-only.
191 &quot;assigneeMode&quot;: &quot;A String&quot;, # Assignee mode of the course work material. If unspecified, the default value is `ALL_STUDENTS`.
192 &quot;courseId&quot;: &quot;A String&quot;, # Identifier of the course. Read-only.
193 &quot;creationTime&quot;: &quot;A String&quot;, # Timestamp when this course work material was created. Read-only.
194 &quot;creatorUserId&quot;: &quot;A String&quot;, # Identifier for the user that created the course work material. Read-only.
195 &quot;description&quot;: &quot;A String&quot;, # Optional description of this course work material. The text must be a valid UTF-8 string containing no more than 30,000 characters.
196 &quot;id&quot;: &quot;A String&quot;, # Classroom-assigned identifier of this course work material, unique per course. Read-only.
197 &quot;individualStudentsOptions&quot;: { # Assignee details about a coursework/announcement. This field is set if and only if `assigneeMode` is `INDIVIDUAL_STUDENTS`. # Identifiers of students with access to the course work material. This field is set only if `assigneeMode` is `INDIVIDUAL_STUDENTS`. If the `assigneeMode` is `INDIVIDUAL_STUDENTS`, then only students specified in this field can see the course work material.
198 &quot;studentIds&quot;: [ # Identifiers for the students that have access to the coursework/announcement.
199 &quot;A String&quot;,
200 ],
201 },
202 &quot;materials&quot;: [ # Additional materials. A course work material must have no more than 20 material items.
203 { # Material attached to course work. When creating attachments, setting the `form`, `gem`, or `notebook` field is not supported.
204 &quot;driveFile&quot;: { # Drive file that is used as material for course work. # Google Drive file material.
205 &quot;driveFile&quot;: { # Representation of a Google Drive file. # Drive file details.
206 &quot;alternateLink&quot;: &quot;A String&quot;, # URL that can be used to access the Drive item. Read-only.
207 &quot;id&quot;: &quot;A String&quot;, # Drive API resource ID.
208 &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the Drive item. Read-only.
209 &quot;title&quot;: &quot;A String&quot;, # Title of the Drive item. Read-only.
210 },
211 &quot;shareMode&quot;: &quot;A String&quot;, # Mechanism by which students access the Drive item.
212 },
213 &quot;form&quot;: { # Google Forms item. # Google Forms material. Read-only.
214 &quot;formUrl&quot;: &quot;A String&quot;, # URL of the form.
215 &quot;responseUrl&quot;: &quot;A String&quot;, # URL of the form responses document. Only set if responses have been recorded and only when the requesting user is an editor of the form. Read-only.
216 &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the Form. Read-only.
217 &quot;title&quot;: &quot;A String&quot;, # Title of the Form. Read-only.
218 },
219 &quot;gem&quot;: { # Gemini Gem link. # Gemini Gem material. Read-only.
220 &quot;id&quot;: &quot;A String&quot;, # Gems resource id.
221 &quot;title&quot;: &quot;A String&quot;, # Title of the Gem.
222 &quot;url&quot;: &quot;A String&quot;, # URL that can be used to access the Gem.
223 },
224 &quot;link&quot;: { # URL item. # Link material. On creation, this is upgraded to a more appropriate type if possible, and this is reflected in the response.
225 &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the target URL. Read-only.
226 &quot;title&quot;: &quot;A String&quot;, # Title of the target of the URL. Read-only.
227 &quot;url&quot;: &quot;A String&quot;, # URL to link to. This must be a valid UTF-8 string containing between 1 and 2024 characters.
228 },
229 &quot;notebook&quot;: { # NotebookLM Notebook link. # NotebookLM Notebook material. Read-only.
230 &quot;id&quot;: &quot;A String&quot;, # Notebook resource id.
231 &quot;title&quot;: &quot;A String&quot;, # Title of the Notebook.
232 &quot;url&quot;: &quot;A String&quot;, # URL that can be used to access the Notebook.
233 },
234 &quot;youtubeVideo&quot;: { # YouTube video item. # YouTube video material.
235 &quot;alternateLink&quot;: &quot;A String&quot;, # URL that can be used to view the YouTube video. Read-only.
236 &quot;id&quot;: &quot;A String&quot;, # YouTube API resource ID.
237 &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the YouTube video. Read-only.
238 &quot;title&quot;: &quot;A String&quot;, # Title of the YouTube video. Read-only.
239 },
240 },
241 ],
242 &quot;scheduledTime&quot;: &quot;A String&quot;, # Optional timestamp when this course work material is scheduled to be published.
243 &quot;state&quot;: &quot;A String&quot;, # Status of this course work material. If unspecified, the default state is `DRAFT`.
244 &quot;title&quot;: &quot;A String&quot;, # Title of this course work material. The title must be a valid UTF-8 string containing between 1 and 3000 characters.
245 &quot;topicId&quot;: &quot;A String&quot;, # Identifier for the topic that this course work material is associated with. Must match an existing topic in the course.
246 &quot;updateTime&quot;: &quot;A String&quot;, # Timestamp of the most recent change to this course work material. Read-only.
247 }</pre>
248 </div>
249
250 <div class="method">
251 <code class="details" id="delete">delete(courseId, id, x__xgafv=None)</code>
252 <pre>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.
253
254 Args:
255 courseId: string, Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. (required)
256 id: string, Identifier of the course work material to delete. This identifier is a Classroom-assigned identifier. (required)
257 x__xgafv: string, V1 error format.
258 Allowed values
259 1 - v1 error format
260 2 - v2 error format
261
262 Returns:
263 An object of the form:
264
265 { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
266 }</pre>
267 </div>
268
269 <div class="method">
270 <code class="details" id="get">get(courseId, id, x__xgafv=None)</code>
271 <pre>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.
272
273 Args:
274 courseId: string, Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. (required)
275 id: string, Identifier of the course work material. (required)
276 x__xgafv: string, V1 error format.
277 Allowed values
278 1 - v1 error format
279 2 - v2 error format
280
281 Returns:
282 An object of the form:
283
284 { # Course work material created by a teacher for students of the course
285 &quot;alternateLink&quot;: &quot;A String&quot;, # Absolute link to this course work material in the Classroom web UI. This is only populated if `state` is `PUBLISHED`. Read-only.
286 &quot;assigneeMode&quot;: &quot;A String&quot;, # Assignee mode of the course work material. If unspecified, the default value is `ALL_STUDENTS`.
287 &quot;courseId&quot;: &quot;A String&quot;, # Identifier of the course. Read-only.
288 &quot;creationTime&quot;: &quot;A String&quot;, # Timestamp when this course work material was created. Read-only.
289 &quot;creatorUserId&quot;: &quot;A String&quot;, # Identifier for the user that created the course work material. Read-only.
290 &quot;description&quot;: &quot;A String&quot;, # Optional description of this course work material. The text must be a valid UTF-8 string containing no more than 30,000 characters.
291 &quot;id&quot;: &quot;A String&quot;, # Classroom-assigned identifier of this course work material, unique per course. Read-only.
292 &quot;individualStudentsOptions&quot;: { # Assignee details about a coursework/announcement. This field is set if and only if `assigneeMode` is `INDIVIDUAL_STUDENTS`. # Identifiers of students with access to the course work material. This field is set only if `assigneeMode` is `INDIVIDUAL_STUDENTS`. If the `assigneeMode` is `INDIVIDUAL_STUDENTS`, then only students specified in this field can see the course work material.
293 &quot;studentIds&quot;: [ # Identifiers for the students that have access to the coursework/announcement.
294 &quot;A String&quot;,
295 ],
296 },
297 &quot;materials&quot;: [ # Additional materials. A course work material must have no more than 20 material items.
298 { # Material attached to course work. When creating attachments, setting the `form`, `gem`, or `notebook` field is not supported.
299 &quot;driveFile&quot;: { # Drive file that is used as material for course work. # Google Drive file material.
300 &quot;driveFile&quot;: { # Representation of a Google Drive file. # Drive file details.
301 &quot;alternateLink&quot;: &quot;A String&quot;, # URL that can be used to access the Drive item. Read-only.
302 &quot;id&quot;: &quot;A String&quot;, # Drive API resource ID.
303 &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the Drive item. Read-only.
304 &quot;title&quot;: &quot;A String&quot;, # Title of the Drive item. Read-only.
305 },
306 &quot;shareMode&quot;: &quot;A String&quot;, # Mechanism by which students access the Drive item.
307 },
308 &quot;form&quot;: { # Google Forms item. # Google Forms material. Read-only.
309 &quot;formUrl&quot;: &quot;A String&quot;, # URL of the form.
310 &quot;responseUrl&quot;: &quot;A String&quot;, # URL of the form responses document. Only set if responses have been recorded and only when the requesting user is an editor of the form. Read-only.
311 &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the Form. Read-only.
312 &quot;title&quot;: &quot;A String&quot;, # Title of the Form. Read-only.
313 },
314 &quot;gem&quot;: { # Gemini Gem link. # Gemini Gem material. Read-only.
315 &quot;id&quot;: &quot;A String&quot;, # Gems resource id.
316 &quot;title&quot;: &quot;A String&quot;, # Title of the Gem.
317 &quot;url&quot;: &quot;A String&quot;, # URL that can be used to access the Gem.
318 },
319 &quot;link&quot;: { # URL item. # Link material. On creation, this is upgraded to a more appropriate type if possible, and this is reflected in the response.
320 &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the target URL. Read-only.
321 &quot;title&quot;: &quot;A String&quot;, # Title of the target of the URL. Read-only.
322 &quot;url&quot;: &quot;A String&quot;, # URL to link to. This must be a valid UTF-8 string containing between 1 and 2024 characters.
323 },
324 &quot;notebook&quot;: { # NotebookLM Notebook link. # NotebookLM Notebook material. Read-only.
325 &quot;id&quot;: &quot;A String&quot;, # Notebook resource id.
326 &quot;title&quot;: &quot;A String&quot;, # Title of the Notebook.
327 &quot;url&quot;: &quot;A String&quot;, # URL that can be used to access the Notebook.
328 },
329 &quot;youtubeVideo&quot;: { # YouTube video item. # YouTube video material.
330 &quot;alternateLink&quot;: &quot;A String&quot;, # URL that can be used to view the YouTube video. Read-only.
331 &quot;id&quot;: &quot;A String&quot;, # YouTube API resource ID.
332 &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the YouTube video. Read-only.
333 &quot;title&quot;: &quot;A String&quot;, # Title of the YouTube video. Read-only.
334 },
335 },
336 ],
337 &quot;scheduledTime&quot;: &quot;A String&quot;, # Optional timestamp when this course work material is scheduled to be published.
338 &quot;state&quot;: &quot;A String&quot;, # Status of this course work material. If unspecified, the default state is `DRAFT`.
339 &quot;title&quot;: &quot;A String&quot;, # Title of this course work material. The title must be a valid UTF-8 string containing between 1 and 3000 characters.
340 &quot;topicId&quot;: &quot;A String&quot;, # Identifier for the topic that this course work material is associated with. Must match an existing topic in the course.
341 &quot;updateTime&quot;: &quot;A String&quot;, # Timestamp of the most recent change to this course work material. Read-only.
342 }</pre>
343 </div>
344
345 <div class="method">
346 <code class="details" id="getAddOnContext">getAddOnContext(courseId, itemId, addOnToken=None, attachmentId=None, postId=None, x__xgafv=None)</code>
347 <pre>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&#x27;s role whenever the add-on is opened in an [iframe](https://developers.google.com/workspace/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.
348
349 Args:
350 courseId: string, Required. Identifier of the course. (required)
351 itemId: string, 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. (required)
352 addOnToken: string, 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&#x27;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.
353 attachmentId: string, Optional. The identifier of the attachment. This field is required for all requests except when the user is in the [Attachment Discovery iframe](https://developers.google.com/workspace/classroom/add-ons/get-started/iframes/attachment-discovery-iframe).
354 postId: string, Optional. Deprecated, use `item_id` instead.
355 x__xgafv: string, V1 error format.
356 Allowed values
357 1 - v1 error format
358 2 - v2 error format
359
360 Returns:
361 An object of the form:
362
363 { # Attachment-relevant metadata for Classroom add-ons in the context of a specific post.
364 &quot;courseId&quot;: &quot;A String&quot;, # Immutable. Identifier of the course.
365 &quot;itemId&quot;: &quot;A String&quot;, # Immutable. Identifier of the `Announcement`, `CourseWork`, or `CourseWorkMaterial` under which the attachment is attached.
366 &quot;postId&quot;: &quot;A String&quot;, # Immutable. Deprecated, use `item_id` instead.
367 &quot;studentContext&quot;: { # Role-specific context if the requesting user is a student. # Add-on context corresponding to the requesting user&#x27;s role as a student. Its presence implies that the requesting user is a student in the course.
368 &quot;submissionId&quot;: &quot;A String&quot;, # Requesting user&#x27;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`.
369 },
370 &quot;supportsStudentWork&quot;: True or False, # Optional. Whether the post allows the teacher to see student work and passback grades.
371 &quot;teacherContext&quot;: { # Role-specific context if the requesting user is a teacher. # Add-on context corresponding to the requesting user&#x27;s role as a teacher. Its presence implies that the requesting user is a teacher in the course.
372 },
373 }</pre>
374 </div>
375
376 <div class="method">
377 <code class="details" id="list">list(courseId, courseWorkMaterialStates=None, materialDriveId=None, materialLink=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)</code>
378 <pre>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.
379
380 Args:
381 courseId: string, Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. (required)
382 courseWorkMaterialStates: string, 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. (repeated)
383 Allowed values
384 COURSEWORK_MATERIAL_STATE_UNSPECIFIED - No state specified. This is never returned.
385 PUBLISHED - Status for course work material that has been published. This is the default state.
386 DRAFT - Status for a course work material that is not yet published. Course work material in this state is visible only to course teachers and domain administrators.
387 DELETED - Status for course work material that was published but is now deleted. Course work material in this state is visible only to course teachers and domain administrators. Course work material in this state is deleted after some time.
388 materialDriveId: string, 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.
389 materialLink: string, Optional filtering for course work material with at least one link material whose URL partially matches the provided string.
390 orderBy: string, 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`
391 pageSize: integer, 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.
392 pageToken: string, 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.
393 x__xgafv: string, V1 error format.
394 Allowed values
395 1 - v1 error format
396 2 - v2 error format
397
398 Returns:
399 An object of the form:
400
401 { # Response when listing course work material.
402 &quot;courseWorkMaterial&quot;: [ # Course work material items that match the request.
403 { # Course work material created by a teacher for students of the course
404 &quot;alternateLink&quot;: &quot;A String&quot;, # Absolute link to this course work material in the Classroom web UI. This is only populated if `state` is `PUBLISHED`. Read-only.
405 &quot;assigneeMode&quot;: &quot;A String&quot;, # Assignee mode of the course work material. If unspecified, the default value is `ALL_STUDENTS`.
406 &quot;courseId&quot;: &quot;A String&quot;, # Identifier of the course. Read-only.
407 &quot;creationTime&quot;: &quot;A String&quot;, # Timestamp when this course work material was created. Read-only.
408 &quot;creatorUserId&quot;: &quot;A String&quot;, # Identifier for the user that created the course work material. Read-only.
409 &quot;description&quot;: &quot;A String&quot;, # Optional description of this course work material. The text must be a valid UTF-8 string containing no more than 30,000 characters.
410 &quot;id&quot;: &quot;A String&quot;, # Classroom-assigned identifier of this course work material, unique per course. Read-only.
411 &quot;individualStudentsOptions&quot;: { # Assignee details about a coursework/announcement. This field is set if and only if `assigneeMode` is `INDIVIDUAL_STUDENTS`. # Identifiers of students with access to the course work material. This field is set only if `assigneeMode` is `INDIVIDUAL_STUDENTS`. If the `assigneeMode` is `INDIVIDUAL_STUDENTS`, then only students specified in this field can see the course work material.
412 &quot;studentIds&quot;: [ # Identifiers for the students that have access to the coursework/announcement.
413 &quot;A String&quot;,
414 ],
415 },
416 &quot;materials&quot;: [ # Additional materials. A course work material must have no more than 20 material items.
417 { # Material attached to course work. When creating attachments, setting the `form`, `gem`, or `notebook` field is not supported.
418 &quot;driveFile&quot;: { # Drive file that is used as material for course work. # Google Drive file material.
419 &quot;driveFile&quot;: { # Representation of a Google Drive file. # Drive file details.
420 &quot;alternateLink&quot;: &quot;A String&quot;, # URL that can be used to access the Drive item. Read-only.
421 &quot;id&quot;: &quot;A String&quot;, # Drive API resource ID.
422 &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the Drive item. Read-only.
423 &quot;title&quot;: &quot;A String&quot;, # Title of the Drive item. Read-only.
424 },
425 &quot;shareMode&quot;: &quot;A String&quot;, # Mechanism by which students access the Drive item.
426 },
427 &quot;form&quot;: { # Google Forms item. # Google Forms material. Read-only.
428 &quot;formUrl&quot;: &quot;A String&quot;, # URL of the form.
429 &quot;responseUrl&quot;: &quot;A String&quot;, # URL of the form responses document. Only set if responses have been recorded and only when the requesting user is an editor of the form. Read-only.
430 &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the Form. Read-only.
431 &quot;title&quot;: &quot;A String&quot;, # Title of the Form. Read-only.
432 },
433 &quot;gem&quot;: { # Gemini Gem link. # Gemini Gem material. Read-only.
434 &quot;id&quot;: &quot;A String&quot;, # Gems resource id.
435 &quot;title&quot;: &quot;A String&quot;, # Title of the Gem.
436 &quot;url&quot;: &quot;A String&quot;, # URL that can be used to access the Gem.
437 },
438 &quot;link&quot;: { # URL item. # Link material. On creation, this is upgraded to a more appropriate type if possible, and this is reflected in the response.
439 &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the target URL. Read-only.
440 &quot;title&quot;: &quot;A String&quot;, # Title of the target of the URL. Read-only.
441 &quot;url&quot;: &quot;A String&quot;, # URL to link to. This must be a valid UTF-8 string containing between 1 and 2024 characters.
442 },
443 &quot;notebook&quot;: { # NotebookLM Notebook link. # NotebookLM Notebook material. Read-only.
444 &quot;id&quot;: &quot;A String&quot;, # Notebook resource id.
445 &quot;title&quot;: &quot;A String&quot;, # Title of the Notebook.
446 &quot;url&quot;: &quot;A String&quot;, # URL that can be used to access the Notebook.
447 },
448 &quot;youtubeVideo&quot;: { # YouTube video item. # YouTube video material.
449 &quot;alternateLink&quot;: &quot;A String&quot;, # URL that can be used to view the YouTube video. Read-only.
450 &quot;id&quot;: &quot;A String&quot;, # YouTube API resource ID.
451 &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the YouTube video. Read-only.
452 &quot;title&quot;: &quot;A String&quot;, # Title of the YouTube video. Read-only.
453 },
454 },
455 ],
456 &quot;scheduledTime&quot;: &quot;A String&quot;, # Optional timestamp when this course work material is scheduled to be published.
457 &quot;state&quot;: &quot;A String&quot;, # Status of this course work material. If unspecified, the default state is `DRAFT`.
458 &quot;title&quot;: &quot;A String&quot;, # Title of this course work material. The title must be a valid UTF-8 string containing between 1 and 3000 characters.
459 &quot;topicId&quot;: &quot;A String&quot;, # Identifier for the topic that this course work material is associated with. Must match an existing topic in the course.
460 &quot;updateTime&quot;: &quot;A String&quot;, # Timestamp of the most recent change to this course work material. Read-only.
461 },
462 ],
463 &quot;nextPageToken&quot;: &quot;A String&quot;, # Token identifying the next page of results to return. If empty, no further results are available.
464 }</pre>
465 </div>
466
467 <div class="method">
468 <code class="details" id="list_next">list_next()</code>
469 <pre>Retrieves the next page of results.
470
471 Args:
472 previous_request: The request for the previous page. (required)
473 previous_response: The response from the request for the previous page. (required)
474
475 Returns:
476 A request object that you can call &#x27;execute()&#x27; on to request the next
477 page. Returns None if there are no more items in the collection.
478 </pre>
479 </div>
480
481 <div class="method">
482 <code class="details" id="patch">patch(courseId, id, body=None, updateMask=None, x__xgafv=None)</code>
483 <pre>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
484
485 Args:
486 courseId: string, Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. (required)
487 id: string, Identifier of the course work material. (required)
488 body: object, The request body.
489 The object takes the form of:
490
491 { # Course work material created by a teacher for students of the course
492 &quot;alternateLink&quot;: &quot;A String&quot;, # Absolute link to this course work material in the Classroom web UI. This is only populated if `state` is `PUBLISHED`. Read-only.
493 &quot;assigneeMode&quot;: &quot;A String&quot;, # Assignee mode of the course work material. If unspecified, the default value is `ALL_STUDENTS`.
494 &quot;courseId&quot;: &quot;A String&quot;, # Identifier of the course. Read-only.
495 &quot;creationTime&quot;: &quot;A String&quot;, # Timestamp when this course work material was created. Read-only.
496 &quot;creatorUserId&quot;: &quot;A String&quot;, # Identifier for the user that created the course work material. Read-only.
497 &quot;description&quot;: &quot;A String&quot;, # Optional description of this course work material. The text must be a valid UTF-8 string containing no more than 30,000 characters.
498 &quot;id&quot;: &quot;A String&quot;, # Classroom-assigned identifier of this course work material, unique per course. Read-only.
499 &quot;individualStudentsOptions&quot;: { # Assignee details about a coursework/announcement. This field is set if and only if `assigneeMode` is `INDIVIDUAL_STUDENTS`. # Identifiers of students with access to the course work material. This field is set only if `assigneeMode` is `INDIVIDUAL_STUDENTS`. If the `assigneeMode` is `INDIVIDUAL_STUDENTS`, then only students specified in this field can see the course work material.
500 &quot;studentIds&quot;: [ # Identifiers for the students that have access to the coursework/announcement.
501 &quot;A String&quot;,
502 ],
503 },
504 &quot;materials&quot;: [ # Additional materials. A course work material must have no more than 20 material items.
505 { # Material attached to course work. When creating attachments, setting the `form`, `gem`, or `notebook` field is not supported.
506 &quot;driveFile&quot;: { # Drive file that is used as material for course work. # Google Drive file material.
507 &quot;driveFile&quot;: { # Representation of a Google Drive file. # Drive file details.
508 &quot;alternateLink&quot;: &quot;A String&quot;, # URL that can be used to access the Drive item. Read-only.
509 &quot;id&quot;: &quot;A String&quot;, # Drive API resource ID.
510 &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the Drive item. Read-only.
511 &quot;title&quot;: &quot;A String&quot;, # Title of the Drive item. Read-only.
512 },
513 &quot;shareMode&quot;: &quot;A String&quot;, # Mechanism by which students access the Drive item.
514 },
515 &quot;form&quot;: { # Google Forms item. # Google Forms material. Read-only.
516 &quot;formUrl&quot;: &quot;A String&quot;, # URL of the form.
517 &quot;responseUrl&quot;: &quot;A String&quot;, # URL of the form responses document. Only set if responses have been recorded and only when the requesting user is an editor of the form. Read-only.
518 &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the Form. Read-only.
519 &quot;title&quot;: &quot;A String&quot;, # Title of the Form. Read-only.
520 },
521 &quot;gem&quot;: { # Gemini Gem link. # Gemini Gem material. Read-only.
522 &quot;id&quot;: &quot;A String&quot;, # Gems resource id.
523 &quot;title&quot;: &quot;A String&quot;, # Title of the Gem.
524 &quot;url&quot;: &quot;A String&quot;, # URL that can be used to access the Gem.
525 },
526 &quot;link&quot;: { # URL item. # Link material. On creation, this is upgraded to a more appropriate type if possible, and this is reflected in the response.
527 &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the target URL. Read-only.
528 &quot;title&quot;: &quot;A String&quot;, # Title of the target of the URL. Read-only.
529 &quot;url&quot;: &quot;A String&quot;, # URL to link to. This must be a valid UTF-8 string containing between 1 and 2024 characters.
530 },
531 &quot;notebook&quot;: { # NotebookLM Notebook link. # NotebookLM Notebook material. Read-only.
532 &quot;id&quot;: &quot;A String&quot;, # Notebook resource id.
533 &quot;title&quot;: &quot;A String&quot;, # Title of the Notebook.
534 &quot;url&quot;: &quot;A String&quot;, # URL that can be used to access the Notebook.
535 },
536 &quot;youtubeVideo&quot;: { # YouTube video item. # YouTube video material.
537 &quot;alternateLink&quot;: &quot;A String&quot;, # URL that can be used to view the YouTube video. Read-only.
538 &quot;id&quot;: &quot;A String&quot;, # YouTube API resource ID.
539 &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the YouTube video. Read-only.
540 &quot;title&quot;: &quot;A String&quot;, # Title of the YouTube video. Read-only.
541 },
542 },
543 ],
544 &quot;scheduledTime&quot;: &quot;A String&quot;, # Optional timestamp when this course work material is scheduled to be published.
545 &quot;state&quot;: &quot;A String&quot;, # Status of this course work material. If unspecified, the default state is `DRAFT`.
546 &quot;title&quot;: &quot;A String&quot;, # Title of this course work material. The title must be a valid UTF-8 string containing between 1 and 3000 characters.
547 &quot;topicId&quot;: &quot;A String&quot;, # Identifier for the topic that this course work material is associated with. Must match an existing topic in the course.
548 &quot;updateTime&quot;: &quot;A String&quot;, # Timestamp of the most recent change to this course work material. Read-only.
549 }
550
551 updateMask: string, 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`
552 x__xgafv: string, V1 error format.
553 Allowed values
554 1 - v1 error format
555 2 - v2 error format
556
557 Returns:
558 An object of the form:
559
560 { # Course work material created by a teacher for students of the course
561 &quot;alternateLink&quot;: &quot;A String&quot;, # Absolute link to this course work material in the Classroom web UI. This is only populated if `state` is `PUBLISHED`. Read-only.
562 &quot;assigneeMode&quot;: &quot;A String&quot;, # Assignee mode of the course work material. If unspecified, the default value is `ALL_STUDENTS`.
563 &quot;courseId&quot;: &quot;A String&quot;, # Identifier of the course. Read-only.
564 &quot;creationTime&quot;: &quot;A String&quot;, # Timestamp when this course work material was created. Read-only.
565 &quot;creatorUserId&quot;: &quot;A String&quot;, # Identifier for the user that created the course work material. Read-only.
566 &quot;description&quot;: &quot;A String&quot;, # Optional description of this course work material. The text must be a valid UTF-8 string containing no more than 30,000 characters.
567 &quot;id&quot;: &quot;A String&quot;, # Classroom-assigned identifier of this course work material, unique per course. Read-only.
568 &quot;individualStudentsOptions&quot;: { # Assignee details about a coursework/announcement. This field is set if and only if `assigneeMode` is `INDIVIDUAL_STUDENTS`. # Identifiers of students with access to the course work material. This field is set only if `assigneeMode` is `INDIVIDUAL_STUDENTS`. If the `assigneeMode` is `INDIVIDUAL_STUDENTS`, then only students specified in this field can see the course work material.
569 &quot;studentIds&quot;: [ # Identifiers for the students that have access to the coursework/announcement.
570 &quot;A String&quot;,
571 ],
572 },
573 &quot;materials&quot;: [ # Additional materials. A course work material must have no more than 20 material items.
574 { # Material attached to course work. When creating attachments, setting the `form`, `gem`, or `notebook` field is not supported.
575 &quot;driveFile&quot;: { # Drive file that is used as material for course work. # Google Drive file material.
576 &quot;driveFile&quot;: { # Representation of a Google Drive file. # Drive file details.
577 &quot;alternateLink&quot;: &quot;A String&quot;, # URL that can be used to access the Drive item. Read-only.
578 &quot;id&quot;: &quot;A String&quot;, # Drive API resource ID.
579 &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the Drive item. Read-only.
580 &quot;title&quot;: &quot;A String&quot;, # Title of the Drive item. Read-only.
581 },
582 &quot;shareMode&quot;: &quot;A String&quot;, # Mechanism by which students access the Drive item.
583 },
584 &quot;form&quot;: { # Google Forms item. # Google Forms material. Read-only.
585 &quot;formUrl&quot;: &quot;A String&quot;, # URL of the form.
586 &quot;responseUrl&quot;: &quot;A String&quot;, # URL of the form responses document. Only set if responses have been recorded and only when the requesting user is an editor of the form. Read-only.
587 &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the Form. Read-only.
588 &quot;title&quot;: &quot;A String&quot;, # Title of the Form. Read-only.
589 },
590 &quot;gem&quot;: { # Gemini Gem link. # Gemini Gem material. Read-only.
591 &quot;id&quot;: &quot;A String&quot;, # Gems resource id.
592 &quot;title&quot;: &quot;A String&quot;, # Title of the Gem.
593 &quot;url&quot;: &quot;A String&quot;, # URL that can be used to access the Gem.
594 },
595 &quot;link&quot;: { # URL item. # Link material. On creation, this is upgraded to a more appropriate type if possible, and this is reflected in the response.
596 &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the target URL. Read-only.
597 &quot;title&quot;: &quot;A String&quot;, # Title of the target of the URL. Read-only.
598 &quot;url&quot;: &quot;A String&quot;, # URL to link to. This must be a valid UTF-8 string containing between 1 and 2024 characters.
599 },
600 &quot;notebook&quot;: { # NotebookLM Notebook link. # NotebookLM Notebook material. Read-only.
601 &quot;id&quot;: &quot;A String&quot;, # Notebook resource id.
602 &quot;title&quot;: &quot;A String&quot;, # Title of the Notebook.
603 &quot;url&quot;: &quot;A String&quot;, # URL that can be used to access the Notebook.
604 },
605 &quot;youtubeVideo&quot;: { # YouTube video item. # YouTube video material.
606 &quot;alternateLink&quot;: &quot;A String&quot;, # URL that can be used to view the YouTube video. Read-only.
607 &quot;id&quot;: &quot;A String&quot;, # YouTube API resource ID.
608 &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the YouTube video. Read-only.
609 &quot;title&quot;: &quot;A String&quot;, # Title of the YouTube video. Read-only.
610 },
611 },
612 ],
613 &quot;scheduledTime&quot;: &quot;A String&quot;, # Optional timestamp when this course work material is scheduled to be published.
614 &quot;state&quot;: &quot;A String&quot;, # Status of this course work material. If unspecified, the default state is `DRAFT`.
615 &quot;title&quot;: &quot;A String&quot;, # Title of this course work material. The title must be a valid UTF-8 string containing between 1 and 3000 characters.
616 &quot;topicId&quot;: &quot;A String&quot;, # Identifier for the topic that this course work material is associated with. Must match an existing topic in the course.
617 &quot;updateTime&quot;: &quot;A String&quot;, # Timestamp of the most recent change to this course work material. Read-only.
618 }</pre>
619 </div>
620
621 </body></html>