blob: 273d0cdf2b665f5e0a850dca36073b106e7cb2eb [file] [log] [blame]
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001<html><body>
2<style>
3
4body, 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
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, 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.announcements.html">announcements</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#create">create(courseId, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070079<p class="firstline">Creates an announcement.</p>
80<p class="toc_element">
81 <code><a href="#delete">delete(courseId, id, x__xgafv=None)</a></code></p>
82<p class="firstline">Deletes an announcement.</p>
83<p class="toc_element">
84 <code><a href="#get">get(courseId, id, x__xgafv=None)</a></code></p>
85<p class="firstline">Returns an announcement.</p>
86<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070087 <code><a href="#list">list(courseId, announcementStates=None, orderBy=None, pageToken=None, pageSize=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070088<p class="firstline">Returns a list of announcements that the requester is permitted to view.</p>
89<p class="toc_element">
90 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
91<p class="firstline">Retrieves the next page of results.</p>
92<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070093 <code><a href="#modifyAssignees">modifyAssignees(courseId, id, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070094<p class="firstline">Modifies assignee mode and options of an announcement.</p>
95<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070096 <code><a href="#patch">patch(courseId, id, body=None, updateMask=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070097<p class="firstline">Updates one or more fields of an announcement.</p>
98<h3>Method Details</h3>
99<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700100 <code class="details" id="create">create(courseId, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700101 <pre>Creates an announcement.
102
103This method returns the following error codes:
104
105* `PERMISSION_DENIED` if the requesting user is not permitted to access the
106requested course, create announcements in the requested course, share a
107Drive attachment, or for access errors.
108* `INVALID_ARGUMENT` if the request is malformed.
109* `NOT_FOUND` if the requested course does not exist.
110* `FAILED_PRECONDITION` for the following request error:
111 * AttachmentNotVisible
112
113Args:
114 courseId: string, Identifier of the course.
115This identifier can be either the Classroom-assigned identifier or an
116alias. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700117 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700118 The object takes the form of:
119
120{ # Announcement created by a teacher for students of the course
Bu Sun Kim65020912020-05-20 12:08:20 -0700121 &quot;materials&quot;: [ # Additional materials.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700122 #
123 # Announcements must have no more than 20 material items.
124 { # Material attached to course work.
125 #
126 # When creating attachments, setting the `form` field is not supported.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700127 &quot;youtubeVideo&quot;: { # YouTube video item. # YouTube video material.
128 &quot;title&quot;: &quot;A String&quot;, # Title of the YouTube video.
129 #
130 # Read-only.
131 &quot;alternateLink&quot;: &quot;A String&quot;, # URL that can be used to view the YouTube video.
132 #
133 # Read-only.
134 &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the YouTube video.
135 #
136 # Read-only.
137 &quot;id&quot;: &quot;A String&quot;, # YouTube API resource ID.
138 },
139 &quot;driveFile&quot;: { # Drive file that is used as material for course work. # Google Drive file material.
140 &quot;driveFile&quot;: { # Representation of a Google Drive file. # Drive file details.
141 &quot;alternateLink&quot;: &quot;A String&quot;, # URL that can be used to access the Drive item.
142 #
143 # Read-only.
144 &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the Drive item.
145 #
146 # Read-only.
147 &quot;id&quot;: &quot;A String&quot;, # Drive API resource ID.
148 &quot;title&quot;: &quot;A String&quot;, # Title of the Drive item.
149 #
150 # Read-only.
151 },
152 &quot;shareMode&quot;: &quot;A String&quot;, # Mechanism by which students access the Drive item.
153 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700154 &quot;form&quot;: { # Google Forms item. # Google Forms material.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700155 &quot;formUrl&quot;: &quot;A String&quot;, # URL of the form.
Bu Sun Kim65020912020-05-20 12:08:20 -0700156 &quot;title&quot;: &quot;A String&quot;, # Title of the Form.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700157 #
158 # Read-only.
Bu Sun Kim65020912020-05-20 12:08:20 -0700159 &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the Form.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700160 #
161 # Read-only.
Bu Sun Kim65020912020-05-20 12:08:20 -0700162 &quot;responseUrl&quot;: &quot;A String&quot;, # URL of the form responses document.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700163 # Only set if respsonses have been recorded and only when the
164 # requesting user is an editor of the form.
165 #
166 # Read-only.
Bu Sun Kim65020912020-05-20 12:08:20 -0700167 },
168 &quot;link&quot;: { # URL item. # Link material. On creation, this is upgraded to a more appropriate type
169 # if possible, and this is reflected in the response.
Bu Sun Kim65020912020-05-20 12:08:20 -0700170 &quot;title&quot;: &quot;A String&quot;, # Title of the target of the URL.
171 #
172 # Read-only.
173 &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the target URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700174 #
175 # Read-only.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700176 &quot;url&quot;: &quot;A String&quot;, # URL to link to.
177 # This must be a valid UTF-8 string containing between 1 and 2024 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700178 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700179 },
180 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700181 &quot;updateTime&quot;: &quot;A String&quot;, # Timestamp of the most recent change to this announcement.
182 #
183 # Read-only.
184 &quot;assigneeMode&quot;: &quot;A String&quot;, # Assignee mode of the announcement.
185 # If unspecified, the default value is `ALL_STUDENTS`.
186 &quot;alternateLink&quot;: &quot;A String&quot;, # Absolute link to this announcement in the Classroom web UI.
187 # This is only populated if `state` is `PUBLISHED`.
188 #
189 # Read-only.
190 &quot;scheduledTime&quot;: &quot;A String&quot;, # Optional timestamp when this announcement is scheduled to be published.
191 &quot;creationTime&quot;: &quot;A String&quot;, # Timestamp when this announcement was created.
192 #
193 # Read-only.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700194 &quot;creatorUserId&quot;: &quot;A String&quot;, # Identifier for the user that created the announcement.
195 #
196 # Read-only.
Bu Sun Kim65020912020-05-20 12:08:20 -0700197 &quot;individualStudentsOptions&quot;: { # Assignee details about a coursework/announcement. # Identifiers of students with access to the announcement.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700198 # This field is set only if `assigneeMode` is `INDIVIDUAL_STUDENTS`.
199 # If the `assigneeMode` is `INDIVIDUAL_STUDENTS`, then only students
Dan O'Mearadd494642020-05-01 07:42:23 -0700200 # specified in this field can see the announcement.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700201 # This field is set if and only if `assigneeMode` is `INDIVIDUAL_STUDENTS`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700202 &quot;studentIds&quot;: [ # Identifiers for the students that have access to the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700203 # coursework/announcement.
Bu Sun Kim65020912020-05-20 12:08:20 -0700204 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700205 ],
206 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700207 &quot;state&quot;: &quot;A String&quot;, # Status of this announcement.
208 # If unspecified, the default state is `DRAFT`.
209 &quot;text&quot;: &quot;A String&quot;, # Description of this announcement.
210 # The text must be a valid UTF-8 string containing no more
211 # than 30,000 characters.
212 &quot;courseId&quot;: &quot;A String&quot;, # Identifier of the course.
213 #
214 # Read-only.
215 &quot;id&quot;: &quot;A String&quot;, # Classroom-assigned identifier of this announcement, unique per course.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700216 #
217 # Read-only.
218}
219
220 x__xgafv: string, V1 error format.
221 Allowed values
222 1 - v1 error format
223 2 - v2 error format
224
225Returns:
226 An object of the form:
227
228 { # Announcement created by a teacher for students of the course
Bu Sun Kim65020912020-05-20 12:08:20 -0700229 &quot;materials&quot;: [ # Additional materials.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700230 #
231 # Announcements must have no more than 20 material items.
232 { # Material attached to course work.
233 #
234 # When creating attachments, setting the `form` field is not supported.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700235 &quot;youtubeVideo&quot;: { # YouTube video item. # YouTube video material.
236 &quot;title&quot;: &quot;A String&quot;, # Title of the YouTube video.
237 #
238 # Read-only.
239 &quot;alternateLink&quot;: &quot;A String&quot;, # URL that can be used to view the YouTube video.
240 #
241 # Read-only.
242 &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the YouTube video.
243 #
244 # Read-only.
245 &quot;id&quot;: &quot;A String&quot;, # YouTube API resource ID.
246 },
247 &quot;driveFile&quot;: { # Drive file that is used as material for course work. # Google Drive file material.
248 &quot;driveFile&quot;: { # Representation of a Google Drive file. # Drive file details.
249 &quot;alternateLink&quot;: &quot;A String&quot;, # URL that can be used to access the Drive item.
250 #
251 # Read-only.
252 &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the Drive item.
253 #
254 # Read-only.
255 &quot;id&quot;: &quot;A String&quot;, # Drive API resource ID.
256 &quot;title&quot;: &quot;A String&quot;, # Title of the Drive item.
257 #
258 # Read-only.
259 },
260 &quot;shareMode&quot;: &quot;A String&quot;, # Mechanism by which students access the Drive item.
261 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700262 &quot;form&quot;: { # Google Forms item. # Google Forms material.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700263 &quot;formUrl&quot;: &quot;A String&quot;, # URL of the form.
Bu Sun Kim65020912020-05-20 12:08:20 -0700264 &quot;title&quot;: &quot;A String&quot;, # Title of the Form.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700265 #
266 # Read-only.
Bu Sun Kim65020912020-05-20 12:08:20 -0700267 &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the Form.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700268 #
269 # Read-only.
Bu Sun Kim65020912020-05-20 12:08:20 -0700270 &quot;responseUrl&quot;: &quot;A String&quot;, # URL of the form responses document.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700271 # Only set if respsonses have been recorded and only when the
272 # requesting user is an editor of the form.
273 #
274 # Read-only.
Bu Sun Kim65020912020-05-20 12:08:20 -0700275 },
276 &quot;link&quot;: { # URL item. # Link material. On creation, this is upgraded to a more appropriate type
277 # if possible, and this is reflected in the response.
Bu Sun Kim65020912020-05-20 12:08:20 -0700278 &quot;title&quot;: &quot;A String&quot;, # Title of the target of the URL.
279 #
280 # Read-only.
281 &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the target URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700282 #
283 # Read-only.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700284 &quot;url&quot;: &quot;A String&quot;, # URL to link to.
285 # This must be a valid UTF-8 string containing between 1 and 2024 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700286 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700287 },
288 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700289 &quot;updateTime&quot;: &quot;A String&quot;, # Timestamp of the most recent change to this announcement.
290 #
291 # Read-only.
292 &quot;assigneeMode&quot;: &quot;A String&quot;, # Assignee mode of the announcement.
293 # If unspecified, the default value is `ALL_STUDENTS`.
294 &quot;alternateLink&quot;: &quot;A String&quot;, # Absolute link to this announcement in the Classroom web UI.
295 # This is only populated if `state` is `PUBLISHED`.
296 #
297 # Read-only.
298 &quot;scheduledTime&quot;: &quot;A String&quot;, # Optional timestamp when this announcement is scheduled to be published.
299 &quot;creationTime&quot;: &quot;A String&quot;, # Timestamp when this announcement was created.
300 #
301 # Read-only.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700302 &quot;creatorUserId&quot;: &quot;A String&quot;, # Identifier for the user that created the announcement.
303 #
304 # Read-only.
Bu Sun Kim65020912020-05-20 12:08:20 -0700305 &quot;individualStudentsOptions&quot;: { # Assignee details about a coursework/announcement. # Identifiers of students with access to the announcement.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700306 # This field is set only if `assigneeMode` is `INDIVIDUAL_STUDENTS`.
307 # If the `assigneeMode` is `INDIVIDUAL_STUDENTS`, then only students
Dan O'Mearadd494642020-05-01 07:42:23 -0700308 # specified in this field can see the announcement.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700309 # This field is set if and only if `assigneeMode` is `INDIVIDUAL_STUDENTS`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700310 &quot;studentIds&quot;: [ # Identifiers for the students that have access to the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700311 # coursework/announcement.
Bu Sun Kim65020912020-05-20 12:08:20 -0700312 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700313 ],
314 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700315 &quot;state&quot;: &quot;A String&quot;, # Status of this announcement.
316 # If unspecified, the default state is `DRAFT`.
317 &quot;text&quot;: &quot;A String&quot;, # Description of this announcement.
318 # The text must be a valid UTF-8 string containing no more
319 # than 30,000 characters.
320 &quot;courseId&quot;: &quot;A String&quot;, # Identifier of the course.
321 #
322 # Read-only.
323 &quot;id&quot;: &quot;A String&quot;, # Classroom-assigned identifier of this announcement, unique per course.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700324 #
325 # Read-only.
326 }</pre>
327</div>
328
329<div class="method">
330 <code class="details" id="delete">delete(courseId, id, x__xgafv=None)</code>
331 <pre>Deletes an announcement.
332
333This request must be made by the Developer Console project of the
334[OAuth client ID](https://support.google.com/cloud/answer/6158849) used to
335create the corresponding announcement item.
336
337This method returns the following error codes:
338
339* `PERMISSION_DENIED` if the requesting developer project did not create
340the corresponding announcement, if the requesting user is not permitted
341to delete the requested course or for access errors.
342* `FAILED_PRECONDITION` if the requested announcement has already been
343deleted.
344* `NOT_FOUND` if no course exists with the requested ID.
345
346Args:
347 courseId: string, Identifier of the course.
348This identifier can be either the Classroom-assigned identifier or an
349alias. (required)
350 id: string, Identifier of the announcement to delete.
351This identifier is a Classroom-assigned identifier. (required)
352 x__xgafv: string, V1 error format.
353 Allowed values
354 1 - v1 error format
355 2 - v2 error format
356
357Returns:
358 An object of the form:
359
360 { # A generic empty message that you can re-use to avoid defining duplicated
361 # empty messages in your APIs. A typical example is to use it as the request
362 # or the response type of an API method. For instance:
363 #
364 # service Foo {
365 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
366 # }
367 #
368 # The JSON representation for `Empty` is empty JSON object `{}`.
369 }</pre>
370</div>
371
372<div class="method">
373 <code class="details" id="get">get(courseId, id, x__xgafv=None)</code>
374 <pre>Returns an announcement.
375
376This method returns the following error codes:
377
378* `PERMISSION_DENIED` if the requesting user is not permitted to access the
379requested course or announcement, or for access errors.
380* `INVALID_ARGUMENT` if the request is malformed.
381* `NOT_FOUND` if the requested course or announcement does not exist.
382
383Args:
384 courseId: string, Identifier of the course.
385This identifier can be either the Classroom-assigned identifier or an
386alias. (required)
387 id: string, Identifier of the announcement. (required)
388 x__xgafv: string, V1 error format.
389 Allowed values
390 1 - v1 error format
391 2 - v2 error format
392
393Returns:
394 An object of the form:
395
396 { # Announcement created by a teacher for students of the course
Bu Sun Kim65020912020-05-20 12:08:20 -0700397 &quot;materials&quot;: [ # Additional materials.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700398 #
399 # Announcements must have no more than 20 material items.
400 { # Material attached to course work.
401 #
402 # When creating attachments, setting the `form` field is not supported.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700403 &quot;youtubeVideo&quot;: { # YouTube video item. # YouTube video material.
404 &quot;title&quot;: &quot;A String&quot;, # Title of the YouTube video.
405 #
406 # Read-only.
407 &quot;alternateLink&quot;: &quot;A String&quot;, # URL that can be used to view the YouTube video.
408 #
409 # Read-only.
410 &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the YouTube video.
411 #
412 # Read-only.
413 &quot;id&quot;: &quot;A String&quot;, # YouTube API resource ID.
414 },
415 &quot;driveFile&quot;: { # Drive file that is used as material for course work. # Google Drive file material.
416 &quot;driveFile&quot;: { # Representation of a Google Drive file. # Drive file details.
417 &quot;alternateLink&quot;: &quot;A String&quot;, # URL that can be used to access the Drive item.
418 #
419 # Read-only.
420 &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the Drive item.
421 #
422 # Read-only.
423 &quot;id&quot;: &quot;A String&quot;, # Drive API resource ID.
424 &quot;title&quot;: &quot;A String&quot;, # Title of the Drive item.
425 #
426 # Read-only.
427 },
428 &quot;shareMode&quot;: &quot;A String&quot;, # Mechanism by which students access the Drive item.
429 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700430 &quot;form&quot;: { # Google Forms item. # Google Forms material.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700431 &quot;formUrl&quot;: &quot;A String&quot;, # URL of the form.
Bu Sun Kim65020912020-05-20 12:08:20 -0700432 &quot;title&quot;: &quot;A String&quot;, # Title of the Form.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700433 #
434 # Read-only.
Bu Sun Kim65020912020-05-20 12:08:20 -0700435 &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the Form.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700436 #
437 # Read-only.
Bu Sun Kim65020912020-05-20 12:08:20 -0700438 &quot;responseUrl&quot;: &quot;A String&quot;, # URL of the form responses document.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700439 # Only set if respsonses have been recorded and only when the
440 # requesting user is an editor of the form.
441 #
442 # Read-only.
Bu Sun Kim65020912020-05-20 12:08:20 -0700443 },
444 &quot;link&quot;: { # URL item. # Link material. On creation, this is upgraded to a more appropriate type
445 # if possible, and this is reflected in the response.
Bu Sun Kim65020912020-05-20 12:08:20 -0700446 &quot;title&quot;: &quot;A String&quot;, # Title of the target of the URL.
447 #
448 # Read-only.
449 &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the target URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700450 #
451 # Read-only.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700452 &quot;url&quot;: &quot;A String&quot;, # URL to link to.
453 # This must be a valid UTF-8 string containing between 1 and 2024 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700454 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700455 },
456 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700457 &quot;updateTime&quot;: &quot;A String&quot;, # Timestamp of the most recent change to this announcement.
458 #
459 # Read-only.
460 &quot;assigneeMode&quot;: &quot;A String&quot;, # Assignee mode of the announcement.
461 # If unspecified, the default value is `ALL_STUDENTS`.
462 &quot;alternateLink&quot;: &quot;A String&quot;, # Absolute link to this announcement in the Classroom web UI.
463 # This is only populated if `state` is `PUBLISHED`.
464 #
465 # Read-only.
466 &quot;scheduledTime&quot;: &quot;A String&quot;, # Optional timestamp when this announcement is scheduled to be published.
467 &quot;creationTime&quot;: &quot;A String&quot;, # Timestamp when this announcement was created.
468 #
469 # Read-only.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700470 &quot;creatorUserId&quot;: &quot;A String&quot;, # Identifier for the user that created the announcement.
471 #
472 # Read-only.
Bu Sun Kim65020912020-05-20 12:08:20 -0700473 &quot;individualStudentsOptions&quot;: { # Assignee details about a coursework/announcement. # Identifiers of students with access to the announcement.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700474 # This field is set only if `assigneeMode` is `INDIVIDUAL_STUDENTS`.
475 # If the `assigneeMode` is `INDIVIDUAL_STUDENTS`, then only students
Dan O'Mearadd494642020-05-01 07:42:23 -0700476 # specified in this field can see the announcement.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700477 # This field is set if and only if `assigneeMode` is `INDIVIDUAL_STUDENTS`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700478 &quot;studentIds&quot;: [ # Identifiers for the students that have access to the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700479 # coursework/announcement.
Bu Sun Kim65020912020-05-20 12:08:20 -0700480 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700481 ],
482 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700483 &quot;state&quot;: &quot;A String&quot;, # Status of this announcement.
484 # If unspecified, the default state is `DRAFT`.
485 &quot;text&quot;: &quot;A String&quot;, # Description of this announcement.
486 # The text must be a valid UTF-8 string containing no more
487 # than 30,000 characters.
488 &quot;courseId&quot;: &quot;A String&quot;, # Identifier of the course.
489 #
490 # Read-only.
491 &quot;id&quot;: &quot;A String&quot;, # Classroom-assigned identifier of this announcement, unique per course.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700492 #
493 # Read-only.
494 }</pre>
495</div>
496
497<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700498 <code class="details" id="list">list(courseId, announcementStates=None, orderBy=None, pageToken=None, pageSize=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700499 <pre>Returns a list of announcements that the requester is permitted to view.
500
501Course students may only view `PUBLISHED` announcements. Course teachers
502and domain administrators may view all announcements.
503
504This method returns the following error codes:
505
506* `PERMISSION_DENIED` if the requesting user is not permitted to access
507the requested course or for access errors.
508* `INVALID_ARGUMENT` if the request is malformed.
509* `NOT_FOUND` if the requested course does not exist.
510
511Args:
512 courseId: string, Identifier of the course.
513This identifier can be either the Classroom-assigned identifier or an
514alias. (required)
Bu Sun Kim65020912020-05-20 12:08:20 -0700515 announcementStates: string, Restriction on the `state` of announcements returned.
516If this argument is left unspecified, the default value is `PUBLISHED`. (repeated)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700517 orderBy: string, Optional sort ordering for results. A comma-separated list of fields with
518an optional sort direction keyword. Supported field is `updateTime`.
519Supported direction keywords are `asc` and `desc`.
520If not specified, `updateTime desc` is the default behavior.
521Examples: `updateTime asc`, `updateTime`
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700522 pageToken: string, nextPageToken
523value returned from a previous
524list call,
525indicating that the subsequent page of results should be returned.
526
527The list request
528must be otherwise identical to the one that resulted in this token.
Bu Sun Kim65020912020-05-20 12:08:20 -0700529 pageSize: integer, Maximum number of items to return. Zero or unspecified indicates that the
530server may assign a maximum.
531
532The server may return fewer than the specified number of results.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700533 x__xgafv: string, V1 error format.
534 Allowed values
535 1 - v1 error format
536 2 - v2 error format
537
538Returns:
539 An object of the form:
540
541 { # Response when listing course work.
Bu Sun Kim65020912020-05-20 12:08:20 -0700542 &quot;announcements&quot;: [ # Announcement items that match the request.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700543 { # Announcement created by a teacher for students of the course
Bu Sun Kim65020912020-05-20 12:08:20 -0700544 &quot;materials&quot;: [ # Additional materials.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700545 #
546 # Announcements must have no more than 20 material items.
547 { # Material attached to course work.
548 #
549 # When creating attachments, setting the `form` field is not supported.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700550 &quot;youtubeVideo&quot;: { # YouTube video item. # YouTube video material.
551 &quot;title&quot;: &quot;A String&quot;, # Title of the YouTube video.
552 #
553 # Read-only.
554 &quot;alternateLink&quot;: &quot;A String&quot;, # URL that can be used to view the YouTube video.
555 #
556 # Read-only.
557 &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the YouTube video.
558 #
559 # Read-only.
560 &quot;id&quot;: &quot;A String&quot;, # YouTube API resource ID.
561 },
562 &quot;driveFile&quot;: { # Drive file that is used as material for course work. # Google Drive file material.
563 &quot;driveFile&quot;: { # Representation of a Google Drive file. # Drive file details.
564 &quot;alternateLink&quot;: &quot;A String&quot;, # URL that can be used to access the Drive item.
565 #
566 # Read-only.
567 &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the Drive item.
568 #
569 # Read-only.
570 &quot;id&quot;: &quot;A String&quot;, # Drive API resource ID.
571 &quot;title&quot;: &quot;A String&quot;, # Title of the Drive item.
572 #
573 # Read-only.
574 },
575 &quot;shareMode&quot;: &quot;A String&quot;, # Mechanism by which students access the Drive item.
576 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700577 &quot;form&quot;: { # Google Forms item. # Google Forms material.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700578 &quot;formUrl&quot;: &quot;A String&quot;, # URL of the form.
Bu Sun Kim65020912020-05-20 12:08:20 -0700579 &quot;title&quot;: &quot;A String&quot;, # Title of the Form.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700580 #
581 # Read-only.
Bu Sun Kim65020912020-05-20 12:08:20 -0700582 &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the Form.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700583 #
584 # Read-only.
Bu Sun Kim65020912020-05-20 12:08:20 -0700585 &quot;responseUrl&quot;: &quot;A String&quot;, # URL of the form responses document.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700586 # Only set if respsonses have been recorded and only when the
587 # requesting user is an editor of the form.
588 #
589 # Read-only.
Bu Sun Kim65020912020-05-20 12:08:20 -0700590 },
591 &quot;link&quot;: { # URL item. # Link material. On creation, this is upgraded to a more appropriate type
592 # if possible, and this is reflected in the response.
Bu Sun Kim65020912020-05-20 12:08:20 -0700593 &quot;title&quot;: &quot;A String&quot;, # Title of the target of the URL.
594 #
595 # Read-only.
596 &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the target URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700597 #
598 # Read-only.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700599 &quot;url&quot;: &quot;A String&quot;, # URL to link to.
600 # This must be a valid UTF-8 string containing between 1 and 2024 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700601 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700602 },
603 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700604 &quot;updateTime&quot;: &quot;A String&quot;, # Timestamp of the most recent change to this announcement.
605 #
606 # Read-only.
607 &quot;assigneeMode&quot;: &quot;A String&quot;, # Assignee mode of the announcement.
608 # If unspecified, the default value is `ALL_STUDENTS`.
609 &quot;alternateLink&quot;: &quot;A String&quot;, # Absolute link to this announcement in the Classroom web UI.
610 # This is only populated if `state` is `PUBLISHED`.
611 #
612 # Read-only.
613 &quot;scheduledTime&quot;: &quot;A String&quot;, # Optional timestamp when this announcement is scheduled to be published.
614 &quot;creationTime&quot;: &quot;A String&quot;, # Timestamp when this announcement was created.
615 #
616 # Read-only.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700617 &quot;creatorUserId&quot;: &quot;A String&quot;, # Identifier for the user that created the announcement.
618 #
619 # Read-only.
Bu Sun Kim65020912020-05-20 12:08:20 -0700620 &quot;individualStudentsOptions&quot;: { # Assignee details about a coursework/announcement. # Identifiers of students with access to the announcement.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700621 # This field is set only if `assigneeMode` is `INDIVIDUAL_STUDENTS`.
622 # If the `assigneeMode` is `INDIVIDUAL_STUDENTS`, then only students
Dan O'Mearadd494642020-05-01 07:42:23 -0700623 # specified in this field can see the announcement.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700624 # This field is set if and only if `assigneeMode` is `INDIVIDUAL_STUDENTS`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700625 &quot;studentIds&quot;: [ # Identifiers for the students that have access to the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700626 # coursework/announcement.
Bu Sun Kim65020912020-05-20 12:08:20 -0700627 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700628 ],
629 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700630 &quot;state&quot;: &quot;A String&quot;, # Status of this announcement.
631 # If unspecified, the default state is `DRAFT`.
632 &quot;text&quot;: &quot;A String&quot;, # Description of this announcement.
633 # The text must be a valid UTF-8 string containing no more
634 # than 30,000 characters.
635 &quot;courseId&quot;: &quot;A String&quot;, # Identifier of the course.
636 #
637 # Read-only.
638 &quot;id&quot;: &quot;A String&quot;, # Classroom-assigned identifier of this announcement, unique per course.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700639 #
640 # Read-only.
641 },
642 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700643 &quot;nextPageToken&quot;: &quot;A String&quot;, # Token identifying the next page of results to return. If empty, no further
644 # results are available.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700645 }</pre>
646</div>
647
648<div class="method">
649 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
650 <pre>Retrieves the next page of results.
651
652Args:
653 previous_request: The request for the previous page. (required)
654 previous_response: The response from the request for the previous page. (required)
655
656Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700657 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700658 page. Returns None if there are no more items in the collection.
659 </pre>
660</div>
661
662<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700663 <code class="details" id="modifyAssignees">modifyAssignees(courseId, id, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700664 <pre>Modifies assignee mode and options of an announcement.
665
666Only a teacher of the course that contains the announcement may
667call this method.
668
669This method returns the following error codes:
670
671* `PERMISSION_DENIED` if the requesting user is not permitted to access the
672requested course or course work or for access errors.
673* `INVALID_ARGUMENT` if the request is malformed.
674* `NOT_FOUND` if the requested course or course work does not exist.
675
676Args:
677 courseId: string, Identifier of the course.
678This identifier can be either the Classroom-assigned identifier or an
679alias. (required)
680 id: string, Identifier of the announcement. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700681 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700682 The object takes the form of:
683
684{ # Request to modify assignee mode and options of an announcement.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700685 &quot;assigneeMode&quot;: &quot;A String&quot;, # Mode of the announcement describing whether it is accessible by all
686 # students or specified individual students.
Bu Sun Kim65020912020-05-20 12:08:20 -0700687 &quot;modifyIndividualStudentsOptions&quot;: { # Contains fields to add or remove students from a course work or announcement # Set which students can view or cannot view the announcement.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700688 # Must be specified only when `assigneeMode` is `INDIVIDUAL_STUDENTS`.
689 # where the `assigneeMode` is set to `INDIVIDUAL_STUDENTS`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700690 &quot;addStudentIds&quot;: [ # IDs of students to be added as having access to this
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700691 # coursework/announcement.
Bu Sun Kim65020912020-05-20 12:08:20 -0700692 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700693 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700694 &quot;removeStudentIds&quot;: [ # IDs of students to be removed from having access to this
695 # coursework/announcement.
696 &quot;A String&quot;,
697 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700698 },
699 }
700
701 x__xgafv: string, V1 error format.
702 Allowed values
703 1 - v1 error format
704 2 - v2 error format
705
706Returns:
707 An object of the form:
708
709 { # Announcement created by a teacher for students of the course
Bu Sun Kim65020912020-05-20 12:08:20 -0700710 &quot;materials&quot;: [ # Additional materials.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700711 #
712 # Announcements must have no more than 20 material items.
713 { # Material attached to course work.
714 #
715 # When creating attachments, setting the `form` field is not supported.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700716 &quot;youtubeVideo&quot;: { # YouTube video item. # YouTube video material.
717 &quot;title&quot;: &quot;A String&quot;, # Title of the YouTube video.
718 #
719 # Read-only.
720 &quot;alternateLink&quot;: &quot;A String&quot;, # URL that can be used to view the YouTube video.
721 #
722 # Read-only.
723 &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the YouTube video.
724 #
725 # Read-only.
726 &quot;id&quot;: &quot;A String&quot;, # YouTube API resource ID.
727 },
728 &quot;driveFile&quot;: { # Drive file that is used as material for course work. # Google Drive file material.
729 &quot;driveFile&quot;: { # Representation of a Google Drive file. # Drive file details.
730 &quot;alternateLink&quot;: &quot;A String&quot;, # URL that can be used to access the Drive item.
731 #
732 # Read-only.
733 &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the Drive item.
734 #
735 # Read-only.
736 &quot;id&quot;: &quot;A String&quot;, # Drive API resource ID.
737 &quot;title&quot;: &quot;A String&quot;, # Title of the Drive item.
738 #
739 # Read-only.
740 },
741 &quot;shareMode&quot;: &quot;A String&quot;, # Mechanism by which students access the Drive item.
742 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700743 &quot;form&quot;: { # Google Forms item. # Google Forms material.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700744 &quot;formUrl&quot;: &quot;A String&quot;, # URL of the form.
Bu Sun Kim65020912020-05-20 12:08:20 -0700745 &quot;title&quot;: &quot;A String&quot;, # Title of the Form.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700746 #
747 # Read-only.
Bu Sun Kim65020912020-05-20 12:08:20 -0700748 &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the Form.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700749 #
750 # Read-only.
Bu Sun Kim65020912020-05-20 12:08:20 -0700751 &quot;responseUrl&quot;: &quot;A String&quot;, # URL of the form responses document.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700752 # Only set if respsonses have been recorded and only when the
753 # requesting user is an editor of the form.
754 #
755 # Read-only.
Bu Sun Kim65020912020-05-20 12:08:20 -0700756 },
757 &quot;link&quot;: { # URL item. # Link material. On creation, this is upgraded to a more appropriate type
758 # if possible, and this is reflected in the response.
Bu Sun Kim65020912020-05-20 12:08:20 -0700759 &quot;title&quot;: &quot;A String&quot;, # Title of the target of the URL.
760 #
761 # Read-only.
762 &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the target URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700763 #
764 # Read-only.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700765 &quot;url&quot;: &quot;A String&quot;, # URL to link to.
766 # This must be a valid UTF-8 string containing between 1 and 2024 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700767 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700768 },
769 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700770 &quot;updateTime&quot;: &quot;A String&quot;, # Timestamp of the most recent change to this announcement.
771 #
772 # Read-only.
773 &quot;assigneeMode&quot;: &quot;A String&quot;, # Assignee mode of the announcement.
774 # If unspecified, the default value is `ALL_STUDENTS`.
775 &quot;alternateLink&quot;: &quot;A String&quot;, # Absolute link to this announcement in the Classroom web UI.
776 # This is only populated if `state` is `PUBLISHED`.
777 #
778 # Read-only.
779 &quot;scheduledTime&quot;: &quot;A String&quot;, # Optional timestamp when this announcement is scheduled to be published.
780 &quot;creationTime&quot;: &quot;A String&quot;, # Timestamp when this announcement was created.
781 #
782 # Read-only.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700783 &quot;creatorUserId&quot;: &quot;A String&quot;, # Identifier for the user that created the announcement.
784 #
785 # Read-only.
Bu Sun Kim65020912020-05-20 12:08:20 -0700786 &quot;individualStudentsOptions&quot;: { # Assignee details about a coursework/announcement. # Identifiers of students with access to the announcement.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700787 # This field is set only if `assigneeMode` is `INDIVIDUAL_STUDENTS`.
788 # If the `assigneeMode` is `INDIVIDUAL_STUDENTS`, then only students
Dan O'Mearadd494642020-05-01 07:42:23 -0700789 # specified in this field can see the announcement.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700790 # This field is set if and only if `assigneeMode` is `INDIVIDUAL_STUDENTS`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700791 &quot;studentIds&quot;: [ # Identifiers for the students that have access to the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700792 # coursework/announcement.
Bu Sun Kim65020912020-05-20 12:08:20 -0700793 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700794 ],
795 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700796 &quot;state&quot;: &quot;A String&quot;, # Status of this announcement.
797 # If unspecified, the default state is `DRAFT`.
798 &quot;text&quot;: &quot;A String&quot;, # Description of this announcement.
799 # The text must be a valid UTF-8 string containing no more
800 # than 30,000 characters.
801 &quot;courseId&quot;: &quot;A String&quot;, # Identifier of the course.
802 #
803 # Read-only.
804 &quot;id&quot;: &quot;A String&quot;, # Classroom-assigned identifier of this announcement, unique per course.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700805 #
806 # Read-only.
807 }</pre>
808</div>
809
810<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700811 <code class="details" id="patch">patch(courseId, id, body=None, updateMask=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700812 <pre>Updates one or more fields of an announcement.
813
814This method returns the following error codes:
815
816* `PERMISSION_DENIED` if the requesting developer project did not create
817the corresponding announcement or for access errors.
818* `INVALID_ARGUMENT` if the request is malformed.
819* `FAILED_PRECONDITION` if the requested announcement has already been
820deleted.
821* `NOT_FOUND` if the requested course or announcement does not exist
822
823Args:
824 courseId: string, Identifier of the course.
825This identifier can be either the Classroom-assigned identifier or an
826alias. (required)
827 id: string, Identifier of the announcement. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700828 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700829 The object takes the form of:
830
831{ # Announcement created by a teacher for students of the course
Bu Sun Kim65020912020-05-20 12:08:20 -0700832 &quot;materials&quot;: [ # Additional materials.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700833 #
834 # Announcements must have no more than 20 material items.
835 { # Material attached to course work.
836 #
837 # When creating attachments, setting the `form` field is not supported.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700838 &quot;youtubeVideo&quot;: { # YouTube video item. # YouTube video material.
839 &quot;title&quot;: &quot;A String&quot;, # Title of the YouTube video.
840 #
841 # Read-only.
842 &quot;alternateLink&quot;: &quot;A String&quot;, # URL that can be used to view the YouTube video.
843 #
844 # Read-only.
845 &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the YouTube video.
846 #
847 # Read-only.
848 &quot;id&quot;: &quot;A String&quot;, # YouTube API resource ID.
849 },
850 &quot;driveFile&quot;: { # Drive file that is used as material for course work. # Google Drive file material.
851 &quot;driveFile&quot;: { # Representation of a Google Drive file. # Drive file details.
852 &quot;alternateLink&quot;: &quot;A String&quot;, # URL that can be used to access the Drive item.
853 #
854 # Read-only.
855 &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the Drive item.
856 #
857 # Read-only.
858 &quot;id&quot;: &quot;A String&quot;, # Drive API resource ID.
859 &quot;title&quot;: &quot;A String&quot;, # Title of the Drive item.
860 #
861 # Read-only.
862 },
863 &quot;shareMode&quot;: &quot;A String&quot;, # Mechanism by which students access the Drive item.
864 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700865 &quot;form&quot;: { # Google Forms item. # Google Forms material.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700866 &quot;formUrl&quot;: &quot;A String&quot;, # URL of the form.
Bu Sun Kim65020912020-05-20 12:08:20 -0700867 &quot;title&quot;: &quot;A String&quot;, # Title of the Form.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700868 #
869 # Read-only.
Bu Sun Kim65020912020-05-20 12:08:20 -0700870 &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the Form.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700871 #
872 # Read-only.
Bu Sun Kim65020912020-05-20 12:08:20 -0700873 &quot;responseUrl&quot;: &quot;A String&quot;, # URL of the form responses document.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700874 # Only set if respsonses have been recorded and only when the
875 # requesting user is an editor of the form.
876 #
877 # Read-only.
Bu Sun Kim65020912020-05-20 12:08:20 -0700878 },
879 &quot;link&quot;: { # URL item. # Link material. On creation, this is upgraded to a more appropriate type
880 # if possible, and this is reflected in the response.
Bu Sun Kim65020912020-05-20 12:08:20 -0700881 &quot;title&quot;: &quot;A String&quot;, # Title of the target of the URL.
882 #
883 # Read-only.
884 &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the target URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700885 #
886 # Read-only.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700887 &quot;url&quot;: &quot;A String&quot;, # URL to link to.
888 # This must be a valid UTF-8 string containing between 1 and 2024 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700889 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700890 },
891 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700892 &quot;updateTime&quot;: &quot;A String&quot;, # Timestamp of the most recent change to this announcement.
893 #
894 # Read-only.
895 &quot;assigneeMode&quot;: &quot;A String&quot;, # Assignee mode of the announcement.
896 # If unspecified, the default value is `ALL_STUDENTS`.
897 &quot;alternateLink&quot;: &quot;A String&quot;, # Absolute link to this announcement in the Classroom web UI.
898 # This is only populated if `state` is `PUBLISHED`.
899 #
900 # Read-only.
901 &quot;scheduledTime&quot;: &quot;A String&quot;, # Optional timestamp when this announcement is scheduled to be published.
902 &quot;creationTime&quot;: &quot;A String&quot;, # Timestamp when this announcement was created.
903 #
904 # Read-only.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700905 &quot;creatorUserId&quot;: &quot;A String&quot;, # Identifier for the user that created the announcement.
906 #
907 # Read-only.
Bu Sun Kim65020912020-05-20 12:08:20 -0700908 &quot;individualStudentsOptions&quot;: { # Assignee details about a coursework/announcement. # Identifiers of students with access to the announcement.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700909 # This field is set only if `assigneeMode` is `INDIVIDUAL_STUDENTS`.
910 # If the `assigneeMode` is `INDIVIDUAL_STUDENTS`, then only students
Dan O'Mearadd494642020-05-01 07:42:23 -0700911 # specified in this field can see the announcement.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700912 # This field is set if and only if `assigneeMode` is `INDIVIDUAL_STUDENTS`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700913 &quot;studentIds&quot;: [ # Identifiers for the students that have access to the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700914 # coursework/announcement.
Bu Sun Kim65020912020-05-20 12:08:20 -0700915 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700916 ],
917 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700918 &quot;state&quot;: &quot;A String&quot;, # Status of this announcement.
919 # If unspecified, the default state is `DRAFT`.
920 &quot;text&quot;: &quot;A String&quot;, # Description of this announcement.
921 # The text must be a valid UTF-8 string containing no more
922 # than 30,000 characters.
923 &quot;courseId&quot;: &quot;A String&quot;, # Identifier of the course.
924 #
925 # Read-only.
926 &quot;id&quot;: &quot;A String&quot;, # Classroom-assigned identifier of this announcement, unique per course.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700927 #
928 # Read-only.
929}
930
931 updateMask: string, Mask that identifies which fields on the announcement to update.
932This field is required to do an update. The update fails if invalid
933fields are specified. If a field supports empty values, it can be cleared
934by specifying it in the update mask and not in the Announcement object. If
935a field that does not support empty values is included in the update mask
Dan O'Mearadd494642020-05-01 07:42:23 -0700936and not set in the Announcement object, an `INVALID_ARGUMENT` error is
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700937returned.
938
939The following fields may be specified by teachers:
940
941* `text`
942* `state`
943* `scheduled_time`
944 x__xgafv: string, V1 error format.
945 Allowed values
946 1 - v1 error format
947 2 - v2 error format
948
949Returns:
950 An object of the form:
951
952 { # Announcement created by a teacher for students of the course
Bu Sun Kim65020912020-05-20 12:08:20 -0700953 &quot;materials&quot;: [ # Additional materials.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700954 #
955 # Announcements must have no more than 20 material items.
956 { # Material attached to course work.
957 #
958 # When creating attachments, setting the `form` field is not supported.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700959 &quot;youtubeVideo&quot;: { # YouTube video item. # YouTube video material.
960 &quot;title&quot;: &quot;A String&quot;, # Title of the YouTube video.
961 #
962 # Read-only.
963 &quot;alternateLink&quot;: &quot;A String&quot;, # URL that can be used to view the YouTube video.
964 #
965 # Read-only.
966 &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the YouTube video.
967 #
968 # Read-only.
969 &quot;id&quot;: &quot;A String&quot;, # YouTube API resource ID.
970 },
971 &quot;driveFile&quot;: { # Drive file that is used as material for course work. # Google Drive file material.
972 &quot;driveFile&quot;: { # Representation of a Google Drive file. # Drive file details.
973 &quot;alternateLink&quot;: &quot;A String&quot;, # URL that can be used to access the Drive item.
974 #
975 # Read-only.
976 &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the Drive item.
977 #
978 # Read-only.
979 &quot;id&quot;: &quot;A String&quot;, # Drive API resource ID.
980 &quot;title&quot;: &quot;A String&quot;, # Title of the Drive item.
981 #
982 # Read-only.
983 },
984 &quot;shareMode&quot;: &quot;A String&quot;, # Mechanism by which students access the Drive item.
985 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700986 &quot;form&quot;: { # Google Forms item. # Google Forms material.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700987 &quot;formUrl&quot;: &quot;A String&quot;, # URL of the form.
Bu Sun Kim65020912020-05-20 12:08:20 -0700988 &quot;title&quot;: &quot;A String&quot;, # Title of the Form.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700989 #
990 # Read-only.
Bu Sun Kim65020912020-05-20 12:08:20 -0700991 &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the Form.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700992 #
993 # Read-only.
Bu Sun Kim65020912020-05-20 12:08:20 -0700994 &quot;responseUrl&quot;: &quot;A String&quot;, # URL of the form responses document.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700995 # Only set if respsonses have been recorded and only when the
996 # requesting user is an editor of the form.
997 #
998 # Read-only.
Bu Sun Kim65020912020-05-20 12:08:20 -0700999 },
1000 &quot;link&quot;: { # URL item. # Link material. On creation, this is upgraded to a more appropriate type
1001 # if possible, and this is reflected in the response.
Bu Sun Kim65020912020-05-20 12:08:20 -07001002 &quot;title&quot;: &quot;A String&quot;, # Title of the target of the URL.
1003 #
1004 # Read-only.
1005 &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the target URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001006 #
1007 # Read-only.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001008 &quot;url&quot;: &quot;A String&quot;, # URL to link to.
1009 # This must be a valid UTF-8 string containing between 1 and 2024 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -07001010 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001011 },
1012 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001013 &quot;updateTime&quot;: &quot;A String&quot;, # Timestamp of the most recent change to this announcement.
1014 #
1015 # Read-only.
1016 &quot;assigneeMode&quot;: &quot;A String&quot;, # Assignee mode of the announcement.
1017 # If unspecified, the default value is `ALL_STUDENTS`.
1018 &quot;alternateLink&quot;: &quot;A String&quot;, # Absolute link to this announcement in the Classroom web UI.
1019 # This is only populated if `state` is `PUBLISHED`.
1020 #
1021 # Read-only.
1022 &quot;scheduledTime&quot;: &quot;A String&quot;, # Optional timestamp when this announcement is scheduled to be published.
1023 &quot;creationTime&quot;: &quot;A String&quot;, # Timestamp when this announcement was created.
1024 #
1025 # Read-only.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001026 &quot;creatorUserId&quot;: &quot;A String&quot;, # Identifier for the user that created the announcement.
1027 #
1028 # Read-only.
Bu Sun Kim65020912020-05-20 12:08:20 -07001029 &quot;individualStudentsOptions&quot;: { # Assignee details about a coursework/announcement. # Identifiers of students with access to the announcement.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001030 # This field is set only if `assigneeMode` is `INDIVIDUAL_STUDENTS`.
1031 # If the `assigneeMode` is `INDIVIDUAL_STUDENTS`, then only students
Dan O'Mearadd494642020-05-01 07:42:23 -07001032 # specified in this field can see the announcement.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001033 # This field is set if and only if `assigneeMode` is `INDIVIDUAL_STUDENTS`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001034 &quot;studentIds&quot;: [ # Identifiers for the students that have access to the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001035 # coursework/announcement.
Bu Sun Kim65020912020-05-20 12:08:20 -07001036 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001037 ],
1038 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001039 &quot;state&quot;: &quot;A String&quot;, # Status of this announcement.
1040 # If unspecified, the default state is `DRAFT`.
1041 &quot;text&quot;: &quot;A String&quot;, # Description of this announcement.
1042 # The text must be a valid UTF-8 string containing no more
1043 # than 30,000 characters.
1044 &quot;courseId&quot;: &quot;A String&quot;, # Identifier of the course.
1045 #
1046 # Read-only.
1047 &quot;id&quot;: &quot;A String&quot;, # Classroom-assigned identifier of this announcement, unique per course.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001048 #
1049 # Read-only.
1050 }</pre>
1051</div>
1052
1053</body></html>