| 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 * |
| 53 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate | 55 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate |
| 54 * instead of the user's ID. | 56 * instead of the user's ID. |
| 55 * | 57 * |
| 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_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}) { | 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}) { |
| 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_partnersSessionId != null) { |
| 111 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn
ersSessionId]; |
| 112 } |
| 110 if (requestMetadata_userOverrides_userId != null) { | 113 if (requestMetadata_userOverrides_userId != null) { |
| 111 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us
erOverrides_userId]; | 114 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us
erOverrides_userId]; |
| 112 } | 115 } |
| 113 if (requestMetadata_partnersSessionId != null) { | |
| 114 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn
ersSessionId]; | |
| 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 * [address] - The address to use for sorting the company's addresses by |
| 219 * proximity. |
| 220 * If not given, the geo-located address of the request is used. |
| 221 * Used when order_by is set. |
| 222 * |
| 223 * [requestMetadata_locale] - Locale to use for the current request. |
| 224 * |
| 218 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate | 225 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate |
| 219 * where the traffic comes from. | 226 * where the traffic comes from. |
| 220 * An identifier has multiple letters created by a team which redirected the | 227 * An identifier has multiple letters created by a team which redirected the |
| 221 * traffic to us. | 228 * traffic to us. |
| 222 * | 229 * |
| 223 * [requestMetadata_userOverrides_ipAddress] - IP address to use instead of | 230 * [requestMetadata_userOverrides_ipAddress] - IP address to use instead of |
| 224 * the user's geo-located IP address. | 231 * the user's geo-located IP address. |
| 225 * | 232 * |
| 233 * [currencyCode] - If the company's budget is in a different currency code |
| 234 * than this one, then |
| 235 * the converted budget is converted to this currency code. |
| 236 * |
| 226 * [requestMetadata_experimentIds] - Experiment IDs the current request | 237 * [requestMetadata_experimentIds] - Experiment IDs the current request |
| 227 * belongs to. | 238 * belongs to. |
| 228 * | 239 * |
| 229 * [currencyCode] - If the company's budget is in a different currency code | 240 * [requestMetadata_trafficSource_trafficSubId] - Second level identifier to |
| 230 * than this one, then | 241 * indicate where the traffic comes from. |
| 231 * the converted budget is converted to this currency code. | 242 * An identifier has multiple letters created by a team which redirected the |
| 243 * traffic to us. |
| 232 * | 244 * |
| 233 * [orderBy] - How to order addresses within the returned company. Currently, | 245 * [orderBy] - How to order addresses within the returned company. Currently, |
| 234 * only | 246 * only |
| 235 * `address` and `address desc` is supported which will sorted by closest to | 247 * `address` and `address desc` is supported which will sorted by closest to |
| 236 * farthest in distance from given address and farthest to closest distance | 248 * farthest in distance from given address and farthest to closest distance |
| 237 * from given address respectively. | 249 * from given address respectively. |
| 238 * | 250 * |
| 239 * [requestMetadata_trafficSource_trafficSubId] - Second level identifier to | 251 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate |
| 240 * indicate where the traffic comes from. | 252 * instead of the user's ID. |
| 241 * An identifier has multiple letters created by a team which redirected the | |
| 242 * traffic to us. | |
| 243 * | 253 * |
| 244 * [requestMetadata_partnersSessionId] - Google Partners session ID. | 254 * [requestMetadata_partnersSessionId] - Google Partners session ID. |
| 245 * | 255 * |
| 246 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate | |
| 247 * instead of the user's ID. | |
| 248 * | |
| 249 * [view] - The view of `Company` resource to be returned. This must not be | 256 * [view] - The view of `Company` resource to be returned. This must not be |
| 250 * `COMPANY_VIEW_UNSPECIFIED`. | 257 * `COMPANY_VIEW_UNSPECIFIED`. |
| 251 * Possible string values are: | 258 * Possible string values are: |
| 252 * - "COMPANY_VIEW_UNSPECIFIED" : A COMPANY_VIEW_UNSPECIFIED. | 259 * - "COMPANY_VIEW_UNSPECIFIED" : A COMPANY_VIEW_UNSPECIFIED. |
| 253 * - "CV_GOOGLE_PARTNER_SEARCH" : A CV_GOOGLE_PARTNER_SEARCH. | 260 * - "CV_GOOGLE_PARTNER_SEARCH" : A CV_GOOGLE_PARTNER_SEARCH. |
| 254 * | 261 * |
| 255 * [address] - The address to use for sorting the company's addresses by | |
| 256 * proximity. | |
| 257 * If not given, the geo-located address of the request is used. | |
| 258 * Used when order_by is set. | |
| 259 * | |
| 260 * [requestMetadata_locale] - Locale to use for the current request. | |
| 261 * | |
| 262 * Completes with a [GetCompanyResponse]. | 262 * Completes with a [GetCompanyResponse]. |
| 263 * | 263 * |
| 264 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 264 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 265 * error. | 265 * error. |
| 266 * | 266 * |
| 267 * If the used [http.Client] completes with an error when making a REST call, | 267 * If the used [http.Client] completes with an error when making a REST call, |
| 268 * this method will complete with the same error. | 268 * this method will complete with the same error. |
| 269 */ | 269 */ |
| 270 async.Future<GetCompanyResponse> get(core.String companyId, {core.String reque
stMetadata_trafficSource_trafficSourceId, core.String requestMetadata_userOverri
des_ipAddress, core.List<core.String> requestMetadata_experimentIds, core.String
currencyCode, core.String orderBy, core.String requestMetadata_trafficSource_tr
afficSubId, core.String requestMetadata_partnersSessionId, core.String requestMe
tadata_userOverrides_userId, core.String view, core.String address, core.String
requestMetadata_locale}) { | 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}) { |
| 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) { |
| 282 _queryParams["address"] = [address]; |
| 283 } |
| 284 if (requestMetadata_locale != null) { |
| 285 _queryParams["requestMetadata.locale"] = [requestMetadata_locale]; |
| 286 } |
| 281 if (requestMetadata_trafficSource_trafficSourceId != null) { | 287 if (requestMetadata_trafficSource_trafficSourceId != null) { |
| 282 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe
tadata_trafficSource_trafficSourceId]; | 288 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe
tadata_trafficSource_trafficSourceId]; |
| 283 } | 289 } |
| 284 if (requestMetadata_userOverrides_ipAddress != null) { | 290 if (requestMetadata_userOverrides_ipAddress != null) { |
| 285 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata
_userOverrides_ipAddress]; | 291 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata
_userOverrides_ipAddress]; |
| 286 } | 292 } |
| 293 if (currencyCode != null) { |
| 294 _queryParams["currencyCode"] = [currencyCode]; |
| 295 } |
| 287 if (requestMetadata_experimentIds != null) { | 296 if (requestMetadata_experimentIds != null) { |
| 288 _queryParams["requestMetadata.experimentIds"] = requestMetadata_experiment
Ids; | 297 _queryParams["requestMetadata.experimentIds"] = requestMetadata_experiment
Ids; |
| 289 } | 298 } |
| 290 if (currencyCode != null) { | 299 if (requestMetadata_trafficSource_trafficSubId != null) { |
| 291 _queryParams["currencyCode"] = [currencyCode]; | 300 _queryParams["requestMetadata.trafficSource.trafficSubId"] = [requestMetad
ata_trafficSource_trafficSubId]; |
| 292 } | 301 } |
| 293 if (orderBy != null) { | 302 if (orderBy != null) { |
| 294 _queryParams["orderBy"] = [orderBy]; | 303 _queryParams["orderBy"] = [orderBy]; |
| 295 } | 304 } |
| 296 if (requestMetadata_trafficSource_trafficSubId != null) { | 305 if (requestMetadata_userOverrides_userId != null) { |
| 297 _queryParams["requestMetadata.trafficSource.trafficSubId"] = [requestMetad
ata_trafficSource_trafficSubId]; | 306 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us
erOverrides_userId]; |
| 298 } | 307 } |
| 299 if (requestMetadata_partnersSessionId != null) { | 308 if (requestMetadata_partnersSessionId != null) { |
| 300 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn
ersSessionId]; | 309 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn
ersSessionId]; |
| 301 } | 310 } |
| 302 if (requestMetadata_userOverrides_userId != null) { | |
| 303 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us
erOverrides_userId]; | |
| 304 } | |
| 305 if (view != null) { | 311 if (view != null) { |
| 306 _queryParams["view"] = [view]; | 312 _queryParams["view"] = [view]; |
| 307 } | 313 } |
| 308 if (address != null) { | |
| 309 _queryParams["address"] = [address]; | |
| 310 } | |
| 311 if (requestMetadata_locale != null) { | |
| 312 _queryParams["requestMetadata.locale"] = [requestMetadata_locale]; | |
| 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 |
| 349 * primary language |
| 350 * subtags are accepted as defined by |
| 351 * <a href="https://tools.ietf.org/html/bcp47">BCP 47</a> |
| 352 * (IETF BCP 47, "Tags for Identifying Languages"). |
| 353 * |
| 354 * [pageSize] - Requested page size. Server may return fewer companies than |
| 355 * requested. |
| 356 * If unspecified, server picks an appropriate default. |
| 357 * |
| 358 * [requestMetadata_userOverrides_ipAddress] - IP address to use instead of |
| 359 * the user's geo-located IP address. |
| 360 * |
| 361 * [requestMetadata_experimentIds] - Experiment IDs the current request |
| 362 * belongs to. |
| 363 * |
| 364 * [orderBy] - How to order addresses within the returned companies. |
| 365 * Currently, only |
| 366 * `address` and `address desc` is supported which will sorted by closest to |
| 367 * farthest in distance from given address and farthest to closest distance |
| 368 * from given address respectively. |
| 369 * |
| 370 * [specializations] - List of specializations that the returned agencies |
| 371 * should provide. If this |
| 372 * is not empty, any returned agency must have at least one of these |
| 373 * specializations, or one of the services in the "services" field. |
| 374 * |
| 375 * [maxMonthlyBudget_currencyCode] - The 3-letter currency code defined in ISO |
| 376 * 4217. |
| 377 * |
| 378 * [minMonthlyBudget_currencyCode] - The 3-letter currency code defined in ISO |
| 379 * 4217. |
| 380 * |
| 332 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate | 381 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate |
| 333 * instead of the user's ID. | 382 * instead of the user's ID. |
| 334 * | 383 * |
| 335 * [minMonthlyBudget_currencyCode] - The 3-letter currency code defined in ISO | |
| 336 * 4217. | |
| 337 * | |
| 338 * [view] - The view of the `Company` resource to be returned. This must not | 384 * [view] - The view of the `Company` resource to be returned. This must not |
| 339 * be | 385 * be |
| 340 * `COMPANY_VIEW_UNSPECIFIED`. | 386 * `COMPANY_VIEW_UNSPECIFIED`. |
| 341 * Possible string values are: | 387 * Possible string values are: |
| 342 * - "COMPANY_VIEW_UNSPECIFIED" : A COMPANY_VIEW_UNSPECIFIED. | 388 * - "COMPANY_VIEW_UNSPECIFIED" : A COMPANY_VIEW_UNSPECIFIED. |
| 343 * - "CV_GOOGLE_PARTNER_SEARCH" : A CV_GOOGLE_PARTNER_SEARCH. | 389 * - "CV_GOOGLE_PARTNER_SEARCH" : A CV_GOOGLE_PARTNER_SEARCH. |
| 344 * | 390 * |
| 345 * [requestMetadata_locale] - Locale to use for the current request. | 391 * [requestMetadata_locale] - Locale to use for the current request. |
| 346 * | 392 * |
| 347 * [address] - The address to use when searching for companies. | 393 * [address] - The address to use when searching for companies. |
| 348 * If not given, the geo-located address of the request is used. | 394 * If not given, the geo-located address of the request is used. |
| 349 * | 395 * |
| 350 * [minMonthlyBudget_units] - The whole units of the amount. | 396 * [minMonthlyBudget_units] - The whole units of the amount. |
| 351 * For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. | 397 * For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. |
| 352 * | 398 * |
| 353 * [maxMonthlyBudget_nanos] - Number of nano (10^-9) units of the amount. | 399 * [maxMonthlyBudget_nanos] - Number of nano (10^-9) units of the amount. |
| 354 * The value must be between -999,999,999 and +999,999,999 inclusive. | 400 * The value must be between -999,999,999 and +999,999,999 inclusive. |
| 355 * If `units` is positive, `nanos` must be positive or zero. | 401 * If `units` is positive, `nanos` must be positive or zero. |
| 356 * If `units` is zero, `nanos` can be positive, zero, or negative. | 402 * If `units` is zero, `nanos` can be positive, zero, or negative. |
| 357 * If `units` is negative, `nanos` must be negative or zero. | 403 * If `units` is negative, `nanos` must be negative or zero. |
| 358 * For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. | 404 * For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. |
| 359 * | 405 * |
| 360 * [services] - List of services that the returned agencies should provide. If | 406 * [services] - List of services that the returned agencies should provide. If |
| 361 * this is | 407 * this is |
| 362 * not empty, any returned agency must have at least one of these services, | 408 * not empty, any returned agency must have at least one of these services, |
| 363 * or one of the specializations in the "specializations" field. | 409 * or one of the specializations in the "specializations" field. |
| 364 * | 410 * |
| 411 * [maxMonthlyBudget_units] - The whole units of the amount. |
| 412 * For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. |
| 413 * |
| 365 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate | 414 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate |
| 366 * where the traffic comes from. | 415 * where the traffic comes from. |
| 367 * An identifier has multiple letters created by a team which redirected the | 416 * An identifier has multiple letters created by a team which redirected the |
| 368 * traffic to us. | 417 * traffic to us. |
| 369 * | 418 * |
| 370 * [maxMonthlyBudget_units] - The whole units of the amount. | |
| 371 * For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. | |
| 372 * | |
| 373 * [requestMetadata_trafficSource_trafficSubId] - Second level identifier to | 419 * [requestMetadata_trafficSource_trafficSubId] - Second level identifier to |
| 374 * indicate where the traffic comes from. | 420 * indicate where the traffic comes from. |
| 375 * An identifier has multiple letters created by a team which redirected the | 421 * An identifier has multiple letters created by a team which redirected the |
| 376 * traffic to us. | 422 * traffic to us. |
| 377 * | 423 * |
| 378 * [minMonthlyBudget_nanos] - Number of nano (10^-9) units of the amount. | 424 * [minMonthlyBudget_nanos] - Number of nano (10^-9) units of the amount. |
| 379 * The value must be between -999,999,999 and +999,999,999 inclusive. | 425 * The value must be between -999,999,999 and +999,999,999 inclusive. |
| 380 * If `units` is positive, `nanos` must be positive or zero. | 426 * If `units` is positive, `nanos` must be positive or zero. |
| 381 * If `units` is zero, `nanos` can be positive, zero, or negative. | 427 * If `units` is zero, `nanos` can be positive, zero, or negative. |
| 382 * If `units` is negative, `nanos` must be negative or zero. | 428 * If `units` is negative, `nanos` must be negative or zero. |
| 383 * For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. | 429 * For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. |
| 384 * | 430 * |
| 385 * [requestMetadata_partnersSessionId] - Google Partners session ID. | 431 * [requestMetadata_partnersSessionId] - Google Partners session ID. |
| 386 * | 432 * |
| 387 * [companyName] - Company name to search for. | |
| 388 * | |
| 389 * [pageToken] - A token identifying a page of results that the server | |
| 390 * returns. | |
| 391 * Typically, this is the value of `ListCompaniesResponse.next_page_token` | |
| 392 * returned from the previous call to | |
| 393 * ListCompanies. | |
| 394 * | |
| 395 * [industries] - List of industries the company can help with. | |
| 396 * | |
| 397 * [websiteUrl] - Website URL that will help to find a better matched company. | |
| 398 * . | |
| 399 * | |
| 400 * [gpsMotivations] - List of reasons for using Google Partner Search to get | |
| 401 * companies. | |
| 402 * | |
| 403 * [languageCodes] - List of language codes that company can support. Only | |
| 404 * primary language | |
| 405 * subtags are accepted as defined by | |
| 406 * <a href="https://tools.ietf.org/html/bcp47">BCP 47</a> | |
| 407 * (IETF BCP 47, "Tags for Identifying Languages"). | |
| 408 * | |
| 409 * [pageSize] - Requested page size. Server may return fewer companies than | |
| 410 * requested. | |
| 411 * If unspecified, server picks an appropriate default. | |
| 412 * | |
| 413 * [requestMetadata_userOverrides_ipAddress] - IP address to use instead of | |
| 414 * the user's geo-located IP address. | |
| 415 * | |
| 416 * [requestMetadata_experimentIds] - Experiment IDs the current request | |
| 417 * belongs to. | |
| 418 * | |
| 419 * [orderBy] - How to order addresses within the returned companies. | |
| 420 * Currently, only | |
| 421 * `address` and `address desc` is supported which will sorted by closest to | |
| 422 * farthest in distance from given address and farthest to closest distance | |
| 423 * from given address respectively. | |
| 424 * | |
| 425 * [specializations] - List of specializations that the returned agencies | |
| 426 * should provide. If this | |
| 427 * is not empty, any returned agency must have at least one of these | |
| 428 * specializations, or one of the services in the "services" field. | |
| 429 * | |
| 430 * [maxMonthlyBudget_currencyCode] - The 3-letter currency code defined in ISO | |
| 431 * 4217. | |
| 432 * | |
| 433 * Completes with a [ListCompaniesResponse]. | 433 * Completes with a [ListCompaniesResponse]. |
| 434 * | 434 * |
| 435 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 435 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 436 * error. | 436 * error. |
| 437 * | 437 * |
| 438 * If the used [http.Client] completes with an error when making a REST call, | 438 * If the used [http.Client] completes with an error when making a REST call, |
| 439 * this method will complete with the same error. | 439 * this method will complete with the same error. |
| 440 */ | 440 */ |
| 441 async.Future<ListCompaniesResponse> list({core.String requestMetadata_userOver
rides_userId, core.String minMonthlyBudget_currencyCode, core.String view, core.
String requestMetadata_locale, core.String address, core.String minMonthlyBudget
_units, core.int maxMonthlyBudget_nanos, core.List<core.String> services, core.S
tring requestMetadata_trafficSource_trafficSourceId, core.String maxMonthlyBudge
t_units, core.String requestMetadata_trafficSource_trafficSubId, core.int minMon
thlyBudget_nanos, core.String requestMetadata_partnersSessionId, core.String com
panyName, core.String pageToken, core.List<core.String> industries, core.String
websiteUrl, core.List<core.String> gpsMotivations, core.List<core.String> langua
geCodes, core.int pageSize, core.String requestMetadata_userOverrides_ipAddress,
core.List<core.String> requestMetadata_experimentIds, core.String orderBy, core
.List<core.String> specializations, core.String maxMonthlyBudget_currencyCode})
{ | 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})
{ |
| 442 var _url = null; | 442 var _url = null; |
| 443 var _queryParams = new core.Map(); | 443 var _queryParams = new core.Map(); |
| 444 var _uploadMedia = null; | 444 var _uploadMedia = null; |
| 445 var _uploadOptions = null; | 445 var _uploadOptions = null; |
| 446 var _downloadOptions = commons.DownloadOptions.Metadata; | 446 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 447 var _body = null; | 447 var _body = null; |
| 448 | 448 |
| 449 if (requestMetadata_userOverrides_userId != null) { | |
| 450 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us
erOverrides_userId]; | |
| 451 } | |
| 452 if (minMonthlyBudget_currencyCode != null) { | |
| 453 _queryParams["minMonthlyBudget.currencyCode"] = [minMonthlyBudget_currency
Code]; | |
| 454 } | |
| 455 if (view != null) { | |
| 456 _queryParams["view"] = [view]; | |
| 457 } | |
| 458 if (requestMetadata_locale != null) { | |
| 459 _queryParams["requestMetadata.locale"] = [requestMetadata_locale]; | |
| 460 } | |
| 461 if (address != null) { | |
| 462 _queryParams["address"] = [address]; | |
| 463 } | |
| 464 if (minMonthlyBudget_units != null) { | |
| 465 _queryParams["minMonthlyBudget.units"] = [minMonthlyBudget_units]; | |
| 466 } | |
| 467 if (maxMonthlyBudget_nanos != null) { | |
| 468 _queryParams["maxMonthlyBudget.nanos"] = ["${maxMonthlyBudget_nanos}"]; | |
| 469 } | |
| 470 if (services != null) { | |
| 471 _queryParams["services"] = services; | |
| 472 } | |
| 473 if (requestMetadata_trafficSource_trafficSourceId != null) { | |
| 474 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe
tadata_trafficSource_trafficSourceId]; | |
| 475 } | |
| 476 if (maxMonthlyBudget_units != null) { | |
| 477 _queryParams["maxMonthlyBudget.units"] = [maxMonthlyBudget_units]; | |
| 478 } | |
| 479 if (requestMetadata_trafficSource_trafficSubId != null) { | |
| 480 _queryParams["requestMetadata.trafficSource.trafficSubId"] = [requestMetad
ata_trafficSource_trafficSubId]; | |
| 481 } | |
| 482 if (minMonthlyBudget_nanos != null) { | |
| 483 _queryParams["minMonthlyBudget.nanos"] = ["${minMonthlyBudget_nanos}"]; | |
| 484 } | |
| 485 if (requestMetadata_partnersSessionId != null) { | |
| 486 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn
ersSessionId]; | |
| 487 } | |
| 488 if (companyName != null) { | 449 if (companyName != null) { |
| 489 _queryParams["companyName"] = [companyName]; | 450 _queryParams["companyName"] = [companyName]; |
| 490 } | 451 } |
| 491 if (pageToken != null) { | 452 if (pageToken != null) { |
| 492 _queryParams["pageToken"] = [pageToken]; | 453 _queryParams["pageToken"] = [pageToken]; |
| 493 } | 454 } |
| 494 if (industries != null) { | 455 if (industries != null) { |
| 495 _queryParams["industries"] = industries; | 456 _queryParams["industries"] = industries; |
| 496 } | 457 } |
| 497 if (websiteUrl != null) { | 458 if (websiteUrl != null) { |
| (...skipping 16 matching lines...) Expand all Loading... |
| 514 } | 475 } |
| 515 if (orderBy != null) { | 476 if (orderBy != null) { |
| 516 _queryParams["orderBy"] = [orderBy]; | 477 _queryParams["orderBy"] = [orderBy]; |
| 517 } | 478 } |
| 518 if (specializations != null) { | 479 if (specializations != null) { |
| 519 _queryParams["specializations"] = specializations; | 480 _queryParams["specializations"] = specializations; |
| 520 } | 481 } |
| 521 if (maxMonthlyBudget_currencyCode != null) { | 482 if (maxMonthlyBudget_currencyCode != null) { |
| 522 _queryParams["maxMonthlyBudget.currencyCode"] = [maxMonthlyBudget_currency
Code]; | 483 _queryParams["maxMonthlyBudget.currencyCode"] = [maxMonthlyBudget_currency
Code]; |
| 523 } | 484 } |
| 485 if (minMonthlyBudget_currencyCode != null) { |
| 486 _queryParams["minMonthlyBudget.currencyCode"] = [minMonthlyBudget_currency
Code]; |
| 487 } |
| 488 if (requestMetadata_userOverrides_userId != null) { |
| 489 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us
erOverrides_userId]; |
| 490 } |
| 491 if (view != null) { |
| 492 _queryParams["view"] = [view]; |
| 493 } |
| 494 if (requestMetadata_locale != null) { |
| 495 _queryParams["requestMetadata.locale"] = [requestMetadata_locale]; |
| 496 } |
| 497 if (address != null) { |
| 498 _queryParams["address"] = [address]; |
| 499 } |
| 500 if (minMonthlyBudget_units != null) { |
| 501 _queryParams["minMonthlyBudget.units"] = [minMonthlyBudget_units]; |
| 502 } |
| 503 if (maxMonthlyBudget_nanos != null) { |
| 504 _queryParams["maxMonthlyBudget.nanos"] = ["${maxMonthlyBudget_nanos}"]; |
| 505 } |
| 506 if (services != null) { |
| 507 _queryParams["services"] = services; |
| 508 } |
| 509 if (maxMonthlyBudget_units != null) { |
| 510 _queryParams["maxMonthlyBudget.units"] = [maxMonthlyBudget_units]; |
| 511 } |
| 512 if (requestMetadata_trafficSource_trafficSourceId != null) { |
| 513 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe
tadata_trafficSource_trafficSourceId]; |
| 514 } |
| 515 if (requestMetadata_trafficSource_trafficSubId != null) { |
| 516 _queryParams["requestMetadata.trafficSource.trafficSubId"] = [requestMetad
ata_trafficSource_trafficSubId]; |
| 517 } |
| 518 if (minMonthlyBudget_nanos != null) { |
| 519 _queryParams["minMonthlyBudget.nanos"] = ["${minMonthlyBudget_nanos}"]; |
| 520 } |
| 521 if (requestMetadata_partnersSessionId != null) { |
| 522 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn
ersSessionId]; |
| 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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after 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_partnersSessionId] - Google Partners session ID. |
| 711 * |
| 710 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate | 712 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate |
| 711 * instead of the user's ID. | 713 * instead of the user's ID. |
| 712 * | 714 * |
| 713 * [requestMetadata_partnersSessionId] - Google Partners session ID. | |
| 714 * | |
| 715 * [pageToken] - A token identifying a page of results that the server | 715 * [pageToken] - A token identifying a page of results that the server |
| 716 * returns. | 716 * returns. |
| 717 * Typically, this is the value of `ListLeadsResponse.next_page_token` | 717 * Typically, this is the value of `ListLeadsResponse.next_page_token` |
| 718 * returned from the previous call to | 718 * returned from the previous call to |
| 719 * ListLeads. | 719 * ListLeads. |
| 720 * | 720 * |
| 721 * [pageSize] - Requested page size. Server may return fewer leads than | 721 * [pageSize] - Requested page size. Server may return fewer leads than |
| 722 * requested. | 722 * requested. |
| 723 * If unspecified, server picks an appropriate default. | 723 * If unspecified, server picks an appropriate default. |
| 724 * | 724 * |
| (...skipping 19 matching lines...) Expand all Loading... |
| 744 * traffic to us. | 744 * traffic to us. |
| 745 * | 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_userOverride
s_userId, core.String requestMetadata_partnersSessionId, core.String pageToken,
core.int pageSize, core.String requestMetadata_trafficSource_trafficSourceId, co
re.String requestMetadata_locale, core.String requestMetadata_userOverrides_ipAd
dress, core.List<core.String> requestMetadata_experimentIds, core.String orderBy
, core.String requestMetadata_trafficSource_trafficSubId}) { | 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}) { |
| 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_partnersSessionId != null) { |
| 763 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn
ersSessionId]; |
| 764 } |
| 762 if (requestMetadata_userOverrides_userId != null) { | 765 if (requestMetadata_userOverrides_userId != null) { |
| 763 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us
erOverrides_userId]; | 766 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us
erOverrides_userId]; |
| 764 } | 767 } |
| 765 if (requestMetadata_partnersSessionId != null) { | |
| 766 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn
ersSessionId]; | |
| 767 } | |
| 768 if (pageToken != null) { | 768 if (pageToken != null) { |
| 769 _queryParams["pageToken"] = [pageToken]; | 769 _queryParams["pageToken"] = [pageToken]; |
| 770 } | 770 } |
| 771 if (pageSize != null) { | 771 if (pageSize != null) { |
| 772 _queryParams["pageSize"] = ["${pageSize}"]; | 772 _queryParams["pageSize"] = ["${pageSize}"]; |
| 773 } | 773 } |
| 774 if (requestMetadata_trafficSource_trafficSourceId != null) { | 774 if (requestMetadata_trafficSource_trafficSourceId != null) { |
| 775 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe
tadata_trafficSource_trafficSourceId]; | 775 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe
tadata_trafficSource_trafficSourceId]; |
| 776 } | 776 } |
| 777 if (requestMetadata_locale != null) { | 777 if (requestMetadata_locale != null) { |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 829 * the user's geo-located IP address. | 829 * the user's geo-located IP address. |
| 830 * | 830 * |
| 831 * [requestMetadata_experimentIds] - Experiment IDs the current request | 831 * [requestMetadata_experimentIds] - Experiment IDs the current request |
| 832 * belongs to. | 832 * belongs to. |
| 833 * | 833 * |
| 834 * [requestMetadata_trafficSource_trafficSubId] - Second level identifier to | 834 * [requestMetadata_trafficSource_trafficSubId] - Second level identifier to |
| 835 * indicate where the traffic comes from. | 835 * indicate where the traffic comes from. |
| 836 * An identifier has multiple letters created by a team which redirected the | 836 * An identifier has multiple letters created by a team which redirected the |
| 837 * traffic to us. | 837 * traffic to us. |
| 838 * | 838 * |
| 839 * [requestMetadata_partnersSessionId] - Google Partners session ID. | |
| 840 * | |
| 841 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate | 839 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate |
| 842 * instead of the user's ID. | 840 * instead of the user's ID. |
| 843 * | 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_partnersSessionId, core.String requestMetadata_userOverrides_userId}) { | 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}) { |
| 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_trafficSource_trafficSourceId != null) { | 860 if (requestMetadata_trafficSource_trafficSourceId != null) { |
| 861 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe
tadata_trafficSource_trafficSourceId]; | 861 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe
tadata_trafficSource_trafficSourceId]; |
| 862 } | 862 } |
| 863 if (requestMetadata_locale != null) { | 863 if (requestMetadata_locale != null) { |
| 864 _queryParams["requestMetadata.locale"] = [requestMetadata_locale]; | 864 _queryParams["requestMetadata.locale"] = [requestMetadata_locale]; |
| 865 } | 865 } |
| 866 if (requestMetadata_userOverrides_ipAddress != null) { | 866 if (requestMetadata_userOverrides_ipAddress != null) { |
| 867 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata
_userOverrides_ipAddress]; | 867 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata
_userOverrides_ipAddress]; |
| 868 } | 868 } |
| 869 if (requestMetadata_experimentIds != null) { | 869 if (requestMetadata_experimentIds != null) { |
| 870 _queryParams["requestMetadata.experimentIds"] = requestMetadata_experiment
Ids; | 870 _queryParams["requestMetadata.experimentIds"] = requestMetadata_experiment
Ids; |
| 871 } | 871 } |
| 872 if (requestMetadata_trafficSource_trafficSubId != null) { | 872 if (requestMetadata_trafficSource_trafficSubId != null) { |
| 873 _queryParams["requestMetadata.trafficSource.trafficSubId"] = [requestMetad
ata_trafficSource_trafficSubId]; | 873 _queryParams["requestMetadata.trafficSource.trafficSubId"] = [requestMetad
ata_trafficSource_trafficSubId]; |
| 874 } | 874 } |
| 875 if (requestMetadata_userOverrides_userId != null) { |
| 876 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us
erOverrides_userId]; |
| 877 } |
| 875 if (requestMetadata_partnersSessionId != null) { | 878 if (requestMetadata_partnersSessionId != null) { |
| 876 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn
ersSessionId]; | 879 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn
ersSessionId]; |
| 877 } | 880 } |
| 878 if (requestMetadata_userOverrides_userId != null) { | |
| 879 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us
erOverrides_userId]; | |
| 880 } | |
| 881 | 881 |
| 882 _url = 'v2/offers'; | 882 _url = 'v2/offers'; |
| 883 | 883 |
| 884 var _response = _requester.request(_url, | 884 var _response = _requester.request(_url, |
| 885 "GET", | 885 "GET", |
| 886 body: _body, | 886 body: _body, |
| 887 queryParams: _queryParams, | 887 queryParams: _queryParams, |
| 888 uploadOptions: _uploadOptions, | 888 uploadOptions: _uploadOptions, |
| 889 uploadMedia: _uploadMedia, | 889 uploadMedia: _uploadMedia, |
| 890 downloadOptions: _downloadOptions); | 890 downloadOptions: _downloadOptions); |
| 891 return _response.then((data) => new ListOffersResponse.fromJson(data)); | 891 return _response.then((data) => new ListOffersResponse.fromJson(data)); |
| 892 } | 892 } |
| 893 | 893 |
| 894 } | 894 } |
| 895 | 895 |
| 896 | 896 |
| 897 class OffersHistoryResourceApi { | 897 class OffersHistoryResourceApi { |
| 898 final commons.ApiRequester _requester; | 898 final commons.ApiRequester _requester; |
| 899 | 899 |
| 900 OffersHistoryResourceApi(commons.ApiRequester client) : | 900 OffersHistoryResourceApi(commons.ApiRequester client) : |
| 901 _requester = client; | 901 _requester = client; |
| 902 | 902 |
| 903 /** | 903 /** |
| 904 * Lists the Historical Offers for the current user (or user's entire company) | 904 * Lists the Historical Offers for the current user (or user's entire company) |
| 905 * | 905 * |
| 906 * Request parameters: | 906 * Request parameters: |
| 907 * | 907 * |
| 908 * [requestMetadata_trafficSource_trafficSubId] - Second level identifier to |
| 909 * indicate where the traffic comes from. |
| 910 * An identifier has multiple letters created by a team which redirected the |
| 911 * traffic to us. |
| 912 * |
| 913 * [orderBy] - Comma-separated list of fields to order by, e.g.: |
| 914 * "foo,bar,baz". |
| 915 * Use "foo desc" to sort descending. |
| 916 * List of valid field names is: name, offer_code, expiration_time, status, |
| 917 * last_modified_time, sender_name, creation_time, country_code, |
| 918 * offer_type. |
| 919 * |
| 920 * [requestMetadata_partnersSessionId] - Google Partners session ID. |
| 921 * |
| 908 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate | 922 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate |
| 909 * instead of the user's ID. | 923 * instead of the user's ID. |
| 910 * | 924 * |
| 911 * [requestMetadata_partnersSessionId] - Google Partners session ID. | |
| 912 * | |
| 913 * [pageToken] - Token to retrieve a specific page. | 925 * [pageToken] - Token to retrieve a specific page. |
| 914 * | 926 * |
| 915 * [pageSize] - Maximum number of rows to return per page. | 927 * [pageSize] - Maximum number of rows to return per page. |
| 916 * | 928 * |
| 917 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate | 929 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate |
| 918 * where the traffic comes from. | 930 * where the traffic comes from. |
| 919 * An identifier has multiple letters created by a team which redirected the | 931 * An identifier has multiple letters created by a team which redirected the |
| 920 * traffic to us. | 932 * traffic to us. |
| 921 * | 933 * |
| 922 * [requestMetadata_locale] - Locale to use for the current request. | 934 * [requestMetadata_locale] - Locale to use for the current request. |
| 923 * | 935 * |
| 924 * [requestMetadata_userOverrides_ipAddress] - IP address to use instead of | 936 * [requestMetadata_userOverrides_ipAddress] - IP address to use instead of |
| 925 * the user's geo-located IP address. | 937 * the user's geo-located IP address. |
| 926 * | 938 * |
| 939 * [requestMetadata_experimentIds] - Experiment IDs the current request |
| 940 * belongs to. |
| 941 * |
| 927 * [entireCompany] - if true, show history for the entire company. Requires | 942 * [entireCompany] - if true, show history for the entire company. Requires |
| 928 * user to be admin. | 943 * user to be admin. |
| 929 * | 944 * |
| 930 * [requestMetadata_experimentIds] - Experiment IDs the current request | |
| 931 * belongs to. | |
| 932 * | |
| 933 * [requestMetadata_trafficSource_trafficSubId] - Second level identifier to | |
| 934 * indicate where the traffic comes from. | |
| 935 * An identifier has multiple letters created by a team which redirected the | |
| 936 * traffic to us. | |
| 937 * | |
| 938 * [orderBy] - Comma-separated list of fields to order by, e.g.: | |
| 939 * "foo,bar,baz". | |
| 940 * Use "foo desc" to sort descending. | |
| 941 * List of valid field names is: name, offer_code, expiration_time, status, | |
| 942 * last_modified_time, sender_name, creation_time, country_code, | |
| 943 * offer_type. | |
| 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_user
Overrides_userId, core.String requestMetadata_partnersSessionId, core.String pag
eToken, core.int pageSize, core.String requestMetadata_trafficSource_trafficSour
ceId, core.String requestMetadata_locale, core.String requestMetadata_userOverri
des_ipAddress, core.bool entireCompany, core.List<core.String> requestMetadata_e
xperimentIds, core.String requestMetadata_trafficSource_trafficSubId, core.Strin
g orderBy}) { | 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}) { |
| 954 var _url = null; | 954 var _url = null; |
| 955 var _queryParams = new core.Map(); | 955 var _queryParams = new core.Map(); |
| 956 var _uploadMedia = null; | 956 var _uploadMedia = null; |
| 957 var _uploadOptions = null; | 957 var _uploadOptions = null; |
| 958 var _downloadOptions = commons.DownloadOptions.Metadata; | 958 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 959 var _body = null; | 959 var _body = null; |
| 960 | 960 |
| 961 if (requestMetadata_userOverrides_userId != null) { | 961 if (requestMetadata_trafficSource_trafficSubId != null) { |
| 962 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us
erOverrides_userId]; | 962 _queryParams["requestMetadata.trafficSource.trafficSubId"] = [requestMetad
ata_trafficSource_trafficSubId]; |
| 963 } |
| 964 if (orderBy != null) { |
| 965 _queryParams["orderBy"] = [orderBy]; |
| 963 } | 966 } |
| 964 if (requestMetadata_partnersSessionId != null) { | 967 if (requestMetadata_partnersSessionId != null) { |
| 965 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn
ersSessionId]; | 968 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn
ersSessionId]; |
| 966 } | 969 } |
| 970 if (requestMetadata_userOverrides_userId != null) { |
| 971 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us
erOverrides_userId]; |
| 972 } |
| 967 if (pageToken != null) { | 973 if (pageToken != null) { |
| 968 _queryParams["pageToken"] = [pageToken]; | 974 _queryParams["pageToken"] = [pageToken]; |
| 969 } | 975 } |
| 970 if (pageSize != null) { | 976 if (pageSize != null) { |
| 971 _queryParams["pageSize"] = ["${pageSize}"]; | 977 _queryParams["pageSize"] = ["${pageSize}"]; |
| 972 } | 978 } |
| 973 if (requestMetadata_trafficSource_trafficSourceId != null) { | 979 if (requestMetadata_trafficSource_trafficSourceId != null) { |
| 974 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe
tadata_trafficSource_trafficSourceId]; | 980 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe
tadata_trafficSource_trafficSourceId]; |
| 975 } | 981 } |
| 976 if (requestMetadata_locale != null) { | 982 if (requestMetadata_locale != null) { |
| 977 _queryParams["requestMetadata.locale"] = [requestMetadata_locale]; | 983 _queryParams["requestMetadata.locale"] = [requestMetadata_locale]; |
| 978 } | 984 } |
| 979 if (requestMetadata_userOverrides_ipAddress != null) { | 985 if (requestMetadata_userOverrides_ipAddress != null) { |
| 980 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata
_userOverrides_ipAddress]; | 986 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata
_userOverrides_ipAddress]; |
| 981 } | 987 } |
| 988 if (requestMetadata_experimentIds != null) { |
| 989 _queryParams["requestMetadata.experimentIds"] = requestMetadata_experiment
Ids; |
| 990 } |
| 982 if (entireCompany != null) { | 991 if (entireCompany != null) { |
| 983 _queryParams["entireCompany"] = ["${entireCompany}"]; | 992 _queryParams["entireCompany"] = ["${entireCompany}"]; |
| 984 } | 993 } |
| 985 if (requestMetadata_experimentIds != null) { | |
| 986 _queryParams["requestMetadata.experimentIds"] = requestMetadata_experiment
Ids; | |
| 987 } | |
| 988 if (requestMetadata_trafficSource_trafficSubId != null) { | |
| 989 _queryParams["requestMetadata.trafficSource.trafficSubId"] = [requestMetad
ata_trafficSource_trafficSubId]; | |
| 990 } | |
| 991 if (orderBy != null) { | |
| 992 _queryParams["orderBy"] = [orderBy]; | |
| 993 } | |
| 994 | 994 |
| 995 _url = 'v2/offers/history'; | 995 _url = 'v2/offers/history'; |
| 996 | 996 |
| 997 var _response = _requester.request(_url, | 997 var _response = _requester.request(_url, |
| 998 "GET", | 998 "GET", |
| 999 body: _body, | 999 body: _body, |
| 1000 queryParams: _queryParams, | 1000 queryParams: _queryParams, |
| 1001 uploadOptions: _uploadOptions, | 1001 uploadOptions: _uploadOptions, |
| 1002 uploadMedia: _uploadMedia, | 1002 uploadMedia: _uploadMedia, |
| 1003 downloadOptions: _downloadOptions); | 1003 downloadOptions: _downloadOptions); |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1059 final commons.ApiRequester _requester; | 1059 final commons.ApiRequester _requester; |
| 1060 | 1060 |
| 1061 UserStatesResourceApi(commons.ApiRequester client) : | 1061 UserStatesResourceApi(commons.ApiRequester client) : |
| 1062 _requester = client; | 1062 _requester = client; |
| 1063 | 1063 |
| 1064 /** | 1064 /** |
| 1065 * Lists states for current user. | 1065 * Lists states for current user. |
| 1066 * | 1066 * |
| 1067 * Request parameters: | 1067 * Request parameters: |
| 1068 * | 1068 * |
| 1069 * [requestMetadata_userOverrides_ipAddress] - IP address to use instead of | |
| 1070 * the user's geo-located IP address. | |
| 1071 * | |
| 1072 * [requestMetadata_experimentIds] - Experiment IDs the current request | |
| 1073 * belongs to. | |
| 1074 * | |
| 1075 * [requestMetadata_trafficSource_trafficSubId] - Second level identifier to | |
| 1076 * indicate where the traffic comes from. | |
| 1077 * An identifier has multiple letters created by a team which redirected the | |
| 1078 * traffic to us. | |
| 1079 * | |
| 1080 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate | 1069 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate |
| 1081 * instead of the user's ID. | 1070 * instead of the user's ID. |
| 1082 * | 1071 * |
| 1083 * [requestMetadata_partnersSessionId] - Google Partners session ID. | 1072 * [requestMetadata_partnersSessionId] - Google Partners session ID. |
| 1084 * | 1073 * |
| 1085 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate | 1074 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate |
| 1086 * where the traffic comes from. | 1075 * where the traffic comes from. |
| 1087 * An identifier has multiple letters created by a team which redirected the | 1076 * An identifier has multiple letters created by a team which redirected the |
| 1088 * traffic to us. | 1077 * traffic to us. |
| 1089 * | 1078 * |
| 1090 * [requestMetadata_locale] - Locale to use for the current request. | 1079 * [requestMetadata_locale] - Locale to use for the current request. |
| 1091 * | 1080 * |
| 1081 * [requestMetadata_userOverrides_ipAddress] - IP address to use instead of |
| 1082 * the user's geo-located IP address. |
| 1083 * |
| 1084 * [requestMetadata_experimentIds] - Experiment IDs the current request |
| 1085 * belongs to. |
| 1086 * |
| 1087 * [requestMetadata_trafficSource_trafficSubId] - Second level identifier to |
| 1088 * indicate where the traffic comes from. |
| 1089 * An identifier has multiple letters created by a team which redirected the |
| 1090 * traffic to us. |
| 1091 * |
| 1092 * Completes with a [ListUserStatesResponse]. | 1092 * Completes with a [ListUserStatesResponse]. |
| 1093 * | 1093 * |
| 1094 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1094 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 1095 * error. | 1095 * error. |
| 1096 * | 1096 * |
| 1097 * If the used [http.Client] completes with an error when making a REST call, | 1097 * If the used [http.Client] completes with an error when making a REST call, |
| 1098 * this method will complete with the same error. | 1098 * this method will complete with the same error. |
| 1099 */ | 1099 */ |
| 1100 async.Future<ListUserStatesResponse> list({core.String requestMetadata_userOve
rrides_ipAddress, core.List<core.String> requestMetadata_experimentIds, core.Str
ing requestMetadata_trafficSource_trafficSubId, core.String requestMetadata_user
Overrides_userId, core.String requestMetadata_partnersSessionId, core.String req
uestMetadata_trafficSource_trafficSourceId, core.String requestMetadata_locale})
{ | 1100 async.Future<ListUserStatesResponse> list({core.String requestMetadata_userOve
rrides_userId, core.String requestMetadata_partnersSessionId, core.String reques
tMetadata_trafficSource_trafficSourceId, core.String requestMetadata_locale, cor
e.String requestMetadata_userOverrides_ipAddress, core.List<core.String> request
Metadata_experimentIds, core.String requestMetadata_trafficSource_trafficSubId})
{ |
| 1101 var _url = null; | 1101 var _url = null; |
| 1102 var _queryParams = new core.Map(); | 1102 var _queryParams = new core.Map(); |
| 1103 var _uploadMedia = null; | 1103 var _uploadMedia = null; |
| 1104 var _uploadOptions = null; | 1104 var _uploadOptions = null; |
| 1105 var _downloadOptions = commons.DownloadOptions.Metadata; | 1105 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1106 var _body = null; | 1106 var _body = null; |
| 1107 | 1107 |
| 1108 if (requestMetadata_userOverrides_ipAddress != null) { | |
| 1109 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata
_userOverrides_ipAddress]; | |
| 1110 } | |
| 1111 if (requestMetadata_experimentIds != null) { | |
| 1112 _queryParams["requestMetadata.experimentIds"] = requestMetadata_experiment
Ids; | |
| 1113 } | |
| 1114 if (requestMetadata_trafficSource_trafficSubId != null) { | |
| 1115 _queryParams["requestMetadata.trafficSource.trafficSubId"] = [requestMetad
ata_trafficSource_trafficSubId]; | |
| 1116 } | |
| 1117 if (requestMetadata_userOverrides_userId != null) { | 1108 if (requestMetadata_userOverrides_userId != null) { |
| 1118 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us
erOverrides_userId]; | 1109 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us
erOverrides_userId]; |
| 1119 } | 1110 } |
| 1120 if (requestMetadata_partnersSessionId != null) { | 1111 if (requestMetadata_partnersSessionId != null) { |
| 1121 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn
ersSessionId]; | 1112 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn
ersSessionId]; |
| 1122 } | 1113 } |
| 1123 if (requestMetadata_trafficSource_trafficSourceId != null) { | 1114 if (requestMetadata_trafficSource_trafficSourceId != null) { |
| 1124 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe
tadata_trafficSource_trafficSourceId]; | 1115 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe
tadata_trafficSource_trafficSourceId]; |
| 1125 } | 1116 } |
| 1126 if (requestMetadata_locale != null) { | 1117 if (requestMetadata_locale != null) { |
| 1127 _queryParams["requestMetadata.locale"] = [requestMetadata_locale]; | 1118 _queryParams["requestMetadata.locale"] = [requestMetadata_locale]; |
| 1128 } | 1119 } |
| 1120 if (requestMetadata_userOverrides_ipAddress != null) { |
| 1121 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata
_userOverrides_ipAddress]; |
| 1122 } |
| 1123 if (requestMetadata_experimentIds != null) { |
| 1124 _queryParams["requestMetadata.experimentIds"] = requestMetadata_experiment
Ids; |
| 1125 } |
| 1126 if (requestMetadata_trafficSource_trafficSubId != null) { |
| 1127 _queryParams["requestMetadata.trafficSource.trafficSubId"] = [requestMetad
ata_trafficSource_trafficSubId]; |
| 1128 } |
| 1129 | 1129 |
| 1130 _url = 'v2/userStates'; | 1130 _url = 'v2/userStates'; |
| 1131 | 1131 |
| 1132 var _response = _requester.request(_url, | 1132 var _response = _requester.request(_url, |
| 1133 "GET", | 1133 "GET", |
| 1134 body: _body, | 1134 body: _body, |
| 1135 queryParams: _queryParams, | 1135 queryParams: _queryParams, |
| 1136 uploadOptions: _uploadOptions, | 1136 uploadOptions: _uploadOptions, |
| 1137 uploadMedia: _uploadMedia, | 1137 uploadMedia: _uploadMedia, |
| 1138 downloadOptions: _downloadOptions); | 1138 downloadOptions: _downloadOptions); |
| (...skipping 12 matching lines...) Expand all 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_experimentIds] - Experiment IDs the current request | 1161 * [requestMetadata_partnersSessionId] - Google Partners session ID. |
| 1162 * belongs to. | |
| 1163 * | |
| 1164 * [requestMetadata_trafficSource_trafficSubId] - Second level identifier to | |
| 1165 * indicate where the traffic comes from. | |
| 1166 * An identifier has multiple letters created by a team which redirected the | |
| 1167 * traffic to us. | |
| 1168 * | 1162 * |
| 1169 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate | 1163 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate |
| 1170 * instead of the user's ID. | 1164 * instead of the user's ID. |
| 1171 * | 1165 * |
| 1172 * [requestMetadata_partnersSessionId] - Google Partners session ID. | |
| 1173 * | |
| 1174 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate | 1166 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate |
| 1175 * where the traffic comes from. | 1167 * where the traffic comes from. |
| 1176 * 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 |
| 1177 * traffic to us. | 1169 * traffic to us. |
| 1178 * | 1170 * |
| 1179 * [requestMetadata_locale] - Locale to use for the current request. | 1171 * [requestMetadata_locale] - Locale to use for the current request. |
| 1180 * | 1172 * |
| 1181 * [requestMetadata_userOverrides_ipAddress] - IP address to use instead of | 1173 * [requestMetadata_userOverrides_ipAddress] - IP address to use instead of |
| 1182 * the user's geo-located IP address. | 1174 * the user's geo-located IP address. |
| 1183 * | 1175 * |
| 1176 * [requestMetadata_experimentIds] - Experiment IDs the current request |
| 1177 * belongs to. |
| 1178 * |
| 1179 * [requestMetadata_trafficSource_trafficSubId] - Second level identifier to |
| 1180 * indicate where the traffic comes from. |
| 1181 * An identifier has multiple letters created by a team which redirected the |
| 1182 * traffic to us. |
| 1183 * |
| 1184 * Completes with a [CompanyRelation]. | 1184 * Completes with a [CompanyRelation]. |
| 1185 * | 1185 * |
| 1186 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1186 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 1187 * error. | 1187 * error. |
| 1188 * | 1188 * |
| 1189 * If the used [http.Client] completes with an error when making a REST call, | 1189 * If the used [http.Client] completes with an error when making a REST call, |
| 1190 * this method will complete with the same error. | 1190 * this method will complete with the same error. |
| 1191 */ | 1191 */ |
| 1192 async.Future<CompanyRelation> createCompanyRelation(CompanyRelation request, c
ore.String userId, {core.List<core.String> requestMetadata_experimentIds, core.S
tring requestMetadata_trafficSource_trafficSubId, core.String requestMetadata_us
erOverrides_userId, core.String requestMetadata_partnersSessionId, core.String r
equestMetadata_trafficSource_trafficSourceId, core.String requestMetadata_locale
, core.String requestMetadata_userOverrides_ipAddress}) { | 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}) { |
| 1193 var _url = null; | 1193 var _url = null; |
| 1194 var _queryParams = new core.Map(); | 1194 var _queryParams = new core.Map(); |
| 1195 var _uploadMedia = null; | 1195 var _uploadMedia = null; |
| 1196 var _uploadOptions = null; | 1196 var _uploadOptions = null; |
| 1197 var _downloadOptions = commons.DownloadOptions.Metadata; | 1197 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1198 var _body = null; | 1198 var _body = null; |
| 1199 | 1199 |
| 1200 if (request != null) { | 1200 if (request != null) { |
| 1201 _body = convert.JSON.encode((request).toJson()); | 1201 _body = convert.JSON.encode((request).toJson()); |
| 1202 } | 1202 } |
| 1203 if (userId == null) { | 1203 if (userId == null) { |
| 1204 throw new core.ArgumentError("Parameter userId is required."); | 1204 throw new core.ArgumentError("Parameter userId is required."); |
| 1205 } | 1205 } |
| 1206 if (requestMetadata_experimentIds != null) { | 1206 if (requestMetadata_partnersSessionId != null) { |
| 1207 _queryParams["requestMetadata.experimentIds"] = requestMetadata_experiment
Ids; | 1207 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn
ersSessionId]; |
| 1208 } | |
| 1209 if (requestMetadata_trafficSource_trafficSubId != null) { | |
| 1210 _queryParams["requestMetadata.trafficSource.trafficSubId"] = [requestMetad
ata_trafficSource_trafficSubId]; | |
| 1211 } | 1208 } |
| 1212 if (requestMetadata_userOverrides_userId != null) { | 1209 if (requestMetadata_userOverrides_userId != null) { |
| 1213 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us
erOverrides_userId]; | 1210 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us
erOverrides_userId]; |
| 1214 } | 1211 } |
| 1215 if (requestMetadata_partnersSessionId != null) { | |
| 1216 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn
ersSessionId]; | |
| 1217 } | |
| 1218 if (requestMetadata_trafficSource_trafficSourceId != null) { | 1212 if (requestMetadata_trafficSource_trafficSourceId != null) { |
| 1219 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe
tadata_trafficSource_trafficSourceId]; | 1213 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe
tadata_trafficSource_trafficSourceId]; |
| 1220 } | 1214 } |
| 1221 if (requestMetadata_locale != null) { | 1215 if (requestMetadata_locale != null) { |
| 1222 _queryParams["requestMetadata.locale"] = [requestMetadata_locale]; | 1216 _queryParams["requestMetadata.locale"] = [requestMetadata_locale]; |
| 1223 } | 1217 } |
| 1224 if (requestMetadata_userOverrides_ipAddress != null) { | 1218 if (requestMetadata_userOverrides_ipAddress != null) { |
| 1225 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata
_userOverrides_ipAddress]; | 1219 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata
_userOverrides_ipAddress]; |
| 1226 } | 1220 } |
| 1221 if (requestMetadata_experimentIds != null) { |
| 1222 _queryParams["requestMetadata.experimentIds"] = requestMetadata_experiment
Ids; |
| 1223 } |
| 1224 if (requestMetadata_trafficSource_trafficSubId != null) { |
| 1225 _queryParams["requestMetadata.trafficSource.trafficSubId"] = [requestMetad
ata_trafficSource_trafficSubId]; |
| 1226 } |
| 1227 | 1227 |
| 1228 _url = 'v2/users/' + commons.Escaper.ecapeVariable('$userId') + '/companyRel
ation'; | 1228 _url = 'v2/users/' + commons.Escaper.ecapeVariable('$userId') + '/companyRel
ation'; |
| 1229 | 1229 |
| 1230 var _response = _requester.request(_url, | 1230 var _response = _requester.request(_url, |
| 1231 "PUT", | 1231 "PUT", |
| 1232 body: _body, | 1232 body: _body, |
| 1233 queryParams: _queryParams, | 1233 queryParams: _queryParams, |
| 1234 uploadOptions: _uploadOptions, | 1234 uploadOptions: _uploadOptions, |
| 1235 uploadMedia: _uploadMedia, | 1235 uploadMedia: _uploadMedia, |
| 1236 downloadOptions: _downloadOptions); | 1236 downloadOptions: _downloadOptions); |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after 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_partnersSessionId] - Google Partners session ID. |
| 1334 * |
| 1333 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate | 1335 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate |
| 1334 * instead of the user's ID. | 1336 * instead of the user's ID. |
| 1335 * | 1337 * |
| 1336 * [requestMetadata_partnersSessionId] - Google Partners session ID. | |
| 1337 * | |
| 1338 * [userView] - Specifies what parts of the user information to return. | 1338 * [userView] - Specifies what parts of the user information to return. |
| 1339 * Possible string values are: | 1339 * Possible string values are: |
| 1340 * - "BASIC" : A BASIC. | 1340 * - "BASIC" : A BASIC. |
| 1341 * - "PROFILE" : A PROFILE. | 1341 * - "PROFILE" : A PROFILE. |
| 1342 * - "PUBLIC_PROFILE" : A PUBLIC_PROFILE. | 1342 * - "PUBLIC_PROFILE" : A PUBLIC_PROFILE. |
| 1343 * | 1343 * |
| 1344 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate | 1344 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate |
| 1345 * where the traffic comes from. | 1345 * where the traffic comes from. |
| 1346 * An identifier has multiple letters created by a team which redirected the | 1346 * An identifier has multiple letters created by a team which redirected the |
| 1347 * traffic to us. | 1347 * traffic to us. |
| (...skipping 12 matching lines...) Expand all Loading... |
| 1360 * traffic to us. | 1360 * traffic to us. |
| 1361 * | 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_userOv
errides_userId, core.String requestMetadata_partnersSessionId, core.String userV
iew, core.String requestMetadata_trafficSource_trafficSourceId, core.String requ
estMetadata_locale, core.String requestMetadata_userOverrides_ipAddress, core.Li
st<core.String> requestMetadata_experimentIds, core.String requestMetadata_traff
icSource_trafficSubId}) { | 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}) { |
| 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_partnersSessionId != null) { |
| 1382 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn
ersSessionId]; |
| 1383 } |
| 1381 if (requestMetadata_userOverrides_userId != null) { | 1384 if (requestMetadata_userOverrides_userId != null) { |
| 1382 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us
erOverrides_userId]; | 1385 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us
erOverrides_userId]; |
| 1383 } | 1386 } |
| 1384 if (requestMetadata_partnersSessionId != null) { | |
| 1385 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn
ersSessionId]; | |
| 1386 } | |
| 1387 if (userView != null) { | 1387 if (userView != null) { |
| 1388 _queryParams["userView"] = [userView]; | 1388 _queryParams["userView"] = [userView]; |
| 1389 } | 1389 } |
| 1390 if (requestMetadata_trafficSource_trafficSourceId != null) { | 1390 if (requestMetadata_trafficSource_trafficSourceId != null) { |
| 1391 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe
tadata_trafficSource_trafficSourceId]; | 1391 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe
tadata_trafficSource_trafficSourceId]; |
| 1392 } | 1392 } |
| 1393 if (requestMetadata_locale != null) { | 1393 if (requestMetadata_locale != null) { |
| 1394 _queryParams["requestMetadata.locale"] = [requestMetadata_locale]; | 1394 _queryParams["requestMetadata.locale"] = [requestMetadata_locale]; |
| 1395 } | 1395 } |
| 1396 if (requestMetadata_userOverrides_ipAddress != null) { | 1396 if (requestMetadata_userOverrides_ipAddress != null) { |
| (...skipping 110 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. |
| 1526 * |
| 1517 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate | 1527 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate |
| 1518 * instead of the user's ID. | 1528 * instead of the user's ID. |
| 1519 * | 1529 * |
| 1520 * [requestMetadata_partnersSessionId] - Google Partners session ID. | |
| 1521 * | |
| 1522 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate | 1530 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate |
| 1523 * where the traffic comes from. | 1531 * where the traffic comes from. |
| 1524 * An identifier has multiple letters created by a team which redirected the | 1532 * An identifier has multiple letters created by a team which redirected the |
| 1525 * traffic to us. | 1533 * traffic to us. |
| 1526 * | 1534 * |
| 1527 * [requestMetadata_locale] - Locale to use for the current request. | 1535 * [requestMetadata_locale] - Locale to use for the current request. |
| 1528 * | 1536 * |
| 1529 * [requestMetadata_userOverrides_ipAddress] - IP address to use instead of | 1537 * [requestMetadata_userOverrides_ipAddress] - IP address to use instead of |
| 1530 * the user's geo-located IP address. | 1538 * the user's geo-located IP address. |
| 1531 * | 1539 * |
| 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.String request
Metadata_userOverrides_userId, core.String requestMetadata_partnersSessionId, co
re.String requestMetadata_trafficSource_trafficSourceId, core.String requestMeta
data_locale, core.String requestMetadata_userOverrides_ipAddress, core.List<core
.String> requestMetadata_experimentIds, core.String requestMetadata_trafficSourc
e_trafficSubId}) { | 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}) { |
| 1549 var _url = null; | 1549 var _url = null; |
| 1550 var _queryParams = new core.Map(); | 1550 var _queryParams = new core.Map(); |
| 1551 var _uploadMedia = null; | 1551 var _uploadMedia = null; |
| 1552 var _uploadOptions = null; | 1552 var _uploadOptions = null; |
| 1553 var _downloadOptions = commons.DownloadOptions.Metadata; | 1553 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1554 var _body = null; | 1554 var _body = null; |
| 1555 | 1555 |
| 1556 if (requestMetadata_userOverrides_userId != null) { | 1556 if (requestMetadata_experimentIds != null) { |
| 1557 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us
erOverrides_userId]; | 1557 _queryParams["requestMetadata.experimentIds"] = requestMetadata_experiment
Ids; |
| 1558 } |
| 1559 if (requestMetadata_trafficSource_trafficSubId != null) { |
| 1560 _queryParams["requestMetadata.trafficSource.trafficSubId"] = [requestMetad
ata_trafficSource_trafficSubId]; |
| 1558 } | 1561 } |
| 1559 if (requestMetadata_partnersSessionId != null) { | 1562 if (requestMetadata_partnersSessionId != null) { |
| 1560 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn
ersSessionId]; | 1563 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn
ersSessionId]; |
| 1561 } | 1564 } |
| 1565 if (requestMetadata_userOverrides_userId != null) { |
| 1566 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us
erOverrides_userId]; |
| 1567 } |
| 1562 if (requestMetadata_trafficSource_trafficSourceId != null) { | 1568 if (requestMetadata_trafficSource_trafficSourceId != null) { |
| 1563 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe
tadata_trafficSource_trafficSourceId]; | 1569 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe
tadata_trafficSource_trafficSourceId]; |
| 1564 } | 1570 } |
| 1565 if (requestMetadata_locale != null) { | 1571 if (requestMetadata_locale != null) { |
| 1566 _queryParams["requestMetadata.locale"] = [requestMetadata_locale]; | 1572 _queryParams["requestMetadata.locale"] = [requestMetadata_locale]; |
| 1567 } | 1573 } |
| 1568 if (requestMetadata_userOverrides_ipAddress != null) { | 1574 if (requestMetadata_userOverrides_ipAddress != null) { |
| 1569 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata
_userOverrides_ipAddress]; | 1575 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata
_userOverrides_ipAddress]; |
| 1570 } | 1576 } |
| 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 |
| 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 * |
| 1598 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate | 1603 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate |
| 1599 * instead of the user's ID. | 1604 * instead of the user's ID. |
| 1600 * | 1605 * |
| 1601 * [requestMetadata_partnersSessionId] - Google Partners session ID. | 1606 * [requestMetadata_partnersSessionId] - Google Partners session ID. |
| 1602 * | 1607 * |
| 1603 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate | 1608 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate |
| 1604 * where the traffic comes from. | 1609 * where the traffic comes from. |
| 1605 * An identifier has multiple letters created by a team which redirected the | 1610 * An identifier has multiple letters created by a team which redirected the |
| 1606 * traffic to us. | 1611 * traffic to us. |
| 1607 * | 1612 * |
| 1608 * [requestMetadata_locale] - Locale to use for the current request. | 1613 * [requestMetadata_locale] - Locale to use for the current request. |
| 1609 * | 1614 * |
| 1610 * [requestMetadata_userOverrides_ipAddress] - IP address to use instead of | 1615 * [requestMetadata_userOverrides_ipAddress] - IP address to use instead of |
| 1611 * the user's geo-located IP address. | 1616 * the user's geo-located IP address. |
| 1612 * | 1617 * |
| 1613 * [updateMask] - Standard field mask for the set of fields to be updated. | 1618 * [updateMask] - Standard field mask for the set of fields to be updated. |
| 1614 * Required with at least 1 value in FieldMask's paths. | 1619 * Required with at least 1 value in FieldMask's paths. |
| 1615 * | 1620 * |
| 1616 * [requestMetadata_experimentIds] - Experiment IDs the current request | 1621 * [requestMetadata_experimentIds] - Experiment IDs the current request |
| 1617 * belongs to. | 1622 * belongs to. |
| 1618 * | 1623 * |
| 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_userOverrides_userId, core.String requestMetadata_partnersSessionId, core.
String requestMetadata_trafficSource_trafficSourceId, core.String requestMetadat
a_locale, core.String requestMetadata_userOverrides_ipAddress, core.String updat
eMask, core.List<core.String> requestMetadata_experimentIds, core.String request
Metadata_trafficSource_trafficSubId}) { | 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}) { |
| 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) { |
| 1644 _queryParams["requestMetadata.trafficSource.trafficSubId"] = [requestMetad
ata_trafficSource_trafficSubId]; |
| 1645 } |
| 1643 if (requestMetadata_userOverrides_userId != null) { | 1646 if (requestMetadata_userOverrides_userId != null) { |
| 1644 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us
erOverrides_userId]; | 1647 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us
erOverrides_userId]; |
| 1645 } | 1648 } |
| 1646 if (requestMetadata_partnersSessionId != null) { | 1649 if (requestMetadata_partnersSessionId != null) { |
| 1647 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn
ersSessionId]; | 1650 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn
ersSessionId]; |
| 1648 } | 1651 } |
| 1649 if (requestMetadata_trafficSource_trafficSourceId != null) { | 1652 if (requestMetadata_trafficSource_trafficSourceId != null) { |
| 1650 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe
tadata_trafficSource_trafficSourceId]; | 1653 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe
tadata_trafficSource_trafficSourceId]; |
| 1651 } | 1654 } |
| 1652 if (requestMetadata_locale != null) { | 1655 if (requestMetadata_locale != null) { |
| 1653 _queryParams["requestMetadata.locale"] = [requestMetadata_locale]; | 1656 _queryParams["requestMetadata.locale"] = [requestMetadata_locale]; |
| 1654 } | 1657 } |
| 1655 if (requestMetadata_userOverrides_ipAddress != null) { | 1658 if (requestMetadata_userOverrides_ipAddress != null) { |
| 1656 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata
_userOverrides_ipAddress]; | 1659 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata
_userOverrides_ipAddress]; |
| 1657 } | 1660 } |
| 1658 if (updateMask != null) { | 1661 if (updateMask != null) { |
| 1659 _queryParams["updateMask"] = [updateMask]; | 1662 _queryParams["updateMask"] = [updateMask]; |
| 1660 } | 1663 } |
| 1661 if (requestMetadata_experimentIds != null) { | 1664 if (requestMetadata_experimentIds != null) { |
| 1662 _queryParams["requestMetadata.experimentIds"] = requestMetadata_experiment
Ids; | 1665 _queryParams["requestMetadata.experimentIds"] = requestMetadata_experiment
Ids; |
| 1663 } | 1666 } |
| 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_locale] - Locale to use for the current request. |
| 1688 * |
| 1687 * [requestMetadata_userOverrides_ipAddress] - IP address to use instead of | 1689 * [requestMetadata_userOverrides_ipAddress] - IP address to use instead of |
| 1688 * the user's geo-located IP address. | 1690 * the user's geo-located IP address. |
| 1689 * | 1691 * |
| 1690 * [updateMask] - Standard field mask for the set of fields to be updated. | 1692 * [updateMask] - Standard field mask for the set of fields to be updated. |
| 1691 * Required with at least 1 value in FieldMask's paths. | 1693 * Required with at least 1 value in FieldMask's paths. |
| 1692 * Only `state` and `adwords_customer_id` are currently supported. | 1694 * Only `state` and `adwords_customer_id` are currently supported. |
| 1693 * | 1695 * |
| 1694 * [requestMetadata_experimentIds] - Experiment IDs the current request | 1696 * [requestMetadata_experimentIds] - Experiment IDs the current request |
| 1695 * belongs to. | 1697 * belongs to. |
| 1696 * | 1698 * |
| 1697 * [requestMetadata_trafficSource_trafficSubId] - Second level identifier to | 1699 * [requestMetadata_trafficSource_trafficSubId] - Second level identifier to |
| 1698 * indicate where the traffic comes from. | 1700 * indicate where the traffic comes from. |
| 1699 * An identifier has multiple letters created by a team which redirected the | 1701 * An identifier has multiple letters created by a team which redirected the |
| 1700 * traffic to us. | 1702 * traffic to us. |
| 1701 * | 1703 * |
| 1702 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate | 1704 * [requestMetadata_userOverrides_userId] - Logged-in user ID to impersonate |
| 1703 * instead of the user's ID. | 1705 * instead of the user's ID. |
| 1704 * | 1706 * |
| 1705 * [requestMetadata_partnersSessionId] - Google Partners session ID. | 1707 * [requestMetadata_partnersSessionId] - Google Partners session ID. |
| 1706 * | 1708 * |
| 1707 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate | 1709 * [requestMetadata_trafficSource_trafficSourceId] - Identifier to indicate |
| 1708 * where the traffic comes from. | 1710 * where the traffic comes from. |
| 1709 * 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 |
| 1710 * traffic to us. | 1712 * traffic to us. |
| 1711 * | 1713 * |
| 1712 * [requestMetadata_locale] - Locale to use for the current request. | |
| 1713 * | |
| 1714 * Completes with a [Lead]. | 1714 * Completes with a [Lead]. |
| 1715 * | 1715 * |
| 1716 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1716 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 1717 * error. | 1717 * error. |
| 1718 * | 1718 * |
| 1719 * If the used [http.Client] completes with an error when making a REST call, | 1719 * If the used [http.Client] completes with an error when making a REST call, |
| 1720 * this method will complete with the same error. | 1720 * this method will complete with the same error. |
| 1721 */ | 1721 */ |
| 1722 async.Future<Lead> updateLeads(Lead request, {core.String requestMetadata_user
Overrides_ipAddress, core.String updateMask, core.List<core.String> requestMetad
ata_experimentIds, core.String requestMetadata_trafficSource_trafficSubId, core.
String requestMetadata_userOverrides_userId, core.String requestMetadata_partner
sSessionId, core.String requestMetadata_trafficSource_trafficSourceId, core.Stri
ng requestMetadata_locale}) { | 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}) { |
| 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_locale != null) { |
| 1734 _queryParams["requestMetadata.locale"] = [requestMetadata_locale]; |
| 1735 } |
| 1733 if (requestMetadata_userOverrides_ipAddress != null) { | 1736 if (requestMetadata_userOverrides_ipAddress != null) { |
| 1734 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata
_userOverrides_ipAddress]; | 1737 _queryParams["requestMetadata.userOverrides.ipAddress"] = [requestMetadata
_userOverrides_ipAddress]; |
| 1735 } | 1738 } |
| 1736 if (updateMask != null) { | 1739 if (updateMask != null) { |
| 1737 _queryParams["updateMask"] = [updateMask]; | 1740 _queryParams["updateMask"] = [updateMask]; |
| 1738 } | 1741 } |
| 1739 if (requestMetadata_experimentIds != null) { | 1742 if (requestMetadata_experimentIds != null) { |
| 1740 _queryParams["requestMetadata.experimentIds"] = requestMetadata_experiment
Ids; | 1743 _queryParams["requestMetadata.experimentIds"] = requestMetadata_experiment
Ids; |
| 1741 } | 1744 } |
| 1742 if (requestMetadata_trafficSource_trafficSubId != null) { | 1745 if (requestMetadata_trafficSource_trafficSubId != null) { |
| 1743 _queryParams["requestMetadata.trafficSource.trafficSubId"] = [requestMetad
ata_trafficSource_trafficSubId]; | 1746 _queryParams["requestMetadata.trafficSource.trafficSubId"] = [requestMetad
ata_trafficSource_trafficSubId]; |
| 1744 } | 1747 } |
| 1745 if (requestMetadata_userOverrides_userId != null) { | 1748 if (requestMetadata_userOverrides_userId != null) { |
| 1746 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us
erOverrides_userId]; | 1749 _queryParams["requestMetadata.userOverrides.userId"] = [requestMetadata_us
erOverrides_userId]; |
| 1747 } | 1750 } |
| 1748 if (requestMetadata_partnersSessionId != null) { | 1751 if (requestMetadata_partnersSessionId != null) { |
| 1749 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn
ersSessionId]; | 1752 _queryParams["requestMetadata.partnersSessionId"] = [requestMetadata_partn
ersSessionId]; |
| 1750 } | 1753 } |
| 1751 if (requestMetadata_trafficSource_trafficSourceId != null) { | 1754 if (requestMetadata_trafficSource_trafficSourceId != null) { |
| 1752 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe
tadata_trafficSource_trafficSourceId]; | 1755 _queryParams["requestMetadata.trafficSource.trafficSourceId"] = [requestMe
tadata_trafficSource_trafficSourceId]; |
| 1753 } | 1756 } |
| 1754 if (requestMetadata_locale != null) { | |
| 1755 _queryParams["requestMetadata.locale"] = [requestMetadata_locale]; | |
| 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 2558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4325 * - "SMB_VIEWED_DOUBLECLICK_CERTIFICATE" : Advertiser viewed DoubleClick | 4325 * - "SMB_VIEWED_DOUBLECLICK_CERTIFICATE" : Advertiser viewed DoubleClick |
| 4326 * certificate. | 4326 * certificate. |
| 4327 * - "SMB_VIEWED_MOBILE_SITES_CERTIFICATE" : Advertiser viewed Mobile Sites | 4327 * - "SMB_VIEWED_MOBILE_SITES_CERTIFICATE" : Advertiser viewed Mobile Sites |
| 4328 * certificate. | 4328 * certificate. |
| 4329 * - "SMB_VIEWED_VIDEO_ADS_CERTIFICATE" : Advertiser viewed VideoAds | 4329 * - "SMB_VIEWED_VIDEO_ADS_CERTIFICATE" : Advertiser viewed VideoAds |
| 4330 * certificate. | 4330 * certificate. |
| 4331 * - "SMB_VIEWED_SHOPPING_CERTIFICATE" : Advertiser clicked Shopping | 4331 * - "SMB_VIEWED_SHOPPING_CERTIFICATE" : Advertiser clicked Shopping |
| 4332 * certificate help icon. | 4332 * certificate help icon. |
| 4333 * - "SMB_CLICKED_VIDEO_ADS_CERTIFICATE_HELP_ICON" : Advertiser clicked | 4333 * - "SMB_CLICKED_VIDEO_ADS_CERTIFICATE_HELP_ICON" : Advertiser clicked |
| 4334 * VideoAds certificate help icon. | 4334 * VideoAds certificate help icon. |
| 4335 * - "SMB_VIEWED_DIGITAL_SALES_CERTIFICATE" : Advertiser viewed Digital Sales |
| 4336 * certificate. |
| 4335 * - "CLICKED_HELP_AT_BOTTOM" : Clicked `help` at bottom. | 4337 * - "CLICKED_HELP_AT_BOTTOM" : Clicked `help` at bottom. |
| 4336 * - "CLICKED_HELP_AT_TOP" : Clicked `help` at top. | 4338 * - "CLICKED_HELP_AT_TOP" : Clicked `help` at top. |
| 4337 * - "CLIENT_ERROR" : Client error occurred. | 4339 * - "CLIENT_ERROR" : Client error occurred. |
| 4338 * - "AGENCY_CLICKED_LEFT_NAV_STORIES" : Agency clicked left nav `stories`. | 4340 * - "AGENCY_CLICKED_LEFT_NAV_STORIES" : Agency clicked left nav `stories`. |
| 4339 * - "CLICKED" : Click occured. | 4341 * - "CLICKED" : Click occured. |
| 4340 * - "SMB_VIEWED_MOBILE_CERTIFICATE" : Advertiser clicked Mobile certificate | 4342 * - "SMB_VIEWED_MOBILE_CERTIFICATE" : Advertiser clicked Mobile certificate |
| 4341 * help icon. | 4343 * help icon. |
| 4342 * - "AGENCY_FAILED_COMPANY_VERIFICATION" : Agency failed the company | 4344 * - "AGENCY_FAILED_COMPANY_VERIFICATION" : Agency failed the company |
| 4343 * verification. | 4345 * verification. |
| 4344 * - "VISITED_LANDING" : User visited the landing portion of Google Partners. | 4346 * - "VISITED_LANDING" : User visited the landing portion of Google Partners. |
| (...skipping 946 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5291 } | 5293 } |
| 5292 if (primaryCountryCode != null) { | 5294 if (primaryCountryCode != null) { |
| 5293 _json["primaryCountryCode"] = primaryCountryCode; | 5295 _json["primaryCountryCode"] = primaryCountryCode; |
| 5294 } | 5296 } |
| 5295 if (profilePublic != null) { | 5297 if (profilePublic != null) { |
| 5296 _json["profilePublic"] = profilePublic; | 5298 _json["profilePublic"] = profilePublic; |
| 5297 } | 5299 } |
| 5298 return _json; | 5300 return _json; |
| 5299 } | 5301 } |
| 5300 } | 5302 } |
| OLD | NEW |