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_beta.adexchangebuyer2.v2beta1; | 3 library googleapis_beta.adexchangebuyer2.v2beta1; |
4 | 4 |
5 import 'dart:core' as core; | 5 import 'dart:core' as core; |
6 import 'dart:async' as async; | 6 import 'dart:async' as async; |
7 import 'dart:convert' as convert; | 7 import 'dart:convert' as convert; |
8 | 8 |
9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; | 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
10 import 'package:http/http.dart' as http; | 10 import 'package:http/http.dart' as http; |
(...skipping 19 matching lines...) Expand all Loading... |
30 | 30 |
31 Adexchangebuyer2Api(http.Client client, {core.String rootUrl: "https://adexcha
ngebuyer.googleapis.com/", core.String servicePath: ""}) : | 31 Adexchangebuyer2Api(http.Client client, {core.String rootUrl: "https://adexcha
ngebuyer.googleapis.com/", core.String servicePath: ""}) : |
32 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); | 32 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); |
33 } | 33 } |
34 | 34 |
35 | 35 |
36 class AccountsResourceApi { | 36 class AccountsResourceApi { |
37 final commons.ApiRequester _requester; | 37 final commons.ApiRequester _requester; |
38 | 38 |
39 AccountsClientsResourceApi get clients => new AccountsClientsResourceApi(_requ
ester); | 39 AccountsClientsResourceApi get clients => new AccountsClientsResourceApi(_requ
ester); |
| 40 AccountsCreativesResourceApi get creatives => new AccountsCreativesResourceApi
(_requester); |
40 | 41 |
41 AccountsResourceApi(commons.ApiRequester client) : | 42 AccountsResourceApi(commons.ApiRequester client) : |
42 _requester = client; | 43 _requester = client; |
43 } | 44 } |
44 | 45 |
45 | 46 |
46 class AccountsClientsResourceApi { | 47 class AccountsClientsResourceApi { |
47 final commons.ApiRequester _requester; | 48 final commons.ApiRequester _requester; |
48 | 49 |
49 AccountsClientsInvitationsResourceApi get invitations => new AccountsClientsIn
vitationsResourceApi(_requester); | 50 AccountsClientsInvitationsResourceApi get invitations => new AccountsClientsIn
vitationsResourceApi(_requester); |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 } | 146 } |
146 | 147 |
147 /** | 148 /** |
148 * Lists all the clients for the current sponsor buyer. | 149 * Lists all the clients for the current sponsor buyer. |
149 * | 150 * |
150 * Request parameters: | 151 * Request parameters: |
151 * | 152 * |
152 * [accountId] - Unique numerical account ID of the sponsor buyer to list the | 153 * [accountId] - Unique numerical account ID of the sponsor buyer to list the |
153 * clients for. | 154 * clients for. |
154 * | 155 * |
155 * [pageSize] - Requested page size. The server may return fewer clients than | |
156 * requested. | |
157 * If unspecified, the server will pick an appropriate default. | |
158 * | |
159 * [pageToken] - A token identifying a page of results the server should | 156 * [pageToken] - A token identifying a page of results the server should |
160 * return. | 157 * return. |
161 * Typically, this is the value of | 158 * Typically, this is the value of |
162 * ListClientsResponse.nextPageToken | 159 * ListClientsResponse.nextPageToken |
163 * returned from the previous call to the | 160 * returned from the previous call to the |
164 * accounts.clients.list method. | 161 * accounts.clients.list method. |
165 * | 162 * |
| 163 * [pageSize] - Requested page size. The server may return fewer clients than |
| 164 * requested. |
| 165 * If unspecified, the server will pick an appropriate default. |
| 166 * |
166 * Completes with a [ListClientsResponse]. | 167 * Completes with a [ListClientsResponse]. |
167 * | 168 * |
168 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 169 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
169 * error. | 170 * error. |
170 * | 171 * |
171 * If the used [http.Client] completes with an error when making a REST call, | 172 * If the used [http.Client] completes with an error when making a REST call, |
172 * this method will complete with the same error. | 173 * this method will complete with the same error. |
173 */ | 174 */ |
174 async.Future<ListClientsResponse> list(core.String accountId, {core.int pageSi
ze, core.String pageToken}) { | 175 async.Future<ListClientsResponse> list(core.String accountId, {core.String pag
eToken, core.int pageSize}) { |
175 var _url = null; | 176 var _url = null; |
176 var _queryParams = new core.Map(); | 177 var _queryParams = new core.Map(); |
177 var _uploadMedia = null; | 178 var _uploadMedia = null; |
178 var _uploadOptions = null; | 179 var _uploadOptions = null; |
179 var _downloadOptions = commons.DownloadOptions.Metadata; | 180 var _downloadOptions = commons.DownloadOptions.Metadata; |
180 var _body = null; | 181 var _body = null; |
181 | 182 |
182 if (accountId == null) { | 183 if (accountId == null) { |
183 throw new core.ArgumentError("Parameter accountId is required."); | 184 throw new core.ArgumentError("Parameter accountId is required."); |
184 } | 185 } |
| 186 if (pageToken != null) { |
| 187 _queryParams["pageToken"] = [pageToken]; |
| 188 } |
185 if (pageSize != null) { | 189 if (pageSize != null) { |
186 _queryParams["pageSize"] = ["${pageSize}"]; | 190 _queryParams["pageSize"] = ["${pageSize}"]; |
187 } | 191 } |
188 if (pageToken != null) { | |
189 _queryParams["pageToken"] = [pageToken]; | |
190 } | |
191 | 192 |
192 _url = 'v2beta1/accounts/' + commons.Escaper.ecapeVariable('$accountId') + '
/clients'; | 193 _url = 'v2beta1/accounts/' + commons.Escaper.ecapeVariable('$accountId') + '
/clients'; |
193 | 194 |
194 var _response = _requester.request(_url, | 195 var _response = _requester.request(_url, |
195 "GET", | 196 "GET", |
196 body: _body, | 197 body: _body, |
197 queryParams: _queryParams, | 198 queryParams: _queryParams, |
198 uploadOptions: _uploadOptions, | 199 uploadOptions: _uploadOptions, |
199 uploadMedia: _uploadMedia, | 200 uploadMedia: _uploadMedia, |
200 downloadOptions: _downloadOptions); | 201 downloadOptions: _downloadOptions); |
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
620 queryParams: _queryParams, | 621 queryParams: _queryParams, |
621 uploadOptions: _uploadOptions, | 622 uploadOptions: _uploadOptions, |
622 uploadMedia: _uploadMedia, | 623 uploadMedia: _uploadMedia, |
623 downloadOptions: _downloadOptions); | 624 downloadOptions: _downloadOptions); |
624 return _response.then((data) => new ClientUser.fromJson(data)); | 625 return _response.then((data) => new ClientUser.fromJson(data)); |
625 } | 626 } |
626 | 627 |
627 } | 628 } |
628 | 629 |
629 | 630 |
| 631 class AccountsCreativesResourceApi { |
| 632 final commons.ApiRequester _requester; |
| 633 |
| 634 AccountsCreativesDealAssociationsResourceApi get dealAssociations => new Accou
ntsCreativesDealAssociationsResourceApi(_requester); |
| 635 |
| 636 AccountsCreativesResourceApi(commons.ApiRequester client) : |
| 637 _requester = client; |
| 638 |
| 639 /** |
| 640 * Creates a creative. |
| 641 * |
| 642 * [request] - The metadata request object. |
| 643 * |
| 644 * Request parameters: |
| 645 * |
| 646 * [accountId] - The account that this creative belongs to. |
| 647 * Can be used to filter the response of the |
| 648 * creatives.list |
| 649 * method. |
| 650 * |
| 651 * [duplicateIdMode] - Indicates if multiple creatives can share an ID or not. |
| 652 * Default is |
| 653 * NO_DUPLICATES (one ID per creative). |
| 654 * Possible string values are: |
| 655 * - "NO_DUPLICATES" : A NO_DUPLICATES. |
| 656 * - "FORCE_ENABLE_DUPLICATE_IDS" : A FORCE_ENABLE_DUPLICATE_IDS. |
| 657 * |
| 658 * Completes with a [Creative]. |
| 659 * |
| 660 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 661 * error. |
| 662 * |
| 663 * If the used [http.Client] completes with an error when making a REST call, |
| 664 * this method will complete with the same error. |
| 665 */ |
| 666 async.Future<Creative> create(Creative request, core.String accountId, {core.S
tring duplicateIdMode}) { |
| 667 var _url = null; |
| 668 var _queryParams = new core.Map(); |
| 669 var _uploadMedia = null; |
| 670 var _uploadOptions = null; |
| 671 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 672 var _body = null; |
| 673 |
| 674 if (request != null) { |
| 675 _body = convert.JSON.encode((request).toJson()); |
| 676 } |
| 677 if (accountId == null) { |
| 678 throw new core.ArgumentError("Parameter accountId is required."); |
| 679 } |
| 680 if (duplicateIdMode != null) { |
| 681 _queryParams["duplicateIdMode"] = [duplicateIdMode]; |
| 682 } |
| 683 |
| 684 _url = 'v2beta1/accounts/' + commons.Escaper.ecapeVariable('$accountId') + '
/creatives'; |
| 685 |
| 686 var _response = _requester.request(_url, |
| 687 "POST", |
| 688 body: _body, |
| 689 queryParams: _queryParams, |
| 690 uploadOptions: _uploadOptions, |
| 691 uploadMedia: _uploadMedia, |
| 692 downloadOptions: _downloadOptions); |
| 693 return _response.then((data) => new Creative.fromJson(data)); |
| 694 } |
| 695 |
| 696 /** |
| 697 * Gets a creative. |
| 698 * |
| 699 * Request parameters: |
| 700 * |
| 701 * [accountId] - The account the creative belongs to. |
| 702 * |
| 703 * [creativeId] - The ID of the creative to retrieve. |
| 704 * |
| 705 * Completes with a [Creative]. |
| 706 * |
| 707 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 708 * error. |
| 709 * |
| 710 * If the used [http.Client] completes with an error when making a REST call, |
| 711 * this method will complete with the same error. |
| 712 */ |
| 713 async.Future<Creative> get(core.String accountId, core.String creativeId) { |
| 714 var _url = null; |
| 715 var _queryParams = new core.Map(); |
| 716 var _uploadMedia = null; |
| 717 var _uploadOptions = null; |
| 718 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 719 var _body = null; |
| 720 |
| 721 if (accountId == null) { |
| 722 throw new core.ArgumentError("Parameter accountId is required."); |
| 723 } |
| 724 if (creativeId == null) { |
| 725 throw new core.ArgumentError("Parameter creativeId is required."); |
| 726 } |
| 727 |
| 728 _url = 'v2beta1/accounts/' + commons.Escaper.ecapeVariable('$accountId') + '
/creatives/' + commons.Escaper.ecapeVariable('$creativeId'); |
| 729 |
| 730 var _response = _requester.request(_url, |
| 731 "GET", |
| 732 body: _body, |
| 733 queryParams: _queryParams, |
| 734 uploadOptions: _uploadOptions, |
| 735 uploadMedia: _uploadMedia, |
| 736 downloadOptions: _downloadOptions); |
| 737 return _response.then((data) => new Creative.fromJson(data)); |
| 738 } |
| 739 |
| 740 /** |
| 741 * Lists creatives. |
| 742 * |
| 743 * Request parameters: |
| 744 * |
| 745 * [accountId] - The account to list the creatives from. |
| 746 * Specify "-" to list all creatives the current user has access to. |
| 747 * |
| 748 * [pageToken] - A token identifying a page of results the server should |
| 749 * return. |
| 750 * Typically, this is the value of |
| 751 * ListCreativesResponse.next_page_token |
| 752 * returned from the previous call to 'ListCreatives' method. |
| 753 * |
| 754 * [pageSize] - Requested page size. The server may return fewer creatives |
| 755 * than requested |
| 756 * (due to timeout constraint) even if more are available via another call. |
| 757 * If unspecified, server will pick an appropriate default. |
| 758 * Acceptable values are 1 to 1000, inclusive. |
| 759 * |
| 760 * [query] - An optional query string to filter creatives. If no filter is |
| 761 * specified, |
| 762 * all active creatives will be returned. |
| 763 * Supported queries are: |
| 764 * <ul> |
| 765 * <li>accountId=<i>account_id_string</i> |
| 766 * <li>creativeId=<i>creative_id_string</i> |
| 767 * <li>dealsStatus: {approved, conditionally_approved, disapproved, |
| 768 * not_checked} |
| 769 * <li>openAuctionStatus: {approved, conditionally_approved, disapproved, |
| 770 * not_checked} |
| 771 * <li>attribute: {a numeric attribute from the list of attributes} |
| 772 * <li>disapprovalReason: {a reason from DisapprovalReason |
| 773 * </ul> |
| 774 * Example: 'accountId=12345 AND (dealsStatus:disapproved AND |
| 775 * disapprovalReason:unacceptable_content) OR attribute:47' |
| 776 * |
| 777 * Completes with a [ListCreativesResponse]. |
| 778 * |
| 779 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 780 * error. |
| 781 * |
| 782 * If the used [http.Client] completes with an error when making a REST call, |
| 783 * this method will complete with the same error. |
| 784 */ |
| 785 async.Future<ListCreativesResponse> list(core.String accountId, {core.String p
ageToken, core.int pageSize, core.String query}) { |
| 786 var _url = null; |
| 787 var _queryParams = new core.Map(); |
| 788 var _uploadMedia = null; |
| 789 var _uploadOptions = null; |
| 790 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 791 var _body = null; |
| 792 |
| 793 if (accountId == null) { |
| 794 throw new core.ArgumentError("Parameter accountId is required."); |
| 795 } |
| 796 if (pageToken != null) { |
| 797 _queryParams["pageToken"] = [pageToken]; |
| 798 } |
| 799 if (pageSize != null) { |
| 800 _queryParams["pageSize"] = ["${pageSize}"]; |
| 801 } |
| 802 if (query != null) { |
| 803 _queryParams["query"] = [query]; |
| 804 } |
| 805 |
| 806 _url = 'v2beta1/accounts/' + commons.Escaper.ecapeVariable('$accountId') + '
/creatives'; |
| 807 |
| 808 var _response = _requester.request(_url, |
| 809 "GET", |
| 810 body: _body, |
| 811 queryParams: _queryParams, |
| 812 uploadOptions: _uploadOptions, |
| 813 uploadMedia: _uploadMedia, |
| 814 downloadOptions: _downloadOptions); |
| 815 return _response.then((data) => new ListCreativesResponse.fromJson(data)); |
| 816 } |
| 817 |
| 818 /** |
| 819 * Stops watching a creative. Will stop push notifications being sent to the |
| 820 * topics when the creative changes status. |
| 821 * |
| 822 * [request] - The metadata request object. |
| 823 * |
| 824 * Request parameters: |
| 825 * |
| 826 * [accountId] - The account of the creative to stop notifications for. |
| 827 * |
| 828 * [creativeId] - The creative ID of the creative to stop notifications for. |
| 829 * Specify "-" to specify stopping account level notifications. |
| 830 * |
| 831 * Completes with a [Empty]. |
| 832 * |
| 833 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 834 * error. |
| 835 * |
| 836 * If the used [http.Client] completes with an error when making a REST call, |
| 837 * this method will complete with the same error. |
| 838 */ |
| 839 async.Future<Empty> stopWatching(StopWatchingCreativeRequest request, core.Str
ing accountId, core.String creativeId) { |
| 840 var _url = null; |
| 841 var _queryParams = new core.Map(); |
| 842 var _uploadMedia = null; |
| 843 var _uploadOptions = null; |
| 844 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 845 var _body = null; |
| 846 |
| 847 if (request != null) { |
| 848 _body = convert.JSON.encode((request).toJson()); |
| 849 } |
| 850 if (accountId == null) { |
| 851 throw new core.ArgumentError("Parameter accountId is required."); |
| 852 } |
| 853 if (creativeId == null) { |
| 854 throw new core.ArgumentError("Parameter creativeId is required."); |
| 855 } |
| 856 |
| 857 _url = 'v2beta1/accounts/' + commons.Escaper.ecapeVariable('$accountId') + '
/creatives/' + commons.Escaper.ecapeVariable('$creativeId') + ':stopWatching'; |
| 858 |
| 859 var _response = _requester.request(_url, |
| 860 "POST", |
| 861 body: _body, |
| 862 queryParams: _queryParams, |
| 863 uploadOptions: _uploadOptions, |
| 864 uploadMedia: _uploadMedia, |
| 865 downloadOptions: _downloadOptions); |
| 866 return _response.then((data) => new Empty.fromJson(data)); |
| 867 } |
| 868 |
| 869 /** |
| 870 * Updates a creative. |
| 871 * |
| 872 * [request] - The metadata request object. |
| 873 * |
| 874 * Request parameters: |
| 875 * |
| 876 * [accountId] - The account that this creative belongs to. |
| 877 * Can be used to filter the response of the |
| 878 * creatives.list |
| 879 * method. |
| 880 * |
| 881 * [creativeId] - The buyer-defined creative ID of this creative. |
| 882 * Can be used to filter the response of the |
| 883 * creatives.list |
| 884 * method. |
| 885 * |
| 886 * Completes with a [Creative]. |
| 887 * |
| 888 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 889 * error. |
| 890 * |
| 891 * If the used [http.Client] completes with an error when making a REST call, |
| 892 * this method will complete with the same error. |
| 893 */ |
| 894 async.Future<Creative> update(Creative request, core.String accountId, core.St
ring creativeId) { |
| 895 var _url = null; |
| 896 var _queryParams = new core.Map(); |
| 897 var _uploadMedia = null; |
| 898 var _uploadOptions = null; |
| 899 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 900 var _body = null; |
| 901 |
| 902 if (request != null) { |
| 903 _body = convert.JSON.encode((request).toJson()); |
| 904 } |
| 905 if (accountId == null) { |
| 906 throw new core.ArgumentError("Parameter accountId is required."); |
| 907 } |
| 908 if (creativeId == null) { |
| 909 throw new core.ArgumentError("Parameter creativeId is required."); |
| 910 } |
| 911 |
| 912 _url = 'v2beta1/accounts/' + commons.Escaper.ecapeVariable('$accountId') + '
/creatives/' + commons.Escaper.ecapeVariable('$creativeId'); |
| 913 |
| 914 var _response = _requester.request(_url, |
| 915 "PUT", |
| 916 body: _body, |
| 917 queryParams: _queryParams, |
| 918 uploadOptions: _uploadOptions, |
| 919 uploadMedia: _uploadMedia, |
| 920 downloadOptions: _downloadOptions); |
| 921 return _response.then((data) => new Creative.fromJson(data)); |
| 922 } |
| 923 |
| 924 /** |
| 925 * Watches a creative. Will result in push notifications being sent to the |
| 926 * topic when the creative changes status. |
| 927 * |
| 928 * [request] - The metadata request object. |
| 929 * |
| 930 * Request parameters: |
| 931 * |
| 932 * [accountId] - The account of the creative to watch. |
| 933 * |
| 934 * [creativeId] - The creative ID to watch for status changes. |
| 935 * Specify "-" to watch all creatives under the above account. |
| 936 * If both creative-level and account-level notifications are |
| 937 * sent, only a single notification will be sent to the |
| 938 * creative-level notification topic. |
| 939 * |
| 940 * Completes with a [Empty]. |
| 941 * |
| 942 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 943 * error. |
| 944 * |
| 945 * If the used [http.Client] completes with an error when making a REST call, |
| 946 * this method will complete with the same error. |
| 947 */ |
| 948 async.Future<Empty> watch(WatchCreativeRequest request, core.String accountId,
core.String creativeId) { |
| 949 var _url = null; |
| 950 var _queryParams = new core.Map(); |
| 951 var _uploadMedia = null; |
| 952 var _uploadOptions = null; |
| 953 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 954 var _body = null; |
| 955 |
| 956 if (request != null) { |
| 957 _body = convert.JSON.encode((request).toJson()); |
| 958 } |
| 959 if (accountId == null) { |
| 960 throw new core.ArgumentError("Parameter accountId is required."); |
| 961 } |
| 962 if (creativeId == null) { |
| 963 throw new core.ArgumentError("Parameter creativeId is required."); |
| 964 } |
| 965 |
| 966 _url = 'v2beta1/accounts/' + commons.Escaper.ecapeVariable('$accountId') + '
/creatives/' + commons.Escaper.ecapeVariable('$creativeId') + ':watch'; |
| 967 |
| 968 var _response = _requester.request(_url, |
| 969 "POST", |
| 970 body: _body, |
| 971 queryParams: _queryParams, |
| 972 uploadOptions: _uploadOptions, |
| 973 uploadMedia: _uploadMedia, |
| 974 downloadOptions: _downloadOptions); |
| 975 return _response.then((data) => new Empty.fromJson(data)); |
| 976 } |
| 977 |
| 978 } |
| 979 |
| 980 |
| 981 class AccountsCreativesDealAssociationsResourceApi { |
| 982 final commons.ApiRequester _requester; |
| 983 |
| 984 AccountsCreativesDealAssociationsResourceApi(commons.ApiRequester client) : |
| 985 _requester = client; |
| 986 |
| 987 /** |
| 988 * Associate an existing deal with a creative. |
| 989 * |
| 990 * [request] - The metadata request object. |
| 991 * |
| 992 * Request parameters: |
| 993 * |
| 994 * [accountId] - The account the creative belongs to. |
| 995 * |
| 996 * [creativeId] - The ID of the creative associated with the deal. |
| 997 * |
| 998 * Completes with a [Empty]. |
| 999 * |
| 1000 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 1001 * error. |
| 1002 * |
| 1003 * If the used [http.Client] completes with an error when making a REST call, |
| 1004 * this method will complete with the same error. |
| 1005 */ |
| 1006 async.Future<Empty> add(AddDealAssociationRequest request, core.String account
Id, core.String creativeId) { |
| 1007 var _url = null; |
| 1008 var _queryParams = new core.Map(); |
| 1009 var _uploadMedia = null; |
| 1010 var _uploadOptions = null; |
| 1011 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1012 var _body = null; |
| 1013 |
| 1014 if (request != null) { |
| 1015 _body = convert.JSON.encode((request).toJson()); |
| 1016 } |
| 1017 if (accountId == null) { |
| 1018 throw new core.ArgumentError("Parameter accountId is required."); |
| 1019 } |
| 1020 if (creativeId == null) { |
| 1021 throw new core.ArgumentError("Parameter creativeId is required."); |
| 1022 } |
| 1023 |
| 1024 _url = 'v2beta1/accounts/' + commons.Escaper.ecapeVariable('$accountId') + '
/creatives/' + commons.Escaper.ecapeVariable('$creativeId') + '/dealAssociations
:add'; |
| 1025 |
| 1026 var _response = _requester.request(_url, |
| 1027 "POST", |
| 1028 body: _body, |
| 1029 queryParams: _queryParams, |
| 1030 uploadOptions: _uploadOptions, |
| 1031 uploadMedia: _uploadMedia, |
| 1032 downloadOptions: _downloadOptions); |
| 1033 return _response.then((data) => new Empty.fromJson(data)); |
| 1034 } |
| 1035 |
| 1036 /** |
| 1037 * List all creative-deal associations. |
| 1038 * |
| 1039 * Request parameters: |
| 1040 * |
| 1041 * [accountId] - The account to list the associations from. |
| 1042 * Specify "-" to list all creatives the current user has access to. |
| 1043 * |
| 1044 * [creativeId] - The creative ID to list the associations from. |
| 1045 * Specify "-" to list all creatives under the above account. |
| 1046 * |
| 1047 * [pageToken] - A token identifying a page of results the server should |
| 1048 * return. |
| 1049 * Typically, this is the value of |
| 1050 * ListDealAssociationsResponse.next_page_token |
| 1051 * returned from the previous call to 'ListDealAssociations' method. |
| 1052 * |
| 1053 * [pageSize] - Requested page size. Server may return fewer associations than |
| 1054 * requested. |
| 1055 * If unspecified, server will pick an appropriate default. |
| 1056 * |
| 1057 * [query] - An optional query string to filter deal associations. If no |
| 1058 * filter is |
| 1059 * specified, all associations will be returned. |
| 1060 * Supported queries are: |
| 1061 * <ul> |
| 1062 * <li>accountId=<i>account_id_string</i> |
| 1063 * <li>creativeId=<i>creative_id_string</i> |
| 1064 * <li>dealsId=<i>deals_id_string</i> |
| 1065 * <li>dealsStatus:{approved, conditionally_approved, disapproved, |
| 1066 * not_checked} |
| 1067 * <li>openAuctionStatus:{approved, conditionally_approved, disapproved, |
| 1068 * not_checked} |
| 1069 * </ul> |
| 1070 * Example: 'dealsId=12345 AND dealsStatus:disapproved' |
| 1071 * |
| 1072 * Completes with a [ListDealAssociationsResponse]. |
| 1073 * |
| 1074 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 1075 * error. |
| 1076 * |
| 1077 * If the used [http.Client] completes with an error when making a REST call, |
| 1078 * this method will complete with the same error. |
| 1079 */ |
| 1080 async.Future<ListDealAssociationsResponse> list(core.String accountId, core.St
ring creativeId, {core.String pageToken, core.int pageSize, core.String query})
{ |
| 1081 var _url = null; |
| 1082 var _queryParams = new core.Map(); |
| 1083 var _uploadMedia = null; |
| 1084 var _uploadOptions = null; |
| 1085 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1086 var _body = null; |
| 1087 |
| 1088 if (accountId == null) { |
| 1089 throw new core.ArgumentError("Parameter accountId is required."); |
| 1090 } |
| 1091 if (creativeId == null) { |
| 1092 throw new core.ArgumentError("Parameter creativeId is required."); |
| 1093 } |
| 1094 if (pageToken != null) { |
| 1095 _queryParams["pageToken"] = [pageToken]; |
| 1096 } |
| 1097 if (pageSize != null) { |
| 1098 _queryParams["pageSize"] = ["${pageSize}"]; |
| 1099 } |
| 1100 if (query != null) { |
| 1101 _queryParams["query"] = [query]; |
| 1102 } |
| 1103 |
| 1104 _url = 'v2beta1/accounts/' + commons.Escaper.ecapeVariable('$accountId') + '
/creatives/' + commons.Escaper.ecapeVariable('$creativeId') + '/dealAssociations
'; |
| 1105 |
| 1106 var _response = _requester.request(_url, |
| 1107 "GET", |
| 1108 body: _body, |
| 1109 queryParams: _queryParams, |
| 1110 uploadOptions: _uploadOptions, |
| 1111 uploadMedia: _uploadMedia, |
| 1112 downloadOptions: _downloadOptions); |
| 1113 return _response.then((data) => new ListDealAssociationsResponse.fromJson(da
ta)); |
| 1114 } |
| 1115 |
| 1116 /** |
| 1117 * Remove the association between a deal and a creative. |
| 1118 * |
| 1119 * [request] - The metadata request object. |
| 1120 * |
| 1121 * Request parameters: |
| 1122 * |
| 1123 * [accountId] - The account the creative belongs to. |
| 1124 * |
| 1125 * [creativeId] - The ID of the creative associated with the deal. |
| 1126 * |
| 1127 * Completes with a [Empty]. |
| 1128 * |
| 1129 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 1130 * error. |
| 1131 * |
| 1132 * If the used [http.Client] completes with an error when making a REST call, |
| 1133 * this method will complete with the same error. |
| 1134 */ |
| 1135 async.Future<Empty> remove(RemoveDealAssociationRequest request, core.String a
ccountId, core.String creativeId) { |
| 1136 var _url = null; |
| 1137 var _queryParams = new core.Map(); |
| 1138 var _uploadMedia = null; |
| 1139 var _uploadOptions = null; |
| 1140 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1141 var _body = null; |
| 1142 |
| 1143 if (request != null) { |
| 1144 _body = convert.JSON.encode((request).toJson()); |
| 1145 } |
| 1146 if (accountId == null) { |
| 1147 throw new core.ArgumentError("Parameter accountId is required."); |
| 1148 } |
| 1149 if (creativeId == null) { |
| 1150 throw new core.ArgumentError("Parameter creativeId is required."); |
| 1151 } |
| 1152 |
| 1153 _url = 'v2beta1/accounts/' + commons.Escaper.ecapeVariable('$accountId') + '
/creatives/' + commons.Escaper.ecapeVariable('$creativeId') + '/dealAssociations
:remove'; |
| 1154 |
| 1155 var _response = _requester.request(_url, |
| 1156 "POST", |
| 1157 body: _body, |
| 1158 queryParams: _queryParams, |
| 1159 uploadOptions: _uploadOptions, |
| 1160 uploadMedia: _uploadMedia, |
| 1161 downloadOptions: _downloadOptions); |
| 1162 return _response.then((data) => new Empty.fromJson(data)); |
| 1163 } |
| 1164 |
| 1165 } |
| 1166 |
| 1167 |
| 1168 |
| 1169 /** A request for associating a deal and a creative. */ |
| 1170 class AddDealAssociationRequest { |
| 1171 /** The association between a creative and a deal that should be added. */ |
| 1172 CreativeDealAssociation association; |
| 1173 |
| 1174 AddDealAssociationRequest(); |
| 1175 |
| 1176 AddDealAssociationRequest.fromJson(core.Map _json) { |
| 1177 if (_json.containsKey("association")) { |
| 1178 association = new CreativeDealAssociation.fromJson(_json["association"]); |
| 1179 } |
| 1180 } |
| 1181 |
| 1182 core.Map toJson() { |
| 1183 var _json = new core.Map(); |
| 1184 if (association != null) { |
| 1185 _json["association"] = (association).toJson(); |
| 1186 } |
| 1187 return _json; |
| 1188 } |
| 1189 } |
| 1190 |
| 1191 /** @OutputOnly The app type the restriction applies to for mobile device. */ |
| 1192 class AppContext { |
| 1193 /** The app types this restriction applies to. */ |
| 1194 core.List<core.String> appTypes; |
| 1195 |
| 1196 AppContext(); |
| 1197 |
| 1198 AppContext.fromJson(core.Map _json) { |
| 1199 if (_json.containsKey("appTypes")) { |
| 1200 appTypes = _json["appTypes"]; |
| 1201 } |
| 1202 } |
| 1203 |
| 1204 core.Map toJson() { |
| 1205 var _json = new core.Map(); |
| 1206 if (appTypes != null) { |
| 1207 _json["appTypes"] = appTypes; |
| 1208 } |
| 1209 return _json; |
| 1210 } |
| 1211 } |
| 1212 |
| 1213 /** @OutputOnly The auction type the restriction applies to. */ |
| 1214 class AuctionContext { |
| 1215 /** The auction types this restriction applies to. */ |
| 1216 core.List<core.String> auctionTypes; |
| 1217 |
| 1218 AuctionContext(); |
| 1219 |
| 1220 AuctionContext.fromJson(core.Map _json) { |
| 1221 if (_json.containsKey("auctionTypes")) { |
| 1222 auctionTypes = _json["auctionTypes"]; |
| 1223 } |
| 1224 } |
| 1225 |
| 1226 core.Map toJson() { |
| 1227 var _json = new core.Map(); |
| 1228 if (auctionTypes != null) { |
| 1229 _json["auctionTypes"] = auctionTypes; |
| 1230 } |
| 1231 return _json; |
| 1232 } |
| 1233 } |
630 | 1234 |
631 /** | 1235 /** |
632 * A client resource represents a client buyer—an agency, | 1236 * A client resource represents a client buyer—an agency, |
633 * a brand, or an advertiser customer of the sponsor buyer. | 1237 * a brand, or an advertiser customer of the sponsor buyer. |
634 * Users associated with the client buyer have restricted access to | 1238 * Users associated with the client buyer have restricted access to |
635 * the Ad Exchange Marketplace and certain other sections | 1239 * the Ad Exchange Marketplace and certain other sections |
636 * of the Ad Exchange Buyer UI based on the role | 1240 * of the Ad Exchange Buyer UI based on the role |
637 * granted to the client buyer. | 1241 * granted to the client buyer. |
638 * All fields are required unless otherwise specified. | 1242 * All fields are required unless otherwise specified. |
639 */ | 1243 */ |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
902 _json["clientAccountId"] = clientAccountId; | 1506 _json["clientAccountId"] = clientAccountId; |
903 } | 1507 } |
904 if (email != null) { | 1508 if (email != null) { |
905 _json["email"] = email; | 1509 _json["email"] = email; |
906 } | 1510 } |
907 if (invitationId != null) { | 1511 if (invitationId != null) { |
908 _json["invitationId"] = invitationId; | 1512 _json["invitationId"] = invitationId; |
909 } | 1513 } |
910 return _json; | 1514 return _json; |
911 } | 1515 } |
| 1516 } |
| 1517 |
| 1518 /** @OutputOnly Shows any corrections that were applied to this creative. */ |
| 1519 class Correction { |
| 1520 /** The contexts for the correction. */ |
| 1521 core.List<ServingContext> contexts; |
| 1522 /** Additional details about what was corrected. */ |
| 1523 core.List<core.String> details; |
| 1524 /** |
| 1525 * The type of correction that was applied to the creative. |
| 1526 * Possible string values are: |
| 1527 * - "CORRECTION_TYPE_UNSPECIFIED" : The correction type is unknown. Refer to |
| 1528 * the details for more information. |
| 1529 * - "VENDOR_IDS_ADDED" : The ad's declared vendors did not match the vendors |
| 1530 * that were detected. |
| 1531 * The detected vendors were added. |
| 1532 * - "SSL_ATTRIBUTE_REMOVED" : The ad had the SSL attribute declared but was |
| 1533 * not SSL-compliant. |
| 1534 * The SSL attribute was removed. |
| 1535 * - "FLASH_FREE_ATTRIBUTE_REMOVED" : The ad was declared as Flash-free but |
| 1536 * contained Flash, so the Flash-free |
| 1537 * attribute was removed. |
| 1538 * - "FLASH_FREE_ATTRIBUTE_ADDED" : The ad was not declared as Flash-free but |
| 1539 * it did not reference any flash |
| 1540 * content, so the Flash-free attribute was added. |
| 1541 * - "REQUIRED_ATTRIBUTE_ADDED" : The ad did not declare a required creative |
| 1542 * attribute. |
| 1543 * The attribute was added. |
| 1544 * - "REQUIRED_VENDOR_ADDED" : The ad did not declare a required technology |
| 1545 * vendor. |
| 1546 * The technology vendor was added. |
| 1547 * - "SSL_ATTRIBUTE_ADDED" : The ad did not declare the SSL attribute but was |
| 1548 * SSL-compliant, so the |
| 1549 * SSL attribute was added. |
| 1550 * - "IN_BANNER_VIDEO_ATTRIBUTE_ADDED" : Properties consistent with In-banner |
| 1551 * video were found, so an |
| 1552 * In-Banner Video attribute was added. |
| 1553 * - "MRAID_ATTRIBUTE_ADDED" : The ad makes calls to the MRAID API so the |
| 1554 * MRAID attribute was added. |
| 1555 * - "FLASH_ATTRIBUTE_REMOVED" : The ad unnecessarily declared the Flash |
| 1556 * attribute, so the Flash attribute |
| 1557 * was removed. |
| 1558 * - "VIDEO_IN_SNIPPET_ATTRIBUTE_ADDED" : The ad contains video content. |
| 1559 */ |
| 1560 core.String type; |
| 1561 |
| 1562 Correction(); |
| 1563 |
| 1564 Correction.fromJson(core.Map _json) { |
| 1565 if (_json.containsKey("contexts")) { |
| 1566 contexts = _json["contexts"].map((value) => new ServingContext.fromJson(va
lue)).toList(); |
| 1567 } |
| 1568 if (_json.containsKey("details")) { |
| 1569 details = _json["details"]; |
| 1570 } |
| 1571 if (_json.containsKey("type")) { |
| 1572 type = _json["type"]; |
| 1573 } |
| 1574 } |
| 1575 |
| 1576 core.Map toJson() { |
| 1577 var _json = new core.Map(); |
| 1578 if (contexts != null) { |
| 1579 _json["contexts"] = contexts.map((value) => (value).toJson()).toList(); |
| 1580 } |
| 1581 if (details != null) { |
| 1582 _json["details"] = details; |
| 1583 } |
| 1584 if (type != null) { |
| 1585 _json["type"] = type; |
| 1586 } |
| 1587 return _json; |
| 1588 } |
| 1589 } |
| 1590 |
| 1591 /** A creative and its classification data. */ |
| 1592 class Creative { |
| 1593 /** |
| 1594 * The account that this creative belongs to. |
| 1595 * Can be used to filter the response of the |
| 1596 * creatives.list |
| 1597 * method. |
| 1598 */ |
| 1599 core.String accountId; |
| 1600 /** The link to AdChoices destination page. */ |
| 1601 core.String adChoicesDestinationUrl; |
| 1602 /** The name of the company being advertised in the creative. */ |
| 1603 core.String advertiserName; |
| 1604 /** The agency ID for this creative. */ |
| 1605 core.String agencyId; |
| 1606 /** @OutputOnly The last update timestamp of the creative via API. */ |
| 1607 core.String apiUpdateTime; |
| 1608 /** |
| 1609 * All attributes for the ads that may be shown from this creative. |
| 1610 * Can be used to filter the response of the |
| 1611 * creatives.list |
| 1612 * method. |
| 1613 */ |
| 1614 core.List<core.String> attributes; |
| 1615 /** The set of destination URLs for the creative. */ |
| 1616 core.List<core.String> clickThroughUrls; |
| 1617 /** @OutputOnly Shows any corrections that were applied to this creative. */ |
| 1618 core.List<Correction> corrections; |
| 1619 /** |
| 1620 * The buyer-defined creative ID of this creative. |
| 1621 * Can be used to filter the response of the |
| 1622 * creatives.list |
| 1623 * method. |
| 1624 */ |
| 1625 core.String creativeId; |
| 1626 /** |
| 1627 * @OutputOnly The top-level deals status of this creative. |
| 1628 * If disapproved, an entry for 'auctionType=DIRECT_DEALS' (or 'ALL') in |
| 1629 * serving_restrictions will also exist. Note |
| 1630 * that this may be nuanced with other contextual restrictions, in which case, |
| 1631 * it may be preferable to read from serving_restrictions directly. |
| 1632 * Can be used to filter the response of the |
| 1633 * creatives.list |
| 1634 * method. |
| 1635 * Possible string values are: |
| 1636 * - "STATUS_UNSPECIFIED" : The status is unknown. |
| 1637 * - "NOT_CHECKED" : The creative has not been checked. |
| 1638 * - "CONDITIONALLY_APPROVED" : The creative has been conditionally approved. |
| 1639 * See serving_restrictions for details. |
| 1640 * - "APPROVED" : The creative has been approved. |
| 1641 * - "DISAPPROVED" : The creative has been disapproved. |
| 1642 */ |
| 1643 core.String dealsStatus; |
| 1644 /** @OutputOnly Detected advertiser IDs, if any. */ |
| 1645 core.List<core.String> detectedAdvertiserIds; |
| 1646 /** |
| 1647 * @OutputOnly |
| 1648 * The detected domains for this creative. |
| 1649 */ |
| 1650 core.List<core.String> detectedDomains; |
| 1651 /** |
| 1652 * @OutputOnly |
| 1653 * The detected languages for this creative. The order is arbitrary. The codes |
| 1654 * are 2 or 5 characters and are documented at |
| 1655 * https://developers.google.com/adwords/api/docs/appendix/languagecodes. |
| 1656 */ |
| 1657 core.List<core.String> detectedLanguages; |
| 1658 /** |
| 1659 * @OutputOnly Detected product categories, if any. |
| 1660 * See the ad-product-categories.txt file in the technical documentation |
| 1661 * for a list of IDs. |
| 1662 */ |
| 1663 core.List<core.int> detectedProductCategories; |
| 1664 /** |
| 1665 * @OutputOnly Detected sensitive categories, if any. |
| 1666 * See the ad-sensitive-categories.txt file in the technical documentation for |
| 1667 * a list of IDs. You should use these IDs along with the |
| 1668 * excluded-sensitive-category field in the bid request to filter your bids. |
| 1669 */ |
| 1670 core.List<core.int> detectedSensitiveCategories; |
| 1671 /** @OutputOnly The filtering stats for this creative. */ |
| 1672 FilteringStats filteringStats; |
| 1673 /** An HTML creative. */ |
| 1674 HtmlContent html; |
| 1675 /** The set of URLs to be called to record an impression. */ |
| 1676 core.List<core.String> impressionTrackingUrls; |
| 1677 /** A native creative. */ |
| 1678 NativeContent native; |
| 1679 /** |
| 1680 * @OutputOnly The top-level open auction status of this creative. |
| 1681 * If disapproved, an entry for 'auctionType = OPEN_AUCTION' (or 'ALL') in |
| 1682 * serving_restrictions will also exist. Note |
| 1683 * that this may be nuanced with other contextual restrictions, in which case, |
| 1684 * it may be preferable to read from serving_restrictions directly. |
| 1685 * Can be used to filter the response of the |
| 1686 * creatives.list |
| 1687 * method. |
| 1688 * Possible string values are: |
| 1689 * - "STATUS_UNSPECIFIED" : The status is unknown. |
| 1690 * - "NOT_CHECKED" : The creative has not been checked. |
| 1691 * - "CONDITIONALLY_APPROVED" : The creative has been conditionally approved. |
| 1692 * See serving_restrictions for details. |
| 1693 * - "APPROVED" : The creative has been approved. |
| 1694 * - "DISAPPROVED" : The creative has been disapproved. |
| 1695 */ |
| 1696 core.String openAuctionStatus; |
| 1697 /** |
| 1698 * All restricted categories for the ads that may be shown from this creative. |
| 1699 */ |
| 1700 core.List<core.String> restrictedCategories; |
| 1701 /** |
| 1702 * @OutputOnly The granular status of this ad in specific contexts. |
| 1703 * A context here relates to where something ultimately serves (for example, |
| 1704 * a physical location, a platform, an HTTPS vs HTTP request, or the type |
| 1705 * of auction). |
| 1706 */ |
| 1707 core.List<ServingRestriction> servingRestrictions; |
| 1708 /** |
| 1709 * All vendor IDs for the ads that may be shown from this creative. |
| 1710 * See https://storage.googleapis.com/adx-rtb-dictionaries/vendors.txt |
| 1711 * for possible values. |
| 1712 */ |
| 1713 core.List<core.int> vendorIds; |
| 1714 /** @OutputOnly The version of this creative. */ |
| 1715 core.int version; |
| 1716 /** A video creative. */ |
| 1717 VideoContent video; |
| 1718 |
| 1719 Creative(); |
| 1720 |
| 1721 Creative.fromJson(core.Map _json) { |
| 1722 if (_json.containsKey("accountId")) { |
| 1723 accountId = _json["accountId"]; |
| 1724 } |
| 1725 if (_json.containsKey("adChoicesDestinationUrl")) { |
| 1726 adChoicesDestinationUrl = _json["adChoicesDestinationUrl"]; |
| 1727 } |
| 1728 if (_json.containsKey("advertiserName")) { |
| 1729 advertiserName = _json["advertiserName"]; |
| 1730 } |
| 1731 if (_json.containsKey("agencyId")) { |
| 1732 agencyId = _json["agencyId"]; |
| 1733 } |
| 1734 if (_json.containsKey("apiUpdateTime")) { |
| 1735 apiUpdateTime = _json["apiUpdateTime"]; |
| 1736 } |
| 1737 if (_json.containsKey("attributes")) { |
| 1738 attributes = _json["attributes"]; |
| 1739 } |
| 1740 if (_json.containsKey("clickThroughUrls")) { |
| 1741 clickThroughUrls = _json["clickThroughUrls"]; |
| 1742 } |
| 1743 if (_json.containsKey("corrections")) { |
| 1744 corrections = _json["corrections"].map((value) => new Correction.fromJson(
value)).toList(); |
| 1745 } |
| 1746 if (_json.containsKey("creativeId")) { |
| 1747 creativeId = _json["creativeId"]; |
| 1748 } |
| 1749 if (_json.containsKey("dealsStatus")) { |
| 1750 dealsStatus = _json["dealsStatus"]; |
| 1751 } |
| 1752 if (_json.containsKey("detectedAdvertiserIds")) { |
| 1753 detectedAdvertiserIds = _json["detectedAdvertiserIds"]; |
| 1754 } |
| 1755 if (_json.containsKey("detectedDomains")) { |
| 1756 detectedDomains = _json["detectedDomains"]; |
| 1757 } |
| 1758 if (_json.containsKey("detectedLanguages")) { |
| 1759 detectedLanguages = _json["detectedLanguages"]; |
| 1760 } |
| 1761 if (_json.containsKey("detectedProductCategories")) { |
| 1762 detectedProductCategories = _json["detectedProductCategories"]; |
| 1763 } |
| 1764 if (_json.containsKey("detectedSensitiveCategories")) { |
| 1765 detectedSensitiveCategories = _json["detectedSensitiveCategories"]; |
| 1766 } |
| 1767 if (_json.containsKey("filteringStats")) { |
| 1768 filteringStats = new FilteringStats.fromJson(_json["filteringStats"]); |
| 1769 } |
| 1770 if (_json.containsKey("html")) { |
| 1771 html = new HtmlContent.fromJson(_json["html"]); |
| 1772 } |
| 1773 if (_json.containsKey("impressionTrackingUrls")) { |
| 1774 impressionTrackingUrls = _json["impressionTrackingUrls"]; |
| 1775 } |
| 1776 if (_json.containsKey("native")) { |
| 1777 native = new NativeContent.fromJson(_json["native"]); |
| 1778 } |
| 1779 if (_json.containsKey("openAuctionStatus")) { |
| 1780 openAuctionStatus = _json["openAuctionStatus"]; |
| 1781 } |
| 1782 if (_json.containsKey("restrictedCategories")) { |
| 1783 restrictedCategories = _json["restrictedCategories"]; |
| 1784 } |
| 1785 if (_json.containsKey("servingRestrictions")) { |
| 1786 servingRestrictions = _json["servingRestrictions"].map((value) => new Serv
ingRestriction.fromJson(value)).toList(); |
| 1787 } |
| 1788 if (_json.containsKey("vendorIds")) { |
| 1789 vendorIds = _json["vendorIds"]; |
| 1790 } |
| 1791 if (_json.containsKey("version")) { |
| 1792 version = _json["version"]; |
| 1793 } |
| 1794 if (_json.containsKey("video")) { |
| 1795 video = new VideoContent.fromJson(_json["video"]); |
| 1796 } |
| 1797 } |
| 1798 |
| 1799 core.Map toJson() { |
| 1800 var _json = new core.Map(); |
| 1801 if (accountId != null) { |
| 1802 _json["accountId"] = accountId; |
| 1803 } |
| 1804 if (adChoicesDestinationUrl != null) { |
| 1805 _json["adChoicesDestinationUrl"] = adChoicesDestinationUrl; |
| 1806 } |
| 1807 if (advertiserName != null) { |
| 1808 _json["advertiserName"] = advertiserName; |
| 1809 } |
| 1810 if (agencyId != null) { |
| 1811 _json["agencyId"] = agencyId; |
| 1812 } |
| 1813 if (apiUpdateTime != null) { |
| 1814 _json["apiUpdateTime"] = apiUpdateTime; |
| 1815 } |
| 1816 if (attributes != null) { |
| 1817 _json["attributes"] = attributes; |
| 1818 } |
| 1819 if (clickThroughUrls != null) { |
| 1820 _json["clickThroughUrls"] = clickThroughUrls; |
| 1821 } |
| 1822 if (corrections != null) { |
| 1823 _json["corrections"] = corrections.map((value) => (value).toJson()).toList
(); |
| 1824 } |
| 1825 if (creativeId != null) { |
| 1826 _json["creativeId"] = creativeId; |
| 1827 } |
| 1828 if (dealsStatus != null) { |
| 1829 _json["dealsStatus"] = dealsStatus; |
| 1830 } |
| 1831 if (detectedAdvertiserIds != null) { |
| 1832 _json["detectedAdvertiserIds"] = detectedAdvertiserIds; |
| 1833 } |
| 1834 if (detectedDomains != null) { |
| 1835 _json["detectedDomains"] = detectedDomains; |
| 1836 } |
| 1837 if (detectedLanguages != null) { |
| 1838 _json["detectedLanguages"] = detectedLanguages; |
| 1839 } |
| 1840 if (detectedProductCategories != null) { |
| 1841 _json["detectedProductCategories"] = detectedProductCategories; |
| 1842 } |
| 1843 if (detectedSensitiveCategories != null) { |
| 1844 _json["detectedSensitiveCategories"] = detectedSensitiveCategories; |
| 1845 } |
| 1846 if (filteringStats != null) { |
| 1847 _json["filteringStats"] = (filteringStats).toJson(); |
| 1848 } |
| 1849 if (html != null) { |
| 1850 _json["html"] = (html).toJson(); |
| 1851 } |
| 1852 if (impressionTrackingUrls != null) { |
| 1853 _json["impressionTrackingUrls"] = impressionTrackingUrls; |
| 1854 } |
| 1855 if (native != null) { |
| 1856 _json["native"] = (native).toJson(); |
| 1857 } |
| 1858 if (openAuctionStatus != null) { |
| 1859 _json["openAuctionStatus"] = openAuctionStatus; |
| 1860 } |
| 1861 if (restrictedCategories != null) { |
| 1862 _json["restrictedCategories"] = restrictedCategories; |
| 1863 } |
| 1864 if (servingRestrictions != null) { |
| 1865 _json["servingRestrictions"] = servingRestrictions.map((value) => (value).
toJson()).toList(); |
| 1866 } |
| 1867 if (vendorIds != null) { |
| 1868 _json["vendorIds"] = vendorIds; |
| 1869 } |
| 1870 if (version != null) { |
| 1871 _json["version"] = version; |
| 1872 } |
| 1873 if (video != null) { |
| 1874 _json["video"] = (video).toJson(); |
| 1875 } |
| 1876 return _json; |
| 1877 } |
| 1878 } |
| 1879 |
| 1880 /** The association between a creative and a deal. */ |
| 1881 class CreativeDealAssociation { |
| 1882 /** The account the creative belongs to. */ |
| 1883 core.String accountId; |
| 1884 /** The ID of the creative associated with the deal. */ |
| 1885 core.String creativeId; |
| 1886 /** The externalDealId for the deal associated with the creative. */ |
| 1887 core.String dealsId; |
| 1888 |
| 1889 CreativeDealAssociation(); |
| 1890 |
| 1891 CreativeDealAssociation.fromJson(core.Map _json) { |
| 1892 if (_json.containsKey("accountId")) { |
| 1893 accountId = _json["accountId"]; |
| 1894 } |
| 1895 if (_json.containsKey("creativeId")) { |
| 1896 creativeId = _json["creativeId"]; |
| 1897 } |
| 1898 if (_json.containsKey("dealsId")) { |
| 1899 dealsId = _json["dealsId"]; |
| 1900 } |
| 1901 } |
| 1902 |
| 1903 core.Map toJson() { |
| 1904 var _json = new core.Map(); |
| 1905 if (accountId != null) { |
| 1906 _json["accountId"] = accountId; |
| 1907 } |
| 1908 if (creativeId != null) { |
| 1909 _json["creativeId"] = creativeId; |
| 1910 } |
| 1911 if (dealsId != null) { |
| 1912 _json["dealsId"] = dealsId; |
| 1913 } |
| 1914 return _json; |
| 1915 } |
| 1916 } |
| 1917 |
| 1918 /** |
| 1919 * Represents a whole calendar date, e.g. date of birth. The time of day and |
| 1920 * time zone are either specified elsewhere or are not significant. The date |
| 1921 * is relative to the Proleptic Gregorian Calendar. The day may be 0 to |
| 1922 * represent a year and month where the day is not significant, e.g. credit card |
| 1923 * expiration date. The year may be 0 to represent a month and day independent |
| 1924 * of year, e.g. anniversary date. Related types are google.type.TimeOfDay |
| 1925 * and `google.protobuf.Timestamp`. |
| 1926 */ |
| 1927 class Date { |
| 1928 /** |
| 1929 * Day of month. Must be from 1 to 31 and valid for the year and month, or 0 |
| 1930 * if specifying a year/month where the day is not significant. |
| 1931 */ |
| 1932 core.int day; |
| 1933 /** Month of year. Must be from 1 to 12. */ |
| 1934 core.int month; |
| 1935 /** |
| 1936 * Year of date. Must be from 1 to 9999, or 0 if specifying a date without |
| 1937 * a year. |
| 1938 */ |
| 1939 core.int year; |
| 1940 |
| 1941 Date(); |
| 1942 |
| 1943 Date.fromJson(core.Map _json) { |
| 1944 if (_json.containsKey("day")) { |
| 1945 day = _json["day"]; |
| 1946 } |
| 1947 if (_json.containsKey("month")) { |
| 1948 month = _json["month"]; |
| 1949 } |
| 1950 if (_json.containsKey("year")) { |
| 1951 year = _json["year"]; |
| 1952 } |
| 1953 } |
| 1954 |
| 1955 core.Map toJson() { |
| 1956 var _json = new core.Map(); |
| 1957 if (day != null) { |
| 1958 _json["day"] = day; |
| 1959 } |
| 1960 if (month != null) { |
| 1961 _json["month"] = month; |
| 1962 } |
| 1963 if (year != null) { |
| 1964 _json["year"] = year; |
| 1965 } |
| 1966 return _json; |
| 1967 } |
| 1968 } |
| 1969 |
| 1970 /** @OutputOnly The reason and details for a disapproval. */ |
| 1971 class Disapproval { |
| 1972 /** Additional details about the reason for disapproval. */ |
| 1973 core.List<core.String> details; |
| 1974 /** |
| 1975 * The categorized reason for disapproval. |
| 1976 * Possible string values are: |
| 1977 * - "LENGTH_OF_IMAGE_ANIMATION" : The length of the image animation is longer |
| 1978 * than allowed. |
| 1979 * - "BROKEN_URL" : The click through URL doesn't work properly. |
| 1980 * - "MEDIA_NOT_FUNCTIONAL" : Something is wrong with the creative itself. |
| 1981 * - "INVALID_FOURTH_PARTY_CALL" : The ad makes a fourth party call to an |
| 1982 * unapproved vendor. |
| 1983 * - "INCORRECT_REMARKETING_DECLARATION" : The ad targets consumers using |
| 1984 * remarketing lists and/or collects |
| 1985 * data for subsequent use in retargeting, but does not correctly declare |
| 1986 * that use. |
| 1987 * - "LANDING_PAGE_ERROR" : Clicking on the ad leads to an error page. |
| 1988 * - "AD_SIZE_DOES_NOT_MATCH_AD_SLOT" : The ad size when rendered does not |
| 1989 * match the declaration. |
| 1990 * - "NO_BORDER" : Ads with a white background require a border, which was |
| 1991 * missing. |
| 1992 * - "FOURTH_PARTY_BROWSER_COOKIES" : The creative attempts to set cookies |
| 1993 * from a fourth party that is not |
| 1994 * certified. |
| 1995 * - "LSO_OBJECTS" : The creative sets an LSO object. |
| 1996 * - "BLANK_CREATIVE" : The ad serves a blank. |
| 1997 * - "DESTINATION_URLS_UNDECLARED" : The ad uses rotation, but not all |
| 1998 * destination URLs were declared. |
| 1999 * - "PROBLEM_WITH_CLICK_MACRO" : There is a problem with the way the click |
| 2000 * macro is used. |
| 2001 * - "INCORRECT_AD_TECHNOLOGY_DECLARATION" : The ad technology declaration is |
| 2002 * not accurate. |
| 2003 * - "INCORRECT_DESTINATION_URL_DECLARATION" : The actual destination URL does |
| 2004 * not match the declared destination URL. |
| 2005 * - "EXPANDABLE_INCORRECT_DIRECTION" : The declared expanding direction does |
| 2006 * not match the actual direction. |
| 2007 * - "EXPANDABLE_DIRECTION_NOT_SUPPORTED" : The ad does not expand in a |
| 2008 * supported direction. |
| 2009 * - "EXPANDABLE_INVALID_VENDOR" : The ad uses an expandable vendor that is |
| 2010 * not supported. |
| 2011 * - "EXPANDABLE_FUNCTIONALITY" : There was an issue with the expandable ad. |
| 2012 * - "VIDEO_INVALID_VENDOR" : The ad uses a video vendor that is not |
| 2013 * supported. |
| 2014 * - "VIDEO_UNSUPPORTED_LENGTH" : The length of the video ad is not supported. |
| 2015 * - "VIDEO_UNSUPPORTED_FORMAT" : The format of the video ad is not supported. |
| 2016 * - "VIDEO_FUNCTIONALITY" : There was an issue with the video ad. |
| 2017 * - "LANDING_PAGE_DISABLED" : The landing page does not conform to Ad |
| 2018 * Exchange policy. |
| 2019 * - "MALWARE_SUSPECTED" : The ad or the landing page may contain malware. |
| 2020 * - "ADULT_IMAGE_OR_VIDEO" : The ad contains adult images or video content. |
| 2021 * - "INACCURATE_AD_TEXT" : The ad contains text that is unclear or |
| 2022 * inaccurate. |
| 2023 * - "COUNTERFEIT_DESIGNER_GOODS" : The ad promotes counterfeit designer |
| 2024 * goods. |
| 2025 * - "POP_UP" : The ad causes a popup window to appear. |
| 2026 * - "INVALID_RTB_PROTOCOL_USAGE" : The creative does not follow policies set |
| 2027 * for the RTB protocol. |
| 2028 * - "RAW_IP_ADDRESS_IN_SNIPPET" : The ad contains a URL that uses a numeric |
| 2029 * IP address for the domain. |
| 2030 * - "UNACCEPTABLE_CONTENT_SOFTWARE" : The ad or landing page contains |
| 2031 * unacceptable content because it initiated |
| 2032 * a software or executable download. |
| 2033 * - "UNAUTHORIZED_COOKIE_ON_GOOGLE_DOMAIN" : The ad set an unauthorized |
| 2034 * cookie on a Google domain. |
| 2035 * - "UNDECLARED_FLASH_OBJECTS" : Flash content found when no flash was |
| 2036 * declared. |
| 2037 * - "INVALID_SSL_DECLARATION" : SSL support declared but not working |
| 2038 * correctly. |
| 2039 * - "DIRECT_DOWNLOAD_IN_AD" : Rich Media - Direct Download in Ad (ex. PDF |
| 2040 * download). |
| 2041 * - "MAXIMUM_DOWNLOAD_SIZE_EXCEEDED" : Maximum download size exceeded. |
| 2042 * - "DESTINATION_URL_SITE_NOT_CRAWLABLE" : Bad Destination URL: Site Not |
| 2043 * Crawlable. |
| 2044 * - "BAD_URL_LEGAL_DISAPPROVAL" : Bad URL: Legal disapproval. |
| 2045 * - "PHARMA_GAMBLING_ALCOHOL_NOT_ALLOWED" : Pharmaceuticals, Gambling, |
| 2046 * Alcohol not allowed and at least one was |
| 2047 * detected. |
| 2048 * - "DYNAMIC_DNS_AT_DESTINATION_URL" : Dynamic DNS at Destination URL. |
| 2049 * - "POOR_IMAGE_OR_VIDEO_QUALITY" : Poor Image / Video Quality. |
| 2050 * - "UNACCEPTABLE_IMAGE_CONTENT" : For example, Image Trick to Click. |
| 2051 * - "INCORRECT_IMAGE_LAYOUT" : Incorrect Image Layout. |
| 2052 * - "IRRELEVANT_IMAGE_OR_VIDEO" : Irrelevant Image / Video. |
| 2053 * - "DESTINATION_SITE_DOES_NOT_ALLOW_GOING_BACK" : Broken back button. |
| 2054 * - "MISLEADING_CLAIMS_IN_AD" : Misleading/Inaccurate claims in ads. |
| 2055 * - "RESTRICTED_PRODUCTS" : Restricted Products. |
| 2056 * - "UNACCEPTABLE_CONTENT" : Unacceptable content. For example, malware. |
| 2057 * - "AUTOMATED_AD_CLICKING" : The ad automatically redirects to the |
| 2058 * destination site without a click, |
| 2059 * or reports a click when none were made. |
| 2060 * - "INVALID_URL_PROTOCOL" : The ad uses URL protocols that do not exist or |
| 2061 * are not allowed on AdX. |
| 2062 * - "UNDECLARED_RESTRICTED_CONTENT" : Restricted content (for example, |
| 2063 * alcohol) was found in the ad but not |
| 2064 * declared. |
| 2065 * - "INVALID_REMARKETING_LIST_USAGE" : Violation of the remarketing list |
| 2066 * policy. |
| 2067 * - "DESTINATION_SITE_NOT_CRAWLABLE_ROBOTS_TXT" : The destination site's |
| 2068 * robot.txt file prevents it from being crawled. |
| 2069 * - "CLICK_TO_DOWNLOAD_NOT_AN_APP" : Click to download must link to an app. |
| 2070 * - "INACCURATE_REVIEW_EXTENSION" : A review extension must be an accurate |
| 2071 * review. |
| 2072 * - "SEXUALLY_EXPLICIT_CONTENT" : Sexually explicit content. |
| 2073 * - "GAINING_AN_UNFAIR_ADVANTAGE" : The ad tries to gain an unfair traffic |
| 2074 * advantage. |
| 2075 * - "GAMING_THE_GOOGLE_NETWORK" : The ad tries to circumvent Google's |
| 2076 * advertising systems. |
| 2077 * - "DANGEROUS_PRODUCTS_KNIVES" : The ad promotes dangerous knives. |
| 2078 * - "DANGEROUS_PRODUCTS_EXPLOSIVES" : The ad promotes explosives. |
| 2079 * - "DANGEROUS_PRODUCTS_GUNS" : The ad promotes guns & parts. |
| 2080 * - "DANGEROUS_PRODUCTS_DRUGS" : The ad promotes recreational drugs/services |
| 2081 * & related equipment. |
| 2082 * - "DANGEROUS_PRODUCTS_TOBACCO" : The ad promotes tobacco products/services |
| 2083 * & related equipment. |
| 2084 * - "DANGEROUS_PRODUCTS_WEAPONS" : The ad promotes weapons. |
| 2085 * - "UNCLEAR_OR_IRRELEVANT_AD" : The ad is unclear or irrelevant to the |
| 2086 * destination site. |
| 2087 * - "PROFESSIONAL_STANDARDS" : The ad does not meet professional standards. |
| 2088 * - "DYSFUNCTIONAL_PROMOTION" : The promotion is unnecessarily difficult to |
| 2089 * navigate. |
| 2090 * - "INVALID_INTEREST_BASED_AD" : Violation of Google's policy for |
| 2091 * interest-based ads. |
| 2092 * - "MISUSE_OF_PERSONAL_INFORMATION" : Misuse of personal information. |
| 2093 * - "OMISSION_OF_RELEVANT_INFORMATION" : Omission of relevant information. |
| 2094 * - "UNAVAILABLE_PROMOTIONS" : Unavailable promotions. |
| 2095 * - "MISLEADING_PROMOTIONS" : Misleading or unrealistic promotions. |
| 2096 * - "INAPPROPRIATE_CONTENT" : Offensive or inappropriate content. |
| 2097 * - "SENSITIVE_EVENTS" : Capitalizing on sensitive events. |
| 2098 * - "SHOCKING_CONTENT" : Shocking content. |
| 2099 * - "ENABLING_DISHONEST_BEHAVIOR" : Products & Services that enable dishonest |
| 2100 * behavior. |
| 2101 * - "TECHNICAL_REQUIREMENTS" : The ad does not meet technical requirements. |
| 2102 * - "RESTRICTED_POLITICAL_CONTENT" : Restricted political content. |
| 2103 * - "UNSUPPORTED_CONTENT" : Unsupported content. |
| 2104 * - "INVALID_BIDDING_METHOD" : Invalid bidding method. |
| 2105 * - "VIDEO_TOO_LONG" : Video length exceeds limits. |
| 2106 * - "VIOLATES_JAPANESE_PHARMACY_LAW" : Unacceptable content: Japanese |
| 2107 * healthcare. |
| 2108 * - "UNACCREDITED_PET_PHARMACY" : Online pharmacy ID required. |
| 2109 * - "ABORTION" : Unacceptable content: Abortion. |
| 2110 * - "CONTRACEPTIVES" : Unacceptable content: Birth control. |
| 2111 * - "NEED_CERTIFICATES_TO_ADVERTISE_IN_CHINA" : Restricted in China. |
| 2112 * - "KCDSP_REGISTRATION" : Unacceptable content: Korean healthcare. |
| 2113 * - "NOT_FAMILY_SAFE" : Non-family safe or adult content. |
| 2114 * - "CLINICAL_TRIAL_RECRUITMENT" : Clinical trial recruitment. |
| 2115 * - "MAXIMUM_NUMBER_OF_HTTP_CALLS_EXCEEDED" : Maximum number of HTTP calls |
| 2116 * exceeded. |
| 2117 * - "MAXIMUM_NUMBER_OF_COOKIES_EXCEEDED" : Maximum number of cookies |
| 2118 * exceeded. |
| 2119 * - "PERSONAL_LOANS" : Financial service ad does not adhere to |
| 2120 * specifications. |
| 2121 * - "UNSUPPORTED_FLASH_CONTENT" : Flash content was found in an unsupported |
| 2122 * context. |
| 2123 */ |
| 2124 core.String reason; |
| 2125 |
| 2126 Disapproval(); |
| 2127 |
| 2128 Disapproval.fromJson(core.Map _json) { |
| 2129 if (_json.containsKey("details")) { |
| 2130 details = _json["details"]; |
| 2131 } |
| 2132 if (_json.containsKey("reason")) { |
| 2133 reason = _json["reason"]; |
| 2134 } |
| 2135 } |
| 2136 |
| 2137 core.Map toJson() { |
| 2138 var _json = new core.Map(); |
| 2139 if (details != null) { |
| 2140 _json["details"] = details; |
| 2141 } |
| 2142 if (reason != null) { |
| 2143 _json["reason"] = reason; |
| 2144 } |
| 2145 return _json; |
| 2146 } |
| 2147 } |
| 2148 |
| 2149 /** |
| 2150 * A generic empty message that you can re-use to avoid defining duplicated |
| 2151 * empty messages in your APIs. A typical example is to use it as the request |
| 2152 * or the response type of an API method. For instance: |
| 2153 * |
| 2154 * service Foo { |
| 2155 * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); |
| 2156 * } |
| 2157 * |
| 2158 * The JSON representation for `Empty` is empty JSON object `{}`. |
| 2159 */ |
| 2160 class Empty { |
| 2161 |
| 2162 Empty(); |
| 2163 |
| 2164 Empty.fromJson(core.Map _json) { |
| 2165 } |
| 2166 |
| 2167 core.Map toJson() { |
| 2168 var _json = new core.Map(); |
| 2169 return _json; |
| 2170 } |
| 2171 } |
| 2172 |
| 2173 /** |
| 2174 * @OutputOnly Filtering reasons for this creative during a period of a single |
| 2175 * day (from midnight to midnight Pacific). |
| 2176 */ |
| 2177 class FilteringStats { |
| 2178 /** |
| 2179 * The day during which the data was collected. |
| 2180 * The data is collected from 00:00:00 to 23:59:59 PT. |
| 2181 * During switches from PST to PDT and back, the day may |
| 2182 * contain 23 or 25 hours of data instead of the usual 24. |
| 2183 */ |
| 2184 Date date; |
| 2185 /** The set of filtering reasons for this date. */ |
| 2186 core.List<Reason> reasons; |
| 2187 |
| 2188 FilteringStats(); |
| 2189 |
| 2190 FilteringStats.fromJson(core.Map _json) { |
| 2191 if (_json.containsKey("date")) { |
| 2192 date = new Date.fromJson(_json["date"]); |
| 2193 } |
| 2194 if (_json.containsKey("reasons")) { |
| 2195 reasons = _json["reasons"].map((value) => new Reason.fromJson(value)).toLi
st(); |
| 2196 } |
| 2197 } |
| 2198 |
| 2199 core.Map toJson() { |
| 2200 var _json = new core.Map(); |
| 2201 if (date != null) { |
| 2202 _json["date"] = (date).toJson(); |
| 2203 } |
| 2204 if (reasons != null) { |
| 2205 _json["reasons"] = reasons.map((value) => (value).toJson()).toList(); |
| 2206 } |
| 2207 return _json; |
| 2208 } |
| 2209 } |
| 2210 |
| 2211 /** HTML content for a creative. */ |
| 2212 class HtmlContent { |
| 2213 /** The height of the HTML snippet in pixels. */ |
| 2214 core.int height; |
| 2215 /** The HTML snippet that displays the ad when inserted in the web page. */ |
| 2216 core.String snippet; |
| 2217 /** The width of the HTML snippet in pixels. */ |
| 2218 core.int width; |
| 2219 |
| 2220 HtmlContent(); |
| 2221 |
| 2222 HtmlContent.fromJson(core.Map _json) { |
| 2223 if (_json.containsKey("height")) { |
| 2224 height = _json["height"]; |
| 2225 } |
| 2226 if (_json.containsKey("snippet")) { |
| 2227 snippet = _json["snippet"]; |
| 2228 } |
| 2229 if (_json.containsKey("width")) { |
| 2230 width = _json["width"]; |
| 2231 } |
| 2232 } |
| 2233 |
| 2234 core.Map toJson() { |
| 2235 var _json = new core.Map(); |
| 2236 if (height != null) { |
| 2237 _json["height"] = height; |
| 2238 } |
| 2239 if (snippet != null) { |
| 2240 _json["snippet"] = snippet; |
| 2241 } |
| 2242 if (width != null) { |
| 2243 _json["width"] = width; |
| 2244 } |
| 2245 return _json; |
| 2246 } |
| 2247 } |
| 2248 |
| 2249 /** |
| 2250 * An image resource. You may provide a larger image than was requested, |
| 2251 * so long as the aspect ratio is preserved. |
| 2252 */ |
| 2253 class Image { |
| 2254 /** Image height in pixels. */ |
| 2255 core.int height; |
| 2256 /** The URL of the image. */ |
| 2257 core.String url; |
| 2258 /** Image width in pixels. */ |
| 2259 core.int width; |
| 2260 |
| 2261 Image(); |
| 2262 |
| 2263 Image.fromJson(core.Map _json) { |
| 2264 if (_json.containsKey("height")) { |
| 2265 height = _json["height"]; |
| 2266 } |
| 2267 if (_json.containsKey("url")) { |
| 2268 url = _json["url"]; |
| 2269 } |
| 2270 if (_json.containsKey("width")) { |
| 2271 width = _json["width"]; |
| 2272 } |
| 2273 } |
| 2274 |
| 2275 core.Map toJson() { |
| 2276 var _json = new core.Map(); |
| 2277 if (height != null) { |
| 2278 _json["height"] = height; |
| 2279 } |
| 2280 if (url != null) { |
| 2281 _json["url"] = url; |
| 2282 } |
| 2283 if (width != null) { |
| 2284 _json["width"] = width; |
| 2285 } |
| 2286 return _json; |
| 2287 } |
912 } | 2288 } |
913 | 2289 |
914 class ListClientUserInvitationsResponse { | 2290 class ListClientUserInvitationsResponse { |
915 /** The returned list of client users. */ | 2291 /** The returned list of client users. */ |
916 core.List<ClientUserInvitation> invitations; | 2292 core.List<ClientUserInvitation> invitations; |
917 /** | 2293 /** |
918 * A token to retrieve the next page of results. | 2294 * A token to retrieve the next page of results. |
919 * Pass this value in the | 2295 * Pass this value in the |
920 * ListClientUserInvitationsRequest.pageToken | 2296 * ListClientUserInvitationsRequest.pageToken |
921 * field in the subsequent call to the | 2297 * field in the subsequent call to the |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1013 var _json = new core.Map(); | 2389 var _json = new core.Map(); |
1014 if (clients != null) { | 2390 if (clients != null) { |
1015 _json["clients"] = clients.map((value) => (value).toJson()).toList(); | 2391 _json["clients"] = clients.map((value) => (value).toJson()).toList(); |
1016 } | 2392 } |
1017 if (nextPageToken != null) { | 2393 if (nextPageToken != null) { |
1018 _json["nextPageToken"] = nextPageToken; | 2394 _json["nextPageToken"] = nextPageToken; |
1019 } | 2395 } |
1020 return _json; | 2396 return _json; |
1021 } | 2397 } |
1022 } | 2398 } |
| 2399 |
| 2400 /** A response for listing creatives. */ |
| 2401 class ListCreativesResponse { |
| 2402 /** The list of creatives. */ |
| 2403 core.List<Creative> creatives; |
| 2404 /** |
| 2405 * A token to retrieve the next page of results. |
| 2406 * Pass this value in the |
| 2407 * ListCreativesRequest.page_token |
| 2408 * field in the subsequent call to `ListCreatives` method to retrieve the next |
| 2409 * page of results. |
| 2410 */ |
| 2411 core.String nextPageToken; |
| 2412 |
| 2413 ListCreativesResponse(); |
| 2414 |
| 2415 ListCreativesResponse.fromJson(core.Map _json) { |
| 2416 if (_json.containsKey("creatives")) { |
| 2417 creatives = _json["creatives"].map((value) => new Creative.fromJson(value)
).toList(); |
| 2418 } |
| 2419 if (_json.containsKey("nextPageToken")) { |
| 2420 nextPageToken = _json["nextPageToken"]; |
| 2421 } |
| 2422 } |
| 2423 |
| 2424 core.Map toJson() { |
| 2425 var _json = new core.Map(); |
| 2426 if (creatives != null) { |
| 2427 _json["creatives"] = creatives.map((value) => (value).toJson()).toList(); |
| 2428 } |
| 2429 if (nextPageToken != null) { |
| 2430 _json["nextPageToken"] = nextPageToken; |
| 2431 } |
| 2432 return _json; |
| 2433 } |
| 2434 } |
| 2435 |
| 2436 /** A response for listing creative and deal associations */ |
| 2437 class ListDealAssociationsResponse { |
| 2438 /** The list of associations. */ |
| 2439 core.List<CreativeDealAssociation> associations; |
| 2440 /** |
| 2441 * A token to retrieve the next page of results. |
| 2442 * Pass this value in the |
| 2443 * ListDealAssociationsRequest.page_token |
| 2444 * field in the subsequent call to 'ListDealAssociation' method to retrieve |
| 2445 * the next page of results. |
| 2446 */ |
| 2447 core.String nextPageToken; |
| 2448 |
| 2449 ListDealAssociationsResponse(); |
| 2450 |
| 2451 ListDealAssociationsResponse.fromJson(core.Map _json) { |
| 2452 if (_json.containsKey("associations")) { |
| 2453 associations = _json["associations"].map((value) => new CreativeDealAssoci
ation.fromJson(value)).toList(); |
| 2454 } |
| 2455 if (_json.containsKey("nextPageToken")) { |
| 2456 nextPageToken = _json["nextPageToken"]; |
| 2457 } |
| 2458 } |
| 2459 |
| 2460 core.Map toJson() { |
| 2461 var _json = new core.Map(); |
| 2462 if (associations != null) { |
| 2463 _json["associations"] = associations.map((value) => (value).toJson()).toLi
st(); |
| 2464 } |
| 2465 if (nextPageToken != null) { |
| 2466 _json["nextPageToken"] = nextPageToken; |
| 2467 } |
| 2468 return _json; |
| 2469 } |
| 2470 } |
| 2471 |
| 2472 /** @OutputOnly The Geo criteria the restriction applies to. */ |
| 2473 class LocationContext { |
| 2474 /** |
| 2475 * IDs representing the geo location for this context. |
| 2476 * Please refer to the |
| 2477 * [geo-table.csv](https://storage.googleapis.com/adx-rtb-dictionaries/geo-tab
le.csv) |
| 2478 * file for different geo criteria IDs. |
| 2479 */ |
| 2480 core.List<core.int> geoCriteriaIds; |
| 2481 |
| 2482 LocationContext(); |
| 2483 |
| 2484 LocationContext.fromJson(core.Map _json) { |
| 2485 if (_json.containsKey("geoCriteriaIds")) { |
| 2486 geoCriteriaIds = _json["geoCriteriaIds"]; |
| 2487 } |
| 2488 } |
| 2489 |
| 2490 core.Map toJson() { |
| 2491 var _json = new core.Map(); |
| 2492 if (geoCriteriaIds != null) { |
| 2493 _json["geoCriteriaIds"] = geoCriteriaIds; |
| 2494 } |
| 2495 return _json; |
| 2496 } |
| 2497 } |
| 2498 |
| 2499 /** Native content for a creative. */ |
| 2500 class NativeContent { |
| 2501 /** |
| 2502 * The name of the advertiser or sponsor, to be displayed in the ad creative. |
| 2503 */ |
| 2504 core.String advertiserName; |
| 2505 /** The app icon, for app download ads. */ |
| 2506 Image appIcon; |
| 2507 /** A long description of the ad. */ |
| 2508 core.String body; |
| 2509 /** A label for the button that the user is supposed to click. */ |
| 2510 core.String callToAction; |
| 2511 /** The URL that the browser/SDK will load when the user clicks the ad. */ |
| 2512 core.String clickLinkUrl; |
| 2513 /** The URL to use for click tracking. */ |
| 2514 core.String clickTrackingUrl; |
| 2515 /** A short title for the ad. */ |
| 2516 core.String headline; |
| 2517 /** A large image. */ |
| 2518 Image image; |
| 2519 /** A smaller image, for the advertiser's logo. */ |
| 2520 Image logo; |
| 2521 /** The price of the promoted app including currency info. */ |
| 2522 core.String priceDisplayText; |
| 2523 /** The app rating in the app store. Must be in the range [0-5]. */ |
| 2524 core.double starRating; |
| 2525 /** The URL to the app store to purchase/download the promoted app. */ |
| 2526 core.String storeUrl; |
| 2527 /** The URL to fetch a native video ad. */ |
| 2528 core.String videoUrl; |
| 2529 |
| 2530 NativeContent(); |
| 2531 |
| 2532 NativeContent.fromJson(core.Map _json) { |
| 2533 if (_json.containsKey("advertiserName")) { |
| 2534 advertiserName = _json["advertiserName"]; |
| 2535 } |
| 2536 if (_json.containsKey("appIcon")) { |
| 2537 appIcon = new Image.fromJson(_json["appIcon"]); |
| 2538 } |
| 2539 if (_json.containsKey("body")) { |
| 2540 body = _json["body"]; |
| 2541 } |
| 2542 if (_json.containsKey("callToAction")) { |
| 2543 callToAction = _json["callToAction"]; |
| 2544 } |
| 2545 if (_json.containsKey("clickLinkUrl")) { |
| 2546 clickLinkUrl = _json["clickLinkUrl"]; |
| 2547 } |
| 2548 if (_json.containsKey("clickTrackingUrl")) { |
| 2549 clickTrackingUrl = _json["clickTrackingUrl"]; |
| 2550 } |
| 2551 if (_json.containsKey("headline")) { |
| 2552 headline = _json["headline"]; |
| 2553 } |
| 2554 if (_json.containsKey("image")) { |
| 2555 image = new Image.fromJson(_json["image"]); |
| 2556 } |
| 2557 if (_json.containsKey("logo")) { |
| 2558 logo = new Image.fromJson(_json["logo"]); |
| 2559 } |
| 2560 if (_json.containsKey("priceDisplayText")) { |
| 2561 priceDisplayText = _json["priceDisplayText"]; |
| 2562 } |
| 2563 if (_json.containsKey("starRating")) { |
| 2564 starRating = _json["starRating"]; |
| 2565 } |
| 2566 if (_json.containsKey("storeUrl")) { |
| 2567 storeUrl = _json["storeUrl"]; |
| 2568 } |
| 2569 if (_json.containsKey("videoUrl")) { |
| 2570 videoUrl = _json["videoUrl"]; |
| 2571 } |
| 2572 } |
| 2573 |
| 2574 core.Map toJson() { |
| 2575 var _json = new core.Map(); |
| 2576 if (advertiserName != null) { |
| 2577 _json["advertiserName"] = advertiserName; |
| 2578 } |
| 2579 if (appIcon != null) { |
| 2580 _json["appIcon"] = (appIcon).toJson(); |
| 2581 } |
| 2582 if (body != null) { |
| 2583 _json["body"] = body; |
| 2584 } |
| 2585 if (callToAction != null) { |
| 2586 _json["callToAction"] = callToAction; |
| 2587 } |
| 2588 if (clickLinkUrl != null) { |
| 2589 _json["clickLinkUrl"] = clickLinkUrl; |
| 2590 } |
| 2591 if (clickTrackingUrl != null) { |
| 2592 _json["clickTrackingUrl"] = clickTrackingUrl; |
| 2593 } |
| 2594 if (headline != null) { |
| 2595 _json["headline"] = headline; |
| 2596 } |
| 2597 if (image != null) { |
| 2598 _json["image"] = (image).toJson(); |
| 2599 } |
| 2600 if (logo != null) { |
| 2601 _json["logo"] = (logo).toJson(); |
| 2602 } |
| 2603 if (priceDisplayText != null) { |
| 2604 _json["priceDisplayText"] = priceDisplayText; |
| 2605 } |
| 2606 if (starRating != null) { |
| 2607 _json["starRating"] = starRating; |
| 2608 } |
| 2609 if (storeUrl != null) { |
| 2610 _json["storeUrl"] = storeUrl; |
| 2611 } |
| 2612 if (videoUrl != null) { |
| 2613 _json["videoUrl"] = videoUrl; |
| 2614 } |
| 2615 return _json; |
| 2616 } |
| 2617 } |
| 2618 |
| 2619 /** @OutputOnly The type of platform the restriction applies to. */ |
| 2620 class PlatformContext { |
| 2621 /** The platforms this restriction applies to. */ |
| 2622 core.List<core.String> platforms; |
| 2623 |
| 2624 PlatformContext(); |
| 2625 |
| 2626 PlatformContext.fromJson(core.Map _json) { |
| 2627 if (_json.containsKey("platforms")) { |
| 2628 platforms = _json["platforms"]; |
| 2629 } |
| 2630 } |
| 2631 |
| 2632 core.Map toJson() { |
| 2633 var _json = new core.Map(); |
| 2634 if (platforms != null) { |
| 2635 _json["platforms"] = platforms; |
| 2636 } |
| 2637 return _json; |
| 2638 } |
| 2639 } |
| 2640 |
| 2641 /** A specific filtering status and how many times it occurred. */ |
| 2642 class Reason { |
| 2643 /** |
| 2644 * The number of times the creative was filtered for the status. The |
| 2645 * count is aggregated across all publishers on the exchange. |
| 2646 */ |
| 2647 core.String count; |
| 2648 /** |
| 2649 * The filtering status code. Please refer to the |
| 2650 * [creative-status-codes.txt](https://storage.googleapis.com/adx-rtb-dictiona
ries/creative-status-codes.txt) |
| 2651 * file for different statuses. |
| 2652 */ |
| 2653 core.int status; |
| 2654 |
| 2655 Reason(); |
| 2656 |
| 2657 Reason.fromJson(core.Map _json) { |
| 2658 if (_json.containsKey("count")) { |
| 2659 count = _json["count"]; |
| 2660 } |
| 2661 if (_json.containsKey("status")) { |
| 2662 status = _json["status"]; |
| 2663 } |
| 2664 } |
| 2665 |
| 2666 core.Map toJson() { |
| 2667 var _json = new core.Map(); |
| 2668 if (count != null) { |
| 2669 _json["count"] = count; |
| 2670 } |
| 2671 if (status != null) { |
| 2672 _json["status"] = status; |
| 2673 } |
| 2674 return _json; |
| 2675 } |
| 2676 } |
| 2677 |
| 2678 /** A request for removing the association between a deal and a creative. */ |
| 2679 class RemoveDealAssociationRequest { |
| 2680 /** The association between a creative and a deal that should be removed. */ |
| 2681 CreativeDealAssociation association; |
| 2682 |
| 2683 RemoveDealAssociationRequest(); |
| 2684 |
| 2685 RemoveDealAssociationRequest.fromJson(core.Map _json) { |
| 2686 if (_json.containsKey("association")) { |
| 2687 association = new CreativeDealAssociation.fromJson(_json["association"]); |
| 2688 } |
| 2689 } |
| 2690 |
| 2691 core.Map toJson() { |
| 2692 var _json = new core.Map(); |
| 2693 if (association != null) { |
| 2694 _json["association"] = (association).toJson(); |
| 2695 } |
| 2696 return _json; |
| 2697 } |
| 2698 } |
| 2699 |
| 2700 /** @OutputOnly A security context. */ |
| 2701 class SecurityContext { |
| 2702 /** The security types in this context. */ |
| 2703 core.List<core.String> securities; |
| 2704 |
| 2705 SecurityContext(); |
| 2706 |
| 2707 SecurityContext.fromJson(core.Map _json) { |
| 2708 if (_json.containsKey("securities")) { |
| 2709 securities = _json["securities"]; |
| 2710 } |
| 2711 } |
| 2712 |
| 2713 core.Map toJson() { |
| 2714 var _json = new core.Map(); |
| 2715 if (securities != null) { |
| 2716 _json["securities"] = securities; |
| 2717 } |
| 2718 return _json; |
| 2719 } |
| 2720 } |
| 2721 |
| 2722 /** The serving context for this restriction. */ |
| 2723 class ServingContext { |
| 2724 /** |
| 2725 * Matches all contexts. |
| 2726 * Possible string values are: |
| 2727 * - "SIMPLE_CONTEXT" : A simple context. |
| 2728 */ |
| 2729 core.String all; |
| 2730 /** Matches impressions for a particular app type. */ |
| 2731 AppContext appType; |
| 2732 /** Matches impressions for a particular auction type. */ |
| 2733 AuctionContext auctionType; |
| 2734 /** |
| 2735 * Matches impressions coming from users *or* publishers in a specific |
| 2736 * location. |
| 2737 */ |
| 2738 LocationContext location; |
| 2739 /** Matches impressions coming from a particular platform. */ |
| 2740 PlatformContext platform; |
| 2741 /** Matches impressions for a particular security type. */ |
| 2742 SecurityContext securityType; |
| 2743 |
| 2744 ServingContext(); |
| 2745 |
| 2746 ServingContext.fromJson(core.Map _json) { |
| 2747 if (_json.containsKey("all")) { |
| 2748 all = _json["all"]; |
| 2749 } |
| 2750 if (_json.containsKey("appType")) { |
| 2751 appType = new AppContext.fromJson(_json["appType"]); |
| 2752 } |
| 2753 if (_json.containsKey("auctionType")) { |
| 2754 auctionType = new AuctionContext.fromJson(_json["auctionType"]); |
| 2755 } |
| 2756 if (_json.containsKey("location")) { |
| 2757 location = new LocationContext.fromJson(_json["location"]); |
| 2758 } |
| 2759 if (_json.containsKey("platform")) { |
| 2760 platform = new PlatformContext.fromJson(_json["platform"]); |
| 2761 } |
| 2762 if (_json.containsKey("securityType")) { |
| 2763 securityType = new SecurityContext.fromJson(_json["securityType"]); |
| 2764 } |
| 2765 } |
| 2766 |
| 2767 core.Map toJson() { |
| 2768 var _json = new core.Map(); |
| 2769 if (all != null) { |
| 2770 _json["all"] = all; |
| 2771 } |
| 2772 if (appType != null) { |
| 2773 _json["appType"] = (appType).toJson(); |
| 2774 } |
| 2775 if (auctionType != null) { |
| 2776 _json["auctionType"] = (auctionType).toJson(); |
| 2777 } |
| 2778 if (location != null) { |
| 2779 _json["location"] = (location).toJson(); |
| 2780 } |
| 2781 if (platform != null) { |
| 2782 _json["platform"] = (platform).toJson(); |
| 2783 } |
| 2784 if (securityType != null) { |
| 2785 _json["securityType"] = (securityType).toJson(); |
| 2786 } |
| 2787 return _json; |
| 2788 } |
| 2789 } |
| 2790 |
| 2791 /** |
| 2792 * @OutputOnly A representation of the status of an ad in a |
| 2793 * specific context. A context here relates to where something ultimately serves |
| 2794 * (for example, a user or publisher geo, a platform, an HTTPS vs HTTP request, |
| 2795 * or the type of auction). |
| 2796 */ |
| 2797 class ServingRestriction { |
| 2798 /** The contexts for the restriction. */ |
| 2799 core.List<ServingContext> contexts; |
| 2800 /** |
| 2801 * Any disapprovals bound to this restriction. |
| 2802 * Only present if status=DISAPPROVED. |
| 2803 * Can be used to filter the response of the |
| 2804 * creatives.list |
| 2805 * method. |
| 2806 */ |
| 2807 core.List<Disapproval> disapprovalReasons; |
| 2808 /** |
| 2809 * The status of the creative in this context (for example, it has been |
| 2810 * explicitly disapproved or is pending review). |
| 2811 * Possible string values are: |
| 2812 * - "STATUS_UNSPECIFIED" : The status is not known. |
| 2813 * - "DISAPPROVAL" : The ad was disapproved in this context. |
| 2814 * - "PENDING_REVIEW" : The ad is pending review in this context. |
| 2815 */ |
| 2816 core.String status; |
| 2817 |
| 2818 ServingRestriction(); |
| 2819 |
| 2820 ServingRestriction.fromJson(core.Map _json) { |
| 2821 if (_json.containsKey("contexts")) { |
| 2822 contexts = _json["contexts"].map((value) => new ServingContext.fromJson(va
lue)).toList(); |
| 2823 } |
| 2824 if (_json.containsKey("disapprovalReasons")) { |
| 2825 disapprovalReasons = _json["disapprovalReasons"].map((value) => new Disapp
roval.fromJson(value)).toList(); |
| 2826 } |
| 2827 if (_json.containsKey("status")) { |
| 2828 status = _json["status"]; |
| 2829 } |
| 2830 } |
| 2831 |
| 2832 core.Map toJson() { |
| 2833 var _json = new core.Map(); |
| 2834 if (contexts != null) { |
| 2835 _json["contexts"] = contexts.map((value) => (value).toJson()).toList(); |
| 2836 } |
| 2837 if (disapprovalReasons != null) { |
| 2838 _json["disapprovalReasons"] = disapprovalReasons.map((value) => (value).to
Json()).toList(); |
| 2839 } |
| 2840 if (status != null) { |
| 2841 _json["status"] = status; |
| 2842 } |
| 2843 return _json; |
| 2844 } |
| 2845 } |
| 2846 |
| 2847 /** A request for stopping notifications for changes to creative Status. */ |
| 2848 class StopWatchingCreativeRequest { |
| 2849 |
| 2850 StopWatchingCreativeRequest(); |
| 2851 |
| 2852 StopWatchingCreativeRequest.fromJson(core.Map _json) { |
| 2853 } |
| 2854 |
| 2855 core.Map toJson() { |
| 2856 var _json = new core.Map(); |
| 2857 return _json; |
| 2858 } |
| 2859 } |
| 2860 |
| 2861 /** Video content for a creative. */ |
| 2862 class VideoContent { |
| 2863 /** The URL to fetch a video ad. */ |
| 2864 core.String videoUrl; |
| 2865 |
| 2866 VideoContent(); |
| 2867 |
| 2868 VideoContent.fromJson(core.Map _json) { |
| 2869 if (_json.containsKey("videoUrl")) { |
| 2870 videoUrl = _json["videoUrl"]; |
| 2871 } |
| 2872 } |
| 2873 |
| 2874 core.Map toJson() { |
| 2875 var _json = new core.Map(); |
| 2876 if (videoUrl != null) { |
| 2877 _json["videoUrl"] = videoUrl; |
| 2878 } |
| 2879 return _json; |
| 2880 } |
| 2881 } |
| 2882 |
| 2883 /** A request for watching changes to creative Status. */ |
| 2884 class WatchCreativeRequest { |
| 2885 /** |
| 2886 * The Pub/Sub topic to publish notifications to. |
| 2887 * This topic must already exist and must give permission to |
| 2888 * ad-exchange-buyside-reports@google.com to write to the topic. |
| 2889 * This should be the full resource name in |
| 2890 * "projects/{project_id}/topics/{topic_id}" format. |
| 2891 */ |
| 2892 core.String topic; |
| 2893 |
| 2894 WatchCreativeRequest(); |
| 2895 |
| 2896 WatchCreativeRequest.fromJson(core.Map _json) { |
| 2897 if (_json.containsKey("topic")) { |
| 2898 topic = _json["topic"]; |
| 2899 } |
| 2900 } |
| 2901 |
| 2902 core.Map toJson() { |
| 2903 var _json = new core.Map(); |
| 2904 if (topic != null) { |
| 2905 _json["topic"] = topic; |
| 2906 } |
| 2907 return _json; |
| 2908 } |
| 2909 } |
OLD | NEW |