OLD | NEW |
(Empty) | |
| 1 library googleapis.analytics.v3; |
| 2 |
| 3 import "dart:core" as core; |
| 4 import "dart:collection" as collection; |
| 5 import "dart:async" as async; |
| 6 import "dart:convert" as convert; |
| 7 |
| 8 import "package:crypto/crypto.dart" as crypto; |
| 9 import 'package:http/http.dart' as http; |
| 10 import '../src/common_internal.dart' as common_internal; |
| 11 import '../common/common.dart' as common; |
| 12 |
| 13 export '../common/common.dart' show ApiRequestError; |
| 14 export '../common/common.dart' show DetailedApiRequestError; |
| 15 |
| 16 /** View and manage your Google Analytics data */ |
| 17 class AnalyticsApi { |
| 18 /** View and manage your Google Analytics data */ |
| 19 static const AnalyticsScope = "https://www.googleapis.com/auth/analytics"; |
| 20 |
| 21 /** Edit Google Analytics management entities */ |
| 22 static const AnalyticsEditScope = "https://www.googleapis.com/auth/analytics.e
dit"; |
| 23 |
| 24 /** Manage Google Analytics Account users by email address */ |
| 25 static const AnalyticsManageUsersScope = "https://www.googleapis.com/auth/anal
ytics.manage.users"; |
| 26 |
| 27 /** |
| 28 * Create a new Google Analytics account along with its default property and |
| 29 * view |
| 30 */ |
| 31 static const AnalyticsProvisionScope = "https://www.googleapis.com/auth/analyt
ics.provision"; |
| 32 |
| 33 /** View your Google Analytics data */ |
| 34 static const AnalyticsReadonlyScope = "https://www.googleapis.com/auth/analyti
cs.readonly"; |
| 35 |
| 36 |
| 37 final common_internal.ApiRequester _requester; |
| 38 |
| 39 DataResourceApi get data => new DataResourceApi(_requester); |
| 40 ManagementResourceApi get management => new ManagementResourceApi(_requester); |
| 41 MetadataResourceApi get metadata => new MetadataResourceApi(_requester); |
| 42 ProvisioningResourceApi get provisioning => new ProvisioningResourceApi(_reque
ster); |
| 43 |
| 44 AnalyticsApi(http.Client client) : |
| 45 _requester = new common_internal.ApiRequester(client, "https://www.googlea
pis.com/", "/analytics/v3/"); |
| 46 } |
| 47 |
| 48 |
| 49 /** Not documented yet. */ |
| 50 class DataResourceApi { |
| 51 final common_internal.ApiRequester _requester; |
| 52 |
| 53 DataGaResourceApi get ga => new DataGaResourceApi(_requester); |
| 54 DataMcfResourceApi get mcf => new DataMcfResourceApi(_requester); |
| 55 DataRealtimeResourceApi get realtime => new DataRealtimeResourceApi(_requester
); |
| 56 |
| 57 DataResourceApi(common_internal.ApiRequester client) : |
| 58 _requester = client; |
| 59 } |
| 60 |
| 61 |
| 62 /** Not documented yet. */ |
| 63 class DataGaResourceApi { |
| 64 final common_internal.ApiRequester _requester; |
| 65 |
| 66 DataGaResourceApi(common_internal.ApiRequester client) : |
| 67 _requester = client; |
| 68 |
| 69 /** |
| 70 * Returns Analytics data for a view (profile). |
| 71 * |
| 72 * Request parameters: |
| 73 * |
| 74 * [ids] - Unique table ID for retrieving Analytics data. Table ID is of the |
| 75 * form ga:XXXX, where XXXX is the Analytics view (profile) ID. |
| 76 * Value must have pattern "ga:[0-9]+". |
| 77 * |
| 78 * [start_date] - Start date for fetching Analytics data. Requests can specify |
| 79 * a start date formatted as YYYY-MM-DD, or as a relative date (e.g., today, |
| 80 * yesterday, or 7daysAgo). The default value is 7daysAgo. |
| 81 * Value must have pattern |
| 82 * "[0-9]{4}-[0-9]{2}-[0-9]{2}|today|yesterday|[0-9]+(daysAgo)". |
| 83 * |
| 84 * [end_date] - End date for fetching Analytics data. Request can should |
| 85 * specify an end date formatted as YYYY-MM-DD, or as a relative date (e.g., |
| 86 * today, yesterday, or 7daysAgo). The default value is yesterday. |
| 87 * Value must have pattern |
| 88 * "[0-9]{4}-[0-9]{2}-[0-9]{2}|today|yesterday|[0-9]+(daysAgo)". |
| 89 * |
| 90 * [metrics] - A comma-separated list of Analytics metrics. E.g., |
| 91 * 'ga:sessions,ga:pageviews'. At least one metric must be specified. |
| 92 * Value must have pattern "ga:.+". |
| 93 * |
| 94 * [dimensions] - A comma-separated list of Analytics dimensions. E.g., |
| 95 * 'ga:browser,ga:city'. |
| 96 * Value must have pattern "(ga:.+)?". |
| 97 * |
| 98 * [filters] - A comma-separated list of dimension or metric filters to be |
| 99 * applied to Analytics data. |
| 100 * Value must have pattern "ga:.+". |
| 101 * |
| 102 * [max_results] - The maximum number of entries to include in this feed. |
| 103 * |
| 104 * [output] - The selected format for the response. Default format is JSON. |
| 105 * Possible string values are: |
| 106 * - "dataTable" : Returns the response in Google Charts Data Table format. |
| 107 * This is useful in creating visualization using Google Charts. |
| 108 * - "json" : Returns the response in standard JSON format. |
| 109 * |
| 110 * [samplingLevel] - The desired sampling level. |
| 111 * Possible string values are: |
| 112 * - "DEFAULT" : Returns response with a sample size that balances speed and |
| 113 * accuracy. |
| 114 * - "FASTER" : Returns a fast response with a smaller sample size. |
| 115 * - "HIGHER_PRECISION" : Returns a more accurate response using a large |
| 116 * sample size, but this may result in the response being slower. |
| 117 * |
| 118 * [segment] - An Analytics segment to be applied to data. |
| 119 * |
| 120 * [sort] - A comma-separated list of dimensions or metrics that determine the |
| 121 * sort order for Analytics data. |
| 122 * Value must have pattern "(-)?ga:.+". |
| 123 * |
| 124 * [start_index] - An index of the first entity to retrieve. Use this |
| 125 * parameter as a pagination mechanism along with the max-results parameter. |
| 126 * |
| 127 * Completes with a [GaData]. |
| 128 * |
| 129 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 130 * error. |
| 131 * |
| 132 * If the used [http.Client] completes with an error when making a REST call, |
| 133 * this method will complete with the same error. |
| 134 */ |
| 135 async.Future<GaData> get(core.String ids, core.String start_date, core.String
end_date, core.String metrics, {core.String dimensions, core.String filters, cor
e.int max_results, core.String output, core.String samplingLevel, core.String se
gment, core.String sort, core.int start_index}) { |
| 136 var _url = null; |
| 137 var _queryParams = new core.Map(); |
| 138 var _uploadMedia = null; |
| 139 var _uploadOptions = null; |
| 140 var _downloadOptions = common.DownloadOptions.Metadata; |
| 141 var _body = null; |
| 142 |
| 143 if (ids == null) { |
| 144 throw new core.ArgumentError("Parameter ids is required."); |
| 145 } |
| 146 _queryParams["ids"] = [ids]; |
| 147 if (start_date == null) { |
| 148 throw new core.ArgumentError("Parameter start_date is required."); |
| 149 } |
| 150 _queryParams["start-date"] = [start_date]; |
| 151 if (end_date == null) { |
| 152 throw new core.ArgumentError("Parameter end_date is required."); |
| 153 } |
| 154 _queryParams["end-date"] = [end_date]; |
| 155 if (metrics == null) { |
| 156 throw new core.ArgumentError("Parameter metrics is required."); |
| 157 } |
| 158 _queryParams["metrics"] = [metrics]; |
| 159 if (dimensions != null) { |
| 160 _queryParams["dimensions"] = [dimensions]; |
| 161 } |
| 162 if (filters != null) { |
| 163 _queryParams["filters"] = [filters]; |
| 164 } |
| 165 if (max_results != null) { |
| 166 _queryParams["max-results"] = ["${max_results}"]; |
| 167 } |
| 168 if (output != null) { |
| 169 _queryParams["output"] = [output]; |
| 170 } |
| 171 if (samplingLevel != null) { |
| 172 _queryParams["samplingLevel"] = [samplingLevel]; |
| 173 } |
| 174 if (segment != null) { |
| 175 _queryParams["segment"] = [segment]; |
| 176 } |
| 177 if (sort != null) { |
| 178 _queryParams["sort"] = [sort]; |
| 179 } |
| 180 if (start_index != null) { |
| 181 _queryParams["start-index"] = ["${start_index}"]; |
| 182 } |
| 183 |
| 184 |
| 185 _url = 'data/ga'; |
| 186 |
| 187 var _response = _requester.request(_url, |
| 188 "GET", |
| 189 body: _body, |
| 190 queryParams: _queryParams, |
| 191 uploadOptions: _uploadOptions, |
| 192 uploadMedia: _uploadMedia, |
| 193 downloadOptions: _downloadOptions); |
| 194 return _response.then((data) => new GaData.fromJson(data)); |
| 195 } |
| 196 |
| 197 } |
| 198 |
| 199 |
| 200 /** Not documented yet. */ |
| 201 class DataMcfResourceApi { |
| 202 final common_internal.ApiRequester _requester; |
| 203 |
| 204 DataMcfResourceApi(common_internal.ApiRequester client) : |
| 205 _requester = client; |
| 206 |
| 207 /** |
| 208 * Returns Analytics Multi-Channel Funnels data for a view (profile). |
| 209 * |
| 210 * Request parameters: |
| 211 * |
| 212 * [ids] - Unique table ID for retrieving Analytics data. Table ID is of the |
| 213 * form ga:XXXX, where XXXX is the Analytics view (profile) ID. |
| 214 * Value must have pattern "ga:[0-9]+". |
| 215 * |
| 216 * [start_date] - Start date for fetching Analytics data. Requests can specify |
| 217 * a start date formatted as YYYY-MM-DD, or as a relative date (e.g., today, |
| 218 * yesterday, or 7daysAgo). The default value is 7daysAgo. |
| 219 * Value must have pattern |
| 220 * "[0-9]{4}-[0-9]{2}-[0-9]{2}|today|yesterday|[0-9]+(daysAgo)". |
| 221 * |
| 222 * [end_date] - End date for fetching Analytics data. Requests can specify a |
| 223 * start date formatted as YYYY-MM-DD, or as a relative date (e.g., today, |
| 224 * yesterday, or 7daysAgo). The default value is 7daysAgo. |
| 225 * Value must have pattern |
| 226 * "[0-9]{4}-[0-9]{2}-[0-9]{2}|today|yesterday|[0-9]+(daysAgo)". |
| 227 * |
| 228 * [metrics] - A comma-separated list of Multi-Channel Funnels metrics. E.g., |
| 229 * 'mcf:totalConversions,mcf:totalConversionValue'. At least one metric must |
| 230 * be specified. |
| 231 * Value must have pattern "mcf:.+". |
| 232 * |
| 233 * [dimensions] - A comma-separated list of Multi-Channel Funnels dimensions. |
| 234 * E.g., 'mcf:source,mcf:medium'. |
| 235 * Value must have pattern "(mcf:.+)?". |
| 236 * |
| 237 * [filters] - A comma-separated list of dimension or metric filters to be |
| 238 * applied to the Analytics data. |
| 239 * Value must have pattern "mcf:.+". |
| 240 * |
| 241 * [max_results] - The maximum number of entries to include in this feed. |
| 242 * |
| 243 * [samplingLevel] - The desired sampling level. |
| 244 * Possible string values are: |
| 245 * - "DEFAULT" : Returns response with a sample size that balances speed and |
| 246 * accuracy. |
| 247 * - "FASTER" : Returns a fast response with a smaller sample size. |
| 248 * - "HIGHER_PRECISION" : Returns a more accurate response using a large |
| 249 * sample size, but this may result in the response being slower. |
| 250 * |
| 251 * [sort] - A comma-separated list of dimensions or metrics that determine the |
| 252 * sort order for the Analytics data. |
| 253 * Value must have pattern "(-)?mcf:.+". |
| 254 * |
| 255 * [start_index] - An index of the first entity to retrieve. Use this |
| 256 * parameter as a pagination mechanism along with the max-results parameter. |
| 257 * |
| 258 * Completes with a [McfData]. |
| 259 * |
| 260 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 261 * error. |
| 262 * |
| 263 * If the used [http.Client] completes with an error when making a REST call, |
| 264 * this method will complete with the same error. |
| 265 */ |
| 266 async.Future<McfData> get(core.String ids, core.String start_date, core.String
end_date, core.String metrics, {core.String dimensions, core.String filters, co
re.int max_results, core.String samplingLevel, core.String sort, core.int start_
index}) { |
| 267 var _url = null; |
| 268 var _queryParams = new core.Map(); |
| 269 var _uploadMedia = null; |
| 270 var _uploadOptions = null; |
| 271 var _downloadOptions = common.DownloadOptions.Metadata; |
| 272 var _body = null; |
| 273 |
| 274 if (ids == null) { |
| 275 throw new core.ArgumentError("Parameter ids is required."); |
| 276 } |
| 277 _queryParams["ids"] = [ids]; |
| 278 if (start_date == null) { |
| 279 throw new core.ArgumentError("Parameter start_date is required."); |
| 280 } |
| 281 _queryParams["start-date"] = [start_date]; |
| 282 if (end_date == null) { |
| 283 throw new core.ArgumentError("Parameter end_date is required."); |
| 284 } |
| 285 _queryParams["end-date"] = [end_date]; |
| 286 if (metrics == null) { |
| 287 throw new core.ArgumentError("Parameter metrics is required."); |
| 288 } |
| 289 _queryParams["metrics"] = [metrics]; |
| 290 if (dimensions != null) { |
| 291 _queryParams["dimensions"] = [dimensions]; |
| 292 } |
| 293 if (filters != null) { |
| 294 _queryParams["filters"] = [filters]; |
| 295 } |
| 296 if (max_results != null) { |
| 297 _queryParams["max-results"] = ["${max_results}"]; |
| 298 } |
| 299 if (samplingLevel != null) { |
| 300 _queryParams["samplingLevel"] = [samplingLevel]; |
| 301 } |
| 302 if (sort != null) { |
| 303 _queryParams["sort"] = [sort]; |
| 304 } |
| 305 if (start_index != null) { |
| 306 _queryParams["start-index"] = ["${start_index}"]; |
| 307 } |
| 308 |
| 309 |
| 310 _url = 'data/mcf'; |
| 311 |
| 312 var _response = _requester.request(_url, |
| 313 "GET", |
| 314 body: _body, |
| 315 queryParams: _queryParams, |
| 316 uploadOptions: _uploadOptions, |
| 317 uploadMedia: _uploadMedia, |
| 318 downloadOptions: _downloadOptions); |
| 319 return _response.then((data) => new McfData.fromJson(data)); |
| 320 } |
| 321 |
| 322 } |
| 323 |
| 324 |
| 325 /** Not documented yet. */ |
| 326 class DataRealtimeResourceApi { |
| 327 final common_internal.ApiRequester _requester; |
| 328 |
| 329 DataRealtimeResourceApi(common_internal.ApiRequester client) : |
| 330 _requester = client; |
| 331 |
| 332 /** |
| 333 * Returns real time data for a view (profile). |
| 334 * |
| 335 * Request parameters: |
| 336 * |
| 337 * [ids] - Unique table ID for retrieving real time data. Table ID is of the |
| 338 * form ga:XXXX, where XXXX is the Analytics view (profile) ID. |
| 339 * Value must have pattern "ga:[0-9]+". |
| 340 * |
| 341 * [metrics] - A comma-separated list of real time metrics. E.g., |
| 342 * 'rt:activeUsers'. At least one metric must be specified. |
| 343 * Value must have pattern "(ga:.+)|(rt:.+)". |
| 344 * |
| 345 * [dimensions] - A comma-separated list of real time dimensions. E.g., |
| 346 * 'rt:medium,rt:city'. |
| 347 * Value must have pattern "(ga:.+)|(rt:.+)". |
| 348 * |
| 349 * [filters] - A comma-separated list of dimension or metric filters to be |
| 350 * applied to real time data. |
| 351 * Value must have pattern "(ga:.+)|(rt:.+)". |
| 352 * |
| 353 * [max_results] - The maximum number of entries to include in this feed. |
| 354 * |
| 355 * [sort] - A comma-separated list of dimensions or metrics that determine the |
| 356 * sort order for real time data. |
| 357 * Value must have pattern "(-)?((ga:.+)|(rt:.+))". |
| 358 * |
| 359 * Completes with a [RealtimeData]. |
| 360 * |
| 361 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 362 * error. |
| 363 * |
| 364 * If the used [http.Client] completes with an error when making a REST call, |
| 365 * this method will complete with the same error. |
| 366 */ |
| 367 async.Future<RealtimeData> get(core.String ids, core.String metrics, {core.Str
ing dimensions, core.String filters, core.int max_results, core.String sort}) { |
| 368 var _url = null; |
| 369 var _queryParams = new core.Map(); |
| 370 var _uploadMedia = null; |
| 371 var _uploadOptions = null; |
| 372 var _downloadOptions = common.DownloadOptions.Metadata; |
| 373 var _body = null; |
| 374 |
| 375 if (ids == null) { |
| 376 throw new core.ArgumentError("Parameter ids is required."); |
| 377 } |
| 378 _queryParams["ids"] = [ids]; |
| 379 if (metrics == null) { |
| 380 throw new core.ArgumentError("Parameter metrics is required."); |
| 381 } |
| 382 _queryParams["metrics"] = [metrics]; |
| 383 if (dimensions != null) { |
| 384 _queryParams["dimensions"] = [dimensions]; |
| 385 } |
| 386 if (filters != null) { |
| 387 _queryParams["filters"] = [filters]; |
| 388 } |
| 389 if (max_results != null) { |
| 390 _queryParams["max-results"] = ["${max_results}"]; |
| 391 } |
| 392 if (sort != null) { |
| 393 _queryParams["sort"] = [sort]; |
| 394 } |
| 395 |
| 396 |
| 397 _url = 'data/realtime'; |
| 398 |
| 399 var _response = _requester.request(_url, |
| 400 "GET", |
| 401 body: _body, |
| 402 queryParams: _queryParams, |
| 403 uploadOptions: _uploadOptions, |
| 404 uploadMedia: _uploadMedia, |
| 405 downloadOptions: _downloadOptions); |
| 406 return _response.then((data) => new RealtimeData.fromJson(data)); |
| 407 } |
| 408 |
| 409 } |
| 410 |
| 411 |
| 412 /** Not documented yet. */ |
| 413 class ManagementResourceApi { |
| 414 final common_internal.ApiRequester _requester; |
| 415 |
| 416 ManagementAccountSummariesResourceApi get accountSummaries => new ManagementAc
countSummariesResourceApi(_requester); |
| 417 ManagementAccountUserLinksResourceApi get accountUserLinks => new ManagementAc
countUserLinksResourceApi(_requester); |
| 418 ManagementAccountsResourceApi get accounts => new ManagementAccountsResourceAp
i(_requester); |
| 419 ManagementCustomDataSourcesResourceApi get customDataSources => new Management
CustomDataSourcesResourceApi(_requester); |
| 420 ManagementDailyUploadsResourceApi get dailyUploads => new ManagementDailyUploa
dsResourceApi(_requester); |
| 421 ManagementExperimentsResourceApi get experiments => new ManagementExperimentsR
esourceApi(_requester); |
| 422 ManagementFiltersResourceApi get filters => new ManagementFiltersResourceApi(_
requester); |
| 423 ManagementGoalsResourceApi get goals => new ManagementGoalsResourceApi(_reques
ter); |
| 424 ManagementProfileFilterLinksResourceApi get profileFilterLinks => new Manageme
ntProfileFilterLinksResourceApi(_requester); |
| 425 ManagementProfileUserLinksResourceApi get profileUserLinks => new ManagementPr
ofileUserLinksResourceApi(_requester); |
| 426 ManagementProfilesResourceApi get profiles => new ManagementProfilesResourceAp
i(_requester); |
| 427 ManagementSegmentsResourceApi get segments => new ManagementSegmentsResourceAp
i(_requester); |
| 428 ManagementUnsampledReportsResourceApi get unsampledReports => new ManagementUn
sampledReportsResourceApi(_requester); |
| 429 ManagementUploadsResourceApi get uploads => new ManagementUploadsResourceApi(_
requester); |
| 430 ManagementWebPropertyAdWordsLinksResourceApi get webPropertyAdWordsLinks => ne
w ManagementWebPropertyAdWordsLinksResourceApi(_requester); |
| 431 ManagementWebpropertiesResourceApi get webproperties => new ManagementWebprope
rtiesResourceApi(_requester); |
| 432 ManagementWebpropertyUserLinksResourceApi get webpropertyUserLinks => new Mana
gementWebpropertyUserLinksResourceApi(_requester); |
| 433 |
| 434 ManagementResourceApi(common_internal.ApiRequester client) : |
| 435 _requester = client; |
| 436 } |
| 437 |
| 438 |
| 439 /** Not documented yet. */ |
| 440 class ManagementAccountSummariesResourceApi { |
| 441 final common_internal.ApiRequester _requester; |
| 442 |
| 443 ManagementAccountSummariesResourceApi(common_internal.ApiRequester client) : |
| 444 _requester = client; |
| 445 |
| 446 /** |
| 447 * Lists account summaries (lightweight tree comprised of |
| 448 * accounts/properties/profiles) to which the user has access. |
| 449 * |
| 450 * Request parameters: |
| 451 * |
| 452 * [max_results] - The maximum number of filters to include in this response. |
| 453 * |
| 454 * [start_index] - An index of the first entity to retrieve. Use this |
| 455 * parameter as a pagination mechanism along with the max-results parameter. |
| 456 * |
| 457 * Completes with a [AccountSummaries]. |
| 458 * |
| 459 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 460 * error. |
| 461 * |
| 462 * If the used [http.Client] completes with an error when making a REST call, |
| 463 * this method will complete with the same error. |
| 464 */ |
| 465 async.Future<AccountSummaries> list({core.int max_results, core.int start_inde
x}) { |
| 466 var _url = null; |
| 467 var _queryParams = new core.Map(); |
| 468 var _uploadMedia = null; |
| 469 var _uploadOptions = null; |
| 470 var _downloadOptions = common.DownloadOptions.Metadata; |
| 471 var _body = null; |
| 472 |
| 473 if (max_results != null) { |
| 474 _queryParams["max-results"] = ["${max_results}"]; |
| 475 } |
| 476 if (start_index != null) { |
| 477 _queryParams["start-index"] = ["${start_index}"]; |
| 478 } |
| 479 |
| 480 |
| 481 _url = 'management/accountSummaries'; |
| 482 |
| 483 var _response = _requester.request(_url, |
| 484 "GET", |
| 485 body: _body, |
| 486 queryParams: _queryParams, |
| 487 uploadOptions: _uploadOptions, |
| 488 uploadMedia: _uploadMedia, |
| 489 downloadOptions: _downloadOptions); |
| 490 return _response.then((data) => new AccountSummaries.fromJson(data)); |
| 491 } |
| 492 |
| 493 } |
| 494 |
| 495 |
| 496 /** Not documented yet. */ |
| 497 class ManagementAccountUserLinksResourceApi { |
| 498 final common_internal.ApiRequester _requester; |
| 499 |
| 500 ManagementAccountUserLinksResourceApi(common_internal.ApiRequester client) : |
| 501 _requester = client; |
| 502 |
| 503 /** |
| 504 * Removes a user from the given account. |
| 505 * |
| 506 * Request parameters: |
| 507 * |
| 508 * [accountId] - Account ID to delete the user link for. |
| 509 * |
| 510 * [linkId] - Link ID to delete the user link for. |
| 511 * |
| 512 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 513 * error. |
| 514 * |
| 515 * If the used [http.Client] completes with an error when making a REST call, |
| 516 * this method will complete with the same error. |
| 517 */ |
| 518 async.Future delete(core.String accountId, core.String linkId) { |
| 519 var _url = null; |
| 520 var _queryParams = new core.Map(); |
| 521 var _uploadMedia = null; |
| 522 var _uploadOptions = null; |
| 523 var _downloadOptions = common.DownloadOptions.Metadata; |
| 524 var _body = null; |
| 525 |
| 526 if (accountId == null) { |
| 527 throw new core.ArgumentError("Parameter accountId is required."); |
| 528 } |
| 529 if (linkId == null) { |
| 530 throw new core.ArgumentError("Parameter linkId is required."); |
| 531 } |
| 532 |
| 533 _downloadOptions = null; |
| 534 |
| 535 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/entityUserLinks/' + common_internal.Escaper.ecapeVariable('$linkId')
; |
| 536 |
| 537 var _response = _requester.request(_url, |
| 538 "DELETE", |
| 539 body: _body, |
| 540 queryParams: _queryParams, |
| 541 uploadOptions: _uploadOptions, |
| 542 uploadMedia: _uploadMedia, |
| 543 downloadOptions: _downloadOptions); |
| 544 return _response.then((data) => null); |
| 545 } |
| 546 |
| 547 /** |
| 548 * Adds a new user to the given account. |
| 549 * |
| 550 * [request] - The metadata request object. |
| 551 * |
| 552 * Request parameters: |
| 553 * |
| 554 * [accountId] - Account ID to create the user link for. |
| 555 * |
| 556 * Completes with a [EntityUserLink]. |
| 557 * |
| 558 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 559 * error. |
| 560 * |
| 561 * If the used [http.Client] completes with an error when making a REST call, |
| 562 * this method will complete with the same error. |
| 563 */ |
| 564 async.Future<EntityUserLink> insert(EntityUserLink request, core.String accoun
tId) { |
| 565 var _url = null; |
| 566 var _queryParams = new core.Map(); |
| 567 var _uploadMedia = null; |
| 568 var _uploadOptions = null; |
| 569 var _downloadOptions = common.DownloadOptions.Metadata; |
| 570 var _body = null; |
| 571 |
| 572 if (request != null) { |
| 573 _body = convert.JSON.encode((request).toJson()); |
| 574 } |
| 575 if (accountId == null) { |
| 576 throw new core.ArgumentError("Parameter accountId is required."); |
| 577 } |
| 578 |
| 579 |
| 580 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/entityUserLinks'; |
| 581 |
| 582 var _response = _requester.request(_url, |
| 583 "POST", |
| 584 body: _body, |
| 585 queryParams: _queryParams, |
| 586 uploadOptions: _uploadOptions, |
| 587 uploadMedia: _uploadMedia, |
| 588 downloadOptions: _downloadOptions); |
| 589 return _response.then((data) => new EntityUserLink.fromJson(data)); |
| 590 } |
| 591 |
| 592 /** |
| 593 * Lists account-user links for a given account. |
| 594 * |
| 595 * Request parameters: |
| 596 * |
| 597 * [accountId] - Account ID to retrieve the user links for. |
| 598 * |
| 599 * [max_results] - The maximum number of account-user links to include in this |
| 600 * response. |
| 601 * |
| 602 * [start_index] - An index of the first account-user link to retrieve. Use |
| 603 * this parameter as a pagination mechanism along with the max-results |
| 604 * parameter. |
| 605 * |
| 606 * Completes with a [EntityUserLinks]. |
| 607 * |
| 608 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 609 * error. |
| 610 * |
| 611 * If the used [http.Client] completes with an error when making a REST call, |
| 612 * this method will complete with the same error. |
| 613 */ |
| 614 async.Future<EntityUserLinks> list(core.String accountId, {core.int max_result
s, core.int start_index}) { |
| 615 var _url = null; |
| 616 var _queryParams = new core.Map(); |
| 617 var _uploadMedia = null; |
| 618 var _uploadOptions = null; |
| 619 var _downloadOptions = common.DownloadOptions.Metadata; |
| 620 var _body = null; |
| 621 |
| 622 if (accountId == null) { |
| 623 throw new core.ArgumentError("Parameter accountId is required."); |
| 624 } |
| 625 if (max_results != null) { |
| 626 _queryParams["max-results"] = ["${max_results}"]; |
| 627 } |
| 628 if (start_index != null) { |
| 629 _queryParams["start-index"] = ["${start_index}"]; |
| 630 } |
| 631 |
| 632 |
| 633 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/entityUserLinks'; |
| 634 |
| 635 var _response = _requester.request(_url, |
| 636 "GET", |
| 637 body: _body, |
| 638 queryParams: _queryParams, |
| 639 uploadOptions: _uploadOptions, |
| 640 uploadMedia: _uploadMedia, |
| 641 downloadOptions: _downloadOptions); |
| 642 return _response.then((data) => new EntityUserLinks.fromJson(data)); |
| 643 } |
| 644 |
| 645 /** |
| 646 * Updates permissions for an existing user on the given account. |
| 647 * |
| 648 * [request] - The metadata request object. |
| 649 * |
| 650 * Request parameters: |
| 651 * |
| 652 * [accountId] - Account ID to update the account-user link for. |
| 653 * |
| 654 * [linkId] - Link ID to update the account-user link for. |
| 655 * |
| 656 * Completes with a [EntityUserLink]. |
| 657 * |
| 658 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 659 * error. |
| 660 * |
| 661 * If the used [http.Client] completes with an error when making a REST call, |
| 662 * this method will complete with the same error. |
| 663 */ |
| 664 async.Future<EntityUserLink> update(EntityUserLink request, core.String accoun
tId, core.String linkId) { |
| 665 var _url = null; |
| 666 var _queryParams = new core.Map(); |
| 667 var _uploadMedia = null; |
| 668 var _uploadOptions = null; |
| 669 var _downloadOptions = common.DownloadOptions.Metadata; |
| 670 var _body = null; |
| 671 |
| 672 if (request != null) { |
| 673 _body = convert.JSON.encode((request).toJson()); |
| 674 } |
| 675 if (accountId == null) { |
| 676 throw new core.ArgumentError("Parameter accountId is required."); |
| 677 } |
| 678 if (linkId == null) { |
| 679 throw new core.ArgumentError("Parameter linkId is required."); |
| 680 } |
| 681 |
| 682 |
| 683 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/entityUserLinks/' + common_internal.Escaper.ecapeVariable('$linkId')
; |
| 684 |
| 685 var _response = _requester.request(_url, |
| 686 "PUT", |
| 687 body: _body, |
| 688 queryParams: _queryParams, |
| 689 uploadOptions: _uploadOptions, |
| 690 uploadMedia: _uploadMedia, |
| 691 downloadOptions: _downloadOptions); |
| 692 return _response.then((data) => new EntityUserLink.fromJson(data)); |
| 693 } |
| 694 |
| 695 } |
| 696 |
| 697 |
| 698 /** Not documented yet. */ |
| 699 class ManagementAccountsResourceApi { |
| 700 final common_internal.ApiRequester _requester; |
| 701 |
| 702 ManagementAccountsResourceApi(common_internal.ApiRequester client) : |
| 703 _requester = client; |
| 704 |
| 705 /** |
| 706 * Lists all accounts to which the user has access. |
| 707 * |
| 708 * Request parameters: |
| 709 * |
| 710 * [max_results] - The maximum number of accounts to include in this response. |
| 711 * |
| 712 * [start_index] - An index of the first account to retrieve. Use this |
| 713 * parameter as a pagination mechanism along with the max-results parameter. |
| 714 * |
| 715 * Completes with a [Accounts]. |
| 716 * |
| 717 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 718 * error. |
| 719 * |
| 720 * If the used [http.Client] completes with an error when making a REST call, |
| 721 * this method will complete with the same error. |
| 722 */ |
| 723 async.Future<Accounts> list({core.int max_results, core.int start_index}) { |
| 724 var _url = null; |
| 725 var _queryParams = new core.Map(); |
| 726 var _uploadMedia = null; |
| 727 var _uploadOptions = null; |
| 728 var _downloadOptions = common.DownloadOptions.Metadata; |
| 729 var _body = null; |
| 730 |
| 731 if (max_results != null) { |
| 732 _queryParams["max-results"] = ["${max_results}"]; |
| 733 } |
| 734 if (start_index != null) { |
| 735 _queryParams["start-index"] = ["${start_index}"]; |
| 736 } |
| 737 |
| 738 |
| 739 _url = 'management/accounts'; |
| 740 |
| 741 var _response = _requester.request(_url, |
| 742 "GET", |
| 743 body: _body, |
| 744 queryParams: _queryParams, |
| 745 uploadOptions: _uploadOptions, |
| 746 uploadMedia: _uploadMedia, |
| 747 downloadOptions: _downloadOptions); |
| 748 return _response.then((data) => new Accounts.fromJson(data)); |
| 749 } |
| 750 |
| 751 } |
| 752 |
| 753 |
| 754 /** Not documented yet. */ |
| 755 class ManagementCustomDataSourcesResourceApi { |
| 756 final common_internal.ApiRequester _requester; |
| 757 |
| 758 ManagementCustomDataSourcesResourceApi(common_internal.ApiRequester client) : |
| 759 _requester = client; |
| 760 |
| 761 /** |
| 762 * List custom data sources to which the user has access. |
| 763 * |
| 764 * Request parameters: |
| 765 * |
| 766 * [accountId] - Account Id for the custom data sources to retrieve. |
| 767 * Value must have pattern "\d+". |
| 768 * |
| 769 * [webPropertyId] - Web property Id for the custom data sources to retrieve. |
| 770 * Value must have pattern "UA-(\d+)-(\d+)". |
| 771 * |
| 772 * [max_results] - The maximum number of custom data sources to include in |
| 773 * this response. |
| 774 * |
| 775 * [start_index] - A 1-based index of the first custom data source to |
| 776 * retrieve. Use this parameter as a pagination mechanism along with the |
| 777 * max-results parameter. |
| 778 * |
| 779 * Completes with a [CustomDataSources]. |
| 780 * |
| 781 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 782 * error. |
| 783 * |
| 784 * If the used [http.Client] completes with an error when making a REST call, |
| 785 * this method will complete with the same error. |
| 786 */ |
| 787 async.Future<CustomDataSources> list(core.String accountId, core.String webPro
pertyId, {core.int max_results, core.int start_index}) { |
| 788 var _url = null; |
| 789 var _queryParams = new core.Map(); |
| 790 var _uploadMedia = null; |
| 791 var _uploadOptions = null; |
| 792 var _downloadOptions = common.DownloadOptions.Metadata; |
| 793 var _body = null; |
| 794 |
| 795 if (accountId == null) { |
| 796 throw new core.ArgumentError("Parameter accountId is required."); |
| 797 } |
| 798 if (webPropertyId == null) { |
| 799 throw new core.ArgumentError("Parameter webPropertyId is required."); |
| 800 } |
| 801 if (max_results != null) { |
| 802 _queryParams["max-results"] = ["${max_results}"]; |
| 803 } |
| 804 if (start_index != null) { |
| 805 _queryParams["start-index"] = ["${start_index}"]; |
| 806 } |
| 807 |
| 808 |
| 809 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/webproperties/' + common_internal.Escaper.ecapeVariable('$webPropert
yId') + '/customDataSources'; |
| 810 |
| 811 var _response = _requester.request(_url, |
| 812 "GET", |
| 813 body: _body, |
| 814 queryParams: _queryParams, |
| 815 uploadOptions: _uploadOptions, |
| 816 uploadMedia: _uploadMedia, |
| 817 downloadOptions: _downloadOptions); |
| 818 return _response.then((data) => new CustomDataSources.fromJson(data)); |
| 819 } |
| 820 |
| 821 } |
| 822 |
| 823 |
| 824 /** Not documented yet. */ |
| 825 class ManagementDailyUploadsResourceApi { |
| 826 final common_internal.ApiRequester _requester; |
| 827 |
| 828 ManagementDailyUploadsResourceApi(common_internal.ApiRequester client) : |
| 829 _requester = client; |
| 830 |
| 831 /** |
| 832 * Delete uploaded data for the given date. |
| 833 * |
| 834 * Request parameters: |
| 835 * |
| 836 * [accountId] - Account Id associated with daily upload delete. |
| 837 * Value must have pattern "[0-9]+". |
| 838 * |
| 839 * [webPropertyId] - Web property Id associated with daily upload delete. |
| 840 * Value must have pattern "UA-[0-9]+-[0-9]+". |
| 841 * |
| 842 * [customDataSourceId] - Custom data source Id associated with daily upload |
| 843 * delete. |
| 844 * |
| 845 * [date] - Date for which data is to be deleted. Date should be formatted as |
| 846 * YYYY-MM-DD. |
| 847 * Value must have pattern "[0-9]{4}-[0-9]{2}-[0-9]{2}". |
| 848 * |
| 849 * [type] - Type of data for this delete. |
| 850 * Possible string values are: |
| 851 * - "cost" : Value for specifying cost data upload. |
| 852 * |
| 853 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 854 * error. |
| 855 * |
| 856 * If the used [http.Client] completes with an error when making a REST call, |
| 857 * this method will complete with the same error. |
| 858 */ |
| 859 async.Future delete(core.String accountId, core.String webPropertyId, core.Str
ing customDataSourceId, core.String date, core.String type) { |
| 860 var _url = null; |
| 861 var _queryParams = new core.Map(); |
| 862 var _uploadMedia = null; |
| 863 var _uploadOptions = null; |
| 864 var _downloadOptions = common.DownloadOptions.Metadata; |
| 865 var _body = null; |
| 866 |
| 867 if (accountId == null) { |
| 868 throw new core.ArgumentError("Parameter accountId is required."); |
| 869 } |
| 870 if (webPropertyId == null) { |
| 871 throw new core.ArgumentError("Parameter webPropertyId is required."); |
| 872 } |
| 873 if (customDataSourceId == null) { |
| 874 throw new core.ArgumentError("Parameter customDataSourceId is required."); |
| 875 } |
| 876 if (date == null) { |
| 877 throw new core.ArgumentError("Parameter date is required."); |
| 878 } |
| 879 if (type == null) { |
| 880 throw new core.ArgumentError("Parameter type is required."); |
| 881 } |
| 882 _queryParams["type"] = [type]; |
| 883 |
| 884 _downloadOptions = null; |
| 885 |
| 886 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/webproperties/' + common_internal.Escaper.ecapeVariable('$webPropert
yId') + '/customDataSources/' + common_internal.Escaper.ecapeVariable('$customDa
taSourceId') + '/dailyUploads/' + common_internal.Escaper.ecapeVariable('$date')
; |
| 887 |
| 888 var _response = _requester.request(_url, |
| 889 "DELETE", |
| 890 body: _body, |
| 891 queryParams: _queryParams, |
| 892 uploadOptions: _uploadOptions, |
| 893 uploadMedia: _uploadMedia, |
| 894 downloadOptions: _downloadOptions); |
| 895 return _response.then((data) => null); |
| 896 } |
| 897 |
| 898 /** |
| 899 * List daily uploads to which the user has access. |
| 900 * |
| 901 * Request parameters: |
| 902 * |
| 903 * [accountId] - Account Id for the daily uploads to retrieve. |
| 904 * Value must have pattern "\d+". |
| 905 * |
| 906 * [webPropertyId] - Web property Id for the daily uploads to retrieve. |
| 907 * Value must have pattern "UA-(\d+)-(\d+)". |
| 908 * |
| 909 * [customDataSourceId] - Custom data source Id for daily uploads to retrieve. |
| 910 * Value must have pattern ".{22}". |
| 911 * |
| 912 * [start_date] - Start date of the form YYYY-MM-DD. |
| 913 * Value must have pattern "[0-9]{4}-[0-9]{2}-[0-9]{2}". |
| 914 * |
| 915 * [end_date] - End date of the form YYYY-MM-DD. |
| 916 * Value must have pattern "[0-9]{4}-[0-9]{2}-[0-9]{2}". |
| 917 * |
| 918 * [max_results] - The maximum number of custom data sources to include in |
| 919 * this response. |
| 920 * |
| 921 * [start_index] - A 1-based index of the first daily upload to retrieve. Use |
| 922 * this parameter as a pagination mechanism along with the max-results |
| 923 * parameter. |
| 924 * |
| 925 * Completes with a [DailyUploads]. |
| 926 * |
| 927 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 928 * error. |
| 929 * |
| 930 * If the used [http.Client] completes with an error when making a REST call, |
| 931 * this method will complete with the same error. |
| 932 */ |
| 933 async.Future<DailyUploads> list(core.String accountId, core.String webProperty
Id, core.String customDataSourceId, core.String start_date, core.String end_date
, {core.int max_results, core.int start_index}) { |
| 934 var _url = null; |
| 935 var _queryParams = new core.Map(); |
| 936 var _uploadMedia = null; |
| 937 var _uploadOptions = null; |
| 938 var _downloadOptions = common.DownloadOptions.Metadata; |
| 939 var _body = null; |
| 940 |
| 941 if (accountId == null) { |
| 942 throw new core.ArgumentError("Parameter accountId is required."); |
| 943 } |
| 944 if (webPropertyId == null) { |
| 945 throw new core.ArgumentError("Parameter webPropertyId is required."); |
| 946 } |
| 947 if (customDataSourceId == null) { |
| 948 throw new core.ArgumentError("Parameter customDataSourceId is required."); |
| 949 } |
| 950 if (start_date == null) { |
| 951 throw new core.ArgumentError("Parameter start_date is required."); |
| 952 } |
| 953 _queryParams["start-date"] = [start_date]; |
| 954 if (end_date == null) { |
| 955 throw new core.ArgumentError("Parameter end_date is required."); |
| 956 } |
| 957 _queryParams["end-date"] = [end_date]; |
| 958 if (max_results != null) { |
| 959 _queryParams["max-results"] = ["${max_results}"]; |
| 960 } |
| 961 if (start_index != null) { |
| 962 _queryParams["start-index"] = ["${start_index}"]; |
| 963 } |
| 964 |
| 965 |
| 966 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/webproperties/' + common_internal.Escaper.ecapeVariable('$webPropert
yId') + '/customDataSources/' + common_internal.Escaper.ecapeVariable('$customDa
taSourceId') + '/dailyUploads'; |
| 967 |
| 968 var _response = _requester.request(_url, |
| 969 "GET", |
| 970 body: _body, |
| 971 queryParams: _queryParams, |
| 972 uploadOptions: _uploadOptions, |
| 973 uploadMedia: _uploadMedia, |
| 974 downloadOptions: _downloadOptions); |
| 975 return _response.then((data) => new DailyUploads.fromJson(data)); |
| 976 } |
| 977 |
| 978 /** |
| 979 * Update/Overwrite data for a custom data source. |
| 980 * |
| 981 * Request parameters: |
| 982 * |
| 983 * [accountId] - Account Id associated with daily upload. |
| 984 * Value must have pattern "\d+". |
| 985 * |
| 986 * [webPropertyId] - Web property Id associated with daily upload. |
| 987 * Value must have pattern "UA-\d+-\d+". |
| 988 * |
| 989 * [customDataSourceId] - Custom data source Id to which the data being |
| 990 * uploaded belongs. |
| 991 * |
| 992 * [date] - Date for which data is uploaded. Date should be formatted as |
| 993 * YYYY-MM-DD. |
| 994 * Value must have pattern "[0-9]{4}-[0-9]{2}-[0-9]{2}". |
| 995 * |
| 996 * [appendNumber] - Append number for this upload indexed from 1. |
| 997 * Value must be between "1" and "20". |
| 998 * |
| 999 * [type] - Type of data for this upload. |
| 1000 * Possible string values are: |
| 1001 * - "cost" : Value for specifying cost data upload. |
| 1002 * |
| 1003 * [reset] - Reset/Overwrite all previous appends for this date and start over |
| 1004 * with this file as the first upload. |
| 1005 * |
| 1006 * [uploadMedia] - The media to upload. |
| 1007 * |
| 1008 * [uploadOptions] - Options for the media upload. Streaming Media without the |
| 1009 * length being known ahead of time is only supported via resumable uploads. |
| 1010 * |
| 1011 * Completes with a [DailyUploadAppend]. |
| 1012 * |
| 1013 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1014 * error. |
| 1015 * |
| 1016 * If the used [http.Client] completes with an error when making a REST call, |
| 1017 * this method will complete with the same error. |
| 1018 */ |
| 1019 async.Future<DailyUploadAppend> upload(core.String accountId, core.String webP
ropertyId, core.String customDataSourceId, core.String date, core.int appendNumb
er, core.String type, {core.bool reset, common.UploadOptions uploadOptions : com
mon.UploadOptions.Default, common.Media uploadMedia}) { |
| 1020 var _url = null; |
| 1021 var _queryParams = new core.Map(); |
| 1022 var _uploadMedia = null; |
| 1023 var _uploadOptions = null; |
| 1024 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1025 var _body = null; |
| 1026 |
| 1027 if (accountId == null) { |
| 1028 throw new core.ArgumentError("Parameter accountId is required."); |
| 1029 } |
| 1030 if (webPropertyId == null) { |
| 1031 throw new core.ArgumentError("Parameter webPropertyId is required."); |
| 1032 } |
| 1033 if (customDataSourceId == null) { |
| 1034 throw new core.ArgumentError("Parameter customDataSourceId is required."); |
| 1035 } |
| 1036 if (date == null) { |
| 1037 throw new core.ArgumentError("Parameter date is required."); |
| 1038 } |
| 1039 if (appendNumber == null) { |
| 1040 throw new core.ArgumentError("Parameter appendNumber is required."); |
| 1041 } |
| 1042 _queryParams["appendNumber"] = ["${appendNumber}"]; |
| 1043 if (type == null) { |
| 1044 throw new core.ArgumentError("Parameter type is required."); |
| 1045 } |
| 1046 _queryParams["type"] = [type]; |
| 1047 if (reset != null) { |
| 1048 _queryParams["reset"] = ["${reset}"]; |
| 1049 } |
| 1050 |
| 1051 _uploadMedia = uploadMedia; |
| 1052 _uploadOptions = uploadOptions; |
| 1053 |
| 1054 if (_uploadMedia == null) { |
| 1055 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$ac
countId') + '/webproperties/' + common_internal.Escaper.ecapeVariable('$webPrope
rtyId') + '/customDataSources/' + common_internal.Escaper.ecapeVariable('$custom
DataSourceId') + '/dailyUploads/' + common_internal.Escaper.ecapeVariable('$date
') + '/uploads'; |
| 1056 } else if (_uploadOptions is common.ResumableUploadOptions) { |
| 1057 _url = '/resumable/upload/analytics/v3/management/accounts/' + common_inte
rnal.Escaper.ecapeVariable('$accountId') + '/webproperties/' + common_internal.E
scaper.ecapeVariable('$webPropertyId') + '/customDataSources/' + common_internal
.Escaper.ecapeVariable('$customDataSourceId') + '/dailyUploads/' + common_intern
al.Escaper.ecapeVariable('$date') + '/uploads'; |
| 1058 } else { |
| 1059 _url = '/upload/analytics/v3/management/accounts/' + common_internal.Escap
er.ecapeVariable('$accountId') + '/webproperties/' + common_internal.Escaper.eca
peVariable('$webPropertyId') + '/customDataSources/' + common_internal.Escaper.e
capeVariable('$customDataSourceId') + '/dailyUploads/' + common_internal.Escaper
.ecapeVariable('$date') + '/uploads'; |
| 1060 } |
| 1061 |
| 1062 |
| 1063 var _response = _requester.request(_url, |
| 1064 "POST", |
| 1065 body: _body, |
| 1066 queryParams: _queryParams, |
| 1067 uploadOptions: _uploadOptions, |
| 1068 uploadMedia: _uploadMedia, |
| 1069 downloadOptions: _downloadOptions); |
| 1070 return _response.then((data) => new DailyUploadAppend.fromJson(data)); |
| 1071 } |
| 1072 |
| 1073 } |
| 1074 |
| 1075 |
| 1076 /** Not documented yet. */ |
| 1077 class ManagementExperimentsResourceApi { |
| 1078 final common_internal.ApiRequester _requester; |
| 1079 |
| 1080 ManagementExperimentsResourceApi(common_internal.ApiRequester client) : |
| 1081 _requester = client; |
| 1082 |
| 1083 /** |
| 1084 * Delete an experiment. |
| 1085 * |
| 1086 * Request parameters: |
| 1087 * |
| 1088 * [accountId] - Account ID to which the experiment belongs |
| 1089 * |
| 1090 * [webPropertyId] - Web property ID to which the experiment belongs |
| 1091 * |
| 1092 * [profileId] - View (Profile) ID to which the experiment belongs |
| 1093 * |
| 1094 * [experimentId] - ID of the experiment to delete |
| 1095 * |
| 1096 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1097 * error. |
| 1098 * |
| 1099 * If the used [http.Client] completes with an error when making a REST call, |
| 1100 * this method will complete with the same error. |
| 1101 */ |
| 1102 async.Future delete(core.String accountId, core.String webPropertyId, core.Str
ing profileId, core.String experimentId) { |
| 1103 var _url = null; |
| 1104 var _queryParams = new core.Map(); |
| 1105 var _uploadMedia = null; |
| 1106 var _uploadOptions = null; |
| 1107 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1108 var _body = null; |
| 1109 |
| 1110 if (accountId == null) { |
| 1111 throw new core.ArgumentError("Parameter accountId is required."); |
| 1112 } |
| 1113 if (webPropertyId == null) { |
| 1114 throw new core.ArgumentError("Parameter webPropertyId is required."); |
| 1115 } |
| 1116 if (profileId == null) { |
| 1117 throw new core.ArgumentError("Parameter profileId is required."); |
| 1118 } |
| 1119 if (experimentId == null) { |
| 1120 throw new core.ArgumentError("Parameter experimentId is required."); |
| 1121 } |
| 1122 |
| 1123 _downloadOptions = null; |
| 1124 |
| 1125 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/webproperties/' + common_internal.Escaper.ecapeVariable('$webPropert
yId') + '/profiles/' + common_internal.Escaper.ecapeVariable('$profileId') + '/e
xperiments/' + common_internal.Escaper.ecapeVariable('$experimentId'); |
| 1126 |
| 1127 var _response = _requester.request(_url, |
| 1128 "DELETE", |
| 1129 body: _body, |
| 1130 queryParams: _queryParams, |
| 1131 uploadOptions: _uploadOptions, |
| 1132 uploadMedia: _uploadMedia, |
| 1133 downloadOptions: _downloadOptions); |
| 1134 return _response.then((data) => null); |
| 1135 } |
| 1136 |
| 1137 /** |
| 1138 * Returns an experiment to which the user has access. |
| 1139 * |
| 1140 * Request parameters: |
| 1141 * |
| 1142 * [accountId] - Account ID to retrieve the experiment for. |
| 1143 * |
| 1144 * [webPropertyId] - Web property ID to retrieve the experiment for. |
| 1145 * |
| 1146 * [profileId] - View (Profile) ID to retrieve the experiment for. |
| 1147 * |
| 1148 * [experimentId] - Experiment ID to retrieve the experiment for. |
| 1149 * |
| 1150 * Completes with a [Experiment]. |
| 1151 * |
| 1152 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1153 * error. |
| 1154 * |
| 1155 * If the used [http.Client] completes with an error when making a REST call, |
| 1156 * this method will complete with the same error. |
| 1157 */ |
| 1158 async.Future<Experiment> get(core.String accountId, core.String webPropertyId,
core.String profileId, core.String experimentId) { |
| 1159 var _url = null; |
| 1160 var _queryParams = new core.Map(); |
| 1161 var _uploadMedia = null; |
| 1162 var _uploadOptions = null; |
| 1163 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1164 var _body = null; |
| 1165 |
| 1166 if (accountId == null) { |
| 1167 throw new core.ArgumentError("Parameter accountId is required."); |
| 1168 } |
| 1169 if (webPropertyId == null) { |
| 1170 throw new core.ArgumentError("Parameter webPropertyId is required."); |
| 1171 } |
| 1172 if (profileId == null) { |
| 1173 throw new core.ArgumentError("Parameter profileId is required."); |
| 1174 } |
| 1175 if (experimentId == null) { |
| 1176 throw new core.ArgumentError("Parameter experimentId is required."); |
| 1177 } |
| 1178 |
| 1179 |
| 1180 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/webproperties/' + common_internal.Escaper.ecapeVariable('$webPropert
yId') + '/profiles/' + common_internal.Escaper.ecapeVariable('$profileId') + '/e
xperiments/' + common_internal.Escaper.ecapeVariable('$experimentId'); |
| 1181 |
| 1182 var _response = _requester.request(_url, |
| 1183 "GET", |
| 1184 body: _body, |
| 1185 queryParams: _queryParams, |
| 1186 uploadOptions: _uploadOptions, |
| 1187 uploadMedia: _uploadMedia, |
| 1188 downloadOptions: _downloadOptions); |
| 1189 return _response.then((data) => new Experiment.fromJson(data)); |
| 1190 } |
| 1191 |
| 1192 /** |
| 1193 * Create a new experiment. |
| 1194 * |
| 1195 * [request] - The metadata request object. |
| 1196 * |
| 1197 * Request parameters: |
| 1198 * |
| 1199 * [accountId] - Account ID to create the experiment for. |
| 1200 * |
| 1201 * [webPropertyId] - Web property ID to create the experiment for. |
| 1202 * |
| 1203 * [profileId] - View (Profile) ID to create the experiment for. |
| 1204 * |
| 1205 * Completes with a [Experiment]. |
| 1206 * |
| 1207 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1208 * error. |
| 1209 * |
| 1210 * If the used [http.Client] completes with an error when making a REST call, |
| 1211 * this method will complete with the same error. |
| 1212 */ |
| 1213 async.Future<Experiment> insert(Experiment request, core.String accountId, cor
e.String webPropertyId, core.String profileId) { |
| 1214 var _url = null; |
| 1215 var _queryParams = new core.Map(); |
| 1216 var _uploadMedia = null; |
| 1217 var _uploadOptions = null; |
| 1218 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1219 var _body = null; |
| 1220 |
| 1221 if (request != null) { |
| 1222 _body = convert.JSON.encode((request).toJson()); |
| 1223 } |
| 1224 if (accountId == null) { |
| 1225 throw new core.ArgumentError("Parameter accountId is required."); |
| 1226 } |
| 1227 if (webPropertyId == null) { |
| 1228 throw new core.ArgumentError("Parameter webPropertyId is required."); |
| 1229 } |
| 1230 if (profileId == null) { |
| 1231 throw new core.ArgumentError("Parameter profileId is required."); |
| 1232 } |
| 1233 |
| 1234 |
| 1235 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/webproperties/' + common_internal.Escaper.ecapeVariable('$webPropert
yId') + '/profiles/' + common_internal.Escaper.ecapeVariable('$profileId') + '/e
xperiments'; |
| 1236 |
| 1237 var _response = _requester.request(_url, |
| 1238 "POST", |
| 1239 body: _body, |
| 1240 queryParams: _queryParams, |
| 1241 uploadOptions: _uploadOptions, |
| 1242 uploadMedia: _uploadMedia, |
| 1243 downloadOptions: _downloadOptions); |
| 1244 return _response.then((data) => new Experiment.fromJson(data)); |
| 1245 } |
| 1246 |
| 1247 /** |
| 1248 * Lists experiments to which the user has access. |
| 1249 * |
| 1250 * Request parameters: |
| 1251 * |
| 1252 * [accountId] - Account ID to retrieve experiments for. |
| 1253 * Value must have pattern "\d+". |
| 1254 * |
| 1255 * [webPropertyId] - Web property ID to retrieve experiments for. |
| 1256 * Value must have pattern "UA-(\d+)-(\d+)". |
| 1257 * |
| 1258 * [profileId] - View (Profile) ID to retrieve experiments for. |
| 1259 * Value must have pattern "\d+". |
| 1260 * |
| 1261 * [max_results] - The maximum number of experiments to include in this |
| 1262 * response. |
| 1263 * |
| 1264 * [start_index] - An index of the first experiment to retrieve. Use this |
| 1265 * parameter as a pagination mechanism along with the max-results parameter. |
| 1266 * |
| 1267 * Completes with a [Experiments]. |
| 1268 * |
| 1269 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1270 * error. |
| 1271 * |
| 1272 * If the used [http.Client] completes with an error when making a REST call, |
| 1273 * this method will complete with the same error. |
| 1274 */ |
| 1275 async.Future<Experiments> list(core.String accountId, core.String webPropertyI
d, core.String profileId, {core.int max_results, core.int start_index}) { |
| 1276 var _url = null; |
| 1277 var _queryParams = new core.Map(); |
| 1278 var _uploadMedia = null; |
| 1279 var _uploadOptions = null; |
| 1280 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1281 var _body = null; |
| 1282 |
| 1283 if (accountId == null) { |
| 1284 throw new core.ArgumentError("Parameter accountId is required."); |
| 1285 } |
| 1286 if (webPropertyId == null) { |
| 1287 throw new core.ArgumentError("Parameter webPropertyId is required."); |
| 1288 } |
| 1289 if (profileId == null) { |
| 1290 throw new core.ArgumentError("Parameter profileId is required."); |
| 1291 } |
| 1292 if (max_results != null) { |
| 1293 _queryParams["max-results"] = ["${max_results}"]; |
| 1294 } |
| 1295 if (start_index != null) { |
| 1296 _queryParams["start-index"] = ["${start_index}"]; |
| 1297 } |
| 1298 |
| 1299 |
| 1300 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/webproperties/' + common_internal.Escaper.ecapeVariable('$webPropert
yId') + '/profiles/' + common_internal.Escaper.ecapeVariable('$profileId') + '/e
xperiments'; |
| 1301 |
| 1302 var _response = _requester.request(_url, |
| 1303 "GET", |
| 1304 body: _body, |
| 1305 queryParams: _queryParams, |
| 1306 uploadOptions: _uploadOptions, |
| 1307 uploadMedia: _uploadMedia, |
| 1308 downloadOptions: _downloadOptions); |
| 1309 return _response.then((data) => new Experiments.fromJson(data)); |
| 1310 } |
| 1311 |
| 1312 /** |
| 1313 * Update an existing experiment. This method supports patch semantics. |
| 1314 * |
| 1315 * [request] - The metadata request object. |
| 1316 * |
| 1317 * Request parameters: |
| 1318 * |
| 1319 * [accountId] - Account ID of the experiment to update. |
| 1320 * |
| 1321 * [webPropertyId] - Web property ID of the experiment to update. |
| 1322 * |
| 1323 * [profileId] - View (Profile) ID of the experiment to update. |
| 1324 * |
| 1325 * [experimentId] - Experiment ID of the experiment to update. |
| 1326 * |
| 1327 * Completes with a [Experiment]. |
| 1328 * |
| 1329 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1330 * error. |
| 1331 * |
| 1332 * If the used [http.Client] completes with an error when making a REST call, |
| 1333 * this method will complete with the same error. |
| 1334 */ |
| 1335 async.Future<Experiment> patch(Experiment request, core.String accountId, core
.String webPropertyId, core.String profileId, core.String experimentId) { |
| 1336 var _url = null; |
| 1337 var _queryParams = new core.Map(); |
| 1338 var _uploadMedia = null; |
| 1339 var _uploadOptions = null; |
| 1340 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1341 var _body = null; |
| 1342 |
| 1343 if (request != null) { |
| 1344 _body = convert.JSON.encode((request).toJson()); |
| 1345 } |
| 1346 if (accountId == null) { |
| 1347 throw new core.ArgumentError("Parameter accountId is required."); |
| 1348 } |
| 1349 if (webPropertyId == null) { |
| 1350 throw new core.ArgumentError("Parameter webPropertyId is required."); |
| 1351 } |
| 1352 if (profileId == null) { |
| 1353 throw new core.ArgumentError("Parameter profileId is required."); |
| 1354 } |
| 1355 if (experimentId == null) { |
| 1356 throw new core.ArgumentError("Parameter experimentId is required."); |
| 1357 } |
| 1358 |
| 1359 |
| 1360 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/webproperties/' + common_internal.Escaper.ecapeVariable('$webPropert
yId') + '/profiles/' + common_internal.Escaper.ecapeVariable('$profileId') + '/e
xperiments/' + common_internal.Escaper.ecapeVariable('$experimentId'); |
| 1361 |
| 1362 var _response = _requester.request(_url, |
| 1363 "PATCH", |
| 1364 body: _body, |
| 1365 queryParams: _queryParams, |
| 1366 uploadOptions: _uploadOptions, |
| 1367 uploadMedia: _uploadMedia, |
| 1368 downloadOptions: _downloadOptions); |
| 1369 return _response.then((data) => new Experiment.fromJson(data)); |
| 1370 } |
| 1371 |
| 1372 /** |
| 1373 * Update an existing experiment. |
| 1374 * |
| 1375 * [request] - The metadata request object. |
| 1376 * |
| 1377 * Request parameters: |
| 1378 * |
| 1379 * [accountId] - Account ID of the experiment to update. |
| 1380 * |
| 1381 * [webPropertyId] - Web property ID of the experiment to update. |
| 1382 * |
| 1383 * [profileId] - View (Profile) ID of the experiment to update. |
| 1384 * |
| 1385 * [experimentId] - Experiment ID of the experiment to update. |
| 1386 * |
| 1387 * Completes with a [Experiment]. |
| 1388 * |
| 1389 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1390 * error. |
| 1391 * |
| 1392 * If the used [http.Client] completes with an error when making a REST call, |
| 1393 * this method will complete with the same error. |
| 1394 */ |
| 1395 async.Future<Experiment> update(Experiment request, core.String accountId, cor
e.String webPropertyId, core.String profileId, core.String experimentId) { |
| 1396 var _url = null; |
| 1397 var _queryParams = new core.Map(); |
| 1398 var _uploadMedia = null; |
| 1399 var _uploadOptions = null; |
| 1400 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1401 var _body = null; |
| 1402 |
| 1403 if (request != null) { |
| 1404 _body = convert.JSON.encode((request).toJson()); |
| 1405 } |
| 1406 if (accountId == null) { |
| 1407 throw new core.ArgumentError("Parameter accountId is required."); |
| 1408 } |
| 1409 if (webPropertyId == null) { |
| 1410 throw new core.ArgumentError("Parameter webPropertyId is required."); |
| 1411 } |
| 1412 if (profileId == null) { |
| 1413 throw new core.ArgumentError("Parameter profileId is required."); |
| 1414 } |
| 1415 if (experimentId == null) { |
| 1416 throw new core.ArgumentError("Parameter experimentId is required."); |
| 1417 } |
| 1418 |
| 1419 |
| 1420 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/webproperties/' + common_internal.Escaper.ecapeVariable('$webPropert
yId') + '/profiles/' + common_internal.Escaper.ecapeVariable('$profileId') + '/e
xperiments/' + common_internal.Escaper.ecapeVariable('$experimentId'); |
| 1421 |
| 1422 var _response = _requester.request(_url, |
| 1423 "PUT", |
| 1424 body: _body, |
| 1425 queryParams: _queryParams, |
| 1426 uploadOptions: _uploadOptions, |
| 1427 uploadMedia: _uploadMedia, |
| 1428 downloadOptions: _downloadOptions); |
| 1429 return _response.then((data) => new Experiment.fromJson(data)); |
| 1430 } |
| 1431 |
| 1432 } |
| 1433 |
| 1434 |
| 1435 /** Not documented yet. */ |
| 1436 class ManagementFiltersResourceApi { |
| 1437 final common_internal.ApiRequester _requester; |
| 1438 |
| 1439 ManagementFiltersResourceApi(common_internal.ApiRequester client) : |
| 1440 _requester = client; |
| 1441 |
| 1442 /** |
| 1443 * Delete a filter. |
| 1444 * |
| 1445 * Request parameters: |
| 1446 * |
| 1447 * [accountId] - Account ID to delete the filter for. |
| 1448 * |
| 1449 * [filterId] - ID of the filter to be deleted. |
| 1450 * |
| 1451 * Completes with a [Filter]. |
| 1452 * |
| 1453 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1454 * error. |
| 1455 * |
| 1456 * If the used [http.Client] completes with an error when making a REST call, |
| 1457 * this method will complete with the same error. |
| 1458 */ |
| 1459 async.Future<Filter> delete(core.String accountId, core.String filterId) { |
| 1460 var _url = null; |
| 1461 var _queryParams = new core.Map(); |
| 1462 var _uploadMedia = null; |
| 1463 var _uploadOptions = null; |
| 1464 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1465 var _body = null; |
| 1466 |
| 1467 if (accountId == null) { |
| 1468 throw new core.ArgumentError("Parameter accountId is required."); |
| 1469 } |
| 1470 if (filterId == null) { |
| 1471 throw new core.ArgumentError("Parameter filterId is required."); |
| 1472 } |
| 1473 |
| 1474 |
| 1475 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/filters/' + common_internal.Escaper.ecapeVariable('$filterId'); |
| 1476 |
| 1477 var _response = _requester.request(_url, |
| 1478 "DELETE", |
| 1479 body: _body, |
| 1480 queryParams: _queryParams, |
| 1481 uploadOptions: _uploadOptions, |
| 1482 uploadMedia: _uploadMedia, |
| 1483 downloadOptions: _downloadOptions); |
| 1484 return _response.then((data) => new Filter.fromJson(data)); |
| 1485 } |
| 1486 |
| 1487 /** |
| 1488 * Returns a filters to which the user has access. |
| 1489 * |
| 1490 * Request parameters: |
| 1491 * |
| 1492 * [accountId] - Account ID to retrieve filters for. |
| 1493 * |
| 1494 * [filterId] - Filter ID to retrieve filters for. |
| 1495 * |
| 1496 * Completes with a [Filter]. |
| 1497 * |
| 1498 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1499 * error. |
| 1500 * |
| 1501 * If the used [http.Client] completes with an error when making a REST call, |
| 1502 * this method will complete with the same error. |
| 1503 */ |
| 1504 async.Future<Filter> get(core.String accountId, core.String filterId) { |
| 1505 var _url = null; |
| 1506 var _queryParams = new core.Map(); |
| 1507 var _uploadMedia = null; |
| 1508 var _uploadOptions = null; |
| 1509 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1510 var _body = null; |
| 1511 |
| 1512 if (accountId == null) { |
| 1513 throw new core.ArgumentError("Parameter accountId is required."); |
| 1514 } |
| 1515 if (filterId == null) { |
| 1516 throw new core.ArgumentError("Parameter filterId is required."); |
| 1517 } |
| 1518 |
| 1519 |
| 1520 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/filters/' + common_internal.Escaper.ecapeVariable('$filterId'); |
| 1521 |
| 1522 var _response = _requester.request(_url, |
| 1523 "GET", |
| 1524 body: _body, |
| 1525 queryParams: _queryParams, |
| 1526 uploadOptions: _uploadOptions, |
| 1527 uploadMedia: _uploadMedia, |
| 1528 downloadOptions: _downloadOptions); |
| 1529 return _response.then((data) => new Filter.fromJson(data)); |
| 1530 } |
| 1531 |
| 1532 /** |
| 1533 * Create a new filter. |
| 1534 * |
| 1535 * [request] - The metadata request object. |
| 1536 * |
| 1537 * Request parameters: |
| 1538 * |
| 1539 * [accountId] - Account ID to create filter for. |
| 1540 * |
| 1541 * Completes with a [Filter]. |
| 1542 * |
| 1543 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1544 * error. |
| 1545 * |
| 1546 * If the used [http.Client] completes with an error when making a REST call, |
| 1547 * this method will complete with the same error. |
| 1548 */ |
| 1549 async.Future<Filter> insert(Filter request, core.String accountId) { |
| 1550 var _url = null; |
| 1551 var _queryParams = new core.Map(); |
| 1552 var _uploadMedia = null; |
| 1553 var _uploadOptions = null; |
| 1554 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1555 var _body = null; |
| 1556 |
| 1557 if (request != null) { |
| 1558 _body = convert.JSON.encode((request).toJson()); |
| 1559 } |
| 1560 if (accountId == null) { |
| 1561 throw new core.ArgumentError("Parameter accountId is required."); |
| 1562 } |
| 1563 |
| 1564 |
| 1565 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/filters'; |
| 1566 |
| 1567 var _response = _requester.request(_url, |
| 1568 "POST", |
| 1569 body: _body, |
| 1570 queryParams: _queryParams, |
| 1571 uploadOptions: _uploadOptions, |
| 1572 uploadMedia: _uploadMedia, |
| 1573 downloadOptions: _downloadOptions); |
| 1574 return _response.then((data) => new Filter.fromJson(data)); |
| 1575 } |
| 1576 |
| 1577 /** |
| 1578 * Lists all filters for an account |
| 1579 * |
| 1580 * Request parameters: |
| 1581 * |
| 1582 * [accountId] - Account ID to retrieve filters for. |
| 1583 * Value must have pattern "\d+". |
| 1584 * |
| 1585 * [max_results] - The maximum number of filters to include in this response. |
| 1586 * |
| 1587 * [start_index] - An index of the first entity to retrieve. Use this |
| 1588 * parameter as a pagination mechanism along with the max-results parameter. |
| 1589 * |
| 1590 * Completes with a [Filters]. |
| 1591 * |
| 1592 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1593 * error. |
| 1594 * |
| 1595 * If the used [http.Client] completes with an error when making a REST call, |
| 1596 * this method will complete with the same error. |
| 1597 */ |
| 1598 async.Future<Filters> list(core.String accountId, {core.int max_results, core.
int start_index}) { |
| 1599 var _url = null; |
| 1600 var _queryParams = new core.Map(); |
| 1601 var _uploadMedia = null; |
| 1602 var _uploadOptions = null; |
| 1603 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1604 var _body = null; |
| 1605 |
| 1606 if (accountId == null) { |
| 1607 throw new core.ArgumentError("Parameter accountId is required."); |
| 1608 } |
| 1609 if (max_results != null) { |
| 1610 _queryParams["max-results"] = ["${max_results}"]; |
| 1611 } |
| 1612 if (start_index != null) { |
| 1613 _queryParams["start-index"] = ["${start_index}"]; |
| 1614 } |
| 1615 |
| 1616 |
| 1617 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/filters'; |
| 1618 |
| 1619 var _response = _requester.request(_url, |
| 1620 "GET", |
| 1621 body: _body, |
| 1622 queryParams: _queryParams, |
| 1623 uploadOptions: _uploadOptions, |
| 1624 uploadMedia: _uploadMedia, |
| 1625 downloadOptions: _downloadOptions); |
| 1626 return _response.then((data) => new Filters.fromJson(data)); |
| 1627 } |
| 1628 |
| 1629 /** |
| 1630 * Updates an existing filter. This method supports patch semantics. |
| 1631 * |
| 1632 * [request] - The metadata request object. |
| 1633 * |
| 1634 * Request parameters: |
| 1635 * |
| 1636 * [accountId] - Account ID to which the filter belongs. |
| 1637 * |
| 1638 * [filterId] - ID of the filter to be updated. |
| 1639 * |
| 1640 * Completes with a [Filter]. |
| 1641 * |
| 1642 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1643 * error. |
| 1644 * |
| 1645 * If the used [http.Client] completes with an error when making a REST call, |
| 1646 * this method will complete with the same error. |
| 1647 */ |
| 1648 async.Future<Filter> patch(Filter request, core.String accountId, core.String
filterId) { |
| 1649 var _url = null; |
| 1650 var _queryParams = new core.Map(); |
| 1651 var _uploadMedia = null; |
| 1652 var _uploadOptions = null; |
| 1653 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1654 var _body = null; |
| 1655 |
| 1656 if (request != null) { |
| 1657 _body = convert.JSON.encode((request).toJson()); |
| 1658 } |
| 1659 if (accountId == null) { |
| 1660 throw new core.ArgumentError("Parameter accountId is required."); |
| 1661 } |
| 1662 if (filterId == null) { |
| 1663 throw new core.ArgumentError("Parameter filterId is required."); |
| 1664 } |
| 1665 |
| 1666 |
| 1667 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/filters/' + common_internal.Escaper.ecapeVariable('$filterId'); |
| 1668 |
| 1669 var _response = _requester.request(_url, |
| 1670 "PATCH", |
| 1671 body: _body, |
| 1672 queryParams: _queryParams, |
| 1673 uploadOptions: _uploadOptions, |
| 1674 uploadMedia: _uploadMedia, |
| 1675 downloadOptions: _downloadOptions); |
| 1676 return _response.then((data) => new Filter.fromJson(data)); |
| 1677 } |
| 1678 |
| 1679 /** |
| 1680 * Updates an existing filter. |
| 1681 * |
| 1682 * [request] - The metadata request object. |
| 1683 * |
| 1684 * Request parameters: |
| 1685 * |
| 1686 * [accountId] - Account ID to which the filter belongs. |
| 1687 * |
| 1688 * [filterId] - ID of the filter to be updated. |
| 1689 * |
| 1690 * Completes with a [Filter]. |
| 1691 * |
| 1692 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1693 * error. |
| 1694 * |
| 1695 * If the used [http.Client] completes with an error when making a REST call, |
| 1696 * this method will complete with the same error. |
| 1697 */ |
| 1698 async.Future<Filter> update(Filter request, core.String accountId, core.String
filterId) { |
| 1699 var _url = null; |
| 1700 var _queryParams = new core.Map(); |
| 1701 var _uploadMedia = null; |
| 1702 var _uploadOptions = null; |
| 1703 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1704 var _body = null; |
| 1705 |
| 1706 if (request != null) { |
| 1707 _body = convert.JSON.encode((request).toJson()); |
| 1708 } |
| 1709 if (accountId == null) { |
| 1710 throw new core.ArgumentError("Parameter accountId is required."); |
| 1711 } |
| 1712 if (filterId == null) { |
| 1713 throw new core.ArgumentError("Parameter filterId is required."); |
| 1714 } |
| 1715 |
| 1716 |
| 1717 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/filters/' + common_internal.Escaper.ecapeVariable('$filterId'); |
| 1718 |
| 1719 var _response = _requester.request(_url, |
| 1720 "PUT", |
| 1721 body: _body, |
| 1722 queryParams: _queryParams, |
| 1723 uploadOptions: _uploadOptions, |
| 1724 uploadMedia: _uploadMedia, |
| 1725 downloadOptions: _downloadOptions); |
| 1726 return _response.then((data) => new Filter.fromJson(data)); |
| 1727 } |
| 1728 |
| 1729 } |
| 1730 |
| 1731 |
| 1732 /** Not documented yet. */ |
| 1733 class ManagementGoalsResourceApi { |
| 1734 final common_internal.ApiRequester _requester; |
| 1735 |
| 1736 ManagementGoalsResourceApi(common_internal.ApiRequester client) : |
| 1737 _requester = client; |
| 1738 |
| 1739 /** |
| 1740 * Gets a goal to which the user has access. |
| 1741 * |
| 1742 * Request parameters: |
| 1743 * |
| 1744 * [accountId] - Account ID to retrieve the goal for. |
| 1745 * |
| 1746 * [webPropertyId] - Web property ID to retrieve the goal for. |
| 1747 * |
| 1748 * [profileId] - View (Profile) ID to retrieve the goal for. |
| 1749 * |
| 1750 * [goalId] - Goal ID to retrieve the goal for. |
| 1751 * |
| 1752 * Completes with a [Goal]. |
| 1753 * |
| 1754 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1755 * error. |
| 1756 * |
| 1757 * If the used [http.Client] completes with an error when making a REST call, |
| 1758 * this method will complete with the same error. |
| 1759 */ |
| 1760 async.Future<Goal> get(core.String accountId, core.String webPropertyId, core.
String profileId, core.String goalId) { |
| 1761 var _url = null; |
| 1762 var _queryParams = new core.Map(); |
| 1763 var _uploadMedia = null; |
| 1764 var _uploadOptions = null; |
| 1765 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1766 var _body = null; |
| 1767 |
| 1768 if (accountId == null) { |
| 1769 throw new core.ArgumentError("Parameter accountId is required."); |
| 1770 } |
| 1771 if (webPropertyId == null) { |
| 1772 throw new core.ArgumentError("Parameter webPropertyId is required."); |
| 1773 } |
| 1774 if (profileId == null) { |
| 1775 throw new core.ArgumentError("Parameter profileId is required."); |
| 1776 } |
| 1777 if (goalId == null) { |
| 1778 throw new core.ArgumentError("Parameter goalId is required."); |
| 1779 } |
| 1780 |
| 1781 |
| 1782 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/webproperties/' + common_internal.Escaper.ecapeVariable('$webPropert
yId') + '/profiles/' + common_internal.Escaper.ecapeVariable('$profileId') + '/g
oals/' + common_internal.Escaper.ecapeVariable('$goalId'); |
| 1783 |
| 1784 var _response = _requester.request(_url, |
| 1785 "GET", |
| 1786 body: _body, |
| 1787 queryParams: _queryParams, |
| 1788 uploadOptions: _uploadOptions, |
| 1789 uploadMedia: _uploadMedia, |
| 1790 downloadOptions: _downloadOptions); |
| 1791 return _response.then((data) => new Goal.fromJson(data)); |
| 1792 } |
| 1793 |
| 1794 /** |
| 1795 * Create a new goal. |
| 1796 * |
| 1797 * [request] - The metadata request object. |
| 1798 * |
| 1799 * Request parameters: |
| 1800 * |
| 1801 * [accountId] - Account ID to create the goal for. |
| 1802 * |
| 1803 * [webPropertyId] - Web property ID to create the goal for. |
| 1804 * |
| 1805 * [profileId] - View (Profile) ID to create the goal for. |
| 1806 * |
| 1807 * Completes with a [Goal]. |
| 1808 * |
| 1809 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1810 * error. |
| 1811 * |
| 1812 * If the used [http.Client] completes with an error when making a REST call, |
| 1813 * this method will complete with the same error. |
| 1814 */ |
| 1815 async.Future<Goal> insert(Goal request, core.String accountId, core.String web
PropertyId, core.String profileId) { |
| 1816 var _url = null; |
| 1817 var _queryParams = new core.Map(); |
| 1818 var _uploadMedia = null; |
| 1819 var _uploadOptions = null; |
| 1820 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1821 var _body = null; |
| 1822 |
| 1823 if (request != null) { |
| 1824 _body = convert.JSON.encode((request).toJson()); |
| 1825 } |
| 1826 if (accountId == null) { |
| 1827 throw new core.ArgumentError("Parameter accountId is required."); |
| 1828 } |
| 1829 if (webPropertyId == null) { |
| 1830 throw new core.ArgumentError("Parameter webPropertyId is required."); |
| 1831 } |
| 1832 if (profileId == null) { |
| 1833 throw new core.ArgumentError("Parameter profileId is required."); |
| 1834 } |
| 1835 |
| 1836 |
| 1837 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/webproperties/' + common_internal.Escaper.ecapeVariable('$webPropert
yId') + '/profiles/' + common_internal.Escaper.ecapeVariable('$profileId') + '/g
oals'; |
| 1838 |
| 1839 var _response = _requester.request(_url, |
| 1840 "POST", |
| 1841 body: _body, |
| 1842 queryParams: _queryParams, |
| 1843 uploadOptions: _uploadOptions, |
| 1844 uploadMedia: _uploadMedia, |
| 1845 downloadOptions: _downloadOptions); |
| 1846 return _response.then((data) => new Goal.fromJson(data)); |
| 1847 } |
| 1848 |
| 1849 /** |
| 1850 * Lists goals to which the user has access. |
| 1851 * |
| 1852 * Request parameters: |
| 1853 * |
| 1854 * [accountId] - Account ID to retrieve goals for. Can either be a specific |
| 1855 * account ID or '~all', which refers to all the accounts that user has access |
| 1856 * to. |
| 1857 * |
| 1858 * [webPropertyId] - Web property ID to retrieve goals for. Can either be a |
| 1859 * specific web property ID or '~all', which refers to all the web properties |
| 1860 * that user has access to. |
| 1861 * |
| 1862 * [profileId] - View (Profile) ID to retrieve goals for. Can either be a |
| 1863 * specific view (profile) ID or '~all', which refers to all the views |
| 1864 * (profiles) that user has access to. |
| 1865 * |
| 1866 * [max_results] - The maximum number of goals to include in this response. |
| 1867 * |
| 1868 * [start_index] - An index of the first goal to retrieve. Use this parameter |
| 1869 * as a pagination mechanism along with the max-results parameter. |
| 1870 * |
| 1871 * Completes with a [Goals]. |
| 1872 * |
| 1873 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1874 * error. |
| 1875 * |
| 1876 * If the used [http.Client] completes with an error when making a REST call, |
| 1877 * this method will complete with the same error. |
| 1878 */ |
| 1879 async.Future<Goals> list(core.String accountId, core.String webPropertyId, cor
e.String profileId, {core.int max_results, core.int start_index}) { |
| 1880 var _url = null; |
| 1881 var _queryParams = new core.Map(); |
| 1882 var _uploadMedia = null; |
| 1883 var _uploadOptions = null; |
| 1884 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1885 var _body = null; |
| 1886 |
| 1887 if (accountId == null) { |
| 1888 throw new core.ArgumentError("Parameter accountId is required."); |
| 1889 } |
| 1890 if (webPropertyId == null) { |
| 1891 throw new core.ArgumentError("Parameter webPropertyId is required."); |
| 1892 } |
| 1893 if (profileId == null) { |
| 1894 throw new core.ArgumentError("Parameter profileId is required."); |
| 1895 } |
| 1896 if (max_results != null) { |
| 1897 _queryParams["max-results"] = ["${max_results}"]; |
| 1898 } |
| 1899 if (start_index != null) { |
| 1900 _queryParams["start-index"] = ["${start_index}"]; |
| 1901 } |
| 1902 |
| 1903 |
| 1904 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/webproperties/' + common_internal.Escaper.ecapeVariable('$webPropert
yId') + '/profiles/' + common_internal.Escaper.ecapeVariable('$profileId') + '/g
oals'; |
| 1905 |
| 1906 var _response = _requester.request(_url, |
| 1907 "GET", |
| 1908 body: _body, |
| 1909 queryParams: _queryParams, |
| 1910 uploadOptions: _uploadOptions, |
| 1911 uploadMedia: _uploadMedia, |
| 1912 downloadOptions: _downloadOptions); |
| 1913 return _response.then((data) => new Goals.fromJson(data)); |
| 1914 } |
| 1915 |
| 1916 /** |
| 1917 * Updates an existing view (profile). This method supports patch semantics. |
| 1918 * |
| 1919 * [request] - The metadata request object. |
| 1920 * |
| 1921 * Request parameters: |
| 1922 * |
| 1923 * [accountId] - Account ID to update the goal. |
| 1924 * |
| 1925 * [webPropertyId] - Web property ID to update the goal. |
| 1926 * |
| 1927 * [profileId] - View (Profile) ID to update the goal. |
| 1928 * |
| 1929 * [goalId] - Index of the goal to be updated. |
| 1930 * |
| 1931 * Completes with a [Goal]. |
| 1932 * |
| 1933 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1934 * error. |
| 1935 * |
| 1936 * If the used [http.Client] completes with an error when making a REST call, |
| 1937 * this method will complete with the same error. |
| 1938 */ |
| 1939 async.Future<Goal> patch(Goal request, core.String accountId, core.String webP
ropertyId, core.String profileId, core.String goalId) { |
| 1940 var _url = null; |
| 1941 var _queryParams = new core.Map(); |
| 1942 var _uploadMedia = null; |
| 1943 var _uploadOptions = null; |
| 1944 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1945 var _body = null; |
| 1946 |
| 1947 if (request != null) { |
| 1948 _body = convert.JSON.encode((request).toJson()); |
| 1949 } |
| 1950 if (accountId == null) { |
| 1951 throw new core.ArgumentError("Parameter accountId is required."); |
| 1952 } |
| 1953 if (webPropertyId == null) { |
| 1954 throw new core.ArgumentError("Parameter webPropertyId is required."); |
| 1955 } |
| 1956 if (profileId == null) { |
| 1957 throw new core.ArgumentError("Parameter profileId is required."); |
| 1958 } |
| 1959 if (goalId == null) { |
| 1960 throw new core.ArgumentError("Parameter goalId is required."); |
| 1961 } |
| 1962 |
| 1963 |
| 1964 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/webproperties/' + common_internal.Escaper.ecapeVariable('$webPropert
yId') + '/profiles/' + common_internal.Escaper.ecapeVariable('$profileId') + '/g
oals/' + common_internal.Escaper.ecapeVariable('$goalId'); |
| 1965 |
| 1966 var _response = _requester.request(_url, |
| 1967 "PATCH", |
| 1968 body: _body, |
| 1969 queryParams: _queryParams, |
| 1970 uploadOptions: _uploadOptions, |
| 1971 uploadMedia: _uploadMedia, |
| 1972 downloadOptions: _downloadOptions); |
| 1973 return _response.then((data) => new Goal.fromJson(data)); |
| 1974 } |
| 1975 |
| 1976 /** |
| 1977 * Updates an existing view (profile). |
| 1978 * |
| 1979 * [request] - The metadata request object. |
| 1980 * |
| 1981 * Request parameters: |
| 1982 * |
| 1983 * [accountId] - Account ID to update the goal. |
| 1984 * |
| 1985 * [webPropertyId] - Web property ID to update the goal. |
| 1986 * |
| 1987 * [profileId] - View (Profile) ID to update the goal. |
| 1988 * |
| 1989 * [goalId] - Index of the goal to be updated. |
| 1990 * |
| 1991 * Completes with a [Goal]. |
| 1992 * |
| 1993 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1994 * error. |
| 1995 * |
| 1996 * If the used [http.Client] completes with an error when making a REST call, |
| 1997 * this method will complete with the same error. |
| 1998 */ |
| 1999 async.Future<Goal> update(Goal request, core.String accountId, core.String web
PropertyId, core.String profileId, core.String goalId) { |
| 2000 var _url = null; |
| 2001 var _queryParams = new core.Map(); |
| 2002 var _uploadMedia = null; |
| 2003 var _uploadOptions = null; |
| 2004 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2005 var _body = null; |
| 2006 |
| 2007 if (request != null) { |
| 2008 _body = convert.JSON.encode((request).toJson()); |
| 2009 } |
| 2010 if (accountId == null) { |
| 2011 throw new core.ArgumentError("Parameter accountId is required."); |
| 2012 } |
| 2013 if (webPropertyId == null) { |
| 2014 throw new core.ArgumentError("Parameter webPropertyId is required."); |
| 2015 } |
| 2016 if (profileId == null) { |
| 2017 throw new core.ArgumentError("Parameter profileId is required."); |
| 2018 } |
| 2019 if (goalId == null) { |
| 2020 throw new core.ArgumentError("Parameter goalId is required."); |
| 2021 } |
| 2022 |
| 2023 |
| 2024 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/webproperties/' + common_internal.Escaper.ecapeVariable('$webPropert
yId') + '/profiles/' + common_internal.Escaper.ecapeVariable('$profileId') + '/g
oals/' + common_internal.Escaper.ecapeVariable('$goalId'); |
| 2025 |
| 2026 var _response = _requester.request(_url, |
| 2027 "PUT", |
| 2028 body: _body, |
| 2029 queryParams: _queryParams, |
| 2030 uploadOptions: _uploadOptions, |
| 2031 uploadMedia: _uploadMedia, |
| 2032 downloadOptions: _downloadOptions); |
| 2033 return _response.then((data) => new Goal.fromJson(data)); |
| 2034 } |
| 2035 |
| 2036 } |
| 2037 |
| 2038 |
| 2039 /** Not documented yet. */ |
| 2040 class ManagementProfileFilterLinksResourceApi { |
| 2041 final common_internal.ApiRequester _requester; |
| 2042 |
| 2043 ManagementProfileFilterLinksResourceApi(common_internal.ApiRequester client) :
|
| 2044 _requester = client; |
| 2045 |
| 2046 /** |
| 2047 * Delete a profile filter link. |
| 2048 * |
| 2049 * Request parameters: |
| 2050 * |
| 2051 * [accountId] - Account ID to which the profile filter link belongs. |
| 2052 * Value must have pattern "\d+". |
| 2053 * |
| 2054 * [webPropertyId] - Web property Id to which the profile filter link belongs. |
| 2055 * Value must have pattern "UA-(\d+)-(\d+)". |
| 2056 * |
| 2057 * [profileId] - Profile ID to which the filter link belongs. |
| 2058 * Value must have pattern "\d+". |
| 2059 * |
| 2060 * [linkId] - ID of the profile filter link to delete. |
| 2061 * Value must have pattern "\d+:\d+". |
| 2062 * |
| 2063 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2064 * error. |
| 2065 * |
| 2066 * If the used [http.Client] completes with an error when making a REST call, |
| 2067 * this method will complete with the same error. |
| 2068 */ |
| 2069 async.Future delete(core.String accountId, core.String webPropertyId, core.Str
ing profileId, core.String linkId) { |
| 2070 var _url = null; |
| 2071 var _queryParams = new core.Map(); |
| 2072 var _uploadMedia = null; |
| 2073 var _uploadOptions = null; |
| 2074 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2075 var _body = null; |
| 2076 |
| 2077 if (accountId == null) { |
| 2078 throw new core.ArgumentError("Parameter accountId is required."); |
| 2079 } |
| 2080 if (webPropertyId == null) { |
| 2081 throw new core.ArgumentError("Parameter webPropertyId is required."); |
| 2082 } |
| 2083 if (profileId == null) { |
| 2084 throw new core.ArgumentError("Parameter profileId is required."); |
| 2085 } |
| 2086 if (linkId == null) { |
| 2087 throw new core.ArgumentError("Parameter linkId is required."); |
| 2088 } |
| 2089 |
| 2090 _downloadOptions = null; |
| 2091 |
| 2092 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/webproperties/' + common_internal.Escaper.ecapeVariable('$webPropert
yId') + '/profiles/' + common_internal.Escaper.ecapeVariable('$profileId') + '/p
rofileFilterLinks/' + common_internal.Escaper.ecapeVariable('$linkId'); |
| 2093 |
| 2094 var _response = _requester.request(_url, |
| 2095 "DELETE", |
| 2096 body: _body, |
| 2097 queryParams: _queryParams, |
| 2098 uploadOptions: _uploadOptions, |
| 2099 uploadMedia: _uploadMedia, |
| 2100 downloadOptions: _downloadOptions); |
| 2101 return _response.then((data) => null); |
| 2102 } |
| 2103 |
| 2104 /** |
| 2105 * Returns a single profile filter link. |
| 2106 * |
| 2107 * Request parameters: |
| 2108 * |
| 2109 * [accountId] - Account ID to retrieve profile filter link for. |
| 2110 * Value must have pattern "\d+". |
| 2111 * |
| 2112 * [webPropertyId] - Web property Id to retrieve profile filter link for. |
| 2113 * Value must have pattern "UA-(\d+)-(\d+)". |
| 2114 * |
| 2115 * [profileId] - Profile ID to retrieve filter link for. |
| 2116 * Value must have pattern "\d+". |
| 2117 * |
| 2118 * [linkId] - ID of the profile filter link. |
| 2119 * Value must have pattern "\d+:\d+". |
| 2120 * |
| 2121 * Completes with a [ProfileFilterLink]. |
| 2122 * |
| 2123 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2124 * error. |
| 2125 * |
| 2126 * If the used [http.Client] completes with an error when making a REST call, |
| 2127 * this method will complete with the same error. |
| 2128 */ |
| 2129 async.Future<ProfileFilterLink> get(core.String accountId, core.String webProp
ertyId, core.String profileId, core.String linkId) { |
| 2130 var _url = null; |
| 2131 var _queryParams = new core.Map(); |
| 2132 var _uploadMedia = null; |
| 2133 var _uploadOptions = null; |
| 2134 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2135 var _body = null; |
| 2136 |
| 2137 if (accountId == null) { |
| 2138 throw new core.ArgumentError("Parameter accountId is required."); |
| 2139 } |
| 2140 if (webPropertyId == null) { |
| 2141 throw new core.ArgumentError("Parameter webPropertyId is required."); |
| 2142 } |
| 2143 if (profileId == null) { |
| 2144 throw new core.ArgumentError("Parameter profileId is required."); |
| 2145 } |
| 2146 if (linkId == null) { |
| 2147 throw new core.ArgumentError("Parameter linkId is required."); |
| 2148 } |
| 2149 |
| 2150 |
| 2151 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/webproperties/' + common_internal.Escaper.ecapeVariable('$webPropert
yId') + '/profiles/' + common_internal.Escaper.ecapeVariable('$profileId') + '/p
rofileFilterLinks/' + common_internal.Escaper.ecapeVariable('$linkId'); |
| 2152 |
| 2153 var _response = _requester.request(_url, |
| 2154 "GET", |
| 2155 body: _body, |
| 2156 queryParams: _queryParams, |
| 2157 uploadOptions: _uploadOptions, |
| 2158 uploadMedia: _uploadMedia, |
| 2159 downloadOptions: _downloadOptions); |
| 2160 return _response.then((data) => new ProfileFilterLink.fromJson(data)); |
| 2161 } |
| 2162 |
| 2163 /** |
| 2164 * Create a new profile filter link. |
| 2165 * |
| 2166 * [request] - The metadata request object. |
| 2167 * |
| 2168 * Request parameters: |
| 2169 * |
| 2170 * [accountId] - Account ID to create profile filter link for. |
| 2171 * Value must have pattern "\d+". |
| 2172 * |
| 2173 * [webPropertyId] - Web property Id to create profile filter link for. |
| 2174 * Value must have pattern "UA-(\d+)-(\d+)". |
| 2175 * |
| 2176 * [profileId] - Profile ID to create filter link for. |
| 2177 * Value must have pattern "\d+". |
| 2178 * |
| 2179 * Completes with a [ProfileFilterLink]. |
| 2180 * |
| 2181 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2182 * error. |
| 2183 * |
| 2184 * If the used [http.Client] completes with an error when making a REST call, |
| 2185 * this method will complete with the same error. |
| 2186 */ |
| 2187 async.Future<ProfileFilterLink> insert(ProfileFilterLink request, core.String
accountId, core.String webPropertyId, core.String profileId) { |
| 2188 var _url = null; |
| 2189 var _queryParams = new core.Map(); |
| 2190 var _uploadMedia = null; |
| 2191 var _uploadOptions = null; |
| 2192 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2193 var _body = null; |
| 2194 |
| 2195 if (request != null) { |
| 2196 _body = convert.JSON.encode((request).toJson()); |
| 2197 } |
| 2198 if (accountId == null) { |
| 2199 throw new core.ArgumentError("Parameter accountId is required."); |
| 2200 } |
| 2201 if (webPropertyId == null) { |
| 2202 throw new core.ArgumentError("Parameter webPropertyId is required."); |
| 2203 } |
| 2204 if (profileId == null) { |
| 2205 throw new core.ArgumentError("Parameter profileId is required."); |
| 2206 } |
| 2207 |
| 2208 |
| 2209 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/webproperties/' + common_internal.Escaper.ecapeVariable('$webPropert
yId') + '/profiles/' + common_internal.Escaper.ecapeVariable('$profileId') + '/p
rofileFilterLinks'; |
| 2210 |
| 2211 var _response = _requester.request(_url, |
| 2212 "POST", |
| 2213 body: _body, |
| 2214 queryParams: _queryParams, |
| 2215 uploadOptions: _uploadOptions, |
| 2216 uploadMedia: _uploadMedia, |
| 2217 downloadOptions: _downloadOptions); |
| 2218 return _response.then((data) => new ProfileFilterLink.fromJson(data)); |
| 2219 } |
| 2220 |
| 2221 /** |
| 2222 * Lists all profile filter links for a profile. |
| 2223 * |
| 2224 * Request parameters: |
| 2225 * |
| 2226 * [accountId] - Account ID to retrieve profile filter links for. |
| 2227 * Value must have pattern "\d+". |
| 2228 * |
| 2229 * [webPropertyId] - Web property Id for profile filter links for. Can either |
| 2230 * be a specific web property ID or '~all', which refers to all the web |
| 2231 * properties that user has access to. |
| 2232 * |
| 2233 * [profileId] - Profile ID to retrieve filter links for. Can either be a |
| 2234 * specific profile ID or '~all', which refers to all the profiles that user |
| 2235 * has access to. |
| 2236 * |
| 2237 * [max_results] - The maximum number of profile filter links to include in |
| 2238 * this response. |
| 2239 * |
| 2240 * [start_index] - An index of the first entity to retrieve. Use this |
| 2241 * parameter as a pagination mechanism along with the max-results parameter. |
| 2242 * |
| 2243 * Completes with a [ProfileFilterLinks]. |
| 2244 * |
| 2245 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2246 * error. |
| 2247 * |
| 2248 * If the used [http.Client] completes with an error when making a REST call, |
| 2249 * this method will complete with the same error. |
| 2250 */ |
| 2251 async.Future<ProfileFilterLinks> list(core.String accountId, core.String webPr
opertyId, core.String profileId, {core.int max_results, core.int start_index}) { |
| 2252 var _url = null; |
| 2253 var _queryParams = new core.Map(); |
| 2254 var _uploadMedia = null; |
| 2255 var _uploadOptions = null; |
| 2256 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2257 var _body = null; |
| 2258 |
| 2259 if (accountId == null) { |
| 2260 throw new core.ArgumentError("Parameter accountId is required."); |
| 2261 } |
| 2262 if (webPropertyId == null) { |
| 2263 throw new core.ArgumentError("Parameter webPropertyId is required."); |
| 2264 } |
| 2265 if (profileId == null) { |
| 2266 throw new core.ArgumentError("Parameter profileId is required."); |
| 2267 } |
| 2268 if (max_results != null) { |
| 2269 _queryParams["max-results"] = ["${max_results}"]; |
| 2270 } |
| 2271 if (start_index != null) { |
| 2272 _queryParams["start-index"] = ["${start_index}"]; |
| 2273 } |
| 2274 |
| 2275 |
| 2276 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/webproperties/' + common_internal.Escaper.ecapeVariable('$webPropert
yId') + '/profiles/' + common_internal.Escaper.ecapeVariable('$profileId') + '/p
rofileFilterLinks'; |
| 2277 |
| 2278 var _response = _requester.request(_url, |
| 2279 "GET", |
| 2280 body: _body, |
| 2281 queryParams: _queryParams, |
| 2282 uploadOptions: _uploadOptions, |
| 2283 uploadMedia: _uploadMedia, |
| 2284 downloadOptions: _downloadOptions); |
| 2285 return _response.then((data) => new ProfileFilterLinks.fromJson(data)); |
| 2286 } |
| 2287 |
| 2288 /** |
| 2289 * Update an existing profile filter link. This method supports patch |
| 2290 * semantics. |
| 2291 * |
| 2292 * [request] - The metadata request object. |
| 2293 * |
| 2294 * Request parameters: |
| 2295 * |
| 2296 * [accountId] - Account ID to which profile filter link belongs. |
| 2297 * Value must have pattern "\d+". |
| 2298 * |
| 2299 * [webPropertyId] - Web property Id to which profile filter link belongs |
| 2300 * Value must have pattern "UA-(\d+)-(\d+)". |
| 2301 * |
| 2302 * [profileId] - Profile ID to which filter link belongs |
| 2303 * Value must have pattern "\d+". |
| 2304 * |
| 2305 * [linkId] - ID of the profile filter link to be updated. |
| 2306 * Value must have pattern "\d+:\d+". |
| 2307 * |
| 2308 * Completes with a [ProfileFilterLink]. |
| 2309 * |
| 2310 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2311 * error. |
| 2312 * |
| 2313 * If the used [http.Client] completes with an error when making a REST call, |
| 2314 * this method will complete with the same error. |
| 2315 */ |
| 2316 async.Future<ProfileFilterLink> patch(ProfileFilterLink request, core.String a
ccountId, core.String webPropertyId, core.String profileId, core.String linkId)
{ |
| 2317 var _url = null; |
| 2318 var _queryParams = new core.Map(); |
| 2319 var _uploadMedia = null; |
| 2320 var _uploadOptions = null; |
| 2321 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2322 var _body = null; |
| 2323 |
| 2324 if (request != null) { |
| 2325 _body = convert.JSON.encode((request).toJson()); |
| 2326 } |
| 2327 if (accountId == null) { |
| 2328 throw new core.ArgumentError("Parameter accountId is required."); |
| 2329 } |
| 2330 if (webPropertyId == null) { |
| 2331 throw new core.ArgumentError("Parameter webPropertyId is required."); |
| 2332 } |
| 2333 if (profileId == null) { |
| 2334 throw new core.ArgumentError("Parameter profileId is required."); |
| 2335 } |
| 2336 if (linkId == null) { |
| 2337 throw new core.ArgumentError("Parameter linkId is required."); |
| 2338 } |
| 2339 |
| 2340 |
| 2341 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/webproperties/' + common_internal.Escaper.ecapeVariable('$webPropert
yId') + '/profiles/' + common_internal.Escaper.ecapeVariable('$profileId') + '/p
rofileFilterLinks/' + common_internal.Escaper.ecapeVariable('$linkId'); |
| 2342 |
| 2343 var _response = _requester.request(_url, |
| 2344 "PATCH", |
| 2345 body: _body, |
| 2346 queryParams: _queryParams, |
| 2347 uploadOptions: _uploadOptions, |
| 2348 uploadMedia: _uploadMedia, |
| 2349 downloadOptions: _downloadOptions); |
| 2350 return _response.then((data) => new ProfileFilterLink.fromJson(data)); |
| 2351 } |
| 2352 |
| 2353 /** |
| 2354 * Update an existing profile filter link. |
| 2355 * |
| 2356 * [request] - The metadata request object. |
| 2357 * |
| 2358 * Request parameters: |
| 2359 * |
| 2360 * [accountId] - Account ID to which profile filter link belongs. |
| 2361 * Value must have pattern "\d+". |
| 2362 * |
| 2363 * [webPropertyId] - Web property Id to which profile filter link belongs |
| 2364 * Value must have pattern "UA-(\d+)-(\d+)". |
| 2365 * |
| 2366 * [profileId] - Profile ID to which filter link belongs |
| 2367 * Value must have pattern "\d+". |
| 2368 * |
| 2369 * [linkId] - ID of the profile filter link to be updated. |
| 2370 * Value must have pattern "\d+:\d+". |
| 2371 * |
| 2372 * Completes with a [ProfileFilterLink]. |
| 2373 * |
| 2374 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2375 * error. |
| 2376 * |
| 2377 * If the used [http.Client] completes with an error when making a REST call, |
| 2378 * this method will complete with the same error. |
| 2379 */ |
| 2380 async.Future<ProfileFilterLink> update(ProfileFilterLink request, core.String
accountId, core.String webPropertyId, core.String profileId, core.String linkId)
{ |
| 2381 var _url = null; |
| 2382 var _queryParams = new core.Map(); |
| 2383 var _uploadMedia = null; |
| 2384 var _uploadOptions = null; |
| 2385 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2386 var _body = null; |
| 2387 |
| 2388 if (request != null) { |
| 2389 _body = convert.JSON.encode((request).toJson()); |
| 2390 } |
| 2391 if (accountId == null) { |
| 2392 throw new core.ArgumentError("Parameter accountId is required."); |
| 2393 } |
| 2394 if (webPropertyId == null) { |
| 2395 throw new core.ArgumentError("Parameter webPropertyId is required."); |
| 2396 } |
| 2397 if (profileId == null) { |
| 2398 throw new core.ArgumentError("Parameter profileId is required."); |
| 2399 } |
| 2400 if (linkId == null) { |
| 2401 throw new core.ArgumentError("Parameter linkId is required."); |
| 2402 } |
| 2403 |
| 2404 |
| 2405 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/webproperties/' + common_internal.Escaper.ecapeVariable('$webPropert
yId') + '/profiles/' + common_internal.Escaper.ecapeVariable('$profileId') + '/p
rofileFilterLinks/' + common_internal.Escaper.ecapeVariable('$linkId'); |
| 2406 |
| 2407 var _response = _requester.request(_url, |
| 2408 "PUT", |
| 2409 body: _body, |
| 2410 queryParams: _queryParams, |
| 2411 uploadOptions: _uploadOptions, |
| 2412 uploadMedia: _uploadMedia, |
| 2413 downloadOptions: _downloadOptions); |
| 2414 return _response.then((data) => new ProfileFilterLink.fromJson(data)); |
| 2415 } |
| 2416 |
| 2417 } |
| 2418 |
| 2419 |
| 2420 /** Not documented yet. */ |
| 2421 class ManagementProfileUserLinksResourceApi { |
| 2422 final common_internal.ApiRequester _requester; |
| 2423 |
| 2424 ManagementProfileUserLinksResourceApi(common_internal.ApiRequester client) : |
| 2425 _requester = client; |
| 2426 |
| 2427 /** |
| 2428 * Removes a user from the given view (profile). |
| 2429 * |
| 2430 * Request parameters: |
| 2431 * |
| 2432 * [accountId] - Account ID to delete the user link for. |
| 2433 * |
| 2434 * [webPropertyId] - Web Property ID to delete the user link for. |
| 2435 * |
| 2436 * [profileId] - View (Profile) ID to delete the user link for. |
| 2437 * |
| 2438 * [linkId] - Link ID to delete the user link for. |
| 2439 * |
| 2440 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2441 * error. |
| 2442 * |
| 2443 * If the used [http.Client] completes with an error when making a REST call, |
| 2444 * this method will complete with the same error. |
| 2445 */ |
| 2446 async.Future delete(core.String accountId, core.String webPropertyId, core.Str
ing profileId, core.String linkId) { |
| 2447 var _url = null; |
| 2448 var _queryParams = new core.Map(); |
| 2449 var _uploadMedia = null; |
| 2450 var _uploadOptions = null; |
| 2451 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2452 var _body = null; |
| 2453 |
| 2454 if (accountId == null) { |
| 2455 throw new core.ArgumentError("Parameter accountId is required."); |
| 2456 } |
| 2457 if (webPropertyId == null) { |
| 2458 throw new core.ArgumentError("Parameter webPropertyId is required."); |
| 2459 } |
| 2460 if (profileId == null) { |
| 2461 throw new core.ArgumentError("Parameter profileId is required."); |
| 2462 } |
| 2463 if (linkId == null) { |
| 2464 throw new core.ArgumentError("Parameter linkId is required."); |
| 2465 } |
| 2466 |
| 2467 _downloadOptions = null; |
| 2468 |
| 2469 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/webproperties/' + common_internal.Escaper.ecapeVariable('$webPropert
yId') + '/profiles/' + common_internal.Escaper.ecapeVariable('$profileId') + '/e
ntityUserLinks/' + common_internal.Escaper.ecapeVariable('$linkId'); |
| 2470 |
| 2471 var _response = _requester.request(_url, |
| 2472 "DELETE", |
| 2473 body: _body, |
| 2474 queryParams: _queryParams, |
| 2475 uploadOptions: _uploadOptions, |
| 2476 uploadMedia: _uploadMedia, |
| 2477 downloadOptions: _downloadOptions); |
| 2478 return _response.then((data) => null); |
| 2479 } |
| 2480 |
| 2481 /** |
| 2482 * Adds a new user to the given view (profile). |
| 2483 * |
| 2484 * [request] - The metadata request object. |
| 2485 * |
| 2486 * Request parameters: |
| 2487 * |
| 2488 * [accountId] - Account ID to create the user link for. |
| 2489 * |
| 2490 * [webPropertyId] - Web Property ID to create the user link for. |
| 2491 * |
| 2492 * [profileId] - View (Profile) ID to create the user link for. |
| 2493 * |
| 2494 * Completes with a [EntityUserLink]. |
| 2495 * |
| 2496 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2497 * error. |
| 2498 * |
| 2499 * If the used [http.Client] completes with an error when making a REST call, |
| 2500 * this method will complete with the same error. |
| 2501 */ |
| 2502 async.Future<EntityUserLink> insert(EntityUserLink request, core.String accoun
tId, core.String webPropertyId, core.String profileId) { |
| 2503 var _url = null; |
| 2504 var _queryParams = new core.Map(); |
| 2505 var _uploadMedia = null; |
| 2506 var _uploadOptions = null; |
| 2507 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2508 var _body = null; |
| 2509 |
| 2510 if (request != null) { |
| 2511 _body = convert.JSON.encode((request).toJson()); |
| 2512 } |
| 2513 if (accountId == null) { |
| 2514 throw new core.ArgumentError("Parameter accountId is required."); |
| 2515 } |
| 2516 if (webPropertyId == null) { |
| 2517 throw new core.ArgumentError("Parameter webPropertyId is required."); |
| 2518 } |
| 2519 if (profileId == null) { |
| 2520 throw new core.ArgumentError("Parameter profileId is required."); |
| 2521 } |
| 2522 |
| 2523 |
| 2524 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/webproperties/' + common_internal.Escaper.ecapeVariable('$webPropert
yId') + '/profiles/' + common_internal.Escaper.ecapeVariable('$profileId') + '/e
ntityUserLinks'; |
| 2525 |
| 2526 var _response = _requester.request(_url, |
| 2527 "POST", |
| 2528 body: _body, |
| 2529 queryParams: _queryParams, |
| 2530 uploadOptions: _uploadOptions, |
| 2531 uploadMedia: _uploadMedia, |
| 2532 downloadOptions: _downloadOptions); |
| 2533 return _response.then((data) => new EntityUserLink.fromJson(data)); |
| 2534 } |
| 2535 |
| 2536 /** |
| 2537 * Lists profile-user links for a given view (profile). |
| 2538 * |
| 2539 * Request parameters: |
| 2540 * |
| 2541 * [accountId] - Account ID which the given view (profile) belongs to. |
| 2542 * |
| 2543 * [webPropertyId] - Web Property ID which the given view (profile) belongs |
| 2544 * to. Can either be a specific web property ID or '~all', which refers to all |
| 2545 * the web properties that user has access to. |
| 2546 * |
| 2547 * [profileId] - View (Profile) ID to retrieve the profile-user links for. Can |
| 2548 * either be a specific profile ID or '~all', which refers to all the profiles |
| 2549 * that user has access to. |
| 2550 * |
| 2551 * [max_results] - The maximum number of profile-user links to include in this |
| 2552 * response. |
| 2553 * |
| 2554 * [start_index] - An index of the first profile-user link to retrieve. Use |
| 2555 * this parameter as a pagination mechanism along with the max-results |
| 2556 * parameter. |
| 2557 * |
| 2558 * Completes with a [EntityUserLinks]. |
| 2559 * |
| 2560 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2561 * error. |
| 2562 * |
| 2563 * If the used [http.Client] completes with an error when making a REST call, |
| 2564 * this method will complete with the same error. |
| 2565 */ |
| 2566 async.Future<EntityUserLinks> list(core.String accountId, core.String webPrope
rtyId, core.String profileId, {core.int max_results, core.int start_index}) { |
| 2567 var _url = null; |
| 2568 var _queryParams = new core.Map(); |
| 2569 var _uploadMedia = null; |
| 2570 var _uploadOptions = null; |
| 2571 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2572 var _body = null; |
| 2573 |
| 2574 if (accountId == null) { |
| 2575 throw new core.ArgumentError("Parameter accountId is required."); |
| 2576 } |
| 2577 if (webPropertyId == null) { |
| 2578 throw new core.ArgumentError("Parameter webPropertyId is required."); |
| 2579 } |
| 2580 if (profileId == null) { |
| 2581 throw new core.ArgumentError("Parameter profileId is required."); |
| 2582 } |
| 2583 if (max_results != null) { |
| 2584 _queryParams["max-results"] = ["${max_results}"]; |
| 2585 } |
| 2586 if (start_index != null) { |
| 2587 _queryParams["start-index"] = ["${start_index}"]; |
| 2588 } |
| 2589 |
| 2590 |
| 2591 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/webproperties/' + common_internal.Escaper.ecapeVariable('$webPropert
yId') + '/profiles/' + common_internal.Escaper.ecapeVariable('$profileId') + '/e
ntityUserLinks'; |
| 2592 |
| 2593 var _response = _requester.request(_url, |
| 2594 "GET", |
| 2595 body: _body, |
| 2596 queryParams: _queryParams, |
| 2597 uploadOptions: _uploadOptions, |
| 2598 uploadMedia: _uploadMedia, |
| 2599 downloadOptions: _downloadOptions); |
| 2600 return _response.then((data) => new EntityUserLinks.fromJson(data)); |
| 2601 } |
| 2602 |
| 2603 /** |
| 2604 * Updates permissions for an existing user on the given view (profile). |
| 2605 * |
| 2606 * [request] - The metadata request object. |
| 2607 * |
| 2608 * Request parameters: |
| 2609 * |
| 2610 * [accountId] - Account ID to update the user link for. |
| 2611 * |
| 2612 * [webPropertyId] - Web Property ID to update the user link for. |
| 2613 * |
| 2614 * [profileId] - View (Profile ID) to update the user link for. |
| 2615 * |
| 2616 * [linkId] - Link ID to update the user link for. |
| 2617 * |
| 2618 * Completes with a [EntityUserLink]. |
| 2619 * |
| 2620 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2621 * error. |
| 2622 * |
| 2623 * If the used [http.Client] completes with an error when making a REST call, |
| 2624 * this method will complete with the same error. |
| 2625 */ |
| 2626 async.Future<EntityUserLink> update(EntityUserLink request, core.String accoun
tId, core.String webPropertyId, core.String profileId, core.String linkId) { |
| 2627 var _url = null; |
| 2628 var _queryParams = new core.Map(); |
| 2629 var _uploadMedia = null; |
| 2630 var _uploadOptions = null; |
| 2631 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2632 var _body = null; |
| 2633 |
| 2634 if (request != null) { |
| 2635 _body = convert.JSON.encode((request).toJson()); |
| 2636 } |
| 2637 if (accountId == null) { |
| 2638 throw new core.ArgumentError("Parameter accountId is required."); |
| 2639 } |
| 2640 if (webPropertyId == null) { |
| 2641 throw new core.ArgumentError("Parameter webPropertyId is required."); |
| 2642 } |
| 2643 if (profileId == null) { |
| 2644 throw new core.ArgumentError("Parameter profileId is required."); |
| 2645 } |
| 2646 if (linkId == null) { |
| 2647 throw new core.ArgumentError("Parameter linkId is required."); |
| 2648 } |
| 2649 |
| 2650 |
| 2651 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/webproperties/' + common_internal.Escaper.ecapeVariable('$webPropert
yId') + '/profiles/' + common_internal.Escaper.ecapeVariable('$profileId') + '/e
ntityUserLinks/' + common_internal.Escaper.ecapeVariable('$linkId'); |
| 2652 |
| 2653 var _response = _requester.request(_url, |
| 2654 "PUT", |
| 2655 body: _body, |
| 2656 queryParams: _queryParams, |
| 2657 uploadOptions: _uploadOptions, |
| 2658 uploadMedia: _uploadMedia, |
| 2659 downloadOptions: _downloadOptions); |
| 2660 return _response.then((data) => new EntityUserLink.fromJson(data)); |
| 2661 } |
| 2662 |
| 2663 } |
| 2664 |
| 2665 |
| 2666 /** Not documented yet. */ |
| 2667 class ManagementProfilesResourceApi { |
| 2668 final common_internal.ApiRequester _requester; |
| 2669 |
| 2670 ManagementProfilesResourceApi(common_internal.ApiRequester client) : |
| 2671 _requester = client; |
| 2672 |
| 2673 /** |
| 2674 * Deletes a view (profile). |
| 2675 * |
| 2676 * Request parameters: |
| 2677 * |
| 2678 * [accountId] - Account ID to delete the view (profile) for. |
| 2679 * |
| 2680 * [webPropertyId] - Web property ID to delete the view (profile) for. |
| 2681 * |
| 2682 * [profileId] - ID of the view (profile) to be deleted. |
| 2683 * |
| 2684 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2685 * error. |
| 2686 * |
| 2687 * If the used [http.Client] completes with an error when making a REST call, |
| 2688 * this method will complete with the same error. |
| 2689 */ |
| 2690 async.Future delete(core.String accountId, core.String webPropertyId, core.Str
ing profileId) { |
| 2691 var _url = null; |
| 2692 var _queryParams = new core.Map(); |
| 2693 var _uploadMedia = null; |
| 2694 var _uploadOptions = null; |
| 2695 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2696 var _body = null; |
| 2697 |
| 2698 if (accountId == null) { |
| 2699 throw new core.ArgumentError("Parameter accountId is required."); |
| 2700 } |
| 2701 if (webPropertyId == null) { |
| 2702 throw new core.ArgumentError("Parameter webPropertyId is required."); |
| 2703 } |
| 2704 if (profileId == null) { |
| 2705 throw new core.ArgumentError("Parameter profileId is required."); |
| 2706 } |
| 2707 |
| 2708 _downloadOptions = null; |
| 2709 |
| 2710 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/webproperties/' + common_internal.Escaper.ecapeVariable('$webPropert
yId') + '/profiles/' + common_internal.Escaper.ecapeVariable('$profileId'); |
| 2711 |
| 2712 var _response = _requester.request(_url, |
| 2713 "DELETE", |
| 2714 body: _body, |
| 2715 queryParams: _queryParams, |
| 2716 uploadOptions: _uploadOptions, |
| 2717 uploadMedia: _uploadMedia, |
| 2718 downloadOptions: _downloadOptions); |
| 2719 return _response.then((data) => null); |
| 2720 } |
| 2721 |
| 2722 /** |
| 2723 * Gets a view (profile) to which the user has access. |
| 2724 * |
| 2725 * Request parameters: |
| 2726 * |
| 2727 * [accountId] - Account ID to retrieve the goal for. |
| 2728 * Value must have pattern "[0-9]+". |
| 2729 * |
| 2730 * [webPropertyId] - Web property ID to retrieve the goal for. |
| 2731 * Value must have pattern "UA-[0-9]+-[0-9]+". |
| 2732 * |
| 2733 * [profileId] - View (Profile) ID to retrieve the goal for. |
| 2734 * Value must have pattern "[0-9]+". |
| 2735 * |
| 2736 * Completes with a [Profile]. |
| 2737 * |
| 2738 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2739 * error. |
| 2740 * |
| 2741 * If the used [http.Client] completes with an error when making a REST call, |
| 2742 * this method will complete with the same error. |
| 2743 */ |
| 2744 async.Future<Profile> get(core.String accountId, core.String webPropertyId, co
re.String profileId) { |
| 2745 var _url = null; |
| 2746 var _queryParams = new core.Map(); |
| 2747 var _uploadMedia = null; |
| 2748 var _uploadOptions = null; |
| 2749 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2750 var _body = null; |
| 2751 |
| 2752 if (accountId == null) { |
| 2753 throw new core.ArgumentError("Parameter accountId is required."); |
| 2754 } |
| 2755 if (webPropertyId == null) { |
| 2756 throw new core.ArgumentError("Parameter webPropertyId is required."); |
| 2757 } |
| 2758 if (profileId == null) { |
| 2759 throw new core.ArgumentError("Parameter profileId is required."); |
| 2760 } |
| 2761 |
| 2762 |
| 2763 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/webproperties/' + common_internal.Escaper.ecapeVariable('$webPropert
yId') + '/profiles/' + common_internal.Escaper.ecapeVariable('$profileId'); |
| 2764 |
| 2765 var _response = _requester.request(_url, |
| 2766 "GET", |
| 2767 body: _body, |
| 2768 queryParams: _queryParams, |
| 2769 uploadOptions: _uploadOptions, |
| 2770 uploadMedia: _uploadMedia, |
| 2771 downloadOptions: _downloadOptions); |
| 2772 return _response.then((data) => new Profile.fromJson(data)); |
| 2773 } |
| 2774 |
| 2775 /** |
| 2776 * Create a new view (profile). |
| 2777 * |
| 2778 * [request] - The metadata request object. |
| 2779 * |
| 2780 * Request parameters: |
| 2781 * |
| 2782 * [accountId] - Account ID to create the view (profile) for. |
| 2783 * |
| 2784 * [webPropertyId] - Web property ID to create the view (profile) for. |
| 2785 * |
| 2786 * Completes with a [Profile]. |
| 2787 * |
| 2788 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2789 * error. |
| 2790 * |
| 2791 * If the used [http.Client] completes with an error when making a REST call, |
| 2792 * this method will complete with the same error. |
| 2793 */ |
| 2794 async.Future<Profile> insert(Profile request, core.String accountId, core.Stri
ng webPropertyId) { |
| 2795 var _url = null; |
| 2796 var _queryParams = new core.Map(); |
| 2797 var _uploadMedia = null; |
| 2798 var _uploadOptions = null; |
| 2799 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2800 var _body = null; |
| 2801 |
| 2802 if (request != null) { |
| 2803 _body = convert.JSON.encode((request).toJson()); |
| 2804 } |
| 2805 if (accountId == null) { |
| 2806 throw new core.ArgumentError("Parameter accountId is required."); |
| 2807 } |
| 2808 if (webPropertyId == null) { |
| 2809 throw new core.ArgumentError("Parameter webPropertyId is required."); |
| 2810 } |
| 2811 |
| 2812 |
| 2813 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/webproperties/' + common_internal.Escaper.ecapeVariable('$webPropert
yId') + '/profiles'; |
| 2814 |
| 2815 var _response = _requester.request(_url, |
| 2816 "POST", |
| 2817 body: _body, |
| 2818 queryParams: _queryParams, |
| 2819 uploadOptions: _uploadOptions, |
| 2820 uploadMedia: _uploadMedia, |
| 2821 downloadOptions: _downloadOptions); |
| 2822 return _response.then((data) => new Profile.fromJson(data)); |
| 2823 } |
| 2824 |
| 2825 /** |
| 2826 * Lists views (profiles) to which the user has access. |
| 2827 * |
| 2828 * Request parameters: |
| 2829 * |
| 2830 * [accountId] - Account ID for the view (profiles) to retrieve. Can either be |
| 2831 * a specific account ID or '~all', which refers to all the accounts to which |
| 2832 * the user has access. |
| 2833 * |
| 2834 * [webPropertyId] - Web property ID for the views (profiles) to retrieve. Can |
| 2835 * either be a specific web property ID or '~all', which refers to all the web |
| 2836 * properties to which the user has access. |
| 2837 * |
| 2838 * [max_results] - The maximum number of views (profiles) to include in this |
| 2839 * response. |
| 2840 * |
| 2841 * [start_index] - An index of the first entity to retrieve. Use this |
| 2842 * parameter as a pagination mechanism along with the max-results parameter. |
| 2843 * |
| 2844 * Completes with a [Profiles]. |
| 2845 * |
| 2846 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2847 * error. |
| 2848 * |
| 2849 * If the used [http.Client] completes with an error when making a REST call, |
| 2850 * this method will complete with the same error. |
| 2851 */ |
| 2852 async.Future<Profiles> list(core.String accountId, core.String webPropertyId,
{core.int max_results, core.int start_index}) { |
| 2853 var _url = null; |
| 2854 var _queryParams = new core.Map(); |
| 2855 var _uploadMedia = null; |
| 2856 var _uploadOptions = null; |
| 2857 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2858 var _body = null; |
| 2859 |
| 2860 if (accountId == null) { |
| 2861 throw new core.ArgumentError("Parameter accountId is required."); |
| 2862 } |
| 2863 if (webPropertyId == null) { |
| 2864 throw new core.ArgumentError("Parameter webPropertyId is required."); |
| 2865 } |
| 2866 if (max_results != null) { |
| 2867 _queryParams["max-results"] = ["${max_results}"]; |
| 2868 } |
| 2869 if (start_index != null) { |
| 2870 _queryParams["start-index"] = ["${start_index}"]; |
| 2871 } |
| 2872 |
| 2873 |
| 2874 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/webproperties/' + common_internal.Escaper.ecapeVariable('$webPropert
yId') + '/profiles'; |
| 2875 |
| 2876 var _response = _requester.request(_url, |
| 2877 "GET", |
| 2878 body: _body, |
| 2879 queryParams: _queryParams, |
| 2880 uploadOptions: _uploadOptions, |
| 2881 uploadMedia: _uploadMedia, |
| 2882 downloadOptions: _downloadOptions); |
| 2883 return _response.then((data) => new Profiles.fromJson(data)); |
| 2884 } |
| 2885 |
| 2886 /** |
| 2887 * Updates an existing view (profile). This method supports patch semantics. |
| 2888 * |
| 2889 * [request] - The metadata request object. |
| 2890 * |
| 2891 * Request parameters: |
| 2892 * |
| 2893 * [accountId] - Account ID to which the view (profile) belongs |
| 2894 * |
| 2895 * [webPropertyId] - Web property ID to which the view (profile) belongs |
| 2896 * |
| 2897 * [profileId] - ID of the view (profile) to be updated. |
| 2898 * |
| 2899 * Completes with a [Profile]. |
| 2900 * |
| 2901 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2902 * error. |
| 2903 * |
| 2904 * If the used [http.Client] completes with an error when making a REST call, |
| 2905 * this method will complete with the same error. |
| 2906 */ |
| 2907 async.Future<Profile> patch(Profile request, core.String accountId, core.Strin
g webPropertyId, core.String profileId) { |
| 2908 var _url = null; |
| 2909 var _queryParams = new core.Map(); |
| 2910 var _uploadMedia = null; |
| 2911 var _uploadOptions = null; |
| 2912 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2913 var _body = null; |
| 2914 |
| 2915 if (request != null) { |
| 2916 _body = convert.JSON.encode((request).toJson()); |
| 2917 } |
| 2918 if (accountId == null) { |
| 2919 throw new core.ArgumentError("Parameter accountId is required."); |
| 2920 } |
| 2921 if (webPropertyId == null) { |
| 2922 throw new core.ArgumentError("Parameter webPropertyId is required."); |
| 2923 } |
| 2924 if (profileId == null) { |
| 2925 throw new core.ArgumentError("Parameter profileId is required."); |
| 2926 } |
| 2927 |
| 2928 |
| 2929 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/webproperties/' + common_internal.Escaper.ecapeVariable('$webPropert
yId') + '/profiles/' + common_internal.Escaper.ecapeVariable('$profileId'); |
| 2930 |
| 2931 var _response = _requester.request(_url, |
| 2932 "PATCH", |
| 2933 body: _body, |
| 2934 queryParams: _queryParams, |
| 2935 uploadOptions: _uploadOptions, |
| 2936 uploadMedia: _uploadMedia, |
| 2937 downloadOptions: _downloadOptions); |
| 2938 return _response.then((data) => new Profile.fromJson(data)); |
| 2939 } |
| 2940 |
| 2941 /** |
| 2942 * Updates an existing view (profile). |
| 2943 * |
| 2944 * [request] - The metadata request object. |
| 2945 * |
| 2946 * Request parameters: |
| 2947 * |
| 2948 * [accountId] - Account ID to which the view (profile) belongs |
| 2949 * |
| 2950 * [webPropertyId] - Web property ID to which the view (profile) belongs |
| 2951 * |
| 2952 * [profileId] - ID of the view (profile) to be updated. |
| 2953 * |
| 2954 * Completes with a [Profile]. |
| 2955 * |
| 2956 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2957 * error. |
| 2958 * |
| 2959 * If the used [http.Client] completes with an error when making a REST call, |
| 2960 * this method will complete with the same error. |
| 2961 */ |
| 2962 async.Future<Profile> update(Profile request, core.String accountId, core.Stri
ng webPropertyId, core.String profileId) { |
| 2963 var _url = null; |
| 2964 var _queryParams = new core.Map(); |
| 2965 var _uploadMedia = null; |
| 2966 var _uploadOptions = null; |
| 2967 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2968 var _body = null; |
| 2969 |
| 2970 if (request != null) { |
| 2971 _body = convert.JSON.encode((request).toJson()); |
| 2972 } |
| 2973 if (accountId == null) { |
| 2974 throw new core.ArgumentError("Parameter accountId is required."); |
| 2975 } |
| 2976 if (webPropertyId == null) { |
| 2977 throw new core.ArgumentError("Parameter webPropertyId is required."); |
| 2978 } |
| 2979 if (profileId == null) { |
| 2980 throw new core.ArgumentError("Parameter profileId is required."); |
| 2981 } |
| 2982 |
| 2983 |
| 2984 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/webproperties/' + common_internal.Escaper.ecapeVariable('$webPropert
yId') + '/profiles/' + common_internal.Escaper.ecapeVariable('$profileId'); |
| 2985 |
| 2986 var _response = _requester.request(_url, |
| 2987 "PUT", |
| 2988 body: _body, |
| 2989 queryParams: _queryParams, |
| 2990 uploadOptions: _uploadOptions, |
| 2991 uploadMedia: _uploadMedia, |
| 2992 downloadOptions: _downloadOptions); |
| 2993 return _response.then((data) => new Profile.fromJson(data)); |
| 2994 } |
| 2995 |
| 2996 } |
| 2997 |
| 2998 |
| 2999 /** Not documented yet. */ |
| 3000 class ManagementSegmentsResourceApi { |
| 3001 final common_internal.ApiRequester _requester; |
| 3002 |
| 3003 ManagementSegmentsResourceApi(common_internal.ApiRequester client) : |
| 3004 _requester = client; |
| 3005 |
| 3006 /** |
| 3007 * Lists segments to which the user has access. |
| 3008 * |
| 3009 * Request parameters: |
| 3010 * |
| 3011 * [max_results] - The maximum number of segments to include in this response. |
| 3012 * |
| 3013 * [start_index] - An index of the first segment to retrieve. Use this |
| 3014 * parameter as a pagination mechanism along with the max-results parameter. |
| 3015 * |
| 3016 * Completes with a [Segments]. |
| 3017 * |
| 3018 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 3019 * error. |
| 3020 * |
| 3021 * If the used [http.Client] completes with an error when making a REST call, |
| 3022 * this method will complete with the same error. |
| 3023 */ |
| 3024 async.Future<Segments> list({core.int max_results, core.int start_index}) { |
| 3025 var _url = null; |
| 3026 var _queryParams = new core.Map(); |
| 3027 var _uploadMedia = null; |
| 3028 var _uploadOptions = null; |
| 3029 var _downloadOptions = common.DownloadOptions.Metadata; |
| 3030 var _body = null; |
| 3031 |
| 3032 if (max_results != null) { |
| 3033 _queryParams["max-results"] = ["${max_results}"]; |
| 3034 } |
| 3035 if (start_index != null) { |
| 3036 _queryParams["start-index"] = ["${start_index}"]; |
| 3037 } |
| 3038 |
| 3039 |
| 3040 _url = 'management/segments'; |
| 3041 |
| 3042 var _response = _requester.request(_url, |
| 3043 "GET", |
| 3044 body: _body, |
| 3045 queryParams: _queryParams, |
| 3046 uploadOptions: _uploadOptions, |
| 3047 uploadMedia: _uploadMedia, |
| 3048 downloadOptions: _downloadOptions); |
| 3049 return _response.then((data) => new Segments.fromJson(data)); |
| 3050 } |
| 3051 |
| 3052 } |
| 3053 |
| 3054 |
| 3055 /** Not documented yet. */ |
| 3056 class ManagementUnsampledReportsResourceApi { |
| 3057 final common_internal.ApiRequester _requester; |
| 3058 |
| 3059 ManagementUnsampledReportsResourceApi(common_internal.ApiRequester client) : |
| 3060 _requester = client; |
| 3061 |
| 3062 /** |
| 3063 * Returns a single unsampled report. |
| 3064 * |
| 3065 * Request parameters: |
| 3066 * |
| 3067 * [accountId] - Account ID to retrieve unsampled report for. |
| 3068 * |
| 3069 * [webPropertyId] - Web property ID to retrieve unsampled reports for. |
| 3070 * |
| 3071 * [profileId] - View (Profile) ID to retrieve unsampled report for. |
| 3072 * |
| 3073 * [unsampledReportId] - ID of the unsampled report to retrieve. |
| 3074 * |
| 3075 * Completes with a [UnsampledReport]. |
| 3076 * |
| 3077 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 3078 * error. |
| 3079 * |
| 3080 * If the used [http.Client] completes with an error when making a REST call, |
| 3081 * this method will complete with the same error. |
| 3082 */ |
| 3083 async.Future<UnsampledReport> get(core.String accountId, core.String webProper
tyId, core.String profileId, core.String unsampledReportId) { |
| 3084 var _url = null; |
| 3085 var _queryParams = new core.Map(); |
| 3086 var _uploadMedia = null; |
| 3087 var _uploadOptions = null; |
| 3088 var _downloadOptions = common.DownloadOptions.Metadata; |
| 3089 var _body = null; |
| 3090 |
| 3091 if (accountId == null) { |
| 3092 throw new core.ArgumentError("Parameter accountId is required."); |
| 3093 } |
| 3094 if (webPropertyId == null) { |
| 3095 throw new core.ArgumentError("Parameter webPropertyId is required."); |
| 3096 } |
| 3097 if (profileId == null) { |
| 3098 throw new core.ArgumentError("Parameter profileId is required."); |
| 3099 } |
| 3100 if (unsampledReportId == null) { |
| 3101 throw new core.ArgumentError("Parameter unsampledReportId is required."); |
| 3102 } |
| 3103 |
| 3104 |
| 3105 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/webproperties/' + common_internal.Escaper.ecapeVariable('$webPropert
yId') + '/profiles/' + common_internal.Escaper.ecapeVariable('$profileId') + '/u
nsampledReports/' + common_internal.Escaper.ecapeVariable('$unsampledReportId'); |
| 3106 |
| 3107 var _response = _requester.request(_url, |
| 3108 "GET", |
| 3109 body: _body, |
| 3110 queryParams: _queryParams, |
| 3111 uploadOptions: _uploadOptions, |
| 3112 uploadMedia: _uploadMedia, |
| 3113 downloadOptions: _downloadOptions); |
| 3114 return _response.then((data) => new UnsampledReport.fromJson(data)); |
| 3115 } |
| 3116 |
| 3117 /** |
| 3118 * Create a new unsampled report. |
| 3119 * |
| 3120 * [request] - The metadata request object. |
| 3121 * |
| 3122 * Request parameters: |
| 3123 * |
| 3124 * [accountId] - Account ID to create the unsampled report for. |
| 3125 * |
| 3126 * [webPropertyId] - Web property ID to create the unsampled report for. |
| 3127 * |
| 3128 * [profileId] - View (Profile) ID to create the unsampled report for. |
| 3129 * |
| 3130 * Completes with a [UnsampledReport]. |
| 3131 * |
| 3132 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 3133 * error. |
| 3134 * |
| 3135 * If the used [http.Client] completes with an error when making a REST call, |
| 3136 * this method will complete with the same error. |
| 3137 */ |
| 3138 async.Future<UnsampledReport> insert(UnsampledReport request, core.String acco
untId, core.String webPropertyId, core.String profileId) { |
| 3139 var _url = null; |
| 3140 var _queryParams = new core.Map(); |
| 3141 var _uploadMedia = null; |
| 3142 var _uploadOptions = null; |
| 3143 var _downloadOptions = common.DownloadOptions.Metadata; |
| 3144 var _body = null; |
| 3145 |
| 3146 if (request != null) { |
| 3147 _body = convert.JSON.encode((request).toJson()); |
| 3148 } |
| 3149 if (accountId == null) { |
| 3150 throw new core.ArgumentError("Parameter accountId is required."); |
| 3151 } |
| 3152 if (webPropertyId == null) { |
| 3153 throw new core.ArgumentError("Parameter webPropertyId is required."); |
| 3154 } |
| 3155 if (profileId == null) { |
| 3156 throw new core.ArgumentError("Parameter profileId is required."); |
| 3157 } |
| 3158 |
| 3159 |
| 3160 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/webproperties/' + common_internal.Escaper.ecapeVariable('$webPropert
yId') + '/profiles/' + common_internal.Escaper.ecapeVariable('$profileId') + '/u
nsampledReports'; |
| 3161 |
| 3162 var _response = _requester.request(_url, |
| 3163 "POST", |
| 3164 body: _body, |
| 3165 queryParams: _queryParams, |
| 3166 uploadOptions: _uploadOptions, |
| 3167 uploadMedia: _uploadMedia, |
| 3168 downloadOptions: _downloadOptions); |
| 3169 return _response.then((data) => new UnsampledReport.fromJson(data)); |
| 3170 } |
| 3171 |
| 3172 /** |
| 3173 * Lists unsampled reports to which the user has access. |
| 3174 * |
| 3175 * Request parameters: |
| 3176 * |
| 3177 * [accountId] - Account ID to retrieve unsampled reports for. Must be a |
| 3178 * specific account ID, ~all is not supported. |
| 3179 * |
| 3180 * [webPropertyId] - Web property ID to retrieve unsampled reports for. Must |
| 3181 * be a specific web property ID, ~all is not supported. |
| 3182 * |
| 3183 * [profileId] - View (Profile) ID to retrieve unsampled reports for. Must be |
| 3184 * a specific view (profile) ID, ~all is not supported. |
| 3185 * |
| 3186 * [max_results] - The maximum number of unsampled reports to include in this |
| 3187 * response. |
| 3188 * |
| 3189 * [start_index] - An index of the first unsampled report to retrieve. Use |
| 3190 * this parameter as a pagination mechanism along with the max-results |
| 3191 * parameter. |
| 3192 * |
| 3193 * Completes with a [UnsampledReports]. |
| 3194 * |
| 3195 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 3196 * error. |
| 3197 * |
| 3198 * If the used [http.Client] completes with an error when making a REST call, |
| 3199 * this method will complete with the same error. |
| 3200 */ |
| 3201 async.Future<UnsampledReports> list(core.String accountId, core.String webProp
ertyId, core.String profileId, {core.int max_results, core.int start_index}) { |
| 3202 var _url = null; |
| 3203 var _queryParams = new core.Map(); |
| 3204 var _uploadMedia = null; |
| 3205 var _uploadOptions = null; |
| 3206 var _downloadOptions = common.DownloadOptions.Metadata; |
| 3207 var _body = null; |
| 3208 |
| 3209 if (accountId == null) { |
| 3210 throw new core.ArgumentError("Parameter accountId is required."); |
| 3211 } |
| 3212 if (webPropertyId == null) { |
| 3213 throw new core.ArgumentError("Parameter webPropertyId is required."); |
| 3214 } |
| 3215 if (profileId == null) { |
| 3216 throw new core.ArgumentError("Parameter profileId is required."); |
| 3217 } |
| 3218 if (max_results != null) { |
| 3219 _queryParams["max-results"] = ["${max_results}"]; |
| 3220 } |
| 3221 if (start_index != null) { |
| 3222 _queryParams["start-index"] = ["${start_index}"]; |
| 3223 } |
| 3224 |
| 3225 |
| 3226 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/webproperties/' + common_internal.Escaper.ecapeVariable('$webPropert
yId') + '/profiles/' + common_internal.Escaper.ecapeVariable('$profileId') + '/u
nsampledReports'; |
| 3227 |
| 3228 var _response = _requester.request(_url, |
| 3229 "GET", |
| 3230 body: _body, |
| 3231 queryParams: _queryParams, |
| 3232 uploadOptions: _uploadOptions, |
| 3233 uploadMedia: _uploadMedia, |
| 3234 downloadOptions: _downloadOptions); |
| 3235 return _response.then((data) => new UnsampledReports.fromJson(data)); |
| 3236 } |
| 3237 |
| 3238 } |
| 3239 |
| 3240 |
| 3241 /** Not documented yet. */ |
| 3242 class ManagementUploadsResourceApi { |
| 3243 final common_internal.ApiRequester _requester; |
| 3244 |
| 3245 ManagementUploadsResourceApi(common_internal.ApiRequester client) : |
| 3246 _requester = client; |
| 3247 |
| 3248 /** |
| 3249 * Delete data associated with a previous upload. |
| 3250 * |
| 3251 * [request] - The metadata request object. |
| 3252 * |
| 3253 * Request parameters: |
| 3254 * |
| 3255 * [accountId] - Account Id for the uploads to be deleted. |
| 3256 * Value must have pattern "\d+". |
| 3257 * |
| 3258 * [webPropertyId] - Web property Id for the uploads to be deleted. |
| 3259 * Value must have pattern "UA-(\d+)-(\d+)". |
| 3260 * |
| 3261 * [customDataSourceId] - Custom data source Id for the uploads to be deleted. |
| 3262 * Value must have pattern ".{22}". |
| 3263 * |
| 3264 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 3265 * error. |
| 3266 * |
| 3267 * If the used [http.Client] completes with an error when making a REST call, |
| 3268 * this method will complete with the same error. |
| 3269 */ |
| 3270 async.Future deleteUploadData(AnalyticsDataimportDeleteUploadDataRequest reque
st, core.String accountId, core.String webPropertyId, core.String customDataSour
ceId) { |
| 3271 var _url = null; |
| 3272 var _queryParams = new core.Map(); |
| 3273 var _uploadMedia = null; |
| 3274 var _uploadOptions = null; |
| 3275 var _downloadOptions = common.DownloadOptions.Metadata; |
| 3276 var _body = null; |
| 3277 |
| 3278 if (request != null) { |
| 3279 _body = convert.JSON.encode((request).toJson()); |
| 3280 } |
| 3281 if (accountId == null) { |
| 3282 throw new core.ArgumentError("Parameter accountId is required."); |
| 3283 } |
| 3284 if (webPropertyId == null) { |
| 3285 throw new core.ArgumentError("Parameter webPropertyId is required."); |
| 3286 } |
| 3287 if (customDataSourceId == null) { |
| 3288 throw new core.ArgumentError("Parameter customDataSourceId is required."); |
| 3289 } |
| 3290 |
| 3291 _downloadOptions = null; |
| 3292 |
| 3293 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/webproperties/' + common_internal.Escaper.ecapeVariable('$webPropert
yId') + '/customDataSources/' + common_internal.Escaper.ecapeVariable('$customDa
taSourceId') + '/deleteUploadData'; |
| 3294 |
| 3295 var _response = _requester.request(_url, |
| 3296 "POST", |
| 3297 body: _body, |
| 3298 queryParams: _queryParams, |
| 3299 uploadOptions: _uploadOptions, |
| 3300 uploadMedia: _uploadMedia, |
| 3301 downloadOptions: _downloadOptions); |
| 3302 return _response.then((data) => null); |
| 3303 } |
| 3304 |
| 3305 /** |
| 3306 * List uploads to which the user has access. |
| 3307 * |
| 3308 * Request parameters: |
| 3309 * |
| 3310 * [accountId] - Account Id for the upload to retrieve. |
| 3311 * Value must have pattern "\d+". |
| 3312 * |
| 3313 * [webPropertyId] - Web property Id for the upload to retrieve. |
| 3314 * Value must have pattern "UA-(\d+)-(\d+)". |
| 3315 * |
| 3316 * [customDataSourceId] - Custom data source Id for upload to retrieve. |
| 3317 * Value must have pattern ".{22}". |
| 3318 * |
| 3319 * [uploadId] - Upload Id to retrieve. |
| 3320 * Value must have pattern ".{22}". |
| 3321 * |
| 3322 * Completes with a [Upload]. |
| 3323 * |
| 3324 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 3325 * error. |
| 3326 * |
| 3327 * If the used [http.Client] completes with an error when making a REST call, |
| 3328 * this method will complete with the same error. |
| 3329 */ |
| 3330 async.Future<Upload> get(core.String accountId, core.String webPropertyId, cor
e.String customDataSourceId, core.String uploadId) { |
| 3331 var _url = null; |
| 3332 var _queryParams = new core.Map(); |
| 3333 var _uploadMedia = null; |
| 3334 var _uploadOptions = null; |
| 3335 var _downloadOptions = common.DownloadOptions.Metadata; |
| 3336 var _body = null; |
| 3337 |
| 3338 if (accountId == null) { |
| 3339 throw new core.ArgumentError("Parameter accountId is required."); |
| 3340 } |
| 3341 if (webPropertyId == null) { |
| 3342 throw new core.ArgumentError("Parameter webPropertyId is required."); |
| 3343 } |
| 3344 if (customDataSourceId == null) { |
| 3345 throw new core.ArgumentError("Parameter customDataSourceId is required."); |
| 3346 } |
| 3347 if (uploadId == null) { |
| 3348 throw new core.ArgumentError("Parameter uploadId is required."); |
| 3349 } |
| 3350 |
| 3351 |
| 3352 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/webproperties/' + common_internal.Escaper.ecapeVariable('$webPropert
yId') + '/customDataSources/' + common_internal.Escaper.ecapeVariable('$customDa
taSourceId') + '/uploads/' + common_internal.Escaper.ecapeVariable('$uploadId'); |
| 3353 |
| 3354 var _response = _requester.request(_url, |
| 3355 "GET", |
| 3356 body: _body, |
| 3357 queryParams: _queryParams, |
| 3358 uploadOptions: _uploadOptions, |
| 3359 uploadMedia: _uploadMedia, |
| 3360 downloadOptions: _downloadOptions); |
| 3361 return _response.then((data) => new Upload.fromJson(data)); |
| 3362 } |
| 3363 |
| 3364 /** |
| 3365 * List uploads to which the user has access. |
| 3366 * |
| 3367 * Request parameters: |
| 3368 * |
| 3369 * [accountId] - Account Id for the uploads to retrieve. |
| 3370 * Value must have pattern "\d+". |
| 3371 * |
| 3372 * [webPropertyId] - Web property Id for the uploads to retrieve. |
| 3373 * Value must have pattern "UA-(\d+)-(\d+)". |
| 3374 * |
| 3375 * [customDataSourceId] - Custom data source Id for uploads to retrieve. |
| 3376 * Value must have pattern ".{22}". |
| 3377 * |
| 3378 * [max_results] - The maximum number of uploads to include in this response. |
| 3379 * |
| 3380 * [start_index] - A 1-based index of the first upload to retrieve. Use this |
| 3381 * parameter as a pagination mechanism along with the max-results parameter. |
| 3382 * |
| 3383 * Completes with a [Uploads]. |
| 3384 * |
| 3385 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 3386 * error. |
| 3387 * |
| 3388 * If the used [http.Client] completes with an error when making a REST call, |
| 3389 * this method will complete with the same error. |
| 3390 */ |
| 3391 async.Future<Uploads> list(core.String accountId, core.String webPropertyId, c
ore.String customDataSourceId, {core.int max_results, core.int start_index}) { |
| 3392 var _url = null; |
| 3393 var _queryParams = new core.Map(); |
| 3394 var _uploadMedia = null; |
| 3395 var _uploadOptions = null; |
| 3396 var _downloadOptions = common.DownloadOptions.Metadata; |
| 3397 var _body = null; |
| 3398 |
| 3399 if (accountId == null) { |
| 3400 throw new core.ArgumentError("Parameter accountId is required."); |
| 3401 } |
| 3402 if (webPropertyId == null) { |
| 3403 throw new core.ArgumentError("Parameter webPropertyId is required."); |
| 3404 } |
| 3405 if (customDataSourceId == null) { |
| 3406 throw new core.ArgumentError("Parameter customDataSourceId is required."); |
| 3407 } |
| 3408 if (max_results != null) { |
| 3409 _queryParams["max-results"] = ["${max_results}"]; |
| 3410 } |
| 3411 if (start_index != null) { |
| 3412 _queryParams["start-index"] = ["${start_index}"]; |
| 3413 } |
| 3414 |
| 3415 |
| 3416 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/webproperties/' + common_internal.Escaper.ecapeVariable('$webPropert
yId') + '/customDataSources/' + common_internal.Escaper.ecapeVariable('$customDa
taSourceId') + '/uploads'; |
| 3417 |
| 3418 var _response = _requester.request(_url, |
| 3419 "GET", |
| 3420 body: _body, |
| 3421 queryParams: _queryParams, |
| 3422 uploadOptions: _uploadOptions, |
| 3423 uploadMedia: _uploadMedia, |
| 3424 downloadOptions: _downloadOptions); |
| 3425 return _response.then((data) => new Uploads.fromJson(data)); |
| 3426 } |
| 3427 |
| 3428 /** |
| 3429 * Migrate custom data source and data imports to latest version. |
| 3430 * |
| 3431 * Request parameters: |
| 3432 * |
| 3433 * [accountId] - Account Id for migration. |
| 3434 * Value must have pattern "\d+". |
| 3435 * |
| 3436 * [webPropertyId] - Web property Id for migration. |
| 3437 * Value must have pattern "UA-(\d+)-(\d+)". |
| 3438 * |
| 3439 * [customDataSourceId] - Custom data source Id for migration. |
| 3440 * Value must have pattern ".{22}". |
| 3441 * |
| 3442 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 3443 * error. |
| 3444 * |
| 3445 * If the used [http.Client] completes with an error when making a REST call, |
| 3446 * this method will complete with the same error. |
| 3447 */ |
| 3448 async.Future migrateDataImport(core.String accountId, core.String webPropertyI
d, core.String customDataSourceId) { |
| 3449 var _url = null; |
| 3450 var _queryParams = new core.Map(); |
| 3451 var _uploadMedia = null; |
| 3452 var _uploadOptions = null; |
| 3453 var _downloadOptions = common.DownloadOptions.Metadata; |
| 3454 var _body = null; |
| 3455 |
| 3456 if (accountId == null) { |
| 3457 throw new core.ArgumentError("Parameter accountId is required."); |
| 3458 } |
| 3459 if (webPropertyId == null) { |
| 3460 throw new core.ArgumentError("Parameter webPropertyId is required."); |
| 3461 } |
| 3462 if (customDataSourceId == null) { |
| 3463 throw new core.ArgumentError("Parameter customDataSourceId is required."); |
| 3464 } |
| 3465 |
| 3466 _downloadOptions = null; |
| 3467 |
| 3468 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/webproperties/' + common_internal.Escaper.ecapeVariable('$webPropert
yId') + '/customDataSources/' + common_internal.Escaper.ecapeVariable('$customDa
taSourceId') + '/migrateDataImport'; |
| 3469 |
| 3470 var _response = _requester.request(_url, |
| 3471 "POST", |
| 3472 body: _body, |
| 3473 queryParams: _queryParams, |
| 3474 uploadOptions: _uploadOptions, |
| 3475 uploadMedia: _uploadMedia, |
| 3476 downloadOptions: _downloadOptions); |
| 3477 return _response.then((data) => null); |
| 3478 } |
| 3479 |
| 3480 /** |
| 3481 * Upload data for a custom data source. |
| 3482 * |
| 3483 * Request parameters: |
| 3484 * |
| 3485 * [accountId] - Account Id associated with the upload. |
| 3486 * Value must have pattern "\d+". |
| 3487 * |
| 3488 * [webPropertyId] - Web property UA-string associated with the upload. |
| 3489 * Value must have pattern "UA-\d+-\d+". |
| 3490 * |
| 3491 * [customDataSourceId] - Custom data source Id to which the data being |
| 3492 * uploaded belongs. |
| 3493 * |
| 3494 * [uploadMedia] - The media to upload. |
| 3495 * |
| 3496 * [uploadOptions] - Options for the media upload. Streaming Media without the |
| 3497 * length being known ahead of time is only supported via resumable uploads. |
| 3498 * |
| 3499 * Completes with a [Upload]. |
| 3500 * |
| 3501 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 3502 * error. |
| 3503 * |
| 3504 * If the used [http.Client] completes with an error when making a REST call, |
| 3505 * this method will complete with the same error. |
| 3506 */ |
| 3507 async.Future<Upload> uploadData(core.String accountId, core.String webProperty
Id, core.String customDataSourceId, {common.UploadOptions uploadOptions : common
.UploadOptions.Default, common.Media uploadMedia}) { |
| 3508 var _url = null; |
| 3509 var _queryParams = new core.Map(); |
| 3510 var _uploadMedia = null; |
| 3511 var _uploadOptions = null; |
| 3512 var _downloadOptions = common.DownloadOptions.Metadata; |
| 3513 var _body = null; |
| 3514 |
| 3515 if (accountId == null) { |
| 3516 throw new core.ArgumentError("Parameter accountId is required."); |
| 3517 } |
| 3518 if (webPropertyId == null) { |
| 3519 throw new core.ArgumentError("Parameter webPropertyId is required."); |
| 3520 } |
| 3521 if (customDataSourceId == null) { |
| 3522 throw new core.ArgumentError("Parameter customDataSourceId is required."); |
| 3523 } |
| 3524 |
| 3525 _uploadMedia = uploadMedia; |
| 3526 _uploadOptions = uploadOptions; |
| 3527 |
| 3528 if (_uploadMedia == null) { |
| 3529 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$ac
countId') + '/webproperties/' + common_internal.Escaper.ecapeVariable('$webPrope
rtyId') + '/customDataSources/' + common_internal.Escaper.ecapeVariable('$custom
DataSourceId') + '/uploads'; |
| 3530 } else if (_uploadOptions is common.ResumableUploadOptions) { |
| 3531 _url = '/resumable/upload/analytics/v3/management/accounts/' + common_inte
rnal.Escaper.ecapeVariable('$accountId') + '/webproperties/' + common_internal.E
scaper.ecapeVariable('$webPropertyId') + '/customDataSources/' + common_internal
.Escaper.ecapeVariable('$customDataSourceId') + '/uploads'; |
| 3532 } else { |
| 3533 _url = '/upload/analytics/v3/management/accounts/' + common_internal.Escap
er.ecapeVariable('$accountId') + '/webproperties/' + common_internal.Escaper.eca
peVariable('$webPropertyId') + '/customDataSources/' + common_internal.Escaper.e
capeVariable('$customDataSourceId') + '/uploads'; |
| 3534 } |
| 3535 |
| 3536 |
| 3537 var _response = _requester.request(_url, |
| 3538 "POST", |
| 3539 body: _body, |
| 3540 queryParams: _queryParams, |
| 3541 uploadOptions: _uploadOptions, |
| 3542 uploadMedia: _uploadMedia, |
| 3543 downloadOptions: _downloadOptions); |
| 3544 return _response.then((data) => new Upload.fromJson(data)); |
| 3545 } |
| 3546 |
| 3547 } |
| 3548 |
| 3549 |
| 3550 /** Not documented yet. */ |
| 3551 class ManagementWebPropertyAdWordsLinksResourceApi { |
| 3552 final common_internal.ApiRequester _requester; |
| 3553 |
| 3554 ManagementWebPropertyAdWordsLinksResourceApi(common_internal.ApiRequester clie
nt) : |
| 3555 _requester = client; |
| 3556 |
| 3557 /** |
| 3558 * Deletes a web property-AdWords link. |
| 3559 * |
| 3560 * Request parameters: |
| 3561 * |
| 3562 * [accountId] - ID of the account which the given web property belongs to. |
| 3563 * |
| 3564 * [webPropertyId] - Web property ID to delete the AdWords link for. |
| 3565 * |
| 3566 * [webPropertyAdWordsLinkId] - Web property AdWords link ID. |
| 3567 * |
| 3568 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 3569 * error. |
| 3570 * |
| 3571 * If the used [http.Client] completes with an error when making a REST call, |
| 3572 * this method will complete with the same error. |
| 3573 */ |
| 3574 async.Future delete(core.String accountId, core.String webPropertyId, core.Str
ing webPropertyAdWordsLinkId) { |
| 3575 var _url = null; |
| 3576 var _queryParams = new core.Map(); |
| 3577 var _uploadMedia = null; |
| 3578 var _uploadOptions = null; |
| 3579 var _downloadOptions = common.DownloadOptions.Metadata; |
| 3580 var _body = null; |
| 3581 |
| 3582 if (accountId == null) { |
| 3583 throw new core.ArgumentError("Parameter accountId is required."); |
| 3584 } |
| 3585 if (webPropertyId == null) { |
| 3586 throw new core.ArgumentError("Parameter webPropertyId is required."); |
| 3587 } |
| 3588 if (webPropertyAdWordsLinkId == null) { |
| 3589 throw new core.ArgumentError("Parameter webPropertyAdWordsLinkId is requir
ed."); |
| 3590 } |
| 3591 |
| 3592 _downloadOptions = null; |
| 3593 |
| 3594 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/webproperties/' + common_internal.Escaper.ecapeVariable('$webPropert
yId') + '/entityAdWordsLinks/' + common_internal.Escaper.ecapeVariable('$webProp
ertyAdWordsLinkId'); |
| 3595 |
| 3596 var _response = _requester.request(_url, |
| 3597 "DELETE", |
| 3598 body: _body, |
| 3599 queryParams: _queryParams, |
| 3600 uploadOptions: _uploadOptions, |
| 3601 uploadMedia: _uploadMedia, |
| 3602 downloadOptions: _downloadOptions); |
| 3603 return _response.then((data) => null); |
| 3604 } |
| 3605 |
| 3606 /** |
| 3607 * Returns a web property-AdWords link to which the user has access. |
| 3608 * |
| 3609 * Request parameters: |
| 3610 * |
| 3611 * [accountId] - ID of the account which the given web property belongs to. |
| 3612 * |
| 3613 * [webPropertyId] - Web property ID to retrieve the AdWords link for. |
| 3614 * |
| 3615 * [webPropertyAdWordsLinkId] - Web property-AdWords link ID. |
| 3616 * |
| 3617 * Completes with a [EntityAdWordsLink]. |
| 3618 * |
| 3619 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 3620 * error. |
| 3621 * |
| 3622 * If the used [http.Client] completes with an error when making a REST call, |
| 3623 * this method will complete with the same error. |
| 3624 */ |
| 3625 async.Future<EntityAdWordsLink> get(core.String accountId, core.String webProp
ertyId, core.String webPropertyAdWordsLinkId) { |
| 3626 var _url = null; |
| 3627 var _queryParams = new core.Map(); |
| 3628 var _uploadMedia = null; |
| 3629 var _uploadOptions = null; |
| 3630 var _downloadOptions = common.DownloadOptions.Metadata; |
| 3631 var _body = null; |
| 3632 |
| 3633 if (accountId == null) { |
| 3634 throw new core.ArgumentError("Parameter accountId is required."); |
| 3635 } |
| 3636 if (webPropertyId == null) { |
| 3637 throw new core.ArgumentError("Parameter webPropertyId is required."); |
| 3638 } |
| 3639 if (webPropertyAdWordsLinkId == null) { |
| 3640 throw new core.ArgumentError("Parameter webPropertyAdWordsLinkId is requir
ed."); |
| 3641 } |
| 3642 |
| 3643 |
| 3644 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/webproperties/' + common_internal.Escaper.ecapeVariable('$webPropert
yId') + '/entityAdWordsLinks/' + common_internal.Escaper.ecapeVariable('$webProp
ertyAdWordsLinkId'); |
| 3645 |
| 3646 var _response = _requester.request(_url, |
| 3647 "GET", |
| 3648 body: _body, |
| 3649 queryParams: _queryParams, |
| 3650 uploadOptions: _uploadOptions, |
| 3651 uploadMedia: _uploadMedia, |
| 3652 downloadOptions: _downloadOptions); |
| 3653 return _response.then((data) => new EntityAdWordsLink.fromJson(data)); |
| 3654 } |
| 3655 |
| 3656 /** |
| 3657 * Creates a webProperty-AdWords link. |
| 3658 * |
| 3659 * [request] - The metadata request object. |
| 3660 * |
| 3661 * Request parameters: |
| 3662 * |
| 3663 * [accountId] - ID of the Google Analytics account to create the link for. |
| 3664 * |
| 3665 * [webPropertyId] - Web property ID to create the link for. |
| 3666 * |
| 3667 * Completes with a [EntityAdWordsLink]. |
| 3668 * |
| 3669 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 3670 * error. |
| 3671 * |
| 3672 * If the used [http.Client] completes with an error when making a REST call, |
| 3673 * this method will complete with the same error. |
| 3674 */ |
| 3675 async.Future<EntityAdWordsLink> insert(EntityAdWordsLink request, core.String
accountId, core.String webPropertyId) { |
| 3676 var _url = null; |
| 3677 var _queryParams = new core.Map(); |
| 3678 var _uploadMedia = null; |
| 3679 var _uploadOptions = null; |
| 3680 var _downloadOptions = common.DownloadOptions.Metadata; |
| 3681 var _body = null; |
| 3682 |
| 3683 if (request != null) { |
| 3684 _body = convert.JSON.encode((request).toJson()); |
| 3685 } |
| 3686 if (accountId == null) { |
| 3687 throw new core.ArgumentError("Parameter accountId is required."); |
| 3688 } |
| 3689 if (webPropertyId == null) { |
| 3690 throw new core.ArgumentError("Parameter webPropertyId is required."); |
| 3691 } |
| 3692 |
| 3693 |
| 3694 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/webproperties/' + common_internal.Escaper.ecapeVariable('$webPropert
yId') + '/entityAdWordsLinks'; |
| 3695 |
| 3696 var _response = _requester.request(_url, |
| 3697 "POST", |
| 3698 body: _body, |
| 3699 queryParams: _queryParams, |
| 3700 uploadOptions: _uploadOptions, |
| 3701 uploadMedia: _uploadMedia, |
| 3702 downloadOptions: _downloadOptions); |
| 3703 return _response.then((data) => new EntityAdWordsLink.fromJson(data)); |
| 3704 } |
| 3705 |
| 3706 /** |
| 3707 * Lists webProperty-AdWords links for a given web property. |
| 3708 * |
| 3709 * Request parameters: |
| 3710 * |
| 3711 * [accountId] - ID of the account which the given web property belongs to. |
| 3712 * Value must have pattern "\d+". |
| 3713 * |
| 3714 * [webPropertyId] - Web property ID to retrieve the AdWords links for. |
| 3715 * |
| 3716 * [max_results] - The maximum number of webProperty-AdWords links to include |
| 3717 * in this response. |
| 3718 * |
| 3719 * [start_index] - An index of the first webProperty-AdWords link to retrieve. |
| 3720 * Use this parameter as a pagination mechanism along with the max-results |
| 3721 * parameter. |
| 3722 * |
| 3723 * Completes with a [EntityAdWordsLinks]. |
| 3724 * |
| 3725 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 3726 * error. |
| 3727 * |
| 3728 * If the used [http.Client] completes with an error when making a REST call, |
| 3729 * this method will complete with the same error. |
| 3730 */ |
| 3731 async.Future<EntityAdWordsLinks> list(core.String accountId, core.String webPr
opertyId, {core.int max_results, core.int start_index}) { |
| 3732 var _url = null; |
| 3733 var _queryParams = new core.Map(); |
| 3734 var _uploadMedia = null; |
| 3735 var _uploadOptions = null; |
| 3736 var _downloadOptions = common.DownloadOptions.Metadata; |
| 3737 var _body = null; |
| 3738 |
| 3739 if (accountId == null) { |
| 3740 throw new core.ArgumentError("Parameter accountId is required."); |
| 3741 } |
| 3742 if (webPropertyId == null) { |
| 3743 throw new core.ArgumentError("Parameter webPropertyId is required."); |
| 3744 } |
| 3745 if (max_results != null) { |
| 3746 _queryParams["max-results"] = ["${max_results}"]; |
| 3747 } |
| 3748 if (start_index != null) { |
| 3749 _queryParams["start-index"] = ["${start_index}"]; |
| 3750 } |
| 3751 |
| 3752 |
| 3753 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/webproperties/' + common_internal.Escaper.ecapeVariable('$webPropert
yId') + '/entityAdWordsLinks'; |
| 3754 |
| 3755 var _response = _requester.request(_url, |
| 3756 "GET", |
| 3757 body: _body, |
| 3758 queryParams: _queryParams, |
| 3759 uploadOptions: _uploadOptions, |
| 3760 uploadMedia: _uploadMedia, |
| 3761 downloadOptions: _downloadOptions); |
| 3762 return _response.then((data) => new EntityAdWordsLinks.fromJson(data)); |
| 3763 } |
| 3764 |
| 3765 /** |
| 3766 * Updates an existing webProperty-AdWords link. This method supports patch |
| 3767 * semantics. |
| 3768 * |
| 3769 * [request] - The metadata request object. |
| 3770 * |
| 3771 * Request parameters: |
| 3772 * |
| 3773 * [accountId] - ID of the account which the given web property belongs to. |
| 3774 * |
| 3775 * [webPropertyId] - Web property ID to retrieve the AdWords link for. |
| 3776 * |
| 3777 * [webPropertyAdWordsLinkId] - Web property-AdWords link ID. |
| 3778 * |
| 3779 * Completes with a [EntityAdWordsLink]. |
| 3780 * |
| 3781 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 3782 * error. |
| 3783 * |
| 3784 * If the used [http.Client] completes with an error when making a REST call, |
| 3785 * this method will complete with the same error. |
| 3786 */ |
| 3787 async.Future<EntityAdWordsLink> patch(EntityAdWordsLink request, core.String a
ccountId, core.String webPropertyId, core.String webPropertyAdWordsLinkId) { |
| 3788 var _url = null; |
| 3789 var _queryParams = new core.Map(); |
| 3790 var _uploadMedia = null; |
| 3791 var _uploadOptions = null; |
| 3792 var _downloadOptions = common.DownloadOptions.Metadata; |
| 3793 var _body = null; |
| 3794 |
| 3795 if (request != null) { |
| 3796 _body = convert.JSON.encode((request).toJson()); |
| 3797 } |
| 3798 if (accountId == null) { |
| 3799 throw new core.ArgumentError("Parameter accountId is required."); |
| 3800 } |
| 3801 if (webPropertyId == null) { |
| 3802 throw new core.ArgumentError("Parameter webPropertyId is required."); |
| 3803 } |
| 3804 if (webPropertyAdWordsLinkId == null) { |
| 3805 throw new core.ArgumentError("Parameter webPropertyAdWordsLinkId is requir
ed."); |
| 3806 } |
| 3807 |
| 3808 |
| 3809 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/webproperties/' + common_internal.Escaper.ecapeVariable('$webPropert
yId') + '/entityAdWordsLinks/' + common_internal.Escaper.ecapeVariable('$webProp
ertyAdWordsLinkId'); |
| 3810 |
| 3811 var _response = _requester.request(_url, |
| 3812 "PATCH", |
| 3813 body: _body, |
| 3814 queryParams: _queryParams, |
| 3815 uploadOptions: _uploadOptions, |
| 3816 uploadMedia: _uploadMedia, |
| 3817 downloadOptions: _downloadOptions); |
| 3818 return _response.then((data) => new EntityAdWordsLink.fromJson(data)); |
| 3819 } |
| 3820 |
| 3821 /** |
| 3822 * Updates an existing webProperty-AdWords link. |
| 3823 * |
| 3824 * [request] - The metadata request object. |
| 3825 * |
| 3826 * Request parameters: |
| 3827 * |
| 3828 * [accountId] - ID of the account which the given web property belongs to. |
| 3829 * |
| 3830 * [webPropertyId] - Web property ID to retrieve the AdWords link for. |
| 3831 * |
| 3832 * [webPropertyAdWordsLinkId] - Web property-AdWords link ID. |
| 3833 * |
| 3834 * Completes with a [EntityAdWordsLink]. |
| 3835 * |
| 3836 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 3837 * error. |
| 3838 * |
| 3839 * If the used [http.Client] completes with an error when making a REST call, |
| 3840 * this method will complete with the same error. |
| 3841 */ |
| 3842 async.Future<EntityAdWordsLink> update(EntityAdWordsLink request, core.String
accountId, core.String webPropertyId, core.String webPropertyAdWordsLinkId) { |
| 3843 var _url = null; |
| 3844 var _queryParams = new core.Map(); |
| 3845 var _uploadMedia = null; |
| 3846 var _uploadOptions = null; |
| 3847 var _downloadOptions = common.DownloadOptions.Metadata; |
| 3848 var _body = null; |
| 3849 |
| 3850 if (request != null) { |
| 3851 _body = convert.JSON.encode((request).toJson()); |
| 3852 } |
| 3853 if (accountId == null) { |
| 3854 throw new core.ArgumentError("Parameter accountId is required."); |
| 3855 } |
| 3856 if (webPropertyId == null) { |
| 3857 throw new core.ArgumentError("Parameter webPropertyId is required."); |
| 3858 } |
| 3859 if (webPropertyAdWordsLinkId == null) { |
| 3860 throw new core.ArgumentError("Parameter webPropertyAdWordsLinkId is requir
ed."); |
| 3861 } |
| 3862 |
| 3863 |
| 3864 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/webproperties/' + common_internal.Escaper.ecapeVariable('$webPropert
yId') + '/entityAdWordsLinks/' + common_internal.Escaper.ecapeVariable('$webProp
ertyAdWordsLinkId'); |
| 3865 |
| 3866 var _response = _requester.request(_url, |
| 3867 "PUT", |
| 3868 body: _body, |
| 3869 queryParams: _queryParams, |
| 3870 uploadOptions: _uploadOptions, |
| 3871 uploadMedia: _uploadMedia, |
| 3872 downloadOptions: _downloadOptions); |
| 3873 return _response.then((data) => new EntityAdWordsLink.fromJson(data)); |
| 3874 } |
| 3875 |
| 3876 } |
| 3877 |
| 3878 |
| 3879 /** Not documented yet. */ |
| 3880 class ManagementWebpropertiesResourceApi { |
| 3881 final common_internal.ApiRequester _requester; |
| 3882 |
| 3883 ManagementWebpropertiesResourceApi(common_internal.ApiRequester client) : |
| 3884 _requester = client; |
| 3885 |
| 3886 /** |
| 3887 * Gets a web property to which the user has access. |
| 3888 * |
| 3889 * Request parameters: |
| 3890 * |
| 3891 * [accountId] - Account ID to retrieve the web property for. |
| 3892 * Value must have pattern "[0-9]+". |
| 3893 * |
| 3894 * [webPropertyId] - ID to retrieve the web property for. |
| 3895 * Value must have pattern "UA-[0-9]+-[0-9]+". |
| 3896 * |
| 3897 * Completes with a [Webproperty]. |
| 3898 * |
| 3899 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 3900 * error. |
| 3901 * |
| 3902 * If the used [http.Client] completes with an error when making a REST call, |
| 3903 * this method will complete with the same error. |
| 3904 */ |
| 3905 async.Future<Webproperty> get(core.String accountId, core.String webPropertyId
) { |
| 3906 var _url = null; |
| 3907 var _queryParams = new core.Map(); |
| 3908 var _uploadMedia = null; |
| 3909 var _uploadOptions = null; |
| 3910 var _downloadOptions = common.DownloadOptions.Metadata; |
| 3911 var _body = null; |
| 3912 |
| 3913 if (accountId == null) { |
| 3914 throw new core.ArgumentError("Parameter accountId is required."); |
| 3915 } |
| 3916 if (webPropertyId == null) { |
| 3917 throw new core.ArgumentError("Parameter webPropertyId is required."); |
| 3918 } |
| 3919 |
| 3920 |
| 3921 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/webproperties/' + common_internal.Escaper.ecapeVariable('$webPropert
yId'); |
| 3922 |
| 3923 var _response = _requester.request(_url, |
| 3924 "GET", |
| 3925 body: _body, |
| 3926 queryParams: _queryParams, |
| 3927 uploadOptions: _uploadOptions, |
| 3928 uploadMedia: _uploadMedia, |
| 3929 downloadOptions: _downloadOptions); |
| 3930 return _response.then((data) => new Webproperty.fromJson(data)); |
| 3931 } |
| 3932 |
| 3933 /** |
| 3934 * Create a new property if the account has fewer than 20 properties. Web |
| 3935 * properties are visible in the Google Analytics interface only if they have |
| 3936 * at least one profile. |
| 3937 * |
| 3938 * [request] - The metadata request object. |
| 3939 * |
| 3940 * Request parameters: |
| 3941 * |
| 3942 * [accountId] - Account ID to create the web property for. |
| 3943 * |
| 3944 * Completes with a [Webproperty]. |
| 3945 * |
| 3946 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 3947 * error. |
| 3948 * |
| 3949 * If the used [http.Client] completes with an error when making a REST call, |
| 3950 * this method will complete with the same error. |
| 3951 */ |
| 3952 async.Future<Webproperty> insert(Webproperty request, core.String accountId) { |
| 3953 var _url = null; |
| 3954 var _queryParams = new core.Map(); |
| 3955 var _uploadMedia = null; |
| 3956 var _uploadOptions = null; |
| 3957 var _downloadOptions = common.DownloadOptions.Metadata; |
| 3958 var _body = null; |
| 3959 |
| 3960 if (request != null) { |
| 3961 _body = convert.JSON.encode((request).toJson()); |
| 3962 } |
| 3963 if (accountId == null) { |
| 3964 throw new core.ArgumentError("Parameter accountId is required."); |
| 3965 } |
| 3966 |
| 3967 |
| 3968 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/webproperties'; |
| 3969 |
| 3970 var _response = _requester.request(_url, |
| 3971 "POST", |
| 3972 body: _body, |
| 3973 queryParams: _queryParams, |
| 3974 uploadOptions: _uploadOptions, |
| 3975 uploadMedia: _uploadMedia, |
| 3976 downloadOptions: _downloadOptions); |
| 3977 return _response.then((data) => new Webproperty.fromJson(data)); |
| 3978 } |
| 3979 |
| 3980 /** |
| 3981 * Lists web properties to which the user has access. |
| 3982 * |
| 3983 * Request parameters: |
| 3984 * |
| 3985 * [accountId] - Account ID to retrieve web properties for. Can either be a |
| 3986 * specific account ID or '~all', which refers to all the accounts that user |
| 3987 * has access to. |
| 3988 * |
| 3989 * [max_results] - The maximum number of web properties to include in this |
| 3990 * response. |
| 3991 * |
| 3992 * [start_index] - An index of the first entity to retrieve. Use this |
| 3993 * parameter as a pagination mechanism along with the max-results parameter. |
| 3994 * |
| 3995 * Completes with a [Webproperties]. |
| 3996 * |
| 3997 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 3998 * error. |
| 3999 * |
| 4000 * If the used [http.Client] completes with an error when making a REST call, |
| 4001 * this method will complete with the same error. |
| 4002 */ |
| 4003 async.Future<Webproperties> list(core.String accountId, {core.int max_results,
core.int start_index}) { |
| 4004 var _url = null; |
| 4005 var _queryParams = new core.Map(); |
| 4006 var _uploadMedia = null; |
| 4007 var _uploadOptions = null; |
| 4008 var _downloadOptions = common.DownloadOptions.Metadata; |
| 4009 var _body = null; |
| 4010 |
| 4011 if (accountId == null) { |
| 4012 throw new core.ArgumentError("Parameter accountId is required."); |
| 4013 } |
| 4014 if (max_results != null) { |
| 4015 _queryParams["max-results"] = ["${max_results}"]; |
| 4016 } |
| 4017 if (start_index != null) { |
| 4018 _queryParams["start-index"] = ["${start_index}"]; |
| 4019 } |
| 4020 |
| 4021 |
| 4022 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/webproperties'; |
| 4023 |
| 4024 var _response = _requester.request(_url, |
| 4025 "GET", |
| 4026 body: _body, |
| 4027 queryParams: _queryParams, |
| 4028 uploadOptions: _uploadOptions, |
| 4029 uploadMedia: _uploadMedia, |
| 4030 downloadOptions: _downloadOptions); |
| 4031 return _response.then((data) => new Webproperties.fromJson(data)); |
| 4032 } |
| 4033 |
| 4034 /** |
| 4035 * Updates an existing web property. This method supports patch semantics. |
| 4036 * |
| 4037 * [request] - The metadata request object. |
| 4038 * |
| 4039 * Request parameters: |
| 4040 * |
| 4041 * [accountId] - Account ID to which the web property belongs |
| 4042 * |
| 4043 * [webPropertyId] - Web property ID |
| 4044 * |
| 4045 * Completes with a [Webproperty]. |
| 4046 * |
| 4047 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 4048 * error. |
| 4049 * |
| 4050 * If the used [http.Client] completes with an error when making a REST call, |
| 4051 * this method will complete with the same error. |
| 4052 */ |
| 4053 async.Future<Webproperty> patch(Webproperty request, core.String accountId, co
re.String webPropertyId) { |
| 4054 var _url = null; |
| 4055 var _queryParams = new core.Map(); |
| 4056 var _uploadMedia = null; |
| 4057 var _uploadOptions = null; |
| 4058 var _downloadOptions = common.DownloadOptions.Metadata; |
| 4059 var _body = null; |
| 4060 |
| 4061 if (request != null) { |
| 4062 _body = convert.JSON.encode((request).toJson()); |
| 4063 } |
| 4064 if (accountId == null) { |
| 4065 throw new core.ArgumentError("Parameter accountId is required."); |
| 4066 } |
| 4067 if (webPropertyId == null) { |
| 4068 throw new core.ArgumentError("Parameter webPropertyId is required."); |
| 4069 } |
| 4070 |
| 4071 |
| 4072 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/webproperties/' + common_internal.Escaper.ecapeVariable('$webPropert
yId'); |
| 4073 |
| 4074 var _response = _requester.request(_url, |
| 4075 "PATCH", |
| 4076 body: _body, |
| 4077 queryParams: _queryParams, |
| 4078 uploadOptions: _uploadOptions, |
| 4079 uploadMedia: _uploadMedia, |
| 4080 downloadOptions: _downloadOptions); |
| 4081 return _response.then((data) => new Webproperty.fromJson(data)); |
| 4082 } |
| 4083 |
| 4084 /** |
| 4085 * Updates an existing web property. |
| 4086 * |
| 4087 * [request] - The metadata request object. |
| 4088 * |
| 4089 * Request parameters: |
| 4090 * |
| 4091 * [accountId] - Account ID to which the web property belongs |
| 4092 * |
| 4093 * [webPropertyId] - Web property ID |
| 4094 * |
| 4095 * Completes with a [Webproperty]. |
| 4096 * |
| 4097 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 4098 * error. |
| 4099 * |
| 4100 * If the used [http.Client] completes with an error when making a REST call, |
| 4101 * this method will complete with the same error. |
| 4102 */ |
| 4103 async.Future<Webproperty> update(Webproperty request, core.String accountId, c
ore.String webPropertyId) { |
| 4104 var _url = null; |
| 4105 var _queryParams = new core.Map(); |
| 4106 var _uploadMedia = null; |
| 4107 var _uploadOptions = null; |
| 4108 var _downloadOptions = common.DownloadOptions.Metadata; |
| 4109 var _body = null; |
| 4110 |
| 4111 if (request != null) { |
| 4112 _body = convert.JSON.encode((request).toJson()); |
| 4113 } |
| 4114 if (accountId == null) { |
| 4115 throw new core.ArgumentError("Parameter accountId is required."); |
| 4116 } |
| 4117 if (webPropertyId == null) { |
| 4118 throw new core.ArgumentError("Parameter webPropertyId is required."); |
| 4119 } |
| 4120 |
| 4121 |
| 4122 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/webproperties/' + common_internal.Escaper.ecapeVariable('$webPropert
yId'); |
| 4123 |
| 4124 var _response = _requester.request(_url, |
| 4125 "PUT", |
| 4126 body: _body, |
| 4127 queryParams: _queryParams, |
| 4128 uploadOptions: _uploadOptions, |
| 4129 uploadMedia: _uploadMedia, |
| 4130 downloadOptions: _downloadOptions); |
| 4131 return _response.then((data) => new Webproperty.fromJson(data)); |
| 4132 } |
| 4133 |
| 4134 } |
| 4135 |
| 4136 |
| 4137 /** Not documented yet. */ |
| 4138 class ManagementWebpropertyUserLinksResourceApi { |
| 4139 final common_internal.ApiRequester _requester; |
| 4140 |
| 4141 ManagementWebpropertyUserLinksResourceApi(common_internal.ApiRequester client)
: |
| 4142 _requester = client; |
| 4143 |
| 4144 /** |
| 4145 * Removes a user from the given web property. |
| 4146 * |
| 4147 * Request parameters: |
| 4148 * |
| 4149 * [accountId] - Account ID to delete the user link for. |
| 4150 * |
| 4151 * [webPropertyId] - Web Property ID to delete the user link for. |
| 4152 * |
| 4153 * [linkId] - Link ID to delete the user link for. |
| 4154 * |
| 4155 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 4156 * error. |
| 4157 * |
| 4158 * If the used [http.Client] completes with an error when making a REST call, |
| 4159 * this method will complete with the same error. |
| 4160 */ |
| 4161 async.Future delete(core.String accountId, core.String webPropertyId, core.Str
ing linkId) { |
| 4162 var _url = null; |
| 4163 var _queryParams = new core.Map(); |
| 4164 var _uploadMedia = null; |
| 4165 var _uploadOptions = null; |
| 4166 var _downloadOptions = common.DownloadOptions.Metadata; |
| 4167 var _body = null; |
| 4168 |
| 4169 if (accountId == null) { |
| 4170 throw new core.ArgumentError("Parameter accountId is required."); |
| 4171 } |
| 4172 if (webPropertyId == null) { |
| 4173 throw new core.ArgumentError("Parameter webPropertyId is required."); |
| 4174 } |
| 4175 if (linkId == null) { |
| 4176 throw new core.ArgumentError("Parameter linkId is required."); |
| 4177 } |
| 4178 |
| 4179 _downloadOptions = null; |
| 4180 |
| 4181 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/webproperties/' + common_internal.Escaper.ecapeVariable('$webPropert
yId') + '/entityUserLinks/' + common_internal.Escaper.ecapeVariable('$linkId'); |
| 4182 |
| 4183 var _response = _requester.request(_url, |
| 4184 "DELETE", |
| 4185 body: _body, |
| 4186 queryParams: _queryParams, |
| 4187 uploadOptions: _uploadOptions, |
| 4188 uploadMedia: _uploadMedia, |
| 4189 downloadOptions: _downloadOptions); |
| 4190 return _response.then((data) => null); |
| 4191 } |
| 4192 |
| 4193 /** |
| 4194 * Adds a new user to the given web property. |
| 4195 * |
| 4196 * [request] - The metadata request object. |
| 4197 * |
| 4198 * Request parameters: |
| 4199 * |
| 4200 * [accountId] - Account ID to create the user link for. |
| 4201 * |
| 4202 * [webPropertyId] - Web Property ID to create the user link for. |
| 4203 * |
| 4204 * Completes with a [EntityUserLink]. |
| 4205 * |
| 4206 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 4207 * error. |
| 4208 * |
| 4209 * If the used [http.Client] completes with an error when making a REST call, |
| 4210 * this method will complete with the same error. |
| 4211 */ |
| 4212 async.Future<EntityUserLink> insert(EntityUserLink request, core.String accoun
tId, core.String webPropertyId) { |
| 4213 var _url = null; |
| 4214 var _queryParams = new core.Map(); |
| 4215 var _uploadMedia = null; |
| 4216 var _uploadOptions = null; |
| 4217 var _downloadOptions = common.DownloadOptions.Metadata; |
| 4218 var _body = null; |
| 4219 |
| 4220 if (request != null) { |
| 4221 _body = convert.JSON.encode((request).toJson()); |
| 4222 } |
| 4223 if (accountId == null) { |
| 4224 throw new core.ArgumentError("Parameter accountId is required."); |
| 4225 } |
| 4226 if (webPropertyId == null) { |
| 4227 throw new core.ArgumentError("Parameter webPropertyId is required."); |
| 4228 } |
| 4229 |
| 4230 |
| 4231 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/webproperties/' + common_internal.Escaper.ecapeVariable('$webPropert
yId') + '/entityUserLinks'; |
| 4232 |
| 4233 var _response = _requester.request(_url, |
| 4234 "POST", |
| 4235 body: _body, |
| 4236 queryParams: _queryParams, |
| 4237 uploadOptions: _uploadOptions, |
| 4238 uploadMedia: _uploadMedia, |
| 4239 downloadOptions: _downloadOptions); |
| 4240 return _response.then((data) => new EntityUserLink.fromJson(data)); |
| 4241 } |
| 4242 |
| 4243 /** |
| 4244 * Lists webProperty-user links for a given web property. |
| 4245 * |
| 4246 * Request parameters: |
| 4247 * |
| 4248 * [accountId] - Account ID which the given web property belongs to. |
| 4249 * |
| 4250 * [webPropertyId] - Web Property ID for the webProperty-user links to |
| 4251 * retrieve. Can either be a specific web property ID or '~all', which refers |
| 4252 * to all the web properties that user has access to. |
| 4253 * |
| 4254 * [max_results] - The maximum number of webProperty-user Links to include in |
| 4255 * this response. |
| 4256 * |
| 4257 * [start_index] - An index of the first webProperty-user link to retrieve. |
| 4258 * Use this parameter as a pagination mechanism along with the max-results |
| 4259 * parameter. |
| 4260 * |
| 4261 * Completes with a [EntityUserLinks]. |
| 4262 * |
| 4263 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 4264 * error. |
| 4265 * |
| 4266 * If the used [http.Client] completes with an error when making a REST call, |
| 4267 * this method will complete with the same error. |
| 4268 */ |
| 4269 async.Future<EntityUserLinks> list(core.String accountId, core.String webPrope
rtyId, {core.int max_results, core.int start_index}) { |
| 4270 var _url = null; |
| 4271 var _queryParams = new core.Map(); |
| 4272 var _uploadMedia = null; |
| 4273 var _uploadOptions = null; |
| 4274 var _downloadOptions = common.DownloadOptions.Metadata; |
| 4275 var _body = null; |
| 4276 |
| 4277 if (accountId == null) { |
| 4278 throw new core.ArgumentError("Parameter accountId is required."); |
| 4279 } |
| 4280 if (webPropertyId == null) { |
| 4281 throw new core.ArgumentError("Parameter webPropertyId is required."); |
| 4282 } |
| 4283 if (max_results != null) { |
| 4284 _queryParams["max-results"] = ["${max_results}"]; |
| 4285 } |
| 4286 if (start_index != null) { |
| 4287 _queryParams["start-index"] = ["${start_index}"]; |
| 4288 } |
| 4289 |
| 4290 |
| 4291 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/webproperties/' + common_internal.Escaper.ecapeVariable('$webPropert
yId') + '/entityUserLinks'; |
| 4292 |
| 4293 var _response = _requester.request(_url, |
| 4294 "GET", |
| 4295 body: _body, |
| 4296 queryParams: _queryParams, |
| 4297 uploadOptions: _uploadOptions, |
| 4298 uploadMedia: _uploadMedia, |
| 4299 downloadOptions: _downloadOptions); |
| 4300 return _response.then((data) => new EntityUserLinks.fromJson(data)); |
| 4301 } |
| 4302 |
| 4303 /** |
| 4304 * Updates permissions for an existing user on the given web property. |
| 4305 * |
| 4306 * [request] - The metadata request object. |
| 4307 * |
| 4308 * Request parameters: |
| 4309 * |
| 4310 * [accountId] - Account ID to update the account-user link for. |
| 4311 * |
| 4312 * [webPropertyId] - Web property ID to update the account-user link for. |
| 4313 * |
| 4314 * [linkId] - Link ID to update the account-user link for. |
| 4315 * |
| 4316 * Completes with a [EntityUserLink]. |
| 4317 * |
| 4318 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 4319 * error. |
| 4320 * |
| 4321 * If the used [http.Client] completes with an error when making a REST call, |
| 4322 * this method will complete with the same error. |
| 4323 */ |
| 4324 async.Future<EntityUserLink> update(EntityUserLink request, core.String accoun
tId, core.String webPropertyId, core.String linkId) { |
| 4325 var _url = null; |
| 4326 var _queryParams = new core.Map(); |
| 4327 var _uploadMedia = null; |
| 4328 var _uploadOptions = null; |
| 4329 var _downloadOptions = common.DownloadOptions.Metadata; |
| 4330 var _body = null; |
| 4331 |
| 4332 if (request != null) { |
| 4333 _body = convert.JSON.encode((request).toJson()); |
| 4334 } |
| 4335 if (accountId == null) { |
| 4336 throw new core.ArgumentError("Parameter accountId is required."); |
| 4337 } |
| 4338 if (webPropertyId == null) { |
| 4339 throw new core.ArgumentError("Parameter webPropertyId is required."); |
| 4340 } |
| 4341 if (linkId == null) { |
| 4342 throw new core.ArgumentError("Parameter linkId is required."); |
| 4343 } |
| 4344 |
| 4345 |
| 4346 _url = 'management/accounts/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/webproperties/' + common_internal.Escaper.ecapeVariable('$webPropert
yId') + '/entityUserLinks/' + common_internal.Escaper.ecapeVariable('$linkId'); |
| 4347 |
| 4348 var _response = _requester.request(_url, |
| 4349 "PUT", |
| 4350 body: _body, |
| 4351 queryParams: _queryParams, |
| 4352 uploadOptions: _uploadOptions, |
| 4353 uploadMedia: _uploadMedia, |
| 4354 downloadOptions: _downloadOptions); |
| 4355 return _response.then((data) => new EntityUserLink.fromJson(data)); |
| 4356 } |
| 4357 |
| 4358 } |
| 4359 |
| 4360 |
| 4361 /** Not documented yet. */ |
| 4362 class MetadataResourceApi { |
| 4363 final common_internal.ApiRequester _requester; |
| 4364 |
| 4365 MetadataColumnsResourceApi get columns => new MetadataColumnsResourceApi(_requ
ester); |
| 4366 |
| 4367 MetadataResourceApi(common_internal.ApiRequester client) : |
| 4368 _requester = client; |
| 4369 } |
| 4370 |
| 4371 |
| 4372 /** Not documented yet. */ |
| 4373 class MetadataColumnsResourceApi { |
| 4374 final common_internal.ApiRequester _requester; |
| 4375 |
| 4376 MetadataColumnsResourceApi(common_internal.ApiRequester client) : |
| 4377 _requester = client; |
| 4378 |
| 4379 /** |
| 4380 * Lists all columns for a report type |
| 4381 * |
| 4382 * Request parameters: |
| 4383 * |
| 4384 * [reportType] - Report type. Allowed Values: 'ga'. Where 'ga' corresponds to |
| 4385 * the Core Reporting API |
| 4386 * Value must have pattern "ga". |
| 4387 * |
| 4388 * Completes with a [Columns]. |
| 4389 * |
| 4390 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 4391 * error. |
| 4392 * |
| 4393 * If the used [http.Client] completes with an error when making a REST call, |
| 4394 * this method will complete with the same error. |
| 4395 */ |
| 4396 async.Future<Columns> list(core.String reportType) { |
| 4397 var _url = null; |
| 4398 var _queryParams = new core.Map(); |
| 4399 var _uploadMedia = null; |
| 4400 var _uploadOptions = null; |
| 4401 var _downloadOptions = common.DownloadOptions.Metadata; |
| 4402 var _body = null; |
| 4403 |
| 4404 if (reportType == null) { |
| 4405 throw new core.ArgumentError("Parameter reportType is required."); |
| 4406 } |
| 4407 |
| 4408 |
| 4409 _url = 'metadata/' + common_internal.Escaper.ecapeVariable('$reportType') +
'/columns'; |
| 4410 |
| 4411 var _response = _requester.request(_url, |
| 4412 "GET", |
| 4413 body: _body, |
| 4414 queryParams: _queryParams, |
| 4415 uploadOptions: _uploadOptions, |
| 4416 uploadMedia: _uploadMedia, |
| 4417 downloadOptions: _downloadOptions); |
| 4418 return _response.then((data) => new Columns.fromJson(data)); |
| 4419 } |
| 4420 |
| 4421 } |
| 4422 |
| 4423 |
| 4424 /** Not documented yet. */ |
| 4425 class ProvisioningResourceApi { |
| 4426 final common_internal.ApiRequester _requester; |
| 4427 |
| 4428 ProvisioningResourceApi(common_internal.ApiRequester client) : |
| 4429 _requester = client; |
| 4430 |
| 4431 /** |
| 4432 * Creates an account ticket. |
| 4433 * |
| 4434 * [request] - The metadata request object. |
| 4435 * |
| 4436 * Request parameters: |
| 4437 * |
| 4438 * Completes with a [AccountTicket]. |
| 4439 * |
| 4440 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 4441 * error. |
| 4442 * |
| 4443 * If the used [http.Client] completes with an error when making a REST call, |
| 4444 * this method will complete with the same error. |
| 4445 */ |
| 4446 async.Future<AccountTicket> createAccountTicket(AccountTicket request) { |
| 4447 var _url = null; |
| 4448 var _queryParams = new core.Map(); |
| 4449 var _uploadMedia = null; |
| 4450 var _uploadOptions = null; |
| 4451 var _downloadOptions = common.DownloadOptions.Metadata; |
| 4452 var _body = null; |
| 4453 |
| 4454 if (request != null) { |
| 4455 _body = convert.JSON.encode((request).toJson()); |
| 4456 } |
| 4457 |
| 4458 |
| 4459 _url = 'provisioning/createAccountTicket'; |
| 4460 |
| 4461 var _response = _requester.request(_url, |
| 4462 "POST", |
| 4463 body: _body, |
| 4464 queryParams: _queryParams, |
| 4465 uploadOptions: _uploadOptions, |
| 4466 uploadMedia: _uploadMedia, |
| 4467 downloadOptions: _downloadOptions); |
| 4468 return _response.then((data) => new AccountTicket.fromJson(data)); |
| 4469 } |
| 4470 |
| 4471 } |
| 4472 |
| 4473 |
| 4474 |
| 4475 /** |
| 4476 * Child link for an account entry. Points to the list of web properties for |
| 4477 * this account. |
| 4478 */ |
| 4479 class AccountChildLink { |
| 4480 /** Link to the list of web properties for this account. */ |
| 4481 core.String href; |
| 4482 |
| 4483 /** Type of the child link. Its value is "analytics#webproperties". */ |
| 4484 core.String type; |
| 4485 |
| 4486 |
| 4487 AccountChildLink(); |
| 4488 |
| 4489 AccountChildLink.fromJson(core.Map _json) { |
| 4490 if (_json.containsKey("href")) { |
| 4491 href = _json["href"]; |
| 4492 } |
| 4493 if (_json.containsKey("type")) { |
| 4494 type = _json["type"]; |
| 4495 } |
| 4496 } |
| 4497 |
| 4498 core.Map toJson() { |
| 4499 var _json = new core.Map(); |
| 4500 if (href != null) { |
| 4501 _json["href"] = href; |
| 4502 } |
| 4503 if (type != null) { |
| 4504 _json["type"] = type; |
| 4505 } |
| 4506 return _json; |
| 4507 } |
| 4508 } |
| 4509 |
| 4510 |
| 4511 /** Permissions the user has for this account. */ |
| 4512 class AccountPermissions { |
| 4513 /** |
| 4514 * All the permissions that the user has for this account. These include any |
| 4515 * implied permissions (e.g., EDIT implies VIEW). |
| 4516 */ |
| 4517 core.List<core.String> effective; |
| 4518 |
| 4519 |
| 4520 AccountPermissions(); |
| 4521 |
| 4522 AccountPermissions.fromJson(core.Map _json) { |
| 4523 if (_json.containsKey("effective")) { |
| 4524 effective = _json["effective"]; |
| 4525 } |
| 4526 } |
| 4527 |
| 4528 core.Map toJson() { |
| 4529 var _json = new core.Map(); |
| 4530 if (effective != null) { |
| 4531 _json["effective"] = effective; |
| 4532 } |
| 4533 return _json; |
| 4534 } |
| 4535 } |
| 4536 |
| 4537 |
| 4538 /** JSON template for Analytics account entry. */ |
| 4539 class Account { |
| 4540 /** |
| 4541 * Child link for an account entry. Points to the list of web properties for |
| 4542 * this account. |
| 4543 */ |
| 4544 AccountChildLink childLink; |
| 4545 |
| 4546 /** Time the account was created. */ |
| 4547 core.DateTime created; |
| 4548 |
| 4549 /** Account ID. */ |
| 4550 core.String id; |
| 4551 |
| 4552 /** Resource type for Analytics account. */ |
| 4553 core.String kind; |
| 4554 |
| 4555 /** Account name. */ |
| 4556 core.String name; |
| 4557 |
| 4558 /** Permissions the user has for this account. */ |
| 4559 AccountPermissions permissions; |
| 4560 |
| 4561 /** Link for this account. */ |
| 4562 core.String selfLink; |
| 4563 |
| 4564 /** Time the account was last modified. */ |
| 4565 core.DateTime updated; |
| 4566 |
| 4567 |
| 4568 Account(); |
| 4569 |
| 4570 Account.fromJson(core.Map _json) { |
| 4571 if (_json.containsKey("childLink")) { |
| 4572 childLink = new AccountChildLink.fromJson(_json["childLink"]); |
| 4573 } |
| 4574 if (_json.containsKey("created")) { |
| 4575 created = core.DateTime.parse(_json["created"]); |
| 4576 } |
| 4577 if (_json.containsKey("id")) { |
| 4578 id = _json["id"]; |
| 4579 } |
| 4580 if (_json.containsKey("kind")) { |
| 4581 kind = _json["kind"]; |
| 4582 } |
| 4583 if (_json.containsKey("name")) { |
| 4584 name = _json["name"]; |
| 4585 } |
| 4586 if (_json.containsKey("permissions")) { |
| 4587 permissions = new AccountPermissions.fromJson(_json["permissions"]); |
| 4588 } |
| 4589 if (_json.containsKey("selfLink")) { |
| 4590 selfLink = _json["selfLink"]; |
| 4591 } |
| 4592 if (_json.containsKey("updated")) { |
| 4593 updated = core.DateTime.parse(_json["updated"]); |
| 4594 } |
| 4595 } |
| 4596 |
| 4597 core.Map toJson() { |
| 4598 var _json = new core.Map(); |
| 4599 if (childLink != null) { |
| 4600 _json["childLink"] = (childLink).toJson(); |
| 4601 } |
| 4602 if (created != null) { |
| 4603 _json["created"] = (created).toIso8601String(); |
| 4604 } |
| 4605 if (id != null) { |
| 4606 _json["id"] = id; |
| 4607 } |
| 4608 if (kind != null) { |
| 4609 _json["kind"] = kind; |
| 4610 } |
| 4611 if (name != null) { |
| 4612 _json["name"] = name; |
| 4613 } |
| 4614 if (permissions != null) { |
| 4615 _json["permissions"] = (permissions).toJson(); |
| 4616 } |
| 4617 if (selfLink != null) { |
| 4618 _json["selfLink"] = selfLink; |
| 4619 } |
| 4620 if (updated != null) { |
| 4621 _json["updated"] = (updated).toIso8601String(); |
| 4622 } |
| 4623 return _json; |
| 4624 } |
| 4625 } |
| 4626 |
| 4627 |
| 4628 /** JSON template for a linked account. */ |
| 4629 class AccountRef { |
| 4630 /** Link for this account. */ |
| 4631 core.String href; |
| 4632 |
| 4633 /** Account ID. */ |
| 4634 core.String id; |
| 4635 |
| 4636 /** Analytics account reference. */ |
| 4637 core.String kind; |
| 4638 |
| 4639 /** Account name. */ |
| 4640 core.String name; |
| 4641 |
| 4642 |
| 4643 AccountRef(); |
| 4644 |
| 4645 AccountRef.fromJson(core.Map _json) { |
| 4646 if (_json.containsKey("href")) { |
| 4647 href = _json["href"]; |
| 4648 } |
| 4649 if (_json.containsKey("id")) { |
| 4650 id = _json["id"]; |
| 4651 } |
| 4652 if (_json.containsKey("kind")) { |
| 4653 kind = _json["kind"]; |
| 4654 } |
| 4655 if (_json.containsKey("name")) { |
| 4656 name = _json["name"]; |
| 4657 } |
| 4658 } |
| 4659 |
| 4660 core.Map toJson() { |
| 4661 var _json = new core.Map(); |
| 4662 if (href != null) { |
| 4663 _json["href"] = href; |
| 4664 } |
| 4665 if (id != null) { |
| 4666 _json["id"] = id; |
| 4667 } |
| 4668 if (kind != null) { |
| 4669 _json["kind"] = kind; |
| 4670 } |
| 4671 if (name != null) { |
| 4672 _json["name"] = name; |
| 4673 } |
| 4674 return _json; |
| 4675 } |
| 4676 } |
| 4677 |
| 4678 |
| 4679 /** |
| 4680 * An AccountSummary collection lists a summary of accounts, properties and |
| 4681 * views (profiles) to which the user has access. Each resource in the |
| 4682 * collection corresponds to a single AccountSummary. |
| 4683 */ |
| 4684 class AccountSummaries { |
| 4685 /** A list of AccountSummaries. */ |
| 4686 core.List<AccountSummary> items; |
| 4687 |
| 4688 /** |
| 4689 * The maximum number of resources the response can contain, regardless of the |
| 4690 * actual number of resources returned. Its value ranges from 1 to 1000 with a |
| 4691 * value of 1000 by default, or otherwise specified by the max-results query |
| 4692 * parameter. |
| 4693 */ |
| 4694 core.int itemsPerPage; |
| 4695 |
| 4696 /** Collection type. */ |
| 4697 core.String kind; |
| 4698 |
| 4699 /** Link to next page for this AccountSummary collection. */ |
| 4700 core.String nextLink; |
| 4701 |
| 4702 /** Link to previous page for this AccountSummary collection. */ |
| 4703 core.String previousLink; |
| 4704 |
| 4705 /** |
| 4706 * The starting index of the resources, which is 1 by default or otherwise |
| 4707 * specified by the start-index query parameter. |
| 4708 */ |
| 4709 core.int startIndex; |
| 4710 |
| 4711 /** |
| 4712 * The total number of results for the query, regardless of the number of |
| 4713 * results in the response. |
| 4714 */ |
| 4715 core.int totalResults; |
| 4716 |
| 4717 /** Email ID of the authenticated user */ |
| 4718 core.String username; |
| 4719 |
| 4720 |
| 4721 AccountSummaries(); |
| 4722 |
| 4723 AccountSummaries.fromJson(core.Map _json) { |
| 4724 if (_json.containsKey("items")) { |
| 4725 items = _json["items"].map((value) => new AccountSummary.fromJson(value)).
toList(); |
| 4726 } |
| 4727 if (_json.containsKey("itemsPerPage")) { |
| 4728 itemsPerPage = _json["itemsPerPage"]; |
| 4729 } |
| 4730 if (_json.containsKey("kind")) { |
| 4731 kind = _json["kind"]; |
| 4732 } |
| 4733 if (_json.containsKey("nextLink")) { |
| 4734 nextLink = _json["nextLink"]; |
| 4735 } |
| 4736 if (_json.containsKey("previousLink")) { |
| 4737 previousLink = _json["previousLink"]; |
| 4738 } |
| 4739 if (_json.containsKey("startIndex")) { |
| 4740 startIndex = _json["startIndex"]; |
| 4741 } |
| 4742 if (_json.containsKey("totalResults")) { |
| 4743 totalResults = _json["totalResults"]; |
| 4744 } |
| 4745 if (_json.containsKey("username")) { |
| 4746 username = _json["username"]; |
| 4747 } |
| 4748 } |
| 4749 |
| 4750 core.Map toJson() { |
| 4751 var _json = new core.Map(); |
| 4752 if (items != null) { |
| 4753 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 4754 } |
| 4755 if (itemsPerPage != null) { |
| 4756 _json["itemsPerPage"] = itemsPerPage; |
| 4757 } |
| 4758 if (kind != null) { |
| 4759 _json["kind"] = kind; |
| 4760 } |
| 4761 if (nextLink != null) { |
| 4762 _json["nextLink"] = nextLink; |
| 4763 } |
| 4764 if (previousLink != null) { |
| 4765 _json["previousLink"] = previousLink; |
| 4766 } |
| 4767 if (startIndex != null) { |
| 4768 _json["startIndex"] = startIndex; |
| 4769 } |
| 4770 if (totalResults != null) { |
| 4771 _json["totalResults"] = totalResults; |
| 4772 } |
| 4773 if (username != null) { |
| 4774 _json["username"] = username; |
| 4775 } |
| 4776 return _json; |
| 4777 } |
| 4778 } |
| 4779 |
| 4780 |
| 4781 /** |
| 4782 * JSON template for an Analytics AccountSummary. An AccountSummary is a |
| 4783 * lightweight tree comprised of properties/profiles. |
| 4784 */ |
| 4785 class AccountSummary { |
| 4786 /** Account ID. */ |
| 4787 core.String id; |
| 4788 |
| 4789 /** Resource type for Analytics AccountSummary. */ |
| 4790 core.String kind; |
| 4791 |
| 4792 /** Account name. */ |
| 4793 core.String name; |
| 4794 |
| 4795 /** List of web properties under this account. */ |
| 4796 core.List<WebPropertySummary> webProperties; |
| 4797 |
| 4798 |
| 4799 AccountSummary(); |
| 4800 |
| 4801 AccountSummary.fromJson(core.Map _json) { |
| 4802 if (_json.containsKey("id")) { |
| 4803 id = _json["id"]; |
| 4804 } |
| 4805 if (_json.containsKey("kind")) { |
| 4806 kind = _json["kind"]; |
| 4807 } |
| 4808 if (_json.containsKey("name")) { |
| 4809 name = _json["name"]; |
| 4810 } |
| 4811 if (_json.containsKey("webProperties")) { |
| 4812 webProperties = _json["webProperties"].map((value) => new WebPropertySumma
ry.fromJson(value)).toList(); |
| 4813 } |
| 4814 } |
| 4815 |
| 4816 core.Map toJson() { |
| 4817 var _json = new core.Map(); |
| 4818 if (id != null) { |
| 4819 _json["id"] = id; |
| 4820 } |
| 4821 if (kind != null) { |
| 4822 _json["kind"] = kind; |
| 4823 } |
| 4824 if (name != null) { |
| 4825 _json["name"] = name; |
| 4826 } |
| 4827 if (webProperties != null) { |
| 4828 _json["webProperties"] = webProperties.map((value) => (value).toJson()).to
List(); |
| 4829 } |
| 4830 return _json; |
| 4831 } |
| 4832 } |
| 4833 |
| 4834 |
| 4835 /** |
| 4836 * JSON template for an Analytics account ticket. The account ticket consists of |
| 4837 * the ticket ID and the basic information for the account, property and |
| 4838 * profile. |
| 4839 */ |
| 4840 class AccountTicket { |
| 4841 /** Account for this ticket. */ |
| 4842 Account account; |
| 4843 |
| 4844 /** Account ticket ID used to access the account ticket. */ |
| 4845 core.String id; |
| 4846 |
| 4847 /** Resource type for account ticket. */ |
| 4848 core.String kind; |
| 4849 |
| 4850 /** View (Profile) for the account. */ |
| 4851 Profile profile; |
| 4852 |
| 4853 /** |
| 4854 * Redirect URI where the user will be sent after accepting Terms of Service. |
| 4855 * Must be configured in APIs console as a callback URL. |
| 4856 */ |
| 4857 core.String redirectUri; |
| 4858 |
| 4859 /** Web property for the account. */ |
| 4860 Webproperty webproperty; |
| 4861 |
| 4862 |
| 4863 AccountTicket(); |
| 4864 |
| 4865 AccountTicket.fromJson(core.Map _json) { |
| 4866 if (_json.containsKey("account")) { |
| 4867 account = new Account.fromJson(_json["account"]); |
| 4868 } |
| 4869 if (_json.containsKey("id")) { |
| 4870 id = _json["id"]; |
| 4871 } |
| 4872 if (_json.containsKey("kind")) { |
| 4873 kind = _json["kind"]; |
| 4874 } |
| 4875 if (_json.containsKey("profile")) { |
| 4876 profile = new Profile.fromJson(_json["profile"]); |
| 4877 } |
| 4878 if (_json.containsKey("redirectUri")) { |
| 4879 redirectUri = _json["redirectUri"]; |
| 4880 } |
| 4881 if (_json.containsKey("webproperty")) { |
| 4882 webproperty = new Webproperty.fromJson(_json["webproperty"]); |
| 4883 } |
| 4884 } |
| 4885 |
| 4886 core.Map toJson() { |
| 4887 var _json = new core.Map(); |
| 4888 if (account != null) { |
| 4889 _json["account"] = (account).toJson(); |
| 4890 } |
| 4891 if (id != null) { |
| 4892 _json["id"] = id; |
| 4893 } |
| 4894 if (kind != null) { |
| 4895 _json["kind"] = kind; |
| 4896 } |
| 4897 if (profile != null) { |
| 4898 _json["profile"] = (profile).toJson(); |
| 4899 } |
| 4900 if (redirectUri != null) { |
| 4901 _json["redirectUri"] = redirectUri; |
| 4902 } |
| 4903 if (webproperty != null) { |
| 4904 _json["webproperty"] = (webproperty).toJson(); |
| 4905 } |
| 4906 return _json; |
| 4907 } |
| 4908 } |
| 4909 |
| 4910 |
| 4911 /** |
| 4912 * An account collection provides a list of Analytics accounts to which a user |
| 4913 * has access. The account collection is the entry point to all management |
| 4914 * information. Each resource in the collection corresponds to a single |
| 4915 * Analytics account. |
| 4916 */ |
| 4917 class Accounts { |
| 4918 /** A list of accounts. */ |
| 4919 core.List<Account> items; |
| 4920 |
| 4921 /** |
| 4922 * The maximum number of entries the response can contain, regardless of the |
| 4923 * actual number of entries returned. Its value ranges from 1 to 1000 with a |
| 4924 * value of 1000 by default, or otherwise specified by the max-results query |
| 4925 * parameter. |
| 4926 */ |
| 4927 core.int itemsPerPage; |
| 4928 |
| 4929 /** Collection type. */ |
| 4930 core.String kind; |
| 4931 |
| 4932 /** Next link for this account collection. */ |
| 4933 core.String nextLink; |
| 4934 |
| 4935 /** Previous link for this account collection. */ |
| 4936 core.String previousLink; |
| 4937 |
| 4938 /** |
| 4939 * The starting index of the entries, which is 1 by default or otherwise |
| 4940 * specified by the start-index query parameter. |
| 4941 */ |
| 4942 core.int startIndex; |
| 4943 |
| 4944 /** |
| 4945 * The total number of results for the query, regardless of the number of |
| 4946 * results in the response. |
| 4947 */ |
| 4948 core.int totalResults; |
| 4949 |
| 4950 /** Email ID of the authenticated user */ |
| 4951 core.String username; |
| 4952 |
| 4953 |
| 4954 Accounts(); |
| 4955 |
| 4956 Accounts.fromJson(core.Map _json) { |
| 4957 if (_json.containsKey("items")) { |
| 4958 items = _json["items"].map((value) => new Account.fromJson(value)).toList(
); |
| 4959 } |
| 4960 if (_json.containsKey("itemsPerPage")) { |
| 4961 itemsPerPage = _json["itemsPerPage"]; |
| 4962 } |
| 4963 if (_json.containsKey("kind")) { |
| 4964 kind = _json["kind"]; |
| 4965 } |
| 4966 if (_json.containsKey("nextLink")) { |
| 4967 nextLink = _json["nextLink"]; |
| 4968 } |
| 4969 if (_json.containsKey("previousLink")) { |
| 4970 previousLink = _json["previousLink"]; |
| 4971 } |
| 4972 if (_json.containsKey("startIndex")) { |
| 4973 startIndex = _json["startIndex"]; |
| 4974 } |
| 4975 if (_json.containsKey("totalResults")) { |
| 4976 totalResults = _json["totalResults"]; |
| 4977 } |
| 4978 if (_json.containsKey("username")) { |
| 4979 username = _json["username"]; |
| 4980 } |
| 4981 } |
| 4982 |
| 4983 core.Map toJson() { |
| 4984 var _json = new core.Map(); |
| 4985 if (items != null) { |
| 4986 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 4987 } |
| 4988 if (itemsPerPage != null) { |
| 4989 _json["itemsPerPage"] = itemsPerPage; |
| 4990 } |
| 4991 if (kind != null) { |
| 4992 _json["kind"] = kind; |
| 4993 } |
| 4994 if (nextLink != null) { |
| 4995 _json["nextLink"] = nextLink; |
| 4996 } |
| 4997 if (previousLink != null) { |
| 4998 _json["previousLink"] = previousLink; |
| 4999 } |
| 5000 if (startIndex != null) { |
| 5001 _json["startIndex"] = startIndex; |
| 5002 } |
| 5003 if (totalResults != null) { |
| 5004 _json["totalResults"] = totalResults; |
| 5005 } |
| 5006 if (username != null) { |
| 5007 _json["username"] = username; |
| 5008 } |
| 5009 return _json; |
| 5010 } |
| 5011 } |
| 5012 |
| 5013 |
| 5014 /** JSON template for an AdWords account. */ |
| 5015 class AdWordsAccount { |
| 5016 /** |
| 5017 * True if auto-tagging is enabled on the AdWords account. Read-only after the |
| 5018 * insert operation. |
| 5019 */ |
| 5020 core.bool autoTaggingEnabled; |
| 5021 |
| 5022 /** Customer ID. This field is required when creating an AdWords link. */ |
| 5023 core.String customerId; |
| 5024 |
| 5025 /** Resource type for AdWords account. */ |
| 5026 core.String kind; |
| 5027 |
| 5028 |
| 5029 AdWordsAccount(); |
| 5030 |
| 5031 AdWordsAccount.fromJson(core.Map _json) { |
| 5032 if (_json.containsKey("autoTaggingEnabled")) { |
| 5033 autoTaggingEnabled = _json["autoTaggingEnabled"]; |
| 5034 } |
| 5035 if (_json.containsKey("customerId")) { |
| 5036 customerId = _json["customerId"]; |
| 5037 } |
| 5038 if (_json.containsKey("kind")) { |
| 5039 kind = _json["kind"]; |
| 5040 } |
| 5041 } |
| 5042 |
| 5043 core.Map toJson() { |
| 5044 var _json = new core.Map(); |
| 5045 if (autoTaggingEnabled != null) { |
| 5046 _json["autoTaggingEnabled"] = autoTaggingEnabled; |
| 5047 } |
| 5048 if (customerId != null) { |
| 5049 _json["customerId"] = customerId; |
| 5050 } |
| 5051 if (kind != null) { |
| 5052 _json["kind"] = kind; |
| 5053 } |
| 5054 return _json; |
| 5055 } |
| 5056 } |
| 5057 |
| 5058 |
| 5059 /** Request template for the delete upload data request. */ |
| 5060 class AnalyticsDataimportDeleteUploadDataRequest { |
| 5061 /** A list of upload UIDs. */ |
| 5062 core.List<core.String> customDataImportUids; |
| 5063 |
| 5064 |
| 5065 AnalyticsDataimportDeleteUploadDataRequest(); |
| 5066 |
| 5067 AnalyticsDataimportDeleteUploadDataRequest.fromJson(core.Map _json) { |
| 5068 if (_json.containsKey("customDataImportUids")) { |
| 5069 customDataImportUids = _json["customDataImportUids"]; |
| 5070 } |
| 5071 } |
| 5072 |
| 5073 core.Map toJson() { |
| 5074 var _json = new core.Map(); |
| 5075 if (customDataImportUids != null) { |
| 5076 _json["customDataImportUids"] = customDataImportUids; |
| 5077 } |
| 5078 return _json; |
| 5079 } |
| 5080 } |
| 5081 |
| 5082 |
| 5083 /** JSON template for a metadata column. */ |
| 5084 class Column { |
| 5085 /** Map of attribute name and value for this column. */ |
| 5086 core.Map<core.String, core.String> attributes; |
| 5087 |
| 5088 /** Column id. */ |
| 5089 core.String id; |
| 5090 |
| 5091 /** Resource type for Analytics column. */ |
| 5092 core.String kind; |
| 5093 |
| 5094 |
| 5095 Column(); |
| 5096 |
| 5097 Column.fromJson(core.Map _json) { |
| 5098 if (_json.containsKey("attributes")) { |
| 5099 attributes = _json["attributes"]; |
| 5100 } |
| 5101 if (_json.containsKey("id")) { |
| 5102 id = _json["id"]; |
| 5103 } |
| 5104 if (_json.containsKey("kind")) { |
| 5105 kind = _json["kind"]; |
| 5106 } |
| 5107 } |
| 5108 |
| 5109 core.Map toJson() { |
| 5110 var _json = new core.Map(); |
| 5111 if (attributes != null) { |
| 5112 _json["attributes"] = attributes; |
| 5113 } |
| 5114 if (id != null) { |
| 5115 _json["id"] = id; |
| 5116 } |
| 5117 if (kind != null) { |
| 5118 _json["kind"] = kind; |
| 5119 } |
| 5120 return _json; |
| 5121 } |
| 5122 } |
| 5123 |
| 5124 |
| 5125 /** Lists columns (dimensions and metrics) for a particular report type. */ |
| 5126 class Columns { |
| 5127 /** List of attributes names returned by columns. */ |
| 5128 core.List<core.String> attributeNames; |
| 5129 |
| 5130 /** |
| 5131 * Etag of collection. This etag can be compared with the last response etag |
| 5132 * to check if response has changed. |
| 5133 */ |
| 5134 core.String etag; |
| 5135 |
| 5136 /** List of columns for a report type. */ |
| 5137 core.List<Column> items; |
| 5138 |
| 5139 /** Collection type. */ |
| 5140 core.String kind; |
| 5141 |
| 5142 /** Total number of columns returned in the response. */ |
| 5143 core.int totalResults; |
| 5144 |
| 5145 |
| 5146 Columns(); |
| 5147 |
| 5148 Columns.fromJson(core.Map _json) { |
| 5149 if (_json.containsKey("attributeNames")) { |
| 5150 attributeNames = _json["attributeNames"]; |
| 5151 } |
| 5152 if (_json.containsKey("etag")) { |
| 5153 etag = _json["etag"]; |
| 5154 } |
| 5155 if (_json.containsKey("items")) { |
| 5156 items = _json["items"].map((value) => new Column.fromJson(value)).toList()
; |
| 5157 } |
| 5158 if (_json.containsKey("kind")) { |
| 5159 kind = _json["kind"]; |
| 5160 } |
| 5161 if (_json.containsKey("totalResults")) { |
| 5162 totalResults = _json["totalResults"]; |
| 5163 } |
| 5164 } |
| 5165 |
| 5166 core.Map toJson() { |
| 5167 var _json = new core.Map(); |
| 5168 if (attributeNames != null) { |
| 5169 _json["attributeNames"] = attributeNames; |
| 5170 } |
| 5171 if (etag != null) { |
| 5172 _json["etag"] = etag; |
| 5173 } |
| 5174 if (items != null) { |
| 5175 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 5176 } |
| 5177 if (kind != null) { |
| 5178 _json["kind"] = kind; |
| 5179 } |
| 5180 if (totalResults != null) { |
| 5181 _json["totalResults"] = totalResults; |
| 5182 } |
| 5183 return _json; |
| 5184 } |
| 5185 } |
| 5186 |
| 5187 |
| 5188 /** Not documented yet. */ |
| 5189 class CustomDataSourceChildLink { |
| 5190 /** |
| 5191 * Link to the list of daily uploads for this custom data source. Link to the |
| 5192 * list of uploads for this custom data source. |
| 5193 */ |
| 5194 core.String href; |
| 5195 |
| 5196 /** Value is "analytics#dailyUploads". Value is "analytics#uploads". */ |
| 5197 core.String type; |
| 5198 |
| 5199 |
| 5200 CustomDataSourceChildLink(); |
| 5201 |
| 5202 CustomDataSourceChildLink.fromJson(core.Map _json) { |
| 5203 if (_json.containsKey("href")) { |
| 5204 href = _json["href"]; |
| 5205 } |
| 5206 if (_json.containsKey("type")) { |
| 5207 type = _json["type"]; |
| 5208 } |
| 5209 } |
| 5210 |
| 5211 core.Map toJson() { |
| 5212 var _json = new core.Map(); |
| 5213 if (href != null) { |
| 5214 _json["href"] = href; |
| 5215 } |
| 5216 if (type != null) { |
| 5217 _json["type"] = type; |
| 5218 } |
| 5219 return _json; |
| 5220 } |
| 5221 } |
| 5222 |
| 5223 |
| 5224 /** |
| 5225 * Parent link for this custom data source. Points to the web property to which |
| 5226 * this custom data source belongs. |
| 5227 */ |
| 5228 class CustomDataSourceParentLink { |
| 5229 /** Link to the web property to which this custom data source belongs. */ |
| 5230 core.String href; |
| 5231 |
| 5232 /** Value is "analytics#webproperty". */ |
| 5233 core.String type; |
| 5234 |
| 5235 |
| 5236 CustomDataSourceParentLink(); |
| 5237 |
| 5238 CustomDataSourceParentLink.fromJson(core.Map _json) { |
| 5239 if (_json.containsKey("href")) { |
| 5240 href = _json["href"]; |
| 5241 } |
| 5242 if (_json.containsKey("type")) { |
| 5243 type = _json["type"]; |
| 5244 } |
| 5245 } |
| 5246 |
| 5247 core.Map toJson() { |
| 5248 var _json = new core.Map(); |
| 5249 if (href != null) { |
| 5250 _json["href"] = href; |
| 5251 } |
| 5252 if (type != null) { |
| 5253 _json["type"] = type; |
| 5254 } |
| 5255 return _json; |
| 5256 } |
| 5257 } |
| 5258 |
| 5259 |
| 5260 /** JSON template for an Analytics custom data source. */ |
| 5261 class CustomDataSource { |
| 5262 /** Account ID to which this custom data source belongs. */ |
| 5263 core.String accountId; |
| 5264 |
| 5265 /** Not documented yet. */ |
| 5266 CustomDataSourceChildLink childLink; |
| 5267 |
| 5268 /** Time this custom data source was created. */ |
| 5269 core.DateTime created; |
| 5270 |
| 5271 /** Description of custom data source. */ |
| 5272 core.String description; |
| 5273 |
| 5274 /** Custom data source ID. */ |
| 5275 core.String id; |
| 5276 |
| 5277 /** Not documented yet. */ |
| 5278 core.String importBehavior; |
| 5279 |
| 5280 /** Resource type for Analytics custom data source. */ |
| 5281 core.String kind; |
| 5282 |
| 5283 /** Name of this custom data source. */ |
| 5284 core.String name; |
| 5285 |
| 5286 /** |
| 5287 * Parent link for this custom data source. Points to the web property to |
| 5288 * which this custom data source belongs. |
| 5289 */ |
| 5290 CustomDataSourceParentLink parentLink; |
| 5291 |
| 5292 /** IDs of views (profiles) linked to the custom data source. */ |
| 5293 core.List<core.String> profilesLinked; |
| 5294 |
| 5295 /** Link for this Analytics custom data source. */ |
| 5296 core.String selfLink; |
| 5297 |
| 5298 /** Type of the custom data source. */ |
| 5299 core.String type; |
| 5300 |
| 5301 /** Time this custom data source was last modified. */ |
| 5302 core.DateTime updated; |
| 5303 |
| 5304 /** Not documented yet. */ |
| 5305 core.String uploadType; |
| 5306 |
| 5307 /** |
| 5308 * Web property ID of the form UA-XXXXX-YY to which this custom data source |
| 5309 * belongs. |
| 5310 */ |
| 5311 core.String webPropertyId; |
| 5312 |
| 5313 |
| 5314 CustomDataSource(); |
| 5315 |
| 5316 CustomDataSource.fromJson(core.Map _json) { |
| 5317 if (_json.containsKey("accountId")) { |
| 5318 accountId = _json["accountId"]; |
| 5319 } |
| 5320 if (_json.containsKey("childLink")) { |
| 5321 childLink = new CustomDataSourceChildLink.fromJson(_json["childLink"]); |
| 5322 } |
| 5323 if (_json.containsKey("created")) { |
| 5324 created = core.DateTime.parse(_json["created"]); |
| 5325 } |
| 5326 if (_json.containsKey("description")) { |
| 5327 description = _json["description"]; |
| 5328 } |
| 5329 if (_json.containsKey("id")) { |
| 5330 id = _json["id"]; |
| 5331 } |
| 5332 if (_json.containsKey("importBehavior")) { |
| 5333 importBehavior = _json["importBehavior"]; |
| 5334 } |
| 5335 if (_json.containsKey("kind")) { |
| 5336 kind = _json["kind"]; |
| 5337 } |
| 5338 if (_json.containsKey("name")) { |
| 5339 name = _json["name"]; |
| 5340 } |
| 5341 if (_json.containsKey("parentLink")) { |
| 5342 parentLink = new CustomDataSourceParentLink.fromJson(_json["parentLink"]); |
| 5343 } |
| 5344 if (_json.containsKey("profilesLinked")) { |
| 5345 profilesLinked = _json["profilesLinked"]; |
| 5346 } |
| 5347 if (_json.containsKey("selfLink")) { |
| 5348 selfLink = _json["selfLink"]; |
| 5349 } |
| 5350 if (_json.containsKey("type")) { |
| 5351 type = _json["type"]; |
| 5352 } |
| 5353 if (_json.containsKey("updated")) { |
| 5354 updated = core.DateTime.parse(_json["updated"]); |
| 5355 } |
| 5356 if (_json.containsKey("uploadType")) { |
| 5357 uploadType = _json["uploadType"]; |
| 5358 } |
| 5359 if (_json.containsKey("webPropertyId")) { |
| 5360 webPropertyId = _json["webPropertyId"]; |
| 5361 } |
| 5362 } |
| 5363 |
| 5364 core.Map toJson() { |
| 5365 var _json = new core.Map(); |
| 5366 if (accountId != null) { |
| 5367 _json["accountId"] = accountId; |
| 5368 } |
| 5369 if (childLink != null) { |
| 5370 _json["childLink"] = (childLink).toJson(); |
| 5371 } |
| 5372 if (created != null) { |
| 5373 _json["created"] = (created).toIso8601String(); |
| 5374 } |
| 5375 if (description != null) { |
| 5376 _json["description"] = description; |
| 5377 } |
| 5378 if (id != null) { |
| 5379 _json["id"] = id; |
| 5380 } |
| 5381 if (importBehavior != null) { |
| 5382 _json["importBehavior"] = importBehavior; |
| 5383 } |
| 5384 if (kind != null) { |
| 5385 _json["kind"] = kind; |
| 5386 } |
| 5387 if (name != null) { |
| 5388 _json["name"] = name; |
| 5389 } |
| 5390 if (parentLink != null) { |
| 5391 _json["parentLink"] = (parentLink).toJson(); |
| 5392 } |
| 5393 if (profilesLinked != null) { |
| 5394 _json["profilesLinked"] = profilesLinked; |
| 5395 } |
| 5396 if (selfLink != null) { |
| 5397 _json["selfLink"] = selfLink; |
| 5398 } |
| 5399 if (type != null) { |
| 5400 _json["type"] = type; |
| 5401 } |
| 5402 if (updated != null) { |
| 5403 _json["updated"] = (updated).toIso8601String(); |
| 5404 } |
| 5405 if (uploadType != null) { |
| 5406 _json["uploadType"] = uploadType; |
| 5407 } |
| 5408 if (webPropertyId != null) { |
| 5409 _json["webPropertyId"] = webPropertyId; |
| 5410 } |
| 5411 return _json; |
| 5412 } |
| 5413 } |
| 5414 |
| 5415 |
| 5416 /** |
| 5417 * Lists Analytics custom data sources to which the user has access. Each |
| 5418 * resource in the collection corresponds to a single Analytics custom data |
| 5419 * source. |
| 5420 */ |
| 5421 class CustomDataSources { |
| 5422 /** Collection of custom data sources. */ |
| 5423 core.List<CustomDataSource> items; |
| 5424 |
| 5425 /** |
| 5426 * The maximum number of resources the response can contain, regardless of the |
| 5427 * actual number of resources returned. Its value ranges from 1 to 1000 with a |
| 5428 * value of 1000 by default, or otherwise specified by the max-results query |
| 5429 * parameter. |
| 5430 */ |
| 5431 core.int itemsPerPage; |
| 5432 |
| 5433 /** Collection type. */ |
| 5434 core.String kind; |
| 5435 |
| 5436 /** Link to next page for this custom data source collection. */ |
| 5437 core.String nextLink; |
| 5438 |
| 5439 /** Link to previous page for this custom data source collection. */ |
| 5440 core.String previousLink; |
| 5441 |
| 5442 /** |
| 5443 * The starting index of the resources, which is 1 by default or otherwise |
| 5444 * specified by the start-index query parameter. |
| 5445 */ |
| 5446 core.int startIndex; |
| 5447 |
| 5448 /** |
| 5449 * The total number of results for the query, regardless of the number of |
| 5450 * results in the response. |
| 5451 */ |
| 5452 core.int totalResults; |
| 5453 |
| 5454 /** Email ID of the authenticated user */ |
| 5455 core.String username; |
| 5456 |
| 5457 |
| 5458 CustomDataSources(); |
| 5459 |
| 5460 CustomDataSources.fromJson(core.Map _json) { |
| 5461 if (_json.containsKey("items")) { |
| 5462 items = _json["items"].map((value) => new CustomDataSource.fromJson(value)
).toList(); |
| 5463 } |
| 5464 if (_json.containsKey("itemsPerPage")) { |
| 5465 itemsPerPage = _json["itemsPerPage"]; |
| 5466 } |
| 5467 if (_json.containsKey("kind")) { |
| 5468 kind = _json["kind"]; |
| 5469 } |
| 5470 if (_json.containsKey("nextLink")) { |
| 5471 nextLink = _json["nextLink"]; |
| 5472 } |
| 5473 if (_json.containsKey("previousLink")) { |
| 5474 previousLink = _json["previousLink"]; |
| 5475 } |
| 5476 if (_json.containsKey("startIndex")) { |
| 5477 startIndex = _json["startIndex"]; |
| 5478 } |
| 5479 if (_json.containsKey("totalResults")) { |
| 5480 totalResults = _json["totalResults"]; |
| 5481 } |
| 5482 if (_json.containsKey("username")) { |
| 5483 username = _json["username"]; |
| 5484 } |
| 5485 } |
| 5486 |
| 5487 core.Map toJson() { |
| 5488 var _json = new core.Map(); |
| 5489 if (items != null) { |
| 5490 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 5491 } |
| 5492 if (itemsPerPage != null) { |
| 5493 _json["itemsPerPage"] = itemsPerPage; |
| 5494 } |
| 5495 if (kind != null) { |
| 5496 _json["kind"] = kind; |
| 5497 } |
| 5498 if (nextLink != null) { |
| 5499 _json["nextLink"] = nextLink; |
| 5500 } |
| 5501 if (previousLink != null) { |
| 5502 _json["previousLink"] = previousLink; |
| 5503 } |
| 5504 if (startIndex != null) { |
| 5505 _json["startIndex"] = startIndex; |
| 5506 } |
| 5507 if (totalResults != null) { |
| 5508 _json["totalResults"] = totalResults; |
| 5509 } |
| 5510 if (username != null) { |
| 5511 _json["username"] = username; |
| 5512 } |
| 5513 return _json; |
| 5514 } |
| 5515 } |
| 5516 |
| 5517 |
| 5518 /** |
| 5519 * Parent link for a daily upload. Points to the custom data source to which |
| 5520 * this daily upload belongs. |
| 5521 */ |
| 5522 class DailyUploadParentLink { |
| 5523 /** Link to the custom data source to which this daily upload belongs. */ |
| 5524 core.String href; |
| 5525 |
| 5526 /** Value is "analytics#customDataSource". */ |
| 5527 core.String type; |
| 5528 |
| 5529 |
| 5530 DailyUploadParentLink(); |
| 5531 |
| 5532 DailyUploadParentLink.fromJson(core.Map _json) { |
| 5533 if (_json.containsKey("href")) { |
| 5534 href = _json["href"]; |
| 5535 } |
| 5536 if (_json.containsKey("type")) { |
| 5537 type = _json["type"]; |
| 5538 } |
| 5539 } |
| 5540 |
| 5541 core.Map toJson() { |
| 5542 var _json = new core.Map(); |
| 5543 if (href != null) { |
| 5544 _json["href"] = href; |
| 5545 } |
| 5546 if (type != null) { |
| 5547 _json["type"] = type; |
| 5548 } |
| 5549 return _json; |
| 5550 } |
| 5551 } |
| 5552 |
| 5553 |
| 5554 /** Not documented yet. */ |
| 5555 class DailyUploadRecentChanges { |
| 5556 /** The type of change: APPEND, RESET, or DELETE. */ |
| 5557 core.String change; |
| 5558 |
| 5559 /** The time when the change occurred. */ |
| 5560 core.DateTime time; |
| 5561 |
| 5562 |
| 5563 DailyUploadRecentChanges(); |
| 5564 |
| 5565 DailyUploadRecentChanges.fromJson(core.Map _json) { |
| 5566 if (_json.containsKey("change")) { |
| 5567 change = _json["change"]; |
| 5568 } |
| 5569 if (_json.containsKey("time")) { |
| 5570 time = core.DateTime.parse(_json["time"]); |
| 5571 } |
| 5572 } |
| 5573 |
| 5574 core.Map toJson() { |
| 5575 var _json = new core.Map(); |
| 5576 if (change != null) { |
| 5577 _json["change"] = change; |
| 5578 } |
| 5579 if (time != null) { |
| 5580 _json["time"] = (time).toIso8601String(); |
| 5581 } |
| 5582 return _json; |
| 5583 } |
| 5584 } |
| 5585 |
| 5586 |
| 5587 /** Metadata for daily upload entity. */ |
| 5588 class DailyUpload { |
| 5589 /** Account ID to which this daily upload belongs. */ |
| 5590 core.String accountId; |
| 5591 |
| 5592 /** Number of appends for this date. */ |
| 5593 core.int appendCount; |
| 5594 |
| 5595 /** Time this daily upload was created. */ |
| 5596 core.DateTime createdTime; |
| 5597 |
| 5598 /** Custom data source ID to which this daily upload belongs. */ |
| 5599 core.String customDataSourceId; |
| 5600 |
| 5601 /** Date associated with daily upload. */ |
| 5602 core.String date; |
| 5603 |
| 5604 /** Resource type for Analytics daily upload. */ |
| 5605 core.String kind; |
| 5606 |
| 5607 /** Time this daily upload was last modified. */ |
| 5608 core.DateTime modifiedTime; |
| 5609 |
| 5610 /** |
| 5611 * Parent link for a daily upload. Points to the custom data source to which |
| 5612 * this daily upload belongs. |
| 5613 */ |
| 5614 DailyUploadParentLink parentLink; |
| 5615 |
| 5616 /** Change log for last 10 changes in chronological order. */ |
| 5617 core.List<DailyUploadRecentChanges> recentChanges; |
| 5618 |
| 5619 /** Link for this daily upload. */ |
| 5620 core.String selfLink; |
| 5621 |
| 5622 /** |
| 5623 * Web property ID of the form UA-XXXXX-YY to which this daily upload belongs. |
| 5624 */ |
| 5625 core.String webPropertyId; |
| 5626 |
| 5627 |
| 5628 DailyUpload(); |
| 5629 |
| 5630 DailyUpload.fromJson(core.Map _json) { |
| 5631 if (_json.containsKey("accountId")) { |
| 5632 accountId = _json["accountId"]; |
| 5633 } |
| 5634 if (_json.containsKey("appendCount")) { |
| 5635 appendCount = _json["appendCount"]; |
| 5636 } |
| 5637 if (_json.containsKey("createdTime")) { |
| 5638 createdTime = core.DateTime.parse(_json["createdTime"]); |
| 5639 } |
| 5640 if (_json.containsKey("customDataSourceId")) { |
| 5641 customDataSourceId = _json["customDataSourceId"]; |
| 5642 } |
| 5643 if (_json.containsKey("date")) { |
| 5644 date = _json["date"]; |
| 5645 } |
| 5646 if (_json.containsKey("kind")) { |
| 5647 kind = _json["kind"]; |
| 5648 } |
| 5649 if (_json.containsKey("modifiedTime")) { |
| 5650 modifiedTime = core.DateTime.parse(_json["modifiedTime"]); |
| 5651 } |
| 5652 if (_json.containsKey("parentLink")) { |
| 5653 parentLink = new DailyUploadParentLink.fromJson(_json["parentLink"]); |
| 5654 } |
| 5655 if (_json.containsKey("recentChanges")) { |
| 5656 recentChanges = _json["recentChanges"].map((value) => new DailyUploadRecen
tChanges.fromJson(value)).toList(); |
| 5657 } |
| 5658 if (_json.containsKey("selfLink")) { |
| 5659 selfLink = _json["selfLink"]; |
| 5660 } |
| 5661 if (_json.containsKey("webPropertyId")) { |
| 5662 webPropertyId = _json["webPropertyId"]; |
| 5663 } |
| 5664 } |
| 5665 |
| 5666 core.Map toJson() { |
| 5667 var _json = new core.Map(); |
| 5668 if (accountId != null) { |
| 5669 _json["accountId"] = accountId; |
| 5670 } |
| 5671 if (appendCount != null) { |
| 5672 _json["appendCount"] = appendCount; |
| 5673 } |
| 5674 if (createdTime != null) { |
| 5675 _json["createdTime"] = (createdTime).toIso8601String(); |
| 5676 } |
| 5677 if (customDataSourceId != null) { |
| 5678 _json["customDataSourceId"] = customDataSourceId; |
| 5679 } |
| 5680 if (date != null) { |
| 5681 _json["date"] = date; |
| 5682 } |
| 5683 if (kind != null) { |
| 5684 _json["kind"] = kind; |
| 5685 } |
| 5686 if (modifiedTime != null) { |
| 5687 _json["modifiedTime"] = (modifiedTime).toIso8601String(); |
| 5688 } |
| 5689 if (parentLink != null) { |
| 5690 _json["parentLink"] = (parentLink).toJson(); |
| 5691 } |
| 5692 if (recentChanges != null) { |
| 5693 _json["recentChanges"] = recentChanges.map((value) => (value).toJson()).to
List(); |
| 5694 } |
| 5695 if (selfLink != null) { |
| 5696 _json["selfLink"] = selfLink; |
| 5697 } |
| 5698 if (webPropertyId != null) { |
| 5699 _json["webPropertyId"] = webPropertyId; |
| 5700 } |
| 5701 return _json; |
| 5702 } |
| 5703 } |
| 5704 |
| 5705 |
| 5706 /** Metadata returned for a successful append operation. */ |
| 5707 class DailyUploadAppend { |
| 5708 /** Account Id to which this daily upload append belongs. */ |
| 5709 core.String accountId; |
| 5710 |
| 5711 /** Append number. */ |
| 5712 core.int appendNumber; |
| 5713 |
| 5714 /** Custom data source Id to which this daily upload append belongs. */ |
| 5715 core.String customDataSourceId; |
| 5716 |
| 5717 /** Date associated with daily upload append. */ |
| 5718 core.String date; |
| 5719 |
| 5720 /** Resource type for Analytics daily upload append. */ |
| 5721 core.String kind; |
| 5722 |
| 5723 /** Not documented yet. */ |
| 5724 core.String nextAppendLink; |
| 5725 |
| 5726 /** |
| 5727 * Web property Id of the form UA-XXXXX-YY to which this daily upload append |
| 5728 * belongs. |
| 5729 */ |
| 5730 core.String webPropertyId; |
| 5731 |
| 5732 |
| 5733 DailyUploadAppend(); |
| 5734 |
| 5735 DailyUploadAppend.fromJson(core.Map _json) { |
| 5736 if (_json.containsKey("accountId")) { |
| 5737 accountId = _json["accountId"]; |
| 5738 } |
| 5739 if (_json.containsKey("appendNumber")) { |
| 5740 appendNumber = _json["appendNumber"]; |
| 5741 } |
| 5742 if (_json.containsKey("customDataSourceId")) { |
| 5743 customDataSourceId = _json["customDataSourceId"]; |
| 5744 } |
| 5745 if (_json.containsKey("date")) { |
| 5746 date = _json["date"]; |
| 5747 } |
| 5748 if (_json.containsKey("kind")) { |
| 5749 kind = _json["kind"]; |
| 5750 } |
| 5751 if (_json.containsKey("nextAppendLink")) { |
| 5752 nextAppendLink = _json["nextAppendLink"]; |
| 5753 } |
| 5754 if (_json.containsKey("webPropertyId")) { |
| 5755 webPropertyId = _json["webPropertyId"]; |
| 5756 } |
| 5757 } |
| 5758 |
| 5759 core.Map toJson() { |
| 5760 var _json = new core.Map(); |
| 5761 if (accountId != null) { |
| 5762 _json["accountId"] = accountId; |
| 5763 } |
| 5764 if (appendNumber != null) { |
| 5765 _json["appendNumber"] = appendNumber; |
| 5766 } |
| 5767 if (customDataSourceId != null) { |
| 5768 _json["customDataSourceId"] = customDataSourceId; |
| 5769 } |
| 5770 if (date != null) { |
| 5771 _json["date"] = date; |
| 5772 } |
| 5773 if (kind != null) { |
| 5774 _json["kind"] = kind; |
| 5775 } |
| 5776 if (nextAppendLink != null) { |
| 5777 _json["nextAppendLink"] = nextAppendLink; |
| 5778 } |
| 5779 if (webPropertyId != null) { |
| 5780 _json["webPropertyId"] = webPropertyId; |
| 5781 } |
| 5782 return _json; |
| 5783 } |
| 5784 } |
| 5785 |
| 5786 |
| 5787 /** |
| 5788 * A daily upload collection lists Analytics daily uploads to which the user has |
| 5789 * access. Each resource in the collection corresponds to a single Analytics |
| 5790 * daily upload. |
| 5791 */ |
| 5792 class DailyUploads { |
| 5793 /** A collection of daily uploads. */ |
| 5794 core.List<DailyUpload> items; |
| 5795 |
| 5796 /** |
| 5797 * The maximum number of resources the response can contain, regardless of the |
| 5798 * actual number of resources returned. Its value ranges from 1 to 1000 with a |
| 5799 * value of 1000 by default, or otherwise specified by the max-results query |
| 5800 * parameter. |
| 5801 */ |
| 5802 core.int itemsPerPage; |
| 5803 |
| 5804 /** Collection type. Value is analytics#dailyUploads. */ |
| 5805 core.String kind; |
| 5806 |
| 5807 /** Link to next page for this daily upload collection. */ |
| 5808 core.String nextLink; |
| 5809 |
| 5810 /** Link to previous page for this daily upload collection. */ |
| 5811 core.String previousLink; |
| 5812 |
| 5813 /** |
| 5814 * The starting index of the resources, which is 1 by default or otherwise |
| 5815 * specified by the start-index query parameter. |
| 5816 */ |
| 5817 core.int startIndex; |
| 5818 |
| 5819 /** |
| 5820 * The total number of results for the query, regardless of the number of |
| 5821 * results in the response. |
| 5822 */ |
| 5823 core.int totalResults; |
| 5824 |
| 5825 /** Email ID of the authenticated user */ |
| 5826 core.String username; |
| 5827 |
| 5828 |
| 5829 DailyUploads(); |
| 5830 |
| 5831 DailyUploads.fromJson(core.Map _json) { |
| 5832 if (_json.containsKey("items")) { |
| 5833 items = _json["items"].map((value) => new DailyUpload.fromJson(value)).toL
ist(); |
| 5834 } |
| 5835 if (_json.containsKey("itemsPerPage")) { |
| 5836 itemsPerPage = _json["itemsPerPage"]; |
| 5837 } |
| 5838 if (_json.containsKey("kind")) { |
| 5839 kind = _json["kind"]; |
| 5840 } |
| 5841 if (_json.containsKey("nextLink")) { |
| 5842 nextLink = _json["nextLink"]; |
| 5843 } |
| 5844 if (_json.containsKey("previousLink")) { |
| 5845 previousLink = _json["previousLink"]; |
| 5846 } |
| 5847 if (_json.containsKey("startIndex")) { |
| 5848 startIndex = _json["startIndex"]; |
| 5849 } |
| 5850 if (_json.containsKey("totalResults")) { |
| 5851 totalResults = _json["totalResults"]; |
| 5852 } |
| 5853 if (_json.containsKey("username")) { |
| 5854 username = _json["username"]; |
| 5855 } |
| 5856 } |
| 5857 |
| 5858 core.Map toJson() { |
| 5859 var _json = new core.Map(); |
| 5860 if (items != null) { |
| 5861 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 5862 } |
| 5863 if (itemsPerPage != null) { |
| 5864 _json["itemsPerPage"] = itemsPerPage; |
| 5865 } |
| 5866 if (kind != null) { |
| 5867 _json["kind"] = kind; |
| 5868 } |
| 5869 if (nextLink != null) { |
| 5870 _json["nextLink"] = nextLink; |
| 5871 } |
| 5872 if (previousLink != null) { |
| 5873 _json["previousLink"] = previousLink; |
| 5874 } |
| 5875 if (startIndex != null) { |
| 5876 _json["startIndex"] = startIndex; |
| 5877 } |
| 5878 if (totalResults != null) { |
| 5879 _json["totalResults"] = totalResults; |
| 5880 } |
| 5881 if (username != null) { |
| 5882 _json["username"] = username; |
| 5883 } |
| 5884 return _json; |
| 5885 } |
| 5886 } |
| 5887 |
| 5888 |
| 5889 /** Web property being linked. */ |
| 5890 class EntityAdWordsLinkEntity { |
| 5891 /** Not documented yet. */ |
| 5892 WebPropertyRef webPropertyRef; |
| 5893 |
| 5894 |
| 5895 EntityAdWordsLinkEntity(); |
| 5896 |
| 5897 EntityAdWordsLinkEntity.fromJson(core.Map _json) { |
| 5898 if (_json.containsKey("webPropertyRef")) { |
| 5899 webPropertyRef = new WebPropertyRef.fromJson(_json["webPropertyRef"]); |
| 5900 } |
| 5901 } |
| 5902 |
| 5903 core.Map toJson() { |
| 5904 var _json = new core.Map(); |
| 5905 if (webPropertyRef != null) { |
| 5906 _json["webPropertyRef"] = (webPropertyRef).toJson(); |
| 5907 } |
| 5908 return _json; |
| 5909 } |
| 5910 } |
| 5911 |
| 5912 |
| 5913 /** JSON template for Analytics Entity AdWords Link. */ |
| 5914 class EntityAdWordsLink { |
| 5915 /** |
| 5916 * A list of AdWords client accounts. These cannot be MCC accounts. This field |
| 5917 * is required when creating an AdWords link. It cannot be empty. |
| 5918 */ |
| 5919 core.List<AdWordsAccount> adWordsAccounts; |
| 5920 |
| 5921 /** Web property being linked. */ |
| 5922 EntityAdWordsLinkEntity entity; |
| 5923 |
| 5924 /** Entity AdWords link ID */ |
| 5925 core.String id; |
| 5926 |
| 5927 /** Resource type for entity AdWords link. */ |
| 5928 core.String kind; |
| 5929 |
| 5930 /** |
| 5931 * Name of the link. This field is required when creating an AdWords link. |
| 5932 */ |
| 5933 core.String name; |
| 5934 |
| 5935 /** IDs of linked Views (Profiles) represented as strings. */ |
| 5936 core.List<core.String> profileIds; |
| 5937 |
| 5938 /** URL link for this Google Analytics - Google AdWords link. */ |
| 5939 core.String selfLink; |
| 5940 |
| 5941 |
| 5942 EntityAdWordsLink(); |
| 5943 |
| 5944 EntityAdWordsLink.fromJson(core.Map _json) { |
| 5945 if (_json.containsKey("adWordsAccounts")) { |
| 5946 adWordsAccounts = _json["adWordsAccounts"].map((value) => new AdWordsAccou
nt.fromJson(value)).toList(); |
| 5947 } |
| 5948 if (_json.containsKey("entity")) { |
| 5949 entity = new EntityAdWordsLinkEntity.fromJson(_json["entity"]); |
| 5950 } |
| 5951 if (_json.containsKey("id")) { |
| 5952 id = _json["id"]; |
| 5953 } |
| 5954 if (_json.containsKey("kind")) { |
| 5955 kind = _json["kind"]; |
| 5956 } |
| 5957 if (_json.containsKey("name")) { |
| 5958 name = _json["name"]; |
| 5959 } |
| 5960 if (_json.containsKey("profileIds")) { |
| 5961 profileIds = _json["profileIds"]; |
| 5962 } |
| 5963 if (_json.containsKey("selfLink")) { |
| 5964 selfLink = _json["selfLink"]; |
| 5965 } |
| 5966 } |
| 5967 |
| 5968 core.Map toJson() { |
| 5969 var _json = new core.Map(); |
| 5970 if (adWordsAccounts != null) { |
| 5971 _json["adWordsAccounts"] = adWordsAccounts.map((value) => (value).toJson()
).toList(); |
| 5972 } |
| 5973 if (entity != null) { |
| 5974 _json["entity"] = (entity).toJson(); |
| 5975 } |
| 5976 if (id != null) { |
| 5977 _json["id"] = id; |
| 5978 } |
| 5979 if (kind != null) { |
| 5980 _json["kind"] = kind; |
| 5981 } |
| 5982 if (name != null) { |
| 5983 _json["name"] = name; |
| 5984 } |
| 5985 if (profileIds != null) { |
| 5986 _json["profileIds"] = profileIds; |
| 5987 } |
| 5988 if (selfLink != null) { |
| 5989 _json["selfLink"] = selfLink; |
| 5990 } |
| 5991 return _json; |
| 5992 } |
| 5993 } |
| 5994 |
| 5995 |
| 5996 /** |
| 5997 * An entity AdWords link collection provides a list of GA-AdWords links Each |
| 5998 * resource in this collection corresponds to a single link. |
| 5999 */ |
| 6000 class EntityAdWordsLinks { |
| 6001 /** A list of entity AdWords links. */ |
| 6002 core.List<EntityAdWordsLink> items; |
| 6003 |
| 6004 /** |
| 6005 * The maximum number of entries the response can contain, regardless of the |
| 6006 * actual number of entries returned. Its value ranges from 1 to 1000 with a |
| 6007 * value of 1000 by default, or otherwise specified by the max-results query |
| 6008 * parameter. |
| 6009 */ |
| 6010 core.int itemsPerPage; |
| 6011 |
| 6012 /** Collection type. */ |
| 6013 core.String kind; |
| 6014 |
| 6015 /** Next link for this AdWords link collection. */ |
| 6016 core.String nextLink; |
| 6017 |
| 6018 /** Previous link for this AdWords link collection. */ |
| 6019 core.String previousLink; |
| 6020 |
| 6021 /** |
| 6022 * The starting index of the entries, which is 1 by default or otherwise |
| 6023 * specified by the start-index query parameter. |
| 6024 */ |
| 6025 core.int startIndex; |
| 6026 |
| 6027 /** |
| 6028 * The total number of results for the query, regardless of the number of |
| 6029 * results in the response. |
| 6030 */ |
| 6031 core.int totalResults; |
| 6032 |
| 6033 |
| 6034 EntityAdWordsLinks(); |
| 6035 |
| 6036 EntityAdWordsLinks.fromJson(core.Map _json) { |
| 6037 if (_json.containsKey("items")) { |
| 6038 items = _json["items"].map((value) => new EntityAdWordsLink.fromJson(value
)).toList(); |
| 6039 } |
| 6040 if (_json.containsKey("itemsPerPage")) { |
| 6041 itemsPerPage = _json["itemsPerPage"]; |
| 6042 } |
| 6043 if (_json.containsKey("kind")) { |
| 6044 kind = _json["kind"]; |
| 6045 } |
| 6046 if (_json.containsKey("nextLink")) { |
| 6047 nextLink = _json["nextLink"]; |
| 6048 } |
| 6049 if (_json.containsKey("previousLink")) { |
| 6050 previousLink = _json["previousLink"]; |
| 6051 } |
| 6052 if (_json.containsKey("startIndex")) { |
| 6053 startIndex = _json["startIndex"]; |
| 6054 } |
| 6055 if (_json.containsKey("totalResults")) { |
| 6056 totalResults = _json["totalResults"]; |
| 6057 } |
| 6058 } |
| 6059 |
| 6060 core.Map toJson() { |
| 6061 var _json = new core.Map(); |
| 6062 if (items != null) { |
| 6063 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 6064 } |
| 6065 if (itemsPerPage != null) { |
| 6066 _json["itemsPerPage"] = itemsPerPage; |
| 6067 } |
| 6068 if (kind != null) { |
| 6069 _json["kind"] = kind; |
| 6070 } |
| 6071 if (nextLink != null) { |
| 6072 _json["nextLink"] = nextLink; |
| 6073 } |
| 6074 if (previousLink != null) { |
| 6075 _json["previousLink"] = previousLink; |
| 6076 } |
| 6077 if (startIndex != null) { |
| 6078 _json["startIndex"] = startIndex; |
| 6079 } |
| 6080 if (totalResults != null) { |
| 6081 _json["totalResults"] = totalResults; |
| 6082 } |
| 6083 return _json; |
| 6084 } |
| 6085 } |
| 6086 |
| 6087 |
| 6088 /** |
| 6089 * Entity for this link. It can be an account, a web property, or a view |
| 6090 * (profile). |
| 6091 */ |
| 6092 class EntityUserLinkEntity { |
| 6093 /** Account for this link. */ |
| 6094 AccountRef accountRef; |
| 6095 |
| 6096 /** View (Profile) for this link. */ |
| 6097 ProfileRef profileRef; |
| 6098 |
| 6099 /** Web property for this link. */ |
| 6100 WebPropertyRef webPropertyRef; |
| 6101 |
| 6102 |
| 6103 EntityUserLinkEntity(); |
| 6104 |
| 6105 EntityUserLinkEntity.fromJson(core.Map _json) { |
| 6106 if (_json.containsKey("accountRef")) { |
| 6107 accountRef = new AccountRef.fromJson(_json["accountRef"]); |
| 6108 } |
| 6109 if (_json.containsKey("profileRef")) { |
| 6110 profileRef = new ProfileRef.fromJson(_json["profileRef"]); |
| 6111 } |
| 6112 if (_json.containsKey("webPropertyRef")) { |
| 6113 webPropertyRef = new WebPropertyRef.fromJson(_json["webPropertyRef"]); |
| 6114 } |
| 6115 } |
| 6116 |
| 6117 core.Map toJson() { |
| 6118 var _json = new core.Map(); |
| 6119 if (accountRef != null) { |
| 6120 _json["accountRef"] = (accountRef).toJson(); |
| 6121 } |
| 6122 if (profileRef != null) { |
| 6123 _json["profileRef"] = (profileRef).toJson(); |
| 6124 } |
| 6125 if (webPropertyRef != null) { |
| 6126 _json["webPropertyRef"] = (webPropertyRef).toJson(); |
| 6127 } |
| 6128 return _json; |
| 6129 } |
| 6130 } |
| 6131 |
| 6132 |
| 6133 /** Permissions the user has for this entity. */ |
| 6134 class EntityUserLinkPermissions { |
| 6135 /** |
| 6136 * Effective permissions represent all the permissions that a user has for |
| 6137 * this entity. These include any implied permissions (e.g., EDIT implies |
| 6138 * VIEW) or inherited permissions from the parent entity. Effective |
| 6139 * permissions are read-only. |
| 6140 */ |
| 6141 core.List<core.String> effective; |
| 6142 |
| 6143 /** |
| 6144 * Permissions that a user has been assigned at this very level. Does not |
| 6145 * include any implied or inherited permissions. Local permissions are |
| 6146 * modifiable. |
| 6147 */ |
| 6148 core.List<core.String> local; |
| 6149 |
| 6150 |
| 6151 EntityUserLinkPermissions(); |
| 6152 |
| 6153 EntityUserLinkPermissions.fromJson(core.Map _json) { |
| 6154 if (_json.containsKey("effective")) { |
| 6155 effective = _json["effective"]; |
| 6156 } |
| 6157 if (_json.containsKey("local")) { |
| 6158 local = _json["local"]; |
| 6159 } |
| 6160 } |
| 6161 |
| 6162 core.Map toJson() { |
| 6163 var _json = new core.Map(); |
| 6164 if (effective != null) { |
| 6165 _json["effective"] = effective; |
| 6166 } |
| 6167 if (local != null) { |
| 6168 _json["local"] = local; |
| 6169 } |
| 6170 return _json; |
| 6171 } |
| 6172 } |
| 6173 |
| 6174 |
| 6175 /** |
| 6176 * JSON template for an Analytics Entity-User Link. Returns permissions that a |
| 6177 * user has for an entity. |
| 6178 */ |
| 6179 class EntityUserLink { |
| 6180 /** |
| 6181 * Entity for this link. It can be an account, a web property, or a view |
| 6182 * (profile). |
| 6183 */ |
| 6184 EntityUserLinkEntity entity; |
| 6185 |
| 6186 /** Entity user link ID */ |
| 6187 core.String id; |
| 6188 |
| 6189 /** Resource type for entity user link. */ |
| 6190 core.String kind; |
| 6191 |
| 6192 /** Permissions the user has for this entity. */ |
| 6193 EntityUserLinkPermissions permissions; |
| 6194 |
| 6195 /** Self link for this resource. */ |
| 6196 core.String selfLink; |
| 6197 |
| 6198 /** User reference. */ |
| 6199 UserRef userRef; |
| 6200 |
| 6201 |
| 6202 EntityUserLink(); |
| 6203 |
| 6204 EntityUserLink.fromJson(core.Map _json) { |
| 6205 if (_json.containsKey("entity")) { |
| 6206 entity = new EntityUserLinkEntity.fromJson(_json["entity"]); |
| 6207 } |
| 6208 if (_json.containsKey("id")) { |
| 6209 id = _json["id"]; |
| 6210 } |
| 6211 if (_json.containsKey("kind")) { |
| 6212 kind = _json["kind"]; |
| 6213 } |
| 6214 if (_json.containsKey("permissions")) { |
| 6215 permissions = new EntityUserLinkPermissions.fromJson(_json["permissions"])
; |
| 6216 } |
| 6217 if (_json.containsKey("selfLink")) { |
| 6218 selfLink = _json["selfLink"]; |
| 6219 } |
| 6220 if (_json.containsKey("userRef")) { |
| 6221 userRef = new UserRef.fromJson(_json["userRef"]); |
| 6222 } |
| 6223 } |
| 6224 |
| 6225 core.Map toJson() { |
| 6226 var _json = new core.Map(); |
| 6227 if (entity != null) { |
| 6228 _json["entity"] = (entity).toJson(); |
| 6229 } |
| 6230 if (id != null) { |
| 6231 _json["id"] = id; |
| 6232 } |
| 6233 if (kind != null) { |
| 6234 _json["kind"] = kind; |
| 6235 } |
| 6236 if (permissions != null) { |
| 6237 _json["permissions"] = (permissions).toJson(); |
| 6238 } |
| 6239 if (selfLink != null) { |
| 6240 _json["selfLink"] = selfLink; |
| 6241 } |
| 6242 if (userRef != null) { |
| 6243 _json["userRef"] = (userRef).toJson(); |
| 6244 } |
| 6245 return _json; |
| 6246 } |
| 6247 } |
| 6248 |
| 6249 |
| 6250 /** |
| 6251 * An entity user link collection provides a list of Analytics ACL links Each |
| 6252 * resource in this collection corresponds to a single link. |
| 6253 */ |
| 6254 class EntityUserLinks { |
| 6255 /** A list of entity user links. */ |
| 6256 core.List<EntityUserLink> items; |
| 6257 |
| 6258 /** |
| 6259 * The maximum number of entries the response can contain, regardless of the |
| 6260 * actual number of entries returned. Its value ranges from 1 to 1000 with a |
| 6261 * value of 1000 by default, or otherwise specified by the max-results query |
| 6262 * parameter. |
| 6263 */ |
| 6264 core.int itemsPerPage; |
| 6265 |
| 6266 /** Collection type. */ |
| 6267 core.String kind; |
| 6268 |
| 6269 /** Next link for this account collection. */ |
| 6270 core.String nextLink; |
| 6271 |
| 6272 /** Previous link for this account collection. */ |
| 6273 core.String previousLink; |
| 6274 |
| 6275 /** |
| 6276 * The starting index of the entries, which is 1 by default or otherwise |
| 6277 * specified by the start-index query parameter. |
| 6278 */ |
| 6279 core.int startIndex; |
| 6280 |
| 6281 /** |
| 6282 * The total number of results for the query, regardless of the number of |
| 6283 * results in the response. |
| 6284 */ |
| 6285 core.int totalResults; |
| 6286 |
| 6287 |
| 6288 EntityUserLinks(); |
| 6289 |
| 6290 EntityUserLinks.fromJson(core.Map _json) { |
| 6291 if (_json.containsKey("items")) { |
| 6292 items = _json["items"].map((value) => new EntityUserLink.fromJson(value)).
toList(); |
| 6293 } |
| 6294 if (_json.containsKey("itemsPerPage")) { |
| 6295 itemsPerPage = _json["itemsPerPage"]; |
| 6296 } |
| 6297 if (_json.containsKey("kind")) { |
| 6298 kind = _json["kind"]; |
| 6299 } |
| 6300 if (_json.containsKey("nextLink")) { |
| 6301 nextLink = _json["nextLink"]; |
| 6302 } |
| 6303 if (_json.containsKey("previousLink")) { |
| 6304 previousLink = _json["previousLink"]; |
| 6305 } |
| 6306 if (_json.containsKey("startIndex")) { |
| 6307 startIndex = _json["startIndex"]; |
| 6308 } |
| 6309 if (_json.containsKey("totalResults")) { |
| 6310 totalResults = _json["totalResults"]; |
| 6311 } |
| 6312 } |
| 6313 |
| 6314 core.Map toJson() { |
| 6315 var _json = new core.Map(); |
| 6316 if (items != null) { |
| 6317 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 6318 } |
| 6319 if (itemsPerPage != null) { |
| 6320 _json["itemsPerPage"] = itemsPerPage; |
| 6321 } |
| 6322 if (kind != null) { |
| 6323 _json["kind"] = kind; |
| 6324 } |
| 6325 if (nextLink != null) { |
| 6326 _json["nextLink"] = nextLink; |
| 6327 } |
| 6328 if (previousLink != null) { |
| 6329 _json["previousLink"] = previousLink; |
| 6330 } |
| 6331 if (startIndex != null) { |
| 6332 _json["startIndex"] = startIndex; |
| 6333 } |
| 6334 if (totalResults != null) { |
| 6335 _json["totalResults"] = totalResults; |
| 6336 } |
| 6337 return _json; |
| 6338 } |
| 6339 } |
| 6340 |
| 6341 |
| 6342 /** |
| 6343 * Parent link for an experiment. Points to the view (profile) to which this |
| 6344 * experiment belongs. |
| 6345 */ |
| 6346 class ExperimentParentLink { |
| 6347 /** |
| 6348 * Link to the view (profile) to which this experiment belongs. This field is |
| 6349 * read-only. |
| 6350 */ |
| 6351 core.String href; |
| 6352 |
| 6353 /** Value is "analytics#profile". This field is read-only. */ |
| 6354 core.String type; |
| 6355 |
| 6356 |
| 6357 ExperimentParentLink(); |
| 6358 |
| 6359 ExperimentParentLink.fromJson(core.Map _json) { |
| 6360 if (_json.containsKey("href")) { |
| 6361 href = _json["href"]; |
| 6362 } |
| 6363 if (_json.containsKey("type")) { |
| 6364 type = _json["type"]; |
| 6365 } |
| 6366 } |
| 6367 |
| 6368 core.Map toJson() { |
| 6369 var _json = new core.Map(); |
| 6370 if (href != null) { |
| 6371 _json["href"] = href; |
| 6372 } |
| 6373 if (type != null) { |
| 6374 _json["type"] = type; |
| 6375 } |
| 6376 return _json; |
| 6377 } |
| 6378 } |
| 6379 |
| 6380 |
| 6381 /** Not documented yet. */ |
| 6382 class ExperimentVariations { |
| 6383 /** |
| 6384 * The name of the variation. This field is required when creating an |
| 6385 * experiment. This field may not be changed for an experiment whose status is |
| 6386 * ENDED. |
| 6387 */ |
| 6388 core.String name; |
| 6389 |
| 6390 /** |
| 6391 * Status of the variation. Possible values: "ACTIVE", "INACTIVE". INACTIVE |
| 6392 * variations are not served. This field may not be changed for an experiment |
| 6393 * whose status is ENDED. |
| 6394 */ |
| 6395 core.String status; |
| 6396 |
| 6397 /** |
| 6398 * The URL of the variation. This field may not be changed for an experiment |
| 6399 * whose status is RUNNING or ENDED. |
| 6400 */ |
| 6401 core.String url; |
| 6402 |
| 6403 /** |
| 6404 * Weight that this variation should receive. Only present if the experiment |
| 6405 * is running. This field is read-only. |
| 6406 */ |
| 6407 core.double weight; |
| 6408 |
| 6409 /** |
| 6410 * True if the experiment has ended and this variation performed |
| 6411 * (statistically) significantly better than the original. This field is |
| 6412 * read-only. |
| 6413 */ |
| 6414 core.bool won; |
| 6415 |
| 6416 |
| 6417 ExperimentVariations(); |
| 6418 |
| 6419 ExperimentVariations.fromJson(core.Map _json) { |
| 6420 if (_json.containsKey("name")) { |
| 6421 name = _json["name"]; |
| 6422 } |
| 6423 if (_json.containsKey("status")) { |
| 6424 status = _json["status"]; |
| 6425 } |
| 6426 if (_json.containsKey("url")) { |
| 6427 url = _json["url"]; |
| 6428 } |
| 6429 if (_json.containsKey("weight")) { |
| 6430 weight = _json["weight"]; |
| 6431 } |
| 6432 if (_json.containsKey("won")) { |
| 6433 won = _json["won"]; |
| 6434 } |
| 6435 } |
| 6436 |
| 6437 core.Map toJson() { |
| 6438 var _json = new core.Map(); |
| 6439 if (name != null) { |
| 6440 _json["name"] = name; |
| 6441 } |
| 6442 if (status != null) { |
| 6443 _json["status"] = status; |
| 6444 } |
| 6445 if (url != null) { |
| 6446 _json["url"] = url; |
| 6447 } |
| 6448 if (weight != null) { |
| 6449 _json["weight"] = weight; |
| 6450 } |
| 6451 if (won != null) { |
| 6452 _json["won"] = won; |
| 6453 } |
| 6454 return _json; |
| 6455 } |
| 6456 } |
| 6457 |
| 6458 |
| 6459 /** JSON template for Analytics experiment resource. */ |
| 6460 class Experiment { |
| 6461 /** Account ID to which this experiment belongs. This field is read-only. */ |
| 6462 core.String accountId; |
| 6463 |
| 6464 /** Time the experiment was created. This field is read-only. */ |
| 6465 core.DateTime created; |
| 6466 |
| 6467 /** Notes about this experiment. */ |
| 6468 core.String description; |
| 6469 |
| 6470 /** |
| 6471 * If true, the end user will be able to edit the experiment via the Google |
| 6472 * Analytics user interface. |
| 6473 */ |
| 6474 core.bool editableInGaUi; |
| 6475 |
| 6476 /** |
| 6477 * The ending time of the experiment (the time the status changed from RUNNING |
| 6478 * to ENDED). This field is present only if the experiment has ended. This |
| 6479 * field is read-only. |
| 6480 */ |
| 6481 core.DateTime endTime; |
| 6482 |
| 6483 /** |
| 6484 * Boolean specifying whether to distribute traffic evenly across all |
| 6485 * variations. If the value is False, content experiments follows the default |
| 6486 * behavior of adjusting traffic dynamically based on variation performance. |
| 6487 * Optional -- defaults to False. This field may not be changed for an |
| 6488 * experiment whose status is ENDED. |
| 6489 */ |
| 6490 core.bool equalWeighting; |
| 6491 |
| 6492 /** Experiment ID. Required for patch and update. Disallowed for create. */ |
| 6493 core.String id; |
| 6494 |
| 6495 /** |
| 6496 * Internal ID for the web property to which this experiment belongs. This |
| 6497 * field is read-only. |
| 6498 */ |
| 6499 core.String internalWebPropertyId; |
| 6500 |
| 6501 /** Resource type for an Analytics experiment. This field is read-only. */ |
| 6502 core.String kind; |
| 6503 |
| 6504 /** |
| 6505 * An integer number in [3, 90]. Specifies the minimum length of the |
| 6506 * experiment. Can be changed for a running experiment. This field may not be |
| 6507 * changed for an experiments whose status is ENDED. |
| 6508 */ |
| 6509 core.int minimumExperimentLengthInDays; |
| 6510 |
| 6511 /** |
| 6512 * Experiment name. This field may not be changed for an experiment whose |
| 6513 * status is ENDED. This field is required when creating an experiment. |
| 6514 */ |
| 6515 core.String name; |
| 6516 |
| 6517 /** |
| 6518 * The metric that the experiment is optimizing. Valid values: |
| 6519 * "ga:goal(n)Completions", "ga:adsenseAdsClicks", "ga:adsenseAdsViewed", |
| 6520 * "ga:adsenseRevenue", "ga:bounces", "ga:pageviews", "ga:sessionDuration", |
| 6521 * "ga:transactions", "ga:transactionRevenue". This field is required if |
| 6522 * status is "RUNNING" and servingFramework is one of "REDIRECT" or "API". |
| 6523 */ |
| 6524 core.String objectiveMetric; |
| 6525 |
| 6526 /** |
| 6527 * Whether the objectiveMetric should be minimized or maximized. Possible |
| 6528 * values: "MAXIMUM", "MINIMUM". Optional--defaults to "MAXIMUM". Cannot be |
| 6529 * specified without objectiveMetric. Cannot be modified when status is |
| 6530 * "RUNNING" or "ENDED". |
| 6531 */ |
| 6532 core.String optimizationType; |
| 6533 |
| 6534 /** |
| 6535 * Parent link for an experiment. Points to the view (profile) to which this |
| 6536 * experiment belongs. |
| 6537 */ |
| 6538 ExperimentParentLink parentLink; |
| 6539 |
| 6540 /** |
| 6541 * View (Profile) ID to which this experiment belongs. This field is |
| 6542 * read-only. |
| 6543 */ |
| 6544 core.String profileId; |
| 6545 |
| 6546 /** |
| 6547 * Why the experiment ended. Possible values: "STOPPED_BY_USER", |
| 6548 * "WINNER_FOUND", "EXPERIMENT_EXPIRED", "ENDED_WITH_NO_WINNER", |
| 6549 * "GOAL_OBJECTIVE_CHANGED". "ENDED_WITH_NO_WINNER" means that the experiment |
| 6550 * didn't expire but no winner was projected to be found. If the experiment |
| 6551 * status is changed via the API to ENDED this field is set to |
| 6552 * STOPPED_BY_USER. This field is read-only. |
| 6553 */ |
| 6554 core.String reasonExperimentEnded; |
| 6555 |
| 6556 /** |
| 6557 * Boolean specifying whether variations URLS are rewritten to match those of |
| 6558 * the original. This field may not be changed for an experiments whose status |
| 6559 * is ENDED. |
| 6560 */ |
| 6561 core.bool rewriteVariationUrlsAsOriginal; |
| 6562 |
| 6563 /** Link for this experiment. This field is read-only. */ |
| 6564 core.String selfLink; |
| 6565 |
| 6566 /** |
| 6567 * The framework used to serve the experiment variations and evaluate the |
| 6568 * results. One of: |
| 6569 * - REDIRECT: Google Analytics redirects traffic to different variation |
| 6570 * pages, reports the chosen variation and evaluates the results. |
| 6571 * - API: Google Analytics chooses and reports the variation to serve and |
| 6572 * evaluates the results; the caller is responsible for serving the selected |
| 6573 * variation. |
| 6574 * - EXTERNAL: The variations will be served externally and the chosen |
| 6575 * variation reported to Google Analytics. The caller is responsible for |
| 6576 * serving the selected variation and evaluating the results. |
| 6577 */ |
| 6578 core.String servingFramework; |
| 6579 |
| 6580 /** |
| 6581 * The snippet of code to include on the control page(s). This field is |
| 6582 * read-only. |
| 6583 */ |
| 6584 core.String snippet; |
| 6585 |
| 6586 /** |
| 6587 * The starting time of the experiment (the time the status changed from |
| 6588 * READY_TO_RUN to RUNNING). This field is present only if the experiment has |
| 6589 * started. This field is read-only. |
| 6590 */ |
| 6591 core.DateTime startTime; |
| 6592 |
| 6593 /** |
| 6594 * Experiment status. Possible values: "DRAFT", "READY_TO_RUN", "RUNNING", |
| 6595 * "ENDED". Experiments can be created in the "DRAFT", "READY_TO_RUN" or |
| 6596 * "RUNNING" state. This field is required when creating an experiment. |
| 6597 */ |
| 6598 core.String status; |
| 6599 |
| 6600 /** |
| 6601 * A floating-point number between 0 and 1. Specifies the fraction of the |
| 6602 * traffic that participates in the experiment. Can be changed for a running |
| 6603 * experiment. This field may not be changed for an experiments whose status |
| 6604 * is ENDED. |
| 6605 */ |
| 6606 core.double trafficCoverage; |
| 6607 |
| 6608 /** Time the experiment was last modified. This field is read-only. */ |
| 6609 core.DateTime updated; |
| 6610 |
| 6611 /** |
| 6612 * Array of variations. The first variation in the array is the original. The |
| 6613 * number of variations may not change once an experiment is in the RUNNING |
| 6614 * state. At least two variations are required before status can be set to |
| 6615 * RUNNING. |
| 6616 */ |
| 6617 core.List<ExperimentVariations> variations; |
| 6618 |
| 6619 /** |
| 6620 * Web property ID to which this experiment belongs. The web property ID is of |
| 6621 * the form UA-XXXXX-YY. This field is read-only. |
| 6622 */ |
| 6623 core.String webPropertyId; |
| 6624 |
| 6625 /** |
| 6626 * A floating-point number between 0 and 1. Specifies the necessary confidence |
| 6627 * level to choose a winner. This field may not be changed for an experiments |
| 6628 * whose status is ENDED. |
| 6629 */ |
| 6630 core.double winnerConfidenceLevel; |
| 6631 |
| 6632 /** |
| 6633 * Boolean specifying whether a winner has been found for this experiment. |
| 6634 * This field is read-only. |
| 6635 */ |
| 6636 core.bool winnerFound; |
| 6637 |
| 6638 |
| 6639 Experiment(); |
| 6640 |
| 6641 Experiment.fromJson(core.Map _json) { |
| 6642 if (_json.containsKey("accountId")) { |
| 6643 accountId = _json["accountId"]; |
| 6644 } |
| 6645 if (_json.containsKey("created")) { |
| 6646 created = core.DateTime.parse(_json["created"]); |
| 6647 } |
| 6648 if (_json.containsKey("description")) { |
| 6649 description = _json["description"]; |
| 6650 } |
| 6651 if (_json.containsKey("editableInGaUi")) { |
| 6652 editableInGaUi = _json["editableInGaUi"]; |
| 6653 } |
| 6654 if (_json.containsKey("endTime")) { |
| 6655 endTime = core.DateTime.parse(_json["endTime"]); |
| 6656 } |
| 6657 if (_json.containsKey("equalWeighting")) { |
| 6658 equalWeighting = _json["equalWeighting"]; |
| 6659 } |
| 6660 if (_json.containsKey("id")) { |
| 6661 id = _json["id"]; |
| 6662 } |
| 6663 if (_json.containsKey("internalWebPropertyId")) { |
| 6664 internalWebPropertyId = _json["internalWebPropertyId"]; |
| 6665 } |
| 6666 if (_json.containsKey("kind")) { |
| 6667 kind = _json["kind"]; |
| 6668 } |
| 6669 if (_json.containsKey("minimumExperimentLengthInDays")) { |
| 6670 minimumExperimentLengthInDays = _json["minimumExperimentLengthInDays"]; |
| 6671 } |
| 6672 if (_json.containsKey("name")) { |
| 6673 name = _json["name"]; |
| 6674 } |
| 6675 if (_json.containsKey("objectiveMetric")) { |
| 6676 objectiveMetric = _json["objectiveMetric"]; |
| 6677 } |
| 6678 if (_json.containsKey("optimizationType")) { |
| 6679 optimizationType = _json["optimizationType"]; |
| 6680 } |
| 6681 if (_json.containsKey("parentLink")) { |
| 6682 parentLink = new ExperimentParentLink.fromJson(_json["parentLink"]); |
| 6683 } |
| 6684 if (_json.containsKey("profileId")) { |
| 6685 profileId = _json["profileId"]; |
| 6686 } |
| 6687 if (_json.containsKey("reasonExperimentEnded")) { |
| 6688 reasonExperimentEnded = _json["reasonExperimentEnded"]; |
| 6689 } |
| 6690 if (_json.containsKey("rewriteVariationUrlsAsOriginal")) { |
| 6691 rewriteVariationUrlsAsOriginal = _json["rewriteVariationUrlsAsOriginal"]; |
| 6692 } |
| 6693 if (_json.containsKey("selfLink")) { |
| 6694 selfLink = _json["selfLink"]; |
| 6695 } |
| 6696 if (_json.containsKey("servingFramework")) { |
| 6697 servingFramework = _json["servingFramework"]; |
| 6698 } |
| 6699 if (_json.containsKey("snippet")) { |
| 6700 snippet = _json["snippet"]; |
| 6701 } |
| 6702 if (_json.containsKey("startTime")) { |
| 6703 startTime = core.DateTime.parse(_json["startTime"]); |
| 6704 } |
| 6705 if (_json.containsKey("status")) { |
| 6706 status = _json["status"]; |
| 6707 } |
| 6708 if (_json.containsKey("trafficCoverage")) { |
| 6709 trafficCoverage = _json["trafficCoverage"]; |
| 6710 } |
| 6711 if (_json.containsKey("updated")) { |
| 6712 updated = core.DateTime.parse(_json["updated"]); |
| 6713 } |
| 6714 if (_json.containsKey("variations")) { |
| 6715 variations = _json["variations"].map((value) => new ExperimentVariations.f
romJson(value)).toList(); |
| 6716 } |
| 6717 if (_json.containsKey("webPropertyId")) { |
| 6718 webPropertyId = _json["webPropertyId"]; |
| 6719 } |
| 6720 if (_json.containsKey("winnerConfidenceLevel")) { |
| 6721 winnerConfidenceLevel = _json["winnerConfidenceLevel"]; |
| 6722 } |
| 6723 if (_json.containsKey("winnerFound")) { |
| 6724 winnerFound = _json["winnerFound"]; |
| 6725 } |
| 6726 } |
| 6727 |
| 6728 core.Map toJson() { |
| 6729 var _json = new core.Map(); |
| 6730 if (accountId != null) { |
| 6731 _json["accountId"] = accountId; |
| 6732 } |
| 6733 if (created != null) { |
| 6734 _json["created"] = (created).toIso8601String(); |
| 6735 } |
| 6736 if (description != null) { |
| 6737 _json["description"] = description; |
| 6738 } |
| 6739 if (editableInGaUi != null) { |
| 6740 _json["editableInGaUi"] = editableInGaUi; |
| 6741 } |
| 6742 if (endTime != null) { |
| 6743 _json["endTime"] = (endTime).toIso8601String(); |
| 6744 } |
| 6745 if (equalWeighting != null) { |
| 6746 _json["equalWeighting"] = equalWeighting; |
| 6747 } |
| 6748 if (id != null) { |
| 6749 _json["id"] = id; |
| 6750 } |
| 6751 if (internalWebPropertyId != null) { |
| 6752 _json["internalWebPropertyId"] = internalWebPropertyId; |
| 6753 } |
| 6754 if (kind != null) { |
| 6755 _json["kind"] = kind; |
| 6756 } |
| 6757 if (minimumExperimentLengthInDays != null) { |
| 6758 _json["minimumExperimentLengthInDays"] = minimumExperimentLengthInDays; |
| 6759 } |
| 6760 if (name != null) { |
| 6761 _json["name"] = name; |
| 6762 } |
| 6763 if (objectiveMetric != null) { |
| 6764 _json["objectiveMetric"] = objectiveMetric; |
| 6765 } |
| 6766 if (optimizationType != null) { |
| 6767 _json["optimizationType"] = optimizationType; |
| 6768 } |
| 6769 if (parentLink != null) { |
| 6770 _json["parentLink"] = (parentLink).toJson(); |
| 6771 } |
| 6772 if (profileId != null) { |
| 6773 _json["profileId"] = profileId; |
| 6774 } |
| 6775 if (reasonExperimentEnded != null) { |
| 6776 _json["reasonExperimentEnded"] = reasonExperimentEnded; |
| 6777 } |
| 6778 if (rewriteVariationUrlsAsOriginal != null) { |
| 6779 _json["rewriteVariationUrlsAsOriginal"] = rewriteVariationUrlsAsOriginal; |
| 6780 } |
| 6781 if (selfLink != null) { |
| 6782 _json["selfLink"] = selfLink; |
| 6783 } |
| 6784 if (servingFramework != null) { |
| 6785 _json["servingFramework"] = servingFramework; |
| 6786 } |
| 6787 if (snippet != null) { |
| 6788 _json["snippet"] = snippet; |
| 6789 } |
| 6790 if (startTime != null) { |
| 6791 _json["startTime"] = (startTime).toIso8601String(); |
| 6792 } |
| 6793 if (status != null) { |
| 6794 _json["status"] = status; |
| 6795 } |
| 6796 if (trafficCoverage != null) { |
| 6797 _json["trafficCoverage"] = trafficCoverage; |
| 6798 } |
| 6799 if (updated != null) { |
| 6800 _json["updated"] = (updated).toIso8601String(); |
| 6801 } |
| 6802 if (variations != null) { |
| 6803 _json["variations"] = variations.map((value) => (value).toJson()).toList()
; |
| 6804 } |
| 6805 if (webPropertyId != null) { |
| 6806 _json["webPropertyId"] = webPropertyId; |
| 6807 } |
| 6808 if (winnerConfidenceLevel != null) { |
| 6809 _json["winnerConfidenceLevel"] = winnerConfidenceLevel; |
| 6810 } |
| 6811 if (winnerFound != null) { |
| 6812 _json["winnerFound"] = winnerFound; |
| 6813 } |
| 6814 return _json; |
| 6815 } |
| 6816 } |
| 6817 |
| 6818 |
| 6819 /** |
| 6820 * An experiment collection lists Analytics experiments to which the user has |
| 6821 * access. Each view (profile) can have a set of experiments. Each resource in |
| 6822 * the Experiment collection corresponds to a single Analytics experiment. |
| 6823 */ |
| 6824 class Experiments { |
| 6825 /** A list of experiments. */ |
| 6826 core.List<Experiment> items; |
| 6827 |
| 6828 /** |
| 6829 * The maximum number of resources the response can contain, regardless of the |
| 6830 * actual number of resources returned. Its value ranges from 1 to 1000 with a |
| 6831 * value of 1000 by default, or otherwise specified by the max-results query |
| 6832 * parameter. |
| 6833 */ |
| 6834 core.int itemsPerPage; |
| 6835 |
| 6836 /** Collection type. */ |
| 6837 core.String kind; |
| 6838 |
| 6839 /** Link to next page for this experiment collection. */ |
| 6840 core.String nextLink; |
| 6841 |
| 6842 /** Link to previous page for this experiment collection. */ |
| 6843 core.String previousLink; |
| 6844 |
| 6845 /** |
| 6846 * The starting index of the resources, which is 1 by default or otherwise |
| 6847 * specified by the start-index query parameter. |
| 6848 */ |
| 6849 core.int startIndex; |
| 6850 |
| 6851 /** |
| 6852 * The total number of results for the query, regardless of the number of |
| 6853 * resources in the result. |
| 6854 */ |
| 6855 core.int totalResults; |
| 6856 |
| 6857 /** Email ID of the authenticated user */ |
| 6858 core.String username; |
| 6859 |
| 6860 |
| 6861 Experiments(); |
| 6862 |
| 6863 Experiments.fromJson(core.Map _json) { |
| 6864 if (_json.containsKey("items")) { |
| 6865 items = _json["items"].map((value) => new Experiment.fromJson(value)).toLi
st(); |
| 6866 } |
| 6867 if (_json.containsKey("itemsPerPage")) { |
| 6868 itemsPerPage = _json["itemsPerPage"]; |
| 6869 } |
| 6870 if (_json.containsKey("kind")) { |
| 6871 kind = _json["kind"]; |
| 6872 } |
| 6873 if (_json.containsKey("nextLink")) { |
| 6874 nextLink = _json["nextLink"]; |
| 6875 } |
| 6876 if (_json.containsKey("previousLink")) { |
| 6877 previousLink = _json["previousLink"]; |
| 6878 } |
| 6879 if (_json.containsKey("startIndex")) { |
| 6880 startIndex = _json["startIndex"]; |
| 6881 } |
| 6882 if (_json.containsKey("totalResults")) { |
| 6883 totalResults = _json["totalResults"]; |
| 6884 } |
| 6885 if (_json.containsKey("username")) { |
| 6886 username = _json["username"]; |
| 6887 } |
| 6888 } |
| 6889 |
| 6890 core.Map toJson() { |
| 6891 var _json = new core.Map(); |
| 6892 if (items != null) { |
| 6893 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 6894 } |
| 6895 if (itemsPerPage != null) { |
| 6896 _json["itemsPerPage"] = itemsPerPage; |
| 6897 } |
| 6898 if (kind != null) { |
| 6899 _json["kind"] = kind; |
| 6900 } |
| 6901 if (nextLink != null) { |
| 6902 _json["nextLink"] = nextLink; |
| 6903 } |
| 6904 if (previousLink != null) { |
| 6905 _json["previousLink"] = previousLink; |
| 6906 } |
| 6907 if (startIndex != null) { |
| 6908 _json["startIndex"] = startIndex; |
| 6909 } |
| 6910 if (totalResults != null) { |
| 6911 _json["totalResults"] = totalResults; |
| 6912 } |
| 6913 if (username != null) { |
| 6914 _json["username"] = username; |
| 6915 } |
| 6916 return _json; |
| 6917 } |
| 6918 } |
| 6919 |
| 6920 |
| 6921 /** Details for the filter of the type ADVANCED. */ |
| 6922 class FilterAdvancedDetails { |
| 6923 /** Indicates if the filter expressions are case sensitive. */ |
| 6924 core.bool caseSensitive; |
| 6925 |
| 6926 /** Expression to extract from field A. */ |
| 6927 core.String extractA; |
| 6928 |
| 6929 /** Expression to extract from field B. */ |
| 6930 core.String extractB; |
| 6931 |
| 6932 /** Field A. */ |
| 6933 core.String fieldA; |
| 6934 |
| 6935 /** Indicates if field A is required to match. */ |
| 6936 core.bool fieldARequired; |
| 6937 |
| 6938 /** Field B. */ |
| 6939 core.String fieldB; |
| 6940 |
| 6941 /** Indicates if field B is required to match. */ |
| 6942 core.bool fieldBRequired; |
| 6943 |
| 6944 /** Expression used to construct the output value. */ |
| 6945 core.String outputConstructor; |
| 6946 |
| 6947 /** Output field. */ |
| 6948 core.String outputToField; |
| 6949 |
| 6950 /** |
| 6951 * Indicates if the existing value of the output field, if any, should be |
| 6952 * overridden by the output expression. |
| 6953 */ |
| 6954 core.bool overrideOutputField; |
| 6955 |
| 6956 |
| 6957 FilterAdvancedDetails(); |
| 6958 |
| 6959 FilterAdvancedDetails.fromJson(core.Map _json) { |
| 6960 if (_json.containsKey("caseSensitive")) { |
| 6961 caseSensitive = _json["caseSensitive"]; |
| 6962 } |
| 6963 if (_json.containsKey("extractA")) { |
| 6964 extractA = _json["extractA"]; |
| 6965 } |
| 6966 if (_json.containsKey("extractB")) { |
| 6967 extractB = _json["extractB"]; |
| 6968 } |
| 6969 if (_json.containsKey("fieldA")) { |
| 6970 fieldA = _json["fieldA"]; |
| 6971 } |
| 6972 if (_json.containsKey("fieldARequired")) { |
| 6973 fieldARequired = _json["fieldARequired"]; |
| 6974 } |
| 6975 if (_json.containsKey("fieldB")) { |
| 6976 fieldB = _json["fieldB"]; |
| 6977 } |
| 6978 if (_json.containsKey("fieldBRequired")) { |
| 6979 fieldBRequired = _json["fieldBRequired"]; |
| 6980 } |
| 6981 if (_json.containsKey("outputConstructor")) { |
| 6982 outputConstructor = _json["outputConstructor"]; |
| 6983 } |
| 6984 if (_json.containsKey("outputToField")) { |
| 6985 outputToField = _json["outputToField"]; |
| 6986 } |
| 6987 if (_json.containsKey("overrideOutputField")) { |
| 6988 overrideOutputField = _json["overrideOutputField"]; |
| 6989 } |
| 6990 } |
| 6991 |
| 6992 core.Map toJson() { |
| 6993 var _json = new core.Map(); |
| 6994 if (caseSensitive != null) { |
| 6995 _json["caseSensitive"] = caseSensitive; |
| 6996 } |
| 6997 if (extractA != null) { |
| 6998 _json["extractA"] = extractA; |
| 6999 } |
| 7000 if (extractB != null) { |
| 7001 _json["extractB"] = extractB; |
| 7002 } |
| 7003 if (fieldA != null) { |
| 7004 _json["fieldA"] = fieldA; |
| 7005 } |
| 7006 if (fieldARequired != null) { |
| 7007 _json["fieldARequired"] = fieldARequired; |
| 7008 } |
| 7009 if (fieldB != null) { |
| 7010 _json["fieldB"] = fieldB; |
| 7011 } |
| 7012 if (fieldBRequired != null) { |
| 7013 _json["fieldBRequired"] = fieldBRequired; |
| 7014 } |
| 7015 if (outputConstructor != null) { |
| 7016 _json["outputConstructor"] = outputConstructor; |
| 7017 } |
| 7018 if (outputToField != null) { |
| 7019 _json["outputToField"] = outputToField; |
| 7020 } |
| 7021 if (overrideOutputField != null) { |
| 7022 _json["overrideOutputField"] = overrideOutputField; |
| 7023 } |
| 7024 return _json; |
| 7025 } |
| 7026 } |
| 7027 |
| 7028 |
| 7029 /** Details for the filter of the type LOWER. */ |
| 7030 class FilterLowercaseDetails { |
| 7031 /** Field to use in the filter. */ |
| 7032 core.String field; |
| 7033 |
| 7034 |
| 7035 FilterLowercaseDetails(); |
| 7036 |
| 7037 FilterLowercaseDetails.fromJson(core.Map _json) { |
| 7038 if (_json.containsKey("field")) { |
| 7039 field = _json["field"]; |
| 7040 } |
| 7041 } |
| 7042 |
| 7043 core.Map toJson() { |
| 7044 var _json = new core.Map(); |
| 7045 if (field != null) { |
| 7046 _json["field"] = field; |
| 7047 } |
| 7048 return _json; |
| 7049 } |
| 7050 } |
| 7051 |
| 7052 |
| 7053 /** |
| 7054 * Parent link for this filter. Points to the account to which this filter |
| 7055 * belongs. |
| 7056 */ |
| 7057 class FilterParentLink { |
| 7058 /** Link to the account to which this filter belongs. */ |
| 7059 core.String href; |
| 7060 |
| 7061 /** Value is "analytics#account". */ |
| 7062 core.String type; |
| 7063 |
| 7064 |
| 7065 FilterParentLink(); |
| 7066 |
| 7067 FilterParentLink.fromJson(core.Map _json) { |
| 7068 if (_json.containsKey("href")) { |
| 7069 href = _json["href"]; |
| 7070 } |
| 7071 if (_json.containsKey("type")) { |
| 7072 type = _json["type"]; |
| 7073 } |
| 7074 } |
| 7075 |
| 7076 core.Map toJson() { |
| 7077 var _json = new core.Map(); |
| 7078 if (href != null) { |
| 7079 _json["href"] = href; |
| 7080 } |
| 7081 if (type != null) { |
| 7082 _json["type"] = type; |
| 7083 } |
| 7084 return _json; |
| 7085 } |
| 7086 } |
| 7087 |
| 7088 |
| 7089 /** Details for the filter of the type SEARCH_AND_REPLACE. */ |
| 7090 class FilterSearchAndReplaceDetails { |
| 7091 /** Determines if the filter is case sensitive. */ |
| 7092 core.bool caseSensitive; |
| 7093 |
| 7094 /** Field to use in the filter. */ |
| 7095 core.String field; |
| 7096 |
| 7097 /** Term to replace the search term with. */ |
| 7098 core.String replaceString; |
| 7099 |
| 7100 /** Term to search. */ |
| 7101 core.String searchString; |
| 7102 |
| 7103 |
| 7104 FilterSearchAndReplaceDetails(); |
| 7105 |
| 7106 FilterSearchAndReplaceDetails.fromJson(core.Map _json) { |
| 7107 if (_json.containsKey("caseSensitive")) { |
| 7108 caseSensitive = _json["caseSensitive"]; |
| 7109 } |
| 7110 if (_json.containsKey("field")) { |
| 7111 field = _json["field"]; |
| 7112 } |
| 7113 if (_json.containsKey("replaceString")) { |
| 7114 replaceString = _json["replaceString"]; |
| 7115 } |
| 7116 if (_json.containsKey("searchString")) { |
| 7117 searchString = _json["searchString"]; |
| 7118 } |
| 7119 } |
| 7120 |
| 7121 core.Map toJson() { |
| 7122 var _json = new core.Map(); |
| 7123 if (caseSensitive != null) { |
| 7124 _json["caseSensitive"] = caseSensitive; |
| 7125 } |
| 7126 if (field != null) { |
| 7127 _json["field"] = field; |
| 7128 } |
| 7129 if (replaceString != null) { |
| 7130 _json["replaceString"] = replaceString; |
| 7131 } |
| 7132 if (searchString != null) { |
| 7133 _json["searchString"] = searchString; |
| 7134 } |
| 7135 return _json; |
| 7136 } |
| 7137 } |
| 7138 |
| 7139 |
| 7140 /** Details for the filter of the type UPPER. */ |
| 7141 class FilterUppercaseDetails { |
| 7142 /** Field to use in the filter. */ |
| 7143 core.String field; |
| 7144 |
| 7145 |
| 7146 FilterUppercaseDetails(); |
| 7147 |
| 7148 FilterUppercaseDetails.fromJson(core.Map _json) { |
| 7149 if (_json.containsKey("field")) { |
| 7150 field = _json["field"]; |
| 7151 } |
| 7152 } |
| 7153 |
| 7154 core.Map toJson() { |
| 7155 var _json = new core.Map(); |
| 7156 if (field != null) { |
| 7157 _json["field"] = field; |
| 7158 } |
| 7159 return _json; |
| 7160 } |
| 7161 } |
| 7162 |
| 7163 |
| 7164 /** JSON template for an Analytics account filter. */ |
| 7165 class Filter { |
| 7166 /** Account ID to which this filter belongs. */ |
| 7167 core.String accountId; |
| 7168 |
| 7169 /** Details for the filter of the type ADVANCED. */ |
| 7170 FilterAdvancedDetails advancedDetails; |
| 7171 |
| 7172 /** Time this filter was created. */ |
| 7173 core.DateTime created; |
| 7174 |
| 7175 /** Details for the filter of the type EXCLUDE. */ |
| 7176 FilterExpression excludeDetails; |
| 7177 |
| 7178 /** Filter ID. */ |
| 7179 core.String id; |
| 7180 |
| 7181 /** Details for the filter of the type INCLUDE. */ |
| 7182 FilterExpression includeDetails; |
| 7183 |
| 7184 /** Resource type for Analytics filter. */ |
| 7185 core.String kind; |
| 7186 |
| 7187 /** Details for the filter of the type LOWER. */ |
| 7188 FilterLowercaseDetails lowercaseDetails; |
| 7189 |
| 7190 /** Name of this filter. */ |
| 7191 core.String name; |
| 7192 |
| 7193 /** |
| 7194 * Parent link for this filter. Points to the account to which this filter |
| 7195 * belongs. |
| 7196 */ |
| 7197 FilterParentLink parentLink; |
| 7198 |
| 7199 /** Details for the filter of the type SEARCH_AND_REPLACE. */ |
| 7200 FilterSearchAndReplaceDetails searchAndReplaceDetails; |
| 7201 |
| 7202 /** Link for this filter. */ |
| 7203 core.String selfLink; |
| 7204 |
| 7205 /** |
| 7206 * Type of this filter. Possible values are INCLUDE, EXCLUDE, LOWERCASE, |
| 7207 * UPPERCASE, SEARCH_AND_REPLACE and ADVANCED. |
| 7208 */ |
| 7209 core.String type; |
| 7210 |
| 7211 /** Time this filter was last modified. */ |
| 7212 core.DateTime updated; |
| 7213 |
| 7214 /** Details for the filter of the type UPPER. */ |
| 7215 FilterUppercaseDetails uppercaseDetails; |
| 7216 |
| 7217 |
| 7218 Filter(); |
| 7219 |
| 7220 Filter.fromJson(core.Map _json) { |
| 7221 if (_json.containsKey("accountId")) { |
| 7222 accountId = _json["accountId"]; |
| 7223 } |
| 7224 if (_json.containsKey("advancedDetails")) { |
| 7225 advancedDetails = new FilterAdvancedDetails.fromJson(_json["advancedDetail
s"]); |
| 7226 } |
| 7227 if (_json.containsKey("created")) { |
| 7228 created = core.DateTime.parse(_json["created"]); |
| 7229 } |
| 7230 if (_json.containsKey("excludeDetails")) { |
| 7231 excludeDetails = new FilterExpression.fromJson(_json["excludeDetails"]); |
| 7232 } |
| 7233 if (_json.containsKey("id")) { |
| 7234 id = _json["id"]; |
| 7235 } |
| 7236 if (_json.containsKey("includeDetails")) { |
| 7237 includeDetails = new FilterExpression.fromJson(_json["includeDetails"]); |
| 7238 } |
| 7239 if (_json.containsKey("kind")) { |
| 7240 kind = _json["kind"]; |
| 7241 } |
| 7242 if (_json.containsKey("lowercaseDetails")) { |
| 7243 lowercaseDetails = new FilterLowercaseDetails.fromJson(_json["lowercaseDet
ails"]); |
| 7244 } |
| 7245 if (_json.containsKey("name")) { |
| 7246 name = _json["name"]; |
| 7247 } |
| 7248 if (_json.containsKey("parentLink")) { |
| 7249 parentLink = new FilterParentLink.fromJson(_json["parentLink"]); |
| 7250 } |
| 7251 if (_json.containsKey("searchAndReplaceDetails")) { |
| 7252 searchAndReplaceDetails = new FilterSearchAndReplaceDetails.fromJson(_json
["searchAndReplaceDetails"]); |
| 7253 } |
| 7254 if (_json.containsKey("selfLink")) { |
| 7255 selfLink = _json["selfLink"]; |
| 7256 } |
| 7257 if (_json.containsKey("type")) { |
| 7258 type = _json["type"]; |
| 7259 } |
| 7260 if (_json.containsKey("updated")) { |
| 7261 updated = core.DateTime.parse(_json["updated"]); |
| 7262 } |
| 7263 if (_json.containsKey("uppercaseDetails")) { |
| 7264 uppercaseDetails = new FilterUppercaseDetails.fromJson(_json["uppercaseDet
ails"]); |
| 7265 } |
| 7266 } |
| 7267 |
| 7268 core.Map toJson() { |
| 7269 var _json = new core.Map(); |
| 7270 if (accountId != null) { |
| 7271 _json["accountId"] = accountId; |
| 7272 } |
| 7273 if (advancedDetails != null) { |
| 7274 _json["advancedDetails"] = (advancedDetails).toJson(); |
| 7275 } |
| 7276 if (created != null) { |
| 7277 _json["created"] = (created).toIso8601String(); |
| 7278 } |
| 7279 if (excludeDetails != null) { |
| 7280 _json["excludeDetails"] = (excludeDetails).toJson(); |
| 7281 } |
| 7282 if (id != null) { |
| 7283 _json["id"] = id; |
| 7284 } |
| 7285 if (includeDetails != null) { |
| 7286 _json["includeDetails"] = (includeDetails).toJson(); |
| 7287 } |
| 7288 if (kind != null) { |
| 7289 _json["kind"] = kind; |
| 7290 } |
| 7291 if (lowercaseDetails != null) { |
| 7292 _json["lowercaseDetails"] = (lowercaseDetails).toJson(); |
| 7293 } |
| 7294 if (name != null) { |
| 7295 _json["name"] = name; |
| 7296 } |
| 7297 if (parentLink != null) { |
| 7298 _json["parentLink"] = (parentLink).toJson(); |
| 7299 } |
| 7300 if (searchAndReplaceDetails != null) { |
| 7301 _json["searchAndReplaceDetails"] = (searchAndReplaceDetails).toJson(); |
| 7302 } |
| 7303 if (selfLink != null) { |
| 7304 _json["selfLink"] = selfLink; |
| 7305 } |
| 7306 if (type != null) { |
| 7307 _json["type"] = type; |
| 7308 } |
| 7309 if (updated != null) { |
| 7310 _json["updated"] = (updated).toIso8601String(); |
| 7311 } |
| 7312 if (uppercaseDetails != null) { |
| 7313 _json["uppercaseDetails"] = (uppercaseDetails).toJson(); |
| 7314 } |
| 7315 return _json; |
| 7316 } |
| 7317 } |
| 7318 |
| 7319 |
| 7320 /** JSON template for an Analytics filter expression. */ |
| 7321 class FilterExpression { |
| 7322 /** Determines if the filter is case sensitive. */ |
| 7323 core.bool caseSensitive; |
| 7324 |
| 7325 /** Filter expression value */ |
| 7326 core.String expressionValue; |
| 7327 |
| 7328 /** |
| 7329 * Field to filter. Possible values: |
| 7330 * - Reserved |
| 7331 * - UNUSED, |
| 7332 * - Content and Traffic |
| 7333 * - PAGE_REQUEST_URI, |
| 7334 * - PAGE_HOSTNAME, |
| 7335 * - PAGE_TITLE, |
| 7336 * - REFERRAL, |
| 7337 * - COST_DATA_URI (Campaign target URL), |
| 7338 * - HIT_TYPE, |
| 7339 * - INTERNAL_SEARCH_TERM, |
| 7340 * - INTERNAL_SEARCH_TYPE, |
| 7341 * - SOURCE_PROPERTY_TRACKING_ID, |
| 7342 * - Campaign or AdGroup |
| 7343 * - CAMPAIGN_SOURCE, |
| 7344 * - CAMPAIGN_MEDIUM, |
| 7345 * - CAMPAIGN_NAME, |
| 7346 * - CAMPAIGN_AD_GROUP, |
| 7347 * - CAMPAIGN_TERM, |
| 7348 * - CAMPAIGN_CONTENT, |
| 7349 * - CAMPAIGN_CODE, |
| 7350 * - CAMPAIGN_REFERRAL_PATH, |
| 7351 * - E-Commerce |
| 7352 * - TRANSACTION_COUNTRY, |
| 7353 * - TRANSACTION_REGION, |
| 7354 * - TRANSACTION_CITY, |
| 7355 * - TRANSACTION_AFFILIATION (Store or order location), |
| 7356 * - ITEM_NAME, |
| 7357 * - ITEM_CODE, |
| 7358 * - ITEM_VARIATION, |
| 7359 * - TRANSACTION_ID, |
| 7360 * - TRANSACTION_CURRENCY_CODE, |
| 7361 * - PRODUCT_ACTION_TYPE, |
| 7362 * - Audience/Users |
| 7363 * - BROWSER, |
| 7364 * - BROWSER_VERSION, |
| 7365 * - BROWSER_SIZE, |
| 7366 * - PLATFORM, |
| 7367 * - PLATFORM_VERSION, |
| 7368 * - LANGUAGE, |
| 7369 * - SCREEN_RESOLUTION, |
| 7370 * - SCREEN_COLORS, |
| 7371 * - JAVA_ENABLED, |
| 7372 * - FLASH_VERSION, |
| 7373 * - GEO_SPEED (Connection speed), |
| 7374 * - VISITOR_TYPE, |
| 7375 * - GEO_ORGANIZATION (ISP organization), |
| 7376 * - GEO_DOMAIN, |
| 7377 * - GEO_IP_ADDRESS, |
| 7378 * - GEO_IP_VERSION, |
| 7379 * - Location |
| 7380 * - GEO_COUNTRY, |
| 7381 * - GEO_REGION, |
| 7382 * - GEO_CITY, |
| 7383 * - Event |
| 7384 * - EVENT_CATEGORY, |
| 7385 * - EVENT_ACTION, |
| 7386 * - EVENT_LABEL, |
| 7387 * - Other |
| 7388 * - CUSTOM_FIELD_1, |
| 7389 * - CUSTOM_FIELD_2, |
| 7390 * - USER_DEFINED_VALUE, |
| 7391 * - Application |
| 7392 * - APP_ID, |
| 7393 * - APP_INSTALLER_ID, |
| 7394 * - APP_NAME, |
| 7395 * - APP_VERSION, |
| 7396 * - SCREEN, |
| 7397 * - IS_APP, |
| 7398 * - IS_FATAL_EXCEPTION, |
| 7399 * - EXCEPTION_DESCRIPTION, |
| 7400 * - Mobile device |
| 7401 * - IS_MOBILE, |
| 7402 * - IS_TABLET, |
| 7403 * - MOBILE_HAS_QWERTY_KEYBOARD, |
| 7404 * - MOBILE_HAS_NFC_SUPPORT, |
| 7405 * - MOBILE_HAS_CELLULAR_RADIO, |
| 7406 * - MOBILE_HAS_WIFI_SUPPORT, |
| 7407 * - MOBILE_BRAND_NAME, |
| 7408 * - MOBILE_MODEL_NAME, |
| 7409 * - MOBILE_MARKETING_NAME, |
| 7410 * - MOBILE_POINTING_METHOD, |
| 7411 * - Social |
| 7412 * - SOCIAL_NETWORK, |
| 7413 * - SOCIAL_ACTION, |
| 7414 * - SOCIAL_ACTION_TARGET, |
| 7415 */ |
| 7416 core.String field; |
| 7417 |
| 7418 /** Kind value for filter expression */ |
| 7419 core.String kind; |
| 7420 |
| 7421 /** |
| 7422 * Match type for this filter. Possible values are BEGINS_WITH, EQUAL, |
| 7423 * ENDS_WITH, CONTAINS, MATCHES. Include and Exclude filters can use any match |
| 7424 * type. Match type is not applicable to Upper case and Lower case filters. |
| 7425 * Search and Replace expressions in the Search and Replace filter and all |
| 7426 * filter expressions in the Advanced filter default to MATCHES. User should |
| 7427 * not set match type for those filters. |
| 7428 */ |
| 7429 core.String matchType; |
| 7430 |
| 7431 |
| 7432 FilterExpression(); |
| 7433 |
| 7434 FilterExpression.fromJson(core.Map _json) { |
| 7435 if (_json.containsKey("caseSensitive")) { |
| 7436 caseSensitive = _json["caseSensitive"]; |
| 7437 } |
| 7438 if (_json.containsKey("expressionValue")) { |
| 7439 expressionValue = _json["expressionValue"]; |
| 7440 } |
| 7441 if (_json.containsKey("field")) { |
| 7442 field = _json["field"]; |
| 7443 } |
| 7444 if (_json.containsKey("kind")) { |
| 7445 kind = _json["kind"]; |
| 7446 } |
| 7447 if (_json.containsKey("matchType")) { |
| 7448 matchType = _json["matchType"]; |
| 7449 } |
| 7450 } |
| 7451 |
| 7452 core.Map toJson() { |
| 7453 var _json = new core.Map(); |
| 7454 if (caseSensitive != null) { |
| 7455 _json["caseSensitive"] = caseSensitive; |
| 7456 } |
| 7457 if (expressionValue != null) { |
| 7458 _json["expressionValue"] = expressionValue; |
| 7459 } |
| 7460 if (field != null) { |
| 7461 _json["field"] = field; |
| 7462 } |
| 7463 if (kind != null) { |
| 7464 _json["kind"] = kind; |
| 7465 } |
| 7466 if (matchType != null) { |
| 7467 _json["matchType"] = matchType; |
| 7468 } |
| 7469 return _json; |
| 7470 } |
| 7471 } |
| 7472 |
| 7473 |
| 7474 /** JSON template for a profile filter link. */ |
| 7475 class FilterRef { |
| 7476 /** Account ID to which this filter belongs. */ |
| 7477 core.String accountId; |
| 7478 |
| 7479 /** Link for this filter. */ |
| 7480 core.String href; |
| 7481 |
| 7482 /** Filter ID. */ |
| 7483 core.String id; |
| 7484 |
| 7485 /** Kind value for filter reference. */ |
| 7486 core.String kind; |
| 7487 |
| 7488 /** Name of this filter. */ |
| 7489 core.String name; |
| 7490 |
| 7491 |
| 7492 FilterRef(); |
| 7493 |
| 7494 FilterRef.fromJson(core.Map _json) { |
| 7495 if (_json.containsKey("accountId")) { |
| 7496 accountId = _json["accountId"]; |
| 7497 } |
| 7498 if (_json.containsKey("href")) { |
| 7499 href = _json["href"]; |
| 7500 } |
| 7501 if (_json.containsKey("id")) { |
| 7502 id = _json["id"]; |
| 7503 } |
| 7504 if (_json.containsKey("kind")) { |
| 7505 kind = _json["kind"]; |
| 7506 } |
| 7507 if (_json.containsKey("name")) { |
| 7508 name = _json["name"]; |
| 7509 } |
| 7510 } |
| 7511 |
| 7512 core.Map toJson() { |
| 7513 var _json = new core.Map(); |
| 7514 if (accountId != null) { |
| 7515 _json["accountId"] = accountId; |
| 7516 } |
| 7517 if (href != null) { |
| 7518 _json["href"] = href; |
| 7519 } |
| 7520 if (id != null) { |
| 7521 _json["id"] = id; |
| 7522 } |
| 7523 if (kind != null) { |
| 7524 _json["kind"] = kind; |
| 7525 } |
| 7526 if (name != null) { |
| 7527 _json["name"] = name; |
| 7528 } |
| 7529 return _json; |
| 7530 } |
| 7531 } |
| 7532 |
| 7533 |
| 7534 /** |
| 7535 * A filter collection lists filters created by users in an Analytics account. |
| 7536 * Each resource in the collection corresponds to a filter. |
| 7537 */ |
| 7538 class Filters { |
| 7539 /** A list of filters. */ |
| 7540 core.List<Filter> items; |
| 7541 |
| 7542 /** |
| 7543 * The maximum number of resources the response can contain, regardless of the |
| 7544 * actual number of resources returned. Its value ranges from 1 to 1,000 with |
| 7545 * a value of 1000 by default, or otherwise specified by the max-results query |
| 7546 * parameter. |
| 7547 */ |
| 7548 core.int itemsPerPage; |
| 7549 |
| 7550 /** Collection type. */ |
| 7551 core.String kind; |
| 7552 |
| 7553 /** Link to next page for this filter collection. */ |
| 7554 core.String nextLink; |
| 7555 |
| 7556 /** Link to previous page for this filter collection. */ |
| 7557 core.String previousLink; |
| 7558 |
| 7559 /** |
| 7560 * The starting index of the resources, which is 1 by default or otherwise |
| 7561 * specified by the start-index query parameter. |
| 7562 */ |
| 7563 core.int startIndex; |
| 7564 |
| 7565 /** |
| 7566 * The total number of results for the query, regardless of the number of |
| 7567 * results in the response. |
| 7568 */ |
| 7569 core.int totalResults; |
| 7570 |
| 7571 /** Email ID of the authenticated user */ |
| 7572 core.String username; |
| 7573 |
| 7574 |
| 7575 Filters(); |
| 7576 |
| 7577 Filters.fromJson(core.Map _json) { |
| 7578 if (_json.containsKey("items")) { |
| 7579 items = _json["items"].map((value) => new Filter.fromJson(value)).toList()
; |
| 7580 } |
| 7581 if (_json.containsKey("itemsPerPage")) { |
| 7582 itemsPerPage = _json["itemsPerPage"]; |
| 7583 } |
| 7584 if (_json.containsKey("kind")) { |
| 7585 kind = _json["kind"]; |
| 7586 } |
| 7587 if (_json.containsKey("nextLink")) { |
| 7588 nextLink = _json["nextLink"]; |
| 7589 } |
| 7590 if (_json.containsKey("previousLink")) { |
| 7591 previousLink = _json["previousLink"]; |
| 7592 } |
| 7593 if (_json.containsKey("startIndex")) { |
| 7594 startIndex = _json["startIndex"]; |
| 7595 } |
| 7596 if (_json.containsKey("totalResults")) { |
| 7597 totalResults = _json["totalResults"]; |
| 7598 } |
| 7599 if (_json.containsKey("username")) { |
| 7600 username = _json["username"]; |
| 7601 } |
| 7602 } |
| 7603 |
| 7604 core.Map toJson() { |
| 7605 var _json = new core.Map(); |
| 7606 if (items != null) { |
| 7607 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 7608 } |
| 7609 if (itemsPerPage != null) { |
| 7610 _json["itemsPerPage"] = itemsPerPage; |
| 7611 } |
| 7612 if (kind != null) { |
| 7613 _json["kind"] = kind; |
| 7614 } |
| 7615 if (nextLink != null) { |
| 7616 _json["nextLink"] = nextLink; |
| 7617 } |
| 7618 if (previousLink != null) { |
| 7619 _json["previousLink"] = previousLink; |
| 7620 } |
| 7621 if (startIndex != null) { |
| 7622 _json["startIndex"] = startIndex; |
| 7623 } |
| 7624 if (totalResults != null) { |
| 7625 _json["totalResults"] = totalResults; |
| 7626 } |
| 7627 if (username != null) { |
| 7628 _json["username"] = username; |
| 7629 } |
| 7630 return _json; |
| 7631 } |
| 7632 } |
| 7633 |
| 7634 |
| 7635 /** Not documented yet. */ |
| 7636 class GaDataColumnHeaders { |
| 7637 /** Column Type. Either DIMENSION or METRIC. */ |
| 7638 core.String columnType; |
| 7639 |
| 7640 /** |
| 7641 * Data type. Dimension column headers have only STRING as the data type. |
| 7642 * Metric column headers have data types for metric values such as INTEGER, |
| 7643 * DOUBLE, CURRENCY etc. |
| 7644 */ |
| 7645 core.String dataType; |
| 7646 |
| 7647 /** Column name. */ |
| 7648 core.String name; |
| 7649 |
| 7650 |
| 7651 GaDataColumnHeaders(); |
| 7652 |
| 7653 GaDataColumnHeaders.fromJson(core.Map _json) { |
| 7654 if (_json.containsKey("columnType")) { |
| 7655 columnType = _json["columnType"]; |
| 7656 } |
| 7657 if (_json.containsKey("dataType")) { |
| 7658 dataType = _json["dataType"]; |
| 7659 } |
| 7660 if (_json.containsKey("name")) { |
| 7661 name = _json["name"]; |
| 7662 } |
| 7663 } |
| 7664 |
| 7665 core.Map toJson() { |
| 7666 var _json = new core.Map(); |
| 7667 if (columnType != null) { |
| 7668 _json["columnType"] = columnType; |
| 7669 } |
| 7670 if (dataType != null) { |
| 7671 _json["dataType"] = dataType; |
| 7672 } |
| 7673 if (name != null) { |
| 7674 _json["name"] = name; |
| 7675 } |
| 7676 return _json; |
| 7677 } |
| 7678 } |
| 7679 |
| 7680 |
| 7681 /** Not documented yet. */ |
| 7682 class GaDataDataTableCols { |
| 7683 /** Not documented yet. */ |
| 7684 core.String id; |
| 7685 |
| 7686 /** Not documented yet. */ |
| 7687 core.String label; |
| 7688 |
| 7689 /** Not documented yet. */ |
| 7690 core.String type; |
| 7691 |
| 7692 |
| 7693 GaDataDataTableCols(); |
| 7694 |
| 7695 GaDataDataTableCols.fromJson(core.Map _json) { |
| 7696 if (_json.containsKey("id")) { |
| 7697 id = _json["id"]; |
| 7698 } |
| 7699 if (_json.containsKey("label")) { |
| 7700 label = _json["label"]; |
| 7701 } |
| 7702 if (_json.containsKey("type")) { |
| 7703 type = _json["type"]; |
| 7704 } |
| 7705 } |
| 7706 |
| 7707 core.Map toJson() { |
| 7708 var _json = new core.Map(); |
| 7709 if (id != null) { |
| 7710 _json["id"] = id; |
| 7711 } |
| 7712 if (label != null) { |
| 7713 _json["label"] = label; |
| 7714 } |
| 7715 if (type != null) { |
| 7716 _json["type"] = type; |
| 7717 } |
| 7718 return _json; |
| 7719 } |
| 7720 } |
| 7721 |
| 7722 |
| 7723 /** Not documented yet. */ |
| 7724 class GaDataDataTableRowsC { |
| 7725 /** Not documented yet. */ |
| 7726 core.String v; |
| 7727 |
| 7728 |
| 7729 GaDataDataTableRowsC(); |
| 7730 |
| 7731 GaDataDataTableRowsC.fromJson(core.Map _json) { |
| 7732 if (_json.containsKey("v")) { |
| 7733 v = _json["v"]; |
| 7734 } |
| 7735 } |
| 7736 |
| 7737 core.Map toJson() { |
| 7738 var _json = new core.Map(); |
| 7739 if (v != null) { |
| 7740 _json["v"] = v; |
| 7741 } |
| 7742 return _json; |
| 7743 } |
| 7744 } |
| 7745 |
| 7746 |
| 7747 /** Not documented yet. */ |
| 7748 class GaDataDataTableRows { |
| 7749 /** Not documented yet. */ |
| 7750 core.List<GaDataDataTableRowsC> c; |
| 7751 |
| 7752 |
| 7753 GaDataDataTableRows(); |
| 7754 |
| 7755 GaDataDataTableRows.fromJson(core.Map _json) { |
| 7756 if (_json.containsKey("c")) { |
| 7757 c = _json["c"].map((value) => new GaDataDataTableRowsC.fromJson(value)).to
List(); |
| 7758 } |
| 7759 } |
| 7760 |
| 7761 core.Map toJson() { |
| 7762 var _json = new core.Map(); |
| 7763 if (c != null) { |
| 7764 _json["c"] = c.map((value) => (value).toJson()).toList(); |
| 7765 } |
| 7766 return _json; |
| 7767 } |
| 7768 } |
| 7769 |
| 7770 |
| 7771 /** Not documented yet. */ |
| 7772 class GaDataDataTable { |
| 7773 /** Not documented yet. */ |
| 7774 core.List<GaDataDataTableCols> cols; |
| 7775 |
| 7776 /** Not documented yet. */ |
| 7777 core.List<GaDataDataTableRows> rows; |
| 7778 |
| 7779 |
| 7780 GaDataDataTable(); |
| 7781 |
| 7782 GaDataDataTable.fromJson(core.Map _json) { |
| 7783 if (_json.containsKey("cols")) { |
| 7784 cols = _json["cols"].map((value) => new GaDataDataTableCols.fromJson(value
)).toList(); |
| 7785 } |
| 7786 if (_json.containsKey("rows")) { |
| 7787 rows = _json["rows"].map((value) => new GaDataDataTableRows.fromJson(value
)).toList(); |
| 7788 } |
| 7789 } |
| 7790 |
| 7791 core.Map toJson() { |
| 7792 var _json = new core.Map(); |
| 7793 if (cols != null) { |
| 7794 _json["cols"] = cols.map((value) => (value).toJson()).toList(); |
| 7795 } |
| 7796 if (rows != null) { |
| 7797 _json["rows"] = rows.map((value) => (value).toJson()).toList(); |
| 7798 } |
| 7799 return _json; |
| 7800 } |
| 7801 } |
| 7802 |
| 7803 |
| 7804 /** |
| 7805 * Information for the view (profile), for which the Analytics data was |
| 7806 * requested. |
| 7807 */ |
| 7808 class GaDataProfileInfo { |
| 7809 /** Account ID to which this view (profile) belongs. */ |
| 7810 core.String accountId; |
| 7811 |
| 7812 /** Internal ID for the web property to which this view (profile) belongs. */ |
| 7813 core.String internalWebPropertyId; |
| 7814 |
| 7815 /** View (Profile) ID. */ |
| 7816 core.String profileId; |
| 7817 |
| 7818 /** View (Profile) name. */ |
| 7819 core.String profileName; |
| 7820 |
| 7821 /** Table ID for view (profile). */ |
| 7822 core.String tableId; |
| 7823 |
| 7824 /** Web Property ID to which this view (profile) belongs. */ |
| 7825 core.String webPropertyId; |
| 7826 |
| 7827 |
| 7828 GaDataProfileInfo(); |
| 7829 |
| 7830 GaDataProfileInfo.fromJson(core.Map _json) { |
| 7831 if (_json.containsKey("accountId")) { |
| 7832 accountId = _json["accountId"]; |
| 7833 } |
| 7834 if (_json.containsKey("internalWebPropertyId")) { |
| 7835 internalWebPropertyId = _json["internalWebPropertyId"]; |
| 7836 } |
| 7837 if (_json.containsKey("profileId")) { |
| 7838 profileId = _json["profileId"]; |
| 7839 } |
| 7840 if (_json.containsKey("profileName")) { |
| 7841 profileName = _json["profileName"]; |
| 7842 } |
| 7843 if (_json.containsKey("tableId")) { |
| 7844 tableId = _json["tableId"]; |
| 7845 } |
| 7846 if (_json.containsKey("webPropertyId")) { |
| 7847 webPropertyId = _json["webPropertyId"]; |
| 7848 } |
| 7849 } |
| 7850 |
| 7851 core.Map toJson() { |
| 7852 var _json = new core.Map(); |
| 7853 if (accountId != null) { |
| 7854 _json["accountId"] = accountId; |
| 7855 } |
| 7856 if (internalWebPropertyId != null) { |
| 7857 _json["internalWebPropertyId"] = internalWebPropertyId; |
| 7858 } |
| 7859 if (profileId != null) { |
| 7860 _json["profileId"] = profileId; |
| 7861 } |
| 7862 if (profileName != null) { |
| 7863 _json["profileName"] = profileName; |
| 7864 } |
| 7865 if (tableId != null) { |
| 7866 _json["tableId"] = tableId; |
| 7867 } |
| 7868 if (webPropertyId != null) { |
| 7869 _json["webPropertyId"] = webPropertyId; |
| 7870 } |
| 7871 return _json; |
| 7872 } |
| 7873 } |
| 7874 |
| 7875 |
| 7876 /** Analytics data request query parameters. */ |
| 7877 class GaDataQuery { |
| 7878 /** List of analytics dimensions. */ |
| 7879 core.String dimensions; |
| 7880 |
| 7881 /** End date. */ |
| 7882 core.String end_date; |
| 7883 |
| 7884 /** Comma-separated list of dimension or metric filters. */ |
| 7885 core.String filters; |
| 7886 |
| 7887 /** Unique table ID. */ |
| 7888 core.String ids; |
| 7889 |
| 7890 /** Maximum results per page. */ |
| 7891 core.int max_results; |
| 7892 |
| 7893 /** List of analytics metrics. */ |
| 7894 core.List<core.String> metrics; |
| 7895 |
| 7896 /** Desired sampling level */ |
| 7897 core.String samplingLevel; |
| 7898 |
| 7899 /** Analytics advanced segment. */ |
| 7900 core.String segment; |
| 7901 |
| 7902 /** List of dimensions or metrics based on which Analytics data is sorted. */ |
| 7903 core.List<core.String> sort; |
| 7904 |
| 7905 /** Start date. */ |
| 7906 core.String start_date; |
| 7907 |
| 7908 /** Start index. */ |
| 7909 core.int start_index; |
| 7910 |
| 7911 |
| 7912 GaDataQuery(); |
| 7913 |
| 7914 GaDataQuery.fromJson(core.Map _json) { |
| 7915 if (_json.containsKey("dimensions")) { |
| 7916 dimensions = _json["dimensions"]; |
| 7917 } |
| 7918 if (_json.containsKey("end-date")) { |
| 7919 end_date = _json["end-date"]; |
| 7920 } |
| 7921 if (_json.containsKey("filters")) { |
| 7922 filters = _json["filters"]; |
| 7923 } |
| 7924 if (_json.containsKey("ids")) { |
| 7925 ids = _json["ids"]; |
| 7926 } |
| 7927 if (_json.containsKey("max-results")) { |
| 7928 max_results = _json["max-results"]; |
| 7929 } |
| 7930 if (_json.containsKey("metrics")) { |
| 7931 metrics = _json["metrics"]; |
| 7932 } |
| 7933 if (_json.containsKey("samplingLevel")) { |
| 7934 samplingLevel = _json["samplingLevel"]; |
| 7935 } |
| 7936 if (_json.containsKey("segment")) { |
| 7937 segment = _json["segment"]; |
| 7938 } |
| 7939 if (_json.containsKey("sort")) { |
| 7940 sort = _json["sort"]; |
| 7941 } |
| 7942 if (_json.containsKey("start-date")) { |
| 7943 start_date = _json["start-date"]; |
| 7944 } |
| 7945 if (_json.containsKey("start-index")) { |
| 7946 start_index = _json["start-index"]; |
| 7947 } |
| 7948 } |
| 7949 |
| 7950 core.Map toJson() { |
| 7951 var _json = new core.Map(); |
| 7952 if (dimensions != null) { |
| 7953 _json["dimensions"] = dimensions; |
| 7954 } |
| 7955 if (end_date != null) { |
| 7956 _json["end-date"] = end_date; |
| 7957 } |
| 7958 if (filters != null) { |
| 7959 _json["filters"] = filters; |
| 7960 } |
| 7961 if (ids != null) { |
| 7962 _json["ids"] = ids; |
| 7963 } |
| 7964 if (max_results != null) { |
| 7965 _json["max-results"] = max_results; |
| 7966 } |
| 7967 if (metrics != null) { |
| 7968 _json["metrics"] = metrics; |
| 7969 } |
| 7970 if (samplingLevel != null) { |
| 7971 _json["samplingLevel"] = samplingLevel; |
| 7972 } |
| 7973 if (segment != null) { |
| 7974 _json["segment"] = segment; |
| 7975 } |
| 7976 if (sort != null) { |
| 7977 _json["sort"] = sort; |
| 7978 } |
| 7979 if (start_date != null) { |
| 7980 _json["start-date"] = start_date; |
| 7981 } |
| 7982 if (start_index != null) { |
| 7983 _json["start-index"] = start_index; |
| 7984 } |
| 7985 return _json; |
| 7986 } |
| 7987 } |
| 7988 |
| 7989 |
| 7990 /** Analytics data for a given view (profile). */ |
| 7991 class GaData { |
| 7992 /** |
| 7993 * Column headers that list dimension names followed by the metric names. The |
| 7994 * order of dimensions and metrics is same as specified in the request. |
| 7995 */ |
| 7996 core.List<GaDataColumnHeaders> columnHeaders; |
| 7997 |
| 7998 /** Determines if Analytics data contains samples. */ |
| 7999 core.bool containsSampledData; |
| 8000 |
| 8001 /** Not documented yet. */ |
| 8002 GaDataDataTable dataTable; |
| 8003 |
| 8004 /** Unique ID for this data response. */ |
| 8005 core.String id; |
| 8006 |
| 8007 /** |
| 8008 * The maximum number of rows the response can contain, regardless of the |
| 8009 * actual number of rows returned. Its value ranges from 1 to 10,000 with a |
| 8010 * value of 1000 by default, or otherwise specified by the max-results query |
| 8011 * parameter. |
| 8012 */ |
| 8013 core.int itemsPerPage; |
| 8014 |
| 8015 /** Resource type. */ |
| 8016 core.String kind; |
| 8017 |
| 8018 /** Link to next page for this Analytics data query. */ |
| 8019 core.String nextLink; |
| 8020 |
| 8021 /** Link to previous page for this Analytics data query. */ |
| 8022 core.String previousLink; |
| 8023 |
| 8024 /** |
| 8025 * Information for the view (profile), for which the Analytics data was |
| 8026 * requested. |
| 8027 */ |
| 8028 GaDataProfileInfo profileInfo; |
| 8029 |
| 8030 /** Analytics data request query parameters. */ |
| 8031 GaDataQuery query; |
| 8032 |
| 8033 /** |
| 8034 * Analytics data rows, where each row contains a list of dimension values |
| 8035 * followed by the metric values. The order of dimensions and metrics is same |
| 8036 * as specified in the request. |
| 8037 */ |
| 8038 core.List<core.List<core.String>> rows; |
| 8039 |
| 8040 /** The number of samples used to calculate the result. */ |
| 8041 core.String sampleSize; |
| 8042 |
| 8043 /** Total size of the sample space from which the samples were selected. */ |
| 8044 core.String sampleSpace; |
| 8045 |
| 8046 /** Link to this page. */ |
| 8047 core.String selfLink; |
| 8048 |
| 8049 /** |
| 8050 * The total number of rows for the query, regardless of the number of rows in |
| 8051 * the response. |
| 8052 */ |
| 8053 core.int totalResults; |
| 8054 |
| 8055 /** |
| 8056 * Total values for the requested metrics over all the results, not just the |
| 8057 * results returned in this response. The order of the metric totals is same |
| 8058 * as the metric order specified in the request. |
| 8059 */ |
| 8060 core.Map<core.String, core.String> totalsForAllResults; |
| 8061 |
| 8062 |
| 8063 GaData(); |
| 8064 |
| 8065 GaData.fromJson(core.Map _json) { |
| 8066 if (_json.containsKey("columnHeaders")) { |
| 8067 columnHeaders = _json["columnHeaders"].map((value) => new GaDataColumnHead
ers.fromJson(value)).toList(); |
| 8068 } |
| 8069 if (_json.containsKey("containsSampledData")) { |
| 8070 containsSampledData = _json["containsSampledData"]; |
| 8071 } |
| 8072 if (_json.containsKey("dataTable")) { |
| 8073 dataTable = new GaDataDataTable.fromJson(_json["dataTable"]); |
| 8074 } |
| 8075 if (_json.containsKey("id")) { |
| 8076 id = _json["id"]; |
| 8077 } |
| 8078 if (_json.containsKey("itemsPerPage")) { |
| 8079 itemsPerPage = _json["itemsPerPage"]; |
| 8080 } |
| 8081 if (_json.containsKey("kind")) { |
| 8082 kind = _json["kind"]; |
| 8083 } |
| 8084 if (_json.containsKey("nextLink")) { |
| 8085 nextLink = _json["nextLink"]; |
| 8086 } |
| 8087 if (_json.containsKey("previousLink")) { |
| 8088 previousLink = _json["previousLink"]; |
| 8089 } |
| 8090 if (_json.containsKey("profileInfo")) { |
| 8091 profileInfo = new GaDataProfileInfo.fromJson(_json["profileInfo"]); |
| 8092 } |
| 8093 if (_json.containsKey("query")) { |
| 8094 query = new GaDataQuery.fromJson(_json["query"]); |
| 8095 } |
| 8096 if (_json.containsKey("rows")) { |
| 8097 rows = _json["rows"]; |
| 8098 } |
| 8099 if (_json.containsKey("sampleSize")) { |
| 8100 sampleSize = _json["sampleSize"]; |
| 8101 } |
| 8102 if (_json.containsKey("sampleSpace")) { |
| 8103 sampleSpace = _json["sampleSpace"]; |
| 8104 } |
| 8105 if (_json.containsKey("selfLink")) { |
| 8106 selfLink = _json["selfLink"]; |
| 8107 } |
| 8108 if (_json.containsKey("totalResults")) { |
| 8109 totalResults = _json["totalResults"]; |
| 8110 } |
| 8111 if (_json.containsKey("totalsForAllResults")) { |
| 8112 totalsForAllResults = _json["totalsForAllResults"]; |
| 8113 } |
| 8114 } |
| 8115 |
| 8116 core.Map toJson() { |
| 8117 var _json = new core.Map(); |
| 8118 if (columnHeaders != null) { |
| 8119 _json["columnHeaders"] = columnHeaders.map((value) => (value).toJson()).to
List(); |
| 8120 } |
| 8121 if (containsSampledData != null) { |
| 8122 _json["containsSampledData"] = containsSampledData; |
| 8123 } |
| 8124 if (dataTable != null) { |
| 8125 _json["dataTable"] = (dataTable).toJson(); |
| 8126 } |
| 8127 if (id != null) { |
| 8128 _json["id"] = id; |
| 8129 } |
| 8130 if (itemsPerPage != null) { |
| 8131 _json["itemsPerPage"] = itemsPerPage; |
| 8132 } |
| 8133 if (kind != null) { |
| 8134 _json["kind"] = kind; |
| 8135 } |
| 8136 if (nextLink != null) { |
| 8137 _json["nextLink"] = nextLink; |
| 8138 } |
| 8139 if (previousLink != null) { |
| 8140 _json["previousLink"] = previousLink; |
| 8141 } |
| 8142 if (profileInfo != null) { |
| 8143 _json["profileInfo"] = (profileInfo).toJson(); |
| 8144 } |
| 8145 if (query != null) { |
| 8146 _json["query"] = (query).toJson(); |
| 8147 } |
| 8148 if (rows != null) { |
| 8149 _json["rows"] = rows; |
| 8150 } |
| 8151 if (sampleSize != null) { |
| 8152 _json["sampleSize"] = sampleSize; |
| 8153 } |
| 8154 if (sampleSpace != null) { |
| 8155 _json["sampleSpace"] = sampleSpace; |
| 8156 } |
| 8157 if (selfLink != null) { |
| 8158 _json["selfLink"] = selfLink; |
| 8159 } |
| 8160 if (totalResults != null) { |
| 8161 _json["totalResults"] = totalResults; |
| 8162 } |
| 8163 if (totalsForAllResults != null) { |
| 8164 _json["totalsForAllResults"] = totalsForAllResults; |
| 8165 } |
| 8166 return _json; |
| 8167 } |
| 8168 } |
| 8169 |
| 8170 |
| 8171 /** Not documented yet. */ |
| 8172 class GoalEventDetailsEventConditions { |
| 8173 /** |
| 8174 * Type of comparison. Possible values are LESS_THAN, GREATER_THAN or EQUAL. |
| 8175 */ |
| 8176 core.String comparisonType; |
| 8177 |
| 8178 /** Value used for this comparison. */ |
| 8179 core.String comparisonValue; |
| 8180 |
| 8181 /** Expression used for this match. */ |
| 8182 core.String expression; |
| 8183 |
| 8184 /** |
| 8185 * Type of the match to be performed. Possible values are REGEXP, BEGINS_WITH, |
| 8186 * or EXACT. |
| 8187 */ |
| 8188 core.String matchType; |
| 8189 |
| 8190 /** |
| 8191 * Type of this event condition. Possible values are CATEGORY, ACTION, LABEL, |
| 8192 * or VALUE. |
| 8193 */ |
| 8194 core.String type; |
| 8195 |
| 8196 |
| 8197 GoalEventDetailsEventConditions(); |
| 8198 |
| 8199 GoalEventDetailsEventConditions.fromJson(core.Map _json) { |
| 8200 if (_json.containsKey("comparisonType")) { |
| 8201 comparisonType = _json["comparisonType"]; |
| 8202 } |
| 8203 if (_json.containsKey("comparisonValue")) { |
| 8204 comparisonValue = _json["comparisonValue"]; |
| 8205 } |
| 8206 if (_json.containsKey("expression")) { |
| 8207 expression = _json["expression"]; |
| 8208 } |
| 8209 if (_json.containsKey("matchType")) { |
| 8210 matchType = _json["matchType"]; |
| 8211 } |
| 8212 if (_json.containsKey("type")) { |
| 8213 type = _json["type"]; |
| 8214 } |
| 8215 } |
| 8216 |
| 8217 core.Map toJson() { |
| 8218 var _json = new core.Map(); |
| 8219 if (comparisonType != null) { |
| 8220 _json["comparisonType"] = comparisonType; |
| 8221 } |
| 8222 if (comparisonValue != null) { |
| 8223 _json["comparisonValue"] = comparisonValue; |
| 8224 } |
| 8225 if (expression != null) { |
| 8226 _json["expression"] = expression; |
| 8227 } |
| 8228 if (matchType != null) { |
| 8229 _json["matchType"] = matchType; |
| 8230 } |
| 8231 if (type != null) { |
| 8232 _json["type"] = type; |
| 8233 } |
| 8234 return _json; |
| 8235 } |
| 8236 } |
| 8237 |
| 8238 |
| 8239 /** Details for the goal of the type EVENT. */ |
| 8240 class GoalEventDetails { |
| 8241 /** List of event conditions. */ |
| 8242 core.List<GoalEventDetailsEventConditions> eventConditions; |
| 8243 |
| 8244 /** |
| 8245 * Determines if the event value should be used as the value for this goal. |
| 8246 */ |
| 8247 core.bool useEventValue; |
| 8248 |
| 8249 |
| 8250 GoalEventDetails(); |
| 8251 |
| 8252 GoalEventDetails.fromJson(core.Map _json) { |
| 8253 if (_json.containsKey("eventConditions")) { |
| 8254 eventConditions = _json["eventConditions"].map((value) => new GoalEventDet
ailsEventConditions.fromJson(value)).toList(); |
| 8255 } |
| 8256 if (_json.containsKey("useEventValue")) { |
| 8257 useEventValue = _json["useEventValue"]; |
| 8258 } |
| 8259 } |
| 8260 |
| 8261 core.Map toJson() { |
| 8262 var _json = new core.Map(); |
| 8263 if (eventConditions != null) { |
| 8264 _json["eventConditions"] = eventConditions.map((value) => (value).toJson()
).toList(); |
| 8265 } |
| 8266 if (useEventValue != null) { |
| 8267 _json["useEventValue"] = useEventValue; |
| 8268 } |
| 8269 return _json; |
| 8270 } |
| 8271 } |
| 8272 |
| 8273 |
| 8274 /** |
| 8275 * Parent link for a goal. Points to the view (profile) to which this goal |
| 8276 * belongs. |
| 8277 */ |
| 8278 class GoalParentLink { |
| 8279 /** Link to the view (profile) to which this goal belongs. */ |
| 8280 core.String href; |
| 8281 |
| 8282 /** Value is "analytics#profile". */ |
| 8283 core.String type; |
| 8284 |
| 8285 |
| 8286 GoalParentLink(); |
| 8287 |
| 8288 GoalParentLink.fromJson(core.Map _json) { |
| 8289 if (_json.containsKey("href")) { |
| 8290 href = _json["href"]; |
| 8291 } |
| 8292 if (_json.containsKey("type")) { |
| 8293 type = _json["type"]; |
| 8294 } |
| 8295 } |
| 8296 |
| 8297 core.Map toJson() { |
| 8298 var _json = new core.Map(); |
| 8299 if (href != null) { |
| 8300 _json["href"] = href; |
| 8301 } |
| 8302 if (type != null) { |
| 8303 _json["type"] = type; |
| 8304 } |
| 8305 return _json; |
| 8306 } |
| 8307 } |
| 8308 |
| 8309 |
| 8310 /** Not documented yet. */ |
| 8311 class GoalUrlDestinationDetailsSteps { |
| 8312 /** Step name. */ |
| 8313 core.String name; |
| 8314 |
| 8315 /** Step number. */ |
| 8316 core.int number; |
| 8317 |
| 8318 /** URL for this step. */ |
| 8319 core.String url; |
| 8320 |
| 8321 |
| 8322 GoalUrlDestinationDetailsSteps(); |
| 8323 |
| 8324 GoalUrlDestinationDetailsSteps.fromJson(core.Map _json) { |
| 8325 if (_json.containsKey("name")) { |
| 8326 name = _json["name"]; |
| 8327 } |
| 8328 if (_json.containsKey("number")) { |
| 8329 number = _json["number"]; |
| 8330 } |
| 8331 if (_json.containsKey("url")) { |
| 8332 url = _json["url"]; |
| 8333 } |
| 8334 } |
| 8335 |
| 8336 core.Map toJson() { |
| 8337 var _json = new core.Map(); |
| 8338 if (name != null) { |
| 8339 _json["name"] = name; |
| 8340 } |
| 8341 if (number != null) { |
| 8342 _json["number"] = number; |
| 8343 } |
| 8344 if (url != null) { |
| 8345 _json["url"] = url; |
| 8346 } |
| 8347 return _json; |
| 8348 } |
| 8349 } |
| 8350 |
| 8351 |
| 8352 /** Details for the goal of the type URL_DESTINATION. */ |
| 8353 class GoalUrlDestinationDetails { |
| 8354 /** |
| 8355 * Determines if the goal URL must exactly match the capitalization of visited |
| 8356 * URLs. |
| 8357 */ |
| 8358 core.bool caseSensitive; |
| 8359 |
| 8360 /** Determines if the first step in this goal is required. */ |
| 8361 core.bool firstStepRequired; |
| 8362 |
| 8363 /** |
| 8364 * Match type for the goal URL. Possible values are HEAD, EXACT, or REGEX. |
| 8365 */ |
| 8366 core.String matchType; |
| 8367 |
| 8368 /** List of steps configured for this goal funnel. */ |
| 8369 core.List<GoalUrlDestinationDetailsSteps> steps; |
| 8370 |
| 8371 /** URL for this goal. */ |
| 8372 core.String url; |
| 8373 |
| 8374 |
| 8375 GoalUrlDestinationDetails(); |
| 8376 |
| 8377 GoalUrlDestinationDetails.fromJson(core.Map _json) { |
| 8378 if (_json.containsKey("caseSensitive")) { |
| 8379 caseSensitive = _json["caseSensitive"]; |
| 8380 } |
| 8381 if (_json.containsKey("firstStepRequired")) { |
| 8382 firstStepRequired = _json["firstStepRequired"]; |
| 8383 } |
| 8384 if (_json.containsKey("matchType")) { |
| 8385 matchType = _json["matchType"]; |
| 8386 } |
| 8387 if (_json.containsKey("steps")) { |
| 8388 steps = _json["steps"].map((value) => new GoalUrlDestinationDetailsSteps.f
romJson(value)).toList(); |
| 8389 } |
| 8390 if (_json.containsKey("url")) { |
| 8391 url = _json["url"]; |
| 8392 } |
| 8393 } |
| 8394 |
| 8395 core.Map toJson() { |
| 8396 var _json = new core.Map(); |
| 8397 if (caseSensitive != null) { |
| 8398 _json["caseSensitive"] = caseSensitive; |
| 8399 } |
| 8400 if (firstStepRequired != null) { |
| 8401 _json["firstStepRequired"] = firstStepRequired; |
| 8402 } |
| 8403 if (matchType != null) { |
| 8404 _json["matchType"] = matchType; |
| 8405 } |
| 8406 if (steps != null) { |
| 8407 _json["steps"] = steps.map((value) => (value).toJson()).toList(); |
| 8408 } |
| 8409 if (url != null) { |
| 8410 _json["url"] = url; |
| 8411 } |
| 8412 return _json; |
| 8413 } |
| 8414 } |
| 8415 |
| 8416 |
| 8417 /** Details for the goal of the type VISIT_NUM_PAGES. */ |
| 8418 class GoalVisitNumPagesDetails { |
| 8419 /** |
| 8420 * Type of comparison. Possible values are LESS_THAN, GREATER_THAN, or EQUAL. |
| 8421 */ |
| 8422 core.String comparisonType; |
| 8423 |
| 8424 /** Value used for this comparison. */ |
| 8425 core.String comparisonValue; |
| 8426 |
| 8427 |
| 8428 GoalVisitNumPagesDetails(); |
| 8429 |
| 8430 GoalVisitNumPagesDetails.fromJson(core.Map _json) { |
| 8431 if (_json.containsKey("comparisonType")) { |
| 8432 comparisonType = _json["comparisonType"]; |
| 8433 } |
| 8434 if (_json.containsKey("comparisonValue")) { |
| 8435 comparisonValue = _json["comparisonValue"]; |
| 8436 } |
| 8437 } |
| 8438 |
| 8439 core.Map toJson() { |
| 8440 var _json = new core.Map(); |
| 8441 if (comparisonType != null) { |
| 8442 _json["comparisonType"] = comparisonType; |
| 8443 } |
| 8444 if (comparisonValue != null) { |
| 8445 _json["comparisonValue"] = comparisonValue; |
| 8446 } |
| 8447 return _json; |
| 8448 } |
| 8449 } |
| 8450 |
| 8451 |
| 8452 /** Details for the goal of the type VISIT_TIME_ON_SITE. */ |
| 8453 class GoalVisitTimeOnSiteDetails { |
| 8454 /** Type of comparison. Possible values are LESS_THAN or GREATER_THAN. */ |
| 8455 core.String comparisonType; |
| 8456 |
| 8457 /** Value used for this comparison. */ |
| 8458 core.String comparisonValue; |
| 8459 |
| 8460 |
| 8461 GoalVisitTimeOnSiteDetails(); |
| 8462 |
| 8463 GoalVisitTimeOnSiteDetails.fromJson(core.Map _json) { |
| 8464 if (_json.containsKey("comparisonType")) { |
| 8465 comparisonType = _json["comparisonType"]; |
| 8466 } |
| 8467 if (_json.containsKey("comparisonValue")) { |
| 8468 comparisonValue = _json["comparisonValue"]; |
| 8469 } |
| 8470 } |
| 8471 |
| 8472 core.Map toJson() { |
| 8473 var _json = new core.Map(); |
| 8474 if (comparisonType != null) { |
| 8475 _json["comparisonType"] = comparisonType; |
| 8476 } |
| 8477 if (comparisonValue != null) { |
| 8478 _json["comparisonValue"] = comparisonValue; |
| 8479 } |
| 8480 return _json; |
| 8481 } |
| 8482 } |
| 8483 |
| 8484 |
| 8485 /** JSON template for Analytics goal resource. */ |
| 8486 class Goal { |
| 8487 /** Account ID to which this goal belongs. */ |
| 8488 core.String accountId; |
| 8489 |
| 8490 /** Determines whether this goal is active. */ |
| 8491 core.bool active; |
| 8492 |
| 8493 /** Time this goal was created. */ |
| 8494 core.DateTime created; |
| 8495 |
| 8496 /** Details for the goal of the type EVENT. */ |
| 8497 GoalEventDetails eventDetails; |
| 8498 |
| 8499 /** Goal ID. */ |
| 8500 core.String id; |
| 8501 |
| 8502 /** Internal ID for the web property to which this goal belongs. */ |
| 8503 core.String internalWebPropertyId; |
| 8504 |
| 8505 /** Resource type for an Analytics goal. */ |
| 8506 core.String kind; |
| 8507 |
| 8508 /** Goal name. */ |
| 8509 core.String name; |
| 8510 |
| 8511 /** |
| 8512 * Parent link for a goal. Points to the view (profile) to which this goal |
| 8513 * belongs. |
| 8514 */ |
| 8515 GoalParentLink parentLink; |
| 8516 |
| 8517 /** View (Profile) ID to which this goal belongs. */ |
| 8518 core.String profileId; |
| 8519 |
| 8520 /** Link for this goal. */ |
| 8521 core.String selfLink; |
| 8522 |
| 8523 /** |
| 8524 * Goal type. Possible values are URL_DESTINATION, VISIT_TIME_ON_SITE, |
| 8525 * VISIT_NUM_PAGES, AND EVENT. |
| 8526 */ |
| 8527 core.String type; |
| 8528 |
| 8529 /** Time this goal was last modified. */ |
| 8530 core.DateTime updated; |
| 8531 |
| 8532 /** Details for the goal of the type URL_DESTINATION. */ |
| 8533 GoalUrlDestinationDetails urlDestinationDetails; |
| 8534 |
| 8535 /** Goal value. */ |
| 8536 core.double value; |
| 8537 |
| 8538 /** Details for the goal of the type VISIT_NUM_PAGES. */ |
| 8539 GoalVisitNumPagesDetails visitNumPagesDetails; |
| 8540 |
| 8541 /** Details for the goal of the type VISIT_TIME_ON_SITE. */ |
| 8542 GoalVisitTimeOnSiteDetails visitTimeOnSiteDetails; |
| 8543 |
| 8544 /** |
| 8545 * Web property ID to which this goal belongs. The web property ID is of the |
| 8546 * form UA-XXXXX-YY. |
| 8547 */ |
| 8548 core.String webPropertyId; |
| 8549 |
| 8550 |
| 8551 Goal(); |
| 8552 |
| 8553 Goal.fromJson(core.Map _json) { |
| 8554 if (_json.containsKey("accountId")) { |
| 8555 accountId = _json["accountId"]; |
| 8556 } |
| 8557 if (_json.containsKey("active")) { |
| 8558 active = _json["active"]; |
| 8559 } |
| 8560 if (_json.containsKey("created")) { |
| 8561 created = core.DateTime.parse(_json["created"]); |
| 8562 } |
| 8563 if (_json.containsKey("eventDetails")) { |
| 8564 eventDetails = new GoalEventDetails.fromJson(_json["eventDetails"]); |
| 8565 } |
| 8566 if (_json.containsKey("id")) { |
| 8567 id = _json["id"]; |
| 8568 } |
| 8569 if (_json.containsKey("internalWebPropertyId")) { |
| 8570 internalWebPropertyId = _json["internalWebPropertyId"]; |
| 8571 } |
| 8572 if (_json.containsKey("kind")) { |
| 8573 kind = _json["kind"]; |
| 8574 } |
| 8575 if (_json.containsKey("name")) { |
| 8576 name = _json["name"]; |
| 8577 } |
| 8578 if (_json.containsKey("parentLink")) { |
| 8579 parentLink = new GoalParentLink.fromJson(_json["parentLink"]); |
| 8580 } |
| 8581 if (_json.containsKey("profileId")) { |
| 8582 profileId = _json["profileId"]; |
| 8583 } |
| 8584 if (_json.containsKey("selfLink")) { |
| 8585 selfLink = _json["selfLink"]; |
| 8586 } |
| 8587 if (_json.containsKey("type")) { |
| 8588 type = _json["type"]; |
| 8589 } |
| 8590 if (_json.containsKey("updated")) { |
| 8591 updated = core.DateTime.parse(_json["updated"]); |
| 8592 } |
| 8593 if (_json.containsKey("urlDestinationDetails")) { |
| 8594 urlDestinationDetails = new GoalUrlDestinationDetails.fromJson(_json["urlD
estinationDetails"]); |
| 8595 } |
| 8596 if (_json.containsKey("value")) { |
| 8597 value = _json["value"]; |
| 8598 } |
| 8599 if (_json.containsKey("visitNumPagesDetails")) { |
| 8600 visitNumPagesDetails = new GoalVisitNumPagesDetails.fromJson(_json["visitN
umPagesDetails"]); |
| 8601 } |
| 8602 if (_json.containsKey("visitTimeOnSiteDetails")) { |
| 8603 visitTimeOnSiteDetails = new GoalVisitTimeOnSiteDetails.fromJson(_json["vi
sitTimeOnSiteDetails"]); |
| 8604 } |
| 8605 if (_json.containsKey("webPropertyId")) { |
| 8606 webPropertyId = _json["webPropertyId"]; |
| 8607 } |
| 8608 } |
| 8609 |
| 8610 core.Map toJson() { |
| 8611 var _json = new core.Map(); |
| 8612 if (accountId != null) { |
| 8613 _json["accountId"] = accountId; |
| 8614 } |
| 8615 if (active != null) { |
| 8616 _json["active"] = active; |
| 8617 } |
| 8618 if (created != null) { |
| 8619 _json["created"] = (created).toIso8601String(); |
| 8620 } |
| 8621 if (eventDetails != null) { |
| 8622 _json["eventDetails"] = (eventDetails).toJson(); |
| 8623 } |
| 8624 if (id != null) { |
| 8625 _json["id"] = id; |
| 8626 } |
| 8627 if (internalWebPropertyId != null) { |
| 8628 _json["internalWebPropertyId"] = internalWebPropertyId; |
| 8629 } |
| 8630 if (kind != null) { |
| 8631 _json["kind"] = kind; |
| 8632 } |
| 8633 if (name != null) { |
| 8634 _json["name"] = name; |
| 8635 } |
| 8636 if (parentLink != null) { |
| 8637 _json["parentLink"] = (parentLink).toJson(); |
| 8638 } |
| 8639 if (profileId != null) { |
| 8640 _json["profileId"] = profileId; |
| 8641 } |
| 8642 if (selfLink != null) { |
| 8643 _json["selfLink"] = selfLink; |
| 8644 } |
| 8645 if (type != null) { |
| 8646 _json["type"] = type; |
| 8647 } |
| 8648 if (updated != null) { |
| 8649 _json["updated"] = (updated).toIso8601String(); |
| 8650 } |
| 8651 if (urlDestinationDetails != null) { |
| 8652 _json["urlDestinationDetails"] = (urlDestinationDetails).toJson(); |
| 8653 } |
| 8654 if (value != null) { |
| 8655 _json["value"] = value; |
| 8656 } |
| 8657 if (visitNumPagesDetails != null) { |
| 8658 _json["visitNumPagesDetails"] = (visitNumPagesDetails).toJson(); |
| 8659 } |
| 8660 if (visitTimeOnSiteDetails != null) { |
| 8661 _json["visitTimeOnSiteDetails"] = (visitTimeOnSiteDetails).toJson(); |
| 8662 } |
| 8663 if (webPropertyId != null) { |
| 8664 _json["webPropertyId"] = webPropertyId; |
| 8665 } |
| 8666 return _json; |
| 8667 } |
| 8668 } |
| 8669 |
| 8670 |
| 8671 /** |
| 8672 * A goal collection lists Analytics goals to which the user has access. Each |
| 8673 * view (profile) can have a set of goals. Each resource in the Goal collection |
| 8674 * corresponds to a single Analytics goal. |
| 8675 */ |
| 8676 class Goals { |
| 8677 /** A list of goals. */ |
| 8678 core.List<Goal> items; |
| 8679 |
| 8680 /** |
| 8681 * The maximum number of resources the response can contain, regardless of the |
| 8682 * actual number of resources returned. Its value ranges from 1 to 1000 with a |
| 8683 * value of 1000 by default, or otherwise specified by the max-results query |
| 8684 * parameter. |
| 8685 */ |
| 8686 core.int itemsPerPage; |
| 8687 |
| 8688 /** Collection type. */ |
| 8689 core.String kind; |
| 8690 |
| 8691 /** Link to next page for this goal collection. */ |
| 8692 core.String nextLink; |
| 8693 |
| 8694 /** Link to previous page for this goal collection. */ |
| 8695 core.String previousLink; |
| 8696 |
| 8697 /** |
| 8698 * The starting index of the resources, which is 1 by default or otherwise |
| 8699 * specified by the start-index query parameter. |
| 8700 */ |
| 8701 core.int startIndex; |
| 8702 |
| 8703 /** |
| 8704 * The total number of results for the query, regardless of the number of |
| 8705 * resources in the result. |
| 8706 */ |
| 8707 core.int totalResults; |
| 8708 |
| 8709 /** Email ID of the authenticated user */ |
| 8710 core.String username; |
| 8711 |
| 8712 |
| 8713 Goals(); |
| 8714 |
| 8715 Goals.fromJson(core.Map _json) { |
| 8716 if (_json.containsKey("items")) { |
| 8717 items = _json["items"].map((value) => new Goal.fromJson(value)).toList(); |
| 8718 } |
| 8719 if (_json.containsKey("itemsPerPage")) { |
| 8720 itemsPerPage = _json["itemsPerPage"]; |
| 8721 } |
| 8722 if (_json.containsKey("kind")) { |
| 8723 kind = _json["kind"]; |
| 8724 } |
| 8725 if (_json.containsKey("nextLink")) { |
| 8726 nextLink = _json["nextLink"]; |
| 8727 } |
| 8728 if (_json.containsKey("previousLink")) { |
| 8729 previousLink = _json["previousLink"]; |
| 8730 } |
| 8731 if (_json.containsKey("startIndex")) { |
| 8732 startIndex = _json["startIndex"]; |
| 8733 } |
| 8734 if (_json.containsKey("totalResults")) { |
| 8735 totalResults = _json["totalResults"]; |
| 8736 } |
| 8737 if (_json.containsKey("username")) { |
| 8738 username = _json["username"]; |
| 8739 } |
| 8740 } |
| 8741 |
| 8742 core.Map toJson() { |
| 8743 var _json = new core.Map(); |
| 8744 if (items != null) { |
| 8745 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 8746 } |
| 8747 if (itemsPerPage != null) { |
| 8748 _json["itemsPerPage"] = itemsPerPage; |
| 8749 } |
| 8750 if (kind != null) { |
| 8751 _json["kind"] = kind; |
| 8752 } |
| 8753 if (nextLink != null) { |
| 8754 _json["nextLink"] = nextLink; |
| 8755 } |
| 8756 if (previousLink != null) { |
| 8757 _json["previousLink"] = previousLink; |
| 8758 } |
| 8759 if (startIndex != null) { |
| 8760 _json["startIndex"] = startIndex; |
| 8761 } |
| 8762 if (totalResults != null) { |
| 8763 _json["totalResults"] = totalResults; |
| 8764 } |
| 8765 if (username != null) { |
| 8766 _json["username"] = username; |
| 8767 } |
| 8768 return _json; |
| 8769 } |
| 8770 } |
| 8771 |
| 8772 |
| 8773 /** Not documented yet. */ |
| 8774 class McfDataColumnHeaders { |
| 8775 /** Column Type. Either DIMENSION or METRIC. */ |
| 8776 core.String columnType; |
| 8777 |
| 8778 /** |
| 8779 * Data type. Dimension and metric values data types such as INTEGER, DOUBLE, |
| 8780 * CURRENCY, MCF_SEQUENCE etc. |
| 8781 */ |
| 8782 core.String dataType; |
| 8783 |
| 8784 /** Column name. */ |
| 8785 core.String name; |
| 8786 |
| 8787 |
| 8788 McfDataColumnHeaders(); |
| 8789 |
| 8790 McfDataColumnHeaders.fromJson(core.Map _json) { |
| 8791 if (_json.containsKey("columnType")) { |
| 8792 columnType = _json["columnType"]; |
| 8793 } |
| 8794 if (_json.containsKey("dataType")) { |
| 8795 dataType = _json["dataType"]; |
| 8796 } |
| 8797 if (_json.containsKey("name")) { |
| 8798 name = _json["name"]; |
| 8799 } |
| 8800 } |
| 8801 |
| 8802 core.Map toJson() { |
| 8803 var _json = new core.Map(); |
| 8804 if (columnType != null) { |
| 8805 _json["columnType"] = columnType; |
| 8806 } |
| 8807 if (dataType != null) { |
| 8808 _json["dataType"] = dataType; |
| 8809 } |
| 8810 if (name != null) { |
| 8811 _json["name"] = name; |
| 8812 } |
| 8813 return _json; |
| 8814 } |
| 8815 } |
| 8816 |
| 8817 |
| 8818 /** |
| 8819 * Information for the view (profile), for which the Analytics data was |
| 8820 * requested. |
| 8821 */ |
| 8822 class McfDataProfileInfo { |
| 8823 /** Account ID to which this view (profile) belongs. */ |
| 8824 core.String accountId; |
| 8825 |
| 8826 /** Internal ID for the web property to which this view (profile) belongs. */ |
| 8827 core.String internalWebPropertyId; |
| 8828 |
| 8829 /** View (Profile) ID. */ |
| 8830 core.String profileId; |
| 8831 |
| 8832 /** View (Profile) name. */ |
| 8833 core.String profileName; |
| 8834 |
| 8835 /** Table ID for view (profile). */ |
| 8836 core.String tableId; |
| 8837 |
| 8838 /** Web Property ID to which this view (profile) belongs. */ |
| 8839 core.String webPropertyId; |
| 8840 |
| 8841 |
| 8842 McfDataProfileInfo(); |
| 8843 |
| 8844 McfDataProfileInfo.fromJson(core.Map _json) { |
| 8845 if (_json.containsKey("accountId")) { |
| 8846 accountId = _json["accountId"]; |
| 8847 } |
| 8848 if (_json.containsKey("internalWebPropertyId")) { |
| 8849 internalWebPropertyId = _json["internalWebPropertyId"]; |
| 8850 } |
| 8851 if (_json.containsKey("profileId")) { |
| 8852 profileId = _json["profileId"]; |
| 8853 } |
| 8854 if (_json.containsKey("profileName")) { |
| 8855 profileName = _json["profileName"]; |
| 8856 } |
| 8857 if (_json.containsKey("tableId")) { |
| 8858 tableId = _json["tableId"]; |
| 8859 } |
| 8860 if (_json.containsKey("webPropertyId")) { |
| 8861 webPropertyId = _json["webPropertyId"]; |
| 8862 } |
| 8863 } |
| 8864 |
| 8865 core.Map toJson() { |
| 8866 var _json = new core.Map(); |
| 8867 if (accountId != null) { |
| 8868 _json["accountId"] = accountId; |
| 8869 } |
| 8870 if (internalWebPropertyId != null) { |
| 8871 _json["internalWebPropertyId"] = internalWebPropertyId; |
| 8872 } |
| 8873 if (profileId != null) { |
| 8874 _json["profileId"] = profileId; |
| 8875 } |
| 8876 if (profileName != null) { |
| 8877 _json["profileName"] = profileName; |
| 8878 } |
| 8879 if (tableId != null) { |
| 8880 _json["tableId"] = tableId; |
| 8881 } |
| 8882 if (webPropertyId != null) { |
| 8883 _json["webPropertyId"] = webPropertyId; |
| 8884 } |
| 8885 return _json; |
| 8886 } |
| 8887 } |
| 8888 |
| 8889 |
| 8890 /** Analytics data request query parameters. */ |
| 8891 class McfDataQuery { |
| 8892 /** List of analytics dimensions. */ |
| 8893 core.String dimensions; |
| 8894 |
| 8895 /** End date. */ |
| 8896 core.String end_date; |
| 8897 |
| 8898 /** Comma-separated list of dimension or metric filters. */ |
| 8899 core.String filters; |
| 8900 |
| 8901 /** Unique table ID. */ |
| 8902 core.String ids; |
| 8903 |
| 8904 /** Maximum results per page. */ |
| 8905 core.int max_results; |
| 8906 |
| 8907 /** List of analytics metrics. */ |
| 8908 core.List<core.String> metrics; |
| 8909 |
| 8910 /** Desired sampling level */ |
| 8911 core.String samplingLevel; |
| 8912 |
| 8913 /** Analytics advanced segment. */ |
| 8914 core.String segment; |
| 8915 |
| 8916 /** List of dimensions or metrics based on which Analytics data is sorted. */ |
| 8917 core.List<core.String> sort; |
| 8918 |
| 8919 /** Start date. */ |
| 8920 core.String start_date; |
| 8921 |
| 8922 /** Start index. */ |
| 8923 core.int start_index; |
| 8924 |
| 8925 |
| 8926 McfDataQuery(); |
| 8927 |
| 8928 McfDataQuery.fromJson(core.Map _json) { |
| 8929 if (_json.containsKey("dimensions")) { |
| 8930 dimensions = _json["dimensions"]; |
| 8931 } |
| 8932 if (_json.containsKey("end-date")) { |
| 8933 end_date = _json["end-date"]; |
| 8934 } |
| 8935 if (_json.containsKey("filters")) { |
| 8936 filters = _json["filters"]; |
| 8937 } |
| 8938 if (_json.containsKey("ids")) { |
| 8939 ids = _json["ids"]; |
| 8940 } |
| 8941 if (_json.containsKey("max-results")) { |
| 8942 max_results = _json["max-results"]; |
| 8943 } |
| 8944 if (_json.containsKey("metrics")) { |
| 8945 metrics = _json["metrics"]; |
| 8946 } |
| 8947 if (_json.containsKey("samplingLevel")) { |
| 8948 samplingLevel = _json["samplingLevel"]; |
| 8949 } |
| 8950 if (_json.containsKey("segment")) { |
| 8951 segment = _json["segment"]; |
| 8952 } |
| 8953 if (_json.containsKey("sort")) { |
| 8954 sort = _json["sort"]; |
| 8955 } |
| 8956 if (_json.containsKey("start-date")) { |
| 8957 start_date = _json["start-date"]; |
| 8958 } |
| 8959 if (_json.containsKey("start-index")) { |
| 8960 start_index = _json["start-index"]; |
| 8961 } |
| 8962 } |
| 8963 |
| 8964 core.Map toJson() { |
| 8965 var _json = new core.Map(); |
| 8966 if (dimensions != null) { |
| 8967 _json["dimensions"] = dimensions; |
| 8968 } |
| 8969 if (end_date != null) { |
| 8970 _json["end-date"] = end_date; |
| 8971 } |
| 8972 if (filters != null) { |
| 8973 _json["filters"] = filters; |
| 8974 } |
| 8975 if (ids != null) { |
| 8976 _json["ids"] = ids; |
| 8977 } |
| 8978 if (max_results != null) { |
| 8979 _json["max-results"] = max_results; |
| 8980 } |
| 8981 if (metrics != null) { |
| 8982 _json["metrics"] = metrics; |
| 8983 } |
| 8984 if (samplingLevel != null) { |
| 8985 _json["samplingLevel"] = samplingLevel; |
| 8986 } |
| 8987 if (segment != null) { |
| 8988 _json["segment"] = segment; |
| 8989 } |
| 8990 if (sort != null) { |
| 8991 _json["sort"] = sort; |
| 8992 } |
| 8993 if (start_date != null) { |
| 8994 _json["start-date"] = start_date; |
| 8995 } |
| 8996 if (start_index != null) { |
| 8997 _json["start-index"] = start_index; |
| 8998 } |
| 8999 return _json; |
| 9000 } |
| 9001 } |
| 9002 |
| 9003 |
| 9004 /** Not documented yet. */ |
| 9005 class McfDataRowsConversionPathValue { |
| 9006 /** |
| 9007 * Type of an interaction on conversion path. Such as CLICK, IMPRESSION etc. |
| 9008 */ |
| 9009 core.String interactionType; |
| 9010 |
| 9011 /** |
| 9012 * Node value of an interaction on conversion path. Such as source, medium |
| 9013 * etc. |
| 9014 */ |
| 9015 core.String nodeValue; |
| 9016 |
| 9017 |
| 9018 McfDataRowsConversionPathValue(); |
| 9019 |
| 9020 McfDataRowsConversionPathValue.fromJson(core.Map _json) { |
| 9021 if (_json.containsKey("interactionType")) { |
| 9022 interactionType = _json["interactionType"]; |
| 9023 } |
| 9024 if (_json.containsKey("nodeValue")) { |
| 9025 nodeValue = _json["nodeValue"]; |
| 9026 } |
| 9027 } |
| 9028 |
| 9029 core.Map toJson() { |
| 9030 var _json = new core.Map(); |
| 9031 if (interactionType != null) { |
| 9032 _json["interactionType"] = interactionType; |
| 9033 } |
| 9034 if (nodeValue != null) { |
| 9035 _json["nodeValue"] = nodeValue; |
| 9036 } |
| 9037 return _json; |
| 9038 } |
| 9039 } |
| 9040 |
| 9041 |
| 9042 /** |
| 9043 * A union object representing a dimension or metric value. Only one of |
| 9044 * "primitiveValue" or "conversionPathValue" attribute will be populated. |
| 9045 */ |
| 9046 class McfDataRows { |
| 9047 /** |
| 9048 * A conversion path dimension value, containing a list of interactions with |
| 9049 * their attributes. |
| 9050 */ |
| 9051 core.List<McfDataRowsConversionPathValue> conversionPathValue; |
| 9052 |
| 9053 /** A primitive dimension value. A primitive metric value. */ |
| 9054 core.String primitiveValue; |
| 9055 |
| 9056 |
| 9057 McfDataRows(); |
| 9058 |
| 9059 McfDataRows.fromJson(core.Map _json) { |
| 9060 if (_json.containsKey("conversionPathValue")) { |
| 9061 conversionPathValue = _json["conversionPathValue"].map((value) => new McfD
ataRowsConversionPathValue.fromJson(value)).toList(); |
| 9062 } |
| 9063 if (_json.containsKey("primitiveValue")) { |
| 9064 primitiveValue = _json["primitiveValue"]; |
| 9065 } |
| 9066 } |
| 9067 |
| 9068 core.Map toJson() { |
| 9069 var _json = new core.Map(); |
| 9070 if (conversionPathValue != null) { |
| 9071 _json["conversionPathValue"] = conversionPathValue.map((value) => (value).
toJson()).toList(); |
| 9072 } |
| 9073 if (primitiveValue != null) { |
| 9074 _json["primitiveValue"] = primitiveValue; |
| 9075 } |
| 9076 return _json; |
| 9077 } |
| 9078 } |
| 9079 |
| 9080 |
| 9081 /** Multi-Channel Funnels data for a given view (profile). */ |
| 9082 class McfData { |
| 9083 /** |
| 9084 * Column headers that list dimension names followed by the metric names. The |
| 9085 * order of dimensions and metrics is same as specified in the request. |
| 9086 */ |
| 9087 core.List<McfDataColumnHeaders> columnHeaders; |
| 9088 |
| 9089 /** Determines if the Analytics data contains sampled data. */ |
| 9090 core.bool containsSampledData; |
| 9091 |
| 9092 /** Unique ID for this data response. */ |
| 9093 core.String id; |
| 9094 |
| 9095 /** |
| 9096 * The maximum number of rows the response can contain, regardless of the |
| 9097 * actual number of rows returned. Its value ranges from 1 to 10,000 with a |
| 9098 * value of 1000 by default, or otherwise specified by the max-results query |
| 9099 * parameter. |
| 9100 */ |
| 9101 core.int itemsPerPage; |
| 9102 |
| 9103 /** Resource type. */ |
| 9104 core.String kind; |
| 9105 |
| 9106 /** Link to next page for this Analytics data query. */ |
| 9107 core.String nextLink; |
| 9108 |
| 9109 /** Link to previous page for this Analytics data query. */ |
| 9110 core.String previousLink; |
| 9111 |
| 9112 /** |
| 9113 * Information for the view (profile), for which the Analytics data was |
| 9114 * requested. |
| 9115 */ |
| 9116 McfDataProfileInfo profileInfo; |
| 9117 |
| 9118 /** Analytics data request query parameters. */ |
| 9119 McfDataQuery query; |
| 9120 |
| 9121 /** |
| 9122 * Analytics data rows, where each row contains a list of dimension values |
| 9123 * followed by the metric values. The order of dimensions and metrics is same |
| 9124 * as specified in the request. |
| 9125 */ |
| 9126 core.List<core.List<McfDataRows>> rows; |
| 9127 |
| 9128 /** The number of samples used to calculate the result. */ |
| 9129 core.String sampleSize; |
| 9130 |
| 9131 /** Total size of the sample space from which the samples were selected. */ |
| 9132 core.String sampleSpace; |
| 9133 |
| 9134 /** Link to this page. */ |
| 9135 core.String selfLink; |
| 9136 |
| 9137 /** |
| 9138 * The total number of rows for the query, regardless of the number of rows in |
| 9139 * the response. |
| 9140 */ |
| 9141 core.int totalResults; |
| 9142 |
| 9143 /** |
| 9144 * Total values for the requested metrics over all the results, not just the |
| 9145 * results returned in this response. The order of the metric totals is same |
| 9146 * as the metric order specified in the request. |
| 9147 */ |
| 9148 core.Map<core.String, core.String> totalsForAllResults; |
| 9149 |
| 9150 |
| 9151 McfData(); |
| 9152 |
| 9153 McfData.fromJson(core.Map _json) { |
| 9154 if (_json.containsKey("columnHeaders")) { |
| 9155 columnHeaders = _json["columnHeaders"].map((value) => new McfDataColumnHea
ders.fromJson(value)).toList(); |
| 9156 } |
| 9157 if (_json.containsKey("containsSampledData")) { |
| 9158 containsSampledData = _json["containsSampledData"]; |
| 9159 } |
| 9160 if (_json.containsKey("id")) { |
| 9161 id = _json["id"]; |
| 9162 } |
| 9163 if (_json.containsKey("itemsPerPage")) { |
| 9164 itemsPerPage = _json["itemsPerPage"]; |
| 9165 } |
| 9166 if (_json.containsKey("kind")) { |
| 9167 kind = _json["kind"]; |
| 9168 } |
| 9169 if (_json.containsKey("nextLink")) { |
| 9170 nextLink = _json["nextLink"]; |
| 9171 } |
| 9172 if (_json.containsKey("previousLink")) { |
| 9173 previousLink = _json["previousLink"]; |
| 9174 } |
| 9175 if (_json.containsKey("profileInfo")) { |
| 9176 profileInfo = new McfDataProfileInfo.fromJson(_json["profileInfo"]); |
| 9177 } |
| 9178 if (_json.containsKey("query")) { |
| 9179 query = new McfDataQuery.fromJson(_json["query"]); |
| 9180 } |
| 9181 if (_json.containsKey("rows")) { |
| 9182 rows = _json["rows"].map((value) => value.map((value) => new McfDataRows.f
romJson(value)).toList()).toList(); |
| 9183 } |
| 9184 if (_json.containsKey("sampleSize")) { |
| 9185 sampleSize = _json["sampleSize"]; |
| 9186 } |
| 9187 if (_json.containsKey("sampleSpace")) { |
| 9188 sampleSpace = _json["sampleSpace"]; |
| 9189 } |
| 9190 if (_json.containsKey("selfLink")) { |
| 9191 selfLink = _json["selfLink"]; |
| 9192 } |
| 9193 if (_json.containsKey("totalResults")) { |
| 9194 totalResults = _json["totalResults"]; |
| 9195 } |
| 9196 if (_json.containsKey("totalsForAllResults")) { |
| 9197 totalsForAllResults = _json["totalsForAllResults"]; |
| 9198 } |
| 9199 } |
| 9200 |
| 9201 core.Map toJson() { |
| 9202 var _json = new core.Map(); |
| 9203 if (columnHeaders != null) { |
| 9204 _json["columnHeaders"] = columnHeaders.map((value) => (value).toJson()).to
List(); |
| 9205 } |
| 9206 if (containsSampledData != null) { |
| 9207 _json["containsSampledData"] = containsSampledData; |
| 9208 } |
| 9209 if (id != null) { |
| 9210 _json["id"] = id; |
| 9211 } |
| 9212 if (itemsPerPage != null) { |
| 9213 _json["itemsPerPage"] = itemsPerPage; |
| 9214 } |
| 9215 if (kind != null) { |
| 9216 _json["kind"] = kind; |
| 9217 } |
| 9218 if (nextLink != null) { |
| 9219 _json["nextLink"] = nextLink; |
| 9220 } |
| 9221 if (previousLink != null) { |
| 9222 _json["previousLink"] = previousLink; |
| 9223 } |
| 9224 if (profileInfo != null) { |
| 9225 _json["profileInfo"] = (profileInfo).toJson(); |
| 9226 } |
| 9227 if (query != null) { |
| 9228 _json["query"] = (query).toJson(); |
| 9229 } |
| 9230 if (rows != null) { |
| 9231 _json["rows"] = rows.map((value) => value.map((value) => (value).toJson())
.toList()).toList(); |
| 9232 } |
| 9233 if (sampleSize != null) { |
| 9234 _json["sampleSize"] = sampleSize; |
| 9235 } |
| 9236 if (sampleSpace != null) { |
| 9237 _json["sampleSpace"] = sampleSpace; |
| 9238 } |
| 9239 if (selfLink != null) { |
| 9240 _json["selfLink"] = selfLink; |
| 9241 } |
| 9242 if (totalResults != null) { |
| 9243 _json["totalResults"] = totalResults; |
| 9244 } |
| 9245 if (totalsForAllResults != null) { |
| 9246 _json["totalsForAllResults"] = totalsForAllResults; |
| 9247 } |
| 9248 return _json; |
| 9249 } |
| 9250 } |
| 9251 |
| 9252 |
| 9253 /** |
| 9254 * Child link for this view (profile). Points to the list of goals for this view |
| 9255 * (profile). |
| 9256 */ |
| 9257 class ProfileChildLink { |
| 9258 /** Link to the list of goals for this view (profile). */ |
| 9259 core.String href; |
| 9260 |
| 9261 /** Value is "analytics#goals". */ |
| 9262 core.String type; |
| 9263 |
| 9264 |
| 9265 ProfileChildLink(); |
| 9266 |
| 9267 ProfileChildLink.fromJson(core.Map _json) { |
| 9268 if (_json.containsKey("href")) { |
| 9269 href = _json["href"]; |
| 9270 } |
| 9271 if (_json.containsKey("type")) { |
| 9272 type = _json["type"]; |
| 9273 } |
| 9274 } |
| 9275 |
| 9276 core.Map toJson() { |
| 9277 var _json = new core.Map(); |
| 9278 if (href != null) { |
| 9279 _json["href"] = href; |
| 9280 } |
| 9281 if (type != null) { |
| 9282 _json["type"] = type; |
| 9283 } |
| 9284 return _json; |
| 9285 } |
| 9286 } |
| 9287 |
| 9288 |
| 9289 /** |
| 9290 * Parent link for this view (profile). Points to the web property to which this |
| 9291 * view (profile) belongs. |
| 9292 */ |
| 9293 class ProfileParentLink { |
| 9294 /** Link to the web property to which this view (profile) belongs. */ |
| 9295 core.String href; |
| 9296 |
| 9297 /** Value is "analytics#webproperty". */ |
| 9298 core.String type; |
| 9299 |
| 9300 |
| 9301 ProfileParentLink(); |
| 9302 |
| 9303 ProfileParentLink.fromJson(core.Map _json) { |
| 9304 if (_json.containsKey("href")) { |
| 9305 href = _json["href"]; |
| 9306 } |
| 9307 if (_json.containsKey("type")) { |
| 9308 type = _json["type"]; |
| 9309 } |
| 9310 } |
| 9311 |
| 9312 core.Map toJson() { |
| 9313 var _json = new core.Map(); |
| 9314 if (href != null) { |
| 9315 _json["href"] = href; |
| 9316 } |
| 9317 if (type != null) { |
| 9318 _json["type"] = type; |
| 9319 } |
| 9320 return _json; |
| 9321 } |
| 9322 } |
| 9323 |
| 9324 |
| 9325 /** Permissions the user has for this view (profile). */ |
| 9326 class ProfilePermissions { |
| 9327 /** |
| 9328 * All the permissions that the user has for this view (profile). These |
| 9329 * include any implied permissions (e.g., EDIT implies VIEW) or inherited |
| 9330 * permissions from the parent web property. |
| 9331 */ |
| 9332 core.List<core.String> effective; |
| 9333 |
| 9334 |
| 9335 ProfilePermissions(); |
| 9336 |
| 9337 ProfilePermissions.fromJson(core.Map _json) { |
| 9338 if (_json.containsKey("effective")) { |
| 9339 effective = _json["effective"]; |
| 9340 } |
| 9341 } |
| 9342 |
| 9343 core.Map toJson() { |
| 9344 var _json = new core.Map(); |
| 9345 if (effective != null) { |
| 9346 _json["effective"] = effective; |
| 9347 } |
| 9348 return _json; |
| 9349 } |
| 9350 } |
| 9351 |
| 9352 |
| 9353 /** JSON template for an Analytics view (profile). */ |
| 9354 class Profile { |
| 9355 /** Account ID to which this view (profile) belongs. */ |
| 9356 core.String accountId; |
| 9357 |
| 9358 /** |
| 9359 * Child link for this view (profile). Points to the list of goals for this |
| 9360 * view (profile). |
| 9361 */ |
| 9362 ProfileChildLink childLink; |
| 9363 |
| 9364 /** Time this view (profile) was created. */ |
| 9365 core.DateTime created; |
| 9366 |
| 9367 /** |
| 9368 * The currency type associated with this view (profile). The supported values |
| 9369 * are: |
| 9370 * ARS, AUD, BGN, BRL, CAD, CHF, CNY, CZK, DKK, EUR, GBP, HKD, HUF, IDR, INR, |
| 9371 * JPY, KRW, LTL, MXN, NOK, NZD, PHP, PLN, RUB, SEK, THB, TRY, TWD, USD, VND, |
| 9372 * ZAR |
| 9373 */ |
| 9374 core.String currency; |
| 9375 |
| 9376 /** Default page for this view (profile). */ |
| 9377 core.String defaultPage; |
| 9378 |
| 9379 /** |
| 9380 * Indicates whether ecommerce tracking is enabled for this view (profile). |
| 9381 */ |
| 9382 core.bool eCommerceTracking; |
| 9383 |
| 9384 /** The query parameters that are excluded from this view (profile). */ |
| 9385 core.String excludeQueryParameters; |
| 9386 |
| 9387 /** View (Profile) ID. */ |
| 9388 core.String id; |
| 9389 |
| 9390 /** Internal ID for the web property to which this view (profile) belongs. */ |
| 9391 core.String internalWebPropertyId; |
| 9392 |
| 9393 /** Resource type for Analytics view (profile). */ |
| 9394 core.String kind; |
| 9395 |
| 9396 /** Name of this view (profile). */ |
| 9397 core.String name; |
| 9398 |
| 9399 /** |
| 9400 * Parent link for this view (profile). Points to the web property to which |
| 9401 * this view (profile) belongs. |
| 9402 */ |
| 9403 ProfileParentLink parentLink; |
| 9404 |
| 9405 /** Permissions the user has for this view (profile). */ |
| 9406 ProfilePermissions permissions; |
| 9407 |
| 9408 /** Link for this view (profile). */ |
| 9409 core.String selfLink; |
| 9410 |
| 9411 /** Site search category parameters for this view (profile). */ |
| 9412 core.String siteSearchCategoryParameters; |
| 9413 |
| 9414 /** The site search query parameters for this view (profile). */ |
| 9415 core.String siteSearchQueryParameters; |
| 9416 |
| 9417 /** |
| 9418 * Whether or not Analytics will strip search category parameters from the |
| 9419 * URLs in your reports. |
| 9420 */ |
| 9421 core.bool stripSiteSearchCategoryParameters; |
| 9422 |
| 9423 /** |
| 9424 * Whether or not Analytics will strip search query parameters from the URLs |
| 9425 * in your reports. |
| 9426 */ |
| 9427 core.bool stripSiteSearchQueryParameters; |
| 9428 |
| 9429 /** |
| 9430 * Time zone for which this view (profile) has been configured. Time zones are |
| 9431 * identified by strings from the TZ database. |
| 9432 */ |
| 9433 core.String timezone; |
| 9434 |
| 9435 /** View (Profile) type. Supported types: WEB or APP. */ |
| 9436 core.String type; |
| 9437 |
| 9438 /** Time this view (profile) was last modified. */ |
| 9439 core.DateTime updated; |
| 9440 |
| 9441 /** |
| 9442 * Web property ID of the form UA-XXXXX-YY to which this view (profile) |
| 9443 * belongs. |
| 9444 */ |
| 9445 core.String webPropertyId; |
| 9446 |
| 9447 /** Website URL for this view (profile). */ |
| 9448 core.String websiteUrl; |
| 9449 |
| 9450 |
| 9451 Profile(); |
| 9452 |
| 9453 Profile.fromJson(core.Map _json) { |
| 9454 if (_json.containsKey("accountId")) { |
| 9455 accountId = _json["accountId"]; |
| 9456 } |
| 9457 if (_json.containsKey("childLink")) { |
| 9458 childLink = new ProfileChildLink.fromJson(_json["childLink"]); |
| 9459 } |
| 9460 if (_json.containsKey("created")) { |
| 9461 created = core.DateTime.parse(_json["created"]); |
| 9462 } |
| 9463 if (_json.containsKey("currency")) { |
| 9464 currency = _json["currency"]; |
| 9465 } |
| 9466 if (_json.containsKey("defaultPage")) { |
| 9467 defaultPage = _json["defaultPage"]; |
| 9468 } |
| 9469 if (_json.containsKey("eCommerceTracking")) { |
| 9470 eCommerceTracking = _json["eCommerceTracking"]; |
| 9471 } |
| 9472 if (_json.containsKey("excludeQueryParameters")) { |
| 9473 excludeQueryParameters = _json["excludeQueryParameters"]; |
| 9474 } |
| 9475 if (_json.containsKey("id")) { |
| 9476 id = _json["id"]; |
| 9477 } |
| 9478 if (_json.containsKey("internalWebPropertyId")) { |
| 9479 internalWebPropertyId = _json["internalWebPropertyId"]; |
| 9480 } |
| 9481 if (_json.containsKey("kind")) { |
| 9482 kind = _json["kind"]; |
| 9483 } |
| 9484 if (_json.containsKey("name")) { |
| 9485 name = _json["name"]; |
| 9486 } |
| 9487 if (_json.containsKey("parentLink")) { |
| 9488 parentLink = new ProfileParentLink.fromJson(_json["parentLink"]); |
| 9489 } |
| 9490 if (_json.containsKey("permissions")) { |
| 9491 permissions = new ProfilePermissions.fromJson(_json["permissions"]); |
| 9492 } |
| 9493 if (_json.containsKey("selfLink")) { |
| 9494 selfLink = _json["selfLink"]; |
| 9495 } |
| 9496 if (_json.containsKey("siteSearchCategoryParameters")) { |
| 9497 siteSearchCategoryParameters = _json["siteSearchCategoryParameters"]; |
| 9498 } |
| 9499 if (_json.containsKey("siteSearchQueryParameters")) { |
| 9500 siteSearchQueryParameters = _json["siteSearchQueryParameters"]; |
| 9501 } |
| 9502 if (_json.containsKey("stripSiteSearchCategoryParameters")) { |
| 9503 stripSiteSearchCategoryParameters = _json["stripSiteSearchCategoryParamete
rs"]; |
| 9504 } |
| 9505 if (_json.containsKey("stripSiteSearchQueryParameters")) { |
| 9506 stripSiteSearchQueryParameters = _json["stripSiteSearchQueryParameters"]; |
| 9507 } |
| 9508 if (_json.containsKey("timezone")) { |
| 9509 timezone = _json["timezone"]; |
| 9510 } |
| 9511 if (_json.containsKey("type")) { |
| 9512 type = _json["type"]; |
| 9513 } |
| 9514 if (_json.containsKey("updated")) { |
| 9515 updated = core.DateTime.parse(_json["updated"]); |
| 9516 } |
| 9517 if (_json.containsKey("webPropertyId")) { |
| 9518 webPropertyId = _json["webPropertyId"]; |
| 9519 } |
| 9520 if (_json.containsKey("websiteUrl")) { |
| 9521 websiteUrl = _json["websiteUrl"]; |
| 9522 } |
| 9523 } |
| 9524 |
| 9525 core.Map toJson() { |
| 9526 var _json = new core.Map(); |
| 9527 if (accountId != null) { |
| 9528 _json["accountId"] = accountId; |
| 9529 } |
| 9530 if (childLink != null) { |
| 9531 _json["childLink"] = (childLink).toJson(); |
| 9532 } |
| 9533 if (created != null) { |
| 9534 _json["created"] = (created).toIso8601String(); |
| 9535 } |
| 9536 if (currency != null) { |
| 9537 _json["currency"] = currency; |
| 9538 } |
| 9539 if (defaultPage != null) { |
| 9540 _json["defaultPage"] = defaultPage; |
| 9541 } |
| 9542 if (eCommerceTracking != null) { |
| 9543 _json["eCommerceTracking"] = eCommerceTracking; |
| 9544 } |
| 9545 if (excludeQueryParameters != null) { |
| 9546 _json["excludeQueryParameters"] = excludeQueryParameters; |
| 9547 } |
| 9548 if (id != null) { |
| 9549 _json["id"] = id; |
| 9550 } |
| 9551 if (internalWebPropertyId != null) { |
| 9552 _json["internalWebPropertyId"] = internalWebPropertyId; |
| 9553 } |
| 9554 if (kind != null) { |
| 9555 _json["kind"] = kind; |
| 9556 } |
| 9557 if (name != null) { |
| 9558 _json["name"] = name; |
| 9559 } |
| 9560 if (parentLink != null) { |
| 9561 _json["parentLink"] = (parentLink).toJson(); |
| 9562 } |
| 9563 if (permissions != null) { |
| 9564 _json["permissions"] = (permissions).toJson(); |
| 9565 } |
| 9566 if (selfLink != null) { |
| 9567 _json["selfLink"] = selfLink; |
| 9568 } |
| 9569 if (siteSearchCategoryParameters != null) { |
| 9570 _json["siteSearchCategoryParameters"] = siteSearchCategoryParameters; |
| 9571 } |
| 9572 if (siteSearchQueryParameters != null) { |
| 9573 _json["siteSearchQueryParameters"] = siteSearchQueryParameters; |
| 9574 } |
| 9575 if (stripSiteSearchCategoryParameters != null) { |
| 9576 _json["stripSiteSearchCategoryParameters"] = stripSiteSearchCategoryParame
ters; |
| 9577 } |
| 9578 if (stripSiteSearchQueryParameters != null) { |
| 9579 _json["stripSiteSearchQueryParameters"] = stripSiteSearchQueryParameters; |
| 9580 } |
| 9581 if (timezone != null) { |
| 9582 _json["timezone"] = timezone; |
| 9583 } |
| 9584 if (type != null) { |
| 9585 _json["type"] = type; |
| 9586 } |
| 9587 if (updated != null) { |
| 9588 _json["updated"] = (updated).toIso8601String(); |
| 9589 } |
| 9590 if (webPropertyId != null) { |
| 9591 _json["webPropertyId"] = webPropertyId; |
| 9592 } |
| 9593 if (websiteUrl != null) { |
| 9594 _json["websiteUrl"] = websiteUrl; |
| 9595 } |
| 9596 return _json; |
| 9597 } |
| 9598 } |
| 9599 |
| 9600 |
| 9601 /** JSON template for an Analytics profile filter link. */ |
| 9602 class ProfileFilterLink { |
| 9603 /** Filter for this link. */ |
| 9604 FilterRef filterRef; |
| 9605 |
| 9606 /** Profile filter link ID. */ |
| 9607 core.String id; |
| 9608 |
| 9609 /** Resource type for Analytics filter. */ |
| 9610 core.String kind; |
| 9611 |
| 9612 /** View (Profile) for this link. */ |
| 9613 ProfileRef profileRef; |
| 9614 |
| 9615 /** |
| 9616 * The rank of this profile filter link relative to the other filters linked |
| 9617 * to the same profile. |
| 9618 * For readonly (i.e., list and get) operations, the rank always starts at 1. |
| 9619 * For write (i.e., create, update, or delete) operations, you may specify a |
| 9620 * value between 0 and 255 inclusively, [0, 255]. In order to insert a link at |
| 9621 * the end of the list, either don't specify a rank or set a rank to a number |
| 9622 * greater than the largest rank in the list. In order to insert a link to the |
| 9623 * beginning of the list specify a rank that is less than or equal to 1. The |
| 9624 * new link will move all existing filters with the same or lower rank down |
| 9625 * the list. After the link is inserted/updated/deleted all profile filter |
| 9626 * links will be renumbered starting at 1. |
| 9627 */ |
| 9628 core.int rank; |
| 9629 |
| 9630 /** Link for this profile filter link. */ |
| 9631 core.String selfLink; |
| 9632 |
| 9633 |
| 9634 ProfileFilterLink(); |
| 9635 |
| 9636 ProfileFilterLink.fromJson(core.Map _json) { |
| 9637 if (_json.containsKey("filterRef")) { |
| 9638 filterRef = new FilterRef.fromJson(_json["filterRef"]); |
| 9639 } |
| 9640 if (_json.containsKey("id")) { |
| 9641 id = _json["id"]; |
| 9642 } |
| 9643 if (_json.containsKey("kind")) { |
| 9644 kind = _json["kind"]; |
| 9645 } |
| 9646 if (_json.containsKey("profileRef")) { |
| 9647 profileRef = new ProfileRef.fromJson(_json["profileRef"]); |
| 9648 } |
| 9649 if (_json.containsKey("rank")) { |
| 9650 rank = _json["rank"]; |
| 9651 } |
| 9652 if (_json.containsKey("selfLink")) { |
| 9653 selfLink = _json["selfLink"]; |
| 9654 } |
| 9655 } |
| 9656 |
| 9657 core.Map toJson() { |
| 9658 var _json = new core.Map(); |
| 9659 if (filterRef != null) { |
| 9660 _json["filterRef"] = (filterRef).toJson(); |
| 9661 } |
| 9662 if (id != null) { |
| 9663 _json["id"] = id; |
| 9664 } |
| 9665 if (kind != null) { |
| 9666 _json["kind"] = kind; |
| 9667 } |
| 9668 if (profileRef != null) { |
| 9669 _json["profileRef"] = (profileRef).toJson(); |
| 9670 } |
| 9671 if (rank != null) { |
| 9672 _json["rank"] = rank; |
| 9673 } |
| 9674 if (selfLink != null) { |
| 9675 _json["selfLink"] = selfLink; |
| 9676 } |
| 9677 return _json; |
| 9678 } |
| 9679 } |
| 9680 |
| 9681 |
| 9682 /** |
| 9683 * A profile filter link collection lists profile filter links between profiles |
| 9684 * and filters. Each resource in the collection corresponds to a profile filter |
| 9685 * link. |
| 9686 */ |
| 9687 class ProfileFilterLinks { |
| 9688 /** A list of profile filter links. */ |
| 9689 core.List<ProfileFilterLink> items; |
| 9690 |
| 9691 /** |
| 9692 * The maximum number of resources the response can contain, regardless of the |
| 9693 * actual number of resources returned. Its value ranges from 1 to 1,000 with |
| 9694 * a value of 1000 by default, or otherwise specified by the max-results query |
| 9695 * parameter. |
| 9696 */ |
| 9697 core.int itemsPerPage; |
| 9698 |
| 9699 /** Collection type. */ |
| 9700 core.String kind; |
| 9701 |
| 9702 /** Link to next page for this profile filter link collection. */ |
| 9703 core.String nextLink; |
| 9704 |
| 9705 /** Link to previous page for this profile filter link collection. */ |
| 9706 core.String previousLink; |
| 9707 |
| 9708 /** |
| 9709 * The starting index of the resources, which is 1 by default or otherwise |
| 9710 * specified by the start-index query parameter. |
| 9711 */ |
| 9712 core.int startIndex; |
| 9713 |
| 9714 /** |
| 9715 * The total number of results for the query, regardless of the number of |
| 9716 * results in the response. |
| 9717 */ |
| 9718 core.int totalResults; |
| 9719 |
| 9720 /** Email ID of the authenticated user */ |
| 9721 core.String username; |
| 9722 |
| 9723 |
| 9724 ProfileFilterLinks(); |
| 9725 |
| 9726 ProfileFilterLinks.fromJson(core.Map _json) { |
| 9727 if (_json.containsKey("items")) { |
| 9728 items = _json["items"].map((value) => new ProfileFilterLink.fromJson(value
)).toList(); |
| 9729 } |
| 9730 if (_json.containsKey("itemsPerPage")) { |
| 9731 itemsPerPage = _json["itemsPerPage"]; |
| 9732 } |
| 9733 if (_json.containsKey("kind")) { |
| 9734 kind = _json["kind"]; |
| 9735 } |
| 9736 if (_json.containsKey("nextLink")) { |
| 9737 nextLink = _json["nextLink"]; |
| 9738 } |
| 9739 if (_json.containsKey("previousLink")) { |
| 9740 previousLink = _json["previousLink"]; |
| 9741 } |
| 9742 if (_json.containsKey("startIndex")) { |
| 9743 startIndex = _json["startIndex"]; |
| 9744 } |
| 9745 if (_json.containsKey("totalResults")) { |
| 9746 totalResults = _json["totalResults"]; |
| 9747 } |
| 9748 if (_json.containsKey("username")) { |
| 9749 username = _json["username"]; |
| 9750 } |
| 9751 } |
| 9752 |
| 9753 core.Map toJson() { |
| 9754 var _json = new core.Map(); |
| 9755 if (items != null) { |
| 9756 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 9757 } |
| 9758 if (itemsPerPage != null) { |
| 9759 _json["itemsPerPage"] = itemsPerPage; |
| 9760 } |
| 9761 if (kind != null) { |
| 9762 _json["kind"] = kind; |
| 9763 } |
| 9764 if (nextLink != null) { |
| 9765 _json["nextLink"] = nextLink; |
| 9766 } |
| 9767 if (previousLink != null) { |
| 9768 _json["previousLink"] = previousLink; |
| 9769 } |
| 9770 if (startIndex != null) { |
| 9771 _json["startIndex"] = startIndex; |
| 9772 } |
| 9773 if (totalResults != null) { |
| 9774 _json["totalResults"] = totalResults; |
| 9775 } |
| 9776 if (username != null) { |
| 9777 _json["username"] = username; |
| 9778 } |
| 9779 return _json; |
| 9780 } |
| 9781 } |
| 9782 |
| 9783 |
| 9784 /** JSON template for a linked view (profile). */ |
| 9785 class ProfileRef { |
| 9786 /** Account ID to which this view (profile) belongs. */ |
| 9787 core.String accountId; |
| 9788 |
| 9789 /** Link for this view (profile). */ |
| 9790 core.String href; |
| 9791 |
| 9792 /** View (Profile) ID. */ |
| 9793 core.String id; |
| 9794 |
| 9795 /** Internal ID for the web property to which this view (profile) belongs. */ |
| 9796 core.String internalWebPropertyId; |
| 9797 |
| 9798 /** Analytics view (profile) reference. */ |
| 9799 core.String kind; |
| 9800 |
| 9801 /** Name of this view (profile). */ |
| 9802 core.String name; |
| 9803 |
| 9804 /** |
| 9805 * Web property ID of the form UA-XXXXX-YY to which this view (profile) |
| 9806 * belongs. |
| 9807 */ |
| 9808 core.String webPropertyId; |
| 9809 |
| 9810 |
| 9811 ProfileRef(); |
| 9812 |
| 9813 ProfileRef.fromJson(core.Map _json) { |
| 9814 if (_json.containsKey("accountId")) { |
| 9815 accountId = _json["accountId"]; |
| 9816 } |
| 9817 if (_json.containsKey("href")) { |
| 9818 href = _json["href"]; |
| 9819 } |
| 9820 if (_json.containsKey("id")) { |
| 9821 id = _json["id"]; |
| 9822 } |
| 9823 if (_json.containsKey("internalWebPropertyId")) { |
| 9824 internalWebPropertyId = _json["internalWebPropertyId"]; |
| 9825 } |
| 9826 if (_json.containsKey("kind")) { |
| 9827 kind = _json["kind"]; |
| 9828 } |
| 9829 if (_json.containsKey("name")) { |
| 9830 name = _json["name"]; |
| 9831 } |
| 9832 if (_json.containsKey("webPropertyId")) { |
| 9833 webPropertyId = _json["webPropertyId"]; |
| 9834 } |
| 9835 } |
| 9836 |
| 9837 core.Map toJson() { |
| 9838 var _json = new core.Map(); |
| 9839 if (accountId != null) { |
| 9840 _json["accountId"] = accountId; |
| 9841 } |
| 9842 if (href != null) { |
| 9843 _json["href"] = href; |
| 9844 } |
| 9845 if (id != null) { |
| 9846 _json["id"] = id; |
| 9847 } |
| 9848 if (internalWebPropertyId != null) { |
| 9849 _json["internalWebPropertyId"] = internalWebPropertyId; |
| 9850 } |
| 9851 if (kind != null) { |
| 9852 _json["kind"] = kind; |
| 9853 } |
| 9854 if (name != null) { |
| 9855 _json["name"] = name; |
| 9856 } |
| 9857 if (webPropertyId != null) { |
| 9858 _json["webPropertyId"] = webPropertyId; |
| 9859 } |
| 9860 return _json; |
| 9861 } |
| 9862 } |
| 9863 |
| 9864 |
| 9865 /** |
| 9866 * JSON template for an Analytics ProfileSummary. ProfileSummary returns basic |
| 9867 * information (i.e., summary) for a profile. |
| 9868 */ |
| 9869 class ProfileSummary { |
| 9870 /** View (profile) ID. */ |
| 9871 core.String id; |
| 9872 |
| 9873 /** Resource type for Analytics ProfileSummary. */ |
| 9874 core.String kind; |
| 9875 |
| 9876 /** View (profile) name. */ |
| 9877 core.String name; |
| 9878 |
| 9879 /** View (Profile) type. Supported types: WEB or APP. */ |
| 9880 core.String type; |
| 9881 |
| 9882 |
| 9883 ProfileSummary(); |
| 9884 |
| 9885 ProfileSummary.fromJson(core.Map _json) { |
| 9886 if (_json.containsKey("id")) { |
| 9887 id = _json["id"]; |
| 9888 } |
| 9889 if (_json.containsKey("kind")) { |
| 9890 kind = _json["kind"]; |
| 9891 } |
| 9892 if (_json.containsKey("name")) { |
| 9893 name = _json["name"]; |
| 9894 } |
| 9895 if (_json.containsKey("type")) { |
| 9896 type = _json["type"]; |
| 9897 } |
| 9898 } |
| 9899 |
| 9900 core.Map toJson() { |
| 9901 var _json = new core.Map(); |
| 9902 if (id != null) { |
| 9903 _json["id"] = id; |
| 9904 } |
| 9905 if (kind != null) { |
| 9906 _json["kind"] = kind; |
| 9907 } |
| 9908 if (name != null) { |
| 9909 _json["name"] = name; |
| 9910 } |
| 9911 if (type != null) { |
| 9912 _json["type"] = type; |
| 9913 } |
| 9914 return _json; |
| 9915 } |
| 9916 } |
| 9917 |
| 9918 |
| 9919 /** |
| 9920 * A view (profile) collection lists Analytics views (profiles) to which the |
| 9921 * user has access. Each resource in the collection corresponds to a single |
| 9922 * Analytics view (profile). |
| 9923 */ |
| 9924 class Profiles { |
| 9925 /** A list of views (profiles). */ |
| 9926 core.List<Profile> items; |
| 9927 |
| 9928 /** |
| 9929 * The maximum number of resources the response can contain, regardless of the |
| 9930 * actual number of resources returned. Its value ranges from 1 to 1000 with a |
| 9931 * value of 1000 by default, or otherwise specified by the max-results query |
| 9932 * parameter. |
| 9933 */ |
| 9934 core.int itemsPerPage; |
| 9935 |
| 9936 /** Collection type. */ |
| 9937 core.String kind; |
| 9938 |
| 9939 /** Link to next page for this view (profile) collection. */ |
| 9940 core.String nextLink; |
| 9941 |
| 9942 /** Link to previous page for this view (profile) collection. */ |
| 9943 core.String previousLink; |
| 9944 |
| 9945 /** |
| 9946 * The starting index of the resources, which is 1 by default or otherwise |
| 9947 * specified by the start-index query parameter. |
| 9948 */ |
| 9949 core.int startIndex; |
| 9950 |
| 9951 /** |
| 9952 * The total number of results for the query, regardless of the number of |
| 9953 * results in the response. |
| 9954 */ |
| 9955 core.int totalResults; |
| 9956 |
| 9957 /** Email ID of the authenticated user */ |
| 9958 core.String username; |
| 9959 |
| 9960 |
| 9961 Profiles(); |
| 9962 |
| 9963 Profiles.fromJson(core.Map _json) { |
| 9964 if (_json.containsKey("items")) { |
| 9965 items = _json["items"].map((value) => new Profile.fromJson(value)).toList(
); |
| 9966 } |
| 9967 if (_json.containsKey("itemsPerPage")) { |
| 9968 itemsPerPage = _json["itemsPerPage"]; |
| 9969 } |
| 9970 if (_json.containsKey("kind")) { |
| 9971 kind = _json["kind"]; |
| 9972 } |
| 9973 if (_json.containsKey("nextLink")) { |
| 9974 nextLink = _json["nextLink"]; |
| 9975 } |
| 9976 if (_json.containsKey("previousLink")) { |
| 9977 previousLink = _json["previousLink"]; |
| 9978 } |
| 9979 if (_json.containsKey("startIndex")) { |
| 9980 startIndex = _json["startIndex"]; |
| 9981 } |
| 9982 if (_json.containsKey("totalResults")) { |
| 9983 totalResults = _json["totalResults"]; |
| 9984 } |
| 9985 if (_json.containsKey("username")) { |
| 9986 username = _json["username"]; |
| 9987 } |
| 9988 } |
| 9989 |
| 9990 core.Map toJson() { |
| 9991 var _json = new core.Map(); |
| 9992 if (items != null) { |
| 9993 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 9994 } |
| 9995 if (itemsPerPage != null) { |
| 9996 _json["itemsPerPage"] = itemsPerPage; |
| 9997 } |
| 9998 if (kind != null) { |
| 9999 _json["kind"] = kind; |
| 10000 } |
| 10001 if (nextLink != null) { |
| 10002 _json["nextLink"] = nextLink; |
| 10003 } |
| 10004 if (previousLink != null) { |
| 10005 _json["previousLink"] = previousLink; |
| 10006 } |
| 10007 if (startIndex != null) { |
| 10008 _json["startIndex"] = startIndex; |
| 10009 } |
| 10010 if (totalResults != null) { |
| 10011 _json["totalResults"] = totalResults; |
| 10012 } |
| 10013 if (username != null) { |
| 10014 _json["username"] = username; |
| 10015 } |
| 10016 return _json; |
| 10017 } |
| 10018 } |
| 10019 |
| 10020 |
| 10021 /** Not documented yet. */ |
| 10022 class RealtimeDataColumnHeaders { |
| 10023 /** Column Type. Either DIMENSION or METRIC. */ |
| 10024 core.String columnType; |
| 10025 |
| 10026 /** |
| 10027 * Data type. Dimension column headers have only STRING as the data type. |
| 10028 * Metric column headers have data types for metric values such as INTEGER, |
| 10029 * DOUBLE, CURRENCY etc. |
| 10030 */ |
| 10031 core.String dataType; |
| 10032 |
| 10033 /** Column name. */ |
| 10034 core.String name; |
| 10035 |
| 10036 |
| 10037 RealtimeDataColumnHeaders(); |
| 10038 |
| 10039 RealtimeDataColumnHeaders.fromJson(core.Map _json) { |
| 10040 if (_json.containsKey("columnType")) { |
| 10041 columnType = _json["columnType"]; |
| 10042 } |
| 10043 if (_json.containsKey("dataType")) { |
| 10044 dataType = _json["dataType"]; |
| 10045 } |
| 10046 if (_json.containsKey("name")) { |
| 10047 name = _json["name"]; |
| 10048 } |
| 10049 } |
| 10050 |
| 10051 core.Map toJson() { |
| 10052 var _json = new core.Map(); |
| 10053 if (columnType != null) { |
| 10054 _json["columnType"] = columnType; |
| 10055 } |
| 10056 if (dataType != null) { |
| 10057 _json["dataType"] = dataType; |
| 10058 } |
| 10059 if (name != null) { |
| 10060 _json["name"] = name; |
| 10061 } |
| 10062 return _json; |
| 10063 } |
| 10064 } |
| 10065 |
| 10066 |
| 10067 /** |
| 10068 * Information for the view (profile), for which the real time data was |
| 10069 * requested. |
| 10070 */ |
| 10071 class RealtimeDataProfileInfo { |
| 10072 /** Account ID to which this view (profile) belongs. */ |
| 10073 core.String accountId; |
| 10074 |
| 10075 /** Internal ID for the web property to which this view (profile) belongs. */ |
| 10076 core.String internalWebPropertyId; |
| 10077 |
| 10078 /** View (Profile) ID. */ |
| 10079 core.String profileId; |
| 10080 |
| 10081 /** View (Profile) name. */ |
| 10082 core.String profileName; |
| 10083 |
| 10084 /** Table ID for view (profile). */ |
| 10085 core.String tableId; |
| 10086 |
| 10087 /** Web Property ID to which this view (profile) belongs. */ |
| 10088 core.String webPropertyId; |
| 10089 |
| 10090 |
| 10091 RealtimeDataProfileInfo(); |
| 10092 |
| 10093 RealtimeDataProfileInfo.fromJson(core.Map _json) { |
| 10094 if (_json.containsKey("accountId")) { |
| 10095 accountId = _json["accountId"]; |
| 10096 } |
| 10097 if (_json.containsKey("internalWebPropertyId")) { |
| 10098 internalWebPropertyId = _json["internalWebPropertyId"]; |
| 10099 } |
| 10100 if (_json.containsKey("profileId")) { |
| 10101 profileId = _json["profileId"]; |
| 10102 } |
| 10103 if (_json.containsKey("profileName")) { |
| 10104 profileName = _json["profileName"]; |
| 10105 } |
| 10106 if (_json.containsKey("tableId")) { |
| 10107 tableId = _json["tableId"]; |
| 10108 } |
| 10109 if (_json.containsKey("webPropertyId")) { |
| 10110 webPropertyId = _json["webPropertyId"]; |
| 10111 } |
| 10112 } |
| 10113 |
| 10114 core.Map toJson() { |
| 10115 var _json = new core.Map(); |
| 10116 if (accountId != null) { |
| 10117 _json["accountId"] = accountId; |
| 10118 } |
| 10119 if (internalWebPropertyId != null) { |
| 10120 _json["internalWebPropertyId"] = internalWebPropertyId; |
| 10121 } |
| 10122 if (profileId != null) { |
| 10123 _json["profileId"] = profileId; |
| 10124 } |
| 10125 if (profileName != null) { |
| 10126 _json["profileName"] = profileName; |
| 10127 } |
| 10128 if (tableId != null) { |
| 10129 _json["tableId"] = tableId; |
| 10130 } |
| 10131 if (webPropertyId != null) { |
| 10132 _json["webPropertyId"] = webPropertyId; |
| 10133 } |
| 10134 return _json; |
| 10135 } |
| 10136 } |
| 10137 |
| 10138 |
| 10139 /** Real time data request query parameters. */ |
| 10140 class RealtimeDataQuery { |
| 10141 /** List of real time dimensions. */ |
| 10142 core.String dimensions; |
| 10143 |
| 10144 /** Comma-separated list of dimension or metric filters. */ |
| 10145 core.String filters; |
| 10146 |
| 10147 /** Unique table ID. */ |
| 10148 core.String ids; |
| 10149 |
| 10150 /** Maximum results per page. */ |
| 10151 core.int max_results; |
| 10152 |
| 10153 /** List of real time metrics. */ |
| 10154 core.List<core.String> metrics; |
| 10155 |
| 10156 /** List of dimensions or metrics based on which real time data is sorted. */ |
| 10157 core.List<core.String> sort; |
| 10158 |
| 10159 |
| 10160 RealtimeDataQuery(); |
| 10161 |
| 10162 RealtimeDataQuery.fromJson(core.Map _json) { |
| 10163 if (_json.containsKey("dimensions")) { |
| 10164 dimensions = _json["dimensions"]; |
| 10165 } |
| 10166 if (_json.containsKey("filters")) { |
| 10167 filters = _json["filters"]; |
| 10168 } |
| 10169 if (_json.containsKey("ids")) { |
| 10170 ids = _json["ids"]; |
| 10171 } |
| 10172 if (_json.containsKey("max-results")) { |
| 10173 max_results = _json["max-results"]; |
| 10174 } |
| 10175 if (_json.containsKey("metrics")) { |
| 10176 metrics = _json["metrics"]; |
| 10177 } |
| 10178 if (_json.containsKey("sort")) { |
| 10179 sort = _json["sort"]; |
| 10180 } |
| 10181 } |
| 10182 |
| 10183 core.Map toJson() { |
| 10184 var _json = new core.Map(); |
| 10185 if (dimensions != null) { |
| 10186 _json["dimensions"] = dimensions; |
| 10187 } |
| 10188 if (filters != null) { |
| 10189 _json["filters"] = filters; |
| 10190 } |
| 10191 if (ids != null) { |
| 10192 _json["ids"] = ids; |
| 10193 } |
| 10194 if (max_results != null) { |
| 10195 _json["max-results"] = max_results; |
| 10196 } |
| 10197 if (metrics != null) { |
| 10198 _json["metrics"] = metrics; |
| 10199 } |
| 10200 if (sort != null) { |
| 10201 _json["sort"] = sort; |
| 10202 } |
| 10203 return _json; |
| 10204 } |
| 10205 } |
| 10206 |
| 10207 |
| 10208 /** Real time data for a given view (profile). */ |
| 10209 class RealtimeData { |
| 10210 /** |
| 10211 * Column headers that list dimension names followed by the metric names. The |
| 10212 * order of dimensions and metrics is same as specified in the request. |
| 10213 */ |
| 10214 core.List<RealtimeDataColumnHeaders> columnHeaders; |
| 10215 |
| 10216 /** Unique ID for this data response. */ |
| 10217 core.String id; |
| 10218 |
| 10219 /** Resource type. */ |
| 10220 core.String kind; |
| 10221 |
| 10222 /** |
| 10223 * Information for the view (profile), for which the real time data was |
| 10224 * requested. |
| 10225 */ |
| 10226 RealtimeDataProfileInfo profileInfo; |
| 10227 |
| 10228 /** Real time data request query parameters. */ |
| 10229 RealtimeDataQuery query; |
| 10230 |
| 10231 /** |
| 10232 * Real time data rows, where each row contains a list of dimension values |
| 10233 * followed by the metric values. The order of dimensions and metrics is same |
| 10234 * as specified in the request. |
| 10235 */ |
| 10236 core.List<core.List<core.String>> rows; |
| 10237 |
| 10238 /** Link to this page. */ |
| 10239 core.String selfLink; |
| 10240 |
| 10241 /** |
| 10242 * The total number of rows for the query, regardless of the number of rows in |
| 10243 * the response. |
| 10244 */ |
| 10245 core.int totalResults; |
| 10246 |
| 10247 /** |
| 10248 * Total values for the requested metrics over all the results, not just the |
| 10249 * results returned in this response. The order of the metric totals is same |
| 10250 * as the metric order specified in the request. |
| 10251 */ |
| 10252 core.Map<core.String, core.String> totalsForAllResults; |
| 10253 |
| 10254 |
| 10255 RealtimeData(); |
| 10256 |
| 10257 RealtimeData.fromJson(core.Map _json) { |
| 10258 if (_json.containsKey("columnHeaders")) { |
| 10259 columnHeaders = _json["columnHeaders"].map((value) => new RealtimeDataColu
mnHeaders.fromJson(value)).toList(); |
| 10260 } |
| 10261 if (_json.containsKey("id")) { |
| 10262 id = _json["id"]; |
| 10263 } |
| 10264 if (_json.containsKey("kind")) { |
| 10265 kind = _json["kind"]; |
| 10266 } |
| 10267 if (_json.containsKey("profileInfo")) { |
| 10268 profileInfo = new RealtimeDataProfileInfo.fromJson(_json["profileInfo"]); |
| 10269 } |
| 10270 if (_json.containsKey("query")) { |
| 10271 query = new RealtimeDataQuery.fromJson(_json["query"]); |
| 10272 } |
| 10273 if (_json.containsKey("rows")) { |
| 10274 rows = _json["rows"]; |
| 10275 } |
| 10276 if (_json.containsKey("selfLink")) { |
| 10277 selfLink = _json["selfLink"]; |
| 10278 } |
| 10279 if (_json.containsKey("totalResults")) { |
| 10280 totalResults = _json["totalResults"]; |
| 10281 } |
| 10282 if (_json.containsKey("totalsForAllResults")) { |
| 10283 totalsForAllResults = _json["totalsForAllResults"]; |
| 10284 } |
| 10285 } |
| 10286 |
| 10287 core.Map toJson() { |
| 10288 var _json = new core.Map(); |
| 10289 if (columnHeaders != null) { |
| 10290 _json["columnHeaders"] = columnHeaders.map((value) => (value).toJson()).to
List(); |
| 10291 } |
| 10292 if (id != null) { |
| 10293 _json["id"] = id; |
| 10294 } |
| 10295 if (kind != null) { |
| 10296 _json["kind"] = kind; |
| 10297 } |
| 10298 if (profileInfo != null) { |
| 10299 _json["profileInfo"] = (profileInfo).toJson(); |
| 10300 } |
| 10301 if (query != null) { |
| 10302 _json["query"] = (query).toJson(); |
| 10303 } |
| 10304 if (rows != null) { |
| 10305 _json["rows"] = rows; |
| 10306 } |
| 10307 if (selfLink != null) { |
| 10308 _json["selfLink"] = selfLink; |
| 10309 } |
| 10310 if (totalResults != null) { |
| 10311 _json["totalResults"] = totalResults; |
| 10312 } |
| 10313 if (totalsForAllResults != null) { |
| 10314 _json["totalsForAllResults"] = totalsForAllResults; |
| 10315 } |
| 10316 return _json; |
| 10317 } |
| 10318 } |
| 10319 |
| 10320 |
| 10321 /** JSON template for an Analytics segment. */ |
| 10322 class Segment { |
| 10323 /** Time the segment was created. */ |
| 10324 core.DateTime created; |
| 10325 |
| 10326 /** Segment definition. */ |
| 10327 core.String definition; |
| 10328 |
| 10329 /** Segment ID. */ |
| 10330 core.String id; |
| 10331 |
| 10332 /** Resource type for Analytics segment. */ |
| 10333 core.String kind; |
| 10334 |
| 10335 /** Segment name. */ |
| 10336 core.String name; |
| 10337 |
| 10338 /** |
| 10339 * Segment ID. Can be used with the 'segment' parameter in Core Reporting API. |
| 10340 */ |
| 10341 core.String segmentId; |
| 10342 |
| 10343 /** Link for this segment. */ |
| 10344 core.String selfLink; |
| 10345 |
| 10346 /** Type for a segment. Possible values are "BUILT_IN" or "CUSTOM". */ |
| 10347 core.String type; |
| 10348 |
| 10349 /** Time the segment was last modified. */ |
| 10350 core.DateTime updated; |
| 10351 |
| 10352 |
| 10353 Segment(); |
| 10354 |
| 10355 Segment.fromJson(core.Map _json) { |
| 10356 if (_json.containsKey("created")) { |
| 10357 created = core.DateTime.parse(_json["created"]); |
| 10358 } |
| 10359 if (_json.containsKey("definition")) { |
| 10360 definition = _json["definition"]; |
| 10361 } |
| 10362 if (_json.containsKey("id")) { |
| 10363 id = _json["id"]; |
| 10364 } |
| 10365 if (_json.containsKey("kind")) { |
| 10366 kind = _json["kind"]; |
| 10367 } |
| 10368 if (_json.containsKey("name")) { |
| 10369 name = _json["name"]; |
| 10370 } |
| 10371 if (_json.containsKey("segmentId")) { |
| 10372 segmentId = _json["segmentId"]; |
| 10373 } |
| 10374 if (_json.containsKey("selfLink")) { |
| 10375 selfLink = _json["selfLink"]; |
| 10376 } |
| 10377 if (_json.containsKey("type")) { |
| 10378 type = _json["type"]; |
| 10379 } |
| 10380 if (_json.containsKey("updated")) { |
| 10381 updated = core.DateTime.parse(_json["updated"]); |
| 10382 } |
| 10383 } |
| 10384 |
| 10385 core.Map toJson() { |
| 10386 var _json = new core.Map(); |
| 10387 if (created != null) { |
| 10388 _json["created"] = (created).toIso8601String(); |
| 10389 } |
| 10390 if (definition != null) { |
| 10391 _json["definition"] = definition; |
| 10392 } |
| 10393 if (id != null) { |
| 10394 _json["id"] = id; |
| 10395 } |
| 10396 if (kind != null) { |
| 10397 _json["kind"] = kind; |
| 10398 } |
| 10399 if (name != null) { |
| 10400 _json["name"] = name; |
| 10401 } |
| 10402 if (segmentId != null) { |
| 10403 _json["segmentId"] = segmentId; |
| 10404 } |
| 10405 if (selfLink != null) { |
| 10406 _json["selfLink"] = selfLink; |
| 10407 } |
| 10408 if (type != null) { |
| 10409 _json["type"] = type; |
| 10410 } |
| 10411 if (updated != null) { |
| 10412 _json["updated"] = (updated).toIso8601String(); |
| 10413 } |
| 10414 return _json; |
| 10415 } |
| 10416 } |
| 10417 |
| 10418 |
| 10419 /** |
| 10420 * An segment collection lists Analytics segments that the user has access to. |
| 10421 * Each resource in the collection corresponds to a single Analytics segment. |
| 10422 */ |
| 10423 class Segments { |
| 10424 /** A list of segments. */ |
| 10425 core.List<Segment> items; |
| 10426 |
| 10427 /** |
| 10428 * The maximum number of resources the response can contain, regardless of the |
| 10429 * actual number of resources returned. Its value ranges from 1 to 1000 with a |
| 10430 * value of 1000 by default, or otherwise specified by the max-results query |
| 10431 * parameter. |
| 10432 */ |
| 10433 core.int itemsPerPage; |
| 10434 |
| 10435 /** Collection type for segments. */ |
| 10436 core.String kind; |
| 10437 |
| 10438 /** Link to next page for this segment collection. */ |
| 10439 core.String nextLink; |
| 10440 |
| 10441 /** Link to previous page for this segment collection. */ |
| 10442 core.String previousLink; |
| 10443 |
| 10444 /** |
| 10445 * The starting index of the resources, which is 1 by default or otherwise |
| 10446 * specified by the start-index query parameter. |
| 10447 */ |
| 10448 core.int startIndex; |
| 10449 |
| 10450 /** |
| 10451 * The total number of results for the query, regardless of the number of |
| 10452 * results in the response. |
| 10453 */ |
| 10454 core.int totalResults; |
| 10455 |
| 10456 /** Email ID of the authenticated user */ |
| 10457 core.String username; |
| 10458 |
| 10459 |
| 10460 Segments(); |
| 10461 |
| 10462 Segments.fromJson(core.Map _json) { |
| 10463 if (_json.containsKey("items")) { |
| 10464 items = _json["items"].map((value) => new Segment.fromJson(value)).toList(
); |
| 10465 } |
| 10466 if (_json.containsKey("itemsPerPage")) { |
| 10467 itemsPerPage = _json["itemsPerPage"]; |
| 10468 } |
| 10469 if (_json.containsKey("kind")) { |
| 10470 kind = _json["kind"]; |
| 10471 } |
| 10472 if (_json.containsKey("nextLink")) { |
| 10473 nextLink = _json["nextLink"]; |
| 10474 } |
| 10475 if (_json.containsKey("previousLink")) { |
| 10476 previousLink = _json["previousLink"]; |
| 10477 } |
| 10478 if (_json.containsKey("startIndex")) { |
| 10479 startIndex = _json["startIndex"]; |
| 10480 } |
| 10481 if (_json.containsKey("totalResults")) { |
| 10482 totalResults = _json["totalResults"]; |
| 10483 } |
| 10484 if (_json.containsKey("username")) { |
| 10485 username = _json["username"]; |
| 10486 } |
| 10487 } |
| 10488 |
| 10489 core.Map toJson() { |
| 10490 var _json = new core.Map(); |
| 10491 if (items != null) { |
| 10492 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 10493 } |
| 10494 if (itemsPerPage != null) { |
| 10495 _json["itemsPerPage"] = itemsPerPage; |
| 10496 } |
| 10497 if (kind != null) { |
| 10498 _json["kind"] = kind; |
| 10499 } |
| 10500 if (nextLink != null) { |
| 10501 _json["nextLink"] = nextLink; |
| 10502 } |
| 10503 if (previousLink != null) { |
| 10504 _json["previousLink"] = previousLink; |
| 10505 } |
| 10506 if (startIndex != null) { |
| 10507 _json["startIndex"] = startIndex; |
| 10508 } |
| 10509 if (totalResults != null) { |
| 10510 _json["totalResults"] = totalResults; |
| 10511 } |
| 10512 if (username != null) { |
| 10513 _json["username"] = username; |
| 10514 } |
| 10515 return _json; |
| 10516 } |
| 10517 } |
| 10518 |
| 10519 |
| 10520 /** Download details for a file stored in Google Cloud Storage. */ |
| 10521 class UnsampledReportCloudStorageDownloadDetails { |
| 10522 /** Id of the bucket the file object is stored in. */ |
| 10523 core.String bucketId; |
| 10524 |
| 10525 /** Id of the file object containing the report data. */ |
| 10526 core.String objectId; |
| 10527 |
| 10528 |
| 10529 UnsampledReportCloudStorageDownloadDetails(); |
| 10530 |
| 10531 UnsampledReportCloudStorageDownloadDetails.fromJson(core.Map _json) { |
| 10532 if (_json.containsKey("bucketId")) { |
| 10533 bucketId = _json["bucketId"]; |
| 10534 } |
| 10535 if (_json.containsKey("objectId")) { |
| 10536 objectId = _json["objectId"]; |
| 10537 } |
| 10538 } |
| 10539 |
| 10540 core.Map toJson() { |
| 10541 var _json = new core.Map(); |
| 10542 if (bucketId != null) { |
| 10543 _json["bucketId"] = bucketId; |
| 10544 } |
| 10545 if (objectId != null) { |
| 10546 _json["objectId"] = objectId; |
| 10547 } |
| 10548 return _json; |
| 10549 } |
| 10550 } |
| 10551 |
| 10552 |
| 10553 /** Download details for a file stored in Google Drive. */ |
| 10554 class UnsampledReportDriveDownloadDetails { |
| 10555 /** Id of the document/file containing the report data. */ |
| 10556 core.String documentId; |
| 10557 |
| 10558 |
| 10559 UnsampledReportDriveDownloadDetails(); |
| 10560 |
| 10561 UnsampledReportDriveDownloadDetails.fromJson(core.Map _json) { |
| 10562 if (_json.containsKey("documentId")) { |
| 10563 documentId = _json["documentId"]; |
| 10564 } |
| 10565 } |
| 10566 |
| 10567 core.Map toJson() { |
| 10568 var _json = new core.Map(); |
| 10569 if (documentId != null) { |
| 10570 _json["documentId"] = documentId; |
| 10571 } |
| 10572 return _json; |
| 10573 } |
| 10574 } |
| 10575 |
| 10576 |
| 10577 /** JSON template for Analytics unsampled report resource. */ |
| 10578 class UnsampledReport { |
| 10579 /** Account ID to which this unsampled report belongs. */ |
| 10580 core.String accountId; |
| 10581 |
| 10582 /** Download details for a file stored in Google Cloud Storage. */ |
| 10583 UnsampledReportCloudStorageDownloadDetails cloudStorageDownloadDetails; |
| 10584 |
| 10585 /** Time this unsampled report was created. */ |
| 10586 core.DateTime created; |
| 10587 |
| 10588 /** The dimensions for the unsampled report. */ |
| 10589 core.String dimensions; |
| 10590 |
| 10591 /** The type of download you need to use for the report data file. */ |
| 10592 core.String downloadType; |
| 10593 |
| 10594 /** Download details for a file stored in Google Drive. */ |
| 10595 UnsampledReportDriveDownloadDetails driveDownloadDetails; |
| 10596 |
| 10597 /** The end date for the unsampled report. */ |
| 10598 core.String end_date; |
| 10599 |
| 10600 /** The filters for the unsampled report. */ |
| 10601 core.String filters; |
| 10602 |
| 10603 /** Unsampled report ID. */ |
| 10604 core.String id; |
| 10605 |
| 10606 /** Resource type for an Analytics unsampled report. */ |
| 10607 core.String kind; |
| 10608 |
| 10609 /** The metrics for the unsampled report. */ |
| 10610 core.String metrics; |
| 10611 |
| 10612 /** View (Profile) ID to which this unsampled report belongs. */ |
| 10613 core.String profileId; |
| 10614 |
| 10615 /** The segment for the unsampled report. */ |
| 10616 core.String segment; |
| 10617 |
| 10618 /** Link for this unsampled report. */ |
| 10619 core.String selfLink; |
| 10620 |
| 10621 /** The start date for the unsampled report. */ |
| 10622 core.String start_date; |
| 10623 |
| 10624 /** |
| 10625 * Status of this unsampled report. Possible values are PENDING, COMPLETED, or |
| 10626 * FAILED. |
| 10627 */ |
| 10628 core.String status; |
| 10629 |
| 10630 /** Title of the unsampled report. */ |
| 10631 core.String title; |
| 10632 |
| 10633 /** Time this unsampled report was last modified. */ |
| 10634 core.DateTime updated; |
| 10635 |
| 10636 /** |
| 10637 * Web property ID to which this unsampled report belongs. The web property ID |
| 10638 * is of the form UA-XXXXX-YY. |
| 10639 */ |
| 10640 core.String webPropertyId; |
| 10641 |
| 10642 |
| 10643 UnsampledReport(); |
| 10644 |
| 10645 UnsampledReport.fromJson(core.Map _json) { |
| 10646 if (_json.containsKey("accountId")) { |
| 10647 accountId = _json["accountId"]; |
| 10648 } |
| 10649 if (_json.containsKey("cloudStorageDownloadDetails")) { |
| 10650 cloudStorageDownloadDetails = new UnsampledReportCloudStorageDownloadDetai
ls.fromJson(_json["cloudStorageDownloadDetails"]); |
| 10651 } |
| 10652 if (_json.containsKey("created")) { |
| 10653 created = core.DateTime.parse(_json["created"]); |
| 10654 } |
| 10655 if (_json.containsKey("dimensions")) { |
| 10656 dimensions = _json["dimensions"]; |
| 10657 } |
| 10658 if (_json.containsKey("downloadType")) { |
| 10659 downloadType = _json["downloadType"]; |
| 10660 } |
| 10661 if (_json.containsKey("driveDownloadDetails")) { |
| 10662 driveDownloadDetails = new UnsampledReportDriveDownloadDetails.fromJson(_j
son["driveDownloadDetails"]); |
| 10663 } |
| 10664 if (_json.containsKey("end-date")) { |
| 10665 end_date = _json["end-date"]; |
| 10666 } |
| 10667 if (_json.containsKey("filters")) { |
| 10668 filters = _json["filters"]; |
| 10669 } |
| 10670 if (_json.containsKey("id")) { |
| 10671 id = _json["id"]; |
| 10672 } |
| 10673 if (_json.containsKey("kind")) { |
| 10674 kind = _json["kind"]; |
| 10675 } |
| 10676 if (_json.containsKey("metrics")) { |
| 10677 metrics = _json["metrics"]; |
| 10678 } |
| 10679 if (_json.containsKey("profileId")) { |
| 10680 profileId = _json["profileId"]; |
| 10681 } |
| 10682 if (_json.containsKey("segment")) { |
| 10683 segment = _json["segment"]; |
| 10684 } |
| 10685 if (_json.containsKey("selfLink")) { |
| 10686 selfLink = _json["selfLink"]; |
| 10687 } |
| 10688 if (_json.containsKey("start-date")) { |
| 10689 start_date = _json["start-date"]; |
| 10690 } |
| 10691 if (_json.containsKey("status")) { |
| 10692 status = _json["status"]; |
| 10693 } |
| 10694 if (_json.containsKey("title")) { |
| 10695 title = _json["title"]; |
| 10696 } |
| 10697 if (_json.containsKey("updated")) { |
| 10698 updated = core.DateTime.parse(_json["updated"]); |
| 10699 } |
| 10700 if (_json.containsKey("webPropertyId")) { |
| 10701 webPropertyId = _json["webPropertyId"]; |
| 10702 } |
| 10703 } |
| 10704 |
| 10705 core.Map toJson() { |
| 10706 var _json = new core.Map(); |
| 10707 if (accountId != null) { |
| 10708 _json["accountId"] = accountId; |
| 10709 } |
| 10710 if (cloudStorageDownloadDetails != null) { |
| 10711 _json["cloudStorageDownloadDetails"] = (cloudStorageDownloadDetails).toJso
n(); |
| 10712 } |
| 10713 if (created != null) { |
| 10714 _json["created"] = (created).toIso8601String(); |
| 10715 } |
| 10716 if (dimensions != null) { |
| 10717 _json["dimensions"] = dimensions; |
| 10718 } |
| 10719 if (downloadType != null) { |
| 10720 _json["downloadType"] = downloadType; |
| 10721 } |
| 10722 if (driveDownloadDetails != null) { |
| 10723 _json["driveDownloadDetails"] = (driveDownloadDetails).toJson(); |
| 10724 } |
| 10725 if (end_date != null) { |
| 10726 _json["end-date"] = end_date; |
| 10727 } |
| 10728 if (filters != null) { |
| 10729 _json["filters"] = filters; |
| 10730 } |
| 10731 if (id != null) { |
| 10732 _json["id"] = id; |
| 10733 } |
| 10734 if (kind != null) { |
| 10735 _json["kind"] = kind; |
| 10736 } |
| 10737 if (metrics != null) { |
| 10738 _json["metrics"] = metrics; |
| 10739 } |
| 10740 if (profileId != null) { |
| 10741 _json["profileId"] = profileId; |
| 10742 } |
| 10743 if (segment != null) { |
| 10744 _json["segment"] = segment; |
| 10745 } |
| 10746 if (selfLink != null) { |
| 10747 _json["selfLink"] = selfLink; |
| 10748 } |
| 10749 if (start_date != null) { |
| 10750 _json["start-date"] = start_date; |
| 10751 } |
| 10752 if (status != null) { |
| 10753 _json["status"] = status; |
| 10754 } |
| 10755 if (title != null) { |
| 10756 _json["title"] = title; |
| 10757 } |
| 10758 if (updated != null) { |
| 10759 _json["updated"] = (updated).toIso8601String(); |
| 10760 } |
| 10761 if (webPropertyId != null) { |
| 10762 _json["webPropertyId"] = webPropertyId; |
| 10763 } |
| 10764 return _json; |
| 10765 } |
| 10766 } |
| 10767 |
| 10768 |
| 10769 /** |
| 10770 * An unsampled report collection lists Analytics unsampled reports to which the |
| 10771 * user has access. Each view (profile) can have a set of unsampled reports. |
| 10772 * Each resource in the unsampled report collection corresponds to a single |
| 10773 * Analytics unsampled report. |
| 10774 */ |
| 10775 class UnsampledReports { |
| 10776 /** A list of unsampled reports. */ |
| 10777 core.List<UnsampledReport> items; |
| 10778 |
| 10779 /** |
| 10780 * The maximum number of resources the response can contain, regardless of the |
| 10781 * actual number of resources returned. Its value ranges from 1 to 1000 with a |
| 10782 * value of 1000 by default, or otherwise specified by the max-results query |
| 10783 * parameter. |
| 10784 */ |
| 10785 core.int itemsPerPage; |
| 10786 |
| 10787 /** Collection type. */ |
| 10788 core.String kind; |
| 10789 |
| 10790 /** Link to next page for this unsampled report collection. */ |
| 10791 core.String nextLink; |
| 10792 |
| 10793 /** Link to previous page for this unsampled report collection. */ |
| 10794 core.String previousLink; |
| 10795 |
| 10796 /** |
| 10797 * The starting index of the resources, which is 1 by default or otherwise |
| 10798 * specified by the start-index query parameter. |
| 10799 */ |
| 10800 core.int startIndex; |
| 10801 |
| 10802 /** |
| 10803 * The total number of results for the query, regardless of the number of |
| 10804 * resources in the result. |
| 10805 */ |
| 10806 core.int totalResults; |
| 10807 |
| 10808 /** Email ID of the authenticated user */ |
| 10809 core.String username; |
| 10810 |
| 10811 |
| 10812 UnsampledReports(); |
| 10813 |
| 10814 UnsampledReports.fromJson(core.Map _json) { |
| 10815 if (_json.containsKey("items")) { |
| 10816 items = _json["items"].map((value) => new UnsampledReport.fromJson(value))
.toList(); |
| 10817 } |
| 10818 if (_json.containsKey("itemsPerPage")) { |
| 10819 itemsPerPage = _json["itemsPerPage"]; |
| 10820 } |
| 10821 if (_json.containsKey("kind")) { |
| 10822 kind = _json["kind"]; |
| 10823 } |
| 10824 if (_json.containsKey("nextLink")) { |
| 10825 nextLink = _json["nextLink"]; |
| 10826 } |
| 10827 if (_json.containsKey("previousLink")) { |
| 10828 previousLink = _json["previousLink"]; |
| 10829 } |
| 10830 if (_json.containsKey("startIndex")) { |
| 10831 startIndex = _json["startIndex"]; |
| 10832 } |
| 10833 if (_json.containsKey("totalResults")) { |
| 10834 totalResults = _json["totalResults"]; |
| 10835 } |
| 10836 if (_json.containsKey("username")) { |
| 10837 username = _json["username"]; |
| 10838 } |
| 10839 } |
| 10840 |
| 10841 core.Map toJson() { |
| 10842 var _json = new core.Map(); |
| 10843 if (items != null) { |
| 10844 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 10845 } |
| 10846 if (itemsPerPage != null) { |
| 10847 _json["itemsPerPage"] = itemsPerPage; |
| 10848 } |
| 10849 if (kind != null) { |
| 10850 _json["kind"] = kind; |
| 10851 } |
| 10852 if (nextLink != null) { |
| 10853 _json["nextLink"] = nextLink; |
| 10854 } |
| 10855 if (previousLink != null) { |
| 10856 _json["previousLink"] = previousLink; |
| 10857 } |
| 10858 if (startIndex != null) { |
| 10859 _json["startIndex"] = startIndex; |
| 10860 } |
| 10861 if (totalResults != null) { |
| 10862 _json["totalResults"] = totalResults; |
| 10863 } |
| 10864 if (username != null) { |
| 10865 _json["username"] = username; |
| 10866 } |
| 10867 return _json; |
| 10868 } |
| 10869 } |
| 10870 |
| 10871 |
| 10872 /** Metadata returned for an upload operation. */ |
| 10873 class Upload { |
| 10874 /** Account Id to which this upload belongs. */ |
| 10875 core.String accountId; |
| 10876 |
| 10877 /** Custom data source Id to which this data import belongs. */ |
| 10878 core.String customDataSourceId; |
| 10879 |
| 10880 /** Data import errors collection. */ |
| 10881 core.List<core.String> errors; |
| 10882 |
| 10883 /** A unique ID for this upload. */ |
| 10884 core.String id; |
| 10885 |
| 10886 /** Resource type for Analytics upload. */ |
| 10887 core.String kind; |
| 10888 |
| 10889 /** |
| 10890 * Upload status. Possible values: PENDING, COMPLETED, FAILED, DELETING, |
| 10891 * DELETED. |
| 10892 */ |
| 10893 core.String status; |
| 10894 |
| 10895 |
| 10896 Upload(); |
| 10897 |
| 10898 Upload.fromJson(core.Map _json) { |
| 10899 if (_json.containsKey("accountId")) { |
| 10900 accountId = _json["accountId"]; |
| 10901 } |
| 10902 if (_json.containsKey("customDataSourceId")) { |
| 10903 customDataSourceId = _json["customDataSourceId"]; |
| 10904 } |
| 10905 if (_json.containsKey("errors")) { |
| 10906 errors = _json["errors"]; |
| 10907 } |
| 10908 if (_json.containsKey("id")) { |
| 10909 id = _json["id"]; |
| 10910 } |
| 10911 if (_json.containsKey("kind")) { |
| 10912 kind = _json["kind"]; |
| 10913 } |
| 10914 if (_json.containsKey("status")) { |
| 10915 status = _json["status"]; |
| 10916 } |
| 10917 } |
| 10918 |
| 10919 core.Map toJson() { |
| 10920 var _json = new core.Map(); |
| 10921 if (accountId != null) { |
| 10922 _json["accountId"] = accountId; |
| 10923 } |
| 10924 if (customDataSourceId != null) { |
| 10925 _json["customDataSourceId"] = customDataSourceId; |
| 10926 } |
| 10927 if (errors != null) { |
| 10928 _json["errors"] = errors; |
| 10929 } |
| 10930 if (id != null) { |
| 10931 _json["id"] = id; |
| 10932 } |
| 10933 if (kind != null) { |
| 10934 _json["kind"] = kind; |
| 10935 } |
| 10936 if (status != null) { |
| 10937 _json["status"] = status; |
| 10938 } |
| 10939 return _json; |
| 10940 } |
| 10941 } |
| 10942 |
| 10943 |
| 10944 /** |
| 10945 * Upload collection lists Analytics uploads to which the user has access. Each |
| 10946 * custom data source can have a set of uploads. Each resource in the upload |
| 10947 * collection corresponds to a single Analytics data upload. |
| 10948 */ |
| 10949 class Uploads { |
| 10950 /** A list of uploads. */ |
| 10951 core.List<Upload> items; |
| 10952 |
| 10953 /** |
| 10954 * The maximum number of resources the response can contain, regardless of the |
| 10955 * actual number of resources returned. Its value ranges from 1 to 1000 with a |
| 10956 * value of 1000 by default, or otherwise specified by the max-results query |
| 10957 * parameter. |
| 10958 */ |
| 10959 core.int itemsPerPage; |
| 10960 |
| 10961 /** Collection type. */ |
| 10962 core.String kind; |
| 10963 |
| 10964 /** Link to next page for this upload collection. */ |
| 10965 core.String nextLink; |
| 10966 |
| 10967 /** Link to previous page for this upload collection. */ |
| 10968 core.String previousLink; |
| 10969 |
| 10970 /** |
| 10971 * The starting index of the resources, which is 1 by default or otherwise |
| 10972 * specified by the start-index query parameter. |
| 10973 */ |
| 10974 core.int startIndex; |
| 10975 |
| 10976 /** |
| 10977 * The total number of results for the query, regardless of the number of |
| 10978 * resources in the result. |
| 10979 */ |
| 10980 core.int totalResults; |
| 10981 |
| 10982 |
| 10983 Uploads(); |
| 10984 |
| 10985 Uploads.fromJson(core.Map _json) { |
| 10986 if (_json.containsKey("items")) { |
| 10987 items = _json["items"].map((value) => new Upload.fromJson(value)).toList()
; |
| 10988 } |
| 10989 if (_json.containsKey("itemsPerPage")) { |
| 10990 itemsPerPage = _json["itemsPerPage"]; |
| 10991 } |
| 10992 if (_json.containsKey("kind")) { |
| 10993 kind = _json["kind"]; |
| 10994 } |
| 10995 if (_json.containsKey("nextLink")) { |
| 10996 nextLink = _json["nextLink"]; |
| 10997 } |
| 10998 if (_json.containsKey("previousLink")) { |
| 10999 previousLink = _json["previousLink"]; |
| 11000 } |
| 11001 if (_json.containsKey("startIndex")) { |
| 11002 startIndex = _json["startIndex"]; |
| 11003 } |
| 11004 if (_json.containsKey("totalResults")) { |
| 11005 totalResults = _json["totalResults"]; |
| 11006 } |
| 11007 } |
| 11008 |
| 11009 core.Map toJson() { |
| 11010 var _json = new core.Map(); |
| 11011 if (items != null) { |
| 11012 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 11013 } |
| 11014 if (itemsPerPage != null) { |
| 11015 _json["itemsPerPage"] = itemsPerPage; |
| 11016 } |
| 11017 if (kind != null) { |
| 11018 _json["kind"] = kind; |
| 11019 } |
| 11020 if (nextLink != null) { |
| 11021 _json["nextLink"] = nextLink; |
| 11022 } |
| 11023 if (previousLink != null) { |
| 11024 _json["previousLink"] = previousLink; |
| 11025 } |
| 11026 if (startIndex != null) { |
| 11027 _json["startIndex"] = startIndex; |
| 11028 } |
| 11029 if (totalResults != null) { |
| 11030 _json["totalResults"] = totalResults; |
| 11031 } |
| 11032 return _json; |
| 11033 } |
| 11034 } |
| 11035 |
| 11036 |
| 11037 /** JSON template for a user reference. */ |
| 11038 class UserRef { |
| 11039 /** Email ID of this user. */ |
| 11040 core.String email; |
| 11041 |
| 11042 /** User ID. */ |
| 11043 core.String id; |
| 11044 |
| 11045 /** Not documented yet. */ |
| 11046 core.String kind; |
| 11047 |
| 11048 |
| 11049 UserRef(); |
| 11050 |
| 11051 UserRef.fromJson(core.Map _json) { |
| 11052 if (_json.containsKey("email")) { |
| 11053 email = _json["email"]; |
| 11054 } |
| 11055 if (_json.containsKey("id")) { |
| 11056 id = _json["id"]; |
| 11057 } |
| 11058 if (_json.containsKey("kind")) { |
| 11059 kind = _json["kind"]; |
| 11060 } |
| 11061 } |
| 11062 |
| 11063 core.Map toJson() { |
| 11064 var _json = new core.Map(); |
| 11065 if (email != null) { |
| 11066 _json["email"] = email; |
| 11067 } |
| 11068 if (id != null) { |
| 11069 _json["id"] = id; |
| 11070 } |
| 11071 if (kind != null) { |
| 11072 _json["kind"] = kind; |
| 11073 } |
| 11074 return _json; |
| 11075 } |
| 11076 } |
| 11077 |
| 11078 |
| 11079 /** JSON template for a web property reference. */ |
| 11080 class WebPropertyRef { |
| 11081 /** Account ID to which this web property belongs. */ |
| 11082 core.String accountId; |
| 11083 |
| 11084 /** Link for this web property. */ |
| 11085 core.String href; |
| 11086 |
| 11087 /** Web property ID of the form UA-XXXXX-YY. */ |
| 11088 core.String id; |
| 11089 |
| 11090 /** Internal ID for this web property. */ |
| 11091 core.String internalWebPropertyId; |
| 11092 |
| 11093 /** Analytics web property reference. */ |
| 11094 core.String kind; |
| 11095 |
| 11096 /** Name of this web property. */ |
| 11097 core.String name; |
| 11098 |
| 11099 |
| 11100 WebPropertyRef(); |
| 11101 |
| 11102 WebPropertyRef.fromJson(core.Map _json) { |
| 11103 if (_json.containsKey("accountId")) { |
| 11104 accountId = _json["accountId"]; |
| 11105 } |
| 11106 if (_json.containsKey("href")) { |
| 11107 href = _json["href"]; |
| 11108 } |
| 11109 if (_json.containsKey("id")) { |
| 11110 id = _json["id"]; |
| 11111 } |
| 11112 if (_json.containsKey("internalWebPropertyId")) { |
| 11113 internalWebPropertyId = _json["internalWebPropertyId"]; |
| 11114 } |
| 11115 if (_json.containsKey("kind")) { |
| 11116 kind = _json["kind"]; |
| 11117 } |
| 11118 if (_json.containsKey("name")) { |
| 11119 name = _json["name"]; |
| 11120 } |
| 11121 } |
| 11122 |
| 11123 core.Map toJson() { |
| 11124 var _json = new core.Map(); |
| 11125 if (accountId != null) { |
| 11126 _json["accountId"] = accountId; |
| 11127 } |
| 11128 if (href != null) { |
| 11129 _json["href"] = href; |
| 11130 } |
| 11131 if (id != null) { |
| 11132 _json["id"] = id; |
| 11133 } |
| 11134 if (internalWebPropertyId != null) { |
| 11135 _json["internalWebPropertyId"] = internalWebPropertyId; |
| 11136 } |
| 11137 if (kind != null) { |
| 11138 _json["kind"] = kind; |
| 11139 } |
| 11140 if (name != null) { |
| 11141 _json["name"] = name; |
| 11142 } |
| 11143 return _json; |
| 11144 } |
| 11145 } |
| 11146 |
| 11147 |
| 11148 /** |
| 11149 * JSON template for an Analytics WebPropertySummary. WebPropertySummary returns |
| 11150 * basic information (i.e., summary) for a web property. |
| 11151 */ |
| 11152 class WebPropertySummary { |
| 11153 /** Web property ID of the form UA-XXXXX-YY. */ |
| 11154 core.String id; |
| 11155 |
| 11156 /** Internal ID for this web property. */ |
| 11157 core.String internalWebPropertyId; |
| 11158 |
| 11159 /** Resource type for Analytics WebPropertySummary. */ |
| 11160 core.String kind; |
| 11161 |
| 11162 /** Level for this web property. Possible values are STANDARD or PREMIUM. */ |
| 11163 core.String level; |
| 11164 |
| 11165 /** Web property name. */ |
| 11166 core.String name; |
| 11167 |
| 11168 /** List of profiles under this web property. */ |
| 11169 core.List<ProfileSummary> profiles; |
| 11170 |
| 11171 /** Website url for this web property. */ |
| 11172 core.String websiteUrl; |
| 11173 |
| 11174 |
| 11175 WebPropertySummary(); |
| 11176 |
| 11177 WebPropertySummary.fromJson(core.Map _json) { |
| 11178 if (_json.containsKey("id")) { |
| 11179 id = _json["id"]; |
| 11180 } |
| 11181 if (_json.containsKey("internalWebPropertyId")) { |
| 11182 internalWebPropertyId = _json["internalWebPropertyId"]; |
| 11183 } |
| 11184 if (_json.containsKey("kind")) { |
| 11185 kind = _json["kind"]; |
| 11186 } |
| 11187 if (_json.containsKey("level")) { |
| 11188 level = _json["level"]; |
| 11189 } |
| 11190 if (_json.containsKey("name")) { |
| 11191 name = _json["name"]; |
| 11192 } |
| 11193 if (_json.containsKey("profiles")) { |
| 11194 profiles = _json["profiles"].map((value) => new ProfileSummary.fromJson(va
lue)).toList(); |
| 11195 } |
| 11196 if (_json.containsKey("websiteUrl")) { |
| 11197 websiteUrl = _json["websiteUrl"]; |
| 11198 } |
| 11199 } |
| 11200 |
| 11201 core.Map toJson() { |
| 11202 var _json = new core.Map(); |
| 11203 if (id != null) { |
| 11204 _json["id"] = id; |
| 11205 } |
| 11206 if (internalWebPropertyId != null) { |
| 11207 _json["internalWebPropertyId"] = internalWebPropertyId; |
| 11208 } |
| 11209 if (kind != null) { |
| 11210 _json["kind"] = kind; |
| 11211 } |
| 11212 if (level != null) { |
| 11213 _json["level"] = level; |
| 11214 } |
| 11215 if (name != null) { |
| 11216 _json["name"] = name; |
| 11217 } |
| 11218 if (profiles != null) { |
| 11219 _json["profiles"] = profiles.map((value) => (value).toJson()).toList(); |
| 11220 } |
| 11221 if (websiteUrl != null) { |
| 11222 _json["websiteUrl"] = websiteUrl; |
| 11223 } |
| 11224 return _json; |
| 11225 } |
| 11226 } |
| 11227 |
| 11228 |
| 11229 /** |
| 11230 * A web property collection lists Analytics web properties to which the user |
| 11231 * has access. Each resource in the collection corresponds to a single Analytics |
| 11232 * web property. |
| 11233 */ |
| 11234 class Webproperties { |
| 11235 /** A list of web properties. */ |
| 11236 core.List<Webproperty> items; |
| 11237 |
| 11238 /** |
| 11239 * The maximum number of resources the response can contain, regardless of the |
| 11240 * actual number of resources returned. Its value ranges from 1 to 1000 with a |
| 11241 * value of 1000 by default, or otherwise specified by the max-results query |
| 11242 * parameter. |
| 11243 */ |
| 11244 core.int itemsPerPage; |
| 11245 |
| 11246 /** Collection type. */ |
| 11247 core.String kind; |
| 11248 |
| 11249 /** Link to next page for this web property collection. */ |
| 11250 core.String nextLink; |
| 11251 |
| 11252 /** Link to previous page for this web property collection. */ |
| 11253 core.String previousLink; |
| 11254 |
| 11255 /** |
| 11256 * The starting index of the resources, which is 1 by default or otherwise |
| 11257 * specified by the start-index query parameter. |
| 11258 */ |
| 11259 core.int startIndex; |
| 11260 |
| 11261 /** |
| 11262 * The total number of results for the query, regardless of the number of |
| 11263 * results in the response. |
| 11264 */ |
| 11265 core.int totalResults; |
| 11266 |
| 11267 /** Email ID of the authenticated user */ |
| 11268 core.String username; |
| 11269 |
| 11270 |
| 11271 Webproperties(); |
| 11272 |
| 11273 Webproperties.fromJson(core.Map _json) { |
| 11274 if (_json.containsKey("items")) { |
| 11275 items = _json["items"].map((value) => new Webproperty.fromJson(value)).toL
ist(); |
| 11276 } |
| 11277 if (_json.containsKey("itemsPerPage")) { |
| 11278 itemsPerPage = _json["itemsPerPage"]; |
| 11279 } |
| 11280 if (_json.containsKey("kind")) { |
| 11281 kind = _json["kind"]; |
| 11282 } |
| 11283 if (_json.containsKey("nextLink")) { |
| 11284 nextLink = _json["nextLink"]; |
| 11285 } |
| 11286 if (_json.containsKey("previousLink")) { |
| 11287 previousLink = _json["previousLink"]; |
| 11288 } |
| 11289 if (_json.containsKey("startIndex")) { |
| 11290 startIndex = _json["startIndex"]; |
| 11291 } |
| 11292 if (_json.containsKey("totalResults")) { |
| 11293 totalResults = _json["totalResults"]; |
| 11294 } |
| 11295 if (_json.containsKey("username")) { |
| 11296 username = _json["username"]; |
| 11297 } |
| 11298 } |
| 11299 |
| 11300 core.Map toJson() { |
| 11301 var _json = new core.Map(); |
| 11302 if (items != null) { |
| 11303 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 11304 } |
| 11305 if (itemsPerPage != null) { |
| 11306 _json["itemsPerPage"] = itemsPerPage; |
| 11307 } |
| 11308 if (kind != null) { |
| 11309 _json["kind"] = kind; |
| 11310 } |
| 11311 if (nextLink != null) { |
| 11312 _json["nextLink"] = nextLink; |
| 11313 } |
| 11314 if (previousLink != null) { |
| 11315 _json["previousLink"] = previousLink; |
| 11316 } |
| 11317 if (startIndex != null) { |
| 11318 _json["startIndex"] = startIndex; |
| 11319 } |
| 11320 if (totalResults != null) { |
| 11321 _json["totalResults"] = totalResults; |
| 11322 } |
| 11323 if (username != null) { |
| 11324 _json["username"] = username; |
| 11325 } |
| 11326 return _json; |
| 11327 } |
| 11328 } |
| 11329 |
| 11330 |
| 11331 /** |
| 11332 * Child link for this web property. Points to the list of views (profiles) for |
| 11333 * this web property. |
| 11334 */ |
| 11335 class WebpropertyChildLink { |
| 11336 /** Link to the list of views (profiles) for this web property. */ |
| 11337 core.String href; |
| 11338 |
| 11339 /** Type of the parent link. Its value is "analytics#profiles". */ |
| 11340 core.String type; |
| 11341 |
| 11342 |
| 11343 WebpropertyChildLink(); |
| 11344 |
| 11345 WebpropertyChildLink.fromJson(core.Map _json) { |
| 11346 if (_json.containsKey("href")) { |
| 11347 href = _json["href"]; |
| 11348 } |
| 11349 if (_json.containsKey("type")) { |
| 11350 type = _json["type"]; |
| 11351 } |
| 11352 } |
| 11353 |
| 11354 core.Map toJson() { |
| 11355 var _json = new core.Map(); |
| 11356 if (href != null) { |
| 11357 _json["href"] = href; |
| 11358 } |
| 11359 if (type != null) { |
| 11360 _json["type"] = type; |
| 11361 } |
| 11362 return _json; |
| 11363 } |
| 11364 } |
| 11365 |
| 11366 |
| 11367 /** |
| 11368 * Parent link for this web property. Points to the account to which this web |
| 11369 * property belongs. |
| 11370 */ |
| 11371 class WebpropertyParentLink { |
| 11372 /** Link to the account for this web property. */ |
| 11373 core.String href; |
| 11374 |
| 11375 /** Type of the parent link. Its value is "analytics#account". */ |
| 11376 core.String type; |
| 11377 |
| 11378 |
| 11379 WebpropertyParentLink(); |
| 11380 |
| 11381 WebpropertyParentLink.fromJson(core.Map _json) { |
| 11382 if (_json.containsKey("href")) { |
| 11383 href = _json["href"]; |
| 11384 } |
| 11385 if (_json.containsKey("type")) { |
| 11386 type = _json["type"]; |
| 11387 } |
| 11388 } |
| 11389 |
| 11390 core.Map toJson() { |
| 11391 var _json = new core.Map(); |
| 11392 if (href != null) { |
| 11393 _json["href"] = href; |
| 11394 } |
| 11395 if (type != null) { |
| 11396 _json["type"] = type; |
| 11397 } |
| 11398 return _json; |
| 11399 } |
| 11400 } |
| 11401 |
| 11402 |
| 11403 /** Permissions the user has for this web property. */ |
| 11404 class WebpropertyPermissions { |
| 11405 /** |
| 11406 * All the permissions that the user has for this web property. These include |
| 11407 * any implied permissions (e.g., EDIT implies VIEW) or inherited permissions |
| 11408 * from the parent account. |
| 11409 */ |
| 11410 core.List<core.String> effective; |
| 11411 |
| 11412 |
| 11413 WebpropertyPermissions(); |
| 11414 |
| 11415 WebpropertyPermissions.fromJson(core.Map _json) { |
| 11416 if (_json.containsKey("effective")) { |
| 11417 effective = _json["effective"]; |
| 11418 } |
| 11419 } |
| 11420 |
| 11421 core.Map toJson() { |
| 11422 var _json = new core.Map(); |
| 11423 if (effective != null) { |
| 11424 _json["effective"] = effective; |
| 11425 } |
| 11426 return _json; |
| 11427 } |
| 11428 } |
| 11429 |
| 11430 |
| 11431 /** JSON template for an Analytics web property. */ |
| 11432 class Webproperty { |
| 11433 /** Account ID to which this web property belongs. */ |
| 11434 core.String accountId; |
| 11435 |
| 11436 /** |
| 11437 * Child link for this web property. Points to the list of views (profiles) |
| 11438 * for this web property. |
| 11439 */ |
| 11440 WebpropertyChildLink childLink; |
| 11441 |
| 11442 /** Time this web property was created. */ |
| 11443 core.DateTime created; |
| 11444 |
| 11445 /** Default view (profile) ID. */ |
| 11446 core.String defaultProfileId; |
| 11447 |
| 11448 /** Web property ID of the form UA-XXXXX-YY. */ |
| 11449 core.String id; |
| 11450 |
| 11451 /** The industry vertical/category selected for this web property. */ |
| 11452 core.String industryVertical; |
| 11453 |
| 11454 /** Internal ID for this web property. */ |
| 11455 core.String internalWebPropertyId; |
| 11456 |
| 11457 /** Resource type for Analytics WebProperty. */ |
| 11458 core.String kind; |
| 11459 |
| 11460 /** Level for this web property. Possible values are STANDARD or PREMIUM. */ |
| 11461 core.String level; |
| 11462 |
| 11463 /** Name of this web property. */ |
| 11464 core.String name; |
| 11465 |
| 11466 /** |
| 11467 * Parent link for this web property. Points to the account to which this web |
| 11468 * property belongs. |
| 11469 */ |
| 11470 WebpropertyParentLink parentLink; |
| 11471 |
| 11472 /** Permissions the user has for this web property. */ |
| 11473 WebpropertyPermissions permissions; |
| 11474 |
| 11475 /** View (Profile) count for this web property. */ |
| 11476 core.int profileCount; |
| 11477 |
| 11478 /** Link for this web property. */ |
| 11479 core.String selfLink; |
| 11480 |
| 11481 /** Time this web property was last modified. */ |
| 11482 core.DateTime updated; |
| 11483 |
| 11484 /** Website url for this web property. */ |
| 11485 core.String websiteUrl; |
| 11486 |
| 11487 |
| 11488 Webproperty(); |
| 11489 |
| 11490 Webproperty.fromJson(core.Map _json) { |
| 11491 if (_json.containsKey("accountId")) { |
| 11492 accountId = _json["accountId"]; |
| 11493 } |
| 11494 if (_json.containsKey("childLink")) { |
| 11495 childLink = new WebpropertyChildLink.fromJson(_json["childLink"]); |
| 11496 } |
| 11497 if (_json.containsKey("created")) { |
| 11498 created = core.DateTime.parse(_json["created"]); |
| 11499 } |
| 11500 if (_json.containsKey("defaultProfileId")) { |
| 11501 defaultProfileId = _json["defaultProfileId"]; |
| 11502 } |
| 11503 if (_json.containsKey("id")) { |
| 11504 id = _json["id"]; |
| 11505 } |
| 11506 if (_json.containsKey("industryVertical")) { |
| 11507 industryVertical = _json["industryVertical"]; |
| 11508 } |
| 11509 if (_json.containsKey("internalWebPropertyId")) { |
| 11510 internalWebPropertyId = _json["internalWebPropertyId"]; |
| 11511 } |
| 11512 if (_json.containsKey("kind")) { |
| 11513 kind = _json["kind"]; |
| 11514 } |
| 11515 if (_json.containsKey("level")) { |
| 11516 level = _json["level"]; |
| 11517 } |
| 11518 if (_json.containsKey("name")) { |
| 11519 name = _json["name"]; |
| 11520 } |
| 11521 if (_json.containsKey("parentLink")) { |
| 11522 parentLink = new WebpropertyParentLink.fromJson(_json["parentLink"]); |
| 11523 } |
| 11524 if (_json.containsKey("permissions")) { |
| 11525 permissions = new WebpropertyPermissions.fromJson(_json["permissions"]); |
| 11526 } |
| 11527 if (_json.containsKey("profileCount")) { |
| 11528 profileCount = _json["profileCount"]; |
| 11529 } |
| 11530 if (_json.containsKey("selfLink")) { |
| 11531 selfLink = _json["selfLink"]; |
| 11532 } |
| 11533 if (_json.containsKey("updated")) { |
| 11534 updated = core.DateTime.parse(_json["updated"]); |
| 11535 } |
| 11536 if (_json.containsKey("websiteUrl")) { |
| 11537 websiteUrl = _json["websiteUrl"]; |
| 11538 } |
| 11539 } |
| 11540 |
| 11541 core.Map toJson() { |
| 11542 var _json = new core.Map(); |
| 11543 if (accountId != null) { |
| 11544 _json["accountId"] = accountId; |
| 11545 } |
| 11546 if (childLink != null) { |
| 11547 _json["childLink"] = (childLink).toJson(); |
| 11548 } |
| 11549 if (created != null) { |
| 11550 _json["created"] = (created).toIso8601String(); |
| 11551 } |
| 11552 if (defaultProfileId != null) { |
| 11553 _json["defaultProfileId"] = defaultProfileId; |
| 11554 } |
| 11555 if (id != null) { |
| 11556 _json["id"] = id; |
| 11557 } |
| 11558 if (industryVertical != null) { |
| 11559 _json["industryVertical"] = industryVertical; |
| 11560 } |
| 11561 if (internalWebPropertyId != null) { |
| 11562 _json["internalWebPropertyId"] = internalWebPropertyId; |
| 11563 } |
| 11564 if (kind != null) { |
| 11565 _json["kind"] = kind; |
| 11566 } |
| 11567 if (level != null) { |
| 11568 _json["level"] = level; |
| 11569 } |
| 11570 if (name != null) { |
| 11571 _json["name"] = name; |
| 11572 } |
| 11573 if (parentLink != null) { |
| 11574 _json["parentLink"] = (parentLink).toJson(); |
| 11575 } |
| 11576 if (permissions != null) { |
| 11577 _json["permissions"] = (permissions).toJson(); |
| 11578 } |
| 11579 if (profileCount != null) { |
| 11580 _json["profileCount"] = profileCount; |
| 11581 } |
| 11582 if (selfLink != null) { |
| 11583 _json["selfLink"] = selfLink; |
| 11584 } |
| 11585 if (updated != null) { |
| 11586 _json["updated"] = (updated).toIso8601String(); |
| 11587 } |
| 11588 if (websiteUrl != null) { |
| 11589 _json["websiteUrl"] = websiteUrl; |
| 11590 } |
| 11591 return _json; |
| 11592 } |
| 11593 } |
| 11594 |
| 11595 |
OLD | NEW |