OLD | NEW |
| 1 // This is a generated file (see the discoveryapis_generator project). |
| 2 |
1 library googleapis.admin.directory_v1; | 3 library googleapis.admin.directory_v1; |
2 | 4 |
3 import "dart:core" as core; | 5 import 'dart:core' as core; |
4 import "dart:collection" as collection; | 6 import 'dart:collection' as collection; |
5 import "dart:async" as async; | 7 import 'dart:async' as async; |
6 import "dart:convert" as convert; | 8 import 'dart:convert' as convert; |
7 | 9 |
8 import "package:crypto/crypto.dart" as crypto; | 10 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
| 11 import 'package:crypto/crypto.dart' as crypto; |
9 import 'package:http/http.dart' as http; | 12 import 'package:http/http.dart' as http; |
10 import '../src/common_internal.dart' as common_internal; | |
11 import '../common/common.dart' as common; | |
12 | 13 |
13 export '../common/common.dart' show ApiRequestError; | 14 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show |
14 export '../common/common.dart' show DetailedApiRequestError; | 15 ApiRequestError, DetailedApiRequestError; |
| 16 |
| 17 const core.String USER_AGENT = 'dart-api-client admin/directory_v1'; |
15 | 18 |
16 /** | 19 /** |
17 * The Admin SDK Directory API lets you view and manage enterprise resources | 20 * The Admin SDK Directory API lets you view and manage enterprise resources |
18 * such as users and groups, administrative notifications, security features, | 21 * such as users and groups, administrative notifications, security features, |
19 * and more. | 22 * and more. |
20 */ | 23 */ |
21 class AdminApi { | 24 class AdminApi { |
22 /** View and manage your Chrome OS devices' metadata */ | 25 /** View and manage your Chrome OS devices' metadata */ |
23 static const AdminDirectoryDeviceChromeosScope = "https://www.googleapis.com/a
uth/admin.directory.device.chromeos"; | 26 static const AdminDirectoryDeviceChromeosScope = "https://www.googleapis.com/a
uth/admin.directory.device.chromeos"; |
24 | 27 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 /** Manage data access permissions for users on your domain */ | 73 /** Manage data access permissions for users on your domain */ |
71 static const AdminDirectoryUserSecurityScope = "https://www.googleapis.com/aut
h/admin.directory.user.security"; | 74 static const AdminDirectoryUserSecurityScope = "https://www.googleapis.com/aut
h/admin.directory.user.security"; |
72 | 75 |
73 /** View and manage the provisioning of user schemas on your domain */ | 76 /** View and manage the provisioning of user schemas on your domain */ |
74 static const AdminDirectoryUserschemaScope = "https://www.googleapis.com/auth/
admin.directory.userschema"; | 77 static const AdminDirectoryUserschemaScope = "https://www.googleapis.com/auth/
admin.directory.userschema"; |
75 | 78 |
76 /** View user schemas on your domain */ | 79 /** View user schemas on your domain */ |
77 static const AdminDirectoryUserschemaReadonlyScope = "https://www.googleapis.c
om/auth/admin.directory.userschema.readonly"; | 80 static const AdminDirectoryUserschemaReadonlyScope = "https://www.googleapis.c
om/auth/admin.directory.userschema.readonly"; |
78 | 81 |
79 | 82 |
80 final common_internal.ApiRequester _requester; | 83 final commons.ApiRequester _requester; |
81 | 84 |
82 AspsResourceApi get asps => new AspsResourceApi(_requester); | 85 AspsResourceApi get asps => new AspsResourceApi(_requester); |
83 ChannelsResourceApi get channels => new ChannelsResourceApi(_requester); | 86 ChannelsResourceApi get channels => new ChannelsResourceApi(_requester); |
84 ChromeosdevicesResourceApi get chromeosdevices => new ChromeosdevicesResourceA
pi(_requester); | 87 ChromeosdevicesResourceApi get chromeosdevices => new ChromeosdevicesResourceA
pi(_requester); |
85 GroupsResourceApi get groups => new GroupsResourceApi(_requester); | 88 GroupsResourceApi get groups => new GroupsResourceApi(_requester); |
86 MembersResourceApi get members => new MembersResourceApi(_requester); | 89 MembersResourceApi get members => new MembersResourceApi(_requester); |
87 MobiledevicesResourceApi get mobiledevices => new MobiledevicesResourceApi(_re
quester); | 90 MobiledevicesResourceApi get mobiledevices => new MobiledevicesResourceApi(_re
quester); |
88 NotificationsResourceApi get notifications => new NotificationsResourceApi(_re
quester); | 91 NotificationsResourceApi get notifications => new NotificationsResourceApi(_re
quester); |
89 OrgunitsResourceApi get orgunits => new OrgunitsResourceApi(_requester); | 92 OrgunitsResourceApi get orgunits => new OrgunitsResourceApi(_requester); |
90 SchemasResourceApi get schemas => new SchemasResourceApi(_requester); | 93 SchemasResourceApi get schemas => new SchemasResourceApi(_requester); |
91 TokensResourceApi get tokens => new TokensResourceApi(_requester); | 94 TokensResourceApi get tokens => new TokensResourceApi(_requester); |
92 UsersResourceApi get users => new UsersResourceApi(_requester); | 95 UsersResourceApi get users => new UsersResourceApi(_requester); |
93 VerificationCodesResourceApi get verificationCodes => new VerificationCodesRes
ourceApi(_requester); | 96 VerificationCodesResourceApi get verificationCodes => new VerificationCodesRes
ourceApi(_requester); |
94 | 97 |
95 AdminApi(http.Client client, {core.String rootUrl: "https://www.googleapis.com
/", core.String servicePath: "admin/directory/v1/"}) : | 98 AdminApi(http.Client client, {core.String rootUrl: "https://www.googleapis.com
/", core.String servicePath: "admin/directory/v1/"}) : |
96 _requester = new common_internal.ApiRequester(client, rootUrl, servicePath
); | 99 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); |
97 } | 100 } |
98 | 101 |
99 | 102 |
100 /** Not documented yet. */ | |
101 class AspsResourceApi { | 103 class AspsResourceApi { |
102 final common_internal.ApiRequester _requester; | 104 final commons.ApiRequester _requester; |
103 | 105 |
104 AspsResourceApi(common_internal.ApiRequester client) : | 106 AspsResourceApi(commons.ApiRequester client) : |
105 _requester = client; | 107 _requester = client; |
106 | 108 |
107 /** | 109 /** |
108 * Delete an ASP issued by a user. | 110 * Delete an ASP issued by a user. |
109 * | 111 * |
110 * Request parameters: | 112 * Request parameters: |
111 * | 113 * |
112 * [userKey] - Identifies the user in the API request. The value can be the | 114 * [userKey] - Identifies the user in the API request. The value can be the |
113 * user's primary email address, alias email address, or unique user ID. | 115 * user's primary email address, alias email address, or unique user ID. |
114 * | 116 * |
115 * [codeId] - The unique ID of the ASP to be deleted. | 117 * [codeId] - The unique ID of the ASP to be deleted. |
116 * | 118 * |
117 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 119 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
118 * error. | 120 * error. |
119 * | 121 * |
120 * If the used [http.Client] completes with an error when making a REST call, | 122 * If the used [http.Client] completes with an error when making a REST call, |
121 * this method will complete with the same error. | 123 * this method will complete with the same error. |
122 */ | 124 */ |
123 async.Future delete(core.String userKey, core.int codeId) { | 125 async.Future delete(core.String userKey, core.int codeId) { |
124 var _url = null; | 126 var _url = null; |
125 var _queryParams = new core.Map(); | 127 var _queryParams = new core.Map(); |
126 var _uploadMedia = null; | 128 var _uploadMedia = null; |
127 var _uploadOptions = null; | 129 var _uploadOptions = null; |
128 var _downloadOptions = common.DownloadOptions.Metadata; | 130 var _downloadOptions = commons.DownloadOptions.Metadata; |
129 var _body = null; | 131 var _body = null; |
130 | 132 |
131 if (userKey == null) { | 133 if (userKey == null) { |
132 throw new core.ArgumentError("Parameter userKey is required."); | 134 throw new core.ArgumentError("Parameter userKey is required."); |
133 } | 135 } |
134 if (codeId == null) { | 136 if (codeId == null) { |
135 throw new core.ArgumentError("Parameter codeId is required."); | 137 throw new core.ArgumentError("Parameter codeId is required."); |
136 } | 138 } |
137 | 139 |
138 _downloadOptions = null; | 140 _downloadOptions = null; |
139 | 141 |
140 _url = 'users/' + common_internal.Escaper.ecapeVariable('$userKey') + '/asps
/' + common_internal.Escaper.ecapeVariable('$codeId'); | 142 _url = 'users/' + commons.Escaper.ecapeVariable('$userKey') + '/asps/' + com
mons.Escaper.ecapeVariable('$codeId'); |
141 | 143 |
142 var _response = _requester.request(_url, | 144 var _response = _requester.request(_url, |
143 "DELETE", | 145 "DELETE", |
144 body: _body, | 146 body: _body, |
145 queryParams: _queryParams, | 147 queryParams: _queryParams, |
146 uploadOptions: _uploadOptions, | 148 uploadOptions: _uploadOptions, |
147 uploadMedia: _uploadMedia, | 149 uploadMedia: _uploadMedia, |
148 downloadOptions: _downloadOptions); | 150 downloadOptions: _downloadOptions); |
149 return _response.then((data) => null); | 151 return _response.then((data) => null); |
150 } | 152 } |
151 | 153 |
152 /** | 154 /** |
153 * Get information about an ASP issued by a user. | 155 * Get information about an ASP issued by a user. |
154 * | 156 * |
155 * Request parameters: | 157 * Request parameters: |
156 * | 158 * |
157 * [userKey] - Identifies the user in the API request. The value can be the | 159 * [userKey] - Identifies the user in the API request. The value can be the |
158 * user's primary email address, alias email address, or unique user ID. | 160 * user's primary email address, alias email address, or unique user ID. |
159 * | 161 * |
160 * [codeId] - The unique ID of the ASP. | 162 * [codeId] - The unique ID of the ASP. |
161 * | 163 * |
162 * Completes with a [Asp]. | 164 * Completes with a [Asp]. |
163 * | 165 * |
164 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 166 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
165 * error. | 167 * error. |
166 * | 168 * |
167 * If the used [http.Client] completes with an error when making a REST call, | 169 * If the used [http.Client] completes with an error when making a REST call, |
168 * this method will complete with the same error. | 170 * this method will complete with the same error. |
169 */ | 171 */ |
170 async.Future<Asp> get(core.String userKey, core.int codeId) { | 172 async.Future<Asp> get(core.String userKey, core.int codeId) { |
171 var _url = null; | 173 var _url = null; |
172 var _queryParams = new core.Map(); | 174 var _queryParams = new core.Map(); |
173 var _uploadMedia = null; | 175 var _uploadMedia = null; |
174 var _uploadOptions = null; | 176 var _uploadOptions = null; |
175 var _downloadOptions = common.DownloadOptions.Metadata; | 177 var _downloadOptions = commons.DownloadOptions.Metadata; |
176 var _body = null; | 178 var _body = null; |
177 | 179 |
178 if (userKey == null) { | 180 if (userKey == null) { |
179 throw new core.ArgumentError("Parameter userKey is required."); | 181 throw new core.ArgumentError("Parameter userKey is required."); |
180 } | 182 } |
181 if (codeId == null) { | 183 if (codeId == null) { |
182 throw new core.ArgumentError("Parameter codeId is required."); | 184 throw new core.ArgumentError("Parameter codeId is required."); |
183 } | 185 } |
184 | 186 |
185 | 187 |
186 _url = 'users/' + common_internal.Escaper.ecapeVariable('$userKey') + '/asps
/' + common_internal.Escaper.ecapeVariable('$codeId'); | 188 _url = 'users/' + commons.Escaper.ecapeVariable('$userKey') + '/asps/' + com
mons.Escaper.ecapeVariable('$codeId'); |
187 | 189 |
188 var _response = _requester.request(_url, | 190 var _response = _requester.request(_url, |
189 "GET", | 191 "GET", |
190 body: _body, | 192 body: _body, |
191 queryParams: _queryParams, | 193 queryParams: _queryParams, |
192 uploadOptions: _uploadOptions, | 194 uploadOptions: _uploadOptions, |
193 uploadMedia: _uploadMedia, | 195 uploadMedia: _uploadMedia, |
194 downloadOptions: _downloadOptions); | 196 downloadOptions: _downloadOptions); |
195 return _response.then((data) => new Asp.fromJson(data)); | 197 return _response.then((data) => new Asp.fromJson(data)); |
196 } | 198 } |
197 | 199 |
198 /** | 200 /** |
199 * List the ASPs issued by a user. | 201 * List the ASPs issued by a user. |
200 * | 202 * |
201 * Request parameters: | 203 * Request parameters: |
202 * | 204 * |
203 * [userKey] - Identifies the user in the API request. The value can be the | 205 * [userKey] - Identifies the user in the API request. The value can be the |
204 * user's primary email address, alias email address, or unique user ID. | 206 * user's primary email address, alias email address, or unique user ID. |
205 * | 207 * |
206 * Completes with a [Asps]. | 208 * Completes with a [Asps]. |
207 * | 209 * |
208 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 210 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
209 * error. | 211 * error. |
210 * | 212 * |
211 * If the used [http.Client] completes with an error when making a REST call, | 213 * If the used [http.Client] completes with an error when making a REST call, |
212 * this method will complete with the same error. | 214 * this method will complete with the same error. |
213 */ | 215 */ |
214 async.Future<Asps> list(core.String userKey) { | 216 async.Future<Asps> list(core.String userKey) { |
215 var _url = null; | 217 var _url = null; |
216 var _queryParams = new core.Map(); | 218 var _queryParams = new core.Map(); |
217 var _uploadMedia = null; | 219 var _uploadMedia = null; |
218 var _uploadOptions = null; | 220 var _uploadOptions = null; |
219 var _downloadOptions = common.DownloadOptions.Metadata; | 221 var _downloadOptions = commons.DownloadOptions.Metadata; |
220 var _body = null; | 222 var _body = null; |
221 | 223 |
222 if (userKey == null) { | 224 if (userKey == null) { |
223 throw new core.ArgumentError("Parameter userKey is required."); | 225 throw new core.ArgumentError("Parameter userKey is required."); |
224 } | 226 } |
225 | 227 |
226 | 228 |
227 _url = 'users/' + common_internal.Escaper.ecapeVariable('$userKey') + '/asps
'; | 229 _url = 'users/' + commons.Escaper.ecapeVariable('$userKey') + '/asps'; |
228 | 230 |
229 var _response = _requester.request(_url, | 231 var _response = _requester.request(_url, |
230 "GET", | 232 "GET", |
231 body: _body, | 233 body: _body, |
232 queryParams: _queryParams, | 234 queryParams: _queryParams, |
233 uploadOptions: _uploadOptions, | 235 uploadOptions: _uploadOptions, |
234 uploadMedia: _uploadMedia, | 236 uploadMedia: _uploadMedia, |
235 downloadOptions: _downloadOptions); | 237 downloadOptions: _downloadOptions); |
236 return _response.then((data) => new Asps.fromJson(data)); | 238 return _response.then((data) => new Asps.fromJson(data)); |
237 } | 239 } |
238 | 240 |
239 } | 241 } |
240 | 242 |
241 | 243 |
242 /** Not documented yet. */ | |
243 class ChannelsResourceApi { | 244 class ChannelsResourceApi { |
244 final common_internal.ApiRequester _requester; | 245 final commons.ApiRequester _requester; |
245 | 246 |
246 ChannelsResourceApi(common_internal.ApiRequester client) : | 247 ChannelsResourceApi(commons.ApiRequester client) : |
247 _requester = client; | 248 _requester = client; |
248 | 249 |
249 /** | 250 /** |
250 * Stop watching resources through this channel | 251 * Stop watching resources through this channel |
251 * | 252 * |
252 * [request] - The metadata request object. | 253 * [request] - The metadata request object. |
253 * | 254 * |
254 * Request parameters: | 255 * Request parameters: |
255 * | 256 * |
256 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 257 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
257 * error. | 258 * error. |
258 * | 259 * |
259 * If the used [http.Client] completes with an error when making a REST call, | 260 * If the used [http.Client] completes with an error when making a REST call, |
260 * this method will complete with the same error. | 261 * this method will complete with the same error. |
261 */ | 262 */ |
262 async.Future stop(Channel request) { | 263 async.Future stop(Channel request) { |
263 var _url = null; | 264 var _url = null; |
264 var _queryParams = new core.Map(); | 265 var _queryParams = new core.Map(); |
265 var _uploadMedia = null; | 266 var _uploadMedia = null; |
266 var _uploadOptions = null; | 267 var _uploadOptions = null; |
267 var _downloadOptions = common.DownloadOptions.Metadata; | 268 var _downloadOptions = commons.DownloadOptions.Metadata; |
268 var _body = null; | 269 var _body = null; |
269 | 270 |
270 if (request != null) { | 271 if (request != null) { |
271 _body = convert.JSON.encode((request).toJson()); | 272 _body = convert.JSON.encode((request).toJson()); |
272 } | 273 } |
273 | 274 |
274 _downloadOptions = null; | 275 _downloadOptions = null; |
275 | 276 |
276 _url = '/admin/directory_v1/channels/stop'; | 277 _url = '/admin/directory_v1/channels/stop'; |
277 | 278 |
278 var _response = _requester.request(_url, | 279 var _response = _requester.request(_url, |
279 "POST", | 280 "POST", |
280 body: _body, | 281 body: _body, |
281 queryParams: _queryParams, | 282 queryParams: _queryParams, |
282 uploadOptions: _uploadOptions, | 283 uploadOptions: _uploadOptions, |
283 uploadMedia: _uploadMedia, | 284 uploadMedia: _uploadMedia, |
284 downloadOptions: _downloadOptions); | 285 downloadOptions: _downloadOptions); |
285 return _response.then((data) => null); | 286 return _response.then((data) => null); |
286 } | 287 } |
287 | 288 |
288 } | 289 } |
289 | 290 |
290 | 291 |
291 /** Not documented yet. */ | |
292 class ChromeosdevicesResourceApi { | 292 class ChromeosdevicesResourceApi { |
293 final common_internal.ApiRequester _requester; | 293 final commons.ApiRequester _requester; |
294 | 294 |
295 ChromeosdevicesResourceApi(common_internal.ApiRequester client) : | 295 ChromeosdevicesResourceApi(commons.ApiRequester client) : |
296 _requester = client; | 296 _requester = client; |
297 | 297 |
298 /** | 298 /** |
299 * Retrieve Chrome OS Device | 299 * Retrieve Chrome OS Device |
300 * | 300 * |
301 * Request parameters: | 301 * Request parameters: |
302 * | 302 * |
303 * [customerId] - Immutable id of the Google Apps account | 303 * [customerId] - Immutable id of the Google Apps account |
304 * | 304 * |
305 * [deviceId] - Immutable id of Chrome OS Device | 305 * [deviceId] - Immutable id of Chrome OS Device |
306 * | 306 * |
307 * [projection] - Restrict information returned to a set of selected fields. | 307 * [projection] - Restrict information returned to a set of selected fields. |
308 * Possible string values are: | 308 * Possible string values are: |
309 * - "BASIC" : Includes only the basic metadata fields (e.g., deviceId, | 309 * - "BASIC" : Includes only the basic metadata fields (e.g., deviceId, |
310 * serialNumber, status, and user) | 310 * serialNumber, status, and user) |
311 * - "FULL" : Includes all metadata fields | 311 * - "FULL" : Includes all metadata fields |
312 * | 312 * |
313 * Completes with a [ChromeOsDevice]. | 313 * Completes with a [ChromeOsDevice]. |
314 * | 314 * |
315 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 315 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
316 * error. | 316 * error. |
317 * | 317 * |
318 * If the used [http.Client] completes with an error when making a REST call, | 318 * If the used [http.Client] completes with an error when making a REST call, |
319 * this method will complete with the same error. | 319 * this method will complete with the same error. |
320 */ | 320 */ |
321 async.Future<ChromeOsDevice> get(core.String customerId, core.String deviceId,
{core.String projection}) { | 321 async.Future<ChromeOsDevice> get(core.String customerId, core.String deviceId,
{core.String projection}) { |
322 var _url = null; | 322 var _url = null; |
323 var _queryParams = new core.Map(); | 323 var _queryParams = new core.Map(); |
324 var _uploadMedia = null; | 324 var _uploadMedia = null; |
325 var _uploadOptions = null; | 325 var _uploadOptions = null; |
326 var _downloadOptions = common.DownloadOptions.Metadata; | 326 var _downloadOptions = commons.DownloadOptions.Metadata; |
327 var _body = null; | 327 var _body = null; |
328 | 328 |
329 if (customerId == null) { | 329 if (customerId == null) { |
330 throw new core.ArgumentError("Parameter customerId is required."); | 330 throw new core.ArgumentError("Parameter customerId is required."); |
331 } | 331 } |
332 if (deviceId == null) { | 332 if (deviceId == null) { |
333 throw new core.ArgumentError("Parameter deviceId is required."); | 333 throw new core.ArgumentError("Parameter deviceId is required."); |
334 } | 334 } |
335 if (projection != null) { | 335 if (projection != null) { |
336 _queryParams["projection"] = [projection]; | 336 _queryParams["projection"] = [projection]; |
337 } | 337 } |
338 | 338 |
339 | 339 |
340 _url = 'customer/' + common_internal.Escaper.ecapeVariable('$customerId') +
'/devices/chromeos/' + common_internal.Escaper.ecapeVariable('$deviceId'); | 340 _url = 'customer/' + commons.Escaper.ecapeVariable('$customerId') + '/device
s/chromeos/' + commons.Escaper.ecapeVariable('$deviceId'); |
341 | 341 |
342 var _response = _requester.request(_url, | 342 var _response = _requester.request(_url, |
343 "GET", | 343 "GET", |
344 body: _body, | 344 body: _body, |
345 queryParams: _queryParams, | 345 queryParams: _queryParams, |
346 uploadOptions: _uploadOptions, | 346 uploadOptions: _uploadOptions, |
347 uploadMedia: _uploadMedia, | 347 uploadMedia: _uploadMedia, |
348 downloadOptions: _downloadOptions); | 348 downloadOptions: _downloadOptions); |
349 return _response.then((data) => new ChromeOsDevice.fromJson(data)); | 349 return _response.then((data) => new ChromeOsDevice.fromJson(data)); |
350 } | 350 } |
(...skipping 30 matching lines...) Expand all Loading... |
381 * http://support.google.com/chromeos/a/bin/answer.py?hl=en&answer=1698333 | 381 * http://support.google.com/chromeos/a/bin/answer.py?hl=en&answer=1698333 |
382 * | 382 * |
383 * [sortOrder] - Whether to return results in ascending or descending order. | 383 * [sortOrder] - Whether to return results in ascending or descending order. |
384 * Only of use when orderBy is also used | 384 * Only of use when orderBy is also used |
385 * Possible string values are: | 385 * Possible string values are: |
386 * - "ASCENDING" : Ascending order. | 386 * - "ASCENDING" : Ascending order. |
387 * - "DESCENDING" : Descending order. | 387 * - "DESCENDING" : Descending order. |
388 * | 388 * |
389 * Completes with a [ChromeOsDevices]. | 389 * Completes with a [ChromeOsDevices]. |
390 * | 390 * |
391 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 391 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
392 * error. | 392 * error. |
393 * | 393 * |
394 * If the used [http.Client] completes with an error when making a REST call, | 394 * If the used [http.Client] completes with an error when making a REST call, |
395 * this method will complete with the same error. | 395 * this method will complete with the same error. |
396 */ | 396 */ |
397 async.Future<ChromeOsDevices> list(core.String customerId, {core.int maxResult
s, core.String orderBy, core.String pageToken, core.String projection, core.Stri
ng query, core.String sortOrder}) { | 397 async.Future<ChromeOsDevices> list(core.String customerId, {core.int maxResult
s, core.String orderBy, core.String pageToken, core.String projection, core.Stri
ng query, core.String sortOrder}) { |
398 var _url = null; | 398 var _url = null; |
399 var _queryParams = new core.Map(); | 399 var _queryParams = new core.Map(); |
400 var _uploadMedia = null; | 400 var _uploadMedia = null; |
401 var _uploadOptions = null; | 401 var _uploadOptions = null; |
402 var _downloadOptions = common.DownloadOptions.Metadata; | 402 var _downloadOptions = commons.DownloadOptions.Metadata; |
403 var _body = null; | 403 var _body = null; |
404 | 404 |
405 if (customerId == null) { | 405 if (customerId == null) { |
406 throw new core.ArgumentError("Parameter customerId is required."); | 406 throw new core.ArgumentError("Parameter customerId is required."); |
407 } | 407 } |
408 if (maxResults != null) { | 408 if (maxResults != null) { |
409 _queryParams["maxResults"] = ["${maxResults}"]; | 409 _queryParams["maxResults"] = ["${maxResults}"]; |
410 } | 410 } |
411 if (orderBy != null) { | 411 if (orderBy != null) { |
412 _queryParams["orderBy"] = [orderBy]; | 412 _queryParams["orderBy"] = [orderBy]; |
413 } | 413 } |
414 if (pageToken != null) { | 414 if (pageToken != null) { |
415 _queryParams["pageToken"] = [pageToken]; | 415 _queryParams["pageToken"] = [pageToken]; |
416 } | 416 } |
417 if (projection != null) { | 417 if (projection != null) { |
418 _queryParams["projection"] = [projection]; | 418 _queryParams["projection"] = [projection]; |
419 } | 419 } |
420 if (query != null) { | 420 if (query != null) { |
421 _queryParams["query"] = [query]; | 421 _queryParams["query"] = [query]; |
422 } | 422 } |
423 if (sortOrder != null) { | 423 if (sortOrder != null) { |
424 _queryParams["sortOrder"] = [sortOrder]; | 424 _queryParams["sortOrder"] = [sortOrder]; |
425 } | 425 } |
426 | 426 |
427 | 427 |
428 _url = 'customer/' + common_internal.Escaper.ecapeVariable('$customerId') +
'/devices/chromeos'; | 428 _url = 'customer/' + commons.Escaper.ecapeVariable('$customerId') + '/device
s/chromeos'; |
429 | 429 |
430 var _response = _requester.request(_url, | 430 var _response = _requester.request(_url, |
431 "GET", | 431 "GET", |
432 body: _body, | 432 body: _body, |
433 queryParams: _queryParams, | 433 queryParams: _queryParams, |
434 uploadOptions: _uploadOptions, | 434 uploadOptions: _uploadOptions, |
435 uploadMedia: _uploadMedia, | 435 uploadMedia: _uploadMedia, |
436 downloadOptions: _downloadOptions); | 436 downloadOptions: _downloadOptions); |
437 return _response.then((data) => new ChromeOsDevices.fromJson(data)); | 437 return _response.then((data) => new ChromeOsDevices.fromJson(data)); |
438 } | 438 } |
(...skipping 10 matching lines...) Expand all Loading... |
449 * [deviceId] - Immutable id of Chrome OS Device | 449 * [deviceId] - Immutable id of Chrome OS Device |
450 * | 450 * |
451 * [projection] - Restrict information returned to a set of selected fields. | 451 * [projection] - Restrict information returned to a set of selected fields. |
452 * Possible string values are: | 452 * Possible string values are: |
453 * - "BASIC" : Includes only the basic metadata fields (e.g., deviceId, | 453 * - "BASIC" : Includes only the basic metadata fields (e.g., deviceId, |
454 * serialNumber, status, and user) | 454 * serialNumber, status, and user) |
455 * - "FULL" : Includes all metadata fields | 455 * - "FULL" : Includes all metadata fields |
456 * | 456 * |
457 * Completes with a [ChromeOsDevice]. | 457 * Completes with a [ChromeOsDevice]. |
458 * | 458 * |
459 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 459 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
460 * error. | 460 * error. |
461 * | 461 * |
462 * If the used [http.Client] completes with an error when making a REST call, | 462 * If the used [http.Client] completes with an error when making a REST call, |
463 * this method will complete with the same error. | 463 * this method will complete with the same error. |
464 */ | 464 */ |
465 async.Future<ChromeOsDevice> patch(ChromeOsDevice request, core.String custome
rId, core.String deviceId, {core.String projection}) { | 465 async.Future<ChromeOsDevice> patch(ChromeOsDevice request, core.String custome
rId, core.String deviceId, {core.String projection}) { |
466 var _url = null; | 466 var _url = null; |
467 var _queryParams = new core.Map(); | 467 var _queryParams = new core.Map(); |
468 var _uploadMedia = null; | 468 var _uploadMedia = null; |
469 var _uploadOptions = null; | 469 var _uploadOptions = null; |
470 var _downloadOptions = common.DownloadOptions.Metadata; | 470 var _downloadOptions = commons.DownloadOptions.Metadata; |
471 var _body = null; | 471 var _body = null; |
472 | 472 |
473 if (request != null) { | 473 if (request != null) { |
474 _body = convert.JSON.encode((request).toJson()); | 474 _body = convert.JSON.encode((request).toJson()); |
475 } | 475 } |
476 if (customerId == null) { | 476 if (customerId == null) { |
477 throw new core.ArgumentError("Parameter customerId is required."); | 477 throw new core.ArgumentError("Parameter customerId is required."); |
478 } | 478 } |
479 if (deviceId == null) { | 479 if (deviceId == null) { |
480 throw new core.ArgumentError("Parameter deviceId is required."); | 480 throw new core.ArgumentError("Parameter deviceId is required."); |
481 } | 481 } |
482 if (projection != null) { | 482 if (projection != null) { |
483 _queryParams["projection"] = [projection]; | 483 _queryParams["projection"] = [projection]; |
484 } | 484 } |
485 | 485 |
486 | 486 |
487 _url = 'customer/' + common_internal.Escaper.ecapeVariable('$customerId') +
'/devices/chromeos/' + common_internal.Escaper.ecapeVariable('$deviceId'); | 487 _url = 'customer/' + commons.Escaper.ecapeVariable('$customerId') + '/device
s/chromeos/' + commons.Escaper.ecapeVariable('$deviceId'); |
488 | 488 |
489 var _response = _requester.request(_url, | 489 var _response = _requester.request(_url, |
490 "PATCH", | 490 "PATCH", |
491 body: _body, | 491 body: _body, |
492 queryParams: _queryParams, | 492 queryParams: _queryParams, |
493 uploadOptions: _uploadOptions, | 493 uploadOptions: _uploadOptions, |
494 uploadMedia: _uploadMedia, | 494 uploadMedia: _uploadMedia, |
495 downloadOptions: _downloadOptions); | 495 downloadOptions: _downloadOptions); |
496 return _response.then((data) => new ChromeOsDevice.fromJson(data)); | 496 return _response.then((data) => new ChromeOsDevice.fromJson(data)); |
497 } | 497 } |
(...skipping 10 matching lines...) Expand all Loading... |
508 * [deviceId] - Immutable id of Chrome OS Device | 508 * [deviceId] - Immutable id of Chrome OS Device |
509 * | 509 * |
510 * [projection] - Restrict information returned to a set of selected fields. | 510 * [projection] - Restrict information returned to a set of selected fields. |
511 * Possible string values are: | 511 * Possible string values are: |
512 * - "BASIC" : Includes only the basic metadata fields (e.g., deviceId, | 512 * - "BASIC" : Includes only the basic metadata fields (e.g., deviceId, |
513 * serialNumber, status, and user) | 513 * serialNumber, status, and user) |
514 * - "FULL" : Includes all metadata fields | 514 * - "FULL" : Includes all metadata fields |
515 * | 515 * |
516 * Completes with a [ChromeOsDevice]. | 516 * Completes with a [ChromeOsDevice]. |
517 * | 517 * |
518 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 518 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
519 * error. | 519 * error. |
520 * | 520 * |
521 * If the used [http.Client] completes with an error when making a REST call, | 521 * If the used [http.Client] completes with an error when making a REST call, |
522 * this method will complete with the same error. | 522 * this method will complete with the same error. |
523 */ | 523 */ |
524 async.Future<ChromeOsDevice> update(ChromeOsDevice request, core.String custom
erId, core.String deviceId, {core.String projection}) { | 524 async.Future<ChromeOsDevice> update(ChromeOsDevice request, core.String custom
erId, core.String deviceId, {core.String projection}) { |
525 var _url = null; | 525 var _url = null; |
526 var _queryParams = new core.Map(); | 526 var _queryParams = new core.Map(); |
527 var _uploadMedia = null; | 527 var _uploadMedia = null; |
528 var _uploadOptions = null; | 528 var _uploadOptions = null; |
529 var _downloadOptions = common.DownloadOptions.Metadata; | 529 var _downloadOptions = commons.DownloadOptions.Metadata; |
530 var _body = null; | 530 var _body = null; |
531 | 531 |
532 if (request != null) { | 532 if (request != null) { |
533 _body = convert.JSON.encode((request).toJson()); | 533 _body = convert.JSON.encode((request).toJson()); |
534 } | 534 } |
535 if (customerId == null) { | 535 if (customerId == null) { |
536 throw new core.ArgumentError("Parameter customerId is required."); | 536 throw new core.ArgumentError("Parameter customerId is required."); |
537 } | 537 } |
538 if (deviceId == null) { | 538 if (deviceId == null) { |
539 throw new core.ArgumentError("Parameter deviceId is required."); | 539 throw new core.ArgumentError("Parameter deviceId is required."); |
540 } | 540 } |
541 if (projection != null) { | 541 if (projection != null) { |
542 _queryParams["projection"] = [projection]; | 542 _queryParams["projection"] = [projection]; |
543 } | 543 } |
544 | 544 |
545 | 545 |
546 _url = 'customer/' + common_internal.Escaper.ecapeVariable('$customerId') +
'/devices/chromeos/' + common_internal.Escaper.ecapeVariable('$deviceId'); | 546 _url = 'customer/' + commons.Escaper.ecapeVariable('$customerId') + '/device
s/chromeos/' + commons.Escaper.ecapeVariable('$deviceId'); |
547 | 547 |
548 var _response = _requester.request(_url, | 548 var _response = _requester.request(_url, |
549 "PUT", | 549 "PUT", |
550 body: _body, | 550 body: _body, |
551 queryParams: _queryParams, | 551 queryParams: _queryParams, |
552 uploadOptions: _uploadOptions, | 552 uploadOptions: _uploadOptions, |
553 uploadMedia: _uploadMedia, | 553 uploadMedia: _uploadMedia, |
554 downloadOptions: _downloadOptions); | 554 downloadOptions: _downloadOptions); |
555 return _response.then((data) => new ChromeOsDevice.fromJson(data)); | 555 return _response.then((data) => new ChromeOsDevice.fromJson(data)); |
556 } | 556 } |
557 | 557 |
558 } | 558 } |
559 | 559 |
560 | 560 |
561 /** Not documented yet. */ | |
562 class GroupsResourceApi { | 561 class GroupsResourceApi { |
563 final common_internal.ApiRequester _requester; | 562 final commons.ApiRequester _requester; |
564 | 563 |
565 GroupsAliasesResourceApi get aliases => new GroupsAliasesResourceApi(_requeste
r); | 564 GroupsAliasesResourceApi get aliases => new GroupsAliasesResourceApi(_requeste
r); |
566 | 565 |
567 GroupsResourceApi(common_internal.ApiRequester client) : | 566 GroupsResourceApi(commons.ApiRequester client) : |
568 _requester = client; | 567 _requester = client; |
569 | 568 |
570 /** | 569 /** |
571 * Delete Group | 570 * Delete Group |
572 * | 571 * |
573 * Request parameters: | 572 * Request parameters: |
574 * | 573 * |
575 * [groupKey] - Email or immutable Id of the group | 574 * [groupKey] - Email or immutable Id of the group |
576 * | 575 * |
577 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 576 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
578 * error. | 577 * error. |
579 * | 578 * |
580 * If the used [http.Client] completes with an error when making a REST call, | 579 * If the used [http.Client] completes with an error when making a REST call, |
581 * this method will complete with the same error. | 580 * this method will complete with the same error. |
582 */ | 581 */ |
583 async.Future delete(core.String groupKey) { | 582 async.Future delete(core.String groupKey) { |
584 var _url = null; | 583 var _url = null; |
585 var _queryParams = new core.Map(); | 584 var _queryParams = new core.Map(); |
586 var _uploadMedia = null; | 585 var _uploadMedia = null; |
587 var _uploadOptions = null; | 586 var _uploadOptions = null; |
588 var _downloadOptions = common.DownloadOptions.Metadata; | 587 var _downloadOptions = commons.DownloadOptions.Metadata; |
589 var _body = null; | 588 var _body = null; |
590 | 589 |
591 if (groupKey == null) { | 590 if (groupKey == null) { |
592 throw new core.ArgumentError("Parameter groupKey is required."); | 591 throw new core.ArgumentError("Parameter groupKey is required."); |
593 } | 592 } |
594 | 593 |
595 _downloadOptions = null; | 594 _downloadOptions = null; |
596 | 595 |
597 _url = 'groups/' + common_internal.Escaper.ecapeVariable('$groupKey'); | 596 _url = 'groups/' + commons.Escaper.ecapeVariable('$groupKey'); |
598 | 597 |
599 var _response = _requester.request(_url, | 598 var _response = _requester.request(_url, |
600 "DELETE", | 599 "DELETE", |
601 body: _body, | 600 body: _body, |
602 queryParams: _queryParams, | 601 queryParams: _queryParams, |
603 uploadOptions: _uploadOptions, | 602 uploadOptions: _uploadOptions, |
604 uploadMedia: _uploadMedia, | 603 uploadMedia: _uploadMedia, |
605 downloadOptions: _downloadOptions); | 604 downloadOptions: _downloadOptions); |
606 return _response.then((data) => null); | 605 return _response.then((data) => null); |
607 } | 606 } |
608 | 607 |
609 /** | 608 /** |
610 * Retrieve Group | 609 * Retrieve Group |
611 * | 610 * |
612 * Request parameters: | 611 * Request parameters: |
613 * | 612 * |
614 * [groupKey] - Email or immutable Id of the group | 613 * [groupKey] - Email or immutable Id of the group |
615 * | 614 * |
616 * Completes with a [Group]. | 615 * Completes with a [Group]. |
617 * | 616 * |
618 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 617 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
619 * error. | 618 * error. |
620 * | 619 * |
621 * If the used [http.Client] completes with an error when making a REST call, | 620 * If the used [http.Client] completes with an error when making a REST call, |
622 * this method will complete with the same error. | 621 * this method will complete with the same error. |
623 */ | 622 */ |
624 async.Future<Group> get(core.String groupKey) { | 623 async.Future<Group> get(core.String groupKey) { |
625 var _url = null; | 624 var _url = null; |
626 var _queryParams = new core.Map(); | 625 var _queryParams = new core.Map(); |
627 var _uploadMedia = null; | 626 var _uploadMedia = null; |
628 var _uploadOptions = null; | 627 var _uploadOptions = null; |
629 var _downloadOptions = common.DownloadOptions.Metadata; | 628 var _downloadOptions = commons.DownloadOptions.Metadata; |
630 var _body = null; | 629 var _body = null; |
631 | 630 |
632 if (groupKey == null) { | 631 if (groupKey == null) { |
633 throw new core.ArgumentError("Parameter groupKey is required."); | 632 throw new core.ArgumentError("Parameter groupKey is required."); |
634 } | 633 } |
635 | 634 |
636 | 635 |
637 _url = 'groups/' + common_internal.Escaper.ecapeVariable('$groupKey'); | 636 _url = 'groups/' + commons.Escaper.ecapeVariable('$groupKey'); |
638 | 637 |
639 var _response = _requester.request(_url, | 638 var _response = _requester.request(_url, |
640 "GET", | 639 "GET", |
641 body: _body, | 640 body: _body, |
642 queryParams: _queryParams, | 641 queryParams: _queryParams, |
643 uploadOptions: _uploadOptions, | 642 uploadOptions: _uploadOptions, |
644 uploadMedia: _uploadMedia, | 643 uploadMedia: _uploadMedia, |
645 downloadOptions: _downloadOptions); | 644 downloadOptions: _downloadOptions); |
646 return _response.then((data) => new Group.fromJson(data)); | 645 return _response.then((data) => new Group.fromJson(data)); |
647 } | 646 } |
648 | 647 |
649 /** | 648 /** |
650 * Create Group | 649 * Create Group |
651 * | 650 * |
652 * [request] - The metadata request object. | 651 * [request] - The metadata request object. |
653 * | 652 * |
654 * Request parameters: | 653 * Request parameters: |
655 * | 654 * |
656 * Completes with a [Group]. | 655 * Completes with a [Group]. |
657 * | 656 * |
658 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 657 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
659 * error. | 658 * error. |
660 * | 659 * |
661 * If the used [http.Client] completes with an error when making a REST call, | 660 * If the used [http.Client] completes with an error when making a REST call, |
662 * this method will complete with the same error. | 661 * this method will complete with the same error. |
663 */ | 662 */ |
664 async.Future<Group> insert(Group request) { | 663 async.Future<Group> insert(Group request) { |
665 var _url = null; | 664 var _url = null; |
666 var _queryParams = new core.Map(); | 665 var _queryParams = new core.Map(); |
667 var _uploadMedia = null; | 666 var _uploadMedia = null; |
668 var _uploadOptions = null; | 667 var _uploadOptions = null; |
669 var _downloadOptions = common.DownloadOptions.Metadata; | 668 var _downloadOptions = commons.DownloadOptions.Metadata; |
670 var _body = null; | 669 var _body = null; |
671 | 670 |
672 if (request != null) { | 671 if (request != null) { |
673 _body = convert.JSON.encode((request).toJson()); | 672 _body = convert.JSON.encode((request).toJson()); |
674 } | 673 } |
675 | 674 |
676 | 675 |
677 _url = 'groups'; | 676 _url = 'groups'; |
678 | 677 |
679 var _response = _requester.request(_url, | 678 var _response = _requester.request(_url, |
(...skipping 21 matching lines...) Expand all Loading... |
701 * [maxResults] - Maximum number of results to return. Default is 200 | 700 * [maxResults] - Maximum number of results to return. Default is 200 |
702 * | 701 * |
703 * [pageToken] - Token to specify next page in the list | 702 * [pageToken] - Token to specify next page in the list |
704 * | 703 * |
705 * [userKey] - Email or immutable Id of the user if only those groups are to | 704 * [userKey] - Email or immutable Id of the user if only those groups are to |
706 * be listed, the given user is a member of. If Id, it should match with id of | 705 * be listed, the given user is a member of. If Id, it should match with id of |
707 * user object | 706 * user object |
708 * | 707 * |
709 * Completes with a [Groups]. | 708 * Completes with a [Groups]. |
710 * | 709 * |
711 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 710 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
712 * error. | 711 * error. |
713 * | 712 * |
714 * If the used [http.Client] completes with an error when making a REST call, | 713 * If the used [http.Client] completes with an error when making a REST call, |
715 * this method will complete with the same error. | 714 * this method will complete with the same error. |
716 */ | 715 */ |
717 async.Future<Groups> list({core.String customer, core.String domain, core.int
maxResults, core.String pageToken, core.String userKey}) { | 716 async.Future<Groups> list({core.String customer, core.String domain, core.int
maxResults, core.String pageToken, core.String userKey}) { |
718 var _url = null; | 717 var _url = null; |
719 var _queryParams = new core.Map(); | 718 var _queryParams = new core.Map(); |
720 var _uploadMedia = null; | 719 var _uploadMedia = null; |
721 var _uploadOptions = null; | 720 var _uploadOptions = null; |
722 var _downloadOptions = common.DownloadOptions.Metadata; | 721 var _downloadOptions = commons.DownloadOptions.Metadata; |
723 var _body = null; | 722 var _body = null; |
724 | 723 |
725 if (customer != null) { | 724 if (customer != null) { |
726 _queryParams["customer"] = [customer]; | 725 _queryParams["customer"] = [customer]; |
727 } | 726 } |
728 if (domain != null) { | 727 if (domain != null) { |
729 _queryParams["domain"] = [domain]; | 728 _queryParams["domain"] = [domain]; |
730 } | 729 } |
731 if (maxResults != null) { | 730 if (maxResults != null) { |
732 _queryParams["maxResults"] = ["${maxResults}"]; | 731 _queryParams["maxResults"] = ["${maxResults}"]; |
(...skipping 23 matching lines...) Expand all Loading... |
756 * | 755 * |
757 * [request] - The metadata request object. | 756 * [request] - The metadata request object. |
758 * | 757 * |
759 * Request parameters: | 758 * Request parameters: |
760 * | 759 * |
761 * [groupKey] - Email or immutable Id of the group. If Id, it should match | 760 * [groupKey] - Email or immutable Id of the group. If Id, it should match |
762 * with id of group object | 761 * with id of group object |
763 * | 762 * |
764 * Completes with a [Group]. | 763 * Completes with a [Group]. |
765 * | 764 * |
766 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 765 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
767 * error. | 766 * error. |
768 * | 767 * |
769 * If the used [http.Client] completes with an error when making a REST call, | 768 * If the used [http.Client] completes with an error when making a REST call, |
770 * this method will complete with the same error. | 769 * this method will complete with the same error. |
771 */ | 770 */ |
772 async.Future<Group> patch(Group request, core.String groupKey) { | 771 async.Future<Group> patch(Group request, core.String groupKey) { |
773 var _url = null; | 772 var _url = null; |
774 var _queryParams = new core.Map(); | 773 var _queryParams = new core.Map(); |
775 var _uploadMedia = null; | 774 var _uploadMedia = null; |
776 var _uploadOptions = null; | 775 var _uploadOptions = null; |
777 var _downloadOptions = common.DownloadOptions.Metadata; | 776 var _downloadOptions = commons.DownloadOptions.Metadata; |
778 var _body = null; | 777 var _body = null; |
779 | 778 |
780 if (request != null) { | 779 if (request != null) { |
781 _body = convert.JSON.encode((request).toJson()); | 780 _body = convert.JSON.encode((request).toJson()); |
782 } | 781 } |
783 if (groupKey == null) { | 782 if (groupKey == null) { |
784 throw new core.ArgumentError("Parameter groupKey is required."); | 783 throw new core.ArgumentError("Parameter groupKey is required."); |
785 } | 784 } |
786 | 785 |
787 | 786 |
788 _url = 'groups/' + common_internal.Escaper.ecapeVariable('$groupKey'); | 787 _url = 'groups/' + commons.Escaper.ecapeVariable('$groupKey'); |
789 | 788 |
790 var _response = _requester.request(_url, | 789 var _response = _requester.request(_url, |
791 "PATCH", | 790 "PATCH", |
792 body: _body, | 791 body: _body, |
793 queryParams: _queryParams, | 792 queryParams: _queryParams, |
794 uploadOptions: _uploadOptions, | 793 uploadOptions: _uploadOptions, |
795 uploadMedia: _uploadMedia, | 794 uploadMedia: _uploadMedia, |
796 downloadOptions: _downloadOptions); | 795 downloadOptions: _downloadOptions); |
797 return _response.then((data) => new Group.fromJson(data)); | 796 return _response.then((data) => new Group.fromJson(data)); |
798 } | 797 } |
799 | 798 |
800 /** | 799 /** |
801 * Update Group | 800 * Update Group |
802 * | 801 * |
803 * [request] - The metadata request object. | 802 * [request] - The metadata request object. |
804 * | 803 * |
805 * Request parameters: | 804 * Request parameters: |
806 * | 805 * |
807 * [groupKey] - Email or immutable Id of the group. If Id, it should match | 806 * [groupKey] - Email or immutable Id of the group. If Id, it should match |
808 * with id of group object | 807 * with id of group object |
809 * | 808 * |
810 * Completes with a [Group]. | 809 * Completes with a [Group]. |
811 * | 810 * |
812 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 811 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
813 * error. | 812 * error. |
814 * | 813 * |
815 * If the used [http.Client] completes with an error when making a REST call, | 814 * If the used [http.Client] completes with an error when making a REST call, |
816 * this method will complete with the same error. | 815 * this method will complete with the same error. |
817 */ | 816 */ |
818 async.Future<Group> update(Group request, core.String groupKey) { | 817 async.Future<Group> update(Group request, core.String groupKey) { |
819 var _url = null; | 818 var _url = null; |
820 var _queryParams = new core.Map(); | 819 var _queryParams = new core.Map(); |
821 var _uploadMedia = null; | 820 var _uploadMedia = null; |
822 var _uploadOptions = null; | 821 var _uploadOptions = null; |
823 var _downloadOptions = common.DownloadOptions.Metadata; | 822 var _downloadOptions = commons.DownloadOptions.Metadata; |
824 var _body = null; | 823 var _body = null; |
825 | 824 |
826 if (request != null) { | 825 if (request != null) { |
827 _body = convert.JSON.encode((request).toJson()); | 826 _body = convert.JSON.encode((request).toJson()); |
828 } | 827 } |
829 if (groupKey == null) { | 828 if (groupKey == null) { |
830 throw new core.ArgumentError("Parameter groupKey is required."); | 829 throw new core.ArgumentError("Parameter groupKey is required."); |
831 } | 830 } |
832 | 831 |
833 | 832 |
834 _url = 'groups/' + common_internal.Escaper.ecapeVariable('$groupKey'); | 833 _url = 'groups/' + commons.Escaper.ecapeVariable('$groupKey'); |
835 | 834 |
836 var _response = _requester.request(_url, | 835 var _response = _requester.request(_url, |
837 "PUT", | 836 "PUT", |
838 body: _body, | 837 body: _body, |
839 queryParams: _queryParams, | 838 queryParams: _queryParams, |
840 uploadOptions: _uploadOptions, | 839 uploadOptions: _uploadOptions, |
841 uploadMedia: _uploadMedia, | 840 uploadMedia: _uploadMedia, |
842 downloadOptions: _downloadOptions); | 841 downloadOptions: _downloadOptions); |
843 return _response.then((data) => new Group.fromJson(data)); | 842 return _response.then((data) => new Group.fromJson(data)); |
844 } | 843 } |
845 | 844 |
846 } | 845 } |
847 | 846 |
848 | 847 |
849 /** Not documented yet. */ | |
850 class GroupsAliasesResourceApi { | 848 class GroupsAliasesResourceApi { |
851 final common_internal.ApiRequester _requester; | 849 final commons.ApiRequester _requester; |
852 | 850 |
853 GroupsAliasesResourceApi(common_internal.ApiRequester client) : | 851 GroupsAliasesResourceApi(commons.ApiRequester client) : |
854 _requester = client; | 852 _requester = client; |
855 | 853 |
856 /** | 854 /** |
857 * Remove a alias for the group | 855 * Remove a alias for the group |
858 * | 856 * |
859 * Request parameters: | 857 * Request parameters: |
860 * | 858 * |
861 * [groupKey] - Email or immutable Id of the group | 859 * [groupKey] - Email or immutable Id of the group |
862 * | 860 * |
863 * [alias] - The alias to be removed | 861 * [alias] - The alias to be removed |
864 * | 862 * |
865 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 863 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
866 * error. | 864 * error. |
867 * | 865 * |
868 * If the used [http.Client] completes with an error when making a REST call, | 866 * If the used [http.Client] completes with an error when making a REST call, |
869 * this method will complete with the same error. | 867 * this method will complete with the same error. |
870 */ | 868 */ |
871 async.Future delete(core.String groupKey, core.String alias) { | 869 async.Future delete(core.String groupKey, core.String alias) { |
872 var _url = null; | 870 var _url = null; |
873 var _queryParams = new core.Map(); | 871 var _queryParams = new core.Map(); |
874 var _uploadMedia = null; | 872 var _uploadMedia = null; |
875 var _uploadOptions = null; | 873 var _uploadOptions = null; |
876 var _downloadOptions = common.DownloadOptions.Metadata; | 874 var _downloadOptions = commons.DownloadOptions.Metadata; |
877 var _body = null; | 875 var _body = null; |
878 | 876 |
879 if (groupKey == null) { | 877 if (groupKey == null) { |
880 throw new core.ArgumentError("Parameter groupKey is required."); | 878 throw new core.ArgumentError("Parameter groupKey is required."); |
881 } | 879 } |
882 if (alias == null) { | 880 if (alias == null) { |
883 throw new core.ArgumentError("Parameter alias is required."); | 881 throw new core.ArgumentError("Parameter alias is required."); |
884 } | 882 } |
885 | 883 |
886 _downloadOptions = null; | 884 _downloadOptions = null; |
887 | 885 |
888 _url = 'groups/' + common_internal.Escaper.ecapeVariable('$groupKey') + '/al
iases/' + common_internal.Escaper.ecapeVariable('$alias'); | 886 _url = 'groups/' + commons.Escaper.ecapeVariable('$groupKey') + '/aliases/'
+ commons.Escaper.ecapeVariable('$alias'); |
889 | 887 |
890 var _response = _requester.request(_url, | 888 var _response = _requester.request(_url, |
891 "DELETE", | 889 "DELETE", |
892 body: _body, | 890 body: _body, |
893 queryParams: _queryParams, | 891 queryParams: _queryParams, |
894 uploadOptions: _uploadOptions, | 892 uploadOptions: _uploadOptions, |
895 uploadMedia: _uploadMedia, | 893 uploadMedia: _uploadMedia, |
896 downloadOptions: _downloadOptions); | 894 downloadOptions: _downloadOptions); |
897 return _response.then((data) => null); | 895 return _response.then((data) => null); |
898 } | 896 } |
899 | 897 |
900 /** | 898 /** |
901 * Add a alias for the group | 899 * Add a alias for the group |
902 * | 900 * |
903 * [request] - The metadata request object. | 901 * [request] - The metadata request object. |
904 * | 902 * |
905 * Request parameters: | 903 * Request parameters: |
906 * | 904 * |
907 * [groupKey] - Email or immutable Id of the group | 905 * [groupKey] - Email or immutable Id of the group |
908 * | 906 * |
909 * Completes with a [Alias]. | 907 * Completes with a [Alias]. |
910 * | 908 * |
911 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 909 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
912 * error. | 910 * error. |
913 * | 911 * |
914 * If the used [http.Client] completes with an error when making a REST call, | 912 * If the used [http.Client] completes with an error when making a REST call, |
915 * this method will complete with the same error. | 913 * this method will complete with the same error. |
916 */ | 914 */ |
917 async.Future<Alias> insert(Alias request, core.String groupKey) { | 915 async.Future<Alias> insert(Alias request, core.String groupKey) { |
918 var _url = null; | 916 var _url = null; |
919 var _queryParams = new core.Map(); | 917 var _queryParams = new core.Map(); |
920 var _uploadMedia = null; | 918 var _uploadMedia = null; |
921 var _uploadOptions = null; | 919 var _uploadOptions = null; |
922 var _downloadOptions = common.DownloadOptions.Metadata; | 920 var _downloadOptions = commons.DownloadOptions.Metadata; |
923 var _body = null; | 921 var _body = null; |
924 | 922 |
925 if (request != null) { | 923 if (request != null) { |
926 _body = convert.JSON.encode((request).toJson()); | 924 _body = convert.JSON.encode((request).toJson()); |
927 } | 925 } |
928 if (groupKey == null) { | 926 if (groupKey == null) { |
929 throw new core.ArgumentError("Parameter groupKey is required."); | 927 throw new core.ArgumentError("Parameter groupKey is required."); |
930 } | 928 } |
931 | 929 |
932 | 930 |
933 _url = 'groups/' + common_internal.Escaper.ecapeVariable('$groupKey') + '/al
iases'; | 931 _url = 'groups/' + commons.Escaper.ecapeVariable('$groupKey') + '/aliases'; |
934 | 932 |
935 var _response = _requester.request(_url, | 933 var _response = _requester.request(_url, |
936 "POST", | 934 "POST", |
937 body: _body, | 935 body: _body, |
938 queryParams: _queryParams, | 936 queryParams: _queryParams, |
939 uploadOptions: _uploadOptions, | 937 uploadOptions: _uploadOptions, |
940 uploadMedia: _uploadMedia, | 938 uploadMedia: _uploadMedia, |
941 downloadOptions: _downloadOptions); | 939 downloadOptions: _downloadOptions); |
942 return _response.then((data) => new Alias.fromJson(data)); | 940 return _response.then((data) => new Alias.fromJson(data)); |
943 } | 941 } |
944 | 942 |
945 /** | 943 /** |
946 * List all aliases for a group | 944 * List all aliases for a group |
947 * | 945 * |
948 * Request parameters: | 946 * Request parameters: |
949 * | 947 * |
950 * [groupKey] - Email or immutable Id of the group | 948 * [groupKey] - Email or immutable Id of the group |
951 * | 949 * |
952 * Completes with a [Aliases]. | 950 * Completes with a [Aliases]. |
953 * | 951 * |
954 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 952 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
955 * error. | 953 * error. |
956 * | 954 * |
957 * If the used [http.Client] completes with an error when making a REST call, | 955 * If the used [http.Client] completes with an error when making a REST call, |
958 * this method will complete with the same error. | 956 * this method will complete with the same error. |
959 */ | 957 */ |
960 async.Future<Aliases> list(core.String groupKey) { | 958 async.Future<Aliases> list(core.String groupKey) { |
961 var _url = null; | 959 var _url = null; |
962 var _queryParams = new core.Map(); | 960 var _queryParams = new core.Map(); |
963 var _uploadMedia = null; | 961 var _uploadMedia = null; |
964 var _uploadOptions = null; | 962 var _uploadOptions = null; |
965 var _downloadOptions = common.DownloadOptions.Metadata; | 963 var _downloadOptions = commons.DownloadOptions.Metadata; |
966 var _body = null; | 964 var _body = null; |
967 | 965 |
968 if (groupKey == null) { | 966 if (groupKey == null) { |
969 throw new core.ArgumentError("Parameter groupKey is required."); | 967 throw new core.ArgumentError("Parameter groupKey is required."); |
970 } | 968 } |
971 | 969 |
972 | 970 |
973 _url = 'groups/' + common_internal.Escaper.ecapeVariable('$groupKey') + '/al
iases'; | 971 _url = 'groups/' + commons.Escaper.ecapeVariable('$groupKey') + '/aliases'; |
974 | 972 |
975 var _response = _requester.request(_url, | 973 var _response = _requester.request(_url, |
976 "GET", | 974 "GET", |
977 body: _body, | 975 body: _body, |
978 queryParams: _queryParams, | 976 queryParams: _queryParams, |
979 uploadOptions: _uploadOptions, | 977 uploadOptions: _uploadOptions, |
980 uploadMedia: _uploadMedia, | 978 uploadMedia: _uploadMedia, |
981 downloadOptions: _downloadOptions); | 979 downloadOptions: _downloadOptions); |
982 return _response.then((data) => new Aliases.fromJson(data)); | 980 return _response.then((data) => new Aliases.fromJson(data)); |
983 } | 981 } |
984 | 982 |
985 } | 983 } |
986 | 984 |
987 | 985 |
988 /** Not documented yet. */ | |
989 class MembersResourceApi { | 986 class MembersResourceApi { |
990 final common_internal.ApiRequester _requester; | 987 final commons.ApiRequester _requester; |
991 | 988 |
992 MembersResourceApi(common_internal.ApiRequester client) : | 989 MembersResourceApi(commons.ApiRequester client) : |
993 _requester = client; | 990 _requester = client; |
994 | 991 |
995 /** | 992 /** |
996 * Remove membership. | 993 * Remove membership. |
997 * | 994 * |
998 * Request parameters: | 995 * Request parameters: |
999 * | 996 * |
1000 * [groupKey] - Email or immutable Id of the group | 997 * [groupKey] - Email or immutable Id of the group |
1001 * | 998 * |
1002 * [memberKey] - Email or immutable Id of the member | 999 * [memberKey] - Email or immutable Id of the member |
1003 * | 1000 * |
1004 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1001 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1005 * error. | 1002 * error. |
1006 * | 1003 * |
1007 * If the used [http.Client] completes with an error when making a REST call, | 1004 * If the used [http.Client] completes with an error when making a REST call, |
1008 * this method will complete with the same error. | 1005 * this method will complete with the same error. |
1009 */ | 1006 */ |
1010 async.Future delete(core.String groupKey, core.String memberKey) { | 1007 async.Future delete(core.String groupKey, core.String memberKey) { |
1011 var _url = null; | 1008 var _url = null; |
1012 var _queryParams = new core.Map(); | 1009 var _queryParams = new core.Map(); |
1013 var _uploadMedia = null; | 1010 var _uploadMedia = null; |
1014 var _uploadOptions = null; | 1011 var _uploadOptions = null; |
1015 var _downloadOptions = common.DownloadOptions.Metadata; | 1012 var _downloadOptions = commons.DownloadOptions.Metadata; |
1016 var _body = null; | 1013 var _body = null; |
1017 | 1014 |
1018 if (groupKey == null) { | 1015 if (groupKey == null) { |
1019 throw new core.ArgumentError("Parameter groupKey is required."); | 1016 throw new core.ArgumentError("Parameter groupKey is required."); |
1020 } | 1017 } |
1021 if (memberKey == null) { | 1018 if (memberKey == null) { |
1022 throw new core.ArgumentError("Parameter memberKey is required."); | 1019 throw new core.ArgumentError("Parameter memberKey is required."); |
1023 } | 1020 } |
1024 | 1021 |
1025 _downloadOptions = null; | 1022 _downloadOptions = null; |
1026 | 1023 |
1027 _url = 'groups/' + common_internal.Escaper.ecapeVariable('$groupKey') + '/me
mbers/' + common_internal.Escaper.ecapeVariable('$memberKey'); | 1024 _url = 'groups/' + commons.Escaper.ecapeVariable('$groupKey') + '/members/'
+ commons.Escaper.ecapeVariable('$memberKey'); |
1028 | 1025 |
1029 var _response = _requester.request(_url, | 1026 var _response = _requester.request(_url, |
1030 "DELETE", | 1027 "DELETE", |
1031 body: _body, | 1028 body: _body, |
1032 queryParams: _queryParams, | 1029 queryParams: _queryParams, |
1033 uploadOptions: _uploadOptions, | 1030 uploadOptions: _uploadOptions, |
1034 uploadMedia: _uploadMedia, | 1031 uploadMedia: _uploadMedia, |
1035 downloadOptions: _downloadOptions); | 1032 downloadOptions: _downloadOptions); |
1036 return _response.then((data) => null); | 1033 return _response.then((data) => null); |
1037 } | 1034 } |
1038 | 1035 |
1039 /** | 1036 /** |
1040 * Retrieve Group Member | 1037 * Retrieve Group Member |
1041 * | 1038 * |
1042 * Request parameters: | 1039 * Request parameters: |
1043 * | 1040 * |
1044 * [groupKey] - Email or immutable Id of the group | 1041 * [groupKey] - Email or immutable Id of the group |
1045 * | 1042 * |
1046 * [memberKey] - Email or immutable Id of the member | 1043 * [memberKey] - Email or immutable Id of the member |
1047 * | 1044 * |
1048 * Completes with a [Member]. | 1045 * Completes with a [Member]. |
1049 * | 1046 * |
1050 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1047 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1051 * error. | 1048 * error. |
1052 * | 1049 * |
1053 * If the used [http.Client] completes with an error when making a REST call, | 1050 * If the used [http.Client] completes with an error when making a REST call, |
1054 * this method will complete with the same error. | 1051 * this method will complete with the same error. |
1055 */ | 1052 */ |
1056 async.Future<Member> get(core.String groupKey, core.String memberKey) { | 1053 async.Future<Member> get(core.String groupKey, core.String memberKey) { |
1057 var _url = null; | 1054 var _url = null; |
1058 var _queryParams = new core.Map(); | 1055 var _queryParams = new core.Map(); |
1059 var _uploadMedia = null; | 1056 var _uploadMedia = null; |
1060 var _uploadOptions = null; | 1057 var _uploadOptions = null; |
1061 var _downloadOptions = common.DownloadOptions.Metadata; | 1058 var _downloadOptions = commons.DownloadOptions.Metadata; |
1062 var _body = null; | 1059 var _body = null; |
1063 | 1060 |
1064 if (groupKey == null) { | 1061 if (groupKey == null) { |
1065 throw new core.ArgumentError("Parameter groupKey is required."); | 1062 throw new core.ArgumentError("Parameter groupKey is required."); |
1066 } | 1063 } |
1067 if (memberKey == null) { | 1064 if (memberKey == null) { |
1068 throw new core.ArgumentError("Parameter memberKey is required."); | 1065 throw new core.ArgumentError("Parameter memberKey is required."); |
1069 } | 1066 } |
1070 | 1067 |
1071 | 1068 |
1072 _url = 'groups/' + common_internal.Escaper.ecapeVariable('$groupKey') + '/me
mbers/' + common_internal.Escaper.ecapeVariable('$memberKey'); | 1069 _url = 'groups/' + commons.Escaper.ecapeVariable('$groupKey') + '/members/'
+ commons.Escaper.ecapeVariable('$memberKey'); |
1073 | 1070 |
1074 var _response = _requester.request(_url, | 1071 var _response = _requester.request(_url, |
1075 "GET", | 1072 "GET", |
1076 body: _body, | 1073 body: _body, |
1077 queryParams: _queryParams, | 1074 queryParams: _queryParams, |
1078 uploadOptions: _uploadOptions, | 1075 uploadOptions: _uploadOptions, |
1079 uploadMedia: _uploadMedia, | 1076 uploadMedia: _uploadMedia, |
1080 downloadOptions: _downloadOptions); | 1077 downloadOptions: _downloadOptions); |
1081 return _response.then((data) => new Member.fromJson(data)); | 1078 return _response.then((data) => new Member.fromJson(data)); |
1082 } | 1079 } |
1083 | 1080 |
1084 /** | 1081 /** |
1085 * Add user to the specified group. | 1082 * Add user to the specified group. |
1086 * | 1083 * |
1087 * [request] - The metadata request object. | 1084 * [request] - The metadata request object. |
1088 * | 1085 * |
1089 * Request parameters: | 1086 * Request parameters: |
1090 * | 1087 * |
1091 * [groupKey] - Email or immutable Id of the group | 1088 * [groupKey] - Email or immutable Id of the group |
1092 * | 1089 * |
1093 * Completes with a [Member]. | 1090 * Completes with a [Member]. |
1094 * | 1091 * |
1095 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1092 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1096 * error. | 1093 * error. |
1097 * | 1094 * |
1098 * If the used [http.Client] completes with an error when making a REST call, | 1095 * If the used [http.Client] completes with an error when making a REST call, |
1099 * this method will complete with the same error. | 1096 * this method will complete with the same error. |
1100 */ | 1097 */ |
1101 async.Future<Member> insert(Member request, core.String groupKey) { | 1098 async.Future<Member> insert(Member request, core.String groupKey) { |
1102 var _url = null; | 1099 var _url = null; |
1103 var _queryParams = new core.Map(); | 1100 var _queryParams = new core.Map(); |
1104 var _uploadMedia = null; | 1101 var _uploadMedia = null; |
1105 var _uploadOptions = null; | 1102 var _uploadOptions = null; |
1106 var _downloadOptions = common.DownloadOptions.Metadata; | 1103 var _downloadOptions = commons.DownloadOptions.Metadata; |
1107 var _body = null; | 1104 var _body = null; |
1108 | 1105 |
1109 if (request != null) { | 1106 if (request != null) { |
1110 _body = convert.JSON.encode((request).toJson()); | 1107 _body = convert.JSON.encode((request).toJson()); |
1111 } | 1108 } |
1112 if (groupKey == null) { | 1109 if (groupKey == null) { |
1113 throw new core.ArgumentError("Parameter groupKey is required."); | 1110 throw new core.ArgumentError("Parameter groupKey is required."); |
1114 } | 1111 } |
1115 | 1112 |
1116 | 1113 |
1117 _url = 'groups/' + common_internal.Escaper.ecapeVariable('$groupKey') + '/me
mbers'; | 1114 _url = 'groups/' + commons.Escaper.ecapeVariable('$groupKey') + '/members'; |
1118 | 1115 |
1119 var _response = _requester.request(_url, | 1116 var _response = _requester.request(_url, |
1120 "POST", | 1117 "POST", |
1121 body: _body, | 1118 body: _body, |
1122 queryParams: _queryParams, | 1119 queryParams: _queryParams, |
1123 uploadOptions: _uploadOptions, | 1120 uploadOptions: _uploadOptions, |
1124 uploadMedia: _uploadMedia, | 1121 uploadMedia: _uploadMedia, |
1125 downloadOptions: _downloadOptions); | 1122 downloadOptions: _downloadOptions); |
1126 return _response.then((data) => new Member.fromJson(data)); | 1123 return _response.then((data) => new Member.fromJson(data)); |
1127 } | 1124 } |
1128 | 1125 |
1129 /** | 1126 /** |
1130 * Retrieve all members in a group (paginated) | 1127 * Retrieve all members in a group (paginated) |
1131 * | 1128 * |
1132 * Request parameters: | 1129 * Request parameters: |
1133 * | 1130 * |
1134 * [groupKey] - Email or immutable Id of the group | 1131 * [groupKey] - Email or immutable Id of the group |
1135 * | 1132 * |
1136 * [maxResults] - Maximum number of results to return. Default is 200 | 1133 * [maxResults] - Maximum number of results to return. Default is 200 |
1137 * | 1134 * |
1138 * [pageToken] - Token to specify next page in the list | 1135 * [pageToken] - Token to specify next page in the list |
1139 * | 1136 * |
1140 * [roles] - Comma separated role values to filter list results on. | 1137 * [roles] - Comma separated role values to filter list results on. |
1141 * | 1138 * |
1142 * Completes with a [Members]. | 1139 * Completes with a [Members]. |
1143 * | 1140 * |
1144 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1141 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1145 * error. | 1142 * error. |
1146 * | 1143 * |
1147 * If the used [http.Client] completes with an error when making a REST call, | 1144 * If the used [http.Client] completes with an error when making a REST call, |
1148 * this method will complete with the same error. | 1145 * this method will complete with the same error. |
1149 */ | 1146 */ |
1150 async.Future<Members> list(core.String groupKey, {core.int maxResults, core.St
ring pageToken, core.String roles}) { | 1147 async.Future<Members> list(core.String groupKey, {core.int maxResults, core.St
ring pageToken, core.String roles}) { |
1151 var _url = null; | 1148 var _url = null; |
1152 var _queryParams = new core.Map(); | 1149 var _queryParams = new core.Map(); |
1153 var _uploadMedia = null; | 1150 var _uploadMedia = null; |
1154 var _uploadOptions = null; | 1151 var _uploadOptions = null; |
1155 var _downloadOptions = common.DownloadOptions.Metadata; | 1152 var _downloadOptions = commons.DownloadOptions.Metadata; |
1156 var _body = null; | 1153 var _body = null; |
1157 | 1154 |
1158 if (groupKey == null) { | 1155 if (groupKey == null) { |
1159 throw new core.ArgumentError("Parameter groupKey is required."); | 1156 throw new core.ArgumentError("Parameter groupKey is required."); |
1160 } | 1157 } |
1161 if (maxResults != null) { | 1158 if (maxResults != null) { |
1162 _queryParams["maxResults"] = ["${maxResults}"]; | 1159 _queryParams["maxResults"] = ["${maxResults}"]; |
1163 } | 1160 } |
1164 if (pageToken != null) { | 1161 if (pageToken != null) { |
1165 _queryParams["pageToken"] = [pageToken]; | 1162 _queryParams["pageToken"] = [pageToken]; |
1166 } | 1163 } |
1167 if (roles != null) { | 1164 if (roles != null) { |
1168 _queryParams["roles"] = [roles]; | 1165 _queryParams["roles"] = [roles]; |
1169 } | 1166 } |
1170 | 1167 |
1171 | 1168 |
1172 _url = 'groups/' + common_internal.Escaper.ecapeVariable('$groupKey') + '/me
mbers'; | 1169 _url = 'groups/' + commons.Escaper.ecapeVariable('$groupKey') + '/members'; |
1173 | 1170 |
1174 var _response = _requester.request(_url, | 1171 var _response = _requester.request(_url, |
1175 "GET", | 1172 "GET", |
1176 body: _body, | 1173 body: _body, |
1177 queryParams: _queryParams, | 1174 queryParams: _queryParams, |
1178 uploadOptions: _uploadOptions, | 1175 uploadOptions: _uploadOptions, |
1179 uploadMedia: _uploadMedia, | 1176 uploadMedia: _uploadMedia, |
1180 downloadOptions: _downloadOptions); | 1177 downloadOptions: _downloadOptions); |
1181 return _response.then((data) => new Members.fromJson(data)); | 1178 return _response.then((data) => new Members.fromJson(data)); |
1182 } | 1179 } |
1183 | 1180 |
1184 /** | 1181 /** |
1185 * Update membership of a user in the specified group. This method supports | 1182 * Update membership of a user in the specified group. This method supports |
1186 * patch semantics. | 1183 * patch semantics. |
1187 * | 1184 * |
1188 * [request] - The metadata request object. | 1185 * [request] - The metadata request object. |
1189 * | 1186 * |
1190 * Request parameters: | 1187 * Request parameters: |
1191 * | 1188 * |
1192 * [groupKey] - Email or immutable Id of the group. If Id, it should match | 1189 * [groupKey] - Email or immutable Id of the group. If Id, it should match |
1193 * with id of group object | 1190 * with id of group object |
1194 * | 1191 * |
1195 * [memberKey] - Email or immutable Id of the user. If Id, it should match | 1192 * [memberKey] - Email or immutable Id of the user. If Id, it should match |
1196 * with id of member object | 1193 * with id of member object |
1197 * | 1194 * |
1198 * Completes with a [Member]. | 1195 * Completes with a [Member]. |
1199 * | 1196 * |
1200 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1197 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1201 * error. | 1198 * error. |
1202 * | 1199 * |
1203 * If the used [http.Client] completes with an error when making a REST call, | 1200 * If the used [http.Client] completes with an error when making a REST call, |
1204 * this method will complete with the same error. | 1201 * this method will complete with the same error. |
1205 */ | 1202 */ |
1206 async.Future<Member> patch(Member request, core.String groupKey, core.String m
emberKey) { | 1203 async.Future<Member> patch(Member request, core.String groupKey, core.String m
emberKey) { |
1207 var _url = null; | 1204 var _url = null; |
1208 var _queryParams = new core.Map(); | 1205 var _queryParams = new core.Map(); |
1209 var _uploadMedia = null; | 1206 var _uploadMedia = null; |
1210 var _uploadOptions = null; | 1207 var _uploadOptions = null; |
1211 var _downloadOptions = common.DownloadOptions.Metadata; | 1208 var _downloadOptions = commons.DownloadOptions.Metadata; |
1212 var _body = null; | 1209 var _body = null; |
1213 | 1210 |
1214 if (request != null) { | 1211 if (request != null) { |
1215 _body = convert.JSON.encode((request).toJson()); | 1212 _body = convert.JSON.encode((request).toJson()); |
1216 } | 1213 } |
1217 if (groupKey == null) { | 1214 if (groupKey == null) { |
1218 throw new core.ArgumentError("Parameter groupKey is required."); | 1215 throw new core.ArgumentError("Parameter groupKey is required."); |
1219 } | 1216 } |
1220 if (memberKey == null) { | 1217 if (memberKey == null) { |
1221 throw new core.ArgumentError("Parameter memberKey is required."); | 1218 throw new core.ArgumentError("Parameter memberKey is required."); |
1222 } | 1219 } |
1223 | 1220 |
1224 | 1221 |
1225 _url = 'groups/' + common_internal.Escaper.ecapeVariable('$groupKey') + '/me
mbers/' + common_internal.Escaper.ecapeVariable('$memberKey'); | 1222 _url = 'groups/' + commons.Escaper.ecapeVariable('$groupKey') + '/members/'
+ commons.Escaper.ecapeVariable('$memberKey'); |
1226 | 1223 |
1227 var _response = _requester.request(_url, | 1224 var _response = _requester.request(_url, |
1228 "PATCH", | 1225 "PATCH", |
1229 body: _body, | 1226 body: _body, |
1230 queryParams: _queryParams, | 1227 queryParams: _queryParams, |
1231 uploadOptions: _uploadOptions, | 1228 uploadOptions: _uploadOptions, |
1232 uploadMedia: _uploadMedia, | 1229 uploadMedia: _uploadMedia, |
1233 downloadOptions: _downloadOptions); | 1230 downloadOptions: _downloadOptions); |
1234 return _response.then((data) => new Member.fromJson(data)); | 1231 return _response.then((data) => new Member.fromJson(data)); |
1235 } | 1232 } |
1236 | 1233 |
1237 /** | 1234 /** |
1238 * Update membership of a user in the specified group. | 1235 * Update membership of a user in the specified group. |
1239 * | 1236 * |
1240 * [request] - The metadata request object. | 1237 * [request] - The metadata request object. |
1241 * | 1238 * |
1242 * Request parameters: | 1239 * Request parameters: |
1243 * | 1240 * |
1244 * [groupKey] - Email or immutable Id of the group. If Id, it should match | 1241 * [groupKey] - Email or immutable Id of the group. If Id, it should match |
1245 * with id of group object | 1242 * with id of group object |
1246 * | 1243 * |
1247 * [memberKey] - Email or immutable Id of the user. If Id, it should match | 1244 * [memberKey] - Email or immutable Id of the user. If Id, it should match |
1248 * with id of member object | 1245 * with id of member object |
1249 * | 1246 * |
1250 * Completes with a [Member]. | 1247 * Completes with a [Member]. |
1251 * | 1248 * |
1252 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1249 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1253 * error. | 1250 * error. |
1254 * | 1251 * |
1255 * If the used [http.Client] completes with an error when making a REST call, | 1252 * If the used [http.Client] completes with an error when making a REST call, |
1256 * this method will complete with the same error. | 1253 * this method will complete with the same error. |
1257 */ | 1254 */ |
1258 async.Future<Member> update(Member request, core.String groupKey, core.String
memberKey) { | 1255 async.Future<Member> update(Member request, core.String groupKey, core.String
memberKey) { |
1259 var _url = null; | 1256 var _url = null; |
1260 var _queryParams = new core.Map(); | 1257 var _queryParams = new core.Map(); |
1261 var _uploadMedia = null; | 1258 var _uploadMedia = null; |
1262 var _uploadOptions = null; | 1259 var _uploadOptions = null; |
1263 var _downloadOptions = common.DownloadOptions.Metadata; | 1260 var _downloadOptions = commons.DownloadOptions.Metadata; |
1264 var _body = null; | 1261 var _body = null; |
1265 | 1262 |
1266 if (request != null) { | 1263 if (request != null) { |
1267 _body = convert.JSON.encode((request).toJson()); | 1264 _body = convert.JSON.encode((request).toJson()); |
1268 } | 1265 } |
1269 if (groupKey == null) { | 1266 if (groupKey == null) { |
1270 throw new core.ArgumentError("Parameter groupKey is required."); | 1267 throw new core.ArgumentError("Parameter groupKey is required."); |
1271 } | 1268 } |
1272 if (memberKey == null) { | 1269 if (memberKey == null) { |
1273 throw new core.ArgumentError("Parameter memberKey is required."); | 1270 throw new core.ArgumentError("Parameter memberKey is required."); |
1274 } | 1271 } |
1275 | 1272 |
1276 | 1273 |
1277 _url = 'groups/' + common_internal.Escaper.ecapeVariable('$groupKey') + '/me
mbers/' + common_internal.Escaper.ecapeVariable('$memberKey'); | 1274 _url = 'groups/' + commons.Escaper.ecapeVariable('$groupKey') + '/members/'
+ commons.Escaper.ecapeVariable('$memberKey'); |
1278 | 1275 |
1279 var _response = _requester.request(_url, | 1276 var _response = _requester.request(_url, |
1280 "PUT", | 1277 "PUT", |
1281 body: _body, | 1278 body: _body, |
1282 queryParams: _queryParams, | 1279 queryParams: _queryParams, |
1283 uploadOptions: _uploadOptions, | 1280 uploadOptions: _uploadOptions, |
1284 uploadMedia: _uploadMedia, | 1281 uploadMedia: _uploadMedia, |
1285 downloadOptions: _downloadOptions); | 1282 downloadOptions: _downloadOptions); |
1286 return _response.then((data) => new Member.fromJson(data)); | 1283 return _response.then((data) => new Member.fromJson(data)); |
1287 } | 1284 } |
1288 | 1285 |
1289 } | 1286 } |
1290 | 1287 |
1291 | 1288 |
1292 /** Not documented yet. */ | |
1293 class MobiledevicesResourceApi { | 1289 class MobiledevicesResourceApi { |
1294 final common_internal.ApiRequester _requester; | 1290 final commons.ApiRequester _requester; |
1295 | 1291 |
1296 MobiledevicesResourceApi(common_internal.ApiRequester client) : | 1292 MobiledevicesResourceApi(commons.ApiRequester client) : |
1297 _requester = client; | 1293 _requester = client; |
1298 | 1294 |
1299 /** | 1295 /** |
1300 * Take action on Mobile Device | 1296 * Take action on Mobile Device |
1301 * | 1297 * |
1302 * [request] - The metadata request object. | 1298 * [request] - The metadata request object. |
1303 * | 1299 * |
1304 * Request parameters: | 1300 * Request parameters: |
1305 * | 1301 * |
1306 * [customerId] - Immutable id of the Google Apps account | 1302 * [customerId] - Immutable id of the Google Apps account |
1307 * | 1303 * |
1308 * [resourceId] - Immutable id of Mobile Device | 1304 * [resourceId] - Immutable id of Mobile Device |
1309 * | 1305 * |
1310 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1306 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1311 * error. | 1307 * error. |
1312 * | 1308 * |
1313 * If the used [http.Client] completes with an error when making a REST call, | 1309 * If the used [http.Client] completes with an error when making a REST call, |
1314 * this method will complete with the same error. | 1310 * this method will complete with the same error. |
1315 */ | 1311 */ |
1316 async.Future action(MobileDeviceAction request, core.String customerId, core.S
tring resourceId) { | 1312 async.Future action(MobileDeviceAction request, core.String customerId, core.S
tring resourceId) { |
1317 var _url = null; | 1313 var _url = null; |
1318 var _queryParams = new core.Map(); | 1314 var _queryParams = new core.Map(); |
1319 var _uploadMedia = null; | 1315 var _uploadMedia = null; |
1320 var _uploadOptions = null; | 1316 var _uploadOptions = null; |
1321 var _downloadOptions = common.DownloadOptions.Metadata; | 1317 var _downloadOptions = commons.DownloadOptions.Metadata; |
1322 var _body = null; | 1318 var _body = null; |
1323 | 1319 |
1324 if (request != null) { | 1320 if (request != null) { |
1325 _body = convert.JSON.encode((request).toJson()); | 1321 _body = convert.JSON.encode((request).toJson()); |
1326 } | 1322 } |
1327 if (customerId == null) { | 1323 if (customerId == null) { |
1328 throw new core.ArgumentError("Parameter customerId is required."); | 1324 throw new core.ArgumentError("Parameter customerId is required."); |
1329 } | 1325 } |
1330 if (resourceId == null) { | 1326 if (resourceId == null) { |
1331 throw new core.ArgumentError("Parameter resourceId is required."); | 1327 throw new core.ArgumentError("Parameter resourceId is required."); |
1332 } | 1328 } |
1333 | 1329 |
1334 _downloadOptions = null; | 1330 _downloadOptions = null; |
1335 | 1331 |
1336 _url = 'customer/' + common_internal.Escaper.ecapeVariable('$customerId') +
'/devices/mobile/' + common_internal.Escaper.ecapeVariable('$resourceId') + '/ac
tion'; | 1332 _url = 'customer/' + commons.Escaper.ecapeVariable('$customerId') + '/device
s/mobile/' + commons.Escaper.ecapeVariable('$resourceId') + '/action'; |
1337 | 1333 |
1338 var _response = _requester.request(_url, | 1334 var _response = _requester.request(_url, |
1339 "POST", | 1335 "POST", |
1340 body: _body, | 1336 body: _body, |
1341 queryParams: _queryParams, | 1337 queryParams: _queryParams, |
1342 uploadOptions: _uploadOptions, | 1338 uploadOptions: _uploadOptions, |
1343 uploadMedia: _uploadMedia, | 1339 uploadMedia: _uploadMedia, |
1344 downloadOptions: _downloadOptions); | 1340 downloadOptions: _downloadOptions); |
1345 return _response.then((data) => null); | 1341 return _response.then((data) => null); |
1346 } | 1342 } |
1347 | 1343 |
1348 /** | 1344 /** |
1349 * Delete Mobile Device | 1345 * Delete Mobile Device |
1350 * | 1346 * |
1351 * Request parameters: | 1347 * Request parameters: |
1352 * | 1348 * |
1353 * [customerId] - Immutable id of the Google Apps account | 1349 * [customerId] - Immutable id of the Google Apps account |
1354 * | 1350 * |
1355 * [resourceId] - Immutable id of Mobile Device | 1351 * [resourceId] - Immutable id of Mobile Device |
1356 * | 1352 * |
1357 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1353 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1358 * error. | 1354 * error. |
1359 * | 1355 * |
1360 * If the used [http.Client] completes with an error when making a REST call, | 1356 * If the used [http.Client] completes with an error when making a REST call, |
1361 * this method will complete with the same error. | 1357 * this method will complete with the same error. |
1362 */ | 1358 */ |
1363 async.Future delete(core.String customerId, core.String resourceId) { | 1359 async.Future delete(core.String customerId, core.String resourceId) { |
1364 var _url = null; | 1360 var _url = null; |
1365 var _queryParams = new core.Map(); | 1361 var _queryParams = new core.Map(); |
1366 var _uploadMedia = null; | 1362 var _uploadMedia = null; |
1367 var _uploadOptions = null; | 1363 var _uploadOptions = null; |
1368 var _downloadOptions = common.DownloadOptions.Metadata; | 1364 var _downloadOptions = commons.DownloadOptions.Metadata; |
1369 var _body = null; | 1365 var _body = null; |
1370 | 1366 |
1371 if (customerId == null) { | 1367 if (customerId == null) { |
1372 throw new core.ArgumentError("Parameter customerId is required."); | 1368 throw new core.ArgumentError("Parameter customerId is required."); |
1373 } | 1369 } |
1374 if (resourceId == null) { | 1370 if (resourceId == null) { |
1375 throw new core.ArgumentError("Parameter resourceId is required."); | 1371 throw new core.ArgumentError("Parameter resourceId is required."); |
1376 } | 1372 } |
1377 | 1373 |
1378 _downloadOptions = null; | 1374 _downloadOptions = null; |
1379 | 1375 |
1380 _url = 'customer/' + common_internal.Escaper.ecapeVariable('$customerId') +
'/devices/mobile/' + common_internal.Escaper.ecapeVariable('$resourceId'); | 1376 _url = 'customer/' + commons.Escaper.ecapeVariable('$customerId') + '/device
s/mobile/' + commons.Escaper.ecapeVariable('$resourceId'); |
1381 | 1377 |
1382 var _response = _requester.request(_url, | 1378 var _response = _requester.request(_url, |
1383 "DELETE", | 1379 "DELETE", |
1384 body: _body, | 1380 body: _body, |
1385 queryParams: _queryParams, | 1381 queryParams: _queryParams, |
1386 uploadOptions: _uploadOptions, | 1382 uploadOptions: _uploadOptions, |
1387 uploadMedia: _uploadMedia, | 1383 uploadMedia: _uploadMedia, |
1388 downloadOptions: _downloadOptions); | 1384 downloadOptions: _downloadOptions); |
1389 return _response.then((data) => null); | 1385 return _response.then((data) => null); |
1390 } | 1386 } |
1391 | 1387 |
1392 /** | 1388 /** |
1393 * Retrieve Mobile Device | 1389 * Retrieve Mobile Device |
1394 * | 1390 * |
1395 * Request parameters: | 1391 * Request parameters: |
1396 * | 1392 * |
1397 * [customerId] - Immutable id of the Google Apps account | 1393 * [customerId] - Immutable id of the Google Apps account |
1398 * | 1394 * |
1399 * [resourceId] - Immutable id of Mobile Device | 1395 * [resourceId] - Immutable id of Mobile Device |
1400 * | 1396 * |
1401 * [projection] - Restrict information returned to a set of selected fields. | 1397 * [projection] - Restrict information returned to a set of selected fields. |
1402 * Possible string values are: | 1398 * Possible string values are: |
1403 * - "BASIC" : Includes only the basic metadata fields (e.g., deviceId, model, | 1399 * - "BASIC" : Includes only the basic metadata fields (e.g., deviceId, model, |
1404 * status, type, and status) | 1400 * status, type, and status) |
1405 * - "FULL" : Includes all metadata fields | 1401 * - "FULL" : Includes all metadata fields |
1406 * | 1402 * |
1407 * Completes with a [MobileDevice]. | 1403 * Completes with a [MobileDevice]. |
1408 * | 1404 * |
1409 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1405 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1410 * error. | 1406 * error. |
1411 * | 1407 * |
1412 * If the used [http.Client] completes with an error when making a REST call, | 1408 * If the used [http.Client] completes with an error when making a REST call, |
1413 * this method will complete with the same error. | 1409 * this method will complete with the same error. |
1414 */ | 1410 */ |
1415 async.Future<MobileDevice> get(core.String customerId, core.String resourceId,
{core.String projection}) { | 1411 async.Future<MobileDevice> get(core.String customerId, core.String resourceId,
{core.String projection}) { |
1416 var _url = null; | 1412 var _url = null; |
1417 var _queryParams = new core.Map(); | 1413 var _queryParams = new core.Map(); |
1418 var _uploadMedia = null; | 1414 var _uploadMedia = null; |
1419 var _uploadOptions = null; | 1415 var _uploadOptions = null; |
1420 var _downloadOptions = common.DownloadOptions.Metadata; | 1416 var _downloadOptions = commons.DownloadOptions.Metadata; |
1421 var _body = null; | 1417 var _body = null; |
1422 | 1418 |
1423 if (customerId == null) { | 1419 if (customerId == null) { |
1424 throw new core.ArgumentError("Parameter customerId is required."); | 1420 throw new core.ArgumentError("Parameter customerId is required."); |
1425 } | 1421 } |
1426 if (resourceId == null) { | 1422 if (resourceId == null) { |
1427 throw new core.ArgumentError("Parameter resourceId is required."); | 1423 throw new core.ArgumentError("Parameter resourceId is required."); |
1428 } | 1424 } |
1429 if (projection != null) { | 1425 if (projection != null) { |
1430 _queryParams["projection"] = [projection]; | 1426 _queryParams["projection"] = [projection]; |
1431 } | 1427 } |
1432 | 1428 |
1433 | 1429 |
1434 _url = 'customer/' + common_internal.Escaper.ecapeVariable('$customerId') +
'/devices/mobile/' + common_internal.Escaper.ecapeVariable('$resourceId'); | 1430 _url = 'customer/' + commons.Escaper.ecapeVariable('$customerId') + '/device
s/mobile/' + commons.Escaper.ecapeVariable('$resourceId'); |
1435 | 1431 |
1436 var _response = _requester.request(_url, | 1432 var _response = _requester.request(_url, |
1437 "GET", | 1433 "GET", |
1438 body: _body, | 1434 body: _body, |
1439 queryParams: _queryParams, | 1435 queryParams: _queryParams, |
1440 uploadOptions: _uploadOptions, | 1436 uploadOptions: _uploadOptions, |
1441 uploadMedia: _uploadMedia, | 1437 uploadMedia: _uploadMedia, |
1442 downloadOptions: _downloadOptions); | 1438 downloadOptions: _downloadOptions); |
1443 return _response.then((data) => new MobileDevice.fromJson(data)); | 1439 return _response.then((data) => new MobileDevice.fromJson(data)); |
1444 } | 1440 } |
(...skipping 30 matching lines...) Expand all Loading... |
1475 * http://support.google.com/a/bin/answer.py?hl=en&answer=1408863#search | 1471 * http://support.google.com/a/bin/answer.py?hl=en&answer=1408863#search |
1476 * | 1472 * |
1477 * [sortOrder] - Whether to return results in ascending or descending order. | 1473 * [sortOrder] - Whether to return results in ascending or descending order. |
1478 * Only of use when orderBy is also used | 1474 * Only of use when orderBy is also used |
1479 * Possible string values are: | 1475 * Possible string values are: |
1480 * - "ASCENDING" : Ascending order. | 1476 * - "ASCENDING" : Ascending order. |
1481 * - "DESCENDING" : Descending order. | 1477 * - "DESCENDING" : Descending order. |
1482 * | 1478 * |
1483 * Completes with a [MobileDevices]. | 1479 * Completes with a [MobileDevices]. |
1484 * | 1480 * |
1485 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1481 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1486 * error. | 1482 * error. |
1487 * | 1483 * |
1488 * If the used [http.Client] completes with an error when making a REST call, | 1484 * If the used [http.Client] completes with an error when making a REST call, |
1489 * this method will complete with the same error. | 1485 * this method will complete with the same error. |
1490 */ | 1486 */ |
1491 async.Future<MobileDevices> list(core.String customerId, {core.int maxResults,
core.String orderBy, core.String pageToken, core.String projection, core.String
query, core.String sortOrder}) { | 1487 async.Future<MobileDevices> list(core.String customerId, {core.int maxResults,
core.String orderBy, core.String pageToken, core.String projection, core.String
query, core.String sortOrder}) { |
1492 var _url = null; | 1488 var _url = null; |
1493 var _queryParams = new core.Map(); | 1489 var _queryParams = new core.Map(); |
1494 var _uploadMedia = null; | 1490 var _uploadMedia = null; |
1495 var _uploadOptions = null; | 1491 var _uploadOptions = null; |
1496 var _downloadOptions = common.DownloadOptions.Metadata; | 1492 var _downloadOptions = commons.DownloadOptions.Metadata; |
1497 var _body = null; | 1493 var _body = null; |
1498 | 1494 |
1499 if (customerId == null) { | 1495 if (customerId == null) { |
1500 throw new core.ArgumentError("Parameter customerId is required."); | 1496 throw new core.ArgumentError("Parameter customerId is required."); |
1501 } | 1497 } |
1502 if (maxResults != null) { | 1498 if (maxResults != null) { |
1503 _queryParams["maxResults"] = ["${maxResults}"]; | 1499 _queryParams["maxResults"] = ["${maxResults}"]; |
1504 } | 1500 } |
1505 if (orderBy != null) { | 1501 if (orderBy != null) { |
1506 _queryParams["orderBy"] = [orderBy]; | 1502 _queryParams["orderBy"] = [orderBy]; |
1507 } | 1503 } |
1508 if (pageToken != null) { | 1504 if (pageToken != null) { |
1509 _queryParams["pageToken"] = [pageToken]; | 1505 _queryParams["pageToken"] = [pageToken]; |
1510 } | 1506 } |
1511 if (projection != null) { | 1507 if (projection != null) { |
1512 _queryParams["projection"] = [projection]; | 1508 _queryParams["projection"] = [projection]; |
1513 } | 1509 } |
1514 if (query != null) { | 1510 if (query != null) { |
1515 _queryParams["query"] = [query]; | 1511 _queryParams["query"] = [query]; |
1516 } | 1512 } |
1517 if (sortOrder != null) { | 1513 if (sortOrder != null) { |
1518 _queryParams["sortOrder"] = [sortOrder]; | 1514 _queryParams["sortOrder"] = [sortOrder]; |
1519 } | 1515 } |
1520 | 1516 |
1521 | 1517 |
1522 _url = 'customer/' + common_internal.Escaper.ecapeVariable('$customerId') +
'/devices/mobile'; | 1518 _url = 'customer/' + commons.Escaper.ecapeVariable('$customerId') + '/device
s/mobile'; |
1523 | 1519 |
1524 var _response = _requester.request(_url, | 1520 var _response = _requester.request(_url, |
1525 "GET", | 1521 "GET", |
1526 body: _body, | 1522 body: _body, |
1527 queryParams: _queryParams, | 1523 queryParams: _queryParams, |
1528 uploadOptions: _uploadOptions, | 1524 uploadOptions: _uploadOptions, |
1529 uploadMedia: _uploadMedia, | 1525 uploadMedia: _uploadMedia, |
1530 downloadOptions: _downloadOptions); | 1526 downloadOptions: _downloadOptions); |
1531 return _response.then((data) => new MobileDevices.fromJson(data)); | 1527 return _response.then((data) => new MobileDevices.fromJson(data)); |
1532 } | 1528 } |
1533 | 1529 |
1534 } | 1530 } |
1535 | 1531 |
1536 | 1532 |
1537 /** Not documented yet. */ | |
1538 class NotificationsResourceApi { | 1533 class NotificationsResourceApi { |
1539 final common_internal.ApiRequester _requester; | 1534 final commons.ApiRequester _requester; |
1540 | 1535 |
1541 NotificationsResourceApi(common_internal.ApiRequester client) : | 1536 NotificationsResourceApi(commons.ApiRequester client) : |
1542 _requester = client; | 1537 _requester = client; |
1543 | 1538 |
1544 /** | 1539 /** |
1545 * Deletes a notification | 1540 * Deletes a notification |
1546 * | 1541 * |
1547 * Request parameters: | 1542 * Request parameters: |
1548 * | 1543 * |
1549 * [customer] - The unique ID for the customer's Google account. The | 1544 * [customer] - The unique ID for the customer's Google account. The |
1550 * customerId is also returned as part of the Users resource. | 1545 * customerId is also returned as part of the Users resource. |
1551 * | 1546 * |
1552 * [notificationId] - The unique ID of the notification. | 1547 * [notificationId] - The unique ID of the notification. |
1553 * | 1548 * |
1554 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1549 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1555 * error. | 1550 * error. |
1556 * | 1551 * |
1557 * If the used [http.Client] completes with an error when making a REST call, | 1552 * If the used [http.Client] completes with an error when making a REST call, |
1558 * this method will complete with the same error. | 1553 * this method will complete with the same error. |
1559 */ | 1554 */ |
1560 async.Future delete(core.String customer, core.String notificationId) { | 1555 async.Future delete(core.String customer, core.String notificationId) { |
1561 var _url = null; | 1556 var _url = null; |
1562 var _queryParams = new core.Map(); | 1557 var _queryParams = new core.Map(); |
1563 var _uploadMedia = null; | 1558 var _uploadMedia = null; |
1564 var _uploadOptions = null; | 1559 var _uploadOptions = null; |
1565 var _downloadOptions = common.DownloadOptions.Metadata; | 1560 var _downloadOptions = commons.DownloadOptions.Metadata; |
1566 var _body = null; | 1561 var _body = null; |
1567 | 1562 |
1568 if (customer == null) { | 1563 if (customer == null) { |
1569 throw new core.ArgumentError("Parameter customer is required."); | 1564 throw new core.ArgumentError("Parameter customer is required."); |
1570 } | 1565 } |
1571 if (notificationId == null) { | 1566 if (notificationId == null) { |
1572 throw new core.ArgumentError("Parameter notificationId is required."); | 1567 throw new core.ArgumentError("Parameter notificationId is required."); |
1573 } | 1568 } |
1574 | 1569 |
1575 _downloadOptions = null; | 1570 _downloadOptions = null; |
1576 | 1571 |
1577 _url = 'customer/' + common_internal.Escaper.ecapeVariable('$customer') + '/
notifications/' + common_internal.Escaper.ecapeVariable('$notificationId'); | 1572 _url = 'customer/' + commons.Escaper.ecapeVariable('$customer') + '/notifica
tions/' + commons.Escaper.ecapeVariable('$notificationId'); |
1578 | 1573 |
1579 var _response = _requester.request(_url, | 1574 var _response = _requester.request(_url, |
1580 "DELETE", | 1575 "DELETE", |
1581 body: _body, | 1576 body: _body, |
1582 queryParams: _queryParams, | 1577 queryParams: _queryParams, |
1583 uploadOptions: _uploadOptions, | 1578 uploadOptions: _uploadOptions, |
1584 uploadMedia: _uploadMedia, | 1579 uploadMedia: _uploadMedia, |
1585 downloadOptions: _downloadOptions); | 1580 downloadOptions: _downloadOptions); |
1586 return _response.then((data) => null); | 1581 return _response.then((data) => null); |
1587 } | 1582 } |
1588 | 1583 |
1589 /** | 1584 /** |
1590 * Retrieves a notification. | 1585 * Retrieves a notification. |
1591 * | 1586 * |
1592 * Request parameters: | 1587 * Request parameters: |
1593 * | 1588 * |
1594 * [customer] - The unique ID for the customer's Google account. The | 1589 * [customer] - The unique ID for the customer's Google account. The |
1595 * customerId is also returned as part of the Users resource. | 1590 * customerId is also returned as part of the Users resource. |
1596 * | 1591 * |
1597 * [notificationId] - The unique ID of the notification. | 1592 * [notificationId] - The unique ID of the notification. |
1598 * | 1593 * |
1599 * Completes with a [Notification]. | 1594 * Completes with a [Notification]. |
1600 * | 1595 * |
1601 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1596 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1602 * error. | 1597 * error. |
1603 * | 1598 * |
1604 * If the used [http.Client] completes with an error when making a REST call, | 1599 * If the used [http.Client] completes with an error when making a REST call, |
1605 * this method will complete with the same error. | 1600 * this method will complete with the same error. |
1606 */ | 1601 */ |
1607 async.Future<Notification> get(core.String customer, core.String notificationI
d) { | 1602 async.Future<Notification> get(core.String customer, core.String notificationI
d) { |
1608 var _url = null; | 1603 var _url = null; |
1609 var _queryParams = new core.Map(); | 1604 var _queryParams = new core.Map(); |
1610 var _uploadMedia = null; | 1605 var _uploadMedia = null; |
1611 var _uploadOptions = null; | 1606 var _uploadOptions = null; |
1612 var _downloadOptions = common.DownloadOptions.Metadata; | 1607 var _downloadOptions = commons.DownloadOptions.Metadata; |
1613 var _body = null; | 1608 var _body = null; |
1614 | 1609 |
1615 if (customer == null) { | 1610 if (customer == null) { |
1616 throw new core.ArgumentError("Parameter customer is required."); | 1611 throw new core.ArgumentError("Parameter customer is required."); |
1617 } | 1612 } |
1618 if (notificationId == null) { | 1613 if (notificationId == null) { |
1619 throw new core.ArgumentError("Parameter notificationId is required."); | 1614 throw new core.ArgumentError("Parameter notificationId is required."); |
1620 } | 1615 } |
1621 | 1616 |
1622 | 1617 |
1623 _url = 'customer/' + common_internal.Escaper.ecapeVariable('$customer') + '/
notifications/' + common_internal.Escaper.ecapeVariable('$notificationId'); | 1618 _url = 'customer/' + commons.Escaper.ecapeVariable('$customer') + '/notifica
tions/' + commons.Escaper.ecapeVariable('$notificationId'); |
1624 | 1619 |
1625 var _response = _requester.request(_url, | 1620 var _response = _requester.request(_url, |
1626 "GET", | 1621 "GET", |
1627 body: _body, | 1622 body: _body, |
1628 queryParams: _queryParams, | 1623 queryParams: _queryParams, |
1629 uploadOptions: _uploadOptions, | 1624 uploadOptions: _uploadOptions, |
1630 uploadMedia: _uploadMedia, | 1625 uploadMedia: _uploadMedia, |
1631 downloadOptions: _downloadOptions); | 1626 downloadOptions: _downloadOptions); |
1632 return _response.then((data) => new Notification.fromJson(data)); | 1627 return _response.then((data) => new Notification.fromJson(data)); |
1633 } | 1628 } |
1634 | 1629 |
1635 /** | 1630 /** |
1636 * Retrieves a list of notifications. | 1631 * Retrieves a list of notifications. |
1637 * | 1632 * |
1638 * Request parameters: | 1633 * Request parameters: |
1639 * | 1634 * |
1640 * [customer] - The unique ID for the customer's Google account. | 1635 * [customer] - The unique ID for the customer's Google account. |
1641 * | 1636 * |
1642 * [language] - The ISO 639-1 code of the language notifications are returned | 1637 * [language] - The ISO 639-1 code of the language notifications are returned |
1643 * in. The default is English (en). | 1638 * in. The default is English (en). |
1644 * | 1639 * |
1645 * [maxResults] - Maximum number of notifications to return per page. The | 1640 * [maxResults] - Maximum number of notifications to return per page. The |
1646 * default is 100. | 1641 * default is 100. |
1647 * | 1642 * |
1648 * [pageToken] - The token to specify the page of results to retrieve. | 1643 * [pageToken] - The token to specify the page of results to retrieve. |
1649 * | 1644 * |
1650 * Completes with a [Notifications]. | 1645 * Completes with a [Notifications]. |
1651 * | 1646 * |
1652 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1647 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1653 * error. | 1648 * error. |
1654 * | 1649 * |
1655 * If the used [http.Client] completes with an error when making a REST call, | 1650 * If the used [http.Client] completes with an error when making a REST call, |
1656 * this method will complete with the same error. | 1651 * this method will complete with the same error. |
1657 */ | 1652 */ |
1658 async.Future<Notifications> list(core.String customer, {core.String language,
core.int maxResults, core.String pageToken}) { | 1653 async.Future<Notifications> list(core.String customer, {core.String language,
core.int maxResults, core.String pageToken}) { |
1659 var _url = null; | 1654 var _url = null; |
1660 var _queryParams = new core.Map(); | 1655 var _queryParams = new core.Map(); |
1661 var _uploadMedia = null; | 1656 var _uploadMedia = null; |
1662 var _uploadOptions = null; | 1657 var _uploadOptions = null; |
1663 var _downloadOptions = common.DownloadOptions.Metadata; | 1658 var _downloadOptions = commons.DownloadOptions.Metadata; |
1664 var _body = null; | 1659 var _body = null; |
1665 | 1660 |
1666 if (customer == null) { | 1661 if (customer == null) { |
1667 throw new core.ArgumentError("Parameter customer is required."); | 1662 throw new core.ArgumentError("Parameter customer is required."); |
1668 } | 1663 } |
1669 if (language != null) { | 1664 if (language != null) { |
1670 _queryParams["language"] = [language]; | 1665 _queryParams["language"] = [language]; |
1671 } | 1666 } |
1672 if (maxResults != null) { | 1667 if (maxResults != null) { |
1673 _queryParams["maxResults"] = ["${maxResults}"]; | 1668 _queryParams["maxResults"] = ["${maxResults}"]; |
1674 } | 1669 } |
1675 if (pageToken != null) { | 1670 if (pageToken != null) { |
1676 _queryParams["pageToken"] = [pageToken]; | 1671 _queryParams["pageToken"] = [pageToken]; |
1677 } | 1672 } |
1678 | 1673 |
1679 | 1674 |
1680 _url = 'customer/' + common_internal.Escaper.ecapeVariable('$customer') + '/
notifications'; | 1675 _url = 'customer/' + commons.Escaper.ecapeVariable('$customer') + '/notifica
tions'; |
1681 | 1676 |
1682 var _response = _requester.request(_url, | 1677 var _response = _requester.request(_url, |
1683 "GET", | 1678 "GET", |
1684 body: _body, | 1679 body: _body, |
1685 queryParams: _queryParams, | 1680 queryParams: _queryParams, |
1686 uploadOptions: _uploadOptions, | 1681 uploadOptions: _uploadOptions, |
1687 uploadMedia: _uploadMedia, | 1682 uploadMedia: _uploadMedia, |
1688 downloadOptions: _downloadOptions); | 1683 downloadOptions: _downloadOptions); |
1689 return _response.then((data) => new Notifications.fromJson(data)); | 1684 return _response.then((data) => new Notifications.fromJson(data)); |
1690 } | 1685 } |
1691 | 1686 |
1692 /** | 1687 /** |
1693 * Updates a notification. This method supports patch semantics. | 1688 * Updates a notification. This method supports patch semantics. |
1694 * | 1689 * |
1695 * [request] - The metadata request object. | 1690 * [request] - The metadata request object. |
1696 * | 1691 * |
1697 * Request parameters: | 1692 * Request parameters: |
1698 * | 1693 * |
1699 * [customer] - The unique ID for the customer's Google account. | 1694 * [customer] - The unique ID for the customer's Google account. |
1700 * | 1695 * |
1701 * [notificationId] - The unique ID of the notification. | 1696 * [notificationId] - The unique ID of the notification. |
1702 * | 1697 * |
1703 * Completes with a [Notification]. | 1698 * Completes with a [Notification]. |
1704 * | 1699 * |
1705 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1700 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1706 * error. | 1701 * error. |
1707 * | 1702 * |
1708 * If the used [http.Client] completes with an error when making a REST call, | 1703 * If the used [http.Client] completes with an error when making a REST call, |
1709 * this method will complete with the same error. | 1704 * this method will complete with the same error. |
1710 */ | 1705 */ |
1711 async.Future<Notification> patch(Notification request, core.String customer, c
ore.String notificationId) { | 1706 async.Future<Notification> patch(Notification request, core.String customer, c
ore.String notificationId) { |
1712 var _url = null; | 1707 var _url = null; |
1713 var _queryParams = new core.Map(); | 1708 var _queryParams = new core.Map(); |
1714 var _uploadMedia = null; | 1709 var _uploadMedia = null; |
1715 var _uploadOptions = null; | 1710 var _uploadOptions = null; |
1716 var _downloadOptions = common.DownloadOptions.Metadata; | 1711 var _downloadOptions = commons.DownloadOptions.Metadata; |
1717 var _body = null; | 1712 var _body = null; |
1718 | 1713 |
1719 if (request != null) { | 1714 if (request != null) { |
1720 _body = convert.JSON.encode((request).toJson()); | 1715 _body = convert.JSON.encode((request).toJson()); |
1721 } | 1716 } |
1722 if (customer == null) { | 1717 if (customer == null) { |
1723 throw new core.ArgumentError("Parameter customer is required."); | 1718 throw new core.ArgumentError("Parameter customer is required."); |
1724 } | 1719 } |
1725 if (notificationId == null) { | 1720 if (notificationId == null) { |
1726 throw new core.ArgumentError("Parameter notificationId is required."); | 1721 throw new core.ArgumentError("Parameter notificationId is required."); |
1727 } | 1722 } |
1728 | 1723 |
1729 | 1724 |
1730 _url = 'customer/' + common_internal.Escaper.ecapeVariable('$customer') + '/
notifications/' + common_internal.Escaper.ecapeVariable('$notificationId'); | 1725 _url = 'customer/' + commons.Escaper.ecapeVariable('$customer') + '/notifica
tions/' + commons.Escaper.ecapeVariable('$notificationId'); |
1731 | 1726 |
1732 var _response = _requester.request(_url, | 1727 var _response = _requester.request(_url, |
1733 "PATCH", | 1728 "PATCH", |
1734 body: _body, | 1729 body: _body, |
1735 queryParams: _queryParams, | 1730 queryParams: _queryParams, |
1736 uploadOptions: _uploadOptions, | 1731 uploadOptions: _uploadOptions, |
1737 uploadMedia: _uploadMedia, | 1732 uploadMedia: _uploadMedia, |
1738 downloadOptions: _downloadOptions); | 1733 downloadOptions: _downloadOptions); |
1739 return _response.then((data) => new Notification.fromJson(data)); | 1734 return _response.then((data) => new Notification.fromJson(data)); |
1740 } | 1735 } |
1741 | 1736 |
1742 /** | 1737 /** |
1743 * Updates a notification. | 1738 * Updates a notification. |
1744 * | 1739 * |
1745 * [request] - The metadata request object. | 1740 * [request] - The metadata request object. |
1746 * | 1741 * |
1747 * Request parameters: | 1742 * Request parameters: |
1748 * | 1743 * |
1749 * [customer] - The unique ID for the customer's Google account. | 1744 * [customer] - The unique ID for the customer's Google account. |
1750 * | 1745 * |
1751 * [notificationId] - The unique ID of the notification. | 1746 * [notificationId] - The unique ID of the notification. |
1752 * | 1747 * |
1753 * Completes with a [Notification]. | 1748 * Completes with a [Notification]. |
1754 * | 1749 * |
1755 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1750 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1756 * error. | 1751 * error. |
1757 * | 1752 * |
1758 * If the used [http.Client] completes with an error when making a REST call, | 1753 * If the used [http.Client] completes with an error when making a REST call, |
1759 * this method will complete with the same error. | 1754 * this method will complete with the same error. |
1760 */ | 1755 */ |
1761 async.Future<Notification> update(Notification request, core.String customer,
core.String notificationId) { | 1756 async.Future<Notification> update(Notification request, core.String customer,
core.String notificationId) { |
1762 var _url = null; | 1757 var _url = null; |
1763 var _queryParams = new core.Map(); | 1758 var _queryParams = new core.Map(); |
1764 var _uploadMedia = null; | 1759 var _uploadMedia = null; |
1765 var _uploadOptions = null; | 1760 var _uploadOptions = null; |
1766 var _downloadOptions = common.DownloadOptions.Metadata; | 1761 var _downloadOptions = commons.DownloadOptions.Metadata; |
1767 var _body = null; | 1762 var _body = null; |
1768 | 1763 |
1769 if (request != null) { | 1764 if (request != null) { |
1770 _body = convert.JSON.encode((request).toJson()); | 1765 _body = convert.JSON.encode((request).toJson()); |
1771 } | 1766 } |
1772 if (customer == null) { | 1767 if (customer == null) { |
1773 throw new core.ArgumentError("Parameter customer is required."); | 1768 throw new core.ArgumentError("Parameter customer is required."); |
1774 } | 1769 } |
1775 if (notificationId == null) { | 1770 if (notificationId == null) { |
1776 throw new core.ArgumentError("Parameter notificationId is required."); | 1771 throw new core.ArgumentError("Parameter notificationId is required."); |
1777 } | 1772 } |
1778 | 1773 |
1779 | 1774 |
1780 _url = 'customer/' + common_internal.Escaper.ecapeVariable('$customer') + '/
notifications/' + common_internal.Escaper.ecapeVariable('$notificationId'); | 1775 _url = 'customer/' + commons.Escaper.ecapeVariable('$customer') + '/notifica
tions/' + commons.Escaper.ecapeVariable('$notificationId'); |
1781 | 1776 |
1782 var _response = _requester.request(_url, | 1777 var _response = _requester.request(_url, |
1783 "PUT", | 1778 "PUT", |
1784 body: _body, | 1779 body: _body, |
1785 queryParams: _queryParams, | 1780 queryParams: _queryParams, |
1786 uploadOptions: _uploadOptions, | 1781 uploadOptions: _uploadOptions, |
1787 uploadMedia: _uploadMedia, | 1782 uploadMedia: _uploadMedia, |
1788 downloadOptions: _downloadOptions); | 1783 downloadOptions: _downloadOptions); |
1789 return _response.then((data) => new Notification.fromJson(data)); | 1784 return _response.then((data) => new Notification.fromJson(data)); |
1790 } | 1785 } |
1791 | 1786 |
1792 } | 1787 } |
1793 | 1788 |
1794 | 1789 |
1795 /** Not documented yet. */ | |
1796 class OrgunitsResourceApi { | 1790 class OrgunitsResourceApi { |
1797 final common_internal.ApiRequester _requester; | 1791 final commons.ApiRequester _requester; |
1798 | 1792 |
1799 OrgunitsResourceApi(common_internal.ApiRequester client) : | 1793 OrgunitsResourceApi(commons.ApiRequester client) : |
1800 _requester = client; | 1794 _requester = client; |
1801 | 1795 |
1802 /** | 1796 /** |
1803 * Remove Organization Unit | 1797 * Remove Organization Unit |
1804 * | 1798 * |
1805 * Request parameters: | 1799 * Request parameters: |
1806 * | 1800 * |
1807 * [customerId] - Immutable id of the Google Apps account | 1801 * [customerId] - Immutable id of the Google Apps account |
1808 * | 1802 * |
1809 * [orgUnitPath] - Full path of the organization unit | 1803 * [orgUnitPath] - Full path of the organization unit or its Id |
1810 * | 1804 * |
1811 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1805 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1812 * error. | 1806 * error. |
1813 * | 1807 * |
1814 * If the used [http.Client] completes with an error when making a REST call, | 1808 * If the used [http.Client] completes with an error when making a REST call, |
1815 * this method will complete with the same error. | 1809 * this method will complete with the same error. |
1816 */ | 1810 */ |
1817 async.Future delete(core.String customerId, core.List<core.String> orgUnitPath
) { | 1811 async.Future delete(core.String customerId, core.List<core.String> orgUnitPath
) { |
1818 var _url = null; | 1812 var _url = null; |
1819 var _queryParams = new core.Map(); | 1813 var _queryParams = new core.Map(); |
1820 var _uploadMedia = null; | 1814 var _uploadMedia = null; |
1821 var _uploadOptions = null; | 1815 var _uploadOptions = null; |
1822 var _downloadOptions = common.DownloadOptions.Metadata; | 1816 var _downloadOptions = commons.DownloadOptions.Metadata; |
1823 var _body = null; | 1817 var _body = null; |
1824 | 1818 |
1825 if (customerId == null) { | 1819 if (customerId == null) { |
1826 throw new core.ArgumentError("Parameter customerId is required."); | 1820 throw new core.ArgumentError("Parameter customerId is required."); |
1827 } | 1821 } |
1828 if (orgUnitPath == null || orgUnitPath.isEmpty) { | 1822 if (orgUnitPath == null || orgUnitPath.isEmpty) { |
1829 throw new core.ArgumentError("Parameter orgUnitPath is required."); | 1823 throw new core.ArgumentError("Parameter orgUnitPath is required."); |
1830 } | 1824 } |
1831 | 1825 |
1832 _downloadOptions = null; | 1826 _downloadOptions = null; |
1833 | 1827 |
1834 _url = 'customer/' + common_internal.Escaper.ecapeVariable('$customerId') +
'/orgunits' + '/' + (orgUnitPath).map((item) => common_internal.Escaper.ecapePat
hComponent(item)).join('/'); | 1828 _url = 'customer/' + commons.Escaper.ecapeVariable('$customerId') + '/orguni
ts' + '/' + (orgUnitPath).map((item) => commons.Escaper.ecapePathComponent(item)
).join('/'); |
1835 | 1829 |
1836 var _response = _requester.request(_url, | 1830 var _response = _requester.request(_url, |
1837 "DELETE", | 1831 "DELETE", |
1838 body: _body, | 1832 body: _body, |
1839 queryParams: _queryParams, | 1833 queryParams: _queryParams, |
1840 uploadOptions: _uploadOptions, | 1834 uploadOptions: _uploadOptions, |
1841 uploadMedia: _uploadMedia, | 1835 uploadMedia: _uploadMedia, |
1842 downloadOptions: _downloadOptions); | 1836 downloadOptions: _downloadOptions); |
1843 return _response.then((data) => null); | 1837 return _response.then((data) => null); |
1844 } | 1838 } |
1845 | 1839 |
1846 /** | 1840 /** |
1847 * Retrieve Organization Unit | 1841 * Retrieve Organization Unit |
1848 * | 1842 * |
1849 * Request parameters: | 1843 * Request parameters: |
1850 * | 1844 * |
1851 * [customerId] - Immutable id of the Google Apps account | 1845 * [customerId] - Immutable id of the Google Apps account |
1852 * | 1846 * |
1853 * [orgUnitPath] - Full path of the organization unit | 1847 * [orgUnitPath] - Full path of the organization unit or its Id |
1854 * | 1848 * |
1855 * Completes with a [OrgUnit]. | 1849 * Completes with a [OrgUnit]. |
1856 * | 1850 * |
1857 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1851 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1858 * error. | 1852 * error. |
1859 * | 1853 * |
1860 * If the used [http.Client] completes with an error when making a REST call, | 1854 * If the used [http.Client] completes with an error when making a REST call, |
1861 * this method will complete with the same error. | 1855 * this method will complete with the same error. |
1862 */ | 1856 */ |
1863 async.Future<OrgUnit> get(core.String customerId, core.List<core.String> orgUn
itPath) { | 1857 async.Future<OrgUnit> get(core.String customerId, core.List<core.String> orgUn
itPath) { |
1864 var _url = null; | 1858 var _url = null; |
1865 var _queryParams = new core.Map(); | 1859 var _queryParams = new core.Map(); |
1866 var _uploadMedia = null; | 1860 var _uploadMedia = null; |
1867 var _uploadOptions = null; | 1861 var _uploadOptions = null; |
1868 var _downloadOptions = common.DownloadOptions.Metadata; | 1862 var _downloadOptions = commons.DownloadOptions.Metadata; |
1869 var _body = null; | 1863 var _body = null; |
1870 | 1864 |
1871 if (customerId == null) { | 1865 if (customerId == null) { |
1872 throw new core.ArgumentError("Parameter customerId is required."); | 1866 throw new core.ArgumentError("Parameter customerId is required."); |
1873 } | 1867 } |
1874 if (orgUnitPath == null || orgUnitPath.isEmpty) { | 1868 if (orgUnitPath == null || orgUnitPath.isEmpty) { |
1875 throw new core.ArgumentError("Parameter orgUnitPath is required."); | 1869 throw new core.ArgumentError("Parameter orgUnitPath is required."); |
1876 } | 1870 } |
1877 | 1871 |
1878 | 1872 |
1879 _url = 'customer/' + common_internal.Escaper.ecapeVariable('$customerId') +
'/orgunits' + '/' + (orgUnitPath).map((item) => common_internal.Escaper.ecapePat
hComponent(item)).join('/'); | 1873 _url = 'customer/' + commons.Escaper.ecapeVariable('$customerId') + '/orguni
ts' + '/' + (orgUnitPath).map((item) => commons.Escaper.ecapePathComponent(item)
).join('/'); |
1880 | 1874 |
1881 var _response = _requester.request(_url, | 1875 var _response = _requester.request(_url, |
1882 "GET", | 1876 "GET", |
1883 body: _body, | 1877 body: _body, |
1884 queryParams: _queryParams, | 1878 queryParams: _queryParams, |
1885 uploadOptions: _uploadOptions, | 1879 uploadOptions: _uploadOptions, |
1886 uploadMedia: _uploadMedia, | 1880 uploadMedia: _uploadMedia, |
1887 downloadOptions: _downloadOptions); | 1881 downloadOptions: _downloadOptions); |
1888 return _response.then((data) => new OrgUnit.fromJson(data)); | 1882 return _response.then((data) => new OrgUnit.fromJson(data)); |
1889 } | 1883 } |
1890 | 1884 |
1891 /** | 1885 /** |
1892 * Add Organization Unit | 1886 * Add Organization Unit |
1893 * | 1887 * |
1894 * [request] - The metadata request object. | 1888 * [request] - The metadata request object. |
1895 * | 1889 * |
1896 * Request parameters: | 1890 * Request parameters: |
1897 * | 1891 * |
1898 * [customerId] - Immutable id of the Google Apps account | 1892 * [customerId] - Immutable id of the Google Apps account |
1899 * | 1893 * |
1900 * Completes with a [OrgUnit]. | 1894 * Completes with a [OrgUnit]. |
1901 * | 1895 * |
1902 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1896 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1903 * error. | 1897 * error. |
1904 * | 1898 * |
1905 * If the used [http.Client] completes with an error when making a REST call, | 1899 * If the used [http.Client] completes with an error when making a REST call, |
1906 * this method will complete with the same error. | 1900 * this method will complete with the same error. |
1907 */ | 1901 */ |
1908 async.Future<OrgUnit> insert(OrgUnit request, core.String customerId) { | 1902 async.Future<OrgUnit> insert(OrgUnit request, core.String customerId) { |
1909 var _url = null; | 1903 var _url = null; |
1910 var _queryParams = new core.Map(); | 1904 var _queryParams = new core.Map(); |
1911 var _uploadMedia = null; | 1905 var _uploadMedia = null; |
1912 var _uploadOptions = null; | 1906 var _uploadOptions = null; |
1913 var _downloadOptions = common.DownloadOptions.Metadata; | 1907 var _downloadOptions = commons.DownloadOptions.Metadata; |
1914 var _body = null; | 1908 var _body = null; |
1915 | 1909 |
1916 if (request != null) { | 1910 if (request != null) { |
1917 _body = convert.JSON.encode((request).toJson()); | 1911 _body = convert.JSON.encode((request).toJson()); |
1918 } | 1912 } |
1919 if (customerId == null) { | 1913 if (customerId == null) { |
1920 throw new core.ArgumentError("Parameter customerId is required."); | 1914 throw new core.ArgumentError("Parameter customerId is required."); |
1921 } | 1915 } |
1922 | 1916 |
1923 | 1917 |
1924 _url = 'customer/' + common_internal.Escaper.ecapeVariable('$customerId') +
'/orgunits'; | 1918 _url = 'customer/' + commons.Escaper.ecapeVariable('$customerId') + '/orguni
ts'; |
1925 | 1919 |
1926 var _response = _requester.request(_url, | 1920 var _response = _requester.request(_url, |
1927 "POST", | 1921 "POST", |
1928 body: _body, | 1922 body: _body, |
1929 queryParams: _queryParams, | 1923 queryParams: _queryParams, |
1930 uploadOptions: _uploadOptions, | 1924 uploadOptions: _uploadOptions, |
1931 uploadMedia: _uploadMedia, | 1925 uploadMedia: _uploadMedia, |
1932 downloadOptions: _downloadOptions); | 1926 downloadOptions: _downloadOptions); |
1933 return _response.then((data) => new OrgUnit.fromJson(data)); | 1927 return _response.then((data) => new OrgUnit.fromJson(data)); |
1934 } | 1928 } |
1935 | 1929 |
1936 /** | 1930 /** |
1937 * Retrieve all Organization Units | 1931 * Retrieve all Organization Units |
1938 * | 1932 * |
1939 * Request parameters: | 1933 * Request parameters: |
1940 * | 1934 * |
1941 * [customerId] - Immutable id of the Google Apps account | 1935 * [customerId] - Immutable id of the Google Apps account |
1942 * | 1936 * |
1943 * [orgUnitPath] - the URL-encoded organization unit | 1937 * [orgUnitPath] - the URL-encoded organization unit's path or its Id |
1944 * | 1938 * |
1945 * [type] - Whether to return all sub-organizations or just immediate children | 1939 * [type] - Whether to return all sub-organizations or just immediate children |
1946 * Possible string values are: | 1940 * Possible string values are: |
1947 * - "all" : All sub-organization units. | 1941 * - "all" : All sub-organization units. |
1948 * - "children" : Immediate children only (default). | 1942 * - "children" : Immediate children only (default). |
1949 * | 1943 * |
1950 * Completes with a [OrgUnits]. | 1944 * Completes with a [OrgUnits]. |
1951 * | 1945 * |
1952 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1946 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1953 * error. | 1947 * error. |
1954 * | 1948 * |
1955 * If the used [http.Client] completes with an error when making a REST call, | 1949 * If the used [http.Client] completes with an error when making a REST call, |
1956 * this method will complete with the same error. | 1950 * this method will complete with the same error. |
1957 */ | 1951 */ |
1958 async.Future<OrgUnits> list(core.String customerId, {core.String orgUnitPath,
core.String type}) { | 1952 async.Future<OrgUnits> list(core.String customerId, {core.String orgUnitPath,
core.String type}) { |
1959 var _url = null; | 1953 var _url = null; |
1960 var _queryParams = new core.Map(); | 1954 var _queryParams = new core.Map(); |
1961 var _uploadMedia = null; | 1955 var _uploadMedia = null; |
1962 var _uploadOptions = null; | 1956 var _uploadOptions = null; |
1963 var _downloadOptions = common.DownloadOptions.Metadata; | 1957 var _downloadOptions = commons.DownloadOptions.Metadata; |
1964 var _body = null; | 1958 var _body = null; |
1965 | 1959 |
1966 if (customerId == null) { | 1960 if (customerId == null) { |
1967 throw new core.ArgumentError("Parameter customerId is required."); | 1961 throw new core.ArgumentError("Parameter customerId is required."); |
1968 } | 1962 } |
1969 if (orgUnitPath != null) { | 1963 if (orgUnitPath != null) { |
1970 _queryParams["orgUnitPath"] = [orgUnitPath]; | 1964 _queryParams["orgUnitPath"] = [orgUnitPath]; |
1971 } | 1965 } |
1972 if (type != null) { | 1966 if (type != null) { |
1973 _queryParams["type"] = [type]; | 1967 _queryParams["type"] = [type]; |
1974 } | 1968 } |
1975 | 1969 |
1976 | 1970 |
1977 _url = 'customer/' + common_internal.Escaper.ecapeVariable('$customerId') +
'/orgunits'; | 1971 _url = 'customer/' + commons.Escaper.ecapeVariable('$customerId') + '/orguni
ts'; |
1978 | 1972 |
1979 var _response = _requester.request(_url, | 1973 var _response = _requester.request(_url, |
1980 "GET", | 1974 "GET", |
1981 body: _body, | 1975 body: _body, |
1982 queryParams: _queryParams, | 1976 queryParams: _queryParams, |
1983 uploadOptions: _uploadOptions, | 1977 uploadOptions: _uploadOptions, |
1984 uploadMedia: _uploadMedia, | 1978 uploadMedia: _uploadMedia, |
1985 downloadOptions: _downloadOptions); | 1979 downloadOptions: _downloadOptions); |
1986 return _response.then((data) => new OrgUnits.fromJson(data)); | 1980 return _response.then((data) => new OrgUnits.fromJson(data)); |
1987 } | 1981 } |
1988 | 1982 |
1989 /** | 1983 /** |
1990 * Update Organization Unit. This method supports patch semantics. | 1984 * Update Organization Unit. This method supports patch semantics. |
1991 * | 1985 * |
1992 * [request] - The metadata request object. | 1986 * [request] - The metadata request object. |
1993 * | 1987 * |
1994 * Request parameters: | 1988 * Request parameters: |
1995 * | 1989 * |
1996 * [customerId] - Immutable id of the Google Apps account | 1990 * [customerId] - Immutable id of the Google Apps account |
1997 * | 1991 * |
1998 * [orgUnitPath] - Full path of the organization unit | 1992 * [orgUnitPath] - Full path of the organization unit or its Id |
1999 * | 1993 * |
2000 * Completes with a [OrgUnit]. | 1994 * Completes with a [OrgUnit]. |
2001 * | 1995 * |
2002 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1996 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2003 * error. | 1997 * error. |
2004 * | 1998 * |
2005 * If the used [http.Client] completes with an error when making a REST call, | 1999 * If the used [http.Client] completes with an error when making a REST call, |
2006 * this method will complete with the same error. | 2000 * this method will complete with the same error. |
2007 */ | 2001 */ |
2008 async.Future<OrgUnit> patch(OrgUnit request, core.String customerId, core.List
<core.String> orgUnitPath) { | 2002 async.Future<OrgUnit> patch(OrgUnit request, core.String customerId, core.List
<core.String> orgUnitPath) { |
2009 var _url = null; | 2003 var _url = null; |
2010 var _queryParams = new core.Map(); | 2004 var _queryParams = new core.Map(); |
2011 var _uploadMedia = null; | 2005 var _uploadMedia = null; |
2012 var _uploadOptions = null; | 2006 var _uploadOptions = null; |
2013 var _downloadOptions = common.DownloadOptions.Metadata; | 2007 var _downloadOptions = commons.DownloadOptions.Metadata; |
2014 var _body = null; | 2008 var _body = null; |
2015 | 2009 |
2016 if (request != null) { | 2010 if (request != null) { |
2017 _body = convert.JSON.encode((request).toJson()); | 2011 _body = convert.JSON.encode((request).toJson()); |
2018 } | 2012 } |
2019 if (customerId == null) { | 2013 if (customerId == null) { |
2020 throw new core.ArgumentError("Parameter customerId is required."); | 2014 throw new core.ArgumentError("Parameter customerId is required."); |
2021 } | 2015 } |
2022 if (orgUnitPath == null || orgUnitPath.isEmpty) { | 2016 if (orgUnitPath == null || orgUnitPath.isEmpty) { |
2023 throw new core.ArgumentError("Parameter orgUnitPath is required."); | 2017 throw new core.ArgumentError("Parameter orgUnitPath is required."); |
2024 } | 2018 } |
2025 | 2019 |
2026 | 2020 |
2027 _url = 'customer/' + common_internal.Escaper.ecapeVariable('$customerId') +
'/orgunits' + '/' + (orgUnitPath).map((item) => common_internal.Escaper.ecapePat
hComponent(item)).join('/'); | 2021 _url = 'customer/' + commons.Escaper.ecapeVariable('$customerId') + '/orguni
ts' + '/' + (orgUnitPath).map((item) => commons.Escaper.ecapePathComponent(item)
).join('/'); |
2028 | 2022 |
2029 var _response = _requester.request(_url, | 2023 var _response = _requester.request(_url, |
2030 "PATCH", | 2024 "PATCH", |
2031 body: _body, | 2025 body: _body, |
2032 queryParams: _queryParams, | 2026 queryParams: _queryParams, |
2033 uploadOptions: _uploadOptions, | 2027 uploadOptions: _uploadOptions, |
2034 uploadMedia: _uploadMedia, | 2028 uploadMedia: _uploadMedia, |
2035 downloadOptions: _downloadOptions); | 2029 downloadOptions: _downloadOptions); |
2036 return _response.then((data) => new OrgUnit.fromJson(data)); | 2030 return _response.then((data) => new OrgUnit.fromJson(data)); |
2037 } | 2031 } |
2038 | 2032 |
2039 /** | 2033 /** |
2040 * Update Organization Unit | 2034 * Update Organization Unit |
2041 * | 2035 * |
2042 * [request] - The metadata request object. | 2036 * [request] - The metadata request object. |
2043 * | 2037 * |
2044 * Request parameters: | 2038 * Request parameters: |
2045 * | 2039 * |
2046 * [customerId] - Immutable id of the Google Apps account | 2040 * [customerId] - Immutable id of the Google Apps account |
2047 * | 2041 * |
2048 * [orgUnitPath] - Full path of the organization unit | 2042 * [orgUnitPath] - Full path of the organization unit or its Id |
2049 * | 2043 * |
2050 * Completes with a [OrgUnit]. | 2044 * Completes with a [OrgUnit]. |
2051 * | 2045 * |
2052 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 2046 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2053 * error. | 2047 * error. |
2054 * | 2048 * |
2055 * If the used [http.Client] completes with an error when making a REST call, | 2049 * If the used [http.Client] completes with an error when making a REST call, |
2056 * this method will complete with the same error. | 2050 * this method will complete with the same error. |
2057 */ | 2051 */ |
2058 async.Future<OrgUnit> update(OrgUnit request, core.String customerId, core.Lis
t<core.String> orgUnitPath) { | 2052 async.Future<OrgUnit> update(OrgUnit request, core.String customerId, core.Lis
t<core.String> orgUnitPath) { |
2059 var _url = null; | 2053 var _url = null; |
2060 var _queryParams = new core.Map(); | 2054 var _queryParams = new core.Map(); |
2061 var _uploadMedia = null; | 2055 var _uploadMedia = null; |
2062 var _uploadOptions = null; | 2056 var _uploadOptions = null; |
2063 var _downloadOptions = common.DownloadOptions.Metadata; | 2057 var _downloadOptions = commons.DownloadOptions.Metadata; |
2064 var _body = null; | 2058 var _body = null; |
2065 | 2059 |
2066 if (request != null) { | 2060 if (request != null) { |
2067 _body = convert.JSON.encode((request).toJson()); | 2061 _body = convert.JSON.encode((request).toJson()); |
2068 } | 2062 } |
2069 if (customerId == null) { | 2063 if (customerId == null) { |
2070 throw new core.ArgumentError("Parameter customerId is required."); | 2064 throw new core.ArgumentError("Parameter customerId is required."); |
2071 } | 2065 } |
2072 if (orgUnitPath == null || orgUnitPath.isEmpty) { | 2066 if (orgUnitPath == null || orgUnitPath.isEmpty) { |
2073 throw new core.ArgumentError("Parameter orgUnitPath is required."); | 2067 throw new core.ArgumentError("Parameter orgUnitPath is required."); |
2074 } | 2068 } |
2075 | 2069 |
2076 | 2070 |
2077 _url = 'customer/' + common_internal.Escaper.ecapeVariable('$customerId') +
'/orgunits' + '/' + (orgUnitPath).map((item) => common_internal.Escaper.ecapePat
hComponent(item)).join('/'); | 2071 _url = 'customer/' + commons.Escaper.ecapeVariable('$customerId') + '/orguni
ts' + '/' + (orgUnitPath).map((item) => commons.Escaper.ecapePathComponent(item)
).join('/'); |
2078 | 2072 |
2079 var _response = _requester.request(_url, | 2073 var _response = _requester.request(_url, |
2080 "PUT", | 2074 "PUT", |
2081 body: _body, | 2075 body: _body, |
2082 queryParams: _queryParams, | 2076 queryParams: _queryParams, |
2083 uploadOptions: _uploadOptions, | 2077 uploadOptions: _uploadOptions, |
2084 uploadMedia: _uploadMedia, | 2078 uploadMedia: _uploadMedia, |
2085 downloadOptions: _downloadOptions); | 2079 downloadOptions: _downloadOptions); |
2086 return _response.then((data) => new OrgUnit.fromJson(data)); | 2080 return _response.then((data) => new OrgUnit.fromJson(data)); |
2087 } | 2081 } |
2088 | 2082 |
2089 } | 2083 } |
2090 | 2084 |
2091 | 2085 |
2092 /** Not documented yet. */ | |
2093 class SchemasResourceApi { | 2086 class SchemasResourceApi { |
2094 final common_internal.ApiRequester _requester; | 2087 final commons.ApiRequester _requester; |
2095 | 2088 |
2096 SchemasResourceApi(common_internal.ApiRequester client) : | 2089 SchemasResourceApi(commons.ApiRequester client) : |
2097 _requester = client; | 2090 _requester = client; |
2098 | 2091 |
2099 /** | 2092 /** |
2100 * Delete schema | 2093 * Delete schema |
2101 * | 2094 * |
2102 * Request parameters: | 2095 * Request parameters: |
2103 * | 2096 * |
2104 * [customerId] - Immutable id of the Google Apps account | 2097 * [customerId] - Immutable id of the Google Apps account |
2105 * | 2098 * |
2106 * [schemaKey] - Name or immutable Id of the schema | 2099 * [schemaKey] - Name or immutable Id of the schema |
2107 * | 2100 * |
2108 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 2101 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2109 * error. | 2102 * error. |
2110 * | 2103 * |
2111 * If the used [http.Client] completes with an error when making a REST call, | 2104 * If the used [http.Client] completes with an error when making a REST call, |
2112 * this method will complete with the same error. | 2105 * this method will complete with the same error. |
2113 */ | 2106 */ |
2114 async.Future delete(core.String customerId, core.String schemaKey) { | 2107 async.Future delete(core.String customerId, core.String schemaKey) { |
2115 var _url = null; | 2108 var _url = null; |
2116 var _queryParams = new core.Map(); | 2109 var _queryParams = new core.Map(); |
2117 var _uploadMedia = null; | 2110 var _uploadMedia = null; |
2118 var _uploadOptions = null; | 2111 var _uploadOptions = null; |
2119 var _downloadOptions = common.DownloadOptions.Metadata; | 2112 var _downloadOptions = commons.DownloadOptions.Metadata; |
2120 var _body = null; | 2113 var _body = null; |
2121 | 2114 |
2122 if (customerId == null) { | 2115 if (customerId == null) { |
2123 throw new core.ArgumentError("Parameter customerId is required."); | 2116 throw new core.ArgumentError("Parameter customerId is required."); |
2124 } | 2117 } |
2125 if (schemaKey == null) { | 2118 if (schemaKey == null) { |
2126 throw new core.ArgumentError("Parameter schemaKey is required."); | 2119 throw new core.ArgumentError("Parameter schemaKey is required."); |
2127 } | 2120 } |
2128 | 2121 |
2129 _downloadOptions = null; | 2122 _downloadOptions = null; |
2130 | 2123 |
2131 _url = 'customer/' + common_internal.Escaper.ecapeVariable('$customerId') +
'/schemas/' + common_internal.Escaper.ecapeVariable('$schemaKey'); | 2124 _url = 'customer/' + commons.Escaper.ecapeVariable('$customerId') + '/schema
s/' + commons.Escaper.ecapeVariable('$schemaKey'); |
2132 | 2125 |
2133 var _response = _requester.request(_url, | 2126 var _response = _requester.request(_url, |
2134 "DELETE", | 2127 "DELETE", |
2135 body: _body, | 2128 body: _body, |
2136 queryParams: _queryParams, | 2129 queryParams: _queryParams, |
2137 uploadOptions: _uploadOptions, | 2130 uploadOptions: _uploadOptions, |
2138 uploadMedia: _uploadMedia, | 2131 uploadMedia: _uploadMedia, |
2139 downloadOptions: _downloadOptions); | 2132 downloadOptions: _downloadOptions); |
2140 return _response.then((data) => null); | 2133 return _response.then((data) => null); |
2141 } | 2134 } |
2142 | 2135 |
2143 /** | 2136 /** |
2144 * Retrieve schema | 2137 * Retrieve schema |
2145 * | 2138 * |
2146 * Request parameters: | 2139 * Request parameters: |
2147 * | 2140 * |
2148 * [customerId] - Immutable id of the Google Apps account | 2141 * [customerId] - Immutable id of the Google Apps account |
2149 * | 2142 * |
2150 * [schemaKey] - Name or immutable Id of the schema | 2143 * [schemaKey] - Name or immutable Id of the schema |
2151 * | 2144 * |
2152 * Completes with a [Schema]. | 2145 * Completes with a [Schema]. |
2153 * | 2146 * |
2154 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 2147 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2155 * error. | 2148 * error. |
2156 * | 2149 * |
2157 * If the used [http.Client] completes with an error when making a REST call, | 2150 * If the used [http.Client] completes with an error when making a REST call, |
2158 * this method will complete with the same error. | 2151 * this method will complete with the same error. |
2159 */ | 2152 */ |
2160 async.Future<Schema> get(core.String customerId, core.String schemaKey) { | 2153 async.Future<Schema> get(core.String customerId, core.String schemaKey) { |
2161 var _url = null; | 2154 var _url = null; |
2162 var _queryParams = new core.Map(); | 2155 var _queryParams = new core.Map(); |
2163 var _uploadMedia = null; | 2156 var _uploadMedia = null; |
2164 var _uploadOptions = null; | 2157 var _uploadOptions = null; |
2165 var _downloadOptions = common.DownloadOptions.Metadata; | 2158 var _downloadOptions = commons.DownloadOptions.Metadata; |
2166 var _body = null; | 2159 var _body = null; |
2167 | 2160 |
2168 if (customerId == null) { | 2161 if (customerId == null) { |
2169 throw new core.ArgumentError("Parameter customerId is required."); | 2162 throw new core.ArgumentError("Parameter customerId is required."); |
2170 } | 2163 } |
2171 if (schemaKey == null) { | 2164 if (schemaKey == null) { |
2172 throw new core.ArgumentError("Parameter schemaKey is required."); | 2165 throw new core.ArgumentError("Parameter schemaKey is required."); |
2173 } | 2166 } |
2174 | 2167 |
2175 | 2168 |
2176 _url = 'customer/' + common_internal.Escaper.ecapeVariable('$customerId') +
'/schemas/' + common_internal.Escaper.ecapeVariable('$schemaKey'); | 2169 _url = 'customer/' + commons.Escaper.ecapeVariable('$customerId') + '/schema
s/' + commons.Escaper.ecapeVariable('$schemaKey'); |
2177 | 2170 |
2178 var _response = _requester.request(_url, | 2171 var _response = _requester.request(_url, |
2179 "GET", | 2172 "GET", |
2180 body: _body, | 2173 body: _body, |
2181 queryParams: _queryParams, | 2174 queryParams: _queryParams, |
2182 uploadOptions: _uploadOptions, | 2175 uploadOptions: _uploadOptions, |
2183 uploadMedia: _uploadMedia, | 2176 uploadMedia: _uploadMedia, |
2184 downloadOptions: _downloadOptions); | 2177 downloadOptions: _downloadOptions); |
2185 return _response.then((data) => new Schema.fromJson(data)); | 2178 return _response.then((data) => new Schema.fromJson(data)); |
2186 } | 2179 } |
2187 | 2180 |
2188 /** | 2181 /** |
2189 * Create schema. | 2182 * Create schema. |
2190 * | 2183 * |
2191 * [request] - The metadata request object. | 2184 * [request] - The metadata request object. |
2192 * | 2185 * |
2193 * Request parameters: | 2186 * Request parameters: |
2194 * | 2187 * |
2195 * [customerId] - Immutable id of the Google Apps account | 2188 * [customerId] - Immutable id of the Google Apps account |
2196 * | 2189 * |
2197 * Completes with a [Schema]. | 2190 * Completes with a [Schema]. |
2198 * | 2191 * |
2199 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 2192 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2200 * error. | 2193 * error. |
2201 * | 2194 * |
2202 * If the used [http.Client] completes with an error when making a REST call, | 2195 * If the used [http.Client] completes with an error when making a REST call, |
2203 * this method will complete with the same error. | 2196 * this method will complete with the same error. |
2204 */ | 2197 */ |
2205 async.Future<Schema> insert(Schema request, core.String customerId) { | 2198 async.Future<Schema> insert(Schema request, core.String customerId) { |
2206 var _url = null; | 2199 var _url = null; |
2207 var _queryParams = new core.Map(); | 2200 var _queryParams = new core.Map(); |
2208 var _uploadMedia = null; | 2201 var _uploadMedia = null; |
2209 var _uploadOptions = null; | 2202 var _uploadOptions = null; |
2210 var _downloadOptions = common.DownloadOptions.Metadata; | 2203 var _downloadOptions = commons.DownloadOptions.Metadata; |
2211 var _body = null; | 2204 var _body = null; |
2212 | 2205 |
2213 if (request != null) { | 2206 if (request != null) { |
2214 _body = convert.JSON.encode((request).toJson()); | 2207 _body = convert.JSON.encode((request).toJson()); |
2215 } | 2208 } |
2216 if (customerId == null) { | 2209 if (customerId == null) { |
2217 throw new core.ArgumentError("Parameter customerId is required."); | 2210 throw new core.ArgumentError("Parameter customerId is required."); |
2218 } | 2211 } |
2219 | 2212 |
2220 | 2213 |
2221 _url = 'customer/' + common_internal.Escaper.ecapeVariable('$customerId') +
'/schemas'; | 2214 _url = 'customer/' + commons.Escaper.ecapeVariable('$customerId') + '/schema
s'; |
2222 | 2215 |
2223 var _response = _requester.request(_url, | 2216 var _response = _requester.request(_url, |
2224 "POST", | 2217 "POST", |
2225 body: _body, | 2218 body: _body, |
2226 queryParams: _queryParams, | 2219 queryParams: _queryParams, |
2227 uploadOptions: _uploadOptions, | 2220 uploadOptions: _uploadOptions, |
2228 uploadMedia: _uploadMedia, | 2221 uploadMedia: _uploadMedia, |
2229 downloadOptions: _downloadOptions); | 2222 downloadOptions: _downloadOptions); |
2230 return _response.then((data) => new Schema.fromJson(data)); | 2223 return _response.then((data) => new Schema.fromJson(data)); |
2231 } | 2224 } |
2232 | 2225 |
2233 /** | 2226 /** |
2234 * Retrieve all schemas for a customer | 2227 * Retrieve all schemas for a customer |
2235 * | 2228 * |
2236 * Request parameters: | 2229 * Request parameters: |
2237 * | 2230 * |
2238 * [customerId] - Immutable id of the Google Apps account | 2231 * [customerId] - Immutable id of the Google Apps account |
2239 * | 2232 * |
2240 * Completes with a [Schemas]. | 2233 * Completes with a [Schemas]. |
2241 * | 2234 * |
2242 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 2235 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2243 * error. | 2236 * error. |
2244 * | 2237 * |
2245 * If the used [http.Client] completes with an error when making a REST call, | 2238 * If the used [http.Client] completes with an error when making a REST call, |
2246 * this method will complete with the same error. | 2239 * this method will complete with the same error. |
2247 */ | 2240 */ |
2248 async.Future<Schemas> list(core.String customerId) { | 2241 async.Future<Schemas> list(core.String customerId) { |
2249 var _url = null; | 2242 var _url = null; |
2250 var _queryParams = new core.Map(); | 2243 var _queryParams = new core.Map(); |
2251 var _uploadMedia = null; | 2244 var _uploadMedia = null; |
2252 var _uploadOptions = null; | 2245 var _uploadOptions = null; |
2253 var _downloadOptions = common.DownloadOptions.Metadata; | 2246 var _downloadOptions = commons.DownloadOptions.Metadata; |
2254 var _body = null; | 2247 var _body = null; |
2255 | 2248 |
2256 if (customerId == null) { | 2249 if (customerId == null) { |
2257 throw new core.ArgumentError("Parameter customerId is required."); | 2250 throw new core.ArgumentError("Parameter customerId is required."); |
2258 } | 2251 } |
2259 | 2252 |
2260 | 2253 |
2261 _url = 'customer/' + common_internal.Escaper.ecapeVariable('$customerId') +
'/schemas'; | 2254 _url = 'customer/' + commons.Escaper.ecapeVariable('$customerId') + '/schema
s'; |
2262 | 2255 |
2263 var _response = _requester.request(_url, | 2256 var _response = _requester.request(_url, |
2264 "GET", | 2257 "GET", |
2265 body: _body, | 2258 body: _body, |
2266 queryParams: _queryParams, | 2259 queryParams: _queryParams, |
2267 uploadOptions: _uploadOptions, | 2260 uploadOptions: _uploadOptions, |
2268 uploadMedia: _uploadMedia, | 2261 uploadMedia: _uploadMedia, |
2269 downloadOptions: _downloadOptions); | 2262 downloadOptions: _downloadOptions); |
2270 return _response.then((data) => new Schemas.fromJson(data)); | 2263 return _response.then((data) => new Schemas.fromJson(data)); |
2271 } | 2264 } |
2272 | 2265 |
2273 /** | 2266 /** |
2274 * Update schema. This method supports patch semantics. | 2267 * Update schema. This method supports patch semantics. |
2275 * | 2268 * |
2276 * [request] - The metadata request object. | 2269 * [request] - The metadata request object. |
2277 * | 2270 * |
2278 * Request parameters: | 2271 * Request parameters: |
2279 * | 2272 * |
2280 * [customerId] - Immutable id of the Google Apps account | 2273 * [customerId] - Immutable id of the Google Apps account |
2281 * | 2274 * |
2282 * [schemaKey] - Name or immutable Id of the schema. | 2275 * [schemaKey] - Name or immutable Id of the schema. |
2283 * | 2276 * |
2284 * Completes with a [Schema]. | 2277 * Completes with a [Schema]. |
2285 * | 2278 * |
2286 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 2279 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2287 * error. | 2280 * error. |
2288 * | 2281 * |
2289 * If the used [http.Client] completes with an error when making a REST call, | 2282 * If the used [http.Client] completes with an error when making a REST call, |
2290 * this method will complete with the same error. | 2283 * this method will complete with the same error. |
2291 */ | 2284 */ |
2292 async.Future<Schema> patch(Schema request, core.String customerId, core.String
schemaKey) { | 2285 async.Future<Schema> patch(Schema request, core.String customerId, core.String
schemaKey) { |
2293 var _url = null; | 2286 var _url = null; |
2294 var _queryParams = new core.Map(); | 2287 var _queryParams = new core.Map(); |
2295 var _uploadMedia = null; | 2288 var _uploadMedia = null; |
2296 var _uploadOptions = null; | 2289 var _uploadOptions = null; |
2297 var _downloadOptions = common.DownloadOptions.Metadata; | 2290 var _downloadOptions = commons.DownloadOptions.Metadata; |
2298 var _body = null; | 2291 var _body = null; |
2299 | 2292 |
2300 if (request != null) { | 2293 if (request != null) { |
2301 _body = convert.JSON.encode((request).toJson()); | 2294 _body = convert.JSON.encode((request).toJson()); |
2302 } | 2295 } |
2303 if (customerId == null) { | 2296 if (customerId == null) { |
2304 throw new core.ArgumentError("Parameter customerId is required."); | 2297 throw new core.ArgumentError("Parameter customerId is required."); |
2305 } | 2298 } |
2306 if (schemaKey == null) { | 2299 if (schemaKey == null) { |
2307 throw new core.ArgumentError("Parameter schemaKey is required."); | 2300 throw new core.ArgumentError("Parameter schemaKey is required."); |
2308 } | 2301 } |
2309 | 2302 |
2310 | 2303 |
2311 _url = 'customer/' + common_internal.Escaper.ecapeVariable('$customerId') +
'/schemas/' + common_internal.Escaper.ecapeVariable('$schemaKey'); | 2304 _url = 'customer/' + commons.Escaper.ecapeVariable('$customerId') + '/schema
s/' + commons.Escaper.ecapeVariable('$schemaKey'); |
2312 | 2305 |
2313 var _response = _requester.request(_url, | 2306 var _response = _requester.request(_url, |
2314 "PATCH", | 2307 "PATCH", |
2315 body: _body, | 2308 body: _body, |
2316 queryParams: _queryParams, | 2309 queryParams: _queryParams, |
2317 uploadOptions: _uploadOptions, | 2310 uploadOptions: _uploadOptions, |
2318 uploadMedia: _uploadMedia, | 2311 uploadMedia: _uploadMedia, |
2319 downloadOptions: _downloadOptions); | 2312 downloadOptions: _downloadOptions); |
2320 return _response.then((data) => new Schema.fromJson(data)); | 2313 return _response.then((data) => new Schema.fromJson(data)); |
2321 } | 2314 } |
2322 | 2315 |
2323 /** | 2316 /** |
2324 * Update schema | 2317 * Update schema |
2325 * | 2318 * |
2326 * [request] - The metadata request object. | 2319 * [request] - The metadata request object. |
2327 * | 2320 * |
2328 * Request parameters: | 2321 * Request parameters: |
2329 * | 2322 * |
2330 * [customerId] - Immutable id of the Google Apps account | 2323 * [customerId] - Immutable id of the Google Apps account |
2331 * | 2324 * |
2332 * [schemaKey] - Name or immutable Id of the schema. | 2325 * [schemaKey] - Name or immutable Id of the schema. |
2333 * | 2326 * |
2334 * Completes with a [Schema]. | 2327 * Completes with a [Schema]. |
2335 * | 2328 * |
2336 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 2329 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2337 * error. | 2330 * error. |
2338 * | 2331 * |
2339 * If the used [http.Client] completes with an error when making a REST call, | 2332 * If the used [http.Client] completes with an error when making a REST call, |
2340 * this method will complete with the same error. | 2333 * this method will complete with the same error. |
2341 */ | 2334 */ |
2342 async.Future<Schema> update(Schema request, core.String customerId, core.Strin
g schemaKey) { | 2335 async.Future<Schema> update(Schema request, core.String customerId, core.Strin
g schemaKey) { |
2343 var _url = null; | 2336 var _url = null; |
2344 var _queryParams = new core.Map(); | 2337 var _queryParams = new core.Map(); |
2345 var _uploadMedia = null; | 2338 var _uploadMedia = null; |
2346 var _uploadOptions = null; | 2339 var _uploadOptions = null; |
2347 var _downloadOptions = common.DownloadOptions.Metadata; | 2340 var _downloadOptions = commons.DownloadOptions.Metadata; |
2348 var _body = null; | 2341 var _body = null; |
2349 | 2342 |
2350 if (request != null) { | 2343 if (request != null) { |
2351 _body = convert.JSON.encode((request).toJson()); | 2344 _body = convert.JSON.encode((request).toJson()); |
2352 } | 2345 } |
2353 if (customerId == null) { | 2346 if (customerId == null) { |
2354 throw new core.ArgumentError("Parameter customerId is required."); | 2347 throw new core.ArgumentError("Parameter customerId is required."); |
2355 } | 2348 } |
2356 if (schemaKey == null) { | 2349 if (schemaKey == null) { |
2357 throw new core.ArgumentError("Parameter schemaKey is required."); | 2350 throw new core.ArgumentError("Parameter schemaKey is required."); |
2358 } | 2351 } |
2359 | 2352 |
2360 | 2353 |
2361 _url = 'customer/' + common_internal.Escaper.ecapeVariable('$customerId') +
'/schemas/' + common_internal.Escaper.ecapeVariable('$schemaKey'); | 2354 _url = 'customer/' + commons.Escaper.ecapeVariable('$customerId') + '/schema
s/' + commons.Escaper.ecapeVariable('$schemaKey'); |
2362 | 2355 |
2363 var _response = _requester.request(_url, | 2356 var _response = _requester.request(_url, |
2364 "PUT", | 2357 "PUT", |
2365 body: _body, | 2358 body: _body, |
2366 queryParams: _queryParams, | 2359 queryParams: _queryParams, |
2367 uploadOptions: _uploadOptions, | 2360 uploadOptions: _uploadOptions, |
2368 uploadMedia: _uploadMedia, | 2361 uploadMedia: _uploadMedia, |
2369 downloadOptions: _downloadOptions); | 2362 downloadOptions: _downloadOptions); |
2370 return _response.then((data) => new Schema.fromJson(data)); | 2363 return _response.then((data) => new Schema.fromJson(data)); |
2371 } | 2364 } |
2372 | 2365 |
2373 } | 2366 } |
2374 | 2367 |
2375 | 2368 |
2376 /** Not documented yet. */ | |
2377 class TokensResourceApi { | 2369 class TokensResourceApi { |
2378 final common_internal.ApiRequester _requester; | 2370 final commons.ApiRequester _requester; |
2379 | 2371 |
2380 TokensResourceApi(common_internal.ApiRequester client) : | 2372 TokensResourceApi(commons.ApiRequester client) : |
2381 _requester = client; | 2373 _requester = client; |
2382 | 2374 |
2383 /** | 2375 /** |
2384 * Delete all access tokens issued by a user for an application. | 2376 * Delete all access tokens issued by a user for an application. |
2385 * | 2377 * |
2386 * Request parameters: | 2378 * Request parameters: |
2387 * | 2379 * |
2388 * [userKey] - Identifies the user in the API request. The value can be the | 2380 * [userKey] - Identifies the user in the API request. The value can be the |
2389 * user's primary email address, alias email address, or unique user ID. | 2381 * user's primary email address, alias email address, or unique user ID. |
2390 * | 2382 * |
2391 * [clientId] - The Client ID of the application the token is issued to. | 2383 * [clientId] - The Client ID of the application the token is issued to. |
2392 * | 2384 * |
2393 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 2385 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2394 * error. | 2386 * error. |
2395 * | 2387 * |
2396 * If the used [http.Client] completes with an error when making a REST call, | 2388 * If the used [http.Client] completes with an error when making a REST call, |
2397 * this method will complete with the same error. | 2389 * this method will complete with the same error. |
2398 */ | 2390 */ |
2399 async.Future delete(core.String userKey, core.String clientId) { | 2391 async.Future delete(core.String userKey, core.String clientId) { |
2400 var _url = null; | 2392 var _url = null; |
2401 var _queryParams = new core.Map(); | 2393 var _queryParams = new core.Map(); |
2402 var _uploadMedia = null; | 2394 var _uploadMedia = null; |
2403 var _uploadOptions = null; | 2395 var _uploadOptions = null; |
2404 var _downloadOptions = common.DownloadOptions.Metadata; | 2396 var _downloadOptions = commons.DownloadOptions.Metadata; |
2405 var _body = null; | 2397 var _body = null; |
2406 | 2398 |
2407 if (userKey == null) { | 2399 if (userKey == null) { |
2408 throw new core.ArgumentError("Parameter userKey is required."); | 2400 throw new core.ArgumentError("Parameter userKey is required."); |
2409 } | 2401 } |
2410 if (clientId == null) { | 2402 if (clientId == null) { |
2411 throw new core.ArgumentError("Parameter clientId is required."); | 2403 throw new core.ArgumentError("Parameter clientId is required."); |
2412 } | 2404 } |
2413 | 2405 |
2414 _downloadOptions = null; | 2406 _downloadOptions = null; |
2415 | 2407 |
2416 _url = 'users/' + common_internal.Escaper.ecapeVariable('$userKey') + '/toke
ns/' + common_internal.Escaper.ecapeVariable('$clientId'); | 2408 _url = 'users/' + commons.Escaper.ecapeVariable('$userKey') + '/tokens/' + c
ommons.Escaper.ecapeVariable('$clientId'); |
2417 | 2409 |
2418 var _response = _requester.request(_url, | 2410 var _response = _requester.request(_url, |
2419 "DELETE", | 2411 "DELETE", |
2420 body: _body, | 2412 body: _body, |
2421 queryParams: _queryParams, | 2413 queryParams: _queryParams, |
2422 uploadOptions: _uploadOptions, | 2414 uploadOptions: _uploadOptions, |
2423 uploadMedia: _uploadMedia, | 2415 uploadMedia: _uploadMedia, |
2424 downloadOptions: _downloadOptions); | 2416 downloadOptions: _downloadOptions); |
2425 return _response.then((data) => null); | 2417 return _response.then((data) => null); |
2426 } | 2418 } |
2427 | 2419 |
2428 /** | 2420 /** |
2429 * Get information about an access token issued by a user. | 2421 * Get information about an access token issued by a user. |
2430 * | 2422 * |
2431 * Request parameters: | 2423 * Request parameters: |
2432 * | 2424 * |
2433 * [userKey] - Identifies the user in the API request. The value can be the | 2425 * [userKey] - Identifies the user in the API request. The value can be the |
2434 * user's primary email address, alias email address, or unique user ID. | 2426 * user's primary email address, alias email address, or unique user ID. |
2435 * | 2427 * |
2436 * [clientId] - The Client ID of the application the token is issued to. | 2428 * [clientId] - The Client ID of the application the token is issued to. |
2437 * | 2429 * |
2438 * Completes with a [Token]. | 2430 * Completes with a [Token]. |
2439 * | 2431 * |
2440 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 2432 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2441 * error. | 2433 * error. |
2442 * | 2434 * |
2443 * If the used [http.Client] completes with an error when making a REST call, | 2435 * If the used [http.Client] completes with an error when making a REST call, |
2444 * this method will complete with the same error. | 2436 * this method will complete with the same error. |
2445 */ | 2437 */ |
2446 async.Future<Token> get(core.String userKey, core.String clientId) { | 2438 async.Future<Token> get(core.String userKey, core.String clientId) { |
2447 var _url = null; | 2439 var _url = null; |
2448 var _queryParams = new core.Map(); | 2440 var _queryParams = new core.Map(); |
2449 var _uploadMedia = null; | 2441 var _uploadMedia = null; |
2450 var _uploadOptions = null; | 2442 var _uploadOptions = null; |
2451 var _downloadOptions = common.DownloadOptions.Metadata; | 2443 var _downloadOptions = commons.DownloadOptions.Metadata; |
2452 var _body = null; | 2444 var _body = null; |
2453 | 2445 |
2454 if (userKey == null) { | 2446 if (userKey == null) { |
2455 throw new core.ArgumentError("Parameter userKey is required."); | 2447 throw new core.ArgumentError("Parameter userKey is required."); |
2456 } | 2448 } |
2457 if (clientId == null) { | 2449 if (clientId == null) { |
2458 throw new core.ArgumentError("Parameter clientId is required."); | 2450 throw new core.ArgumentError("Parameter clientId is required."); |
2459 } | 2451 } |
2460 | 2452 |
2461 | 2453 |
2462 _url = 'users/' + common_internal.Escaper.ecapeVariable('$userKey') + '/toke
ns/' + common_internal.Escaper.ecapeVariable('$clientId'); | 2454 _url = 'users/' + commons.Escaper.ecapeVariable('$userKey') + '/tokens/' + c
ommons.Escaper.ecapeVariable('$clientId'); |
2463 | 2455 |
2464 var _response = _requester.request(_url, | 2456 var _response = _requester.request(_url, |
2465 "GET", | 2457 "GET", |
2466 body: _body, | 2458 body: _body, |
2467 queryParams: _queryParams, | 2459 queryParams: _queryParams, |
2468 uploadOptions: _uploadOptions, | 2460 uploadOptions: _uploadOptions, |
2469 uploadMedia: _uploadMedia, | 2461 uploadMedia: _uploadMedia, |
2470 downloadOptions: _downloadOptions); | 2462 downloadOptions: _downloadOptions); |
2471 return _response.then((data) => new Token.fromJson(data)); | 2463 return _response.then((data) => new Token.fromJson(data)); |
2472 } | 2464 } |
2473 | 2465 |
2474 /** | 2466 /** |
2475 * Returns the set of tokens specified user has issued to 3rd party | 2467 * Returns the set of tokens specified user has issued to 3rd party |
2476 * applications. | 2468 * applications. |
2477 * | 2469 * |
2478 * Request parameters: | 2470 * Request parameters: |
2479 * | 2471 * |
2480 * [userKey] - Identifies the user in the API request. The value can be the | 2472 * [userKey] - Identifies the user in the API request. The value can be the |
2481 * user's primary email address, alias email address, or unique user ID. | 2473 * user's primary email address, alias email address, or unique user ID. |
2482 * | 2474 * |
2483 * Completes with a [Tokens]. | 2475 * Completes with a [Tokens]. |
2484 * | 2476 * |
2485 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 2477 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2486 * error. | 2478 * error. |
2487 * | 2479 * |
2488 * If the used [http.Client] completes with an error when making a REST call, | 2480 * If the used [http.Client] completes with an error when making a REST call, |
2489 * this method will complete with the same error. | 2481 * this method will complete with the same error. |
2490 */ | 2482 */ |
2491 async.Future<Tokens> list(core.String userKey) { | 2483 async.Future<Tokens> list(core.String userKey) { |
2492 var _url = null; | 2484 var _url = null; |
2493 var _queryParams = new core.Map(); | 2485 var _queryParams = new core.Map(); |
2494 var _uploadMedia = null; | 2486 var _uploadMedia = null; |
2495 var _uploadOptions = null; | 2487 var _uploadOptions = null; |
2496 var _downloadOptions = common.DownloadOptions.Metadata; | 2488 var _downloadOptions = commons.DownloadOptions.Metadata; |
2497 var _body = null; | 2489 var _body = null; |
2498 | 2490 |
2499 if (userKey == null) { | 2491 if (userKey == null) { |
2500 throw new core.ArgumentError("Parameter userKey is required."); | 2492 throw new core.ArgumentError("Parameter userKey is required."); |
2501 } | 2493 } |
2502 | 2494 |
2503 | 2495 |
2504 _url = 'users/' + common_internal.Escaper.ecapeVariable('$userKey') + '/toke
ns'; | 2496 _url = 'users/' + commons.Escaper.ecapeVariable('$userKey') + '/tokens'; |
2505 | 2497 |
2506 var _response = _requester.request(_url, | 2498 var _response = _requester.request(_url, |
2507 "GET", | 2499 "GET", |
2508 body: _body, | 2500 body: _body, |
2509 queryParams: _queryParams, | 2501 queryParams: _queryParams, |
2510 uploadOptions: _uploadOptions, | 2502 uploadOptions: _uploadOptions, |
2511 uploadMedia: _uploadMedia, | 2503 uploadMedia: _uploadMedia, |
2512 downloadOptions: _downloadOptions); | 2504 downloadOptions: _downloadOptions); |
2513 return _response.then((data) => new Tokens.fromJson(data)); | 2505 return _response.then((data) => new Tokens.fromJson(data)); |
2514 } | 2506 } |
2515 | 2507 |
2516 } | 2508 } |
2517 | 2509 |
2518 | 2510 |
2519 /** Not documented yet. */ | |
2520 class UsersResourceApi { | 2511 class UsersResourceApi { |
2521 final common_internal.ApiRequester _requester; | 2512 final commons.ApiRequester _requester; |
2522 | 2513 |
2523 UsersAliasesResourceApi get aliases => new UsersAliasesResourceApi(_requester)
; | 2514 UsersAliasesResourceApi get aliases => new UsersAliasesResourceApi(_requester)
; |
2524 UsersPhotosResourceApi get photos => new UsersPhotosResourceApi(_requester); | 2515 UsersPhotosResourceApi get photos => new UsersPhotosResourceApi(_requester); |
2525 | 2516 |
2526 UsersResourceApi(common_internal.ApiRequester client) : | 2517 UsersResourceApi(commons.ApiRequester client) : |
2527 _requester = client; | 2518 _requester = client; |
2528 | 2519 |
2529 /** | 2520 /** |
2530 * Delete user | 2521 * Delete user |
2531 * | 2522 * |
2532 * Request parameters: | 2523 * Request parameters: |
2533 * | 2524 * |
2534 * [userKey] - Email or immutable Id of the user | 2525 * [userKey] - Email or immutable Id of the user |
2535 * | 2526 * |
2536 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 2527 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2537 * error. | 2528 * error. |
2538 * | 2529 * |
2539 * If the used [http.Client] completes with an error when making a REST call, | 2530 * If the used [http.Client] completes with an error when making a REST call, |
2540 * this method will complete with the same error. | 2531 * this method will complete with the same error. |
2541 */ | 2532 */ |
2542 async.Future delete(core.String userKey) { | 2533 async.Future delete(core.String userKey) { |
2543 var _url = null; | 2534 var _url = null; |
2544 var _queryParams = new core.Map(); | 2535 var _queryParams = new core.Map(); |
2545 var _uploadMedia = null; | 2536 var _uploadMedia = null; |
2546 var _uploadOptions = null; | 2537 var _uploadOptions = null; |
2547 var _downloadOptions = common.DownloadOptions.Metadata; | 2538 var _downloadOptions = commons.DownloadOptions.Metadata; |
2548 var _body = null; | 2539 var _body = null; |
2549 | 2540 |
2550 if (userKey == null) { | 2541 if (userKey == null) { |
2551 throw new core.ArgumentError("Parameter userKey is required."); | 2542 throw new core.ArgumentError("Parameter userKey is required."); |
2552 } | 2543 } |
2553 | 2544 |
2554 _downloadOptions = null; | 2545 _downloadOptions = null; |
2555 | 2546 |
2556 _url = 'users/' + common_internal.Escaper.ecapeVariable('$userKey'); | 2547 _url = 'users/' + commons.Escaper.ecapeVariable('$userKey'); |
2557 | 2548 |
2558 var _response = _requester.request(_url, | 2549 var _response = _requester.request(_url, |
2559 "DELETE", | 2550 "DELETE", |
2560 body: _body, | 2551 body: _body, |
2561 queryParams: _queryParams, | 2552 queryParams: _queryParams, |
2562 uploadOptions: _uploadOptions, | 2553 uploadOptions: _uploadOptions, |
2563 uploadMedia: _uploadMedia, | 2554 uploadMedia: _uploadMedia, |
2564 downloadOptions: _downloadOptions); | 2555 downloadOptions: _downloadOptions); |
2565 return _response.then((data) => null); | 2556 return _response.then((data) => null); |
2566 } | 2557 } |
(...skipping 16 matching lines...) Expand all Loading... |
2583 * - "full" : Include all fields associated with this user. | 2574 * - "full" : Include all fields associated with this user. |
2584 * | 2575 * |
2585 * [viewType] - Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the | 2576 * [viewType] - Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the |
2586 * user. | 2577 * user. |
2587 * Possible string values are: | 2578 * Possible string values are: |
2588 * - "admin_view" : Fetches the ADMIN_VIEW of the user. | 2579 * - "admin_view" : Fetches the ADMIN_VIEW of the user. |
2589 * - "domain_public" : Fetches the DOMAIN_PUBLIC view of the user. | 2580 * - "domain_public" : Fetches the DOMAIN_PUBLIC view of the user. |
2590 * | 2581 * |
2591 * Completes with a [User]. | 2582 * Completes with a [User]. |
2592 * | 2583 * |
2593 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 2584 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2594 * error. | 2585 * error. |
2595 * | 2586 * |
2596 * If the used [http.Client] completes with an error when making a REST call, | 2587 * If the used [http.Client] completes with an error when making a REST call, |
2597 * this method will complete with the same error. | 2588 * this method will complete with the same error. |
2598 */ | 2589 */ |
2599 async.Future<User> get(core.String userKey, {core.String customFieldMask, core
.String projection, core.String viewType}) { | 2590 async.Future<User> get(core.String userKey, {core.String customFieldMask, core
.String projection, core.String viewType}) { |
2600 var _url = null; | 2591 var _url = null; |
2601 var _queryParams = new core.Map(); | 2592 var _queryParams = new core.Map(); |
2602 var _uploadMedia = null; | 2593 var _uploadMedia = null; |
2603 var _uploadOptions = null; | 2594 var _uploadOptions = null; |
2604 var _downloadOptions = common.DownloadOptions.Metadata; | 2595 var _downloadOptions = commons.DownloadOptions.Metadata; |
2605 var _body = null; | 2596 var _body = null; |
2606 | 2597 |
2607 if (userKey == null) { | 2598 if (userKey == null) { |
2608 throw new core.ArgumentError("Parameter userKey is required."); | 2599 throw new core.ArgumentError("Parameter userKey is required."); |
2609 } | 2600 } |
2610 if (customFieldMask != null) { | 2601 if (customFieldMask != null) { |
2611 _queryParams["customFieldMask"] = [customFieldMask]; | 2602 _queryParams["customFieldMask"] = [customFieldMask]; |
2612 } | 2603 } |
2613 if (projection != null) { | 2604 if (projection != null) { |
2614 _queryParams["projection"] = [projection]; | 2605 _queryParams["projection"] = [projection]; |
2615 } | 2606 } |
2616 if (viewType != null) { | 2607 if (viewType != null) { |
2617 _queryParams["viewType"] = [viewType]; | 2608 _queryParams["viewType"] = [viewType]; |
2618 } | 2609 } |
2619 | 2610 |
2620 | 2611 |
2621 _url = 'users/' + common_internal.Escaper.ecapeVariable('$userKey'); | 2612 _url = 'users/' + commons.Escaper.ecapeVariable('$userKey'); |
2622 | 2613 |
2623 var _response = _requester.request(_url, | 2614 var _response = _requester.request(_url, |
2624 "GET", | 2615 "GET", |
2625 body: _body, | 2616 body: _body, |
2626 queryParams: _queryParams, | 2617 queryParams: _queryParams, |
2627 uploadOptions: _uploadOptions, | 2618 uploadOptions: _uploadOptions, |
2628 uploadMedia: _uploadMedia, | 2619 uploadMedia: _uploadMedia, |
2629 downloadOptions: _downloadOptions); | 2620 downloadOptions: _downloadOptions); |
2630 return _response.then((data) => new User.fromJson(data)); | 2621 return _response.then((data) => new User.fromJson(data)); |
2631 } | 2622 } |
2632 | 2623 |
2633 /** | 2624 /** |
2634 * create user. | 2625 * create user. |
2635 * | 2626 * |
2636 * [request] - The metadata request object. | 2627 * [request] - The metadata request object. |
2637 * | 2628 * |
2638 * Request parameters: | 2629 * Request parameters: |
2639 * | 2630 * |
2640 * Completes with a [User]. | 2631 * Completes with a [User]. |
2641 * | 2632 * |
2642 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 2633 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2643 * error. | 2634 * error. |
2644 * | 2635 * |
2645 * If the used [http.Client] completes with an error when making a REST call, | 2636 * If the used [http.Client] completes with an error when making a REST call, |
2646 * this method will complete with the same error. | 2637 * this method will complete with the same error. |
2647 */ | 2638 */ |
2648 async.Future<User> insert(User request) { | 2639 async.Future<User> insert(User request) { |
2649 var _url = null; | 2640 var _url = null; |
2650 var _queryParams = new core.Map(); | 2641 var _queryParams = new core.Map(); |
2651 var _uploadMedia = null; | 2642 var _uploadMedia = null; |
2652 var _uploadOptions = null; | 2643 var _uploadOptions = null; |
2653 var _downloadOptions = common.DownloadOptions.Metadata; | 2644 var _downloadOptions = commons.DownloadOptions.Metadata; |
2654 var _body = null; | 2645 var _body = null; |
2655 | 2646 |
2656 if (request != null) { | 2647 if (request != null) { |
2657 _body = convert.JSON.encode((request).toJson()); | 2648 _body = convert.JSON.encode((request).toJson()); |
2658 } | 2649 } |
2659 | 2650 |
2660 | 2651 |
2661 _url = 'users'; | 2652 _url = 'users'; |
2662 | 2653 |
2663 var _response = _requester.request(_url, | 2654 var _response = _requester.request(_url, |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2725 * - "DESCENDING" : Descending order. | 2716 * - "DESCENDING" : Descending order. |
2726 * | 2717 * |
2727 * [viewType] - Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the | 2718 * [viewType] - Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the |
2728 * user. | 2719 * user. |
2729 * Possible string values are: | 2720 * Possible string values are: |
2730 * - "admin_view" : Fetches the ADMIN_VIEW of the user. | 2721 * - "admin_view" : Fetches the ADMIN_VIEW of the user. |
2731 * - "domain_public" : Fetches the DOMAIN_PUBLIC view of the user. | 2722 * - "domain_public" : Fetches the DOMAIN_PUBLIC view of the user. |
2732 * | 2723 * |
2733 * Completes with a [Users]. | 2724 * Completes with a [Users]. |
2734 * | 2725 * |
2735 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 2726 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2736 * error. | 2727 * error. |
2737 * | 2728 * |
2738 * If the used [http.Client] completes with an error when making a REST call, | 2729 * If the used [http.Client] completes with an error when making a REST call, |
2739 * this method will complete with the same error. | 2730 * this method will complete with the same error. |
2740 */ | 2731 */ |
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}) { | 2732 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}) { |
2742 var _url = null; | 2733 var _url = null; |
2743 var _queryParams = new core.Map(); | 2734 var _queryParams = new core.Map(); |
2744 var _uploadMedia = null; | 2735 var _uploadMedia = null; |
2745 var _uploadOptions = null; | 2736 var _uploadOptions = null; |
2746 var _downloadOptions = common.DownloadOptions.Metadata; | 2737 var _downloadOptions = commons.DownloadOptions.Metadata; |
2747 var _body = null; | 2738 var _body = null; |
2748 | 2739 |
2749 if (customFieldMask != null) { | 2740 if (customFieldMask != null) { |
2750 _queryParams["customFieldMask"] = [customFieldMask]; | 2741 _queryParams["customFieldMask"] = [customFieldMask]; |
2751 } | 2742 } |
2752 if (customer != null) { | 2743 if (customer != null) { |
2753 _queryParams["customer"] = [customer]; | 2744 _queryParams["customer"] = [customer]; |
2754 } | 2745 } |
2755 if (domain != null) { | 2746 if (domain != null) { |
2756 _queryParams["domain"] = [domain]; | 2747 _queryParams["domain"] = [domain]; |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2798 | 2789 |
2799 /** | 2790 /** |
2800 * change admin status of a user | 2791 * change admin status of a user |
2801 * | 2792 * |
2802 * [request] - The metadata request object. | 2793 * [request] - The metadata request object. |
2803 * | 2794 * |
2804 * Request parameters: | 2795 * Request parameters: |
2805 * | 2796 * |
2806 * [userKey] - Email or immutable Id of the user as admin | 2797 * [userKey] - Email or immutable Id of the user as admin |
2807 * | 2798 * |
2808 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 2799 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2809 * error. | 2800 * error. |
2810 * | 2801 * |
2811 * If the used [http.Client] completes with an error when making a REST call, | 2802 * If the used [http.Client] completes with an error when making a REST call, |
2812 * this method will complete with the same error. | 2803 * this method will complete with the same error. |
2813 */ | 2804 */ |
2814 async.Future makeAdmin(UserMakeAdmin request, core.String userKey) { | 2805 async.Future makeAdmin(UserMakeAdmin request, core.String userKey) { |
2815 var _url = null; | 2806 var _url = null; |
2816 var _queryParams = new core.Map(); | 2807 var _queryParams = new core.Map(); |
2817 var _uploadMedia = null; | 2808 var _uploadMedia = null; |
2818 var _uploadOptions = null; | 2809 var _uploadOptions = null; |
2819 var _downloadOptions = common.DownloadOptions.Metadata; | 2810 var _downloadOptions = commons.DownloadOptions.Metadata; |
2820 var _body = null; | 2811 var _body = null; |
2821 | 2812 |
2822 if (request != null) { | 2813 if (request != null) { |
2823 _body = convert.JSON.encode((request).toJson()); | 2814 _body = convert.JSON.encode((request).toJson()); |
2824 } | 2815 } |
2825 if (userKey == null) { | 2816 if (userKey == null) { |
2826 throw new core.ArgumentError("Parameter userKey is required."); | 2817 throw new core.ArgumentError("Parameter userKey is required."); |
2827 } | 2818 } |
2828 | 2819 |
2829 _downloadOptions = null; | 2820 _downloadOptions = null; |
2830 | 2821 |
2831 _url = 'users/' + common_internal.Escaper.ecapeVariable('$userKey') + '/make
Admin'; | 2822 _url = 'users/' + commons.Escaper.ecapeVariable('$userKey') + '/makeAdmin'; |
2832 | 2823 |
2833 var _response = _requester.request(_url, | 2824 var _response = _requester.request(_url, |
2834 "POST", | 2825 "POST", |
2835 body: _body, | 2826 body: _body, |
2836 queryParams: _queryParams, | 2827 queryParams: _queryParams, |
2837 uploadOptions: _uploadOptions, | 2828 uploadOptions: _uploadOptions, |
2838 uploadMedia: _uploadMedia, | 2829 uploadMedia: _uploadMedia, |
2839 downloadOptions: _downloadOptions); | 2830 downloadOptions: _downloadOptions); |
2840 return _response.then((data) => null); | 2831 return _response.then((data) => null); |
2841 } | 2832 } |
2842 | 2833 |
2843 /** | 2834 /** |
2844 * update user. This method supports patch semantics. | 2835 * update user. This method supports patch semantics. |
2845 * | 2836 * |
2846 * [request] - The metadata request object. | 2837 * [request] - The metadata request object. |
2847 * | 2838 * |
2848 * Request parameters: | 2839 * Request parameters: |
2849 * | 2840 * |
2850 * [userKey] - Email or immutable Id of the user. If Id, it should match with | 2841 * [userKey] - Email or immutable Id of the user. If Id, it should match with |
2851 * id of user object | 2842 * id of user object |
2852 * | 2843 * |
2853 * Completes with a [User]. | 2844 * Completes with a [User]. |
2854 * | 2845 * |
2855 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 2846 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2856 * error. | 2847 * error. |
2857 * | 2848 * |
2858 * If the used [http.Client] completes with an error when making a REST call, | 2849 * If the used [http.Client] completes with an error when making a REST call, |
2859 * this method will complete with the same error. | 2850 * this method will complete with the same error. |
2860 */ | 2851 */ |
2861 async.Future<User> patch(User request, core.String userKey) { | 2852 async.Future<User> patch(User request, core.String userKey) { |
2862 var _url = null; | 2853 var _url = null; |
2863 var _queryParams = new core.Map(); | 2854 var _queryParams = new core.Map(); |
2864 var _uploadMedia = null; | 2855 var _uploadMedia = null; |
2865 var _uploadOptions = null; | 2856 var _uploadOptions = null; |
2866 var _downloadOptions = common.DownloadOptions.Metadata; | 2857 var _downloadOptions = commons.DownloadOptions.Metadata; |
2867 var _body = null; | 2858 var _body = null; |
2868 | 2859 |
2869 if (request != null) { | 2860 if (request != null) { |
2870 _body = convert.JSON.encode((request).toJson()); | 2861 _body = convert.JSON.encode((request).toJson()); |
2871 } | 2862 } |
2872 if (userKey == null) { | 2863 if (userKey == null) { |
2873 throw new core.ArgumentError("Parameter userKey is required."); | 2864 throw new core.ArgumentError("Parameter userKey is required."); |
2874 } | 2865 } |
2875 | 2866 |
2876 | 2867 |
2877 _url = 'users/' + common_internal.Escaper.ecapeVariable('$userKey'); | 2868 _url = 'users/' + commons.Escaper.ecapeVariable('$userKey'); |
2878 | 2869 |
2879 var _response = _requester.request(_url, | 2870 var _response = _requester.request(_url, |
2880 "PATCH", | 2871 "PATCH", |
2881 body: _body, | 2872 body: _body, |
2882 queryParams: _queryParams, | 2873 queryParams: _queryParams, |
2883 uploadOptions: _uploadOptions, | 2874 uploadOptions: _uploadOptions, |
2884 uploadMedia: _uploadMedia, | 2875 uploadMedia: _uploadMedia, |
2885 downloadOptions: _downloadOptions); | 2876 downloadOptions: _downloadOptions); |
2886 return _response.then((data) => new User.fromJson(data)); | 2877 return _response.then((data) => new User.fromJson(data)); |
2887 } | 2878 } |
2888 | 2879 |
2889 /** | 2880 /** |
2890 * Undelete a deleted user | 2881 * Undelete a deleted user |
2891 * | 2882 * |
2892 * [request] - The metadata request object. | 2883 * [request] - The metadata request object. |
2893 * | 2884 * |
2894 * Request parameters: | 2885 * Request parameters: |
2895 * | 2886 * |
2896 * [userKey] - The immutable id of the user | 2887 * [userKey] - The immutable id of the user |
2897 * | 2888 * |
2898 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 2889 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2899 * error. | 2890 * error. |
2900 * | 2891 * |
2901 * If the used [http.Client] completes with an error when making a REST call, | 2892 * If the used [http.Client] completes with an error when making a REST call, |
2902 * this method will complete with the same error. | 2893 * this method will complete with the same error. |
2903 */ | 2894 */ |
2904 async.Future undelete(UserUndelete request, core.String userKey) { | 2895 async.Future undelete(UserUndelete request, core.String userKey) { |
2905 var _url = null; | 2896 var _url = null; |
2906 var _queryParams = new core.Map(); | 2897 var _queryParams = new core.Map(); |
2907 var _uploadMedia = null; | 2898 var _uploadMedia = null; |
2908 var _uploadOptions = null; | 2899 var _uploadOptions = null; |
2909 var _downloadOptions = common.DownloadOptions.Metadata; | 2900 var _downloadOptions = commons.DownloadOptions.Metadata; |
2910 var _body = null; | 2901 var _body = null; |
2911 | 2902 |
2912 if (request != null) { | 2903 if (request != null) { |
2913 _body = convert.JSON.encode((request).toJson()); | 2904 _body = convert.JSON.encode((request).toJson()); |
2914 } | 2905 } |
2915 if (userKey == null) { | 2906 if (userKey == null) { |
2916 throw new core.ArgumentError("Parameter userKey is required."); | 2907 throw new core.ArgumentError("Parameter userKey is required."); |
2917 } | 2908 } |
2918 | 2909 |
2919 _downloadOptions = null; | 2910 _downloadOptions = null; |
2920 | 2911 |
2921 _url = 'users/' + common_internal.Escaper.ecapeVariable('$userKey') + '/unde
lete'; | 2912 _url = 'users/' + commons.Escaper.ecapeVariable('$userKey') + '/undelete'; |
2922 | 2913 |
2923 var _response = _requester.request(_url, | 2914 var _response = _requester.request(_url, |
2924 "POST", | 2915 "POST", |
2925 body: _body, | 2916 body: _body, |
2926 queryParams: _queryParams, | 2917 queryParams: _queryParams, |
2927 uploadOptions: _uploadOptions, | 2918 uploadOptions: _uploadOptions, |
2928 uploadMedia: _uploadMedia, | 2919 uploadMedia: _uploadMedia, |
2929 downloadOptions: _downloadOptions); | 2920 downloadOptions: _downloadOptions); |
2930 return _response.then((data) => null); | 2921 return _response.then((data) => null); |
2931 } | 2922 } |
2932 | 2923 |
2933 /** | 2924 /** |
2934 * update user | 2925 * update user |
2935 * | 2926 * |
2936 * [request] - The metadata request object. | 2927 * [request] - The metadata request object. |
2937 * | 2928 * |
2938 * Request parameters: | 2929 * Request parameters: |
2939 * | 2930 * |
2940 * [userKey] - Email or immutable Id of the user. If Id, it should match with | 2931 * [userKey] - Email or immutable Id of the user. If Id, it should match with |
2941 * id of user object | 2932 * id of user object |
2942 * | 2933 * |
2943 * Completes with a [User]. | 2934 * Completes with a [User]. |
2944 * | 2935 * |
2945 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 2936 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2946 * error. | 2937 * error. |
2947 * | 2938 * |
2948 * If the used [http.Client] completes with an error when making a REST call, | 2939 * If the used [http.Client] completes with an error when making a REST call, |
2949 * this method will complete with the same error. | 2940 * this method will complete with the same error. |
2950 */ | 2941 */ |
2951 async.Future<User> update(User request, core.String userKey) { | 2942 async.Future<User> update(User request, core.String userKey) { |
2952 var _url = null; | 2943 var _url = null; |
2953 var _queryParams = new core.Map(); | 2944 var _queryParams = new core.Map(); |
2954 var _uploadMedia = null; | 2945 var _uploadMedia = null; |
2955 var _uploadOptions = null; | 2946 var _uploadOptions = null; |
2956 var _downloadOptions = common.DownloadOptions.Metadata; | 2947 var _downloadOptions = commons.DownloadOptions.Metadata; |
2957 var _body = null; | 2948 var _body = null; |
2958 | 2949 |
2959 if (request != null) { | 2950 if (request != null) { |
2960 _body = convert.JSON.encode((request).toJson()); | 2951 _body = convert.JSON.encode((request).toJson()); |
2961 } | 2952 } |
2962 if (userKey == null) { | 2953 if (userKey == null) { |
2963 throw new core.ArgumentError("Parameter userKey is required."); | 2954 throw new core.ArgumentError("Parameter userKey is required."); |
2964 } | 2955 } |
2965 | 2956 |
2966 | 2957 |
2967 _url = 'users/' + common_internal.Escaper.ecapeVariable('$userKey'); | 2958 _url = 'users/' + commons.Escaper.ecapeVariable('$userKey'); |
2968 | 2959 |
2969 var _response = _requester.request(_url, | 2960 var _response = _requester.request(_url, |
2970 "PUT", | 2961 "PUT", |
2971 body: _body, | 2962 body: _body, |
2972 queryParams: _queryParams, | 2963 queryParams: _queryParams, |
2973 uploadOptions: _uploadOptions, | 2964 uploadOptions: _uploadOptions, |
2974 uploadMedia: _uploadMedia, | 2965 uploadMedia: _uploadMedia, |
2975 downloadOptions: _downloadOptions); | 2966 downloadOptions: _downloadOptions); |
2976 return _response.then((data) => new User.fromJson(data)); | 2967 return _response.then((data) => new User.fromJson(data)); |
2977 } | 2968 } |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3033 * - "DESCENDING" : Descending order. | 3024 * - "DESCENDING" : Descending order. |
3034 * | 3025 * |
3035 * [viewType] - Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the | 3026 * [viewType] - Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the |
3036 * user. | 3027 * user. |
3037 * Possible string values are: | 3028 * Possible string values are: |
3038 * - "admin_view" : Fetches the ADMIN_VIEW of the user. | 3029 * - "admin_view" : Fetches the ADMIN_VIEW of the user. |
3039 * - "domain_public" : Fetches the DOMAIN_PUBLIC view of the user. | 3030 * - "domain_public" : Fetches the DOMAIN_PUBLIC view of the user. |
3040 * | 3031 * |
3041 * Completes with a [Channel]. | 3032 * Completes with a [Channel]. |
3042 * | 3033 * |
3043 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 3034 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
3044 * error. | 3035 * error. |
3045 * | 3036 * |
3046 * If the used [http.Client] completes with an error when making a REST call, | 3037 * If the used [http.Client] completes with an error when making a REST call, |
3047 * this method will complete with the same error. | 3038 * this method will complete with the same error. |
3048 */ | 3039 */ |
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}) { | 3040 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}) { |
3050 var _url = null; | 3041 var _url = null; |
3051 var _queryParams = new core.Map(); | 3042 var _queryParams = new core.Map(); |
3052 var _uploadMedia = null; | 3043 var _uploadMedia = null; |
3053 var _uploadOptions = null; | 3044 var _uploadOptions = null; |
3054 var _downloadOptions = common.DownloadOptions.Metadata; | 3045 var _downloadOptions = commons.DownloadOptions.Metadata; |
3055 var _body = null; | 3046 var _body = null; |
3056 | 3047 |
3057 if (request != null) { | 3048 if (request != null) { |
3058 _body = convert.JSON.encode((request).toJson()); | 3049 _body = convert.JSON.encode((request).toJson()); |
3059 } | 3050 } |
3060 if (customFieldMask != null) { | 3051 if (customFieldMask != null) { |
3061 _queryParams["customFieldMask"] = [customFieldMask]; | 3052 _queryParams["customFieldMask"] = [customFieldMask]; |
3062 } | 3053 } |
3063 if (customer != null) { | 3054 if (customer != null) { |
3064 _queryParams["customer"] = [customer]; | 3055 _queryParams["customer"] = [customer]; |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3103 queryParams: _queryParams, | 3094 queryParams: _queryParams, |
3104 uploadOptions: _uploadOptions, | 3095 uploadOptions: _uploadOptions, |
3105 uploadMedia: _uploadMedia, | 3096 uploadMedia: _uploadMedia, |
3106 downloadOptions: _downloadOptions); | 3097 downloadOptions: _downloadOptions); |
3107 return _response.then((data) => new Channel.fromJson(data)); | 3098 return _response.then((data) => new Channel.fromJson(data)); |
3108 } | 3099 } |
3109 | 3100 |
3110 } | 3101 } |
3111 | 3102 |
3112 | 3103 |
3113 /** Not documented yet. */ | |
3114 class UsersAliasesResourceApi { | 3104 class UsersAliasesResourceApi { |
3115 final common_internal.ApiRequester _requester; | 3105 final commons.ApiRequester _requester; |
3116 | 3106 |
3117 UsersAliasesResourceApi(common_internal.ApiRequester client) : | 3107 UsersAliasesResourceApi(commons.ApiRequester client) : |
3118 _requester = client; | 3108 _requester = client; |
3119 | 3109 |
3120 /** | 3110 /** |
3121 * Remove a alias for the user | 3111 * Remove a alias for the user |
3122 * | 3112 * |
3123 * Request parameters: | 3113 * Request parameters: |
3124 * | 3114 * |
3125 * [userKey] - Email or immutable Id of the user | 3115 * [userKey] - Email or immutable Id of the user |
3126 * | 3116 * |
3127 * [alias] - The alias to be removed | 3117 * [alias] - The alias to be removed |
3128 * | 3118 * |
3129 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 3119 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
3130 * error. | 3120 * error. |
3131 * | 3121 * |
3132 * If the used [http.Client] completes with an error when making a REST call, | 3122 * If the used [http.Client] completes with an error when making a REST call, |
3133 * this method will complete with the same error. | 3123 * this method will complete with the same error. |
3134 */ | 3124 */ |
3135 async.Future delete(core.String userKey, core.String alias) { | 3125 async.Future delete(core.String userKey, core.String alias) { |
3136 var _url = null; | 3126 var _url = null; |
3137 var _queryParams = new core.Map(); | 3127 var _queryParams = new core.Map(); |
3138 var _uploadMedia = null; | 3128 var _uploadMedia = null; |
3139 var _uploadOptions = null; | 3129 var _uploadOptions = null; |
3140 var _downloadOptions = common.DownloadOptions.Metadata; | 3130 var _downloadOptions = commons.DownloadOptions.Metadata; |
3141 var _body = null; | 3131 var _body = null; |
3142 | 3132 |
3143 if (userKey == null) { | 3133 if (userKey == null) { |
3144 throw new core.ArgumentError("Parameter userKey is required."); | 3134 throw new core.ArgumentError("Parameter userKey is required."); |
3145 } | 3135 } |
3146 if (alias == null) { | 3136 if (alias == null) { |
3147 throw new core.ArgumentError("Parameter alias is required."); | 3137 throw new core.ArgumentError("Parameter alias is required."); |
3148 } | 3138 } |
3149 | 3139 |
3150 _downloadOptions = null; | 3140 _downloadOptions = null; |
3151 | 3141 |
3152 _url = 'users/' + common_internal.Escaper.ecapeVariable('$userKey') + '/alia
ses/' + common_internal.Escaper.ecapeVariable('$alias'); | 3142 _url = 'users/' + commons.Escaper.ecapeVariable('$userKey') + '/aliases/' +
commons.Escaper.ecapeVariable('$alias'); |
3153 | 3143 |
3154 var _response = _requester.request(_url, | 3144 var _response = _requester.request(_url, |
3155 "DELETE", | 3145 "DELETE", |
3156 body: _body, | 3146 body: _body, |
3157 queryParams: _queryParams, | 3147 queryParams: _queryParams, |
3158 uploadOptions: _uploadOptions, | 3148 uploadOptions: _uploadOptions, |
3159 uploadMedia: _uploadMedia, | 3149 uploadMedia: _uploadMedia, |
3160 downloadOptions: _downloadOptions); | 3150 downloadOptions: _downloadOptions); |
3161 return _response.then((data) => null); | 3151 return _response.then((data) => null); |
3162 } | 3152 } |
3163 | 3153 |
3164 /** | 3154 /** |
3165 * Add a alias for the user | 3155 * Add a alias for the user |
3166 * | 3156 * |
3167 * [request] - The metadata request object. | 3157 * [request] - The metadata request object. |
3168 * | 3158 * |
3169 * Request parameters: | 3159 * Request parameters: |
3170 * | 3160 * |
3171 * [userKey] - Email or immutable Id of the user | 3161 * [userKey] - Email or immutable Id of the user |
3172 * | 3162 * |
3173 * Completes with a [Alias]. | 3163 * Completes with a [Alias]. |
3174 * | 3164 * |
3175 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 3165 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
3176 * error. | 3166 * error. |
3177 * | 3167 * |
3178 * If the used [http.Client] completes with an error when making a REST call, | 3168 * If the used [http.Client] completes with an error when making a REST call, |
3179 * this method will complete with the same error. | 3169 * this method will complete with the same error. |
3180 */ | 3170 */ |
3181 async.Future<Alias> insert(Alias request, core.String userKey) { | 3171 async.Future<Alias> insert(Alias request, core.String userKey) { |
3182 var _url = null; | 3172 var _url = null; |
3183 var _queryParams = new core.Map(); | 3173 var _queryParams = new core.Map(); |
3184 var _uploadMedia = null; | 3174 var _uploadMedia = null; |
3185 var _uploadOptions = null; | 3175 var _uploadOptions = null; |
3186 var _downloadOptions = common.DownloadOptions.Metadata; | 3176 var _downloadOptions = commons.DownloadOptions.Metadata; |
3187 var _body = null; | 3177 var _body = null; |
3188 | 3178 |
3189 if (request != null) { | 3179 if (request != null) { |
3190 _body = convert.JSON.encode((request).toJson()); | 3180 _body = convert.JSON.encode((request).toJson()); |
3191 } | 3181 } |
3192 if (userKey == null) { | 3182 if (userKey == null) { |
3193 throw new core.ArgumentError("Parameter userKey is required."); | 3183 throw new core.ArgumentError("Parameter userKey is required."); |
3194 } | 3184 } |
3195 | 3185 |
3196 | 3186 |
3197 _url = 'users/' + common_internal.Escaper.ecapeVariable('$userKey') + '/alia
ses'; | 3187 _url = 'users/' + commons.Escaper.ecapeVariable('$userKey') + '/aliases'; |
3198 | 3188 |
3199 var _response = _requester.request(_url, | 3189 var _response = _requester.request(_url, |
3200 "POST", | 3190 "POST", |
3201 body: _body, | 3191 body: _body, |
3202 queryParams: _queryParams, | 3192 queryParams: _queryParams, |
3203 uploadOptions: _uploadOptions, | 3193 uploadOptions: _uploadOptions, |
3204 uploadMedia: _uploadMedia, | 3194 uploadMedia: _uploadMedia, |
3205 downloadOptions: _downloadOptions); | 3195 downloadOptions: _downloadOptions); |
3206 return _response.then((data) => new Alias.fromJson(data)); | 3196 return _response.then((data) => new Alias.fromJson(data)); |
3207 } | 3197 } |
3208 | 3198 |
3209 /** | 3199 /** |
3210 * List all aliases for a user | 3200 * List all aliases for a user |
3211 * | 3201 * |
3212 * Request parameters: | 3202 * Request parameters: |
3213 * | 3203 * |
3214 * [userKey] - Email or immutable Id of the user | 3204 * [userKey] - Email or immutable Id of the user |
3215 * | 3205 * |
3216 * [event] - Event on which subscription is intended (if subscribing) | 3206 * [event] - Event on which subscription is intended (if subscribing) |
3217 * Possible string values are: | 3207 * Possible string values are: |
3218 * - "add" : Alias Created Event | 3208 * - "add" : Alias Created Event |
3219 * - "delete" : Alias Deleted Event | 3209 * - "delete" : Alias Deleted Event |
3220 * | 3210 * |
3221 * Completes with a [Aliases]. | 3211 * Completes with a [Aliases]. |
3222 * | 3212 * |
3223 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 3213 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
3224 * error. | 3214 * error. |
3225 * | 3215 * |
3226 * If the used [http.Client] completes with an error when making a REST call, | 3216 * If the used [http.Client] completes with an error when making a REST call, |
3227 * this method will complete with the same error. | 3217 * this method will complete with the same error. |
3228 */ | 3218 */ |
3229 async.Future<Aliases> list(core.String userKey, {core.String event}) { | 3219 async.Future<Aliases> list(core.String userKey, {core.String event}) { |
3230 var _url = null; | 3220 var _url = null; |
3231 var _queryParams = new core.Map(); | 3221 var _queryParams = new core.Map(); |
3232 var _uploadMedia = null; | 3222 var _uploadMedia = null; |
3233 var _uploadOptions = null; | 3223 var _uploadOptions = null; |
3234 var _downloadOptions = common.DownloadOptions.Metadata; | 3224 var _downloadOptions = commons.DownloadOptions.Metadata; |
3235 var _body = null; | 3225 var _body = null; |
3236 | 3226 |
3237 if (userKey == null) { | 3227 if (userKey == null) { |
3238 throw new core.ArgumentError("Parameter userKey is required."); | 3228 throw new core.ArgumentError("Parameter userKey is required."); |
3239 } | 3229 } |
3240 if (event != null) { | 3230 if (event != null) { |
3241 _queryParams["event"] = [event]; | 3231 _queryParams["event"] = [event]; |
3242 } | 3232 } |
3243 | 3233 |
3244 | 3234 |
3245 _url = 'users/' + common_internal.Escaper.ecapeVariable('$userKey') + '/alia
ses'; | 3235 _url = 'users/' + commons.Escaper.ecapeVariable('$userKey') + '/aliases'; |
3246 | 3236 |
3247 var _response = _requester.request(_url, | 3237 var _response = _requester.request(_url, |
3248 "GET", | 3238 "GET", |
3249 body: _body, | 3239 body: _body, |
3250 queryParams: _queryParams, | 3240 queryParams: _queryParams, |
3251 uploadOptions: _uploadOptions, | 3241 uploadOptions: _uploadOptions, |
3252 uploadMedia: _uploadMedia, | 3242 uploadMedia: _uploadMedia, |
3253 downloadOptions: _downloadOptions); | 3243 downloadOptions: _downloadOptions); |
3254 return _response.then((data) => new Aliases.fromJson(data)); | 3244 return _response.then((data) => new Aliases.fromJson(data)); |
3255 } | 3245 } |
3256 | 3246 |
3257 /** | 3247 /** |
3258 * Watch for changes in user aliases list | 3248 * Watch for changes in user aliases list |
3259 * | 3249 * |
3260 * [request] - The metadata request object. | 3250 * [request] - The metadata request object. |
3261 * | 3251 * |
3262 * Request parameters: | 3252 * Request parameters: |
3263 * | 3253 * |
3264 * [userKey] - Email or immutable Id of the user | 3254 * [userKey] - Email or immutable Id of the user |
3265 * | 3255 * |
3266 * [event] - Event on which subscription is intended (if subscribing) | 3256 * [event] - Event on which subscription is intended (if subscribing) |
3267 * Possible string values are: | 3257 * Possible string values are: |
3268 * - "add" : Alias Created Event | 3258 * - "add" : Alias Created Event |
3269 * - "delete" : Alias Deleted Event | 3259 * - "delete" : Alias Deleted Event |
3270 * | 3260 * |
3271 * Completes with a [Channel]. | 3261 * Completes with a [Channel]. |
3272 * | 3262 * |
3273 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 3263 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
3274 * error. | 3264 * error. |
3275 * | 3265 * |
3276 * If the used [http.Client] completes with an error when making a REST call, | 3266 * If the used [http.Client] completes with an error when making a REST call, |
3277 * this method will complete with the same error. | 3267 * this method will complete with the same error. |
3278 */ | 3268 */ |
3279 async.Future<Channel> watch(Channel request, core.String userKey, {core.String
event}) { | 3269 async.Future<Channel> watch(Channel request, core.String userKey, {core.String
event}) { |
3280 var _url = null; | 3270 var _url = null; |
3281 var _queryParams = new core.Map(); | 3271 var _queryParams = new core.Map(); |
3282 var _uploadMedia = null; | 3272 var _uploadMedia = null; |
3283 var _uploadOptions = null; | 3273 var _uploadOptions = null; |
3284 var _downloadOptions = common.DownloadOptions.Metadata; | 3274 var _downloadOptions = commons.DownloadOptions.Metadata; |
3285 var _body = null; | 3275 var _body = null; |
3286 | 3276 |
3287 if (request != null) { | 3277 if (request != null) { |
3288 _body = convert.JSON.encode((request).toJson()); | 3278 _body = convert.JSON.encode((request).toJson()); |
3289 } | 3279 } |
3290 if (userKey == null) { | 3280 if (userKey == null) { |
3291 throw new core.ArgumentError("Parameter userKey is required."); | 3281 throw new core.ArgumentError("Parameter userKey is required."); |
3292 } | 3282 } |
3293 if (event != null) { | 3283 if (event != null) { |
3294 _queryParams["event"] = [event]; | 3284 _queryParams["event"] = [event]; |
3295 } | 3285 } |
3296 | 3286 |
3297 | 3287 |
3298 _url = 'users/' + common_internal.Escaper.ecapeVariable('$userKey') + '/alia
ses/watch'; | 3288 _url = 'users/' + commons.Escaper.ecapeVariable('$userKey') + '/aliases/watc
h'; |
3299 | 3289 |
3300 var _response = _requester.request(_url, | 3290 var _response = _requester.request(_url, |
3301 "POST", | 3291 "POST", |
3302 body: _body, | 3292 body: _body, |
3303 queryParams: _queryParams, | 3293 queryParams: _queryParams, |
3304 uploadOptions: _uploadOptions, | 3294 uploadOptions: _uploadOptions, |
3305 uploadMedia: _uploadMedia, | 3295 uploadMedia: _uploadMedia, |
3306 downloadOptions: _downloadOptions); | 3296 downloadOptions: _downloadOptions); |
3307 return _response.then((data) => new Channel.fromJson(data)); | 3297 return _response.then((data) => new Channel.fromJson(data)); |
3308 } | 3298 } |
3309 | 3299 |
3310 } | 3300 } |
3311 | 3301 |
3312 | 3302 |
3313 /** Not documented yet. */ | |
3314 class UsersPhotosResourceApi { | 3303 class UsersPhotosResourceApi { |
3315 final common_internal.ApiRequester _requester; | 3304 final commons.ApiRequester _requester; |
3316 | 3305 |
3317 UsersPhotosResourceApi(common_internal.ApiRequester client) : | 3306 UsersPhotosResourceApi(commons.ApiRequester client) : |
3318 _requester = client; | 3307 _requester = client; |
3319 | 3308 |
3320 /** | 3309 /** |
3321 * Remove photos for the user | 3310 * Remove photos for the user |
3322 * | 3311 * |
3323 * Request parameters: | 3312 * Request parameters: |
3324 * | 3313 * |
3325 * [userKey] - Email or immutable Id of the user | 3314 * [userKey] - Email or immutable Id of the user |
3326 * | 3315 * |
3327 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 3316 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
3328 * error. | 3317 * error. |
3329 * | 3318 * |
3330 * If the used [http.Client] completes with an error when making a REST call, | 3319 * If the used [http.Client] completes with an error when making a REST call, |
3331 * this method will complete with the same error. | 3320 * this method will complete with the same error. |
3332 */ | 3321 */ |
3333 async.Future delete(core.String userKey) { | 3322 async.Future delete(core.String userKey) { |
3334 var _url = null; | 3323 var _url = null; |
3335 var _queryParams = new core.Map(); | 3324 var _queryParams = new core.Map(); |
3336 var _uploadMedia = null; | 3325 var _uploadMedia = null; |
3337 var _uploadOptions = null; | 3326 var _uploadOptions = null; |
3338 var _downloadOptions = common.DownloadOptions.Metadata; | 3327 var _downloadOptions = commons.DownloadOptions.Metadata; |
3339 var _body = null; | 3328 var _body = null; |
3340 | 3329 |
3341 if (userKey == null) { | 3330 if (userKey == null) { |
3342 throw new core.ArgumentError("Parameter userKey is required."); | 3331 throw new core.ArgumentError("Parameter userKey is required."); |
3343 } | 3332 } |
3344 | 3333 |
3345 _downloadOptions = null; | 3334 _downloadOptions = null; |
3346 | 3335 |
3347 _url = 'users/' + common_internal.Escaper.ecapeVariable('$userKey') + '/phot
os/thumbnail'; | 3336 _url = 'users/' + commons.Escaper.ecapeVariable('$userKey') + '/photos/thumb
nail'; |
3348 | 3337 |
3349 var _response = _requester.request(_url, | 3338 var _response = _requester.request(_url, |
3350 "DELETE", | 3339 "DELETE", |
3351 body: _body, | 3340 body: _body, |
3352 queryParams: _queryParams, | 3341 queryParams: _queryParams, |
3353 uploadOptions: _uploadOptions, | 3342 uploadOptions: _uploadOptions, |
3354 uploadMedia: _uploadMedia, | 3343 uploadMedia: _uploadMedia, |
3355 downloadOptions: _downloadOptions); | 3344 downloadOptions: _downloadOptions); |
3356 return _response.then((data) => null); | 3345 return _response.then((data) => null); |
3357 } | 3346 } |
3358 | 3347 |
3359 /** | 3348 /** |
3360 * Retrieve photo of a user | 3349 * Retrieve photo of a user |
3361 * | 3350 * |
3362 * Request parameters: | 3351 * Request parameters: |
3363 * | 3352 * |
3364 * [userKey] - Email or immutable Id of the user | 3353 * [userKey] - Email or immutable Id of the user |
3365 * | 3354 * |
3366 * Completes with a [UserPhoto]. | 3355 * Completes with a [UserPhoto]. |
3367 * | 3356 * |
3368 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 3357 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
3369 * error. | 3358 * error. |
3370 * | 3359 * |
3371 * If the used [http.Client] completes with an error when making a REST call, | 3360 * If the used [http.Client] completes with an error when making a REST call, |
3372 * this method will complete with the same error. | 3361 * this method will complete with the same error. |
3373 */ | 3362 */ |
3374 async.Future<UserPhoto> get(core.String userKey) { | 3363 async.Future<UserPhoto> get(core.String userKey) { |
3375 var _url = null; | 3364 var _url = null; |
3376 var _queryParams = new core.Map(); | 3365 var _queryParams = new core.Map(); |
3377 var _uploadMedia = null; | 3366 var _uploadMedia = null; |
3378 var _uploadOptions = null; | 3367 var _uploadOptions = null; |
3379 var _downloadOptions = common.DownloadOptions.Metadata; | 3368 var _downloadOptions = commons.DownloadOptions.Metadata; |
3380 var _body = null; | 3369 var _body = null; |
3381 | 3370 |
3382 if (userKey == null) { | 3371 if (userKey == null) { |
3383 throw new core.ArgumentError("Parameter userKey is required."); | 3372 throw new core.ArgumentError("Parameter userKey is required."); |
3384 } | 3373 } |
3385 | 3374 |
3386 | 3375 |
3387 _url = 'users/' + common_internal.Escaper.ecapeVariable('$userKey') + '/phot
os/thumbnail'; | 3376 _url = 'users/' + commons.Escaper.ecapeVariable('$userKey') + '/photos/thumb
nail'; |
3388 | 3377 |
3389 var _response = _requester.request(_url, | 3378 var _response = _requester.request(_url, |
3390 "GET", | 3379 "GET", |
3391 body: _body, | 3380 body: _body, |
3392 queryParams: _queryParams, | 3381 queryParams: _queryParams, |
3393 uploadOptions: _uploadOptions, | 3382 uploadOptions: _uploadOptions, |
3394 uploadMedia: _uploadMedia, | 3383 uploadMedia: _uploadMedia, |
3395 downloadOptions: _downloadOptions); | 3384 downloadOptions: _downloadOptions); |
3396 return _response.then((data) => new UserPhoto.fromJson(data)); | 3385 return _response.then((data) => new UserPhoto.fromJson(data)); |
3397 } | 3386 } |
3398 | 3387 |
3399 /** | 3388 /** |
3400 * Add a photo for the user. This method supports patch semantics. | 3389 * Add a photo for the user. This method supports patch semantics. |
3401 * | 3390 * |
3402 * [request] - The metadata request object. | 3391 * [request] - The metadata request object. |
3403 * | 3392 * |
3404 * Request parameters: | 3393 * Request parameters: |
3405 * | 3394 * |
3406 * [userKey] - Email or immutable Id of the user | 3395 * [userKey] - Email or immutable Id of the user |
3407 * | 3396 * |
3408 * Completes with a [UserPhoto]. | 3397 * Completes with a [UserPhoto]. |
3409 * | 3398 * |
3410 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 3399 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
3411 * error. | 3400 * error. |
3412 * | 3401 * |
3413 * If the used [http.Client] completes with an error when making a REST call, | 3402 * If the used [http.Client] completes with an error when making a REST call, |
3414 * this method will complete with the same error. | 3403 * this method will complete with the same error. |
3415 */ | 3404 */ |
3416 async.Future<UserPhoto> patch(UserPhoto request, core.String userKey) { | 3405 async.Future<UserPhoto> patch(UserPhoto request, core.String userKey) { |
3417 var _url = null; | 3406 var _url = null; |
3418 var _queryParams = new core.Map(); | 3407 var _queryParams = new core.Map(); |
3419 var _uploadMedia = null; | 3408 var _uploadMedia = null; |
3420 var _uploadOptions = null; | 3409 var _uploadOptions = null; |
3421 var _downloadOptions = common.DownloadOptions.Metadata; | 3410 var _downloadOptions = commons.DownloadOptions.Metadata; |
3422 var _body = null; | 3411 var _body = null; |
3423 | 3412 |
3424 if (request != null) { | 3413 if (request != null) { |
3425 _body = convert.JSON.encode((request).toJson()); | 3414 _body = convert.JSON.encode((request).toJson()); |
3426 } | 3415 } |
3427 if (userKey == null) { | 3416 if (userKey == null) { |
3428 throw new core.ArgumentError("Parameter userKey is required."); | 3417 throw new core.ArgumentError("Parameter userKey is required."); |
3429 } | 3418 } |
3430 | 3419 |
3431 | 3420 |
3432 _url = 'users/' + common_internal.Escaper.ecapeVariable('$userKey') + '/phot
os/thumbnail'; | 3421 _url = 'users/' + commons.Escaper.ecapeVariable('$userKey') + '/photos/thumb
nail'; |
3433 | 3422 |
3434 var _response = _requester.request(_url, | 3423 var _response = _requester.request(_url, |
3435 "PATCH", | 3424 "PATCH", |
3436 body: _body, | 3425 body: _body, |
3437 queryParams: _queryParams, | 3426 queryParams: _queryParams, |
3438 uploadOptions: _uploadOptions, | 3427 uploadOptions: _uploadOptions, |
3439 uploadMedia: _uploadMedia, | 3428 uploadMedia: _uploadMedia, |
3440 downloadOptions: _downloadOptions); | 3429 downloadOptions: _downloadOptions); |
3441 return _response.then((data) => new UserPhoto.fromJson(data)); | 3430 return _response.then((data) => new UserPhoto.fromJson(data)); |
3442 } | 3431 } |
3443 | 3432 |
3444 /** | 3433 /** |
3445 * Add a photo for the user | 3434 * Add a photo for the user |
3446 * | 3435 * |
3447 * [request] - The metadata request object. | 3436 * [request] - The metadata request object. |
3448 * | 3437 * |
3449 * Request parameters: | 3438 * Request parameters: |
3450 * | 3439 * |
3451 * [userKey] - Email or immutable Id of the user | 3440 * [userKey] - Email or immutable Id of the user |
3452 * | 3441 * |
3453 * Completes with a [UserPhoto]. | 3442 * Completes with a [UserPhoto]. |
3454 * | 3443 * |
3455 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 3444 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
3456 * error. | 3445 * error. |
3457 * | 3446 * |
3458 * If the used [http.Client] completes with an error when making a REST call, | 3447 * If the used [http.Client] completes with an error when making a REST call, |
3459 * this method will complete with the same error. | 3448 * this method will complete with the same error. |
3460 */ | 3449 */ |
3461 async.Future<UserPhoto> update(UserPhoto request, core.String userKey) { | 3450 async.Future<UserPhoto> update(UserPhoto request, core.String userKey) { |
3462 var _url = null; | 3451 var _url = null; |
3463 var _queryParams = new core.Map(); | 3452 var _queryParams = new core.Map(); |
3464 var _uploadMedia = null; | 3453 var _uploadMedia = null; |
3465 var _uploadOptions = null; | 3454 var _uploadOptions = null; |
3466 var _downloadOptions = common.DownloadOptions.Metadata; | 3455 var _downloadOptions = commons.DownloadOptions.Metadata; |
3467 var _body = null; | 3456 var _body = null; |
3468 | 3457 |
3469 if (request != null) { | 3458 if (request != null) { |
3470 _body = convert.JSON.encode((request).toJson()); | 3459 _body = convert.JSON.encode((request).toJson()); |
3471 } | 3460 } |
3472 if (userKey == null) { | 3461 if (userKey == null) { |
3473 throw new core.ArgumentError("Parameter userKey is required."); | 3462 throw new core.ArgumentError("Parameter userKey is required."); |
3474 } | 3463 } |
3475 | 3464 |
3476 | 3465 |
3477 _url = 'users/' + common_internal.Escaper.ecapeVariable('$userKey') + '/phot
os/thumbnail'; | 3466 _url = 'users/' + commons.Escaper.ecapeVariable('$userKey') + '/photos/thumb
nail'; |
3478 | 3467 |
3479 var _response = _requester.request(_url, | 3468 var _response = _requester.request(_url, |
3480 "PUT", | 3469 "PUT", |
3481 body: _body, | 3470 body: _body, |
3482 queryParams: _queryParams, | 3471 queryParams: _queryParams, |
3483 uploadOptions: _uploadOptions, | 3472 uploadOptions: _uploadOptions, |
3484 uploadMedia: _uploadMedia, | 3473 uploadMedia: _uploadMedia, |
3485 downloadOptions: _downloadOptions); | 3474 downloadOptions: _downloadOptions); |
3486 return _response.then((data) => new UserPhoto.fromJson(data)); | 3475 return _response.then((data) => new UserPhoto.fromJson(data)); |
3487 } | 3476 } |
3488 | 3477 |
3489 } | 3478 } |
3490 | 3479 |
3491 | 3480 |
3492 /** Not documented yet. */ | |
3493 class VerificationCodesResourceApi { | 3481 class VerificationCodesResourceApi { |
3494 final common_internal.ApiRequester _requester; | 3482 final commons.ApiRequester _requester; |
3495 | 3483 |
3496 VerificationCodesResourceApi(common_internal.ApiRequester client) : | 3484 VerificationCodesResourceApi(commons.ApiRequester client) : |
3497 _requester = client; | 3485 _requester = client; |
3498 | 3486 |
3499 /** | 3487 /** |
3500 * Generate new backup verification codes for the user. | 3488 * Generate new backup verification codes for the user. |
3501 * | 3489 * |
3502 * Request parameters: | 3490 * Request parameters: |
3503 * | 3491 * |
3504 * [userKey] - Email or immutable Id of the user | 3492 * [userKey] - Email or immutable Id of the user |
3505 * | 3493 * |
3506 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 3494 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
3507 * error. | 3495 * error. |
3508 * | 3496 * |
3509 * If the used [http.Client] completes with an error when making a REST call, | 3497 * If the used [http.Client] completes with an error when making a REST call, |
3510 * this method will complete with the same error. | 3498 * this method will complete with the same error. |
3511 */ | 3499 */ |
3512 async.Future generate(core.String userKey) { | 3500 async.Future generate(core.String userKey) { |
3513 var _url = null; | 3501 var _url = null; |
3514 var _queryParams = new core.Map(); | 3502 var _queryParams = new core.Map(); |
3515 var _uploadMedia = null; | 3503 var _uploadMedia = null; |
3516 var _uploadOptions = null; | 3504 var _uploadOptions = null; |
3517 var _downloadOptions = common.DownloadOptions.Metadata; | 3505 var _downloadOptions = commons.DownloadOptions.Metadata; |
3518 var _body = null; | 3506 var _body = null; |
3519 | 3507 |
3520 if (userKey == null) { | 3508 if (userKey == null) { |
3521 throw new core.ArgumentError("Parameter userKey is required."); | 3509 throw new core.ArgumentError("Parameter userKey is required."); |
3522 } | 3510 } |
3523 | 3511 |
3524 _downloadOptions = null; | 3512 _downloadOptions = null; |
3525 | 3513 |
3526 _url = 'users/' + common_internal.Escaper.ecapeVariable('$userKey') + '/veri
ficationCodes/generate'; | 3514 _url = 'users/' + commons.Escaper.ecapeVariable('$userKey') + '/verification
Codes/generate'; |
3527 | 3515 |
3528 var _response = _requester.request(_url, | 3516 var _response = _requester.request(_url, |
3529 "POST", | 3517 "POST", |
3530 body: _body, | 3518 body: _body, |
3531 queryParams: _queryParams, | 3519 queryParams: _queryParams, |
3532 uploadOptions: _uploadOptions, | 3520 uploadOptions: _uploadOptions, |
3533 uploadMedia: _uploadMedia, | 3521 uploadMedia: _uploadMedia, |
3534 downloadOptions: _downloadOptions); | 3522 downloadOptions: _downloadOptions); |
3535 return _response.then((data) => null); | 3523 return _response.then((data) => null); |
3536 } | 3524 } |
3537 | 3525 |
3538 /** | 3526 /** |
3539 * Invalidate the current backup verification codes for the user. | 3527 * Invalidate the current backup verification codes for the user. |
3540 * | 3528 * |
3541 * Request parameters: | 3529 * Request parameters: |
3542 * | 3530 * |
3543 * [userKey] - Email or immutable Id of the user | 3531 * [userKey] - Email or immutable Id of the user |
3544 * | 3532 * |
3545 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 3533 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
3546 * error. | 3534 * error. |
3547 * | 3535 * |
3548 * If the used [http.Client] completes with an error when making a REST call, | 3536 * If the used [http.Client] completes with an error when making a REST call, |
3549 * this method will complete with the same error. | 3537 * this method will complete with the same error. |
3550 */ | 3538 */ |
3551 async.Future invalidate(core.String userKey) { | 3539 async.Future invalidate(core.String userKey) { |
3552 var _url = null; | 3540 var _url = null; |
3553 var _queryParams = new core.Map(); | 3541 var _queryParams = new core.Map(); |
3554 var _uploadMedia = null; | 3542 var _uploadMedia = null; |
3555 var _uploadOptions = null; | 3543 var _uploadOptions = null; |
3556 var _downloadOptions = common.DownloadOptions.Metadata; | 3544 var _downloadOptions = commons.DownloadOptions.Metadata; |
3557 var _body = null; | 3545 var _body = null; |
3558 | 3546 |
3559 if (userKey == null) { | 3547 if (userKey == null) { |
3560 throw new core.ArgumentError("Parameter userKey is required."); | 3548 throw new core.ArgumentError("Parameter userKey is required."); |
3561 } | 3549 } |
3562 | 3550 |
3563 _downloadOptions = null; | 3551 _downloadOptions = null; |
3564 | 3552 |
3565 _url = 'users/' + common_internal.Escaper.ecapeVariable('$userKey') + '/veri
ficationCodes/invalidate'; | 3553 _url = 'users/' + commons.Escaper.ecapeVariable('$userKey') + '/verification
Codes/invalidate'; |
3566 | 3554 |
3567 var _response = _requester.request(_url, | 3555 var _response = _requester.request(_url, |
3568 "POST", | 3556 "POST", |
3569 body: _body, | 3557 body: _body, |
3570 queryParams: _queryParams, | 3558 queryParams: _queryParams, |
3571 uploadOptions: _uploadOptions, | 3559 uploadOptions: _uploadOptions, |
3572 uploadMedia: _uploadMedia, | 3560 uploadMedia: _uploadMedia, |
3573 downloadOptions: _downloadOptions); | 3561 downloadOptions: _downloadOptions); |
3574 return _response.then((data) => null); | 3562 return _response.then((data) => null); |
3575 } | 3563 } |
3576 | 3564 |
3577 /** | 3565 /** |
3578 * Returns the current set of valid backup verification codes for the | 3566 * Returns the current set of valid backup verification codes for the |
3579 * specified user. | 3567 * specified user. |
3580 * | 3568 * |
3581 * Request parameters: | 3569 * Request parameters: |
3582 * | 3570 * |
3583 * [userKey] - Identifies the user in the API request. The value can be the | 3571 * [userKey] - Identifies the user in the API request. The value can be the |
3584 * user's primary email address, alias email address, or unique user ID. | 3572 * user's primary email address, alias email address, or unique user ID. |
3585 * | 3573 * |
3586 * Completes with a [VerificationCodes]. | 3574 * Completes with a [VerificationCodes]. |
3587 * | 3575 * |
3588 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 3576 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
3589 * error. | 3577 * error. |
3590 * | 3578 * |
3591 * If the used [http.Client] completes with an error when making a REST call, | 3579 * If the used [http.Client] completes with an error when making a REST call, |
3592 * this method will complete with the same error. | 3580 * this method will complete with the same error. |
3593 */ | 3581 */ |
3594 async.Future<VerificationCodes> list(core.String userKey) { | 3582 async.Future<VerificationCodes> list(core.String userKey) { |
3595 var _url = null; | 3583 var _url = null; |
3596 var _queryParams = new core.Map(); | 3584 var _queryParams = new core.Map(); |
3597 var _uploadMedia = null; | 3585 var _uploadMedia = null; |
3598 var _uploadOptions = null; | 3586 var _uploadOptions = null; |
3599 var _downloadOptions = common.DownloadOptions.Metadata; | 3587 var _downloadOptions = commons.DownloadOptions.Metadata; |
3600 var _body = null; | 3588 var _body = null; |
3601 | 3589 |
3602 if (userKey == null) { | 3590 if (userKey == null) { |
3603 throw new core.ArgumentError("Parameter userKey is required."); | 3591 throw new core.ArgumentError("Parameter userKey is required."); |
3604 } | 3592 } |
3605 | 3593 |
3606 | 3594 |
3607 _url = 'users/' + common_internal.Escaper.ecapeVariable('$userKey') + '/veri
ficationCodes'; | 3595 _url = 'users/' + commons.Escaper.ecapeVariable('$userKey') + '/verification
Codes'; |
3608 | 3596 |
3609 var _response = _requester.request(_url, | 3597 var _response = _requester.request(_url, |
3610 "GET", | 3598 "GET", |
3611 body: _body, | 3599 body: _body, |
3612 queryParams: _queryParams, | 3600 queryParams: _queryParams, |
3613 uploadOptions: _uploadOptions, | 3601 uploadOptions: _uploadOptions, |
3614 uploadMedia: _uploadMedia, | 3602 uploadMedia: _uploadMedia, |
3615 downloadOptions: _downloadOptions); | 3603 downloadOptions: _downloadOptions); |
3616 return _response.then((data) => new VerificationCodes.fromJson(data)); | 3604 return _response.then((data) => new VerificationCodes.fromJson(data)); |
3617 } | 3605 } |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3796 _json["name"] = name; | 3784 _json["name"] = name; |
3797 } | 3785 } |
3798 if (userKey != null) { | 3786 if (userKey != null) { |
3799 _json["userKey"] = userKey; | 3787 _json["userKey"] = userKey; |
3800 } | 3788 } |
3801 return _json; | 3789 return _json; |
3802 } | 3790 } |
3803 } | 3791 } |
3804 | 3792 |
3805 | 3793 |
3806 /** Not documented yet. */ | |
3807 class Asps { | 3794 class Asps { |
3808 /** ETag of the resource. */ | 3795 /** ETag of the resource. */ |
3809 core.String etag; | 3796 core.String etag; |
3810 | 3797 |
3811 /** A list of ASP resources. */ | 3798 /** A list of ASP resources. */ |
3812 core.List<Asp> items; | 3799 core.List<Asp> items; |
3813 | 3800 |
3814 /** The type of the API resource. This is always admin#directory#aspList. */ | 3801 /** The type of the API resource. This is always admin#directory#aspList. */ |
3815 core.String kind; | 3802 core.String kind; |
3816 | 3803 |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3955 _json["token"] = token; | 3942 _json["token"] = token; |
3956 } | 3943 } |
3957 if (type != null) { | 3944 if (type != null) { |
3958 _json["type"] = type; | 3945 _json["type"] = type; |
3959 } | 3946 } |
3960 return _json; | 3947 return _json; |
3961 } | 3948 } |
3962 } | 3949 } |
3963 | 3950 |
3964 | 3951 |
3965 /** Not documented yet. */ | |
3966 class ChromeOsDeviceActiveTimeRanges { | 3952 class ChromeOsDeviceActiveTimeRanges { |
3967 /** Duration in milliseconds */ | 3953 /** Duration in milliseconds */ |
3968 core.int activeTime; | 3954 core.int activeTime; |
3969 | 3955 |
3970 /** Date of usage */ | 3956 /** Date of usage */ |
3971 core.DateTime date; | 3957 core.DateTime date; |
3972 | 3958 |
3973 | 3959 |
3974 ChromeOsDeviceActiveTimeRanges(); | 3960 ChromeOsDeviceActiveTimeRanges(); |
3975 | 3961 |
(...skipping 12 matching lines...) Expand all Loading... |
3988 _json["activeTime"] = activeTime; | 3974 _json["activeTime"] = activeTime; |
3989 } | 3975 } |
3990 if (date != null) { | 3976 if (date != null) { |
3991 _json["date"] = "${(date).year.toString().padLeft(4, '0')}-${(date).month.
toString().padLeft(2, '0')}-${(date).day.toString().padLeft(2, '0')}"; | 3977 _json["date"] = "${(date).year.toString().padLeft(4, '0')}-${(date).month.
toString().padLeft(2, '0')}-${(date).day.toString().padLeft(2, '0')}"; |
3992 } | 3978 } |
3993 return _json; | 3979 return _json; |
3994 } | 3980 } |
3995 } | 3981 } |
3996 | 3982 |
3997 | 3983 |
3998 /** Not documented yet. */ | |
3999 class ChromeOsDeviceRecentUsers { | 3984 class ChromeOsDeviceRecentUsers { |
4000 /** Email address of the user. Present only if the user type is managed */ | 3985 /** Email address of the user. Present only if the user type is managed */ |
4001 core.String email; | 3986 core.String email; |
4002 | 3987 |
4003 /** The type of the user */ | 3988 /** The type of the user */ |
4004 core.String type; | 3989 core.String type; |
4005 | 3990 |
4006 | 3991 |
4007 ChromeOsDeviceRecentUsers(); | 3992 ChromeOsDeviceRecentUsers(); |
4008 | 3993 |
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4593 _json["members"] = members.map((value) => (value).toJson()).toList(); | 4578 _json["members"] = members.map((value) => (value).toJson()).toList(); |
4594 } | 4579 } |
4595 if (nextPageToken != null) { | 4580 if (nextPageToken != null) { |
4596 _json["nextPageToken"] = nextPageToken; | 4581 _json["nextPageToken"] = nextPageToken; |
4597 } | 4582 } |
4598 return _json; | 4583 return _json; |
4599 } | 4584 } |
4600 } | 4585 } |
4601 | 4586 |
4602 | 4587 |
4603 /** Not documented yet. */ | |
4604 class MobileDeviceApplications { | 4588 class MobileDeviceApplications { |
4605 /** Display name of application */ | 4589 /** Display name of application */ |
4606 core.String displayName; | 4590 core.String displayName; |
4607 | 4591 |
4608 /** Package name of application */ | 4592 /** Package name of application */ |
4609 core.String packageName; | 4593 core.String packageName; |
4610 | 4594 |
4611 /** List of Permissions for application */ | 4595 /** List of Permissions for application */ |
4612 core.List<core.String> permission; | 4596 core.List<core.String> permission; |
4613 | 4597 |
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5008 | 4992 |
5009 /** Address from which the notification is received (Read-only) */ | 4993 /** Address from which the notification is received (Read-only) */ |
5010 core.String fromAddress; | 4994 core.String fromAddress; |
5011 | 4995 |
5012 /** Boolean indicating whether the notification is unread or not. */ | 4996 /** Boolean indicating whether the notification is unread or not. */ |
5013 core.bool isUnread; | 4997 core.bool isUnread; |
5014 | 4998 |
5015 /** The type of the resource. */ | 4999 /** The type of the resource. */ |
5016 core.String kind; | 5000 core.String kind; |
5017 | 5001 |
5018 /** Not documented yet. */ | |
5019 core.String notificationId; | 5002 core.String notificationId; |
5020 | 5003 |
5021 /** Time at which notification was sent (Read-only) */ | 5004 /** Time at which notification was sent (Read-only) */ |
5022 core.DateTime sendTime; | 5005 core.DateTime sendTime; |
5023 | 5006 |
5024 /** Subject of the notification (Read-only) */ | 5007 /** Subject of the notification (Read-only) */ |
5025 core.String subject; | 5008 core.String subject; |
5026 | 5009 |
5027 | 5010 |
5028 Notification(); | 5011 Notification(); |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5155 | 5138 |
5156 /** ETag of the resource. */ | 5139 /** ETag of the resource. */ |
5157 core.String etag; | 5140 core.String etag; |
5158 | 5141 |
5159 /** Kind of resource this is. */ | 5142 /** Kind of resource this is. */ |
5160 core.String kind; | 5143 core.String kind; |
5161 | 5144 |
5162 /** Name of OrgUnit */ | 5145 /** Name of OrgUnit */ |
5163 core.String name; | 5146 core.String name; |
5164 | 5147 |
| 5148 /** Id of OrgUnit */ |
| 5149 core.String orgUnitId; |
| 5150 |
5165 /** Path of OrgUnit */ | 5151 /** Path of OrgUnit */ |
5166 core.String orgUnitPath; | 5152 core.String orgUnitPath; |
5167 | 5153 |
| 5154 /** Id of parent OrgUnit */ |
| 5155 core.String parentOrgUnitId; |
| 5156 |
5168 /** Path of parent OrgUnit */ | 5157 /** Path of parent OrgUnit */ |
5169 core.String parentOrgUnitPath; | 5158 core.String parentOrgUnitPath; |
5170 | 5159 |
5171 | 5160 |
5172 OrgUnit(); | 5161 OrgUnit(); |
5173 | 5162 |
5174 OrgUnit.fromJson(core.Map _json) { | 5163 OrgUnit.fromJson(core.Map _json) { |
5175 if (_json.containsKey("blockInheritance")) { | 5164 if (_json.containsKey("blockInheritance")) { |
5176 blockInheritance = _json["blockInheritance"]; | 5165 blockInheritance = _json["blockInheritance"]; |
5177 } | 5166 } |
5178 if (_json.containsKey("description")) { | 5167 if (_json.containsKey("description")) { |
5179 description = _json["description"]; | 5168 description = _json["description"]; |
5180 } | 5169 } |
5181 if (_json.containsKey("etag")) { | 5170 if (_json.containsKey("etag")) { |
5182 etag = _json["etag"]; | 5171 etag = _json["etag"]; |
5183 } | 5172 } |
5184 if (_json.containsKey("kind")) { | 5173 if (_json.containsKey("kind")) { |
5185 kind = _json["kind"]; | 5174 kind = _json["kind"]; |
5186 } | 5175 } |
5187 if (_json.containsKey("name")) { | 5176 if (_json.containsKey("name")) { |
5188 name = _json["name"]; | 5177 name = _json["name"]; |
5189 } | 5178 } |
| 5179 if (_json.containsKey("orgUnitId")) { |
| 5180 orgUnitId = _json["orgUnitId"]; |
| 5181 } |
5190 if (_json.containsKey("orgUnitPath")) { | 5182 if (_json.containsKey("orgUnitPath")) { |
5191 orgUnitPath = _json["orgUnitPath"]; | 5183 orgUnitPath = _json["orgUnitPath"]; |
5192 } | 5184 } |
| 5185 if (_json.containsKey("parentOrgUnitId")) { |
| 5186 parentOrgUnitId = _json["parentOrgUnitId"]; |
| 5187 } |
5193 if (_json.containsKey("parentOrgUnitPath")) { | 5188 if (_json.containsKey("parentOrgUnitPath")) { |
5194 parentOrgUnitPath = _json["parentOrgUnitPath"]; | 5189 parentOrgUnitPath = _json["parentOrgUnitPath"]; |
5195 } | 5190 } |
5196 } | 5191 } |
5197 | 5192 |
5198 core.Map toJson() { | 5193 core.Map toJson() { |
5199 var _json = new core.Map(); | 5194 var _json = new core.Map(); |
5200 if (blockInheritance != null) { | 5195 if (blockInheritance != null) { |
5201 _json["blockInheritance"] = blockInheritance; | 5196 _json["blockInheritance"] = blockInheritance; |
5202 } | 5197 } |
5203 if (description != null) { | 5198 if (description != null) { |
5204 _json["description"] = description; | 5199 _json["description"] = description; |
5205 } | 5200 } |
5206 if (etag != null) { | 5201 if (etag != null) { |
5207 _json["etag"] = etag; | 5202 _json["etag"] = etag; |
5208 } | 5203 } |
5209 if (kind != null) { | 5204 if (kind != null) { |
5210 _json["kind"] = kind; | 5205 _json["kind"] = kind; |
5211 } | 5206 } |
5212 if (name != null) { | 5207 if (name != null) { |
5213 _json["name"] = name; | 5208 _json["name"] = name; |
5214 } | 5209 } |
| 5210 if (orgUnitId != null) { |
| 5211 _json["orgUnitId"] = orgUnitId; |
| 5212 } |
5215 if (orgUnitPath != null) { | 5213 if (orgUnitPath != null) { |
5216 _json["orgUnitPath"] = orgUnitPath; | 5214 _json["orgUnitPath"] = orgUnitPath; |
5217 } | 5215 } |
| 5216 if (parentOrgUnitId != null) { |
| 5217 _json["parentOrgUnitId"] = parentOrgUnitId; |
| 5218 } |
5218 if (parentOrgUnitPath != null) { | 5219 if (parentOrgUnitPath != null) { |
5219 _json["parentOrgUnitPath"] = parentOrgUnitPath; | 5220 _json["parentOrgUnitPath"] = parentOrgUnitPath; |
5220 } | 5221 } |
5221 return _json; | 5222 return _json; |
5222 } | 5223 } |
5223 } | 5224 } |
5224 | 5225 |
5225 | 5226 |
5226 /** | 5227 /** |
5227 * JSON response template for List Organization Units operation in Directory | 5228 * JSON response template for List Organization Units operation in Directory |
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5651 _json["kind"] = kind; | 5652 _json["kind"] = kind; |
5652 } | 5653 } |
5653 return _json; | 5654 return _json; |
5654 } | 5655 } |
5655 } | 5656 } |
5656 | 5657 |
5657 | 5658 |
5658 /** JSON template for User object in Directory API. */ | 5659 /** JSON template for User object in Directory API. */ |
5659 class User { | 5660 class User { |
5660 /** | 5661 /** |
5661 * Not documented yet. | 5662 * |
5662 * | 5663 * |
5663 * The values for Object must be JSON objects. It can consist of `num`, | 5664 * The values for Object must be JSON objects. It can consist of `num`, |
5664 * `String`, `bool` and `null` as well as `Map` and `List` values. | 5665 * `String`, `bool` and `null` as well as `Map` and `List` values. |
5665 */ | 5666 */ |
5666 core.Object addresses; | 5667 core.Object addresses; |
5667 | 5668 |
5668 /** Indicates if user has agreed to terms (Read-only) */ | 5669 /** Indicates if user has agreed to terms (Read-only) */ |
5669 core.bool agreedToTerms; | 5670 core.bool agreedToTerms; |
5670 | 5671 |
5671 /** List of aliases (Read-only) */ | 5672 /** List of aliases (Read-only) */ |
5672 core.List<core.String> aliases; | 5673 core.List<core.String> aliases; |
5673 | 5674 |
5674 /** Boolean indicating if the user should change password in next login */ | 5675 /** Boolean indicating if the user should change password in next login */ |
5675 core.bool changePasswordAtNextLogin; | 5676 core.bool changePasswordAtNextLogin; |
5676 | 5677 |
5677 /** User's Google account creation time. (Read-only) */ | 5678 /** User's Google account creation time. (Read-only) */ |
5678 core.DateTime creationTime; | 5679 core.DateTime creationTime; |
5679 | 5680 |
5680 /** Custom fields of the user. */ | 5681 /** Custom fields of the user. */ |
5681 core.Map<core.String, UserCustomProperties> customSchemas; | 5682 core.Map<core.String, UserCustomProperties> customSchemas; |
5682 | 5683 |
5683 /** CustomerId of User (Read-only) */ | 5684 /** CustomerId of User (Read-only) */ |
5684 core.String customerId; | 5685 core.String customerId; |
5685 | 5686 |
5686 /** Not documented yet. */ | |
5687 core.DateTime deletionTime; | 5687 core.DateTime deletionTime; |
5688 | 5688 |
5689 /** | 5689 /** |
5690 * Not documented yet. | 5690 * |
5691 * | 5691 * |
5692 * The values for Object must be JSON objects. It can consist of `num`, | 5692 * The values for Object must be JSON objects. It can consist of `num`, |
5693 * `String`, `bool` and `null` as well as `Map` and `List` values. | 5693 * `String`, `bool` and `null` as well as `Map` and `List` values. |
5694 */ | 5694 */ |
5695 core.Object emails; | 5695 core.Object emails; |
5696 | 5696 |
5697 /** ETag of the resource. */ | 5697 /** ETag of the resource. */ |
5698 core.String etag; | 5698 core.String etag; |
5699 | 5699 |
5700 /** | 5700 /** |
5701 * Not documented yet. | 5701 * |
5702 * | 5702 * |
5703 * The values for Object must be JSON objects. It can consist of `num`, | 5703 * The values for Object must be JSON objects. It can consist of `num`, |
5704 * `String`, `bool` and `null` as well as `Map` and `List` values. | 5704 * `String`, `bool` and `null` as well as `Map` and `List` values. |
5705 */ | 5705 */ |
5706 core.Object externalIds; | 5706 core.Object externalIds; |
5707 | 5707 |
5708 /** Hash function name for password. Supported are MD5, SHA-1 and crypt */ | 5708 /** Hash function name for password. Supported are MD5, SHA-1 and crypt */ |
5709 core.String hashFunction; | 5709 core.String hashFunction; |
5710 | 5710 |
5711 /** Unique identifier of User (Read-only) */ | 5711 /** Unique identifier of User (Read-only) */ |
5712 core.String id; | 5712 core.String id; |
5713 | 5713 |
5714 /** | 5714 /** |
5715 * Not documented yet. | 5715 * |
5716 * | 5716 * |
5717 * The values for Object must be JSON objects. It can consist of `num`, | 5717 * The values for Object must be JSON objects. It can consist of `num`, |
5718 * `String`, `bool` and `null` as well as `Map` and `List` values. | 5718 * `String`, `bool` and `null` as well as `Map` and `List` values. |
5719 */ | 5719 */ |
5720 core.Object ims; | 5720 core.Object ims; |
5721 | 5721 |
5722 /** Boolean indicating if user is included in Global Address List */ | 5722 /** Boolean indicating if user is included in Global Address List */ |
5723 core.bool includeInGlobalAddressList; | 5723 core.bool includeInGlobalAddressList; |
5724 | 5724 |
5725 /** Boolean indicating if ip is whitelisted */ | 5725 /** Boolean indicating if ip is whitelisted */ |
(...skipping 14 matching lines...) Expand all Loading... |
5740 /** User's last login time. (Read-only) */ | 5740 /** User's last login time. (Read-only) */ |
5741 core.DateTime lastLoginTime; | 5741 core.DateTime lastLoginTime; |
5742 | 5742 |
5743 /** User's name */ | 5743 /** User's name */ |
5744 UserName name; | 5744 UserName name; |
5745 | 5745 |
5746 /** List of non editable aliases (Read-only) */ | 5746 /** List of non editable aliases (Read-only) */ |
5747 core.List<core.String> nonEditableAliases; | 5747 core.List<core.String> nonEditableAliases; |
5748 | 5748 |
5749 /** | 5749 /** |
5750 * Not documented yet. | 5750 * |
5751 * | 5751 * |
5752 * The values for Object must be JSON objects. It can consist of `num`, | 5752 * The values for Object must be JSON objects. It can consist of `num`, |
5753 * `String`, `bool` and `null` as well as `Map` and `List` values. | 5753 * `String`, `bool` and `null` as well as `Map` and `List` values. |
5754 */ | 5754 */ |
5755 core.Object notes; | 5755 core.Object notes; |
5756 | 5756 |
5757 /** OrgUnit of User */ | 5757 /** OrgUnit of User */ |
5758 core.String orgUnitPath; | 5758 core.String orgUnitPath; |
5759 | 5759 |
5760 /** | 5760 /** |
5761 * Not documented yet. | 5761 * |
5762 * | 5762 * |
5763 * The values for Object must be JSON objects. It can consist of `num`, | 5763 * The values for Object must be JSON objects. It can consist of `num`, |
5764 * `String`, `bool` and `null` as well as `Map` and `List` values. | 5764 * `String`, `bool` and `null` as well as `Map` and `List` values. |
5765 */ | 5765 */ |
5766 core.Object organizations; | 5766 core.Object organizations; |
5767 | 5767 |
5768 /** User's password */ | 5768 /** User's password */ |
5769 core.String password; | 5769 core.String password; |
5770 | 5770 |
5771 /** | 5771 /** |
5772 * Not documented yet. | 5772 * |
5773 * | 5773 * |
5774 * The values for Object must be JSON objects. It can consist of `num`, | 5774 * The values for Object must be JSON objects. It can consist of `num`, |
5775 * `String`, `bool` and `null` as well as `Map` and `List` values. | 5775 * `String`, `bool` and `null` as well as `Map` and `List` values. |
5776 */ | 5776 */ |
5777 core.Object phones; | 5777 core.Object phones; |
5778 | 5778 |
5779 /** username of User */ | 5779 /** username of User */ |
5780 core.String primaryEmail; | 5780 core.String primaryEmail; |
5781 | 5781 |
5782 /** | 5782 /** |
5783 * Not documented yet. | 5783 * |
5784 * | 5784 * |
5785 * The values for Object must be JSON objects. It can consist of `num`, | 5785 * The values for Object must be JSON objects. It can consist of `num`, |
5786 * `String`, `bool` and `null` as well as `Map` and `List` values. | 5786 * `String`, `bool` and `null` as well as `Map` and `List` values. |
5787 */ | 5787 */ |
5788 core.Object relations; | 5788 core.Object relations; |
5789 | 5789 |
5790 /** Indicates if user is suspended */ | 5790 /** Indicates if user is suspended */ |
5791 core.bool suspended; | 5791 core.bool suspended; |
5792 | 5792 |
5793 /** Suspension reason if user is suspended (Read-only) */ | 5793 /** Suspension reason if user is suspended (Read-only) */ |
5794 core.String suspensionReason; | 5794 core.String suspensionReason; |
5795 | 5795 |
5796 /** Photo Url of the user (Read-only) */ | 5796 /** Photo Url of the user (Read-only) */ |
5797 core.String thumbnailPhotoUrl; | 5797 core.String thumbnailPhotoUrl; |
5798 | 5798 |
5799 /** | 5799 /** |
5800 * Not documented yet. | 5800 * |
5801 * | 5801 * |
5802 * The values for Object must be JSON objects. It can consist of `num`, | 5802 * The values for Object must be JSON objects. It can consist of `num`, |
5803 * `String`, `bool` and `null` as well as `Map` and `List` values. | 5803 * `String`, `bool` and `null` as well as `Map` and `List` values. |
5804 */ | 5804 */ |
5805 core.Object websites; | 5805 core.Object websites; |
5806 | 5806 |
5807 | 5807 |
5808 User(); | 5808 User(); |
5809 | 5809 |
5810 User.fromJson(core.Map _json) { | 5810 User.fromJson(core.Map _json) { |
5811 if (_json.containsKey("addresses")) { | 5811 if (_json.containsKey("addresses")) { |
5812 addresses = _json["addresses"]; | 5812 addresses = _json["addresses"]; |
5813 } | 5813 } |
5814 if (_json.containsKey("agreedToTerms")) { | 5814 if (_json.containsKey("agreedToTerms")) { |
5815 agreedToTerms = _json["agreedToTerms"]; | 5815 agreedToTerms = _json["agreedToTerms"]; |
5816 } | 5816 } |
5817 if (_json.containsKey("aliases")) { | 5817 if (_json.containsKey("aliases")) { |
5818 aliases = _json["aliases"]; | 5818 aliases = _json["aliases"]; |
5819 } | 5819 } |
5820 if (_json.containsKey("changePasswordAtNextLogin")) { | 5820 if (_json.containsKey("changePasswordAtNextLogin")) { |
5821 changePasswordAtNextLogin = _json["changePasswordAtNextLogin"]; | 5821 changePasswordAtNextLogin = _json["changePasswordAtNextLogin"]; |
5822 } | 5822 } |
5823 if (_json.containsKey("creationTime")) { | 5823 if (_json.containsKey("creationTime")) { |
5824 creationTime = core.DateTime.parse(_json["creationTime"]); | 5824 creationTime = core.DateTime.parse(_json["creationTime"]); |
5825 } | 5825 } |
5826 if (_json.containsKey("customSchemas")) { | 5826 if (_json.containsKey("customSchemas")) { |
5827 customSchemas = common_internal.mapMap(_json["customSchemas"], (item) => n
ew UserCustomProperties.fromJson(item)); | 5827 customSchemas = commons.mapMap(_json["customSchemas"], (item) => new UserC
ustomProperties.fromJson(item)); |
5828 } | 5828 } |
5829 if (_json.containsKey("customerId")) { | 5829 if (_json.containsKey("customerId")) { |
5830 customerId = _json["customerId"]; | 5830 customerId = _json["customerId"]; |
5831 } | 5831 } |
5832 if (_json.containsKey("deletionTime")) { | 5832 if (_json.containsKey("deletionTime")) { |
5833 deletionTime = core.DateTime.parse(_json["deletionTime"]); | 5833 deletionTime = core.DateTime.parse(_json["deletionTime"]); |
5834 } | 5834 } |
5835 if (_json.containsKey("emails")) { | 5835 if (_json.containsKey("emails")) { |
5836 emails = _json["emails"]; | 5836 emails = _json["emails"]; |
5837 } | 5837 } |
(...skipping 1212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7050 } | 7050 } |
7051 if (items != null) { | 7051 if (items != null) { |
7052 _json["items"] = items.map((value) => (value).toJson()).toList(); | 7052 _json["items"] = items.map((value) => (value).toJson()).toList(); |
7053 } | 7053 } |
7054 if (kind != null) { | 7054 if (kind != null) { |
7055 _json["kind"] = kind; | 7055 _json["kind"] = kind; |
7056 } | 7056 } |
7057 return _json; | 7057 return _json; |
7058 } | 7058 } |
7059 } | 7059 } |
7060 | |
7061 | |
OLD | NEW |