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

Side by Side Diff: generated/googleapis/lib/partners/v2.dart

Issue 2973303002: Api-Roll 51: 2017-07-10 (Closed)
Patch Set: Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « generated/googleapis/lib/monitoring/v3.dart ('k') | generated/googleapis/lib/people/v1.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // This is a generated file (see the discoveryapis_generator project). 1 // This is a generated file (see the discoveryapis_generator project).
2 2
3 library googleapis.partners.v2; 3 library googleapis.partners.v2;
4 4
5 import 'dart:core' as core; 5 import 'dart:core' as core;
6 import 'dart:async' as async; 6 import 'dart:async' as async;
7 import 'dart:convert' as convert; 7 import 'dart:convert' as convert;
8 8
9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons;
10 import 'package:http/http.dart' as http; 10 import 'package:http/http.dart' as http;
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 * only 234 * only
235 * `address` and `address desc` is supported which will sorted by closest to 235 * `address` and `address desc` is supported which will sorted by closest to
236 * farthest in distance from given address and farthest to closest distance 236 * farthest in distance from given address and farthest to closest distance
237 * from given address respectively. 237 * from given address respectively.
238 * 238 *
239 * [requestMetadata_trafficSource_trafficSubId] - Second level identifier to 239 * [requestMetadata_trafficSource_trafficSubId] - Second level identifier to
240 * indicate where the traffic comes from. 240 * indicate where the traffic comes from.
241 * An identifier has multiple letters created by a team which redirected the 241 * An identifier has multiple letters created by a team which redirected the
242 * traffic to us. 242 * traffic to us.
243 * 243 *
244 * [requestMetadata_partnersSessionId] - Google Partners session ID.
245 *
244 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate 246 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate
245 * instead of the user's ID. 247 * instead of the user's ID.
246 * 248 *
247 * [requestMetadata_partnersSessionId] - Google Partners session ID.
248 *
249 * [view] - The view of `Company` resource to be returned. This must not be 249 * [view] - The view of `Company` resource to be returned. This must not be
250 * `COMPANY_VIEW_UNSPECIFIED`. 250 * `COMPANY_VIEW_UNSPECIFIED`.
251 * Possible string values are: 251 * Possible string values are:
252 * - "COMPANY_VIEW_UNSPECIFIED" : A COMPANY_VIEW_UNSPECIFIED. 252 * - "COMPANY_VIEW_UNSPECIFIED" : A COMPANY_VIEW_UNSPECIFIED.
253 * - "CV_GOOGLE_PARTNER_SEARCH" : A CV_GOOGLE_PARTNER_SEARCH. 253 * - "CV_GOOGLE_PARTNER_SEARCH" : A CV_GOOGLE_PARTNER_SEARCH.
254 * 254 *
255 * [requestMetadata_locale] - Locale to use for the current request.
256 *
257 * [address] - The address to use for sorting the company's addresses by 255 * [address] - The address to use for sorting the company's addresses by
258 * proximity. 256 * proximity.
259 * If not given, the geo-located address of the request is used. 257 * If not given, the geo-located address of the request is used.
260 * Used when order_by is set. 258 * Used when order_by is set.
261 * 259 *
260 * [requestMetadata_locale] - Locale to use for the current request.
261 *
262 * Completes with a [GetCompanyResponse]. 262 * Completes with a [GetCompanyResponse].
263 * 263 *
264 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 264 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
265 * error. 265 * error.
266 * 266 *
267 * If the used [http.Client] completes with an error when making a REST call, 267 * If the used [http.Client] completes with an error when making a REST call,
268 * this method will complete with the same error. 268 * this method will complete with the same error.
269 */ 269 */
270 async.Future<GetCompanyResponse> get(core.String companyId, {core.String reque stMetadata_trafficSource_trafficSourceId, core.String requestMetadata_userOverri des_ipAddress, core.List<core.String> requestMetadata_experimentIds, core.String currencyCode, core.String orderBy, core.String requestMetadata_trafficSource_tr afficSubId, core.String requestMetadata_userOverrides_userId, core.String reques tMetadata_partnersSessionId, core.String view, core.String requestMetadata_local e, core.String address}) { 270 async.Future<GetCompanyResponse> get(core.String companyId, {core.String reque stMetadata_trafficSource_trafficSourceId, core.String requestMetadata_userOverri des_ipAddress, core.List<core.String> requestMetadata_experimentIds, core.String currencyCode, core.String orderBy, core.String requestMetadata_trafficSource_tr afficSubId, core.String requestMetadata_partnersSessionId, core.String requestMe tadata_userOverrides_userId, core.String view, core.String address, core.String requestMetadata_locale}) {
271 var _url = null; 271 var _url = null;
272 var _queryParams = new core.Map(); 272 var _queryParams = new core.Map();
273 var _uploadMedia = null; 273 var _uploadMedia = null;
274 var _uploadOptions = null; 274 var _uploadOptions = null;
275 var _downloadOptions = commons.DownloadOptions.Metadata; 275 var _downloadOptions = commons.DownloadOptions.Metadata;
276 var _body = null; 276 var _body = null;
277 277
278 if (companyId == null) { 278 if (companyId == null) {
279 throw new core.ArgumentError("Parameter companyId is required."); 279 throw new core.ArgumentError("Parameter companyId is required.");
280 } 280 }
281 if (requestMetadata_trafficSource_trafficSourceId != null) { 281 if (requestMetadata_trafficSource_trafficSourceId != null) {
282 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe tadata_trafficSource_trafficSourceId]; 282 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe tadata_trafficSource_trafficSourceId];
283 } 283 }
284 if (requestMetadata_userOverrides_ipAddress != null) { 284 if (requestMetadata_userOverrides_ipAddress != null) {
285 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata _userOverrides_ipAddress]; 285 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata _userOverrides_ipAddress];
286 } 286 }
287 if (requestMetadata_experimentIds != null) { 287 if (requestMetadata_experimentIds != null) {
288 _queryParams["requestMetadata.experimentIds"] = requestMetadata_experiment Ids; 288 _queryParams["requestMetadata.experimentIds"] = requestMetadata_experiment Ids;
289 } 289 }
290 if (currencyCode != null) { 290 if (currencyCode != null) {
291 _queryParams["currencyCode"] = [currencyCode]; 291 _queryParams["currencyCode"] = [currencyCode];
292 } 292 }
293 if (orderBy != null) { 293 if (orderBy != null) {
294 _queryParams["orderBy"] = [orderBy]; 294 _queryParams["orderBy"] = [orderBy];
295 } 295 }
296 if (requestMetadata_trafficSource_trafficSubId != null) { 296 if (requestMetadata_trafficSource_trafficSubId != null) {
297 _queryParams["requestMetadata.trafficSource.trafficSubId"] = [requestMetad ata_trafficSource_trafficSubId]; 297 _queryParams["requestMetadata.trafficSource.trafficSubId"] = [requestMetad ata_trafficSource_trafficSubId];
298 } 298 }
299 if (requestMetadata_partnersSessionId != null) {
300 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn ersSessionId];
301 }
299 if (requestMetadata_userOverrides_userId != null) { 302 if (requestMetadata_userOverrides_userId != null) {
300 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us erOverrides_userId]; 303 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us erOverrides_userId];
301 } 304 }
302 if (requestMetadata_partnersSessionId != null) {
303 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn ersSessionId];
304 }
305 if (view != null) { 305 if (view != null) {
306 _queryParams["view"] = [view]; 306 _queryParams["view"] = [view];
307 } 307 }
308 if (address != null) {
309 _queryParams["address"] = [address];
310 }
308 if (requestMetadata_locale != null) { 311 if (requestMetadata_locale != null) {
309 _queryParams["requestMetadata.locale"] = [requestMetadata_locale]; 312 _queryParams["requestMetadata.locale"] = [requestMetadata_locale];
310 } 313 }
311 if (address != null) {
312 _queryParams["address"] = [address];
313 }
314 314
315 _url = 'v2/companies/' + commons.Escaper.ecapeVariable('$companyId'); 315 _url = 'v2/companies/' + commons.Escaper.ecapeVariable('$companyId');
316 316
317 var _response = _requester.request(_url, 317 var _response = _requester.request(_url,
318 "GET", 318 "GET",
319 body: _body, 319 body: _body,
320 queryParams: _queryParams, 320 queryParams: _queryParams,
321 uploadOptions: _uploadOptions, 321 uploadOptions: _uploadOptions,
322 uploadMedia: _uploadMedia, 322 uploadMedia: _uploadMedia,
323 downloadOptions: _downloadOptions); 323 downloadOptions: _downloadOptions);
324 return _response.then((data) => new GetCompanyResponse.fromJson(data)); 324 return _response.then((data) => new GetCompanyResponse.fromJson(data));
325 } 325 }
326 326
327 /** 327 /**
328 * Lists companies. 328 * Lists companies.
329 * 329 *
330 * Request parameters: 330 * Request parameters:
331 * 331 *
332 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate
333 * instead of the user's ID.
334 *
335 * [minMonthlyBudget_currencyCode] - The 3-letter currency code defined in ISO
336 * 4217.
337 *
338 * [view] - The view of the `Company` resource to be returned. This must not
339 * be
340 * `COMPANY_VIEW_UNSPECIFIED`.
341 * Possible string values are:
342 * - "COMPANY_VIEW_UNSPECIFIED" : A COMPANY_VIEW_UNSPECIFIED.
343 * - "CV_GOOGLE_PARTNER_SEARCH" : A CV_GOOGLE_PARTNER_SEARCH.
344 *
345 * [requestMetadata_locale] - Locale to use for the current request.
346 *
347 * [address] - The address to use when searching for companies.
348 * If not given, the geo-located address of the request is used.
349 *
350 * [minMonthlyBudget_units] - The whole units of the amount.
351 * For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
352 *
353 * [maxMonthlyBudget_nanos] - Number of nano (10^-9) units of the amount.
354 * The value must be between -999,999,999 and +999,999,999 inclusive.
355 * If `units` is positive, `nanos` must be positive or zero.
356 * If `units` is zero, `nanos` can be positive, zero, or negative.
357 * If `units` is negative, `nanos` must be negative or zero.
358 * For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
359 *
360 * [services] - List of services that the returned agencies should provide. If
361 * this is
362 * not empty, any returned agency must have at least one of these services,
363 * or one of the specializations in the "specializations" field.
364 *
332 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate 365 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate
333 * where the traffic comes from. 366 * where the traffic comes from.
334 * An identifier has multiple letters created by a team which redirected the 367 * An identifier has multiple letters created by a team which redirected the
335 * traffic to us. 368 * traffic to us.
336 * 369 *
337 * [maxMonthlyBudget_units] - The whole units of the amount. 370 * [maxMonthlyBudget_units] - The whole units of the amount.
338 * For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. 371 * For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
339 * 372 *
340 * [requestMetadata_trafficSource_trafficSubId] - Second level identifier to 373 * [requestMetadata_trafficSource_trafficSubId] - Second level identifier to
341 * indicate where the traffic comes from. 374 * indicate where the traffic comes from.
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 * from given address respectively. 423 * from given address respectively.
391 * 424 *
392 * [specializations] - List of specializations that the returned agencies 425 * [specializations] - List of specializations that the returned agencies
393 * should provide. If this 426 * should provide. If this
394 * is not empty, any returned agency must have at least one of these 427 * is not empty, any returned agency must have at least one of these
395 * specializations, or one of the services in the "services" field. 428 * specializations, or one of the services in the "services" field.
396 * 429 *
397 * [maxMonthlyBudget_currencyCode] - The 3-letter currency code defined in ISO 430 * [maxMonthlyBudget_currencyCode] - The 3-letter currency code defined in ISO
398 * 4217. 431 * 4217.
399 * 432 *
400 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate
401 * instead of the user's ID.
402 *
403 * [minMonthlyBudget_currencyCode] - The 3-letter currency code defined in ISO
404 * 4217.
405 *
406 * [view] - The view of the `Company` resource to be returned. This must not
407 * be
408 * `COMPANY_VIEW_UNSPECIFIED`.
409 * Possible string values are:
410 * - "COMPANY_VIEW_UNSPECIFIED" : A COMPANY_VIEW_UNSPECIFIED.
411 * - "CV_GOOGLE_PARTNER_SEARCH" : A CV_GOOGLE_PARTNER_SEARCH.
412 *
413 * [address] - The address to use when searching for companies.
414 * If not given, the geo-located address of the request is used.
415 *
416 * [requestMetadata_locale] - Locale to use for the current request.
417 *
418 * [minMonthlyBudget_units] - The whole units of the amount.
419 * For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
420 *
421 * [maxMonthlyBudget_nanos] - Number of nano (10^-9) units of the amount.
422 * The value must be between -999,999,999 and +999,999,999 inclusive.
423 * If `units` is positive, `nanos` must be positive or zero.
424 * If `units` is zero, `nanos` can be positive, zero, or negative.
425 * If `units` is negative, `nanos` must be negative or zero.
426 * For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
427 *
428 * [services] - List of services that the returned agencies should provide. If
429 * this is
430 * not empty, any returned agency must have at least one of these services,
431 * or one of the specializations in the "specializations" field.
432 *
433 * Completes with a [ListCompaniesResponse]. 433 * Completes with a [ListCompaniesResponse].
434 * 434 *
435 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 435 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
436 * error. 436 * error.
437 * 437 *
438 * If the used [http.Client] completes with an error when making a REST call, 438 * If the used [http.Client] completes with an error when making a REST call,
439 * this method will complete with the same error. 439 * this method will complete with the same error.
440 */ 440 */
441 async.Future<ListCompaniesResponse> list({core.String requestMetadata_trafficS ource_trafficSourceId, core.String maxMonthlyBudget_units, core.String requestMe tadata_trafficSource_trafficSubId, core.int minMonthlyBudget_nanos, core.String requestMetadata_partnersSessionId, core.String companyName, core.String pageToke n, core.List<core.String> industries, core.String websiteUrl, core.List<core.Str ing> gpsMotivations, core.List<core.String> languageCodes, core.int pageSize, co re.String requestMetadata_userOverrides_ipAddress, core.List<core.String> reques tMetadata_experimentIds, core.String orderBy, core.List<core.String> specializat ions, core.String maxMonthlyBudget_currencyCode, core.String requestMetadata_use rOverrides_userId, core.String minMonthlyBudget_currencyCode, core.String view, core.String address, core.String requestMetadata_locale, core.String minMonthlyB udget_units, core.int maxMonthlyBudget_nanos, core.List<core.String> services}) { 441 async.Future<ListCompaniesResponse> list({core.String requestMetadata_userOver rides_userId, core.String minMonthlyBudget_currencyCode, core.String view, core. String requestMetadata_locale, core.String address, core.String minMonthlyBudget _units, core.int maxMonthlyBudget_nanos, core.List<core.String> services, core.S tring requestMetadata_trafficSource_trafficSourceId, core.String maxMonthlyBudge t_units, core.String requestMetadata_trafficSource_trafficSubId, core.int minMon thlyBudget_nanos, core.String requestMetadata_partnersSessionId, core.String com panyName, core.String pageToken, core.List<core.String> industries, core.String websiteUrl, core.List<core.String> gpsMotivations, core.List<core.String> langua geCodes, core.int pageSize, core.String requestMetadata_userOverrides_ipAddress, core.List<core.String> requestMetadata_experimentIds, core.String orderBy, core .List<core.String> specializations, core.String maxMonthlyBudget_currencyCode}) {
442 var _url = null; 442 var _url = null;
443 var _queryParams = new core.Map(); 443 var _queryParams = new core.Map();
444 var _uploadMedia = null; 444 var _uploadMedia = null;
445 var _uploadOptions = null; 445 var _uploadOptions = null;
446 var _downloadOptions = commons.DownloadOptions.Metadata; 446 var _downloadOptions = commons.DownloadOptions.Metadata;
447 var _body = null; 447 var _body = null;
448 448
449 if (requestMetadata_userOverrides_userId != null) {
450 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us erOverrides_userId];
451 }
452 if (minMonthlyBudget_currencyCode != null) {
453 _queryParams["minMonthlyBudget.currencyCode"] = [minMonthlyBudget_currency Code];
454 }
455 if (view != null) {
456 _queryParams["view"] = [view];
457 }
458 if (requestMetadata_locale != null) {
459 _queryParams["requestMetadata.locale"] = [requestMetadata_locale];
460 }
461 if (address != null) {
462 _queryParams["address"] = [address];
463 }
464 if (minMonthlyBudget_units != null) {
465 _queryParams["minMonthlyBudget.units"] = [minMonthlyBudget_units];
466 }
467 if (maxMonthlyBudget_nanos != null) {
468 _queryParams["maxMonthlyBudget.nanos"] = ["${maxMonthlyBudget_nanos}"];
469 }
470 if (services != null) {
471 _queryParams["services"] = services;
472 }
449 if (requestMetadata_trafficSource_trafficSourceId != null) { 473 if (requestMetadata_trafficSource_trafficSourceId != null) {
450 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe tadata_trafficSource_trafficSourceId]; 474 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe tadata_trafficSource_trafficSourceId];
451 } 475 }
452 if (maxMonthlyBudget_units != null) { 476 if (maxMonthlyBudget_units != null) {
453 _queryParams["maxMonthlyBudget.units"] = [maxMonthlyBudget_units]; 477 _queryParams["maxMonthlyBudget.units"] = [maxMonthlyBudget_units];
454 } 478 }
455 if (requestMetadata_trafficSource_trafficSubId != null) { 479 if (requestMetadata_trafficSource_trafficSubId != null) {
456 _queryParams["requestMetadata.trafficSource.trafficSubId"] = [requestMetad ata_trafficSource_trafficSubId]; 480 _queryParams["requestMetadata.trafficSource.trafficSubId"] = [requestMetad ata_trafficSource_trafficSubId];
457 } 481 }
458 if (minMonthlyBudget_nanos != null) { 482 if (minMonthlyBudget_nanos != null) {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 } 514 }
491 if (orderBy != null) { 515 if (orderBy != null) {
492 _queryParams["orderBy"] = [orderBy]; 516 _queryParams["orderBy"] = [orderBy];
493 } 517 }
494 if (specializations != null) { 518 if (specializations != null) {
495 _queryParams["specializations"] = specializations; 519 _queryParams["specializations"] = specializations;
496 } 520 }
497 if (maxMonthlyBudget_currencyCode != null) { 521 if (maxMonthlyBudget_currencyCode != null) {
498 _queryParams["maxMonthlyBudget.currencyCode"] = [maxMonthlyBudget_currency Code]; 522 _queryParams["maxMonthlyBudget.currencyCode"] = [maxMonthlyBudget_currency Code];
499 } 523 }
500 if (requestMetadata_userOverrides_userId != null) {
501 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us erOverrides_userId];
502 }
503 if (minMonthlyBudget_currencyCode != null) {
504 _queryParams["minMonthlyBudget.currencyCode"] = [minMonthlyBudget_currency Code];
505 }
506 if (view != null) {
507 _queryParams["view"] = [view];
508 }
509 if (address != null) {
510 _queryParams["address"] = [address];
511 }
512 if (requestMetadata_locale != null) {
513 _queryParams["requestMetadata.locale"] = [requestMetadata_locale];
514 }
515 if (minMonthlyBudget_units != null) {
516 _queryParams["minMonthlyBudget.units"] = [minMonthlyBudget_units];
517 }
518 if (maxMonthlyBudget_nanos != null) {
519 _queryParams["maxMonthlyBudget.nanos"] = ["${maxMonthlyBudget_nanos}"];
520 }
521 if (services != null) {
522 _queryParams["services"] = services;
523 }
524 524
525 _url = 'v2/companies'; 525 _url = 'v2/companies';
526 526
527 var _response = _requester.request(_url, 527 var _response = _requester.request(_url,
528 "GET", 528 "GET",
529 body: _body, 529 body: _body,
530 queryParams: _queryParams, 530 queryParams: _queryParams,
531 uploadOptions: _uploadOptions, 531 uploadOptions: _uploadOptions,
532 uploadMedia: _uploadMedia, 532 uploadMedia: _uploadMedia,
533 downloadOptions: _downloadOptions); 533 downloadOptions: _downloadOptions);
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 * - "CET_ADWORDS_ADVANCED_SEARCH" : A CET_ADWORDS_ADVANCED_SEARCH. 609 * - "CET_ADWORDS_ADVANCED_SEARCH" : A CET_ADWORDS_ADVANCED_SEARCH.
610 * - "CET_ADWORDS_ADVANCED_DISPLAY" : A CET_ADWORDS_ADVANCED_DISPLAY. 610 * - "CET_ADWORDS_ADVANCED_DISPLAY" : A CET_ADWORDS_ADVANCED_DISPLAY.
611 * - "CET_VIDEO_ADS" : A CET_VIDEO_ADS. 611 * - "CET_VIDEO_ADS" : A CET_VIDEO_ADS.
612 * - "CET_DOUBLECLICK" : A CET_DOUBLECLICK. 612 * - "CET_DOUBLECLICK" : A CET_DOUBLECLICK.
613 * - "CET_ANALYTICS" : A CET_ANALYTICS. 613 * - "CET_ANALYTICS" : A CET_ANALYTICS.
614 * - "CET_SHOPPING" : A CET_SHOPPING. 614 * - "CET_SHOPPING" : A CET_SHOPPING.
615 * - "CET_MOBILE" : A CET_MOBILE. 615 * - "CET_MOBILE" : A CET_MOBILE.
616 * - "CET_DIGITAL_SALES" : A CET_DIGITAL_SALES. 616 * - "CET_DIGITAL_SALES" : A CET_DIGITAL_SALES.
617 * - "CET_MOBILE_SITES" : A CET_MOBILE_SITES. 617 * - "CET_MOBILE_SITES" : A CET_MOBILE_SITES.
618 * 618 *
619 * [requestMetadata_trafficSource_trafficSubId] - Second level identifier to
620 * indicate where the traffic comes from.
621 * An identifier has multiple letters created by a team which redirected the
622 * traffic to us.
623 *
624 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate 619 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate
625 * instead of the user's ID. 620 * instead of the user's ID.
626 * 621 *
627 * [requestMetadata_partnersSessionId] - Google Partners session ID. 622 * [requestMetadata_partnersSessionId] - Google Partners session ID.
628 * 623 *
629 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate 624 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate
630 * where the traffic comes from. 625 * where the traffic comes from.
631 * An identifier has multiple letters created by a team which redirected the 626 * An identifier has multiple letters created by a team which redirected the
632 * traffic to us. 627 * traffic to us.
633 * 628 *
634 * [requestMetadata_locale] - Locale to use for the current request. 629 * [requestMetadata_locale] - Locale to use for the current request.
635 * 630 *
636 * [requestMetadata_userOverrides_ipAddress] - IP address to use instead of 631 * [requestMetadata_userOverrides_ipAddress] - IP address to use instead of
637 * the user's geo-located IP address. 632 * the user's geo-located IP address.
638 * 633 *
639 * [requestMetadata_experimentIds] - Experiment IDs the current request 634 * [requestMetadata_experimentIds] - Experiment IDs the current request
640 * belongs to. 635 * belongs to.
641 * 636 *
637 * [requestMetadata_trafficSource_trafficSubId] - Second level identifier to
638 * indicate where the traffic comes from.
639 * An identifier has multiple letters created by a team which redirected the
640 * traffic to us.
641 *
642 * Completes with a [ExamToken]. 642 * Completes with a [ExamToken].
643 * 643 *
644 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 644 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
645 * error. 645 * error.
646 * 646 *
647 * If the used [http.Client] completes with an error when making a REST call, 647 * If the used [http.Client] completes with an error when making a REST call,
648 * this method will complete with the same error. 648 * this method will complete with the same error.
649 */ 649 */
650 async.Future<ExamToken> getToken(core.String examType, {core.String requestMet adata_trafficSource_trafficSubId, core.String requestMetadata_userOverrides_user Id, core.String requestMetadata_partnersSessionId, core.String requestMetadata_t rafficSource_trafficSourceId, core.String requestMetadata_locale, core.String re questMetadata_userOverrides_ipAddress, core.List<core.String> requestMetadata_ex perimentIds}) { 650 async.Future<ExamToken> getToken(core.String examType, {core.String requestMet adata_userOverrides_userId, core.String requestMetadata_partnersSessionId, core. String requestMetadata_trafficSource_trafficSourceId, core.String requestMetadat a_locale, core.String requestMetadata_userOverrides_ipAddress, core.List<core.St ring> requestMetadata_experimentIds, core.String requestMetadata_trafficSource_t rafficSubId}) {
651 var _url = null; 651 var _url = null;
652 var _queryParams = new core.Map(); 652 var _queryParams = new core.Map();
653 var _uploadMedia = null; 653 var _uploadMedia = null;
654 var _uploadOptions = null; 654 var _uploadOptions = null;
655 var _downloadOptions = commons.DownloadOptions.Metadata; 655 var _downloadOptions = commons.DownloadOptions.Metadata;
656 var _body = null; 656 var _body = null;
657 657
658 if (examType == null) { 658 if (examType == null) {
659 throw new core.ArgumentError("Parameter examType is required."); 659 throw new core.ArgumentError("Parameter examType is required.");
660 } 660 }
661 if (requestMetadata_trafficSource_trafficSubId != null) {
662 _queryParams["requestMetadata.trafficSource.trafficSubId"] = [requestMetad ata_trafficSource_trafficSubId];
663 }
664 if (requestMetadata_userOverrides_userId != null) { 661 if (requestMetadata_userOverrides_userId != null) {
665 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us erOverrides_userId]; 662 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us erOverrides_userId];
666 } 663 }
667 if (requestMetadata_partnersSessionId != null) { 664 if (requestMetadata_partnersSessionId != null) {
668 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn ersSessionId]; 665 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn ersSessionId];
669 } 666 }
670 if (requestMetadata_trafficSource_trafficSourceId != null) { 667 if (requestMetadata_trafficSource_trafficSourceId != null) {
671 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe tadata_trafficSource_trafficSourceId]; 668 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe tadata_trafficSource_trafficSourceId];
672 } 669 }
673 if (requestMetadata_locale != null) { 670 if (requestMetadata_locale != null) {
674 _queryParams["requestMetadata.locale"] = [requestMetadata_locale]; 671 _queryParams["requestMetadata.locale"] = [requestMetadata_locale];
675 } 672 }
676 if (requestMetadata_userOverrides_ipAddress != null) { 673 if (requestMetadata_userOverrides_ipAddress != null) {
677 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata _userOverrides_ipAddress]; 674 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata _userOverrides_ipAddress];
678 } 675 }
679 if (requestMetadata_experimentIds != null) { 676 if (requestMetadata_experimentIds != null) {
680 _queryParams["requestMetadata.experimentIds"] = requestMetadata_experiment Ids; 677 _queryParams["requestMetadata.experimentIds"] = requestMetadata_experiment Ids;
681 } 678 }
679 if (requestMetadata_trafficSource_trafficSubId != null) {
680 _queryParams["requestMetadata.trafficSource.trafficSubId"] = [requestMetad ata_trafficSource_trafficSubId];
681 }
682 682
683 _url = 'v2/exams/' + commons.Escaper.ecapeVariable('$examType') + '/token'; 683 _url = 'v2/exams/' + commons.Escaper.ecapeVariable('$examType') + '/token';
684 684
685 var _response = _requester.request(_url, 685 var _response = _requester.request(_url,
686 "GET", 686 "GET",
687 body: _body, 687 body: _body,
688 queryParams: _queryParams, 688 queryParams: _queryParams,
689 uploadOptions: _uploadOptions, 689 uploadOptions: _uploadOptions,
690 uploadMedia: _uploadMedia, 690 uploadMedia: _uploadMedia,
691 downloadOptions: _downloadOptions); 691 downloadOptions: _downloadOptions);
692 return _response.then((data) => new ExamToken.fromJson(data)); 692 return _response.then((data) => new ExamToken.fromJson(data));
693 } 693 }
694 694
695 } 695 }
696 696
697 697
698 class LeadsResourceApi { 698 class LeadsResourceApi {
699 final commons.ApiRequester _requester; 699 final commons.ApiRequester _requester;
700 700
701 LeadsResourceApi(commons.ApiRequester client) : 701 LeadsResourceApi(commons.ApiRequester client) :
702 _requester = client; 702 _requester = client;
703 703
704 /** 704 /**
705 * Lists advertiser leads for a user's associated company. 705 * Lists advertiser leads for a user's associated company.
706 * Should only be called within the context of an authorized logged in user. 706 * Should only be called within the context of an authorized logged in user.
707 * 707 *
708 * Request parameters: 708 * Request parameters:
709 * 709 *
710 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate
711 * instead of the user's ID.
712 *
713 * [requestMetadata_partnersSessionId] - Google Partners session ID.
714 *
715 * [pageToken] - A token identifying a page of results that the server
716 * returns.
717 * Typically, this is the value of `ListLeadsResponse.next_page_token`
718 * returned from the previous call to
719 * ListLeads.
720 *
710 * [pageSize] - Requested page size. Server may return fewer leads than 721 * [pageSize] - Requested page size. Server may return fewer leads than
711 * requested. 722 * requested.
712 * If unspecified, server picks an appropriate default. 723 * If unspecified, server picks an appropriate default.
713 * 724 *
714 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate 725 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate
715 * where the traffic comes from. 726 * where the traffic comes from.
716 * An identifier has multiple letters created by a team which redirected the 727 * An identifier has multiple letters created by a team which redirected the
717 * traffic to us. 728 * traffic to us.
718 * 729 *
719 * [requestMetadata_locale] - Locale to use for the current request. 730 * [requestMetadata_locale] - Locale to use for the current request.
720 * 731 *
721 * [requestMetadata_userOverrides_ipAddress] - IP address to use instead of 732 * [requestMetadata_userOverrides_ipAddress] - IP address to use instead of
722 * the user's geo-located IP address. 733 * the user's geo-located IP address.
723 * 734 *
724 * [requestMetadata_experimentIds] - Experiment IDs the current request 735 * [requestMetadata_experimentIds] - Experiment IDs the current request
725 * belongs to. 736 * belongs to.
726 * 737 *
727 * [orderBy] - How to order Leads. Currently, only `create_time` 738 * [orderBy] - How to order Leads. Currently, only `create_time`
728 * and `create_time desc` are supported 739 * and `create_time desc` are supported
729 * 740 *
730 * [requestMetadata_trafficSource_trafficSubId] - Second level identifier to 741 * [requestMetadata_trafficSource_trafficSubId] - Second level identifier to
731 * indicate where the traffic comes from. 742 * indicate where the traffic comes from.
732 * An identifier has multiple letters created by a team which redirected the 743 * An identifier has multiple letters created by a team which redirected the
733 * traffic to us. 744 * traffic to us.
734 * 745 *
735 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate
736 * instead of the user's ID.
737 *
738 * [requestMetadata_partnersSessionId] - Google Partners session ID.
739 *
740 * [pageToken] - A token identifying a page of results that the server
741 * returns.
742 * Typically, this is the value of `ListLeadsResponse.next_page_token`
743 * returned from the previous call to
744 * ListLeads.
745 *
746 * Completes with a [ListLeadsResponse]. 746 * Completes with a [ListLeadsResponse].
747 * 747 *
748 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 748 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
749 * error. 749 * error.
750 * 750 *
751 * If the used [http.Client] completes with an error when making a REST call, 751 * If the used [http.Client] completes with an error when making a REST call,
752 * this method will complete with the same error. 752 * this method will complete with the same error.
753 */ 753 */
754 async.Future<ListLeadsResponse> list({core.int pageSize, core.String requestMe tadata_trafficSource_trafficSourceId, core.String requestMetadata_locale, core.S tring requestMetadata_userOverrides_ipAddress, core.List<core.String> requestMet adata_experimentIds, core.String orderBy, core.String requestMetadata_trafficSou rce_trafficSubId, core.String requestMetadata_userOverrides_userId, core.String requestMetadata_partnersSessionId, core.String pageToken}) { 754 async.Future<ListLeadsResponse> list({core.String requestMetadata_userOverride s_userId, core.String requestMetadata_partnersSessionId, core.String pageToken, core.int pageSize, core.String requestMetadata_trafficSource_trafficSourceId, co re.String requestMetadata_locale, core.String requestMetadata_userOverrides_ipAd dress, core.List<core.String> requestMetadata_experimentIds, core.String orderBy , core.String requestMetadata_trafficSource_trafficSubId}) {
755 var _url = null; 755 var _url = null;
756 var _queryParams = new core.Map(); 756 var _queryParams = new core.Map();
757 var _uploadMedia = null; 757 var _uploadMedia = null;
758 var _uploadOptions = null; 758 var _uploadOptions = null;
759 var _downloadOptions = commons.DownloadOptions.Metadata; 759 var _downloadOptions = commons.DownloadOptions.Metadata;
760 var _body = null; 760 var _body = null;
761 761
762 if (requestMetadata_userOverrides_userId != null) {
763 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us erOverrides_userId];
764 }
765 if (requestMetadata_partnersSessionId != null) {
766 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn ersSessionId];
767 }
768 if (pageToken != null) {
769 _queryParams["pageToken"] = [pageToken];
770 }
762 if (pageSize != null) { 771 if (pageSize != null) {
763 _queryParams["pageSize"] = ["${pageSize}"]; 772 _queryParams["pageSize"] = ["${pageSize}"];
764 } 773 }
765 if (requestMetadata_trafficSource_trafficSourceId != null) { 774 if (requestMetadata_trafficSource_trafficSourceId != null) {
766 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe tadata_trafficSource_trafficSourceId]; 775 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe tadata_trafficSource_trafficSourceId];
767 } 776 }
768 if (requestMetadata_locale != null) { 777 if (requestMetadata_locale != null) {
769 _queryParams["requestMetadata.locale"] = [requestMetadata_locale]; 778 _queryParams["requestMetadata.locale"] = [requestMetadata_locale];
770 } 779 }
771 if (requestMetadata_userOverrides_ipAddress != null) { 780 if (requestMetadata_userOverrides_ipAddress != null) {
772 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata _userOverrides_ipAddress]; 781 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata _userOverrides_ipAddress];
773 } 782 }
774 if (requestMetadata_experimentIds != null) { 783 if (requestMetadata_experimentIds != null) {
775 _queryParams["requestMetadata.experimentIds"] = requestMetadata_experiment Ids; 784 _queryParams["requestMetadata.experimentIds"] = requestMetadata_experiment Ids;
776 } 785 }
777 if (orderBy != null) { 786 if (orderBy != null) {
778 _queryParams["orderBy"] = [orderBy]; 787 _queryParams["orderBy"] = [orderBy];
779 } 788 }
780 if (requestMetadata_trafficSource_trafficSubId != null) { 789 if (requestMetadata_trafficSource_trafficSubId != null) {
781 _queryParams["requestMetadata.trafficSource.trafficSubId"] = [requestMetad ata_trafficSource_trafficSubId]; 790 _queryParams["requestMetadata.trafficSource.trafficSubId"] = [requestMetad ata_trafficSource_trafficSubId];
782 } 791 }
783 if (requestMetadata_userOverrides_userId != null) {
784 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us erOverrides_userId];
785 }
786 if (requestMetadata_partnersSessionId != null) {
787 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn ersSessionId];
788 }
789 if (pageToken != null) {
790 _queryParams["pageToken"] = [pageToken];
791 }
792 792
793 _url = 'v2/leads'; 793 _url = 'v2/leads';
794 794
795 var _response = _requester.request(_url, 795 var _response = _requester.request(_url,
796 "GET", 796 "GET",
797 body: _body, 797 body: _body,
798 queryParams: _queryParams, 798 queryParams: _queryParams,
799 uploadOptions: _uploadOptions, 799 uploadOptions: _uploadOptions,
800 uploadMedia: _uploadMedia, 800 uploadMedia: _uploadMedia,
801 downloadOptions: _downloadOptions); 801 downloadOptions: _downloadOptions);
802 return _response.then((data) => new ListLeadsResponse.fromJson(data)); 802 return _response.then((data) => new ListLeadsResponse.fromJson(data));
803 } 803 }
804 804
805 } 805 }
806 806
807 807
808 class OffersResourceApi { 808 class OffersResourceApi {
809 final commons.ApiRequester _requester; 809 final commons.ApiRequester _requester;
810 810
811 OffersHistoryResourceApi get history => new OffersHistoryResourceApi(_requeste r); 811 OffersHistoryResourceApi get history => new OffersHistoryResourceApi(_requeste r);
812 812
813 OffersResourceApi(commons.ApiRequester client) : 813 OffersResourceApi(commons.ApiRequester client) :
814 _requester = client; 814 _requester = client;
815 815
816 /** 816 /**
817 * Lists the Offers available for the current user 817 * Lists the Offers available for the current user
818 * 818 *
819 * Request parameters: 819 * Request parameters:
820 * 820 *
821 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate
822 * instead of the user's ID.
823 *
824 * [requestMetadata_partnersSessionId] - Google Partners session ID.
825 *
826 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate 821 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate
827 * where the traffic comes from. 822 * where the traffic comes from.
828 * An identifier has multiple letters created by a team which redirected the 823 * An identifier has multiple letters created by a team which redirected the
829 * traffic to us. 824 * traffic to us.
830 * 825 *
831 * [requestMetadata_locale] - Locale to use for the current request. 826 * [requestMetadata_locale] - Locale to use for the current request.
832 * 827 *
833 * [requestMetadata_userOverrides_ipAddress] - IP address to use instead of 828 * [requestMetadata_userOverrides_ipAddress] - IP address to use instead of
834 * the user's geo-located IP address. 829 * the user's geo-located IP address.
835 * 830 *
836 * [requestMetadata_experimentIds] - Experiment IDs the current request 831 * [requestMetadata_experimentIds] - Experiment IDs the current request
837 * belongs to. 832 * belongs to.
838 * 833 *
839 * [requestMetadata_trafficSource_trafficSubId] - Second level identifier to 834 * [requestMetadata_trafficSource_trafficSubId] - Second level identifier to
840 * indicate where the traffic comes from. 835 * indicate where the traffic comes from.
841 * An identifier has multiple letters created by a team which redirected the 836 * An identifier has multiple letters created by a team which redirected the
842 * traffic to us. 837 * traffic to us.
843 * 838 *
839 * [requestMetadata_partnersSessionId] - Google Partners session ID.
840 *
841 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate
842 * instead of the user's ID.
843 *
844 * Completes with a [ListOffersResponse]. 844 * Completes with a [ListOffersResponse].
845 * 845 *
846 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 846 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
847 * error. 847 * error.
848 * 848 *
849 * If the used [http.Client] completes with an error when making a REST call, 849 * If the used [http.Client] completes with an error when making a REST call,
850 * this method will complete with the same error. 850 * this method will complete with the same error.
851 */ 851 */
852 async.Future<ListOffersResponse> list({core.String requestMetadata_userOverrid es_userId, core.String requestMetadata_partnersSessionId, core.String requestMet adata_trafficSource_trafficSourceId, core.String requestMetadata_locale, core.St ring requestMetadata_userOverrides_ipAddress, core.List<core.String> requestMeta data_experimentIds, core.String requestMetadata_trafficSource_trafficSubId}) { 852 async.Future<ListOffersResponse> list({core.String requestMetadata_trafficSour ce_trafficSourceId, core.String requestMetadata_locale, core.String requestMetad ata_userOverrides_ipAddress, core.List<core.String> requestMetadata_experimentId s, core.String requestMetadata_trafficSource_trafficSubId, core.String requestMe tadata_partnersSessionId, core.String requestMetadata_userOverrides_userId}) {
853 var _url = null; 853 var _url = null;
854 var _queryParams = new core.Map(); 854 var _queryParams = new core.Map();
855 var _uploadMedia = null; 855 var _uploadMedia = null;
856 var _uploadOptions = null; 856 var _uploadOptions = null;
857 var _downloadOptions = commons.DownloadOptions.Metadata; 857 var _downloadOptions = commons.DownloadOptions.Metadata;
858 var _body = null; 858 var _body = null;
859 859
860 if (requestMetadata_userOverrides_userId != null) {
861 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us erOverrides_userId];
862 }
863 if (requestMetadata_partnersSessionId != null) {
864 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn ersSessionId];
865 }
866 if (requestMetadata_trafficSource_trafficSourceId != null) { 860 if (requestMetadata_trafficSource_trafficSourceId != null) {
867 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe tadata_trafficSource_trafficSourceId]; 861 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe tadata_trafficSource_trafficSourceId];
868 } 862 }
869 if (requestMetadata_locale != null) { 863 if (requestMetadata_locale != null) {
870 _queryParams["requestMetadata.locale"] = [requestMetadata_locale]; 864 _queryParams["requestMetadata.locale"] = [requestMetadata_locale];
871 } 865 }
872 if (requestMetadata_userOverrides_ipAddress != null) { 866 if (requestMetadata_userOverrides_ipAddress != null) {
873 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata _userOverrides_ipAddress]; 867 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata _userOverrides_ipAddress];
874 } 868 }
875 if (requestMetadata_experimentIds != null) { 869 if (requestMetadata_experimentIds != null) {
876 _queryParams["requestMetadata.experimentIds"] = requestMetadata_experiment Ids; 870 _queryParams["requestMetadata.experimentIds"] = requestMetadata_experiment Ids;
877 } 871 }
878 if (requestMetadata_trafficSource_trafficSubId != null) { 872 if (requestMetadata_trafficSource_trafficSubId != null) {
879 _queryParams["requestMetadata.trafficSource.trafficSubId"] = [requestMetad ata_trafficSource_trafficSubId]; 873 _queryParams["requestMetadata.trafficSource.trafficSubId"] = [requestMetad ata_trafficSource_trafficSubId];
880 } 874 }
875 if (requestMetadata_partnersSessionId != null) {
876 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn ersSessionId];
877 }
878 if (requestMetadata_userOverrides_userId != null) {
879 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us erOverrides_userId];
880 }
881 881
882 _url = 'v2/offers'; 882 _url = 'v2/offers';
883 883
884 var _response = _requester.request(_url, 884 var _response = _requester.request(_url,
885 "GET", 885 "GET",
886 body: _body, 886 body: _body,
887 queryParams: _queryParams, 887 queryParams: _queryParams,
888 uploadOptions: _uploadOptions, 888 uploadOptions: _uploadOptions,
889 uploadMedia: _uploadMedia, 889 uploadMedia: _uploadMedia,
890 downloadOptions: _downloadOptions); 890 downloadOptions: _downloadOptions);
891 return _response.then((data) => new ListOffersResponse.fromJson(data)); 891 return _response.then((data) => new ListOffersResponse.fromJson(data));
892 } 892 }
893 893
894 } 894 }
895 895
896 896
897 class OffersHistoryResourceApi { 897 class OffersHistoryResourceApi {
898 final commons.ApiRequester _requester; 898 final commons.ApiRequester _requester;
899 899
900 OffersHistoryResourceApi(commons.ApiRequester client) : 900 OffersHistoryResourceApi(commons.ApiRequester client) :
901 _requester = client; 901 _requester = client;
902 902
903 /** 903 /**
904 * Lists the Historical Offers for the current user (or user's entire company) 904 * Lists the Historical Offers for the current user (or user's entire company)
905 * 905 *
906 * Request parameters: 906 * Request parameters:
907 * 907 *
908 * [requestMetadata_partnersSessionId] - Google Partners session ID.
909 *
910 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate 908 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate
911 * instead of the user's ID. 909 * instead of the user's ID.
912 * 910 *
911 * [requestMetadata_partnersSessionId] - Google Partners session ID.
912 *
913 * [pageToken] - Token to retrieve a specific page. 913 * [pageToken] - Token to retrieve a specific page.
914 * 914 *
915 * [pageSize] - Maximum number of rows to return per page. 915 * [pageSize] - Maximum number of rows to return per page.
916 * 916 *
917 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate 917 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate
918 * where the traffic comes from. 918 * where the traffic comes from.
919 * An identifier has multiple letters created by a team which redirected the 919 * An identifier has multiple letters created by a team which redirected the
920 * traffic to us. 920 * traffic to us.
921 * 921 *
922 * [requestMetadata_locale] - Locale to use for the current request. 922 * [requestMetadata_locale] - Locale to use for the current request.
923 * 923 *
924 * [requestMetadata_userOverrides_ipAddress] - IP address to use instead of 924 * [requestMetadata_userOverrides_ipAddress] - IP address to use instead of
925 * the user's geo-located IP address. 925 * the user's geo-located IP address.
926 * 926 *
927 * [entireCompany] - if true, show history for the entire company. Requires 927 * [entireCompany] - if true, show history for the entire company. Requires
928 * user to be admin. 928 * user to be admin.
929 * 929 *
930 * [requestMetadata_experimentIds] - Experiment IDs the current request 930 * [requestMetadata_experimentIds] - Experiment IDs the current request
931 * belongs to. 931 * belongs to.
932 * 932 *
933 * [requestMetadata_trafficSource_trafficSubId] - Second level identifier to
934 * indicate where the traffic comes from.
935 * An identifier has multiple letters created by a team which redirected the
936 * traffic to us.
937 *
933 * [orderBy] - Comma-separated list of fields to order by, e.g.: 938 * [orderBy] - Comma-separated list of fields to order by, e.g.:
934 * "foo,bar,baz". 939 * "foo,bar,baz".
935 * Use "foo desc" to sort descending. 940 * Use "foo desc" to sort descending.
936 * List of valid field names is: name, offer_code, expiration_time, status, 941 * List of valid field names is: name, offer_code, expiration_time, status,
937 * last_modified_time, sender_name, creation_time, country_code, 942 * last_modified_time, sender_name, creation_time, country_code,
938 * offer_type. 943 * offer_type.
939 * 944 *
940 * [requestMetadata_trafficSource_trafficSubId] - Second level identifier to
941 * indicate where the traffic comes from.
942 * An identifier has multiple letters created by a team which redirected the
943 * traffic to us.
944 *
945 * Completes with a [ListOffersHistoryResponse]. 945 * Completes with a [ListOffersHistoryResponse].
946 * 946 *
947 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 947 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
948 * error. 948 * error.
949 * 949 *
950 * If the used [http.Client] completes with an error when making a REST call, 950 * If the used [http.Client] completes with an error when making a REST call,
951 * this method will complete with the same error. 951 * this method will complete with the same error.
952 */ 952 */
953 async.Future<ListOffersHistoryResponse> list({core.String requestMetadata_part nersSessionId, core.String requestMetadata_userOverrides_userId, core.String pag eToken, core.int pageSize, core.String requestMetadata_trafficSource_trafficSour ceId, core.String requestMetadata_locale, core.String requestMetadata_userOverri des_ipAddress, core.bool entireCompany, core.List<core.String> requestMetadata_e xperimentIds, core.String orderBy, core.String requestMetadata_trafficSource_tra fficSubId}) { 953 async.Future<ListOffersHistoryResponse> list({core.String requestMetadata_user Overrides_userId, core.String requestMetadata_partnersSessionId, core.String pag eToken, core.int pageSize, core.String requestMetadata_trafficSource_trafficSour ceId, core.String requestMetadata_locale, core.String requestMetadata_userOverri des_ipAddress, core.bool entireCompany, core.List<core.String> requestMetadata_e xperimentIds, core.String requestMetadata_trafficSource_trafficSubId, core.Strin g orderBy}) {
954 var _url = null; 954 var _url = null;
955 var _queryParams = new core.Map(); 955 var _queryParams = new core.Map();
956 var _uploadMedia = null; 956 var _uploadMedia = null;
957 var _uploadOptions = null; 957 var _uploadOptions = null;
958 var _downloadOptions = commons.DownloadOptions.Metadata; 958 var _downloadOptions = commons.DownloadOptions.Metadata;
959 var _body = null; 959 var _body = null;
960 960
961 if (requestMetadata_userOverrides_userId != null) {
962 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us erOverrides_userId];
963 }
961 if (requestMetadata_partnersSessionId != null) { 964 if (requestMetadata_partnersSessionId != null) {
962 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn ersSessionId]; 965 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn ersSessionId];
963 } 966 }
964 if (requestMetadata_userOverrides_userId != null) {
965 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us erOverrides_userId];
966 }
967 if (pageToken != null) { 967 if (pageToken != null) {
968 _queryParams["pageToken"] = [pageToken]; 968 _queryParams["pageToken"] = [pageToken];
969 } 969 }
970 if (pageSize != null) { 970 if (pageSize != null) {
971 _queryParams["pageSize"] = ["${pageSize}"]; 971 _queryParams["pageSize"] = ["${pageSize}"];
972 } 972 }
973 if (requestMetadata_trafficSource_trafficSourceId != null) { 973 if (requestMetadata_trafficSource_trafficSourceId != null) {
974 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe tadata_trafficSource_trafficSourceId]; 974 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe tadata_trafficSource_trafficSourceId];
975 } 975 }
976 if (requestMetadata_locale != null) { 976 if (requestMetadata_locale != null) {
977 _queryParams["requestMetadata.locale"] = [requestMetadata_locale]; 977 _queryParams["requestMetadata.locale"] = [requestMetadata_locale];
978 } 978 }
979 if (requestMetadata_userOverrides_ipAddress != null) { 979 if (requestMetadata_userOverrides_ipAddress != null) {
980 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata _userOverrides_ipAddress]; 980 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata _userOverrides_ipAddress];
981 } 981 }
982 if (entireCompany != null) { 982 if (entireCompany != null) {
983 _queryParams["entireCompany"] = ["${entireCompany}"]; 983 _queryParams["entireCompany"] = ["${entireCompany}"];
984 } 984 }
985 if (requestMetadata_experimentIds != null) { 985 if (requestMetadata_experimentIds != null) {
986 _queryParams["requestMetadata.experimentIds"] = requestMetadata_experiment Ids; 986 _queryParams["requestMetadata.experimentIds"] = requestMetadata_experiment Ids;
987 } 987 }
988 if (requestMetadata_trafficSource_trafficSubId != null) {
989 _queryParams["requestMetadata.trafficSource.trafficSubId"] = [requestMetad ata_trafficSource_trafficSubId];
990 }
988 if (orderBy != null) { 991 if (orderBy != null) {
989 _queryParams["orderBy"] = [orderBy]; 992 _queryParams["orderBy"] = [orderBy];
990 } 993 }
991 if (requestMetadata_trafficSource_trafficSubId != null) {
992 _queryParams["requestMetadata.trafficSource.trafficSubId"] = [requestMetad ata_trafficSource_trafficSubId];
993 }
994 994
995 _url = 'v2/offers/history'; 995 _url = 'v2/offers/history';
996 996
997 var _response = _requester.request(_url, 997 var _response = _requester.request(_url,
998 "GET", 998 "GET",
999 body: _body, 999 body: _body,
1000 queryParams: _queryParams, 1000 queryParams: _queryParams,
1001 uploadOptions: _uploadOptions, 1001 uploadOptions: _uploadOptions,
1002 uploadMedia: _uploadMedia, 1002 uploadMedia: _uploadMedia,
1003 downloadOptions: _downloadOptions); 1003 downloadOptions: _downloadOptions);
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
1059 final commons.ApiRequester _requester; 1059 final commons.ApiRequester _requester;
1060 1060
1061 UserStatesResourceApi(commons.ApiRequester client) : 1061 UserStatesResourceApi(commons.ApiRequester client) :
1062 _requester = client; 1062 _requester = client;
1063 1063
1064 /** 1064 /**
1065 * Lists states for current user. 1065 * Lists states for current user.
1066 * 1066 *
1067 * Request parameters: 1067 * Request parameters:
1068 * 1068 *
1069 * [requestMetadata_locale] - Locale to use for the current request.
1070 *
1071 * [requestMetadata_userOverrides_ipAddress] - IP address to use instead of 1069 * [requestMetadata_userOverrides_ipAddress] - IP address to use instead of
1072 * the user's geo-located IP address. 1070 * the user's geo-located IP address.
1073 * 1071 *
1074 * [requestMetadata_experimentIds] - Experiment IDs the current request 1072 * [requestMetadata_experimentIds] - Experiment IDs the current request
1075 * belongs to. 1073 * belongs to.
1076 * 1074 *
1077 * [requestMetadata_trafficSource_trafficSubId] - Second level identifier to 1075 * [requestMetadata_trafficSource_trafficSubId] - Second level identifier to
1078 * indicate where the traffic comes from. 1076 * indicate where the traffic comes from.
1079 * An identifier has multiple letters created by a team which redirected the 1077 * An identifier has multiple letters created by a team which redirected the
1080 * traffic to us. 1078 * traffic to us.
1081 * 1079 *
1082 * [requestMetadata_partnersSessionId] - Google Partners session ID.
1083 *
1084 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate 1080 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate
1085 * instead of the user's ID. 1081 * instead of the user's ID.
1086 * 1082 *
1083 * [requestMetadata_partnersSessionId] - Google Partners session ID.
1084 *
1087 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate 1085 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate
1088 * where the traffic comes from. 1086 * where the traffic comes from.
1089 * An identifier has multiple letters created by a team which redirected the 1087 * An identifier has multiple letters created by a team which redirected the
1090 * traffic to us. 1088 * traffic to us.
1091 * 1089 *
1090 * [requestMetadata_locale] - Locale to use for the current request.
1091 *
1092 * Completes with a [ListUserStatesResponse]. 1092 * Completes with a [ListUserStatesResponse].
1093 * 1093 *
1094 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1094 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1095 * error. 1095 * error.
1096 * 1096 *
1097 * If the used [http.Client] completes with an error when making a REST call, 1097 * If the used [http.Client] completes with an error when making a REST call,
1098 * this method will complete with the same error. 1098 * this method will complete with the same error.
1099 */ 1099 */
1100 async.Future<ListUserStatesResponse> list({core.String requestMetadata_locale, core.String requestMetadata_userOverrides_ipAddress, core.List<core.String> req uestMetadata_experimentIds, core.String requestMetadata_trafficSource_trafficSub Id, core.String requestMetadata_partnersSessionId, core.String requestMetadata_u serOverrides_userId, core.String requestMetadata_trafficSource_trafficSourceId}) { 1100 async.Future<ListUserStatesResponse> list({core.String requestMetadata_userOve rrides_ipAddress, core.List<core.String> requestMetadata_experimentIds, core.Str ing requestMetadata_trafficSource_trafficSubId, core.String requestMetadata_user Overrides_userId, core.String requestMetadata_partnersSessionId, core.String req uestMetadata_trafficSource_trafficSourceId, core.String requestMetadata_locale}) {
1101 var _url = null; 1101 var _url = null;
1102 var _queryParams = new core.Map(); 1102 var _queryParams = new core.Map();
1103 var _uploadMedia = null; 1103 var _uploadMedia = null;
1104 var _uploadOptions = null; 1104 var _uploadOptions = null;
1105 var _downloadOptions = commons.DownloadOptions.Metadata; 1105 var _downloadOptions = commons.DownloadOptions.Metadata;
1106 var _body = null; 1106 var _body = null;
1107 1107
1108 if (requestMetadata_locale != null) {
1109 _queryParams["requestMetadata.locale"] = [requestMetadata_locale];
1110 }
1111 if (requestMetadata_userOverrides_ipAddress != null) { 1108 if (requestMetadata_userOverrides_ipAddress != null) {
1112 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata _userOverrides_ipAddress]; 1109 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata _userOverrides_ipAddress];
1113 } 1110 }
1114 if (requestMetadata_experimentIds != null) { 1111 if (requestMetadata_experimentIds != null) {
1115 _queryParams["requestMetadata.experimentIds"] = requestMetadata_experiment Ids; 1112 _queryParams["requestMetadata.experimentIds"] = requestMetadata_experiment Ids;
1116 } 1113 }
1117 if (requestMetadata_trafficSource_trafficSubId != null) { 1114 if (requestMetadata_trafficSource_trafficSubId != null) {
1118 _queryParams["requestMetadata.trafficSource.trafficSubId"] = [requestMetad ata_trafficSource_trafficSubId]; 1115 _queryParams["requestMetadata.trafficSource.trafficSubId"] = [requestMetad ata_trafficSource_trafficSubId];
1119 } 1116 }
1117 if (requestMetadata_userOverrides_userId != null) {
1118 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us erOverrides_userId];
1119 }
1120 if (requestMetadata_partnersSessionId != null) { 1120 if (requestMetadata_partnersSessionId != null) {
1121 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn ersSessionId]; 1121 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn ersSessionId];
1122 } 1122 }
1123 if (requestMetadata_userOverrides_userId != null) {
1124 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us erOverrides_userId];
1125 }
1126 if (requestMetadata_trafficSource_trafficSourceId != null) { 1123 if (requestMetadata_trafficSource_trafficSourceId != null) {
1127 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe tadata_trafficSource_trafficSourceId]; 1124 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe tadata_trafficSource_trafficSourceId];
1128 } 1125 }
1126 if (requestMetadata_locale != null) {
1127 _queryParams["requestMetadata.locale"] = [requestMetadata_locale];
1128 }
1129 1129
1130 _url = 'v2/userStates'; 1130 _url = 'v2/userStates';
1131 1131
1132 var _response = _requester.request(_url, 1132 var _response = _requester.request(_url,
1133 "GET", 1133 "GET",
1134 body: _body, 1134 body: _body,
1135 queryParams: _queryParams, 1135 queryParams: _queryParams,
1136 uploadOptions: _uploadOptions, 1136 uploadOptions: _uploadOptions,
1137 uploadMedia: _uploadMedia, 1137 uploadMedia: _uploadMedia,
1138 downloadOptions: _downloadOptions); 1138 downloadOptions: _downloadOptions);
(...skipping 12 matching lines...) Expand all
1151 /** 1151 /**
1152 * Creates a user's company relation. Affiliates the user to a company. 1152 * Creates a user's company relation. Affiliates the user to a company.
1153 * 1153 *
1154 * [request] - The metadata request object. 1154 * [request] - The metadata request object.
1155 * 1155 *
1156 * Request parameters: 1156 * Request parameters:
1157 * 1157 *
1158 * [userId] - The ID of the user. Can be set to <code>me</code> to mean 1158 * [userId] - The ID of the user. Can be set to <code>me</code> to mean
1159 * the currently authenticated user. 1159 * the currently authenticated user.
1160 * 1160 *
1161 * [requestMetadata_experimentIds] - Experiment IDs the current request
1162 * belongs to.
1163 *
1164 * [requestMetadata_trafficSource_trafficSubId] - Second level identifier to
1165 * indicate where the traffic comes from.
1166 * An identifier has multiple letters created by a team which redirected the
1167 * traffic to us.
1168 *
1161 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate 1169 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate
1162 * instead of the user's ID. 1170 * instead of the user's ID.
1163 * 1171 *
1164 * [requestMetadata_partnersSessionId] - Google Partners session ID. 1172 * [requestMetadata_partnersSessionId] - Google Partners session ID.
1165 * 1173 *
1166 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate 1174 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate
1167 * where the traffic comes from. 1175 * where the traffic comes from.
1168 * An identifier has multiple letters created by a team which redirected the 1176 * An identifier has multiple letters created by a team which redirected the
1169 * traffic to us. 1177 * traffic to us.
1170 * 1178 *
1171 * [requestMetadata_locale] - Locale to use for the current request. 1179 * [requestMetadata_locale] - Locale to use for the current request.
1172 * 1180 *
1173 * [requestMetadata_userOverrides_ipAddress] - IP address to use instead of 1181 * [requestMetadata_userOverrides_ipAddress] - IP address to use instead of
1174 * the user's geo-located IP address. 1182 * the user's geo-located IP address.
1175 * 1183 *
1176 * [requestMetadata_experimentIds] - Experiment IDs the current request
1177 * belongs to.
1178 *
1179 * [requestMetadata_trafficSource_trafficSubId] - Second level identifier to
1180 * indicate where the traffic comes from.
1181 * An identifier has multiple letters created by a team which redirected the
1182 * traffic to us.
1183 *
1184 * Completes with a [CompanyRelation]. 1184 * Completes with a [CompanyRelation].
1185 * 1185 *
1186 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1186 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1187 * error. 1187 * error.
1188 * 1188 *
1189 * If the used [http.Client] completes with an error when making a REST call, 1189 * If the used [http.Client] completes with an error when making a REST call,
1190 * this method will complete with the same error. 1190 * this method will complete with the same error.
1191 */ 1191 */
1192 async.Future<CompanyRelation> createCompanyRelation(CompanyRelation request, c ore.String userId, {core.String requestMetadata_userOverrides_userId, core.Strin g requestMetadata_partnersSessionId, core.String requestMetadata_trafficSource_t rafficSourceId, core.String requestMetadata_locale, core.String requestMetadata_ userOverrides_ipAddress, core.List<core.String> requestMetadata_experimentIds, c ore.String requestMetadata_trafficSource_trafficSubId}) { 1192 async.Future<CompanyRelation> createCompanyRelation(CompanyRelation request, c ore.String userId, {core.List<core.String> requestMetadata_experimentIds, core.S tring requestMetadata_trafficSource_trafficSubId, core.String requestMetadata_us erOverrides_userId, core.String requestMetadata_partnersSessionId, core.String r equestMetadata_trafficSource_trafficSourceId, core.String requestMetadata_locale , core.String requestMetadata_userOverrides_ipAddress}) {
1193 var _url = null; 1193 var _url = null;
1194 var _queryParams = new core.Map(); 1194 var _queryParams = new core.Map();
1195 var _uploadMedia = null; 1195 var _uploadMedia = null;
1196 var _uploadOptions = null; 1196 var _uploadOptions = null;
1197 var _downloadOptions = commons.DownloadOptions.Metadata; 1197 var _downloadOptions = commons.DownloadOptions.Metadata;
1198 var _body = null; 1198 var _body = null;
1199 1199
1200 if (request != null) { 1200 if (request != null) {
1201 _body = convert.JSON.encode((request).toJson()); 1201 _body = convert.JSON.encode((request).toJson());
1202 } 1202 }
1203 if (userId == null) { 1203 if (userId == null) {
1204 throw new core.ArgumentError("Parameter userId is required."); 1204 throw new core.ArgumentError("Parameter userId is required.");
1205 } 1205 }
1206 if (requestMetadata_experimentIds != null) {
1207 _queryParams["requestMetadata.experimentIds"] = requestMetadata_experiment Ids;
1208 }
1209 if (requestMetadata_trafficSource_trafficSubId != null) {
1210 _queryParams["requestMetadata.trafficSource.trafficSubId"] = [requestMetad ata_trafficSource_trafficSubId];
1211 }
1206 if (requestMetadata_userOverrides_userId != null) { 1212 if (requestMetadata_userOverrides_userId != null) {
1207 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us erOverrides_userId]; 1213 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us erOverrides_userId];
1208 } 1214 }
1209 if (requestMetadata_partnersSessionId != null) { 1215 if (requestMetadata_partnersSessionId != null) {
1210 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn ersSessionId]; 1216 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn ersSessionId];
1211 } 1217 }
1212 if (requestMetadata_trafficSource_trafficSourceId != null) { 1218 if (requestMetadata_trafficSource_trafficSourceId != null) {
1213 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe tadata_trafficSource_trafficSourceId]; 1219 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe tadata_trafficSource_trafficSourceId];
1214 } 1220 }
1215 if (requestMetadata_locale != null) { 1221 if (requestMetadata_locale != null) {
1216 _queryParams["requestMetadata.locale"] = [requestMetadata_locale]; 1222 _queryParams["requestMetadata.locale"] = [requestMetadata_locale];
1217 } 1223 }
1218 if (requestMetadata_userOverrides_ipAddress != null) { 1224 if (requestMetadata_userOverrides_ipAddress != null) {
1219 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata _userOverrides_ipAddress]; 1225 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata _userOverrides_ipAddress];
1220 } 1226 }
1221 if (requestMetadata_experimentIds != null) {
1222 _queryParams["requestMetadata.experimentIds"] = requestMetadata_experiment Ids;
1223 }
1224 if (requestMetadata_trafficSource_trafficSubId != null) {
1225 _queryParams["requestMetadata.trafficSource.trafficSubId"] = [requestMetad ata_trafficSource_trafficSubId];
1226 }
1227 1227
1228 _url = 'v2/users/' + commons.Escaper.ecapeVariable('$userId') + '/companyRel ation'; 1228 _url = 'v2/users/' + commons.Escaper.ecapeVariable('$userId') + '/companyRel ation';
1229 1229
1230 var _response = _requester.request(_url, 1230 var _response = _requester.request(_url,
1231 "PUT", 1231 "PUT",
1232 body: _body, 1232 body: _body,
1233 queryParams: _queryParams, 1233 queryParams: _queryParams,
1234 uploadOptions: _uploadOptions, 1234 uploadOptions: _uploadOptions,
1235 uploadMedia: _uploadMedia, 1235 uploadMedia: _uploadMedia,
1236 downloadOptions: _downloadOptions); 1236 downloadOptions: _downloadOptions);
1237 return _response.then((data) => new CompanyRelation.fromJson(data)); 1237 return _response.then((data) => new CompanyRelation.fromJson(data));
1238 } 1238 }
1239 1239
1240 /** 1240 /**
1241 * Deletes a user's company relation. Unaffiliaites the user from a company. 1241 * Deletes a user's company relation. Unaffiliaites the user from a company.
1242 * 1242 *
1243 * Request parameters: 1243 * Request parameters:
1244 * 1244 *
1245 * [userId] - The ID of the user. Can be set to <code>me</code> to mean 1245 * [userId] - The ID of the user. Can be set to <code>me</code> to mean
1246 * the currently authenticated user. 1246 * the currently authenticated user.
1247 * 1247 *
1248 * [requestMetadata_experimentIds] - Experiment IDs the current request 1248 * [requestMetadata_experimentIds] - Experiment IDs the current request
1249 * belongs to. 1249 * belongs to.
1250 * 1250 *
1251 * [requestMetadata_trafficSource_trafficSubId] - Second level identifier to 1251 * [requestMetadata_trafficSource_trafficSubId] - Second level identifier to
1252 * indicate where the traffic comes from. 1252 * indicate where the traffic comes from.
1253 * An identifier has multiple letters created by a team which redirected the 1253 * An identifier has multiple letters created by a team which redirected the
1254 * traffic to us. 1254 * traffic to us.
1255 * 1255 *
1256 * [requestMetadata_partnersSessionId] - Google Partners session ID.
1257 *
1258 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate 1256 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate
1259 * instead of the user's ID. 1257 * instead of the user's ID.
1260 * 1258 *
1259 * [requestMetadata_partnersSessionId] - Google Partners session ID.
1260 *
1261 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate 1261 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate
1262 * where the traffic comes from. 1262 * where the traffic comes from.
1263 * An identifier has multiple letters created by a team which redirected the 1263 * An identifier has multiple letters created by a team which redirected the
1264 * traffic to us. 1264 * traffic to us.
1265 * 1265 *
1266 * [requestMetadata_locale] - Locale to use for the current request. 1266 * [requestMetadata_locale] - Locale to use for the current request.
1267 * 1267 *
1268 * [requestMetadata_userOverrides_ipAddress] - IP address to use instead of 1268 * [requestMetadata_userOverrides_ipAddress] - IP address to use instead of
1269 * the user's geo-located IP address. 1269 * the user's geo-located IP address.
1270 * 1270 *
1271 * Completes with a [Empty]. 1271 * Completes with a [Empty].
1272 * 1272 *
1273 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1273 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1274 * error. 1274 * error.
1275 * 1275 *
1276 * If the used [http.Client] completes with an error when making a REST call, 1276 * If the used [http.Client] completes with an error when making a REST call,
1277 * this method will complete with the same error. 1277 * this method will complete with the same error.
1278 */ 1278 */
1279 async.Future<Empty> deleteCompanyRelation(core.String userId, {core.List<core. String> requestMetadata_experimentIds, core.String requestMetadata_trafficSource _trafficSubId, core.String requestMetadata_partnersSessionId, core.String reques tMetadata_userOverrides_userId, core.String requestMetadata_trafficSource_traffi cSourceId, core.String requestMetadata_locale, core.String requestMetadata_userO verrides_ipAddress}) { 1279 async.Future<Empty> deleteCompanyRelation(core.String userId, {core.List<core. String> requestMetadata_experimentIds, core.String requestMetadata_trafficSource _trafficSubId, core.String requestMetadata_userOverrides_userId, core.String req uestMetadata_partnersSessionId, core.String requestMetadata_trafficSource_traffi cSourceId, core.String requestMetadata_locale, core.String requestMetadata_userO verrides_ipAddress}) {
1280 var _url = null; 1280 var _url = null;
1281 var _queryParams = new core.Map(); 1281 var _queryParams = new core.Map();
1282 var _uploadMedia = null; 1282 var _uploadMedia = null;
1283 var _uploadOptions = null; 1283 var _uploadOptions = null;
1284 var _downloadOptions = commons.DownloadOptions.Metadata; 1284 var _downloadOptions = commons.DownloadOptions.Metadata;
1285 var _body = null; 1285 var _body = null;
1286 1286
1287 if (userId == null) { 1287 if (userId == null) {
1288 throw new core.ArgumentError("Parameter userId is required."); 1288 throw new core.ArgumentError("Parameter userId is required.");
1289 } 1289 }
1290 if (requestMetadata_experimentIds != null) { 1290 if (requestMetadata_experimentIds != null) {
1291 _queryParams["requestMetadata.experimentIds"] = requestMetadata_experiment Ids; 1291 _queryParams["requestMetadata.experimentIds"] = requestMetadata_experiment Ids;
1292 } 1292 }
1293 if (requestMetadata_trafficSource_trafficSubId != null) { 1293 if (requestMetadata_trafficSource_trafficSubId != null) {
1294 _queryParams["requestMetadata.trafficSource.trafficSubId"] = [requestMetad ata_trafficSource_trafficSubId]; 1294 _queryParams["requestMetadata.trafficSource.trafficSubId"] = [requestMetad ata_trafficSource_trafficSubId];
1295 } 1295 }
1296 if (requestMetadata_userOverrides_userId != null) {
1297 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us erOverrides_userId];
1298 }
1296 if (requestMetadata_partnersSessionId != null) { 1299 if (requestMetadata_partnersSessionId != null) {
1297 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn ersSessionId]; 1300 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn ersSessionId];
1298 } 1301 }
1299 if (requestMetadata_userOverrides_userId != null) {
1300 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us erOverrides_userId];
1301 }
1302 if (requestMetadata_trafficSource_trafficSourceId != null) { 1302 if (requestMetadata_trafficSource_trafficSourceId != null) {
1303 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe tadata_trafficSource_trafficSourceId]; 1303 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe tadata_trafficSource_trafficSourceId];
1304 } 1304 }
1305 if (requestMetadata_locale != null) { 1305 if (requestMetadata_locale != null) {
1306 _queryParams["requestMetadata.locale"] = [requestMetadata_locale]; 1306 _queryParams["requestMetadata.locale"] = [requestMetadata_locale];
1307 } 1307 }
1308 if (requestMetadata_userOverrides_ipAddress != null) { 1308 if (requestMetadata_userOverrides_ipAddress != null) {
1309 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata _userOverrides_ipAddress]; 1309 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata _userOverrides_ipAddress];
1310 } 1310 }
1311 1311
(...skipping 11 matching lines...) Expand all
1323 1323
1324 /** 1324 /**
1325 * Gets a user. 1325 * Gets a user.
1326 * 1326 *
1327 * Request parameters: 1327 * Request parameters:
1328 * 1328 *
1329 * [userId] - Identifier of the user. Can be set to <code>me</code> to mean 1329 * [userId] - Identifier of the user. Can be set to <code>me</code> to mean
1330 * the currently 1330 * the currently
1331 * authenticated user. 1331 * authenticated user.
1332 * 1332 *
1333 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate
1334 * instead of the user's ID.
1335 *
1336 * [requestMetadata_partnersSessionId] - Google Partners session ID.
1337 *
1338 * [userView] - Specifies what parts of the user information to return.
1339 * Possible string values are:
1340 * - "BASIC" : A BASIC.
1341 * - "PROFILE" : A PROFILE.
1342 * - "PUBLIC_PROFILE" : A PUBLIC_PROFILE.
1343 *
1333 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate 1344 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate
1334 * where the traffic comes from. 1345 * where the traffic comes from.
1335 * An identifier has multiple letters created by a team which redirected the 1346 * An identifier has multiple letters created by a team which redirected the
1336 * traffic to us. 1347 * traffic to us.
1337 * 1348 *
1338 * [requestMetadata_locale] - Locale to use for the current request. 1349 * [requestMetadata_locale] - Locale to use for the current request.
1339 * 1350 *
1340 * [requestMetadata_userOverrides_ipAddress] - IP address to use instead of 1351 * [requestMetadata_userOverrides_ipAddress] - IP address to use instead of
1341 * the user's geo-located IP address. 1352 * the user's geo-located IP address.
1342 * 1353 *
1343 * [requestMetadata_experimentIds] - Experiment IDs the current request 1354 * [requestMetadata_experimentIds] - Experiment IDs the current request
1344 * belongs to. 1355 * belongs to.
1345 * 1356 *
1346 * [requestMetadata_trafficSource_trafficSubId] - Second level identifier to 1357 * [requestMetadata_trafficSource_trafficSubId] - Second level identifier to
1347 * indicate where the traffic comes from. 1358 * indicate where the traffic comes from.
1348 * An identifier has multiple letters created by a team which redirected the 1359 * An identifier has multiple letters created by a team which redirected the
1349 * traffic to us. 1360 * traffic to us.
1350 * 1361 *
1351 * [requestMetadata_partnersSessionId] - Google Partners session ID.
1352 *
1353 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate
1354 * instead of the user's ID.
1355 *
1356 * [userView] - Specifies what parts of the user information to return.
1357 * Possible string values are:
1358 * - "BASIC" : A BASIC.
1359 * - "PROFILE" : A PROFILE.
1360 * - "PUBLIC_PROFILE" : A PUBLIC_PROFILE.
1361 *
1362 * Completes with a [User]. 1362 * Completes with a [User].
1363 * 1363 *
1364 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1364 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1365 * error. 1365 * error.
1366 * 1366 *
1367 * If the used [http.Client] completes with an error when making a REST call, 1367 * If the used [http.Client] completes with an error when making a REST call,
1368 * this method will complete with the same error. 1368 * this method will complete with the same error.
1369 */ 1369 */
1370 async.Future<User> get(core.String userId, {core.String requestMetadata_traffi cSource_trafficSourceId, core.String requestMetadata_locale, core.String request Metadata_userOverrides_ipAddress, core.List<core.String> requestMetadata_experim entIds, core.String requestMetadata_trafficSource_trafficSubId, core.String requ estMetadata_partnersSessionId, core.String requestMetadata_userOverrides_userId, core.String userView}) { 1370 async.Future<User> get(core.String userId, {core.String requestMetadata_userOv errides_userId, core.String requestMetadata_partnersSessionId, core.String userV iew, core.String requestMetadata_trafficSource_trafficSourceId, core.String requ estMetadata_locale, core.String requestMetadata_userOverrides_ipAddress, core.Li st<core.String> requestMetadata_experimentIds, core.String requestMetadata_traff icSource_trafficSubId}) {
1371 var _url = null; 1371 var _url = null;
1372 var _queryParams = new core.Map(); 1372 var _queryParams = new core.Map();
1373 var _uploadMedia = null; 1373 var _uploadMedia = null;
1374 var _uploadOptions = null; 1374 var _uploadOptions = null;
1375 var _downloadOptions = commons.DownloadOptions.Metadata; 1375 var _downloadOptions = commons.DownloadOptions.Metadata;
1376 var _body = null; 1376 var _body = null;
1377 1377
1378 if (userId == null) { 1378 if (userId == null) {
1379 throw new core.ArgumentError("Parameter userId is required."); 1379 throw new core.ArgumentError("Parameter userId is required.");
1380 } 1380 }
1381 if (requestMetadata_userOverrides_userId != null) {
1382 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us erOverrides_userId];
1383 }
1384 if (requestMetadata_partnersSessionId != null) {
1385 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn ersSessionId];
1386 }
1387 if (userView != null) {
1388 _queryParams["userView"] = [userView];
1389 }
1381 if (requestMetadata_trafficSource_trafficSourceId != null) { 1390 if (requestMetadata_trafficSource_trafficSourceId != null) {
1382 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe tadata_trafficSource_trafficSourceId]; 1391 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe tadata_trafficSource_trafficSourceId];
1383 } 1392 }
1384 if (requestMetadata_locale != null) { 1393 if (requestMetadata_locale != null) {
1385 _queryParams["requestMetadata.locale"] = [requestMetadata_locale]; 1394 _queryParams["requestMetadata.locale"] = [requestMetadata_locale];
1386 } 1395 }
1387 if (requestMetadata_userOverrides_ipAddress != null) { 1396 if (requestMetadata_userOverrides_ipAddress != null) {
1388 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata _userOverrides_ipAddress]; 1397 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata _userOverrides_ipAddress];
1389 } 1398 }
1390 if (requestMetadata_experimentIds != null) { 1399 if (requestMetadata_experimentIds != null) {
1391 _queryParams["requestMetadata.experimentIds"] = requestMetadata_experiment Ids; 1400 _queryParams["requestMetadata.experimentIds"] = requestMetadata_experiment Ids;
1392 } 1401 }
1393 if (requestMetadata_trafficSource_trafficSubId != null) { 1402 if (requestMetadata_trafficSource_trafficSubId != null) {
1394 _queryParams["requestMetadata.trafficSource.trafficSubId"] = [requestMetad ata_trafficSource_trafficSubId]; 1403 _queryParams["requestMetadata.trafficSource.trafficSubId"] = [requestMetad ata_trafficSource_trafficSubId];
1395 } 1404 }
1396 if (requestMetadata_partnersSessionId != null) {
1397 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn ersSessionId];
1398 }
1399 if (requestMetadata_userOverrides_userId != null) {
1400 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us erOverrides_userId];
1401 }
1402 if (userView != null) {
1403 _queryParams["userView"] = [userView];
1404 }
1405 1405
1406 _url = 'v2/users/' + commons.Escaper.ecapeVariable('$userId'); 1406 _url = 'v2/users/' + commons.Escaper.ecapeVariable('$userId');
1407 1407
1408 var _response = _requester.request(_url, 1408 var _response = _requester.request(_url,
1409 "GET", 1409 "GET",
1410 body: _body, 1410 body: _body,
1411 queryParams: _queryParams, 1411 queryParams: _queryParams,
1412 uploadOptions: _uploadOptions, 1412 uploadOptions: _uploadOptions,
1413 uploadMedia: _uploadMedia, 1413 uploadMedia: _uploadMedia,
1414 downloadOptions: _downloadOptions); 1414 downloadOptions: _downloadOptions);
1415 return _response.then((data) => new User.fromJson(data)); 1415 return _response.then((data) => new User.fromJson(data));
1416 } 1416 }
1417 1417
1418 /** 1418 /**
1419 * Updates a user's profile. A user can only update their own profile and 1419 * Updates a user's profile. A user can only update their own profile and
1420 * should only be called within the context of a logged in user. 1420 * should only be called within the context of a logged in user.
1421 * 1421 *
1422 * [request] - The metadata request object. 1422 * [request] - The metadata request object.
1423 * 1423 *
1424 * Request parameters: 1424 * Request parameters:
1425 * 1425 *
1426 * [requestMetadata_trafficSource_trafficSubId] - Second level identifier to
1427 * indicate where the traffic comes from.
1428 * An identifier has multiple letters created by a team which redirected the
1429 * traffic to us.
1430 *
1431 * [requestMetadata_partnersSessionId] - Google Partners session ID. 1426 * [requestMetadata_partnersSessionId] - Google Partners session ID.
1432 * 1427 *
1433 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate 1428 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate
1434 * instead of the user's ID. 1429 * instead of the user's ID.
1435 * 1430 *
1436 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate 1431 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate
1437 * where the traffic comes from. 1432 * where the traffic comes from.
1438 * An identifier has multiple letters created by a team which redirected the 1433 * An identifier has multiple letters created by a team which redirected the
1439 * traffic to us. 1434 * traffic to us.
1440 * 1435 *
1441 * [requestMetadata_locale] - Locale to use for the current request. 1436 * [requestMetadata_locale] - Locale to use for the current request.
1442 * 1437 *
1443 * [requestMetadata_userOverrides_ipAddress] - IP address to use instead of 1438 * [requestMetadata_userOverrides_ipAddress] - IP address to use instead of
1444 * the user's geo-located IP address. 1439 * the user's geo-located IP address.
1445 * 1440 *
1446 * [requestMetadata_experimentIds] - Experiment IDs the current request 1441 * [requestMetadata_experimentIds] - Experiment IDs the current request
1447 * belongs to. 1442 * belongs to.
1448 * 1443 *
1444 * [requestMetadata_trafficSource_trafficSubId] - Second level identifier to
1445 * indicate where the traffic comes from.
1446 * An identifier has multiple letters created by a team which redirected the
1447 * traffic to us.
1448 *
1449 * Completes with a [UserProfile]. 1449 * Completes with a [UserProfile].
1450 * 1450 *
1451 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1451 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1452 * error. 1452 * error.
1453 * 1453 *
1454 * If the used [http.Client] completes with an error when making a REST call, 1454 * If the used [http.Client] completes with an error when making a REST call,
1455 * this method will complete with the same error. 1455 * this method will complete with the same error.
1456 */ 1456 */
1457 async.Future<UserProfile> updateProfile(UserProfile request, {core.String requ estMetadata_trafficSource_trafficSubId, core.String requestMetadata_partnersSess ionId, core.String requestMetadata_userOverrides_userId, core.String requestMeta data_trafficSource_trafficSourceId, core.String requestMetadata_locale, core.Str ing requestMetadata_userOverrides_ipAddress, core.List<core.String> requestMetad ata_experimentIds}) { 1457 async.Future<UserProfile> updateProfile(UserProfile request, {core.String requ estMetadata_partnersSessionId, core.String requestMetadata_userOverrides_userId, core.String requestMetadata_trafficSource_trafficSourceId, core.String requestM etadata_locale, core.String requestMetadata_userOverrides_ipAddress, core.List<c ore.String> requestMetadata_experimentIds, core.String requestMetadata_trafficSo urce_trafficSubId}) {
1458 var _url = null; 1458 var _url = null;
1459 var _queryParams = new core.Map(); 1459 var _queryParams = new core.Map();
1460 var _uploadMedia = null; 1460 var _uploadMedia = null;
1461 var _uploadOptions = null; 1461 var _uploadOptions = null;
1462 var _downloadOptions = commons.DownloadOptions.Metadata; 1462 var _downloadOptions = commons.DownloadOptions.Metadata;
1463 var _body = null; 1463 var _body = null;
1464 1464
1465 if (request != null) { 1465 if (request != null) {
1466 _body = convert.JSON.encode((request).toJson()); 1466 _body = convert.JSON.encode((request).toJson());
1467 } 1467 }
1468 if (requestMetadata_trafficSource_trafficSubId != null) {
1469 _queryParams["requestMetadata.trafficSource.trafficSubId"] = [requestMetad ata_trafficSource_trafficSubId];
1470 }
1471 if (requestMetadata_partnersSessionId != null) { 1468 if (requestMetadata_partnersSessionId != null) {
1472 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn ersSessionId]; 1469 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn ersSessionId];
1473 } 1470 }
1474 if (requestMetadata_userOverrides_userId != null) { 1471 if (requestMetadata_userOverrides_userId != null) {
1475 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us erOverrides_userId]; 1472 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us erOverrides_userId];
1476 } 1473 }
1477 if (requestMetadata_trafficSource_trafficSourceId != null) { 1474 if (requestMetadata_trafficSource_trafficSourceId != null) {
1478 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe tadata_trafficSource_trafficSourceId]; 1475 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe tadata_trafficSource_trafficSourceId];
1479 } 1476 }
1480 if (requestMetadata_locale != null) { 1477 if (requestMetadata_locale != null) {
1481 _queryParams["requestMetadata.locale"] = [requestMetadata_locale]; 1478 _queryParams["requestMetadata.locale"] = [requestMetadata_locale];
1482 } 1479 }
1483 if (requestMetadata_userOverrides_ipAddress != null) { 1480 if (requestMetadata_userOverrides_ipAddress != null) {
1484 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata _userOverrides_ipAddress]; 1481 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata _userOverrides_ipAddress];
1485 } 1482 }
1486 if (requestMetadata_experimentIds != null) { 1483 if (requestMetadata_experimentIds != null) {
1487 _queryParams["requestMetadata.experimentIds"] = requestMetadata_experiment Ids; 1484 _queryParams["requestMetadata.experimentIds"] = requestMetadata_experiment Ids;
1488 } 1485 }
1486 if (requestMetadata_trafficSource_trafficSubId != null) {
1487 _queryParams["requestMetadata.trafficSource.trafficSubId"] = [requestMetad ata_trafficSource_trafficSubId];
1488 }
1489 1489
1490 _url = 'v2/users/profile'; 1490 _url = 'v2/users/profile';
1491 1491
1492 var _response = _requester.request(_url, 1492 var _response = _requester.request(_url,
1493 "PATCH", 1493 "PATCH",
1494 body: _body, 1494 body: _body,
1495 queryParams: _queryParams, 1495 queryParams: _queryParams,
1496 uploadOptions: _uploadOptions, 1496 uploadOptions: _uploadOptions,
1497 uploadMedia: _uploadMedia, 1497 uploadMedia: _uploadMedia,
1498 downloadOptions: _downloadOptions); 1498 downloadOptions: _downloadOptions);
1499 return _response.then((data) => new UserProfile.fromJson(data)); 1499 return _response.then((data) => new UserProfile.fromJson(data));
1500 } 1500 }
1501 1501
1502 } 1502 }
1503 1503
1504 1504
1505 class V2ResourceApi { 1505 class V2ResourceApi {
1506 final commons.ApiRequester _requester; 1506 final commons.ApiRequester _requester;
1507 1507
1508 V2ResourceApi(commons.ApiRequester client) : 1508 V2ResourceApi(commons.ApiRequester client) :
1509 _requester = client; 1509 _requester = client;
1510 1510
1511 /** 1511 /**
1512 * Gets Partners Status of the logged in user's agency. 1512 * Gets Partners Status of the logged in user's agency.
1513 * Should only be called if the logged in user is the admin of the agency. 1513 * Should only be called if the logged in user is the admin of the agency.
1514 * 1514 *
1515 * Request parameters: 1515 * Request parameters:
1516 * 1516 *
1517 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate
1518 * instead of the user's ID.
1519 *
1520 * [requestMetadata_partnersSessionId] - Google Partners session ID.
1521 *
1517 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate 1522 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate
1518 * where the traffic comes from. 1523 * where the traffic comes from.
1519 * An identifier has multiple letters created by a team which redirected the 1524 * An identifier has multiple letters created by a team which redirected the
1520 * traffic to us. 1525 * traffic to us.
1521 * 1526 *
1522 * [requestMetadata_locale] - Locale to use for the current request. 1527 * [requestMetadata_locale] - Locale to use for the current request.
1523 * 1528 *
1524 * [requestMetadata_userOverrides_ipAddress] - IP address to use instead of 1529 * [requestMetadata_userOverrides_ipAddress] - IP address to use instead of
1525 * the user's geo-located IP address. 1530 * the user's geo-located IP address.
1526 * 1531 *
1527 * [requestMetadata_experimentIds] - Experiment IDs the current request 1532 * [requestMetadata_experimentIds] - Experiment IDs the current request
1528 * belongs to. 1533 * belongs to.
1529 * 1534 *
1530 * [requestMetadata_trafficSource_trafficSubId] - Second level identifier to 1535 * [requestMetadata_trafficSource_trafficSubId] - Second level identifier to
1531 * indicate where the traffic comes from. 1536 * indicate where the traffic comes from.
1532 * An identifier has multiple letters created by a team which redirected the 1537 * An identifier has multiple letters created by a team which redirected the
1533 * traffic to us. 1538 * traffic to us.
1534 * 1539 *
1535 * [requestMetadata_partnersSessionId] - Google Partners session ID.
1536 *
1537 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate
1538 * instead of the user's ID.
1539 *
1540 * Completes with a [GetPartnersStatusResponse]. 1540 * Completes with a [GetPartnersStatusResponse].
1541 * 1541 *
1542 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1542 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1543 * error. 1543 * error.
1544 * 1544 *
1545 * If the used [http.Client] completes with an error when making a REST call, 1545 * If the used [http.Client] completes with an error when making a REST call,
1546 * this method will complete with the same error. 1546 * this method will complete with the same error.
1547 */ 1547 */
1548 async.Future<GetPartnersStatusResponse> getPartnersstatus({core.String request Metadata_trafficSource_trafficSourceId, core.String requestMetadata_locale, core .String requestMetadata_userOverrides_ipAddress, core.List<core.String> requestM etadata_experimentIds, core.String requestMetadata_trafficSource_trafficSubId, c ore.String requestMetadata_partnersSessionId, core.String requestMetadata_userOv errides_userId}) { 1548 async.Future<GetPartnersStatusResponse> getPartnersstatus({core.String request Metadata_userOverrides_userId, core.String requestMetadata_partnersSessionId, co re.String requestMetadata_trafficSource_trafficSourceId, core.String requestMeta data_locale, core.String requestMetadata_userOverrides_ipAddress, core.List<core .String> requestMetadata_experimentIds, core.String requestMetadata_trafficSourc e_trafficSubId}) {
1549 var _url = null; 1549 var _url = null;
1550 var _queryParams = new core.Map(); 1550 var _queryParams = new core.Map();
1551 var _uploadMedia = null; 1551 var _uploadMedia = null;
1552 var _uploadOptions = null; 1552 var _uploadOptions = null;
1553 var _downloadOptions = commons.DownloadOptions.Metadata; 1553 var _downloadOptions = commons.DownloadOptions.Metadata;
1554 var _body = null; 1554 var _body = null;
1555 1555
1556 if (requestMetadata_userOverrides_userId != null) {
1557 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us erOverrides_userId];
1558 }
1559 if (requestMetadata_partnersSessionId != null) {
1560 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn ersSessionId];
1561 }
1556 if (requestMetadata_trafficSource_trafficSourceId != null) { 1562 if (requestMetadata_trafficSource_trafficSourceId != null) {
1557 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe tadata_trafficSource_trafficSourceId]; 1563 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe tadata_trafficSource_trafficSourceId];
1558 } 1564 }
1559 if (requestMetadata_locale != null) { 1565 if (requestMetadata_locale != null) {
1560 _queryParams["requestMetadata.locale"] = [requestMetadata_locale]; 1566 _queryParams["requestMetadata.locale"] = [requestMetadata_locale];
1561 } 1567 }
1562 if (requestMetadata_userOverrides_ipAddress != null) { 1568 if (requestMetadata_userOverrides_ipAddress != null) {
1563 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata _userOverrides_ipAddress]; 1569 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata _userOverrides_ipAddress];
1564 } 1570 }
1565 if (requestMetadata_experimentIds != null) { 1571 if (requestMetadata_experimentIds != null) {
1566 _queryParams["requestMetadata.experimentIds"] = requestMetadata_experiment Ids; 1572 _queryParams["requestMetadata.experimentIds"] = requestMetadata_experiment Ids;
1567 } 1573 }
1568 if (requestMetadata_trafficSource_trafficSubId != null) { 1574 if (requestMetadata_trafficSource_trafficSubId != null) {
1569 _queryParams["requestMetadata.trafficSource.trafficSubId"] = [requestMetad ata_trafficSource_trafficSubId]; 1575 _queryParams["requestMetadata.trafficSource.trafficSubId"] = [requestMetad ata_trafficSource_trafficSubId];
1570 } 1576 }
1571 if (requestMetadata_partnersSessionId != null) {
1572 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn ersSessionId];
1573 }
1574 if (requestMetadata_userOverrides_userId != null) {
1575 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us erOverrides_userId];
1576 }
1577 1577
1578 _url = 'v2/partnersstatus'; 1578 _url = 'v2/partnersstatus';
1579 1579
1580 var _response = _requester.request(_url, 1580 var _response = _requester.request(_url,
1581 "GET", 1581 "GET",
1582 body: _body, 1582 body: _body,
1583 queryParams: _queryParams, 1583 queryParams: _queryParams,
1584 uploadOptions: _uploadOptions, 1584 uploadOptions: _uploadOptions,
1585 uploadMedia: _uploadMedia, 1585 uploadMedia: _uploadMedia,
1586 downloadOptions: _downloadOptions); 1586 downloadOptions: _downloadOptions);
1587 return _response.then((data) => new GetPartnersStatusResponse.fromJson(data) ); 1587 return _response.then((data) => new GetPartnersStatusResponse.fromJson(data) );
1588 } 1588 }
1589 1589
1590 /** 1590 /**
1591 * Update company. 1591 * Update company.
1592 * Should only be called within the context of an authorized logged in user. 1592 * Should only be called within the context of an authorized logged in user.
1593 * 1593 *
1594 * [request] - The metadata request object. 1594 * [request] - The metadata request object.
1595 * 1595 *
1596 * Request parameters: 1596 * Request parameters:
1597 * 1597 *
1598 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate
1599 * instead of the user's ID.
1600 *
1601 * [requestMetadata_partnersSessionId] - Google Partners session ID.
1602 *
1603 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate
1604 * where the traffic comes from.
1605 * An identifier has multiple letters created by a team which redirected the
1606 * traffic to us.
1607 *
1608 * [requestMetadata_locale] - Locale to use for the current request.
1609 *
1598 * [requestMetadata_userOverrides_ipAddress] - IP address to use instead of 1610 * [requestMetadata_userOverrides_ipAddress] - IP address to use instead of
1599 * the user's geo-located IP address. 1611 * the user's geo-located IP address.
1600 * 1612 *
1601 * [updateMask] - Standard field mask for the set of fields to be updated. 1613 * [updateMask] - Standard field mask for the set of fields to be updated.
1602 * Required with at least 1 value in FieldMask's paths. 1614 * Required with at least 1 value in FieldMask's paths.
1603 * 1615 *
1604 * [requestMetadata_experimentIds] - Experiment IDs the current request 1616 * [requestMetadata_experimentIds] - Experiment IDs the current request
1605 * belongs to. 1617 * belongs to.
1606 * 1618 *
1607 * [requestMetadata_trafficSource_trafficSubId] - Second level identifier to 1619 * [requestMetadata_trafficSource_trafficSubId] - Second level identifier to
1608 * indicate where the traffic comes from. 1620 * indicate where the traffic comes from.
1609 * An identifier has multiple letters created by a team which redirected the 1621 * An identifier has multiple letters created by a team which redirected the
1610 * traffic to us. 1622 * traffic to us.
1611 * 1623 *
1612 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate
1613 * instead of the user's ID.
1614 *
1615 * [requestMetadata_partnersSessionId] - Google Partners session ID.
1616 *
1617 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate
1618 * where the traffic comes from.
1619 * An identifier has multiple letters created by a team which redirected the
1620 * traffic to us.
1621 *
1622 * [requestMetadata_locale] - Locale to use for the current request.
1623 *
1624 * Completes with a [Company]. 1624 * Completes with a [Company].
1625 * 1625 *
1626 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1626 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1627 * error. 1627 * error.
1628 * 1628 *
1629 * If the used [http.Client] completes with an error when making a REST call, 1629 * If the used [http.Client] completes with an error when making a REST call,
1630 * this method will complete with the same error. 1630 * this method will complete with the same error.
1631 */ 1631 */
1632 async.Future<Company> updateCompanies(Company request, {core.String requestMet adata_userOverrides_ipAddress, core.String updateMask, core.List<core.String> re questMetadata_experimentIds, core.String requestMetadata_trafficSource_trafficSu bId, core.String requestMetadata_userOverrides_userId, core.String requestMetada ta_partnersSessionId, core.String requestMetadata_trafficSource_trafficSourceId, core.String requestMetadata_locale}) { 1632 async.Future<Company> updateCompanies(Company request, {core.String requestMet adata_userOverrides_userId, core.String requestMetadata_partnersSessionId, core. String requestMetadata_trafficSource_trafficSourceId, core.String requestMetadat a_locale, core.String requestMetadata_userOverrides_ipAddress, core.String updat eMask, core.List<core.String> requestMetadata_experimentIds, core.String request Metadata_trafficSource_trafficSubId}) {
1633 var _url = null; 1633 var _url = null;
1634 var _queryParams = new core.Map(); 1634 var _queryParams = new core.Map();
1635 var _uploadMedia = null; 1635 var _uploadMedia = null;
1636 var _uploadOptions = null; 1636 var _uploadOptions = null;
1637 var _downloadOptions = commons.DownloadOptions.Metadata; 1637 var _downloadOptions = commons.DownloadOptions.Metadata;
1638 var _body = null; 1638 var _body = null;
1639 1639
1640 if (request != null) { 1640 if (request != null) {
1641 _body = convert.JSON.encode((request).toJson()); 1641 _body = convert.JSON.encode((request).toJson());
1642 } 1642 }
1643 if (requestMetadata_userOverrides_ipAddress != null) {
1644 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata _userOverrides_ipAddress];
1645 }
1646 if (updateMask != null) {
1647 _queryParams["updateMask"] = [updateMask];
1648 }
1649 if (requestMetadata_experimentIds != null) {
1650 _queryParams["requestMetadata.experimentIds"] = requestMetadata_experiment Ids;
1651 }
1652 if (requestMetadata_trafficSource_trafficSubId != null) {
1653 _queryParams["requestMetadata.trafficSource.trafficSubId"] = [requestMetad ata_trafficSource_trafficSubId];
1654 }
1655 if (requestMetadata_userOverrides_userId != null) { 1643 if (requestMetadata_userOverrides_userId != null) {
1656 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us erOverrides_userId]; 1644 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us erOverrides_userId];
1657 } 1645 }
1658 if (requestMetadata_partnersSessionId != null) { 1646 if (requestMetadata_partnersSessionId != null) {
1659 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn ersSessionId]; 1647 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn ersSessionId];
1660 } 1648 }
1661 if (requestMetadata_trafficSource_trafficSourceId != null) { 1649 if (requestMetadata_trafficSource_trafficSourceId != null) {
1662 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe tadata_trafficSource_trafficSourceId]; 1650 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe tadata_trafficSource_trafficSourceId];
1663 } 1651 }
1664 if (requestMetadata_locale != null) { 1652 if (requestMetadata_locale != null) {
1665 _queryParams["requestMetadata.locale"] = [requestMetadata_locale]; 1653 _queryParams["requestMetadata.locale"] = [requestMetadata_locale];
1666 } 1654 }
1655 if (requestMetadata_userOverrides_ipAddress != null) {
1656 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata _userOverrides_ipAddress];
1657 }
1658 if (updateMask != null) {
1659 _queryParams["updateMask"] = [updateMask];
1660 }
1661 if (requestMetadata_experimentIds != null) {
1662 _queryParams["requestMetadata.experimentIds"] = requestMetadata_experiment Ids;
1663 }
1664 if (requestMetadata_trafficSource_trafficSubId != null) {
1665 _queryParams["requestMetadata.trafficSource.trafficSubId"] = [requestMetad ata_trafficSource_trafficSubId];
1666 }
1667 1667
1668 _url = 'v2/companies'; 1668 _url = 'v2/companies';
1669 1669
1670 var _response = _requester.request(_url, 1670 var _response = _requester.request(_url,
1671 "PATCH", 1671 "PATCH",
1672 body: _body, 1672 body: _body,
1673 queryParams: _queryParams, 1673 queryParams: _queryParams,
1674 uploadOptions: _uploadOptions, 1674 uploadOptions: _uploadOptions,
1675 uploadMedia: _uploadMedia, 1675 uploadMedia: _uploadMedia,
1676 downloadOptions: _downloadOptions); 1676 downloadOptions: _downloadOptions);
1677 return _response.then((data) => new Company.fromJson(data)); 1677 return _response.then((data) => new Company.fromJson(data));
1678 } 1678 }
1679 1679
1680 /** 1680 /**
1681 * Updates the specified lead. 1681 * Updates the specified lead.
1682 * 1682 *
1683 * [request] - The metadata request object. 1683 * [request] - The metadata request object.
1684 * 1684 *
1685 * Request parameters: 1685 * Request parameters:
1686 * 1686 *
1687 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate
1688 * where the traffic comes from.
1689 * An identifier has multiple letters created by a team which redirected the
1690 * traffic to us.
1691 *
1692 * [requestMetadata_locale] - Locale to use for the current request.
1693 *
1694 * [requestMetadata_userOverrides_ipAddress] - IP address to use instead of 1687 * [requestMetadata_userOverrides_ipAddress] - IP address to use instead of
1695 * the user's geo-located IP address. 1688 * the user's geo-located IP address.
1696 * 1689 *
1697 * [updateMask] - Standard field mask for the set of fields to be updated. 1690 * [updateMask] - Standard field mask for the set of fields to be updated.
1698 * Required with at least 1 value in FieldMask's paths. 1691 * Required with at least 1 value in FieldMask's paths.
1699 * Only `state` and `adwords_customer_id` are currently supported. 1692 * Only `state` and `adwords_customer_id` are currently supported.
1700 * 1693 *
1701 * [requestMetadata_experimentIds] - Experiment IDs the current request 1694 * [requestMetadata_experimentIds] - Experiment IDs the current request
1702 * belongs to. 1695 * belongs to.
1703 * 1696 *
1704 * [requestMetadata_trafficSource_trafficSubId] - Second level identifier to 1697 * [requestMetadata_trafficSource_trafficSubId] - Second level identifier to
1705 * indicate where the traffic comes from. 1698 * indicate where the traffic comes from.
1706 * An identifier has multiple letters created by a team which redirected the 1699 * An identifier has multiple letters created by a team which redirected the
1707 * traffic to us. 1700 * traffic to us.
1708 * 1701 *
1709 * [requestMetadata_partnersSessionId] - Google Partners session ID.
1710 *
1711 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate 1702 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate
1712 * instead of the user's ID. 1703 * instead of the user's ID.
1713 * 1704 *
1705 * [requestMetadata_partnersSessionId] - Google Partners session ID.
1706 *
1707 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate
1708 * where the traffic comes from.
1709 * An identifier has multiple letters created by a team which redirected the
1710 * traffic to us.
1711 *
1712 * [requestMetadata_locale] - Locale to use for the current request.
1713 *
1714 * Completes with a [Lead]. 1714 * Completes with a [Lead].
1715 * 1715 *
1716 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1716 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1717 * error. 1717 * error.
1718 * 1718 *
1719 * If the used [http.Client] completes with an error when making a REST call, 1719 * If the used [http.Client] completes with an error when making a REST call,
1720 * this method will complete with the same error. 1720 * this method will complete with the same error.
1721 */ 1721 */
1722 async.Future<Lead> updateLeads(Lead request, {core.String requestMetadata_traf ficSource_trafficSourceId, core.String requestMetadata_locale, core.String reque stMetadata_userOverrides_ipAddress, core.String updateMask, core.List<core.Strin g> requestMetadata_experimentIds, core.String requestMetadata_trafficSource_traf ficSubId, core.String requestMetadata_partnersSessionId, core.String requestMeta data_userOverrides_userId}) { 1722 async.Future<Lead> updateLeads(Lead request, {core.String requestMetadata_user Overrides_ipAddress, core.String updateMask, core.List<core.String> requestMetad ata_experimentIds, core.String requestMetadata_trafficSource_trafficSubId, core. String requestMetadata_userOverrides_userId, core.String requestMetadata_partner sSessionId, core.String requestMetadata_trafficSource_trafficSourceId, core.Stri ng requestMetadata_locale}) {
1723 var _url = null; 1723 var _url = null;
1724 var _queryParams = new core.Map(); 1724 var _queryParams = new core.Map();
1725 var _uploadMedia = null; 1725 var _uploadMedia = null;
1726 var _uploadOptions = null; 1726 var _uploadOptions = null;
1727 var _downloadOptions = commons.DownloadOptions.Metadata; 1727 var _downloadOptions = commons.DownloadOptions.Metadata;
1728 var _body = null; 1728 var _body = null;
1729 1729
1730 if (request != null) { 1730 if (request != null) {
1731 _body = convert.JSON.encode((request).toJson()); 1731 _body = convert.JSON.encode((request).toJson());
1732 } 1732 }
1733 if (requestMetadata_trafficSource_trafficSourceId != null) {
1734 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe tadata_trafficSource_trafficSourceId];
1735 }
1736 if (requestMetadata_locale != null) {
1737 _queryParams["requestMetadata.locale"] = [requestMetadata_locale];
1738 }
1739 if (requestMetadata_userOverrides_ipAddress != null) { 1733 if (requestMetadata_userOverrides_ipAddress != null) {
1740 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata _userOverrides_ipAddress]; 1734 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata _userOverrides_ipAddress];
1741 } 1735 }
1742 if (updateMask != null) { 1736 if (updateMask != null) {
1743 _queryParams["updateMask"] = [updateMask]; 1737 _queryParams["updateMask"] = [updateMask];
1744 } 1738 }
1745 if (requestMetadata_experimentIds != null) { 1739 if (requestMetadata_experimentIds != null) {
1746 _queryParams["requestMetadata.experimentIds"] = requestMetadata_experiment Ids; 1740 _queryParams["requestMetadata.experimentIds"] = requestMetadata_experiment Ids;
1747 } 1741 }
1748 if (requestMetadata_trafficSource_trafficSubId != null) { 1742 if (requestMetadata_trafficSource_trafficSubId != null) {
1749 _queryParams["requestMetadata.trafficSource.trafficSubId"] = [requestMetad ata_trafficSource_trafficSubId]; 1743 _queryParams["requestMetadata.trafficSource.trafficSubId"] = [requestMetad ata_trafficSource_trafficSubId];
1750 } 1744 }
1745 if (requestMetadata_userOverrides_userId != null) {
1746 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us erOverrides_userId];
1747 }
1751 if (requestMetadata_partnersSessionId != null) { 1748 if (requestMetadata_partnersSessionId != null) {
1752 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn ersSessionId]; 1749 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn ersSessionId];
1753 } 1750 }
1754 if (requestMetadata_userOverrides_userId != null) { 1751 if (requestMetadata_trafficSource_trafficSourceId != null) {
1755 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us erOverrides_userId]; 1752 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe tadata_trafficSource_trafficSourceId];
1753 }
1754 if (requestMetadata_locale != null) {
1755 _queryParams["requestMetadata.locale"] = [requestMetadata_locale];
1756 } 1756 }
1757 1757
1758 _url = 'v2/leads'; 1758 _url = 'v2/leads';
1759 1759
1760 var _response = _requester.request(_url, 1760 var _response = _requester.request(_url,
1761 "PATCH", 1761 "PATCH",
1762 body: _body, 1762 body: _body,
1763 queryParams: _queryParams, 1763 queryParams: _queryParams,
1764 uploadOptions: _uploadOptions, 1764 uploadOptions: _uploadOptions,
1765 uploadMedia: _uploadMedia, 1765 uploadMedia: _uploadMedia,
(...skipping 3525 matching lines...) Expand 10 before | Expand all | Expand 10 after
5291 } 5291 }
5292 if (primaryCountryCode != null) { 5292 if (primaryCountryCode != null) {
5293 _json["primaryCountryCode"] = primaryCountryCode; 5293 _json["primaryCountryCode"] = primaryCountryCode;
5294 } 5294 }
5295 if (profilePublic != null) { 5295 if (profilePublic != null) {
5296 _json["profilePublic"] = profilePublic; 5296 _json["profilePublic"] = profilePublic;
5297 } 5297 }
5298 return _json; 5298 return _json;
5299 } 5299 }
5300 } 5300 }
OLDNEW
« no previous file with comments | « generated/googleapis/lib/monitoring/v3.dart ('k') | generated/googleapis/lib/people/v1.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698