Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(457)

Side by Side Diff: generated/googleapis/lib/classroom/v1.dart

Issue 2281923002: Api-roll 41: 2016-08-26 (Closed) Base URL: git@github.com:dart-lang/googleapis.git@master
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « generated/googleapis/lib/civicinfo/v2.dart ('k') | generated/googleapis/lib/cloudbuild/v1.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // This is a generated file (see the discoveryapis_generator project). 1 // This is a generated file (see the discoveryapis_generator project).
2 2
3 library googleapis.classroom.v1; 3 library googleapis.classroom.v1;
4 4
5 import 'dart:core' as core; 5 import 'dart:core' as core;
6 import 'dart:async' as async; 6 import 'dart:async' as async;
7 import 'dart:convert' as convert; 7 import 'dart:convert' as convert;
8 8
9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons;
10 import 'package:http/http.dart' as http; 10 import 'package:http/http.dart' as http;
(...skipping 813 matching lines...) Expand 10 before | Expand all | Expand 10 after
824 * returns the following error codes: * `PERMISSION_DENIED` if the requesting 824 * returns the following error codes: * `PERMISSION_DENIED` if the requesting
825 * user is not permitted to access the requested course or course work, or for 825 * user is not permitted to access the requested course or course work, or for
826 * access errors. * `INVALID_ARGUMENT` if the request is malformed. * 826 * access errors. * `INVALID_ARGUMENT` if the request is malformed. *
827 * `NOT_FOUND` if the requested course does not exist. 827 * `NOT_FOUND` if the requested course does not exist.
828 * 828 *
829 * Request parameters: 829 * Request parameters:
830 * 830 *
831 * [courseId] - Identifier of the course. This identifier can be either the 831 * [courseId] - Identifier of the course. This identifier can be either the
832 * Classroom-assigned identifier or an alias. 832 * Classroom-assigned identifier or an alias.
833 * 833 *
834 * [courseWorkId] - Identifer of the student work to request. If `user_id` is 834 * [courseWorkId] - Identifer of the student work to request. This may be set
835 * specified, this may be set to the string literal `"-"` to request student 835 * to the string literal `"-"` to request student work for all course work in
836 * work for all course work in the specified course. 836 * the specified course.
837 * 837 *
838 * [userId] - Optional argument to restrict returned student work to those 838 * [userId] - Optional argument to restrict returned student work to those
839 * owned by the student with the specified identifier. The identifier can be 839 * owned by the student with the specified identifier. The identifier can be
840 * one of the following: * the numeric identifier for the user * the email 840 * one of the following: * the numeric identifier for the user * the email
841 * address of the user * the string literal `"me"`, indicating the requesting 841 * address of the user * the string literal `"me"`, indicating the requesting
842 * user 842 * user
843 * 843 *
844 * [states] - Requested submission states. If specified, returned student 844 * [states] - Requested submission states. If specified, returned student
845 * submissions match one of the specified submission states. 845 * submissions match one of the specified submission states.
846 * 846 *
(...skipping 1098 matching lines...) Expand 10 before | Expand all | Expand 10 after
1945 downloadOptions: _downloadOptions); 1945 downloadOptions: _downloadOptions);
1946 return _response.then((data) => new ListInvitationsResponse.fromJson(data)); 1946 return _response.then((data) => new ListInvitationsResponse.fromJson(data));
1947 } 1947 }
1948 1948
1949 } 1949 }
1950 1950
1951 1951
1952 class UserProfilesResourceApi { 1952 class UserProfilesResourceApi {
1953 final commons.ApiRequester _requester; 1953 final commons.ApiRequester _requester;
1954 1954
1955 UserProfilesGuardianInvitationsResourceApi get guardianInvitations => new User ProfilesGuardianInvitationsResourceApi(_requester);
1956 UserProfilesGuardiansResourceApi get guardians => new UserProfilesGuardiansRes ourceApi(_requester);
1957
1955 UserProfilesResourceApi(commons.ApiRequester client) : 1958 UserProfilesResourceApi(commons.ApiRequester client) :
1956 _requester = client; 1959 _requester = client;
1957 1960
1958 /** 1961 /**
1959 * Returns a user profile. This method returns the following error codes: * 1962 * Returns a user profile. This method returns the following error codes: *
1960 * `PERMISSION_DENIED` if the requesting user is not permitted to access this 1963 * `PERMISSION_DENIED` if the requesting user is not permitted to access this
1961 * user profile or if no profile exists with the requested ID or for access 1964 * user profile or if no profile exists with the requested ID or for access
1962 * errors. 1965 * errors.
1963 * 1966 *
1964 * Request parameters: 1967 * Request parameters:
(...skipping 30 matching lines...) Expand all
1995 queryParams: _queryParams, 1998 queryParams: _queryParams,
1996 uploadOptions: _uploadOptions, 1999 uploadOptions: _uploadOptions,
1997 uploadMedia: _uploadMedia, 2000 uploadMedia: _uploadMedia,
1998 downloadOptions: _downloadOptions); 2001 downloadOptions: _downloadOptions);
1999 return _response.then((data) => new UserProfile.fromJson(data)); 2002 return _response.then((data) => new UserProfile.fromJson(data));
2000 } 2003 }
2001 2004
2002 } 2005 }
2003 2006
2004 2007
2008 class UserProfilesGuardianInvitationsResourceApi {
2009 final commons.ApiRequester _requester;
2010
2011 UserProfilesGuardianInvitationsResourceApi(commons.ApiRequester client) :
2012 _requester = client;
2013
2014 /**
2015 * Creates a guardian invitation, and sends an email to the guardian asking
2016 * them to confirm that they are the student's guardian. Once the guardian
2017 * accepts the invitation, their `state` will change to `COMPLETED` and they
2018 * will start receiving guardian notifications. A `Guardian` resource will
2019 * also be created to represent the active guardian. The request object must
2020 * have the `student_id` and `invited_email_address` fields set. Failing to
2021 * set these fields, or setting any other fields in the request, will result
2022 * in an error. This method returns the following error codes: *
2023 * `PERMISSION_DENIED` if the current user does not have permission to manage
2024 * guardians, if the guardian in question has already rejected too many
2025 * requests for that student, if guardians are not enabled for the domain in
2026 * question, or for other access errors. * `RESOURCE_EXHAUSTED` if the student
2027 * or guardian has exceeded the guardian link limit. * `INVALID_ARGUMENT` if
2028 * the guardian email address is not valid (for example, if it is too long),
2029 * or if the format of the student ID provided cannot be recognized (it is not
2030 * an email address, nor a `user_id` from this API). This error will also be
2031 * returned if read-only fields are set, or if the `state` field is set to to
2032 * a value other than `PENDING`. * `NOT_FOUND` if the student ID provided is a
2033 * valid student ID, but Classroom has no record of that student. *
2034 * `ALREADY_EXISTS` if there is already a pending guardian invitation for the
2035 * student and `invited_email_address` provided, or if the provided
2036 * `invited_email_address` matches the Google account of an existing
2037 * `Guardian` for this user.
2038 *
2039 * [request] - The metadata request object.
2040 *
2041 * Request parameters:
2042 *
2043 * [studentId] - ID of the student (in standard format)
2044 *
2045 * Completes with a [GuardianInvitation].
2046 *
2047 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2048 * error.
2049 *
2050 * If the used [http.Client] completes with an error when making a REST call,
2051 * this method will complete with the same error.
2052 */
2053 async.Future<GuardianInvitation> create(GuardianInvitation request, core.Strin g studentId) {
2054 var _url = null;
2055 var _queryParams = new core.Map();
2056 var _uploadMedia = null;
2057 var _uploadOptions = null;
2058 var _downloadOptions = commons.DownloadOptions.Metadata;
2059 var _body = null;
2060
2061 if (request != null) {
2062 _body = convert.JSON.encode((request).toJson());
2063 }
2064 if (studentId == null) {
2065 throw new core.ArgumentError("Parameter studentId is required.");
2066 }
2067
2068 _url = 'v1/userProfiles/' + commons.Escaper.ecapeVariable('$studentId') + '/ guardianInvitations';
2069
2070 var _response = _requester.request(_url,
2071 "POST",
2072 body: _body,
2073 queryParams: _queryParams,
2074 uploadOptions: _uploadOptions,
2075 uploadMedia: _uploadMedia,
2076 downloadOptions: _downloadOptions);
2077 return _response.then((data) => new GuardianInvitation.fromJson(data));
2078 }
2079
2080 /**
2081 * Returns a specific guardian invitation. This method returns the following
2082 * error codes: * `PERMISSION_DENIED` if the requesting user is not permitted
2083 * to view guardian invitations for the student identified by the
2084 * `student_id`, if guardians are not enabled for the domain in question, or
2085 * for other access errors. * `INVALID_ARGUMENT` if a `student_id` is
2086 * specified, but its format cannot be recognized (it is not an email address,
2087 * nor a `student_id` from the API, nor the literal string `me`). *
2088 * `NOT_FOUND` if Classroom cannot find any record of the given student or
2089 * `invitation_id`. May also be returned if the student exists, but the
2090 * requesting user does not have access to see that student.
2091 *
2092 * Request parameters:
2093 *
2094 * [studentId] - The ID of the student whose guardian invitation is being
2095 * requested.
2096 *
2097 * [invitationId] - The `id` field of the `GuardianInvitation` being
2098 * requested.
2099 *
2100 * Completes with a [GuardianInvitation].
2101 *
2102 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2103 * error.
2104 *
2105 * If the used [http.Client] completes with an error when making a REST call,
2106 * this method will complete with the same error.
2107 */
2108 async.Future<GuardianInvitation> get(core.String studentId, core.String invita tionId) {
2109 var _url = null;
2110 var _queryParams = new core.Map();
2111 var _uploadMedia = null;
2112 var _uploadOptions = null;
2113 var _downloadOptions = commons.DownloadOptions.Metadata;
2114 var _body = null;
2115
2116 if (studentId == null) {
2117 throw new core.ArgumentError("Parameter studentId is required.");
2118 }
2119 if (invitationId == null) {
2120 throw new core.ArgumentError("Parameter invitationId is required.");
2121 }
2122
2123 _url = 'v1/userProfiles/' + commons.Escaper.ecapeVariable('$studentId') + '/ guardianInvitations/' + commons.Escaper.ecapeVariable('$invitationId');
2124
2125 var _response = _requester.request(_url,
2126 "GET",
2127 body: _body,
2128 queryParams: _queryParams,
2129 uploadOptions: _uploadOptions,
2130 uploadMedia: _uploadMedia,
2131 downloadOptions: _downloadOptions);
2132 return _response.then((data) => new GuardianInvitation.fromJson(data));
2133 }
2134
2135 /**
2136 * Returns a list of guardian invitations that the requesting user is
2137 * permitted to view, filtered by the parameters provided. This method returns
2138 * the following error codes: * `PERMISSION_DENIED` if a `student_id` is
2139 * specified, and the requesting user is not permitted to view guardian
2140 * invitations for that student, if guardians are not enabled for the domain
2141 * in question, or for other access errors. * `INVALID_ARGUMENT` if a
2142 * `student_id` is specified, but its format cannot be recognized (it is not
2143 * an email address, nor a `student_id` from the API, nor the literal string
2144 * `me`). May also be returned if an invalid `page_token` or `state` is
2145 * provided. * `NOT_FOUND` if a `student_id` is specified, and its format can
2146 * be recognized, but Classroom has no record of that student.
2147 *
2148 * Request parameters:
2149 *
2150 * [studentId] - The ID of the student whose guardian invitations are to be
2151 * returned. The identifier can be one of the following: * the numeric
2152 * identifier for the user * the email address of the user * the string
2153 * literal `"me"`, indicating the requesting user
2154 *
2155 * [invitedEmailAddress] - If specified, only results with the specified
2156 * `invited_email_address` will be returned.
2157 *
2158 * [states] - If specified, only results with the specified `state` values
2159 * will be returned. Otherwise, results with a `state` of `PENDING` will be
2160 * returned.
2161 *
2162 * [pageToken] - nextPageToken value returned from a previous list call,
2163 * indicating that the subsequent page of results should be returned. The list
2164 * request must be otherwise identical to the one that resulted in this token.
2165 *
2166 * [pageSize] - Maximum number of items to return. Zero or unspecified
2167 * indicates that the server may assign a maximum. The server may return fewer
2168 * than the specified number of results.
2169 *
2170 * Completes with a [ListGuardianInvitationsResponse].
2171 *
2172 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2173 * error.
2174 *
2175 * If the used [http.Client] completes with an error when making a REST call,
2176 * this method will complete with the same error.
2177 */
2178 async.Future<ListGuardianInvitationsResponse> list(core.String studentId, {cor e.String invitedEmailAddress, core.List<core.String> states, core.String pageTok en, core.int pageSize}) {
2179 var _url = null;
2180 var _queryParams = new core.Map();
2181 var _uploadMedia = null;
2182 var _uploadOptions = null;
2183 var _downloadOptions = commons.DownloadOptions.Metadata;
2184 var _body = null;
2185
2186 if (studentId == null) {
2187 throw new core.ArgumentError("Parameter studentId is required.");
2188 }
2189 if (invitedEmailAddress != null) {
2190 _queryParams["invitedEmailAddress"] = [invitedEmailAddress];
2191 }
2192 if (states != null) {
2193 _queryParams["states"] = states;
2194 }
2195 if (pageToken != null) {
2196 _queryParams["pageToken"] = [pageToken];
2197 }
2198 if (pageSize != null) {
2199 _queryParams["pageSize"] = ["${pageSize}"];
2200 }
2201
2202 _url = 'v1/userProfiles/' + commons.Escaper.ecapeVariable('$studentId') + '/ guardianInvitations';
2203
2204 var _response = _requester.request(_url,
2205 "GET",
2206 body: _body,
2207 queryParams: _queryParams,
2208 uploadOptions: _uploadOptions,
2209 uploadMedia: _uploadMedia,
2210 downloadOptions: _downloadOptions);
2211 return _response.then((data) => new ListGuardianInvitationsResponse.fromJson (data));
2212 }
2213
2214 /**
2215 * Modifies a guardian invitation. Currently, the only valid modification is
2216 * to change the `state` from `PENDING` to `COMPLETE`. This has the effect of
2217 * withdrawing the invitation. This method returns the following error codes:
2218 * * `PERMISSION_DENIED` if the current user does not have permission to
2219 * manage guardians, if guardians are not enabled for the domain in question
2220 * or for other access errors. * `FAILED_PRECONDITION` if the guardian link is
2221 * not in the `PENDING` state. * `INVALID_ARGUMENT` if the format of the
2222 * student ID provided cannot be recognized (it is not an email address, nor a
2223 * `user_id` from this API), or if the passed `GuardianInvitation` has a
2224 * `state` other than `COMPLETE`, or if it modifies fields other than `state`.
2225 * * `NOT_FOUND` if the student ID provided is a valid student ID, but
2226 * Classroom has no record of that student, or if the `id` field does not
2227 * refer to a guardian invitation known to Classroom.
2228 *
2229 * [request] - The metadata request object.
2230 *
2231 * Request parameters:
2232 *
2233 * [studentId] - The ID of the student whose guardian invitation is to be
2234 * modified.
2235 *
2236 * [invitationId] - The `id` field of the `GuardianInvitation` to be modified.
2237 *
2238 * [updateMask] - Mask that identifies which fields on the course to update.
2239 * This field is required to do an update. The update will fail if invalid
2240 * fields are specified. The following fields are valid: * `state` When set in
2241 * a query parameter, this field should be specified as `updateMask=,,...`
2242 *
2243 * Completes with a [GuardianInvitation].
2244 *
2245 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2246 * error.
2247 *
2248 * If the used [http.Client] completes with an error when making a REST call,
2249 * this method will complete with the same error.
2250 */
2251 async.Future<GuardianInvitation> patch(GuardianInvitation request, core.String studentId, core.String invitationId, {core.String updateMask}) {
2252 var _url = null;
2253 var _queryParams = new core.Map();
2254 var _uploadMedia = null;
2255 var _uploadOptions = null;
2256 var _downloadOptions = commons.DownloadOptions.Metadata;
2257 var _body = null;
2258
2259 if (request != null) {
2260 _body = convert.JSON.encode((request).toJson());
2261 }
2262 if (studentId == null) {
2263 throw new core.ArgumentError("Parameter studentId is required.");
2264 }
2265 if (invitationId == null) {
2266 throw new core.ArgumentError("Parameter invitationId is required.");
2267 }
2268 if (updateMask != null) {
2269 _queryParams["updateMask"] = [updateMask];
2270 }
2271
2272 _url = 'v1/userProfiles/' + commons.Escaper.ecapeVariable('$studentId') + '/ guardianInvitations/' + commons.Escaper.ecapeVariable('$invitationId');
2273
2274 var _response = _requester.request(_url,
2275 "PATCH",
2276 body: _body,
2277 queryParams: _queryParams,
2278 uploadOptions: _uploadOptions,
2279 uploadMedia: _uploadMedia,
2280 downloadOptions: _downloadOptions);
2281 return _response.then((data) => new GuardianInvitation.fromJson(data));
2282 }
2283
2284 }
2285
2286
2287 class UserProfilesGuardiansResourceApi {
2288 final commons.ApiRequester _requester;
2289
2290 UserProfilesGuardiansResourceApi(commons.ApiRequester client) :
2291 _requester = client;
2292
2293 /**
2294 * Deletes a guardian. The guardian will no longer receive guardian
2295 * notifications and the guardian will no longer be accessible via the API.
2296 * This method returns the following error codes: * `PERMISSION_DENIED` if the
2297 * requesting user is not permitted to manage guardians for the student
2298 * identified by the `student_id`, if guardians are not enabled for the domain
2299 * in question, or for other access errors. * `INVALID_ARGUMENT` if a
2300 * `student_id` is specified, but its format cannot be recognized (it is not
2301 * an email address, nor a `student_id` from the API). * `NOT_FOUND` if
2302 * Classroom cannot find any record of the given `student_id` or
2303 * `guardian_id`, or if the guardian has already been disabled.
2304 *
2305 * Request parameters:
2306 *
2307 * [studentId] - The student whose guardian is to be deleted. One of the
2308 * following: * the numeric identifier for the user * the email address of the
2309 * user * the string literal `"me"`, indicating the requesting user
2310 *
2311 * [guardianId] - The `id` field from a `Guardian`.
2312 *
2313 * Completes with a [Empty].
2314 *
2315 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2316 * error.
2317 *
2318 * If the used [http.Client] completes with an error when making a REST call,
2319 * this method will complete with the same error.
2320 */
2321 async.Future<Empty> delete(core.String studentId, core.String guardianId) {
2322 var _url = null;
2323 var _queryParams = new core.Map();
2324 var _uploadMedia = null;
2325 var _uploadOptions = null;
2326 var _downloadOptions = commons.DownloadOptions.Metadata;
2327 var _body = null;
2328
2329 if (studentId == null) {
2330 throw new core.ArgumentError("Parameter studentId is required.");
2331 }
2332 if (guardianId == null) {
2333 throw new core.ArgumentError("Parameter guardianId is required.");
2334 }
2335
2336 _url = 'v1/userProfiles/' + commons.Escaper.ecapeVariable('$studentId') + '/ guardians/' + commons.Escaper.ecapeVariable('$guardianId');
2337
2338 var _response = _requester.request(_url,
2339 "DELETE",
2340 body: _body,
2341 queryParams: _queryParams,
2342 uploadOptions: _uploadOptions,
2343 uploadMedia: _uploadMedia,
2344 downloadOptions: _downloadOptions);
2345 return _response.then((data) => new Empty.fromJson(data));
2346 }
2347
2348 /**
2349 * Returns a specific guardian. This method returns the following error codes:
2350 * * `PERMISSION_DENIED` if the requesting user is not permitted to view
2351 * guardian information for the student identified by the `student_id`, if
2352 * guardians are not enabled for the domain in question, or for other access
2353 * errors. * `INVALID_ARGUMENT` if a `student_id` is specified, but its format
2354 * cannot be recognized (it is not an email address, nor a `student_id` from
2355 * the API, nor the literal string `me`). * `NOT_FOUND` if Classroom cannot
2356 * find any record of the given student or `guardian_id`, or if the guardian
2357 * has been disabled.
2358 *
2359 * Request parameters:
2360 *
2361 * [studentId] - The student whose guardian is being requested. One of the
2362 * following: * the numeric identifier for the user * the email address of the
2363 * user * the string literal `"me"`, indicating the requesting user
2364 *
2365 * [guardianId] - The `id` field from a `Guardian`.
2366 *
2367 * Completes with a [Guardian].
2368 *
2369 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2370 * error.
2371 *
2372 * If the used [http.Client] completes with an error when making a REST call,
2373 * this method will complete with the same error.
2374 */
2375 async.Future<Guardian> get(core.String studentId, core.String guardianId) {
2376 var _url = null;
2377 var _queryParams = new core.Map();
2378 var _uploadMedia = null;
2379 var _uploadOptions = null;
2380 var _downloadOptions = commons.DownloadOptions.Metadata;
2381 var _body = null;
2382
2383 if (studentId == null) {
2384 throw new core.ArgumentError("Parameter studentId is required.");
2385 }
2386 if (guardianId == null) {
2387 throw new core.ArgumentError("Parameter guardianId is required.");
2388 }
2389
2390 _url = 'v1/userProfiles/' + commons.Escaper.ecapeVariable('$studentId') + '/ guardians/' + commons.Escaper.ecapeVariable('$guardianId');
2391
2392 var _response = _requester.request(_url,
2393 "GET",
2394 body: _body,
2395 queryParams: _queryParams,
2396 uploadOptions: _uploadOptions,
2397 uploadMedia: _uploadMedia,
2398 downloadOptions: _downloadOptions);
2399 return _response.then((data) => new Guardian.fromJson(data));
2400 }
2401
2402 /**
2403 * Returns a list of guardians that the requesting user is permitted to view,
2404 * restricted to those that match the request. This method returns the
2405 * following error codes: * `PERMISSION_DENIED` if a `student_id` is
2406 * specified, and the requesting user is not permitted to view guardian
2407 * information for that student, if guardians are not enabled for the domain
2408 * in question, if the `invited_email_address` filter is set by a user who is
2409 * not a domain administrator, or for other access errors. *
2410 * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot be
2411 * recognized (it is not an email address, nor a `student_id` from the API,
2412 * nor the literal string `me`). May also be returned if an invalid
2413 * `page_token` is provided. * `NOT_FOUND` if a `student_id` is specified, and
2414 * its format can be recognized, but Classroom has no record of that student.
2415 *
2416 * Request parameters:
2417 *
2418 * [studentId] - Filter results by the student who the guardian is linked to.
2419 * The identifier can be one of the following: * the numeric identifier for
2420 * the user * the email address of the user * the string literal `"me"`,
2421 * indicating the requesting user
2422 *
2423 * [invitedEmailAddress] - Filter results by the email address that the
2424 * original invitation was sent to, resulting in this guardian link. This
2425 * filter can only be used by domain administrators.
2426 *
2427 * [pageToken] - nextPageToken value returned from a previous list call,
2428 * indicating that the subsequent page of results should be returned. The list
2429 * request must be otherwise identical to the one that resulted in this token.
2430 *
2431 * [pageSize] - Maximum number of items to return. Zero or unspecified
2432 * indicates that the server may assign a maximum. The server may return fewer
2433 * than the specified number of results.
2434 *
2435 * Completes with a [ListGuardiansResponse].
2436 *
2437 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2438 * error.
2439 *
2440 * If the used [http.Client] completes with an error when making a REST call,
2441 * this method will complete with the same error.
2442 */
2443 async.Future<ListGuardiansResponse> list(core.String studentId, {core.String i nvitedEmailAddress, core.String pageToken, core.int pageSize}) {
2444 var _url = null;
2445 var _queryParams = new core.Map();
2446 var _uploadMedia = null;
2447 var _uploadOptions = null;
2448 var _downloadOptions = commons.DownloadOptions.Metadata;
2449 var _body = null;
2450
2451 if (studentId == null) {
2452 throw new core.ArgumentError("Parameter studentId is required.");
2453 }
2454 if (invitedEmailAddress != null) {
2455 _queryParams["invitedEmailAddress"] = [invitedEmailAddress];
2456 }
2457 if (pageToken != null) {
2458 _queryParams["pageToken"] = [pageToken];
2459 }
2460 if (pageSize != null) {
2461 _queryParams["pageSize"] = ["${pageSize}"];
2462 }
2463
2464 _url = 'v1/userProfiles/' + commons.Escaper.ecapeVariable('$studentId') + '/ guardians';
2465
2466 var _response = _requester.request(_url,
2467 "GET",
2468 body: _body,
2469 queryParams: _queryParams,
2470 uploadOptions: _uploadOptions,
2471 uploadMedia: _uploadMedia,
2472 downloadOptions: _downloadOptions);
2473 return _response.then((data) => new ListGuardiansResponse.fromJson(data));
2474 }
2475
2476 }
2477
2478
2005 2479
2006 /** Additional details for assignments. */ 2480 /** Additional details for assignments. */
2007 class Assignment { 2481 class Assignment {
2008 /** 2482 /**
2009 * Drive folder where attachments from student submissions are placed. This is 2483 * Drive folder where attachments from student submissions are placed. This is
2010 * only populated for course teachers. 2484 * only populated for course teachers.
2011 */ 2485 */
2012 DriveFolder studentWorkFolder; 2486 DriveFolder studentWorkFolder;
2013 2487
2014 Assignment(); 2488 Assignment();
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
2465 /** 2939 /**
2466 * Optional time of day, in UTC, that submissions for this this course work 2940 * Optional time of day, in UTC, that submissions for this this course work
2467 * are due. This must be specified if `due_date` is specified. 2941 * are due. This must be specified if `due_date` is specified.
2468 */ 2942 */
2469 TimeOfDay dueTime; 2943 TimeOfDay dueTime;
2470 /** 2944 /**
2471 * Classroom-assigned identifier of this course work, unique per course. 2945 * Classroom-assigned identifier of this course work, unique per course.
2472 * Read-only. 2946 * Read-only.
2473 */ 2947 */
2474 core.String id; 2948 core.String id;
2475 /** Additional materials. */ 2949 /**
2950 * Additional materials. CourseWork must have no more than 20 material items.
2951 */
2476 core.List<Material> materials; 2952 core.List<Material> materials;
2477 /** 2953 /**
2478 * Maximum grade for this course work. If zero or unspecified, this assignment 2954 * Maximum grade for this course work. If zero or unspecified, this assignment
2479 * is considered ungraded. This must be an integer value. 2955 * is considered ungraded. This must be a non-negative integer value.
2480 */ 2956 */
2481 core.double maxPoints; 2957 core.double maxPoints;
2482 /** 2958 /**
2483 * Multiple choice question details. This is populated only when `work_type` 2959 * Multiple choice question details. This is populated only when `work_type`
2484 * is `MULTIPLE_CHOICE_QUESTION`. 2960 * is `MULTIPLE_CHOICE_QUESTION`.
2485 */ 2961 */
2486 MultipleChoiceQuestion multipleChoiceQuestion; 2962 MultipleChoiceQuestion multipleChoiceQuestion;
2487 /** 2963 /**
2488 * Status of this course work.. If unspecified, the default state is `DRAFT`. 2964 * Status of this course work. If unspecified, the default state is `DRAFT`.
2489 * Possible string values are: 2965 * Possible string values are:
2490 * - "COURSE_WORK_STATE_UNSPECIFIED" : A COURSE_WORK_STATE_UNSPECIFIED. 2966 * - "COURSE_WORK_STATE_UNSPECIFIED" : A COURSE_WORK_STATE_UNSPECIFIED.
2491 * - "PUBLISHED" : A PUBLISHED. 2967 * - "PUBLISHED" : A PUBLISHED.
2492 * - "DRAFT" : A DRAFT. 2968 * - "DRAFT" : A DRAFT.
2493 * - "DELETED" : A DELETED. 2969 * - "DELETED" : A DELETED.
2494 */ 2970 */
2495 core.String state; 2971 core.String state;
2496 /** 2972 /**
2497 * Setting to determine when students are allowed to modify submissions. If 2973 * Setting to determine when students are allowed to modify submissions. If
2498 * unspecified, the default value is `MODIFIABLE_UNTIL_TURNED_IN`. 2974 * unspecified, the default value is `MODIFIABLE_UNTIL_TURNED_IN`.
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
2861 3337
2862 core.Map toJson() { 3338 core.Map toJson() {
2863 var _json = new core.Map(); 3339 var _json = new core.Map();
2864 if (permission != null) { 3340 if (permission != null) {
2865 _json["permission"] = permission; 3341 _json["permission"] = permission;
2866 } 3342 }
2867 return _json; 3343 return _json;
2868 } 3344 }
2869 } 3345 }
2870 3346
3347 /**
3348 * Association between a student and a guardian of that student. The guardian
3349 * may receive information about the student's course work.
3350 */
3351 class Guardian {
3352 /** Identifier for the guardian. */
3353 core.String guardianId;
3354 /** User profile for the guardian. */
3355 UserProfile guardianProfile;
3356 /**
3357 * The email address to which the initial guardian invitation was sent. This
3358 * field is only visible to domain administrators.
3359 */
3360 core.String invitedEmailAddress;
3361 /** Identifier for the student to whom the guardian relationship applies. */
3362 core.String studentId;
3363
3364 Guardian();
3365
3366 Guardian.fromJson(core.Map _json) {
3367 if (_json.containsKey("guardianId")) {
3368 guardianId = _json["guardianId"];
3369 }
3370 if (_json.containsKey("guardianProfile")) {
3371 guardianProfile = new UserProfile.fromJson(_json["guardianProfile"]);
3372 }
3373 if (_json.containsKey("invitedEmailAddress")) {
3374 invitedEmailAddress = _json["invitedEmailAddress"];
3375 }
3376 if (_json.containsKey("studentId")) {
3377 studentId = _json["studentId"];
3378 }
3379 }
3380
3381 core.Map toJson() {
3382 var _json = new core.Map();
3383 if (guardianId != null) {
3384 _json["guardianId"] = guardianId;
3385 }
3386 if (guardianProfile != null) {
3387 _json["guardianProfile"] = (guardianProfile).toJson();
3388 }
3389 if (invitedEmailAddress != null) {
3390 _json["invitedEmailAddress"] = invitedEmailAddress;
3391 }
3392 if (studentId != null) {
3393 _json["studentId"] = studentId;
3394 }
3395 return _json;
3396 }
3397 }
3398
3399 /**
3400 * An invitation to become the guardian of a specified user, sent to a specified
3401 * email address.
3402 */
3403 class GuardianInvitation {
3404 /** The time that this invitation was created. Read-only. */
3405 core.String creationTime;
3406 /** Unique identifier for this invitation. Read-only. */
3407 core.String invitationId;
3408 /**
3409 * Email address that the invitation was sent to. This field is only visible
3410 * to domain administrators.
3411 */
3412 core.String invitedEmailAddress;
3413 /**
3414 * The state that this invitation is in.
3415 * Possible string values are:
3416 * - "GUARDIAN_INVITATION_STATE_UNSPECIFIED" : A
3417 * GUARDIAN_INVITATION_STATE_UNSPECIFIED.
3418 * - "PENDING" : A PENDING.
3419 * - "COMPLETE" : A COMPLETE.
3420 */
3421 core.String state;
3422 /** ID of the student (in standard format) */
3423 core.String studentId;
3424
3425 GuardianInvitation();
3426
3427 GuardianInvitation.fromJson(core.Map _json) {
3428 if (_json.containsKey("creationTime")) {
3429 creationTime = _json["creationTime"];
3430 }
3431 if (_json.containsKey("invitationId")) {
3432 invitationId = _json["invitationId"];
3433 }
3434 if (_json.containsKey("invitedEmailAddress")) {
3435 invitedEmailAddress = _json["invitedEmailAddress"];
3436 }
3437 if (_json.containsKey("state")) {
3438 state = _json["state"];
3439 }
3440 if (_json.containsKey("studentId")) {
3441 studentId = _json["studentId"];
3442 }
3443 }
3444
3445 core.Map toJson() {
3446 var _json = new core.Map();
3447 if (creationTime != null) {
3448 _json["creationTime"] = creationTime;
3449 }
3450 if (invitationId != null) {
3451 _json["invitationId"] = invitationId;
3452 }
3453 if (invitedEmailAddress != null) {
3454 _json["invitedEmailAddress"] = invitedEmailAddress;
3455 }
3456 if (state != null) {
3457 _json["state"] = state;
3458 }
3459 if (studentId != null) {
3460 _json["studentId"] = studentId;
3461 }
3462 return _json;
3463 }
3464 }
3465
2871 /** An invitation to join a course. */ 3466 /** An invitation to join a course. */
2872 class Invitation { 3467 class Invitation {
2873 /** Identifier of the course to invite the user to. */ 3468 /** Identifier of the course to invite the user to. */
2874 core.String courseId; 3469 core.String courseId;
2875 /** Identifier assigned by Classroom. Read-only. */ 3470 /** Identifier assigned by Classroom. Read-only. */
2876 core.String id; 3471 core.String id;
2877 /** 3472 /**
2878 * Role to invite the user to have. Must not be `COURSE_ROLE_UNSPECIFIED`. 3473 * Role to invite the user to have. Must not be `COURSE_ROLE_UNSPECIFIED`.
2879 * Possible string values are: 3474 * Possible string values are:
2880 * - "COURSE_ROLE_UNSPECIFIED" : A COURSE_ROLE_UNSPECIFIED. 3475 * - "COURSE_ROLE_UNSPECIFIED" : A COURSE_ROLE_UNSPECIFIED.
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
3058 if (courses != null) { 3653 if (courses != null) {
3059 _json["courses"] = courses.map((value) => (value).toJson()).toList(); 3654 _json["courses"] = courses.map((value) => (value).toJson()).toList();
3060 } 3655 }
3061 if (nextPageToken != null) { 3656 if (nextPageToken != null) {
3062 _json["nextPageToken"] = nextPageToken; 3657 _json["nextPageToken"] = nextPageToken;
3063 } 3658 }
3064 return _json; 3659 return _json;
3065 } 3660 }
3066 } 3661 }
3067 3662
3663 /** Response when listing guardian invitations. */
3664 class ListGuardianInvitationsResponse {
3665 /** Guardian invitations that matched the list request. */
3666 core.List<GuardianInvitation> guardianInvitations;
3667 /**
3668 * Token identifying the next page of results to return. If empty, no further
3669 * results are available.
3670 */
3671 core.String nextPageToken;
3672
3673 ListGuardianInvitationsResponse();
3674
3675 ListGuardianInvitationsResponse.fromJson(core.Map _json) {
3676 if (_json.containsKey("guardianInvitations")) {
3677 guardianInvitations = _json["guardianInvitations"].map((value) => new Guar dianInvitation.fromJson(value)).toList();
3678 }
3679 if (_json.containsKey("nextPageToken")) {
3680 nextPageToken = _json["nextPageToken"];
3681 }
3682 }
3683
3684 core.Map toJson() {
3685 var _json = new core.Map();
3686 if (guardianInvitations != null) {
3687 _json["guardianInvitations"] = guardianInvitations.map((value) => (value). toJson()).toList();
3688 }
3689 if (nextPageToken != null) {
3690 _json["nextPageToken"] = nextPageToken;
3691 }
3692 return _json;
3693 }
3694 }
3695
3696 /** Response when listing guardians. */
3697 class ListGuardiansResponse {
3698 /**
3699 * Guardians on this page of results that met the criteria specified in the
3700 * request.
3701 */
3702 core.List<Guardian> guardians;
3703 /**
3704 * Token identifying the next page of results to return. If empty, no further
3705 * results are available.
3706 */
3707 core.String nextPageToken;
3708
3709 ListGuardiansResponse();
3710
3711 ListGuardiansResponse.fromJson(core.Map _json) {
3712 if (_json.containsKey("guardians")) {
3713 guardians = _json["guardians"].map((value) => new Guardian.fromJson(value) ).toList();
3714 }
3715 if (_json.containsKey("nextPageToken")) {
3716 nextPageToken = _json["nextPageToken"];
3717 }
3718 }
3719
3720 core.Map toJson() {
3721 var _json = new core.Map();
3722 if (guardians != null) {
3723 _json["guardians"] = guardians.map((value) => (value).toJson()).toList();
3724 }
3725 if (nextPageToken != null) {
3726 _json["nextPageToken"] = nextPageToken;
3727 }
3728 return _json;
3729 }
3730 }
3731
3068 /** Response when listing invitations. */ 3732 /** Response when listing invitations. */
3069 class ListInvitationsResponse { 3733 class ListInvitationsResponse {
3070 /** Invitations that match the list request. */ 3734 /** Invitations that match the list request. */
3071 core.List<Invitation> invitations; 3735 core.List<Invitation> invitations;
3072 /** 3736 /**
3073 * Token identifying the next page of results to return. If empty, no further 3737 * Token identifying the next page of results to return. If empty, no further
3074 * results are available. 3738 * results are available.
3075 */ 3739 */
3076 core.String nextPageToken; 3740 core.String nextPageToken;
3077 3741
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
3241 } 3905 }
3242 if (youtubeVideo != null) { 3906 if (youtubeVideo != null) {
3243 _json["youtubeVideo"] = (youtubeVideo).toJson(); 3907 _json["youtubeVideo"] = (youtubeVideo).toJson();
3244 } 3908 }
3245 return _json; 3909 return _json;
3246 } 3910 }
3247 } 3911 }
3248 3912
3249 /** Request to modify the attachments of a student submission. */ 3913 /** Request to modify the attachments of a student submission. */
3250 class ModifyAttachmentsRequest { 3914 class ModifyAttachmentsRequest {
3251 /** Attachments to add. This may only contain link attachments. */ 3915 /**
3916 * Attachments to add. A student submission may not have more than 20
3917 * attachments. This may only contain link attachments.
3918 */
3252 core.List<Attachment> addAttachments; 3919 core.List<Attachment> addAttachments;
3253 3920
3254 ModifyAttachmentsRequest(); 3921 ModifyAttachmentsRequest();
3255 3922
3256 ModifyAttachmentsRequest.fromJson(core.Map _json) { 3923 ModifyAttachmentsRequest.fromJson(core.Map _json) {
3257 if (_json.containsKey("addAttachments")) { 3924 if (_json.containsKey("addAttachments")) {
3258 addAttachments = _json["addAttachments"].map((value) => new Attachment.fro mJson(value)).toList(); 3925 addAttachments = _json["addAttachments"].map((value) => new Attachment.fro mJson(value)).toList();
3259 } 3926 }
3260 } 3927 }
3261 3928
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
3497 /** 4164 /**
3498 * Student submission for course work. StudentSubmission items are generated 4165 * Student submission for course work. StudentSubmission items are generated
3499 * when a CourseWork item is created. StudentSubmissions that have never been 4166 * when a CourseWork item is created. StudentSubmissions that have never been
3500 * accessed (i.e. with `state` = NEW) may not have a creation time or update 4167 * accessed (i.e. with `state` = NEW) may not have a creation time or update
3501 * time. 4168 * time.
3502 */ 4169 */
3503 class StudentSubmission { 4170 class StudentSubmission {
3504 /** Absolute link to the submission in the Classroom web UI. Read-only. */ 4171 /** Absolute link to the submission in the Classroom web UI. Read-only. */
3505 core.String alternateLink; 4172 core.String alternateLink;
3506 /** 4173 /**
3507 * Optional grade. If unset, no grade was set. This must be an integer value. 4174 * Optional grade. If unset, no grade was set. This must be a non-negative
3508 * This may be modified only by course teachers. 4175 * integer value. This may be modified only by course teachers.
3509 */ 4176 */
3510 core.double assignedGrade; 4177 core.double assignedGrade;
3511 /** Submission content when course_work_type is ASSIGNMENT . */ 4178 /** Submission content when course_work_type is ASSIGNMENT . */
3512 AssignmentSubmission assignmentSubmission; 4179 AssignmentSubmission assignmentSubmission;
3513 /** 4180 /**
3514 * Whether this student submission is associated with the Developer Console 4181 * Whether this student submission is associated with the Developer Console
3515 * project making the request. See google.classroom.Work.CreateCourseWork for 4182 * project making the request. See google.classroom.Work.CreateCourseWork for
3516 * more details. Read-only. 4183 * more details. Read-only.
3517 */ 4184 */
3518 core.bool associatedWithDeveloper; 4185 core.bool associatedWithDeveloper;
3519 /** Identifier of the course. Read-only. */ 4186 /** Identifier of the course. Read-only. */
3520 core.String courseId; 4187 core.String courseId;
3521 /** Identifier for the course work this corresponds to. Read-only. */ 4188 /** Identifier for the course work this corresponds to. Read-only. */
3522 core.String courseWorkId; 4189 core.String courseWorkId;
3523 /** 4190 /**
3524 * Type of course work this submission is for. Read-only. 4191 * Type of course work this submission is for. Read-only.
3525 * Possible string values are: 4192 * Possible string values are:
3526 * - "COURSE_WORK_TYPE_UNSPECIFIED" : A COURSE_WORK_TYPE_UNSPECIFIED. 4193 * - "COURSE_WORK_TYPE_UNSPECIFIED" : A COURSE_WORK_TYPE_UNSPECIFIED.
3527 * - "ASSIGNMENT" : A ASSIGNMENT. 4194 * - "ASSIGNMENT" : A ASSIGNMENT.
3528 * - "SHORT_ANSWER_QUESTION" : A SHORT_ANSWER_QUESTION. 4195 * - "SHORT_ANSWER_QUESTION" : A SHORT_ANSWER_QUESTION.
3529 * - "MULTIPLE_CHOICE_QUESTION" : A MULTIPLE_CHOICE_QUESTION. 4196 * - "MULTIPLE_CHOICE_QUESTION" : A MULTIPLE_CHOICE_QUESTION.
3530 */ 4197 */
3531 core.String courseWorkType; 4198 core.String courseWorkType;
3532 /** 4199 /**
3533 * Creation time of this submission.. This may be unset if the student has not 4200 * Creation time of this submission. This may be unset if the student has not
3534 * accessed this item. Read-only. 4201 * accessed this item. Read-only.
3535 */ 4202 */
3536 core.String creationTime; 4203 core.String creationTime;
3537 /** 4204 /**
3538 * Optional pending grade. If unset, no grade was set. This must be an integer 4205 * Optional pending grade. If unset, no grade was set. This must be a
3539 * value. This is only visible to and modifiable by course teachers. 4206 * non-negative integer value. This is only visible to and modifiable by
4207 * course teachers.
3540 */ 4208 */
3541 core.double draftGrade; 4209 core.double draftGrade;
3542 /** 4210 /**
3543 * Classroom-assigned Identifier for the student submission. This is unique 4211 * Classroom-assigned Identifier for the student submission. This is unique
3544 * among submissions for the relevant course work. Read-only. 4212 * among submissions for the relevant course work. Read-only.
3545 */ 4213 */
3546 core.String id; 4214 core.String id;
3547 /** Whether this submission is late. Read-only. */ 4215 /** Whether this submission is late. Read-only. */
3548 core.bool late; 4216 core.bool late;
3549 /** Submission content when course_work_type is MUTIPLE_CHOICE_QUESTION. */ 4217 /** Submission content when course_work_type is MULTIPLE_CHOICE_QUESTION. */
3550 MultipleChoiceSubmission multipleChoiceSubmission; 4218 MultipleChoiceSubmission multipleChoiceSubmission;
3551 /** Submission content when course_work_type is SHORT_ANSWER_QUESTION. */ 4219 /** Submission content when course_work_type is SHORT_ANSWER_QUESTION. */
3552 ShortAnswerSubmission shortAnswerSubmission; 4220 ShortAnswerSubmission shortAnswerSubmission;
3553 /** 4221 /**
3554 * State of this submission. Read-only. 4222 * State of this submission. Read-only.
3555 * Possible string values are: 4223 * Possible string values are:
3556 * - "SUBMISSION_STATE_UNSPECIFIED" : A SUBMISSION_STATE_UNSPECIFIED. 4224 * - "SUBMISSION_STATE_UNSPECIFIED" : A SUBMISSION_STATE_UNSPECIFIED.
3557 * - "NEW" : A NEW. 4225 * - "NEW" : A NEW.
3558 * - "CREATED" : A CREATED. 4226 * - "CREATED" : A CREATED.
3559 * - "TURNED_IN" : A TURNED_IN. 4227 * - "TURNED_IN" : A TURNED_IN.
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
3881 } 4549 }
3882 if (thumbnailUrl != null) { 4550 if (thumbnailUrl != null) {
3883 _json["thumbnailUrl"] = thumbnailUrl; 4551 _json["thumbnailUrl"] = thumbnailUrl;
3884 } 4552 }
3885 if (title != null) { 4553 if (title != null) {
3886 _json["title"] = title; 4554 _json["title"] = title;
3887 } 4555 }
3888 return _json; 4556 return _json;
3889 } 4557 }
3890 } 4558 }
OLDNEW
« no previous file with comments | « generated/googleapis/lib/civicinfo/v2.dart ('k') | generated/googleapis/lib/cloudbuild/v1.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698