blob: cb71d1b814ebc02f8812588d7602cf093efbd3a5 [file] [log] [blame]
Gustav Wibling042e6462015-04-10 13:40:06 +02001// This is a generated file (see the discoveryapis_generator project).
2
Jonas Finnemann Jensen94d5b4d2020-05-07 12:00:14 +02003// ignore_for_file: unused_import, unnecessary_cast
Jakob Andersenc21146a2018-05-25 09:46:20 +02004
Jonas Finnemann Jensen94d5b4d2020-05-07 12:00:14 +02005library googleapis.doubleclickbidmanager.v1_1;
Martin Kustermannf9c50a22014-09-10 15:26:11 +02006
Gustav Wibling042e6462015-04-10 13:40:06 +02007import 'dart:core' as core;
Gustav Wibling042e6462015-04-10 13:40:06 +02008import 'dart:async' as async;
9import 'dart:convert' as convert;
Martin Kustermannf9c50a22014-09-10 15:26:11 +020010
Gustav Wibling042e6462015-04-10 13:40:06 +020011import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons;
Martin Kustermannf9c50a22014-09-10 15:26:11 +020012import 'package:http/http.dart' as http;
Martin Kustermannf9c50a22014-09-10 15:26:11 +020013
Martin Kustermann5eb85c12017-09-11 12:35:54 +020014export 'package:_discoveryapis_commons/_discoveryapis_commons.dart'
15 show ApiRequestError, DetailedApiRequestError;
Gustav Wibling042e6462015-04-10 13:40:06 +020016
Jonas Finnemann Jensen94d5b4d2020-05-07 12:00:14 +020017const core.String USER_AGENT = 'dart-api-client doubleclickbidmanager/v1.1';
Martin Kustermannf9c50a22014-09-10 15:26:11 +020018
Jonas Finnemann Jensenef0c8a32020-10-07 20:58:20 +020019/// DoubleClick Bid Manager API allows users to manage and create campaigns and
20/// reports.
Martin Kustermannf9c50a22014-09-10 15:26:11 +020021class DoubleclickbidmanagerApi {
Martin Kustermann5eb85c12017-09-11 12:35:54 +020022 /// View and manage your reports in DoubleClick Bid Manager
23 static const DoubleclickbidmanagerScope =
24 "https://www.googleapis.com/auth/doubleclickbidmanager";
Martin Kustermannf9c50a22014-09-10 15:26:11 +020025
Gustav Wibling042e6462015-04-10 13:40:06 +020026 final commons.ApiRequester _requester;
Martin Kustermannf9c50a22014-09-10 15:26:11 +020027
28 LineitemsResourceApi get lineitems => new LineitemsResourceApi(_requester);
29 QueriesResourceApi get queries => new QueriesResourceApi(_requester);
30 ReportsResourceApi get reports => new ReportsResourceApi(_requester);
Martin Kustermann4ff71db2016-11-09 10:46:40 +010031 SdfResourceApi get sdf => new SdfResourceApi(_requester);
Martin Kustermannf9c50a22014-09-10 15:26:11 +020032
Martin Kustermann5eb85c12017-09-11 12:35:54 +020033 DoubleclickbidmanagerApi(http.Client client,
Jonas Finnemann Jensenef0c8a32020-10-07 20:58:20 +020034 {core.String rootUrl = "https://doubleclickbidmanager.googleapis.com/",
Jonas Finnemann Jensen94d5b4d2020-05-07 12:00:14 +020035 core.String servicePath = "doubleclickbidmanager/v1.1/"})
Martin Kustermann5eb85c12017-09-11 12:35:54 +020036 : _requester =
37 new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT);
Martin Kustermannf9c50a22014-09-10 15:26:11 +020038}
39
Martin Kustermannf9c50a22014-09-10 15:26:11 +020040class LineitemsResourceApi {
Gustav Wibling042e6462015-04-10 13:40:06 +020041 final commons.ApiRequester _requester;
Martin Kustermannf9c50a22014-09-10 15:26:11 +020042
Martin Kustermann5eb85c12017-09-11 12:35:54 +020043 LineitemsResourceApi(commons.ApiRequester client) : _requester = client;
Martin Kustermannf9c50a22014-09-10 15:26:11 +020044
Jonas Finnemann Jensenef0c8a32020-10-07 20:58:20 +020045 /// Retrieves line items in CSV format. YouTube & partners line items are not
46 /// supported.
Martin Kustermann5eb85c12017-09-11 12:35:54 +020047 ///
48 /// [request] - The metadata request object.
49 ///
50 /// Request parameters:
51 ///
Martin Kustermann7a3b5f52017-10-23 11:34:19 +020052 /// [$fields] - Selector specifying which fields to include in a partial
53 /// response.
54 ///
Martin Kustermann5eb85c12017-09-11 12:35:54 +020055 /// 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 Kustermann7a3b5f52017-10-23 11:34:19 +020063 DownloadLineItemsRequest request,
64 {core.String $fields}) {
Jonas Finnemann Jensend22e4042019-02-09 14:14:19 +010065 var _url;
Jakob Andersen4ce761d2018-04-19 11:19:11 +020066 var _queryParams = new core.Map<core.String, core.List<core.String>>();
Jonas Finnemann Jensend22e4042019-02-09 14:14:19 +010067 var _uploadMedia;
68 var _uploadOptions;
Gustav Wibling042e6462015-04-10 13:40:06 +020069 var _downloadOptions = commons.DownloadOptions.Metadata;
Jonas Finnemann Jensend22e4042019-02-09 14:14:19 +010070 var _body;
Martin Kustermannf9c50a22014-09-10 15:26:11 +020071
72 if (request != null) {
Jakob Andersen52715df2018-05-01 13:58:48 +020073 _body = convert.json.encode((request).toJson());
Martin Kustermannf9c50a22014-09-10 15:26:11 +020074 }
Martin Kustermann7a3b5f52017-10-23 11:34:19 +020075 if ($fields != null) {
76 _queryParams["fields"] = [$fields];
77 }
Martin Kustermannf9c50a22014-09-10 15:26:11 +020078
Martin Kustermannf9c50a22014-09-10 15:26:11 +020079 _url = 'lineitems/downloadlineitems';
80
Martin Kustermann5eb85c12017-09-11 12:35:54 +020081 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 Kustermannf9c50a22014-09-10 15:26:11 +020089 }
90
Jonas Finnemann Jensenef0c8a32020-10-07 20:58:20 +020091 /// Uploads line items in CSV format. YouTube & partners line items are not
92 /// supported.
Martin Kustermann5eb85c12017-09-11 12:35:54 +020093 ///
94 /// [request] - The metadata request object.
95 ///
96 /// Request parameters:
97 ///
Martin Kustermann7a3b5f52017-10-23 11:34:19 +020098 /// [$fields] - Selector specifying which fields to include in a partial
99 /// response.
100 ///
Martin Kustermann5eb85c12017-09-11 12:35:54 +0200101 /// 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 Kustermann7a3b5f52017-10-23 11:34:19 +0200109 UploadLineItemsRequest request,
110 {core.String $fields}) {
Jonas Finnemann Jensend22e4042019-02-09 14:14:19 +0100111 var _url;
Jakob Andersen4ce761d2018-04-19 11:19:11 +0200112 var _queryParams = new core.Map<core.String, core.List<core.String>>();
Jonas Finnemann Jensend22e4042019-02-09 14:14:19 +0100113 var _uploadMedia;
114 var _uploadOptions;
Gustav Wibling042e6462015-04-10 13:40:06 +0200115 var _downloadOptions = commons.DownloadOptions.Metadata;
Jonas Finnemann Jensend22e4042019-02-09 14:14:19 +0100116 var _body;
Martin Kustermannf9c50a22014-09-10 15:26:11 +0200117
118 if (request != null) {
Jakob Andersen52715df2018-05-01 13:58:48 +0200119 _body = convert.json.encode((request).toJson());
Martin Kustermannf9c50a22014-09-10 15:26:11 +0200120 }
Martin Kustermann7a3b5f52017-10-23 11:34:19 +0200121 if ($fields != null) {
122 _queryParams["fields"] = [$fields];
123 }
Martin Kustermannf9c50a22014-09-10 15:26:11 +0200124
Martin Kustermannf9c50a22014-09-10 15:26:11 +0200125 _url = 'lineitems/uploadlineitems';
126
Martin Kustermann5eb85c12017-09-11 12:35:54 +0200127 var _response = _requester.request(_url, "POST",
128 body: _body,
129 queryParams: _queryParams,
130 uploadOptions: _uploadOptions,
131 uploadMedia: _uploadMedia,
132 downloadOptions: _downloadOptions);
Martin Kustermannf9c50a22014-09-10 15:26:11 +0200133 return _response.then((data) => new UploadLineItemsResponse.fromJson(data));
134 }
Martin Kustermannf9c50a22014-09-10 15:26:11 +0200135}
136
Martin Kustermannf9c50a22014-09-10 15:26:11 +0200137class QueriesResourceApi {
Gustav Wibling042e6462015-04-10 13:40:06 +0200138 final commons.ApiRequester _requester;
Martin Kustermannf9c50a22014-09-10 15:26:11 +0200139
Martin Kustermann5eb85c12017-09-11 12:35:54 +0200140 QueriesResourceApi(commons.ApiRequester client) : _requester = client;
Martin Kustermannf9c50a22014-09-10 15:26:11 +0200141
Martin Kustermann5eb85c12017-09-11 12:35:54 +0200142 /// Creates a query.
143 ///
144 /// [request] - The metadata request object.
145 ///
146 /// Request parameters:
147 ///
Jonas Finnemann Jensen94d5b4d2020-05-07 12:00:14 +0200148 /// [asynchronous] - If true, tries to run the query asynchronously. Only
149 /// applicable when the frequency is ONE_TIME.
150 ///
Martin Kustermann7a3b5f52017-10-23 11:34:19 +0200151 /// [$fields] - Selector specifying which fields to include in a partial
152 /// response.
153 ///
Martin Kustermann5eb85c12017-09-11 12:35:54 +0200154 /// 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 Jensen94d5b4d2020-05-07 12:00:14 +0200161 async.Future<Query> createquery(Query request,
162 {core.bool asynchronous, core.String $fields}) {
Jonas Finnemann Jensend22e4042019-02-09 14:14:19 +0100163 var _url;
Jakob Andersen4ce761d2018-04-19 11:19:11 +0200164 var _queryParams = new core.Map<core.String, core.List<core.String>>();
Jonas Finnemann Jensend22e4042019-02-09 14:14:19 +0100165 var _uploadMedia;
166 var _uploadOptions;
Gustav Wibling042e6462015-04-10 13:40:06 +0200167 var _downloadOptions = commons.DownloadOptions.Metadata;
Jonas Finnemann Jensend22e4042019-02-09 14:14:19 +0100168 var _body;
Martin Kustermannf9c50a22014-09-10 15:26:11 +0200169
170 if (request != null) {
Jakob Andersen52715df2018-05-01 13:58:48 +0200171 _body = convert.json.encode((request).toJson());
Martin Kustermannf9c50a22014-09-10 15:26:11 +0200172 }
Jonas Finnemann Jensen94d5b4d2020-05-07 12:00:14 +0200173 if (asynchronous != null) {
174 _queryParams["asynchronous"] = ["${asynchronous}"];
175 }
Martin Kustermann7a3b5f52017-10-23 11:34:19 +0200176 if ($fields != null) {
177 _queryParams["fields"] = [$fields];
178 }
Martin Kustermannf9c50a22014-09-10 15:26:11 +0200179
Martin Kustermannf9c50a22014-09-10 15:26:11 +0200180 _url = 'query';
181
Martin Kustermann5eb85c12017-09-11 12:35:54 +0200182 var _response = _requester.request(_url, "POST",
183 body: _body,
184 queryParams: _queryParams,
185 uploadOptions: _uploadOptions,
186 uploadMedia: _uploadMedia,
187 downloadOptions: _downloadOptions);
Martin Kustermannf9c50a22014-09-10 15:26:11 +0200188 return _response.then((data) => new Query.fromJson(data));
189 }
190
Martin Kustermann5eb85c12017-09-11 12:35:54 +0200191 /// Deletes a stored query as well as the associated stored reports.
192 ///
193 /// Request parameters:
194 ///
195 /// [queryId] - Query ID to delete.
196 ///
Martin Kustermann7a3b5f52017-10-23 11:34:19 +0200197 /// [$fields] - Selector specifying which fields to include in a partial
198 /// response.
199 ///
Martin Kustermann5eb85c12017-09-11 12:35:54 +0200200 /// 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 Kustermann7a3b5f52017-10-23 11:34:19 +0200205 async.Future deletequery(core.String queryId, {core.String $fields}) {
Jonas Finnemann Jensend22e4042019-02-09 14:14:19 +0100206 var _url;
Jakob Andersen4ce761d2018-04-19 11:19:11 +0200207 var _queryParams = new core.Map<core.String, core.List<core.String>>();
Jonas Finnemann Jensend22e4042019-02-09 14:14:19 +0100208 var _uploadMedia;
209 var _uploadOptions;
Gustav Wibling042e6462015-04-10 13:40:06 +0200210 var _downloadOptions = commons.DownloadOptions.Metadata;
Jonas Finnemann Jensend22e4042019-02-09 14:14:19 +0100211 var _body;
Martin Kustermannf9c50a22014-09-10 15:26:11 +0200212
213 if (queryId == null) {
214 throw new core.ArgumentError("Parameter queryId is required.");
215 }
Martin Kustermann7a3b5f52017-10-23 11:34:19 +0200216 if ($fields != null) {
217 _queryParams["fields"] = [$fields];
218 }
Martin Kustermannf9c50a22014-09-10 15:26:11 +0200219
220 _downloadOptions = null;
221
Gustav Wibling042e6462015-04-10 13:40:06 +0200222 _url = 'query/' + commons.Escaper.ecapeVariable('$queryId');
Martin Kustermannf9c50a22014-09-10 15:26:11 +0200223
Martin Kustermann5eb85c12017-09-11 12:35:54 +0200224 var _response = _requester.request(_url, "DELETE",
225 body: _body,
226 queryParams: _queryParams,
227 uploadOptions: _uploadOptions,
228 uploadMedia: _uploadMedia,
229 downloadOptions: _downloadOptions);
Martin Kustermannf9c50a22014-09-10 15:26:11 +0200230 return _response.then((data) => null);
231 }
232
Martin Kustermann5eb85c12017-09-11 12:35:54 +0200233 /// Retrieves a stored query.
234 ///
235 /// Request parameters:
236 ///
237 /// [queryId] - Query ID to retrieve.
238 ///
Martin Kustermann7a3b5f52017-10-23 11:34:19 +0200239 /// [$fields] - Selector specifying which fields to include in a partial
240 /// response.
241 ///
Martin Kustermann5eb85c12017-09-11 12:35:54 +0200242 /// 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 Kustermann7a3b5f52017-10-23 11:34:19 +0200249 async.Future<Query> getquery(core.String queryId, {core.String $fields}) {
Jonas Finnemann Jensend22e4042019-02-09 14:14:19 +0100250 var _url;
Jakob Andersen4ce761d2018-04-19 11:19:11 +0200251 var _queryParams = new core.Map<core.String, core.List<core.String>>();
Jonas Finnemann Jensend22e4042019-02-09 14:14:19 +0100252 var _uploadMedia;
253 var _uploadOptions;
Gustav Wibling042e6462015-04-10 13:40:06 +0200254 var _downloadOptions = commons.DownloadOptions.Metadata;
Jonas Finnemann Jensend22e4042019-02-09 14:14:19 +0100255 var _body;
Martin Kustermannf9c50a22014-09-10 15:26:11 +0200256
257 if (queryId == null) {
258 throw new core.ArgumentError("Parameter queryId is required.");
259 }
Martin Kustermann7a3b5f52017-10-23 11:34:19 +0200260 if ($fields != null) {
261 _queryParams["fields"] = [$fields];
262 }
Martin Kustermannf9c50a22014-09-10 15:26:11 +0200263
Gustav Wibling042e6462015-04-10 13:40:06 +0200264 _url = 'query/' + commons.Escaper.ecapeVariable('$queryId');
Martin Kustermannf9c50a22014-09-10 15:26:11 +0200265
Martin Kustermann5eb85c12017-09-11 12:35:54 +0200266 var _response = _requester.request(_url, "GET",
267 body: _body,
268 queryParams: _queryParams,
269 uploadOptions: _uploadOptions,
270 uploadMedia: _uploadMedia,
271 downloadOptions: _downloadOptions);
Martin Kustermannf9c50a22014-09-10 15:26:11 +0200272 return _response.then((data) => new Query.fromJson(data));
273 }
274
Martin Kustermann5eb85c12017-09-11 12:35:54 +0200275 /// Retrieves stored queries.
276 ///
277 /// Request parameters:
278 ///
Jonas Finnemann Jensen94d5b4d2020-05-07 12:00:14 +0200279 /// [pageSize] - Maximum number of results per page. Must be between 1 and
280 /// 100. Defaults to 100 if unspecified.
281 ///
Jonas Finnemann Jensenb223bd52020-10-09 13:02:08 +0200282 /// [pageToken] - Optional pagination token.
283 ///
Martin Kustermann7a3b5f52017-10-23 11:34:19 +0200284 /// [$fields] - Selector specifying which fields to include in a partial
285 /// response.
286 ///
Martin Kustermann5eb85c12017-09-11 12:35:54 +0200287 /// 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 Jensen94d5b4d2020-05-07 12:00:14 +0200294 async.Future<ListQueriesResponse> listqueries(
Jonas Finnemann Jensenb223bd52020-10-09 13:02:08 +0200295 {core.int pageSize, core.String pageToken, core.String $fields}) {
Jonas Finnemann Jensend22e4042019-02-09 14:14:19 +0100296 var _url;
Jakob Andersen4ce761d2018-04-19 11:19:11 +0200297 var _queryParams = new core.Map<core.String, core.List<core.String>>();
Jonas Finnemann Jensend22e4042019-02-09 14:14:19 +0100298 var _uploadMedia;
299 var _uploadOptions;
Gustav Wibling042e6462015-04-10 13:40:06 +0200300 var _downloadOptions = commons.DownloadOptions.Metadata;
Jonas Finnemann Jensend22e4042019-02-09 14:14:19 +0100301 var _body;
Martin Kustermannf9c50a22014-09-10 15:26:11 +0200302
Jonas Finnemann Jensenef0c8a32020-10-07 20:58:20 +0200303 if (pageSize != null) {
304 _queryParams["pageSize"] = ["${pageSize}"];
305 }
Jonas Finnemann Jensenb223bd52020-10-09 13:02:08 +0200306 if (pageToken != null) {
307 _queryParams["pageToken"] = [pageToken];
308 }
Martin Kustermann7a3b5f52017-10-23 11:34:19 +0200309 if ($fields != null) {
310 _queryParams["fields"] = [$fields];
311 }
312
Martin Kustermannf9c50a22014-09-10 15:26:11 +0200313 _url = 'queries';
314
Martin Kustermann5eb85c12017-09-11 12:35:54 +0200315 var _response = _requester.request(_url, "GET",
316 body: _body,
317 queryParams: _queryParams,
318 uploadOptions: _uploadOptions,
319 uploadMedia: _uploadMedia,
320 downloadOptions: _downloadOptions);
Martin Kustermannf9c50a22014-09-10 15:26:11 +0200321 return _response.then((data) => new ListQueriesResponse.fromJson(data));
322 }
323
Martin Kustermann5eb85c12017-09-11 12:35:54 +0200324 /// 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 Jensen94d5b4d2020-05-07 12:00:14 +0200332 /// [asynchronous] - If true, tries to run the query asynchronously.
333 ///
Martin Kustermann7a3b5f52017-10-23 11:34:19 +0200334 /// [$fields] - Selector specifying which fields to include in a partial
335 /// response.
336 ///
Martin Kustermann5eb85c12017-09-11 12:35:54 +0200337 /// 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 Kustermann7a3b5f52017-10-23 11:34:19 +0200342 async.Future runquery(RunQueryRequest request, core.String queryId,
Jonas Finnemann Jensen94d5b4d2020-05-07 12:00:14 +0200343 {core.bool asynchronous, core.String $fields}) {
Jonas Finnemann Jensend22e4042019-02-09 14:14:19 +0100344 var _url;
Jakob Andersen4ce761d2018-04-19 11:19:11 +0200345 var _queryParams = new core.Map<core.String, core.List<core.String>>();
Jonas Finnemann Jensend22e4042019-02-09 14:14:19 +0100346 var _uploadMedia;
347 var _uploadOptions;
Gustav Wibling042e6462015-04-10 13:40:06 +0200348 var _downloadOptions = commons.DownloadOptions.Metadata;
Jonas Finnemann Jensend22e4042019-02-09 14:14:19 +0100349 var _body;
Martin Kustermannf9c50a22014-09-10 15:26:11 +0200350
351 if (request != null) {
Jakob Andersen52715df2018-05-01 13:58:48 +0200352 _body = convert.json.encode((request).toJson());
Martin Kustermannf9c50a22014-09-10 15:26:11 +0200353 }
354 if (queryId == null) {
355 throw new core.ArgumentError("Parameter queryId is required.");
356 }
Jonas Finnemann Jensen94d5b4d2020-05-07 12:00:14 +0200357 if (asynchronous != null) {
358 _queryParams["asynchronous"] = ["${asynchronous}"];
359 }
Martin Kustermann7a3b5f52017-10-23 11:34:19 +0200360 if ($fields != null) {
361 _queryParams["fields"] = [$fields];
362 }
Martin Kustermannf9c50a22014-09-10 15:26:11 +0200363
364 _downloadOptions = null;
365
Gustav Wibling042e6462015-04-10 13:40:06 +0200366 _url = 'query/' + commons.Escaper.ecapeVariable('$queryId');
Martin Kustermannf9c50a22014-09-10 15:26:11 +0200367
Martin Kustermann5eb85c12017-09-11 12:35:54 +0200368 var _response = _requester.request(_url, "POST",
369 body: _body,
370 queryParams: _queryParams,
371 uploadOptions: _uploadOptions,
372 uploadMedia: _uploadMedia,
373 downloadOptions: _downloadOptions);
Martin Kustermannf9c50a22014-09-10 15:26:11 +0200374 return _response.then((data) => null);
375 }
Martin Kustermannf9c50a22014-09-10 15:26:11 +0200376}
377
Martin Kustermannf9c50a22014-09-10 15:26:11 +0200378class ReportsResourceApi {
Gustav Wibling042e6462015-04-10 13:40:06 +0200379 final commons.ApiRequester _requester;
Martin Kustermannf9c50a22014-09-10 15:26:11 +0200380
Martin Kustermann5eb85c12017-09-11 12:35:54 +0200381 ReportsResourceApi(commons.ApiRequester client) : _requester = client;
Martin Kustermannf9c50a22014-09-10 15:26:11 +0200382
Martin Kustermann5eb85c12017-09-11 12:35:54 +0200383 /// Retrieves stored reports.
384 ///
385 /// Request parameters:
386 ///
387 /// [queryId] - Query ID with which the reports are associated.
388 ///
Jonas Finnemann Jensen94d5b4d2020-05-07 12:00:14 +0200389 /// [pageSize] - Maximum number of results per page. Must be between 1 and
390 /// 100. Defaults to 100 if unspecified.
391 ///
Jonas Finnemann Jensenb223bd52020-10-09 13:02:08 +0200392 /// [pageToken] - Optional pagination token.
393 ///
Martin Kustermann7a3b5f52017-10-23 11:34:19 +0200394 /// [$fields] - Selector specifying which fields to include in a partial
395 /// response.
396 ///
Martin Kustermann5eb85c12017-09-11 12:35:54 +0200397 /// 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 Kustermann7a3b5f52017-10-23 11:34:19 +0200404 async.Future<ListReportsResponse> listreports(core.String queryId,
Jonas Finnemann Jensenb223bd52020-10-09 13:02:08 +0200405 {core.int pageSize, core.String pageToken, core.String $fields}) {
Jonas Finnemann Jensend22e4042019-02-09 14:14:19 +0100406 var _url;
Jakob Andersen4ce761d2018-04-19 11:19:11 +0200407 var _queryParams = new core.Map<core.String, core.List<core.String>>();
Jonas Finnemann Jensend22e4042019-02-09 14:14:19 +0100408 var _uploadMedia;
409 var _uploadOptions;
Gustav Wibling042e6462015-04-10 13:40:06 +0200410 var _downloadOptions = commons.DownloadOptions.Metadata;
Jonas Finnemann Jensend22e4042019-02-09 14:14:19 +0100411 var _body;
Martin Kustermannf9c50a22014-09-10 15:26:11 +0200412
413 if (queryId == null) {
414 throw new core.ArgumentError("Parameter queryId is required.");
415 }
Jonas Finnemann Jensenef0c8a32020-10-07 20:58:20 +0200416 if (pageSize != null) {
417 _queryParams["pageSize"] = ["${pageSize}"];
418 }
Jonas Finnemann Jensenb223bd52020-10-09 13:02:08 +0200419 if (pageToken != null) {
420 _queryParams["pageToken"] = [pageToken];
421 }
Martin Kustermann7a3b5f52017-10-23 11:34:19 +0200422 if ($fields != null) {
423 _queryParams["fields"] = [$fields];
424 }
Martin Kustermannf9c50a22014-09-10 15:26:11 +0200425
Gustav Wibling042e6462015-04-10 13:40:06 +0200426 _url = 'queries/' + commons.Escaper.ecapeVariable('$queryId') + '/reports';
Martin Kustermannf9c50a22014-09-10 15:26:11 +0200427
Martin Kustermann5eb85c12017-09-11 12:35:54 +0200428 var _response = _requester.request(_url, "GET",
429 body: _body,
430 queryParams: _queryParams,
431 uploadOptions: _uploadOptions,
432 uploadMedia: _uploadMedia,
433 downloadOptions: _downloadOptions);
Martin Kustermannf9c50a22014-09-10 15:26:11 +0200434 return _response.then((data) => new ListReportsResponse.fromJson(data));
435 }
Martin Kustermannf9c50a22014-09-10 15:26:11 +0200436}
437
Martin Kustermann4ff71db2016-11-09 10:46:40 +0100438class SdfResourceApi {
Martin Kustermann87dfaba2016-02-01 10:23:02 +0100439 final commons.ApiRequester _requester;
440
Martin Kustermann5eb85c12017-09-11 12:35:54 +0200441 SdfResourceApi(commons.ApiRequester client) : _requester = client;
Martin Kustermann87dfaba2016-02-01 10:23:02 +0100442
Martin Kustermann5eb85c12017-09-11 12:35:54 +0200443 /// Retrieves entities in SDF format.
444 ///
445 /// [request] - The metadata request object.
446 ///
447 /// Request parameters:
448 ///
Martin Kustermann7a3b5f52017-10-23 11:34:19 +0200449 /// [$fields] - Selector specifying which fields to include in a partial
450 /// response.
451 ///
Martin Kustermann5eb85c12017-09-11 12:35:54 +0200452 /// 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 Kustermann7a3b5f52017-10-23 11:34:19 +0200459 async.Future<DownloadResponse> download(DownloadRequest request,
460 {core.String $fields}) {
Jonas Finnemann Jensend22e4042019-02-09 14:14:19 +0100461 var _url;
Jakob Andersen4ce761d2018-04-19 11:19:11 +0200462 var _queryParams = new core.Map<core.String, core.List<core.String>>();
Jonas Finnemann Jensend22e4042019-02-09 14:14:19 +0100463 var _uploadMedia;
464 var _uploadOptions;
Martin Kustermann87dfaba2016-02-01 10:23:02 +0100465 var _downloadOptions = commons.DownloadOptions.Metadata;
Jonas Finnemann Jensend22e4042019-02-09 14:14:19 +0100466 var _body;
Martin Kustermann87dfaba2016-02-01 10:23:02 +0100467
468 if (request != null) {
Jakob Andersen52715df2018-05-01 13:58:48 +0200469 _body = convert.json.encode((request).toJson());
Martin Kustermann87dfaba2016-02-01 10:23:02 +0100470 }
Martin Kustermann7a3b5f52017-10-23 11:34:19 +0200471 if ($fields != null) {
472 _queryParams["fields"] = [$fields];
473 }
Martin Kustermann87dfaba2016-02-01 10:23:02 +0100474
Martin Kustermann4ff71db2016-11-09 10:46:40 +0100475 _url = 'sdf/download';
Martin Kustermann87dfaba2016-02-01 10:23:02 +0100476
Martin Kustermann5eb85c12017-09-11 12:35:54 +0200477 var _response = _requester.request(_url, "POST",
478 body: _body,
479 queryParams: _queryParams,
480 uploadOptions: _uploadOptions,
481 uploadMedia: _uploadMedia,
482 downloadOptions: _downloadOptions);
Martin Kustermann4ff71db2016-11-09 10:46:40 +0100483 return _response.then((data) => new DownloadResponse.fromJson(data));
Martin Kustermann87dfaba2016-02-01 10:23:02 +0100484 }
Martin Kustermann87dfaba2016-02-01 10:23:02 +0100485}
486
Jonas Finnemann Jensenef0c8a32020-10-07 20:58:20 +0200487/// A channel grouping defines a set of rules that can be used to categorize
488/// events in a path report.
489class 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.
534class 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 Kustermann5eb85c12017-09-11 12:35:54 +0200560/// Request to fetch stored line items.
Martin Kustermannf9c50a22014-09-10 15:26:11 +0200561class DownloadLineItemsRequest {
Martin Kustermann5eb85c12017-09-11 12:35:54 +0200562 /// 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 Wibling6d477072015-10-19 16:19:14 +0200566 core.String fileSpec;
Martin Kustermann5eb85c12017-09-11 12:35:54 +0200567
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 Kustermannf9c50a22014-09-10 15:26:11 +0200570 core.List<core.String> filterIds;
Martin Kustermann5eb85c12017-09-11 12:35:54 +0200571
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 Kustermannf9c50a22014-09-10 15:26:11 +0200577 core.String filterType;
Martin Kustermann5eb85c12017-09-11 12:35:54 +0200578
579 /// Format in which the line items will be returned. Default to CSV.
580 /// Possible string values are:
581 /// - "CSV"
Martin Kustermannf9c50a22014-09-10 15:26:11 +0200582 core.String format;
583
Martin Kustermannf9c50a22014-09-10 15:26:11 +0200584 DownloadLineItemsRequest();
585
586 DownloadLineItemsRequest.fromJson(core.Map _json) {
Gustav Wibling6d477072015-10-19 16:19:14 +0200587 if (_json.containsKey("fileSpec")) {
588 fileSpec = _json["fileSpec"];
589 }
Martin Kustermannf9c50a22014-09-10 15:26:11 +0200590 if (_json.containsKey("filterIds")) {
Jakob Andersen52715df2018-05-01 13:58:48 +0200591 filterIds = (_json["filterIds"] as core.List).cast<core.String>();
Martin Kustermannf9c50a22014-09-10 15:26:11 +0200592 }
593 if (_json.containsKey("filterType")) {
594 filterType = _json["filterType"];
595 }
596 if (_json.containsKey("format")) {
597 format = _json["format"];
598 }
599 }
600
Martin Kustermann3953f0d2017-06-12 16:59:53 +0200601 core.Map<core.String, core.Object> toJson() {
Martin Kustermann5eb85c12017-09-11 12:35:54 +0200602 final core.Map<core.String, core.Object> _json =
603 new core.Map<core.String, core.Object>();
Gustav Wibling6d477072015-10-19 16:19:14 +0200604 if (fileSpec != null) {
605 _json["fileSpec"] = fileSpec;
606 }
Martin Kustermannf9c50a22014-09-10 15:26:11 +0200607 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 Kustermann5eb85c12017-09-11 12:35:54 +0200620/// Download line items response.
Martin Kustermannf9c50a22014-09-10 15:26:11 +0200621class DownloadLineItemsResponse {
Martin Kustermann5eb85c12017-09-11 12:35:54 +0200622 /// Retrieved line items in CSV format. For more information about file
Jonas Finnemann Jensenef0c8a32020-10-07 20:58:20 +0200623 /// formats, see Entity Write File Format.
Martin Kustermannf9c50a22014-09-10 15:26:11 +0200624 core.String lineItems;
625
Martin Kustermannf9c50a22014-09-10 15:26:11 +0200626 DownloadLineItemsResponse();
627
628 DownloadLineItemsResponse.fromJson(core.Map _json) {
629 if (_json.containsKey("lineItems")) {
630 lineItems = _json["lineItems"];
631 }
632 }
633
Martin Kustermann3953f0d2017-06-12 16:59:53 +0200634 core.Map<core.String, core.Object> toJson() {
Martin Kustermann5eb85c12017-09-11 12:35:54 +0200635 final core.Map<core.String, core.Object> _json =
636 new core.Map<core.String, core.Object>();
Martin Kustermannf9c50a22014-09-10 15:26:11 +0200637 if (lineItems != null) {
638 _json["lineItems"] = lineItems;
639 }
640 return _json;
641 }
642}
643
Jonas Finnemann Jensendda12e42019-02-09 12:37:20 +0100644/// Request to fetch stored inventory sources, campaigns, insertion orders, line
Jonas Finnemann Jensenef0c8a32020-10-07 20:58:20 +0200645/// items, YouTube ad groups and ads.
Martin Kustermann4ff71db2016-11-09 10:46:40 +0100646class DownloadRequest {
Jonas Finnemann Jensenee696b12019-07-04 15:07:25 +0200647 /// File types that will be returned. If INVENTORY_SOURCE is requested, no
Jonas Finnemann Jensenef0c8a32020-10-07 20:58:20 +0200648 /// other file types may be requested. Acceptable values are: - "AD" -
649 /// "AD_GROUP" - "CAMPAIGN" - "INSERTION_ORDER" - "INVENTORY_SOURCE" -
650 /// "LINE_ITEM"
Martin Kustermann4ff71db2016-11-09 10:46:40 +0100651 core.List<core.String> fileTypes;
Martin Kustermann5eb85c12017-09-11 12:35:54 +0200652
653 /// The IDs of the specified filter type. This is used to filter entities to
Jonas Finnemann Jensendda12e42019-02-09 12:37:20 +0100654 /// fetch. At least one ID must be specified.
Martin Kustermann4ff71db2016-11-09 10:46:40 +0100655 core.List<core.String> filterIds;
Martin Kustermann5eb85c12017-09-11 12:35:54 +0200656
Jonas Finnemann Jensenee696b12019-07-04 15:07:25 +0200657 /// Filter type used to filter entities to fetch. PARTNER_ID and
658 /// INVENTORY_SOURCE_ID may only be used when downloading inventory sources.
Martin Kustermann5eb85c12017-09-11 12:35:54 +0200659 /// Possible string values are:
660 /// - "ADVERTISER_ID"
661 /// - "INSERTION_ORDER_ID"
662 /// - "LINE_ITEM_ID"
Jonas Finnemann Jensenef0c8a32020-10-07 20:58:20 +0200663 /// - "CAMPAIGN_ID"
664 /// - "INVENTORY_SOURCE_ID"
Jonas Finnemann Jensendda12e42019-02-09 12:37:20 +0100665 /// - "PARTNER_ID"
Martin Kustermann4ff71db2016-11-09 10:46:40 +0100666 core.String filterType;
Martin Kustermann5eb85c12017-09-11 12:35:54 +0200667
668 /// SDF Version (column names, types, order) in which the entities will be
Jonas Finnemann Jensen94d5b4d2020-05-07 12:00:14 +0200669 /// returned. Default to 5.
Martin Kustermann4ff71db2016-11-09 10:46:40 +0100670 core.String version;
671
672 DownloadRequest();
673
674 DownloadRequest.fromJson(core.Map _json) {
675 if (_json.containsKey("fileTypes")) {
Jakob Andersen52715df2018-05-01 13:58:48 +0200676 fileTypes = (_json["fileTypes"] as core.List).cast<core.String>();
Martin Kustermann4ff71db2016-11-09 10:46:40 +0100677 }
678 if (_json.containsKey("filterIds")) {
Jakob Andersen52715df2018-05-01 13:58:48 +0200679 filterIds = (_json["filterIds"] as core.List).cast<core.String>();
Martin Kustermann4ff71db2016-11-09 10:46:40 +0100680 }
681 if (_json.containsKey("filterType")) {
682 filterType = _json["filterType"];
683 }
684 if (_json.containsKey("version")) {
685 version = _json["version"];
686 }
687 }
688
Martin Kustermann3953f0d2017-06-12 16:59:53 +0200689 core.Map<core.String, core.Object> toJson() {
Martin Kustermann5eb85c12017-09-11 12:35:54 +0200690 final core.Map<core.String, core.Object> _json =
691 new core.Map<core.String, core.Object>();
Martin Kustermann4ff71db2016-11-09 10:46:40 +0100692 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 Kustermann5eb85c12017-09-11 12:35:54 +0200708/// Download response.
Martin Kustermann4ff71db2016-11-09 10:46:40 +0100709class DownloadResponse {
Martin Kustermann5eb85c12017-09-11 12:35:54 +0200710 /// Retrieved ad groups in SDF format.
Martin Kustermann4ff71db2016-11-09 10:46:40 +0100711 core.String adGroups;
Martin Kustermann5eb85c12017-09-11 12:35:54 +0200712
713 /// Retrieved ads in SDF format.
Martin Kustermann4ff71db2016-11-09 10:46:40 +0100714 core.String ads;
Martin Kustermann5eb85c12017-09-11 12:35:54 +0200715
Martin Kustermanna5250762018-02-19 12:56:45 +0100716 /// Retrieved campaigns in SDF format.
717 core.String campaigns;
718
Martin Kustermann5eb85c12017-09-11 12:35:54 +0200719 /// Retrieved insertion orders in SDF format.
Martin Kustermann4ff71db2016-11-09 10:46:40 +0100720 core.String insertionOrders;
Jonas Finnemann Jensendda12e42019-02-09 12:37:20 +0100721 core.String inventorySources;
Martin Kustermann5eb85c12017-09-11 12:35:54 +0200722
723 /// Retrieved line items in SDF format.
Martin Kustermann4ff71db2016-11-09 10:46:40 +0100724 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 Kustermanna5250762018-02-19 12:56:45 +0100735 if (_json.containsKey("campaigns")) {
736 campaigns = _json["campaigns"];
737 }
Martin Kustermann4ff71db2016-11-09 10:46:40 +0100738 if (_json.containsKey("insertionOrders")) {
739 insertionOrders = _json["insertionOrders"];
740 }
Jonas Finnemann Jensendda12e42019-02-09 12:37:20 +0100741 if (_json.containsKey("inventorySources")) {
742 inventorySources = _json["inventorySources"];
743 }
Martin Kustermann4ff71db2016-11-09 10:46:40 +0100744 if (_json.containsKey("lineItems")) {
745 lineItems = _json["lineItems"];
746 }
747 }
748
Martin Kustermann3953f0d2017-06-12 16:59:53 +0200749 core.Map<core.String, core.Object> toJson() {
Martin Kustermann5eb85c12017-09-11 12:35:54 +0200750 final core.Map<core.String, core.Object> _json =
751 new core.Map<core.String, core.Object>();
Martin Kustermann4ff71db2016-11-09 10:46:40 +0100752 if (adGroups != null) {
753 _json["adGroups"] = adGroups;
754 }
755 if (ads != null) {
756 _json["ads"] = ads;
757 }
Martin Kustermanna5250762018-02-19 12:56:45 +0100758 if (campaigns != null) {
759 _json["campaigns"] = campaigns;
760 }
Martin Kustermann4ff71db2016-11-09 10:46:40 +0100761 if (insertionOrders != null) {
762 _json["insertionOrders"] = insertionOrders;
763 }
Jonas Finnemann Jensendda12e42019-02-09 12:37:20 +0100764 if (inventorySources != null) {
765 _json["inventorySources"] = inventorySources;
766 }
Martin Kustermann4ff71db2016-11-09 10:46:40 +0100767 if (lineItems != null) {
768 _json["lineItems"] = lineItems;
769 }
770 return _json;
771 }
772}
773
Jonas Finnemann Jensenef0c8a32020-10-07 20:58:20 +0200774/// Defines the type of filter to be applied to the path, a DV360 event
775/// dimension filter.
776class 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 Kustermann5eb85c12017-09-11 12:35:54 +0200799/// Filter used to match traffic data in your report.
Martin Kustermannf9c50a22014-09-10 15:26:11 +0200800class FilterPair {
Martin Kustermann5eb85c12017-09-11 12:35:54 +0200801 /// Filter type.
802 /// Possible string values are:
Jonas Finnemann Jensenef0c8a32020-10-07 20:58:20 +0200803 /// - "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 Kustermann5eb85c12017-09-11 12:35:54 +0200825 /// - "FILTER_ADVERTISER"
Jonas Finnemann Jensenef0c8a32020-10-07 20:58:20 +0200826 /// - "FILTER_INSERTION_ORDER"
827 /// - "FILTER_LINE_ITEM"
828 /// - "FILTER_PARTNER_CURRENCY"
Martin Kustermann5eb85c12017-09-11 12:35:54 +0200829 /// - "FILTER_ADVERTISER_CURRENCY"
Jonas Finnemann Jensenef0c8a32020-10-07 20:58:20 +0200830 /// - "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 Jensen94d5b4d2020-05-07 12:00:14 +0200924 /// - "FILTER_ADVERTISER_INTEGRATION_CODE"
925 /// - "FILTER_ADVERTISER_INTEGRATION_STATUS"
Jonas Finnemann Jensenef0c8a32020-10-07 20:58:20 +0200926 /// - "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 Jensen94d5b4d2020-05-07 12:00:14 +0200942 /// - "FILTER_AD_TYPE"
Jonas Finnemann Jensen94d5b4d2020-05-07 12:00:14 +0200943 /// - "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 Jensen94d5b4d2020-05-07 12:00:14 +0200958 /// - "FILTER_BILLABLE_OUTCOME"
959 /// - "FILTER_BRAND_LIFT_TYPE"
Jonas Finnemann Jensen94d5b4d2020-05-07 12:00:14 +0200960 /// - "FILTER_CHANNEL_TYPE"
Jonas Finnemann Jensen94d5b4d2020-05-07 12:00:14 +0200961 /// - "FILTER_CM_PLACEMENT_ID"
Jonas Finnemann Jensen94d5b4d2020-05-07 12:00:14 +0200962 /// - "FILTER_CONVERSION_SOURCE"
963 /// - "FILTER_CONVERSION_SOURCE_ID"
Jonas Finnemann Jensen94d5b4d2020-05-07 12:00:14 +0200964 /// - "FILTER_COUNTRY_ID"
965 /// - "FILTER_CREATIVE"
966 /// - "FILTER_CREATIVE_ASSET"
Jonas Finnemann Jensen94d5b4d2020-05-07 12:00:14 +0200967 /// - "FILTER_CREATIVE_INTEGRATION_CODE"
968 /// - "FILTER_CREATIVE_RENDERED_IN_AMP"
Jonas Finnemann Jensen94d5b4d2020-05-07 12:00:14 +0200969 /// - "FILTER_CREATIVE_SOURCE"
970 /// - "FILTER_CREATIVE_STATUS"
Jonas Finnemann Jensen94d5b4d2020-05-07 12:00:14 +0200971 /// - "FILTER_DATA_PROVIDER_NAME"
Jonas Finnemann Jensen94d5b4d2020-05-07 12:00:14 +0200972 /// - "FILTER_DETAILED_DEMOGRAPHICS"
973 /// - "FILTER_DETAILED_DEMOGRAPHICS_ID"
974 /// - "FILTER_DEVICE"
Jonas Finnemann Jensenef0c8a32020-10-07 20:58:20 +0200975 /// - "FILTER_GAM_INSERTION_ORDER"
976 /// - "FILTER_GAM_LINE_ITEM"
977 /// - "FILTER_GAM_LINE_ITEM_ID"
Jonas Finnemann Jensen94d5b4d2020-05-07 12:00:14 +0200978 /// - "FILTER_DIGITAL_CONTENT_LABEL"
Jonas Finnemann Jensen94d5b4d2020-05-07 12:00:14 +0200979 /// - "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 Jensen94d5b4d2020-05-07 12:00:14 +0200984 /// - "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 Jensen94d5b4d2020-05-07 12:00:14 +0200990 /// - "FILTER_FORMAT"
Jonas Finnemann Jensen94d5b4d2020-05-07 12:00:14 +0200991 /// - "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 Jensenef0c8a32020-10-07 20:58:20 +02001002 /// - "FILTER_YOUTUBE_PROGRAMMATIC_GUARANTEED_INSERTION_ORDER"
Jonas Finnemann Jensen94d5b4d2020-05-07 12:00:14 +02001003 /// - "FILTER_INSERTION_ORDER_INTEGRATION_CODE"
Jonas Finnemann Jensen94d5b4d2020-05-07 12:00:14 +02001004 /// - "FILTER_INSERTION_ORDER_STATUS"
1005 /// - "FILTER_INTEREST"
Jonas Finnemann Jensen94d5b4d2020-05-07 12:00:14 +02001006 /// - "FILTER_INVENTORY_SOURCE_GROUP"
1007 /// - "FILTER_INVENTORY_SOURCE_GROUP_ID"
1008 /// - "FILTER_INVENTORY_SOURCE_ID"
1009 /// - "FILTER_INVENTORY_SOURCE_NAME"
Jonas Finnemann Jensen94d5b4d2020-05-07 12:00:14 +02001010 /// - "FILTER_LIFE_EVENT"
1011 /// - "FILTER_LIFE_EVENTS"
Jonas Finnemann Jensen94d5b4d2020-05-07 12:00:14 +02001012 /// - "FILTER_LINE_ITEM_INTEGRATION_CODE"
Jonas Finnemann Jensen94d5b4d2020-05-07 12:00:14 +02001013 /// - "FILTER_LINE_ITEM_NAME"
1014 /// - "FILTER_LINE_ITEM_STATUS"
Jonas Finnemann Jensen94d5b4d2020-05-07 12:00:14 +02001015 /// - "FILTER_MATCH_RATIO"
1016 /// - "FILTER_MEASUREMENT_SOURCE"
Jonas Finnemann Jensen94d5b4d2020-05-07 12:00:14 +02001017 /// - "FILTER_MEDIA_PLAN_NAME"
Jonas Finnemann Jensen94d5b4d2020-05-07 12:00:14 +02001018 /// - "FILTER_PARENTAL_STATUS"
Jonas Finnemann Jensen94d5b4d2020-05-07 12:00:14 +02001019 /// - "FILTER_PLACEMENT_ALL_YOUTUBE_CHANNELS"
Jonas Finnemann Jensen94d5b4d2020-05-07 12:00:14 +02001020 /// - "FILTER_PLATFORM"
1021 /// - "FILTER_PLAYBACK_METHOD"
1022 /// - "FILTER_POSITION_IN_CONTENT"
Jonas Finnemann Jensen94d5b4d2020-05-07 12:00:14 +02001023 /// - "FILTER_PUBLISHER_PROPERTY"
1024 /// - "FILTER_PUBLISHER_PROPERTY_ID"
1025 /// - "FILTER_PUBLISHER_PROPERTY_SECTION"
1026 /// - "FILTER_PUBLISHER_PROPERTY_SECTION_ID"
Jonas Finnemann Jensen94d5b4d2020-05-07 12:00:14 +02001027 /// - "FILTER_REFUND_REASON"
Jonas Finnemann Jensen94d5b4d2020-05-07 12:00:14 +02001028 /// - "FILTER_REMARKETING_LIST"
1029 /// - "FILTER_REWARDED"
1030 /// - "FILTER_SENSITIVE_CATEGORY"
1031 /// - "FILTER_SERVED_PIXEL_DENSITY"
Jonas Finnemann Jensen94d5b4d2020-05-07 12:00:14 +02001032 /// - "FILTER_TARGETED_DATA_PROVIDERS"
Jonas Finnemann Jensen94d5b4d2020-05-07 12:00:14 +02001033 /// - "FILTER_THIRD_PARTY_AUDIENCE_LIST_COST"
1034 /// - "FILTER_THIRD_PARTY_AUDIENCE_LIST_TYPE"
Jonas Finnemann Jensen94d5b4d2020-05-07 12:00:14 +02001035 /// - "FILTER_TRUEVIEW_AD"
1036 /// - "FILTER_TRUEVIEW_AD_GROUP"
Jonas Finnemann Jensen94d5b4d2020-05-07 12:00:14 +02001037 /// - "FILTER_TRUEVIEW_DETAILED_DEMOGRAPHICS"
1038 /// - "FILTER_TRUEVIEW_DETAILED_DEMOGRAPHICS_ID"
Jonas Finnemann Jensen94d5b4d2020-05-07 12:00:14 +02001039 /// - "FILTER_TRUEVIEW_HOUSEHOLD_INCOME"
Jonas Finnemann Jensen94d5b4d2020-05-07 12:00:14 +02001040 /// - "FILTER_TRUEVIEW_IAR_COUNTRY_NAME"
Jonas Finnemann Jensen94d5b4d2020-05-07 12:00:14 +02001041 /// - "FILTER_TRUEVIEW_REMARKETING_LIST_NAME"
Jonas Finnemann Jensen94d5b4d2020-05-07 12:00:14 +02001042 /// - "FILTER_VARIANT_ID"
1043 /// - "FILTER_VARIANT_NAME"
1044 /// - "FILTER_VARIANT_VERSION"
1045 /// - "FILTER_VERIFICATION_VIDEO_PLAYER_SIZE"
1046 /// - "FILTER_VERIFICATION_VIDEO_POSITION"
Jonas Finnemann Jensen94d5b4d2020-05-07 12:00:14 +02001047 /// - "FILTER_VIDEO_COMPANION_CREATIVE_SIZE"
1048 /// - "FILTER_VIDEO_CONTINUOUS_PLAY"
Jonas Finnemann Jensen94d5b4d2020-05-07 12:00:14 +02001049 /// - "FILTER_VIDEO_DURATION"
Jonas Finnemann Jensen94d5b4d2020-05-07 12:00:14 +02001050 /// - "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 Jensen94d5b4d2020-05-07 12:00:14 +02001055 /// - "FILTER_YOUTUBE_PROGRAMMATIC_GUARANTEED_PARTNER"
1056 /// - "FILTER_YOUTUBE_VIDEO"
Jonas Finnemann Jensen94d5b4d2020-05-07 12:00:14 +02001057 /// - "FILTER_ZIP_POSTAL_CODE"
Jonas Finnemann Jensenef0c8a32020-10-07 20:58:20 +02001058 /// - "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 Kustermannf9c50a22014-09-10 15:26:11 +02001064 core.String type;
Martin Kustermann5eb85c12017-09-11 12:35:54 +02001065
1066 /// Filter value.
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001067 core.String value;
1068
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001069 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 Kustermann3953f0d2017-06-12 16:59:53 +02001080 core.Map<core.String, core.Object> toJson() {
Martin Kustermann5eb85c12017-09-11 12:35:54 +02001081 final core.Map<core.String, core.Object> _json =
1082 new core.Map<core.String, core.Object>();
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001083 if (type != null) {
1084 _json["type"] = type;
1085 }
1086 if (value != null) {
1087 _json["value"] = value;
1088 }
1089 return _json;
1090 }
1091}
1092
Martin Kustermann5eb85c12017-09-11 12:35:54 +02001093/// List queries response.
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001094class ListQueriesResponse {
Martin Kustermann5eb85c12017-09-11 12:35:54 +02001095 /// Identifies what kind of resource this is. Value: the fixed string
1096 /// "doubleclickbidmanager#listQueriesResponse".
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001097 core.String kind;
Martin Kustermann5eb85c12017-09-11 12:35:54 +02001098
Jonas Finnemann Jensen94d5b4d2020-05-07 12:00:14 +02001099 /// Next page's pagination token if one exists.
1100 core.String nextPageToken;
1101
Martin Kustermann5eb85c12017-09-11 12:35:54 +02001102 /// Retrieved queries.
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001103 core.List<Query> queries;
1104
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001105 ListQueriesResponse();
1106
1107 ListQueriesResponse.fromJson(core.Map _json) {
1108 if (_json.containsKey("kind")) {
1109 kind = _json["kind"];
1110 }
Jonas Finnemann Jensen94d5b4d2020-05-07 12:00:14 +02001111 if (_json.containsKey("nextPageToken")) {
1112 nextPageToken = _json["nextPageToken"];
1113 }
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001114 if (_json.containsKey("queries")) {
Jakob Andersen52715df2018-05-01 13:58:48 +02001115 queries = (_json["queries"] as core.List)
Jakob Andersen4ce761d2018-04-19 11:19:11 +02001116 .map<Query>((value) => new Query.fromJson(value))
1117 .toList();
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001118 }
1119 }
1120
Martin Kustermann3953f0d2017-06-12 16:59:53 +02001121 core.Map<core.String, core.Object> toJson() {
Martin Kustermann5eb85c12017-09-11 12:35:54 +02001122 final core.Map<core.String, core.Object> _json =
1123 new core.Map<core.String, core.Object>();
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001124 if (kind != null) {
1125 _json["kind"] = kind;
1126 }
Jonas Finnemann Jensen94d5b4d2020-05-07 12:00:14 +02001127 if (nextPageToken != null) {
1128 _json["nextPageToken"] = nextPageToken;
1129 }
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001130 if (queries != null) {
1131 _json["queries"] = queries.map((value) => (value).toJson()).toList();
1132 }
1133 return _json;
1134 }
1135}
1136
Martin Kustermann5eb85c12017-09-11 12:35:54 +02001137/// List reports response.
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001138class ListReportsResponse {
Martin Kustermann5eb85c12017-09-11 12:35:54 +02001139 /// Identifies what kind of resource this is. Value: the fixed string
1140 /// "doubleclickbidmanager#listReportsResponse".
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001141 core.String kind;
Martin Kustermann5eb85c12017-09-11 12:35:54 +02001142
Jonas Finnemann Jensen94d5b4d2020-05-07 12:00:14 +02001143 /// Next page's pagination token if one exists.
1144 core.String nextPageToken;
1145
Martin Kustermann5eb85c12017-09-11 12:35:54 +02001146 /// Retrieved reports.
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001147 core.List<Report> reports;
1148
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001149 ListReportsResponse();
1150
1151 ListReportsResponse.fromJson(core.Map _json) {
1152 if (_json.containsKey("kind")) {
1153 kind = _json["kind"];
1154 }
Jonas Finnemann Jensen94d5b4d2020-05-07 12:00:14 +02001155 if (_json.containsKey("nextPageToken")) {
1156 nextPageToken = _json["nextPageToken"];
1157 }
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001158 if (_json.containsKey("reports")) {
Jakob Andersen52715df2018-05-01 13:58:48 +02001159 reports = (_json["reports"] as core.List)
Jakob Andersen4ce761d2018-04-19 11:19:11 +02001160 .map<Report>((value) => new Report.fromJson(value))
1161 .toList();
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001162 }
1163 }
1164
Martin Kustermann3953f0d2017-06-12 16:59:53 +02001165 core.Map<core.String, core.Object> toJson() {
Martin Kustermann5eb85c12017-09-11 12:35:54 +02001166 final core.Map<core.String, core.Object> _json =
1167 new core.Map<core.String, core.Object>();
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001168 if (kind != null) {
1169 _json["kind"] = kind;
1170 }
Jonas Finnemann Jensen94d5b4d2020-05-07 12:00:14 +02001171 if (nextPageToken != null) {
1172 _json["nextPageToken"] = nextPageToken;
1173 }
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001174 if (reports != null) {
1175 _json["reports"] = reports.map((value) => (value).toJson()).toList();
1176 }
1177 return _json;
1178 }
1179}
1180
Jonas Finnemann Jensen94d5b4d2020-05-07 12:00:14 +02001181/// Additional query options.
1182class 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 Jensenef0c8a32020-10-07 20:58:20 +02001188 /// Options that contain Path Filters and Custom Channel Groupings.
1189 PathQueryOptions pathQueryOptions;
1190
Jonas Finnemann Jensen94d5b4d2020-05-07 12:00:14 +02001191 Options();
1192
1193 Options.fromJson(core.Map _json) {
1194 if (_json.containsKey("includeOnlyTargetedUserLists")) {
1195 includeOnlyTargetedUserLists = _json["includeOnlyTargetedUserLists"];
1196 }
Jonas Finnemann Jensenef0c8a32020-10-07 20:58:20 +02001197 if (_json.containsKey("pathQueryOptions")) {
1198 pathQueryOptions =
1199 new PathQueryOptions.fromJson(_json["pathQueryOptions"]);
1200 }
Jonas Finnemann Jensen94d5b4d2020-05-07 12:00:14 +02001201 }
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 Jensenef0c8a32020-10-07 20:58:20 +02001209 if (pathQueryOptions != null) {
1210 _json["pathQueryOptions"] = (pathQueryOptions).toJson();
1211 }
Jonas Finnemann Jensen94d5b4d2020-05-07 12:00:14 +02001212 return _json;
1213 }
1214}
1215
Martin Kustermann5eb85c12017-09-11 12:35:54 +02001216/// Parameters of a query or report.
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001217class Parameters {
Martin Kustermann5eb85c12017-09-11 12:35:54 +02001218 /// Filters used to match traffic data in your report.
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001219 core.List<FilterPair> filters;
Martin Kustermann5eb85c12017-09-11 12:35:54 +02001220
1221 /// Data is grouped by the filters listed in this field.
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001222 core.List<core.String> groupBys;
Martin Kustermann5eb85c12017-09-11 12:35:54 +02001223
Jonas Finnemann Jensenee696b12019-07-04 15:07:25 +02001224 /// Deprecated. This field is no longer in use.
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001225 core.bool includeInviteData;
Martin Kustermann5eb85c12017-09-11 12:35:54 +02001226
1227 /// Metrics to include as columns in your report.
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001228 core.List<core.String> metrics;
Martin Kustermann5eb85c12017-09-11 12:35:54 +02001229
Jonas Finnemann Jensen94d5b4d2020-05-07 12:00:14 +02001230 /// Additional query options.
1231 Options options;
1232
Martin Kustermann5eb85c12017-09-11 12:35:54 +02001233 /// Report type.
1234 /// Possible string values are:
Martin Kustermann5eb85c12017-09-11 12:35:54 +02001235 /// - "TYPE_GENERAL"
Jonas Finnemann Jensenef0c8a32020-10-07 20:58:20 +02001236 /// - "TYPE_AUDIENCE_PERFORMANCE"
Martin Kustermann5eb85c12017-09-11 12:35:54 +02001237 /// - "TYPE_INVENTORY_AVAILABILITY"
1238 /// - "TYPE_KEYWORD"
Jonas Finnemann Jensenef0c8a32020-10-07 20:58:20 +02001239 /// - "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 Kustermann5eb85c12017-09-11 12:35:54 +02001253 /// - "TYPE_NIELSEN_AUDIENCE_PROFILE"
1254 /// - "TYPE_NIELSEN_DAILY_REACH_BUILD"
Martin Kustermann5eb85c12017-09-11 12:35:54 +02001255 /// - "TYPE_NIELSEN_SITE"
Jonas Finnemann Jensenef0c8a32020-10-07 20:58:20 +02001256 /// - "TYPE_REACH_AND_FREQUENCY"
1257 /// - "TYPE_ESTIMATED_CONVERSION"
1258 /// - "TYPE_VERIFICATION"
1259 /// - "TYPE_TRUEVIEW_IAR"
1260 /// - "TYPE_NIELSEN_ONLINE_GLOBAL_MARKET"
Martin Kustermann5eb85c12017-09-11 12:35:54 +02001261 /// - "TYPE_PETRA_NIELSEN_AUDIENCE_PROFILE"
1262 /// - "TYPE_PETRA_NIELSEN_DAILY_REACH_BUILD"
1263 /// - "TYPE_PETRA_NIELSEN_ONLINE_GLOBAL_MARKET"
Jonas Finnemann Jensenef0c8a32020-10-07 20:58:20 +02001264 /// - "TYPE_NOT_SUPPORTED"
Martin Kustermann5eb85c12017-09-11 12:35:54 +02001265 /// - "TYPE_REACH_AUDIENCE"
Jonas Finnemann Jensenef0c8a32020-10-07 20:58:20 +02001266 /// - "TYPE_LINEAR_TV_SEARCH_LIFT"
1267 /// - "TYPE_PATH"
1268 /// - "TYPE_PATH_ATTRIBUTION"
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001269 core.String type;
1270
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001271 Parameters();
1272
1273 Parameters.fromJson(core.Map _json) {
1274 if (_json.containsKey("filters")) {
Jakob Andersen52715df2018-05-01 13:58:48 +02001275 filters = (_json["filters"] as core.List)
Jakob Andersen4ce761d2018-04-19 11:19:11 +02001276 .map<FilterPair>((value) => new FilterPair.fromJson(value))
Martin Kustermann5eb85c12017-09-11 12:35:54 +02001277 .toList();
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001278 }
1279 if (_json.containsKey("groupBys")) {
Jakob Andersen52715df2018-05-01 13:58:48 +02001280 groupBys = (_json["groupBys"] as core.List).cast<core.String>();
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001281 }
1282 if (_json.containsKey("includeInviteData")) {
1283 includeInviteData = _json["includeInviteData"];
1284 }
1285 if (_json.containsKey("metrics")) {
Jakob Andersen52715df2018-05-01 13:58:48 +02001286 metrics = (_json["metrics"] as core.List).cast<core.String>();
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001287 }
Jonas Finnemann Jensen94d5b4d2020-05-07 12:00:14 +02001288 if (_json.containsKey("options")) {
1289 options = new Options.fromJson(_json["options"]);
1290 }
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001291 if (_json.containsKey("type")) {
1292 type = _json["type"];
1293 }
1294 }
1295
Martin Kustermann3953f0d2017-06-12 16:59:53 +02001296 core.Map<core.String, core.Object> toJson() {
Martin Kustermann5eb85c12017-09-11 12:35:54 +02001297 final core.Map<core.String, core.Object> _json =
1298 new core.Map<core.String, core.Object>();
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001299 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 Jensen94d5b4d2020-05-07 12:00:14 +02001311 if (options != null) {
1312 _json["options"] = (options).toJson();
1313 }
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001314 if (type != null) {
1315 _json["type"] = type;
1316 }
1317 return _json;
1318 }
1319}
1320
Jonas Finnemann Jensenef0c8a32020-10-07 20:58:20 +02001321/// 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.
1326class 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.
1366class 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 Jensenb223bd52020-10-09 13:02:08 +02001401/// Dimension Filter on path events.
Jonas Finnemann Jensenef0c8a32020-10-07 20:58:20 +02001402class 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 Kustermann5eb85c12017-09-11 12:35:54 +02001710/// Represents a query.
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001711class Query {
Martin Kustermann5eb85c12017-09-11 12:35:54 +02001712 /// Identifies what kind of resource this is. Value: the fixed string
1713 /// "doubleclickbidmanager#query".
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001714 core.String kind;
Martin Kustermann5eb85c12017-09-11 12:35:54 +02001715
1716 /// Query metadata.
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001717 QueryMetadata metadata;
Martin Kustermann5eb85c12017-09-11 12:35:54 +02001718
1719 /// Query parameters.
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001720 Parameters params;
Martin Kustermann5eb85c12017-09-11 12:35:54 +02001721
1722 /// Query ID.
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001723 core.String queryId;
Martin Kustermann5eb85c12017-09-11 12:35:54 +02001724
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 Kustermannf9c50a22014-09-10 15:26:11 +02001728 core.String reportDataEndTimeMs;
Martin Kustermann5eb85c12017-09-11 12:35:54 +02001729
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 Kustermannf9c50a22014-09-10 15:26:11 +02001733 core.String reportDataStartTimeMs;
Martin Kustermann5eb85c12017-09-11 12:35:54 +02001734
1735 /// Information on how often and when to run a query.
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001736 QuerySchedule schedule;
Martin Kustermann5eb85c12017-09-11 12:35:54 +02001737
1738 /// Canonical timezone code for report data time. Defaults to
1739 /// America/New_York.
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001740 core.String timezoneCode;
1741
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001742 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 Kustermann3953f0d2017-06-12 16:59:53 +02001771 core.Map<core.String, core.Object> toJson() {
Martin Kustermann5eb85c12017-09-11 12:35:54 +02001772 final core.Map<core.String, core.Object> _json =
1773 new core.Map<core.String, core.Object>();
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001774 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 Kustermann5eb85c12017-09-11 12:35:54 +02001802/// Query metadata.
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001803class QueryMetadata {
Martin Kustermann5eb85c12017-09-11 12:35:54 +02001804 /// Range of report data.
1805 /// Possible string values are:
Martin Kustermann5eb85c12017-09-11 12:35:54 +02001806 /// - "CUSTOM_DATES"
Jonas Finnemann Jensenef0c8a32020-10-07 20:58:20 +02001807 /// - "CURRENT_DAY"
Martin Kustermann5eb85c12017-09-11 12:35:54 +02001808 /// - "PREVIOUS_DAY"
Jonas Finnemann Jensenef0c8a32020-10-07 20:58:20 +02001809 /// - "WEEK_TO_DATE"
1810 /// - "MONTH_TO_DATE"
1811 /// - "QUARTER_TO_DATE"
1812 /// - "YEAR_TO_DATE"
1813 /// - "PREVIOUS_WEEK"
Martin Kustermann5eb85c12017-09-11 12:35:54 +02001814 /// - "PREVIOUS_HALF_MONTH"
1815 /// - "PREVIOUS_MONTH"
1816 /// - "PREVIOUS_QUARTER"
Martin Kustermann5eb85c12017-09-11 12:35:54 +02001817 /// - "PREVIOUS_YEAR"
Jonas Finnemann Jensenef0c8a32020-10-07 20:58:20 +02001818 /// - "LAST_7_DAYS"
1819 /// - "LAST_30_DAYS"
1820 /// - "LAST_90_DAYS"
1821 /// - "LAST_365_DAYS"
1822 /// - "ALL_TIME"
1823 /// - "LAST_14_DAYS"
Martin Kustermann5eb85c12017-09-11 12:35:54 +02001824 /// - "TYPE_NOT_SUPPORTED"
Jonas Finnemann Jensenef0c8a32020-10-07 20:58:20 +02001825 /// - "LAST_60_DAYS"
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001826 core.String dataRange;
Martin Kustermann5eb85c12017-09-11 12:35:54 +02001827
1828 /// Format of the generated report.
1829 /// Possible string values are:
1830 /// - "CSV"
1831 /// - "EXCEL_CSV"
1832 /// - "XLSX"
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001833 core.String format;
Martin Kustermann5eb85c12017-09-11 12:35:54 +02001834
1835 /// The path to the location in Google Cloud Storage where the latest report
1836 /// is stored.
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001837 core.String googleCloudStoragePathForLatestReport;
Martin Kustermann5eb85c12017-09-11 12:35:54 +02001838
1839 /// The path in Google Drive for the latest report.
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001840 core.String googleDrivePathForLatestReport;
Martin Kustermann5eb85c12017-09-11 12:35:54 +02001841
1842 /// The time when the latest report started to run.
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001843 core.String latestReportRunTimeMs;
Martin Kustermann5eb85c12017-09-11 12:35:54 +02001844
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 Jensenef0c8a32020-10-07 20:58:20 +02001848 /// CHINA_CHINESE zh-TW TAIWAN_CHINESE An locale string not in the list above
1849 /// will generate reports in English.
Gustav Wibling73da5882015-02-04 16:41:07 +01001850 core.String locale;
Martin Kustermann5eb85c12017-09-11 12:35:54 +02001851
1852 /// Number of reports that have been generated for the query.
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001853 core.int reportCount;
Martin Kustermann5eb85c12017-09-11 12:35:54 +02001854
1855 /// Whether the latest report is currently running.
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001856 core.bool running;
Martin Kustermann5eb85c12017-09-11 12:35:54 +02001857
1858 /// Whether to send an email notification when a report is ready. Default to
1859 /// false.
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001860 core.bool sendNotification;
Martin Kustermann5eb85c12017-09-11 12:35:54 +02001861
1862 /// List of email addresses which are sent email notifications when the report
1863 /// is finished. Separate from sendNotification.
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001864 core.List<core.String> shareEmailAddress;
Martin Kustermann5eb85c12017-09-11 12:35:54 +02001865
1866 /// Query title. It is used to name the reports generated from this query.
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001867 core.String title;
1868
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001869 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 Kustermann5eb85c12017-09-11 12:35:54 +02001879 googleCloudStoragePathForLatestReport =
1880 _json["googleCloudStoragePathForLatestReport"];
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001881 }
1882 if (_json.containsKey("googleDrivePathForLatestReport")) {
1883 googleDrivePathForLatestReport = _json["googleDrivePathForLatestReport"];
1884 }
1885 if (_json.containsKey("latestReportRunTimeMs")) {
1886 latestReportRunTimeMs = _json["latestReportRunTimeMs"];
1887 }
Gustav Wibling73da5882015-02-04 16:41:07 +01001888 if (_json.containsKey("locale")) {
1889 locale = _json["locale"];
1890 }
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001891 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 Andersen52715df2018-05-01 13:58:48 +02001901 shareEmailAddress =
1902 (_json["shareEmailAddress"] as core.List).cast<core.String>();
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001903 }
1904 if (_json.containsKey("title")) {
1905 title = _json["title"];
1906 }
1907 }
1908
Martin Kustermann3953f0d2017-06-12 16:59:53 +02001909 core.Map<core.String, core.Object> toJson() {
Martin Kustermann5eb85c12017-09-11 12:35:54 +02001910 final core.Map<core.String, core.Object> _json =
1911 new core.Map<core.String, core.Object>();
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001912 if (dataRange != null) {
1913 _json["dataRange"] = dataRange;
1914 }
1915 if (format != null) {
1916 _json["format"] = format;
1917 }
1918 if (googleCloudStoragePathForLatestReport != null) {
Martin Kustermann5eb85c12017-09-11 12:35:54 +02001919 _json["googleCloudStoragePathForLatestReport"] =
1920 googleCloudStoragePathForLatestReport;
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001921 }
1922 if (googleDrivePathForLatestReport != null) {
1923 _json["googleDrivePathForLatestReport"] = googleDrivePathForLatestReport;
1924 }
1925 if (latestReportRunTimeMs != null) {
1926 _json["latestReportRunTimeMs"] = latestReportRunTimeMs;
1927 }
Gustav Wibling73da5882015-02-04 16:41:07 +01001928 if (locale != null) {
1929 _json["locale"] = locale;
1930 }
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001931 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 Kustermann5eb85c12017-09-11 12:35:54 +02001950/// Information on how frequently and when to run a query.
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001951class QuerySchedule {
Martin Kustermann5eb85c12017-09-11 12:35:54 +02001952 /// Datetime to periodically run the query until.
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001953 core.String endTimeMs;
Martin Kustermann5eb85c12017-09-11 12:35:54 +02001954
1955 /// How often the query is run.
1956 /// Possible string values are:
Martin Kustermann5eb85c12017-09-11 12:35:54 +02001957 /// - "ONE_TIME"
Jonas Finnemann Jensenef0c8a32020-10-07 20:58:20 +02001958 /// - "DAILY"
Martin Kustermann5eb85c12017-09-11 12:35:54 +02001959 /// - "WEEKLY"
Jonas Finnemann Jensenef0c8a32020-10-07 20:58:20 +02001960 /// - "SEMI_MONTHLY"
1961 /// - "MONTHLY"
1962 /// - "QUARTERLY"
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001963 core.String frequency;
Martin Kustermann5eb85c12017-09-11 12:35:54 +02001964
Jonas Finnemann Jensenef0c8a32020-10-07 20:58:20 +02001965 /// Deprecated. This field has no effect.
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001966 core.int nextRunMinuteOfDay;
Martin Kustermann5eb85c12017-09-11 12:35:54 +02001967
1968 /// Canonical timezone code for report generation time. Defaults to
1969 /// America/New_York.
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001970 core.String nextRunTimezoneCode;
1971
Jonas Finnemann Jensen94d5b4d2020-05-07 12:00:14 +02001972 /// When to start running the query. Not applicable to `ONE_TIME` frequency.
1973 core.String startTimeMs;
1974
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001975 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 Jensen94d5b4d2020-05-07 12:00:14 +02001990 if (_json.containsKey("startTimeMs")) {
1991 startTimeMs = _json["startTimeMs"];
1992 }
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001993 }
1994
Martin Kustermann3953f0d2017-06-12 16:59:53 +02001995 core.Map<core.String, core.Object> toJson() {
Martin Kustermann5eb85c12017-09-11 12:35:54 +02001996 final core.Map<core.String, core.Object> _json =
1997 new core.Map<core.String, core.Object>();
Martin Kustermannf9c50a22014-09-10 15:26:11 +02001998 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 Jensen94d5b4d2020-05-07 12:00:14 +02002010 if (startTimeMs != null) {
2011 _json["startTimeMs"] = startTimeMs;
2012 }
Martin Kustermannf9c50a22014-09-10 15:26:11 +02002013 return _json;
2014 }
2015}
2016
Martin Kustermann5eb85c12017-09-11 12:35:54 +02002017/// Represents a report.
Martin Kustermannf9c50a22014-09-10 15:26:11 +02002018class Report {
Martin Kustermann5eb85c12017-09-11 12:35:54 +02002019 /// Key used to identify a report.
Martin Kustermannf9c50a22014-09-10 15:26:11 +02002020 ReportKey key;
Martin Kustermann5eb85c12017-09-11 12:35:54 +02002021
2022 /// Report metadata.
Martin Kustermannf9c50a22014-09-10 15:26:11 +02002023 ReportMetadata metadata;
Martin Kustermann5eb85c12017-09-11 12:35:54 +02002024
2025 /// Report parameters.
Martin Kustermannf9c50a22014-09-10 15:26:11 +02002026 Parameters params;
2027
Martin Kustermannf9c50a22014-09-10 15:26:11 +02002028 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 Kustermann3953f0d2017-06-12 16:59:53 +02002042 core.Map<core.String, core.Object> toJson() {
Martin Kustermann5eb85c12017-09-11 12:35:54 +02002043 final core.Map<core.String, core.Object> _json =
2044 new core.Map<core.String, core.Object>();
Martin Kustermannf9c50a22014-09-10 15:26:11 +02002045 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 Kustermann5eb85c12017-09-11 12:35:54 +02002058/// An explanation of a report failure.
Martin Kustermannf9c50a22014-09-10 15:26:11 +02002059class ReportFailure {
Martin Kustermann5eb85c12017-09-11 12:35:54 +02002060 /// Error code that shows why the report was not created.
2061 /// Possible string values are:
2062 /// - "AUTHENTICATION_ERROR"
Jonas Finnemann Jensenef0c8a32020-10-07 20:58:20 +02002063 /// - "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 Kustermann5eb85c12017-09-11 12:35:54 +02002071 /// - "REPORTING_BUCKET_NOT_FOUND"
2072 /// - "REPORTING_CREATE_BUCKET_FAILED"
2073 /// - "REPORTING_DELETE_BUCKET_FAILED"
Martin Kustermann5eb85c12017-09-11 12:35:54 +02002074 /// - "REPORTING_UPDATE_BUCKET_PERMISSION_FAILED"
2075 /// - "REPORTING_WRITE_BUCKET_OBJECT_FAILED"
Jonas Finnemann Jensenef0c8a32020-10-07 20:58:20 +02002076 /// - "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 Kustermannf9c50a22014-09-10 15:26:11 +02002080 core.String errorCode;
2081
Martin Kustermannf9c50a22014-09-10 15:26:11 +02002082 ReportFailure();
2083
2084 ReportFailure.fromJson(core.Map _json) {
2085 if (_json.containsKey("errorCode")) {
2086 errorCode = _json["errorCode"];
2087 }
2088 }
2089
Martin Kustermann3953f0d2017-06-12 16:59:53 +02002090 core.Map<core.String, core.Object> toJson() {
Martin Kustermann5eb85c12017-09-11 12:35:54 +02002091 final core.Map<core.String, core.Object> _json =
2092 new core.Map<core.String, core.Object>();
Martin Kustermannf9c50a22014-09-10 15:26:11 +02002093 if (errorCode != null) {
2094 _json["errorCode"] = errorCode;
2095 }
2096 return _json;
2097 }
2098}
2099
Martin Kustermann5eb85c12017-09-11 12:35:54 +02002100/// Key used to identify a report.
Martin Kustermannf9c50a22014-09-10 15:26:11 +02002101class ReportKey {
Martin Kustermann5eb85c12017-09-11 12:35:54 +02002102 /// Query ID.
Martin Kustermannf9c50a22014-09-10 15:26:11 +02002103 core.String queryId;
Martin Kustermann5eb85c12017-09-11 12:35:54 +02002104
2105 /// Report ID.
Martin Kustermannf9c50a22014-09-10 15:26:11 +02002106 core.String reportId;
2107
Martin Kustermannf9c50a22014-09-10 15:26:11 +02002108 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 Kustermann3953f0d2017-06-12 16:59:53 +02002119 core.Map<core.String, core.Object> toJson() {
Martin Kustermann5eb85c12017-09-11 12:35:54 +02002120 final core.Map<core.String, core.Object> _json =
2121 new core.Map<core.String, core.Object>();
Martin Kustermannf9c50a22014-09-10 15:26:11 +02002122 if (queryId != null) {
2123 _json["queryId"] = queryId;
2124 }
2125 if (reportId != null) {
2126 _json["reportId"] = reportId;
2127 }
2128 return _json;
2129 }
2130}
2131
Martin Kustermann5eb85c12017-09-11 12:35:54 +02002132/// Report metadata.
Martin Kustermannf9c50a22014-09-10 15:26:11 +02002133class ReportMetadata {
Martin Kustermann5eb85c12017-09-11 12:35:54 +02002134 /// The path to the location in Google Cloud Storage where the report is
2135 /// stored.
Martin Kustermannf9c50a22014-09-10 15:26:11 +02002136 core.String googleCloudStoragePath;
Martin Kustermann5eb85c12017-09-11 12:35:54 +02002137
2138 /// The ending time for the data that is shown in the report.
Martin Kustermannf9c50a22014-09-10 15:26:11 +02002139 core.String reportDataEndTimeMs;
Martin Kustermann5eb85c12017-09-11 12:35:54 +02002140
2141 /// The starting time for the data that is shown in the report.
Martin Kustermannf9c50a22014-09-10 15:26:11 +02002142 core.String reportDataStartTimeMs;
Martin Kustermann5eb85c12017-09-11 12:35:54 +02002143
2144 /// Report status.
Martin Kustermannf9c50a22014-09-10 15:26:11 +02002145 ReportStatus status;
2146
Martin Kustermannf9c50a22014-09-10 15:26:11 +02002147 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 Kustermann3953f0d2017-06-12 16:59:53 +02002164 core.Map<core.String, core.Object> toJson() {
Martin Kustermann5eb85c12017-09-11 12:35:54 +02002165 final core.Map<core.String, core.Object> _json =
2166 new core.Map<core.String, core.Object>();
Martin Kustermannf9c50a22014-09-10 15:26:11 +02002167 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 Kustermann5eb85c12017-09-11 12:35:54 +02002183/// Report status.
Martin Kustermannf9c50a22014-09-10 15:26:11 +02002184class ReportStatus {
Martin Kustermann5eb85c12017-09-11 12:35:54 +02002185 /// If the report failed, this records the cause.
Martin Kustermannf9c50a22014-09-10 15:26:11 +02002186 ReportFailure failure;
Martin Kustermann5eb85c12017-09-11 12:35:54 +02002187
2188 /// The time when this report either completed successfully or failed.
Martin Kustermannf9c50a22014-09-10 15:26:11 +02002189 core.String finishTimeMs;
Martin Kustermann5eb85c12017-09-11 12:35:54 +02002190
2191 /// The file type of the report.
2192 /// Possible string values are:
2193 /// - "CSV"
2194 /// - "EXCEL_CSV"
2195 /// - "XLSX"
Martin Kustermannf9c50a22014-09-10 15:26:11 +02002196 core.String format;
Martin Kustermann5eb85c12017-09-11 12:35:54 +02002197
2198 /// The state of the report.
2199 /// Possible string values are:
Jonas Finnemann Jensenef0c8a32020-10-07 20:58:20 +02002200 /// - "RUNNING"
Martin Kustermann5eb85c12017-09-11 12:35:54 +02002201 /// - "DONE"
2202 /// - "FAILED"
Martin Kustermannf9c50a22014-09-10 15:26:11 +02002203 core.String state;
2204
Martin Kustermannf9c50a22014-09-10 15:26:11 +02002205 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 Kustermann3953f0d2017-06-12 16:59:53 +02002222 core.Map<core.String, core.Object> toJson() {
Martin Kustermann5eb85c12017-09-11 12:35:54 +02002223 final core.Map<core.String, core.Object> _json =
2224 new core.Map<core.String, core.Object>();
Martin Kustermannf9c50a22014-09-10 15:26:11 +02002225 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 Kustermann5eb85c12017-09-11 12:35:54 +02002241/// Represents the upload status of a row in the request.
Martin Kustermannf9c50a22014-09-10 15:26:11 +02002242class RowStatus {
Martin Kustermann5eb85c12017-09-11 12:35:54 +02002243 /// Whether the stored entity is changed as a result of upload.
Martin Kustermannf9c50a22014-09-10 15:26:11 +02002244 core.bool changed;
Martin Kustermann5eb85c12017-09-11 12:35:54 +02002245
2246 /// Entity Id.
Martin Kustermannf9c50a22014-09-10 15:26:11 +02002247 core.String entityId;
Martin Kustermann5eb85c12017-09-11 12:35:54 +02002248
2249 /// Entity name.
Martin Kustermannf9c50a22014-09-10 15:26:11 +02002250 core.String entityName;
Martin Kustermann5eb85c12017-09-11 12:35:54 +02002251
2252 /// Reasons why the entity can't be uploaded.
Martin Kustermannf9c50a22014-09-10 15:26:11 +02002253 core.List<core.String> errors;
Martin Kustermann5eb85c12017-09-11 12:35:54 +02002254
2255 /// Whether the entity is persisted.
Martin Kustermannf9c50a22014-09-10 15:26:11 +02002256 core.bool persisted;
Martin Kustermann5eb85c12017-09-11 12:35:54 +02002257
2258 /// Row number.
Martin Kustermannf9c50a22014-09-10 15:26:11 +02002259 core.int rowNumber;
2260
Martin Kustermannf9c50a22014-09-10 15:26:11 +02002261 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 Andersen52715df2018-05-01 13:58:48 +02002274 errors = (_json["errors"] as core.List).cast<core.String>();
Martin Kustermannf9c50a22014-09-10 15:26:11 +02002275 }
2276 if (_json.containsKey("persisted")) {
2277 persisted = _json["persisted"];
2278 }
2279 if (_json.containsKey("rowNumber")) {
2280 rowNumber = _json["rowNumber"];
2281 }
2282 }
2283
Martin Kustermann3953f0d2017-06-12 16:59:53 +02002284 core.Map<core.String, core.Object> toJson() {
Martin Kustermann5eb85c12017-09-11 12:35:54 +02002285 final core.Map<core.String, core.Object> _json =
2286 new core.Map<core.String, core.Object>();
Martin Kustermannf9c50a22014-09-10 15:26:11 +02002287 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 Jensenef0c8a32020-10-07 20:58:20 +02002309/// 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.
2313class 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 Kustermann5eb85c12017-09-11 12:35:54 +02002348/// Request to run a stored query to generate a report.
Martin Kustermannf9c50a22014-09-10 15:26:11 +02002349class RunQueryRequest {
Martin Kustermann5eb85c12017-09-11 12:35:54 +02002350 /// Report data range used to generate the report.
2351 /// Possible string values are:
Martin Kustermann5eb85c12017-09-11 12:35:54 +02002352 /// - "CUSTOM_DATES"
Jonas Finnemann Jensenef0c8a32020-10-07 20:58:20 +02002353 /// - "CURRENT_DAY"
Martin Kustermann5eb85c12017-09-11 12:35:54 +02002354 /// - "PREVIOUS_DAY"
Jonas Finnemann Jensenef0c8a32020-10-07 20:58:20 +02002355 /// - "WEEK_TO_DATE"
2356 /// - "MONTH_TO_DATE"
2357 /// - "QUARTER_TO_DATE"
2358 /// - "YEAR_TO_DATE"
2359 /// - "PREVIOUS_WEEK"
Martin Kustermann5eb85c12017-09-11 12:35:54 +02002360 /// - "PREVIOUS_HALF_MONTH"
2361 /// - "PREVIOUS_MONTH"
2362 /// - "PREVIOUS_QUARTER"
Martin Kustermann5eb85c12017-09-11 12:35:54 +02002363 /// - "PREVIOUS_YEAR"
Jonas Finnemann Jensenef0c8a32020-10-07 20:58:20 +02002364 /// - "LAST_7_DAYS"
2365 /// - "LAST_30_DAYS"
2366 /// - "LAST_90_DAYS"
2367 /// - "LAST_365_DAYS"
2368 /// - "ALL_TIME"
2369 /// - "LAST_14_DAYS"
Martin Kustermann5eb85c12017-09-11 12:35:54 +02002370 /// - "TYPE_NOT_SUPPORTED"
Jonas Finnemann Jensenef0c8a32020-10-07 20:58:20 +02002371 /// - "LAST_60_DAYS"
Martin Kustermannf9c50a22014-09-10 15:26:11 +02002372 core.String dataRange;
Martin Kustermann5eb85c12017-09-11 12:35:54 +02002373
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 Kustermannf9c50a22014-09-10 15:26:11 +02002377 core.String reportDataEndTimeMs;
Martin Kustermann5eb85c12017-09-11 12:35:54 +02002378
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 Kustermannf9c50a22014-09-10 15:26:11 +02002382 core.String reportDataStartTimeMs;
Martin Kustermann5eb85c12017-09-11 12:35:54 +02002383
2384 /// Canonical timezone code for report data time. Defaults to
2385 /// America/New_York.
Martin Kustermannf9c50a22014-09-10 15:26:11 +02002386 core.String timezoneCode;
2387
Martin Kustermannf9c50a22014-09-10 15:26:11 +02002388 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 Kustermann3953f0d2017-06-12 16:59:53 +02002405 core.Map<core.String, core.Object> toJson() {
Martin Kustermann5eb85c12017-09-11 12:35:54 +02002406 final core.Map<core.String, core.Object> _json =
2407 new core.Map<core.String, core.Object>();
Martin Kustermannf9c50a22014-09-10 15:26:11 +02002408 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 Kustermann5eb85c12017-09-11 12:35:54 +02002424/// Request to upload line items.
Martin Kustermannf9c50a22014-09-10 15:26:11 +02002425class UploadLineItemsRequest {
Martin Kustermann5eb85c12017-09-11 12:35:54 +02002426 /// Set to true to get upload status without actually persisting the line
2427 /// items.
Martin Kustermannf9c50a22014-09-10 15:26:11 +02002428 core.bool dryRun;
Martin Kustermann5eb85c12017-09-11 12:35:54 +02002429
2430 /// Format the line items are in. Default to CSV.
2431 /// Possible string values are:
2432 /// - "CSV"
Martin Kustermannf9c50a22014-09-10 15:26:11 +02002433 core.String format;
Martin Kustermann5eb85c12017-09-11 12:35:54 +02002434
Jonas Finnemann Jensenef0c8a32020-10-07 20:58:20 +02002435 /// Line items in CSV to upload. Refer to Entity Write File Format for more
Martin Kustermann5eb85c12017-09-11 12:35:54 +02002436 /// information on file format.
Martin Kustermannf9c50a22014-09-10 15:26:11 +02002437 core.String lineItems;
2438
Martin Kustermannf9c50a22014-09-10 15:26:11 +02002439 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 Kustermann3953f0d2017-06-12 16:59:53 +02002453 core.Map<core.String, core.Object> toJson() {
Martin Kustermann5eb85c12017-09-11 12:35:54 +02002454 final core.Map<core.String, core.Object> _json =
2455 new core.Map<core.String, core.Object>();
Martin Kustermannf9c50a22014-09-10 15:26:11 +02002456 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 Kustermann5eb85c12017-09-11 12:35:54 +02002469/// Upload line items response.
Martin Kustermannf9c50a22014-09-10 15:26:11 +02002470class UploadLineItemsResponse {
Martin Kustermann5eb85c12017-09-11 12:35:54 +02002471 /// Status of upload.
Martin Kustermannf9c50a22014-09-10 15:26:11 +02002472 UploadStatus uploadStatus;
2473
Martin Kustermannf9c50a22014-09-10 15:26:11 +02002474 UploadLineItemsResponse();
2475
2476 UploadLineItemsResponse.fromJson(core.Map _json) {
2477 if (_json.containsKey("uploadStatus")) {
2478 uploadStatus = new UploadStatus.fromJson(_json["uploadStatus"]);
2479 }
2480 }
2481
Martin Kustermann3953f0d2017-06-12 16:59:53 +02002482 core.Map<core.String, core.Object> toJson() {
Martin Kustermann5eb85c12017-09-11 12:35:54 +02002483 final core.Map<core.String, core.Object> _json =
2484 new core.Map<core.String, core.Object>();
Martin Kustermannf9c50a22014-09-10 15:26:11 +02002485 if (uploadStatus != null) {
2486 _json["uploadStatus"] = (uploadStatus).toJson();
2487 }
2488 return _json;
2489 }
2490}
2491
Martin Kustermann5eb85c12017-09-11 12:35:54 +02002492/// Represents the status of upload.
Martin Kustermannf9c50a22014-09-10 15:26:11 +02002493class UploadStatus {
Martin Kustermann5eb85c12017-09-11 12:35:54 +02002494 /// Reasons why upload can't be completed.
Martin Kustermannf9c50a22014-09-10 15:26:11 +02002495 core.List<core.String> errors;
Martin Kustermann5eb85c12017-09-11 12:35:54 +02002496
2497 /// Per-row upload status.
Martin Kustermannf9c50a22014-09-10 15:26:11 +02002498 core.List<RowStatus> rowStatus;
2499
Martin Kustermannf9c50a22014-09-10 15:26:11 +02002500 UploadStatus();
2501
2502 UploadStatus.fromJson(core.Map _json) {
2503 if (_json.containsKey("errors")) {
Jakob Andersen52715df2018-05-01 13:58:48 +02002504 errors = (_json["errors"] as core.List).cast<core.String>();
Martin Kustermannf9c50a22014-09-10 15:26:11 +02002505 }
2506 if (_json.containsKey("rowStatus")) {
Jakob Andersen52715df2018-05-01 13:58:48 +02002507 rowStatus = (_json["rowStatus"] as core.List)
Jakob Andersen4ce761d2018-04-19 11:19:11 +02002508 .map<RowStatus>((value) => new RowStatus.fromJson(value))
Martin Kustermann5eb85c12017-09-11 12:35:54 +02002509 .toList();
Martin Kustermannf9c50a22014-09-10 15:26:11 +02002510 }
2511 }
2512
Martin Kustermann3953f0d2017-06-12 16:59:53 +02002513 core.Map<core.String, core.Object> toJson() {
Martin Kustermann5eb85c12017-09-11 12:35:54 +02002514 final core.Map<core.String, core.Object> _json =
2515 new core.Map<core.String, core.Object>();
Martin Kustermannf9c50a22014-09-10 15:26:11 +02002516 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}