1<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.courseWork.html">courseWork</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78  <code><a href="classroom_v1.courses.courseWork.studentSubmissions.html">studentSubmissions()</a></code>
79</p>
80<p class="firstline">Returns the studentSubmissions 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 course work. The resulting course work (and corresponding student submissions) are associated with the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to make the request. Classroom API requests to modify course work and student submissions must be made with an OAuth client ID from the associated Developer Console project. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course, create course work in the requested course, share a Drive attachment, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course does not exist. * `FAILED_PRECONDITION` for the following request error: * AttachmentNotVisible</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. This request must be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the corresponding course work item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting developer project did not create the corresponding course work, if the requesting user is not permitted to delete the requested course or for access errors. * `FAILED_PRECONDITION` if the requested course work has already been deleted. * `NOT_FOUND` if no course exists with the requested ID.</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 course work. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course or course work does not exist.</p>
94<p class="toc_element">
95  <code><a href="#list">list(courseId, courseWorkStates=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
96<p class="firstline">Returns a list of course work that the requester is permitted to view. Course students may only view `PUBLISHED` course work. Course teachers and domain administrators may view all course work. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course does not exist.</p>
97<p class="toc_element">
98  <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
99<p class="firstline">Retrieves the next page of results.</p>
100<p class="toc_element">
101  <code><a href="#modifyAssignees">modifyAssignees(courseId, id, body=None, x__xgafv=None)</a></code></p>
102<p class="firstline">Modifies assignee mode and options of a coursework. Only a teacher of the course that contains the coursework may call this method. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course or course work does not exist.</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. See google.classroom.v1.CourseWork for details of which fields may be updated and who may change them. This request must be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the corresponding course work item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting developer project did not create the corresponding course work, if the user is not permitted to make the requested modification to the student submission, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `FAILED_PRECONDITION` if the requested course work has already been deleted. * `NOT_FOUND` if the requested course, course work, or student submission does not exist.</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 course work. The resulting course work (and corresponding student submissions) are associated with the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to make the request. Classroom API requests to modify course work and student submissions must be made with an OAuth client ID from the associated Developer Console project. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course, create course work in the requested course, share a Drive attachment, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course does not exist. * `FAILED_PRECONDITION` for the following request error: * AttachmentNotVisible
115
116Args:
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 created by a teacher for students of the course.
122  &quot;alternateLink&quot;: &quot;A String&quot;, # Absolute link to this course work 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 coursework. If unspecified, the default value is `ALL_STUDENTS`.
124  &quot;assignment&quot;: { # Additional details for assignments. # Assignment details. This is populated only when `work_type` is `ASSIGNMENT`. Read-only.
125    &quot;studentWorkFolder&quot;: { # Representation of a Google Drive folder. # Drive folder where attachments from student submissions are placed. This is only populated for course teachers and administrators.
126      &quot;alternateLink&quot;: &quot;A String&quot;, # URL that can be used to access the Drive folder. Read-only.
127      &quot;id&quot;: &quot;A String&quot;, # Drive API resource ID.
128      &quot;title&quot;: &quot;A String&quot;, # Title of the Drive folder. Read-only.
129    },
130  },
131  &quot;associatedWithDeveloper&quot;: True or False, # Whether this course work item is associated with the Developer Console project making the request. See CreateCourseWork for more details. Read-only.
132  &quot;courseId&quot;: &quot;A String&quot;, # Identifier of the course. Read-only.
133  &quot;creationTime&quot;: &quot;A String&quot;, # Timestamp when this course work was created. Read-only.
134  &quot;creatorUserId&quot;: &quot;A String&quot;, # Identifier for the user that created the coursework. Read-only.
135  &quot;description&quot;: &quot;A String&quot;, # Optional description of this course work. If set, the description must be a valid UTF-8 string containing no more than 30,000 characters.
136  &quot;dueDate&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values * A month and day value, with a zero year, such as an anniversary * A year on its own, with zero month and day values * A year and month value, with a zero day, such as a credit card expiration date Related types are google.type.TimeOfDay and `google.protobuf.Timestamp`. # Optional date, in UTC, that submissions for this course work are due. This must be specified if `due_time` is specified.
137    &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
138    &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
139    &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
140  },
141  &quot;dueTime&quot;: { # Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are google.type.Date and `google.protobuf.Timestamp`. # Optional time of day, in UTC, that submissions for this course work are due. This must be specified if `due_date` is specified.
142    &quot;hours&quot;: 42, # Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value &quot;24:00:00&quot; for scenarios like business closing time.
143    &quot;minutes&quot;: 42, # Minutes of hour of day. Must be from 0 to 59.
144    &quot;nanos&quot;: 42, # Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
145    &quot;seconds&quot;: 42, # Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.
146  },
147  &quot;id&quot;: &quot;A String&quot;, # Classroom-assigned identifier of this course work, unique per course. Read-only.
148  &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 coursework. This field is set only if `assigneeMode` is `INDIVIDUAL_STUDENTS`. If the `assigneeMode` is `INDIVIDUAL_STUDENTS`, then only students specified in this field are assigned the coursework.
149    &quot;studentIds&quot;: [ # Identifiers for the students that have access to the coursework/announcement.
150      &quot;A String&quot;,
151    ],
152  },
153  &quot;materials&quot;: [ # Additional materials. CourseWork must have no more than 20 material items.
154    { # Material attached to course work. When creating attachments, setting the `form` field is not supported.
155      &quot;driveFile&quot;: { # Drive file that is used as material for course work. # Google Drive file material.
156        &quot;driveFile&quot;: { # Representation of a Google Drive file. # Drive file details.
157          &quot;alternateLink&quot;: &quot;A String&quot;, # URL that can be used to access the Drive item. Read-only.
158          &quot;id&quot;: &quot;A String&quot;, # Drive API resource ID.
159          &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the Drive item. Read-only.
160          &quot;title&quot;: &quot;A String&quot;, # Title of the Drive item. Read-only.
161        },
162        &quot;shareMode&quot;: &quot;A String&quot;, # Mechanism by which students access the Drive item.
163      },
164      &quot;form&quot;: { # Google Forms item. # Google Forms material.
165        &quot;formUrl&quot;: &quot;A String&quot;, # URL of the form.
166        &quot;responseUrl&quot;: &quot;A String&quot;, # URL of the form responses document. Only set if respsonses have been recorded and only when the requesting user is an editor of the form. Read-only.
167        &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the Form. Read-only.
168        &quot;title&quot;: &quot;A String&quot;, # Title of the Form. Read-only.
169      },
170      &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.
171        &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the target URL. Read-only.
172        &quot;title&quot;: &quot;A String&quot;, # Title of the target of the URL. Read-only.
173        &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.
174      },
175      &quot;youtubeVideo&quot;: { # YouTube video item. # YouTube video material.
176        &quot;alternateLink&quot;: &quot;A String&quot;, # URL that can be used to view the YouTube video. Read-only.
177        &quot;id&quot;: &quot;A String&quot;, # YouTube API resource ID.
178        &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the YouTube video. Read-only.
179        &quot;title&quot;: &quot;A String&quot;, # Title of the YouTube video. Read-only.
180      },
181    },
182  ],
183  &quot;maxPoints&quot;: 3.14, # Maximum grade for this course work. If zero or unspecified, this assignment is considered ungraded. This must be a non-negative integer value.
184  &quot;multipleChoiceQuestion&quot;: { # Additional details for multiple-choice questions. # Multiple choice question details. For read operations, this field is populated only when `work_type` is `MULTIPLE_CHOICE_QUESTION`. For write operations, this field must be specified when creating course work with a `work_type` of `MULTIPLE_CHOICE_QUESTION`, and it must not be set otherwise.
185    &quot;choices&quot;: [ # Possible choices.
186      &quot;A String&quot;,
187    ],
188  },
189  &quot;scheduledTime&quot;: &quot;A String&quot;, # Optional timestamp when this course work is scheduled to be published.
190  &quot;state&quot;: &quot;A String&quot;, # Status of this course work. If unspecified, the default state is `DRAFT`.
191  &quot;submissionModificationMode&quot;: &quot;A String&quot;, # Setting to determine when students are allowed to modify submissions. If unspecified, the default value is `MODIFIABLE_UNTIL_TURNED_IN`.
192  &quot;title&quot;: &quot;A String&quot;, # Title of this course work. The title must be a valid UTF-8 string containing between 1 and 3000 characters.
193  &quot;topicId&quot;: &quot;A String&quot;, # Identifier for the topic that this coursework is associated with. Must match an existing topic in the course.
194  &quot;updateTime&quot;: &quot;A String&quot;, # Timestamp of the most recent change to this course work. Read-only.
195  &quot;workType&quot;: &quot;A String&quot;, # Type of this course work. The type is set when the course work is created and cannot be changed.
196}
197
198  x__xgafv: string, V1 error format.
199    Allowed values
200      1 - v1 error format
201      2 - v2 error format
202
203Returns:
204  An object of the form:
205
206    { # Course work created by a teacher for students of the course.
207  &quot;alternateLink&quot;: &quot;A String&quot;, # Absolute link to this course work in the Classroom web UI. This is only populated if `state` is `PUBLISHED`. Read-only.
208  &quot;assigneeMode&quot;: &quot;A String&quot;, # Assignee mode of the coursework. If unspecified, the default value is `ALL_STUDENTS`.
209  &quot;assignment&quot;: { # Additional details for assignments. # Assignment details. This is populated only when `work_type` is `ASSIGNMENT`. Read-only.
210    &quot;studentWorkFolder&quot;: { # Representation of a Google Drive folder. # Drive folder where attachments from student submissions are placed. This is only populated for course teachers and administrators.
211      &quot;alternateLink&quot;: &quot;A String&quot;, # URL that can be used to access the Drive folder. Read-only.
212      &quot;id&quot;: &quot;A String&quot;, # Drive API resource ID.
213      &quot;title&quot;: &quot;A String&quot;, # Title of the Drive folder. Read-only.
214    },
215  },
216  &quot;associatedWithDeveloper&quot;: True or False, # Whether this course work item is associated with the Developer Console project making the request. See CreateCourseWork for more details. Read-only.
217  &quot;courseId&quot;: &quot;A String&quot;, # Identifier of the course. Read-only.
218  &quot;creationTime&quot;: &quot;A String&quot;, # Timestamp when this course work was created. Read-only.
219  &quot;creatorUserId&quot;: &quot;A String&quot;, # Identifier for the user that created the coursework. Read-only.
220  &quot;description&quot;: &quot;A String&quot;, # Optional description of this course work. If set, the description must be a valid UTF-8 string containing no more than 30,000 characters.
221  &quot;dueDate&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values * A month and day value, with a zero year, such as an anniversary * A year on its own, with zero month and day values * A year and month value, with a zero day, such as a credit card expiration date Related types are google.type.TimeOfDay and `google.protobuf.Timestamp`. # Optional date, in UTC, that submissions for this course work are due. This must be specified if `due_time` is specified.
222    &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
223    &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
224    &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
225  },
226  &quot;dueTime&quot;: { # Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are google.type.Date and `google.protobuf.Timestamp`. # Optional time of day, in UTC, that submissions for this course work are due. This must be specified if `due_date` is specified.
227    &quot;hours&quot;: 42, # Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value &quot;24:00:00&quot; for scenarios like business closing time.
228    &quot;minutes&quot;: 42, # Minutes of hour of day. Must be from 0 to 59.
229    &quot;nanos&quot;: 42, # Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
230    &quot;seconds&quot;: 42, # Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.
231  },
232  &quot;id&quot;: &quot;A String&quot;, # Classroom-assigned identifier of this course work, unique per course. Read-only.
233  &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 coursework. This field is set only if `assigneeMode` is `INDIVIDUAL_STUDENTS`. If the `assigneeMode` is `INDIVIDUAL_STUDENTS`, then only students specified in this field are assigned the coursework.
234    &quot;studentIds&quot;: [ # Identifiers for the students that have access to the coursework/announcement.
235      &quot;A String&quot;,
236    ],
237  },
238  &quot;materials&quot;: [ # Additional materials. CourseWork must have no more than 20 material items.
239    { # Material attached to course work. When creating attachments, setting the `form` field is not supported.
240      &quot;driveFile&quot;: { # Drive file that is used as material for course work. # Google Drive file material.
241        &quot;driveFile&quot;: { # Representation of a Google Drive file. # Drive file details.
242          &quot;alternateLink&quot;: &quot;A String&quot;, # URL that can be used to access the Drive item. Read-only.
243          &quot;id&quot;: &quot;A String&quot;, # Drive API resource ID.
244          &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the Drive item. Read-only.
245          &quot;title&quot;: &quot;A String&quot;, # Title of the Drive item. Read-only.
246        },
247        &quot;shareMode&quot;: &quot;A String&quot;, # Mechanism by which students access the Drive item.
248      },
249      &quot;form&quot;: { # Google Forms item. # Google Forms material.
250        &quot;formUrl&quot;: &quot;A String&quot;, # URL of the form.
251        &quot;responseUrl&quot;: &quot;A String&quot;, # URL of the form responses document. Only set if respsonses have been recorded and only when the requesting user is an editor of the form. Read-only.
252        &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the Form. Read-only.
253        &quot;title&quot;: &quot;A String&quot;, # Title of the Form. Read-only.
254      },
255      &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.
256        &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the target URL. Read-only.
257        &quot;title&quot;: &quot;A String&quot;, # Title of the target of the URL. Read-only.
258        &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.
259      },
260      &quot;youtubeVideo&quot;: { # YouTube video item. # YouTube video material.
261        &quot;alternateLink&quot;: &quot;A String&quot;, # URL that can be used to view the YouTube video. Read-only.
262        &quot;id&quot;: &quot;A String&quot;, # YouTube API resource ID.
263        &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the YouTube video. Read-only.
264        &quot;title&quot;: &quot;A String&quot;, # Title of the YouTube video. Read-only.
265      },
266    },
267  ],
268  &quot;maxPoints&quot;: 3.14, # Maximum grade for this course work. If zero or unspecified, this assignment is considered ungraded. This must be a non-negative integer value.
269  &quot;multipleChoiceQuestion&quot;: { # Additional details for multiple-choice questions. # Multiple choice question details. For read operations, this field is populated only when `work_type` is `MULTIPLE_CHOICE_QUESTION`. For write operations, this field must be specified when creating course work with a `work_type` of `MULTIPLE_CHOICE_QUESTION`, and it must not be set otherwise.
270    &quot;choices&quot;: [ # Possible choices.
271      &quot;A String&quot;,
272    ],
273  },
274  &quot;scheduledTime&quot;: &quot;A String&quot;, # Optional timestamp when this course work is scheduled to be published.
275  &quot;state&quot;: &quot;A String&quot;, # Status of this course work. If unspecified, the default state is `DRAFT`.
276  &quot;submissionModificationMode&quot;: &quot;A String&quot;, # Setting to determine when students are allowed to modify submissions. If unspecified, the default value is `MODIFIABLE_UNTIL_TURNED_IN`.
277  &quot;title&quot;: &quot;A String&quot;, # Title of this course work. The title must be a valid UTF-8 string containing between 1 and 3000 characters.
278  &quot;topicId&quot;: &quot;A String&quot;, # Identifier for the topic that this coursework is associated with. Must match an existing topic in the course.
279  &quot;updateTime&quot;: &quot;A String&quot;, # Timestamp of the most recent change to this course work. Read-only.
280  &quot;workType&quot;: &quot;A String&quot;, # Type of this course work. The type is set when the course work is created and cannot be changed.
281}</pre>
282</div>
283
284<div class="method">
285    <code class="details" id="delete">delete(courseId, id, x__xgafv=None)</code>
286  <pre>Deletes a course work. This request must be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the corresponding course work item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting developer project did not create the corresponding course work, if the requesting user is not permitted to delete the requested course or for access errors. * `FAILED_PRECONDITION` if the requested course work has already been deleted. * `NOT_FOUND` if no course exists with the requested ID.
287
288Args:
289  courseId: string, Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. (required)
290  id: string, Identifier of the course work to delete. This identifier is a Classroom-assigned identifier. (required)
291  x__xgafv: string, V1 error format.
292    Allowed values
293      1 - v1 error format
294      2 - v2 error format
295
296Returns:
297  An object of the form:
298
299    { # 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); } The JSON representation for `Empty` is empty JSON object `{}`.
300}</pre>
301</div>
302
303<div class="method">
304    <code class="details" id="get">get(courseId, id, x__xgafv=None)</code>
305  <pre>Returns course work. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course or course work does not exist.
306
307Args:
308  courseId: string, Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. (required)
309  id: string, Identifier of the course work. (required)
310  x__xgafv: string, V1 error format.
311    Allowed values
312      1 - v1 error format
313      2 - v2 error format
314
315Returns:
316  An object of the form:
317
318    { # Course work created by a teacher for students of the course.
319  &quot;alternateLink&quot;: &quot;A String&quot;, # Absolute link to this course work in the Classroom web UI. This is only populated if `state` is `PUBLISHED`. Read-only.
320  &quot;assigneeMode&quot;: &quot;A String&quot;, # Assignee mode of the coursework. If unspecified, the default value is `ALL_STUDENTS`.
321  &quot;assignment&quot;: { # Additional details for assignments. # Assignment details. This is populated only when `work_type` is `ASSIGNMENT`. Read-only.
322    &quot;studentWorkFolder&quot;: { # Representation of a Google Drive folder. # Drive folder where attachments from student submissions are placed. This is only populated for course teachers and administrators.
323      &quot;alternateLink&quot;: &quot;A String&quot;, # URL that can be used to access the Drive folder. Read-only.
324      &quot;id&quot;: &quot;A String&quot;, # Drive API resource ID.
325      &quot;title&quot;: &quot;A String&quot;, # Title of the Drive folder. Read-only.
326    },
327  },
328  &quot;associatedWithDeveloper&quot;: True or False, # Whether this course work item is associated with the Developer Console project making the request. See CreateCourseWork for more details. Read-only.
329  &quot;courseId&quot;: &quot;A String&quot;, # Identifier of the course. Read-only.
330  &quot;creationTime&quot;: &quot;A String&quot;, # Timestamp when this course work was created. Read-only.
331  &quot;creatorUserId&quot;: &quot;A String&quot;, # Identifier for the user that created the coursework. Read-only.
332  &quot;description&quot;: &quot;A String&quot;, # Optional description of this course work. If set, the description must be a valid UTF-8 string containing no more than 30,000 characters.
333  &quot;dueDate&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values * A month and day value, with a zero year, such as an anniversary * A year on its own, with zero month and day values * A year and month value, with a zero day, such as a credit card expiration date Related types are google.type.TimeOfDay and `google.protobuf.Timestamp`. # Optional date, in UTC, that submissions for this course work are due. This must be specified if `due_time` is specified.
334    &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
335    &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
336    &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
337  },
338  &quot;dueTime&quot;: { # Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are google.type.Date and `google.protobuf.Timestamp`. # Optional time of day, in UTC, that submissions for this course work are due. This must be specified if `due_date` is specified.
339    &quot;hours&quot;: 42, # Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value &quot;24:00:00&quot; for scenarios like business closing time.
340    &quot;minutes&quot;: 42, # Minutes of hour of day. Must be from 0 to 59.
341    &quot;nanos&quot;: 42, # Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
342    &quot;seconds&quot;: 42, # Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.
343  },
344  &quot;id&quot;: &quot;A String&quot;, # Classroom-assigned identifier of this course work, unique per course. Read-only.
345  &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 coursework. This field is set only if `assigneeMode` is `INDIVIDUAL_STUDENTS`. If the `assigneeMode` is `INDIVIDUAL_STUDENTS`, then only students specified in this field are assigned the coursework.
346    &quot;studentIds&quot;: [ # Identifiers for the students that have access to the coursework/announcement.
347      &quot;A String&quot;,
348    ],
349  },
350  &quot;materials&quot;: [ # Additional materials. CourseWork must have no more than 20 material items.
351    { # Material attached to course work. When creating attachments, setting the `form` field is not supported.
352      &quot;driveFile&quot;: { # Drive file that is used as material for course work. # Google Drive file material.
353        &quot;driveFile&quot;: { # Representation of a Google Drive file. # Drive file details.
354          &quot;alternateLink&quot;: &quot;A String&quot;, # URL that can be used to access the Drive item. Read-only.
355          &quot;id&quot;: &quot;A String&quot;, # Drive API resource ID.
356          &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the Drive item. Read-only.
357          &quot;title&quot;: &quot;A String&quot;, # Title of the Drive item. Read-only.
358        },
359        &quot;shareMode&quot;: &quot;A String&quot;, # Mechanism by which students access the Drive item.
360      },
361      &quot;form&quot;: { # Google Forms item. # Google Forms material.
362        &quot;formUrl&quot;: &quot;A String&quot;, # URL of the form.
363        &quot;responseUrl&quot;: &quot;A String&quot;, # URL of the form responses document. Only set if respsonses have been recorded and only when the requesting user is an editor of the form. Read-only.
364        &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the Form. Read-only.
365        &quot;title&quot;: &quot;A String&quot;, # Title of the Form. Read-only.
366      },
367      &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.
368        &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the target URL. Read-only.
369        &quot;title&quot;: &quot;A String&quot;, # Title of the target of the URL. Read-only.
370        &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.
371      },
372      &quot;youtubeVideo&quot;: { # YouTube video item. # YouTube video material.
373        &quot;alternateLink&quot;: &quot;A String&quot;, # URL that can be used to view the YouTube video. Read-only.
374        &quot;id&quot;: &quot;A String&quot;, # YouTube API resource ID.
375        &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the YouTube video. Read-only.
376        &quot;title&quot;: &quot;A String&quot;, # Title of the YouTube video. Read-only.
377      },
378    },
379  ],
380  &quot;maxPoints&quot;: 3.14, # Maximum grade for this course work. If zero or unspecified, this assignment is considered ungraded. This must be a non-negative integer value.
381  &quot;multipleChoiceQuestion&quot;: { # Additional details for multiple-choice questions. # Multiple choice question details. For read operations, this field is populated only when `work_type` is `MULTIPLE_CHOICE_QUESTION`. For write operations, this field must be specified when creating course work with a `work_type` of `MULTIPLE_CHOICE_QUESTION`, and it must not be set otherwise.
382    &quot;choices&quot;: [ # Possible choices.
383      &quot;A String&quot;,
384    ],
385  },
386  &quot;scheduledTime&quot;: &quot;A String&quot;, # Optional timestamp when this course work is scheduled to be published.
387  &quot;state&quot;: &quot;A String&quot;, # Status of this course work. If unspecified, the default state is `DRAFT`.
388  &quot;submissionModificationMode&quot;: &quot;A String&quot;, # Setting to determine when students are allowed to modify submissions. If unspecified, the default value is `MODIFIABLE_UNTIL_TURNED_IN`.
389  &quot;title&quot;: &quot;A String&quot;, # Title of this course work. The title must be a valid UTF-8 string containing between 1 and 3000 characters.
390  &quot;topicId&quot;: &quot;A String&quot;, # Identifier for the topic that this coursework is associated with. Must match an existing topic in the course.
391  &quot;updateTime&quot;: &quot;A String&quot;, # Timestamp of the most recent change to this course work. Read-only.
392  &quot;workType&quot;: &quot;A String&quot;, # Type of this course work. The type is set when the course work is created and cannot be changed.
393}</pre>
394</div>
395
396<div class="method">
397    <code class="details" id="list">list(courseId, courseWorkStates=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)</code>
398  <pre>Returns a list of course work that the requester is permitted to view. Course students may only view `PUBLISHED` course work. Course teachers and domain administrators may view all course work. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course does not exist.
399
400Args:
401  courseId: string, Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. (required)
402  courseWorkStates: string, Restriction on the work status to return. Only courseWork that matches is returned. If unspecified, items with a work status of `PUBLISHED` is returned. (repeated)
403    Allowed values
404      COURSE_WORK_STATE_UNSPECIFIED - No state specified. This is never returned.
405      PUBLISHED - Status for work that has been published. This is the default state.
406      DRAFT - Status for work that is not yet published. Work in this state is visible only to course teachers and domain administrators.
407      DELETED - Status for work that was published but is now deleted. Work in this state is visible only to course teachers and domain administrators. Work in this state is deleted after some time.
408  orderBy: string, Optional sort ordering for results. A comma-separated list of fields with an optional sort direction keyword. Supported fields are `updateTime` and `dueDate`. Supported direction keywords are `asc` and `desc`. If not specified, `updateTime desc` is the default behavior. Examples: `dueDate asc,updateTime desc`, `updateTime,dueDate desc`
409  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.
410  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.
411  x__xgafv: string, V1 error format.
412    Allowed values
413      1 - v1 error format
414      2 - v2 error format
415
416Returns:
417  An object of the form:
418
419    { # Response when listing course work.
420  &quot;courseWork&quot;: [ # Course work items that match the request.
421    { # Course work created by a teacher for students of the course.
422      &quot;alternateLink&quot;: &quot;A String&quot;, # Absolute link to this course work in the Classroom web UI. This is only populated if `state` is `PUBLISHED`. Read-only.
423      &quot;assigneeMode&quot;: &quot;A String&quot;, # Assignee mode of the coursework. If unspecified, the default value is `ALL_STUDENTS`.
424      &quot;assignment&quot;: { # Additional details for assignments. # Assignment details. This is populated only when `work_type` is `ASSIGNMENT`. Read-only.
425        &quot;studentWorkFolder&quot;: { # Representation of a Google Drive folder. # Drive folder where attachments from student submissions are placed. This is only populated for course teachers and administrators.
426          &quot;alternateLink&quot;: &quot;A String&quot;, # URL that can be used to access the Drive folder. Read-only.
427          &quot;id&quot;: &quot;A String&quot;, # Drive API resource ID.
428          &quot;title&quot;: &quot;A String&quot;, # Title of the Drive folder. Read-only.
429        },
430      },
431      &quot;associatedWithDeveloper&quot;: True or False, # Whether this course work item is associated with the Developer Console project making the request. See CreateCourseWork for more details. Read-only.
432      &quot;courseId&quot;: &quot;A String&quot;, # Identifier of the course. Read-only.
433      &quot;creationTime&quot;: &quot;A String&quot;, # Timestamp when this course work was created. Read-only.
434      &quot;creatorUserId&quot;: &quot;A String&quot;, # Identifier for the user that created the coursework. Read-only.
435      &quot;description&quot;: &quot;A String&quot;, # Optional description of this course work. If set, the description must be a valid UTF-8 string containing no more than 30,000 characters.
436      &quot;dueDate&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values * A month and day value, with a zero year, such as an anniversary * A year on its own, with zero month and day values * A year and month value, with a zero day, such as a credit card expiration date Related types are google.type.TimeOfDay and `google.protobuf.Timestamp`. # Optional date, in UTC, that submissions for this course work are due. This must be specified if `due_time` is specified.
437        &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
438        &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
439        &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
440      },
441      &quot;dueTime&quot;: { # Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are google.type.Date and `google.protobuf.Timestamp`. # Optional time of day, in UTC, that submissions for this course work are due. This must be specified if `due_date` is specified.
442        &quot;hours&quot;: 42, # Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value &quot;24:00:00&quot; for scenarios like business closing time.
443        &quot;minutes&quot;: 42, # Minutes of hour of day. Must be from 0 to 59.
444        &quot;nanos&quot;: 42, # Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
445        &quot;seconds&quot;: 42, # Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.
446      },
447      &quot;id&quot;: &quot;A String&quot;, # Classroom-assigned identifier of this course work, unique per course. Read-only.
448      &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 coursework. This field is set only if `assigneeMode` is `INDIVIDUAL_STUDENTS`. If the `assigneeMode` is `INDIVIDUAL_STUDENTS`, then only students specified in this field are assigned the coursework.
449        &quot;studentIds&quot;: [ # Identifiers for the students that have access to the coursework/announcement.
450          &quot;A String&quot;,
451        ],
452      },
453      &quot;materials&quot;: [ # Additional materials. CourseWork must have no more than 20 material items.
454        { # Material attached to course work. When creating attachments, setting the `form` field is not supported.
455          &quot;driveFile&quot;: { # Drive file that is used as material for course work. # Google Drive file material.
456            &quot;driveFile&quot;: { # Representation of a Google Drive file. # Drive file details.
457              &quot;alternateLink&quot;: &quot;A String&quot;, # URL that can be used to access the Drive item. Read-only.
458              &quot;id&quot;: &quot;A String&quot;, # Drive API resource ID.
459              &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the Drive item. Read-only.
460              &quot;title&quot;: &quot;A String&quot;, # Title of the Drive item. Read-only.
461            },
462            &quot;shareMode&quot;: &quot;A String&quot;, # Mechanism by which students access the Drive item.
463          },
464          &quot;form&quot;: { # Google Forms item. # Google Forms material.
465            &quot;formUrl&quot;: &quot;A String&quot;, # URL of the form.
466            &quot;responseUrl&quot;: &quot;A String&quot;, # URL of the form responses document. Only set if respsonses have been recorded and only when the requesting user is an editor of the form. Read-only.
467            &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the Form. Read-only.
468            &quot;title&quot;: &quot;A String&quot;, # Title of the Form. Read-only.
469          },
470          &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.
471            &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the target URL. Read-only.
472            &quot;title&quot;: &quot;A String&quot;, # Title of the target of the URL. Read-only.
473            &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.
474          },
475          &quot;youtubeVideo&quot;: { # YouTube video item. # YouTube video material.
476            &quot;alternateLink&quot;: &quot;A String&quot;, # URL that can be used to view the YouTube video. Read-only.
477            &quot;id&quot;: &quot;A String&quot;, # YouTube API resource ID.
478            &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the YouTube video. Read-only.
479            &quot;title&quot;: &quot;A String&quot;, # Title of the YouTube video. Read-only.
480          },
481        },
482      ],
483      &quot;maxPoints&quot;: 3.14, # Maximum grade for this course work. If zero or unspecified, this assignment is considered ungraded. This must be a non-negative integer value.
484      &quot;multipleChoiceQuestion&quot;: { # Additional details for multiple-choice questions. # Multiple choice question details. For read operations, this field is populated only when `work_type` is `MULTIPLE_CHOICE_QUESTION`. For write operations, this field must be specified when creating course work with a `work_type` of `MULTIPLE_CHOICE_QUESTION`, and it must not be set otherwise.
485        &quot;choices&quot;: [ # Possible choices.
486          &quot;A String&quot;,
487        ],
488      },
489      &quot;scheduledTime&quot;: &quot;A String&quot;, # Optional timestamp when this course work is scheduled to be published.
490      &quot;state&quot;: &quot;A String&quot;, # Status of this course work. If unspecified, the default state is `DRAFT`.
491      &quot;submissionModificationMode&quot;: &quot;A String&quot;, # Setting to determine when students are allowed to modify submissions. If unspecified, the default value is `MODIFIABLE_UNTIL_TURNED_IN`.
492      &quot;title&quot;: &quot;A String&quot;, # Title of this course work. The title must be a valid UTF-8 string containing between 1 and 3000 characters.
493      &quot;topicId&quot;: &quot;A String&quot;, # Identifier for the topic that this coursework is associated with. Must match an existing topic in the course.
494      &quot;updateTime&quot;: &quot;A String&quot;, # Timestamp of the most recent change to this course work. Read-only.
495      &quot;workType&quot;: &quot;A String&quot;, # Type of this course work. The type is set when the course work is created and cannot be changed.
496    },
497  ],
498  &quot;nextPageToken&quot;: &quot;A String&quot;, # Token identifying the next page of results to return. If empty, no further results are available.
499}</pre>
500</div>
501
502<div class="method">
503    <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
504  <pre>Retrieves the next page of results.
505
506Args:
507  previous_request: The request for the previous page. (required)
508  previous_response: The response from the request for the previous page. (required)
509
510Returns:
511  A request object that you can call &#x27;execute()&#x27; on to request the next
512  page. Returns None if there are no more items in the collection.
513    </pre>
514</div>
515
516<div class="method">
517    <code class="details" id="modifyAssignees">modifyAssignees(courseId, id, body=None, x__xgafv=None)</code>
518  <pre>Modifies assignee mode and options of a coursework. Only a teacher of the course that contains the coursework may call this method. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course or course work does not exist.
519
520Args:
521  courseId: string, Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. (required)
522  id: string, Identifier of the coursework. (required)
523  body: object, The request body.
524    The object takes the form of:
525
526{ # Request to modify assignee mode and options of a coursework.
527  &quot;assigneeMode&quot;: &quot;A String&quot;, # Mode of the coursework describing whether it will be assigned to all students or specified individual students.
528  &quot;modifyIndividualStudentsOptions&quot;: { # Contains fields to add or remove students from a course work or announcement where the `assigneeMode` is set to `INDIVIDUAL_STUDENTS`. # Set which students are assigned or not assigned to the coursework. Must be specified only when `assigneeMode` is `INDIVIDUAL_STUDENTS`.
529    &quot;addStudentIds&quot;: [ # IDs of students to be added as having access to this coursework/announcement.
530      &quot;A String&quot;,
531    ],
532    &quot;removeStudentIds&quot;: [ # IDs of students to be removed from having access to this coursework/announcement.
533      &quot;A String&quot;,
534    ],
535  },
536}
537
538  x__xgafv: string, V1 error format.
539    Allowed values
540      1 - v1 error format
541      2 - v2 error format
542
543Returns:
544  An object of the form:
545
546    { # Course work created by a teacher for students of the course.
547  &quot;alternateLink&quot;: &quot;A String&quot;, # Absolute link to this course work in the Classroom web UI. This is only populated if `state` is `PUBLISHED`. Read-only.
548  &quot;assigneeMode&quot;: &quot;A String&quot;, # Assignee mode of the coursework. If unspecified, the default value is `ALL_STUDENTS`.
549  &quot;assignment&quot;: { # Additional details for assignments. # Assignment details. This is populated only when `work_type` is `ASSIGNMENT`. Read-only.
550    &quot;studentWorkFolder&quot;: { # Representation of a Google Drive folder. # Drive folder where attachments from student submissions are placed. This is only populated for course teachers and administrators.
551      &quot;alternateLink&quot;: &quot;A String&quot;, # URL that can be used to access the Drive folder. Read-only.
552      &quot;id&quot;: &quot;A String&quot;, # Drive API resource ID.
553      &quot;title&quot;: &quot;A String&quot;, # Title of the Drive folder. Read-only.
554    },
555  },
556  &quot;associatedWithDeveloper&quot;: True or False, # Whether this course work item is associated with the Developer Console project making the request. See CreateCourseWork for more details. Read-only.
557  &quot;courseId&quot;: &quot;A String&quot;, # Identifier of the course. Read-only.
558  &quot;creationTime&quot;: &quot;A String&quot;, # Timestamp when this course work was created. Read-only.
559  &quot;creatorUserId&quot;: &quot;A String&quot;, # Identifier for the user that created the coursework. Read-only.
560  &quot;description&quot;: &quot;A String&quot;, # Optional description of this course work. If set, the description must be a valid UTF-8 string containing no more than 30,000 characters.
561  &quot;dueDate&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values * A month and day value, with a zero year, such as an anniversary * A year on its own, with zero month and day values * A year and month value, with a zero day, such as a credit card expiration date Related types are google.type.TimeOfDay and `google.protobuf.Timestamp`. # Optional date, in UTC, that submissions for this course work are due. This must be specified if `due_time` is specified.
562    &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
563    &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
564    &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
565  },
566  &quot;dueTime&quot;: { # Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are google.type.Date and `google.protobuf.Timestamp`. # Optional time of day, in UTC, that submissions for this course work are due. This must be specified if `due_date` is specified.
567    &quot;hours&quot;: 42, # Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value &quot;24:00:00&quot; for scenarios like business closing time.
568    &quot;minutes&quot;: 42, # Minutes of hour of day. Must be from 0 to 59.
569    &quot;nanos&quot;: 42, # Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
570    &quot;seconds&quot;: 42, # Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.
571  },
572  &quot;id&quot;: &quot;A String&quot;, # Classroom-assigned identifier of this course work, unique per course. Read-only.
573  &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 coursework. This field is set only if `assigneeMode` is `INDIVIDUAL_STUDENTS`. If the `assigneeMode` is `INDIVIDUAL_STUDENTS`, then only students specified in this field are assigned the coursework.
574    &quot;studentIds&quot;: [ # Identifiers for the students that have access to the coursework/announcement.
575      &quot;A String&quot;,
576    ],
577  },
578  &quot;materials&quot;: [ # Additional materials. CourseWork must have no more than 20 material items.
579    { # Material attached to course work. When creating attachments, setting the `form` field is not supported.
580      &quot;driveFile&quot;: { # Drive file that is used as material for course work. # Google Drive file material.
581        &quot;driveFile&quot;: { # Representation of a Google Drive file. # Drive file details.
582          &quot;alternateLink&quot;: &quot;A String&quot;, # URL that can be used to access the Drive item. Read-only.
583          &quot;id&quot;: &quot;A String&quot;, # Drive API resource ID.
584          &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the Drive item. Read-only.
585          &quot;title&quot;: &quot;A String&quot;, # Title of the Drive item. Read-only.
586        },
587        &quot;shareMode&quot;: &quot;A String&quot;, # Mechanism by which students access the Drive item.
588      },
589      &quot;form&quot;: { # Google Forms item. # Google Forms material.
590        &quot;formUrl&quot;: &quot;A String&quot;, # URL of the form.
591        &quot;responseUrl&quot;: &quot;A String&quot;, # URL of the form responses document. Only set if respsonses have been recorded and only when the requesting user is an editor of the form. Read-only.
592        &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the Form. Read-only.
593        &quot;title&quot;: &quot;A String&quot;, # Title of the Form. Read-only.
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;youtubeVideo&quot;: { # YouTube video item. # YouTube video material.
601        &quot;alternateLink&quot;: &quot;A String&quot;, # URL that can be used to view the YouTube video. Read-only.
602        &quot;id&quot;: &quot;A String&quot;, # YouTube API resource ID.
603        &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the YouTube video. Read-only.
604        &quot;title&quot;: &quot;A String&quot;, # Title of the YouTube video. Read-only.
605      },
606    },
607  ],
608  &quot;maxPoints&quot;: 3.14, # Maximum grade for this course work. If zero or unspecified, this assignment is considered ungraded. This must be a non-negative integer value.
609  &quot;multipleChoiceQuestion&quot;: { # Additional details for multiple-choice questions. # Multiple choice question details. For read operations, this field is populated only when `work_type` is `MULTIPLE_CHOICE_QUESTION`. For write operations, this field must be specified when creating course work with a `work_type` of `MULTIPLE_CHOICE_QUESTION`, and it must not be set otherwise.
610    &quot;choices&quot;: [ # Possible choices.
611      &quot;A String&quot;,
612    ],
613  },
614  &quot;scheduledTime&quot;: &quot;A String&quot;, # Optional timestamp when this course work is scheduled to be published.
615  &quot;state&quot;: &quot;A String&quot;, # Status of this course work. If unspecified, the default state is `DRAFT`.
616  &quot;submissionModificationMode&quot;: &quot;A String&quot;, # Setting to determine when students are allowed to modify submissions. If unspecified, the default value is `MODIFIABLE_UNTIL_TURNED_IN`.
617  &quot;title&quot;: &quot;A String&quot;, # Title of this course work. The title must be a valid UTF-8 string containing between 1 and 3000 characters.
618  &quot;topicId&quot;: &quot;A String&quot;, # Identifier for the topic that this coursework is associated with. Must match an existing topic in the course.
619  &quot;updateTime&quot;: &quot;A String&quot;, # Timestamp of the most recent change to this course work. Read-only.
620  &quot;workType&quot;: &quot;A String&quot;, # Type of this course work. The type is set when the course work is created and cannot be changed.
621}</pre>
622</div>
623
624<div class="method">
625    <code class="details" id="patch">patch(courseId, id, body=None, updateMask=None, x__xgafv=None)</code>
626  <pre>Updates one or more fields of a course work. See google.classroom.v1.CourseWork for details of which fields may be updated and who may change them. This request must be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the corresponding course work item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting developer project did not create the corresponding course work, if the user is not permitted to make the requested modification to the student submission, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `FAILED_PRECONDITION` if the requested course work has already been deleted. * `NOT_FOUND` if the requested course, course work, or student submission does not exist.
627
628Args:
629  courseId: string, Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. (required)
630  id: string, Identifier of the course work. (required)
631  body: object, The request body.
632    The object takes the form of:
633
634{ # Course work created by a teacher for students of the course.
635  &quot;alternateLink&quot;: &quot;A String&quot;, # Absolute link to this course work in the Classroom web UI. This is only populated if `state` is `PUBLISHED`. Read-only.
636  &quot;assigneeMode&quot;: &quot;A String&quot;, # Assignee mode of the coursework. If unspecified, the default value is `ALL_STUDENTS`.
637  &quot;assignment&quot;: { # Additional details for assignments. # Assignment details. This is populated only when `work_type` is `ASSIGNMENT`. Read-only.
638    &quot;studentWorkFolder&quot;: { # Representation of a Google Drive folder. # Drive folder where attachments from student submissions are placed. This is only populated for course teachers and administrators.
639      &quot;alternateLink&quot;: &quot;A String&quot;, # URL that can be used to access the Drive folder. Read-only.
640      &quot;id&quot;: &quot;A String&quot;, # Drive API resource ID.
641      &quot;title&quot;: &quot;A String&quot;, # Title of the Drive folder. Read-only.
642    },
643  },
644  &quot;associatedWithDeveloper&quot;: True or False, # Whether this course work item is associated with the Developer Console project making the request. See CreateCourseWork for more details. Read-only.
645  &quot;courseId&quot;: &quot;A String&quot;, # Identifier of the course. Read-only.
646  &quot;creationTime&quot;: &quot;A String&quot;, # Timestamp when this course work was created. Read-only.
647  &quot;creatorUserId&quot;: &quot;A String&quot;, # Identifier for the user that created the coursework. Read-only.
648  &quot;description&quot;: &quot;A String&quot;, # Optional description of this course work. If set, the description must be a valid UTF-8 string containing no more than 30,000 characters.
649  &quot;dueDate&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values * A month and day value, with a zero year, such as an anniversary * A year on its own, with zero month and day values * A year and month value, with a zero day, such as a credit card expiration date Related types are google.type.TimeOfDay and `google.protobuf.Timestamp`. # Optional date, in UTC, that submissions for this course work are due. This must be specified if `due_time` is specified.
650    &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
651    &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
652    &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
653  },
654  &quot;dueTime&quot;: { # Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are google.type.Date and `google.protobuf.Timestamp`. # Optional time of day, in UTC, that submissions for this course work are due. This must be specified if `due_date` is specified.
655    &quot;hours&quot;: 42, # Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value &quot;24:00:00&quot; for scenarios like business closing time.
656    &quot;minutes&quot;: 42, # Minutes of hour of day. Must be from 0 to 59.
657    &quot;nanos&quot;: 42, # Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
658    &quot;seconds&quot;: 42, # Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.
659  },
660  &quot;id&quot;: &quot;A String&quot;, # Classroom-assigned identifier of this course work, unique per course. Read-only.
661  &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 coursework. This field is set only if `assigneeMode` is `INDIVIDUAL_STUDENTS`. If the `assigneeMode` is `INDIVIDUAL_STUDENTS`, then only students specified in this field are assigned the coursework.
662    &quot;studentIds&quot;: [ # Identifiers for the students that have access to the coursework/announcement.
663      &quot;A String&quot;,
664    ],
665  },
666  &quot;materials&quot;: [ # Additional materials. CourseWork must have no more than 20 material items.
667    { # Material attached to course work. When creating attachments, setting the `form` field is not supported.
668      &quot;driveFile&quot;: { # Drive file that is used as material for course work. # Google Drive file material.
669        &quot;driveFile&quot;: { # Representation of a Google Drive file. # Drive file details.
670          &quot;alternateLink&quot;: &quot;A String&quot;, # URL that can be used to access the Drive item. Read-only.
671          &quot;id&quot;: &quot;A String&quot;, # Drive API resource ID.
672          &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the Drive item. Read-only.
673          &quot;title&quot;: &quot;A String&quot;, # Title of the Drive item. Read-only.
674        },
675        &quot;shareMode&quot;: &quot;A String&quot;, # Mechanism by which students access the Drive item.
676      },
677      &quot;form&quot;: { # Google Forms item. # Google Forms material.
678        &quot;formUrl&quot;: &quot;A String&quot;, # URL of the form.
679        &quot;responseUrl&quot;: &quot;A String&quot;, # URL of the form responses document. Only set if respsonses have been recorded and only when the requesting user is an editor of the form. Read-only.
680        &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the Form. Read-only.
681        &quot;title&quot;: &quot;A String&quot;, # Title of the Form. Read-only.
682      },
683      &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.
684        &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the target URL. Read-only.
685        &quot;title&quot;: &quot;A String&quot;, # Title of the target of the URL. Read-only.
686        &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.
687      },
688      &quot;youtubeVideo&quot;: { # YouTube video item. # YouTube video material.
689        &quot;alternateLink&quot;: &quot;A String&quot;, # URL that can be used to view the YouTube video. Read-only.
690        &quot;id&quot;: &quot;A String&quot;, # YouTube API resource ID.
691        &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the YouTube video. Read-only.
692        &quot;title&quot;: &quot;A String&quot;, # Title of the YouTube video. Read-only.
693      },
694    },
695  ],
696  &quot;maxPoints&quot;: 3.14, # Maximum grade for this course work. If zero or unspecified, this assignment is considered ungraded. This must be a non-negative integer value.
697  &quot;multipleChoiceQuestion&quot;: { # Additional details for multiple-choice questions. # Multiple choice question details. For read operations, this field is populated only when `work_type` is `MULTIPLE_CHOICE_QUESTION`. For write operations, this field must be specified when creating course work with a `work_type` of `MULTIPLE_CHOICE_QUESTION`, and it must not be set otherwise.
698    &quot;choices&quot;: [ # Possible choices.
699      &quot;A String&quot;,
700    ],
701  },
702  &quot;scheduledTime&quot;: &quot;A String&quot;, # Optional timestamp when this course work is scheduled to be published.
703  &quot;state&quot;: &quot;A String&quot;, # Status of this course work. If unspecified, the default state is `DRAFT`.
704  &quot;submissionModificationMode&quot;: &quot;A String&quot;, # Setting to determine when students are allowed to modify submissions. If unspecified, the default value is `MODIFIABLE_UNTIL_TURNED_IN`.
705  &quot;title&quot;: &quot;A String&quot;, # Title of this course work. The title must be a valid UTF-8 string containing between 1 and 3000 characters.
706  &quot;topicId&quot;: &quot;A String&quot;, # Identifier for the topic that this coursework is associated with. Must match an existing topic in the course.
707  &quot;updateTime&quot;: &quot;A String&quot;, # Timestamp of the most recent change to this course work. Read-only.
708  &quot;workType&quot;: &quot;A String&quot;, # Type of this course work. The type is set when the course work is created and cannot be changed.
709}
710
711  updateMask: string, Mask that identifies which fields on the course work to update. This field is required to do an update. The update fails if invalid fields are specified. If a field supports empty values, it can be cleared by specifying it in the update mask and not in the CourseWork object. If a field that does not support empty values is included in the update mask and not set in the CourseWork object, an `INVALID_ARGUMENT` error is returned. The following fields may be specified by teachers: * `title` * `description` * `state` * `due_date` * `due_time` * `max_points` * `scheduled_time` * `submission_modification_mode` * `topic_id`
712  x__xgafv: string, V1 error format.
713    Allowed values
714      1 - v1 error format
715      2 - v2 error format
716
717Returns:
718  An object of the form:
719
720    { # Course work created by a teacher for students of the course.
721  &quot;alternateLink&quot;: &quot;A String&quot;, # Absolute link to this course work in the Classroom web UI. This is only populated if `state` is `PUBLISHED`. Read-only.
722  &quot;assigneeMode&quot;: &quot;A String&quot;, # Assignee mode of the coursework. If unspecified, the default value is `ALL_STUDENTS`.
723  &quot;assignment&quot;: { # Additional details for assignments. # Assignment details. This is populated only when `work_type` is `ASSIGNMENT`. Read-only.
724    &quot;studentWorkFolder&quot;: { # Representation of a Google Drive folder. # Drive folder where attachments from student submissions are placed. This is only populated for course teachers and administrators.
725      &quot;alternateLink&quot;: &quot;A String&quot;, # URL that can be used to access the Drive folder. Read-only.
726      &quot;id&quot;: &quot;A String&quot;, # Drive API resource ID.
727      &quot;title&quot;: &quot;A String&quot;, # Title of the Drive folder. Read-only.
728    },
729  },
730  &quot;associatedWithDeveloper&quot;: True or False, # Whether this course work item is associated with the Developer Console project making the request. See CreateCourseWork for more details. Read-only.
731  &quot;courseId&quot;: &quot;A String&quot;, # Identifier of the course. Read-only.
732  &quot;creationTime&quot;: &quot;A String&quot;, # Timestamp when this course work was created. Read-only.
733  &quot;creatorUserId&quot;: &quot;A String&quot;, # Identifier for the user that created the coursework. Read-only.
734  &quot;description&quot;: &quot;A String&quot;, # Optional description of this course work. If set, the description must be a valid UTF-8 string containing no more than 30,000 characters.
735  &quot;dueDate&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values * A month and day value, with a zero year, such as an anniversary * A year on its own, with zero month and day values * A year and month value, with a zero day, such as a credit card expiration date Related types are google.type.TimeOfDay and `google.protobuf.Timestamp`. # Optional date, in UTC, that submissions for this course work are due. This must be specified if `due_time` is specified.
736    &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
737    &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
738    &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
739  },
740  &quot;dueTime&quot;: { # Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are google.type.Date and `google.protobuf.Timestamp`. # Optional time of day, in UTC, that submissions for this course work are due. This must be specified if `due_date` is specified.
741    &quot;hours&quot;: 42, # Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value &quot;24:00:00&quot; for scenarios like business closing time.
742    &quot;minutes&quot;: 42, # Minutes of hour of day. Must be from 0 to 59.
743    &quot;nanos&quot;: 42, # Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
744    &quot;seconds&quot;: 42, # Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.
745  },
746  &quot;id&quot;: &quot;A String&quot;, # Classroom-assigned identifier of this course work, unique per course. Read-only.
747  &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 coursework. This field is set only if `assigneeMode` is `INDIVIDUAL_STUDENTS`. If the `assigneeMode` is `INDIVIDUAL_STUDENTS`, then only students specified in this field are assigned the coursework.
748    &quot;studentIds&quot;: [ # Identifiers for the students that have access to the coursework/announcement.
749      &quot;A String&quot;,
750    ],
751  },
752  &quot;materials&quot;: [ # Additional materials. CourseWork must have no more than 20 material items.
753    { # Material attached to course work. When creating attachments, setting the `form` field is not supported.
754      &quot;driveFile&quot;: { # Drive file that is used as material for course work. # Google Drive file material.
755        &quot;driveFile&quot;: { # Representation of a Google Drive file. # Drive file details.
756          &quot;alternateLink&quot;: &quot;A String&quot;, # URL that can be used to access the Drive item. Read-only.
757          &quot;id&quot;: &quot;A String&quot;, # Drive API resource ID.
758          &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the Drive item. Read-only.
759          &quot;title&quot;: &quot;A String&quot;, # Title of the Drive item. Read-only.
760        },
761        &quot;shareMode&quot;: &quot;A String&quot;, # Mechanism by which students access the Drive item.
762      },
763      &quot;form&quot;: { # Google Forms item. # Google Forms material.
764        &quot;formUrl&quot;: &quot;A String&quot;, # URL of the form.
765        &quot;responseUrl&quot;: &quot;A String&quot;, # URL of the form responses document. Only set if respsonses have been recorded and only when the requesting user is an editor of the form. Read-only.
766        &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the Form. Read-only.
767        &quot;title&quot;: &quot;A String&quot;, # Title of the Form. Read-only.
768      },
769      &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.
770        &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the target URL. Read-only.
771        &quot;title&quot;: &quot;A String&quot;, # Title of the target of the URL. Read-only.
772        &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.
773      },
774      &quot;youtubeVideo&quot;: { # YouTube video item. # YouTube video material.
775        &quot;alternateLink&quot;: &quot;A String&quot;, # URL that can be used to view the YouTube video. Read-only.
776        &quot;id&quot;: &quot;A String&quot;, # YouTube API resource ID.
777        &quot;thumbnailUrl&quot;: &quot;A String&quot;, # URL of a thumbnail image of the YouTube video. Read-only.
778        &quot;title&quot;: &quot;A String&quot;, # Title of the YouTube video. Read-only.
779      },
780    },
781  ],
782  &quot;maxPoints&quot;: 3.14, # Maximum grade for this course work. If zero or unspecified, this assignment is considered ungraded. This must be a non-negative integer value.
783  &quot;multipleChoiceQuestion&quot;: { # Additional details for multiple-choice questions. # Multiple choice question details. For read operations, this field is populated only when `work_type` is `MULTIPLE_CHOICE_QUESTION`. For write operations, this field must be specified when creating course work with a `work_type` of `MULTIPLE_CHOICE_QUESTION`, and it must not be set otherwise.
784    &quot;choices&quot;: [ # Possible choices.
785      &quot;A String&quot;,
786    ],
787  },
788  &quot;scheduledTime&quot;: &quot;A String&quot;, # Optional timestamp when this course work is scheduled to be published.
789  &quot;state&quot;: &quot;A String&quot;, # Status of this course work. If unspecified, the default state is `DRAFT`.
790  &quot;submissionModificationMode&quot;: &quot;A String&quot;, # Setting to determine when students are allowed to modify submissions. If unspecified, the default value is `MODIFIABLE_UNTIL_TURNED_IN`.
791  &quot;title&quot;: &quot;A String&quot;, # Title of this course work. The title must be a valid UTF-8 string containing between 1 and 3000 characters.
792  &quot;topicId&quot;: &quot;A String&quot;, # Identifier for the topic that this coursework is associated with. Must match an existing topic in the course.
793  &quot;updateTime&quot;: &quot;A String&quot;, # Timestamp of the most recent change to this course work. Read-only.
794  &quot;workType&quot;: &quot;A String&quot;, # Type of this course work. The type is set when the course work is created and cannot be changed.
795}</pre>
796</div>
797
798</body></html>