OLD | NEW |
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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 | 43 |
44 AnalyticsResourceApi(commons.ApiRequester client) : | 44 AnalyticsResourceApi(commons.ApiRequester client) : |
45 _requester = client; | 45 _requester = client; |
46 | 46 |
47 /** | 47 /** |
48 * Lists analytics data for a user's associated company. | 48 * Lists analytics data for a user's associated company. |
49 * Should only be called within the context of an authorized logged in user. | 49 * Should only be called within the context of an authorized logged in user. |
50 * | 50 * |
51 * Request parameters: | 51 * Request parameters: |
52 * | 52 * |
53 * [requestMetadata_partnersSessionId] - Google Partners session ID. | |
54 * | |
55 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate | 53 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate |
56 * instead of the user's ID. | 54 * instead of the user's ID. |
57 * | 55 * |
| 56 * [requestMetadata_partnersSessionId] - Google Partners session ID. |
| 57 * |
58 * [pageToken] - A token identifying a page of results that the server | 58 * [pageToken] - A token identifying a page of results that the server |
59 * returns. | 59 * returns. |
60 * Typically, this is the value of `ListAnalyticsResponse.next_page_token` | 60 * Typically, this is the value of `ListAnalyticsResponse.next_page_token` |
61 * returned from the previous call to | 61 * returned from the previous call to |
62 * ListAnalytics. | 62 * ListAnalytics. |
63 * Will be a date string in `YYYY-MM-DD` format representing the end date | 63 * Will be a date string in `YYYY-MM-DD` format representing the end date |
64 * of the date range of results to return. | 64 * of the date range of results to return. |
65 * If unspecified or set to "", default value is the current date. | 65 * If unspecified or set to "", default value is the current date. |
66 * | 66 * |
67 * [pageSize] - Requested page size. Server may return fewer analytics than | 67 * [pageSize] - Requested page size. Server may return fewer analytics than |
(...skipping 24 matching lines...) Expand all Loading... |
92 * traffic to us. | 92 * traffic to us. |
93 * | 93 * |
94 * Completes with a [ListAnalyticsResponse]. | 94 * Completes with a [ListAnalyticsResponse]. |
95 * | 95 * |
96 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 96 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
97 * error. | 97 * error. |
98 * | 98 * |
99 * If the used [http.Client] completes with an error when making a REST call, | 99 * If the used [http.Client] completes with an error when making a REST call, |
100 * this method will complete with the same error. | 100 * this method will complete with the same error. |
101 */ | 101 */ |
102 async.Future<ListAnalyticsResponse> list({core.String requestMetadata_partners
SessionId, core.String requestMetadata_userOverrides_userId, core.String pageTok
en, core.int pageSize, core.String requestMetadata_trafficSource_trafficSourceId
, core.String requestMetadata_locale, core.String requestMetadata_userOverrides_
ipAddress, core.List<core.String> requestMetadata_experimentIds, core.String req
uestMetadata_trafficSource_trafficSubId}) { | 102 async.Future<ListAnalyticsResponse> list({core.String requestMetadata_userOver
rides_userId, core.String requestMetadata_partnersSessionId, core.String pageTok
en, core.int pageSize, core.String requestMetadata_trafficSource_trafficSourceId
, core.String requestMetadata_locale, core.String requestMetadata_userOverrides_
ipAddress, core.List<core.String> requestMetadata_experimentIds, core.String req
uestMetadata_trafficSource_trafficSubId}) { |
103 var _url = null; | 103 var _url = null; |
104 var _queryParams = new core.Map(); | 104 var _queryParams = new core.Map(); |
105 var _uploadMedia = null; | 105 var _uploadMedia = null; |
106 var _uploadOptions = null; | 106 var _uploadOptions = null; |
107 var _downloadOptions = commons.DownloadOptions.Metadata; | 107 var _downloadOptions = commons.DownloadOptions.Metadata; |
108 var _body = null; | 108 var _body = null; |
109 | 109 |
| 110 if (requestMetadata_userOverrides_userId != null) { |
| 111 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us
erOverrides_userId]; |
| 112 } |
110 if (requestMetadata_partnersSessionId != null) { | 113 if (requestMetadata_partnersSessionId != null) { |
111 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn
ersSessionId]; | 114 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn
ersSessionId]; |
112 } | 115 } |
113 if (requestMetadata_userOverrides_userId != null) { | |
114 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us
erOverrides_userId]; | |
115 } | |
116 if (pageToken != null) { | 116 if (pageToken != null) { |
117 _queryParams["pageToken"] = [pageToken]; | 117 _queryParams["pageToken"] = [pageToken]; |
118 } | 118 } |
119 if (pageSize != null) { | 119 if (pageSize != null) { |
120 _queryParams["pageSize"] = ["${pageSize}"]; | 120 _queryParams["pageSize"] = ["${pageSize}"]; |
121 } | 121 } |
122 if (requestMetadata_trafficSource_trafficSourceId != null) { | 122 if (requestMetadata_trafficSource_trafficSourceId != null) { |
123 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe
tadata_trafficSource_trafficSourceId]; | 123 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe
tadata_trafficSource_trafficSourceId]; |
124 } | 124 } |
125 if (requestMetadata_locale != null) { | 125 if (requestMetadata_locale != null) { |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 CompaniesResourceApi(commons.ApiRequester client) : | 208 CompaniesResourceApi(commons.ApiRequester client) : |
209 _requester = client; | 209 _requester = client; |
210 | 210 |
211 /** | 211 /** |
212 * Gets a company. | 212 * Gets a company. |
213 * | 213 * |
214 * Request parameters: | 214 * Request parameters: |
215 * | 215 * |
216 * [companyId] - The ID of the company to retrieve. | 216 * [companyId] - The ID of the company to retrieve. |
217 * | 217 * |
| 218 * [orderBy] - How to order addresses within the returned company. Currently, |
| 219 * only |
| 220 * `address` and `address desc` is supported which will sorted by closest to |
| 221 * farthest in distance from given address and farthest to closest distance |
| 222 * from given address respectively. |
| 223 * |
| 224 * [requestMetadata_trafficSource_trafficSubId] - Second level identifier to |
| 225 * indicate where the traffic comes from. |
| 226 * An identifier has multiple letters created by a team which redirected the |
| 227 * traffic to us. |
| 228 * |
| 229 * [requestMetadata_partnersSessionId] - Google Partners session ID. |
| 230 * |
| 231 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate |
| 232 * instead of the user's ID. |
| 233 * |
| 234 * [view] - The view of `Company` resource to be returned. This must not be |
| 235 * `COMPANY_VIEW_UNSPECIFIED`. |
| 236 * Possible string values are: |
| 237 * - "COMPANY_VIEW_UNSPECIFIED" : A COMPANY_VIEW_UNSPECIFIED. |
| 238 * - "CV_GOOGLE_PARTNER_SEARCH" : A CV_GOOGLE_PARTNER_SEARCH. |
| 239 * |
| 240 * [requestMetadata_locale] - Locale to use for the current request. |
| 241 * |
218 * [address] - The address to use for sorting the company's addresses by | 242 * [address] - The address to use for sorting the company's addresses by |
219 * proximity. | 243 * proximity. |
220 * If not given, the geo-located address of the request is used. | 244 * If not given, the geo-located address of the request is used. |
221 * Used when order_by is set. | 245 * Used when order_by is set. |
222 * | 246 * |
223 * [requestMetadata_locale] - Locale to use for the current request. | |
224 * | |
225 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate | 247 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate |
226 * where the traffic comes from. | 248 * where the traffic comes from. |
227 * An identifier has multiple letters created by a team which redirected the | 249 * An identifier has multiple letters created by a team which redirected the |
228 * traffic to us. | 250 * traffic to us. |
229 * | 251 * |
230 * [requestMetadata_userOverrides_ipAddress] - IP address to use instead of | 252 * [requestMetadata_userOverrides_ipAddress] - IP address to use instead of |
231 * the user's geo-located IP address. | 253 * the user's geo-located IP address. |
232 * | 254 * |
| 255 * [requestMetadata_experimentIds] - Experiment IDs the current request |
| 256 * belongs to. |
| 257 * |
233 * [currencyCode] - If the company's budget is in a different currency code | 258 * [currencyCode] - If the company's budget is in a different currency code |
234 * than this one, then | 259 * than this one, then |
235 * the converted budget is converted to this currency code. | 260 * the converted budget is converted to this currency code. |
236 * | 261 * |
237 * [requestMetadata_experimentIds] - Experiment IDs the current request | |
238 * belongs to. | |
239 * | |
240 * [requestMetadata_trafficSource_trafficSubId] - Second level identifier to | |
241 * indicate where the traffic comes from. | |
242 * An identifier has multiple letters created by a team which redirected the | |
243 * traffic to us. | |
244 * | |
245 * [orderBy] - How to order addresses within the returned company. Currently, | |
246 * only | |
247 * `address` and `address desc` is supported which will sorted by closest to | |
248 * farthest in distance from given address and farthest to closest distance | |
249 * from given address respectively. | |
250 * | |
251 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate | |
252 * instead of the user's ID. | |
253 * | |
254 * [requestMetadata_partnersSessionId] - Google Partners session ID. | |
255 * | |
256 * [view] - The view of `Company` resource to be returned. This must not be | |
257 * `COMPANY_VIEW_UNSPECIFIED`. | |
258 * Possible string values are: | |
259 * - "COMPANY_VIEW_UNSPECIFIED" : A COMPANY_VIEW_UNSPECIFIED. | |
260 * - "CV_GOOGLE_PARTNER_SEARCH" : A CV_GOOGLE_PARTNER_SEARCH. | |
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 addre
ss, core.String requestMetadata_locale, core.String requestMetadata_trafficSourc
e_trafficSourceId, core.String requestMetadata_userOverrides_ipAddress, core.Str
ing currencyCode, core.List<core.String> requestMetadata_experimentIds, core.Str
ing requestMetadata_trafficSource_trafficSubId, core.String orderBy, core.String
requestMetadata_userOverrides_userId, core.String requestMetadata_partnersSessi
onId, core.String view}) { | 270 async.Future<GetCompanyResponse> get(core.String companyId, {core.String order
By, core.String requestMetadata_trafficSource_trafficSubId, core.String requestM
etadata_partnersSessionId, core.String requestMetadata_userOverrides_userId, cor
e.String view, core.String requestMetadata_locale, core.String address, core.Str
ing requestMetadata_trafficSource_trafficSourceId, core.String requestMetadata_u
serOverrides_ipAddress, core.List<core.String> requestMetadata_experimentIds, co
re.String currencyCode}) { |
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 (address != null) { | 281 if (orderBy != null) { |
282 _queryParams["address"] = [address]; | 282 _queryParams["orderBy"] = [orderBy]; |
| 283 } |
| 284 if (requestMetadata_trafficSource_trafficSubId != null) { |
| 285 _queryParams["requestMetadata.trafficSource.trafficSubId"] = [requestMetad
ata_trafficSource_trafficSubId]; |
| 286 } |
| 287 if (requestMetadata_partnersSessionId != null) { |
| 288 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn
ersSessionId]; |
| 289 } |
| 290 if (requestMetadata_userOverrides_userId != null) { |
| 291 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us
erOverrides_userId]; |
| 292 } |
| 293 if (view != null) { |
| 294 _queryParams["view"] = [view]; |
283 } | 295 } |
284 if (requestMetadata_locale != null) { | 296 if (requestMetadata_locale != null) { |
285 _queryParams["requestMetadata.locale"] = [requestMetadata_locale]; | 297 _queryParams["requestMetadata.locale"] = [requestMetadata_locale]; |
286 } | 298 } |
| 299 if (address != null) { |
| 300 _queryParams["address"] = [address]; |
| 301 } |
287 if (requestMetadata_trafficSource_trafficSourceId != null) { | 302 if (requestMetadata_trafficSource_trafficSourceId != null) { |
288 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe
tadata_trafficSource_trafficSourceId]; | 303 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe
tadata_trafficSource_trafficSourceId]; |
289 } | 304 } |
290 if (requestMetadata_userOverrides_ipAddress != null) { | 305 if (requestMetadata_userOverrides_ipAddress != null) { |
291 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata
_userOverrides_ipAddress]; | 306 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata
_userOverrides_ipAddress]; |
292 } | 307 } |
| 308 if (requestMetadata_experimentIds != null) { |
| 309 _queryParams["requestMetadata.experimentIds"] = requestMetadata_experiment
Ids; |
| 310 } |
293 if (currencyCode != null) { | 311 if (currencyCode != null) { |
294 _queryParams["currencyCode"] = [currencyCode]; | 312 _queryParams["currencyCode"] = [currencyCode]; |
295 } | 313 } |
296 if (requestMetadata_experimentIds != null) { | |
297 _queryParams["requestMetadata.experimentIds"] = requestMetadata_experiment
Ids; | |
298 } | |
299 if (requestMetadata_trafficSource_trafficSubId != null) { | |
300 _queryParams["requestMetadata.trafficSource.trafficSubId"] = [requestMetad
ata_trafficSource_trafficSubId]; | |
301 } | |
302 if (orderBy != null) { | |
303 _queryParams["orderBy"] = [orderBy]; | |
304 } | |
305 if (requestMetadata_userOverrides_userId != null) { | |
306 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us
erOverrides_userId]; | |
307 } | |
308 if (requestMetadata_partnersSessionId != null) { | |
309 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn
ersSessionId]; | |
310 } | |
311 if (view != null) { | |
312 _queryParams["view"] = [view]; | |
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 * [companyName] - Company name to search for. | |
333 * | |
334 * [pageToken] - A token identifying a page of results that the server | |
335 * returns. | |
336 * Typically, this is the value of `ListCompaniesResponse.next_page_token` | |
337 * returned from the previous call to | |
338 * ListCompanies. | |
339 * | |
340 * [industries] - List of industries the company can help with. | |
341 * | |
342 * [websiteUrl] - Website URL that will help to find a better matched company. | |
343 * . | |
344 * | |
345 * [gpsMotivations] - List of reasons for using Google Partner Search to get | |
346 * companies. | |
347 * | |
348 * [languageCodes] - List of language codes that company can support. Only | 332 * [languageCodes] - List of language codes that company can support. Only |
349 * primary language | 333 * primary language |
350 * subtags are accepted as defined by | 334 * subtags are accepted as defined by |
351 * <a href="https://tools.ietf.org/html/bcp47">BCP 47</a> | 335 * <a href="https://tools.ietf.org/html/bcp47">BCP 47</a> |
352 * (IETF BCP 47, "Tags for Identifying Languages"). | 336 * (IETF BCP 47, "Tags for Identifying Languages"). |
353 * | 337 * |
354 * [pageSize] - Requested page size. Server may return fewer companies than | 338 * [pageSize] - Requested page size. Server may return fewer companies than |
355 * requested. | 339 * requested. |
356 * If unspecified, server picks an appropriate default. | 340 * If unspecified, server picks an appropriate default. |
357 * | 341 * |
(...skipping 23 matching lines...) Expand all Loading... |
381 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate | 365 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate |
382 * instead of the user's ID. | 366 * instead of the user's ID. |
383 * | 367 * |
384 * [view] - The view of the `Company` resource to be returned. This must not | 368 * [view] - The view of the `Company` resource to be returned. This must not |
385 * be | 369 * be |
386 * `COMPANY_VIEW_UNSPECIFIED`. | 370 * `COMPANY_VIEW_UNSPECIFIED`. |
387 * Possible string values are: | 371 * Possible string values are: |
388 * - "COMPANY_VIEW_UNSPECIFIED" : A COMPANY_VIEW_UNSPECIFIED. | 372 * - "COMPANY_VIEW_UNSPECIFIED" : A COMPANY_VIEW_UNSPECIFIED. |
389 * - "CV_GOOGLE_PARTNER_SEARCH" : A CV_GOOGLE_PARTNER_SEARCH. | 373 * - "CV_GOOGLE_PARTNER_SEARCH" : A CV_GOOGLE_PARTNER_SEARCH. |
390 * | 374 * |
391 * [requestMetadata_locale] - Locale to use for the current request. | |
392 * | |
393 * [address] - The address to use when searching for companies. | 375 * [address] - The address to use when searching for companies. |
394 * If not given, the geo-located address of the request is used. | 376 * If not given, the geo-located address of the request is used. |
395 * | 377 * |
| 378 * [requestMetadata_locale] - Locale to use for the current request. |
| 379 * |
396 * [minMonthlyBudget_units] - The whole units of the amount. | 380 * [minMonthlyBudget_units] - The whole units of the amount. |
397 * For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. | 381 * For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. |
398 * | 382 * |
399 * [maxMonthlyBudget_nanos] - Number of nano (10^-9) units of the amount. | 383 * [maxMonthlyBudget_nanos] - Number of nano (10^-9) units of the amount. |
400 * The value must be between -999,999,999 and +999,999,999 inclusive. | 384 * The value must be between -999,999,999 and +999,999,999 inclusive. |
401 * If `units` is positive, `nanos` must be positive or zero. | 385 * If `units` is positive, `nanos` must be positive or zero. |
402 * If `units` is zero, `nanos` can be positive, zero, or negative. | 386 * If `units` is zero, `nanos` can be positive, zero, or negative. |
403 * If `units` is negative, `nanos` must be negative or zero. | 387 * If `units` is negative, `nanos` must be negative or zero. |
404 * For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. | 388 * For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. |
405 * | 389 * |
406 * [services] - List of services that the returned agencies should provide. If | 390 * [services] - List of services that the returned agencies should provide. If |
407 * this is | 391 * this is |
408 * not empty, any returned agency must have at least one of these services, | 392 * not empty, any returned agency must have at least one of these services, |
409 * or one of the specializations in the "specializations" field. | 393 * or one of the specializations in the "specializations" field. |
410 * | 394 * |
411 * [maxMonthlyBudget_units] - The whole units of the amount. | |
412 * For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. | |
413 * | |
414 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate | 395 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate |
415 * where the traffic comes from. | 396 * where the traffic comes from. |
416 * An identifier has multiple letters created by a team which redirected the | 397 * An identifier has multiple letters created by a team which redirected the |
417 * traffic to us. | 398 * traffic to us. |
418 * | 399 * |
419 * [requestMetadata_trafficSource_trafficSubId] - Second level identifier to | 400 * [maxMonthlyBudget_units] - The whole units of the amount. |
420 * indicate where the traffic comes from. | 401 * For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. |
421 * An identifier has multiple letters created by a team which redirected the | |
422 * traffic to us. | |
423 * | 402 * |
424 * [minMonthlyBudget_nanos] - Number of nano (10^-9) units of the amount. | 403 * [minMonthlyBudget_nanos] - Number of nano (10^-9) units of the amount. |
425 * The value must be between -999,999,999 and +999,999,999 inclusive. | 404 * The value must be between -999,999,999 and +999,999,999 inclusive. |
426 * If `units` is positive, `nanos` must be positive or zero. | 405 * If `units` is positive, `nanos` must be positive or zero. |
427 * If `units` is zero, `nanos` can be positive, zero, or negative. | 406 * If `units` is zero, `nanos` can be positive, zero, or negative. |
428 * If `units` is negative, `nanos` must be negative or zero. | 407 * If `units` is negative, `nanos` must be negative or zero. |
429 * For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. | 408 * For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. |
430 * | 409 * |
| 410 * [requestMetadata_trafficSource_trafficSubId] - Second level identifier to |
| 411 * indicate where the traffic comes from. |
| 412 * An identifier has multiple letters created by a team which redirected the |
| 413 * traffic to us. |
| 414 * |
431 * [requestMetadata_partnersSessionId] - Google Partners session ID. | 415 * [requestMetadata_partnersSessionId] - Google Partners session ID. |
432 * | 416 * |
| 417 * [companyName] - Company name to search for. |
| 418 * |
| 419 * [pageToken] - A token identifying a page of results that the server |
| 420 * returns. |
| 421 * Typically, this is the value of `ListCompaniesResponse.next_page_token` |
| 422 * returned from the previous call to |
| 423 * ListCompanies. |
| 424 * |
| 425 * [industries] - List of industries the company can help with. |
| 426 * |
| 427 * [websiteUrl] - Website URL that will help to find a better matched company. |
| 428 * . |
| 429 * |
| 430 * [gpsMotivations] - List of reasons for using Google Partner Search to get |
| 431 * companies. |
| 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 companyName, core.String
pageToken, core.List<core.String> industries, core.String websiteUrl, core.List
<core.String> gpsMotivations, core.List<core.String> languageCodes, core.int pag
eSize, core.String requestMetadata_userOverrides_ipAddress, core.List<core.Strin
g> requestMetadata_experimentIds, core.String orderBy, core.List<core.String> sp
ecializations, core.String maxMonthlyBudget_currencyCode, core.String minMonthly
Budget_currencyCode, core.String requestMetadata_userOverrides_userId, core.Stri
ng view, core.String requestMetadata_locale, core.String address, core.String mi
nMonthlyBudget_units, core.int maxMonthlyBudget_nanos, core.List<core.String> se
rvices, core.String maxMonthlyBudget_units, core.String requestMetadata_trafficS
ource_trafficSourceId, core.String requestMetadata_trafficSource_trafficSubId, c
ore.int minMonthlyBudget_nanos, core.String requestMetadata_partnersSessionId})
{ | 441 async.Future<ListCompaniesResponse> list({core.List<core.String> languageCodes
, core.int pageSize, core.String requestMetadata_userOverrides_ipAddress, core.L
ist<core.String> requestMetadata_experimentIds, core.String orderBy, core.List<c
ore.String> specializations, core.String maxMonthlyBudget_currencyCode, core.Str
ing minMonthlyBudget_currencyCode, core.String requestMetadata_userOverrides_use
rId, core.String view, core.String address, core.String requestMetadata_locale,
core.String minMonthlyBudget_units, core.int maxMonthlyBudget_nanos, core.List<c
ore.String> services, core.String requestMetadata_trafficSource_trafficSourceId,
core.String maxMonthlyBudget_units, core.int minMonthlyBudget_nanos, core.Strin
g requestMetadata_trafficSource_trafficSubId, core.String requestMetadata_partne
rsSessionId, core.String companyName, core.String pageToken, core.List<core.Stri
ng> industries, core.String websiteUrl, core.List<core.String> gpsMotivations})
{ |
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 (companyName != null) { | |
450 _queryParams["companyName"] = [companyName]; | |
451 } | |
452 if (pageToken != null) { | |
453 _queryParams["pageToken"] = [pageToken]; | |
454 } | |
455 if (industries != null) { | |
456 _queryParams["industries"] = industries; | |
457 } | |
458 if (websiteUrl != null) { | |
459 _queryParams["websiteUrl"] = [websiteUrl]; | |
460 } | |
461 if (gpsMotivations != null) { | |
462 _queryParams["gpsMotivations"] = gpsMotivations; | |
463 } | |
464 if (languageCodes != null) { | 449 if (languageCodes != null) { |
465 _queryParams["languageCodes"] = languageCodes; | 450 _queryParams["languageCodes"] = languageCodes; |
466 } | 451 } |
467 if (pageSize != null) { | 452 if (pageSize != null) { |
468 _queryParams["pageSize"] = ["${pageSize}"]; | 453 _queryParams["pageSize"] = ["${pageSize}"]; |
469 } | 454 } |
470 if (requestMetadata_userOverrides_ipAddress != null) { | 455 if (requestMetadata_userOverrides_ipAddress != null) { |
471 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata
_userOverrides_ipAddress]; | 456 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata
_userOverrides_ipAddress]; |
472 } | 457 } |
473 if (requestMetadata_experimentIds != null) { | 458 if (requestMetadata_experimentIds != null) { |
(...skipping 10 matching lines...) Expand all Loading... |
484 } | 469 } |
485 if (minMonthlyBudget_currencyCode != null) { | 470 if (minMonthlyBudget_currencyCode != null) { |
486 _queryParams["minMonthlyBudget.currencyCode"] = [minMonthlyBudget_currency
Code]; | 471 _queryParams["minMonthlyBudget.currencyCode"] = [minMonthlyBudget_currency
Code]; |
487 } | 472 } |
488 if (requestMetadata_userOverrides_userId != null) { | 473 if (requestMetadata_userOverrides_userId != null) { |
489 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us
erOverrides_userId]; | 474 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us
erOverrides_userId]; |
490 } | 475 } |
491 if (view != null) { | 476 if (view != null) { |
492 _queryParams["view"] = [view]; | 477 _queryParams["view"] = [view]; |
493 } | 478 } |
| 479 if (address != null) { |
| 480 _queryParams["address"] = [address]; |
| 481 } |
494 if (requestMetadata_locale != null) { | 482 if (requestMetadata_locale != null) { |
495 _queryParams["requestMetadata.locale"] = [requestMetadata_locale]; | 483 _queryParams["requestMetadata.locale"] = [requestMetadata_locale]; |
496 } | 484 } |
497 if (address != null) { | |
498 _queryParams["address"] = [address]; | |
499 } | |
500 if (minMonthlyBudget_units != null) { | 485 if (minMonthlyBudget_units != null) { |
501 _queryParams["minMonthlyBudget.units"] = [minMonthlyBudget_units]; | 486 _queryParams["minMonthlyBudget.units"] = [minMonthlyBudget_units]; |
502 } | 487 } |
503 if (maxMonthlyBudget_nanos != null) { | 488 if (maxMonthlyBudget_nanos != null) { |
504 _queryParams["maxMonthlyBudget.nanos"] = ["${maxMonthlyBudget_nanos}"]; | 489 _queryParams["maxMonthlyBudget.nanos"] = ["${maxMonthlyBudget_nanos}"]; |
505 } | 490 } |
506 if (services != null) { | 491 if (services != null) { |
507 _queryParams["services"] = services; | 492 _queryParams["services"] = services; |
508 } | 493 } |
| 494 if (requestMetadata_trafficSource_trafficSourceId != null) { |
| 495 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe
tadata_trafficSource_trafficSourceId]; |
| 496 } |
509 if (maxMonthlyBudget_units != null) { | 497 if (maxMonthlyBudget_units != null) { |
510 _queryParams["maxMonthlyBudget.units"] = [maxMonthlyBudget_units]; | 498 _queryParams["maxMonthlyBudget.units"] = [maxMonthlyBudget_units]; |
511 } | 499 } |
512 if (requestMetadata_trafficSource_trafficSourceId != null) { | 500 if (minMonthlyBudget_nanos != null) { |
513 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe
tadata_trafficSource_trafficSourceId]; | 501 _queryParams["minMonthlyBudget.nanos"] = ["${minMonthlyBudget_nanos}"]; |
514 } | 502 } |
515 if (requestMetadata_trafficSource_trafficSubId != null) { | 503 if (requestMetadata_trafficSource_trafficSubId != null) { |
516 _queryParams["requestMetadata.trafficSource.trafficSubId"] = [requestMetad
ata_trafficSource_trafficSubId]; | 504 _queryParams["requestMetadata.trafficSource.trafficSubId"] = [requestMetad
ata_trafficSource_trafficSubId]; |
517 } | 505 } |
518 if (minMonthlyBudget_nanos != null) { | |
519 _queryParams["minMonthlyBudget.nanos"] = ["${minMonthlyBudget_nanos}"]; | |
520 } | |
521 if (requestMetadata_partnersSessionId != null) { | 506 if (requestMetadata_partnersSessionId != null) { |
522 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn
ersSessionId]; | 507 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn
ersSessionId]; |
523 } | 508 } |
| 509 if (companyName != null) { |
| 510 _queryParams["companyName"] = [companyName]; |
| 511 } |
| 512 if (pageToken != null) { |
| 513 _queryParams["pageToken"] = [pageToken]; |
| 514 } |
| 515 if (industries != null) { |
| 516 _queryParams["industries"] = industries; |
| 517 } |
| 518 if (websiteUrl != null) { |
| 519 _queryParams["websiteUrl"] = [websiteUrl]; |
| 520 } |
| 521 if (gpsMotivations != null) { |
| 522 _queryParams["gpsMotivations"] = gpsMotivations; |
| 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 Loading... |
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_partnersSessionId] - Google Partners session ID. |
| 620 * |
619 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate | 621 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate |
620 * instead of the user's ID. | 622 * instead of the user's ID. |
621 * | 623 * |
622 * [requestMetadata_partnersSessionId] - Google Partners session ID. | |
623 * | |
624 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate | 624 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate |
625 * where the traffic comes from. | 625 * where the traffic comes from. |
626 * 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 |
627 * traffic to us. | 627 * traffic to us. |
628 * | 628 * |
629 * [requestMetadata_locale] - Locale to use for the current request. | 629 * [requestMetadata_locale] - Locale to use for the current request. |
630 * | 630 * |
631 * [requestMetadata_userOverrides_ipAddress] - IP address to use instead of | 631 * [requestMetadata_userOverrides_ipAddress] - IP address to use instead of |
632 * the user's geo-located IP address. | 632 * the user's geo-located IP address. |
633 * | 633 * |
634 * [requestMetadata_experimentIds] - Experiment IDs the current request | 634 * [requestMetadata_experimentIds] - Experiment IDs the current request |
635 * belongs to. | 635 * belongs to. |
636 * | 636 * |
637 * [requestMetadata_trafficSource_trafficSubId] - Second level identifier to | 637 * [requestMetadata_trafficSource_trafficSubId] - Second level identifier to |
638 * indicate where the traffic comes from. | 638 * indicate where the traffic comes from. |
639 * An identifier has multiple letters created by a team which redirected the | 639 * An identifier has multiple letters created by a team which redirected the |
640 * traffic to us. | 640 * traffic to us. |
641 * | 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_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}) { | 650 async.Future<ExamToken> getToken(core.String examType, {core.String requestMet
adata_partnersSessionId, core.String requestMetadata_userOverrides_userId, 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_partnersSessionId != null) { |
| 662 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn
ersSessionId]; |
| 663 } |
661 if (requestMetadata_userOverrides_userId != null) { | 664 if (requestMetadata_userOverrides_userId != null) { |
662 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us
erOverrides_userId]; | 665 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us
erOverrides_userId]; |
663 } | 666 } |
664 if (requestMetadata_partnersSessionId != null) { | |
665 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn
ersSessionId]; | |
666 } | |
667 if (requestMetadata_trafficSource_trafficSourceId != null) { | 667 if (requestMetadata_trafficSource_trafficSourceId != null) { |
668 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe
tadata_trafficSource_trafficSourceId]; | 668 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe
tadata_trafficSource_trafficSourceId]; |
669 } | 669 } |
670 if (requestMetadata_locale != null) { | 670 if (requestMetadata_locale != null) { |
671 _queryParams["requestMetadata.locale"] = [requestMetadata_locale]; | 671 _queryParams["requestMetadata.locale"] = [requestMetadata_locale]; |
672 } | 672 } |
673 if (requestMetadata_userOverrides_ipAddress != null) { | 673 if (requestMetadata_userOverrides_ipAddress != null) { |
674 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata
_userOverrides_ipAddress]; | 674 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata
_userOverrides_ipAddress]; |
675 } | 675 } |
676 if (requestMetadata_experimentIds != null) { | 676 if (requestMetadata_experimentIds != null) { |
(...skipping 23 matching lines...) Expand all Loading... |
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_locale] - Locale to use for the current request. |
| 711 * |
| 712 * [requestMetadata_userOverrides_ipAddress] - IP address to use instead of |
| 713 * the user's geo-located IP address. |
| 714 * |
| 715 * [requestMetadata_experimentIds] - Experiment IDs the current request |
| 716 * belongs to. |
| 717 * |
| 718 * [requestMetadata_trafficSource_trafficSubId] - Second level identifier to |
| 719 * indicate where the traffic comes from. |
| 720 * An identifier has multiple letters created by a team which redirected the |
| 721 * traffic to us. |
| 722 * |
| 723 * [orderBy] - How to order Leads. Currently, only `create_time` |
| 724 * and `create_time desc` are supported |
| 725 * |
710 * [requestMetadata_partnersSessionId] - Google Partners session ID. | 726 * [requestMetadata_partnersSessionId] - Google Partners session ID. |
711 * | 727 * |
712 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate | 728 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate |
713 * instead of the user's ID. | 729 * instead of the user's ID. |
714 * | 730 * |
715 * [pageToken] - A token identifying a page of results that the server | 731 * [pageToken] - A token identifying a page of results that the server |
716 * returns. | 732 * returns. |
717 * Typically, this is the value of `ListLeadsResponse.next_page_token` | 733 * Typically, this is the value of `ListLeadsResponse.next_page_token` |
718 * returned from the previous call to | 734 * returned from the previous call to |
719 * ListLeads. | 735 * ListLeads. |
720 * | 736 * |
721 * [pageSize] - Requested page size. Server may return fewer leads than | 737 * [pageSize] - Requested page size. Server may return fewer leads than |
722 * requested. | 738 * requested. |
723 * If unspecified, server picks an appropriate default. | 739 * If unspecified, server picks an appropriate default. |
724 * | 740 * |
725 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate | 741 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate |
726 * where the traffic comes from. | 742 * where the traffic comes from. |
727 * 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 |
728 * traffic to us. | 744 * traffic to us. |
729 * | 745 * |
730 * [requestMetadata_locale] - Locale to use for the current request. | |
731 * | |
732 * [requestMetadata_userOverrides_ipAddress] - IP address to use instead of | |
733 * the user's geo-located IP address. | |
734 * | |
735 * [requestMetadata_experimentIds] - Experiment IDs the current request | |
736 * belongs to. | |
737 * | |
738 * [orderBy] - How to order Leads. Currently, only `create_time` | |
739 * and `create_time desc` are supported | |
740 * | |
741 * [requestMetadata_trafficSource_trafficSubId] - Second level identifier to | |
742 * indicate where the traffic comes from. | |
743 * An identifier has multiple letters created by a team which redirected the | |
744 * traffic to us. | |
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.String requestMetadata_partnersSess
ionId, core.String requestMetadata_userOverrides_userId, 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}) { | 754 async.Future<ListLeadsResponse> list({core.String requestMetadata_locale, core
.String requestMetadata_userOverrides_ipAddress, core.List<core.String> requestM
etadata_experimentIds, core.String requestMetadata_trafficSource_trafficSubId, c
ore.String orderBy, core.String requestMetadata_partnersSessionId, core.String r
equestMetadata_userOverrides_userId, core.String pageToken, core.int pageSize, c
ore.String requestMetadata_trafficSource_trafficSourceId}) { |
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_locale != null) { |
| 763 _queryParams["requestMetadata.locale"] = [requestMetadata_locale]; |
| 764 } |
| 765 if (requestMetadata_userOverrides_ipAddress != null) { |
| 766 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata
_userOverrides_ipAddress]; |
| 767 } |
| 768 if (requestMetadata_experimentIds != null) { |
| 769 _queryParams["requestMetadata.experimentIds"] = requestMetadata_experiment
Ids; |
| 770 } |
| 771 if (requestMetadata_trafficSource_trafficSubId != null) { |
| 772 _queryParams["requestMetadata.trafficSource.trafficSubId"] = [requestMetad
ata_trafficSource_trafficSubId]; |
| 773 } |
| 774 if (orderBy != null) { |
| 775 _queryParams["orderBy"] = [orderBy]; |
| 776 } |
762 if (requestMetadata_partnersSessionId != null) { | 777 if (requestMetadata_partnersSessionId != null) { |
763 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn
ersSessionId]; | 778 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn
ersSessionId]; |
764 } | 779 } |
765 if (requestMetadata_userOverrides_userId != null) { | 780 if (requestMetadata_userOverrides_userId != null) { |
766 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us
erOverrides_userId]; | 781 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us
erOverrides_userId]; |
767 } | 782 } |
768 if (pageToken != null) { | 783 if (pageToken != null) { |
769 _queryParams["pageToken"] = [pageToken]; | 784 _queryParams["pageToken"] = [pageToken]; |
770 } | 785 } |
771 if (pageSize != null) { | 786 if (pageSize != null) { |
772 _queryParams["pageSize"] = ["${pageSize}"]; | 787 _queryParams["pageSize"] = ["${pageSize}"]; |
773 } | 788 } |
774 if (requestMetadata_trafficSource_trafficSourceId != null) { | 789 if (requestMetadata_trafficSource_trafficSourceId != null) { |
775 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe
tadata_trafficSource_trafficSourceId]; | 790 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe
tadata_trafficSource_trafficSourceId]; |
776 } | 791 } |
777 if (requestMetadata_locale != null) { | |
778 _queryParams["requestMetadata.locale"] = [requestMetadata_locale]; | |
779 } | |
780 if (requestMetadata_userOverrides_ipAddress != null) { | |
781 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata
_userOverrides_ipAddress]; | |
782 } | |
783 if (requestMetadata_experimentIds != null) { | |
784 _queryParams["requestMetadata.experimentIds"] = requestMetadata_experiment
Ids; | |
785 } | |
786 if (orderBy != null) { | |
787 _queryParams["orderBy"] = [orderBy]; | |
788 } | |
789 if (requestMetadata_trafficSource_trafficSubId != null) { | |
790 _queryParams["requestMetadata.trafficSource.trafficSubId"] = [requestMetad
ata_trafficSource_trafficSubId]; | |
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_partnersSessionId] - Google Partners session ID. |
| 822 * |
| 823 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate |
| 824 * instead of the user's ID. |
| 825 * |
821 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate | 826 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate |
822 * where the traffic comes from. | 827 * where the traffic comes from. |
823 * An identifier has multiple letters created by a team which redirected the | 828 * An identifier has multiple letters created by a team which redirected the |
824 * traffic to us. | 829 * traffic to us. |
825 * | 830 * |
826 * [requestMetadata_locale] - Locale to use for the current request. | 831 * [requestMetadata_locale] - Locale to use for the current request. |
827 * | 832 * |
828 * [requestMetadata_userOverrides_ipAddress] - IP address to use instead of | 833 * [requestMetadata_userOverrides_ipAddress] - IP address to use instead of |
829 * the user's geo-located IP address. | 834 * the user's geo-located IP address. |
830 * | 835 * |
831 * [requestMetadata_experimentIds] - Experiment IDs the current request | 836 * [requestMetadata_experimentIds] - Experiment IDs the current request |
832 * belongs to. | 837 * belongs to. |
833 * | 838 * |
834 * [requestMetadata_trafficSource_trafficSubId] - Second level identifier to | 839 * [requestMetadata_trafficSource_trafficSubId] - Second level identifier to |
835 * indicate where the traffic comes from. | 840 * indicate where the traffic comes from. |
836 * An identifier has multiple letters created by a team which redirected the | 841 * An identifier has multiple letters created by a team which redirected the |
837 * traffic to us. | 842 * traffic to us. |
838 * | 843 * |
839 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate | |
840 * instead of the user's ID. | |
841 * | |
842 * [requestMetadata_partnersSessionId] - Google Partners session 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_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_userOverrides_userId, core.String requestMetadata_partnersSessionId}) { | 852 async.Future<ListOffersResponse> list({core.String requestMetadata_partnersSes
sionId, core.String requestMetadata_userOverrides_userId, 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}) { |
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_partnersSessionId != null) { |
| 861 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn
ersSessionId]; |
| 862 } |
| 863 if (requestMetadata_userOverrides_userId != null) { |
| 864 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us
erOverrides_userId]; |
| 865 } |
860 if (requestMetadata_trafficSource_trafficSourceId != null) { | 866 if (requestMetadata_trafficSource_trafficSourceId != null) { |
861 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe
tadata_trafficSource_trafficSourceId]; | 867 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe
tadata_trafficSource_trafficSourceId]; |
862 } | 868 } |
863 if (requestMetadata_locale != null) { | 869 if (requestMetadata_locale != null) { |
864 _queryParams["requestMetadata.locale"] = [requestMetadata_locale]; | 870 _queryParams["requestMetadata.locale"] = [requestMetadata_locale]; |
865 } | 871 } |
866 if (requestMetadata_userOverrides_ipAddress != null) { | 872 if (requestMetadata_userOverrides_ipAddress != null) { |
867 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata
_userOverrides_ipAddress]; | 873 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata
_userOverrides_ipAddress]; |
868 } | 874 } |
869 if (requestMetadata_experimentIds != null) { | 875 if (requestMetadata_experimentIds != null) { |
870 _queryParams["requestMetadata.experimentIds"] = requestMetadata_experiment
Ids; | 876 _queryParams["requestMetadata.experimentIds"] = requestMetadata_experiment
Ids; |
871 } | 877 } |
872 if (requestMetadata_trafficSource_trafficSubId != null) { | 878 if (requestMetadata_trafficSource_trafficSubId != null) { |
873 _queryParams["requestMetadata.trafficSource.trafficSubId"] = [requestMetad
ata_trafficSource_trafficSubId]; | 879 _queryParams["requestMetadata.trafficSource.trafficSubId"] = [requestMetad
ata_trafficSource_trafficSubId]; |
874 } | 880 } |
875 if (requestMetadata_userOverrides_userId != null) { | |
876 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us
erOverrides_userId]; | |
877 } | |
878 if (requestMetadata_partnersSessionId != null) { | |
879 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn
ersSessionId]; | |
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_experimentIds] - Experiment IDs the current request |
| 909 * belongs to. |
| 910 * |
| 911 * [entireCompany] - if true, show history for the entire company. Requires |
| 912 * user to be admin. |
| 913 * |
908 * [requestMetadata_trafficSource_trafficSubId] - Second level identifier to | 914 * [requestMetadata_trafficSource_trafficSubId] - Second level identifier to |
909 * indicate where the traffic comes from. | 915 * indicate where the traffic comes from. |
910 * An identifier has multiple letters created by a team which redirected the | 916 * An identifier has multiple letters created by a team which redirected the |
911 * traffic to us. | 917 * traffic to us. |
912 * | 918 * |
913 * [orderBy] - Comma-separated list of fields to order by, e.g.: | 919 * [orderBy] - Comma-separated list of fields to order by, e.g.: |
914 * "foo,bar,baz". | 920 * "foo,bar,baz". |
915 * Use "foo desc" to sort descending. | 921 * Use "foo desc" to sort descending. |
916 * List of valid field names is: name, offer_code, expiration_time, status, | 922 * List of valid field names is: name, offer_code, expiration_time, status, |
917 * last_modified_time, sender_name, creation_time, country_code, | 923 * last_modified_time, sender_name, creation_time, country_code, |
(...skipping 11 matching lines...) Expand all Loading... |
929 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate | 935 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate |
930 * where the traffic comes from. | 936 * where the traffic comes from. |
931 * An identifier has multiple letters created by a team which redirected the | 937 * An identifier has multiple letters created by a team which redirected the |
932 * traffic to us. | 938 * traffic to us. |
933 * | 939 * |
934 * [requestMetadata_locale] - Locale to use for the current request. | 940 * [requestMetadata_locale] - Locale to use for the current request. |
935 * | 941 * |
936 * [requestMetadata_userOverrides_ipAddress] - IP address to use instead of | 942 * [requestMetadata_userOverrides_ipAddress] - IP address to use instead of |
937 * the user's geo-located IP address. | 943 * the user's geo-located IP address. |
938 * | 944 * |
939 * [requestMetadata_experimentIds] - Experiment IDs the current request | |
940 * belongs to. | |
941 * | |
942 * [entireCompany] - if true, show history for the entire company. Requires | |
943 * user to be admin. | |
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_traf
ficSource_trafficSubId, core.String orderBy, core.String requestMetadata_partner
sSessionId, core.String requestMetadata_userOverrides_userId, core.String pageTo
ken, core.int pageSize, core.String requestMetadata_trafficSource_trafficSourceI
d, core.String requestMetadata_locale, core.String requestMetadata_userOverrides
_ipAddress, core.List<core.String> requestMetadata_experimentIds, core.bool enti
reCompany}) { | 953 async.Future<ListOffersHistoryResponse> list({core.List<core.String> requestMe
tadata_experimentIds, core.bool entireCompany, core.String requestMetadata_traff
icSource_trafficSubId, core.String orderBy, core.String requestMetadata_partners
SessionId, core.String requestMetadata_userOverrides_userId, core.String pageTok
en, core.int pageSize, core.String requestMetadata_trafficSource_trafficSourceId
, core.String requestMetadata_locale, core.String requestMetadata_userOverrides_
ipAddress}) { |
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_experimentIds != null) { |
| 962 _queryParams["requestMetadata.experimentIds"] = requestMetadata_experiment
Ids; |
| 963 } |
| 964 if (entireCompany != null) { |
| 965 _queryParams["entireCompany"] = ["${entireCompany}"]; |
| 966 } |
961 if (requestMetadata_trafficSource_trafficSubId != null) { | 967 if (requestMetadata_trafficSource_trafficSubId != null) { |
962 _queryParams["requestMetadata.trafficSource.trafficSubId"] = [requestMetad
ata_trafficSource_trafficSubId]; | 968 _queryParams["requestMetadata.trafficSource.trafficSubId"] = [requestMetad
ata_trafficSource_trafficSubId]; |
963 } | 969 } |
964 if (orderBy != null) { | 970 if (orderBy != null) { |
965 _queryParams["orderBy"] = [orderBy]; | 971 _queryParams["orderBy"] = [orderBy]; |
966 } | 972 } |
967 if (requestMetadata_partnersSessionId != null) { | 973 if (requestMetadata_partnersSessionId != null) { |
968 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn
ersSessionId]; | 974 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn
ersSessionId]; |
969 } | 975 } |
970 if (requestMetadata_userOverrides_userId != null) { | 976 if (requestMetadata_userOverrides_userId != null) { |
971 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us
erOverrides_userId]; | 977 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us
erOverrides_userId]; |
972 } | 978 } |
973 if (pageToken != null) { | 979 if (pageToken != null) { |
974 _queryParams["pageToken"] = [pageToken]; | 980 _queryParams["pageToken"] = [pageToken]; |
975 } | 981 } |
976 if (pageSize != null) { | 982 if (pageSize != null) { |
977 _queryParams["pageSize"] = ["${pageSize}"]; | 983 _queryParams["pageSize"] = ["${pageSize}"]; |
978 } | 984 } |
979 if (requestMetadata_trafficSource_trafficSourceId != null) { | 985 if (requestMetadata_trafficSource_trafficSourceId != null) { |
980 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe
tadata_trafficSource_trafficSourceId]; | 986 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe
tadata_trafficSource_trafficSourceId]; |
981 } | 987 } |
982 if (requestMetadata_locale != null) { | 988 if (requestMetadata_locale != null) { |
983 _queryParams["requestMetadata.locale"] = [requestMetadata_locale]; | 989 _queryParams["requestMetadata.locale"] = [requestMetadata_locale]; |
984 } | 990 } |
985 if (requestMetadata_userOverrides_ipAddress != null) { | 991 if (requestMetadata_userOverrides_ipAddress != null) { |
986 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata
_userOverrides_ipAddress]; | 992 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata
_userOverrides_ipAddress]; |
987 } | 993 } |
988 if (requestMetadata_experimentIds != null) { | |
989 _queryParams["requestMetadata.experimentIds"] = requestMetadata_experiment
Ids; | |
990 } | |
991 if (entireCompany != null) { | |
992 _queryParams["entireCompany"] = ["${entireCompany}"]; | |
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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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_partnersSessionId] - Google Partners session ID. | |
1162 * | |
1163 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate | 1161 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate |
1164 * instead of the user's ID. | 1162 * instead of the user's ID. |
1165 * | 1163 * |
| 1164 * [requestMetadata_partnersSessionId] - Google Partners session ID. |
| 1165 * |
1166 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate | 1166 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate |
1167 * where the traffic comes from. | 1167 * where the traffic comes from. |
1168 * An identifier has multiple letters created by a team which redirected the | 1168 * An identifier has multiple letters created by a team which redirected the |
1169 * traffic to us. | 1169 * traffic to us. |
1170 * | 1170 * |
1171 * [requestMetadata_locale] - Locale to use for the current request. | 1171 * [requestMetadata_locale] - Locale to use for the current request. |
1172 * | 1172 * |
1173 * [requestMetadata_userOverrides_ipAddress] - IP address to use instead of | 1173 * [requestMetadata_userOverrides_ipAddress] - IP address to use instead of |
1174 * the user's geo-located IP address. | 1174 * the user's geo-located IP address. |
1175 * | 1175 * |
1176 * [requestMetadata_experimentIds] - Experiment IDs the current request | 1176 * [requestMetadata_experimentIds] - Experiment IDs the current request |
1177 * belongs to. | 1177 * belongs to. |
1178 * | 1178 * |
1179 * [requestMetadata_trafficSource_trafficSubId] - Second level identifier to | 1179 * [requestMetadata_trafficSource_trafficSubId] - Second level identifier to |
1180 * indicate where the traffic comes from. | 1180 * indicate where the traffic comes from. |
1181 * An identifier has multiple letters created by a team which redirected the | 1181 * An identifier has multiple letters created by a team which redirected the |
1182 * traffic to us. | 1182 * traffic to us. |
1183 * | 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_partnersSessionId, core.String r
equestMetadata_userOverrides_userId, 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.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}) { |
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_userOverrides_userId != null) { |
| 1207 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us
erOverrides_userId]; |
| 1208 } |
1206 if (requestMetadata_partnersSessionId != null) { | 1209 if (requestMetadata_partnersSessionId != null) { |
1207 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn
ersSessionId]; | 1210 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn
ersSessionId]; |
1208 } | 1211 } |
1209 if (requestMetadata_userOverrides_userId != null) { | |
1210 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us
erOverrides_userId]; | |
1211 } | |
1212 if (requestMetadata_trafficSource_trafficSourceId != null) { | 1212 if (requestMetadata_trafficSource_trafficSourceId != null) { |
1213 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe
tadata_trafficSource_trafficSourceId]; | 1213 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe
tadata_trafficSource_trafficSourceId]; |
1214 } | 1214 } |
1215 if (requestMetadata_locale != null) { | 1215 if (requestMetadata_locale != null) { |
1216 _queryParams["requestMetadata.locale"] = [requestMetadata_locale]; | 1216 _queryParams["requestMetadata.locale"] = [requestMetadata_locale]; |
1217 } | 1217 } |
1218 if (requestMetadata_userOverrides_ipAddress != null) { | 1218 if (requestMetadata_userOverrides_ipAddress != null) { |
1219 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata
_userOverrides_ipAddress]; | 1219 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata
_userOverrides_ipAddress]; |
1220 } | 1220 } |
1221 if (requestMetadata_experimentIds != null) { | 1221 if (requestMetadata_experimentIds != null) { |
(...skipping 24 matching lines...) Expand all Loading... |
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 * |
1256 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate | 1258 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate |
1257 * instead of the user's ID. | 1259 * instead of the user's ID. |
1258 * | 1260 * |
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_userOverrides_userId, core.String req
uestMetadata_partnersSessionId, 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_partnersSessionId, core.String reques
tMetadata_userOverrides_userId, 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_partnersSessionId != null) { |
| 1297 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn
ersSessionId]; |
| 1298 } |
1296 if (requestMetadata_userOverrides_userId != null) { | 1299 if (requestMetadata_userOverrides_userId != null) { |
1297 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us
erOverrides_userId]; | 1300 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us
erOverrides_userId]; |
1298 } | 1301 } |
1299 if (requestMetadata_partnersSessionId != null) { | |
1300 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn
ersSessionId]; | |
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 Loading... |
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_experimentIds] - Experiment IDs the current request |
| 1334 * belongs to. |
| 1335 * |
| 1336 * [requestMetadata_trafficSource_trafficSubId] - Second level identifier to |
| 1337 * indicate where the traffic comes from. |
| 1338 * An identifier has multiple letters created by a team which redirected the |
| 1339 * traffic to us. |
| 1340 * |
1333 * [requestMetadata_partnersSessionId] - Google Partners session ID. | 1341 * [requestMetadata_partnersSessionId] - Google Partners session ID. |
1334 * | 1342 * |
1335 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate | 1343 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate |
1336 * instead of the user's ID. | 1344 * instead of the user's ID. |
1337 * | 1345 * |
1338 * [userView] - Specifies what parts of the user information to return. | 1346 * [userView] - Specifies what parts of the user information to return. |
1339 * Possible string values are: | 1347 * Possible string values are: |
1340 * - "BASIC" : A BASIC. | 1348 * - "BASIC" : A BASIC. |
1341 * - "PROFILE" : A PROFILE. | 1349 * - "PROFILE" : A PROFILE. |
1342 * - "PUBLIC_PROFILE" : A PUBLIC_PROFILE. | 1350 * - "PUBLIC_PROFILE" : A PUBLIC_PROFILE. |
1343 * | 1351 * |
1344 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate | 1352 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate |
1345 * where the traffic comes from. | 1353 * where the traffic comes from. |
1346 * An identifier has multiple letters created by a team which redirected the | 1354 * An identifier has multiple letters created by a team which redirected the |
1347 * traffic to us. | 1355 * traffic to us. |
1348 * | 1356 * |
1349 * [requestMetadata_locale] - Locale to use for the current request. | 1357 * [requestMetadata_locale] - Locale to use for the current request. |
1350 * | 1358 * |
1351 * [requestMetadata_userOverrides_ipAddress] - IP address to use instead of | 1359 * [requestMetadata_userOverrides_ipAddress] - IP address to use instead of |
1352 * the user's geo-located IP address. | 1360 * the user's geo-located IP address. |
1353 * | 1361 * |
1354 * [requestMetadata_experimentIds] - Experiment IDs the current request | |
1355 * belongs to. | |
1356 * | |
1357 * [requestMetadata_trafficSource_trafficSubId] - Second level identifier to | |
1358 * indicate where the traffic comes from. | |
1359 * An identifier has multiple letters created by a team which redirected the | |
1360 * traffic to us. | |
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_partne
rsSessionId, core.String requestMetadata_userOverrides_userId, 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}) { | 1370 async.Future<User> get(core.String userId, {core.List<core.String> requestMeta
data_experimentIds, core.String requestMetadata_trafficSource_trafficSubId, core
.String requestMetadata_partnersSessionId, core.String requestMetadata_userOverr
ides_userId, core.String userView, core.String requestMetadata_trafficSource_tra
fficSourceId, core.String requestMetadata_locale, core.String requestMetadata_us
erOverrides_ipAddress}) { |
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_experimentIds != null) { |
| 1382 _queryParams["requestMetadata.experimentIds"] = requestMetadata_experiment
Ids; |
| 1383 } |
| 1384 if (requestMetadata_trafficSource_trafficSubId != null) { |
| 1385 _queryParams["requestMetadata.trafficSource.trafficSubId"] = [requestMetad
ata_trafficSource_trafficSubId]; |
| 1386 } |
1381 if (requestMetadata_partnersSessionId != null) { | 1387 if (requestMetadata_partnersSessionId != null) { |
1382 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn
ersSessionId]; | 1388 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn
ersSessionId]; |
1383 } | 1389 } |
1384 if (requestMetadata_userOverrides_userId != null) { | 1390 if (requestMetadata_userOverrides_userId != null) { |
1385 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us
erOverrides_userId]; | 1391 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us
erOverrides_userId]; |
1386 } | 1392 } |
1387 if (userView != null) { | 1393 if (userView != null) { |
1388 _queryParams["userView"] = [userView]; | 1394 _queryParams["userView"] = [userView]; |
1389 } | 1395 } |
1390 if (requestMetadata_trafficSource_trafficSourceId != null) { | 1396 if (requestMetadata_trafficSource_trafficSourceId != null) { |
1391 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe
tadata_trafficSource_trafficSourceId]; | 1397 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe
tadata_trafficSource_trafficSourceId]; |
1392 } | 1398 } |
1393 if (requestMetadata_locale != null) { | 1399 if (requestMetadata_locale != null) { |
1394 _queryParams["requestMetadata.locale"] = [requestMetadata_locale]; | 1400 _queryParams["requestMetadata.locale"] = [requestMetadata_locale]; |
1395 } | 1401 } |
1396 if (requestMetadata_userOverrides_ipAddress != null) { | 1402 if (requestMetadata_userOverrides_ipAddress != null) { |
1397 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata
_userOverrides_ipAddress]; | 1403 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata
_userOverrides_ipAddress]; |
1398 } | 1404 } |
1399 if (requestMetadata_experimentIds != null) { | |
1400 _queryParams["requestMetadata.experimentIds"] = requestMetadata_experiment
Ids; | |
1401 } | |
1402 if (requestMetadata_trafficSource_trafficSubId != null) { | |
1403 _queryParams["requestMetadata.trafficSource.trafficSubId"] = [requestMetad
ata_trafficSource_trafficSubId]; | |
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); |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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_experimentIds] - Experiment IDs the current request | |
1518 * belongs to. | |
1519 * | |
1520 * [requestMetadata_trafficSource_trafficSubId] - Second level identifier to | |
1521 * indicate where the traffic comes from. | |
1522 * An identifier has multiple letters created by a team which redirected the | |
1523 * traffic to us. | |
1524 * | |
1525 * [requestMetadata_partnersSessionId] - Google Partners session ID. | 1517 * [requestMetadata_partnersSessionId] - Google Partners session ID. |
1526 * | 1518 * |
1527 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate | 1519 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate |
1528 * instead of the user's ID. | 1520 * instead of the user's ID. |
1529 * | 1521 * |
1530 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate | 1522 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate |
1531 * where the traffic comes from. | 1523 * where the traffic comes from. |
1532 * 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 |
1533 * traffic to us. | 1525 * traffic to us. |
1534 * | 1526 * |
1535 * [requestMetadata_locale] - Locale to use for the current request. | 1527 * [requestMetadata_locale] - Locale to use for the current request. |
1536 * | 1528 * |
1537 * [requestMetadata_userOverrides_ipAddress] - IP address to use instead of | 1529 * [requestMetadata_userOverrides_ipAddress] - IP address to use instead of |
1538 * the user's geo-located IP address. | 1530 * the user's geo-located IP address. |
1539 * | 1531 * |
| 1532 * [requestMetadata_experimentIds] - Experiment IDs the current request |
| 1533 * belongs to. |
| 1534 * |
| 1535 * [requestMetadata_trafficSource_trafficSubId] - Second level identifier to |
| 1536 * indicate where the traffic comes from. |
| 1537 * An identifier has multiple letters created by a team which redirected the |
| 1538 * traffic to us. |
| 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.List<core.Stri
ng> requestMetadata_experimentIds, core.String requestMetadata_trafficSource_tra
fficSubId, core.String requestMetadata_partnersSessionId, core.String requestMet
adata_userOverrides_userId, core.String requestMetadata_trafficSource_trafficSou
rceId, core.String requestMetadata_locale, core.String requestMetadata_userOverr
ides_ipAddress}) { | 1548 async.Future<GetPartnersStatusResponse> getPartnersstatus({core.String request
Metadata_partnersSessionId, core.String requestMetadata_userOverrides_userId, 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_experimentIds != null) { | |
1557 _queryParams["requestMetadata.experimentIds"] = requestMetadata_experiment
Ids; | |
1558 } | |
1559 if (requestMetadata_trafficSource_trafficSubId != null) { | |
1560 _queryParams["requestMetadata.trafficSource.trafficSubId"] = [requestMetad
ata_trafficSource_trafficSubId]; | |
1561 } | |
1562 if (requestMetadata_partnersSessionId != null) { | 1556 if (requestMetadata_partnersSessionId != null) { |
1563 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn
ersSessionId]; | 1557 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn
ersSessionId]; |
1564 } | 1558 } |
1565 if (requestMetadata_userOverrides_userId != null) { | 1559 if (requestMetadata_userOverrides_userId != null) { |
1566 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us
erOverrides_userId]; | 1560 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us
erOverrides_userId]; |
1567 } | 1561 } |
1568 if (requestMetadata_trafficSource_trafficSourceId != null) { | 1562 if (requestMetadata_trafficSource_trafficSourceId != null) { |
1569 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe
tadata_trafficSource_trafficSourceId]; | 1563 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe
tadata_trafficSource_trafficSourceId]; |
1570 } | 1564 } |
1571 if (requestMetadata_locale != null) { | 1565 if (requestMetadata_locale != null) { |
1572 _queryParams["requestMetadata.locale"] = [requestMetadata_locale]; | 1566 _queryParams["requestMetadata.locale"] = [requestMetadata_locale]; |
1573 } | 1567 } |
1574 if (requestMetadata_userOverrides_ipAddress != null) { | 1568 if (requestMetadata_userOverrides_ipAddress != null) { |
1575 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata
_userOverrides_ipAddress]; | 1569 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata
_userOverrides_ipAddress]; |
1576 } | 1570 } |
| 1571 if (requestMetadata_experimentIds != null) { |
| 1572 _queryParams["requestMetadata.experimentIds"] = requestMetadata_experiment
Ids; |
| 1573 } |
| 1574 if (requestMetadata_trafficSource_trafficSubId != null) { |
| 1575 _queryParams["requestMetadata.trafficSource.trafficSubId"] = [requestMetad
ata_trafficSource_trafficSubId]; |
| 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_trafficSource_trafficSubId] - Second level identifier to | 1598 * [requestMetadata_partnersSessionId] - Google Partners session ID. |
1599 * indicate where the traffic comes from. | |
1600 * An identifier has multiple letters created by a team which redirected the | |
1601 * traffic to us. | |
1602 * | 1599 * |
1603 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate | 1600 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate |
1604 * instead of the user's ID. | 1601 * instead of the user's ID. |
1605 * | 1602 * |
1606 * [requestMetadata_partnersSessionId] - Google Partners session ID. | |
1607 * | |
1608 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate | 1603 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate |
1609 * where the traffic comes from. | 1604 * where the traffic comes from. |
1610 * An identifier has multiple letters created by a team which redirected the | 1605 * An identifier has multiple letters created by a team which redirected the |
1611 * traffic to us. | 1606 * traffic to us. |
1612 * | 1607 * |
1613 * [requestMetadata_locale] - Locale to use for the current request. | 1608 * [requestMetadata_locale] - Locale to use for the current request. |
1614 * | 1609 * |
1615 * [requestMetadata_userOverrides_ipAddress] - IP address to use instead of | 1610 * [requestMetadata_userOverrides_ipAddress] - IP address to use instead of |
1616 * the user's geo-located IP address. | 1611 * the user's geo-located IP address. |
1617 * | 1612 * |
1618 * [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. |
1619 * Required with at least 1 value in FieldMask's paths. | 1614 * Required with at least 1 value in FieldMask's paths. |
1620 * | 1615 * |
1621 * [requestMetadata_experimentIds] - Experiment IDs the current request | 1616 * [requestMetadata_experimentIds] - Experiment IDs the current request |
1622 * belongs to. | 1617 * belongs to. |
1623 * | 1618 * |
| 1619 * [requestMetadata_trafficSource_trafficSubId] - Second level identifier to |
| 1620 * indicate where the traffic comes from. |
| 1621 * An identifier has multiple letters created by a team which redirected the |
| 1622 * traffic to us. |
| 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_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.String updateMask, core.List<core.St
ring> requestMetadata_experimentIds}) { | 1632 async.Future<Company> updateCompanies(Company request, {core.String requestMet
adata_partnersSessionId, core.String requestMetadata_userOverrides_userId, 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_trafficSource_trafficSubId != null) { | 1643 if (requestMetadata_partnersSessionId != null) { |
1644 _queryParams["requestMetadata.trafficSource.trafficSubId"] = [requestMetad
ata_trafficSource_trafficSubId]; | 1644 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn
ersSessionId]; |
1645 } | 1645 } |
1646 if (requestMetadata_userOverrides_userId != null) { | 1646 if (requestMetadata_userOverrides_userId != null) { |
1647 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us
erOverrides_userId]; | 1647 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us
erOverrides_userId]; |
1648 } | 1648 } |
1649 if (requestMetadata_partnersSessionId != null) { | |
1650 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn
ersSessionId]; | |
1651 } | |
1652 if (requestMetadata_trafficSource_trafficSourceId != null) { | 1649 if (requestMetadata_trafficSource_trafficSourceId != null) { |
1653 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe
tadata_trafficSource_trafficSourceId]; | 1650 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe
tadata_trafficSource_trafficSourceId]; |
1654 } | 1651 } |
1655 if (requestMetadata_locale != null) { | 1652 if (requestMetadata_locale != null) { |
1656 _queryParams["requestMetadata.locale"] = [requestMetadata_locale]; | 1653 _queryParams["requestMetadata.locale"] = [requestMetadata_locale]; |
1657 } | 1654 } |
1658 if (requestMetadata_userOverrides_ipAddress != null) { | 1655 if (requestMetadata_userOverrides_ipAddress != null) { |
1659 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata
_userOverrides_ipAddress]; | 1656 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata
_userOverrides_ipAddress]; |
1660 } | 1657 } |
1661 if (updateMask != null) { | 1658 if (updateMask != null) { |
1662 _queryParams["updateMask"] = [updateMask]; | 1659 _queryParams["updateMask"] = [updateMask]; |
1663 } | 1660 } |
1664 if (requestMetadata_experimentIds != null) { | 1661 if (requestMetadata_experimentIds != null) { |
1665 _queryParams["requestMetadata.experimentIds"] = requestMetadata_experiment
Ids; | 1662 _queryParams["requestMetadata.experimentIds"] = requestMetadata_experiment
Ids; |
1666 } | 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_partnersSessionId] - Google Partners session ID. |
| 1688 * |
| 1689 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate |
| 1690 * instead of the user's ID. |
| 1691 * |
| 1692 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate |
| 1693 * where the traffic comes from. |
| 1694 * An identifier has multiple letters created by a team which redirected the |
| 1695 * traffic to us. |
| 1696 * |
1687 * [requestMetadata_locale] - Locale to use for the current request. | 1697 * [requestMetadata_locale] - Locale to use for the current request. |
1688 * | 1698 * |
1689 * [requestMetadata_userOverrides_ipAddress] - IP address to use instead of | 1699 * [requestMetadata_userOverrides_ipAddress] - IP address to use instead of |
1690 * the user's geo-located IP address. | 1700 * the user's geo-located IP address. |
1691 * | 1701 * |
1692 * [updateMask] - Standard field mask for the set of fields to be updated. | 1702 * [updateMask] - Standard field mask for the set of fields to be updated. |
1693 * Required with at least 1 value in FieldMask's paths. | 1703 * Required with at least 1 value in FieldMask's paths. |
1694 * Only `state` and `adwords_customer_id` are currently supported. | 1704 * Only `state` and `adwords_customer_id` are currently supported. |
1695 * | 1705 * |
1696 * [requestMetadata_experimentIds] - Experiment IDs the current request | 1706 * [requestMetadata_experimentIds] - Experiment IDs the current request |
1697 * belongs to. | 1707 * belongs to. |
1698 * | 1708 * |
1699 * [requestMetadata_trafficSource_trafficSubId] - Second level identifier to | 1709 * [requestMetadata_trafficSource_trafficSubId] - Second level identifier to |
1700 * indicate where the traffic comes from. | 1710 * indicate where the traffic comes from. |
1701 * An identifier has multiple letters created by a team which redirected the | 1711 * An identifier has multiple letters created by a team which redirected the |
1702 * traffic to us. | 1712 * traffic to us. |
1703 * | 1713 * |
1704 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate | |
1705 * instead of the user's ID. | |
1706 * | |
1707 * [requestMetadata_partnersSessionId] - Google Partners session ID. | |
1708 * | |
1709 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate | |
1710 * where the traffic comes from. | |
1711 * An identifier has multiple letters created by a team which redirected the | |
1712 * traffic to us. | |
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_loca
le, core.String requestMetadata_userOverrides_ipAddress, core.String updateMask,
core.List<core.String> requestMetadata_experimentIds, core.String requestMetada
ta_trafficSource_trafficSubId, core.String requestMetadata_userOverrides_userId,
core.String requestMetadata_partnersSessionId, core.String requestMetadata_traf
ficSource_trafficSourceId}) { | 1722 async.Future<Lead> updateLeads(Lead request, {core.String requestMetadata_part
nersSessionId, core.String requestMetadata_userOverrides_userId, core.String req
uestMetadata_trafficSource_trafficSourceId, core.String requestMetadata_locale,
core.String requestMetadata_userOverrides_ipAddress, core.String updateMask, cor
e.List<core.String> requestMetadata_experimentIds, core.String requestMetadata_t
rafficSource_trafficSubId}) { |
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_partnersSessionId != null) { |
| 1734 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn
ersSessionId]; |
| 1735 } |
| 1736 if (requestMetadata_userOverrides_userId != null) { |
| 1737 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us
erOverrides_userId]; |
| 1738 } |
| 1739 if (requestMetadata_trafficSource_trafficSourceId != null) { |
| 1740 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe
tadata_trafficSource_trafficSourceId]; |
| 1741 } |
1733 if (requestMetadata_locale != null) { | 1742 if (requestMetadata_locale != null) { |
1734 _queryParams["requestMetadata.locale"] = [requestMetadata_locale]; | 1743 _queryParams["requestMetadata.locale"] = [requestMetadata_locale]; |
1735 } | 1744 } |
1736 if (requestMetadata_userOverrides_ipAddress != null) { | 1745 if (requestMetadata_userOverrides_ipAddress != null) { |
1737 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata
_userOverrides_ipAddress]; | 1746 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata
_userOverrides_ipAddress]; |
1738 } | 1747 } |
1739 if (updateMask != null) { | 1748 if (updateMask != null) { |
1740 _queryParams["updateMask"] = [updateMask]; | 1749 _queryParams["updateMask"] = [updateMask]; |
1741 } | 1750 } |
1742 if (requestMetadata_experimentIds != null) { | 1751 if (requestMetadata_experimentIds != null) { |
1743 _queryParams["requestMetadata.experimentIds"] = requestMetadata_experiment
Ids; | 1752 _queryParams["requestMetadata.experimentIds"] = requestMetadata_experiment
Ids; |
1744 } | 1753 } |
1745 if (requestMetadata_trafficSource_trafficSubId != null) { | 1754 if (requestMetadata_trafficSource_trafficSubId != null) { |
1746 _queryParams["requestMetadata.trafficSource.trafficSubId"] = [requestMetad
ata_trafficSource_trafficSubId]; | 1755 _queryParams["requestMetadata.trafficSource.trafficSubId"] = [requestMetad
ata_trafficSource_trafficSubId]; |
1747 } | 1756 } |
1748 if (requestMetadata_userOverrides_userId != null) { | |
1749 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us
erOverrides_userId]; | |
1750 } | |
1751 if (requestMetadata_partnersSessionId != null) { | |
1752 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn
ersSessionId]; | |
1753 } | |
1754 if (requestMetadata_trafficSource_trafficSourceId != null) { | |
1755 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe
tadata_trafficSource_trafficSourceId]; | |
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, |
1766 downloadOptions: _downloadOptions); | 1766 downloadOptions: _downloadOptions); |
(...skipping 3526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5293 } | 5293 } |
5294 if (primaryCountryCode != null) { | 5294 if (primaryCountryCode != null) { |
5295 _json["primaryCountryCode"] = primaryCountryCode; | 5295 _json["primaryCountryCode"] = primaryCountryCode; |
5296 } | 5296 } |
5297 if (profilePublic != null) { | 5297 if (profilePublic != null) { |
5298 _json["profilePublic"] = profilePublic; | 5298 _json["profilePublic"] = profilePublic; |
5299 } | 5299 } |
5300 return _json; | 5300 return _json; |
5301 } | 5301 } |
5302 } | 5302 } |
OLD | NEW |