| OLD | NEW |
| 1 // This is a generated file (see the discoveryapis_generator project). | 1 // This is a generated file (see the discoveryapis_generator project). |
| 2 | 2 |
| 3 library googleapis.tagmanager.v1; | 3 library googleapis.tagmanager.v1; |
| 4 | 4 |
| 5 import 'dart:core' as core; | 5 import 'dart:core' as core; |
| 6 import 'dart:async' as async; | 6 import 'dart:async' as async; |
| 7 import 'dart:convert' as convert; | 7 import 'dart:convert' as convert; |
| 8 | 8 |
| 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; | 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
| 10 import 'package:http/http.dart' as http; | 10 import 'package:http/http.dart' as http; |
| 11 | 11 |
| 12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show | 12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show |
| 13 ApiRequestError, DetailedApiRequestError; | 13 ApiRequestError, DetailedApiRequestError; |
| 14 | 14 |
| 15 const core.String USER_AGENT = 'dart-api-client tagmanager/v1'; | 15 const core.String USER_AGENT = 'dart-api-client tagmanager/v1'; |
| 16 | 16 |
| 17 /** API for accessing Tag Manager accounts and containers. */ | 17 /** Accesses Tag Manager accounts and containers. */ |
| 18 class TagmanagerApi { | 18 class TagmanagerApi { |
| 19 /** Delete your Google Tag Manager containers */ | 19 /** Delete your Google Tag Manager containers */ |
| 20 static const TagmanagerDeleteContainersScope = "https://www.googleapis.com/aut
h/tagmanager.delete.containers"; | 20 static const TagmanagerDeleteContainersScope = "https://www.googleapis.com/aut
h/tagmanager.delete.containers"; |
| 21 | 21 |
| 22 /** Manage your Google Tag Manager containers */ | 22 /** Manage your Google Tag Manager containers */ |
| 23 static const TagmanagerEditContainersScope = "https://www.googleapis.com/auth/
tagmanager.edit.containers"; | 23 static const TagmanagerEditContainersScope = "https://www.googleapis.com/auth/
tagmanager.edit.containers"; |
| 24 | 24 |
| 25 /** Manage your Google Tag Manager container versions */ | 25 /** Manage your Google Tag Manager container versions */ |
| 26 static const TagmanagerEditContainerversionsScope = "https://www.googleapis.co
m/auth/tagmanager.edit.containerversions"; | 26 static const TagmanagerEditContainerversionsScope = "https://www.googleapis.co
m/auth/tagmanager.edit.containerversions"; |
| 27 | 27 |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 downloadOptions: _downloadOptions); | 178 downloadOptions: _downloadOptions); |
| 179 return _response.then((data) => new Account.fromJson(data)); | 179 return _response.then((data) => new Account.fromJson(data)); |
| 180 } | 180 } |
| 181 | 181 |
| 182 } | 182 } |
| 183 | 183 |
| 184 | 184 |
| 185 class AccountsContainersResourceApi { | 185 class AccountsContainersResourceApi { |
| 186 final commons.ApiRequester _requester; | 186 final commons.ApiRequester _requester; |
| 187 | 187 |
| 188 AccountsContainersEnvironmentsResourceApi get environments => new AccountsCont
ainersEnvironmentsResourceApi(_requester); |
| 188 AccountsContainersFoldersResourceApi get folders => new AccountsContainersFold
ersResourceApi(_requester); | 189 AccountsContainersFoldersResourceApi get folders => new AccountsContainersFold
ersResourceApi(_requester); |
| 189 AccountsContainersMoveFoldersResourceApi get moveFolders => new AccountsContai
nersMoveFoldersResourceApi(_requester); | 190 AccountsContainersMoveFoldersResourceApi get moveFolders => new AccountsContai
nersMoveFoldersResourceApi(_requester); |
| 191 AccountsContainersReauthorizeEnvironmentsResourceApi get reauthorizeEnvironmen
ts => new AccountsContainersReauthorizeEnvironmentsResourceApi(_requester); |
| 190 AccountsContainersTagsResourceApi get tags => new AccountsContainersTagsResour
ceApi(_requester); | 192 AccountsContainersTagsResourceApi get tags => new AccountsContainersTagsResour
ceApi(_requester); |
| 191 AccountsContainersTriggersResourceApi get triggers => new AccountsContainersTr
iggersResourceApi(_requester); | 193 AccountsContainersTriggersResourceApi get triggers => new AccountsContainersTr
iggersResourceApi(_requester); |
| 192 AccountsContainersVariablesResourceApi get variables => new AccountsContainers
VariablesResourceApi(_requester); | 194 AccountsContainersVariablesResourceApi get variables => new AccountsContainers
VariablesResourceApi(_requester); |
| 193 AccountsContainersVersionsResourceApi get versions => new AccountsContainersVe
rsionsResourceApi(_requester); | 195 AccountsContainersVersionsResourceApi get versions => new AccountsContainersVe
rsionsResourceApi(_requester); |
| 194 | 196 |
| 195 AccountsContainersResourceApi(commons.ApiRequester client) : | 197 AccountsContainersResourceApi(commons.ApiRequester client) : |
| 196 _requester = client; | 198 _requester = client; |
| 197 | 199 |
| 198 /** | 200 /** |
| 199 * Creates a Container. | 201 * Creates a Container. |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 queryParams: _queryParams, | 419 queryParams: _queryParams, |
| 418 uploadOptions: _uploadOptions, | 420 uploadOptions: _uploadOptions, |
| 419 uploadMedia: _uploadMedia, | 421 uploadMedia: _uploadMedia, |
| 420 downloadOptions: _downloadOptions); | 422 downloadOptions: _downloadOptions); |
| 421 return _response.then((data) => new Container.fromJson(data)); | 423 return _response.then((data) => new Container.fromJson(data)); |
| 422 } | 424 } |
| 423 | 425 |
| 424 } | 426 } |
| 425 | 427 |
| 426 | 428 |
| 429 class AccountsContainersEnvironmentsResourceApi { |
| 430 final commons.ApiRequester _requester; |
| 431 |
| 432 AccountsContainersEnvironmentsResourceApi(commons.ApiRequester client) : |
| 433 _requester = client; |
| 434 |
| 435 /** |
| 436 * Creates a GTM Environment. |
| 437 * |
| 438 * [request] - The metadata request object. |
| 439 * |
| 440 * Request parameters: |
| 441 * |
| 442 * [accountId] - The GTM Account ID. |
| 443 * |
| 444 * [containerId] - The GTM Container ID. |
| 445 * |
| 446 * Completes with a [Environment]. |
| 447 * |
| 448 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 449 * error. |
| 450 * |
| 451 * If the used [http.Client] completes with an error when making a REST call, |
| 452 * this method will complete with the same error. |
| 453 */ |
| 454 async.Future<Environment> create(Environment request, core.String accountId, c
ore.String containerId) { |
| 455 var _url = null; |
| 456 var _queryParams = new core.Map(); |
| 457 var _uploadMedia = null; |
| 458 var _uploadOptions = null; |
| 459 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 460 var _body = null; |
| 461 |
| 462 if (request != null) { |
| 463 _body = convert.JSON.encode((request).toJson()); |
| 464 } |
| 465 if (accountId == null) { |
| 466 throw new core.ArgumentError("Parameter accountId is required."); |
| 467 } |
| 468 if (containerId == null) { |
| 469 throw new core.ArgumentError("Parameter containerId is required."); |
| 470 } |
| 471 |
| 472 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/environments'; |
| 473 |
| 474 var _response = _requester.request(_url, |
| 475 "POST", |
| 476 body: _body, |
| 477 queryParams: _queryParams, |
| 478 uploadOptions: _uploadOptions, |
| 479 uploadMedia: _uploadMedia, |
| 480 downloadOptions: _downloadOptions); |
| 481 return _response.then((data) => new Environment.fromJson(data)); |
| 482 } |
| 483 |
| 484 /** |
| 485 * Deletes a GTM Environment. |
| 486 * |
| 487 * Request parameters: |
| 488 * |
| 489 * [accountId] - The GTM Account ID. |
| 490 * |
| 491 * [containerId] - The GTM Container ID. |
| 492 * |
| 493 * [environmentId] - The GTM Environment ID. |
| 494 * |
| 495 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 496 * error. |
| 497 * |
| 498 * If the used [http.Client] completes with an error when making a REST call, |
| 499 * this method will complete with the same error. |
| 500 */ |
| 501 async.Future delete(core.String accountId, core.String containerId, core.Strin
g environmentId) { |
| 502 var _url = null; |
| 503 var _queryParams = new core.Map(); |
| 504 var _uploadMedia = null; |
| 505 var _uploadOptions = null; |
| 506 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 507 var _body = null; |
| 508 |
| 509 if (accountId == null) { |
| 510 throw new core.ArgumentError("Parameter accountId is required."); |
| 511 } |
| 512 if (containerId == null) { |
| 513 throw new core.ArgumentError("Parameter containerId is required."); |
| 514 } |
| 515 if (environmentId == null) { |
| 516 throw new core.ArgumentError("Parameter environmentId is required."); |
| 517 } |
| 518 |
| 519 _downloadOptions = null; |
| 520 |
| 521 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/environments/' + commo
ns.Escaper.ecapeVariable('$environmentId'); |
| 522 |
| 523 var _response = _requester.request(_url, |
| 524 "DELETE", |
| 525 body: _body, |
| 526 queryParams: _queryParams, |
| 527 uploadOptions: _uploadOptions, |
| 528 uploadMedia: _uploadMedia, |
| 529 downloadOptions: _downloadOptions); |
| 530 return _response.then((data) => null); |
| 531 } |
| 532 |
| 533 /** |
| 534 * Gets a GTM Environment. |
| 535 * |
| 536 * Request parameters: |
| 537 * |
| 538 * [accountId] - The GTM Account ID. |
| 539 * |
| 540 * [containerId] - The GTM Container ID. |
| 541 * |
| 542 * [environmentId] - The GTM Environment ID. |
| 543 * |
| 544 * Completes with a [Environment]. |
| 545 * |
| 546 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 547 * error. |
| 548 * |
| 549 * If the used [http.Client] completes with an error when making a REST call, |
| 550 * this method will complete with the same error. |
| 551 */ |
| 552 async.Future<Environment> get(core.String accountId, core.String containerId,
core.String environmentId) { |
| 553 var _url = null; |
| 554 var _queryParams = new core.Map(); |
| 555 var _uploadMedia = null; |
| 556 var _uploadOptions = null; |
| 557 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 558 var _body = null; |
| 559 |
| 560 if (accountId == null) { |
| 561 throw new core.ArgumentError("Parameter accountId is required."); |
| 562 } |
| 563 if (containerId == null) { |
| 564 throw new core.ArgumentError("Parameter containerId is required."); |
| 565 } |
| 566 if (environmentId == null) { |
| 567 throw new core.ArgumentError("Parameter environmentId is required."); |
| 568 } |
| 569 |
| 570 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/environments/' + commo
ns.Escaper.ecapeVariable('$environmentId'); |
| 571 |
| 572 var _response = _requester.request(_url, |
| 573 "GET", |
| 574 body: _body, |
| 575 queryParams: _queryParams, |
| 576 uploadOptions: _uploadOptions, |
| 577 uploadMedia: _uploadMedia, |
| 578 downloadOptions: _downloadOptions); |
| 579 return _response.then((data) => new Environment.fromJson(data)); |
| 580 } |
| 581 |
| 582 /** |
| 583 * Lists all GTM Environments of a GTM Container. |
| 584 * |
| 585 * Request parameters: |
| 586 * |
| 587 * [accountId] - The GTM Account ID. |
| 588 * |
| 589 * [containerId] - The GTM Container ID. |
| 590 * |
| 591 * Completes with a [ListEnvironmentsResponse]. |
| 592 * |
| 593 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 594 * error. |
| 595 * |
| 596 * If the used [http.Client] completes with an error when making a REST call, |
| 597 * this method will complete with the same error. |
| 598 */ |
| 599 async.Future<ListEnvironmentsResponse> list(core.String accountId, core.String
containerId) { |
| 600 var _url = null; |
| 601 var _queryParams = new core.Map(); |
| 602 var _uploadMedia = null; |
| 603 var _uploadOptions = null; |
| 604 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 605 var _body = null; |
| 606 |
| 607 if (accountId == null) { |
| 608 throw new core.ArgumentError("Parameter accountId is required."); |
| 609 } |
| 610 if (containerId == null) { |
| 611 throw new core.ArgumentError("Parameter containerId is required."); |
| 612 } |
| 613 |
| 614 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/environments'; |
| 615 |
| 616 var _response = _requester.request(_url, |
| 617 "GET", |
| 618 body: _body, |
| 619 queryParams: _queryParams, |
| 620 uploadOptions: _uploadOptions, |
| 621 uploadMedia: _uploadMedia, |
| 622 downloadOptions: _downloadOptions); |
| 623 return _response.then((data) => new ListEnvironmentsResponse.fromJson(data))
; |
| 624 } |
| 625 |
| 626 /** |
| 627 * Updates a GTM Environment. This method supports patch semantics. |
| 628 * |
| 629 * [request] - The metadata request object. |
| 630 * |
| 631 * Request parameters: |
| 632 * |
| 633 * [accountId] - The GTM Account ID. |
| 634 * |
| 635 * [containerId] - The GTM Container ID. |
| 636 * |
| 637 * [environmentId] - The GTM Environment ID. |
| 638 * |
| 639 * [fingerprint] - When provided, this fingerprint must match the fingerprint |
| 640 * of the environment in storage. |
| 641 * |
| 642 * Completes with a [Environment]. |
| 643 * |
| 644 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 645 * error. |
| 646 * |
| 647 * If the used [http.Client] completes with an error when making a REST call, |
| 648 * this method will complete with the same error. |
| 649 */ |
| 650 async.Future<Environment> patch(Environment request, core.String accountId, co
re.String containerId, core.String environmentId, {core.String fingerprint}) { |
| 651 var _url = null; |
| 652 var _queryParams = new core.Map(); |
| 653 var _uploadMedia = null; |
| 654 var _uploadOptions = null; |
| 655 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 656 var _body = null; |
| 657 |
| 658 if (request != null) { |
| 659 _body = convert.JSON.encode((request).toJson()); |
| 660 } |
| 661 if (accountId == null) { |
| 662 throw new core.ArgumentError("Parameter accountId is required."); |
| 663 } |
| 664 if (containerId == null) { |
| 665 throw new core.ArgumentError("Parameter containerId is required."); |
| 666 } |
| 667 if (environmentId == null) { |
| 668 throw new core.ArgumentError("Parameter environmentId is required."); |
| 669 } |
| 670 if (fingerprint != null) { |
| 671 _queryParams["fingerprint"] = [fingerprint]; |
| 672 } |
| 673 |
| 674 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/environments/' + commo
ns.Escaper.ecapeVariable('$environmentId'); |
| 675 |
| 676 var _response = _requester.request(_url, |
| 677 "PATCH", |
| 678 body: _body, |
| 679 queryParams: _queryParams, |
| 680 uploadOptions: _uploadOptions, |
| 681 uploadMedia: _uploadMedia, |
| 682 downloadOptions: _downloadOptions); |
| 683 return _response.then((data) => new Environment.fromJson(data)); |
| 684 } |
| 685 |
| 686 /** |
| 687 * Updates a GTM Environment. |
| 688 * |
| 689 * [request] - The metadata request object. |
| 690 * |
| 691 * Request parameters: |
| 692 * |
| 693 * [accountId] - The GTM Account ID. |
| 694 * |
| 695 * [containerId] - The GTM Container ID. |
| 696 * |
| 697 * [environmentId] - The GTM Environment ID. |
| 698 * |
| 699 * [fingerprint] - When provided, this fingerprint must match the fingerprint |
| 700 * of the environment in storage. |
| 701 * |
| 702 * Completes with a [Environment]. |
| 703 * |
| 704 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 705 * error. |
| 706 * |
| 707 * If the used [http.Client] completes with an error when making a REST call, |
| 708 * this method will complete with the same error. |
| 709 */ |
| 710 async.Future<Environment> update(Environment request, core.String accountId, c
ore.String containerId, core.String environmentId, {core.String fingerprint}) { |
| 711 var _url = null; |
| 712 var _queryParams = new core.Map(); |
| 713 var _uploadMedia = null; |
| 714 var _uploadOptions = null; |
| 715 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 716 var _body = null; |
| 717 |
| 718 if (request != null) { |
| 719 _body = convert.JSON.encode((request).toJson()); |
| 720 } |
| 721 if (accountId == null) { |
| 722 throw new core.ArgumentError("Parameter accountId is required."); |
| 723 } |
| 724 if (containerId == null) { |
| 725 throw new core.ArgumentError("Parameter containerId is required."); |
| 726 } |
| 727 if (environmentId == null) { |
| 728 throw new core.ArgumentError("Parameter environmentId is required."); |
| 729 } |
| 730 if (fingerprint != null) { |
| 731 _queryParams["fingerprint"] = [fingerprint]; |
| 732 } |
| 733 |
| 734 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/environments/' + commo
ns.Escaper.ecapeVariable('$environmentId'); |
| 735 |
| 736 var _response = _requester.request(_url, |
| 737 "PUT", |
| 738 body: _body, |
| 739 queryParams: _queryParams, |
| 740 uploadOptions: _uploadOptions, |
| 741 uploadMedia: _uploadMedia, |
| 742 downloadOptions: _downloadOptions); |
| 743 return _response.then((data) => new Environment.fromJson(data)); |
| 744 } |
| 745 |
| 746 } |
| 747 |
| 748 |
| 427 class AccountsContainersFoldersResourceApi { | 749 class AccountsContainersFoldersResourceApi { |
| 428 final commons.ApiRequester _requester; | 750 final commons.ApiRequester _requester; |
| 429 | 751 |
| 430 AccountsContainersFoldersEntitiesResourceApi get entities => new AccountsConta
inersFoldersEntitiesResourceApi(_requester); | 752 AccountsContainersFoldersEntitiesResourceApi get entities => new AccountsConta
inersFoldersEntitiesResourceApi(_requester); |
| 431 | 753 |
| 432 AccountsContainersFoldersResourceApi(commons.ApiRequester client) : | 754 AccountsContainersFoldersResourceApi(commons.ApiRequester client) : |
| 433 _requester = client; | 755 _requester = client; |
| 434 | 756 |
| 435 /** | 757 /** |
| 436 * Creates a GTM Folder. | 758 * Creates a GTM Folder. |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 746 | 1068 |
| 747 class AccountsContainersMoveFoldersResourceApi { | 1069 class AccountsContainersMoveFoldersResourceApi { |
| 748 final commons.ApiRequester _requester; | 1070 final commons.ApiRequester _requester; |
| 749 | 1071 |
| 750 AccountsContainersMoveFoldersResourceApi(commons.ApiRequester client) : | 1072 AccountsContainersMoveFoldersResourceApi(commons.ApiRequester client) : |
| 751 _requester = client; | 1073 _requester = client; |
| 752 | 1074 |
| 753 /** | 1075 /** |
| 754 * Moves entities to a GTM Folder. | 1076 * Moves entities to a GTM Folder. |
| 755 * | 1077 * |
| 1078 * [request] - The metadata request object. |
| 1079 * |
| 756 * Request parameters: | 1080 * Request parameters: |
| 757 * | 1081 * |
| 758 * [accountId] - The GTM Account ID. | 1082 * [accountId] - The GTM Account ID. |
| 759 * | 1083 * |
| 760 * [containerId] - The GTM Container ID. | 1084 * [containerId] - The GTM Container ID. |
| 761 * | 1085 * |
| 762 * [folderId] - The GTM Folder ID. | 1086 * [folderId] - The GTM Folder ID. |
| 763 * | 1087 * |
| 764 * [tagId] - The tags to be moved to the folder. | 1088 * [tagId] - The tags to be moved to the folder. |
| 765 * | 1089 * |
| 766 * [triggerId] - The triggers to be moved to the folder. | 1090 * [triggerId] - The triggers to be moved to the folder. |
| 767 * | 1091 * |
| 768 * [variableId] - The variables to be moved to the folder. | 1092 * [variableId] - The variables to be moved to the folder. |
| 769 * | 1093 * |
| 770 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1094 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 771 * error. | 1095 * error. |
| 772 * | 1096 * |
| 773 * If the used [http.Client] completes with an error when making a REST call, | 1097 * If the used [http.Client] completes with an error when making a REST call, |
| 774 * this method will complete with the same error. | 1098 * this method will complete with the same error. |
| 775 */ | 1099 */ |
| 776 async.Future update(core.String accountId, core.String containerId, core.Strin
g folderId, {core.List<core.String> tagId, core.List<core.String> triggerId, cor
e.List<core.String> variableId}) { | 1100 async.Future update(Folder request, core.String accountId, core.String contain
erId, core.String folderId, {core.List<core.String> tagId, core.List<core.String
> triggerId, core.List<core.String> variableId}) { |
| 777 var _url = null; | 1101 var _url = null; |
| 778 var _queryParams = new core.Map(); | 1102 var _queryParams = new core.Map(); |
| 779 var _uploadMedia = null; | 1103 var _uploadMedia = null; |
| 780 var _uploadOptions = null; | 1104 var _uploadOptions = null; |
| 781 var _downloadOptions = commons.DownloadOptions.Metadata; | 1105 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 782 var _body = null; | 1106 var _body = null; |
| 783 | 1107 |
| 1108 if (request != null) { |
| 1109 _body = convert.JSON.encode((request).toJson()); |
| 1110 } |
| 784 if (accountId == null) { | 1111 if (accountId == null) { |
| 785 throw new core.ArgumentError("Parameter accountId is required."); | 1112 throw new core.ArgumentError("Parameter accountId is required."); |
| 786 } | 1113 } |
| 787 if (containerId == null) { | 1114 if (containerId == null) { |
| 788 throw new core.ArgumentError("Parameter containerId is required."); | 1115 throw new core.ArgumentError("Parameter containerId is required."); |
| 789 } | 1116 } |
| 790 if (folderId == null) { | 1117 if (folderId == null) { |
| 791 throw new core.ArgumentError("Parameter folderId is required."); | 1118 throw new core.ArgumentError("Parameter folderId is required."); |
| 792 } | 1119 } |
| 793 if (tagId != null) { | 1120 if (tagId != null) { |
| (...skipping 16 matching lines...) Expand all Loading... |
| 810 queryParams: _queryParams, | 1137 queryParams: _queryParams, |
| 811 uploadOptions: _uploadOptions, | 1138 uploadOptions: _uploadOptions, |
| 812 uploadMedia: _uploadMedia, | 1139 uploadMedia: _uploadMedia, |
| 813 downloadOptions: _downloadOptions); | 1140 downloadOptions: _downloadOptions); |
| 814 return _response.then((data) => null); | 1141 return _response.then((data) => null); |
| 815 } | 1142 } |
| 816 | 1143 |
| 817 } | 1144 } |
| 818 | 1145 |
| 819 | 1146 |
| 1147 class AccountsContainersReauthorizeEnvironmentsResourceApi { |
| 1148 final commons.ApiRequester _requester; |
| 1149 |
| 1150 AccountsContainersReauthorizeEnvironmentsResourceApi(commons.ApiRequester clie
nt) : |
| 1151 _requester = client; |
| 1152 |
| 1153 /** |
| 1154 * Re-generates the authorization code for a GTM Environment. |
| 1155 * |
| 1156 * [request] - The metadata request object. |
| 1157 * |
| 1158 * Request parameters: |
| 1159 * |
| 1160 * [accountId] - The GTM Account ID. |
| 1161 * |
| 1162 * [containerId] - The GTM Container ID. |
| 1163 * |
| 1164 * [environmentId] - The GTM Environment ID. |
| 1165 * |
| 1166 * Completes with a [Environment]. |
| 1167 * |
| 1168 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 1169 * error. |
| 1170 * |
| 1171 * If the used [http.Client] completes with an error when making a REST call, |
| 1172 * this method will complete with the same error. |
| 1173 */ |
| 1174 async.Future<Environment> update(Environment request, core.String accountId, c
ore.String containerId, core.String environmentId) { |
| 1175 var _url = null; |
| 1176 var _queryParams = new core.Map(); |
| 1177 var _uploadMedia = null; |
| 1178 var _uploadOptions = null; |
| 1179 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1180 var _body = null; |
| 1181 |
| 1182 if (request != null) { |
| 1183 _body = convert.JSON.encode((request).toJson()); |
| 1184 } |
| 1185 if (accountId == null) { |
| 1186 throw new core.ArgumentError("Parameter accountId is required."); |
| 1187 } |
| 1188 if (containerId == null) { |
| 1189 throw new core.ArgumentError("Parameter containerId is required."); |
| 1190 } |
| 1191 if (environmentId == null) { |
| 1192 throw new core.ArgumentError("Parameter environmentId is required."); |
| 1193 } |
| 1194 |
| 1195 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/contain
ers/' + commons.Escaper.ecapeVariable('$containerId') + '/reauthorize_environmen
ts/' + commons.Escaper.ecapeVariable('$environmentId'); |
| 1196 |
| 1197 var _response = _requester.request(_url, |
| 1198 "PUT", |
| 1199 body: _body, |
| 1200 queryParams: _queryParams, |
| 1201 uploadOptions: _uploadOptions, |
| 1202 uploadMedia: _uploadMedia, |
| 1203 downloadOptions: _downloadOptions); |
| 1204 return _response.then((data) => new Environment.fromJson(data)); |
| 1205 } |
| 1206 |
| 1207 } |
| 1208 |
| 1209 |
| 820 class AccountsContainersTagsResourceApi { | 1210 class AccountsContainersTagsResourceApi { |
| 821 final commons.ApiRequester _requester; | 1211 final commons.ApiRequester _requester; |
| 822 | 1212 |
| 823 AccountsContainersTagsResourceApi(commons.ApiRequester client) : | 1213 AccountsContainersTagsResourceApi(commons.ApiRequester client) : |
| 824 _requester = client; | 1214 _requester = client; |
| 825 | 1215 |
| 826 /** | 1216 /** |
| 827 * Creates a GTM Tag. | 1217 * Creates a GTM Tag. |
| 828 * | 1218 * |
| 829 * [request] - The metadata request object. | 1219 * [request] - The metadata request object. |
| (...skipping 1994 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2824 if (compilerError != null) { | 3214 if (compilerError != null) { |
| 2825 _json["compilerError"] = compilerError; | 3215 _json["compilerError"] = compilerError; |
| 2826 } | 3216 } |
| 2827 if (containerVersion != null) { | 3217 if (containerVersion != null) { |
| 2828 _json["containerVersion"] = (containerVersion).toJson(); | 3218 _json["containerVersion"] = (containerVersion).toJson(); |
| 2829 } | 3219 } |
| 2830 return _json; | 3220 return _json; |
| 2831 } | 3221 } |
| 2832 } | 3222 } |
| 2833 | 3223 |
| 3224 /** |
| 3225 * Represents a Google Tag Manager Environment. Note that a user can create, |
| 3226 * delete and update environments of type USER, but can only update the |
| 3227 * enable_debug and url fields of environments of other types. |
| 3228 */ |
| 3229 class Environment { |
| 3230 /** GTM Account ID. */ |
| 3231 core.String accountId; |
| 3232 /** The environment authorization code. */ |
| 3233 core.String authorizationCode; |
| 3234 /** The last update time-stamp for the authorization code. */ |
| 3235 core.String authorizationTimestampMs; |
| 3236 /** GTM Container ID. */ |
| 3237 core.String containerId; |
| 3238 core.String containerVersionId; |
| 3239 /** |
| 3240 * The environment description. Can be set or changed only on USER type |
| 3241 * environments. |
| 3242 */ |
| 3243 core.String description; |
| 3244 /** Whether or not to enable debug by default on for the environment. */ |
| 3245 core.bool enableDebug; |
| 3246 /** GTM Environment ID uniquely identifies the GTM Environment. */ |
| 3247 core.String environmentId; |
| 3248 /** |
| 3249 * The fingerprint of the GTM environment as computed at storage time. This |
| 3250 * value is recomputed whenever the environment is modified. |
| 3251 */ |
| 3252 core.String fingerprint; |
| 3253 /** |
| 3254 * The environment display name. Can be set or changed only on USER type |
| 3255 * environments. |
| 3256 */ |
| 3257 core.String name; |
| 3258 /** |
| 3259 * The type of this environment. |
| 3260 * Possible string values are: |
| 3261 * - "draft" |
| 3262 * - "latest" |
| 3263 * - "live" |
| 3264 * - "user" |
| 3265 */ |
| 3266 core.String type; |
| 3267 /** Default preview page url for the environment. */ |
| 3268 core.String url; |
| 3269 |
| 3270 Environment(); |
| 3271 |
| 3272 Environment.fromJson(core.Map _json) { |
| 3273 if (_json.containsKey("accountId")) { |
| 3274 accountId = _json["accountId"]; |
| 3275 } |
| 3276 if (_json.containsKey("authorizationCode")) { |
| 3277 authorizationCode = _json["authorizationCode"]; |
| 3278 } |
| 3279 if (_json.containsKey("authorizationTimestampMs")) { |
| 3280 authorizationTimestampMs = _json["authorizationTimestampMs"]; |
| 3281 } |
| 3282 if (_json.containsKey("containerId")) { |
| 3283 containerId = _json["containerId"]; |
| 3284 } |
| 3285 if (_json.containsKey("containerVersionId")) { |
| 3286 containerVersionId = _json["containerVersionId"]; |
| 3287 } |
| 3288 if (_json.containsKey("description")) { |
| 3289 description = _json["description"]; |
| 3290 } |
| 3291 if (_json.containsKey("enableDebug")) { |
| 3292 enableDebug = _json["enableDebug"]; |
| 3293 } |
| 3294 if (_json.containsKey("environmentId")) { |
| 3295 environmentId = _json["environmentId"]; |
| 3296 } |
| 3297 if (_json.containsKey("fingerprint")) { |
| 3298 fingerprint = _json["fingerprint"]; |
| 3299 } |
| 3300 if (_json.containsKey("name")) { |
| 3301 name = _json["name"]; |
| 3302 } |
| 3303 if (_json.containsKey("type")) { |
| 3304 type = _json["type"]; |
| 3305 } |
| 3306 if (_json.containsKey("url")) { |
| 3307 url = _json["url"]; |
| 3308 } |
| 3309 } |
| 3310 |
| 3311 core.Map toJson() { |
| 3312 var _json = new core.Map(); |
| 3313 if (accountId != null) { |
| 3314 _json["accountId"] = accountId; |
| 3315 } |
| 3316 if (authorizationCode != null) { |
| 3317 _json["authorizationCode"] = authorizationCode; |
| 3318 } |
| 3319 if (authorizationTimestampMs != null) { |
| 3320 _json["authorizationTimestampMs"] = authorizationTimestampMs; |
| 3321 } |
| 3322 if (containerId != null) { |
| 3323 _json["containerId"] = containerId; |
| 3324 } |
| 3325 if (containerVersionId != null) { |
| 3326 _json["containerVersionId"] = containerVersionId; |
| 3327 } |
| 3328 if (description != null) { |
| 3329 _json["description"] = description; |
| 3330 } |
| 3331 if (enableDebug != null) { |
| 3332 _json["enableDebug"] = enableDebug; |
| 3333 } |
| 3334 if (environmentId != null) { |
| 3335 _json["environmentId"] = environmentId; |
| 3336 } |
| 3337 if (fingerprint != null) { |
| 3338 _json["fingerprint"] = fingerprint; |
| 3339 } |
| 3340 if (name != null) { |
| 3341 _json["name"] = name; |
| 3342 } |
| 3343 if (type != null) { |
| 3344 _json["type"] = type; |
| 3345 } |
| 3346 if (url != null) { |
| 3347 _json["url"] = url; |
| 3348 } |
| 3349 return _json; |
| 3350 } |
| 3351 } |
| 3352 |
| 2834 /** Represents a Google Tag Manager Folder. */ | 3353 /** Represents a Google Tag Manager Folder. */ |
| 2835 class Folder { | 3354 class Folder { |
| 2836 /** GTM Account ID. */ | 3355 /** GTM Account ID. */ |
| 2837 core.String accountId; | 3356 core.String accountId; |
| 2838 /** GTM Container ID. */ | 3357 /** GTM Container ID. */ |
| 2839 core.String containerId; | 3358 core.String containerId; |
| 2840 /** | 3359 /** |
| 2841 * The fingerprint of the GTM Folder as computed at storage time. This value | 3360 * The fingerprint of the GTM Folder as computed at storage time. This value |
| 2842 * is recomputed whenever the folder is modified. | 3361 * is recomputed whenever the folder is modified. |
| 2843 */ | 3362 */ |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3015 | 3534 |
| 3016 core.Map toJson() { | 3535 core.Map toJson() { |
| 3017 var _json = new core.Map(); | 3536 var _json = new core.Map(); |
| 3018 if (containers != null) { | 3537 if (containers != null) { |
| 3019 _json["containers"] = containers.map((value) => (value).toJson()).toList()
; | 3538 _json["containers"] = containers.map((value) => (value).toJson()).toList()
; |
| 3020 } | 3539 } |
| 3021 return _json; | 3540 return _json; |
| 3022 } | 3541 } |
| 3023 } | 3542 } |
| 3024 | 3543 |
| 3544 /** List Environments Response. */ |
| 3545 class ListEnvironmentsResponse { |
| 3546 /** All Environments of a GTM Container. */ |
| 3547 core.List<Environment> environments; |
| 3548 |
| 3549 ListEnvironmentsResponse(); |
| 3550 |
| 3551 ListEnvironmentsResponse.fromJson(core.Map _json) { |
| 3552 if (_json.containsKey("environments")) { |
| 3553 environments = _json["environments"].map((value) => new Environment.fromJs
on(value)).toList(); |
| 3554 } |
| 3555 } |
| 3556 |
| 3557 core.Map toJson() { |
| 3558 var _json = new core.Map(); |
| 3559 if (environments != null) { |
| 3560 _json["environments"] = environments.map((value) => (value).toJson()).toLi
st(); |
| 3561 } |
| 3562 return _json; |
| 3563 } |
| 3564 } |
| 3565 |
| 3025 /** List Folders Response. */ | 3566 /** List Folders Response. */ |
| 3026 class ListFoldersResponse { | 3567 class ListFoldersResponse { |
| 3027 /** All GTM Folders of a GTM Container. */ | 3568 /** All GTM Folders of a GTM Container. */ |
| 3028 core.List<Folder> folders; | 3569 core.List<Folder> folders; |
| 3029 | 3570 |
| 3030 ListFoldersResponse(); | 3571 ListFoldersResponse(); |
| 3031 | 3572 |
| 3032 ListFoldersResponse.fromJson(core.Map _json) { | 3573 ListFoldersResponse.fromJson(core.Map _json) { |
| 3033 if (_json.containsKey("folders")) { | 3574 if (_json.containsKey("folders")) { |
| 3034 folders = _json["folders"].map((value) => new Folder.fromJson(value)).toLi
st(); | 3575 folders = _json["folders"].map((value) => new Folder.fromJson(value)).toLi
st(); |
| (...skipping 1047 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4082 } | 4623 } |
| 4083 if (type != null) { | 4624 if (type != null) { |
| 4084 _json["type"] = type; | 4625 _json["type"] = type; |
| 4085 } | 4626 } |
| 4086 if (variableId != null) { | 4627 if (variableId != null) { |
| 4087 _json["variableId"] = variableId; | 4628 _json["variableId"] = variableId; |
| 4088 } | 4629 } |
| 4089 return _json; | 4630 return _json; |
| 4090 } | 4631 } |
| 4091 } | 4632 } |
| OLD | NEW |