Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1054)

Side by Side Diff: generated/googleapis/lib/youtubereporting/v1.dart

Issue 3006323002: Api-Roll 54: 2017-09-11 (Closed)
Patch Set: use 2.0.0-dev.infinity sdk constraint in pubspecs Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « generated/googleapis/lib/youtubeanalytics/v1.dart ('k') | generated/googleapis/pubspec.yaml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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.youtubereporting.v1; 3 library googleapis.youtubereporting.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, Media, UploadOptions, 13 show
14 ResumableUploadOptions, DownloadOptions, PartialDownloadOptions, 14 ApiRequestError,
15 ByteRange; 15 DetailedApiRequestError,
16 Media,
17 UploadOptions,
18 ResumableUploadOptions,
19 DownloadOptions,
20 PartialDownloadOptions,
21 ByteRange;
16 22
17 const core.String USER_AGENT = 'dart-api-client youtubereporting/v1'; 23 const core.String USER_AGENT = 'dart-api-client youtubereporting/v1';
18 24
19 /** 25 /// Schedules reporting jobs containing your YouTube Analytics data and
20 * Schedules reporting jobs containing your YouTube Analytics data and downloads 26 /// downloads the resulting bulk data reports in the form of CSV files.
21 * the resulting bulk data reports in the form of CSV files.
22 */
23 class YoutubereportingApi { 27 class YoutubereportingApi {
24 /** 28 /// View monetary and non-monetary YouTube Analytics reports for your YouTube
25 * View monetary and non-monetary YouTube Analytics reports for your YouTube 29 /// content
26 * content 30 static const YtAnalyticsMonetaryReadonlyScope =
27 */ 31 "https://www.googleapis.com/auth/yt-analytics-monetary.readonly";
28 static const YtAnalyticsMonetaryReadonlyScope = "https://www.googleapis.com/au th/yt-analytics-monetary.readonly";
29 32
30 /** View YouTube Analytics reports for your YouTube content */ 33 /// View YouTube Analytics reports for your YouTube content
31 static const YtAnalyticsReadonlyScope = "https://www.googleapis.com/auth/yt-an alytics.readonly"; 34 static const YtAnalyticsReadonlyScope =
32 35 "https://www.googleapis.com/auth/yt-analytics.readonly";
33 36
34 final commons.ApiRequester _requester; 37 final commons.ApiRequester _requester;
35 38
36 JobsResourceApi get jobs => new JobsResourceApi(_requester); 39 JobsResourceApi get jobs => new JobsResourceApi(_requester);
37 MediaResourceApi get media => new MediaResourceApi(_requester); 40 MediaResourceApi get media => new MediaResourceApi(_requester);
38 ReportTypesResourceApi get reportTypes => new ReportTypesResourceApi(_requeste r); 41 ReportTypesResourceApi get reportTypes =>
42 new ReportTypesResourceApi(_requester);
39 43
40 YoutubereportingApi(http.Client client, {core.String rootUrl: "https://youtube reporting.googleapis.com/", core.String servicePath: ""}) : 44 YoutubereportingApi(http.Client client,
41 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A GENT); 45 {core.String rootUrl: "https://youtubereporting.googleapis.com/",
46 core.String servicePath: ""})
47 : _requester =
48 new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT);
42 } 49 }
43 50
44
45 class JobsResourceApi { 51 class JobsResourceApi {
46 final commons.ApiRequester _requester; 52 final commons.ApiRequester _requester;
47 53
48 JobsReportsResourceApi get reports => new JobsReportsResourceApi(_requester); 54 JobsReportsResourceApi get reports => new JobsReportsResourceApi(_requester);
49 55
50 JobsResourceApi(commons.ApiRequester client) : 56 JobsResourceApi(commons.ApiRequester client) : _requester = client;
51 _requester = client;
52 57
53 /** 58 /// Creates a job and returns it.
54 * Creates a job and returns it. 59 ///
55 * 60 /// [request] - The metadata request object.
56 * [request] - The metadata request object. 61 ///
57 * 62 /// Request parameters:
58 * Request parameters: 63 ///
59 * 64 /// [onBehalfOfContentOwner] - The content owner's external ID on which
60 * [onBehalfOfContentOwner] - The content owner's external ID on which behalf 65 /// behalf the user is acting on. If
61 * the user is acting on. If 66 /// not set, the user is acting for himself (his own channel).
62 * not set, the user is acting for himself (his own channel). 67 ///
63 * 68 /// Completes with a [Job].
64 * Completes with a [Job]. 69 ///
65 * 70 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
66 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 71 /// an error.
67 * error. 72 ///
68 * 73 /// If the used [http.Client] completes with an error when making a REST
69 * If the used [http.Client] completes with an error when making a REST call, 74 /// call, this method will complete with the same error.
70 * this method will complete with the same error.
71 */
72 async.Future<Job> create(Job request, {core.String onBehalfOfContentOwner}) { 75 async.Future<Job> create(Job request, {core.String onBehalfOfContentOwner}) {
73 var _url = null; 76 var _url = null;
74 var _queryParams = new core.Map(); 77 var _queryParams = new core.Map();
75 var _uploadMedia = null; 78 var _uploadMedia = null;
76 var _uploadOptions = null; 79 var _uploadOptions = null;
77 var _downloadOptions = commons.DownloadOptions.Metadata; 80 var _downloadOptions = commons.DownloadOptions.Metadata;
78 var _body = null; 81 var _body = null;
79 82
80 if (request != null) { 83 if (request != null) {
81 _body = convert.JSON.encode((request).toJson()); 84 _body = convert.JSON.encode((request).toJson());
82 } 85 }
83 if (onBehalfOfContentOwner != null) { 86 if (onBehalfOfContentOwner != null) {
84 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; 87 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner];
85 } 88 }
86 89
87 _url = 'v1/jobs'; 90 _url = 'v1/jobs';
88 91
89 var _response = _requester.request(_url, 92 var _response = _requester.request(_url, "POST",
90 "POST", 93 body: _body,
91 body: _body, 94 queryParams: _queryParams,
92 queryParams: _queryParams, 95 uploadOptions: _uploadOptions,
93 uploadOptions: _uploadOptions, 96 uploadMedia: _uploadMedia,
94 uploadMedia: _uploadMedia, 97 downloadOptions: _downloadOptions);
95 downloadOptions: _downloadOptions);
96 return _response.then((data) => new Job.fromJson(data)); 98 return _response.then((data) => new Job.fromJson(data));
97 } 99 }
98 100
99 /** 101 /// Deletes a job.
100 * Deletes a job. 102 ///
101 * 103 /// Request parameters:
102 * Request parameters: 104 ///
103 * 105 /// [jobId] - The ID of the job to delete.
104 * [jobId] - The ID of the job to delete. 106 ///
105 * 107 /// [onBehalfOfContentOwner] - The content owner's external ID on which
106 * [onBehalfOfContentOwner] - The content owner's external ID on which behalf 108 /// behalf the user is acting on. If
107 * the user is acting on. If 109 /// not set, the user is acting for himself (his own channel).
108 * not set, the user is acting for himself (his own channel). 110 ///
109 * 111 /// Completes with a [Empty].
110 * Completes with a [Empty]. 112 ///
111 * 113 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
112 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 114 /// an error.
113 * error. 115 ///
114 * 116 /// If the used [http.Client] completes with an error when making a REST
115 * If the used [http.Client] completes with an error when making a REST call, 117 /// call, this method will complete with the same error.
116 * this method will complete with the same error. 118 async.Future<Empty> delete(core.String jobId,
117 */ 119 {core.String onBehalfOfContentOwner}) {
118 async.Future<Empty> delete(core.String jobId, {core.String onBehalfOfContentOw ner}) {
119 var _url = null; 120 var _url = null;
120 var _queryParams = new core.Map(); 121 var _queryParams = new core.Map();
121 var _uploadMedia = null; 122 var _uploadMedia = null;
122 var _uploadOptions = null; 123 var _uploadOptions = null;
123 var _downloadOptions = commons.DownloadOptions.Metadata; 124 var _downloadOptions = commons.DownloadOptions.Metadata;
124 var _body = null; 125 var _body = null;
125 126
126 if (jobId == null) { 127 if (jobId == null) {
127 throw new core.ArgumentError("Parameter jobId is required."); 128 throw new core.ArgumentError("Parameter jobId is required.");
128 } 129 }
129 if (onBehalfOfContentOwner != null) { 130 if (onBehalfOfContentOwner != null) {
130 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; 131 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner];
131 } 132 }
132 133
133 _url = 'v1/jobs/' + commons.Escaper.ecapeVariable('$jobId'); 134 _url = 'v1/jobs/' + commons.Escaper.ecapeVariable('$jobId');
134 135
135 var _response = _requester.request(_url, 136 var _response = _requester.request(_url, "DELETE",
136 "DELETE", 137 body: _body,
137 body: _body, 138 queryParams: _queryParams,
138 queryParams: _queryParams, 139 uploadOptions: _uploadOptions,
139 uploadOptions: _uploadOptions, 140 uploadMedia: _uploadMedia,
140 uploadMedia: _uploadMedia, 141 downloadOptions: _downloadOptions);
141 downloadOptions: _downloadOptions);
142 return _response.then((data) => new Empty.fromJson(data)); 142 return _response.then((data) => new Empty.fromJson(data));
143 } 143 }
144 144
145 /** 145 /// Gets a job.
146 * Gets a job. 146 ///
147 * 147 /// Request parameters:
148 * Request parameters: 148 ///
149 * 149 /// [jobId] - The ID of the job to retrieve.
150 * [jobId] - The ID of the job to retrieve. 150 ///
151 * 151 /// [onBehalfOfContentOwner] - The content owner's external ID on which
152 * [onBehalfOfContentOwner] - The content owner's external ID on which behalf 152 /// behalf the user is acting on. If
153 * the user is acting on. If 153 /// not set, the user is acting for himself (his own channel).
154 * not set, the user is acting for himself (his own channel). 154 ///
155 * 155 /// Completes with a [Job].
156 * Completes with a [Job]. 156 ///
157 * 157 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
158 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 158 /// an error.
159 * error. 159 ///
160 * 160 /// If the used [http.Client] completes with an error when making a REST
161 * If the used [http.Client] completes with an error when making a REST call, 161 /// call, this method will complete with the same error.
162 * this method will complete with the same error. 162 async.Future<Job> get(core.String jobId,
163 */ 163 {core.String onBehalfOfContentOwner}) {
164 async.Future<Job> get(core.String jobId, {core.String onBehalfOfContentOwner}) {
165 var _url = null; 164 var _url = null;
166 var _queryParams = new core.Map(); 165 var _queryParams = new core.Map();
167 var _uploadMedia = null; 166 var _uploadMedia = null;
168 var _uploadOptions = null; 167 var _uploadOptions = null;
169 var _downloadOptions = commons.DownloadOptions.Metadata; 168 var _downloadOptions = commons.DownloadOptions.Metadata;
170 var _body = null; 169 var _body = null;
171 170
172 if (jobId == null) { 171 if (jobId == null) {
173 throw new core.ArgumentError("Parameter jobId is required."); 172 throw new core.ArgumentError("Parameter jobId is required.");
174 } 173 }
175 if (onBehalfOfContentOwner != null) { 174 if (onBehalfOfContentOwner != null) {
176 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; 175 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner];
177 } 176 }
178 177
179 _url = 'v1/jobs/' + commons.Escaper.ecapeVariable('$jobId'); 178 _url = 'v1/jobs/' + commons.Escaper.ecapeVariable('$jobId');
180 179
181 var _response = _requester.request(_url, 180 var _response = _requester.request(_url, "GET",
182 "GET", 181 body: _body,
183 body: _body, 182 queryParams: _queryParams,
184 queryParams: _queryParams, 183 uploadOptions: _uploadOptions,
185 uploadOptions: _uploadOptions, 184 uploadMedia: _uploadMedia,
186 uploadMedia: _uploadMedia, 185 downloadOptions: _downloadOptions);
187 downloadOptions: _downloadOptions);
188 return _response.then((data) => new Job.fromJson(data)); 186 return _response.then((data) => new Job.fromJson(data));
189 } 187 }
190 188
191 /** 189 /// Lists jobs.
192 * Lists jobs. 190 ///
193 * 191 /// Request parameters:
194 * Request parameters: 192 ///
195 * 193 /// [includeSystemManaged] - If set to true, also system-managed jobs will be
196 * [includeSystemManaged] - If set to true, also system-managed jobs will be 194 /// returned; otherwise only
197 * returned; otherwise only 195 /// user-created jobs will be returned. System-managed jobs can neither be
198 * user-created jobs will be returned. System-managed jobs can neither be 196 /// modified nor deleted.
199 * modified nor deleted. 197 ///
200 * 198 /// [pageToken] - A token identifying a page of results the server should
201 * [pageToken] - A token identifying a page of results the server should 199 /// return. Typically,
202 * return. Typically, 200 /// this is the value of
203 * this is the value of 201 /// ListReportTypesResponse.next_page_token
204 * ListReportTypesResponse.next_page_token 202 /// returned in response to the previous call to the `ListJobs` method.
205 * returned in response to the previous call to the `ListJobs` method. 203 ///
206 * 204 /// [pageSize] - Requested page size. Server may return fewer jobs than
207 * [pageSize] - Requested page size. Server may return fewer jobs than 205 /// requested.
208 * requested. 206 /// If unspecified, server will pick an appropriate default.
209 * If unspecified, server will pick an appropriate default. 207 ///
210 * 208 /// [onBehalfOfContentOwner] - The content owner's external ID on which
211 * [onBehalfOfContentOwner] - The content owner's external ID on which behalf 209 /// behalf the user is acting on. If
212 * the user is acting on. If 210 /// not set, the user is acting for himself (his own channel).
213 * not set, the user is acting for himself (his own channel). 211 ///
214 * 212 /// Completes with a [ListJobsResponse].
215 * Completes with a [ListJobsResponse]. 213 ///
216 * 214 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
217 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 215 /// an error.
218 * error. 216 ///
219 * 217 /// If the used [http.Client] completes with an error when making a REST
220 * If the used [http.Client] completes with an error when making a REST call, 218 /// call, this method will complete with the same error.
221 * this method will complete with the same error. 219 async.Future<ListJobsResponse> list(
222 */ 220 {core.bool includeSystemManaged,
223 async.Future<ListJobsResponse> list({core.bool includeSystemManaged, core.Stri ng pageToken, core.int pageSize, core.String onBehalfOfContentOwner}) { 221 core.String pageToken,
222 core.int pageSize,
223 core.String onBehalfOfContentOwner}) {
224 var _url = null; 224 var _url = null;
225 var _queryParams = new core.Map(); 225 var _queryParams = new core.Map();
226 var _uploadMedia = null; 226 var _uploadMedia = null;
227 var _uploadOptions = null; 227 var _uploadOptions = null;
228 var _downloadOptions = commons.DownloadOptions.Metadata; 228 var _downloadOptions = commons.DownloadOptions.Metadata;
229 var _body = null; 229 var _body = null;
230 230
231 if (includeSystemManaged != null) { 231 if (includeSystemManaged != null) {
232 _queryParams["includeSystemManaged"] = ["${includeSystemManaged}"]; 232 _queryParams["includeSystemManaged"] = ["${includeSystemManaged}"];
233 } 233 }
234 if (pageToken != null) { 234 if (pageToken != null) {
235 _queryParams["pageToken"] = [pageToken]; 235 _queryParams["pageToken"] = [pageToken];
236 } 236 }
237 if (pageSize != null) { 237 if (pageSize != null) {
238 _queryParams["pageSize"] = ["${pageSize}"]; 238 _queryParams["pageSize"] = ["${pageSize}"];
239 } 239 }
240 if (onBehalfOfContentOwner != null) { 240 if (onBehalfOfContentOwner != null) {
241 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; 241 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner];
242 } 242 }
243 243
244 _url = 'v1/jobs'; 244 _url = 'v1/jobs';
245 245
246 var _response = _requester.request(_url, 246 var _response = _requester.request(_url, "GET",
247 "GET", 247 body: _body,
248 body: _body, 248 queryParams: _queryParams,
249 queryParams: _queryParams, 249 uploadOptions: _uploadOptions,
250 uploadOptions: _uploadOptions, 250 uploadMedia: _uploadMedia,
251 uploadMedia: _uploadMedia, 251 downloadOptions: _downloadOptions);
252 downloadOptions: _downloadOptions);
253 return _response.then((data) => new ListJobsResponse.fromJson(data)); 252 return _response.then((data) => new ListJobsResponse.fromJson(data));
254 } 253 }
255
256 } 254 }
257 255
258
259 class JobsReportsResourceApi { 256 class JobsReportsResourceApi {
260 final commons.ApiRequester _requester; 257 final commons.ApiRequester _requester;
261 258
262 JobsReportsResourceApi(commons.ApiRequester client) : 259 JobsReportsResourceApi(commons.ApiRequester client) : _requester = client;
263 _requester = client;
264 260
265 /** 261 /// Gets the metadata of a specific report.
266 * Gets the metadata of a specific report. 262 ///
267 * 263 /// Request parameters:
268 * Request parameters: 264 ///
269 * 265 /// [jobId] - The ID of the job.
270 * [jobId] - The ID of the job. 266 ///
271 * 267 /// [reportId] - The ID of the report to retrieve.
272 * [reportId] - The ID of the report to retrieve. 268 ///
273 * 269 /// [onBehalfOfContentOwner] - The content owner's external ID on which
274 * [onBehalfOfContentOwner] - The content owner's external ID on which behalf 270 /// behalf the user is acting on. If
275 * the user is acting on. If 271 /// not set, the user is acting for himself (his own channel).
276 * not set, the user is acting for himself (his own channel). 272 ///
277 * 273 /// Completes with a [Report].
278 * Completes with a [Report]. 274 ///
279 * 275 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
280 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 276 /// an error.
281 * error. 277 ///
282 * 278 /// If the used [http.Client] completes with an error when making a REST
283 * If the used [http.Client] completes with an error when making a REST call, 279 /// call, this method will complete with the same error.
284 * this method will complete with the same error. 280 async.Future<Report> get(core.String jobId, core.String reportId,
285 */ 281 {core.String onBehalfOfContentOwner}) {
286 async.Future<Report> get(core.String jobId, core.String reportId, {core.String onBehalfOfContentOwner}) {
287 var _url = null; 282 var _url = null;
288 var _queryParams = new core.Map(); 283 var _queryParams = new core.Map();
289 var _uploadMedia = null; 284 var _uploadMedia = null;
290 var _uploadOptions = null; 285 var _uploadOptions = null;
291 var _downloadOptions = commons.DownloadOptions.Metadata; 286 var _downloadOptions = commons.DownloadOptions.Metadata;
292 var _body = null; 287 var _body = null;
293 288
294 if (jobId == null) { 289 if (jobId == null) {
295 throw new core.ArgumentError("Parameter jobId is required."); 290 throw new core.ArgumentError("Parameter jobId is required.");
296 } 291 }
297 if (reportId == null) { 292 if (reportId == null) {
298 throw new core.ArgumentError("Parameter reportId is required."); 293 throw new core.ArgumentError("Parameter reportId is required.");
299 } 294 }
300 if (onBehalfOfContentOwner != null) { 295 if (onBehalfOfContentOwner != null) {
301 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; 296 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner];
302 } 297 }
303 298
304 _url = 'v1/jobs/' + commons.Escaper.ecapeVariable('$jobId') + '/reports/' + commons.Escaper.ecapeVariable('$reportId'); 299 _url = 'v1/jobs/' +
300 commons.Escaper.ecapeVariable('$jobId') +
301 '/reports/' +
302 commons.Escaper.ecapeVariable('$reportId');
305 303
306 var _response = _requester.request(_url, 304 var _response = _requester.request(_url, "GET",
307 "GET", 305 body: _body,
308 body: _body, 306 queryParams: _queryParams,
309 queryParams: _queryParams, 307 uploadOptions: _uploadOptions,
310 uploadOptions: _uploadOptions, 308 uploadMedia: _uploadMedia,
311 uploadMedia: _uploadMedia, 309 downloadOptions: _downloadOptions);
312 downloadOptions: _downloadOptions);
313 return _response.then((data) => new Report.fromJson(data)); 310 return _response.then((data) => new Report.fromJson(data));
314 } 311 }
315 312
316 /** 313 /// Lists reports created by a specific job.
317 * Lists reports created by a specific job. 314 /// Returns NOT_FOUND if the job does not exist.
318 * Returns NOT_FOUND if the job does not exist. 315 ///
319 * 316 /// Request parameters:
320 * Request parameters: 317 ///
321 * 318 /// [jobId] - The ID of the job.
322 * [jobId] - The ID of the job. 319 ///
323 * 320 /// [onBehalfOfContentOwner] - The content owner's external ID on which
324 * [createdAfter] - If set, only reports created after the specified date/time 321 /// behalf the user is acting on. If
325 * are returned. 322 /// not set, the user is acting for himself (his own channel).
326 * 323 ///
327 * [pageToken] - A token identifying a page of results the server should 324 /// [startTimeBefore] - If set, only reports whose start time is smaller than
328 * return. Typically, 325 /// the specified
329 * this is the value of 326 /// date/time are returned.
330 * ListReportsResponse.next_page_token 327 ///
331 * returned in response to the previous call to the `ListReports` method. 328 /// [createdAfter] - If set, only reports created after the specified
332 * 329 /// date/time are returned.
333 * [startTimeAtOrAfter] - If set, only reports whose start time is greater 330 ///
334 * than or equal the 331 /// [startTimeAtOrAfter] - If set, only reports whose start time is greater
335 * specified date/time are returned. 332 /// than or equal the
336 * 333 /// specified date/time are returned.
337 * [pageSize] - Requested page size. Server may return fewer report types than 334 ///
338 * requested. 335 /// [pageToken] - A token identifying a page of results the server should
339 * If unspecified, server will pick an appropriate default. 336 /// return. Typically,
340 * 337 /// this is the value of
341 * [onBehalfOfContentOwner] - The content owner's external ID on which behalf 338 /// ListReportsResponse.next_page_token
342 * the user is acting on. If 339 /// returned in response to the previous call to the `ListReports` method.
343 * not set, the user is acting for himself (his own channel). 340 ///
344 * 341 /// [pageSize] - Requested page size. Server may return fewer report types
345 * [startTimeBefore] - If set, only reports whose start time is smaller than 342 /// than requested.
346 * the specified 343 /// If unspecified, server will pick an appropriate default.
347 * date/time are returned. 344 ///
348 * 345 /// Completes with a [ListReportsResponse].
349 * Completes with a [ListReportsResponse]. 346 ///
350 * 347 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
351 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 348 /// an error.
352 * error. 349 ///
353 * 350 /// If the used [http.Client] completes with an error when making a REST
354 * If the used [http.Client] completes with an error when making a REST call, 351 /// call, this method will complete with the same error.
355 * this method will complete with the same error. 352 async.Future<ListReportsResponse> list(core.String jobId,
356 */ 353 {core.String onBehalfOfContentOwner,
357 async.Future<ListReportsResponse> list(core.String jobId, {core.String created After, core.String pageToken, core.String startTimeAtOrAfter, core.int pageSize, core.String onBehalfOfContentOwner, core.String startTimeBefore}) { 354 core.String startTimeBefore,
355 core.String createdAfter,
356 core.String startTimeAtOrAfter,
357 core.String pageToken,
358 core.int pageSize}) {
358 var _url = null; 359 var _url = null;
359 var _queryParams = new core.Map(); 360 var _queryParams = new core.Map();
360 var _uploadMedia = null; 361 var _uploadMedia = null;
361 var _uploadOptions = null; 362 var _uploadOptions = null;
362 var _downloadOptions = commons.DownloadOptions.Metadata; 363 var _downloadOptions = commons.DownloadOptions.Metadata;
363 var _body = null; 364 var _body = null;
364 365
365 if (jobId == null) { 366 if (jobId == null) {
366 throw new core.ArgumentError("Parameter jobId is required."); 367 throw new core.ArgumentError("Parameter jobId is required.");
367 } 368 }
368 if (createdAfter != null) {
369 _queryParams["createdAfter"] = [createdAfter];
370 }
371 if (pageToken != null) {
372 _queryParams["pageToken"] = [pageToken];
373 }
374 if (startTimeAtOrAfter != null) {
375 _queryParams["startTimeAtOrAfter"] = [startTimeAtOrAfter];
376 }
377 if (pageSize != null) {
378 _queryParams["pageSize"] = ["${pageSize}"];
379 }
380 if (onBehalfOfContentOwner != null) { 369 if (onBehalfOfContentOwner != null) {
381 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; 370 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner];
382 } 371 }
383 if (startTimeBefore != null) { 372 if (startTimeBefore != null) {
384 _queryParams["startTimeBefore"] = [startTimeBefore]; 373 _queryParams["startTimeBefore"] = [startTimeBefore];
385 } 374 }
375 if (createdAfter != null) {
376 _queryParams["createdAfter"] = [createdAfter];
377 }
378 if (startTimeAtOrAfter != null) {
379 _queryParams["startTimeAtOrAfter"] = [startTimeAtOrAfter];
380 }
381 if (pageToken != null) {
382 _queryParams["pageToken"] = [pageToken];
383 }
384 if (pageSize != null) {
385 _queryParams["pageSize"] = ["${pageSize}"];
386 }
386 387
387 _url = 'v1/jobs/' + commons.Escaper.ecapeVariable('$jobId') + '/reports'; 388 _url = 'v1/jobs/' + commons.Escaper.ecapeVariable('$jobId') + '/reports';
388 389
389 var _response = _requester.request(_url, 390 var _response = _requester.request(_url, "GET",
390 "GET", 391 body: _body,
391 body: _body, 392 queryParams: _queryParams,
392 queryParams: _queryParams, 393 uploadOptions: _uploadOptions,
393 uploadOptions: _uploadOptions, 394 uploadMedia: _uploadMedia,
394 uploadMedia: _uploadMedia, 395 downloadOptions: _downloadOptions);
395 downloadOptions: _downloadOptions);
396 return _response.then((data) => new ListReportsResponse.fromJson(data)); 396 return _response.then((data) => new ListReportsResponse.fromJson(data));
397 } 397 }
398
399 } 398 }
400 399
401
402 class MediaResourceApi { 400 class MediaResourceApi {
403 final commons.ApiRequester _requester; 401 final commons.ApiRequester _requester;
404 402
405 MediaResourceApi(commons.ApiRequester client) : 403 MediaResourceApi(commons.ApiRequester client) : _requester = client;
406 _requester = client;
407 404
408 /** 405 /// Method for media download. Download is supported
409 * Method for media download. Download is supported 406 /// on the URI `/v1/media/{+name}?alt=media`.
410 * on the URI `/v1/media/{+name}?alt=media`. 407 ///
411 * 408 /// Request parameters:
412 * Request parameters: 409 ///
413 * 410 /// [resourceName] - Name of the media that is being downloaded. See
414 * [resourceName] - Name of the media that is being downloaded. See 411 /// ReadRequest.resource_name.
415 * ReadRequest.resource_name. 412 /// Value must have pattern "^.+$".
416 * Value must have pattern "^.+$". 413 ///
417 * 414 /// [downloadOptions] - Options for downloading. A download can be either a
418 * [downloadOptions] - Options for downloading. A download can be either a 415 /// Metadata (default) or Media download. Partial Media downloads are
419 * Metadata (default) or Media download. Partial Media downloads are possible 416 /// possible as well.
420 * as well. 417 ///
421 * 418 /// Completes with a
422 * Completes with a 419 ///
423 * 420 /// - [Media] for Metadata downloads (see [downloadOptions]).
424 * - [Media] for Metadata downloads (see [downloadOptions]). 421 ///
425 * 422 /// - [commons.Media] for Media downloads (see [downloadOptions]).
426 * - [commons.Media] for Media downloads (see [downloadOptions]). 423 ///
427 * 424 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
428 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 425 /// an error.
429 * error. 426 ///
430 * 427 /// If the used [http.Client] completes with an error when making a REST
431 * If the used [http.Client] completes with an error when making a REST call, 428 /// call, this method will complete with the same error.
432 * this method will complete with the same error. 429 async.Future download(core.String resourceName,
433 */ 430 {commons.DownloadOptions downloadOptions:
434 async.Future download(core.String resourceName, {commons.DownloadOptions downl oadOptions: commons.DownloadOptions.Metadata}) { 431 commons.DownloadOptions.Metadata}) {
435 var _url = null; 432 var _url = null;
436 var _queryParams = new core.Map(); 433 var _queryParams = new core.Map();
437 var _uploadMedia = null; 434 var _uploadMedia = null;
438 var _uploadOptions = null; 435 var _uploadOptions = null;
439 var _downloadOptions = commons.DownloadOptions.Metadata; 436 var _downloadOptions = commons.DownloadOptions.Metadata;
440 var _body = null; 437 var _body = null;
441 438
442 if (resourceName == null) { 439 if (resourceName == null) {
443 throw new core.ArgumentError("Parameter resourceName is required."); 440 throw new core.ArgumentError("Parameter resourceName is required.");
444 } 441 }
445 442
446 _downloadOptions = downloadOptions; 443 _downloadOptions = downloadOptions;
447 444
448 _url = 'v1/media/' + commons.Escaper.ecapeVariableReserved('$resourceName'); 445 _url = 'v1/media/' + commons.Escaper.ecapeVariableReserved('$resourceName');
449 446
450 var _response = _requester.request(_url, 447 var _response = _requester.request(_url, "GET",
451 "GET", 448 body: _body,
452 body: _body, 449 queryParams: _queryParams,
453 queryParams: _queryParams, 450 uploadOptions: _uploadOptions,
454 uploadOptions: _uploadOptions, 451 uploadMedia: _uploadMedia,
455 uploadMedia: _uploadMedia, 452 downloadOptions: _downloadOptions);
456 downloadOptions: _downloadOptions);
457 if (_downloadOptions == null || 453 if (_downloadOptions == null ||
458 _downloadOptions == commons.DownloadOptions.Metadata) { 454 _downloadOptions == commons.DownloadOptions.Metadata) {
459 return _response.then((data) => new Media.fromJson(data)); 455 return _response.then((data) => new Media.fromJson(data));
460 } else { 456 } else {
461 return _response; 457 return _response;
462 } 458 }
463 } 459 }
464
465 } 460 }
466 461
467
468 class ReportTypesResourceApi { 462 class ReportTypesResourceApi {
469 final commons.ApiRequester _requester; 463 final commons.ApiRequester _requester;
470 464
471 ReportTypesResourceApi(commons.ApiRequester client) : 465 ReportTypesResourceApi(commons.ApiRequester client) : _requester = client;
472 _requester = client;
473 466
474 /** 467 /// Lists report types.
475 * Lists report types. 468 ///
476 * 469 /// Request parameters:
477 * Request parameters: 470 ///
478 * 471 /// [onBehalfOfContentOwner] - The content owner's external ID on which
479 * [onBehalfOfContentOwner] - The content owner's external ID on which behalf 472 /// behalf the user is acting on. If
480 * the user is acting on. If 473 /// not set, the user is acting for himself (his own channel).
481 * not set, the user is acting for himself (his own channel). 474 ///
482 * 475 /// [includeSystemManaged] - If set to true, also system-managed report types
483 * [includeSystemManaged] - If set to true, also system-managed report types 476 /// will be returned;
484 * will be returned; 477 /// otherwise only the report types that can be used to create new reporting
485 * otherwise only the report types that can be used to create new reporting 478 /// jobs will be returned.
486 * jobs will be returned. 479 ///
487 * 480 /// [pageToken] - A token identifying a page of results the server should
488 * [pageToken] - A token identifying a page of results the server should 481 /// return. Typically,
489 * return. Typically, 482 /// this is the value of
490 * this is the value of 483 /// ListReportTypesResponse.next_page_token
491 * ListReportTypesResponse.next_page_token 484 /// returned in response to the previous call to the `ListReportTypes`
492 * returned in response to the previous call to the `ListReportTypes` method. 485 /// method.
493 * 486 ///
494 * [pageSize] - Requested page size. Server may return fewer report types than 487 /// [pageSize] - Requested page size. Server may return fewer report types
495 * requested. 488 /// than requested.
496 * If unspecified, server will pick an appropriate default. 489 /// If unspecified, server will pick an appropriate default.
497 * 490 ///
498 * Completes with a [ListReportTypesResponse]. 491 /// Completes with a [ListReportTypesResponse].
499 * 492 ///
500 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 493 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
501 * error. 494 /// an error.
502 * 495 ///
503 * If the used [http.Client] completes with an error when making a REST call, 496 /// If the used [http.Client] completes with an error when making a REST
504 * this method will complete with the same error. 497 /// call, this method will complete with the same error.
505 */ 498 async.Future<ListReportTypesResponse> list(
506 async.Future<ListReportTypesResponse> list({core.String onBehalfOfContentOwner , core.bool includeSystemManaged, core.String pageToken, core.int pageSize}) { 499 {core.String onBehalfOfContentOwner,
500 core.bool includeSystemManaged,
501 core.String pageToken,
502 core.int pageSize}) {
507 var _url = null; 503 var _url = null;
508 var _queryParams = new core.Map(); 504 var _queryParams = new core.Map();
509 var _uploadMedia = null; 505 var _uploadMedia = null;
510 var _uploadOptions = null; 506 var _uploadOptions = null;
511 var _downloadOptions = commons.DownloadOptions.Metadata; 507 var _downloadOptions = commons.DownloadOptions.Metadata;
512 var _body = null; 508 var _body = null;
513 509
514 if (onBehalfOfContentOwner != null) { 510 if (onBehalfOfContentOwner != null) {
515 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; 511 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner];
516 } 512 }
517 if (includeSystemManaged != null) { 513 if (includeSystemManaged != null) {
518 _queryParams["includeSystemManaged"] = ["${includeSystemManaged}"]; 514 _queryParams["includeSystemManaged"] = ["${includeSystemManaged}"];
519 } 515 }
520 if (pageToken != null) { 516 if (pageToken != null) {
521 _queryParams["pageToken"] = [pageToken]; 517 _queryParams["pageToken"] = [pageToken];
522 } 518 }
523 if (pageSize != null) { 519 if (pageSize != null) {
524 _queryParams["pageSize"] = ["${pageSize}"]; 520 _queryParams["pageSize"] = ["${pageSize}"];
525 } 521 }
526 522
527 _url = 'v1/reportTypes'; 523 _url = 'v1/reportTypes';
528 524
529 var _response = _requester.request(_url, 525 var _response = _requester.request(_url, "GET",
530 "GET", 526 body: _body,
531 body: _body, 527 queryParams: _queryParams,
532 queryParams: _queryParams, 528 uploadOptions: _uploadOptions,
533 uploadOptions: _uploadOptions, 529 uploadMedia: _uploadMedia,
534 uploadMedia: _uploadMedia, 530 downloadOptions: _downloadOptions);
535 downloadOptions: _downloadOptions);
536 return _response.then((data) => new ListReportTypesResponse.fromJson(data)); 531 return _response.then((data) => new ListReportTypesResponse.fromJson(data));
537 } 532 }
538
539 } 533 }
540 534
541 535 /// A generic empty message that you can re-use to avoid defining duplicated
542 536 /// empty messages in your APIs. A typical example is to use it as the request
543 /** 537 /// or the response type of an API method. For instance:
544 * A generic empty message that you can re-use to avoid defining duplicated 538 ///
545 * empty messages in your APIs. A typical example is to use it as the request 539 /// service Foo {
546 * or the response type of an API method. For instance: 540 /// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
547 * 541 /// }
548 * service Foo { 542 ///
549 * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); 543 /// The JSON representation for `Empty` is empty JSON object `{}`.
550 * }
551 *
552 * The JSON representation for `Empty` is empty JSON object `{}`.
553 */
554 class Empty { 544 class Empty {
555
556 Empty(); 545 Empty();
557 546
558 Empty.fromJson(core.Map _json) { 547 Empty.fromJson(core.Map _json) {}
559 }
560 548
561 core.Map<core.String, core.Object> toJson() { 549 core.Map<core.String, core.Object> toJson() {
562 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 550 final core.Map<core.String, core.Object> _json =
551 new core.Map<core.String, core.Object>();
563 return _json; 552 return _json;
564 } 553 }
565 } 554 }
566 555
567 /** A job creating reports of a specific type. */ 556 /// A job creating reports of a specific type.
568 class Job { 557 class Job {
569 /** The creation date/time of the job. */ 558 /// The creation date/time of the job.
570 core.String createTime; 559 core.String createTime;
571 /** 560
572 * The date/time when this job will expire/expired. After a job expired, no 561 /// The date/time when this job will expire/expired. After a job expired, no
573 * new reports are generated. 562 /// new reports are generated.
574 */
575 core.String expireTime; 563 core.String expireTime;
576 /** The server-generated ID of the job (max. 40 characters). */ 564
565 /// The server-generated ID of the job (max. 40 characters).
577 core.String id; 566 core.String id;
578 /** The name of the job (max. 100 characters). */ 567
568 /// The name of the job (max. 100 characters).
579 core.String name; 569 core.String name;
580 /** 570
581 * The type of reports this job creates. Corresponds to the ID of a 571 /// The type of reports this job creates. Corresponds to the ID of a
582 * ReportType. 572 /// ReportType.
583 */
584 core.String reportTypeId; 573 core.String reportTypeId;
585 /** 574
586 * True if this a system-managed job that cannot be modified by the user; 575 /// True if this a system-managed job that cannot be modified by the user;
587 * otherwise false. 576 /// otherwise false.
588 */
589 core.bool systemManaged; 577 core.bool systemManaged;
590 578
591 Job(); 579 Job();
592 580
593 Job.fromJson(core.Map _json) { 581 Job.fromJson(core.Map _json) {
594 if (_json.containsKey("createTime")) { 582 if (_json.containsKey("createTime")) {
595 createTime = _json["createTime"]; 583 createTime = _json["createTime"];
596 } 584 }
597 if (_json.containsKey("expireTime")) { 585 if (_json.containsKey("expireTime")) {
598 expireTime = _json["expireTime"]; 586 expireTime = _json["expireTime"];
599 } 587 }
600 if (_json.containsKey("id")) { 588 if (_json.containsKey("id")) {
601 id = _json["id"]; 589 id = _json["id"];
602 } 590 }
603 if (_json.containsKey("name")) { 591 if (_json.containsKey("name")) {
604 name = _json["name"]; 592 name = _json["name"];
605 } 593 }
606 if (_json.containsKey("reportTypeId")) { 594 if (_json.containsKey("reportTypeId")) {
607 reportTypeId = _json["reportTypeId"]; 595 reportTypeId = _json["reportTypeId"];
608 } 596 }
609 if (_json.containsKey("systemManaged")) { 597 if (_json.containsKey("systemManaged")) {
610 systemManaged = _json["systemManaged"]; 598 systemManaged = _json["systemManaged"];
611 } 599 }
612 } 600 }
613 601
614 core.Map<core.String, core.Object> toJson() { 602 core.Map<core.String, core.Object> toJson() {
615 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 603 final core.Map<core.String, core.Object> _json =
604 new core.Map<core.String, core.Object>();
616 if (createTime != null) { 605 if (createTime != null) {
617 _json["createTime"] = createTime; 606 _json["createTime"] = createTime;
618 } 607 }
619 if (expireTime != null) { 608 if (expireTime != null) {
620 _json["expireTime"] = expireTime; 609 _json["expireTime"] = expireTime;
621 } 610 }
622 if (id != null) { 611 if (id != null) {
623 _json["id"] = id; 612 _json["id"] = id;
624 } 613 }
625 if (name != null) { 614 if (name != null) {
626 _json["name"] = name; 615 _json["name"] = name;
627 } 616 }
628 if (reportTypeId != null) { 617 if (reportTypeId != null) {
629 _json["reportTypeId"] = reportTypeId; 618 _json["reportTypeId"] = reportTypeId;
630 } 619 }
631 if (systemManaged != null) { 620 if (systemManaged != null) {
632 _json["systemManaged"] = systemManaged; 621 _json["systemManaged"] = systemManaged;
633 } 622 }
634 return _json; 623 return _json;
635 } 624 }
636 } 625 }
637 626
638 /** Response message for ReportingService.ListJobs. */ 627 /// Response message for ReportingService.ListJobs.
639 class ListJobsResponse { 628 class ListJobsResponse {
640 /** The list of jobs. */ 629 /// The list of jobs.
641 core.List<Job> jobs; 630 core.List<Job> jobs;
642 /** 631
643 * A token to retrieve next page of results. 632 /// A token to retrieve next page of results.
644 * Pass this value in the 633 /// Pass this value in the
645 * ListJobsRequest.page_token 634 /// ListJobsRequest.page_token
646 * field in the subsequent call to `ListJobs` method to retrieve the next 635 /// field in the subsequent call to `ListJobs` method to retrieve the next
647 * page of results. 636 /// page of results.
648 */
649 core.String nextPageToken; 637 core.String nextPageToken;
650 638
651 ListJobsResponse(); 639 ListJobsResponse();
652 640
653 ListJobsResponse.fromJson(core.Map _json) { 641 ListJobsResponse.fromJson(core.Map _json) {
654 if (_json.containsKey("jobs")) { 642 if (_json.containsKey("jobs")) {
655 jobs = _json["jobs"].map((value) => new Job.fromJson(value)).toList(); 643 jobs = _json["jobs"].map((value) => new Job.fromJson(value)).toList();
656 } 644 }
657 if (_json.containsKey("nextPageToken")) { 645 if (_json.containsKey("nextPageToken")) {
658 nextPageToken = _json["nextPageToken"]; 646 nextPageToken = _json["nextPageToken"];
659 } 647 }
660 } 648 }
661 649
662 core.Map<core.String, core.Object> toJson() { 650 core.Map<core.String, core.Object> toJson() {
663 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 651 final core.Map<core.String, core.Object> _json =
652 new core.Map<core.String, core.Object>();
664 if (jobs != null) { 653 if (jobs != null) {
665 _json["jobs"] = jobs.map((value) => (value).toJson()).toList(); 654 _json["jobs"] = jobs.map((value) => (value).toJson()).toList();
666 } 655 }
667 if (nextPageToken != null) { 656 if (nextPageToken != null) {
668 _json["nextPageToken"] = nextPageToken; 657 _json["nextPageToken"] = nextPageToken;
669 } 658 }
670 return _json; 659 return _json;
671 } 660 }
672 } 661 }
673 662
674 /** Response message for ReportingService.ListReportTypes. */ 663 /// Response message for ReportingService.ListReportTypes.
675 class ListReportTypesResponse { 664 class ListReportTypesResponse {
676 /** 665 /// A token to retrieve next page of results.
677 * A token to retrieve next page of results. 666 /// Pass this value in the
678 * Pass this value in the 667 /// ListReportTypesRequest.page_token
679 * ListReportTypesRequest.page_token 668 /// field in the subsequent call to `ListReportTypes` method to retrieve the
680 * field in the subsequent call to `ListReportTypes` method to retrieve the 669 /// next
681 * next 670 /// page of results.
682 * page of results.
683 */
684 core.String nextPageToken; 671 core.String nextPageToken;
685 /** The list of report types. */ 672
673 /// The list of report types.
686 core.List<ReportType> reportTypes; 674 core.List<ReportType> reportTypes;
687 675
688 ListReportTypesResponse(); 676 ListReportTypesResponse();
689 677
690 ListReportTypesResponse.fromJson(core.Map _json) { 678 ListReportTypesResponse.fromJson(core.Map _json) {
691 if (_json.containsKey("nextPageToken")) { 679 if (_json.containsKey("nextPageToken")) {
692 nextPageToken = _json["nextPageToken"]; 680 nextPageToken = _json["nextPageToken"];
693 } 681 }
694 if (_json.containsKey("reportTypes")) { 682 if (_json.containsKey("reportTypes")) {
695 reportTypes = _json["reportTypes"].map((value) => new ReportType.fromJson( value)).toList(); 683 reportTypes = _json["reportTypes"]
684 .map((value) => new ReportType.fromJson(value))
685 .toList();
696 } 686 }
697 } 687 }
698 688
699 core.Map<core.String, core.Object> toJson() { 689 core.Map<core.String, core.Object> toJson() {
700 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 690 final core.Map<core.String, core.Object> _json =
691 new core.Map<core.String, core.Object>();
701 if (nextPageToken != null) { 692 if (nextPageToken != null) {
702 _json["nextPageToken"] = nextPageToken; 693 _json["nextPageToken"] = nextPageToken;
703 } 694 }
704 if (reportTypes != null) { 695 if (reportTypes != null) {
705 _json["reportTypes"] = reportTypes.map((value) => (value).toJson()).toList (); 696 _json["reportTypes"] =
697 reportTypes.map((value) => (value).toJson()).toList();
706 } 698 }
707 return _json; 699 return _json;
708 } 700 }
709 } 701 }
710 702
711 /** Response message for ReportingService.ListReports. */ 703 /// Response message for ReportingService.ListReports.
712 class ListReportsResponse { 704 class ListReportsResponse {
713 /** 705 /// A token to retrieve next page of results.
714 * A token to retrieve next page of results. 706 /// Pass this value in the
715 * Pass this value in the 707 /// ListReportsRequest.page_token
716 * ListReportsRequest.page_token 708 /// field in the subsequent call to `ListReports` method to retrieve the next
717 * field in the subsequent call to `ListReports` method to retrieve the next 709 /// page of results.
718 * page of results.
719 */
720 core.String nextPageToken; 710 core.String nextPageToken;
721 /** The list of report types. */ 711
712 /// The list of report types.
722 core.List<Report> reports; 713 core.List<Report> reports;
723 714
724 ListReportsResponse(); 715 ListReportsResponse();
725 716
726 ListReportsResponse.fromJson(core.Map _json) { 717 ListReportsResponse.fromJson(core.Map _json) {
727 if (_json.containsKey("nextPageToken")) { 718 if (_json.containsKey("nextPageToken")) {
728 nextPageToken = _json["nextPageToken"]; 719 nextPageToken = _json["nextPageToken"];
729 } 720 }
730 if (_json.containsKey("reports")) { 721 if (_json.containsKey("reports")) {
731 reports = _json["reports"].map((value) => new Report.fromJson(value)).toLi st(); 722 reports =
723 _json["reports"].map((value) => new Report.fromJson(value)).toList();
732 } 724 }
733 } 725 }
734 726
735 core.Map<core.String, core.Object> toJson() { 727 core.Map<core.String, core.Object> toJson() {
736 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 728 final core.Map<core.String, core.Object> _json =
729 new core.Map<core.String, core.Object>();
737 if (nextPageToken != null) { 730 if (nextPageToken != null) {
738 _json["nextPageToken"] = nextPageToken; 731 _json["nextPageToken"] = nextPageToken;
739 } 732 }
740 if (reports != null) { 733 if (reports != null) {
741 _json["reports"] = reports.map((value) => (value).toJson()).toList(); 734 _json["reports"] = reports.map((value) => (value).toJson()).toList();
742 } 735 }
743 return _json; 736 return _json;
744 } 737 }
745 } 738 }
746 739
747 /** Media resource. */ 740 /// Media resource.
748 class Media { 741 class Media {
749 /** Name of the media resource. */ 742 /// Name of the media resource.
750 core.String resourceName; 743 core.String resourceName;
751 744
752 Media(); 745 Media();
753 746
754 Media.fromJson(core.Map _json) { 747 Media.fromJson(core.Map _json) {
755 if (_json.containsKey("resourceName")) { 748 if (_json.containsKey("resourceName")) {
756 resourceName = _json["resourceName"]; 749 resourceName = _json["resourceName"];
757 } 750 }
758 } 751 }
759 752
760 core.Map<core.String, core.Object> toJson() { 753 core.Map<core.String, core.Object> toJson() {
761 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 754 final core.Map<core.String, core.Object> _json =
755 new core.Map<core.String, core.Object>();
762 if (resourceName != null) { 756 if (resourceName != null) {
763 _json["resourceName"] = resourceName; 757 _json["resourceName"] = resourceName;
764 } 758 }
765 return _json; 759 return _json;
766 } 760 }
767 } 761 }
768 762
769 /** 763 /// A report's metadata including the URL from which the report itself can be
770 * A report's metadata including the URL from which the report itself can be 764 /// downloaded.
771 * downloaded.
772 */
773 class Report { 765 class Report {
774 /** The date/time when this report was created. */ 766 /// The date/time when this report was created.
775 core.String createTime; 767 core.String createTime;
776 /** 768
777 * The URL from which the report can be downloaded (max. 1000 characters). 769 /// The URL from which the report can be downloaded (max. 1000 characters).
778 */
779 core.String downloadUrl; 770 core.String downloadUrl;
780 /** 771
781 * The end of the time period that the report instance covers. The value is 772 /// The end of the time period that the report instance covers. The value is
782 * exclusive. 773 /// exclusive.
783 */
784 core.String endTime; 774 core.String endTime;
785 /** The server-generated ID of the report. */ 775
776 /// The server-generated ID of the report.
786 core.String id; 777 core.String id;
787 /** The date/time when the job this report belongs to will expire/expired. */ 778
779 /// The date/time when the job this report belongs to will expire/expired.
788 core.String jobExpireTime; 780 core.String jobExpireTime;
789 /** The ID of the job that created this report. */ 781
782 /// The ID of the job that created this report.
790 core.String jobId; 783 core.String jobId;
791 /** 784
792 * The start of the time period that the report instance covers. The value is 785 /// The start of the time period that the report instance covers. The value
793 * inclusive. 786 /// is
794 */ 787 /// inclusive.
795 core.String startTime; 788 core.String startTime;
796 789
797 Report(); 790 Report();
798 791
799 Report.fromJson(core.Map _json) { 792 Report.fromJson(core.Map _json) {
800 if (_json.containsKey("createTime")) { 793 if (_json.containsKey("createTime")) {
801 createTime = _json["createTime"]; 794 createTime = _json["createTime"];
802 } 795 }
803 if (_json.containsKey("downloadUrl")) { 796 if (_json.containsKey("downloadUrl")) {
804 downloadUrl = _json["downloadUrl"]; 797 downloadUrl = _json["downloadUrl"];
805 } 798 }
806 if (_json.containsKey("endTime")) { 799 if (_json.containsKey("endTime")) {
807 endTime = _json["endTime"]; 800 endTime = _json["endTime"];
808 } 801 }
809 if (_json.containsKey("id")) { 802 if (_json.containsKey("id")) {
810 id = _json["id"]; 803 id = _json["id"];
811 } 804 }
812 if (_json.containsKey("jobExpireTime")) { 805 if (_json.containsKey("jobExpireTime")) {
813 jobExpireTime = _json["jobExpireTime"]; 806 jobExpireTime = _json["jobExpireTime"];
814 } 807 }
815 if (_json.containsKey("jobId")) { 808 if (_json.containsKey("jobId")) {
816 jobId = _json["jobId"]; 809 jobId = _json["jobId"];
817 } 810 }
818 if (_json.containsKey("startTime")) { 811 if (_json.containsKey("startTime")) {
819 startTime = _json["startTime"]; 812 startTime = _json["startTime"];
820 } 813 }
821 } 814 }
822 815
823 core.Map<core.String, core.Object> toJson() { 816 core.Map<core.String, core.Object> toJson() {
824 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 817 final core.Map<core.String, core.Object> _json =
818 new core.Map<core.String, core.Object>();
825 if (createTime != null) { 819 if (createTime != null) {
826 _json["createTime"] = createTime; 820 _json["createTime"] = createTime;
827 } 821 }
828 if (downloadUrl != null) { 822 if (downloadUrl != null) {
829 _json["downloadUrl"] = downloadUrl; 823 _json["downloadUrl"] = downloadUrl;
830 } 824 }
831 if (endTime != null) { 825 if (endTime != null) {
832 _json["endTime"] = endTime; 826 _json["endTime"] = endTime;
833 } 827 }
834 if (id != null) { 828 if (id != null) {
835 _json["id"] = id; 829 _json["id"] = id;
836 } 830 }
837 if (jobExpireTime != null) { 831 if (jobExpireTime != null) {
838 _json["jobExpireTime"] = jobExpireTime; 832 _json["jobExpireTime"] = jobExpireTime;
839 } 833 }
840 if (jobId != null) { 834 if (jobId != null) {
841 _json["jobId"] = jobId; 835 _json["jobId"] = jobId;
842 } 836 }
843 if (startTime != null) { 837 if (startTime != null) {
844 _json["startTime"] = startTime; 838 _json["startTime"] = startTime;
845 } 839 }
846 return _json; 840 return _json;
847 } 841 }
848 } 842 }
849 843
850 /** A report type. */ 844 /// A report type.
851 class ReportType { 845 class ReportType {
852 /** The date/time when this report type was/will be deprecated. */ 846 /// The date/time when this report type was/will be deprecated.
853 core.String deprecateTime; 847 core.String deprecateTime;
854 /** The ID of the report type (max. 100 characters). */ 848
849 /// The ID of the report type (max. 100 characters).
855 core.String id; 850 core.String id;
856 /** The name of the report type (max. 100 characters). */ 851
852 /// The name of the report type (max. 100 characters).
857 core.String name; 853 core.String name;
858 /** 854
859 * True if this a system-managed report type; otherwise false. Reporting jobs 855 /// True if this a system-managed report type; otherwise false. Reporting
860 * for system-managed report types are created automatically and can thus not 856 /// jobs
861 * be used in the `CreateJob` method. 857 /// for system-managed report types are created automatically and can thus
862 */ 858 /// not
859 /// be used in the `CreateJob` method.
863 core.bool systemManaged; 860 core.bool systemManaged;
864 861
865 ReportType(); 862 ReportType();
866 863
867 ReportType.fromJson(core.Map _json) { 864 ReportType.fromJson(core.Map _json) {
868 if (_json.containsKey("deprecateTime")) { 865 if (_json.containsKey("deprecateTime")) {
869 deprecateTime = _json["deprecateTime"]; 866 deprecateTime = _json["deprecateTime"];
870 } 867 }
871 if (_json.containsKey("id")) { 868 if (_json.containsKey("id")) {
872 id = _json["id"]; 869 id = _json["id"];
873 } 870 }
874 if (_json.containsKey("name")) { 871 if (_json.containsKey("name")) {
875 name = _json["name"]; 872 name = _json["name"];
876 } 873 }
877 if (_json.containsKey("systemManaged")) { 874 if (_json.containsKey("systemManaged")) {
878 systemManaged = _json["systemManaged"]; 875 systemManaged = _json["systemManaged"];
879 } 876 }
880 } 877 }
881 878
882 core.Map<core.String, core.Object> toJson() { 879 core.Map<core.String, core.Object> toJson() {
883 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 880 final core.Map<core.String, core.Object> _json =
881 new core.Map<core.String, core.Object>();
884 if (deprecateTime != null) { 882 if (deprecateTime != null) {
885 _json["deprecateTime"] = deprecateTime; 883 _json["deprecateTime"] = deprecateTime;
886 } 884 }
887 if (id != null) { 885 if (id != null) {
888 _json["id"] = id; 886 _json["id"] = id;
889 } 887 }
890 if (name != null) { 888 if (name != null) {
891 _json["name"] = name; 889 _json["name"] = name;
892 } 890 }
893 if (systemManaged != null) { 891 if (systemManaged != null) {
894 _json["systemManaged"] = systemManaged; 892 _json["systemManaged"] = systemManaged;
895 } 893 }
896 return _json; 894 return _json;
897 } 895 }
898 } 896 }
OLDNEW
« no previous file with comments | « generated/googleapis/lib/youtubeanalytics/v1.dart ('k') | generated/googleapis/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698