OLD | NEW |
1 // This is a generated file (see the discoveryapis_generator project). | 1 // This is a generated file (see the discoveryapis_generator project). |
2 | 2 |
3 library googleapis.doubleclickbidmanager.v1; | 3 library googleapis.doubleclickbidmanager.v1; |
4 | 4 |
5 import 'dart:core' as core; | 5 import 'dart:core' as core; |
6 import 'dart:async' as async; | 6 import 'dart:async' as async; |
7 import 'dart:convert' as convert; | 7 import 'dart:convert' as convert; |
8 | 8 |
9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; | 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
10 import 'package:http/http.dart' as http; | 10 import 'package:http/http.dart' as http; |
11 | 11 |
12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show | 12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' |
13 ApiRequestError, DetailedApiRequestError; | 13 show ApiRequestError, DetailedApiRequestError; |
14 | 14 |
15 const core.String USER_AGENT = 'dart-api-client doubleclickbidmanager/v1'; | 15 const core.String USER_AGENT = 'dart-api-client doubleclickbidmanager/v1'; |
16 | 16 |
17 /** API for viewing and managing your reports in DoubleClick Bid Manager. */ | 17 /// API for viewing and managing your reports in DoubleClick Bid Manager. |
18 class DoubleclickbidmanagerApi { | 18 class DoubleclickbidmanagerApi { |
19 /** View and manage your reports in DoubleClick Bid Manager */ | 19 /// View and manage your reports in DoubleClick Bid Manager |
20 static const DoubleclickbidmanagerScope = "https://www.googleapis.com/auth/dou
bleclickbidmanager"; | 20 static const DoubleclickbidmanagerScope = |
21 | 21 "https://www.googleapis.com/auth/doubleclickbidmanager"; |
22 | 22 |
23 final commons.ApiRequester _requester; | 23 final commons.ApiRequester _requester; |
24 | 24 |
25 LineitemsResourceApi get lineitems => new LineitemsResourceApi(_requester); | 25 LineitemsResourceApi get lineitems => new LineitemsResourceApi(_requester); |
26 QueriesResourceApi get queries => new QueriesResourceApi(_requester); | 26 QueriesResourceApi get queries => new QueriesResourceApi(_requester); |
27 ReportsResourceApi get reports => new ReportsResourceApi(_requester); | 27 ReportsResourceApi get reports => new ReportsResourceApi(_requester); |
28 SdfResourceApi get sdf => new SdfResourceApi(_requester); | 28 SdfResourceApi get sdf => new SdfResourceApi(_requester); |
29 | 29 |
30 DoubleclickbidmanagerApi(http.Client client, {core.String rootUrl: "https://ww
w.googleapis.com/", core.String servicePath: "doubleclickbidmanager/v1/"}) : | 30 DoubleclickbidmanagerApi(http.Client client, |
31 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); | 31 {core.String rootUrl: "https://www.googleapis.com/", |
| 32 core.String servicePath: "doubleclickbidmanager/v1/"}) |
| 33 : _requester = |
| 34 new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT); |
32 } | 35 } |
33 | 36 |
34 | |
35 class LineitemsResourceApi { | 37 class LineitemsResourceApi { |
36 final commons.ApiRequester _requester; | 38 final commons.ApiRequester _requester; |
37 | 39 |
38 LineitemsResourceApi(commons.ApiRequester client) : | 40 LineitemsResourceApi(commons.ApiRequester client) : _requester = client; |
39 _requester = client; | |
40 | 41 |
41 /** | 42 /// Retrieves line items in CSV format. |
42 * Retrieves line items in CSV format. | 43 /// |
43 * | 44 /// [request] - The metadata request object. |
44 * [request] - The metadata request object. | 45 /// |
45 * | 46 /// Request parameters: |
46 * Request parameters: | 47 /// |
47 * | 48 /// Completes with a [DownloadLineItemsResponse]. |
48 * Completes with a [DownloadLineItemsResponse]. | 49 /// |
49 * | 50 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
50 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 51 /// an error. |
51 * error. | 52 /// |
52 * | 53 /// If the used [http.Client] completes with an error when making a REST |
53 * If the used [http.Client] completes with an error when making a REST call, | 54 /// call, this method will complete with the same error. |
54 * this method will complete with the same error. | 55 async.Future<DownloadLineItemsResponse> downloadlineitems( |
55 */ | 56 DownloadLineItemsRequest request) { |
56 async.Future<DownloadLineItemsResponse> downloadlineitems(DownloadLineItemsReq
uest request) { | |
57 var _url = null; | 57 var _url = null; |
58 var _queryParams = new core.Map(); | 58 var _queryParams = new core.Map(); |
59 var _uploadMedia = null; | 59 var _uploadMedia = null; |
60 var _uploadOptions = null; | 60 var _uploadOptions = null; |
61 var _downloadOptions = commons.DownloadOptions.Metadata; | 61 var _downloadOptions = commons.DownloadOptions.Metadata; |
62 var _body = null; | 62 var _body = null; |
63 | 63 |
64 if (request != null) { | 64 if (request != null) { |
65 _body = convert.JSON.encode((request).toJson()); | 65 _body = convert.JSON.encode((request).toJson()); |
66 } | 66 } |
67 | 67 |
68 _url = 'lineitems/downloadlineitems'; | 68 _url = 'lineitems/downloadlineitems'; |
69 | 69 |
70 var _response = _requester.request(_url, | 70 var _response = _requester.request(_url, "POST", |
71 "POST", | 71 body: _body, |
72 body: _body, | 72 queryParams: _queryParams, |
73 queryParams: _queryParams, | 73 uploadOptions: _uploadOptions, |
74 uploadOptions: _uploadOptions, | 74 uploadMedia: _uploadMedia, |
75 uploadMedia: _uploadMedia, | 75 downloadOptions: _downloadOptions); |
76 downloadOptions: _downloadOptions); | 76 return _response |
77 return _response.then((data) => new DownloadLineItemsResponse.fromJson(data)
); | 77 .then((data) => new DownloadLineItemsResponse.fromJson(data)); |
78 } | 78 } |
79 | 79 |
80 /** | 80 /// Uploads line items in CSV format. |
81 * Uploads line items in CSV format. | 81 /// |
82 * | 82 /// [request] - The metadata request object. |
83 * [request] - The metadata request object. | 83 /// |
84 * | 84 /// Request parameters: |
85 * Request parameters: | 85 /// |
86 * | 86 /// Completes with a [UploadLineItemsResponse]. |
87 * Completes with a [UploadLineItemsResponse]. | 87 /// |
88 * | 88 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
89 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 89 /// an error. |
90 * error. | 90 /// |
91 * | 91 /// If the used [http.Client] completes with an error when making a REST |
92 * If the used [http.Client] completes with an error when making a REST call, | 92 /// call, this method will complete with the same error. |
93 * this method will complete with the same error. | 93 async.Future<UploadLineItemsResponse> uploadlineitems( |
94 */ | 94 UploadLineItemsRequest request) { |
95 async.Future<UploadLineItemsResponse> uploadlineitems(UploadLineItemsRequest r
equest) { | |
96 var _url = null; | 95 var _url = null; |
97 var _queryParams = new core.Map(); | 96 var _queryParams = new core.Map(); |
98 var _uploadMedia = null; | 97 var _uploadMedia = null; |
99 var _uploadOptions = null; | 98 var _uploadOptions = null; |
100 var _downloadOptions = commons.DownloadOptions.Metadata; | 99 var _downloadOptions = commons.DownloadOptions.Metadata; |
101 var _body = null; | 100 var _body = null; |
102 | 101 |
103 if (request != null) { | 102 if (request != null) { |
104 _body = convert.JSON.encode((request).toJson()); | 103 _body = convert.JSON.encode((request).toJson()); |
105 } | 104 } |
106 | 105 |
107 _url = 'lineitems/uploadlineitems'; | 106 _url = 'lineitems/uploadlineitems'; |
108 | 107 |
109 var _response = _requester.request(_url, | 108 var _response = _requester.request(_url, "POST", |
110 "POST", | 109 body: _body, |
111 body: _body, | 110 queryParams: _queryParams, |
112 queryParams: _queryParams, | 111 uploadOptions: _uploadOptions, |
113 uploadOptions: _uploadOptions, | 112 uploadMedia: _uploadMedia, |
114 uploadMedia: _uploadMedia, | 113 downloadOptions: _downloadOptions); |
115 downloadOptions: _downloadOptions); | |
116 return _response.then((data) => new UploadLineItemsResponse.fromJson(data)); | 114 return _response.then((data) => new UploadLineItemsResponse.fromJson(data)); |
117 } | 115 } |
118 | |
119 } | 116 } |
120 | 117 |
121 | |
122 class QueriesResourceApi { | 118 class QueriesResourceApi { |
123 final commons.ApiRequester _requester; | 119 final commons.ApiRequester _requester; |
124 | 120 |
125 QueriesResourceApi(commons.ApiRequester client) : | 121 QueriesResourceApi(commons.ApiRequester client) : _requester = client; |
126 _requester = client; | |
127 | 122 |
128 /** | 123 /// Creates a query. |
129 * Creates a query. | 124 /// |
130 * | 125 /// [request] - The metadata request object. |
131 * [request] - The metadata request object. | 126 /// |
132 * | 127 /// Request parameters: |
133 * Request parameters: | 128 /// |
134 * | 129 /// Completes with a [Query]. |
135 * Completes with a [Query]. | 130 /// |
136 * | 131 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
137 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 132 /// an error. |
138 * error. | 133 /// |
139 * | 134 /// If the used [http.Client] completes with an error when making a REST |
140 * If the used [http.Client] completes with an error when making a REST call, | 135 /// call, this method will complete with the same error. |
141 * this method will complete with the same error. | |
142 */ | |
143 async.Future<Query> createquery(Query request) { | 136 async.Future<Query> createquery(Query request) { |
144 var _url = null; | 137 var _url = null; |
145 var _queryParams = new core.Map(); | 138 var _queryParams = new core.Map(); |
146 var _uploadMedia = null; | 139 var _uploadMedia = null; |
147 var _uploadOptions = null; | 140 var _uploadOptions = null; |
148 var _downloadOptions = commons.DownloadOptions.Metadata; | 141 var _downloadOptions = commons.DownloadOptions.Metadata; |
149 var _body = null; | 142 var _body = null; |
150 | 143 |
151 if (request != null) { | 144 if (request != null) { |
152 _body = convert.JSON.encode((request).toJson()); | 145 _body = convert.JSON.encode((request).toJson()); |
153 } | 146 } |
154 | 147 |
155 _url = 'query'; | 148 _url = 'query'; |
156 | 149 |
157 var _response = _requester.request(_url, | 150 var _response = _requester.request(_url, "POST", |
158 "POST", | 151 body: _body, |
159 body: _body, | 152 queryParams: _queryParams, |
160 queryParams: _queryParams, | 153 uploadOptions: _uploadOptions, |
161 uploadOptions: _uploadOptions, | 154 uploadMedia: _uploadMedia, |
162 uploadMedia: _uploadMedia, | 155 downloadOptions: _downloadOptions); |
163 downloadOptions: _downloadOptions); | |
164 return _response.then((data) => new Query.fromJson(data)); | 156 return _response.then((data) => new Query.fromJson(data)); |
165 } | 157 } |
166 | 158 |
167 /** | 159 /// Deletes a stored query as well as the associated stored reports. |
168 * Deletes a stored query as well as the associated stored reports. | 160 /// |
169 * | 161 /// Request parameters: |
170 * Request parameters: | 162 /// |
171 * | 163 /// [queryId] - Query ID to delete. |
172 * [queryId] - Query ID to delete. | 164 /// |
173 * | 165 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
174 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 166 /// an error. |
175 * error. | 167 /// |
176 * | 168 /// If the used [http.Client] completes with an error when making a REST |
177 * If the used [http.Client] completes with an error when making a REST call, | 169 /// call, this method will complete with the same error. |
178 * this method will complete with the same error. | |
179 */ | |
180 async.Future deletequery(core.String queryId) { | 170 async.Future deletequery(core.String queryId) { |
181 var _url = null; | 171 var _url = null; |
182 var _queryParams = new core.Map(); | 172 var _queryParams = new core.Map(); |
183 var _uploadMedia = null; | 173 var _uploadMedia = null; |
184 var _uploadOptions = null; | 174 var _uploadOptions = null; |
185 var _downloadOptions = commons.DownloadOptions.Metadata; | 175 var _downloadOptions = commons.DownloadOptions.Metadata; |
186 var _body = null; | 176 var _body = null; |
187 | 177 |
188 if (queryId == null) { | 178 if (queryId == null) { |
189 throw new core.ArgumentError("Parameter queryId is required."); | 179 throw new core.ArgumentError("Parameter queryId is required."); |
190 } | 180 } |
191 | 181 |
192 _downloadOptions = null; | 182 _downloadOptions = null; |
193 | 183 |
194 _url = 'query/' + commons.Escaper.ecapeVariable('$queryId'); | 184 _url = 'query/' + commons.Escaper.ecapeVariable('$queryId'); |
195 | 185 |
196 var _response = _requester.request(_url, | 186 var _response = _requester.request(_url, "DELETE", |
197 "DELETE", | 187 body: _body, |
198 body: _body, | 188 queryParams: _queryParams, |
199 queryParams: _queryParams, | 189 uploadOptions: _uploadOptions, |
200 uploadOptions: _uploadOptions, | 190 uploadMedia: _uploadMedia, |
201 uploadMedia: _uploadMedia, | 191 downloadOptions: _downloadOptions); |
202 downloadOptions: _downloadOptions); | |
203 return _response.then((data) => null); | 192 return _response.then((data) => null); |
204 } | 193 } |
205 | 194 |
206 /** | 195 /// Retrieves a stored query. |
207 * Retrieves a stored query. | 196 /// |
208 * | 197 /// Request parameters: |
209 * Request parameters: | 198 /// |
210 * | 199 /// [queryId] - Query ID to retrieve. |
211 * [queryId] - Query ID to retrieve. | 200 /// |
212 * | 201 /// Completes with a [Query]. |
213 * Completes with a [Query]. | 202 /// |
214 * | 203 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
215 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 204 /// an error. |
216 * error. | 205 /// |
217 * | 206 /// If the used [http.Client] completes with an error when making a REST |
218 * If the used [http.Client] completes with an error when making a REST call, | 207 /// call, this method will complete with the same error. |
219 * this method will complete with the same error. | |
220 */ | |
221 async.Future<Query> getquery(core.String queryId) { | 208 async.Future<Query> getquery(core.String queryId) { |
222 var _url = null; | 209 var _url = null; |
223 var _queryParams = new core.Map(); | 210 var _queryParams = new core.Map(); |
224 var _uploadMedia = null; | 211 var _uploadMedia = null; |
225 var _uploadOptions = null; | 212 var _uploadOptions = null; |
226 var _downloadOptions = commons.DownloadOptions.Metadata; | 213 var _downloadOptions = commons.DownloadOptions.Metadata; |
227 var _body = null; | 214 var _body = null; |
228 | 215 |
229 if (queryId == null) { | 216 if (queryId == null) { |
230 throw new core.ArgumentError("Parameter queryId is required."); | 217 throw new core.ArgumentError("Parameter queryId is required."); |
231 } | 218 } |
232 | 219 |
233 _url = 'query/' + commons.Escaper.ecapeVariable('$queryId'); | 220 _url = 'query/' + commons.Escaper.ecapeVariable('$queryId'); |
234 | 221 |
235 var _response = _requester.request(_url, | 222 var _response = _requester.request(_url, "GET", |
236 "GET", | 223 body: _body, |
237 body: _body, | 224 queryParams: _queryParams, |
238 queryParams: _queryParams, | 225 uploadOptions: _uploadOptions, |
239 uploadOptions: _uploadOptions, | 226 uploadMedia: _uploadMedia, |
240 uploadMedia: _uploadMedia, | 227 downloadOptions: _downloadOptions); |
241 downloadOptions: _downloadOptions); | |
242 return _response.then((data) => new Query.fromJson(data)); | 228 return _response.then((data) => new Query.fromJson(data)); |
243 } | 229 } |
244 | 230 |
245 /** | 231 /// Retrieves stored queries. |
246 * Retrieves stored queries. | 232 /// |
247 * | 233 /// Request parameters: |
248 * Request parameters: | 234 /// |
249 * | 235 /// Completes with a [ListQueriesResponse]. |
250 * Completes with a [ListQueriesResponse]. | 236 /// |
251 * | 237 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
252 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 238 /// an error. |
253 * error. | 239 /// |
254 * | 240 /// If the used [http.Client] completes with an error when making a REST |
255 * If the used [http.Client] completes with an error when making a REST call, | 241 /// call, this method will complete with the same error. |
256 * this method will complete with the same error. | |
257 */ | |
258 async.Future<ListQueriesResponse> listqueries() { | 242 async.Future<ListQueriesResponse> listqueries() { |
259 var _url = null; | 243 var _url = null; |
260 var _queryParams = new core.Map(); | 244 var _queryParams = new core.Map(); |
261 var _uploadMedia = null; | 245 var _uploadMedia = null; |
262 var _uploadOptions = null; | 246 var _uploadOptions = null; |
263 var _downloadOptions = commons.DownloadOptions.Metadata; | 247 var _downloadOptions = commons.DownloadOptions.Metadata; |
264 var _body = null; | 248 var _body = null; |
265 | 249 |
266 | |
267 _url = 'queries'; | 250 _url = 'queries'; |
268 | 251 |
269 var _response = _requester.request(_url, | 252 var _response = _requester.request(_url, "GET", |
270 "GET", | 253 body: _body, |
271 body: _body, | 254 queryParams: _queryParams, |
272 queryParams: _queryParams, | 255 uploadOptions: _uploadOptions, |
273 uploadOptions: _uploadOptions, | 256 uploadMedia: _uploadMedia, |
274 uploadMedia: _uploadMedia, | 257 downloadOptions: _downloadOptions); |
275 downloadOptions: _downloadOptions); | |
276 return _response.then((data) => new ListQueriesResponse.fromJson(data)); | 258 return _response.then((data) => new ListQueriesResponse.fromJson(data)); |
277 } | 259 } |
278 | 260 |
279 /** | 261 /// Runs a stored query to generate a report. |
280 * Runs a stored query to generate a report. | 262 /// |
281 * | 263 /// [request] - The metadata request object. |
282 * [request] - The metadata request object. | 264 /// |
283 * | 265 /// Request parameters: |
284 * Request parameters: | 266 /// |
285 * | 267 /// [queryId] - Query ID to run. |
286 * [queryId] - Query ID to run. | 268 /// |
287 * | 269 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
288 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 270 /// an error. |
289 * error. | 271 /// |
290 * | 272 /// If the used [http.Client] completes with an error when making a REST |
291 * If the used [http.Client] completes with an error when making a REST call, | 273 /// call, this method will complete with the same error. |
292 * this method will complete with the same error. | |
293 */ | |
294 async.Future runquery(RunQueryRequest request, core.String queryId) { | 274 async.Future runquery(RunQueryRequest request, core.String queryId) { |
295 var _url = null; | 275 var _url = null; |
296 var _queryParams = new core.Map(); | 276 var _queryParams = new core.Map(); |
297 var _uploadMedia = null; | 277 var _uploadMedia = null; |
298 var _uploadOptions = null; | 278 var _uploadOptions = null; |
299 var _downloadOptions = commons.DownloadOptions.Metadata; | 279 var _downloadOptions = commons.DownloadOptions.Metadata; |
300 var _body = null; | 280 var _body = null; |
301 | 281 |
302 if (request != null) { | 282 if (request != null) { |
303 _body = convert.JSON.encode((request).toJson()); | 283 _body = convert.JSON.encode((request).toJson()); |
304 } | 284 } |
305 if (queryId == null) { | 285 if (queryId == null) { |
306 throw new core.ArgumentError("Parameter queryId is required."); | 286 throw new core.ArgumentError("Parameter queryId is required."); |
307 } | 287 } |
308 | 288 |
309 _downloadOptions = null; | 289 _downloadOptions = null; |
310 | 290 |
311 _url = 'query/' + commons.Escaper.ecapeVariable('$queryId'); | 291 _url = 'query/' + commons.Escaper.ecapeVariable('$queryId'); |
312 | 292 |
313 var _response = _requester.request(_url, | 293 var _response = _requester.request(_url, "POST", |
314 "POST", | 294 body: _body, |
315 body: _body, | 295 queryParams: _queryParams, |
316 queryParams: _queryParams, | 296 uploadOptions: _uploadOptions, |
317 uploadOptions: _uploadOptions, | 297 uploadMedia: _uploadMedia, |
318 uploadMedia: _uploadMedia, | 298 downloadOptions: _downloadOptions); |
319 downloadOptions: _downloadOptions); | |
320 return _response.then((data) => null); | 299 return _response.then((data) => null); |
321 } | 300 } |
322 | |
323 } | 301 } |
324 | 302 |
325 | |
326 class ReportsResourceApi { | 303 class ReportsResourceApi { |
327 final commons.ApiRequester _requester; | 304 final commons.ApiRequester _requester; |
328 | 305 |
329 ReportsResourceApi(commons.ApiRequester client) : | 306 ReportsResourceApi(commons.ApiRequester client) : _requester = client; |
330 _requester = client; | |
331 | 307 |
332 /** | 308 /// Retrieves stored reports. |
333 * Retrieves stored reports. | 309 /// |
334 * | 310 /// Request parameters: |
335 * Request parameters: | 311 /// |
336 * | 312 /// [queryId] - Query ID with which the reports are associated. |
337 * [queryId] - Query ID with which the reports are associated. | 313 /// |
338 * | 314 /// Completes with a [ListReportsResponse]. |
339 * Completes with a [ListReportsResponse]. | 315 /// |
340 * | 316 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
341 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 317 /// an error. |
342 * error. | 318 /// |
343 * | 319 /// If the used [http.Client] completes with an error when making a REST |
344 * If the used [http.Client] completes with an error when making a REST call, | 320 /// call, this method will complete with the same error. |
345 * this method will complete with the same error. | |
346 */ | |
347 async.Future<ListReportsResponse> listreports(core.String queryId) { | 321 async.Future<ListReportsResponse> listreports(core.String queryId) { |
348 var _url = null; | 322 var _url = null; |
349 var _queryParams = new core.Map(); | 323 var _queryParams = new core.Map(); |
350 var _uploadMedia = null; | 324 var _uploadMedia = null; |
351 var _uploadOptions = null; | 325 var _uploadOptions = null; |
352 var _downloadOptions = commons.DownloadOptions.Metadata; | 326 var _downloadOptions = commons.DownloadOptions.Metadata; |
353 var _body = null; | 327 var _body = null; |
354 | 328 |
355 if (queryId == null) { | 329 if (queryId == null) { |
356 throw new core.ArgumentError("Parameter queryId is required."); | 330 throw new core.ArgumentError("Parameter queryId is required."); |
357 } | 331 } |
358 | 332 |
359 _url = 'queries/' + commons.Escaper.ecapeVariable('$queryId') + '/reports'; | 333 _url = 'queries/' + commons.Escaper.ecapeVariable('$queryId') + '/reports'; |
360 | 334 |
361 var _response = _requester.request(_url, | 335 var _response = _requester.request(_url, "GET", |
362 "GET", | 336 body: _body, |
363 body: _body, | 337 queryParams: _queryParams, |
364 queryParams: _queryParams, | 338 uploadOptions: _uploadOptions, |
365 uploadOptions: _uploadOptions, | 339 uploadMedia: _uploadMedia, |
366 uploadMedia: _uploadMedia, | 340 downloadOptions: _downloadOptions); |
367 downloadOptions: _downloadOptions); | |
368 return _response.then((data) => new ListReportsResponse.fromJson(data)); | 341 return _response.then((data) => new ListReportsResponse.fromJson(data)); |
369 } | 342 } |
370 | |
371 } | 343 } |
372 | 344 |
373 | |
374 class SdfResourceApi { | 345 class SdfResourceApi { |
375 final commons.ApiRequester _requester; | 346 final commons.ApiRequester _requester; |
376 | 347 |
377 SdfResourceApi(commons.ApiRequester client) : | 348 SdfResourceApi(commons.ApiRequester client) : _requester = client; |
378 _requester = client; | |
379 | 349 |
380 /** | 350 /// Retrieves entities in SDF format. |
381 * Retrieves entities in SDF format. | 351 /// |
382 * | 352 /// [request] - The metadata request object. |
383 * [request] - The metadata request object. | 353 /// |
384 * | 354 /// Request parameters: |
385 * Request parameters: | 355 /// |
386 * | 356 /// Completes with a [DownloadResponse]. |
387 * Completes with a [DownloadResponse]. | 357 /// |
388 * | 358 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
389 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 359 /// an error. |
390 * error. | 360 /// |
391 * | 361 /// If the used [http.Client] completes with an error when making a REST |
392 * If the used [http.Client] completes with an error when making a REST call, | 362 /// call, this method will complete with the same error. |
393 * this method will complete with the same error. | |
394 */ | |
395 async.Future<DownloadResponse> download(DownloadRequest request) { | 363 async.Future<DownloadResponse> download(DownloadRequest request) { |
396 var _url = null; | 364 var _url = null; |
397 var _queryParams = new core.Map(); | 365 var _queryParams = new core.Map(); |
398 var _uploadMedia = null; | 366 var _uploadMedia = null; |
399 var _uploadOptions = null; | 367 var _uploadOptions = null; |
400 var _downloadOptions = commons.DownloadOptions.Metadata; | 368 var _downloadOptions = commons.DownloadOptions.Metadata; |
401 var _body = null; | 369 var _body = null; |
402 | 370 |
403 if (request != null) { | 371 if (request != null) { |
404 _body = convert.JSON.encode((request).toJson()); | 372 _body = convert.JSON.encode((request).toJson()); |
405 } | 373 } |
406 | 374 |
407 _url = 'sdf/download'; | 375 _url = 'sdf/download'; |
408 | 376 |
409 var _response = _requester.request(_url, | 377 var _response = _requester.request(_url, "POST", |
410 "POST", | 378 body: _body, |
411 body: _body, | 379 queryParams: _queryParams, |
412 queryParams: _queryParams, | 380 uploadOptions: _uploadOptions, |
413 uploadOptions: _uploadOptions, | 381 uploadMedia: _uploadMedia, |
414 uploadMedia: _uploadMedia, | 382 downloadOptions: _downloadOptions); |
415 downloadOptions: _downloadOptions); | |
416 return _response.then((data) => new DownloadResponse.fromJson(data)); | 383 return _response.then((data) => new DownloadResponse.fromJson(data)); |
417 } | 384 } |
418 | |
419 } | 385 } |
420 | 386 |
| 387 /// Request to fetch stored line items. |
| 388 class DownloadLineItemsRequest { |
| 389 /// File specification (column names, types, order) in which the line items |
| 390 /// will be returned. Default to EWF. |
| 391 /// Possible string values are: |
| 392 /// - "EWF" |
| 393 core.String fileSpec; |
421 | 394 |
| 395 /// Ids of the specified filter type used to filter line items to fetch. If |
| 396 /// omitted, all the line items will be returned. |
| 397 core.List<core.String> filterIds; |
422 | 398 |
423 /** Request to fetch stored line items. */ | 399 /// Filter type used to filter line items to fetch. |
424 class DownloadLineItemsRequest { | 400 /// Possible string values are: |
425 /** | 401 /// - "ADVERTISER_ID" |
426 * File specification (column names, types, order) in which the line items | 402 /// - "INSERTION_ORDER_ID" |
427 * will be returned. Default to EWF. | 403 /// - "LINE_ITEM_ID" |
428 * Possible string values are: | |
429 * - "EWF" | |
430 */ | |
431 core.String fileSpec; | |
432 /** | |
433 * Ids of the specified filter type used to filter line items to fetch. If | |
434 * omitted, all the line items will be returned. | |
435 */ | |
436 core.List<core.String> filterIds; | |
437 /** | |
438 * Filter type used to filter line items to fetch. | |
439 * Possible string values are: | |
440 * - "ADVERTISER_ID" | |
441 * - "INSERTION_ORDER_ID" | |
442 * - "LINE_ITEM_ID" | |
443 */ | |
444 core.String filterType; | 404 core.String filterType; |
445 /** | 405 |
446 * Format in which the line items will be returned. Default to CSV. | 406 /// Format in which the line items will be returned. Default to CSV. |
447 * Possible string values are: | 407 /// Possible string values are: |
448 * - "CSV" | 408 /// - "CSV" |
449 */ | |
450 core.String format; | 409 core.String format; |
451 | 410 |
452 DownloadLineItemsRequest(); | 411 DownloadLineItemsRequest(); |
453 | 412 |
454 DownloadLineItemsRequest.fromJson(core.Map _json) { | 413 DownloadLineItemsRequest.fromJson(core.Map _json) { |
455 if (_json.containsKey("fileSpec")) { | 414 if (_json.containsKey("fileSpec")) { |
456 fileSpec = _json["fileSpec"]; | 415 fileSpec = _json["fileSpec"]; |
457 } | 416 } |
458 if (_json.containsKey("filterIds")) { | 417 if (_json.containsKey("filterIds")) { |
459 filterIds = _json["filterIds"]; | 418 filterIds = _json["filterIds"]; |
460 } | 419 } |
461 if (_json.containsKey("filterType")) { | 420 if (_json.containsKey("filterType")) { |
462 filterType = _json["filterType"]; | 421 filterType = _json["filterType"]; |
463 } | 422 } |
464 if (_json.containsKey("format")) { | 423 if (_json.containsKey("format")) { |
465 format = _json["format"]; | 424 format = _json["format"]; |
466 } | 425 } |
467 } | 426 } |
468 | 427 |
469 core.Map<core.String, core.Object> toJson() { | 428 core.Map<core.String, core.Object> toJson() { |
470 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 429 final core.Map<core.String, core.Object> _json = |
| 430 new core.Map<core.String, core.Object>(); |
471 if (fileSpec != null) { | 431 if (fileSpec != null) { |
472 _json["fileSpec"] = fileSpec; | 432 _json["fileSpec"] = fileSpec; |
473 } | 433 } |
474 if (filterIds != null) { | 434 if (filterIds != null) { |
475 _json["filterIds"] = filterIds; | 435 _json["filterIds"] = filterIds; |
476 } | 436 } |
477 if (filterType != null) { | 437 if (filterType != null) { |
478 _json["filterType"] = filterType; | 438 _json["filterType"] = filterType; |
479 } | 439 } |
480 if (format != null) { | 440 if (format != null) { |
481 _json["format"] = format; | 441 _json["format"] = format; |
482 } | 442 } |
483 return _json; | 443 return _json; |
484 } | 444 } |
485 } | 445 } |
486 | 446 |
487 /** Download line items response. */ | 447 /// Download line items response. |
488 class DownloadLineItemsResponse { | 448 class DownloadLineItemsResponse { |
489 /** | 449 /// Retrieved line items in CSV format. For more information about file |
490 * Retrieved line items in CSV format. For more information about file | 450 /// formats, see Entity Write File Format. |
491 * formats, see Entity Write File Format. | |
492 */ | |
493 core.String lineItems; | 451 core.String lineItems; |
494 | 452 |
495 DownloadLineItemsResponse(); | 453 DownloadLineItemsResponse(); |
496 | 454 |
497 DownloadLineItemsResponse.fromJson(core.Map _json) { | 455 DownloadLineItemsResponse.fromJson(core.Map _json) { |
498 if (_json.containsKey("lineItems")) { | 456 if (_json.containsKey("lineItems")) { |
499 lineItems = _json["lineItems"]; | 457 lineItems = _json["lineItems"]; |
500 } | 458 } |
501 } | 459 } |
502 | 460 |
503 core.Map<core.String, core.Object> toJson() { | 461 core.Map<core.String, core.Object> toJson() { |
504 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 462 final core.Map<core.String, core.Object> _json = |
| 463 new core.Map<core.String, core.Object>(); |
505 if (lineItems != null) { | 464 if (lineItems != null) { |
506 _json["lineItems"] = lineItems; | 465 _json["lineItems"] = lineItems; |
507 } | 466 } |
508 return _json; | 467 return _json; |
509 } | 468 } |
510 } | 469 } |
511 | 470 |
512 /** | 471 /// Request to fetch stored insertion orders, line items, TrueView ad groups |
513 * Request to fetch stored insertion orders, line items, TrueView ad groups and | 472 /// and ads. |
514 * ads. | |
515 */ | |
516 class DownloadRequest { | 473 class DownloadRequest { |
517 /** File types that will be returned. */ | 474 /// File types that will be returned. |
518 core.List<core.String> fileTypes; | 475 core.List<core.String> fileTypes; |
519 /** | 476 |
520 * The IDs of the specified filter type. This is used to filter entities to | 477 /// The IDs of the specified filter type. This is used to filter entities to |
521 * fetch. At least one ID must be specified. Only one ID is allowed for the | 478 /// fetch. At least one ID must be specified. Only one ID is allowed for the |
522 * ADVERTISER_ID filter type. For INSERTION_ORDER_ID or LINE_ITEM_ID filter | 479 /// ADVERTISER_ID filter type. For INSERTION_ORDER_ID or LINE_ITEM_ID filter |
523 * types, all IDs must be from the same Advertiser. | 480 /// types, all IDs must be from the same Advertiser. |
524 */ | |
525 core.List<core.String> filterIds; | 481 core.List<core.String> filterIds; |
526 /** | 482 |
527 * Filter type used to filter line items to fetch. | 483 /// Filter type used to filter line items to fetch. |
528 * Possible string values are: | 484 /// Possible string values are: |
529 * - "ADVERTISER_ID" | 485 /// - "ADVERTISER_ID" |
530 * - "INSERTION_ORDER_ID" | 486 /// - "INSERTION_ORDER_ID" |
531 * - "LINE_ITEM_ID" | 487 /// - "LINE_ITEM_ID" |
532 */ | |
533 core.String filterType; | 488 core.String filterType; |
534 /** | 489 |
535 * SDF Version (column names, types, order) in which the entities will be | 490 /// SDF Version (column names, types, order) in which the entities will be |
536 * returned. Default to 3. | 491 /// returned. Default to 3. |
537 */ | |
538 core.String version; | 492 core.String version; |
539 | 493 |
540 DownloadRequest(); | 494 DownloadRequest(); |
541 | 495 |
542 DownloadRequest.fromJson(core.Map _json) { | 496 DownloadRequest.fromJson(core.Map _json) { |
543 if (_json.containsKey("fileTypes")) { | 497 if (_json.containsKey("fileTypes")) { |
544 fileTypes = _json["fileTypes"]; | 498 fileTypes = _json["fileTypes"]; |
545 } | 499 } |
546 if (_json.containsKey("filterIds")) { | 500 if (_json.containsKey("filterIds")) { |
547 filterIds = _json["filterIds"]; | 501 filterIds = _json["filterIds"]; |
548 } | 502 } |
549 if (_json.containsKey("filterType")) { | 503 if (_json.containsKey("filterType")) { |
550 filterType = _json["filterType"]; | 504 filterType = _json["filterType"]; |
551 } | 505 } |
552 if (_json.containsKey("version")) { | 506 if (_json.containsKey("version")) { |
553 version = _json["version"]; | 507 version = _json["version"]; |
554 } | 508 } |
555 } | 509 } |
556 | 510 |
557 core.Map<core.String, core.Object> toJson() { | 511 core.Map<core.String, core.Object> toJson() { |
558 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 512 final core.Map<core.String, core.Object> _json = |
| 513 new core.Map<core.String, core.Object>(); |
559 if (fileTypes != null) { | 514 if (fileTypes != null) { |
560 _json["fileTypes"] = fileTypes; | 515 _json["fileTypes"] = fileTypes; |
561 } | 516 } |
562 if (filterIds != null) { | 517 if (filterIds != null) { |
563 _json["filterIds"] = filterIds; | 518 _json["filterIds"] = filterIds; |
564 } | 519 } |
565 if (filterType != null) { | 520 if (filterType != null) { |
566 _json["filterType"] = filterType; | 521 _json["filterType"] = filterType; |
567 } | 522 } |
568 if (version != null) { | 523 if (version != null) { |
569 _json["version"] = version; | 524 _json["version"] = version; |
570 } | 525 } |
571 return _json; | 526 return _json; |
572 } | 527 } |
573 } | 528 } |
574 | 529 |
575 /** Download response. */ | 530 /// Download response. |
576 class DownloadResponse { | 531 class DownloadResponse { |
577 /** Retrieved ad groups in SDF format. */ | 532 /// Retrieved ad groups in SDF format. |
578 core.String adGroups; | 533 core.String adGroups; |
579 /** Retrieved ads in SDF format. */ | 534 |
| 535 /// Retrieved ads in SDF format. |
580 core.String ads; | 536 core.String ads; |
581 /** Retrieved insertion orders in SDF format. */ | 537 |
| 538 /// Retrieved insertion orders in SDF format. |
582 core.String insertionOrders; | 539 core.String insertionOrders; |
583 /** Retrieved line items in SDF format. */ | 540 |
| 541 /// Retrieved line items in SDF format. |
584 core.String lineItems; | 542 core.String lineItems; |
585 | 543 |
586 DownloadResponse(); | 544 DownloadResponse(); |
587 | 545 |
588 DownloadResponse.fromJson(core.Map _json) { | 546 DownloadResponse.fromJson(core.Map _json) { |
589 if (_json.containsKey("adGroups")) { | 547 if (_json.containsKey("adGroups")) { |
590 adGroups = _json["adGroups"]; | 548 adGroups = _json["adGroups"]; |
591 } | 549 } |
592 if (_json.containsKey("ads")) { | 550 if (_json.containsKey("ads")) { |
593 ads = _json["ads"]; | 551 ads = _json["ads"]; |
594 } | 552 } |
595 if (_json.containsKey("insertionOrders")) { | 553 if (_json.containsKey("insertionOrders")) { |
596 insertionOrders = _json["insertionOrders"]; | 554 insertionOrders = _json["insertionOrders"]; |
597 } | 555 } |
598 if (_json.containsKey("lineItems")) { | 556 if (_json.containsKey("lineItems")) { |
599 lineItems = _json["lineItems"]; | 557 lineItems = _json["lineItems"]; |
600 } | 558 } |
601 } | 559 } |
602 | 560 |
603 core.Map<core.String, core.Object> toJson() { | 561 core.Map<core.String, core.Object> toJson() { |
604 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 562 final core.Map<core.String, core.Object> _json = |
| 563 new core.Map<core.String, core.Object>(); |
605 if (adGroups != null) { | 564 if (adGroups != null) { |
606 _json["adGroups"] = adGroups; | 565 _json["adGroups"] = adGroups; |
607 } | 566 } |
608 if (ads != null) { | 567 if (ads != null) { |
609 _json["ads"] = ads; | 568 _json["ads"] = ads; |
610 } | 569 } |
611 if (insertionOrders != null) { | 570 if (insertionOrders != null) { |
612 _json["insertionOrders"] = insertionOrders; | 571 _json["insertionOrders"] = insertionOrders; |
613 } | 572 } |
614 if (lineItems != null) { | 573 if (lineItems != null) { |
615 _json["lineItems"] = lineItems; | 574 _json["lineItems"] = lineItems; |
616 } | 575 } |
617 return _json; | 576 return _json; |
618 } | 577 } |
619 } | 578 } |
620 | 579 |
621 /** Filter used to match traffic data in your report. */ | 580 /// Filter used to match traffic data in your report. |
622 class FilterPair { | 581 class FilterPair { |
623 /** | 582 /// Filter type. |
624 * Filter type. | 583 /// Possible string values are: |
625 * Possible string values are: | 584 /// - "FILTER_ACTIVE_VIEW_EXPECTED_VIEWABILITY" |
626 * - "FILTER_ACTIVE_VIEW_EXPECTED_VIEWABILITY" | 585 /// - "FILTER_ACTIVITY_ID" |
627 * - "FILTER_ACTIVITY_ID" | 586 /// - "FILTER_ADVERTISER" |
628 * - "FILTER_ADVERTISER" | 587 /// - "FILTER_ADVERTISER_CURRENCY" |
629 * - "FILTER_ADVERTISER_CURRENCY" | 588 /// - "FILTER_ADVERTISER_TIMEZONE" |
630 * - "FILTER_ADVERTISER_TIMEZONE" | 589 /// - "FILTER_AD_POSITION" |
631 * - "FILTER_AD_POSITION" | 590 /// - "FILTER_AGE" |
632 * - "FILTER_AGE" | 591 /// - "FILTER_BRANDSAFE_CHANNEL_ID" |
633 * - "FILTER_BRANDSAFE_CHANNEL_ID" | 592 /// - "FILTER_BROWSER" |
634 * - "FILTER_BROWSER" | 593 /// - "FILTER_BUDGET_SEGMENT_DESCRIPTION" |
635 * - "FILTER_BUDGET_SEGMENT_DESCRIPTION" | 594 /// - "FILTER_CAMPAIGN_DAILY_FREQUENCY" |
636 * - "FILTER_CAMPAIGN_DAILY_FREQUENCY" | 595 /// - "FILTER_CARRIER" |
637 * - "FILTER_CARRIER" | 596 /// - "FILTER_CHANNEL_ID" |
638 * - "FILTER_CHANNEL_ID" | 597 /// - "FILTER_CITY" |
639 * - "FILTER_CITY" | 598 /// - "FILTER_COMPANION_CREATIVE_ID" |
640 * - "FILTER_COMPANION_CREATIVE_ID" | 599 /// - "FILTER_CONVERSION_DELAY" |
641 * - "FILTER_CONVERSION_DELAY" | 600 /// - "FILTER_COUNTRY" |
642 * - "FILTER_COUNTRY" | 601 /// - "FILTER_CREATIVE_HEIGHT" |
643 * - "FILTER_CREATIVE_HEIGHT" | 602 /// - "FILTER_CREATIVE_ID" |
644 * - "FILTER_CREATIVE_ID" | 603 /// - "FILTER_CREATIVE_SIZE" |
645 * - "FILTER_CREATIVE_SIZE" | 604 /// - "FILTER_CREATIVE_TYPE" |
646 * - "FILTER_CREATIVE_TYPE" | 605 /// - "FILTER_CREATIVE_WIDTH" |
647 * - "FILTER_CREATIVE_WIDTH" | 606 /// - "FILTER_DATA_PROVIDER" |
648 * - "FILTER_DATA_PROVIDER" | 607 /// - "FILTER_DATE" |
649 * - "FILTER_DATE" | 608 /// - "FILTER_DAY_OF_WEEK" |
650 * - "FILTER_DAY_OF_WEEK" | 609 /// - "FILTER_DFP_ORDER_ID" |
651 * - "FILTER_DFP_ORDER_ID" | 610 /// - "FILTER_DMA" |
652 * - "FILTER_DMA" | 611 /// - "FILTER_EXCHANGE_ID" |
653 * - "FILTER_EXCHANGE_ID" | 612 /// - "FILTER_FLOODLIGHT_PIXEL_ID" |
654 * - "FILTER_FLOODLIGHT_PIXEL_ID" | 613 /// - "FILTER_GENDER" |
655 * - "FILTER_GENDER" | 614 /// - "FILTER_INSERTION_ORDER" |
656 * - "FILTER_INSERTION_ORDER" | 615 /// - "FILTER_INVENTORY_FORMAT" |
657 * - "FILTER_INVENTORY_FORMAT" | 616 /// - "FILTER_INVENTORY_SOURCE" |
658 * - "FILTER_INVENTORY_SOURCE" | 617 /// - "FILTER_INVENTORY_SOURCE_TYPE" |
659 * - "FILTER_INVENTORY_SOURCE_TYPE" | 618 /// - "FILTER_KEYWORD" |
660 * - "FILTER_KEYWORD" | 619 /// - "FILTER_LINE_ITEM" |
661 * - "FILTER_LINE_ITEM" | 620 /// - "FILTER_LINE_ITEM_DAILY_FREQUENCY" |
662 * - "FILTER_LINE_ITEM_DAILY_FREQUENCY" | 621 /// - "FILTER_LINE_ITEM_LIFETIME_FREQUENCY" |
663 * - "FILTER_LINE_ITEM_LIFETIME_FREQUENCY" | 622 /// - "FILTER_LINE_ITEM_TYPE" |
664 * - "FILTER_LINE_ITEM_TYPE" | 623 /// - "FILTER_MEDIA_PLAN" |
665 * - "FILTER_MEDIA_PLAN" | 624 /// - "FILTER_MOBILE_DEVICE_MAKE" |
666 * - "FILTER_MOBILE_DEVICE_MAKE" | 625 /// - "FILTER_MOBILE_DEVICE_MAKE_MODEL" |
667 * - "FILTER_MOBILE_DEVICE_MAKE_MODEL" | 626 /// - "FILTER_MOBILE_DEVICE_TYPE" |
668 * - "FILTER_MOBILE_DEVICE_TYPE" | 627 /// - "FILTER_MOBILE_GEO" |
669 * - "FILTER_MOBILE_GEO" | 628 /// - "FILTER_MONTH" |
670 * - "FILTER_MONTH" | 629 /// - "FILTER_MRAID_SUPPORT" |
671 * - "FILTER_MRAID_SUPPORT" | 630 /// - "FILTER_NIELSEN_AGE" |
672 * - "FILTER_NIELSEN_AGE" | 631 /// - "FILTER_NIELSEN_COUNTRY_CODE" |
673 * - "FILTER_NIELSEN_COUNTRY_CODE" | 632 /// - "FILTER_NIELSEN_DEVICE_ID" |
674 * - "FILTER_NIELSEN_DEVICE_ID" | 633 /// - "FILTER_NIELSEN_GENDER" |
675 * - "FILTER_NIELSEN_GENDER" | 634 /// - "FILTER_NOT_SUPPORTED" |
676 * - "FILTER_NOT_SUPPORTED" | 635 /// - "FILTER_ORDER_ID" |
677 * - "FILTER_ORDER_ID" | 636 /// - "FILTER_OS" |
678 * - "FILTER_OS" | 637 /// - "FILTER_PAGE_CATEGORY" |
679 * - "FILTER_PAGE_CATEGORY" | 638 /// - "FILTER_PAGE_LAYOUT" |
680 * - "FILTER_PAGE_LAYOUT" | 639 /// - "FILTER_PARTNER" |
681 * - "FILTER_PARTNER" | 640 /// - "FILTER_PARTNER_CURRENCY" |
682 * - "FILTER_PARTNER_CURRENCY" | 641 /// - "FILTER_PUBLIC_INVENTORY" |
683 * - "FILTER_PUBLIC_INVENTORY" | 642 /// - "FILTER_QUARTER" |
684 * - "FILTER_QUARTER" | 643 /// - "FILTER_REGION" |
685 * - "FILTER_REGION" | 644 /// - "FILTER_REGULAR_CHANNEL_ID" |
686 * - "FILTER_REGULAR_CHANNEL_ID" | 645 /// - "FILTER_SITE_ID" |
687 * - "FILTER_SITE_ID" | 646 /// - "FILTER_SITE_LANGUAGE" |
688 * - "FILTER_SITE_LANGUAGE" | 647 /// - "FILTER_SKIPPABLE_SUPPORT" |
689 * - "FILTER_SKIPPABLE_SUPPORT" | 648 /// - "FILTER_TARGETED_USER_LIST" |
690 * - "FILTER_TARGETED_USER_LIST" | 649 /// - "FILTER_TIME_OF_DAY" |
691 * - "FILTER_TIME_OF_DAY" | 650 /// - "FILTER_TRUEVIEW_AD_GROUP_AD_ID" |
692 * - "FILTER_TRUEVIEW_AD_GROUP_AD_ID" | 651 /// - "FILTER_TRUEVIEW_AD_GROUP_ID" |
693 * - "FILTER_TRUEVIEW_AD_GROUP_ID" | 652 /// - "FILTER_TRUEVIEW_AGE" |
694 * - "FILTER_TRUEVIEW_AGE" | 653 /// - "FILTER_TRUEVIEW_CATEGORY" |
695 * - "FILTER_TRUEVIEW_CATEGORY" | 654 /// - "FILTER_TRUEVIEW_CITY" |
696 * - "FILTER_TRUEVIEW_CITY" | 655 /// - "FILTER_TRUEVIEW_CONVERSION_TYPE" |
697 * - "FILTER_TRUEVIEW_CONVERSION_TYPE" | 656 /// - "FILTER_TRUEVIEW_COUNTRY" |
698 * - "FILTER_TRUEVIEW_COUNTRY" | 657 /// - "FILTER_TRUEVIEW_CUSTOM_AFFINITY" |
699 * - "FILTER_TRUEVIEW_CUSTOM_AFFINITY" | 658 /// - "FILTER_TRUEVIEW_DMA" |
700 * - "FILTER_TRUEVIEW_DMA" | 659 /// - "FILTER_TRUEVIEW_GENDER" |
701 * - "FILTER_TRUEVIEW_GENDER" | 660 /// - "FILTER_TRUEVIEW_IAR_AGE" |
702 * - "FILTER_TRUEVIEW_IAR_AGE" | 661 /// - "FILTER_TRUEVIEW_IAR_CATEGORY" |
703 * - "FILTER_TRUEVIEW_IAR_CATEGORY" | 662 /// - "FILTER_TRUEVIEW_IAR_CITY" |
704 * - "FILTER_TRUEVIEW_IAR_CITY" | 663 /// - "FILTER_TRUEVIEW_IAR_COUNTRY" |
705 * - "FILTER_TRUEVIEW_IAR_COUNTRY" | 664 /// - "FILTER_TRUEVIEW_IAR_GENDER" |
706 * - "FILTER_TRUEVIEW_IAR_GENDER" | 665 /// - "FILTER_TRUEVIEW_IAR_INTEREST" |
707 * - "FILTER_TRUEVIEW_IAR_INTEREST" | 666 /// - "FILTER_TRUEVIEW_IAR_LANGUAGE" |
708 * - "FILTER_TRUEVIEW_IAR_LANGUAGE" | 667 /// - "FILTER_TRUEVIEW_IAR_PARENTAL_STATUS" |
709 * - "FILTER_TRUEVIEW_IAR_PARENTAL_STATUS" | 668 /// - "FILTER_TRUEVIEW_IAR_REGION" |
710 * - "FILTER_TRUEVIEW_IAR_REGION" | 669 /// - "FILTER_TRUEVIEW_IAR_REMARKETING_LIST" |
711 * - "FILTER_TRUEVIEW_IAR_REMARKETING_LIST" | 670 /// - "FILTER_TRUEVIEW_IAR_TIME_OF_DAY" |
712 * - "FILTER_TRUEVIEW_IAR_TIME_OF_DAY" | 671 /// - "FILTER_TRUEVIEW_IAR_YOUTUBE_CHANNEL" |
713 * - "FILTER_TRUEVIEW_IAR_YOUTUBE_CHANNEL" | 672 /// - "FILTER_TRUEVIEW_IAR_YOUTUBE_VIDEO" |
714 * - "FILTER_TRUEVIEW_IAR_YOUTUBE_VIDEO" | 673 /// - "FILTER_TRUEVIEW_IAR_ZIPCODE" |
715 * - "FILTER_TRUEVIEW_IAR_ZIPCODE" | 674 /// - "FILTER_TRUEVIEW_INTEREST" |
716 * - "FILTER_TRUEVIEW_INTEREST" | 675 /// - "FILTER_TRUEVIEW_KEYWORD" |
717 * - "FILTER_TRUEVIEW_KEYWORD" | 676 /// - "FILTER_TRUEVIEW_PARENTAL_STATUS" |
718 * - "FILTER_TRUEVIEW_PARENTAL_STATUS" | 677 /// - "FILTER_TRUEVIEW_PLACEMENT" |
719 * - "FILTER_TRUEVIEW_PLACEMENT" | 678 /// - "FILTER_TRUEVIEW_REGION" |
720 * - "FILTER_TRUEVIEW_REGION" | 679 /// - "FILTER_TRUEVIEW_REMARKETING_LIST" |
721 * - "FILTER_TRUEVIEW_REMARKETING_LIST" | 680 /// - "FILTER_TRUEVIEW_URL" |
722 * - "FILTER_TRUEVIEW_URL" | 681 /// - "FILTER_TRUEVIEW_ZIPCODE" |
723 * - "FILTER_TRUEVIEW_ZIPCODE" | 682 /// - "FILTER_UNKNOWN" |
724 * - "FILTER_UNKNOWN" | 683 /// - "FILTER_USER_LIST" |
725 * - "FILTER_USER_LIST" | 684 /// - "FILTER_USER_LIST_FIRST_PARTY" |
726 * - "FILTER_USER_LIST_FIRST_PARTY" | 685 /// - "FILTER_USER_LIST_THIRD_PARTY" |
727 * - "FILTER_USER_LIST_THIRD_PARTY" | 686 /// - "FILTER_VIDEO_AD_POSITION_IN_STREAM" |
728 * - "FILTER_VIDEO_AD_POSITION_IN_STREAM" | 687 /// - "FILTER_VIDEO_COMPANION_SIZE" |
729 * - "FILTER_VIDEO_COMPANION_SIZE" | 688 /// - "FILTER_VIDEO_COMPANION_TYPE" |
730 * - "FILTER_VIDEO_COMPANION_TYPE" | 689 /// - "FILTER_VIDEO_CREATIVE_DURATION" |
731 * - "FILTER_VIDEO_CREATIVE_DURATION" | 690 /// - "FILTER_VIDEO_CREATIVE_DURATION_SKIPPABLE" |
732 * - "FILTER_VIDEO_CREATIVE_DURATION_SKIPPABLE" | 691 /// - "FILTER_VIDEO_DURATION_SECONDS" |
733 * - "FILTER_VIDEO_DURATION_SECONDS" | 692 /// - "FILTER_VIDEO_FORMAT_SUPPORT" |
734 * - "FILTER_VIDEO_FORMAT_SUPPORT" | 693 /// - "FILTER_VIDEO_INVENTORY_TYPE" |
735 * - "FILTER_VIDEO_INVENTORY_TYPE" | 694 /// - "FILTER_VIDEO_PLAYER_SIZE" |
736 * - "FILTER_VIDEO_PLAYER_SIZE" | 695 /// - "FILTER_VIDEO_RATING_TIER" |
737 * - "FILTER_VIDEO_RATING_TIER" | 696 /// - "FILTER_VIDEO_SKIPPABLE_SUPPORT" |
738 * - "FILTER_VIDEO_SKIPPABLE_SUPPORT" | 697 /// - "FILTER_VIDEO_VPAID_SUPPORT" |
739 * - "FILTER_VIDEO_VPAID_SUPPORT" | 698 /// - "FILTER_WEEK" |
740 * - "FILTER_WEEK" | 699 /// - "FILTER_YEAR" |
741 * - "FILTER_YEAR" | 700 /// - "FILTER_YOUTUBE_VERTICAL" |
742 * - "FILTER_YOUTUBE_VERTICAL" | 701 /// - "FILTER_ZIP_CODE" |
743 * - "FILTER_ZIP_CODE" | |
744 */ | |
745 core.String type; | 702 core.String type; |
746 /** Filter value. */ | 703 |
| 704 /// Filter value. |
747 core.String value; | 705 core.String value; |
748 | 706 |
749 FilterPair(); | 707 FilterPair(); |
750 | 708 |
751 FilterPair.fromJson(core.Map _json) { | 709 FilterPair.fromJson(core.Map _json) { |
752 if (_json.containsKey("type")) { | 710 if (_json.containsKey("type")) { |
753 type = _json["type"]; | 711 type = _json["type"]; |
754 } | 712 } |
755 if (_json.containsKey("value")) { | 713 if (_json.containsKey("value")) { |
756 value = _json["value"]; | 714 value = _json["value"]; |
757 } | 715 } |
758 } | 716 } |
759 | 717 |
760 core.Map<core.String, core.Object> toJson() { | 718 core.Map<core.String, core.Object> toJson() { |
761 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 719 final core.Map<core.String, core.Object> _json = |
| 720 new core.Map<core.String, core.Object>(); |
762 if (type != null) { | 721 if (type != null) { |
763 _json["type"] = type; | 722 _json["type"] = type; |
764 } | 723 } |
765 if (value != null) { | 724 if (value != null) { |
766 _json["value"] = value; | 725 _json["value"] = value; |
767 } | 726 } |
768 return _json; | 727 return _json; |
769 } | 728 } |
770 } | 729 } |
771 | 730 |
772 /** List queries response. */ | 731 /// List queries response. |
773 class ListQueriesResponse { | 732 class ListQueriesResponse { |
774 /** | 733 /// Identifies what kind of resource this is. Value: the fixed string |
775 * Identifies what kind of resource this is. Value: the fixed string | 734 /// "doubleclickbidmanager#listQueriesResponse". |
776 * "doubleclickbidmanager#listQueriesResponse". | |
777 */ | |
778 core.String kind; | 735 core.String kind; |
779 /** Retrieved queries. */ | 736 |
| 737 /// Retrieved queries. |
780 core.List<Query> queries; | 738 core.List<Query> queries; |
781 | 739 |
782 ListQueriesResponse(); | 740 ListQueriesResponse(); |
783 | 741 |
784 ListQueriesResponse.fromJson(core.Map _json) { | 742 ListQueriesResponse.fromJson(core.Map _json) { |
785 if (_json.containsKey("kind")) { | 743 if (_json.containsKey("kind")) { |
786 kind = _json["kind"]; | 744 kind = _json["kind"]; |
787 } | 745 } |
788 if (_json.containsKey("queries")) { | 746 if (_json.containsKey("queries")) { |
789 queries = _json["queries"].map((value) => new Query.fromJson(value)).toLis
t(); | 747 queries = |
| 748 _json["queries"].map((value) => new Query.fromJson(value)).toList(); |
790 } | 749 } |
791 } | 750 } |
792 | 751 |
793 core.Map<core.String, core.Object> toJson() { | 752 core.Map<core.String, core.Object> toJson() { |
794 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 753 final core.Map<core.String, core.Object> _json = |
| 754 new core.Map<core.String, core.Object>(); |
795 if (kind != null) { | 755 if (kind != null) { |
796 _json["kind"] = kind; | 756 _json["kind"] = kind; |
797 } | 757 } |
798 if (queries != null) { | 758 if (queries != null) { |
799 _json["queries"] = queries.map((value) => (value).toJson()).toList(); | 759 _json["queries"] = queries.map((value) => (value).toJson()).toList(); |
800 } | 760 } |
801 return _json; | 761 return _json; |
802 } | 762 } |
803 } | 763 } |
804 | 764 |
805 /** List reports response. */ | 765 /// List reports response. |
806 class ListReportsResponse { | 766 class ListReportsResponse { |
807 /** | 767 /// Identifies what kind of resource this is. Value: the fixed string |
808 * Identifies what kind of resource this is. Value: the fixed string | 768 /// "doubleclickbidmanager#listReportsResponse". |
809 * "doubleclickbidmanager#listReportsResponse". | |
810 */ | |
811 core.String kind; | 769 core.String kind; |
812 /** Retrieved reports. */ | 770 |
| 771 /// Retrieved reports. |
813 core.List<Report> reports; | 772 core.List<Report> reports; |
814 | 773 |
815 ListReportsResponse(); | 774 ListReportsResponse(); |
816 | 775 |
817 ListReportsResponse.fromJson(core.Map _json) { | 776 ListReportsResponse.fromJson(core.Map _json) { |
818 if (_json.containsKey("kind")) { | 777 if (_json.containsKey("kind")) { |
819 kind = _json["kind"]; | 778 kind = _json["kind"]; |
820 } | 779 } |
821 if (_json.containsKey("reports")) { | 780 if (_json.containsKey("reports")) { |
822 reports = _json["reports"].map((value) => new Report.fromJson(value)).toLi
st(); | 781 reports = |
| 782 _json["reports"].map((value) => new Report.fromJson(value)).toList(); |
823 } | 783 } |
824 } | 784 } |
825 | 785 |
826 core.Map<core.String, core.Object> toJson() { | 786 core.Map<core.String, core.Object> toJson() { |
827 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 787 final core.Map<core.String, core.Object> _json = |
| 788 new core.Map<core.String, core.Object>(); |
828 if (kind != null) { | 789 if (kind != null) { |
829 _json["kind"] = kind; | 790 _json["kind"] = kind; |
830 } | 791 } |
831 if (reports != null) { | 792 if (reports != null) { |
832 _json["reports"] = reports.map((value) => (value).toJson()).toList(); | 793 _json["reports"] = reports.map((value) => (value).toJson()).toList(); |
833 } | 794 } |
834 return _json; | 795 return _json; |
835 } | 796 } |
836 } | 797 } |
837 | 798 |
838 /** Parameters of a query or report. */ | 799 /// Parameters of a query or report. |
839 class Parameters { | 800 class Parameters { |
840 /** Filters used to match traffic data in your report. */ | 801 /// Filters used to match traffic data in your report. |
841 core.List<FilterPair> filters; | 802 core.List<FilterPair> filters; |
842 /** Data is grouped by the filters listed in this field. */ | 803 |
| 804 /// Data is grouped by the filters listed in this field. |
843 core.List<core.String> groupBys; | 805 core.List<core.String> groupBys; |
844 /** Whether to include data from Invite Media. */ | 806 |
| 807 /// Whether to include data from Invite Media. |
845 core.bool includeInviteData; | 808 core.bool includeInviteData; |
846 /** Metrics to include as columns in your report. */ | 809 |
| 810 /// Metrics to include as columns in your report. |
847 core.List<core.String> metrics; | 811 core.List<core.String> metrics; |
848 /** | 812 |
849 * Report type. | 813 /// Report type. |
850 * Possible string values are: | 814 /// Possible string values are: |
851 * - "TYPE_ACTIVE_GRP" | 815 /// - "TYPE_ACTIVE_GRP" |
852 * - "TYPE_AUDIENCE_COMPOSITION" | 816 /// - "TYPE_AUDIENCE_COMPOSITION" |
853 * - "TYPE_AUDIENCE_PERFORMANCE" | 817 /// - "TYPE_AUDIENCE_PERFORMANCE" |
854 * - "TYPE_CLIENT_SAFE" | 818 /// - "TYPE_CLIENT_SAFE" |
855 * - "TYPE_COMSCORE_VCE" | 819 /// - "TYPE_COMSCORE_VCE" |
856 * - "TYPE_CROSS_FEE" | 820 /// - "TYPE_CROSS_FEE" |
857 * - "TYPE_CROSS_PARTNER" | 821 /// - "TYPE_CROSS_PARTNER" |
858 * - "TYPE_CROSS_PARTNER_THIRD_PARTY_DATA_PROVIDER" | 822 /// - "TYPE_CROSS_PARTNER_THIRD_PARTY_DATA_PROVIDER" |
859 * - "TYPE_ESTIMATED_CONVERSION" | 823 /// - "TYPE_ESTIMATED_CONVERSION" |
860 * - "TYPE_FEE" | 824 /// - "TYPE_FEE" |
861 * - "TYPE_GENERAL" | 825 /// - "TYPE_GENERAL" |
862 * - "TYPE_INVENTORY_AVAILABILITY" | 826 /// - "TYPE_INVENTORY_AVAILABILITY" |
863 * - "TYPE_KEYWORD" | 827 /// - "TYPE_KEYWORD" |
864 * - "TYPE_NIELSEN_AUDIENCE_PROFILE" | 828 /// - "TYPE_NIELSEN_AUDIENCE_PROFILE" |
865 * - "TYPE_NIELSEN_DAILY_REACH_BUILD" | 829 /// - "TYPE_NIELSEN_DAILY_REACH_BUILD" |
866 * - "TYPE_NIELSEN_ONLINE_GLOBAL_MARKET" | 830 /// - "TYPE_NIELSEN_ONLINE_GLOBAL_MARKET" |
867 * - "TYPE_NIELSEN_SITE" | 831 /// - "TYPE_NIELSEN_SITE" |
868 * - "TYPE_NOT_SUPPORTED" | 832 /// - "TYPE_NOT_SUPPORTED" |
869 * - "TYPE_ORDER_ID" | 833 /// - "TYPE_ORDER_ID" |
870 * - "TYPE_PAGE_CATEGORY" | 834 /// - "TYPE_PAGE_CATEGORY" |
871 * - "TYPE_PETRA_NIELSEN_AUDIENCE_PROFILE" | 835 /// - "TYPE_PETRA_NIELSEN_AUDIENCE_PROFILE" |
872 * - "TYPE_PETRA_NIELSEN_DAILY_REACH_BUILD" | 836 /// - "TYPE_PETRA_NIELSEN_DAILY_REACH_BUILD" |
873 * - "TYPE_PETRA_NIELSEN_ONLINE_GLOBAL_MARKET" | 837 /// - "TYPE_PETRA_NIELSEN_ONLINE_GLOBAL_MARKET" |
874 * - "TYPE_PIXEL_LOAD" | 838 /// - "TYPE_PIXEL_LOAD" |
875 * - "TYPE_REACH_AND_FREQUENCY" | 839 /// - "TYPE_REACH_AND_FREQUENCY" |
876 * - "TYPE_REACH_AUDIENCE" | 840 /// - "TYPE_REACH_AUDIENCE" |
877 * - "TYPE_THIRD_PARTY_DATA_PROVIDER" | 841 /// - "TYPE_THIRD_PARTY_DATA_PROVIDER" |
878 * - "TYPE_TRUEVIEW" | 842 /// - "TYPE_TRUEVIEW" |
879 * - "TYPE_TRUEVIEW_IAR" | 843 /// - "TYPE_TRUEVIEW_IAR" |
880 * - "TYPE_VERIFICATION" | 844 /// - "TYPE_VERIFICATION" |
881 * - "TYPE_YOUTUBE_VERTICAL" | 845 /// - "TYPE_YOUTUBE_VERTICAL" |
882 */ | |
883 core.String type; | 846 core.String type; |
884 | 847 |
885 Parameters(); | 848 Parameters(); |
886 | 849 |
887 Parameters.fromJson(core.Map _json) { | 850 Parameters.fromJson(core.Map _json) { |
888 if (_json.containsKey("filters")) { | 851 if (_json.containsKey("filters")) { |
889 filters = _json["filters"].map((value) => new FilterPair.fromJson(value)).
toList(); | 852 filters = _json["filters"] |
| 853 .map((value) => new FilterPair.fromJson(value)) |
| 854 .toList(); |
890 } | 855 } |
891 if (_json.containsKey("groupBys")) { | 856 if (_json.containsKey("groupBys")) { |
892 groupBys = _json["groupBys"]; | 857 groupBys = _json["groupBys"]; |
893 } | 858 } |
894 if (_json.containsKey("includeInviteData")) { | 859 if (_json.containsKey("includeInviteData")) { |
895 includeInviteData = _json["includeInviteData"]; | 860 includeInviteData = _json["includeInviteData"]; |
896 } | 861 } |
897 if (_json.containsKey("metrics")) { | 862 if (_json.containsKey("metrics")) { |
898 metrics = _json["metrics"]; | 863 metrics = _json["metrics"]; |
899 } | 864 } |
900 if (_json.containsKey("type")) { | 865 if (_json.containsKey("type")) { |
901 type = _json["type"]; | 866 type = _json["type"]; |
902 } | 867 } |
903 } | 868 } |
904 | 869 |
905 core.Map<core.String, core.Object> toJson() { | 870 core.Map<core.String, core.Object> toJson() { |
906 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 871 final core.Map<core.String, core.Object> _json = |
| 872 new core.Map<core.String, core.Object>(); |
907 if (filters != null) { | 873 if (filters != null) { |
908 _json["filters"] = filters.map((value) => (value).toJson()).toList(); | 874 _json["filters"] = filters.map((value) => (value).toJson()).toList(); |
909 } | 875 } |
910 if (groupBys != null) { | 876 if (groupBys != null) { |
911 _json["groupBys"] = groupBys; | 877 _json["groupBys"] = groupBys; |
912 } | 878 } |
913 if (includeInviteData != null) { | 879 if (includeInviteData != null) { |
914 _json["includeInviteData"] = includeInviteData; | 880 _json["includeInviteData"] = includeInviteData; |
915 } | 881 } |
916 if (metrics != null) { | 882 if (metrics != null) { |
917 _json["metrics"] = metrics; | 883 _json["metrics"] = metrics; |
918 } | 884 } |
919 if (type != null) { | 885 if (type != null) { |
920 _json["type"] = type; | 886 _json["type"] = type; |
921 } | 887 } |
922 return _json; | 888 return _json; |
923 } | 889 } |
924 } | 890 } |
925 | 891 |
926 /** Represents a query. */ | 892 /// Represents a query. |
927 class Query { | 893 class Query { |
928 /** | 894 /// Identifies what kind of resource this is. Value: the fixed string |
929 * Identifies what kind of resource this is. Value: the fixed string | 895 /// "doubleclickbidmanager#query". |
930 * "doubleclickbidmanager#query". | |
931 */ | |
932 core.String kind; | 896 core.String kind; |
933 /** Query metadata. */ | 897 |
| 898 /// Query metadata. |
934 QueryMetadata metadata; | 899 QueryMetadata metadata; |
935 /** Query parameters. */ | 900 |
| 901 /// Query parameters. |
936 Parameters params; | 902 Parameters params; |
937 /** Query ID. */ | 903 |
| 904 /// Query ID. |
938 core.String queryId; | 905 core.String queryId; |
939 /** | 906 |
940 * The ending time for the data that is shown in the report. Note, | 907 /// The ending time for the data that is shown in the report. Note, |
941 * reportDataEndTimeMs is required if metadata.dataRange is CUSTOM_DATES and | 908 /// reportDataEndTimeMs is required if metadata.dataRange is CUSTOM_DATES and |
942 * ignored otherwise. | 909 /// ignored otherwise. |
943 */ | |
944 core.String reportDataEndTimeMs; | 910 core.String reportDataEndTimeMs; |
945 /** | 911 |
946 * The starting time for the data that is shown in the report. Note, | 912 /// The starting time for the data that is shown in the report. Note, |
947 * reportDataStartTimeMs is required if metadata.dataRange is CUSTOM_DATES and | 913 /// reportDataStartTimeMs is required if metadata.dataRange is CUSTOM_DATES |
948 * ignored otherwise. | 914 /// and ignored otherwise. |
949 */ | |
950 core.String reportDataStartTimeMs; | 915 core.String reportDataStartTimeMs; |
951 /** Information on how often and when to run a query. */ | 916 |
| 917 /// Information on how often and when to run a query. |
952 QuerySchedule schedule; | 918 QuerySchedule schedule; |
953 /** | 919 |
954 * Canonical timezone code for report data time. Defaults to America/New_York. | 920 /// Canonical timezone code for report data time. Defaults to |
955 */ | 921 /// America/New_York. |
956 core.String timezoneCode; | 922 core.String timezoneCode; |
957 | 923 |
958 Query(); | 924 Query(); |
959 | 925 |
960 Query.fromJson(core.Map _json) { | 926 Query.fromJson(core.Map _json) { |
961 if (_json.containsKey("kind")) { | 927 if (_json.containsKey("kind")) { |
962 kind = _json["kind"]; | 928 kind = _json["kind"]; |
963 } | 929 } |
964 if (_json.containsKey("metadata")) { | 930 if (_json.containsKey("metadata")) { |
965 metadata = new QueryMetadata.fromJson(_json["metadata"]); | 931 metadata = new QueryMetadata.fromJson(_json["metadata"]); |
(...skipping 12 matching lines...) Expand all Loading... |
978 } | 944 } |
979 if (_json.containsKey("schedule")) { | 945 if (_json.containsKey("schedule")) { |
980 schedule = new QuerySchedule.fromJson(_json["schedule"]); | 946 schedule = new QuerySchedule.fromJson(_json["schedule"]); |
981 } | 947 } |
982 if (_json.containsKey("timezoneCode")) { | 948 if (_json.containsKey("timezoneCode")) { |
983 timezoneCode = _json["timezoneCode"]; | 949 timezoneCode = _json["timezoneCode"]; |
984 } | 950 } |
985 } | 951 } |
986 | 952 |
987 core.Map<core.String, core.Object> toJson() { | 953 core.Map<core.String, core.Object> toJson() { |
988 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 954 final core.Map<core.String, core.Object> _json = |
| 955 new core.Map<core.String, core.Object>(); |
989 if (kind != null) { | 956 if (kind != null) { |
990 _json["kind"] = kind; | 957 _json["kind"] = kind; |
991 } | 958 } |
992 if (metadata != null) { | 959 if (metadata != null) { |
993 _json["metadata"] = (metadata).toJson(); | 960 _json["metadata"] = (metadata).toJson(); |
994 } | 961 } |
995 if (params != null) { | 962 if (params != null) { |
996 _json["params"] = (params).toJson(); | 963 _json["params"] = (params).toJson(); |
997 } | 964 } |
998 if (queryId != null) { | 965 if (queryId != null) { |
999 _json["queryId"] = queryId; | 966 _json["queryId"] = queryId; |
1000 } | 967 } |
1001 if (reportDataEndTimeMs != null) { | 968 if (reportDataEndTimeMs != null) { |
1002 _json["reportDataEndTimeMs"] = reportDataEndTimeMs; | 969 _json["reportDataEndTimeMs"] = reportDataEndTimeMs; |
1003 } | 970 } |
1004 if (reportDataStartTimeMs != null) { | 971 if (reportDataStartTimeMs != null) { |
1005 _json["reportDataStartTimeMs"] = reportDataStartTimeMs; | 972 _json["reportDataStartTimeMs"] = reportDataStartTimeMs; |
1006 } | 973 } |
1007 if (schedule != null) { | 974 if (schedule != null) { |
1008 _json["schedule"] = (schedule).toJson(); | 975 _json["schedule"] = (schedule).toJson(); |
1009 } | 976 } |
1010 if (timezoneCode != null) { | 977 if (timezoneCode != null) { |
1011 _json["timezoneCode"] = timezoneCode; | 978 _json["timezoneCode"] = timezoneCode; |
1012 } | 979 } |
1013 return _json; | 980 return _json; |
1014 } | 981 } |
1015 } | 982 } |
1016 | 983 |
1017 /** Query metadata. */ | 984 /// Query metadata. |
1018 class QueryMetadata { | 985 class QueryMetadata { |
1019 /** | 986 /// Range of report data. |
1020 * Range of report data. | 987 /// Possible string values are: |
1021 * Possible string values are: | 988 /// - "ALL_TIME" |
1022 * - "ALL_TIME" | 989 /// - "CURRENT_DAY" |
1023 * - "CURRENT_DAY" | 990 /// - "CUSTOM_DATES" |
1024 * - "CUSTOM_DATES" | 991 /// - "LAST_14_DAYS" |
1025 * - "LAST_14_DAYS" | 992 /// - "LAST_30_DAYS" |
1026 * - "LAST_30_DAYS" | 993 /// - "LAST_365_DAYS" |
1027 * - "LAST_365_DAYS" | 994 /// - "LAST_7_DAYS" |
1028 * - "LAST_7_DAYS" | 995 /// - "LAST_90_DAYS" |
1029 * - "LAST_90_DAYS" | 996 /// - "MONTH_TO_DATE" |
1030 * - "MONTH_TO_DATE" | 997 /// - "PREVIOUS_DAY" |
1031 * - "PREVIOUS_DAY" | 998 /// - "PREVIOUS_HALF_MONTH" |
1032 * - "PREVIOUS_HALF_MONTH" | 999 /// - "PREVIOUS_MONTH" |
1033 * - "PREVIOUS_MONTH" | 1000 /// - "PREVIOUS_QUARTER" |
1034 * - "PREVIOUS_QUARTER" | 1001 /// - "PREVIOUS_WEEK" |
1035 * - "PREVIOUS_WEEK" | 1002 /// - "PREVIOUS_YEAR" |
1036 * - "PREVIOUS_YEAR" | 1003 /// - "QUARTER_TO_DATE" |
1037 * - "QUARTER_TO_DATE" | 1004 /// - "TYPE_NOT_SUPPORTED" |
1038 * - "TYPE_NOT_SUPPORTED" | 1005 /// - "WEEK_TO_DATE" |
1039 * - "WEEK_TO_DATE" | 1006 /// - "YEAR_TO_DATE" |
1040 * - "YEAR_TO_DATE" | |
1041 */ | |
1042 core.String dataRange; | 1007 core.String dataRange; |
1043 /** | 1008 |
1044 * Format of the generated report. | 1009 /// Format of the generated report. |
1045 * Possible string values are: | 1010 /// Possible string values are: |
1046 * - "CSV" | 1011 /// - "CSV" |
1047 * - "EXCEL_CSV" | 1012 /// - "EXCEL_CSV" |
1048 * - "XLSX" | 1013 /// - "XLSX" |
1049 */ | |
1050 core.String format; | 1014 core.String format; |
1051 /** | 1015 |
1052 * The path to the location in Google Cloud Storage where the latest report is | 1016 /// The path to the location in Google Cloud Storage where the latest report |
1053 * stored. | 1017 /// is stored. |
1054 */ | |
1055 core.String googleCloudStoragePathForLatestReport; | 1018 core.String googleCloudStoragePathForLatestReport; |
1056 /** The path in Google Drive for the latest report. */ | 1019 |
| 1020 /// The path in Google Drive for the latest report. |
1057 core.String googleDrivePathForLatestReport; | 1021 core.String googleDrivePathForLatestReport; |
1058 /** The time when the latest report started to run. */ | 1022 |
| 1023 /// The time when the latest report started to run. |
1059 core.String latestReportRunTimeMs; | 1024 core.String latestReportRunTimeMs; |
1060 /** | 1025 |
1061 * Locale of the generated reports. Valid values are cs CZECH de GERMAN en | 1026 /// Locale of the generated reports. Valid values are cs CZECH de GERMAN en |
1062 * ENGLISH es SPANISH fr FRENCH it ITALIAN ja JAPANESE ko KOREAN pl POLISH | 1027 /// ENGLISH es SPANISH fr FRENCH it ITALIAN ja JAPANESE ko KOREAN pl POLISH |
1063 * pt-BR BRAZILIAN_PORTUGUESE ru RUSSIAN tr TURKISH uk UKRAINIAN zh-CN | 1028 /// pt-BR BRAZILIAN_PORTUGUESE ru RUSSIAN tr TURKISH uk UKRAINIAN zh-CN |
1064 * CHINA_CHINESE zh-TW TAIWAN_CHINESE | 1029 /// CHINA_CHINESE zh-TW TAIWAN_CHINESE |
1065 * | 1030 /// |
1066 * An locale string not in the list above will generate reports in English. | 1031 /// An locale string not in the list above will generate reports in English. |
1067 */ | |
1068 core.String locale; | 1032 core.String locale; |
1069 /** Number of reports that have been generated for the query. */ | 1033 |
| 1034 /// Number of reports that have been generated for the query. |
1070 core.int reportCount; | 1035 core.int reportCount; |
1071 /** Whether the latest report is currently running. */ | 1036 |
| 1037 /// Whether the latest report is currently running. |
1072 core.bool running; | 1038 core.bool running; |
1073 /** | 1039 |
1074 * Whether to send an email notification when a report is ready. Default to | 1040 /// Whether to send an email notification when a report is ready. Default to |
1075 * false. | 1041 /// false. |
1076 */ | |
1077 core.bool sendNotification; | 1042 core.bool sendNotification; |
1078 /** | 1043 |
1079 * List of email addresses which are sent email notifications when the report | 1044 /// List of email addresses which are sent email notifications when the |
1080 * is finished. Separate from sendNotification. | 1045 /// report is finished. Separate from sendNotification. |
1081 */ | |
1082 core.List<core.String> shareEmailAddress; | 1046 core.List<core.String> shareEmailAddress; |
1083 /** Query title. It is used to name the reports generated from this query. */ | 1047 |
| 1048 /// Query title. It is used to name the reports generated from this query. |
1084 core.String title; | 1049 core.String title; |
1085 | 1050 |
1086 QueryMetadata(); | 1051 QueryMetadata(); |
1087 | 1052 |
1088 QueryMetadata.fromJson(core.Map _json) { | 1053 QueryMetadata.fromJson(core.Map _json) { |
1089 if (_json.containsKey("dataRange")) { | 1054 if (_json.containsKey("dataRange")) { |
1090 dataRange = _json["dataRange"]; | 1055 dataRange = _json["dataRange"]; |
1091 } | 1056 } |
1092 if (_json.containsKey("format")) { | 1057 if (_json.containsKey("format")) { |
1093 format = _json["format"]; | 1058 format = _json["format"]; |
1094 } | 1059 } |
1095 if (_json.containsKey("googleCloudStoragePathForLatestReport")) { | 1060 if (_json.containsKey("googleCloudStoragePathForLatestReport")) { |
1096 googleCloudStoragePathForLatestReport = _json["googleCloudStoragePathForLa
testReport"]; | 1061 googleCloudStoragePathForLatestReport = |
| 1062 _json["googleCloudStoragePathForLatestReport"]; |
1097 } | 1063 } |
1098 if (_json.containsKey("googleDrivePathForLatestReport")) { | 1064 if (_json.containsKey("googleDrivePathForLatestReport")) { |
1099 googleDrivePathForLatestReport = _json["googleDrivePathForLatestReport"]; | 1065 googleDrivePathForLatestReport = _json["googleDrivePathForLatestReport"]; |
1100 } | 1066 } |
1101 if (_json.containsKey("latestReportRunTimeMs")) { | 1067 if (_json.containsKey("latestReportRunTimeMs")) { |
1102 latestReportRunTimeMs = _json["latestReportRunTimeMs"]; | 1068 latestReportRunTimeMs = _json["latestReportRunTimeMs"]; |
1103 } | 1069 } |
1104 if (_json.containsKey("locale")) { | 1070 if (_json.containsKey("locale")) { |
1105 locale = _json["locale"]; | 1071 locale = _json["locale"]; |
1106 } | 1072 } |
1107 if (_json.containsKey("reportCount")) { | 1073 if (_json.containsKey("reportCount")) { |
1108 reportCount = _json["reportCount"]; | 1074 reportCount = _json["reportCount"]; |
1109 } | 1075 } |
1110 if (_json.containsKey("running")) { | 1076 if (_json.containsKey("running")) { |
1111 running = _json["running"]; | 1077 running = _json["running"]; |
1112 } | 1078 } |
1113 if (_json.containsKey("sendNotification")) { | 1079 if (_json.containsKey("sendNotification")) { |
1114 sendNotification = _json["sendNotification"]; | 1080 sendNotification = _json["sendNotification"]; |
1115 } | 1081 } |
1116 if (_json.containsKey("shareEmailAddress")) { | 1082 if (_json.containsKey("shareEmailAddress")) { |
1117 shareEmailAddress = _json["shareEmailAddress"]; | 1083 shareEmailAddress = _json["shareEmailAddress"]; |
1118 } | 1084 } |
1119 if (_json.containsKey("title")) { | 1085 if (_json.containsKey("title")) { |
1120 title = _json["title"]; | 1086 title = _json["title"]; |
1121 } | 1087 } |
1122 } | 1088 } |
1123 | 1089 |
1124 core.Map<core.String, core.Object> toJson() { | 1090 core.Map<core.String, core.Object> toJson() { |
1125 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1091 final core.Map<core.String, core.Object> _json = |
| 1092 new core.Map<core.String, core.Object>(); |
1126 if (dataRange != null) { | 1093 if (dataRange != null) { |
1127 _json["dataRange"] = dataRange; | 1094 _json["dataRange"] = dataRange; |
1128 } | 1095 } |
1129 if (format != null) { | 1096 if (format != null) { |
1130 _json["format"] = format; | 1097 _json["format"] = format; |
1131 } | 1098 } |
1132 if (googleCloudStoragePathForLatestReport != null) { | 1099 if (googleCloudStoragePathForLatestReport != null) { |
1133 _json["googleCloudStoragePathForLatestReport"] = googleCloudStoragePathFor
LatestReport; | 1100 _json["googleCloudStoragePathForLatestReport"] = |
| 1101 googleCloudStoragePathForLatestReport; |
1134 } | 1102 } |
1135 if (googleDrivePathForLatestReport != null) { | 1103 if (googleDrivePathForLatestReport != null) { |
1136 _json["googleDrivePathForLatestReport"] = googleDrivePathForLatestReport; | 1104 _json["googleDrivePathForLatestReport"] = googleDrivePathForLatestReport; |
1137 } | 1105 } |
1138 if (latestReportRunTimeMs != null) { | 1106 if (latestReportRunTimeMs != null) { |
1139 _json["latestReportRunTimeMs"] = latestReportRunTimeMs; | 1107 _json["latestReportRunTimeMs"] = latestReportRunTimeMs; |
1140 } | 1108 } |
1141 if (locale != null) { | 1109 if (locale != null) { |
1142 _json["locale"] = locale; | 1110 _json["locale"] = locale; |
1143 } | 1111 } |
1144 if (reportCount != null) { | 1112 if (reportCount != null) { |
1145 _json["reportCount"] = reportCount; | 1113 _json["reportCount"] = reportCount; |
1146 } | 1114 } |
1147 if (running != null) { | 1115 if (running != null) { |
1148 _json["running"] = running; | 1116 _json["running"] = running; |
1149 } | 1117 } |
1150 if (sendNotification != null) { | 1118 if (sendNotification != null) { |
1151 _json["sendNotification"] = sendNotification; | 1119 _json["sendNotification"] = sendNotification; |
1152 } | 1120 } |
1153 if (shareEmailAddress != null) { | 1121 if (shareEmailAddress != null) { |
1154 _json["shareEmailAddress"] = shareEmailAddress; | 1122 _json["shareEmailAddress"] = shareEmailAddress; |
1155 } | 1123 } |
1156 if (title != null) { | 1124 if (title != null) { |
1157 _json["title"] = title; | 1125 _json["title"] = title; |
1158 } | 1126 } |
1159 return _json; | 1127 return _json; |
1160 } | 1128 } |
1161 } | 1129 } |
1162 | 1130 |
1163 /** Information on how frequently and when to run a query. */ | 1131 /// Information on how frequently and when to run a query. |
1164 class QuerySchedule { | 1132 class QuerySchedule { |
1165 /** Datetime to periodically run the query until. */ | 1133 /// Datetime to periodically run the query until. |
1166 core.String endTimeMs; | 1134 core.String endTimeMs; |
1167 /** | 1135 |
1168 * How often the query is run. | 1136 /// How often the query is run. |
1169 * Possible string values are: | 1137 /// Possible string values are: |
1170 * - "DAILY" | 1138 /// - "DAILY" |
1171 * - "MONTHLY" | 1139 /// - "MONTHLY" |
1172 * - "ONE_TIME" | 1140 /// - "ONE_TIME" |
1173 * - "QUARTERLY" | 1141 /// - "QUARTERLY" |
1174 * - "SEMI_MONTHLY" | 1142 /// - "SEMI_MONTHLY" |
1175 * - "WEEKLY" | 1143 /// - "WEEKLY" |
1176 */ | |
1177 core.String frequency; | 1144 core.String frequency; |
1178 /** | 1145 |
1179 * Time of day at which a new report will be generated, represented as minutes | 1146 /// Time of day at which a new report will be generated, represented as |
1180 * past midnight. Range is 0 to 1439. Only applies to scheduled reports. | 1147 /// minutes past midnight. Range is 0 to 1439. Only applies to scheduled |
1181 */ | 1148 /// reports. |
1182 core.int nextRunMinuteOfDay; | 1149 core.int nextRunMinuteOfDay; |
1183 /** | 1150 |
1184 * Canonical timezone code for report generation time. Defaults to | 1151 /// Canonical timezone code for report generation time. Defaults to |
1185 * America/New_York. | 1152 /// America/New_York. |
1186 */ | |
1187 core.String nextRunTimezoneCode; | 1153 core.String nextRunTimezoneCode; |
1188 | 1154 |
1189 QuerySchedule(); | 1155 QuerySchedule(); |
1190 | 1156 |
1191 QuerySchedule.fromJson(core.Map _json) { | 1157 QuerySchedule.fromJson(core.Map _json) { |
1192 if (_json.containsKey("endTimeMs")) { | 1158 if (_json.containsKey("endTimeMs")) { |
1193 endTimeMs = _json["endTimeMs"]; | 1159 endTimeMs = _json["endTimeMs"]; |
1194 } | 1160 } |
1195 if (_json.containsKey("frequency")) { | 1161 if (_json.containsKey("frequency")) { |
1196 frequency = _json["frequency"]; | 1162 frequency = _json["frequency"]; |
1197 } | 1163 } |
1198 if (_json.containsKey("nextRunMinuteOfDay")) { | 1164 if (_json.containsKey("nextRunMinuteOfDay")) { |
1199 nextRunMinuteOfDay = _json["nextRunMinuteOfDay"]; | 1165 nextRunMinuteOfDay = _json["nextRunMinuteOfDay"]; |
1200 } | 1166 } |
1201 if (_json.containsKey("nextRunTimezoneCode")) { | 1167 if (_json.containsKey("nextRunTimezoneCode")) { |
1202 nextRunTimezoneCode = _json["nextRunTimezoneCode"]; | 1168 nextRunTimezoneCode = _json["nextRunTimezoneCode"]; |
1203 } | 1169 } |
1204 } | 1170 } |
1205 | 1171 |
1206 core.Map<core.String, core.Object> toJson() { | 1172 core.Map<core.String, core.Object> toJson() { |
1207 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1173 final core.Map<core.String, core.Object> _json = |
| 1174 new core.Map<core.String, core.Object>(); |
1208 if (endTimeMs != null) { | 1175 if (endTimeMs != null) { |
1209 _json["endTimeMs"] = endTimeMs; | 1176 _json["endTimeMs"] = endTimeMs; |
1210 } | 1177 } |
1211 if (frequency != null) { | 1178 if (frequency != null) { |
1212 _json["frequency"] = frequency; | 1179 _json["frequency"] = frequency; |
1213 } | 1180 } |
1214 if (nextRunMinuteOfDay != null) { | 1181 if (nextRunMinuteOfDay != null) { |
1215 _json["nextRunMinuteOfDay"] = nextRunMinuteOfDay; | 1182 _json["nextRunMinuteOfDay"] = nextRunMinuteOfDay; |
1216 } | 1183 } |
1217 if (nextRunTimezoneCode != null) { | 1184 if (nextRunTimezoneCode != null) { |
1218 _json["nextRunTimezoneCode"] = nextRunTimezoneCode; | 1185 _json["nextRunTimezoneCode"] = nextRunTimezoneCode; |
1219 } | 1186 } |
1220 return _json; | 1187 return _json; |
1221 } | 1188 } |
1222 } | 1189 } |
1223 | 1190 |
1224 /** Represents a report. */ | 1191 /// Represents a report. |
1225 class Report { | 1192 class Report { |
1226 /** Key used to identify a report. */ | 1193 /// Key used to identify a report. |
1227 ReportKey key; | 1194 ReportKey key; |
1228 /** Report metadata. */ | 1195 |
| 1196 /// Report metadata. |
1229 ReportMetadata metadata; | 1197 ReportMetadata metadata; |
1230 /** Report parameters. */ | 1198 |
| 1199 /// Report parameters. |
1231 Parameters params; | 1200 Parameters params; |
1232 | 1201 |
1233 Report(); | 1202 Report(); |
1234 | 1203 |
1235 Report.fromJson(core.Map _json) { | 1204 Report.fromJson(core.Map _json) { |
1236 if (_json.containsKey("key")) { | 1205 if (_json.containsKey("key")) { |
1237 key = new ReportKey.fromJson(_json["key"]); | 1206 key = new ReportKey.fromJson(_json["key"]); |
1238 } | 1207 } |
1239 if (_json.containsKey("metadata")) { | 1208 if (_json.containsKey("metadata")) { |
1240 metadata = new ReportMetadata.fromJson(_json["metadata"]); | 1209 metadata = new ReportMetadata.fromJson(_json["metadata"]); |
1241 } | 1210 } |
1242 if (_json.containsKey("params")) { | 1211 if (_json.containsKey("params")) { |
1243 params = new Parameters.fromJson(_json["params"]); | 1212 params = new Parameters.fromJson(_json["params"]); |
1244 } | 1213 } |
1245 } | 1214 } |
1246 | 1215 |
1247 core.Map<core.String, core.Object> toJson() { | 1216 core.Map<core.String, core.Object> toJson() { |
1248 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1217 final core.Map<core.String, core.Object> _json = |
| 1218 new core.Map<core.String, core.Object>(); |
1249 if (key != null) { | 1219 if (key != null) { |
1250 _json["key"] = (key).toJson(); | 1220 _json["key"] = (key).toJson(); |
1251 } | 1221 } |
1252 if (metadata != null) { | 1222 if (metadata != null) { |
1253 _json["metadata"] = (metadata).toJson(); | 1223 _json["metadata"] = (metadata).toJson(); |
1254 } | 1224 } |
1255 if (params != null) { | 1225 if (params != null) { |
1256 _json["params"] = (params).toJson(); | 1226 _json["params"] = (params).toJson(); |
1257 } | 1227 } |
1258 return _json; | 1228 return _json; |
1259 } | 1229 } |
1260 } | 1230 } |
1261 | 1231 |
1262 /** An explanation of a report failure. */ | 1232 /// An explanation of a report failure. |
1263 class ReportFailure { | 1233 class ReportFailure { |
1264 /** | 1234 /// Error code that shows why the report was not created. |
1265 * Error code that shows why the report was not created. | 1235 /// Possible string values are: |
1266 * Possible string values are: | 1236 /// - "AUTHENTICATION_ERROR" |
1267 * - "AUTHENTICATION_ERROR" | 1237 /// - "DEPRECATED_REPORTING_INVALID_QUERY" |
1268 * - "DEPRECATED_REPORTING_INVALID_QUERY" | 1238 /// - "REPORTING_BUCKET_NOT_FOUND" |
1269 * - "REPORTING_BUCKET_NOT_FOUND" | 1239 /// - "REPORTING_CREATE_BUCKET_FAILED" |
1270 * - "REPORTING_CREATE_BUCKET_FAILED" | 1240 /// - "REPORTING_DELETE_BUCKET_FAILED" |
1271 * - "REPORTING_DELETE_BUCKET_FAILED" | 1241 /// - "REPORTING_FATAL_ERROR" |
1272 * - "REPORTING_FATAL_ERROR" | 1242 /// - "REPORTING_ILLEGAL_FILENAME" |
1273 * - "REPORTING_ILLEGAL_FILENAME" | 1243 /// - "REPORTING_IMCOMPATIBLE_METRICS" |
1274 * - "REPORTING_IMCOMPATIBLE_METRICS" | 1244 /// - "REPORTING_INVALID_QUERY_MISSING_PARTNER_AND_ADVERTISER_FILTERS" |
1275 * - "REPORTING_INVALID_QUERY_MISSING_PARTNER_AND_ADVERTISER_FILTERS" | 1245 /// - "REPORTING_INVALID_QUERY_TITLE_MISSING" |
1276 * - "REPORTING_INVALID_QUERY_TITLE_MISSING" | 1246 /// - "REPORTING_INVALID_QUERY_TOO_MANY_UNFILTERED_LARGE_GROUP_BYS" |
1277 * - "REPORTING_INVALID_QUERY_TOO_MANY_UNFILTERED_LARGE_GROUP_BYS" | 1247 /// - "REPORTING_QUERY_NOT_FOUND" |
1278 * - "REPORTING_QUERY_NOT_FOUND" | 1248 /// - "REPORTING_TRANSIENT_ERROR" |
1279 * - "REPORTING_TRANSIENT_ERROR" | 1249 /// - "REPORTING_UPDATE_BUCKET_PERMISSION_FAILED" |
1280 * - "REPORTING_UPDATE_BUCKET_PERMISSION_FAILED" | 1250 /// - "REPORTING_WRITE_BUCKET_OBJECT_FAILED" |
1281 * - "REPORTING_WRITE_BUCKET_OBJECT_FAILED" | 1251 /// - "SERVER_ERROR" |
1282 * - "SERVER_ERROR" | 1252 /// - "UNAUTHORIZED_API_ACCESS" |
1283 * - "UNAUTHORIZED_API_ACCESS" | 1253 /// - "VALIDATION_ERROR" |
1284 * - "VALIDATION_ERROR" | |
1285 */ | |
1286 core.String errorCode; | 1254 core.String errorCode; |
1287 | 1255 |
1288 ReportFailure(); | 1256 ReportFailure(); |
1289 | 1257 |
1290 ReportFailure.fromJson(core.Map _json) { | 1258 ReportFailure.fromJson(core.Map _json) { |
1291 if (_json.containsKey("errorCode")) { | 1259 if (_json.containsKey("errorCode")) { |
1292 errorCode = _json["errorCode"]; | 1260 errorCode = _json["errorCode"]; |
1293 } | 1261 } |
1294 } | 1262 } |
1295 | 1263 |
1296 core.Map<core.String, core.Object> toJson() { | 1264 core.Map<core.String, core.Object> toJson() { |
1297 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1265 final core.Map<core.String, core.Object> _json = |
| 1266 new core.Map<core.String, core.Object>(); |
1298 if (errorCode != null) { | 1267 if (errorCode != null) { |
1299 _json["errorCode"] = errorCode; | 1268 _json["errorCode"] = errorCode; |
1300 } | 1269 } |
1301 return _json; | 1270 return _json; |
1302 } | 1271 } |
1303 } | 1272 } |
1304 | 1273 |
1305 /** Key used to identify a report. */ | 1274 /// Key used to identify a report. |
1306 class ReportKey { | 1275 class ReportKey { |
1307 /** Query ID. */ | 1276 /// Query ID. |
1308 core.String queryId; | 1277 core.String queryId; |
1309 /** Report ID. */ | 1278 |
| 1279 /// Report ID. |
1310 core.String reportId; | 1280 core.String reportId; |
1311 | 1281 |
1312 ReportKey(); | 1282 ReportKey(); |
1313 | 1283 |
1314 ReportKey.fromJson(core.Map _json) { | 1284 ReportKey.fromJson(core.Map _json) { |
1315 if (_json.containsKey("queryId")) { | 1285 if (_json.containsKey("queryId")) { |
1316 queryId = _json["queryId"]; | 1286 queryId = _json["queryId"]; |
1317 } | 1287 } |
1318 if (_json.containsKey("reportId")) { | 1288 if (_json.containsKey("reportId")) { |
1319 reportId = _json["reportId"]; | 1289 reportId = _json["reportId"]; |
1320 } | 1290 } |
1321 } | 1291 } |
1322 | 1292 |
1323 core.Map<core.String, core.Object> toJson() { | 1293 core.Map<core.String, core.Object> toJson() { |
1324 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1294 final core.Map<core.String, core.Object> _json = |
| 1295 new core.Map<core.String, core.Object>(); |
1325 if (queryId != null) { | 1296 if (queryId != null) { |
1326 _json["queryId"] = queryId; | 1297 _json["queryId"] = queryId; |
1327 } | 1298 } |
1328 if (reportId != null) { | 1299 if (reportId != null) { |
1329 _json["reportId"] = reportId; | 1300 _json["reportId"] = reportId; |
1330 } | 1301 } |
1331 return _json; | 1302 return _json; |
1332 } | 1303 } |
1333 } | 1304 } |
1334 | 1305 |
1335 /** Report metadata. */ | 1306 /// Report metadata. |
1336 class ReportMetadata { | 1307 class ReportMetadata { |
1337 /** | 1308 /// The path to the location in Google Cloud Storage where the report is |
1338 * The path to the location in Google Cloud Storage where the report is | 1309 /// stored. |
1339 * stored. | |
1340 */ | |
1341 core.String googleCloudStoragePath; | 1310 core.String googleCloudStoragePath; |
1342 /** The ending time for the data that is shown in the report. */ | 1311 |
| 1312 /// The ending time for the data that is shown in the report. |
1343 core.String reportDataEndTimeMs; | 1313 core.String reportDataEndTimeMs; |
1344 /** The starting time for the data that is shown in the report. */ | 1314 |
| 1315 /// The starting time for the data that is shown in the report. |
1345 core.String reportDataStartTimeMs; | 1316 core.String reportDataStartTimeMs; |
1346 /** Report status. */ | 1317 |
| 1318 /// Report status. |
1347 ReportStatus status; | 1319 ReportStatus status; |
1348 | 1320 |
1349 ReportMetadata(); | 1321 ReportMetadata(); |
1350 | 1322 |
1351 ReportMetadata.fromJson(core.Map _json) { | 1323 ReportMetadata.fromJson(core.Map _json) { |
1352 if (_json.containsKey("googleCloudStoragePath")) { | 1324 if (_json.containsKey("googleCloudStoragePath")) { |
1353 googleCloudStoragePath = _json["googleCloudStoragePath"]; | 1325 googleCloudStoragePath = _json["googleCloudStoragePath"]; |
1354 } | 1326 } |
1355 if (_json.containsKey("reportDataEndTimeMs")) { | 1327 if (_json.containsKey("reportDataEndTimeMs")) { |
1356 reportDataEndTimeMs = _json["reportDataEndTimeMs"]; | 1328 reportDataEndTimeMs = _json["reportDataEndTimeMs"]; |
1357 } | 1329 } |
1358 if (_json.containsKey("reportDataStartTimeMs")) { | 1330 if (_json.containsKey("reportDataStartTimeMs")) { |
1359 reportDataStartTimeMs = _json["reportDataStartTimeMs"]; | 1331 reportDataStartTimeMs = _json["reportDataStartTimeMs"]; |
1360 } | 1332 } |
1361 if (_json.containsKey("status")) { | 1333 if (_json.containsKey("status")) { |
1362 status = new ReportStatus.fromJson(_json["status"]); | 1334 status = new ReportStatus.fromJson(_json["status"]); |
1363 } | 1335 } |
1364 } | 1336 } |
1365 | 1337 |
1366 core.Map<core.String, core.Object> toJson() { | 1338 core.Map<core.String, core.Object> toJson() { |
1367 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1339 final core.Map<core.String, core.Object> _json = |
| 1340 new core.Map<core.String, core.Object>(); |
1368 if (googleCloudStoragePath != null) { | 1341 if (googleCloudStoragePath != null) { |
1369 _json["googleCloudStoragePath"] = googleCloudStoragePath; | 1342 _json["googleCloudStoragePath"] = googleCloudStoragePath; |
1370 } | 1343 } |
1371 if (reportDataEndTimeMs != null) { | 1344 if (reportDataEndTimeMs != null) { |
1372 _json["reportDataEndTimeMs"] = reportDataEndTimeMs; | 1345 _json["reportDataEndTimeMs"] = reportDataEndTimeMs; |
1373 } | 1346 } |
1374 if (reportDataStartTimeMs != null) { | 1347 if (reportDataStartTimeMs != null) { |
1375 _json["reportDataStartTimeMs"] = reportDataStartTimeMs; | 1348 _json["reportDataStartTimeMs"] = reportDataStartTimeMs; |
1376 } | 1349 } |
1377 if (status != null) { | 1350 if (status != null) { |
1378 _json["status"] = (status).toJson(); | 1351 _json["status"] = (status).toJson(); |
1379 } | 1352 } |
1380 return _json; | 1353 return _json; |
1381 } | 1354 } |
1382 } | 1355 } |
1383 | 1356 |
1384 /** Report status. */ | 1357 /// Report status. |
1385 class ReportStatus { | 1358 class ReportStatus { |
1386 /** If the report failed, this records the cause. */ | 1359 /// If the report failed, this records the cause. |
1387 ReportFailure failure; | 1360 ReportFailure failure; |
1388 /** The time when this report either completed successfully or failed. */ | 1361 |
| 1362 /// The time when this report either completed successfully or failed. |
1389 core.String finishTimeMs; | 1363 core.String finishTimeMs; |
1390 /** | 1364 |
1391 * The file type of the report. | 1365 /// The file type of the report. |
1392 * Possible string values are: | 1366 /// Possible string values are: |
1393 * - "CSV" | 1367 /// - "CSV" |
1394 * - "EXCEL_CSV" | 1368 /// - "EXCEL_CSV" |
1395 * - "XLSX" | 1369 /// - "XLSX" |
1396 */ | |
1397 core.String format; | 1370 core.String format; |
1398 /** | 1371 |
1399 * The state of the report. | 1372 /// The state of the report. |
1400 * Possible string values are: | 1373 /// Possible string values are: |
1401 * - "DONE" | 1374 /// - "DONE" |
1402 * - "FAILED" | 1375 /// - "FAILED" |
1403 * - "RUNNING" | 1376 /// - "RUNNING" |
1404 */ | |
1405 core.String state; | 1377 core.String state; |
1406 | 1378 |
1407 ReportStatus(); | 1379 ReportStatus(); |
1408 | 1380 |
1409 ReportStatus.fromJson(core.Map _json) { | 1381 ReportStatus.fromJson(core.Map _json) { |
1410 if (_json.containsKey("failure")) { | 1382 if (_json.containsKey("failure")) { |
1411 failure = new ReportFailure.fromJson(_json["failure"]); | 1383 failure = new ReportFailure.fromJson(_json["failure"]); |
1412 } | 1384 } |
1413 if (_json.containsKey("finishTimeMs")) { | 1385 if (_json.containsKey("finishTimeMs")) { |
1414 finishTimeMs = _json["finishTimeMs"]; | 1386 finishTimeMs = _json["finishTimeMs"]; |
1415 } | 1387 } |
1416 if (_json.containsKey("format")) { | 1388 if (_json.containsKey("format")) { |
1417 format = _json["format"]; | 1389 format = _json["format"]; |
1418 } | 1390 } |
1419 if (_json.containsKey("state")) { | 1391 if (_json.containsKey("state")) { |
1420 state = _json["state"]; | 1392 state = _json["state"]; |
1421 } | 1393 } |
1422 } | 1394 } |
1423 | 1395 |
1424 core.Map<core.String, core.Object> toJson() { | 1396 core.Map<core.String, core.Object> toJson() { |
1425 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1397 final core.Map<core.String, core.Object> _json = |
| 1398 new core.Map<core.String, core.Object>(); |
1426 if (failure != null) { | 1399 if (failure != null) { |
1427 _json["failure"] = (failure).toJson(); | 1400 _json["failure"] = (failure).toJson(); |
1428 } | 1401 } |
1429 if (finishTimeMs != null) { | 1402 if (finishTimeMs != null) { |
1430 _json["finishTimeMs"] = finishTimeMs; | 1403 _json["finishTimeMs"] = finishTimeMs; |
1431 } | 1404 } |
1432 if (format != null) { | 1405 if (format != null) { |
1433 _json["format"] = format; | 1406 _json["format"] = format; |
1434 } | 1407 } |
1435 if (state != null) { | 1408 if (state != null) { |
1436 _json["state"] = state; | 1409 _json["state"] = state; |
1437 } | 1410 } |
1438 return _json; | 1411 return _json; |
1439 } | 1412 } |
1440 } | 1413 } |
1441 | 1414 |
1442 /** Represents the upload status of a row in the request. */ | 1415 /// Represents the upload status of a row in the request. |
1443 class RowStatus { | 1416 class RowStatus { |
1444 /** Whether the stored entity is changed as a result of upload. */ | 1417 /// Whether the stored entity is changed as a result of upload. |
1445 core.bool changed; | 1418 core.bool changed; |
1446 /** Entity Id. */ | 1419 |
| 1420 /// Entity Id. |
1447 core.String entityId; | 1421 core.String entityId; |
1448 /** Entity name. */ | 1422 |
| 1423 /// Entity name. |
1449 core.String entityName; | 1424 core.String entityName; |
1450 /** Reasons why the entity can't be uploaded. */ | 1425 |
| 1426 /// Reasons why the entity can't be uploaded. |
1451 core.List<core.String> errors; | 1427 core.List<core.String> errors; |
1452 /** Whether the entity is persisted. */ | 1428 |
| 1429 /// Whether the entity is persisted. |
1453 core.bool persisted; | 1430 core.bool persisted; |
1454 /** Row number. */ | 1431 |
| 1432 /// Row number. |
1455 core.int rowNumber; | 1433 core.int rowNumber; |
1456 | 1434 |
1457 RowStatus(); | 1435 RowStatus(); |
1458 | 1436 |
1459 RowStatus.fromJson(core.Map _json) { | 1437 RowStatus.fromJson(core.Map _json) { |
1460 if (_json.containsKey("changed")) { | 1438 if (_json.containsKey("changed")) { |
1461 changed = _json["changed"]; | 1439 changed = _json["changed"]; |
1462 } | 1440 } |
1463 if (_json.containsKey("entityId")) { | 1441 if (_json.containsKey("entityId")) { |
1464 entityId = _json["entityId"]; | 1442 entityId = _json["entityId"]; |
1465 } | 1443 } |
1466 if (_json.containsKey("entityName")) { | 1444 if (_json.containsKey("entityName")) { |
1467 entityName = _json["entityName"]; | 1445 entityName = _json["entityName"]; |
1468 } | 1446 } |
1469 if (_json.containsKey("errors")) { | 1447 if (_json.containsKey("errors")) { |
1470 errors = _json["errors"]; | 1448 errors = _json["errors"]; |
1471 } | 1449 } |
1472 if (_json.containsKey("persisted")) { | 1450 if (_json.containsKey("persisted")) { |
1473 persisted = _json["persisted"]; | 1451 persisted = _json["persisted"]; |
1474 } | 1452 } |
1475 if (_json.containsKey("rowNumber")) { | 1453 if (_json.containsKey("rowNumber")) { |
1476 rowNumber = _json["rowNumber"]; | 1454 rowNumber = _json["rowNumber"]; |
1477 } | 1455 } |
1478 } | 1456 } |
1479 | 1457 |
1480 core.Map<core.String, core.Object> toJson() { | 1458 core.Map<core.String, core.Object> toJson() { |
1481 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1459 final core.Map<core.String, core.Object> _json = |
| 1460 new core.Map<core.String, core.Object>(); |
1482 if (changed != null) { | 1461 if (changed != null) { |
1483 _json["changed"] = changed; | 1462 _json["changed"] = changed; |
1484 } | 1463 } |
1485 if (entityId != null) { | 1464 if (entityId != null) { |
1486 _json["entityId"] = entityId; | 1465 _json["entityId"] = entityId; |
1487 } | 1466 } |
1488 if (entityName != null) { | 1467 if (entityName != null) { |
1489 _json["entityName"] = entityName; | 1468 _json["entityName"] = entityName; |
1490 } | 1469 } |
1491 if (errors != null) { | 1470 if (errors != null) { |
1492 _json["errors"] = errors; | 1471 _json["errors"] = errors; |
1493 } | 1472 } |
1494 if (persisted != null) { | 1473 if (persisted != null) { |
1495 _json["persisted"] = persisted; | 1474 _json["persisted"] = persisted; |
1496 } | 1475 } |
1497 if (rowNumber != null) { | 1476 if (rowNumber != null) { |
1498 _json["rowNumber"] = rowNumber; | 1477 _json["rowNumber"] = rowNumber; |
1499 } | 1478 } |
1500 return _json; | 1479 return _json; |
1501 } | 1480 } |
1502 } | 1481 } |
1503 | 1482 |
1504 /** Request to run a stored query to generate a report. */ | 1483 /// Request to run a stored query to generate a report. |
1505 class RunQueryRequest { | 1484 class RunQueryRequest { |
1506 /** | 1485 /// Report data range used to generate the report. |
1507 * Report data range used to generate the report. | 1486 /// Possible string values are: |
1508 * Possible string values are: | 1487 /// - "ALL_TIME" |
1509 * - "ALL_TIME" | 1488 /// - "CURRENT_DAY" |
1510 * - "CURRENT_DAY" | 1489 /// - "CUSTOM_DATES" |
1511 * - "CUSTOM_DATES" | 1490 /// - "LAST_14_DAYS" |
1512 * - "LAST_14_DAYS" | 1491 /// - "LAST_30_DAYS" |
1513 * - "LAST_30_DAYS" | 1492 /// - "LAST_365_DAYS" |
1514 * - "LAST_365_DAYS" | 1493 /// - "LAST_7_DAYS" |
1515 * - "LAST_7_DAYS" | 1494 /// - "LAST_90_DAYS" |
1516 * - "LAST_90_DAYS" | 1495 /// - "MONTH_TO_DATE" |
1517 * - "MONTH_TO_DATE" | 1496 /// - "PREVIOUS_DAY" |
1518 * - "PREVIOUS_DAY" | 1497 /// - "PREVIOUS_HALF_MONTH" |
1519 * - "PREVIOUS_HALF_MONTH" | 1498 /// - "PREVIOUS_MONTH" |
1520 * - "PREVIOUS_MONTH" | 1499 /// - "PREVIOUS_QUARTER" |
1521 * - "PREVIOUS_QUARTER" | 1500 /// - "PREVIOUS_WEEK" |
1522 * - "PREVIOUS_WEEK" | 1501 /// - "PREVIOUS_YEAR" |
1523 * - "PREVIOUS_YEAR" | 1502 /// - "QUARTER_TO_DATE" |
1524 * - "QUARTER_TO_DATE" | 1503 /// - "TYPE_NOT_SUPPORTED" |
1525 * - "TYPE_NOT_SUPPORTED" | 1504 /// - "WEEK_TO_DATE" |
1526 * - "WEEK_TO_DATE" | 1505 /// - "YEAR_TO_DATE" |
1527 * - "YEAR_TO_DATE" | |
1528 */ | |
1529 core.String dataRange; | 1506 core.String dataRange; |
1530 /** | 1507 |
1531 * The ending time for the data that is shown in the report. Note, | 1508 /// The ending time for the data that is shown in the report. Note, |
1532 * reportDataEndTimeMs is required if dataRange is CUSTOM_DATES and ignored | 1509 /// reportDataEndTimeMs is required if dataRange is CUSTOM_DATES and ignored |
1533 * otherwise. | 1510 /// otherwise. |
1534 */ | |
1535 core.String reportDataEndTimeMs; | 1511 core.String reportDataEndTimeMs; |
1536 /** | 1512 |
1537 * The starting time for the data that is shown in the report. Note, | 1513 /// The starting time for the data that is shown in the report. Note, |
1538 * reportDataStartTimeMs is required if dataRange is CUSTOM_DATES and ignored | 1514 /// reportDataStartTimeMs is required if dataRange is CUSTOM_DATES and |
1539 * otherwise. | 1515 /// ignored otherwise. |
1540 */ | |
1541 core.String reportDataStartTimeMs; | 1516 core.String reportDataStartTimeMs; |
1542 /** | 1517 |
1543 * Canonical timezone code for report data time. Defaults to America/New_York. | 1518 /// Canonical timezone code for report data time. Defaults to |
1544 */ | 1519 /// America/New_York. |
1545 core.String timezoneCode; | 1520 core.String timezoneCode; |
1546 | 1521 |
1547 RunQueryRequest(); | 1522 RunQueryRequest(); |
1548 | 1523 |
1549 RunQueryRequest.fromJson(core.Map _json) { | 1524 RunQueryRequest.fromJson(core.Map _json) { |
1550 if (_json.containsKey("dataRange")) { | 1525 if (_json.containsKey("dataRange")) { |
1551 dataRange = _json["dataRange"]; | 1526 dataRange = _json["dataRange"]; |
1552 } | 1527 } |
1553 if (_json.containsKey("reportDataEndTimeMs")) { | 1528 if (_json.containsKey("reportDataEndTimeMs")) { |
1554 reportDataEndTimeMs = _json["reportDataEndTimeMs"]; | 1529 reportDataEndTimeMs = _json["reportDataEndTimeMs"]; |
1555 } | 1530 } |
1556 if (_json.containsKey("reportDataStartTimeMs")) { | 1531 if (_json.containsKey("reportDataStartTimeMs")) { |
1557 reportDataStartTimeMs = _json["reportDataStartTimeMs"]; | 1532 reportDataStartTimeMs = _json["reportDataStartTimeMs"]; |
1558 } | 1533 } |
1559 if (_json.containsKey("timezoneCode")) { | 1534 if (_json.containsKey("timezoneCode")) { |
1560 timezoneCode = _json["timezoneCode"]; | 1535 timezoneCode = _json["timezoneCode"]; |
1561 } | 1536 } |
1562 } | 1537 } |
1563 | 1538 |
1564 core.Map<core.String, core.Object> toJson() { | 1539 core.Map<core.String, core.Object> toJson() { |
1565 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1540 final core.Map<core.String, core.Object> _json = |
| 1541 new core.Map<core.String, core.Object>(); |
1566 if (dataRange != null) { | 1542 if (dataRange != null) { |
1567 _json["dataRange"] = dataRange; | 1543 _json["dataRange"] = dataRange; |
1568 } | 1544 } |
1569 if (reportDataEndTimeMs != null) { | 1545 if (reportDataEndTimeMs != null) { |
1570 _json["reportDataEndTimeMs"] = reportDataEndTimeMs; | 1546 _json["reportDataEndTimeMs"] = reportDataEndTimeMs; |
1571 } | 1547 } |
1572 if (reportDataStartTimeMs != null) { | 1548 if (reportDataStartTimeMs != null) { |
1573 _json["reportDataStartTimeMs"] = reportDataStartTimeMs; | 1549 _json["reportDataStartTimeMs"] = reportDataStartTimeMs; |
1574 } | 1550 } |
1575 if (timezoneCode != null) { | 1551 if (timezoneCode != null) { |
1576 _json["timezoneCode"] = timezoneCode; | 1552 _json["timezoneCode"] = timezoneCode; |
1577 } | 1553 } |
1578 return _json; | 1554 return _json; |
1579 } | 1555 } |
1580 } | 1556 } |
1581 | 1557 |
1582 /** Request to upload line items. */ | 1558 /// Request to upload line items. |
1583 class UploadLineItemsRequest { | 1559 class UploadLineItemsRequest { |
1584 /** | 1560 /// Set to true to get upload status without actually persisting the line |
1585 * Set to true to get upload status without actually persisting the line | 1561 /// items. |
1586 * items. | |
1587 */ | |
1588 core.bool dryRun; | 1562 core.bool dryRun; |
1589 /** | 1563 |
1590 * Format the line items are in. Default to CSV. | 1564 /// Format the line items are in. Default to CSV. |
1591 * Possible string values are: | 1565 /// Possible string values are: |
1592 * - "CSV" | 1566 /// - "CSV" |
1593 */ | |
1594 core.String format; | 1567 core.String format; |
1595 /** | 1568 |
1596 * Line items in CSV to upload. Refer to Entity Write File Format for more | 1569 /// Line items in CSV to upload. Refer to Entity Write File Format for more |
1597 * information on file format. | 1570 /// information on file format. |
1598 */ | |
1599 core.String lineItems; | 1571 core.String lineItems; |
1600 | 1572 |
1601 UploadLineItemsRequest(); | 1573 UploadLineItemsRequest(); |
1602 | 1574 |
1603 UploadLineItemsRequest.fromJson(core.Map _json) { | 1575 UploadLineItemsRequest.fromJson(core.Map _json) { |
1604 if (_json.containsKey("dryRun")) { | 1576 if (_json.containsKey("dryRun")) { |
1605 dryRun = _json["dryRun"]; | 1577 dryRun = _json["dryRun"]; |
1606 } | 1578 } |
1607 if (_json.containsKey("format")) { | 1579 if (_json.containsKey("format")) { |
1608 format = _json["format"]; | 1580 format = _json["format"]; |
1609 } | 1581 } |
1610 if (_json.containsKey("lineItems")) { | 1582 if (_json.containsKey("lineItems")) { |
1611 lineItems = _json["lineItems"]; | 1583 lineItems = _json["lineItems"]; |
1612 } | 1584 } |
1613 } | 1585 } |
1614 | 1586 |
1615 core.Map<core.String, core.Object> toJson() { | 1587 core.Map<core.String, core.Object> toJson() { |
1616 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1588 final core.Map<core.String, core.Object> _json = |
| 1589 new core.Map<core.String, core.Object>(); |
1617 if (dryRun != null) { | 1590 if (dryRun != null) { |
1618 _json["dryRun"] = dryRun; | 1591 _json["dryRun"] = dryRun; |
1619 } | 1592 } |
1620 if (format != null) { | 1593 if (format != null) { |
1621 _json["format"] = format; | 1594 _json["format"] = format; |
1622 } | 1595 } |
1623 if (lineItems != null) { | 1596 if (lineItems != null) { |
1624 _json["lineItems"] = lineItems; | 1597 _json["lineItems"] = lineItems; |
1625 } | 1598 } |
1626 return _json; | 1599 return _json; |
1627 } | 1600 } |
1628 } | 1601 } |
1629 | 1602 |
1630 /** Upload line items response. */ | 1603 /// Upload line items response. |
1631 class UploadLineItemsResponse { | 1604 class UploadLineItemsResponse { |
1632 /** Status of upload. */ | 1605 /// Status of upload. |
1633 UploadStatus uploadStatus; | 1606 UploadStatus uploadStatus; |
1634 | 1607 |
1635 UploadLineItemsResponse(); | 1608 UploadLineItemsResponse(); |
1636 | 1609 |
1637 UploadLineItemsResponse.fromJson(core.Map _json) { | 1610 UploadLineItemsResponse.fromJson(core.Map _json) { |
1638 if (_json.containsKey("uploadStatus")) { | 1611 if (_json.containsKey("uploadStatus")) { |
1639 uploadStatus = new UploadStatus.fromJson(_json["uploadStatus"]); | 1612 uploadStatus = new UploadStatus.fromJson(_json["uploadStatus"]); |
1640 } | 1613 } |
1641 } | 1614 } |
1642 | 1615 |
1643 core.Map<core.String, core.Object> toJson() { | 1616 core.Map<core.String, core.Object> toJson() { |
1644 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1617 final core.Map<core.String, core.Object> _json = |
| 1618 new core.Map<core.String, core.Object>(); |
1645 if (uploadStatus != null) { | 1619 if (uploadStatus != null) { |
1646 _json["uploadStatus"] = (uploadStatus).toJson(); | 1620 _json["uploadStatus"] = (uploadStatus).toJson(); |
1647 } | 1621 } |
1648 return _json; | 1622 return _json; |
1649 } | 1623 } |
1650 } | 1624 } |
1651 | 1625 |
1652 /** Represents the status of upload. */ | 1626 /// Represents the status of upload. |
1653 class UploadStatus { | 1627 class UploadStatus { |
1654 /** Reasons why upload can't be completed. */ | 1628 /// Reasons why upload can't be completed. |
1655 core.List<core.String> errors; | 1629 core.List<core.String> errors; |
1656 /** Per-row upload status. */ | 1630 |
| 1631 /// Per-row upload status. |
1657 core.List<RowStatus> rowStatus; | 1632 core.List<RowStatus> rowStatus; |
1658 | 1633 |
1659 UploadStatus(); | 1634 UploadStatus(); |
1660 | 1635 |
1661 UploadStatus.fromJson(core.Map _json) { | 1636 UploadStatus.fromJson(core.Map _json) { |
1662 if (_json.containsKey("errors")) { | 1637 if (_json.containsKey("errors")) { |
1663 errors = _json["errors"]; | 1638 errors = _json["errors"]; |
1664 } | 1639 } |
1665 if (_json.containsKey("rowStatus")) { | 1640 if (_json.containsKey("rowStatus")) { |
1666 rowStatus = _json["rowStatus"].map((value) => new RowStatus.fromJson(value
)).toList(); | 1641 rowStatus = _json["rowStatus"] |
| 1642 .map((value) => new RowStatus.fromJson(value)) |
| 1643 .toList(); |
1667 } | 1644 } |
1668 } | 1645 } |
1669 | 1646 |
1670 core.Map<core.String, core.Object> toJson() { | 1647 core.Map<core.String, core.Object> toJson() { |
1671 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1648 final core.Map<core.String, core.Object> _json = |
| 1649 new core.Map<core.String, core.Object>(); |
1672 if (errors != null) { | 1650 if (errors != null) { |
1673 _json["errors"] = errors; | 1651 _json["errors"] = errors; |
1674 } | 1652 } |
1675 if (rowStatus != null) { | 1653 if (rowStatus != null) { |
1676 _json["rowStatus"] = rowStatus.map((value) => (value).toJson()).toList(); | 1654 _json["rowStatus"] = rowStatus.map((value) => (value).toJson()).toList(); |
1677 } | 1655 } |
1678 return _json; | 1656 return _json; |
1679 } | 1657 } |
1680 } | 1658 } |
OLD | NEW |