Gustav Wibling | 042e646 | 2015-04-10 13:40:06 +0200 | [diff] [blame] | 1 | // This is a generated file (see the discoveryapis_generator project). |
| 2 | |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 3 | // ignore_for_file: unused_import, unnecessary_cast |
Jakob Andersen | c21146a | 2018-05-25 09:46:20 +0200 | [diff] [blame] | 4 | |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 5 | library googleapis.doubleclickbidmanager.v1_1; |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 6 | |
Gustav Wibling | 042e646 | 2015-04-10 13:40:06 +0200 | [diff] [blame] | 7 | import 'dart:core' as core; |
Gustav Wibling | 042e646 | 2015-04-10 13:40:06 +0200 | [diff] [blame] | 8 | import 'dart:async' as async; |
| 9 | import 'dart:convert' as convert; |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 10 | |
Gustav Wibling | 042e646 | 2015-04-10 13:40:06 +0200 | [diff] [blame] | 11 | import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 12 | import 'package:http/http.dart' as http; |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 13 | |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 14 | export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' |
| 15 | show ApiRequestError, DetailedApiRequestError; |
Gustav Wibling | 042e646 | 2015-04-10 13:40:06 +0200 | [diff] [blame] | 16 | |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 17 | const core.String USER_AGENT = 'dart-api-client doubleclickbidmanager/v1.1'; |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 18 | |
Jonas Finnemann Jensen | ef0c8a3 | 2020-10-07 20:58:20 +0200 | [diff] [blame] | 19 | /// DoubleClick Bid Manager API allows users to manage and create campaigns and |
| 20 | /// reports. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 21 | class DoubleclickbidmanagerApi { |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 22 | /// View and manage your reports in DoubleClick Bid Manager |
| 23 | static const DoubleclickbidmanagerScope = |
| 24 | "https://www.googleapis.com/auth/doubleclickbidmanager"; |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 25 | |
Gustav Wibling | 042e646 | 2015-04-10 13:40:06 +0200 | [diff] [blame] | 26 | final commons.ApiRequester _requester; |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 27 | |
| 28 | LineitemsResourceApi get lineitems => new LineitemsResourceApi(_requester); |
| 29 | QueriesResourceApi get queries => new QueriesResourceApi(_requester); |
| 30 | ReportsResourceApi get reports => new ReportsResourceApi(_requester); |
Martin Kustermann | 4ff71db | 2016-11-09 10:46:40 +0100 | [diff] [blame] | 31 | SdfResourceApi get sdf => new SdfResourceApi(_requester); |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 32 | |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 33 | DoubleclickbidmanagerApi(http.Client client, |
Jonas Finnemann Jensen | ef0c8a3 | 2020-10-07 20:58:20 +0200 | [diff] [blame] | 34 | {core.String rootUrl = "https://doubleclickbidmanager.googleapis.com/", |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 35 | core.String servicePath = "doubleclickbidmanager/v1.1/"}) |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 36 | : _requester = |
| 37 | new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT); |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 38 | } |
| 39 | |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 40 | class LineitemsResourceApi { |
Gustav Wibling | 042e646 | 2015-04-10 13:40:06 +0200 | [diff] [blame] | 41 | final commons.ApiRequester _requester; |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 42 | |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 43 | LineitemsResourceApi(commons.ApiRequester client) : _requester = client; |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 44 | |
Jonas Finnemann Jensen | ef0c8a3 | 2020-10-07 20:58:20 +0200 | [diff] [blame] | 45 | /// Retrieves line items in CSV format. YouTube & partners line items are not |
| 46 | /// supported. |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 47 | /// |
| 48 | /// [request] - The metadata request object. |
| 49 | /// |
| 50 | /// Request parameters: |
| 51 | /// |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 52 | /// [$fields] - Selector specifying which fields to include in a partial |
| 53 | /// response. |
| 54 | /// |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 55 | /// Completes with a [DownloadLineItemsResponse]. |
| 56 | /// |
| 57 | /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 58 | /// error. |
| 59 | /// |
| 60 | /// If the used [http.Client] completes with an error when making a REST call, |
| 61 | /// this method will complete with the same error. |
| 62 | async.Future<DownloadLineItemsResponse> downloadlineitems( |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 63 | DownloadLineItemsRequest request, |
| 64 | {core.String $fields}) { |
Jonas Finnemann Jensen | d22e404 | 2019-02-09 14:14:19 +0100 | [diff] [blame] | 65 | var _url; |
Jakob Andersen | 4ce761d | 2018-04-19 11:19:11 +0200 | [diff] [blame] | 66 | var _queryParams = new core.Map<core.String, core.List<core.String>>(); |
Jonas Finnemann Jensen | d22e404 | 2019-02-09 14:14:19 +0100 | [diff] [blame] | 67 | var _uploadMedia; |
| 68 | var _uploadOptions; |
Gustav Wibling | 042e646 | 2015-04-10 13:40:06 +0200 | [diff] [blame] | 69 | var _downloadOptions = commons.DownloadOptions.Metadata; |
Jonas Finnemann Jensen | d22e404 | 2019-02-09 14:14:19 +0100 | [diff] [blame] | 70 | var _body; |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 71 | |
| 72 | if (request != null) { |
Jakob Andersen | 52715df | 2018-05-01 13:58:48 +0200 | [diff] [blame] | 73 | _body = convert.json.encode((request).toJson()); |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 74 | } |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 75 | if ($fields != null) { |
| 76 | _queryParams["fields"] = [$fields]; |
| 77 | } |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 78 | |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 79 | _url = 'lineitems/downloadlineitems'; |
| 80 | |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 81 | var _response = _requester.request(_url, "POST", |
| 82 | body: _body, |
| 83 | queryParams: _queryParams, |
| 84 | uploadOptions: _uploadOptions, |
| 85 | uploadMedia: _uploadMedia, |
| 86 | downloadOptions: _downloadOptions); |
| 87 | return _response |
| 88 | .then((data) => new DownloadLineItemsResponse.fromJson(data)); |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 89 | } |
| 90 | |
Jonas Finnemann Jensen | ef0c8a3 | 2020-10-07 20:58:20 +0200 | [diff] [blame] | 91 | /// Uploads line items in CSV format. YouTube & partners line items are not |
| 92 | /// supported. |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 93 | /// |
| 94 | /// [request] - The metadata request object. |
| 95 | /// |
| 96 | /// Request parameters: |
| 97 | /// |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 98 | /// [$fields] - Selector specifying which fields to include in a partial |
| 99 | /// response. |
| 100 | /// |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 101 | /// Completes with a [UploadLineItemsResponse]. |
| 102 | /// |
| 103 | /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 104 | /// error. |
| 105 | /// |
| 106 | /// If the used [http.Client] completes with an error when making a REST call, |
| 107 | /// this method will complete with the same error. |
| 108 | async.Future<UploadLineItemsResponse> uploadlineitems( |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 109 | UploadLineItemsRequest request, |
| 110 | {core.String $fields}) { |
Jonas Finnemann Jensen | d22e404 | 2019-02-09 14:14:19 +0100 | [diff] [blame] | 111 | var _url; |
Jakob Andersen | 4ce761d | 2018-04-19 11:19:11 +0200 | [diff] [blame] | 112 | var _queryParams = new core.Map<core.String, core.List<core.String>>(); |
Jonas Finnemann Jensen | d22e404 | 2019-02-09 14:14:19 +0100 | [diff] [blame] | 113 | var _uploadMedia; |
| 114 | var _uploadOptions; |
Gustav Wibling | 042e646 | 2015-04-10 13:40:06 +0200 | [diff] [blame] | 115 | var _downloadOptions = commons.DownloadOptions.Metadata; |
Jonas Finnemann Jensen | d22e404 | 2019-02-09 14:14:19 +0100 | [diff] [blame] | 116 | var _body; |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 117 | |
| 118 | if (request != null) { |
Jakob Andersen | 52715df | 2018-05-01 13:58:48 +0200 | [diff] [blame] | 119 | _body = convert.json.encode((request).toJson()); |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 120 | } |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 121 | if ($fields != null) { |
| 122 | _queryParams["fields"] = [$fields]; |
| 123 | } |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 124 | |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 125 | _url = 'lineitems/uploadlineitems'; |
| 126 | |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 127 | var _response = _requester.request(_url, "POST", |
| 128 | body: _body, |
| 129 | queryParams: _queryParams, |
| 130 | uploadOptions: _uploadOptions, |
| 131 | uploadMedia: _uploadMedia, |
| 132 | downloadOptions: _downloadOptions); |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 133 | return _response.then((data) => new UploadLineItemsResponse.fromJson(data)); |
| 134 | } |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 135 | } |
| 136 | |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 137 | class QueriesResourceApi { |
Gustav Wibling | 042e646 | 2015-04-10 13:40:06 +0200 | [diff] [blame] | 138 | final commons.ApiRequester _requester; |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 139 | |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 140 | QueriesResourceApi(commons.ApiRequester client) : _requester = client; |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 141 | |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 142 | /// Creates a query. |
| 143 | /// |
| 144 | /// [request] - The metadata request object. |
| 145 | /// |
| 146 | /// Request parameters: |
| 147 | /// |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 148 | /// [asynchronous] - If true, tries to run the query asynchronously. Only |
| 149 | /// applicable when the frequency is ONE_TIME. |
| 150 | /// |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 151 | /// [$fields] - Selector specifying which fields to include in a partial |
| 152 | /// response. |
| 153 | /// |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 154 | /// Completes with a [Query]. |
| 155 | /// |
| 156 | /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 157 | /// error. |
| 158 | /// |
| 159 | /// If the used [http.Client] completes with an error when making a REST call, |
| 160 | /// this method will complete with the same error. |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 161 | async.Future<Query> createquery(Query request, |
| 162 | {core.bool asynchronous, core.String $fields}) { |
Jonas Finnemann Jensen | d22e404 | 2019-02-09 14:14:19 +0100 | [diff] [blame] | 163 | var _url; |
Jakob Andersen | 4ce761d | 2018-04-19 11:19:11 +0200 | [diff] [blame] | 164 | var _queryParams = new core.Map<core.String, core.List<core.String>>(); |
Jonas Finnemann Jensen | d22e404 | 2019-02-09 14:14:19 +0100 | [diff] [blame] | 165 | var _uploadMedia; |
| 166 | var _uploadOptions; |
Gustav Wibling | 042e646 | 2015-04-10 13:40:06 +0200 | [diff] [blame] | 167 | var _downloadOptions = commons.DownloadOptions.Metadata; |
Jonas Finnemann Jensen | d22e404 | 2019-02-09 14:14:19 +0100 | [diff] [blame] | 168 | var _body; |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 169 | |
| 170 | if (request != null) { |
Jakob Andersen | 52715df | 2018-05-01 13:58:48 +0200 | [diff] [blame] | 171 | _body = convert.json.encode((request).toJson()); |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 172 | } |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 173 | if (asynchronous != null) { |
| 174 | _queryParams["asynchronous"] = ["${asynchronous}"]; |
| 175 | } |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 176 | if ($fields != null) { |
| 177 | _queryParams["fields"] = [$fields]; |
| 178 | } |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 179 | |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 180 | _url = 'query'; |
| 181 | |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 182 | var _response = _requester.request(_url, "POST", |
| 183 | body: _body, |
| 184 | queryParams: _queryParams, |
| 185 | uploadOptions: _uploadOptions, |
| 186 | uploadMedia: _uploadMedia, |
| 187 | downloadOptions: _downloadOptions); |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 188 | return _response.then((data) => new Query.fromJson(data)); |
| 189 | } |
| 190 | |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 191 | /// Deletes a stored query as well as the associated stored reports. |
| 192 | /// |
| 193 | /// Request parameters: |
| 194 | /// |
| 195 | /// [queryId] - Query ID to delete. |
| 196 | /// |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 197 | /// [$fields] - Selector specifying which fields to include in a partial |
| 198 | /// response. |
| 199 | /// |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 200 | /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 201 | /// error. |
| 202 | /// |
| 203 | /// If the used [http.Client] completes with an error when making a REST call, |
| 204 | /// this method will complete with the same error. |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 205 | async.Future deletequery(core.String queryId, {core.String $fields}) { |
Jonas Finnemann Jensen | d22e404 | 2019-02-09 14:14:19 +0100 | [diff] [blame] | 206 | var _url; |
Jakob Andersen | 4ce761d | 2018-04-19 11:19:11 +0200 | [diff] [blame] | 207 | var _queryParams = new core.Map<core.String, core.List<core.String>>(); |
Jonas Finnemann Jensen | d22e404 | 2019-02-09 14:14:19 +0100 | [diff] [blame] | 208 | var _uploadMedia; |
| 209 | var _uploadOptions; |
Gustav Wibling | 042e646 | 2015-04-10 13:40:06 +0200 | [diff] [blame] | 210 | var _downloadOptions = commons.DownloadOptions.Metadata; |
Jonas Finnemann Jensen | d22e404 | 2019-02-09 14:14:19 +0100 | [diff] [blame] | 211 | var _body; |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 212 | |
| 213 | if (queryId == null) { |
| 214 | throw new core.ArgumentError("Parameter queryId is required."); |
| 215 | } |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 216 | if ($fields != null) { |
| 217 | _queryParams["fields"] = [$fields]; |
| 218 | } |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 219 | |
| 220 | _downloadOptions = null; |
| 221 | |
Gustav Wibling | 042e646 | 2015-04-10 13:40:06 +0200 | [diff] [blame] | 222 | _url = 'query/' + commons.Escaper.ecapeVariable('$queryId'); |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 223 | |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 224 | var _response = _requester.request(_url, "DELETE", |
| 225 | body: _body, |
| 226 | queryParams: _queryParams, |
| 227 | uploadOptions: _uploadOptions, |
| 228 | uploadMedia: _uploadMedia, |
| 229 | downloadOptions: _downloadOptions); |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 230 | return _response.then((data) => null); |
| 231 | } |
| 232 | |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 233 | /// Retrieves a stored query. |
| 234 | /// |
| 235 | /// Request parameters: |
| 236 | /// |
| 237 | /// [queryId] - Query ID to retrieve. |
| 238 | /// |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 239 | /// [$fields] - Selector specifying which fields to include in a partial |
| 240 | /// response. |
| 241 | /// |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 242 | /// Completes with a [Query]. |
| 243 | /// |
| 244 | /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 245 | /// error. |
| 246 | /// |
| 247 | /// If the used [http.Client] completes with an error when making a REST call, |
| 248 | /// this method will complete with the same error. |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 249 | async.Future<Query> getquery(core.String queryId, {core.String $fields}) { |
Jonas Finnemann Jensen | d22e404 | 2019-02-09 14:14:19 +0100 | [diff] [blame] | 250 | var _url; |
Jakob Andersen | 4ce761d | 2018-04-19 11:19:11 +0200 | [diff] [blame] | 251 | var _queryParams = new core.Map<core.String, core.List<core.String>>(); |
Jonas Finnemann Jensen | d22e404 | 2019-02-09 14:14:19 +0100 | [diff] [blame] | 252 | var _uploadMedia; |
| 253 | var _uploadOptions; |
Gustav Wibling | 042e646 | 2015-04-10 13:40:06 +0200 | [diff] [blame] | 254 | var _downloadOptions = commons.DownloadOptions.Metadata; |
Jonas Finnemann Jensen | d22e404 | 2019-02-09 14:14:19 +0100 | [diff] [blame] | 255 | var _body; |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 256 | |
| 257 | if (queryId == null) { |
| 258 | throw new core.ArgumentError("Parameter queryId is required."); |
| 259 | } |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 260 | if ($fields != null) { |
| 261 | _queryParams["fields"] = [$fields]; |
| 262 | } |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 263 | |
Gustav Wibling | 042e646 | 2015-04-10 13:40:06 +0200 | [diff] [blame] | 264 | _url = 'query/' + commons.Escaper.ecapeVariable('$queryId'); |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 265 | |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 266 | var _response = _requester.request(_url, "GET", |
| 267 | body: _body, |
| 268 | queryParams: _queryParams, |
| 269 | uploadOptions: _uploadOptions, |
| 270 | uploadMedia: _uploadMedia, |
| 271 | downloadOptions: _downloadOptions); |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 272 | return _response.then((data) => new Query.fromJson(data)); |
| 273 | } |
| 274 | |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 275 | /// Retrieves stored queries. |
| 276 | /// |
| 277 | /// Request parameters: |
| 278 | /// |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 279 | /// [pageSize] - Maximum number of results per page. Must be between 1 and |
| 280 | /// 100. Defaults to 100 if unspecified. |
| 281 | /// |
Jonas Finnemann Jensen | b223bd5 | 2020-10-09 13:02:08 +0200 | [diff] [blame^] | 282 | /// [pageToken] - Optional pagination token. |
| 283 | /// |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 284 | /// [$fields] - Selector specifying which fields to include in a partial |
| 285 | /// response. |
| 286 | /// |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 287 | /// Completes with a [ListQueriesResponse]. |
| 288 | /// |
| 289 | /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 290 | /// error. |
| 291 | /// |
| 292 | /// If the used [http.Client] completes with an error when making a REST call, |
| 293 | /// this method will complete with the same error. |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 294 | async.Future<ListQueriesResponse> listqueries( |
Jonas Finnemann Jensen | b223bd5 | 2020-10-09 13:02:08 +0200 | [diff] [blame^] | 295 | {core.int pageSize, core.String pageToken, core.String $fields}) { |
Jonas Finnemann Jensen | d22e404 | 2019-02-09 14:14:19 +0100 | [diff] [blame] | 296 | var _url; |
Jakob Andersen | 4ce761d | 2018-04-19 11:19:11 +0200 | [diff] [blame] | 297 | var _queryParams = new core.Map<core.String, core.List<core.String>>(); |
Jonas Finnemann Jensen | d22e404 | 2019-02-09 14:14:19 +0100 | [diff] [blame] | 298 | var _uploadMedia; |
| 299 | var _uploadOptions; |
Gustav Wibling | 042e646 | 2015-04-10 13:40:06 +0200 | [diff] [blame] | 300 | var _downloadOptions = commons.DownloadOptions.Metadata; |
Jonas Finnemann Jensen | d22e404 | 2019-02-09 14:14:19 +0100 | [diff] [blame] | 301 | var _body; |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 302 | |
Jonas Finnemann Jensen | ef0c8a3 | 2020-10-07 20:58:20 +0200 | [diff] [blame] | 303 | if (pageSize != null) { |
| 304 | _queryParams["pageSize"] = ["${pageSize}"]; |
| 305 | } |
Jonas Finnemann Jensen | b223bd5 | 2020-10-09 13:02:08 +0200 | [diff] [blame^] | 306 | if (pageToken != null) { |
| 307 | _queryParams["pageToken"] = [pageToken]; |
| 308 | } |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 309 | if ($fields != null) { |
| 310 | _queryParams["fields"] = [$fields]; |
| 311 | } |
| 312 | |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 313 | _url = 'queries'; |
| 314 | |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 315 | var _response = _requester.request(_url, "GET", |
| 316 | body: _body, |
| 317 | queryParams: _queryParams, |
| 318 | uploadOptions: _uploadOptions, |
| 319 | uploadMedia: _uploadMedia, |
| 320 | downloadOptions: _downloadOptions); |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 321 | return _response.then((data) => new ListQueriesResponse.fromJson(data)); |
| 322 | } |
| 323 | |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 324 | /// Runs a stored query to generate a report. |
| 325 | /// |
| 326 | /// [request] - The metadata request object. |
| 327 | /// |
| 328 | /// Request parameters: |
| 329 | /// |
| 330 | /// [queryId] - Query ID to run. |
| 331 | /// |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 332 | /// [asynchronous] - If true, tries to run the query asynchronously. |
| 333 | /// |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 334 | /// [$fields] - Selector specifying which fields to include in a partial |
| 335 | /// response. |
| 336 | /// |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 337 | /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 338 | /// error. |
| 339 | /// |
| 340 | /// If the used [http.Client] completes with an error when making a REST call, |
| 341 | /// this method will complete with the same error. |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 342 | async.Future runquery(RunQueryRequest request, core.String queryId, |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 343 | {core.bool asynchronous, core.String $fields}) { |
Jonas Finnemann Jensen | d22e404 | 2019-02-09 14:14:19 +0100 | [diff] [blame] | 344 | var _url; |
Jakob Andersen | 4ce761d | 2018-04-19 11:19:11 +0200 | [diff] [blame] | 345 | var _queryParams = new core.Map<core.String, core.List<core.String>>(); |
Jonas Finnemann Jensen | d22e404 | 2019-02-09 14:14:19 +0100 | [diff] [blame] | 346 | var _uploadMedia; |
| 347 | var _uploadOptions; |
Gustav Wibling | 042e646 | 2015-04-10 13:40:06 +0200 | [diff] [blame] | 348 | var _downloadOptions = commons.DownloadOptions.Metadata; |
Jonas Finnemann Jensen | d22e404 | 2019-02-09 14:14:19 +0100 | [diff] [blame] | 349 | var _body; |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 350 | |
| 351 | if (request != null) { |
Jakob Andersen | 52715df | 2018-05-01 13:58:48 +0200 | [diff] [blame] | 352 | _body = convert.json.encode((request).toJson()); |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 353 | } |
| 354 | if (queryId == null) { |
| 355 | throw new core.ArgumentError("Parameter queryId is required."); |
| 356 | } |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 357 | if (asynchronous != null) { |
| 358 | _queryParams["asynchronous"] = ["${asynchronous}"]; |
| 359 | } |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 360 | if ($fields != null) { |
| 361 | _queryParams["fields"] = [$fields]; |
| 362 | } |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 363 | |
| 364 | _downloadOptions = null; |
| 365 | |
Gustav Wibling | 042e646 | 2015-04-10 13:40:06 +0200 | [diff] [blame] | 366 | _url = 'query/' + commons.Escaper.ecapeVariable('$queryId'); |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 367 | |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 368 | var _response = _requester.request(_url, "POST", |
| 369 | body: _body, |
| 370 | queryParams: _queryParams, |
| 371 | uploadOptions: _uploadOptions, |
| 372 | uploadMedia: _uploadMedia, |
| 373 | downloadOptions: _downloadOptions); |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 374 | return _response.then((data) => null); |
| 375 | } |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 376 | } |
| 377 | |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 378 | class ReportsResourceApi { |
Gustav Wibling | 042e646 | 2015-04-10 13:40:06 +0200 | [diff] [blame] | 379 | final commons.ApiRequester _requester; |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 380 | |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 381 | ReportsResourceApi(commons.ApiRequester client) : _requester = client; |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 382 | |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 383 | /// Retrieves stored reports. |
| 384 | /// |
| 385 | /// Request parameters: |
| 386 | /// |
| 387 | /// [queryId] - Query ID with which the reports are associated. |
| 388 | /// |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 389 | /// [pageSize] - Maximum number of results per page. Must be between 1 and |
| 390 | /// 100. Defaults to 100 if unspecified. |
| 391 | /// |
Jonas Finnemann Jensen | b223bd5 | 2020-10-09 13:02:08 +0200 | [diff] [blame^] | 392 | /// [pageToken] - Optional pagination token. |
| 393 | /// |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 394 | /// [$fields] - Selector specifying which fields to include in a partial |
| 395 | /// response. |
| 396 | /// |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 397 | /// Completes with a [ListReportsResponse]. |
| 398 | /// |
| 399 | /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 400 | /// error. |
| 401 | /// |
| 402 | /// If the used [http.Client] completes with an error when making a REST call, |
| 403 | /// this method will complete with the same error. |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 404 | async.Future<ListReportsResponse> listreports(core.String queryId, |
Jonas Finnemann Jensen | b223bd5 | 2020-10-09 13:02:08 +0200 | [diff] [blame^] | 405 | {core.int pageSize, core.String pageToken, core.String $fields}) { |
Jonas Finnemann Jensen | d22e404 | 2019-02-09 14:14:19 +0100 | [diff] [blame] | 406 | var _url; |
Jakob Andersen | 4ce761d | 2018-04-19 11:19:11 +0200 | [diff] [blame] | 407 | var _queryParams = new core.Map<core.String, core.List<core.String>>(); |
Jonas Finnemann Jensen | d22e404 | 2019-02-09 14:14:19 +0100 | [diff] [blame] | 408 | var _uploadMedia; |
| 409 | var _uploadOptions; |
Gustav Wibling | 042e646 | 2015-04-10 13:40:06 +0200 | [diff] [blame] | 410 | var _downloadOptions = commons.DownloadOptions.Metadata; |
Jonas Finnemann Jensen | d22e404 | 2019-02-09 14:14:19 +0100 | [diff] [blame] | 411 | var _body; |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 412 | |
| 413 | if (queryId == null) { |
| 414 | throw new core.ArgumentError("Parameter queryId is required."); |
| 415 | } |
Jonas Finnemann Jensen | ef0c8a3 | 2020-10-07 20:58:20 +0200 | [diff] [blame] | 416 | if (pageSize != null) { |
| 417 | _queryParams["pageSize"] = ["${pageSize}"]; |
| 418 | } |
Jonas Finnemann Jensen | b223bd5 | 2020-10-09 13:02:08 +0200 | [diff] [blame^] | 419 | if (pageToken != null) { |
| 420 | _queryParams["pageToken"] = [pageToken]; |
| 421 | } |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 422 | if ($fields != null) { |
| 423 | _queryParams["fields"] = [$fields]; |
| 424 | } |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 425 | |
Gustav Wibling | 042e646 | 2015-04-10 13:40:06 +0200 | [diff] [blame] | 426 | _url = 'queries/' + commons.Escaper.ecapeVariable('$queryId') + '/reports'; |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 427 | |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 428 | var _response = _requester.request(_url, "GET", |
| 429 | body: _body, |
| 430 | queryParams: _queryParams, |
| 431 | uploadOptions: _uploadOptions, |
| 432 | uploadMedia: _uploadMedia, |
| 433 | downloadOptions: _downloadOptions); |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 434 | return _response.then((data) => new ListReportsResponse.fromJson(data)); |
| 435 | } |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 436 | } |
| 437 | |
Martin Kustermann | 4ff71db | 2016-11-09 10:46:40 +0100 | [diff] [blame] | 438 | class SdfResourceApi { |
Martin Kustermann | 87dfaba | 2016-02-01 10:23:02 +0100 | [diff] [blame] | 439 | final commons.ApiRequester _requester; |
| 440 | |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 441 | SdfResourceApi(commons.ApiRequester client) : _requester = client; |
Martin Kustermann | 87dfaba | 2016-02-01 10:23:02 +0100 | [diff] [blame] | 442 | |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 443 | /// Retrieves entities in SDF format. |
| 444 | /// |
| 445 | /// [request] - The metadata request object. |
| 446 | /// |
| 447 | /// Request parameters: |
| 448 | /// |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 449 | /// [$fields] - Selector specifying which fields to include in a partial |
| 450 | /// response. |
| 451 | /// |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 452 | /// Completes with a [DownloadResponse]. |
| 453 | /// |
| 454 | /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 455 | /// error. |
| 456 | /// |
| 457 | /// If the used [http.Client] completes with an error when making a REST call, |
| 458 | /// this method will complete with the same error. |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 459 | async.Future<DownloadResponse> download(DownloadRequest request, |
| 460 | {core.String $fields}) { |
Jonas Finnemann Jensen | d22e404 | 2019-02-09 14:14:19 +0100 | [diff] [blame] | 461 | var _url; |
Jakob Andersen | 4ce761d | 2018-04-19 11:19:11 +0200 | [diff] [blame] | 462 | var _queryParams = new core.Map<core.String, core.List<core.String>>(); |
Jonas Finnemann Jensen | d22e404 | 2019-02-09 14:14:19 +0100 | [diff] [blame] | 463 | var _uploadMedia; |
| 464 | var _uploadOptions; |
Martin Kustermann | 87dfaba | 2016-02-01 10:23:02 +0100 | [diff] [blame] | 465 | var _downloadOptions = commons.DownloadOptions.Metadata; |
Jonas Finnemann Jensen | d22e404 | 2019-02-09 14:14:19 +0100 | [diff] [blame] | 466 | var _body; |
Martin Kustermann | 87dfaba | 2016-02-01 10:23:02 +0100 | [diff] [blame] | 467 | |
| 468 | if (request != null) { |
Jakob Andersen | 52715df | 2018-05-01 13:58:48 +0200 | [diff] [blame] | 469 | _body = convert.json.encode((request).toJson()); |
Martin Kustermann | 87dfaba | 2016-02-01 10:23:02 +0100 | [diff] [blame] | 470 | } |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 471 | if ($fields != null) { |
| 472 | _queryParams["fields"] = [$fields]; |
| 473 | } |
Martin Kustermann | 87dfaba | 2016-02-01 10:23:02 +0100 | [diff] [blame] | 474 | |
Martin Kustermann | 4ff71db | 2016-11-09 10:46:40 +0100 | [diff] [blame] | 475 | _url = 'sdf/download'; |
Martin Kustermann | 87dfaba | 2016-02-01 10:23:02 +0100 | [diff] [blame] | 476 | |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 477 | var _response = _requester.request(_url, "POST", |
| 478 | body: _body, |
| 479 | queryParams: _queryParams, |
| 480 | uploadOptions: _uploadOptions, |
| 481 | uploadMedia: _uploadMedia, |
| 482 | downloadOptions: _downloadOptions); |
Martin Kustermann | 4ff71db | 2016-11-09 10:46:40 +0100 | [diff] [blame] | 483 | return _response.then((data) => new DownloadResponse.fromJson(data)); |
Martin Kustermann | 87dfaba | 2016-02-01 10:23:02 +0100 | [diff] [blame] | 484 | } |
Martin Kustermann | 87dfaba | 2016-02-01 10:23:02 +0100 | [diff] [blame] | 485 | } |
| 486 | |
Jonas Finnemann Jensen | ef0c8a3 | 2020-10-07 20:58:20 +0200 | [diff] [blame] | 487 | /// A channel grouping defines a set of rules that can be used to categorize |
| 488 | /// events in a path report. |
| 489 | class ChannelGrouping { |
| 490 | /// The name to apply to an event that does not match any of the rules in the |
| 491 | /// channel grouping. |
| 492 | core.String fallbackName; |
| 493 | |
| 494 | /// Channel Grouping name. |
| 495 | core.String name; |
| 496 | |
| 497 | /// Rules within Channel Grouping. There is a limit of 100 rules that can be |
| 498 | /// set per channel grouping. |
| 499 | core.List<Rule> rules; |
| 500 | |
| 501 | ChannelGrouping(); |
| 502 | |
| 503 | ChannelGrouping.fromJson(core.Map _json) { |
| 504 | if (_json.containsKey("fallbackName")) { |
| 505 | fallbackName = _json["fallbackName"]; |
| 506 | } |
| 507 | if (_json.containsKey("name")) { |
| 508 | name = _json["name"]; |
| 509 | } |
| 510 | if (_json.containsKey("rules")) { |
| 511 | rules = (_json["rules"] as core.List) |
| 512 | .map<Rule>((value) => new Rule.fromJson(value)) |
| 513 | .toList(); |
| 514 | } |
| 515 | } |
| 516 | |
| 517 | core.Map<core.String, core.Object> toJson() { |
| 518 | final core.Map<core.String, core.Object> _json = |
| 519 | new core.Map<core.String, core.Object>(); |
| 520 | if (fallbackName != null) { |
| 521 | _json["fallbackName"] = fallbackName; |
| 522 | } |
| 523 | if (name != null) { |
| 524 | _json["name"] = name; |
| 525 | } |
| 526 | if (rules != null) { |
| 527 | _json["rules"] = rules.map((value) => (value).toJson()).toList(); |
| 528 | } |
| 529 | return _json; |
| 530 | } |
| 531 | } |
| 532 | |
| 533 | /// DisjunctiveMatchStatement that OR's all contained filters. |
| 534 | class DisjunctiveMatchStatement { |
| 535 | /// Filters. There is a limit of 100 filters that can be set per disjunctive |
| 536 | /// match statement. |
| 537 | core.List<EventFilter> eventFilters; |
| 538 | |
| 539 | DisjunctiveMatchStatement(); |
| 540 | |
| 541 | DisjunctiveMatchStatement.fromJson(core.Map _json) { |
| 542 | if (_json.containsKey("eventFilters")) { |
| 543 | eventFilters = (_json["eventFilters"] as core.List) |
| 544 | .map<EventFilter>((value) => new EventFilter.fromJson(value)) |
| 545 | .toList(); |
| 546 | } |
| 547 | } |
| 548 | |
| 549 | core.Map<core.String, core.Object> toJson() { |
| 550 | final core.Map<core.String, core.Object> _json = |
| 551 | new core.Map<core.String, core.Object>(); |
| 552 | if (eventFilters != null) { |
| 553 | _json["eventFilters"] = |
| 554 | eventFilters.map((value) => (value).toJson()).toList(); |
| 555 | } |
| 556 | return _json; |
| 557 | } |
| 558 | } |
| 559 | |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 560 | /// Request to fetch stored line items. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 561 | class DownloadLineItemsRequest { |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 562 | /// File specification (column names, types, order) in which the line items |
| 563 | /// will be returned. Default to EWF. |
| 564 | /// Possible string values are: |
| 565 | /// - "EWF" |
Gustav Wibling | 6d47707 | 2015-10-19 16:19:14 +0200 | [diff] [blame] | 566 | core.String fileSpec; |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 567 | |
| 568 | /// Ids of the specified filter type used to filter line items to fetch. If |
| 569 | /// omitted, all the line items will be returned. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 570 | core.List<core.String> filterIds; |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 571 | |
| 572 | /// Filter type used to filter line items to fetch. |
| 573 | /// Possible string values are: |
| 574 | /// - "ADVERTISER_ID" |
| 575 | /// - "INSERTION_ORDER_ID" |
| 576 | /// - "LINE_ITEM_ID" |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 577 | core.String filterType; |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 578 | |
| 579 | /// Format in which the line items will be returned. Default to CSV. |
| 580 | /// Possible string values are: |
| 581 | /// - "CSV" |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 582 | core.String format; |
| 583 | |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 584 | DownloadLineItemsRequest(); |
| 585 | |
| 586 | DownloadLineItemsRequest.fromJson(core.Map _json) { |
Gustav Wibling | 6d47707 | 2015-10-19 16:19:14 +0200 | [diff] [blame] | 587 | if (_json.containsKey("fileSpec")) { |
| 588 | fileSpec = _json["fileSpec"]; |
| 589 | } |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 590 | if (_json.containsKey("filterIds")) { |
Jakob Andersen | 52715df | 2018-05-01 13:58:48 +0200 | [diff] [blame] | 591 | filterIds = (_json["filterIds"] as core.List).cast<core.String>(); |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 592 | } |
| 593 | if (_json.containsKey("filterType")) { |
| 594 | filterType = _json["filterType"]; |
| 595 | } |
| 596 | if (_json.containsKey("format")) { |
| 597 | format = _json["format"]; |
| 598 | } |
| 599 | } |
| 600 | |
Martin Kustermann | 3953f0d | 2017-06-12 16:59:53 +0200 | [diff] [blame] | 601 | core.Map<core.String, core.Object> toJson() { |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 602 | final core.Map<core.String, core.Object> _json = |
| 603 | new core.Map<core.String, core.Object>(); |
Gustav Wibling | 6d47707 | 2015-10-19 16:19:14 +0200 | [diff] [blame] | 604 | if (fileSpec != null) { |
| 605 | _json["fileSpec"] = fileSpec; |
| 606 | } |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 607 | if (filterIds != null) { |
| 608 | _json["filterIds"] = filterIds; |
| 609 | } |
| 610 | if (filterType != null) { |
| 611 | _json["filterType"] = filterType; |
| 612 | } |
| 613 | if (format != null) { |
| 614 | _json["format"] = format; |
| 615 | } |
| 616 | return _json; |
| 617 | } |
| 618 | } |
| 619 | |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 620 | /// Download line items response. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 621 | class DownloadLineItemsResponse { |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 622 | /// Retrieved line items in CSV format. For more information about file |
Jonas Finnemann Jensen | ef0c8a3 | 2020-10-07 20:58:20 +0200 | [diff] [blame] | 623 | /// formats, see Entity Write File Format. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 624 | core.String lineItems; |
| 625 | |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 626 | DownloadLineItemsResponse(); |
| 627 | |
| 628 | DownloadLineItemsResponse.fromJson(core.Map _json) { |
| 629 | if (_json.containsKey("lineItems")) { |
| 630 | lineItems = _json["lineItems"]; |
| 631 | } |
| 632 | } |
| 633 | |
Martin Kustermann | 3953f0d | 2017-06-12 16:59:53 +0200 | [diff] [blame] | 634 | core.Map<core.String, core.Object> toJson() { |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 635 | final core.Map<core.String, core.Object> _json = |
| 636 | new core.Map<core.String, core.Object>(); |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 637 | if (lineItems != null) { |
| 638 | _json["lineItems"] = lineItems; |
| 639 | } |
| 640 | return _json; |
| 641 | } |
| 642 | } |
| 643 | |
Jonas Finnemann Jensen | dda12e4 | 2019-02-09 12:37:20 +0100 | [diff] [blame] | 644 | /// Request to fetch stored inventory sources, campaigns, insertion orders, line |
Jonas Finnemann Jensen | ef0c8a3 | 2020-10-07 20:58:20 +0200 | [diff] [blame] | 645 | /// items, YouTube ad groups and ads. |
Martin Kustermann | 4ff71db | 2016-11-09 10:46:40 +0100 | [diff] [blame] | 646 | class DownloadRequest { |
Jonas Finnemann Jensen | ee696b1 | 2019-07-04 15:07:25 +0200 | [diff] [blame] | 647 | /// File types that will be returned. If INVENTORY_SOURCE is requested, no |
Jonas Finnemann Jensen | ef0c8a3 | 2020-10-07 20:58:20 +0200 | [diff] [blame] | 648 | /// other file types may be requested. Acceptable values are: - "AD" - |
| 649 | /// "AD_GROUP" - "CAMPAIGN" - "INSERTION_ORDER" - "INVENTORY_SOURCE" - |
| 650 | /// "LINE_ITEM" |
Martin Kustermann | 4ff71db | 2016-11-09 10:46:40 +0100 | [diff] [blame] | 651 | core.List<core.String> fileTypes; |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 652 | |
| 653 | /// The IDs of the specified filter type. This is used to filter entities to |
Jonas Finnemann Jensen | dda12e4 | 2019-02-09 12:37:20 +0100 | [diff] [blame] | 654 | /// fetch. At least one ID must be specified. |
Martin Kustermann | 4ff71db | 2016-11-09 10:46:40 +0100 | [diff] [blame] | 655 | core.List<core.String> filterIds; |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 656 | |
Jonas Finnemann Jensen | ee696b1 | 2019-07-04 15:07:25 +0200 | [diff] [blame] | 657 | /// Filter type used to filter entities to fetch. PARTNER_ID and |
| 658 | /// INVENTORY_SOURCE_ID may only be used when downloading inventory sources. |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 659 | /// Possible string values are: |
| 660 | /// - "ADVERTISER_ID" |
| 661 | /// - "INSERTION_ORDER_ID" |
| 662 | /// - "LINE_ITEM_ID" |
Jonas Finnemann Jensen | ef0c8a3 | 2020-10-07 20:58:20 +0200 | [diff] [blame] | 663 | /// - "CAMPAIGN_ID" |
| 664 | /// - "INVENTORY_SOURCE_ID" |
Jonas Finnemann Jensen | dda12e4 | 2019-02-09 12:37:20 +0100 | [diff] [blame] | 665 | /// - "PARTNER_ID" |
Martin Kustermann | 4ff71db | 2016-11-09 10:46:40 +0100 | [diff] [blame] | 666 | core.String filterType; |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 667 | |
| 668 | /// SDF Version (column names, types, order) in which the entities will be |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 669 | /// returned. Default to 5. |
Martin Kustermann | 4ff71db | 2016-11-09 10:46:40 +0100 | [diff] [blame] | 670 | core.String version; |
| 671 | |
| 672 | DownloadRequest(); |
| 673 | |
| 674 | DownloadRequest.fromJson(core.Map _json) { |
| 675 | if (_json.containsKey("fileTypes")) { |
Jakob Andersen | 52715df | 2018-05-01 13:58:48 +0200 | [diff] [blame] | 676 | fileTypes = (_json["fileTypes"] as core.List).cast<core.String>(); |
Martin Kustermann | 4ff71db | 2016-11-09 10:46:40 +0100 | [diff] [blame] | 677 | } |
| 678 | if (_json.containsKey("filterIds")) { |
Jakob Andersen | 52715df | 2018-05-01 13:58:48 +0200 | [diff] [blame] | 679 | filterIds = (_json["filterIds"] as core.List).cast<core.String>(); |
Martin Kustermann | 4ff71db | 2016-11-09 10:46:40 +0100 | [diff] [blame] | 680 | } |
| 681 | if (_json.containsKey("filterType")) { |
| 682 | filterType = _json["filterType"]; |
| 683 | } |
| 684 | if (_json.containsKey("version")) { |
| 685 | version = _json["version"]; |
| 686 | } |
| 687 | } |
| 688 | |
Martin Kustermann | 3953f0d | 2017-06-12 16:59:53 +0200 | [diff] [blame] | 689 | core.Map<core.String, core.Object> toJson() { |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 690 | final core.Map<core.String, core.Object> _json = |
| 691 | new core.Map<core.String, core.Object>(); |
Martin Kustermann | 4ff71db | 2016-11-09 10:46:40 +0100 | [diff] [blame] | 692 | if (fileTypes != null) { |
| 693 | _json["fileTypes"] = fileTypes; |
| 694 | } |
| 695 | if (filterIds != null) { |
| 696 | _json["filterIds"] = filterIds; |
| 697 | } |
| 698 | if (filterType != null) { |
| 699 | _json["filterType"] = filterType; |
| 700 | } |
| 701 | if (version != null) { |
| 702 | _json["version"] = version; |
| 703 | } |
| 704 | return _json; |
| 705 | } |
| 706 | } |
| 707 | |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 708 | /// Download response. |
Martin Kustermann | 4ff71db | 2016-11-09 10:46:40 +0100 | [diff] [blame] | 709 | class DownloadResponse { |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 710 | /// Retrieved ad groups in SDF format. |
Martin Kustermann | 4ff71db | 2016-11-09 10:46:40 +0100 | [diff] [blame] | 711 | core.String adGroups; |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 712 | |
| 713 | /// Retrieved ads in SDF format. |
Martin Kustermann | 4ff71db | 2016-11-09 10:46:40 +0100 | [diff] [blame] | 714 | core.String ads; |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 715 | |
Martin Kustermann | a525076 | 2018-02-19 12:56:45 +0100 | [diff] [blame] | 716 | /// Retrieved campaigns in SDF format. |
| 717 | core.String campaigns; |
| 718 | |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 719 | /// Retrieved insertion orders in SDF format. |
Martin Kustermann | 4ff71db | 2016-11-09 10:46:40 +0100 | [diff] [blame] | 720 | core.String insertionOrders; |
Jonas Finnemann Jensen | dda12e4 | 2019-02-09 12:37:20 +0100 | [diff] [blame] | 721 | core.String inventorySources; |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 722 | |
| 723 | /// Retrieved line items in SDF format. |
Martin Kustermann | 4ff71db | 2016-11-09 10:46:40 +0100 | [diff] [blame] | 724 | core.String lineItems; |
| 725 | |
| 726 | DownloadResponse(); |
| 727 | |
| 728 | DownloadResponse.fromJson(core.Map _json) { |
| 729 | if (_json.containsKey("adGroups")) { |
| 730 | adGroups = _json["adGroups"]; |
| 731 | } |
| 732 | if (_json.containsKey("ads")) { |
| 733 | ads = _json["ads"]; |
| 734 | } |
Martin Kustermann | a525076 | 2018-02-19 12:56:45 +0100 | [diff] [blame] | 735 | if (_json.containsKey("campaigns")) { |
| 736 | campaigns = _json["campaigns"]; |
| 737 | } |
Martin Kustermann | 4ff71db | 2016-11-09 10:46:40 +0100 | [diff] [blame] | 738 | if (_json.containsKey("insertionOrders")) { |
| 739 | insertionOrders = _json["insertionOrders"]; |
| 740 | } |
Jonas Finnemann Jensen | dda12e4 | 2019-02-09 12:37:20 +0100 | [diff] [blame] | 741 | if (_json.containsKey("inventorySources")) { |
| 742 | inventorySources = _json["inventorySources"]; |
| 743 | } |
Martin Kustermann | 4ff71db | 2016-11-09 10:46:40 +0100 | [diff] [blame] | 744 | if (_json.containsKey("lineItems")) { |
| 745 | lineItems = _json["lineItems"]; |
| 746 | } |
| 747 | } |
| 748 | |
Martin Kustermann | 3953f0d | 2017-06-12 16:59:53 +0200 | [diff] [blame] | 749 | core.Map<core.String, core.Object> toJson() { |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 750 | final core.Map<core.String, core.Object> _json = |
| 751 | new core.Map<core.String, core.Object>(); |
Martin Kustermann | 4ff71db | 2016-11-09 10:46:40 +0100 | [diff] [blame] | 752 | if (adGroups != null) { |
| 753 | _json["adGroups"] = adGroups; |
| 754 | } |
| 755 | if (ads != null) { |
| 756 | _json["ads"] = ads; |
| 757 | } |
Martin Kustermann | a525076 | 2018-02-19 12:56:45 +0100 | [diff] [blame] | 758 | if (campaigns != null) { |
| 759 | _json["campaigns"] = campaigns; |
| 760 | } |
Martin Kustermann | 4ff71db | 2016-11-09 10:46:40 +0100 | [diff] [blame] | 761 | if (insertionOrders != null) { |
| 762 | _json["insertionOrders"] = insertionOrders; |
| 763 | } |
Jonas Finnemann Jensen | dda12e4 | 2019-02-09 12:37:20 +0100 | [diff] [blame] | 764 | if (inventorySources != null) { |
| 765 | _json["inventorySources"] = inventorySources; |
| 766 | } |
Martin Kustermann | 4ff71db | 2016-11-09 10:46:40 +0100 | [diff] [blame] | 767 | if (lineItems != null) { |
| 768 | _json["lineItems"] = lineItems; |
| 769 | } |
| 770 | return _json; |
| 771 | } |
| 772 | } |
| 773 | |
Jonas Finnemann Jensen | ef0c8a3 | 2020-10-07 20:58:20 +0200 | [diff] [blame] | 774 | /// Defines the type of filter to be applied to the path, a DV360 event |
| 775 | /// dimension filter. |
| 776 | class EventFilter { |
| 777 | /// Filter on a dimension. |
| 778 | PathQueryOptionsFilter dimensionFilter; |
| 779 | |
| 780 | EventFilter(); |
| 781 | |
| 782 | EventFilter.fromJson(core.Map _json) { |
| 783 | if (_json.containsKey("dimensionFilter")) { |
| 784 | dimensionFilter = |
| 785 | new PathQueryOptionsFilter.fromJson(_json["dimensionFilter"]); |
| 786 | } |
| 787 | } |
| 788 | |
| 789 | core.Map<core.String, core.Object> toJson() { |
| 790 | final core.Map<core.String, core.Object> _json = |
| 791 | new core.Map<core.String, core.Object>(); |
| 792 | if (dimensionFilter != null) { |
| 793 | _json["dimensionFilter"] = (dimensionFilter).toJson(); |
| 794 | } |
| 795 | return _json; |
| 796 | } |
| 797 | } |
| 798 | |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 799 | /// Filter used to match traffic data in your report. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 800 | class FilterPair { |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 801 | /// Filter type. |
| 802 | /// Possible string values are: |
Jonas Finnemann Jensen | ef0c8a3 | 2020-10-07 20:58:20 +0200 | [diff] [blame] | 803 | /// - "FILTER_UNKNOWN" |
| 804 | /// - "FILTER_DATE" |
| 805 | /// - "FILTER_DAY_OF_WEEK" |
| 806 | /// - "FILTER_WEEK" |
| 807 | /// - "FILTER_MONTH" |
| 808 | /// - "FILTER_YEAR" |
| 809 | /// - "FILTER_TIME_OF_DAY" |
| 810 | /// - "FILTER_CONVERSION_DELAY" |
| 811 | /// - "FILTER_CREATIVE_ID" |
| 812 | /// - "FILTER_CREATIVE_SIZE" |
| 813 | /// - "FILTER_CREATIVE_TYPE" |
| 814 | /// - "FILTER_EXCHANGE_ID" |
| 815 | /// - "FILTER_AD_POSITION" |
| 816 | /// - "FILTER_PUBLIC_INVENTORY" |
| 817 | /// - "FILTER_INVENTORY_SOURCE" |
| 818 | /// - "FILTER_CITY" |
| 819 | /// - "FILTER_REGION" |
| 820 | /// - "FILTER_DMA" |
| 821 | /// - "FILTER_COUNTRY" |
| 822 | /// - "FILTER_SITE_ID" |
| 823 | /// - "FILTER_CHANNEL_ID" |
| 824 | /// - "FILTER_PARTNER" |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 825 | /// - "FILTER_ADVERTISER" |
Jonas Finnemann Jensen | ef0c8a3 | 2020-10-07 20:58:20 +0200 | [diff] [blame] | 826 | /// - "FILTER_INSERTION_ORDER" |
| 827 | /// - "FILTER_LINE_ITEM" |
| 828 | /// - "FILTER_PARTNER_CURRENCY" |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 829 | /// - "FILTER_ADVERTISER_CURRENCY" |
Jonas Finnemann Jensen | ef0c8a3 | 2020-10-07 20:58:20 +0200 | [diff] [blame] | 830 | /// - "FILTER_ADVERTISER_TIMEZONE" |
| 831 | /// - "FILTER_LINE_ITEM_TYPE" |
| 832 | /// - "FILTER_USER_LIST" |
| 833 | /// - "FILTER_USER_LIST_FIRST_PARTY" |
| 834 | /// - "FILTER_USER_LIST_THIRD_PARTY" |
| 835 | /// - "FILTER_TARGETED_USER_LIST" |
| 836 | /// - "FILTER_DATA_PROVIDER" |
| 837 | /// - "FILTER_ORDER_ID" |
| 838 | /// - "FILTER_VIDEO_PLAYER_SIZE" |
| 839 | /// - "FILTER_VIDEO_DURATION_SECONDS" |
| 840 | /// - "FILTER_KEYWORD" |
| 841 | /// - "FILTER_PAGE_CATEGORY" |
| 842 | /// - "FILTER_CAMPAIGN_DAILY_FREQUENCY" |
| 843 | /// - "FILTER_LINE_ITEM_DAILY_FREQUENCY" |
| 844 | /// - "FILTER_LINE_ITEM_LIFETIME_FREQUENCY" |
| 845 | /// - "FILTER_OS" |
| 846 | /// - "FILTER_BROWSER" |
| 847 | /// - "FILTER_CARRIER" |
| 848 | /// - "FILTER_SITE_LANGUAGE" |
| 849 | /// - "FILTER_INVENTORY_FORMAT" |
| 850 | /// - "FILTER_ZIP_CODE" |
| 851 | /// - "FILTER_VIDEO_RATING_TIER" |
| 852 | /// - "FILTER_VIDEO_FORMAT_SUPPORT" |
| 853 | /// - "FILTER_VIDEO_SKIPPABLE_SUPPORT" |
| 854 | /// - "FILTER_VIDEO_VPAID_SUPPORT" |
| 855 | /// - "FILTER_VIDEO_CREATIVE_DURATION" |
| 856 | /// - "FILTER_PAGE_LAYOUT" |
| 857 | /// - "FILTER_VIDEO_AD_POSITION_IN_STREAM" |
| 858 | /// - "FILTER_AGE" |
| 859 | /// - "FILTER_GENDER" |
| 860 | /// - "FILTER_QUARTER" |
| 861 | /// - "FILTER_TRUEVIEW_CONVERSION_TYPE" |
| 862 | /// - "FILTER_MOBILE_GEO" |
| 863 | /// - "FILTER_MRAID_SUPPORT" |
| 864 | /// - "FILTER_ACTIVE_VIEW_EXPECTED_VIEWABILITY" |
| 865 | /// - "FILTER_VIDEO_CREATIVE_DURATION_SKIPPABLE" |
| 866 | /// - "FILTER_NIELSEN_COUNTRY_CODE" |
| 867 | /// - "FILTER_NIELSEN_DEVICE_ID" |
| 868 | /// - "FILTER_NIELSEN_GENDER" |
| 869 | /// - "FILTER_NIELSEN_AGE" |
| 870 | /// - "FILTER_INVENTORY_SOURCE_TYPE" |
| 871 | /// - "FILTER_CREATIVE_WIDTH" |
| 872 | /// - "FILTER_CREATIVE_HEIGHT" |
| 873 | /// - "FILTER_DFP_ORDER_ID" |
| 874 | /// - "FILTER_TRUEVIEW_AGE" |
| 875 | /// - "FILTER_TRUEVIEW_GENDER" |
| 876 | /// - "FILTER_TRUEVIEW_PARENTAL_STATUS" |
| 877 | /// - "FILTER_TRUEVIEW_REMARKETING_LIST" |
| 878 | /// - "FILTER_TRUEVIEW_INTEREST" |
| 879 | /// - "FILTER_TRUEVIEW_AD_GROUP_ID" |
| 880 | /// - "FILTER_TRUEVIEW_AD_GROUP_AD_ID" |
| 881 | /// - "FILTER_TRUEVIEW_IAR_LANGUAGE" |
| 882 | /// - "FILTER_TRUEVIEW_IAR_GENDER" |
| 883 | /// - "FILTER_TRUEVIEW_IAR_AGE" |
| 884 | /// - "FILTER_TRUEVIEW_IAR_CATEGORY" |
| 885 | /// - "FILTER_TRUEVIEW_IAR_COUNTRY" |
| 886 | /// - "FILTER_TRUEVIEW_IAR_CITY" |
| 887 | /// - "FILTER_TRUEVIEW_IAR_REGION" |
| 888 | /// - "FILTER_TRUEVIEW_IAR_ZIPCODE" |
| 889 | /// - "FILTER_TRUEVIEW_IAR_REMARKETING_LIST" |
| 890 | /// - "FILTER_TRUEVIEW_IAR_INTEREST" |
| 891 | /// - "FILTER_TRUEVIEW_IAR_PARENTAL_STATUS" |
| 892 | /// - "FILTER_TRUEVIEW_IAR_TIME_OF_DAY" |
| 893 | /// - "FILTER_TRUEVIEW_CUSTOM_AFFINITY" |
| 894 | /// - "FILTER_TRUEVIEW_CATEGORY" |
| 895 | /// - "FILTER_TRUEVIEW_KEYWORD" |
| 896 | /// - "FILTER_TRUEVIEW_PLACEMENT" |
| 897 | /// - "FILTER_TRUEVIEW_URL" |
| 898 | /// - "FILTER_TRUEVIEW_COUNTRY" |
| 899 | /// - "FILTER_TRUEVIEW_REGION" |
| 900 | /// - "FILTER_TRUEVIEW_CITY" |
| 901 | /// - "FILTER_TRUEVIEW_DMA" |
| 902 | /// - "FILTER_TRUEVIEW_ZIPCODE" |
| 903 | /// - "FILTER_NOT_SUPPORTED" |
| 904 | /// - "FILTER_MEDIA_PLAN" |
| 905 | /// - "FILTER_TRUEVIEW_IAR_YOUTUBE_CHANNEL" |
| 906 | /// - "FILTER_TRUEVIEW_IAR_YOUTUBE_VIDEO" |
| 907 | /// - "FILTER_SKIPPABLE_SUPPORT" |
| 908 | /// - "FILTER_COMPANION_CREATIVE_ID" |
| 909 | /// - "FILTER_BUDGET_SEGMENT_DESCRIPTION" |
| 910 | /// - "FILTER_FLOODLIGHT_ACTIVITY_ID" |
| 911 | /// - "FILTER_DEVICE_MODEL" |
| 912 | /// - "FILTER_DEVICE_MAKE" |
| 913 | /// - "FILTER_DEVICE_TYPE" |
| 914 | /// - "FILTER_CREATIVE_ATTRIBUTE" |
| 915 | /// - "FILTER_INVENTORY_COMMITMENT_TYPE" |
| 916 | /// - "FILTER_INVENTORY_RATE_TYPE" |
| 917 | /// - "FILTER_INVENTORY_DELIVERY_METHOD" |
| 918 | /// - "FILTER_INVENTORY_SOURCE_EXTERNAL_ID" |
| 919 | /// - "FILTER_AUTHORIZED_SELLER_STATE" |
| 920 | /// - "FILTER_VIDEO_DURATION_SECONDS_RANGE" |
| 921 | /// - "FILTER_PARTNER_NAME" |
| 922 | /// - "FILTER_PARTNER_STATUS" |
| 923 | /// - "FILTER_ADVERTISER_NAME" |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 924 | /// - "FILTER_ADVERTISER_INTEGRATION_CODE" |
| 925 | /// - "FILTER_ADVERTISER_INTEGRATION_STATUS" |
Jonas Finnemann Jensen | ef0c8a3 | 2020-10-07 20:58:20 +0200 | [diff] [blame] | 926 | /// - "FILTER_CARRIER_NAME" |
| 927 | /// - "FILTER_CHANNEL_NAME" |
| 928 | /// - "FILTER_CITY_NAME" |
| 929 | /// - "FILTER_COMPANION_CREATIVE_NAME" |
| 930 | /// - "FILTER_USER_LIST_FIRST_PARTY_NAME" |
| 931 | /// - "FILTER_USER_LIST_THIRD_PARTY_NAME" |
| 932 | /// - "FILTER_NIELSEN_RESTATEMENT_DATE" |
| 933 | /// - "FILTER_NIELSEN_DATE_RANGE" |
| 934 | /// - "FILTER_INSERTION_ORDER_NAME" |
| 935 | /// - "FILTER_REGION_NAME" |
| 936 | /// - "FILTER_DMA_NAME" |
| 937 | /// - "FILTER_TRUEVIEW_IAR_REGION_NAME" |
| 938 | /// - "FILTER_TRUEVIEW_DMA_NAME" |
| 939 | /// - "FILTER_TRUEVIEW_REGION_NAME" |
| 940 | /// - "FILTER_ACTIVE_VIEW_CUSTOM_METRIC_ID" |
| 941 | /// - "FILTER_ACTIVE_VIEW_CUSTOM_METRIC_NAME" |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 942 | /// - "FILTER_AD_TYPE" |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 943 | /// - "FILTER_ALGORITHM" |
| 944 | /// - "FILTER_ALGORITHM_ID" |
| 945 | /// - "FILTER_AMP_PAGE_REQUEST" |
| 946 | /// - "FILTER_ANONYMOUS_INVENTORY_MODELING" |
| 947 | /// - "FILTER_APP_URL" |
| 948 | /// - "FILTER_APP_URL_EXCLUDED" |
| 949 | /// - "FILTER_ATTRIBUTED_USERLIST" |
| 950 | /// - "FILTER_ATTRIBUTED_USERLIST_COST" |
| 951 | /// - "FILTER_ATTRIBUTED_USERLIST_TYPE" |
| 952 | /// - "FILTER_ATTRIBUTION_MODEL" |
| 953 | /// - "FILTER_AUDIENCE_LIST" |
| 954 | /// - "FILTER_AUDIENCE_LIST_COST" |
| 955 | /// - "FILTER_AUDIENCE_LIST_TYPE" |
| 956 | /// - "FILTER_AUDIENCE_NAME" |
| 957 | /// - "FILTER_AUDIENCE_TYPE" |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 958 | /// - "FILTER_BILLABLE_OUTCOME" |
| 959 | /// - "FILTER_BRAND_LIFT_TYPE" |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 960 | /// - "FILTER_CHANNEL_TYPE" |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 961 | /// - "FILTER_CM_PLACEMENT_ID" |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 962 | /// - "FILTER_CONVERSION_SOURCE" |
| 963 | /// - "FILTER_CONVERSION_SOURCE_ID" |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 964 | /// - "FILTER_COUNTRY_ID" |
| 965 | /// - "FILTER_CREATIVE" |
| 966 | /// - "FILTER_CREATIVE_ASSET" |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 967 | /// - "FILTER_CREATIVE_INTEGRATION_CODE" |
| 968 | /// - "FILTER_CREATIVE_RENDERED_IN_AMP" |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 969 | /// - "FILTER_CREATIVE_SOURCE" |
| 970 | /// - "FILTER_CREATIVE_STATUS" |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 971 | /// - "FILTER_DATA_PROVIDER_NAME" |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 972 | /// - "FILTER_DETAILED_DEMOGRAPHICS" |
| 973 | /// - "FILTER_DETAILED_DEMOGRAPHICS_ID" |
| 974 | /// - "FILTER_DEVICE" |
Jonas Finnemann Jensen | ef0c8a3 | 2020-10-07 20:58:20 +0200 | [diff] [blame] | 975 | /// - "FILTER_GAM_INSERTION_ORDER" |
| 976 | /// - "FILTER_GAM_LINE_ITEM" |
| 977 | /// - "FILTER_GAM_LINE_ITEM_ID" |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 978 | /// - "FILTER_DIGITAL_CONTENT_LABEL" |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 979 | /// - "FILTER_DOMAIN" |
| 980 | /// - "FILTER_ELIGIBLE_COOKIES_ON_FIRST_PARTY_AUDIENCE_LIST" |
| 981 | /// - "FILTER_ELIGIBLE_COOKIES_ON_THIRD_PARTY_AUDIENCE_LIST_AND_INTEREST" |
| 982 | /// - "FILTER_EXCHANGE" |
| 983 | /// - "FILTER_EXCHANGE_CODE" |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 984 | /// - "FILTER_EXTENSION" |
| 985 | /// - "FILTER_EXTENSION_STATUS" |
| 986 | /// - "FILTER_EXTENSION_TYPE" |
| 987 | /// - "FILTER_FIRST_PARTY_AUDIENCE_LIST_COST" |
| 988 | /// - "FILTER_FIRST_PARTY_AUDIENCE_LIST_TYPE" |
| 989 | /// - "FILTER_FLOODLIGHT_ACTIVITY" |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 990 | /// - "FILTER_FORMAT" |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 991 | /// - "FILTER_GMAIL_AGE" |
| 992 | /// - "FILTER_GMAIL_CITY" |
| 993 | /// - "FILTER_GMAIL_COUNTRY" |
| 994 | /// - "FILTER_GMAIL_COUNTRY_NAME" |
| 995 | /// - "FILTER_GMAIL_DEVICE_TYPE" |
| 996 | /// - "FILTER_GMAIL_DEVICE_TYPE_NAME" |
| 997 | /// - "FILTER_GMAIL_GENDER" |
| 998 | /// - "FILTER_GMAIL_REGION" |
| 999 | /// - "FILTER_GMAIL_REMARKETING_LIST" |
| 1000 | /// - "FILTER_HOUSEHOLD_INCOME" |
| 1001 | /// - "FILTER_IMPRESSION_COUNTING_METHOD" |
Jonas Finnemann Jensen | ef0c8a3 | 2020-10-07 20:58:20 +0200 | [diff] [blame] | 1002 | /// - "FILTER_YOUTUBE_PROGRAMMATIC_GUARANTEED_INSERTION_ORDER" |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 1003 | /// - "FILTER_INSERTION_ORDER_INTEGRATION_CODE" |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 1004 | /// - "FILTER_INSERTION_ORDER_STATUS" |
| 1005 | /// - "FILTER_INTEREST" |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 1006 | /// - "FILTER_INVENTORY_SOURCE_GROUP" |
| 1007 | /// - "FILTER_INVENTORY_SOURCE_GROUP_ID" |
| 1008 | /// - "FILTER_INVENTORY_SOURCE_ID" |
| 1009 | /// - "FILTER_INVENTORY_SOURCE_NAME" |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 1010 | /// - "FILTER_LIFE_EVENT" |
| 1011 | /// - "FILTER_LIFE_EVENTS" |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 1012 | /// - "FILTER_LINE_ITEM_INTEGRATION_CODE" |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 1013 | /// - "FILTER_LINE_ITEM_NAME" |
| 1014 | /// - "FILTER_LINE_ITEM_STATUS" |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 1015 | /// - "FILTER_MATCH_RATIO" |
| 1016 | /// - "FILTER_MEASUREMENT_SOURCE" |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 1017 | /// - "FILTER_MEDIA_PLAN_NAME" |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 1018 | /// - "FILTER_PARENTAL_STATUS" |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 1019 | /// - "FILTER_PLACEMENT_ALL_YOUTUBE_CHANNELS" |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 1020 | /// - "FILTER_PLATFORM" |
| 1021 | /// - "FILTER_PLAYBACK_METHOD" |
| 1022 | /// - "FILTER_POSITION_IN_CONTENT" |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 1023 | /// - "FILTER_PUBLISHER_PROPERTY" |
| 1024 | /// - "FILTER_PUBLISHER_PROPERTY_ID" |
| 1025 | /// - "FILTER_PUBLISHER_PROPERTY_SECTION" |
| 1026 | /// - "FILTER_PUBLISHER_PROPERTY_SECTION_ID" |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 1027 | /// - "FILTER_REFUND_REASON" |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 1028 | /// - "FILTER_REMARKETING_LIST" |
| 1029 | /// - "FILTER_REWARDED" |
| 1030 | /// - "FILTER_SENSITIVE_CATEGORY" |
| 1031 | /// - "FILTER_SERVED_PIXEL_DENSITY" |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 1032 | /// - "FILTER_TARGETED_DATA_PROVIDERS" |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 1033 | /// - "FILTER_THIRD_PARTY_AUDIENCE_LIST_COST" |
| 1034 | /// - "FILTER_THIRD_PARTY_AUDIENCE_LIST_TYPE" |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 1035 | /// - "FILTER_TRUEVIEW_AD" |
| 1036 | /// - "FILTER_TRUEVIEW_AD_GROUP" |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 1037 | /// - "FILTER_TRUEVIEW_DETAILED_DEMOGRAPHICS" |
| 1038 | /// - "FILTER_TRUEVIEW_DETAILED_DEMOGRAPHICS_ID" |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 1039 | /// - "FILTER_TRUEVIEW_HOUSEHOLD_INCOME" |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 1040 | /// - "FILTER_TRUEVIEW_IAR_COUNTRY_NAME" |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 1041 | /// - "FILTER_TRUEVIEW_REMARKETING_LIST_NAME" |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 1042 | /// - "FILTER_VARIANT_ID" |
| 1043 | /// - "FILTER_VARIANT_NAME" |
| 1044 | /// - "FILTER_VARIANT_VERSION" |
| 1045 | /// - "FILTER_VERIFICATION_VIDEO_PLAYER_SIZE" |
| 1046 | /// - "FILTER_VERIFICATION_VIDEO_POSITION" |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 1047 | /// - "FILTER_VIDEO_COMPANION_CREATIVE_SIZE" |
| 1048 | /// - "FILTER_VIDEO_CONTINUOUS_PLAY" |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 1049 | /// - "FILTER_VIDEO_DURATION" |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 1050 | /// - "FILTER_YOUTUBE_ADAPTED_AUDIENCE_LIST" |
| 1051 | /// - "FILTER_YOUTUBE_AD_VIDEO" |
| 1052 | /// - "FILTER_YOUTUBE_AD_VIDEO_ID" |
| 1053 | /// - "FILTER_YOUTUBE_CHANNEL" |
| 1054 | /// - "FILTER_YOUTUBE_PROGRAMMATIC_GUARANTEED_ADVERTISER" |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 1055 | /// - "FILTER_YOUTUBE_PROGRAMMATIC_GUARANTEED_PARTNER" |
| 1056 | /// - "FILTER_YOUTUBE_VIDEO" |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 1057 | /// - "FILTER_ZIP_POSTAL_CODE" |
Jonas Finnemann Jensen | ef0c8a3 | 2020-10-07 20:58:20 +0200 | [diff] [blame] | 1058 | /// - "FILTER_PLACEMENT_NAME_ALL_YOUTUBE_CHANNELS" |
| 1059 | /// - "FILTER_TRUEVIEW_PLACEMENT_ID" |
| 1060 | /// - "FILTER_PATH_PATTERN_ID" |
| 1061 | /// - "FILTER_PATH_EVENT_INDEX" |
| 1062 | /// - "FILTER_EVENT_TYPE" |
| 1063 | /// - "FILTER_CHANNEL_GROUPING" |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1064 | core.String type; |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1065 | |
| 1066 | /// Filter value. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1067 | core.String value; |
| 1068 | |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1069 | FilterPair(); |
| 1070 | |
| 1071 | FilterPair.fromJson(core.Map _json) { |
| 1072 | if (_json.containsKey("type")) { |
| 1073 | type = _json["type"]; |
| 1074 | } |
| 1075 | if (_json.containsKey("value")) { |
| 1076 | value = _json["value"]; |
| 1077 | } |
| 1078 | } |
| 1079 | |
Martin Kustermann | 3953f0d | 2017-06-12 16:59:53 +0200 | [diff] [blame] | 1080 | core.Map<core.String, core.Object> toJson() { |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1081 | final core.Map<core.String, core.Object> _json = |
| 1082 | new core.Map<core.String, core.Object>(); |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1083 | if (type != null) { |
| 1084 | _json["type"] = type; |
| 1085 | } |
| 1086 | if (value != null) { |
| 1087 | _json["value"] = value; |
| 1088 | } |
| 1089 | return _json; |
| 1090 | } |
| 1091 | } |
| 1092 | |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1093 | /// List queries response. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1094 | class ListQueriesResponse { |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1095 | /// Identifies what kind of resource this is. Value: the fixed string |
| 1096 | /// "doubleclickbidmanager#listQueriesResponse". |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1097 | core.String kind; |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1098 | |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 1099 | /// Next page's pagination token if one exists. |
| 1100 | core.String nextPageToken; |
| 1101 | |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1102 | /// Retrieved queries. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1103 | core.List<Query> queries; |
| 1104 | |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1105 | ListQueriesResponse(); |
| 1106 | |
| 1107 | ListQueriesResponse.fromJson(core.Map _json) { |
| 1108 | if (_json.containsKey("kind")) { |
| 1109 | kind = _json["kind"]; |
| 1110 | } |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 1111 | if (_json.containsKey("nextPageToken")) { |
| 1112 | nextPageToken = _json["nextPageToken"]; |
| 1113 | } |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1114 | if (_json.containsKey("queries")) { |
Jakob Andersen | 52715df | 2018-05-01 13:58:48 +0200 | [diff] [blame] | 1115 | queries = (_json["queries"] as core.List) |
Jakob Andersen | 4ce761d | 2018-04-19 11:19:11 +0200 | [diff] [blame] | 1116 | .map<Query>((value) => new Query.fromJson(value)) |
| 1117 | .toList(); |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1118 | } |
| 1119 | } |
| 1120 | |
Martin Kustermann | 3953f0d | 2017-06-12 16:59:53 +0200 | [diff] [blame] | 1121 | core.Map<core.String, core.Object> toJson() { |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1122 | final core.Map<core.String, core.Object> _json = |
| 1123 | new core.Map<core.String, core.Object>(); |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1124 | if (kind != null) { |
| 1125 | _json["kind"] = kind; |
| 1126 | } |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 1127 | if (nextPageToken != null) { |
| 1128 | _json["nextPageToken"] = nextPageToken; |
| 1129 | } |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1130 | if (queries != null) { |
| 1131 | _json["queries"] = queries.map((value) => (value).toJson()).toList(); |
| 1132 | } |
| 1133 | return _json; |
| 1134 | } |
| 1135 | } |
| 1136 | |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1137 | /// List reports response. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1138 | class ListReportsResponse { |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1139 | /// Identifies what kind of resource this is. Value: the fixed string |
| 1140 | /// "doubleclickbidmanager#listReportsResponse". |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1141 | core.String kind; |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1142 | |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 1143 | /// Next page's pagination token if one exists. |
| 1144 | core.String nextPageToken; |
| 1145 | |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1146 | /// Retrieved reports. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1147 | core.List<Report> reports; |
| 1148 | |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1149 | ListReportsResponse(); |
| 1150 | |
| 1151 | ListReportsResponse.fromJson(core.Map _json) { |
| 1152 | if (_json.containsKey("kind")) { |
| 1153 | kind = _json["kind"]; |
| 1154 | } |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 1155 | if (_json.containsKey("nextPageToken")) { |
| 1156 | nextPageToken = _json["nextPageToken"]; |
| 1157 | } |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1158 | if (_json.containsKey("reports")) { |
Jakob Andersen | 52715df | 2018-05-01 13:58:48 +0200 | [diff] [blame] | 1159 | reports = (_json["reports"] as core.List) |
Jakob Andersen | 4ce761d | 2018-04-19 11:19:11 +0200 | [diff] [blame] | 1160 | .map<Report>((value) => new Report.fromJson(value)) |
| 1161 | .toList(); |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1162 | } |
| 1163 | } |
| 1164 | |
Martin Kustermann | 3953f0d | 2017-06-12 16:59:53 +0200 | [diff] [blame] | 1165 | core.Map<core.String, core.Object> toJson() { |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1166 | final core.Map<core.String, core.Object> _json = |
| 1167 | new core.Map<core.String, core.Object>(); |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1168 | if (kind != null) { |
| 1169 | _json["kind"] = kind; |
| 1170 | } |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 1171 | if (nextPageToken != null) { |
| 1172 | _json["nextPageToken"] = nextPageToken; |
| 1173 | } |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1174 | if (reports != null) { |
| 1175 | _json["reports"] = reports.map((value) => (value).toJson()).toList(); |
| 1176 | } |
| 1177 | return _json; |
| 1178 | } |
| 1179 | } |
| 1180 | |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 1181 | /// Additional query options. |
| 1182 | class Options { |
| 1183 | /// Set to true and filter your report by `FILTER_INSERTION_ORDER` or |
| 1184 | /// `FILTER_LINE_ITEM` to include data for audience lists specifically |
| 1185 | /// targeted by those items. |
| 1186 | core.bool includeOnlyTargetedUserLists; |
| 1187 | |
Jonas Finnemann Jensen | ef0c8a3 | 2020-10-07 20:58:20 +0200 | [diff] [blame] | 1188 | /// Options that contain Path Filters and Custom Channel Groupings. |
| 1189 | PathQueryOptions pathQueryOptions; |
| 1190 | |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 1191 | Options(); |
| 1192 | |
| 1193 | Options.fromJson(core.Map _json) { |
| 1194 | if (_json.containsKey("includeOnlyTargetedUserLists")) { |
| 1195 | includeOnlyTargetedUserLists = _json["includeOnlyTargetedUserLists"]; |
| 1196 | } |
Jonas Finnemann Jensen | ef0c8a3 | 2020-10-07 20:58:20 +0200 | [diff] [blame] | 1197 | if (_json.containsKey("pathQueryOptions")) { |
| 1198 | pathQueryOptions = |
| 1199 | new PathQueryOptions.fromJson(_json["pathQueryOptions"]); |
| 1200 | } |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 1201 | } |
| 1202 | |
| 1203 | core.Map<core.String, core.Object> toJson() { |
| 1204 | final core.Map<core.String, core.Object> _json = |
| 1205 | new core.Map<core.String, core.Object>(); |
| 1206 | if (includeOnlyTargetedUserLists != null) { |
| 1207 | _json["includeOnlyTargetedUserLists"] = includeOnlyTargetedUserLists; |
| 1208 | } |
Jonas Finnemann Jensen | ef0c8a3 | 2020-10-07 20:58:20 +0200 | [diff] [blame] | 1209 | if (pathQueryOptions != null) { |
| 1210 | _json["pathQueryOptions"] = (pathQueryOptions).toJson(); |
| 1211 | } |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 1212 | return _json; |
| 1213 | } |
| 1214 | } |
| 1215 | |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1216 | /// Parameters of a query or report. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1217 | class Parameters { |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1218 | /// Filters used to match traffic data in your report. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1219 | core.List<FilterPair> filters; |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1220 | |
| 1221 | /// Data is grouped by the filters listed in this field. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1222 | core.List<core.String> groupBys; |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1223 | |
Jonas Finnemann Jensen | ee696b1 | 2019-07-04 15:07:25 +0200 | [diff] [blame] | 1224 | /// Deprecated. This field is no longer in use. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1225 | core.bool includeInviteData; |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1226 | |
| 1227 | /// Metrics to include as columns in your report. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1228 | core.List<core.String> metrics; |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1229 | |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 1230 | /// Additional query options. |
| 1231 | Options options; |
| 1232 | |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1233 | /// Report type. |
| 1234 | /// Possible string values are: |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1235 | /// - "TYPE_GENERAL" |
Jonas Finnemann Jensen | ef0c8a3 | 2020-10-07 20:58:20 +0200 | [diff] [blame] | 1236 | /// - "TYPE_AUDIENCE_PERFORMANCE" |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1237 | /// - "TYPE_INVENTORY_AVAILABILITY" |
| 1238 | /// - "TYPE_KEYWORD" |
Jonas Finnemann Jensen | ef0c8a3 | 2020-10-07 20:58:20 +0200 | [diff] [blame] | 1239 | /// - "TYPE_PIXEL_LOAD" |
| 1240 | /// - "TYPE_AUDIENCE_COMPOSITION" |
| 1241 | /// - "TYPE_CROSS_PARTNER" |
| 1242 | /// - "TYPE_PAGE_CATEGORY" |
| 1243 | /// - "TYPE_THIRD_PARTY_DATA_PROVIDER" |
| 1244 | /// - "TYPE_CROSS_PARTNER_THIRD_PARTY_DATA_PROVIDER" |
| 1245 | /// - "TYPE_CLIENT_SAFE" |
| 1246 | /// - "TYPE_ORDER_ID" |
| 1247 | /// - "TYPE_FEE" |
| 1248 | /// - "TYPE_CROSS_FEE" |
| 1249 | /// - "TYPE_ACTIVE_GRP" |
| 1250 | /// - "TYPE_YOUTUBE_VERTICAL" |
| 1251 | /// - "TYPE_COMSCORE_VCE" |
| 1252 | /// - "TYPE_TRUEVIEW" |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1253 | /// - "TYPE_NIELSEN_AUDIENCE_PROFILE" |
| 1254 | /// - "TYPE_NIELSEN_DAILY_REACH_BUILD" |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1255 | /// - "TYPE_NIELSEN_SITE" |
Jonas Finnemann Jensen | ef0c8a3 | 2020-10-07 20:58:20 +0200 | [diff] [blame] | 1256 | /// - "TYPE_REACH_AND_FREQUENCY" |
| 1257 | /// - "TYPE_ESTIMATED_CONVERSION" |
| 1258 | /// - "TYPE_VERIFICATION" |
| 1259 | /// - "TYPE_TRUEVIEW_IAR" |
| 1260 | /// - "TYPE_NIELSEN_ONLINE_GLOBAL_MARKET" |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1261 | /// - "TYPE_PETRA_NIELSEN_AUDIENCE_PROFILE" |
| 1262 | /// - "TYPE_PETRA_NIELSEN_DAILY_REACH_BUILD" |
| 1263 | /// - "TYPE_PETRA_NIELSEN_ONLINE_GLOBAL_MARKET" |
Jonas Finnemann Jensen | ef0c8a3 | 2020-10-07 20:58:20 +0200 | [diff] [blame] | 1264 | /// - "TYPE_NOT_SUPPORTED" |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1265 | /// - "TYPE_REACH_AUDIENCE" |
Jonas Finnemann Jensen | ef0c8a3 | 2020-10-07 20:58:20 +0200 | [diff] [blame] | 1266 | /// - "TYPE_LINEAR_TV_SEARCH_LIFT" |
| 1267 | /// - "TYPE_PATH" |
| 1268 | /// - "TYPE_PATH_ATTRIBUTION" |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1269 | core.String type; |
| 1270 | |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1271 | Parameters(); |
| 1272 | |
| 1273 | Parameters.fromJson(core.Map _json) { |
| 1274 | if (_json.containsKey("filters")) { |
Jakob Andersen | 52715df | 2018-05-01 13:58:48 +0200 | [diff] [blame] | 1275 | filters = (_json["filters"] as core.List) |
Jakob Andersen | 4ce761d | 2018-04-19 11:19:11 +0200 | [diff] [blame] | 1276 | .map<FilterPair>((value) => new FilterPair.fromJson(value)) |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1277 | .toList(); |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1278 | } |
| 1279 | if (_json.containsKey("groupBys")) { |
Jakob Andersen | 52715df | 2018-05-01 13:58:48 +0200 | [diff] [blame] | 1280 | groupBys = (_json["groupBys"] as core.List).cast<core.String>(); |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1281 | } |
| 1282 | if (_json.containsKey("includeInviteData")) { |
| 1283 | includeInviteData = _json["includeInviteData"]; |
| 1284 | } |
| 1285 | if (_json.containsKey("metrics")) { |
Jakob Andersen | 52715df | 2018-05-01 13:58:48 +0200 | [diff] [blame] | 1286 | metrics = (_json["metrics"] as core.List).cast<core.String>(); |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1287 | } |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 1288 | if (_json.containsKey("options")) { |
| 1289 | options = new Options.fromJson(_json["options"]); |
| 1290 | } |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1291 | if (_json.containsKey("type")) { |
| 1292 | type = _json["type"]; |
| 1293 | } |
| 1294 | } |
| 1295 | |
Martin Kustermann | 3953f0d | 2017-06-12 16:59:53 +0200 | [diff] [blame] | 1296 | core.Map<core.String, core.Object> toJson() { |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1297 | final core.Map<core.String, core.Object> _json = |
| 1298 | new core.Map<core.String, core.Object>(); |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1299 | if (filters != null) { |
| 1300 | _json["filters"] = filters.map((value) => (value).toJson()).toList(); |
| 1301 | } |
| 1302 | if (groupBys != null) { |
| 1303 | _json["groupBys"] = groupBys; |
| 1304 | } |
| 1305 | if (includeInviteData != null) { |
| 1306 | _json["includeInviteData"] = includeInviteData; |
| 1307 | } |
| 1308 | if (metrics != null) { |
| 1309 | _json["metrics"] = metrics; |
| 1310 | } |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 1311 | if (options != null) { |
| 1312 | _json["options"] = (options).toJson(); |
| 1313 | } |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1314 | if (type != null) { |
| 1315 | _json["type"] = type; |
| 1316 | } |
| 1317 | return _json; |
| 1318 | } |
| 1319 | } |
| 1320 | |
Jonas Finnemann Jensen | ef0c8a3 | 2020-10-07 20:58:20 +0200 | [diff] [blame] | 1321 | /// Path filters specify which paths to include in a report. A path is the |
| 1322 | /// result of combining DV360 events based on User ID to create a workflow of |
| 1323 | /// users' actions. When a path filter is set, the resulting report will only |
| 1324 | /// include paths that match the specified event at the specified position. All |
| 1325 | /// other paths will be excluded. |
| 1326 | class PathFilter { |
| 1327 | /// Filter on an event to be applied to some part of the path. |
| 1328 | core.List<EventFilter> eventFilters; |
| 1329 | |
| 1330 | /// Indicates the position of the path the filter should match to (first, |
| 1331 | /// last, or any event in path). |
| 1332 | /// Possible string values are: |
| 1333 | /// - "ANY" |
| 1334 | /// - "FIRST" |
| 1335 | /// - "LAST" |
| 1336 | core.String pathMatchPosition; |
| 1337 | |
| 1338 | PathFilter(); |
| 1339 | |
| 1340 | PathFilter.fromJson(core.Map _json) { |
| 1341 | if (_json.containsKey("eventFilters")) { |
| 1342 | eventFilters = (_json["eventFilters"] as core.List) |
| 1343 | .map<EventFilter>((value) => new EventFilter.fromJson(value)) |
| 1344 | .toList(); |
| 1345 | } |
| 1346 | if (_json.containsKey("pathMatchPosition")) { |
| 1347 | pathMatchPosition = _json["pathMatchPosition"]; |
| 1348 | } |
| 1349 | } |
| 1350 | |
| 1351 | core.Map<core.String, core.Object> toJson() { |
| 1352 | final core.Map<core.String, core.Object> _json = |
| 1353 | new core.Map<core.String, core.Object>(); |
| 1354 | if (eventFilters != null) { |
| 1355 | _json["eventFilters"] = |
| 1356 | eventFilters.map((value) => (value).toJson()).toList(); |
| 1357 | } |
| 1358 | if (pathMatchPosition != null) { |
| 1359 | _json["pathMatchPosition"] = pathMatchPosition; |
| 1360 | } |
| 1361 | return _json; |
| 1362 | } |
| 1363 | } |
| 1364 | |
| 1365 | /// Path Query Options for Report Options. |
| 1366 | class PathQueryOptions { |
| 1367 | /// Custom Channel Groupings. |
| 1368 | ChannelGrouping channelGrouping; |
| 1369 | |
| 1370 | /// Path Filters. There is a limit of 100 path filters that can be set per |
| 1371 | /// report. |
| 1372 | core.List<PathFilter> pathFilters; |
| 1373 | |
| 1374 | PathQueryOptions(); |
| 1375 | |
| 1376 | PathQueryOptions.fromJson(core.Map _json) { |
| 1377 | if (_json.containsKey("channelGrouping")) { |
| 1378 | channelGrouping = new ChannelGrouping.fromJson(_json["channelGrouping"]); |
| 1379 | } |
| 1380 | if (_json.containsKey("pathFilters")) { |
| 1381 | pathFilters = (_json["pathFilters"] as core.List) |
| 1382 | .map<PathFilter>((value) => new PathFilter.fromJson(value)) |
| 1383 | .toList(); |
| 1384 | } |
| 1385 | } |
| 1386 | |
| 1387 | core.Map<core.String, core.Object> toJson() { |
| 1388 | final core.Map<core.String, core.Object> _json = |
| 1389 | new core.Map<core.String, core.Object>(); |
| 1390 | if (channelGrouping != null) { |
| 1391 | _json["channelGrouping"] = (channelGrouping).toJson(); |
| 1392 | } |
| 1393 | if (pathFilters != null) { |
| 1394 | _json["pathFilters"] = |
| 1395 | pathFilters.map((value) => (value).toJson()).toList(); |
| 1396 | } |
| 1397 | return _json; |
| 1398 | } |
| 1399 | } |
| 1400 | |
Jonas Finnemann Jensen | b223bd5 | 2020-10-09 13:02:08 +0200 | [diff] [blame^] | 1401 | /// Dimension Filter on path events. |
Jonas Finnemann Jensen | ef0c8a3 | 2020-10-07 20:58:20 +0200 | [diff] [blame] | 1402 | class PathQueryOptionsFilter { |
| 1403 | /// Dimension the filter is applied to. |
| 1404 | /// Possible string values are: |
| 1405 | /// - "FILTER_UNKNOWN" |
| 1406 | /// - "FILTER_DATE" |
| 1407 | /// - "FILTER_DAY_OF_WEEK" |
| 1408 | /// - "FILTER_WEEK" |
| 1409 | /// - "FILTER_MONTH" |
| 1410 | /// - "FILTER_YEAR" |
| 1411 | /// - "FILTER_TIME_OF_DAY" |
| 1412 | /// - "FILTER_CONVERSION_DELAY" |
| 1413 | /// - "FILTER_CREATIVE_ID" |
| 1414 | /// - "FILTER_CREATIVE_SIZE" |
| 1415 | /// - "FILTER_CREATIVE_TYPE" |
| 1416 | /// - "FILTER_EXCHANGE_ID" |
| 1417 | /// - "FILTER_AD_POSITION" |
| 1418 | /// - "FILTER_PUBLIC_INVENTORY" |
| 1419 | /// - "FILTER_INVENTORY_SOURCE" |
| 1420 | /// - "FILTER_CITY" |
| 1421 | /// - "FILTER_REGION" |
| 1422 | /// - "FILTER_DMA" |
| 1423 | /// - "FILTER_COUNTRY" |
| 1424 | /// - "FILTER_SITE_ID" |
| 1425 | /// - "FILTER_CHANNEL_ID" |
| 1426 | /// - "FILTER_PARTNER" |
| 1427 | /// - "FILTER_ADVERTISER" |
| 1428 | /// - "FILTER_INSERTION_ORDER" |
| 1429 | /// - "FILTER_LINE_ITEM" |
| 1430 | /// - "FILTER_PARTNER_CURRENCY" |
| 1431 | /// - "FILTER_ADVERTISER_CURRENCY" |
| 1432 | /// - "FILTER_ADVERTISER_TIMEZONE" |
| 1433 | /// - "FILTER_LINE_ITEM_TYPE" |
| 1434 | /// - "FILTER_USER_LIST" |
| 1435 | /// - "FILTER_USER_LIST_FIRST_PARTY" |
| 1436 | /// - "FILTER_USER_LIST_THIRD_PARTY" |
| 1437 | /// - "FILTER_TARGETED_USER_LIST" |
| 1438 | /// - "FILTER_DATA_PROVIDER" |
| 1439 | /// - "FILTER_ORDER_ID" |
| 1440 | /// - "FILTER_VIDEO_PLAYER_SIZE" |
| 1441 | /// - "FILTER_VIDEO_DURATION_SECONDS" |
| 1442 | /// - "FILTER_KEYWORD" |
| 1443 | /// - "FILTER_PAGE_CATEGORY" |
| 1444 | /// - "FILTER_CAMPAIGN_DAILY_FREQUENCY" |
| 1445 | /// - "FILTER_LINE_ITEM_DAILY_FREQUENCY" |
| 1446 | /// - "FILTER_LINE_ITEM_LIFETIME_FREQUENCY" |
| 1447 | /// - "FILTER_OS" |
| 1448 | /// - "FILTER_BROWSER" |
| 1449 | /// - "FILTER_CARRIER" |
| 1450 | /// - "FILTER_SITE_LANGUAGE" |
| 1451 | /// - "FILTER_INVENTORY_FORMAT" |
| 1452 | /// - "FILTER_ZIP_CODE" |
| 1453 | /// - "FILTER_VIDEO_RATING_TIER" |
| 1454 | /// - "FILTER_VIDEO_FORMAT_SUPPORT" |
| 1455 | /// - "FILTER_VIDEO_SKIPPABLE_SUPPORT" |
| 1456 | /// - "FILTER_VIDEO_VPAID_SUPPORT" |
| 1457 | /// - "FILTER_VIDEO_CREATIVE_DURATION" |
| 1458 | /// - "FILTER_PAGE_LAYOUT" |
| 1459 | /// - "FILTER_VIDEO_AD_POSITION_IN_STREAM" |
| 1460 | /// - "FILTER_AGE" |
| 1461 | /// - "FILTER_GENDER" |
| 1462 | /// - "FILTER_QUARTER" |
| 1463 | /// - "FILTER_TRUEVIEW_CONVERSION_TYPE" |
| 1464 | /// - "FILTER_MOBILE_GEO" |
| 1465 | /// - "FILTER_MRAID_SUPPORT" |
| 1466 | /// - "FILTER_ACTIVE_VIEW_EXPECTED_VIEWABILITY" |
| 1467 | /// - "FILTER_VIDEO_CREATIVE_DURATION_SKIPPABLE" |
| 1468 | /// - "FILTER_NIELSEN_COUNTRY_CODE" |
| 1469 | /// - "FILTER_NIELSEN_DEVICE_ID" |
| 1470 | /// - "FILTER_NIELSEN_GENDER" |
| 1471 | /// - "FILTER_NIELSEN_AGE" |
| 1472 | /// - "FILTER_INVENTORY_SOURCE_TYPE" |
| 1473 | /// - "FILTER_CREATIVE_WIDTH" |
| 1474 | /// - "FILTER_CREATIVE_HEIGHT" |
| 1475 | /// - "FILTER_DFP_ORDER_ID" |
| 1476 | /// - "FILTER_TRUEVIEW_AGE" |
| 1477 | /// - "FILTER_TRUEVIEW_GENDER" |
| 1478 | /// - "FILTER_TRUEVIEW_PARENTAL_STATUS" |
| 1479 | /// - "FILTER_TRUEVIEW_REMARKETING_LIST" |
| 1480 | /// - "FILTER_TRUEVIEW_INTEREST" |
| 1481 | /// - "FILTER_TRUEVIEW_AD_GROUP_ID" |
| 1482 | /// - "FILTER_TRUEVIEW_AD_GROUP_AD_ID" |
| 1483 | /// - "FILTER_TRUEVIEW_IAR_LANGUAGE" |
| 1484 | /// - "FILTER_TRUEVIEW_IAR_GENDER" |
| 1485 | /// - "FILTER_TRUEVIEW_IAR_AGE" |
| 1486 | /// - "FILTER_TRUEVIEW_IAR_CATEGORY" |
| 1487 | /// - "FILTER_TRUEVIEW_IAR_COUNTRY" |
| 1488 | /// - "FILTER_TRUEVIEW_IAR_CITY" |
| 1489 | /// - "FILTER_TRUEVIEW_IAR_REGION" |
| 1490 | /// - "FILTER_TRUEVIEW_IAR_ZIPCODE" |
| 1491 | /// - "FILTER_TRUEVIEW_IAR_REMARKETING_LIST" |
| 1492 | /// - "FILTER_TRUEVIEW_IAR_INTEREST" |
| 1493 | /// - "FILTER_TRUEVIEW_IAR_PARENTAL_STATUS" |
| 1494 | /// - "FILTER_TRUEVIEW_IAR_TIME_OF_DAY" |
| 1495 | /// - "FILTER_TRUEVIEW_CUSTOM_AFFINITY" |
| 1496 | /// - "FILTER_TRUEVIEW_CATEGORY" |
| 1497 | /// - "FILTER_TRUEVIEW_KEYWORD" |
| 1498 | /// - "FILTER_TRUEVIEW_PLACEMENT" |
| 1499 | /// - "FILTER_TRUEVIEW_URL" |
| 1500 | /// - "FILTER_TRUEVIEW_COUNTRY" |
| 1501 | /// - "FILTER_TRUEVIEW_REGION" |
| 1502 | /// - "FILTER_TRUEVIEW_CITY" |
| 1503 | /// - "FILTER_TRUEVIEW_DMA" |
| 1504 | /// - "FILTER_TRUEVIEW_ZIPCODE" |
| 1505 | /// - "FILTER_NOT_SUPPORTED" |
| 1506 | /// - "FILTER_MEDIA_PLAN" |
| 1507 | /// - "FILTER_TRUEVIEW_IAR_YOUTUBE_CHANNEL" |
| 1508 | /// - "FILTER_TRUEVIEW_IAR_YOUTUBE_VIDEO" |
| 1509 | /// - "FILTER_SKIPPABLE_SUPPORT" |
| 1510 | /// - "FILTER_COMPANION_CREATIVE_ID" |
| 1511 | /// - "FILTER_BUDGET_SEGMENT_DESCRIPTION" |
| 1512 | /// - "FILTER_FLOODLIGHT_ACTIVITY_ID" |
| 1513 | /// - "FILTER_DEVICE_MODEL" |
| 1514 | /// - "FILTER_DEVICE_MAKE" |
| 1515 | /// - "FILTER_DEVICE_TYPE" |
| 1516 | /// - "FILTER_CREATIVE_ATTRIBUTE" |
| 1517 | /// - "FILTER_INVENTORY_COMMITMENT_TYPE" |
| 1518 | /// - "FILTER_INVENTORY_RATE_TYPE" |
| 1519 | /// - "FILTER_INVENTORY_DELIVERY_METHOD" |
| 1520 | /// - "FILTER_INVENTORY_SOURCE_EXTERNAL_ID" |
| 1521 | /// - "FILTER_AUTHORIZED_SELLER_STATE" |
| 1522 | /// - "FILTER_VIDEO_DURATION_SECONDS_RANGE" |
| 1523 | /// - "FILTER_PARTNER_NAME" |
| 1524 | /// - "FILTER_PARTNER_STATUS" |
| 1525 | /// - "FILTER_ADVERTISER_NAME" |
| 1526 | /// - "FILTER_ADVERTISER_INTEGRATION_CODE" |
| 1527 | /// - "FILTER_ADVERTISER_INTEGRATION_STATUS" |
| 1528 | /// - "FILTER_CARRIER_NAME" |
| 1529 | /// - "FILTER_CHANNEL_NAME" |
| 1530 | /// - "FILTER_CITY_NAME" |
| 1531 | /// - "FILTER_COMPANION_CREATIVE_NAME" |
| 1532 | /// - "FILTER_USER_LIST_FIRST_PARTY_NAME" |
| 1533 | /// - "FILTER_USER_LIST_THIRD_PARTY_NAME" |
| 1534 | /// - "FILTER_NIELSEN_RESTATEMENT_DATE" |
| 1535 | /// - "FILTER_NIELSEN_DATE_RANGE" |
| 1536 | /// - "FILTER_INSERTION_ORDER_NAME" |
| 1537 | /// - "FILTER_REGION_NAME" |
| 1538 | /// - "FILTER_DMA_NAME" |
| 1539 | /// - "FILTER_TRUEVIEW_IAR_REGION_NAME" |
| 1540 | /// - "FILTER_TRUEVIEW_DMA_NAME" |
| 1541 | /// - "FILTER_TRUEVIEW_REGION_NAME" |
| 1542 | /// - "FILTER_ACTIVE_VIEW_CUSTOM_METRIC_ID" |
| 1543 | /// - "FILTER_ACTIVE_VIEW_CUSTOM_METRIC_NAME" |
| 1544 | /// - "FILTER_AD_TYPE" |
| 1545 | /// - "FILTER_ALGORITHM" |
| 1546 | /// - "FILTER_ALGORITHM_ID" |
| 1547 | /// - "FILTER_AMP_PAGE_REQUEST" |
| 1548 | /// - "FILTER_ANONYMOUS_INVENTORY_MODELING" |
| 1549 | /// - "FILTER_APP_URL" |
| 1550 | /// - "FILTER_APP_URL_EXCLUDED" |
| 1551 | /// - "FILTER_ATTRIBUTED_USERLIST" |
| 1552 | /// - "FILTER_ATTRIBUTED_USERLIST_COST" |
| 1553 | /// - "FILTER_ATTRIBUTED_USERLIST_TYPE" |
| 1554 | /// - "FILTER_ATTRIBUTION_MODEL" |
| 1555 | /// - "FILTER_AUDIENCE_LIST" |
| 1556 | /// - "FILTER_AUDIENCE_LIST_COST" |
| 1557 | /// - "FILTER_AUDIENCE_LIST_TYPE" |
| 1558 | /// - "FILTER_AUDIENCE_NAME" |
| 1559 | /// - "FILTER_AUDIENCE_TYPE" |
| 1560 | /// - "FILTER_BILLABLE_OUTCOME" |
| 1561 | /// - "FILTER_BRAND_LIFT_TYPE" |
| 1562 | /// - "FILTER_CHANNEL_TYPE" |
| 1563 | /// - "FILTER_CM_PLACEMENT_ID" |
| 1564 | /// - "FILTER_CONVERSION_SOURCE" |
| 1565 | /// - "FILTER_CONVERSION_SOURCE_ID" |
| 1566 | /// - "FILTER_COUNTRY_ID" |
| 1567 | /// - "FILTER_CREATIVE" |
| 1568 | /// - "FILTER_CREATIVE_ASSET" |
| 1569 | /// - "FILTER_CREATIVE_INTEGRATION_CODE" |
| 1570 | /// - "FILTER_CREATIVE_RENDERED_IN_AMP" |
| 1571 | /// - "FILTER_CREATIVE_SOURCE" |
| 1572 | /// - "FILTER_CREATIVE_STATUS" |
| 1573 | /// - "FILTER_DATA_PROVIDER_NAME" |
| 1574 | /// - "FILTER_DETAILED_DEMOGRAPHICS" |
| 1575 | /// - "FILTER_DETAILED_DEMOGRAPHICS_ID" |
| 1576 | /// - "FILTER_DEVICE" |
| 1577 | /// - "FILTER_GAM_INSERTION_ORDER" |
| 1578 | /// - "FILTER_GAM_LINE_ITEM" |
| 1579 | /// - "FILTER_GAM_LINE_ITEM_ID" |
| 1580 | /// - "FILTER_DIGITAL_CONTENT_LABEL" |
| 1581 | /// - "FILTER_DOMAIN" |
| 1582 | /// - "FILTER_ELIGIBLE_COOKIES_ON_FIRST_PARTY_AUDIENCE_LIST" |
| 1583 | /// - "FILTER_ELIGIBLE_COOKIES_ON_THIRD_PARTY_AUDIENCE_LIST_AND_INTEREST" |
| 1584 | /// - "FILTER_EXCHANGE" |
| 1585 | /// - "FILTER_EXCHANGE_CODE" |
| 1586 | /// - "FILTER_EXTENSION" |
| 1587 | /// - "FILTER_EXTENSION_STATUS" |
| 1588 | /// - "FILTER_EXTENSION_TYPE" |
| 1589 | /// - "FILTER_FIRST_PARTY_AUDIENCE_LIST_COST" |
| 1590 | /// - "FILTER_FIRST_PARTY_AUDIENCE_LIST_TYPE" |
| 1591 | /// - "FILTER_FLOODLIGHT_ACTIVITY" |
| 1592 | /// - "FILTER_FORMAT" |
| 1593 | /// - "FILTER_GMAIL_AGE" |
| 1594 | /// - "FILTER_GMAIL_CITY" |
| 1595 | /// - "FILTER_GMAIL_COUNTRY" |
| 1596 | /// - "FILTER_GMAIL_COUNTRY_NAME" |
| 1597 | /// - "FILTER_GMAIL_DEVICE_TYPE" |
| 1598 | /// - "FILTER_GMAIL_DEVICE_TYPE_NAME" |
| 1599 | /// - "FILTER_GMAIL_GENDER" |
| 1600 | /// - "FILTER_GMAIL_REGION" |
| 1601 | /// - "FILTER_GMAIL_REMARKETING_LIST" |
| 1602 | /// - "FILTER_HOUSEHOLD_INCOME" |
| 1603 | /// - "FILTER_IMPRESSION_COUNTING_METHOD" |
| 1604 | /// - "FILTER_YOUTUBE_PROGRAMMATIC_GUARANTEED_INSERTION_ORDER" |
| 1605 | /// - "FILTER_INSERTION_ORDER_INTEGRATION_CODE" |
| 1606 | /// - "FILTER_INSERTION_ORDER_STATUS" |
| 1607 | /// - "FILTER_INTEREST" |
| 1608 | /// - "FILTER_INVENTORY_SOURCE_GROUP" |
| 1609 | /// - "FILTER_INVENTORY_SOURCE_GROUP_ID" |
| 1610 | /// - "FILTER_INVENTORY_SOURCE_ID" |
| 1611 | /// - "FILTER_INVENTORY_SOURCE_NAME" |
| 1612 | /// - "FILTER_LIFE_EVENT" |
| 1613 | /// - "FILTER_LIFE_EVENTS" |
| 1614 | /// - "FILTER_LINE_ITEM_INTEGRATION_CODE" |
| 1615 | /// - "FILTER_LINE_ITEM_NAME" |
| 1616 | /// - "FILTER_LINE_ITEM_STATUS" |
| 1617 | /// - "FILTER_MATCH_RATIO" |
| 1618 | /// - "FILTER_MEASUREMENT_SOURCE" |
| 1619 | /// - "FILTER_MEDIA_PLAN_NAME" |
| 1620 | /// - "FILTER_PARENTAL_STATUS" |
| 1621 | /// - "FILTER_PLACEMENT_ALL_YOUTUBE_CHANNELS" |
| 1622 | /// - "FILTER_PLATFORM" |
| 1623 | /// - "FILTER_PLAYBACK_METHOD" |
| 1624 | /// - "FILTER_POSITION_IN_CONTENT" |
| 1625 | /// - "FILTER_PUBLISHER_PROPERTY" |
| 1626 | /// - "FILTER_PUBLISHER_PROPERTY_ID" |
| 1627 | /// - "FILTER_PUBLISHER_PROPERTY_SECTION" |
| 1628 | /// - "FILTER_PUBLISHER_PROPERTY_SECTION_ID" |
| 1629 | /// - "FILTER_REFUND_REASON" |
| 1630 | /// - "FILTER_REMARKETING_LIST" |
| 1631 | /// - "FILTER_REWARDED" |
| 1632 | /// - "FILTER_SENSITIVE_CATEGORY" |
| 1633 | /// - "FILTER_SERVED_PIXEL_DENSITY" |
| 1634 | /// - "FILTER_TARGETED_DATA_PROVIDERS" |
| 1635 | /// - "FILTER_THIRD_PARTY_AUDIENCE_LIST_COST" |
| 1636 | /// - "FILTER_THIRD_PARTY_AUDIENCE_LIST_TYPE" |
| 1637 | /// - "FILTER_TRUEVIEW_AD" |
| 1638 | /// - "FILTER_TRUEVIEW_AD_GROUP" |
| 1639 | /// - "FILTER_TRUEVIEW_DETAILED_DEMOGRAPHICS" |
| 1640 | /// - "FILTER_TRUEVIEW_DETAILED_DEMOGRAPHICS_ID" |
| 1641 | /// - "FILTER_TRUEVIEW_HOUSEHOLD_INCOME" |
| 1642 | /// - "FILTER_TRUEVIEW_IAR_COUNTRY_NAME" |
| 1643 | /// - "FILTER_TRUEVIEW_REMARKETING_LIST_NAME" |
| 1644 | /// - "FILTER_VARIANT_ID" |
| 1645 | /// - "FILTER_VARIANT_NAME" |
| 1646 | /// - "FILTER_VARIANT_VERSION" |
| 1647 | /// - "FILTER_VERIFICATION_VIDEO_PLAYER_SIZE" |
| 1648 | /// - "FILTER_VERIFICATION_VIDEO_POSITION" |
| 1649 | /// - "FILTER_VIDEO_COMPANION_CREATIVE_SIZE" |
| 1650 | /// - "FILTER_VIDEO_CONTINUOUS_PLAY" |
| 1651 | /// - "FILTER_VIDEO_DURATION" |
| 1652 | /// - "FILTER_YOUTUBE_ADAPTED_AUDIENCE_LIST" |
| 1653 | /// - "FILTER_YOUTUBE_AD_VIDEO" |
| 1654 | /// - "FILTER_YOUTUBE_AD_VIDEO_ID" |
| 1655 | /// - "FILTER_YOUTUBE_CHANNEL" |
| 1656 | /// - "FILTER_YOUTUBE_PROGRAMMATIC_GUARANTEED_ADVERTISER" |
| 1657 | /// - "FILTER_YOUTUBE_PROGRAMMATIC_GUARANTEED_PARTNER" |
| 1658 | /// - "FILTER_YOUTUBE_VIDEO" |
| 1659 | /// - "FILTER_ZIP_POSTAL_CODE" |
| 1660 | /// - "FILTER_PLACEMENT_NAME_ALL_YOUTUBE_CHANNELS" |
| 1661 | /// - "FILTER_TRUEVIEW_PLACEMENT_ID" |
| 1662 | /// - "FILTER_PATH_PATTERN_ID" |
| 1663 | /// - "FILTER_PATH_EVENT_INDEX" |
| 1664 | /// - "FILTER_EVENT_TYPE" |
| 1665 | /// - "FILTER_CHANNEL_GROUPING" |
| 1666 | core.String filter; |
| 1667 | |
| 1668 | /// Indicates how the filter should be matched to the value. |
| 1669 | /// Possible string values are: |
| 1670 | /// - "UNKNOWN" |
| 1671 | /// - "EXACT" |
| 1672 | /// - "PARTIAL" |
| 1673 | /// - "BEGINS_WITH" |
| 1674 | /// - "WILDCARD_EXPRESSION" |
| 1675 | core.String match; |
| 1676 | |
| 1677 | /// Value to filter on. |
| 1678 | core.List<core.String> values; |
| 1679 | |
| 1680 | PathQueryOptionsFilter(); |
| 1681 | |
| 1682 | PathQueryOptionsFilter.fromJson(core.Map _json) { |
| 1683 | if (_json.containsKey("filter")) { |
| 1684 | filter = _json["filter"]; |
| 1685 | } |
| 1686 | if (_json.containsKey("match")) { |
| 1687 | match = _json["match"]; |
| 1688 | } |
| 1689 | if (_json.containsKey("values")) { |
| 1690 | values = (_json["values"] as core.List).cast<core.String>(); |
| 1691 | } |
| 1692 | } |
| 1693 | |
| 1694 | core.Map<core.String, core.Object> toJson() { |
| 1695 | final core.Map<core.String, core.Object> _json = |
| 1696 | new core.Map<core.String, core.Object>(); |
| 1697 | if (filter != null) { |
| 1698 | _json["filter"] = filter; |
| 1699 | } |
| 1700 | if (match != null) { |
| 1701 | _json["match"] = match; |
| 1702 | } |
| 1703 | if (values != null) { |
| 1704 | _json["values"] = values; |
| 1705 | } |
| 1706 | return _json; |
| 1707 | } |
| 1708 | } |
| 1709 | |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1710 | /// Represents a query. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1711 | class Query { |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1712 | /// Identifies what kind of resource this is. Value: the fixed string |
| 1713 | /// "doubleclickbidmanager#query". |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1714 | core.String kind; |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1715 | |
| 1716 | /// Query metadata. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1717 | QueryMetadata metadata; |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1718 | |
| 1719 | /// Query parameters. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1720 | Parameters params; |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1721 | |
| 1722 | /// Query ID. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1723 | core.String queryId; |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1724 | |
| 1725 | /// The ending time for the data that is shown in the report. Note, |
| 1726 | /// reportDataEndTimeMs is required if metadata.dataRange is CUSTOM_DATES and |
| 1727 | /// ignored otherwise. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1728 | core.String reportDataEndTimeMs; |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1729 | |
| 1730 | /// The starting time for the data that is shown in the report. Note, |
| 1731 | /// reportDataStartTimeMs is required if metadata.dataRange is CUSTOM_DATES |
| 1732 | /// and ignored otherwise. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1733 | core.String reportDataStartTimeMs; |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1734 | |
| 1735 | /// Information on how often and when to run a query. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1736 | QuerySchedule schedule; |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1737 | |
| 1738 | /// Canonical timezone code for report data time. Defaults to |
| 1739 | /// America/New_York. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1740 | core.String timezoneCode; |
| 1741 | |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1742 | Query(); |
| 1743 | |
| 1744 | Query.fromJson(core.Map _json) { |
| 1745 | if (_json.containsKey("kind")) { |
| 1746 | kind = _json["kind"]; |
| 1747 | } |
| 1748 | if (_json.containsKey("metadata")) { |
| 1749 | metadata = new QueryMetadata.fromJson(_json["metadata"]); |
| 1750 | } |
| 1751 | if (_json.containsKey("params")) { |
| 1752 | params = new Parameters.fromJson(_json["params"]); |
| 1753 | } |
| 1754 | if (_json.containsKey("queryId")) { |
| 1755 | queryId = _json["queryId"]; |
| 1756 | } |
| 1757 | if (_json.containsKey("reportDataEndTimeMs")) { |
| 1758 | reportDataEndTimeMs = _json["reportDataEndTimeMs"]; |
| 1759 | } |
| 1760 | if (_json.containsKey("reportDataStartTimeMs")) { |
| 1761 | reportDataStartTimeMs = _json["reportDataStartTimeMs"]; |
| 1762 | } |
| 1763 | if (_json.containsKey("schedule")) { |
| 1764 | schedule = new QuerySchedule.fromJson(_json["schedule"]); |
| 1765 | } |
| 1766 | if (_json.containsKey("timezoneCode")) { |
| 1767 | timezoneCode = _json["timezoneCode"]; |
| 1768 | } |
| 1769 | } |
| 1770 | |
Martin Kustermann | 3953f0d | 2017-06-12 16:59:53 +0200 | [diff] [blame] | 1771 | core.Map<core.String, core.Object> toJson() { |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1772 | final core.Map<core.String, core.Object> _json = |
| 1773 | new core.Map<core.String, core.Object>(); |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1774 | if (kind != null) { |
| 1775 | _json["kind"] = kind; |
| 1776 | } |
| 1777 | if (metadata != null) { |
| 1778 | _json["metadata"] = (metadata).toJson(); |
| 1779 | } |
| 1780 | if (params != null) { |
| 1781 | _json["params"] = (params).toJson(); |
| 1782 | } |
| 1783 | if (queryId != null) { |
| 1784 | _json["queryId"] = queryId; |
| 1785 | } |
| 1786 | if (reportDataEndTimeMs != null) { |
| 1787 | _json["reportDataEndTimeMs"] = reportDataEndTimeMs; |
| 1788 | } |
| 1789 | if (reportDataStartTimeMs != null) { |
| 1790 | _json["reportDataStartTimeMs"] = reportDataStartTimeMs; |
| 1791 | } |
| 1792 | if (schedule != null) { |
| 1793 | _json["schedule"] = (schedule).toJson(); |
| 1794 | } |
| 1795 | if (timezoneCode != null) { |
| 1796 | _json["timezoneCode"] = timezoneCode; |
| 1797 | } |
| 1798 | return _json; |
| 1799 | } |
| 1800 | } |
| 1801 | |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1802 | /// Query metadata. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1803 | class QueryMetadata { |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1804 | /// Range of report data. |
| 1805 | /// Possible string values are: |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1806 | /// - "CUSTOM_DATES" |
Jonas Finnemann Jensen | ef0c8a3 | 2020-10-07 20:58:20 +0200 | [diff] [blame] | 1807 | /// - "CURRENT_DAY" |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1808 | /// - "PREVIOUS_DAY" |
Jonas Finnemann Jensen | ef0c8a3 | 2020-10-07 20:58:20 +0200 | [diff] [blame] | 1809 | /// - "WEEK_TO_DATE" |
| 1810 | /// - "MONTH_TO_DATE" |
| 1811 | /// - "QUARTER_TO_DATE" |
| 1812 | /// - "YEAR_TO_DATE" |
| 1813 | /// - "PREVIOUS_WEEK" |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1814 | /// - "PREVIOUS_HALF_MONTH" |
| 1815 | /// - "PREVIOUS_MONTH" |
| 1816 | /// - "PREVIOUS_QUARTER" |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1817 | /// - "PREVIOUS_YEAR" |
Jonas Finnemann Jensen | ef0c8a3 | 2020-10-07 20:58:20 +0200 | [diff] [blame] | 1818 | /// - "LAST_7_DAYS" |
| 1819 | /// - "LAST_30_DAYS" |
| 1820 | /// - "LAST_90_DAYS" |
| 1821 | /// - "LAST_365_DAYS" |
| 1822 | /// - "ALL_TIME" |
| 1823 | /// - "LAST_14_DAYS" |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1824 | /// - "TYPE_NOT_SUPPORTED" |
Jonas Finnemann Jensen | ef0c8a3 | 2020-10-07 20:58:20 +0200 | [diff] [blame] | 1825 | /// - "LAST_60_DAYS" |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1826 | core.String dataRange; |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1827 | |
| 1828 | /// Format of the generated report. |
| 1829 | /// Possible string values are: |
| 1830 | /// - "CSV" |
| 1831 | /// - "EXCEL_CSV" |
| 1832 | /// - "XLSX" |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1833 | core.String format; |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1834 | |
| 1835 | /// The path to the location in Google Cloud Storage where the latest report |
| 1836 | /// is stored. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1837 | core.String googleCloudStoragePathForLatestReport; |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1838 | |
| 1839 | /// The path in Google Drive for the latest report. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1840 | core.String googleDrivePathForLatestReport; |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1841 | |
| 1842 | /// The time when the latest report started to run. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1843 | core.String latestReportRunTimeMs; |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1844 | |
| 1845 | /// Locale of the generated reports. Valid values are cs CZECH de GERMAN en |
| 1846 | /// ENGLISH es SPANISH fr FRENCH it ITALIAN ja JAPANESE ko KOREAN pl POLISH |
| 1847 | /// pt-BR BRAZILIAN_PORTUGUESE ru RUSSIAN tr TURKISH uk UKRAINIAN zh-CN |
Jonas Finnemann Jensen | ef0c8a3 | 2020-10-07 20:58:20 +0200 | [diff] [blame] | 1848 | /// CHINA_CHINESE zh-TW TAIWAN_CHINESE An locale string not in the list above |
| 1849 | /// will generate reports in English. |
Gustav Wibling | 73da588 | 2015-02-04 16:41:07 +0100 | [diff] [blame] | 1850 | core.String locale; |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1851 | |
| 1852 | /// Number of reports that have been generated for the query. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1853 | core.int reportCount; |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1854 | |
| 1855 | /// Whether the latest report is currently running. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1856 | core.bool running; |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1857 | |
| 1858 | /// Whether to send an email notification when a report is ready. Default to |
| 1859 | /// false. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1860 | core.bool sendNotification; |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1861 | |
| 1862 | /// List of email addresses which are sent email notifications when the report |
| 1863 | /// is finished. Separate from sendNotification. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1864 | core.List<core.String> shareEmailAddress; |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1865 | |
| 1866 | /// Query title. It is used to name the reports generated from this query. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1867 | core.String title; |
| 1868 | |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1869 | QueryMetadata(); |
| 1870 | |
| 1871 | QueryMetadata.fromJson(core.Map _json) { |
| 1872 | if (_json.containsKey("dataRange")) { |
| 1873 | dataRange = _json["dataRange"]; |
| 1874 | } |
| 1875 | if (_json.containsKey("format")) { |
| 1876 | format = _json["format"]; |
| 1877 | } |
| 1878 | if (_json.containsKey("googleCloudStoragePathForLatestReport")) { |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1879 | googleCloudStoragePathForLatestReport = |
| 1880 | _json["googleCloudStoragePathForLatestReport"]; |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1881 | } |
| 1882 | if (_json.containsKey("googleDrivePathForLatestReport")) { |
| 1883 | googleDrivePathForLatestReport = _json["googleDrivePathForLatestReport"]; |
| 1884 | } |
| 1885 | if (_json.containsKey("latestReportRunTimeMs")) { |
| 1886 | latestReportRunTimeMs = _json["latestReportRunTimeMs"]; |
| 1887 | } |
Gustav Wibling | 73da588 | 2015-02-04 16:41:07 +0100 | [diff] [blame] | 1888 | if (_json.containsKey("locale")) { |
| 1889 | locale = _json["locale"]; |
| 1890 | } |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1891 | if (_json.containsKey("reportCount")) { |
| 1892 | reportCount = _json["reportCount"]; |
| 1893 | } |
| 1894 | if (_json.containsKey("running")) { |
| 1895 | running = _json["running"]; |
| 1896 | } |
| 1897 | if (_json.containsKey("sendNotification")) { |
| 1898 | sendNotification = _json["sendNotification"]; |
| 1899 | } |
| 1900 | if (_json.containsKey("shareEmailAddress")) { |
Jakob Andersen | 52715df | 2018-05-01 13:58:48 +0200 | [diff] [blame] | 1901 | shareEmailAddress = |
| 1902 | (_json["shareEmailAddress"] as core.List).cast<core.String>(); |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1903 | } |
| 1904 | if (_json.containsKey("title")) { |
| 1905 | title = _json["title"]; |
| 1906 | } |
| 1907 | } |
| 1908 | |
Martin Kustermann | 3953f0d | 2017-06-12 16:59:53 +0200 | [diff] [blame] | 1909 | core.Map<core.String, core.Object> toJson() { |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1910 | final core.Map<core.String, core.Object> _json = |
| 1911 | new core.Map<core.String, core.Object>(); |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1912 | if (dataRange != null) { |
| 1913 | _json["dataRange"] = dataRange; |
| 1914 | } |
| 1915 | if (format != null) { |
| 1916 | _json["format"] = format; |
| 1917 | } |
| 1918 | if (googleCloudStoragePathForLatestReport != null) { |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1919 | _json["googleCloudStoragePathForLatestReport"] = |
| 1920 | googleCloudStoragePathForLatestReport; |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1921 | } |
| 1922 | if (googleDrivePathForLatestReport != null) { |
| 1923 | _json["googleDrivePathForLatestReport"] = googleDrivePathForLatestReport; |
| 1924 | } |
| 1925 | if (latestReportRunTimeMs != null) { |
| 1926 | _json["latestReportRunTimeMs"] = latestReportRunTimeMs; |
| 1927 | } |
Gustav Wibling | 73da588 | 2015-02-04 16:41:07 +0100 | [diff] [blame] | 1928 | if (locale != null) { |
| 1929 | _json["locale"] = locale; |
| 1930 | } |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1931 | if (reportCount != null) { |
| 1932 | _json["reportCount"] = reportCount; |
| 1933 | } |
| 1934 | if (running != null) { |
| 1935 | _json["running"] = running; |
| 1936 | } |
| 1937 | if (sendNotification != null) { |
| 1938 | _json["sendNotification"] = sendNotification; |
| 1939 | } |
| 1940 | if (shareEmailAddress != null) { |
| 1941 | _json["shareEmailAddress"] = shareEmailAddress; |
| 1942 | } |
| 1943 | if (title != null) { |
| 1944 | _json["title"] = title; |
| 1945 | } |
| 1946 | return _json; |
| 1947 | } |
| 1948 | } |
| 1949 | |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1950 | /// Information on how frequently and when to run a query. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1951 | class QuerySchedule { |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1952 | /// Datetime to periodically run the query until. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1953 | core.String endTimeMs; |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1954 | |
| 1955 | /// How often the query is run. |
| 1956 | /// Possible string values are: |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1957 | /// - "ONE_TIME" |
Jonas Finnemann Jensen | ef0c8a3 | 2020-10-07 20:58:20 +0200 | [diff] [blame] | 1958 | /// - "DAILY" |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1959 | /// - "WEEKLY" |
Jonas Finnemann Jensen | ef0c8a3 | 2020-10-07 20:58:20 +0200 | [diff] [blame] | 1960 | /// - "SEMI_MONTHLY" |
| 1961 | /// - "MONTHLY" |
| 1962 | /// - "QUARTERLY" |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1963 | core.String frequency; |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1964 | |
Jonas Finnemann Jensen | ef0c8a3 | 2020-10-07 20:58:20 +0200 | [diff] [blame] | 1965 | /// Deprecated. This field has no effect. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1966 | core.int nextRunMinuteOfDay; |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1967 | |
| 1968 | /// Canonical timezone code for report generation time. Defaults to |
| 1969 | /// America/New_York. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1970 | core.String nextRunTimezoneCode; |
| 1971 | |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 1972 | /// When to start running the query. Not applicable to `ONE_TIME` frequency. |
| 1973 | core.String startTimeMs; |
| 1974 | |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1975 | QuerySchedule(); |
| 1976 | |
| 1977 | QuerySchedule.fromJson(core.Map _json) { |
| 1978 | if (_json.containsKey("endTimeMs")) { |
| 1979 | endTimeMs = _json["endTimeMs"]; |
| 1980 | } |
| 1981 | if (_json.containsKey("frequency")) { |
| 1982 | frequency = _json["frequency"]; |
| 1983 | } |
| 1984 | if (_json.containsKey("nextRunMinuteOfDay")) { |
| 1985 | nextRunMinuteOfDay = _json["nextRunMinuteOfDay"]; |
| 1986 | } |
| 1987 | if (_json.containsKey("nextRunTimezoneCode")) { |
| 1988 | nextRunTimezoneCode = _json["nextRunTimezoneCode"]; |
| 1989 | } |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 1990 | if (_json.containsKey("startTimeMs")) { |
| 1991 | startTimeMs = _json["startTimeMs"]; |
| 1992 | } |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1993 | } |
| 1994 | |
Martin Kustermann | 3953f0d | 2017-06-12 16:59:53 +0200 | [diff] [blame] | 1995 | core.Map<core.String, core.Object> toJson() { |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 1996 | final core.Map<core.String, core.Object> _json = |
| 1997 | new core.Map<core.String, core.Object>(); |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 1998 | if (endTimeMs != null) { |
| 1999 | _json["endTimeMs"] = endTimeMs; |
| 2000 | } |
| 2001 | if (frequency != null) { |
| 2002 | _json["frequency"] = frequency; |
| 2003 | } |
| 2004 | if (nextRunMinuteOfDay != null) { |
| 2005 | _json["nextRunMinuteOfDay"] = nextRunMinuteOfDay; |
| 2006 | } |
| 2007 | if (nextRunTimezoneCode != null) { |
| 2008 | _json["nextRunTimezoneCode"] = nextRunTimezoneCode; |
| 2009 | } |
Jonas Finnemann Jensen | 94d5b4d | 2020-05-07 12:00:14 +0200 | [diff] [blame] | 2010 | if (startTimeMs != null) { |
| 2011 | _json["startTimeMs"] = startTimeMs; |
| 2012 | } |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2013 | return _json; |
| 2014 | } |
| 2015 | } |
| 2016 | |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 2017 | /// Represents a report. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2018 | class Report { |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 2019 | /// Key used to identify a report. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2020 | ReportKey key; |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 2021 | |
| 2022 | /// Report metadata. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2023 | ReportMetadata metadata; |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 2024 | |
| 2025 | /// Report parameters. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2026 | Parameters params; |
| 2027 | |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2028 | Report(); |
| 2029 | |
| 2030 | Report.fromJson(core.Map _json) { |
| 2031 | if (_json.containsKey("key")) { |
| 2032 | key = new ReportKey.fromJson(_json["key"]); |
| 2033 | } |
| 2034 | if (_json.containsKey("metadata")) { |
| 2035 | metadata = new ReportMetadata.fromJson(_json["metadata"]); |
| 2036 | } |
| 2037 | if (_json.containsKey("params")) { |
| 2038 | params = new Parameters.fromJson(_json["params"]); |
| 2039 | } |
| 2040 | } |
| 2041 | |
Martin Kustermann | 3953f0d | 2017-06-12 16:59:53 +0200 | [diff] [blame] | 2042 | core.Map<core.String, core.Object> toJson() { |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 2043 | final core.Map<core.String, core.Object> _json = |
| 2044 | new core.Map<core.String, core.Object>(); |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2045 | if (key != null) { |
| 2046 | _json["key"] = (key).toJson(); |
| 2047 | } |
| 2048 | if (metadata != null) { |
| 2049 | _json["metadata"] = (metadata).toJson(); |
| 2050 | } |
| 2051 | if (params != null) { |
| 2052 | _json["params"] = (params).toJson(); |
| 2053 | } |
| 2054 | return _json; |
| 2055 | } |
| 2056 | } |
| 2057 | |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 2058 | /// An explanation of a report failure. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2059 | class ReportFailure { |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 2060 | /// Error code that shows why the report was not created. |
| 2061 | /// Possible string values are: |
| 2062 | /// - "AUTHENTICATION_ERROR" |
Jonas Finnemann Jensen | ef0c8a3 | 2020-10-07 20:58:20 +0200 | [diff] [blame] | 2063 | /// - "UNAUTHORIZED_API_ACCESS" |
| 2064 | /// - "SERVER_ERROR" |
| 2065 | /// - "VALIDATION_ERROR" |
| 2066 | /// - "REPORTING_FATAL_ERROR" |
| 2067 | /// - "REPORTING_TRANSIENT_ERROR" |
| 2068 | /// - "REPORTING_IMCOMPATIBLE_METRICS" |
| 2069 | /// - "REPORTING_ILLEGAL_FILENAME" |
| 2070 | /// - "REPORTING_QUERY_NOT_FOUND" |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 2071 | /// - "REPORTING_BUCKET_NOT_FOUND" |
| 2072 | /// - "REPORTING_CREATE_BUCKET_FAILED" |
| 2073 | /// - "REPORTING_DELETE_BUCKET_FAILED" |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 2074 | /// - "REPORTING_UPDATE_BUCKET_PERMISSION_FAILED" |
| 2075 | /// - "REPORTING_WRITE_BUCKET_OBJECT_FAILED" |
Jonas Finnemann Jensen | ef0c8a3 | 2020-10-07 20:58:20 +0200 | [diff] [blame] | 2076 | /// - "DEPRECATED_REPORTING_INVALID_QUERY" |
| 2077 | /// - "REPORTING_INVALID_QUERY_TOO_MANY_UNFILTERED_LARGE_GROUP_BYS" |
| 2078 | /// - "REPORTING_INVALID_QUERY_TITLE_MISSING" |
| 2079 | /// - "REPORTING_INVALID_QUERY_MISSING_PARTNER_AND_ADVERTISER_FILTERS" |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2080 | core.String errorCode; |
| 2081 | |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2082 | ReportFailure(); |
| 2083 | |
| 2084 | ReportFailure.fromJson(core.Map _json) { |
| 2085 | if (_json.containsKey("errorCode")) { |
| 2086 | errorCode = _json["errorCode"]; |
| 2087 | } |
| 2088 | } |
| 2089 | |
Martin Kustermann | 3953f0d | 2017-06-12 16:59:53 +0200 | [diff] [blame] | 2090 | core.Map<core.String, core.Object> toJson() { |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 2091 | final core.Map<core.String, core.Object> _json = |
| 2092 | new core.Map<core.String, core.Object>(); |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2093 | if (errorCode != null) { |
| 2094 | _json["errorCode"] = errorCode; |
| 2095 | } |
| 2096 | return _json; |
| 2097 | } |
| 2098 | } |
| 2099 | |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 2100 | /// Key used to identify a report. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2101 | class ReportKey { |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 2102 | /// Query ID. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2103 | core.String queryId; |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 2104 | |
| 2105 | /// Report ID. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2106 | core.String reportId; |
| 2107 | |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2108 | ReportKey(); |
| 2109 | |
| 2110 | ReportKey.fromJson(core.Map _json) { |
| 2111 | if (_json.containsKey("queryId")) { |
| 2112 | queryId = _json["queryId"]; |
| 2113 | } |
| 2114 | if (_json.containsKey("reportId")) { |
| 2115 | reportId = _json["reportId"]; |
| 2116 | } |
| 2117 | } |
| 2118 | |
Martin Kustermann | 3953f0d | 2017-06-12 16:59:53 +0200 | [diff] [blame] | 2119 | core.Map<core.String, core.Object> toJson() { |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 2120 | final core.Map<core.String, core.Object> _json = |
| 2121 | new core.Map<core.String, core.Object>(); |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2122 | if (queryId != null) { |
| 2123 | _json["queryId"] = queryId; |
| 2124 | } |
| 2125 | if (reportId != null) { |
| 2126 | _json["reportId"] = reportId; |
| 2127 | } |
| 2128 | return _json; |
| 2129 | } |
| 2130 | } |
| 2131 | |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 2132 | /// Report metadata. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2133 | class ReportMetadata { |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 2134 | /// The path to the location in Google Cloud Storage where the report is |
| 2135 | /// stored. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2136 | core.String googleCloudStoragePath; |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 2137 | |
| 2138 | /// The ending time for the data that is shown in the report. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2139 | core.String reportDataEndTimeMs; |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 2140 | |
| 2141 | /// The starting time for the data that is shown in the report. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2142 | core.String reportDataStartTimeMs; |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 2143 | |
| 2144 | /// Report status. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2145 | ReportStatus status; |
| 2146 | |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2147 | ReportMetadata(); |
| 2148 | |
| 2149 | ReportMetadata.fromJson(core.Map _json) { |
| 2150 | if (_json.containsKey("googleCloudStoragePath")) { |
| 2151 | googleCloudStoragePath = _json["googleCloudStoragePath"]; |
| 2152 | } |
| 2153 | if (_json.containsKey("reportDataEndTimeMs")) { |
| 2154 | reportDataEndTimeMs = _json["reportDataEndTimeMs"]; |
| 2155 | } |
| 2156 | if (_json.containsKey("reportDataStartTimeMs")) { |
| 2157 | reportDataStartTimeMs = _json["reportDataStartTimeMs"]; |
| 2158 | } |
| 2159 | if (_json.containsKey("status")) { |
| 2160 | status = new ReportStatus.fromJson(_json["status"]); |
| 2161 | } |
| 2162 | } |
| 2163 | |
Martin Kustermann | 3953f0d | 2017-06-12 16:59:53 +0200 | [diff] [blame] | 2164 | core.Map<core.String, core.Object> toJson() { |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 2165 | final core.Map<core.String, core.Object> _json = |
| 2166 | new core.Map<core.String, core.Object>(); |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2167 | if (googleCloudStoragePath != null) { |
| 2168 | _json["googleCloudStoragePath"] = googleCloudStoragePath; |
| 2169 | } |
| 2170 | if (reportDataEndTimeMs != null) { |
| 2171 | _json["reportDataEndTimeMs"] = reportDataEndTimeMs; |
| 2172 | } |
| 2173 | if (reportDataStartTimeMs != null) { |
| 2174 | _json["reportDataStartTimeMs"] = reportDataStartTimeMs; |
| 2175 | } |
| 2176 | if (status != null) { |
| 2177 | _json["status"] = (status).toJson(); |
| 2178 | } |
| 2179 | return _json; |
| 2180 | } |
| 2181 | } |
| 2182 | |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 2183 | /// Report status. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2184 | class ReportStatus { |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 2185 | /// If the report failed, this records the cause. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2186 | ReportFailure failure; |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 2187 | |
| 2188 | /// The time when this report either completed successfully or failed. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2189 | core.String finishTimeMs; |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 2190 | |
| 2191 | /// The file type of the report. |
| 2192 | /// Possible string values are: |
| 2193 | /// - "CSV" |
| 2194 | /// - "EXCEL_CSV" |
| 2195 | /// - "XLSX" |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2196 | core.String format; |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 2197 | |
| 2198 | /// The state of the report. |
| 2199 | /// Possible string values are: |
Jonas Finnemann Jensen | ef0c8a3 | 2020-10-07 20:58:20 +0200 | [diff] [blame] | 2200 | /// - "RUNNING" |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 2201 | /// - "DONE" |
| 2202 | /// - "FAILED" |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2203 | core.String state; |
| 2204 | |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2205 | ReportStatus(); |
| 2206 | |
| 2207 | ReportStatus.fromJson(core.Map _json) { |
| 2208 | if (_json.containsKey("failure")) { |
| 2209 | failure = new ReportFailure.fromJson(_json["failure"]); |
| 2210 | } |
| 2211 | if (_json.containsKey("finishTimeMs")) { |
| 2212 | finishTimeMs = _json["finishTimeMs"]; |
| 2213 | } |
| 2214 | if (_json.containsKey("format")) { |
| 2215 | format = _json["format"]; |
| 2216 | } |
| 2217 | if (_json.containsKey("state")) { |
| 2218 | state = _json["state"]; |
| 2219 | } |
| 2220 | } |
| 2221 | |
Martin Kustermann | 3953f0d | 2017-06-12 16:59:53 +0200 | [diff] [blame] | 2222 | core.Map<core.String, core.Object> toJson() { |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 2223 | final core.Map<core.String, core.Object> _json = |
| 2224 | new core.Map<core.String, core.Object>(); |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2225 | if (failure != null) { |
| 2226 | _json["failure"] = (failure).toJson(); |
| 2227 | } |
| 2228 | if (finishTimeMs != null) { |
| 2229 | _json["finishTimeMs"] = finishTimeMs; |
| 2230 | } |
| 2231 | if (format != null) { |
| 2232 | _json["format"] = format; |
| 2233 | } |
| 2234 | if (state != null) { |
| 2235 | _json["state"] = state; |
| 2236 | } |
| 2237 | return _json; |
| 2238 | } |
| 2239 | } |
| 2240 | |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 2241 | /// Represents the upload status of a row in the request. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2242 | class RowStatus { |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 2243 | /// Whether the stored entity is changed as a result of upload. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2244 | core.bool changed; |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 2245 | |
| 2246 | /// Entity Id. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2247 | core.String entityId; |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 2248 | |
| 2249 | /// Entity name. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2250 | core.String entityName; |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 2251 | |
| 2252 | /// Reasons why the entity can't be uploaded. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2253 | core.List<core.String> errors; |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 2254 | |
| 2255 | /// Whether the entity is persisted. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2256 | core.bool persisted; |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 2257 | |
| 2258 | /// Row number. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2259 | core.int rowNumber; |
| 2260 | |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2261 | RowStatus(); |
| 2262 | |
| 2263 | RowStatus.fromJson(core.Map _json) { |
| 2264 | if (_json.containsKey("changed")) { |
| 2265 | changed = _json["changed"]; |
| 2266 | } |
| 2267 | if (_json.containsKey("entityId")) { |
| 2268 | entityId = _json["entityId"]; |
| 2269 | } |
| 2270 | if (_json.containsKey("entityName")) { |
| 2271 | entityName = _json["entityName"]; |
| 2272 | } |
| 2273 | if (_json.containsKey("errors")) { |
Jakob Andersen | 52715df | 2018-05-01 13:58:48 +0200 | [diff] [blame] | 2274 | errors = (_json["errors"] as core.List).cast<core.String>(); |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2275 | } |
| 2276 | if (_json.containsKey("persisted")) { |
| 2277 | persisted = _json["persisted"]; |
| 2278 | } |
| 2279 | if (_json.containsKey("rowNumber")) { |
| 2280 | rowNumber = _json["rowNumber"]; |
| 2281 | } |
| 2282 | } |
| 2283 | |
Martin Kustermann | 3953f0d | 2017-06-12 16:59:53 +0200 | [diff] [blame] | 2284 | core.Map<core.String, core.Object> toJson() { |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 2285 | final core.Map<core.String, core.Object> _json = |
| 2286 | new core.Map<core.String, core.Object>(); |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2287 | if (changed != null) { |
| 2288 | _json["changed"] = changed; |
| 2289 | } |
| 2290 | if (entityId != null) { |
| 2291 | _json["entityId"] = entityId; |
| 2292 | } |
| 2293 | if (entityName != null) { |
| 2294 | _json["entityName"] = entityName; |
| 2295 | } |
| 2296 | if (errors != null) { |
| 2297 | _json["errors"] = errors; |
| 2298 | } |
| 2299 | if (persisted != null) { |
| 2300 | _json["persisted"] = persisted; |
| 2301 | } |
| 2302 | if (rowNumber != null) { |
| 2303 | _json["rowNumber"] = rowNumber; |
| 2304 | } |
| 2305 | return _json; |
| 2306 | } |
| 2307 | } |
| 2308 | |
Jonas Finnemann Jensen | ef0c8a3 | 2020-10-07 20:58:20 +0200 | [diff] [blame] | 2309 | /// A Rule defines a name, and a boolean expression in [conjunctive normal |
| 2310 | /// form](http: //mathworld.wolfram.com/ConjunctiveNormalForm.html){.external} |
| 2311 | /// that can be // applied to a path event to determine if that name should be |
| 2312 | /// applied. |
| 2313 | class Rule { |
| 2314 | core.List<DisjunctiveMatchStatement> disjunctiveMatchStatements; |
| 2315 | |
| 2316 | /// Rule name. |
| 2317 | core.String name; |
| 2318 | |
| 2319 | Rule(); |
| 2320 | |
| 2321 | Rule.fromJson(core.Map _json) { |
| 2322 | if (_json.containsKey("disjunctiveMatchStatements")) { |
| 2323 | disjunctiveMatchStatements = |
| 2324 | (_json["disjunctiveMatchStatements"] as core.List) |
| 2325 | .map<DisjunctiveMatchStatement>( |
| 2326 | (value) => new DisjunctiveMatchStatement.fromJson(value)) |
| 2327 | .toList(); |
| 2328 | } |
| 2329 | if (_json.containsKey("name")) { |
| 2330 | name = _json["name"]; |
| 2331 | } |
| 2332 | } |
| 2333 | |
| 2334 | core.Map<core.String, core.Object> toJson() { |
| 2335 | final core.Map<core.String, core.Object> _json = |
| 2336 | new core.Map<core.String, core.Object>(); |
| 2337 | if (disjunctiveMatchStatements != null) { |
| 2338 | _json["disjunctiveMatchStatements"] = |
| 2339 | disjunctiveMatchStatements.map((value) => (value).toJson()).toList(); |
| 2340 | } |
| 2341 | if (name != null) { |
| 2342 | _json["name"] = name; |
| 2343 | } |
| 2344 | return _json; |
| 2345 | } |
| 2346 | } |
| 2347 | |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 2348 | /// Request to run a stored query to generate a report. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2349 | class RunQueryRequest { |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 2350 | /// Report data range used to generate the report. |
| 2351 | /// Possible string values are: |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 2352 | /// - "CUSTOM_DATES" |
Jonas Finnemann Jensen | ef0c8a3 | 2020-10-07 20:58:20 +0200 | [diff] [blame] | 2353 | /// - "CURRENT_DAY" |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 2354 | /// - "PREVIOUS_DAY" |
Jonas Finnemann Jensen | ef0c8a3 | 2020-10-07 20:58:20 +0200 | [diff] [blame] | 2355 | /// - "WEEK_TO_DATE" |
| 2356 | /// - "MONTH_TO_DATE" |
| 2357 | /// - "QUARTER_TO_DATE" |
| 2358 | /// - "YEAR_TO_DATE" |
| 2359 | /// - "PREVIOUS_WEEK" |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 2360 | /// - "PREVIOUS_HALF_MONTH" |
| 2361 | /// - "PREVIOUS_MONTH" |
| 2362 | /// - "PREVIOUS_QUARTER" |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 2363 | /// - "PREVIOUS_YEAR" |
Jonas Finnemann Jensen | ef0c8a3 | 2020-10-07 20:58:20 +0200 | [diff] [blame] | 2364 | /// - "LAST_7_DAYS" |
| 2365 | /// - "LAST_30_DAYS" |
| 2366 | /// - "LAST_90_DAYS" |
| 2367 | /// - "LAST_365_DAYS" |
| 2368 | /// - "ALL_TIME" |
| 2369 | /// - "LAST_14_DAYS" |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 2370 | /// - "TYPE_NOT_SUPPORTED" |
Jonas Finnemann Jensen | ef0c8a3 | 2020-10-07 20:58:20 +0200 | [diff] [blame] | 2371 | /// - "LAST_60_DAYS" |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2372 | core.String dataRange; |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 2373 | |
| 2374 | /// The ending time for the data that is shown in the report. Note, |
| 2375 | /// reportDataEndTimeMs is required if dataRange is CUSTOM_DATES and ignored |
| 2376 | /// otherwise. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2377 | core.String reportDataEndTimeMs; |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 2378 | |
| 2379 | /// The starting time for the data that is shown in the report. Note, |
| 2380 | /// reportDataStartTimeMs is required if dataRange is CUSTOM_DATES and ignored |
| 2381 | /// otherwise. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2382 | core.String reportDataStartTimeMs; |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 2383 | |
| 2384 | /// Canonical timezone code for report data time. Defaults to |
| 2385 | /// America/New_York. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2386 | core.String timezoneCode; |
| 2387 | |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2388 | RunQueryRequest(); |
| 2389 | |
| 2390 | RunQueryRequest.fromJson(core.Map _json) { |
| 2391 | if (_json.containsKey("dataRange")) { |
| 2392 | dataRange = _json["dataRange"]; |
| 2393 | } |
| 2394 | if (_json.containsKey("reportDataEndTimeMs")) { |
| 2395 | reportDataEndTimeMs = _json["reportDataEndTimeMs"]; |
| 2396 | } |
| 2397 | if (_json.containsKey("reportDataStartTimeMs")) { |
| 2398 | reportDataStartTimeMs = _json["reportDataStartTimeMs"]; |
| 2399 | } |
| 2400 | if (_json.containsKey("timezoneCode")) { |
| 2401 | timezoneCode = _json["timezoneCode"]; |
| 2402 | } |
| 2403 | } |
| 2404 | |
Martin Kustermann | 3953f0d | 2017-06-12 16:59:53 +0200 | [diff] [blame] | 2405 | core.Map<core.String, core.Object> toJson() { |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 2406 | final core.Map<core.String, core.Object> _json = |
| 2407 | new core.Map<core.String, core.Object>(); |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2408 | if (dataRange != null) { |
| 2409 | _json["dataRange"] = dataRange; |
| 2410 | } |
| 2411 | if (reportDataEndTimeMs != null) { |
| 2412 | _json["reportDataEndTimeMs"] = reportDataEndTimeMs; |
| 2413 | } |
| 2414 | if (reportDataStartTimeMs != null) { |
| 2415 | _json["reportDataStartTimeMs"] = reportDataStartTimeMs; |
| 2416 | } |
| 2417 | if (timezoneCode != null) { |
| 2418 | _json["timezoneCode"] = timezoneCode; |
| 2419 | } |
| 2420 | return _json; |
| 2421 | } |
| 2422 | } |
| 2423 | |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 2424 | /// Request to upload line items. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2425 | class UploadLineItemsRequest { |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 2426 | /// Set to true to get upload status without actually persisting the line |
| 2427 | /// items. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2428 | core.bool dryRun; |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 2429 | |
| 2430 | /// Format the line items are in. Default to CSV. |
| 2431 | /// Possible string values are: |
| 2432 | /// - "CSV" |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2433 | core.String format; |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 2434 | |
Jonas Finnemann Jensen | ef0c8a3 | 2020-10-07 20:58:20 +0200 | [diff] [blame] | 2435 | /// Line items in CSV to upload. Refer to Entity Write File Format for more |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 2436 | /// information on file format. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2437 | core.String lineItems; |
| 2438 | |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2439 | UploadLineItemsRequest(); |
| 2440 | |
| 2441 | UploadLineItemsRequest.fromJson(core.Map _json) { |
| 2442 | if (_json.containsKey("dryRun")) { |
| 2443 | dryRun = _json["dryRun"]; |
| 2444 | } |
| 2445 | if (_json.containsKey("format")) { |
| 2446 | format = _json["format"]; |
| 2447 | } |
| 2448 | if (_json.containsKey("lineItems")) { |
| 2449 | lineItems = _json["lineItems"]; |
| 2450 | } |
| 2451 | } |
| 2452 | |
Martin Kustermann | 3953f0d | 2017-06-12 16:59:53 +0200 | [diff] [blame] | 2453 | core.Map<core.String, core.Object> toJson() { |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 2454 | final core.Map<core.String, core.Object> _json = |
| 2455 | new core.Map<core.String, core.Object>(); |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2456 | if (dryRun != null) { |
| 2457 | _json["dryRun"] = dryRun; |
| 2458 | } |
| 2459 | if (format != null) { |
| 2460 | _json["format"] = format; |
| 2461 | } |
| 2462 | if (lineItems != null) { |
| 2463 | _json["lineItems"] = lineItems; |
| 2464 | } |
| 2465 | return _json; |
| 2466 | } |
| 2467 | } |
| 2468 | |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 2469 | /// Upload line items response. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2470 | class UploadLineItemsResponse { |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 2471 | /// Status of upload. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2472 | UploadStatus uploadStatus; |
| 2473 | |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2474 | UploadLineItemsResponse(); |
| 2475 | |
| 2476 | UploadLineItemsResponse.fromJson(core.Map _json) { |
| 2477 | if (_json.containsKey("uploadStatus")) { |
| 2478 | uploadStatus = new UploadStatus.fromJson(_json["uploadStatus"]); |
| 2479 | } |
| 2480 | } |
| 2481 | |
Martin Kustermann | 3953f0d | 2017-06-12 16:59:53 +0200 | [diff] [blame] | 2482 | core.Map<core.String, core.Object> toJson() { |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 2483 | final core.Map<core.String, core.Object> _json = |
| 2484 | new core.Map<core.String, core.Object>(); |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2485 | if (uploadStatus != null) { |
| 2486 | _json["uploadStatus"] = (uploadStatus).toJson(); |
| 2487 | } |
| 2488 | return _json; |
| 2489 | } |
| 2490 | } |
| 2491 | |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 2492 | /// Represents the status of upload. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2493 | class UploadStatus { |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 2494 | /// Reasons why upload can't be completed. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2495 | core.List<core.String> errors; |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 2496 | |
| 2497 | /// Per-row upload status. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2498 | core.List<RowStatus> rowStatus; |
| 2499 | |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2500 | UploadStatus(); |
| 2501 | |
| 2502 | UploadStatus.fromJson(core.Map _json) { |
| 2503 | if (_json.containsKey("errors")) { |
Jakob Andersen | 52715df | 2018-05-01 13:58:48 +0200 | [diff] [blame] | 2504 | errors = (_json["errors"] as core.List).cast<core.String>(); |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2505 | } |
| 2506 | if (_json.containsKey("rowStatus")) { |
Jakob Andersen | 52715df | 2018-05-01 13:58:48 +0200 | [diff] [blame] | 2507 | rowStatus = (_json["rowStatus"] as core.List) |
Jakob Andersen | 4ce761d | 2018-04-19 11:19:11 +0200 | [diff] [blame] | 2508 | .map<RowStatus>((value) => new RowStatus.fromJson(value)) |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 2509 | .toList(); |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2510 | } |
| 2511 | } |
| 2512 | |
Martin Kustermann | 3953f0d | 2017-06-12 16:59:53 +0200 | [diff] [blame] | 2513 | core.Map<core.String, core.Object> toJson() { |
Martin Kustermann | 5eb85c1 | 2017-09-11 12:35:54 +0200 | [diff] [blame] | 2514 | final core.Map<core.String, core.Object> _json = |
| 2515 | new core.Map<core.String, core.Object>(); |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2516 | if (errors != null) { |
| 2517 | _json["errors"] = errors; |
| 2518 | } |
| 2519 | if (rowStatus != null) { |
| 2520 | _json["rowStatus"] = rowStatus.map((value) => (value).toJson()).toList(); |
| 2521 | } |
| 2522 | return _json; |
| 2523 | } |
| 2524 | } |