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

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

Issue 1078053002: Roll of googleapis as of 4/7/2015. (Closed) Base URL: https://github.com/dart-lang/googleapis.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // This is a generated file (see the discoveryapis_generator project).
2
1 library googleapis.licensing.v1; 3 library googleapis.licensing.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 licensing/v1';
15 18
16 /** Licensing API to view and manage license for your domain. */ 19 /** Licensing API to view and manage license for your domain. */
17 class LicensingApi { 20 class LicensingApi {
21 /** View and manage Google Apps licenses for your domain */
22 static const AppsLicensingScope = "https://www.googleapis.com/auth/apps.licens ing";
18 23
19 final common_internal.ApiRequester _requester; 24
25 final commons.ApiRequester _requester;
20 26
21 LicenseAssignmentsResourceApi get licenseAssignments => new LicenseAssignments ResourceApi(_requester); 27 LicenseAssignmentsResourceApi get licenseAssignments => new LicenseAssignments ResourceApi(_requester);
22 28
23 LicensingApi(http.Client client, {core.String rootUrl: "https://www.googleapis .com/", core.String servicePath: "apps/licensing/v1/product/"}) : 29 LicensingApi(http.Client client, {core.String rootUrl: "https://www.googleapis .com/", core.String servicePath: "apps/licensing/v1/product/"}) :
24 _requester = new common_internal.ApiRequester(client, rootUrl, servicePath ); 30 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A GENT);
25 } 31 }
26 32
27 33
28 /** Not documented yet. */
29 class LicenseAssignmentsResourceApi { 34 class LicenseAssignmentsResourceApi {
30 final common_internal.ApiRequester _requester; 35 final commons.ApiRequester _requester;
31 36
32 LicenseAssignmentsResourceApi(common_internal.ApiRequester client) : 37 LicenseAssignmentsResourceApi(commons.ApiRequester client) :
33 _requester = client; 38 _requester = client;
34 39
35 /** 40 /**
36 * Revoke License. 41 * Revoke License.
37 * 42 *
38 * Request parameters: 43 * Request parameters:
39 * 44 *
40 * [productId] - Name for product 45 * [productId] - Name for product
41 * 46 *
42 * [skuId] - Name for sku 47 * [skuId] - Name for sku
43 * 48 *
44 * [userId] - email id or unique Id of the user 49 * [userId] - email id or unique Id of the user
45 * 50 *
46 * Completes with a [common.ApiRequestError] if the API endpoint returned an 51 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
47 * error. 52 * error.
48 * 53 *
49 * If the used [http.Client] completes with an error when making a REST call, 54 * If the used [http.Client] completes with an error when making a REST call,
50 * this method will complete with the same error. 55 * this method will complete with the same error.
51 */ 56 */
52 async.Future delete(core.String productId, core.String skuId, core.String user Id) { 57 async.Future delete(core.String productId, core.String skuId, core.String user Id) {
53 var _url = null; 58 var _url = null;
54 var _queryParams = new core.Map(); 59 var _queryParams = new core.Map();
55 var _uploadMedia = null; 60 var _uploadMedia = null;
56 var _uploadOptions = null; 61 var _uploadOptions = null;
57 var _downloadOptions = common.DownloadOptions.Metadata; 62 var _downloadOptions = commons.DownloadOptions.Metadata;
58 var _body = null; 63 var _body = null;
59 64
60 if (productId == null) { 65 if (productId == null) {
61 throw new core.ArgumentError("Parameter productId is required."); 66 throw new core.ArgumentError("Parameter productId is required.");
62 } 67 }
63 if (skuId == null) { 68 if (skuId == null) {
64 throw new core.ArgumentError("Parameter skuId is required."); 69 throw new core.ArgumentError("Parameter skuId is required.");
65 } 70 }
66 if (userId == null) { 71 if (userId == null) {
67 throw new core.ArgumentError("Parameter userId is required."); 72 throw new core.ArgumentError("Parameter userId is required.");
68 } 73 }
69 74
70 _downloadOptions = null; 75 _downloadOptions = null;
71 76
72 _url = common_internal.Escaper.ecapeVariable('$productId') + '/sku/' + commo n_internal.Escaper.ecapeVariable('$skuId') + '/user/' + common_internal.Escaper. ecapeVariable('$userId'); 77 _url = commons.Escaper.ecapeVariable('$productId') + '/sku/' + commons.Escap er.ecapeVariable('$skuId') + '/user/' + commons.Escaper.ecapeVariable('$userId') ;
73 78
74 var _response = _requester.request(_url, 79 var _response = _requester.request(_url,
75 "DELETE", 80 "DELETE",
76 body: _body, 81 body: _body,
77 queryParams: _queryParams, 82 queryParams: _queryParams,
78 uploadOptions: _uploadOptions, 83 uploadOptions: _uploadOptions,
79 uploadMedia: _uploadMedia, 84 uploadMedia: _uploadMedia,
80 downloadOptions: _downloadOptions); 85 downloadOptions: _downloadOptions);
81 return _response.then((data) => null); 86 return _response.then((data) => null);
82 } 87 }
83 88
84 /** 89 /**
85 * Get license assignment of a particular product and sku for a user 90 * Get license assignment of a particular product and sku for a user
86 * 91 *
87 * Request parameters: 92 * Request parameters:
88 * 93 *
89 * [productId] - Name for product 94 * [productId] - Name for product
90 * 95 *
91 * [skuId] - Name for sku 96 * [skuId] - Name for sku
92 * 97 *
93 * [userId] - email id or unique Id of the user 98 * [userId] - email id or unique Id of the user
94 * 99 *
95 * Completes with a [LicenseAssignment]. 100 * Completes with a [LicenseAssignment].
96 * 101 *
97 * Completes with a [common.ApiRequestError] if the API endpoint returned an 102 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
98 * error. 103 * error.
99 * 104 *
100 * If the used [http.Client] completes with an error when making a REST call, 105 * If the used [http.Client] completes with an error when making a REST call,
101 * this method will complete with the same error. 106 * this method will complete with the same error.
102 */ 107 */
103 async.Future<LicenseAssignment> get(core.String productId, core.String skuId, core.String userId) { 108 async.Future<LicenseAssignment> get(core.String productId, core.String skuId, core.String userId) {
104 var _url = null; 109 var _url = null;
105 var _queryParams = new core.Map(); 110 var _queryParams = new core.Map();
106 var _uploadMedia = null; 111 var _uploadMedia = null;
107 var _uploadOptions = null; 112 var _uploadOptions = null;
108 var _downloadOptions = common.DownloadOptions.Metadata; 113 var _downloadOptions = commons.DownloadOptions.Metadata;
109 var _body = null; 114 var _body = null;
110 115
111 if (productId == null) { 116 if (productId == null) {
112 throw new core.ArgumentError("Parameter productId is required."); 117 throw new core.ArgumentError("Parameter productId is required.");
113 } 118 }
114 if (skuId == null) { 119 if (skuId == null) {
115 throw new core.ArgumentError("Parameter skuId is required."); 120 throw new core.ArgumentError("Parameter skuId is required.");
116 } 121 }
117 if (userId == null) { 122 if (userId == null) {
118 throw new core.ArgumentError("Parameter userId is required."); 123 throw new core.ArgumentError("Parameter userId is required.");
119 } 124 }
120 125
121 126
122 _url = common_internal.Escaper.ecapeVariable('$productId') + '/sku/' + commo n_internal.Escaper.ecapeVariable('$skuId') + '/user/' + common_internal.Escaper. ecapeVariable('$userId'); 127 _url = commons.Escaper.ecapeVariable('$productId') + '/sku/' + commons.Escap er.ecapeVariable('$skuId') + '/user/' + commons.Escaper.ecapeVariable('$userId') ;
123 128
124 var _response = _requester.request(_url, 129 var _response = _requester.request(_url,
125 "GET", 130 "GET",
126 body: _body, 131 body: _body,
127 queryParams: _queryParams, 132 queryParams: _queryParams,
128 uploadOptions: _uploadOptions, 133 uploadOptions: _uploadOptions,
129 uploadMedia: _uploadMedia, 134 uploadMedia: _uploadMedia,
130 downloadOptions: _downloadOptions); 135 downloadOptions: _downloadOptions);
131 return _response.then((data) => new LicenseAssignment.fromJson(data)); 136 return _response.then((data) => new LicenseAssignment.fromJson(data));
132 } 137 }
133 138
134 /** 139 /**
135 * Assign License. 140 * Assign License.
136 * 141 *
137 * [request] - The metadata request object. 142 * [request] - The metadata request object.
138 * 143 *
139 * Request parameters: 144 * Request parameters:
140 * 145 *
141 * [productId] - Name for product 146 * [productId] - Name for product
142 * 147 *
143 * [skuId] - Name for sku 148 * [skuId] - Name for sku
144 * 149 *
145 * Completes with a [LicenseAssignment]. 150 * Completes with a [LicenseAssignment].
146 * 151 *
147 * Completes with a [common.ApiRequestError] if the API endpoint returned an 152 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
148 * error. 153 * error.
149 * 154 *
150 * If the used [http.Client] completes with an error when making a REST call, 155 * If the used [http.Client] completes with an error when making a REST call,
151 * this method will complete with the same error. 156 * this method will complete with the same error.
152 */ 157 */
153 async.Future<LicenseAssignment> insert(LicenseAssignmentInsert request, core.S tring productId, core.String skuId) { 158 async.Future<LicenseAssignment> insert(LicenseAssignmentInsert request, core.S tring productId, core.String skuId) {
154 var _url = null; 159 var _url = null;
155 var _queryParams = new core.Map(); 160 var _queryParams = new core.Map();
156 var _uploadMedia = null; 161 var _uploadMedia = null;
157 var _uploadOptions = null; 162 var _uploadOptions = null;
158 var _downloadOptions = common.DownloadOptions.Metadata; 163 var _downloadOptions = commons.DownloadOptions.Metadata;
159 var _body = null; 164 var _body = null;
160 165
161 if (request != null) { 166 if (request != null) {
162 _body = convert.JSON.encode((request).toJson()); 167 _body = convert.JSON.encode((request).toJson());
163 } 168 }
164 if (productId == null) { 169 if (productId == null) {
165 throw new core.ArgumentError("Parameter productId is required."); 170 throw new core.ArgumentError("Parameter productId is required.");
166 } 171 }
167 if (skuId == null) { 172 if (skuId == null) {
168 throw new core.ArgumentError("Parameter skuId is required."); 173 throw new core.ArgumentError("Parameter skuId is required.");
169 } 174 }
170 175
171 176
172 _url = common_internal.Escaper.ecapeVariable('$productId') + '/sku/' + commo n_internal.Escaper.ecapeVariable('$skuId') + '/user'; 177 _url = commons.Escaper.ecapeVariable('$productId') + '/sku/' + commons.Escap er.ecapeVariable('$skuId') + '/user';
173 178
174 var _response = _requester.request(_url, 179 var _response = _requester.request(_url,
175 "POST", 180 "POST",
176 body: _body, 181 body: _body,
177 queryParams: _queryParams, 182 queryParams: _queryParams,
178 uploadOptions: _uploadOptions, 183 uploadOptions: _uploadOptions,
179 uploadMedia: _uploadMedia, 184 uploadMedia: _uploadMedia,
180 downloadOptions: _downloadOptions); 185 downloadOptions: _downloadOptions);
181 return _response.then((data) => new LicenseAssignment.fromJson(data)); 186 return _response.then((data) => new LicenseAssignment.fromJson(data));
182 } 187 }
(...skipping 10 matching lines...) Expand all
193 * 198 *
194 * [maxResults] - Maximum number of campaigns to return at one time. Must be 199 * [maxResults] - Maximum number of campaigns to return at one time. Must be
195 * positive. Optional. Default value is 100. 200 * positive. Optional. Default value is 100.
196 * Value must be between "1" and "1000". 201 * Value must be between "1" and "1000".
197 * 202 *
198 * [pageToken] - Token to fetch the next page.Optional. By default server will 203 * [pageToken] - Token to fetch the next page.Optional. By default server will
199 * return first page 204 * return first page
200 * 205 *
201 * Completes with a [LicenseAssignmentList]. 206 * Completes with a [LicenseAssignmentList].
202 * 207 *
203 * Completes with a [common.ApiRequestError] if the API endpoint returned an 208 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
204 * error. 209 * error.
205 * 210 *
206 * If the used [http.Client] completes with an error when making a REST call, 211 * If the used [http.Client] completes with an error when making a REST call,
207 * this method will complete with the same error. 212 * this method will complete with the same error.
208 */ 213 */
209 async.Future<LicenseAssignmentList> listForProduct(core.String productId, core .String customerId, {core.int maxResults, core.String pageToken}) { 214 async.Future<LicenseAssignmentList> listForProduct(core.String productId, core .String customerId, {core.int maxResults, core.String pageToken}) {
210 var _url = null; 215 var _url = null;
211 var _queryParams = new core.Map(); 216 var _queryParams = new core.Map();
212 var _uploadMedia = null; 217 var _uploadMedia = null;
213 var _uploadOptions = null; 218 var _uploadOptions = null;
214 var _downloadOptions = common.DownloadOptions.Metadata; 219 var _downloadOptions = commons.DownloadOptions.Metadata;
215 var _body = null; 220 var _body = null;
216 221
217 if (productId == null) { 222 if (productId == null) {
218 throw new core.ArgumentError("Parameter productId is required."); 223 throw new core.ArgumentError("Parameter productId is required.");
219 } 224 }
220 if (customerId == null) { 225 if (customerId == null) {
221 throw new core.ArgumentError("Parameter customerId is required."); 226 throw new core.ArgumentError("Parameter customerId is required.");
222 } 227 }
223 _queryParams["customerId"] = [customerId]; 228 _queryParams["customerId"] = [customerId];
224 if (maxResults != null) { 229 if (maxResults != null) {
225 _queryParams["maxResults"] = ["${maxResults}"]; 230 _queryParams["maxResults"] = ["${maxResults}"];
226 } 231 }
227 if (pageToken != null) { 232 if (pageToken != null) {
228 _queryParams["pageToken"] = [pageToken]; 233 _queryParams["pageToken"] = [pageToken];
229 } 234 }
230 235
231 236
232 _url = common_internal.Escaper.ecapeVariable('$productId') + '/users'; 237 _url = commons.Escaper.ecapeVariable('$productId') + '/users';
233 238
234 var _response = _requester.request(_url, 239 var _response = _requester.request(_url,
235 "GET", 240 "GET",
236 body: _body, 241 body: _body,
237 queryParams: _queryParams, 242 queryParams: _queryParams,
238 uploadOptions: _uploadOptions, 243 uploadOptions: _uploadOptions,
239 uploadMedia: _uploadMedia, 244 uploadMedia: _uploadMedia,
240 downloadOptions: _downloadOptions); 245 downloadOptions: _downloadOptions);
241 return _response.then((data) => new LicenseAssignmentList.fromJson(data)); 246 return _response.then((data) => new LicenseAssignmentList.fromJson(data));
242 } 247 }
(...skipping 12 matching lines...) Expand all
255 * 260 *
256 * [maxResults] - Maximum number of campaigns to return at one time. Must be 261 * [maxResults] - Maximum number of campaigns to return at one time. Must be
257 * positive. Optional. Default value is 100. 262 * positive. Optional. Default value is 100.
258 * Value must be between "1" and "1000". 263 * Value must be between "1" and "1000".
259 * 264 *
260 * [pageToken] - Token to fetch the next page.Optional. By default server will 265 * [pageToken] - Token to fetch the next page.Optional. By default server will
261 * return first page 266 * return first page
262 * 267 *
263 * Completes with a [LicenseAssignmentList]. 268 * Completes with a [LicenseAssignmentList].
264 * 269 *
265 * Completes with a [common.ApiRequestError] if the API endpoint returned an 270 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
266 * error. 271 * error.
267 * 272 *
268 * If the used [http.Client] completes with an error when making a REST call, 273 * If the used [http.Client] completes with an error when making a REST call,
269 * this method will complete with the same error. 274 * this method will complete with the same error.
270 */ 275 */
271 async.Future<LicenseAssignmentList> listForProductAndSku(core.String productId , core.String skuId, core.String customerId, {core.int maxResults, core.String p ageToken}) { 276 async.Future<LicenseAssignmentList> listForProductAndSku(core.String productId , core.String skuId, core.String customerId, {core.int maxResults, core.String p ageToken}) {
272 var _url = null; 277 var _url = null;
273 var _queryParams = new core.Map(); 278 var _queryParams = new core.Map();
274 var _uploadMedia = null; 279 var _uploadMedia = null;
275 var _uploadOptions = null; 280 var _uploadOptions = null;
276 var _downloadOptions = common.DownloadOptions.Metadata; 281 var _downloadOptions = commons.DownloadOptions.Metadata;
277 var _body = null; 282 var _body = null;
278 283
279 if (productId == null) { 284 if (productId == null) {
280 throw new core.ArgumentError("Parameter productId is required."); 285 throw new core.ArgumentError("Parameter productId is required.");
281 } 286 }
282 if (skuId == null) { 287 if (skuId == null) {
283 throw new core.ArgumentError("Parameter skuId is required."); 288 throw new core.ArgumentError("Parameter skuId is required.");
284 } 289 }
285 if (customerId == null) { 290 if (customerId == null) {
286 throw new core.ArgumentError("Parameter customerId is required."); 291 throw new core.ArgumentError("Parameter customerId is required.");
287 } 292 }
288 _queryParams["customerId"] = [customerId]; 293 _queryParams["customerId"] = [customerId];
289 if (maxResults != null) { 294 if (maxResults != null) {
290 _queryParams["maxResults"] = ["${maxResults}"]; 295 _queryParams["maxResults"] = ["${maxResults}"];
291 } 296 }
292 if (pageToken != null) { 297 if (pageToken != null) {
293 _queryParams["pageToken"] = [pageToken]; 298 _queryParams["pageToken"] = [pageToken];
294 } 299 }
295 300
296 301
297 _url = common_internal.Escaper.ecapeVariable('$productId') + '/sku/' + commo n_internal.Escaper.ecapeVariable('$skuId') + '/users'; 302 _url = commons.Escaper.ecapeVariable('$productId') + '/sku/' + commons.Escap er.ecapeVariable('$skuId') + '/users';
298 303
299 var _response = _requester.request(_url, 304 var _response = _requester.request(_url,
300 "GET", 305 "GET",
301 body: _body, 306 body: _body,
302 queryParams: _queryParams, 307 queryParams: _queryParams,
303 uploadOptions: _uploadOptions, 308 uploadOptions: _uploadOptions,
304 uploadMedia: _uploadMedia, 309 uploadMedia: _uploadMedia,
305 downloadOptions: _downloadOptions); 310 downloadOptions: _downloadOptions);
306 return _response.then((data) => new LicenseAssignmentList.fromJson(data)); 311 return _response.then((data) => new LicenseAssignmentList.fromJson(data));
307 } 312 }
308 313
309 /** 314 /**
310 * Assign License. This method supports patch semantics. 315 * Assign License. This method supports patch semantics.
311 * 316 *
312 * [request] - The metadata request object. 317 * [request] - The metadata request object.
313 * 318 *
314 * Request parameters: 319 * Request parameters:
315 * 320 *
316 * [productId] - Name for product 321 * [productId] - Name for product
317 * 322 *
318 * [skuId] - Name for sku for which license would be revoked 323 * [skuId] - Name for sku for which license would be revoked
319 * 324 *
320 * [userId] - email id or unique Id of the user 325 * [userId] - email id or unique Id of the user
321 * 326 *
322 * Completes with a [LicenseAssignment]. 327 * Completes with a [LicenseAssignment].
323 * 328 *
324 * Completes with a [common.ApiRequestError] if the API endpoint returned an 329 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
325 * error. 330 * error.
326 * 331 *
327 * If the used [http.Client] completes with an error when making a REST call, 332 * If the used [http.Client] completes with an error when making a REST call,
328 * this method will complete with the same error. 333 * this method will complete with the same error.
329 */ 334 */
330 async.Future<LicenseAssignment> patch(LicenseAssignment request, core.String p roductId, core.String skuId, core.String userId) { 335 async.Future<LicenseAssignment> patch(LicenseAssignment request, core.String p roductId, core.String skuId, core.String userId) {
331 var _url = null; 336 var _url = null;
332 var _queryParams = new core.Map(); 337 var _queryParams = new core.Map();
333 var _uploadMedia = null; 338 var _uploadMedia = null;
334 var _uploadOptions = null; 339 var _uploadOptions = null;
335 var _downloadOptions = common.DownloadOptions.Metadata; 340 var _downloadOptions = commons.DownloadOptions.Metadata;
336 var _body = null; 341 var _body = null;
337 342
338 if (request != null) { 343 if (request != null) {
339 _body = convert.JSON.encode((request).toJson()); 344 _body = convert.JSON.encode((request).toJson());
340 } 345 }
341 if (productId == null) { 346 if (productId == null) {
342 throw new core.ArgumentError("Parameter productId is required."); 347 throw new core.ArgumentError("Parameter productId is required.");
343 } 348 }
344 if (skuId == null) { 349 if (skuId == null) {
345 throw new core.ArgumentError("Parameter skuId is required."); 350 throw new core.ArgumentError("Parameter skuId is required.");
346 } 351 }
347 if (userId == null) { 352 if (userId == null) {
348 throw new core.ArgumentError("Parameter userId is required."); 353 throw new core.ArgumentError("Parameter userId is required.");
349 } 354 }
350 355
351 356
352 _url = common_internal.Escaper.ecapeVariable('$productId') + '/sku/' + commo n_internal.Escaper.ecapeVariable('$skuId') + '/user/' + common_internal.Escaper. ecapeVariable('$userId'); 357 _url = commons.Escaper.ecapeVariable('$productId') + '/sku/' + commons.Escap er.ecapeVariable('$skuId') + '/user/' + commons.Escaper.ecapeVariable('$userId') ;
353 358
354 var _response = _requester.request(_url, 359 var _response = _requester.request(_url,
355 "PATCH", 360 "PATCH",
356 body: _body, 361 body: _body,
357 queryParams: _queryParams, 362 queryParams: _queryParams,
358 uploadOptions: _uploadOptions, 363 uploadOptions: _uploadOptions,
359 uploadMedia: _uploadMedia, 364 uploadMedia: _uploadMedia,
360 downloadOptions: _downloadOptions); 365 downloadOptions: _downloadOptions);
361 return _response.then((data) => new LicenseAssignment.fromJson(data)); 366 return _response.then((data) => new LicenseAssignment.fromJson(data));
362 } 367 }
363 368
364 /** 369 /**
365 * Assign License. 370 * Assign License.
366 * 371 *
367 * [request] - The metadata request object. 372 * [request] - The metadata request object.
368 * 373 *
369 * Request parameters: 374 * Request parameters:
370 * 375 *
371 * [productId] - Name for product 376 * [productId] - Name for product
372 * 377 *
373 * [skuId] - Name for sku for which license would be revoked 378 * [skuId] - Name for sku for which license would be revoked
374 * 379 *
375 * [userId] - email id or unique Id of the user 380 * [userId] - email id or unique Id of the user
376 * 381 *
377 * Completes with a [LicenseAssignment]. 382 * Completes with a [LicenseAssignment].
378 * 383 *
379 * Completes with a [common.ApiRequestError] if the API endpoint returned an 384 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
380 * error. 385 * error.
381 * 386 *
382 * If the used [http.Client] completes with an error when making a REST call, 387 * If the used [http.Client] completes with an error when making a REST call,
383 * this method will complete with the same error. 388 * this method will complete with the same error.
384 */ 389 */
385 async.Future<LicenseAssignment> update(LicenseAssignment request, core.String productId, core.String skuId, core.String userId) { 390 async.Future<LicenseAssignment> update(LicenseAssignment request, core.String productId, core.String skuId, core.String userId) {
386 var _url = null; 391 var _url = null;
387 var _queryParams = new core.Map(); 392 var _queryParams = new core.Map();
388 var _uploadMedia = null; 393 var _uploadMedia = null;
389 var _uploadOptions = null; 394 var _uploadOptions = null;
390 var _downloadOptions = common.DownloadOptions.Metadata; 395 var _downloadOptions = commons.DownloadOptions.Metadata;
391 var _body = null; 396 var _body = null;
392 397
393 if (request != null) { 398 if (request != null) {
394 _body = convert.JSON.encode((request).toJson()); 399 _body = convert.JSON.encode((request).toJson());
395 } 400 }
396 if (productId == null) { 401 if (productId == null) {
397 throw new core.ArgumentError("Parameter productId is required."); 402 throw new core.ArgumentError("Parameter productId is required.");
398 } 403 }
399 if (skuId == null) { 404 if (skuId == null) {
400 throw new core.ArgumentError("Parameter skuId is required."); 405 throw new core.ArgumentError("Parameter skuId is required.");
401 } 406 }
402 if (userId == null) { 407 if (userId == null) {
403 throw new core.ArgumentError("Parameter userId is required."); 408 throw new core.ArgumentError("Parameter userId is required.");
404 } 409 }
405 410
406 411
407 _url = common_internal.Escaper.ecapeVariable('$productId') + '/sku/' + commo n_internal.Escaper.ecapeVariable('$skuId') + '/user/' + common_internal.Escaper. ecapeVariable('$userId'); 412 _url = commons.Escaper.ecapeVariable('$productId') + '/sku/' + commons.Escap er.ecapeVariable('$skuId') + '/user/' + commons.Escaper.ecapeVariable('$userId') ;
408 413
409 var _response = _requester.request(_url, 414 var _response = _requester.request(_url,
410 "PUT", 415 "PUT",
411 body: _body, 416 body: _body,
412 queryParams: _queryParams, 417 queryParams: _queryParams,
413 uploadOptions: _uploadOptions, 418 uploadOptions: _uploadOptions,
414 uploadMedia: _uploadMedia, 419 uploadMedia: _uploadMedia,
415 downloadOptions: _downloadOptions); 420 downloadOptions: _downloadOptions);
416 return _response.then((data) => new LicenseAssignment.fromJson(data)); 421 return _response.then((data) => new LicenseAssignment.fromJson(data));
417 } 422 }
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 } 563 }
559 if (kind != null) { 564 if (kind != null) {
560 _json["kind"] = kind; 565 _json["kind"] = kind;
561 } 566 }
562 if (nextPageToken != null) { 567 if (nextPageToken != null) {
563 _json["nextPageToken"] = nextPageToken; 568 _json["nextPageToken"] = nextPageToken;
564 } 569 }
565 return _json; 570 return _json;
566 } 571 }
567 } 572 }
568
569
OLDNEW
« no previous file with comments | « generated/googleapis/lib/identitytoolkit/v3.dart ('k') | generated/googleapis/lib/mapsengine/v1.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698