OLD | NEW |
1 library googleapis.admin.directory_v1; | 1 library googleapis.admin.directory_v1; |
2 | 2 |
3 import "dart:core" as core; | 3 import "dart:core" as core; |
4 import "dart:collection" as collection; | 4 import "dart:collection" as collection; |
5 import "dart:async" as async; | 5 import "dart:async" as async; |
6 import "dart:convert" as convert; | 6 import "dart:convert" as convert; |
7 | 7 |
8 import "package:crypto/crypto.dart" as crypto; | 8 import "package:crypto/crypto.dart" as crypto; |
9 import 'package:http/http.dart' as http; | 9 import 'package:http/http.dart' as http; |
10 import '../src/common_internal.dart' as common_internal; | 10 import '../src/common_internal.dart' as common_internal; |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 | 63 |
64 /** View user aliases on your domain */ | 64 /** View user aliases on your domain */ |
65 static const AdminDirectoryUserAliasReadonlyScope = "https://www.googleapis.co
m/auth/admin.directory.user.alias.readonly"; | 65 static const AdminDirectoryUserAliasReadonlyScope = "https://www.googleapis.co
m/auth/admin.directory.user.alias.readonly"; |
66 | 66 |
67 /** View users on your domain */ | 67 /** View users on your domain */ |
68 static const AdminDirectoryUserReadonlyScope = "https://www.googleapis.com/aut
h/admin.directory.user.readonly"; | 68 static const AdminDirectoryUserReadonlyScope = "https://www.googleapis.com/aut
h/admin.directory.user.readonly"; |
69 | 69 |
70 /** Manage data access permissions for users on your domain */ | 70 /** Manage data access permissions for users on your domain */ |
71 static const AdminDirectoryUserSecurityScope = "https://www.googleapis.com/aut
h/admin.directory.user.security"; | 71 static const AdminDirectoryUserSecurityScope = "https://www.googleapis.com/aut
h/admin.directory.user.security"; |
72 | 72 |
| 73 /** View and manage the provisioning of user schemas on your domain */ |
| 74 static const AdminDirectoryUserschemaScope = "https://www.googleapis.com/auth/
admin.directory.userschema"; |
| 75 |
| 76 /** View user schemas on your domain */ |
| 77 static const AdminDirectoryUserschemaReadonlyScope = "https://www.googleapis.c
om/auth/admin.directory.userschema.readonly"; |
| 78 |
73 | 79 |
74 final common_internal.ApiRequester _requester; | 80 final common_internal.ApiRequester _requester; |
75 | 81 |
76 AspsResourceApi get asps => new AspsResourceApi(_requester); | 82 AspsResourceApi get asps => new AspsResourceApi(_requester); |
77 ChannelsResourceApi get channels => new ChannelsResourceApi(_requester); | 83 ChannelsResourceApi get channels => new ChannelsResourceApi(_requester); |
78 ChromeosdevicesResourceApi get chromeosdevices => new ChromeosdevicesResourceA
pi(_requester); | 84 ChromeosdevicesResourceApi get chromeosdevices => new ChromeosdevicesResourceA
pi(_requester); |
79 GroupsResourceApi get groups => new GroupsResourceApi(_requester); | 85 GroupsResourceApi get groups => new GroupsResourceApi(_requester); |
80 MembersResourceApi get members => new MembersResourceApi(_requester); | 86 MembersResourceApi get members => new MembersResourceApi(_requester); |
81 MobiledevicesResourceApi get mobiledevices => new MobiledevicesResourceApi(_re
quester); | 87 MobiledevicesResourceApi get mobiledevices => new MobiledevicesResourceApi(_re
quester); |
82 NotificationsResourceApi get notifications => new NotificationsResourceApi(_re
quester); | 88 NotificationsResourceApi get notifications => new NotificationsResourceApi(_re
quester); |
83 OrgunitsResourceApi get orgunits => new OrgunitsResourceApi(_requester); | 89 OrgunitsResourceApi get orgunits => new OrgunitsResourceApi(_requester); |
| 90 SchemasResourceApi get schemas => new SchemasResourceApi(_requester); |
84 TokensResourceApi get tokens => new TokensResourceApi(_requester); | 91 TokensResourceApi get tokens => new TokensResourceApi(_requester); |
85 UsersResourceApi get users => new UsersResourceApi(_requester); | 92 UsersResourceApi get users => new UsersResourceApi(_requester); |
86 VerificationCodesResourceApi get verificationCodes => new VerificationCodesRes
ourceApi(_requester); | 93 VerificationCodesResourceApi get verificationCodes => new VerificationCodesRes
ourceApi(_requester); |
87 | 94 |
88 AdminApi(http.Client client) : | 95 AdminApi(http.Client client) : |
89 _requester = new common_internal.ApiRequester(client, "https://www.googlea
pis.com/", "/admin/directory/v1/"); | 96 _requester = new common_internal.ApiRequester(client, "https://www.googlea
pis.com/", "admin/directory/v1/"); |
90 } | 97 } |
91 | 98 |
92 | 99 |
93 /** Not documented yet. */ | 100 /** Not documented yet. */ |
94 class AspsResourceApi { | 101 class AspsResourceApi { |
95 final common_internal.ApiRequester _requester; | 102 final common_internal.ApiRequester _requester; |
96 | 103 |
97 AspsResourceApi(common_internal.ApiRequester client) : | 104 AspsResourceApi(common_internal.ApiRequester client) : |
98 _requester = client; | 105 _requester = client; |
99 | 106 |
(...skipping 1976 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2076 uploadOptions: _uploadOptions, | 2083 uploadOptions: _uploadOptions, |
2077 uploadMedia: _uploadMedia, | 2084 uploadMedia: _uploadMedia, |
2078 downloadOptions: _downloadOptions); | 2085 downloadOptions: _downloadOptions); |
2079 return _response.then((data) => new OrgUnit.fromJson(data)); | 2086 return _response.then((data) => new OrgUnit.fromJson(data)); |
2080 } | 2087 } |
2081 | 2088 |
2082 } | 2089 } |
2083 | 2090 |
2084 | 2091 |
2085 /** Not documented yet. */ | 2092 /** Not documented yet. */ |
| 2093 class SchemasResourceApi { |
| 2094 final common_internal.ApiRequester _requester; |
| 2095 |
| 2096 SchemasResourceApi(common_internal.ApiRequester client) : |
| 2097 _requester = client; |
| 2098 |
| 2099 /** |
| 2100 * Delete schema |
| 2101 * |
| 2102 * Request parameters: |
| 2103 * |
| 2104 * [customerId] - Immutable id of the Google Apps account |
| 2105 * |
| 2106 * [schemaKey] - Name or immutable Id of the schema |
| 2107 * |
| 2108 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2109 * error. |
| 2110 * |
| 2111 * If the used [http.Client] completes with an error when making a REST call, |
| 2112 * this method will complete with the same error. |
| 2113 */ |
| 2114 async.Future delete(core.String customerId, core.String schemaKey) { |
| 2115 var _url = null; |
| 2116 var _queryParams = new core.Map(); |
| 2117 var _uploadMedia = null; |
| 2118 var _uploadOptions = null; |
| 2119 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2120 var _body = null; |
| 2121 |
| 2122 if (customerId == null) { |
| 2123 throw new core.ArgumentError("Parameter customerId is required."); |
| 2124 } |
| 2125 if (schemaKey == null) { |
| 2126 throw new core.ArgumentError("Parameter schemaKey is required."); |
| 2127 } |
| 2128 |
| 2129 _downloadOptions = null; |
| 2130 |
| 2131 _url = 'customer/' + common_internal.Escaper.ecapeVariable('$customerId') +
'/schemas/' + common_internal.Escaper.ecapeVariable('$schemaKey'); |
| 2132 |
| 2133 var _response = _requester.request(_url, |
| 2134 "DELETE", |
| 2135 body: _body, |
| 2136 queryParams: _queryParams, |
| 2137 uploadOptions: _uploadOptions, |
| 2138 uploadMedia: _uploadMedia, |
| 2139 downloadOptions: _downloadOptions); |
| 2140 return _response.then((data) => null); |
| 2141 } |
| 2142 |
| 2143 /** |
| 2144 * Retrieve schema |
| 2145 * |
| 2146 * Request parameters: |
| 2147 * |
| 2148 * [customerId] - Immutable id of the Google Apps account |
| 2149 * |
| 2150 * [schemaKey] - Name or immutable Id of the schema |
| 2151 * |
| 2152 * Completes with a [Schema]. |
| 2153 * |
| 2154 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2155 * error. |
| 2156 * |
| 2157 * If the used [http.Client] completes with an error when making a REST call, |
| 2158 * this method will complete with the same error. |
| 2159 */ |
| 2160 async.Future<Schema> get(core.String customerId, core.String schemaKey) { |
| 2161 var _url = null; |
| 2162 var _queryParams = new core.Map(); |
| 2163 var _uploadMedia = null; |
| 2164 var _uploadOptions = null; |
| 2165 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2166 var _body = null; |
| 2167 |
| 2168 if (customerId == null) { |
| 2169 throw new core.ArgumentError("Parameter customerId is required."); |
| 2170 } |
| 2171 if (schemaKey == null) { |
| 2172 throw new core.ArgumentError("Parameter schemaKey is required."); |
| 2173 } |
| 2174 |
| 2175 |
| 2176 _url = 'customer/' + common_internal.Escaper.ecapeVariable('$customerId') +
'/schemas/' + common_internal.Escaper.ecapeVariable('$schemaKey'); |
| 2177 |
| 2178 var _response = _requester.request(_url, |
| 2179 "GET", |
| 2180 body: _body, |
| 2181 queryParams: _queryParams, |
| 2182 uploadOptions: _uploadOptions, |
| 2183 uploadMedia: _uploadMedia, |
| 2184 downloadOptions: _downloadOptions); |
| 2185 return _response.then((data) => new Schema.fromJson(data)); |
| 2186 } |
| 2187 |
| 2188 /** |
| 2189 * Create schema. |
| 2190 * |
| 2191 * [request] - The metadata request object. |
| 2192 * |
| 2193 * Request parameters: |
| 2194 * |
| 2195 * [customerId] - Immutable id of the Google Apps account |
| 2196 * |
| 2197 * Completes with a [Schema]. |
| 2198 * |
| 2199 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2200 * error. |
| 2201 * |
| 2202 * If the used [http.Client] completes with an error when making a REST call, |
| 2203 * this method will complete with the same error. |
| 2204 */ |
| 2205 async.Future<Schema> insert(Schema request, core.String customerId) { |
| 2206 var _url = null; |
| 2207 var _queryParams = new core.Map(); |
| 2208 var _uploadMedia = null; |
| 2209 var _uploadOptions = null; |
| 2210 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2211 var _body = null; |
| 2212 |
| 2213 if (request != null) { |
| 2214 _body = convert.JSON.encode((request).toJson()); |
| 2215 } |
| 2216 if (customerId == null) { |
| 2217 throw new core.ArgumentError("Parameter customerId is required."); |
| 2218 } |
| 2219 |
| 2220 |
| 2221 _url = 'customer/' + common_internal.Escaper.ecapeVariable('$customerId') +
'/schemas'; |
| 2222 |
| 2223 var _response = _requester.request(_url, |
| 2224 "POST", |
| 2225 body: _body, |
| 2226 queryParams: _queryParams, |
| 2227 uploadOptions: _uploadOptions, |
| 2228 uploadMedia: _uploadMedia, |
| 2229 downloadOptions: _downloadOptions); |
| 2230 return _response.then((data) => new Schema.fromJson(data)); |
| 2231 } |
| 2232 |
| 2233 /** |
| 2234 * Retrieve all schemas for a customer |
| 2235 * |
| 2236 * Request parameters: |
| 2237 * |
| 2238 * [customerId] - Immutable id of the Google Apps account |
| 2239 * |
| 2240 * Completes with a [Schemas]. |
| 2241 * |
| 2242 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2243 * error. |
| 2244 * |
| 2245 * If the used [http.Client] completes with an error when making a REST call, |
| 2246 * this method will complete with the same error. |
| 2247 */ |
| 2248 async.Future<Schemas> list(core.String customerId) { |
| 2249 var _url = null; |
| 2250 var _queryParams = new core.Map(); |
| 2251 var _uploadMedia = null; |
| 2252 var _uploadOptions = null; |
| 2253 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2254 var _body = null; |
| 2255 |
| 2256 if (customerId == null) { |
| 2257 throw new core.ArgumentError("Parameter customerId is required."); |
| 2258 } |
| 2259 |
| 2260 |
| 2261 _url = 'customer/' + common_internal.Escaper.ecapeVariable('$customerId') +
'/schemas'; |
| 2262 |
| 2263 var _response = _requester.request(_url, |
| 2264 "GET", |
| 2265 body: _body, |
| 2266 queryParams: _queryParams, |
| 2267 uploadOptions: _uploadOptions, |
| 2268 uploadMedia: _uploadMedia, |
| 2269 downloadOptions: _downloadOptions); |
| 2270 return _response.then((data) => new Schemas.fromJson(data)); |
| 2271 } |
| 2272 |
| 2273 /** |
| 2274 * Update schema. This method supports patch semantics. |
| 2275 * |
| 2276 * [request] - The metadata request object. |
| 2277 * |
| 2278 * Request parameters: |
| 2279 * |
| 2280 * [customerId] - Immutable id of the Google Apps account |
| 2281 * |
| 2282 * [schemaKey] - Name or immutable Id of the schema. |
| 2283 * |
| 2284 * Completes with a [Schema]. |
| 2285 * |
| 2286 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2287 * error. |
| 2288 * |
| 2289 * If the used [http.Client] completes with an error when making a REST call, |
| 2290 * this method will complete with the same error. |
| 2291 */ |
| 2292 async.Future<Schema> patch(Schema request, core.String customerId, core.String
schemaKey) { |
| 2293 var _url = null; |
| 2294 var _queryParams = new core.Map(); |
| 2295 var _uploadMedia = null; |
| 2296 var _uploadOptions = null; |
| 2297 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2298 var _body = null; |
| 2299 |
| 2300 if (request != null) { |
| 2301 _body = convert.JSON.encode((request).toJson()); |
| 2302 } |
| 2303 if (customerId == null) { |
| 2304 throw new core.ArgumentError("Parameter customerId is required."); |
| 2305 } |
| 2306 if (schemaKey == null) { |
| 2307 throw new core.ArgumentError("Parameter schemaKey is required."); |
| 2308 } |
| 2309 |
| 2310 |
| 2311 _url = 'customer/' + common_internal.Escaper.ecapeVariable('$customerId') +
'/schemas/' + common_internal.Escaper.ecapeVariable('$schemaKey'); |
| 2312 |
| 2313 var _response = _requester.request(_url, |
| 2314 "PATCH", |
| 2315 body: _body, |
| 2316 queryParams: _queryParams, |
| 2317 uploadOptions: _uploadOptions, |
| 2318 uploadMedia: _uploadMedia, |
| 2319 downloadOptions: _downloadOptions); |
| 2320 return _response.then((data) => new Schema.fromJson(data)); |
| 2321 } |
| 2322 |
| 2323 /** |
| 2324 * Update schema |
| 2325 * |
| 2326 * [request] - The metadata request object. |
| 2327 * |
| 2328 * Request parameters: |
| 2329 * |
| 2330 * [customerId] - Immutable id of the Google Apps account |
| 2331 * |
| 2332 * [schemaKey] - Name or immutable Id of the schema. |
| 2333 * |
| 2334 * Completes with a [Schema]. |
| 2335 * |
| 2336 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2337 * error. |
| 2338 * |
| 2339 * If the used [http.Client] completes with an error when making a REST call, |
| 2340 * this method will complete with the same error. |
| 2341 */ |
| 2342 async.Future<Schema> update(Schema request, core.String customerId, core.Strin
g schemaKey) { |
| 2343 var _url = null; |
| 2344 var _queryParams = new core.Map(); |
| 2345 var _uploadMedia = null; |
| 2346 var _uploadOptions = null; |
| 2347 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2348 var _body = null; |
| 2349 |
| 2350 if (request != null) { |
| 2351 _body = convert.JSON.encode((request).toJson()); |
| 2352 } |
| 2353 if (customerId == null) { |
| 2354 throw new core.ArgumentError("Parameter customerId is required."); |
| 2355 } |
| 2356 if (schemaKey == null) { |
| 2357 throw new core.ArgumentError("Parameter schemaKey is required."); |
| 2358 } |
| 2359 |
| 2360 |
| 2361 _url = 'customer/' + common_internal.Escaper.ecapeVariable('$customerId') +
'/schemas/' + common_internal.Escaper.ecapeVariable('$schemaKey'); |
| 2362 |
| 2363 var _response = _requester.request(_url, |
| 2364 "PUT", |
| 2365 body: _body, |
| 2366 queryParams: _queryParams, |
| 2367 uploadOptions: _uploadOptions, |
| 2368 uploadMedia: _uploadMedia, |
| 2369 downloadOptions: _downloadOptions); |
| 2370 return _response.then((data) => new Schema.fromJson(data)); |
| 2371 } |
| 2372 |
| 2373 } |
| 2374 |
| 2375 |
| 2376 /** Not documented yet. */ |
2086 class TokensResourceApi { | 2377 class TokensResourceApi { |
2087 final common_internal.ApiRequester _requester; | 2378 final common_internal.ApiRequester _requester; |
2088 | 2379 |
2089 TokensResourceApi(common_internal.ApiRequester client) : | 2380 TokensResourceApi(common_internal.ApiRequester client) : |
2090 _requester = client; | 2381 _requester = client; |
2091 | 2382 |
2092 /** | 2383 /** |
2093 * Delete all access tokens issued by a user for an application. | 2384 * Delete all access tokens issued by a user for an application. |
2094 * | 2385 * |
2095 * Request parameters: | 2386 * Request parameters: |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2274 return _response.then((data) => null); | 2565 return _response.then((data) => null); |
2275 } | 2566 } |
2276 | 2567 |
2277 /** | 2568 /** |
2278 * retrieve user | 2569 * retrieve user |
2279 * | 2570 * |
2280 * Request parameters: | 2571 * Request parameters: |
2281 * | 2572 * |
2282 * [userKey] - Email or immutable Id of the user | 2573 * [userKey] - Email or immutable Id of the user |
2283 * | 2574 * |
| 2575 * [customFieldMask] - Comma-separated list of schema names. All fields from |
| 2576 * these schemas are fetched. This should only be set when projection=custom. |
| 2577 * |
| 2578 * [projection] - What subset of fields to fetch for this user. |
| 2579 * Possible string values are: |
| 2580 * - "basic" : Do not include any custom fields for the user. |
| 2581 * - "custom" : Include custom fields from schemas mentioned in |
| 2582 * customFieldMask. |
| 2583 * - "full" : Include all fields associated with this user. |
| 2584 * |
| 2585 * [viewType] - Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the |
| 2586 * user. |
| 2587 * Possible string values are: |
| 2588 * - "admin_view" : Fetches the ADMIN_VIEW of the user. |
| 2589 * - "domain_public" : Fetches the DOMAIN_PUBLIC view of the user. |
| 2590 * |
2284 * Completes with a [User]. | 2591 * Completes with a [User]. |
2285 * | 2592 * |
2286 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 2593 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
2287 * error. | 2594 * error. |
2288 * | 2595 * |
2289 * If the used [http.Client] completes with an error when making a REST call, | 2596 * If the used [http.Client] completes with an error when making a REST call, |
2290 * this method will complete with the same error. | 2597 * this method will complete with the same error. |
2291 */ | 2598 */ |
2292 async.Future<User> get(core.String userKey) { | 2599 async.Future<User> get(core.String userKey, {core.String customFieldMask, core
.String projection, core.String viewType}) { |
2293 var _url = null; | 2600 var _url = null; |
2294 var _queryParams = new core.Map(); | 2601 var _queryParams = new core.Map(); |
2295 var _uploadMedia = null; | 2602 var _uploadMedia = null; |
2296 var _uploadOptions = null; | 2603 var _uploadOptions = null; |
2297 var _downloadOptions = common.DownloadOptions.Metadata; | 2604 var _downloadOptions = common.DownloadOptions.Metadata; |
2298 var _body = null; | 2605 var _body = null; |
2299 | 2606 |
2300 if (userKey == null) { | 2607 if (userKey == null) { |
2301 throw new core.ArgumentError("Parameter userKey is required."); | 2608 throw new core.ArgumentError("Parameter userKey is required."); |
2302 } | 2609 } |
| 2610 if (customFieldMask != null) { |
| 2611 _queryParams["customFieldMask"] = [customFieldMask]; |
| 2612 } |
| 2613 if (projection != null) { |
| 2614 _queryParams["projection"] = [projection]; |
| 2615 } |
| 2616 if (viewType != null) { |
| 2617 _queryParams["viewType"] = [viewType]; |
| 2618 } |
2303 | 2619 |
2304 | 2620 |
2305 _url = 'users/' + common_internal.Escaper.ecapeVariable('$userKey'); | 2621 _url = 'users/' + common_internal.Escaper.ecapeVariable('$userKey'); |
2306 | 2622 |
2307 var _response = _requester.request(_url, | 2623 var _response = _requester.request(_url, |
2308 "GET", | 2624 "GET", |
2309 body: _body, | 2625 body: _body, |
2310 queryParams: _queryParams, | 2626 queryParams: _queryParams, |
2311 uploadOptions: _uploadOptions, | 2627 uploadOptions: _uploadOptions, |
2312 uploadMedia: _uploadMedia, | 2628 uploadMedia: _uploadMedia, |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2352 uploadMedia: _uploadMedia, | 2668 uploadMedia: _uploadMedia, |
2353 downloadOptions: _downloadOptions); | 2669 downloadOptions: _downloadOptions); |
2354 return _response.then((data) => new User.fromJson(data)); | 2670 return _response.then((data) => new User.fromJson(data)); |
2355 } | 2671 } |
2356 | 2672 |
2357 /** | 2673 /** |
2358 * Retrieve either deleted users or all users in a domain (paginated) | 2674 * Retrieve either deleted users or all users in a domain (paginated) |
2359 * | 2675 * |
2360 * Request parameters: | 2676 * Request parameters: |
2361 * | 2677 * |
| 2678 * [customFieldMask] - Comma-separated list of schema names. All fields from |
| 2679 * these schemas are fetched. This should only be set when projection=custom. |
| 2680 * |
2362 * [customer] - Immutable id of the Google Apps account. In case of | 2681 * [customer] - Immutable id of the Google Apps account. In case of |
2363 * multi-domain, to fetch all users for a customer, fill this field instead of | 2682 * multi-domain, to fetch all users for a customer, fill this field instead of |
2364 * domain. | 2683 * domain. |
2365 * | 2684 * |
2366 * [domain] - Name of the domain. Fill this field to get users from only this | 2685 * [domain] - Name of the domain. Fill this field to get users from only this |
2367 * domain. To return all users in a multi-domain fill customer field instead. | 2686 * domain. To return all users in a multi-domain fill customer field instead. |
2368 * | 2687 * |
2369 * [event] - Event on which subscription is intended (if subscribing) | 2688 * [event] - Event on which subscription is intended (if subscribing) |
2370 * Possible string values are: | 2689 * Possible string values are: |
2371 * - "add" : User Created Event | 2690 * - "add" : User Created Event |
2372 * - "delete" : User Deleted Event | 2691 * - "delete" : User Deleted Event |
2373 * - "makeAdmin" : User Admin Status Change Event | 2692 * - "makeAdmin" : User Admin Status Change Event |
2374 * - "undelete" : User Undeleted Event | 2693 * - "undelete" : User Undeleted Event |
2375 * - "update" : User Updated Event | 2694 * - "update" : User Updated Event |
2376 * | 2695 * |
2377 * [maxResults] - Maximum number of results to return. Default is 100. Max | 2696 * [maxResults] - Maximum number of results to return. Default is 100. Max |
2378 * allowed is 500 | 2697 * allowed is 500 |
2379 * Value must be between "1" and "500". | 2698 * Value must be between "1" and "500". |
2380 * | 2699 * |
2381 * [orderBy] - Column to use for sorting results | 2700 * [orderBy] - Column to use for sorting results |
2382 * Possible string values are: | 2701 * Possible string values are: |
2383 * - "email" : Primary email of the user. | 2702 * - "email" : Primary email of the user. |
2384 * - "familyName" : User's family name. | 2703 * - "familyName" : User's family name. |
2385 * - "givenName" : User's given name. | 2704 * - "givenName" : User's given name. |
2386 * | 2705 * |
2387 * [pageToken] - Token to specify next page in the list | 2706 * [pageToken] - Token to specify next page in the list |
2388 * | 2707 * |
2389 * [query] - Query string search. Should be of the form "" where field can be | 2708 * [projection] - What subset of fields to fetch for this user. |
2390 * any of supported fields, operators can be one of '=' for exact match or ':' | 2709 * Possible string values are: |
2391 * for prefix match. For prefix match, the value should always be followed by | 2710 * - "basic" : Do not include any custom fields for the user. |
2392 * a *. | 2711 * - "custom" : Include custom fields from schemas mentioned in |
| 2712 * customFieldMask. |
| 2713 * - "full" : Include all fields associated with this user. |
| 2714 * |
| 2715 * [query] - Query string search. Should be of the form "". Complete |
| 2716 * documentation is at |
| 2717 * https://developers.google.com/admin-sdk/directory/v1/guides/search-users |
2393 * | 2718 * |
2394 * [showDeleted] - If set to true retrieves the list of deleted users. Default | 2719 * [showDeleted] - If set to true retrieves the list of deleted users. Default |
2395 * is false | 2720 * is false |
2396 * | 2721 * |
2397 * [sortOrder] - Whether to return results in ascending or descending order. | 2722 * [sortOrder] - Whether to return results in ascending or descending order. |
2398 * Possible string values are: | 2723 * Possible string values are: |
2399 * - "ASCENDING" : Ascending order. | 2724 * - "ASCENDING" : Ascending order. |
2400 * - "DESCENDING" : Descending order. | 2725 * - "DESCENDING" : Descending order. |
2401 * | 2726 * |
| 2727 * [viewType] - Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the |
| 2728 * user. |
| 2729 * Possible string values are: |
| 2730 * - "admin_view" : Fetches the ADMIN_VIEW of the user. |
| 2731 * - "domain_public" : Fetches the DOMAIN_PUBLIC view of the user. |
| 2732 * |
2402 * Completes with a [Users]. | 2733 * Completes with a [Users]. |
2403 * | 2734 * |
2404 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 2735 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
2405 * error. | 2736 * error. |
2406 * | 2737 * |
2407 * If the used [http.Client] completes with an error when making a REST call, | 2738 * If the used [http.Client] completes with an error when making a REST call, |
2408 * this method will complete with the same error. | 2739 * this method will complete with the same error. |
2409 */ | 2740 */ |
2410 async.Future<Users> list({core.String customer, core.String domain, core.Strin
g event, core.int maxResults, core.String orderBy, core.String pageToken, core.S
tring query, core.String showDeleted, core.String sortOrder}) { | 2741 async.Future<Users> list({core.String customFieldMask, core.String customer, c
ore.String domain, core.String event, core.int maxResults, core.String orderBy,
core.String pageToken, core.String projection, core.String query, core.String sh
owDeleted, core.String sortOrder, core.String viewType}) { |
2411 var _url = null; | 2742 var _url = null; |
2412 var _queryParams = new core.Map(); | 2743 var _queryParams = new core.Map(); |
2413 var _uploadMedia = null; | 2744 var _uploadMedia = null; |
2414 var _uploadOptions = null; | 2745 var _uploadOptions = null; |
2415 var _downloadOptions = common.DownloadOptions.Metadata; | 2746 var _downloadOptions = common.DownloadOptions.Metadata; |
2416 var _body = null; | 2747 var _body = null; |
2417 | 2748 |
| 2749 if (customFieldMask != null) { |
| 2750 _queryParams["customFieldMask"] = [customFieldMask]; |
| 2751 } |
2418 if (customer != null) { | 2752 if (customer != null) { |
2419 _queryParams["customer"] = [customer]; | 2753 _queryParams["customer"] = [customer]; |
2420 } | 2754 } |
2421 if (domain != null) { | 2755 if (domain != null) { |
2422 _queryParams["domain"] = [domain]; | 2756 _queryParams["domain"] = [domain]; |
2423 } | 2757 } |
2424 if (event != null) { | 2758 if (event != null) { |
2425 _queryParams["event"] = [event]; | 2759 _queryParams["event"] = [event]; |
2426 } | 2760 } |
2427 if (maxResults != null) { | 2761 if (maxResults != null) { |
2428 _queryParams["maxResults"] = ["${maxResults}"]; | 2762 _queryParams["maxResults"] = ["${maxResults}"]; |
2429 } | 2763 } |
2430 if (orderBy != null) { | 2764 if (orderBy != null) { |
2431 _queryParams["orderBy"] = [orderBy]; | 2765 _queryParams["orderBy"] = [orderBy]; |
2432 } | 2766 } |
2433 if (pageToken != null) { | 2767 if (pageToken != null) { |
2434 _queryParams["pageToken"] = [pageToken]; | 2768 _queryParams["pageToken"] = [pageToken]; |
2435 } | 2769 } |
| 2770 if (projection != null) { |
| 2771 _queryParams["projection"] = [projection]; |
| 2772 } |
2436 if (query != null) { | 2773 if (query != null) { |
2437 _queryParams["query"] = [query]; | 2774 _queryParams["query"] = [query]; |
2438 } | 2775 } |
2439 if (showDeleted != null) { | 2776 if (showDeleted != null) { |
2440 _queryParams["showDeleted"] = [showDeleted]; | 2777 _queryParams["showDeleted"] = [showDeleted]; |
2441 } | 2778 } |
2442 if (sortOrder != null) { | 2779 if (sortOrder != null) { |
2443 _queryParams["sortOrder"] = [sortOrder]; | 2780 _queryParams["sortOrder"] = [sortOrder]; |
2444 } | 2781 } |
| 2782 if (viewType != null) { |
| 2783 _queryParams["viewType"] = [viewType]; |
| 2784 } |
2445 | 2785 |
2446 | 2786 |
2447 _url = 'users'; | 2787 _url = 'users'; |
2448 | 2788 |
2449 var _response = _requester.request(_url, | 2789 var _response = _requester.request(_url, |
2450 "GET", | 2790 "GET", |
2451 body: _body, | 2791 body: _body, |
2452 queryParams: _queryParams, | 2792 queryParams: _queryParams, |
2453 uploadOptions: _uploadOptions, | 2793 uploadOptions: _uploadOptions, |
2454 uploadMedia: _uploadMedia, | 2794 uploadMedia: _uploadMedia, |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2636 return _response.then((data) => new User.fromJson(data)); | 2976 return _response.then((data) => new User.fromJson(data)); |
2637 } | 2977 } |
2638 | 2978 |
2639 /** | 2979 /** |
2640 * Watch for changes in users list | 2980 * Watch for changes in users list |
2641 * | 2981 * |
2642 * [request] - The metadata request object. | 2982 * [request] - The metadata request object. |
2643 * | 2983 * |
2644 * Request parameters: | 2984 * Request parameters: |
2645 * | 2985 * |
| 2986 * [customFieldMask] - Comma-separated list of schema names. All fields from |
| 2987 * these schemas are fetched. This should only be set when projection=custom. |
| 2988 * |
2646 * [customer] - Immutable id of the Google Apps account. In case of | 2989 * [customer] - Immutable id of the Google Apps account. In case of |
2647 * multi-domain, to fetch all users for a customer, fill this field instead of | 2990 * multi-domain, to fetch all users for a customer, fill this field instead of |
2648 * domain. | 2991 * domain. |
2649 * | 2992 * |
2650 * [domain] - Name of the domain. Fill this field to get users from only this | 2993 * [domain] - Name of the domain. Fill this field to get users from only this |
2651 * domain. To return all users in a multi-domain fill customer field instead. | 2994 * domain. To return all users in a multi-domain fill customer field instead. |
2652 * | 2995 * |
2653 * [event] - Event on which subscription is intended (if subscribing) | 2996 * [event] - Event on which subscription is intended (if subscribing) |
2654 * Possible string values are: | 2997 * Possible string values are: |
2655 * - "add" : User Created Event | 2998 * - "add" : User Created Event |
2656 * - "delete" : User Deleted Event | 2999 * - "delete" : User Deleted Event |
2657 * - "makeAdmin" : User Admin Status Change Event | 3000 * - "makeAdmin" : User Admin Status Change Event |
2658 * - "undelete" : User Undeleted Event | 3001 * - "undelete" : User Undeleted Event |
2659 * - "update" : User Updated Event | 3002 * - "update" : User Updated Event |
2660 * | 3003 * |
2661 * [maxResults] - Maximum number of results to return. Default is 100. Max | 3004 * [maxResults] - Maximum number of results to return. Default is 100. Max |
2662 * allowed is 500 | 3005 * allowed is 500 |
2663 * Value must be between "1" and "500". | 3006 * Value must be between "1" and "500". |
2664 * | 3007 * |
2665 * [orderBy] - Column to use for sorting results | 3008 * [orderBy] - Column to use for sorting results |
2666 * Possible string values are: | 3009 * Possible string values are: |
2667 * - "email" : Primary email of the user. | 3010 * - "email" : Primary email of the user. |
2668 * - "familyName" : User's family name. | 3011 * - "familyName" : User's family name. |
2669 * - "givenName" : User's given name. | 3012 * - "givenName" : User's given name. |
2670 * | 3013 * |
2671 * [pageToken] - Token to specify next page in the list | 3014 * [pageToken] - Token to specify next page in the list |
2672 * | 3015 * |
2673 * [query] - Query string search. Should be of the form "" where field can be | 3016 * [projection] - What subset of fields to fetch for this user. |
2674 * any of supported fields, operators can be one of '=' for exact match or ':' | 3017 * Possible string values are: |
2675 * for prefix match. For prefix match, the value should always be followed by | 3018 * - "basic" : Do not include any custom fields for the user. |
2676 * a *. | 3019 * - "custom" : Include custom fields from schemas mentioned in |
| 3020 * customFieldMask. |
| 3021 * - "full" : Include all fields associated with this user. |
| 3022 * |
| 3023 * [query] - Query string search. Should be of the form "". Complete |
| 3024 * documentation is at |
| 3025 * https://developers.google.com/admin-sdk/directory/v1/guides/search-users |
2677 * | 3026 * |
2678 * [showDeleted] - If set to true retrieves the list of deleted users. Default | 3027 * [showDeleted] - If set to true retrieves the list of deleted users. Default |
2679 * is false | 3028 * is false |
2680 * | 3029 * |
2681 * [sortOrder] - Whether to return results in ascending or descending order. | 3030 * [sortOrder] - Whether to return results in ascending or descending order. |
2682 * Possible string values are: | 3031 * Possible string values are: |
2683 * - "ASCENDING" : Ascending order. | 3032 * - "ASCENDING" : Ascending order. |
2684 * - "DESCENDING" : Descending order. | 3033 * - "DESCENDING" : Descending order. |
2685 * | 3034 * |
| 3035 * [viewType] - Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the |
| 3036 * user. |
| 3037 * Possible string values are: |
| 3038 * - "admin_view" : Fetches the ADMIN_VIEW of the user. |
| 3039 * - "domain_public" : Fetches the DOMAIN_PUBLIC view of the user. |
| 3040 * |
2686 * Completes with a [Channel]. | 3041 * Completes with a [Channel]. |
2687 * | 3042 * |
2688 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 3043 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
2689 * error. | 3044 * error. |
2690 * | 3045 * |
2691 * If the used [http.Client] completes with an error when making a REST call, | 3046 * If the used [http.Client] completes with an error when making a REST call, |
2692 * this method will complete with the same error. | 3047 * this method will complete with the same error. |
2693 */ | 3048 */ |
2694 async.Future<Channel> watch(Channel request, {core.String customer, core.Strin
g domain, core.String event, core.int maxResults, core.String orderBy, core.Stri
ng pageToken, core.String query, core.String showDeleted, core.String sortOrder}
) { | 3049 async.Future<Channel> watch(Channel request, {core.String customFieldMask, cor
e.String customer, core.String domain, core.String event, core.int maxResults, c
ore.String orderBy, core.String pageToken, core.String projection, core.String q
uery, core.String showDeleted, core.String sortOrder, core.String viewType}) { |
2695 var _url = null; | 3050 var _url = null; |
2696 var _queryParams = new core.Map(); | 3051 var _queryParams = new core.Map(); |
2697 var _uploadMedia = null; | 3052 var _uploadMedia = null; |
2698 var _uploadOptions = null; | 3053 var _uploadOptions = null; |
2699 var _downloadOptions = common.DownloadOptions.Metadata; | 3054 var _downloadOptions = common.DownloadOptions.Metadata; |
2700 var _body = null; | 3055 var _body = null; |
2701 | 3056 |
2702 if (request != null) { | 3057 if (request != null) { |
2703 _body = convert.JSON.encode((request).toJson()); | 3058 _body = convert.JSON.encode((request).toJson()); |
2704 } | 3059 } |
| 3060 if (customFieldMask != null) { |
| 3061 _queryParams["customFieldMask"] = [customFieldMask]; |
| 3062 } |
2705 if (customer != null) { | 3063 if (customer != null) { |
2706 _queryParams["customer"] = [customer]; | 3064 _queryParams["customer"] = [customer]; |
2707 } | 3065 } |
2708 if (domain != null) { | 3066 if (domain != null) { |
2709 _queryParams["domain"] = [domain]; | 3067 _queryParams["domain"] = [domain]; |
2710 } | 3068 } |
2711 if (event != null) { | 3069 if (event != null) { |
2712 _queryParams["event"] = [event]; | 3070 _queryParams["event"] = [event]; |
2713 } | 3071 } |
2714 if (maxResults != null) { | 3072 if (maxResults != null) { |
2715 _queryParams["maxResults"] = ["${maxResults}"]; | 3073 _queryParams["maxResults"] = ["${maxResults}"]; |
2716 } | 3074 } |
2717 if (orderBy != null) { | 3075 if (orderBy != null) { |
2718 _queryParams["orderBy"] = [orderBy]; | 3076 _queryParams["orderBy"] = [orderBy]; |
2719 } | 3077 } |
2720 if (pageToken != null) { | 3078 if (pageToken != null) { |
2721 _queryParams["pageToken"] = [pageToken]; | 3079 _queryParams["pageToken"] = [pageToken]; |
2722 } | 3080 } |
| 3081 if (projection != null) { |
| 3082 _queryParams["projection"] = [projection]; |
| 3083 } |
2723 if (query != null) { | 3084 if (query != null) { |
2724 _queryParams["query"] = [query]; | 3085 _queryParams["query"] = [query]; |
2725 } | 3086 } |
2726 if (showDeleted != null) { | 3087 if (showDeleted != null) { |
2727 _queryParams["showDeleted"] = [showDeleted]; | 3088 _queryParams["showDeleted"] = [showDeleted]; |
2728 } | 3089 } |
2729 if (sortOrder != null) { | 3090 if (sortOrder != null) { |
2730 _queryParams["sortOrder"] = [sortOrder]; | 3091 _queryParams["sortOrder"] = [sortOrder]; |
2731 } | 3092 } |
| 3093 if (viewType != null) { |
| 3094 _queryParams["viewType"] = [viewType]; |
| 3095 } |
2732 | 3096 |
2733 | 3097 |
2734 _url = 'users/watch'; | 3098 _url = 'users/watch'; |
2735 | 3099 |
2736 var _response = _requester.request(_url, | 3100 var _response = _requester.request(_url, |
2737 "POST", | 3101 "POST", |
2738 body: _body, | 3102 body: _body, |
2739 queryParams: _queryParams, | 3103 queryParams: _queryParams, |
2740 uploadOptions: _uploadOptions, | 3104 uploadOptions: _uploadOptions, |
2741 uploadMedia: _uploadMedia, | 3105 uploadMedia: _uploadMedia, |
(...skipping 2113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4855 _json["kind"] = kind; | 5219 _json["kind"] = kind; |
4856 } | 5220 } |
4857 if (organizationUnits != null) { | 5221 if (organizationUnits != null) { |
4858 _json["organizationUnits"] = organizationUnits.map((value) => (value).toJs
on()).toList(); | 5222 _json["organizationUnits"] = organizationUnits.map((value) => (value).toJs
on()).toList(); |
4859 } | 5223 } |
4860 return _json; | 5224 return _json; |
4861 } | 5225 } |
4862 } | 5226 } |
4863 | 5227 |
4864 | 5228 |
| 5229 /** JSON template for Schema resource in Directory API. */ |
| 5230 class Schema { |
| 5231 /** ETag of the resource. */ |
| 5232 core.String etag; |
| 5233 |
| 5234 /** Fields of Schema */ |
| 5235 core.List<SchemaFieldSpec> fields; |
| 5236 |
| 5237 /** Kind of resource this is. */ |
| 5238 core.String kind; |
| 5239 |
| 5240 /** Unique identifier of Schema (Read-only) */ |
| 5241 core.String schemaId; |
| 5242 |
| 5243 /** Schema name */ |
| 5244 core.String schemaName; |
| 5245 |
| 5246 |
| 5247 Schema(); |
| 5248 |
| 5249 Schema.fromJson(core.Map _json) { |
| 5250 if (_json.containsKey("etag")) { |
| 5251 etag = _json["etag"]; |
| 5252 } |
| 5253 if (_json.containsKey("fields")) { |
| 5254 fields = _json["fields"].map((value) => new SchemaFieldSpec.fromJson(value
)).toList(); |
| 5255 } |
| 5256 if (_json.containsKey("kind")) { |
| 5257 kind = _json["kind"]; |
| 5258 } |
| 5259 if (_json.containsKey("schemaId")) { |
| 5260 schemaId = _json["schemaId"]; |
| 5261 } |
| 5262 if (_json.containsKey("schemaName")) { |
| 5263 schemaName = _json["schemaName"]; |
| 5264 } |
| 5265 } |
| 5266 |
| 5267 core.Map toJson() { |
| 5268 var _json = new core.Map(); |
| 5269 if (etag != null) { |
| 5270 _json["etag"] = etag; |
| 5271 } |
| 5272 if (fields != null) { |
| 5273 _json["fields"] = fields.map((value) => (value).toJson()).toList(); |
| 5274 } |
| 5275 if (kind != null) { |
| 5276 _json["kind"] = kind; |
| 5277 } |
| 5278 if (schemaId != null) { |
| 5279 _json["schemaId"] = schemaId; |
| 5280 } |
| 5281 if (schemaName != null) { |
| 5282 _json["schemaName"] = schemaName; |
| 5283 } |
| 5284 return _json; |
| 5285 } |
| 5286 } |
| 5287 |
| 5288 |
| 5289 /** |
| 5290 * Indexing spec for a numeric field. By default, only exact match queries will |
| 5291 * be supported for numeric fields. Setting the numericIndexingSpec allows range |
| 5292 * queries to be supported. |
| 5293 */ |
| 5294 class SchemaFieldSpecNumericIndexingSpec { |
| 5295 /** |
| 5296 * Maximum value of this field. This is meant to be indicative rather than |
| 5297 * enforced. Values outside this range will still be indexed, but search may |
| 5298 * not be as performant. |
| 5299 */ |
| 5300 core.double maxValue; |
| 5301 |
| 5302 /** |
| 5303 * Minimum value of this field. This is meant to be indicative rather than |
| 5304 * enforced. Values outside this range will still be indexed, but search may |
| 5305 * not be as performant. |
| 5306 */ |
| 5307 core.double minValue; |
| 5308 |
| 5309 |
| 5310 SchemaFieldSpecNumericIndexingSpec(); |
| 5311 |
| 5312 SchemaFieldSpecNumericIndexingSpec.fromJson(core.Map _json) { |
| 5313 if (_json.containsKey("maxValue")) { |
| 5314 maxValue = _json["maxValue"]; |
| 5315 } |
| 5316 if (_json.containsKey("minValue")) { |
| 5317 minValue = _json["minValue"]; |
| 5318 } |
| 5319 } |
| 5320 |
| 5321 core.Map toJson() { |
| 5322 var _json = new core.Map(); |
| 5323 if (maxValue != null) { |
| 5324 _json["maxValue"] = maxValue; |
| 5325 } |
| 5326 if (minValue != null) { |
| 5327 _json["minValue"] = minValue; |
| 5328 } |
| 5329 return _json; |
| 5330 } |
| 5331 } |
| 5332 |
| 5333 |
| 5334 /** JSON template for FieldSpec resource for Schemas in Directory API. */ |
| 5335 class SchemaFieldSpec { |
| 5336 /** ETag of the resource. */ |
| 5337 core.String etag; |
| 5338 |
| 5339 /** Unique identifier of Field (Read-only) */ |
| 5340 core.String fieldId; |
| 5341 |
| 5342 /** Name of the field. */ |
| 5343 core.String fieldName; |
| 5344 |
| 5345 /** Type of the field. */ |
| 5346 core.String fieldType; |
| 5347 |
| 5348 /** Boolean specifying whether the field is indexed or not. */ |
| 5349 core.bool indexed; |
| 5350 |
| 5351 /** Kind of resource this is. */ |
| 5352 core.String kind; |
| 5353 |
| 5354 /** Boolean specifying whether this is a multi-valued field or not. */ |
| 5355 core.bool multiValued; |
| 5356 |
| 5357 /** |
| 5358 * Indexing spec for a numeric field. By default, only exact match queries |
| 5359 * will be supported for numeric fields. Setting the numericIndexingSpec |
| 5360 * allows range queries to be supported. |
| 5361 */ |
| 5362 SchemaFieldSpecNumericIndexingSpec numericIndexingSpec; |
| 5363 |
| 5364 /** |
| 5365 * Read ACLs on the field specifying who can view values of this field. Valid |
| 5366 * values are "ALL_DOMAIN_USERS" and "ADMINS_AND_SELF". |
| 5367 */ |
| 5368 core.String readAccessType; |
| 5369 |
| 5370 |
| 5371 SchemaFieldSpec(); |
| 5372 |
| 5373 SchemaFieldSpec.fromJson(core.Map _json) { |
| 5374 if (_json.containsKey("etag")) { |
| 5375 etag = _json["etag"]; |
| 5376 } |
| 5377 if (_json.containsKey("fieldId")) { |
| 5378 fieldId = _json["fieldId"]; |
| 5379 } |
| 5380 if (_json.containsKey("fieldName")) { |
| 5381 fieldName = _json["fieldName"]; |
| 5382 } |
| 5383 if (_json.containsKey("fieldType")) { |
| 5384 fieldType = _json["fieldType"]; |
| 5385 } |
| 5386 if (_json.containsKey("indexed")) { |
| 5387 indexed = _json["indexed"]; |
| 5388 } |
| 5389 if (_json.containsKey("kind")) { |
| 5390 kind = _json["kind"]; |
| 5391 } |
| 5392 if (_json.containsKey("multiValued")) { |
| 5393 multiValued = _json["multiValued"]; |
| 5394 } |
| 5395 if (_json.containsKey("numericIndexingSpec")) { |
| 5396 numericIndexingSpec = new SchemaFieldSpecNumericIndexingSpec.fromJson(_jso
n["numericIndexingSpec"]); |
| 5397 } |
| 5398 if (_json.containsKey("readAccessType")) { |
| 5399 readAccessType = _json["readAccessType"]; |
| 5400 } |
| 5401 } |
| 5402 |
| 5403 core.Map toJson() { |
| 5404 var _json = new core.Map(); |
| 5405 if (etag != null) { |
| 5406 _json["etag"] = etag; |
| 5407 } |
| 5408 if (fieldId != null) { |
| 5409 _json["fieldId"] = fieldId; |
| 5410 } |
| 5411 if (fieldName != null) { |
| 5412 _json["fieldName"] = fieldName; |
| 5413 } |
| 5414 if (fieldType != null) { |
| 5415 _json["fieldType"] = fieldType; |
| 5416 } |
| 5417 if (indexed != null) { |
| 5418 _json["indexed"] = indexed; |
| 5419 } |
| 5420 if (kind != null) { |
| 5421 _json["kind"] = kind; |
| 5422 } |
| 5423 if (multiValued != null) { |
| 5424 _json["multiValued"] = multiValued; |
| 5425 } |
| 5426 if (numericIndexingSpec != null) { |
| 5427 _json["numericIndexingSpec"] = (numericIndexingSpec).toJson(); |
| 5428 } |
| 5429 if (readAccessType != null) { |
| 5430 _json["readAccessType"] = readAccessType; |
| 5431 } |
| 5432 return _json; |
| 5433 } |
| 5434 } |
| 5435 |
| 5436 |
| 5437 /** JSON response template for List Schema operation in Directory API. */ |
| 5438 class Schemas { |
| 5439 /** ETag of the resource. */ |
| 5440 core.String etag; |
| 5441 |
| 5442 /** Kind of resource this is. */ |
| 5443 core.String kind; |
| 5444 |
| 5445 /** List of UserSchema objects. */ |
| 5446 core.List<Schema> schemas; |
| 5447 |
| 5448 |
| 5449 Schemas(); |
| 5450 |
| 5451 Schemas.fromJson(core.Map _json) { |
| 5452 if (_json.containsKey("etag")) { |
| 5453 etag = _json["etag"]; |
| 5454 } |
| 5455 if (_json.containsKey("kind")) { |
| 5456 kind = _json["kind"]; |
| 5457 } |
| 5458 if (_json.containsKey("schemas")) { |
| 5459 schemas = _json["schemas"].map((value) => new Schema.fromJson(value)).toLi
st(); |
| 5460 } |
| 5461 } |
| 5462 |
| 5463 core.Map toJson() { |
| 5464 var _json = new core.Map(); |
| 5465 if (etag != null) { |
| 5466 _json["etag"] = etag; |
| 5467 } |
| 5468 if (kind != null) { |
| 5469 _json["kind"] = kind; |
| 5470 } |
| 5471 if (schemas != null) { |
| 5472 _json["schemas"] = schemas.map((value) => (value).toJson()).toList(); |
| 5473 } |
| 5474 return _json; |
| 5475 } |
| 5476 } |
| 5477 |
| 5478 |
4865 /** JSON template for token resource in Directory API. */ | 5479 /** JSON template for token resource in Directory API. */ |
4866 class Token { | 5480 class Token { |
4867 /** | 5481 /** |
4868 * Whether the application is registered with Google. The value is true if the | 5482 * Whether the application is registered with Google. The value is true if the |
4869 * application has an anonymous Client ID. | 5483 * application has an anonymous Client ID. |
4870 */ | 5484 */ |
4871 core.bool anonymous; | 5485 core.bool anonymous; |
4872 | 5486 |
4873 /** The Client ID of the application the token is issued to. */ | 5487 /** The Client ID of the application the token is issued to. */ |
4874 core.String clientId; | 5488 core.String clientId; |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4992 _json["items"] = items.map((value) => (value).toJson()).toList(); | 5606 _json["items"] = items.map((value) => (value).toJson()).toList(); |
4993 } | 5607 } |
4994 if (kind != null) { | 5608 if (kind != null) { |
4995 _json["kind"] = kind; | 5609 _json["kind"] = kind; |
4996 } | 5610 } |
4997 return _json; | 5611 return _json; |
4998 } | 5612 } |
4999 } | 5613 } |
5000 | 5614 |
5001 | 5615 |
5002 /** JSON template for User object in Apps Directory API. */ | 5616 /** JSON template for User object in Directory API. */ |
5003 class User { | 5617 class User { |
5004 /** | 5618 /** |
5005 * Not documented yet. | 5619 * Not documented yet. |
5006 * | 5620 * |
5007 * The values for Object must be JSON objects. It can consist of `num`, | 5621 * The values for Object must be JSON objects. It can consist of `num`, |
5008 * `String`, `bool` and `null` as well as `Map` and `List` values. | 5622 * `String`, `bool` and `null` as well as `Map` and `List` values. |
5009 */ | 5623 */ |
5010 core.Object addresses; | 5624 core.Object addresses; |
5011 | 5625 |
5012 /** Indicates if user has agreed to terms (Read-only) */ | 5626 /** Indicates if user has agreed to terms (Read-only) */ |
5013 core.bool agreedToTerms; | 5627 core.bool agreedToTerms; |
5014 | 5628 |
5015 /** List of aliases (Read-only) */ | 5629 /** List of aliases (Read-only) */ |
5016 core.List<core.String> aliases; | 5630 core.List<core.String> aliases; |
5017 | 5631 |
5018 /** Boolean indicating if the user should change password in next login */ | 5632 /** Boolean indicating if the user should change password in next login */ |
5019 core.bool changePasswordAtNextLogin; | 5633 core.bool changePasswordAtNextLogin; |
5020 | 5634 |
5021 /** User's Google account creation time. (Read-only) */ | 5635 /** User's Google account creation time. (Read-only) */ |
5022 core.DateTime creationTime; | 5636 core.DateTime creationTime; |
5023 | 5637 |
| 5638 /** Custom fields of the user. */ |
| 5639 core.Map<core.String, UserCustomProperties> customSchemas; |
| 5640 |
5024 /** CustomerId of User (Read-only) */ | 5641 /** CustomerId of User (Read-only) */ |
5025 core.String customerId; | 5642 core.String customerId; |
5026 | 5643 |
5027 /** Not documented yet. */ | 5644 /** Not documented yet. */ |
5028 core.DateTime deletionTime; | 5645 core.DateTime deletionTime; |
5029 | 5646 |
5030 /** | 5647 /** |
5031 * Not documented yet. | 5648 * Not documented yet. |
5032 * | 5649 * |
5033 * The values for Object must be JSON objects. It can consist of `num`, | 5650 * The values for Object must be JSON objects. It can consist of `num`, |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5141 } | 5758 } |
5142 if (_json.containsKey("aliases")) { | 5759 if (_json.containsKey("aliases")) { |
5143 aliases = _json["aliases"]; | 5760 aliases = _json["aliases"]; |
5144 } | 5761 } |
5145 if (_json.containsKey("changePasswordAtNextLogin")) { | 5762 if (_json.containsKey("changePasswordAtNextLogin")) { |
5146 changePasswordAtNextLogin = _json["changePasswordAtNextLogin"]; | 5763 changePasswordAtNextLogin = _json["changePasswordAtNextLogin"]; |
5147 } | 5764 } |
5148 if (_json.containsKey("creationTime")) { | 5765 if (_json.containsKey("creationTime")) { |
5149 creationTime = core.DateTime.parse(_json["creationTime"]); | 5766 creationTime = core.DateTime.parse(_json["creationTime"]); |
5150 } | 5767 } |
| 5768 if (_json.containsKey("customSchemas")) { |
| 5769 customSchemas = common_internal.mapMap(_json["customSchemas"], (item) => n
ew UserCustomProperties.fromJson(item)); |
| 5770 } |
5151 if (_json.containsKey("customerId")) { | 5771 if (_json.containsKey("customerId")) { |
5152 customerId = _json["customerId"]; | 5772 customerId = _json["customerId"]; |
5153 } | 5773 } |
5154 if (_json.containsKey("deletionTime")) { | 5774 if (_json.containsKey("deletionTime")) { |
5155 deletionTime = core.DateTime.parse(_json["deletionTime"]); | 5775 deletionTime = core.DateTime.parse(_json["deletionTime"]); |
5156 } | 5776 } |
5157 if (_json.containsKey("emails")) { | 5777 if (_json.containsKey("emails")) { |
5158 emails = _json["emails"]; | 5778 emails = _json["emails"]; |
5159 } | 5779 } |
5160 if (_json.containsKey("etag")) { | 5780 if (_json.containsKey("etag")) { |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5238 } | 5858 } |
5239 if (aliases != null) { | 5859 if (aliases != null) { |
5240 _json["aliases"] = aliases; | 5860 _json["aliases"] = aliases; |
5241 } | 5861 } |
5242 if (changePasswordAtNextLogin != null) { | 5862 if (changePasswordAtNextLogin != null) { |
5243 _json["changePasswordAtNextLogin"] = changePasswordAtNextLogin; | 5863 _json["changePasswordAtNextLogin"] = changePasswordAtNextLogin; |
5244 } | 5864 } |
5245 if (creationTime != null) { | 5865 if (creationTime != null) { |
5246 _json["creationTime"] = (creationTime).toIso8601String(); | 5866 _json["creationTime"] = (creationTime).toIso8601String(); |
5247 } | 5867 } |
| 5868 if (customSchemas != null) { |
| 5869 _json["customSchemas"] = customSchemas; |
| 5870 } |
5248 if (customerId != null) { | 5871 if (customerId != null) { |
5249 _json["customerId"] = customerId; | 5872 _json["customerId"] = customerId; |
5250 } | 5873 } |
5251 if (deletionTime != null) { | 5874 if (deletionTime != null) { |
5252 _json["deletionTime"] = (deletionTime).toIso8601String(); | 5875 _json["deletionTime"] = (deletionTime).toIso8601String(); |
5253 } | 5876 } |
5254 if (emails != null) { | 5877 if (emails != null) { |
5255 _json["emails"] = emails; | 5878 _json["emails"] = emails; |
5256 } | 5879 } |
5257 if (etag != null) { | 5880 if (etag != null) { |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5465 _json["streetAddress"] = streetAddress; | 6088 _json["streetAddress"] = streetAddress; |
5466 } | 6089 } |
5467 if (type != null) { | 6090 if (type != null) { |
5468 _json["type"] = type; | 6091 _json["type"] = type; |
5469 } | 6092 } |
5470 return _json; | 6093 return _json; |
5471 } | 6094 } |
5472 } | 6095 } |
5473 | 6096 |
5474 | 6097 |
| 6098 /** |
| 6099 * JSON template for a set of custom properties (i.e. all fields in a particular |
| 6100 * schema) |
| 6101 */ |
| 6102 class UserCustomProperties |
| 6103 extends collection.MapBase<core.String, core.Object> { |
| 6104 final core.Map _innerMap = {}; |
| 6105 |
| 6106 UserCustomProperties(); |
| 6107 |
| 6108 UserCustomProperties.fromJson(core.Map _json) { |
| 6109 _json.forEach((core.String key, value) { |
| 6110 this[key] = value; |
| 6111 }); |
| 6112 } |
| 6113 |
| 6114 core.Map toJson() { |
| 6115 var _json = {}; |
| 6116 this.forEach((core.String key, value) { |
| 6117 _json[key] = value; |
| 6118 }); |
| 6119 return _json; |
| 6120 } |
| 6121 |
| 6122 core.Object operator [](core.Object key) |
| 6123 => _innerMap[key]; |
| 6124 |
| 6125 operator []=(core.String key, core.Object value) { |
| 6126 _innerMap[key] = value; |
| 6127 } |
| 6128 |
| 6129 void clear() { |
| 6130 _innerMap.clear(); |
| 6131 } |
| 6132 |
| 6133 core.Iterable<core.String> get keys => _innerMap.keys; |
| 6134 |
| 6135 core.Object remove(core.Object key) => _innerMap.remove(key); |
| 6136 } |
| 6137 |
| 6138 |
5475 /** JSON template for an email. */ | 6139 /** JSON template for an email. */ |
5476 class UserEmail { | 6140 class UserEmail { |
5477 /** Email id of the user. */ | 6141 /** Email id of the user. */ |
5478 core.String address; | 6142 core.String address; |
5479 | 6143 |
5480 /** Custom Type. */ | 6144 /** Custom Type. */ |
5481 core.String customType; | 6145 core.String customType; |
5482 | 6146 |
5483 /** | 6147 /** |
5484 * If this is user's primary email. Only one entry could be marked as primary. | 6148 * If this is user's primary email. Only one entry could be marked as primary. |
(...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6224 _json["items"] = items.map((value) => (value).toJson()).toList(); | 6888 _json["items"] = items.map((value) => (value).toJson()).toList(); |
6225 } | 6889 } |
6226 if (kind != null) { | 6890 if (kind != null) { |
6227 _json["kind"] = kind; | 6891 _json["kind"] = kind; |
6228 } | 6892 } |
6229 return _json; | 6893 return _json; |
6230 } | 6894 } |
6231 } | 6895 } |
6232 | 6896 |
6233 | 6897 |
OLD | NEW |