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

Side by Side Diff: generated/googleapis/lib/adsensehost/v4_1.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/adsense/v1_4.dart ('k') | generated/googleapis/lib/analytics/v3.dart » ('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.adsensehost.v4_1; 3 library googleapis.adsensehost.v4_1;
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 adsensehost/v4.1'; 15 const core.String USER_AGENT = 'dart-api-client adsensehost/v4.1';
16 16
17 /** 17 /// Generates performance reports, generates ad codes, and provides publisher
18 * Generates performance reports, generates ad codes, and provides publisher 18 /// management capabilities for AdSense Hosts.
19 * management capabilities for AdSense Hosts.
20 */
21 class AdsensehostApi { 19 class AdsensehostApi {
22 /** View and manage your AdSense host data and associated accounts */ 20 /// View and manage your AdSense host data and associated accounts
23 static const AdsensehostScope = "https://www.googleapis.com/auth/adsensehost"; 21 static const AdsensehostScope = "https://www.googleapis.com/auth/adsensehost";
24 22
25
26 final commons.ApiRequester _requester; 23 final commons.ApiRequester _requester;
27 24
28 AccountsResourceApi get accounts => new AccountsResourceApi(_requester); 25 AccountsResourceApi get accounts => new AccountsResourceApi(_requester);
29 AdclientsResourceApi get adclients => new AdclientsResourceApi(_requester); 26 AdclientsResourceApi get adclients => new AdclientsResourceApi(_requester);
30 AssociationsessionsResourceApi get associationsessions => new Associationsessi onsResourceApi(_requester); 27 AssociationsessionsResourceApi get associationsessions =>
31 CustomchannelsResourceApi get customchannels => new CustomchannelsResourceApi( _requester); 28 new AssociationsessionsResourceApi(_requester);
29 CustomchannelsResourceApi get customchannels =>
30 new CustomchannelsResourceApi(_requester);
32 ReportsResourceApi get reports => new ReportsResourceApi(_requester); 31 ReportsResourceApi get reports => new ReportsResourceApi(_requester);
33 UrlchannelsResourceApi get urlchannels => new UrlchannelsResourceApi(_requeste r); 32 UrlchannelsResourceApi get urlchannels =>
33 new UrlchannelsResourceApi(_requester);
34 34
35 AdsensehostApi(http.Client client, {core.String rootUrl: "https://www.googleap is.com/", core.String servicePath: "adsensehost/v4.1/"}) : 35 AdsensehostApi(http.Client client,
36 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A GENT); 36 {core.String rootUrl: "https://www.googleapis.com/",
37 core.String servicePath: "adsensehost/v4.1/"})
38 : _requester =
39 new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT);
37 } 40 }
38 41
39
40 class AccountsResourceApi { 42 class AccountsResourceApi {
41 final commons.ApiRequester _requester; 43 final commons.ApiRequester _requester;
42 44
43 AccountsAdclientsResourceApi get adclients => new AccountsAdclientsResourceApi (_requester); 45 AccountsAdclientsResourceApi get adclients =>
44 AccountsAdunitsResourceApi get adunits => new AccountsAdunitsResourceApi(_requ ester); 46 new AccountsAdclientsResourceApi(_requester);
45 AccountsReportsResourceApi get reports => new AccountsReportsResourceApi(_requ ester); 47 AccountsAdunitsResourceApi get adunits =>
48 new AccountsAdunitsResourceApi(_requester);
49 AccountsReportsResourceApi get reports =>
50 new AccountsReportsResourceApi(_requester);
46 51
47 AccountsResourceApi(commons.ApiRequester client) : 52 AccountsResourceApi(commons.ApiRequester client) : _requester = client;
48 _requester = client;
49 53
50 /** 54 /// Get information about the selected associated AdSense account.
51 * Get information about the selected associated AdSense account. 55 ///
52 * 56 /// Request parameters:
53 * Request parameters: 57 ///
54 * 58 /// [accountId] - Account to get information about.
55 * [accountId] - Account to get information about. 59 ///
56 * 60 /// Completes with a [Account].
57 * Completes with a [Account]. 61 ///
58 * 62 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
59 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 63 /// an error.
60 * error. 64 ///
61 * 65 /// If the used [http.Client] completes with an error when making a REST
62 * If the used [http.Client] completes with an error when making a REST call, 66 /// call, this method will complete with the same error.
63 * this method will complete with the same error.
64 */
65 async.Future<Account> get(core.String accountId) { 67 async.Future<Account> get(core.String accountId) {
66 var _url = null; 68 var _url = null;
67 var _queryParams = new core.Map(); 69 var _queryParams = new core.Map();
68 var _uploadMedia = null; 70 var _uploadMedia = null;
69 var _uploadOptions = null; 71 var _uploadOptions = null;
70 var _downloadOptions = commons.DownloadOptions.Metadata; 72 var _downloadOptions = commons.DownloadOptions.Metadata;
71 var _body = null; 73 var _body = null;
72 74
73 if (accountId == null) { 75 if (accountId == null) {
74 throw new core.ArgumentError("Parameter accountId is required."); 76 throw new core.ArgumentError("Parameter accountId is required.");
75 } 77 }
76 78
77 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId'); 79 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId');
78 80
79 var _response = _requester.request(_url, 81 var _response = _requester.request(_url, "GET",
80 "GET", 82 body: _body,
81 body: _body, 83 queryParams: _queryParams,
82 queryParams: _queryParams, 84 uploadOptions: _uploadOptions,
83 uploadOptions: _uploadOptions, 85 uploadMedia: _uploadMedia,
84 uploadMedia: _uploadMedia, 86 downloadOptions: _downloadOptions);
85 downloadOptions: _downloadOptions);
86 return _response.then((data) => new Account.fromJson(data)); 87 return _response.then((data) => new Account.fromJson(data));
87 } 88 }
88 89
89 /** 90 /// List hosted accounts associated with this AdSense account by ad client
90 * List hosted accounts associated with this AdSense account by ad client id. 91 /// id.
91 * 92 ///
92 * Request parameters: 93 /// Request parameters:
93 * 94 ///
94 * [filterAdClientId] - Ad clients to list accounts for. 95 /// [filterAdClientId] - Ad clients to list accounts for.
95 * 96 ///
96 * Completes with a [Accounts]. 97 /// Completes with a [Accounts].
97 * 98 ///
98 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 99 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
99 * error. 100 /// an error.
100 * 101 ///
101 * If the used [http.Client] completes with an error when making a REST call, 102 /// If the used [http.Client] completes with an error when making a REST
102 * this method will complete with the same error. 103 /// call, this method will complete with the same error.
103 */
104 async.Future<Accounts> list(core.List<core.String> filterAdClientId) { 104 async.Future<Accounts> list(core.List<core.String> filterAdClientId) {
105 var _url = null; 105 var _url = null;
106 var _queryParams = new core.Map(); 106 var _queryParams = new core.Map();
107 var _uploadMedia = null; 107 var _uploadMedia = null;
108 var _uploadOptions = null; 108 var _uploadOptions = null;
109 var _downloadOptions = commons.DownloadOptions.Metadata; 109 var _downloadOptions = commons.DownloadOptions.Metadata;
110 var _body = null; 110 var _body = null;
111 111
112 if (filterAdClientId == null || filterAdClientId.isEmpty) { 112 if (filterAdClientId == null || filterAdClientId.isEmpty) {
113 throw new core.ArgumentError("Parameter filterAdClientId is required."); 113 throw new core.ArgumentError("Parameter filterAdClientId is required.");
114 } 114 }
115 _queryParams["filterAdClientId"] = filterAdClientId; 115 _queryParams["filterAdClientId"] = filterAdClientId;
116 116
117 _url = 'accounts'; 117 _url = 'accounts';
118 118
119 var _response = _requester.request(_url, 119 var _response = _requester.request(_url, "GET",
120 "GET", 120 body: _body,
121 body: _body, 121 queryParams: _queryParams,
122 queryParams: _queryParams, 122 uploadOptions: _uploadOptions,
123 uploadOptions: _uploadOptions, 123 uploadMedia: _uploadMedia,
124 uploadMedia: _uploadMedia, 124 downloadOptions: _downloadOptions);
125 downloadOptions: _downloadOptions);
126 return _response.then((data) => new Accounts.fromJson(data)); 125 return _response.then((data) => new Accounts.fromJson(data));
127 } 126 }
128
129 } 127 }
130 128
131
132 class AccountsAdclientsResourceApi { 129 class AccountsAdclientsResourceApi {
133 final commons.ApiRequester _requester; 130 final commons.ApiRequester _requester;
134 131
135 AccountsAdclientsResourceApi(commons.ApiRequester client) : 132 AccountsAdclientsResourceApi(commons.ApiRequester client)
136 _requester = client; 133 : _requester = client;
137 134
138 /** 135 /// Get information about one of the ad clients in the specified publisher's
139 * Get information about one of the ad clients in the specified publisher's 136 /// AdSense account.
140 * AdSense account. 137 ///
141 * 138 /// Request parameters:
142 * Request parameters: 139 ///
143 * 140 /// [accountId] - Account which contains the ad client.
144 * [accountId] - Account which contains the ad client. 141 ///
145 * 142 /// [adClientId] - Ad client to get.
146 * [adClientId] - Ad client to get. 143 ///
147 * 144 /// Completes with a [AdClient].
148 * Completes with a [AdClient]. 145 ///
149 * 146 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
150 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 147 /// an error.
151 * error. 148 ///
152 * 149 /// If the used [http.Client] completes with an error when making a REST
153 * If the used [http.Client] completes with an error when making a REST call, 150 /// call, this method will complete with the same error.
154 * this method will complete with the same error.
155 */
156 async.Future<AdClient> get(core.String accountId, core.String adClientId) { 151 async.Future<AdClient> get(core.String accountId, core.String adClientId) {
157 var _url = null; 152 var _url = null;
158 var _queryParams = new core.Map(); 153 var _queryParams = new core.Map();
159 var _uploadMedia = null; 154 var _uploadMedia = null;
160 var _uploadOptions = null; 155 var _uploadOptions = null;
161 var _downloadOptions = commons.DownloadOptions.Metadata; 156 var _downloadOptions = commons.DownloadOptions.Metadata;
162 var _body = null; 157 var _body = null;
163 158
164 if (accountId == null) { 159 if (accountId == null) {
165 throw new core.ArgumentError("Parameter accountId is required."); 160 throw new core.ArgumentError("Parameter accountId is required.");
166 } 161 }
167 if (adClientId == null) { 162 if (adClientId == null) {
168 throw new core.ArgumentError("Parameter adClientId is required."); 163 throw new core.ArgumentError("Parameter adClientId is required.");
169 } 164 }
170 165
171 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/adclien ts/' + commons.Escaper.ecapeVariable('$adClientId'); 166 _url = 'accounts/' +
167 commons.Escaper.ecapeVariable('$accountId') +
168 '/adclients/' +
169 commons.Escaper.ecapeVariable('$adClientId');
172 170
173 var _response = _requester.request(_url, 171 var _response = _requester.request(_url, "GET",
174 "GET", 172 body: _body,
175 body: _body, 173 queryParams: _queryParams,
176 queryParams: _queryParams, 174 uploadOptions: _uploadOptions,
177 uploadOptions: _uploadOptions, 175 uploadMedia: _uploadMedia,
178 uploadMedia: _uploadMedia, 176 downloadOptions: _downloadOptions);
179 downloadOptions: _downloadOptions);
180 return _response.then((data) => new AdClient.fromJson(data)); 177 return _response.then((data) => new AdClient.fromJson(data));
181 } 178 }
182 179
183 /** 180 /// List all hosted ad clients in the specified hosted account.
184 * List all hosted ad clients in the specified hosted account. 181 ///
185 * 182 /// Request parameters:
186 * Request parameters: 183 ///
187 * 184 /// [accountId] - Account for which to list ad clients.
188 * [accountId] - Account for which to list ad clients. 185 ///
189 * 186 /// [maxResults] - The maximum number of ad clients to include in the
190 * [maxResults] - The maximum number of ad clients to include in the response, 187 /// response, used for paging.
191 * used for paging. 188 /// Value must be between "0" and "10000".
192 * Value must be between "0" and "10000". 189 ///
193 * 190 /// [pageToken] - A continuation token, used to page through ad clients. To
194 * [pageToken] - A continuation token, used to page through ad clients. To 191 /// retrieve the next page, set this parameter to the value of
195 * retrieve the next page, set this parameter to the value of "nextPageToken" 192 /// "nextPageToken" from the previous response.
196 * from the previous response. 193 ///
197 * 194 /// Completes with a [AdClients].
198 * Completes with a [AdClients]. 195 ///
199 * 196 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
200 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 197 /// an error.
201 * error. 198 ///
202 * 199 /// If the used [http.Client] completes with an error when making a REST
203 * If the used [http.Client] completes with an error when making a REST call, 200 /// call, this method will complete with the same error.
204 * this method will complete with the same error. 201 async.Future<AdClients> list(core.String accountId,
205 */ 202 {core.int maxResults, core.String pageToken}) {
206 async.Future<AdClients> list(core.String accountId, {core.int maxResults, core .String pageToken}) {
207 var _url = null; 203 var _url = null;
208 var _queryParams = new core.Map(); 204 var _queryParams = new core.Map();
209 var _uploadMedia = null; 205 var _uploadMedia = null;
210 var _uploadOptions = null; 206 var _uploadOptions = null;
211 var _downloadOptions = commons.DownloadOptions.Metadata; 207 var _downloadOptions = commons.DownloadOptions.Metadata;
212 var _body = null; 208 var _body = null;
213 209
214 if (accountId == null) { 210 if (accountId == null) {
215 throw new core.ArgumentError("Parameter accountId is required."); 211 throw new core.ArgumentError("Parameter accountId is required.");
216 } 212 }
217 if (maxResults != null) { 213 if (maxResults != null) {
218 _queryParams["maxResults"] = ["${maxResults}"]; 214 _queryParams["maxResults"] = ["${maxResults}"];
219 } 215 }
220 if (pageToken != null) { 216 if (pageToken != null) {
221 _queryParams["pageToken"] = [pageToken]; 217 _queryParams["pageToken"] = [pageToken];
222 } 218 }
223 219
224 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/adclien ts'; 220 _url = 'accounts/' +
221 commons.Escaper.ecapeVariable('$accountId') +
222 '/adclients';
225 223
226 var _response = _requester.request(_url, 224 var _response = _requester.request(_url, "GET",
227 "GET", 225 body: _body,
228 body: _body, 226 queryParams: _queryParams,
229 queryParams: _queryParams, 227 uploadOptions: _uploadOptions,
230 uploadOptions: _uploadOptions, 228 uploadMedia: _uploadMedia,
231 uploadMedia: _uploadMedia, 229 downloadOptions: _downloadOptions);
232 downloadOptions: _downloadOptions);
233 return _response.then((data) => new AdClients.fromJson(data)); 230 return _response.then((data) => new AdClients.fromJson(data));
234 } 231 }
235
236 } 232 }
237 233
238
239 class AccountsAdunitsResourceApi { 234 class AccountsAdunitsResourceApi {
240 final commons.ApiRequester _requester; 235 final commons.ApiRequester _requester;
241 236
242 AccountsAdunitsResourceApi(commons.ApiRequester client) : 237 AccountsAdunitsResourceApi(commons.ApiRequester client) : _requester = client;
243 _requester = client;
244 238
245 /** 239 /// Delete the specified ad unit from the specified publisher AdSense
246 * Delete the specified ad unit from the specified publisher AdSense account. 240 /// account.
247 * 241 ///
248 * Request parameters: 242 /// Request parameters:
249 * 243 ///
250 * [accountId] - Account which contains the ad unit. 244 /// [accountId] - Account which contains the ad unit.
251 * 245 ///
252 * [adClientId] - Ad client for which to get ad unit. 246 /// [adClientId] - Ad client for which to get ad unit.
253 * 247 ///
254 * [adUnitId] - Ad unit to delete. 248 /// [adUnitId] - Ad unit to delete.
255 * 249 ///
256 * Completes with a [AdUnit]. 250 /// Completes with a [AdUnit].
257 * 251 ///
258 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 252 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
259 * error. 253 /// an error.
260 * 254 ///
261 * If the used [http.Client] completes with an error when making a REST call, 255 /// If the used [http.Client] completes with an error when making a REST
262 * this method will complete with the same error. 256 /// call, this method will complete with the same error.
263 */ 257 async.Future<AdUnit> delete(
264 async.Future<AdUnit> delete(core.String accountId, core.String adClientId, cor e.String adUnitId) { 258 core.String accountId, core.String adClientId, core.String adUnitId) {
265 var _url = null; 259 var _url = null;
266 var _queryParams = new core.Map(); 260 var _queryParams = new core.Map();
267 var _uploadMedia = null; 261 var _uploadMedia = null;
268 var _uploadOptions = null; 262 var _uploadOptions = null;
269 var _downloadOptions = commons.DownloadOptions.Metadata; 263 var _downloadOptions = commons.DownloadOptions.Metadata;
270 var _body = null; 264 var _body = null;
271 265
272 if (accountId == null) { 266 if (accountId == null) {
273 throw new core.ArgumentError("Parameter accountId is required."); 267 throw new core.ArgumentError("Parameter accountId is required.");
274 } 268 }
275 if (adClientId == null) { 269 if (adClientId == null) {
276 throw new core.ArgumentError("Parameter adClientId is required."); 270 throw new core.ArgumentError("Parameter adClientId is required.");
277 } 271 }
278 if (adUnitId == null) { 272 if (adUnitId == null) {
279 throw new core.ArgumentError("Parameter adUnitId is required."); 273 throw new core.ArgumentError("Parameter adUnitId is required.");
280 } 274 }
281 275
282 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/adclien ts/' + commons.Escaper.ecapeVariable('$adClientId') + '/adunits/' + commons.Esca per.ecapeVariable('$adUnitId'); 276 _url = 'accounts/' +
277 commons.Escaper.ecapeVariable('$accountId') +
278 '/adclients/' +
279 commons.Escaper.ecapeVariable('$adClientId') +
280 '/adunits/' +
281 commons.Escaper.ecapeVariable('$adUnitId');
283 282
284 var _response = _requester.request(_url, 283 var _response = _requester.request(_url, "DELETE",
285 "DELETE", 284 body: _body,
286 body: _body, 285 queryParams: _queryParams,
287 queryParams: _queryParams, 286 uploadOptions: _uploadOptions,
288 uploadOptions: _uploadOptions, 287 uploadMedia: _uploadMedia,
289 uploadMedia: _uploadMedia, 288 downloadOptions: _downloadOptions);
290 downloadOptions: _downloadOptions);
291 return _response.then((data) => new AdUnit.fromJson(data)); 289 return _response.then((data) => new AdUnit.fromJson(data));
292 } 290 }
293 291
294 /** 292 /// Get the specified host ad unit in this AdSense account.
295 * Get the specified host ad unit in this AdSense account. 293 ///
296 * 294 /// Request parameters:
297 * Request parameters: 295 ///
298 * 296 /// [accountId] - Account which contains the ad unit.
299 * [accountId] - Account which contains the ad unit. 297 ///
300 * 298 /// [adClientId] - Ad client for which to get ad unit.
301 * [adClientId] - Ad client for which to get ad unit. 299 ///
302 * 300 /// [adUnitId] - Ad unit to get.
303 * [adUnitId] - Ad unit to get. 301 ///
304 * 302 /// Completes with a [AdUnit].
305 * Completes with a [AdUnit]. 303 ///
306 * 304 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
307 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 305 /// an error.
308 * error. 306 ///
309 * 307 /// If the used [http.Client] completes with an error when making a REST
310 * If the used [http.Client] completes with an error when making a REST call, 308 /// call, this method will complete with the same error.
311 * this method will complete with the same error. 309 async.Future<AdUnit> get(
312 */ 310 core.String accountId, core.String adClientId, core.String adUnitId) {
313 async.Future<AdUnit> get(core.String accountId, core.String adClientId, core.S tring adUnitId) {
314 var _url = null; 311 var _url = null;
315 var _queryParams = new core.Map(); 312 var _queryParams = new core.Map();
316 var _uploadMedia = null; 313 var _uploadMedia = null;
317 var _uploadOptions = null; 314 var _uploadOptions = null;
318 var _downloadOptions = commons.DownloadOptions.Metadata; 315 var _downloadOptions = commons.DownloadOptions.Metadata;
319 var _body = null; 316 var _body = null;
320 317
321 if (accountId == null) { 318 if (accountId == null) {
322 throw new core.ArgumentError("Parameter accountId is required."); 319 throw new core.ArgumentError("Parameter accountId is required.");
323 } 320 }
324 if (adClientId == null) { 321 if (adClientId == null) {
325 throw new core.ArgumentError("Parameter adClientId is required."); 322 throw new core.ArgumentError("Parameter adClientId is required.");
326 } 323 }
327 if (adUnitId == null) { 324 if (adUnitId == null) {
328 throw new core.ArgumentError("Parameter adUnitId is required."); 325 throw new core.ArgumentError("Parameter adUnitId is required.");
329 } 326 }
330 327
331 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/adclien ts/' + commons.Escaper.ecapeVariable('$adClientId') + '/adunits/' + commons.Esca per.ecapeVariable('$adUnitId'); 328 _url = 'accounts/' +
329 commons.Escaper.ecapeVariable('$accountId') +
330 '/adclients/' +
331 commons.Escaper.ecapeVariable('$adClientId') +
332 '/adunits/' +
333 commons.Escaper.ecapeVariable('$adUnitId');
332 334
333 var _response = _requester.request(_url, 335 var _response = _requester.request(_url, "GET",
334 "GET", 336 body: _body,
335 body: _body, 337 queryParams: _queryParams,
336 queryParams: _queryParams, 338 uploadOptions: _uploadOptions,
337 uploadOptions: _uploadOptions, 339 uploadMedia: _uploadMedia,
338 uploadMedia: _uploadMedia, 340 downloadOptions: _downloadOptions);
339 downloadOptions: _downloadOptions);
340 return _response.then((data) => new AdUnit.fromJson(data)); 341 return _response.then((data) => new AdUnit.fromJson(data));
341 } 342 }
342 343
343 /** 344 /// Get ad code for the specified ad unit, attaching the specified host
344 * Get ad code for the specified ad unit, attaching the specified host custom 345 /// custom channels.
345 * channels. 346 ///
346 * 347 /// Request parameters:
347 * Request parameters: 348 ///
348 * 349 /// [accountId] - Account which contains the ad client.
349 * [accountId] - Account which contains the ad client. 350 ///
350 * 351 /// [adClientId] - Ad client with contains the ad unit.
351 * [adClientId] - Ad client with contains the ad unit. 352 ///
352 * 353 /// [adUnitId] - Ad unit to get the code for.
353 * [adUnitId] - Ad unit to get the code for. 354 ///
354 * 355 /// [hostCustomChannelId] - Host custom channel to attach to the ad code.
355 * [hostCustomChannelId] - Host custom channel to attach to the ad code. 356 ///
356 * 357 /// Completes with a [AdCode].
357 * Completes with a [AdCode]. 358 ///
358 * 359 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
359 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 360 /// an error.
360 * error. 361 ///
361 * 362 /// If the used [http.Client] completes with an error when making a REST
362 * If the used [http.Client] completes with an error when making a REST call, 363 /// call, this method will complete with the same error.
363 * this method will complete with the same error. 364 async.Future<AdCode> getAdCode(
364 */ 365 core.String accountId, core.String adClientId, core.String adUnitId,
365 async.Future<AdCode> getAdCode(core.String accountId, core.String adClientId, core.String adUnitId, {core.List<core.String> hostCustomChannelId}) { 366 {core.List<core.String> hostCustomChannelId}) {
366 var _url = null; 367 var _url = null;
367 var _queryParams = new core.Map(); 368 var _queryParams = new core.Map();
368 var _uploadMedia = null; 369 var _uploadMedia = null;
369 var _uploadOptions = null; 370 var _uploadOptions = null;
370 var _downloadOptions = commons.DownloadOptions.Metadata; 371 var _downloadOptions = commons.DownloadOptions.Metadata;
371 var _body = null; 372 var _body = null;
372 373
373 if (accountId == null) { 374 if (accountId == null) {
374 throw new core.ArgumentError("Parameter accountId is required."); 375 throw new core.ArgumentError("Parameter accountId is required.");
375 } 376 }
376 if (adClientId == null) { 377 if (adClientId == null) {
377 throw new core.ArgumentError("Parameter adClientId is required."); 378 throw new core.ArgumentError("Parameter adClientId is required.");
378 } 379 }
379 if (adUnitId == null) { 380 if (adUnitId == null) {
380 throw new core.ArgumentError("Parameter adUnitId is required."); 381 throw new core.ArgumentError("Parameter adUnitId is required.");
381 } 382 }
382 if (hostCustomChannelId != null) { 383 if (hostCustomChannelId != null) {
383 _queryParams["hostCustomChannelId"] = hostCustomChannelId; 384 _queryParams["hostCustomChannelId"] = hostCustomChannelId;
384 } 385 }
385 386
386 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/adclien ts/' + commons.Escaper.ecapeVariable('$adClientId') + '/adunits/' + commons.Esca per.ecapeVariable('$adUnitId') + '/adcode'; 387 _url = 'accounts/' +
388 commons.Escaper.ecapeVariable('$accountId') +
389 '/adclients/' +
390 commons.Escaper.ecapeVariable('$adClientId') +
391 '/adunits/' +
392 commons.Escaper.ecapeVariable('$adUnitId') +
393 '/adcode';
387 394
388 var _response = _requester.request(_url, 395 var _response = _requester.request(_url, "GET",
389 "GET", 396 body: _body,
390 body: _body, 397 queryParams: _queryParams,
391 queryParams: _queryParams, 398 uploadOptions: _uploadOptions,
392 uploadOptions: _uploadOptions, 399 uploadMedia: _uploadMedia,
393 uploadMedia: _uploadMedia, 400 downloadOptions: _downloadOptions);
394 downloadOptions: _downloadOptions);
395 return _response.then((data) => new AdCode.fromJson(data)); 401 return _response.then((data) => new AdCode.fromJson(data));
396 } 402 }
397 403
398 /** 404 /// Insert the supplied ad unit into the specified publisher AdSense account.
399 * Insert the supplied ad unit into the specified publisher AdSense account. 405 ///
400 * 406 /// [request] - The metadata request object.
401 * [request] - The metadata request object. 407 ///
402 * 408 /// Request parameters:
403 * Request parameters: 409 ///
404 * 410 /// [accountId] - Account which will contain the ad unit.
405 * [accountId] - Account which will contain the ad unit. 411 ///
406 * 412 /// [adClientId] - Ad client into which to insert the ad unit.
407 * [adClientId] - Ad client into which to insert the ad unit. 413 ///
408 * 414 /// Completes with a [AdUnit].
409 * Completes with a [AdUnit]. 415 ///
410 * 416 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
411 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 417 /// an error.
412 * error. 418 ///
413 * 419 /// If the used [http.Client] completes with an error when making a REST
414 * If the used [http.Client] completes with an error when making a REST call, 420 /// call, this method will complete with the same error.
415 * this method will complete with the same error. 421 async.Future<AdUnit> insert(
416 */ 422 AdUnit request, core.String accountId, core.String adClientId) {
417 async.Future<AdUnit> insert(AdUnit request, core.String accountId, core.String adClientId) {
418 var _url = null; 423 var _url = null;
419 var _queryParams = new core.Map(); 424 var _queryParams = new core.Map();
420 var _uploadMedia = null; 425 var _uploadMedia = null;
421 var _uploadOptions = null; 426 var _uploadOptions = null;
422 var _downloadOptions = commons.DownloadOptions.Metadata; 427 var _downloadOptions = commons.DownloadOptions.Metadata;
423 var _body = null; 428 var _body = null;
424 429
425 if (request != null) { 430 if (request != null) {
426 _body = convert.JSON.encode((request).toJson()); 431 _body = convert.JSON.encode((request).toJson());
427 } 432 }
428 if (accountId == null) { 433 if (accountId == null) {
429 throw new core.ArgumentError("Parameter accountId is required."); 434 throw new core.ArgumentError("Parameter accountId is required.");
430 } 435 }
431 if (adClientId == null) { 436 if (adClientId == null) {
432 throw new core.ArgumentError("Parameter adClientId is required."); 437 throw new core.ArgumentError("Parameter adClientId is required.");
433 } 438 }
434 439
435 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/adclien ts/' + commons.Escaper.ecapeVariable('$adClientId') + '/adunits'; 440 _url = 'accounts/' +
441 commons.Escaper.ecapeVariable('$accountId') +
442 '/adclients/' +
443 commons.Escaper.ecapeVariable('$adClientId') +
444 '/adunits';
436 445
437 var _response = _requester.request(_url, 446 var _response = _requester.request(_url, "POST",
438 "POST", 447 body: _body,
439 body: _body, 448 queryParams: _queryParams,
440 queryParams: _queryParams, 449 uploadOptions: _uploadOptions,
441 uploadOptions: _uploadOptions, 450 uploadMedia: _uploadMedia,
442 uploadMedia: _uploadMedia, 451 downloadOptions: _downloadOptions);
443 downloadOptions: _downloadOptions);
444 return _response.then((data) => new AdUnit.fromJson(data)); 452 return _response.then((data) => new AdUnit.fromJson(data));
445 } 453 }
446 454
447 /** 455 /// List all ad units in the specified publisher's AdSense account.
448 * List all ad units in the specified publisher's AdSense account. 456 ///
449 * 457 /// Request parameters:
450 * Request parameters: 458 ///
451 * 459 /// [accountId] - Account which contains the ad client.
452 * [accountId] - Account which contains the ad client. 460 ///
453 * 461 /// [adClientId] - Ad client for which to list ad units.
454 * [adClientId] - Ad client for which to list ad units. 462 ///
455 * 463 /// [includeInactive] - Whether to include inactive ad units. Default: true.
456 * [includeInactive] - Whether to include inactive ad units. Default: true. 464 ///
457 * 465 /// [maxResults] - The maximum number of ad units to include in the response,
458 * [maxResults] - The maximum number of ad units to include in the response, 466 /// used for paging.
459 * used for paging. 467 /// Value must be between "0" and "10000".
460 * Value must be between "0" and "10000". 468 ///
461 * 469 /// [pageToken] - A continuation token, used to page through ad units. To
462 * [pageToken] - A continuation token, used to page through ad units. To 470 /// retrieve the next page, set this parameter to the value of
463 * retrieve the next page, set this parameter to the value of "nextPageToken" 471 /// "nextPageToken" from the previous response.
464 * from the previous response. 472 ///
465 * 473 /// Completes with a [AdUnits].
466 * Completes with a [AdUnits]. 474 ///
467 * 475 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
468 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 476 /// an error.
469 * error. 477 ///
470 * 478 /// If the used [http.Client] completes with an error when making a REST
471 * If the used [http.Client] completes with an error when making a REST call, 479 /// call, this method will complete with the same error.
472 * this method will complete with the same error. 480 async.Future<AdUnits> list(core.String accountId, core.String adClientId,
473 */ 481 {core.bool includeInactive, core.int maxResults, core.String pageToken}) {
474 async.Future<AdUnits> list(core.String accountId, core.String adClientId, {cor e.bool includeInactive, core.int maxResults, core.String pageToken}) {
475 var _url = null; 482 var _url = null;
476 var _queryParams = new core.Map(); 483 var _queryParams = new core.Map();
477 var _uploadMedia = null; 484 var _uploadMedia = null;
478 var _uploadOptions = null; 485 var _uploadOptions = null;
479 var _downloadOptions = commons.DownloadOptions.Metadata; 486 var _downloadOptions = commons.DownloadOptions.Metadata;
480 var _body = null; 487 var _body = null;
481 488
482 if (accountId == null) { 489 if (accountId == null) {
483 throw new core.ArgumentError("Parameter accountId is required."); 490 throw new core.ArgumentError("Parameter accountId is required.");
484 } 491 }
485 if (adClientId == null) { 492 if (adClientId == null) {
486 throw new core.ArgumentError("Parameter adClientId is required."); 493 throw new core.ArgumentError("Parameter adClientId is required.");
487 } 494 }
488 if (includeInactive != null) { 495 if (includeInactive != null) {
489 _queryParams["includeInactive"] = ["${includeInactive}"]; 496 _queryParams["includeInactive"] = ["${includeInactive}"];
490 } 497 }
491 if (maxResults != null) { 498 if (maxResults != null) {
492 _queryParams["maxResults"] = ["${maxResults}"]; 499 _queryParams["maxResults"] = ["${maxResults}"];
493 } 500 }
494 if (pageToken != null) { 501 if (pageToken != null) {
495 _queryParams["pageToken"] = [pageToken]; 502 _queryParams["pageToken"] = [pageToken];
496 } 503 }
497 504
498 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/adclien ts/' + commons.Escaper.ecapeVariable('$adClientId') + '/adunits'; 505 _url = 'accounts/' +
506 commons.Escaper.ecapeVariable('$accountId') +
507 '/adclients/' +
508 commons.Escaper.ecapeVariable('$adClientId') +
509 '/adunits';
499 510
500 var _response = _requester.request(_url, 511 var _response = _requester.request(_url, "GET",
501 "GET", 512 body: _body,
502 body: _body, 513 queryParams: _queryParams,
503 queryParams: _queryParams, 514 uploadOptions: _uploadOptions,
504 uploadOptions: _uploadOptions, 515 uploadMedia: _uploadMedia,
505 uploadMedia: _uploadMedia, 516 downloadOptions: _downloadOptions);
506 downloadOptions: _downloadOptions);
507 return _response.then((data) => new AdUnits.fromJson(data)); 517 return _response.then((data) => new AdUnits.fromJson(data));
508 } 518 }
509 519
510 /** 520 /// Update the supplied ad unit in the specified publisher AdSense account.
511 * Update the supplied ad unit in the specified publisher AdSense account. 521 /// This method supports patch semantics.
512 * This method supports patch semantics. 522 ///
513 * 523 /// [request] - The metadata request object.
514 * [request] - The metadata request object. 524 ///
515 * 525 /// Request parameters:
516 * Request parameters: 526 ///
517 * 527 /// [accountId] - Account which contains the ad client.
518 * [accountId] - Account which contains the ad client. 528 ///
519 * 529 /// [adClientId] - Ad client which contains the ad unit.
520 * [adClientId] - Ad client which contains the ad unit. 530 ///
521 * 531 /// [adUnitId] - Ad unit to get.
522 * [adUnitId] - Ad unit to get. 532 ///
523 * 533 /// Completes with a [AdUnit].
524 * Completes with a [AdUnit]. 534 ///
525 * 535 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
526 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 536 /// an error.
527 * error. 537 ///
528 * 538 /// If the used [http.Client] completes with an error when making a REST
529 * If the used [http.Client] completes with an error when making a REST call, 539 /// call, this method will complete with the same error.
530 * this method will complete with the same error. 540 async.Future<AdUnit> patch(AdUnit request, core.String accountId,
531 */ 541 core.String adClientId, core.String adUnitId) {
532 async.Future<AdUnit> patch(AdUnit request, core.String accountId, core.String adClientId, core.String adUnitId) {
533 var _url = null; 542 var _url = null;
534 var _queryParams = new core.Map(); 543 var _queryParams = new core.Map();
535 var _uploadMedia = null; 544 var _uploadMedia = null;
536 var _uploadOptions = null; 545 var _uploadOptions = null;
537 var _downloadOptions = commons.DownloadOptions.Metadata; 546 var _downloadOptions = commons.DownloadOptions.Metadata;
538 var _body = null; 547 var _body = null;
539 548
540 if (request != null) { 549 if (request != null) {
541 _body = convert.JSON.encode((request).toJson()); 550 _body = convert.JSON.encode((request).toJson());
542 } 551 }
543 if (accountId == null) { 552 if (accountId == null) {
544 throw new core.ArgumentError("Parameter accountId is required."); 553 throw new core.ArgumentError("Parameter accountId is required.");
545 } 554 }
546 if (adClientId == null) { 555 if (adClientId == null) {
547 throw new core.ArgumentError("Parameter adClientId is required."); 556 throw new core.ArgumentError("Parameter adClientId is required.");
548 } 557 }
549 if (adUnitId == null) { 558 if (adUnitId == null) {
550 throw new core.ArgumentError("Parameter adUnitId is required."); 559 throw new core.ArgumentError("Parameter adUnitId is required.");
551 } 560 }
552 _queryParams["adUnitId"] = [adUnitId]; 561 _queryParams["adUnitId"] = [adUnitId];
553 562
554 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/adclien ts/' + commons.Escaper.ecapeVariable('$adClientId') + '/adunits'; 563 _url = 'accounts/' +
564 commons.Escaper.ecapeVariable('$accountId') +
565 '/adclients/' +
566 commons.Escaper.ecapeVariable('$adClientId') +
567 '/adunits';
555 568
556 var _response = _requester.request(_url, 569 var _response = _requester.request(_url, "PATCH",
557 "PATCH", 570 body: _body,
558 body: _body, 571 queryParams: _queryParams,
559 queryParams: _queryParams, 572 uploadOptions: _uploadOptions,
560 uploadOptions: _uploadOptions, 573 uploadMedia: _uploadMedia,
561 uploadMedia: _uploadMedia, 574 downloadOptions: _downloadOptions);
562 downloadOptions: _downloadOptions);
563 return _response.then((data) => new AdUnit.fromJson(data)); 575 return _response.then((data) => new AdUnit.fromJson(data));
564 } 576 }
565 577
566 /** 578 /// Update the supplied ad unit in the specified publisher AdSense account.
567 * Update the supplied ad unit in the specified publisher AdSense account. 579 ///
568 * 580 /// [request] - The metadata request object.
569 * [request] - The metadata request object. 581 ///
570 * 582 /// Request parameters:
571 * Request parameters: 583 ///
572 * 584 /// [accountId] - Account which contains the ad client.
573 * [accountId] - Account which contains the ad client. 585 ///
574 * 586 /// [adClientId] - Ad client which contains the ad unit.
575 * [adClientId] - Ad client which contains the ad unit. 587 ///
576 * 588 /// Completes with a [AdUnit].
577 * Completes with a [AdUnit]. 589 ///
578 * 590 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
579 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 591 /// an error.
580 * error. 592 ///
581 * 593 /// If the used [http.Client] completes with an error when making a REST
582 * If the used [http.Client] completes with an error when making a REST call, 594 /// call, this method will complete with the same error.
583 * this method will complete with the same error. 595 async.Future<AdUnit> update(
584 */ 596 AdUnit request, core.String accountId, core.String adClientId) {
585 async.Future<AdUnit> update(AdUnit request, core.String accountId, core.String adClientId) {
586 var _url = null; 597 var _url = null;
587 var _queryParams = new core.Map(); 598 var _queryParams = new core.Map();
588 var _uploadMedia = null; 599 var _uploadMedia = null;
589 var _uploadOptions = null; 600 var _uploadOptions = null;
590 var _downloadOptions = commons.DownloadOptions.Metadata; 601 var _downloadOptions = commons.DownloadOptions.Metadata;
591 var _body = null; 602 var _body = null;
592 603
593 if (request != null) { 604 if (request != null) {
594 _body = convert.JSON.encode((request).toJson()); 605 _body = convert.JSON.encode((request).toJson());
595 } 606 }
596 if (accountId == null) { 607 if (accountId == null) {
597 throw new core.ArgumentError("Parameter accountId is required."); 608 throw new core.ArgumentError("Parameter accountId is required.");
598 } 609 }
599 if (adClientId == null) { 610 if (adClientId == null) {
600 throw new core.ArgumentError("Parameter adClientId is required."); 611 throw new core.ArgumentError("Parameter adClientId is required.");
601 } 612 }
602 613
603 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/adclien ts/' + commons.Escaper.ecapeVariable('$adClientId') + '/adunits'; 614 _url = 'accounts/' +
615 commons.Escaper.ecapeVariable('$accountId') +
616 '/adclients/' +
617 commons.Escaper.ecapeVariable('$adClientId') +
618 '/adunits';
604 619
605 var _response = _requester.request(_url, 620 var _response = _requester.request(_url, "PUT",
606 "PUT", 621 body: _body,
607 body: _body, 622 queryParams: _queryParams,
608 queryParams: _queryParams, 623 uploadOptions: _uploadOptions,
609 uploadOptions: _uploadOptions, 624 uploadMedia: _uploadMedia,
610 uploadMedia: _uploadMedia, 625 downloadOptions: _downloadOptions);
611 downloadOptions: _downloadOptions);
612 return _response.then((data) => new AdUnit.fromJson(data)); 626 return _response.then((data) => new AdUnit.fromJson(data));
613 } 627 }
614
615 } 628 }
616 629
617
618 class AccountsReportsResourceApi { 630 class AccountsReportsResourceApi {
619 final commons.ApiRequester _requester; 631 final commons.ApiRequester _requester;
620 632
621 AccountsReportsResourceApi(commons.ApiRequester client) : 633 AccountsReportsResourceApi(commons.ApiRequester client) : _requester = client;
622 _requester = client;
623 634
624 /** 635 /// Generate an AdSense report based on the report request sent in the query
625 * Generate an AdSense report based on the report request sent in the query 636 /// parameters. Returns the result as JSON; to retrieve output in CSV format
626 * parameters. Returns the result as JSON; to retrieve output in CSV format 637 /// specify "alt=csv" as a query parameter.
627 * specify "alt=csv" as a query parameter. 638 ///
628 * 639 /// Request parameters:
629 * Request parameters: 640 ///
630 * 641 /// [accountId] - Hosted account upon which to report.
631 * [accountId] - Hosted account upon which to report. 642 ///
632 * 643 /// [startDate] - Start of the date range to report on in "YYYY-MM-DD"
633 * [startDate] - Start of the date range to report on in "YYYY-MM-DD" format, 644 /// format, inclusive.
634 * inclusive. 645 /// Value must have pattern
635 * Value must have pattern 646 /// "\d{4}-\d{2}-\d{2}|(today|startOfMonth|startOfYear)(([\-\+]\d+[dwmy]){0,3} ?)".
636 * "\d{4}-\d{2}-\d{2}|(today|startOfMonth|startOfYear)(([\-\+]\d+[dwmy]){0,3}? )". 647 ///
637 * 648 /// [endDate] - End of the date range to report on in "YYYY-MM-DD" format,
638 * [endDate] - End of the date range to report on in "YYYY-MM-DD" format, 649 /// inclusive.
639 * inclusive. 650 /// Value must have pattern
640 * Value must have pattern 651 /// "\d{4}-\d{2}-\d{2}|(today|startOfMonth|startOfYear)(([\-\+]\d+[dwmy]){0,3} ?)".
641 * "\d{4}-\d{2}-\d{2}|(today|startOfMonth|startOfYear)(([\-\+]\d+[dwmy]){0,3}? )". 652 ///
642 * 653 /// [dimension] - Dimensions to base the report on.
643 * [dimension] - Dimensions to base the report on. 654 /// Value must have pattern "[a-zA-Z_]+".
644 * Value must have pattern "[a-zA-Z_]+". 655 ///
645 * 656 /// [filter] - Filters to be run on the report.
646 * [filter] - Filters to be run on the report. 657 /// Value must have pattern "[a-zA-Z_]+(==|=@).+".
647 * Value must have pattern "[a-zA-Z_]+(==|=@).+". 658 ///
648 * 659 /// [locale] - Optional locale to use for translating report output to a
649 * [locale] - Optional locale to use for translating report output to a local 660 /// local language. Defaults to "en_US" if not specified.
650 * language. Defaults to "en_US" if not specified. 661 /// Value must have pattern "[a-zA-Z_]+".
651 * Value must have pattern "[a-zA-Z_]+". 662 ///
652 * 663 /// [maxResults] - The maximum number of rows of report data to return.
653 * [maxResults] - The maximum number of rows of report data to return. 664 /// Value must be between "0" and "50000".
654 * Value must be between "0" and "50000". 665 ///
655 * 666 /// [metric] - Numeric columns to include in the report.
656 * [metric] - Numeric columns to include in the report. 667 /// Value must have pattern "[a-zA-Z_]+".
657 * Value must have pattern "[a-zA-Z_]+". 668 ///
658 * 669 /// [sort] - The name of a dimension or metric to sort the resulting report
659 * [sort] - The name of a dimension or metric to sort the resulting report on, 670 /// on, optionally prefixed with "+" to sort ascending or "-" to sort
660 * optionally prefixed with "+" to sort ascending or "-" to sort descending. 671 /// descending. If no prefix is specified, the column is sorted ascending.
661 * If no prefix is specified, the column is sorted ascending. 672 /// Value must have pattern "(\+|-)?[a-zA-Z_]+".
662 * Value must have pattern "(\+|-)?[a-zA-Z_]+". 673 ///
663 * 674 /// [startIndex] - Index of the first row of report data to return.
664 * [startIndex] - Index of the first row of report data to return. 675 /// Value must be between "0" and "5000".
665 * Value must be between "0" and "5000". 676 ///
666 * 677 /// Completes with a [Report].
667 * Completes with a [Report]. 678 ///
668 * 679 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
669 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 680 /// an error.
670 * error. 681 ///
671 * 682 /// If the used [http.Client] completes with an error when making a REST
672 * If the used [http.Client] completes with an error when making a REST call, 683 /// call, this method will complete with the same error.
673 * this method will complete with the same error. 684 async.Future<Report> generate(
674 */ 685 core.String accountId, core.String startDate, core.String endDate,
675 async.Future<Report> generate(core.String accountId, core.String startDate, co re.String endDate, {core.List<core.String> dimension, core.List<core.String> fil ter, core.String locale, core.int maxResults, core.List<core.String> metric, cor e.List<core.String> sort, core.int startIndex}) { 686 {core.List<core.String> dimension,
687 core.List<core.String> filter,
688 core.String locale,
689 core.int maxResults,
690 core.List<core.String> metric,
691 core.List<core.String> sort,
692 core.int startIndex}) {
676 var _url = null; 693 var _url = null;
677 var _queryParams = new core.Map(); 694 var _queryParams = new core.Map();
678 var _uploadMedia = null; 695 var _uploadMedia = null;
679 var _uploadOptions = null; 696 var _uploadOptions = null;
680 var _downloadOptions = commons.DownloadOptions.Metadata; 697 var _downloadOptions = commons.DownloadOptions.Metadata;
681 var _body = null; 698 var _body = null;
682 699
683 if (accountId == null) { 700 if (accountId == null) {
684 throw new core.ArgumentError("Parameter accountId is required."); 701 throw new core.ArgumentError("Parameter accountId is required.");
685 } 702 }
(...skipping 20 matching lines...) Expand all
706 if (metric != null) { 723 if (metric != null) {
707 _queryParams["metric"] = metric; 724 _queryParams["metric"] = metric;
708 } 725 }
709 if (sort != null) { 726 if (sort != null) {
710 _queryParams["sort"] = sort; 727 _queryParams["sort"] = sort;
711 } 728 }
712 if (startIndex != null) { 729 if (startIndex != null) {
713 _queryParams["startIndex"] = ["${startIndex}"]; 730 _queryParams["startIndex"] = ["${startIndex}"];
714 } 731 }
715 732
716 _url = 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/reports '; 733 _url =
734 'accounts/' + commons.Escaper.ecapeVariable('$accountId') + '/reports';
717 735
718 var _response = _requester.request(_url, 736 var _response = _requester.request(_url, "GET",
719 "GET", 737 body: _body,
720 body: _body, 738 queryParams: _queryParams,
721 queryParams: _queryParams, 739 uploadOptions: _uploadOptions,
722 uploadOptions: _uploadOptions, 740 uploadMedia: _uploadMedia,
723 uploadMedia: _uploadMedia, 741 downloadOptions: _downloadOptions);
724 downloadOptions: _downloadOptions);
725 return _response.then((data) => new Report.fromJson(data)); 742 return _response.then((data) => new Report.fromJson(data));
726 } 743 }
727
728 } 744 }
729 745
730
731 class AdclientsResourceApi { 746 class AdclientsResourceApi {
732 final commons.ApiRequester _requester; 747 final commons.ApiRequester _requester;
733 748
734 AdclientsResourceApi(commons.ApiRequester client) : 749 AdclientsResourceApi(commons.ApiRequester client) : _requester = client;
735 _requester = client;
736 750
737 /** 751 /// Get information about one of the ad clients in the Host AdSense account.
738 * Get information about one of the ad clients in the Host AdSense account. 752 ///
739 * 753 /// Request parameters:
740 * Request parameters: 754 ///
741 * 755 /// [adClientId] - Ad client to get.
742 * [adClientId] - Ad client to get. 756 ///
743 * 757 /// Completes with a [AdClient].
744 * Completes with a [AdClient]. 758 ///
745 * 759 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
746 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 760 /// an error.
747 * error. 761 ///
748 * 762 /// If the used [http.Client] completes with an error when making a REST
749 * If the used [http.Client] completes with an error when making a REST call, 763 /// call, this method will complete with the same error.
750 * this method will complete with the same error.
751 */
752 async.Future<AdClient> get(core.String adClientId) { 764 async.Future<AdClient> get(core.String adClientId) {
753 var _url = null; 765 var _url = null;
754 var _queryParams = new core.Map(); 766 var _queryParams = new core.Map();
755 var _uploadMedia = null; 767 var _uploadMedia = null;
756 var _uploadOptions = null; 768 var _uploadOptions = null;
757 var _downloadOptions = commons.DownloadOptions.Metadata; 769 var _downloadOptions = commons.DownloadOptions.Metadata;
758 var _body = null; 770 var _body = null;
759 771
760 if (adClientId == null) { 772 if (adClientId == null) {
761 throw new core.ArgumentError("Parameter adClientId is required."); 773 throw new core.ArgumentError("Parameter adClientId is required.");
762 } 774 }
763 775
764 _url = 'adclients/' + commons.Escaper.ecapeVariable('$adClientId'); 776 _url = 'adclients/' + commons.Escaper.ecapeVariable('$adClientId');
765 777
766 var _response = _requester.request(_url, 778 var _response = _requester.request(_url, "GET",
767 "GET", 779 body: _body,
768 body: _body, 780 queryParams: _queryParams,
769 queryParams: _queryParams, 781 uploadOptions: _uploadOptions,
770 uploadOptions: _uploadOptions, 782 uploadMedia: _uploadMedia,
771 uploadMedia: _uploadMedia, 783 downloadOptions: _downloadOptions);
772 downloadOptions: _downloadOptions);
773 return _response.then((data) => new AdClient.fromJson(data)); 784 return _response.then((data) => new AdClient.fromJson(data));
774 } 785 }
775 786
776 /** 787 /// List all host ad clients in this AdSense account.
777 * List all host ad clients in this AdSense account. 788 ///
778 * 789 /// Request parameters:
779 * Request parameters: 790 ///
780 * 791 /// [maxResults] - The maximum number of ad clients to include in the
781 * [maxResults] - The maximum number of ad clients to include in the response, 792 /// response, used for paging.
782 * used for paging. 793 /// Value must be between "0" and "10000".
783 * Value must be between "0" and "10000". 794 ///
784 * 795 /// [pageToken] - A continuation token, used to page through ad clients. To
785 * [pageToken] - A continuation token, used to page through ad clients. To 796 /// retrieve the next page, set this parameter to the value of
786 * retrieve the next page, set this parameter to the value of "nextPageToken" 797 /// "nextPageToken" from the previous response.
787 * from the previous response. 798 ///
788 * 799 /// Completes with a [AdClients].
789 * Completes with a [AdClients]. 800 ///
790 * 801 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
791 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 802 /// an error.
792 * error. 803 ///
793 * 804 /// If the used [http.Client] completes with an error when making a REST
794 * If the used [http.Client] completes with an error when making a REST call, 805 /// call, this method will complete with the same error.
795 * this method will complete with the same error.
796 */
797 async.Future<AdClients> list({core.int maxResults, core.String pageToken}) { 806 async.Future<AdClients> list({core.int maxResults, core.String pageToken}) {
798 var _url = null; 807 var _url = null;
799 var _queryParams = new core.Map(); 808 var _queryParams = new core.Map();
800 var _uploadMedia = null; 809 var _uploadMedia = null;
801 var _uploadOptions = null; 810 var _uploadOptions = null;
802 var _downloadOptions = commons.DownloadOptions.Metadata; 811 var _downloadOptions = commons.DownloadOptions.Metadata;
803 var _body = null; 812 var _body = null;
804 813
805 if (maxResults != null) { 814 if (maxResults != null) {
806 _queryParams["maxResults"] = ["${maxResults}"]; 815 _queryParams["maxResults"] = ["${maxResults}"];
807 } 816 }
808 if (pageToken != null) { 817 if (pageToken != null) {
809 _queryParams["pageToken"] = [pageToken]; 818 _queryParams["pageToken"] = [pageToken];
810 } 819 }
811 820
812 _url = 'adclients'; 821 _url = 'adclients';
813 822
814 var _response = _requester.request(_url, 823 var _response = _requester.request(_url, "GET",
815 "GET", 824 body: _body,
816 body: _body, 825 queryParams: _queryParams,
817 queryParams: _queryParams, 826 uploadOptions: _uploadOptions,
818 uploadOptions: _uploadOptions, 827 uploadMedia: _uploadMedia,
819 uploadMedia: _uploadMedia, 828 downloadOptions: _downloadOptions);
820 downloadOptions: _downloadOptions);
821 return _response.then((data) => new AdClients.fromJson(data)); 829 return _response.then((data) => new AdClients.fromJson(data));
822 } 830 }
823
824 } 831 }
825 832
826
827 class AssociationsessionsResourceApi { 833 class AssociationsessionsResourceApi {
828 final commons.ApiRequester _requester; 834 final commons.ApiRequester _requester;
829 835
830 AssociationsessionsResourceApi(commons.ApiRequester client) : 836 AssociationsessionsResourceApi(commons.ApiRequester client)
831 _requester = client; 837 : _requester = client;
832 838
833 /** 839 /// Create an association session for initiating an association with an
834 * Create an association session for initiating an association with an AdSense 840 /// AdSense user.
835 * user. 841 ///
836 * 842 /// Request parameters:
837 * Request parameters: 843 ///
838 * 844 /// [productCode] - Products to associate with the user.
839 * [productCode] - Products to associate with the user. 845 ///
840 * 846 /// [websiteUrl] - The URL of the user's hosted website.
841 * [websiteUrl] - The URL of the user's hosted website. 847 ///
842 * 848 /// [userLocale] - The preferred locale of the user.
843 * [userLocale] - The preferred locale of the user. 849 ///
844 * 850 /// [websiteLocale] - The locale of the user's hosted website.
845 * [websiteLocale] - The locale of the user's hosted website. 851 ///
846 * 852 /// Completes with a [AssociationSession].
847 * Completes with a [AssociationSession]. 853 ///
848 * 854 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
849 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 855 /// an error.
850 * error. 856 ///
851 * 857 /// If the used [http.Client] completes with an error when making a REST
852 * If the used [http.Client] completes with an error when making a REST call, 858 /// call, this method will complete with the same error.
853 * this method will complete with the same error. 859 async.Future<AssociationSession> start(
854 */ 860 core.List<core.String> productCode, core.String websiteUrl,
855 async.Future<AssociationSession> start(core.List<core.String> productCode, cor e.String websiteUrl, {core.String userLocale, core.String websiteLocale}) { 861 {core.String userLocale, core.String websiteLocale}) {
856 var _url = null; 862 var _url = null;
857 var _queryParams = new core.Map(); 863 var _queryParams = new core.Map();
858 var _uploadMedia = null; 864 var _uploadMedia = null;
859 var _uploadOptions = null; 865 var _uploadOptions = null;
860 var _downloadOptions = commons.DownloadOptions.Metadata; 866 var _downloadOptions = commons.DownloadOptions.Metadata;
861 var _body = null; 867 var _body = null;
862 868
863 if (productCode == null || productCode.isEmpty) { 869 if (productCode == null || productCode.isEmpty) {
864 throw new core.ArgumentError("Parameter productCode is required."); 870 throw new core.ArgumentError("Parameter productCode is required.");
865 } 871 }
866 _queryParams["productCode"] = productCode; 872 _queryParams["productCode"] = productCode;
867 if (websiteUrl == null) { 873 if (websiteUrl == null) {
868 throw new core.ArgumentError("Parameter websiteUrl is required."); 874 throw new core.ArgumentError("Parameter websiteUrl is required.");
869 } 875 }
870 _queryParams["websiteUrl"] = [websiteUrl]; 876 _queryParams["websiteUrl"] = [websiteUrl];
871 if (userLocale != null) { 877 if (userLocale != null) {
872 _queryParams["userLocale"] = [userLocale]; 878 _queryParams["userLocale"] = [userLocale];
873 } 879 }
874 if (websiteLocale != null) { 880 if (websiteLocale != null) {
875 _queryParams["websiteLocale"] = [websiteLocale]; 881 _queryParams["websiteLocale"] = [websiteLocale];
876 } 882 }
877 883
878 _url = 'associationsessions/start'; 884 _url = 'associationsessions/start';
879 885
880 var _response = _requester.request(_url, 886 var _response = _requester.request(_url, "GET",
881 "GET", 887 body: _body,
882 body: _body, 888 queryParams: _queryParams,
883 queryParams: _queryParams, 889 uploadOptions: _uploadOptions,
884 uploadOptions: _uploadOptions, 890 uploadMedia: _uploadMedia,
885 uploadMedia: _uploadMedia, 891 downloadOptions: _downloadOptions);
886 downloadOptions: _downloadOptions);
887 return _response.then((data) => new AssociationSession.fromJson(data)); 892 return _response.then((data) => new AssociationSession.fromJson(data));
888 } 893 }
889 894
890 /** 895 /// Verify an association session after the association callback returns from
891 * Verify an association session after the association callback returns from 896 /// AdSense signup.
892 * AdSense signup. 897 ///
893 * 898 /// Request parameters:
894 * Request parameters: 899 ///
895 * 900 /// [token] - The token returned to the association callback URL.
896 * [token] - The token returned to the association callback URL. 901 ///
897 * 902 /// Completes with a [AssociationSession].
898 * Completes with a [AssociationSession]. 903 ///
899 * 904 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
900 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 905 /// an error.
901 * error. 906 ///
902 * 907 /// If the used [http.Client] completes with an error when making a REST
903 * If the used [http.Client] completes with an error when making a REST call, 908 /// call, this method will complete with the same error.
904 * this method will complete with the same error.
905 */
906 async.Future<AssociationSession> verify(core.String token) { 909 async.Future<AssociationSession> verify(core.String token) {
907 var _url = null; 910 var _url = null;
908 var _queryParams = new core.Map(); 911 var _queryParams = new core.Map();
909 var _uploadMedia = null; 912 var _uploadMedia = null;
910 var _uploadOptions = null; 913 var _uploadOptions = null;
911 var _downloadOptions = commons.DownloadOptions.Metadata; 914 var _downloadOptions = commons.DownloadOptions.Metadata;
912 var _body = null; 915 var _body = null;
913 916
914 if (token == null) { 917 if (token == null) {
915 throw new core.ArgumentError("Parameter token is required."); 918 throw new core.ArgumentError("Parameter token is required.");
916 } 919 }
917 _queryParams["token"] = [token]; 920 _queryParams["token"] = [token];
918 921
919 _url = 'associationsessions/verify'; 922 _url = 'associationsessions/verify';
920 923
921 var _response = _requester.request(_url, 924 var _response = _requester.request(_url, "GET",
922 "GET", 925 body: _body,
923 body: _body, 926 queryParams: _queryParams,
924 queryParams: _queryParams, 927 uploadOptions: _uploadOptions,
925 uploadOptions: _uploadOptions, 928 uploadMedia: _uploadMedia,
926 uploadMedia: _uploadMedia, 929 downloadOptions: _downloadOptions);
927 downloadOptions: _downloadOptions);
928 return _response.then((data) => new AssociationSession.fromJson(data)); 930 return _response.then((data) => new AssociationSession.fromJson(data));
929 } 931 }
930
931 } 932 }
932 933
933
934 class CustomchannelsResourceApi { 934 class CustomchannelsResourceApi {
935 final commons.ApiRequester _requester; 935 final commons.ApiRequester _requester;
936 936
937 CustomchannelsResourceApi(commons.ApiRequester client) : 937 CustomchannelsResourceApi(commons.ApiRequester client) : _requester = client;
938 _requester = client;
939 938
940 /** 939 /// Delete a specific custom channel from the host AdSense account.
941 * Delete a specific custom channel from the host AdSense account. 940 ///
942 * 941 /// Request parameters:
943 * Request parameters: 942 ///
944 * 943 /// [adClientId] - Ad client from which to delete the custom channel.
945 * [adClientId] - Ad client from which to delete the custom channel. 944 ///
946 * 945 /// [customChannelId] - Custom channel to delete.
947 * [customChannelId] - Custom channel to delete. 946 ///
948 * 947 /// Completes with a [CustomChannel].
949 * Completes with a [CustomChannel]. 948 ///
950 * 949 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
951 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 950 /// an error.
952 * error. 951 ///
953 * 952 /// If the used [http.Client] completes with an error when making a REST
954 * If the used [http.Client] completes with an error when making a REST call, 953 /// call, this method will complete with the same error.
955 * this method will complete with the same error. 954 async.Future<CustomChannel> delete(
956 */ 955 core.String adClientId, core.String customChannelId) {
957 async.Future<CustomChannel> delete(core.String adClientId, core.String customC hannelId) {
958 var _url = null; 956 var _url = null;
959 var _queryParams = new core.Map(); 957 var _queryParams = new core.Map();
960 var _uploadMedia = null; 958 var _uploadMedia = null;
961 var _uploadOptions = null; 959 var _uploadOptions = null;
962 var _downloadOptions = commons.DownloadOptions.Metadata; 960 var _downloadOptions = commons.DownloadOptions.Metadata;
963 var _body = null; 961 var _body = null;
964 962
965 if (adClientId == null) { 963 if (adClientId == null) {
966 throw new core.ArgumentError("Parameter adClientId is required."); 964 throw new core.ArgumentError("Parameter adClientId is required.");
967 } 965 }
968 if (customChannelId == null) { 966 if (customChannelId == null) {
969 throw new core.ArgumentError("Parameter customChannelId is required."); 967 throw new core.ArgumentError("Parameter customChannelId is required.");
970 } 968 }
971 969
972 _url = 'adclients/' + commons.Escaper.ecapeVariable('$adClientId') + '/custo mchannels/' + commons.Escaper.ecapeVariable('$customChannelId'); 970 _url = 'adclients/' +
971 commons.Escaper.ecapeVariable('$adClientId') +
972 '/customchannels/' +
973 commons.Escaper.ecapeVariable('$customChannelId');
973 974
974 var _response = _requester.request(_url, 975 var _response = _requester.request(_url, "DELETE",
975 "DELETE", 976 body: _body,
976 body: _body, 977 queryParams: _queryParams,
977 queryParams: _queryParams, 978 uploadOptions: _uploadOptions,
978 uploadOptions: _uploadOptions, 979 uploadMedia: _uploadMedia,
979 uploadMedia: _uploadMedia, 980 downloadOptions: _downloadOptions);
980 downloadOptions: _downloadOptions);
981 return _response.then((data) => new CustomChannel.fromJson(data)); 981 return _response.then((data) => new CustomChannel.fromJson(data));
982 } 982 }
983 983
984 /** 984 /// Get a specific custom channel from the host AdSense account.
985 * Get a specific custom channel from the host AdSense account. 985 ///
986 * 986 /// Request parameters:
987 * Request parameters: 987 ///
988 * 988 /// [adClientId] - Ad client from which to get the custom channel.
989 * [adClientId] - Ad client from which to get the custom channel. 989 ///
990 * 990 /// [customChannelId] - Custom channel to get.
991 * [customChannelId] - Custom channel to get. 991 ///
992 * 992 /// Completes with a [CustomChannel].
993 * Completes with a [CustomChannel]. 993 ///
994 * 994 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
995 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 995 /// an error.
996 * error. 996 ///
997 * 997 /// If the used [http.Client] completes with an error when making a REST
998 * If the used [http.Client] completes with an error when making a REST call, 998 /// call, this method will complete with the same error.
999 * this method will complete with the same error. 999 async.Future<CustomChannel> get(
1000 */ 1000 core.String adClientId, core.String customChannelId) {
1001 async.Future<CustomChannel> get(core.String adClientId, core.String customChan nelId) {
1002 var _url = null; 1001 var _url = null;
1003 var _queryParams = new core.Map(); 1002 var _queryParams = new core.Map();
1004 var _uploadMedia = null; 1003 var _uploadMedia = null;
1005 var _uploadOptions = null; 1004 var _uploadOptions = null;
1006 var _downloadOptions = commons.DownloadOptions.Metadata; 1005 var _downloadOptions = commons.DownloadOptions.Metadata;
1007 var _body = null; 1006 var _body = null;
1008 1007
1009 if (adClientId == null) { 1008 if (adClientId == null) {
1010 throw new core.ArgumentError("Parameter adClientId is required."); 1009 throw new core.ArgumentError("Parameter adClientId is required.");
1011 } 1010 }
1012 if (customChannelId == null) { 1011 if (customChannelId == null) {
1013 throw new core.ArgumentError("Parameter customChannelId is required."); 1012 throw new core.ArgumentError("Parameter customChannelId is required.");
1014 } 1013 }
1015 1014
1016 _url = 'adclients/' + commons.Escaper.ecapeVariable('$adClientId') + '/custo mchannels/' + commons.Escaper.ecapeVariable('$customChannelId'); 1015 _url = 'adclients/' +
1016 commons.Escaper.ecapeVariable('$adClientId') +
1017 '/customchannels/' +
1018 commons.Escaper.ecapeVariable('$customChannelId');
1017 1019
1018 var _response = _requester.request(_url, 1020 var _response = _requester.request(_url, "GET",
1019 "GET", 1021 body: _body,
1020 body: _body, 1022 queryParams: _queryParams,
1021 queryParams: _queryParams, 1023 uploadOptions: _uploadOptions,
1022 uploadOptions: _uploadOptions, 1024 uploadMedia: _uploadMedia,
1023 uploadMedia: _uploadMedia, 1025 downloadOptions: _downloadOptions);
1024 downloadOptions: _downloadOptions);
1025 return _response.then((data) => new CustomChannel.fromJson(data)); 1026 return _response.then((data) => new CustomChannel.fromJson(data));
1026 } 1027 }
1027 1028
1028 /** 1029 /// Add a new custom channel to the host AdSense account.
1029 * Add a new custom channel to the host AdSense account. 1030 ///
1030 * 1031 /// [request] - The metadata request object.
1031 * [request] - The metadata request object. 1032 ///
1032 * 1033 /// Request parameters:
1033 * Request parameters: 1034 ///
1034 * 1035 /// [adClientId] - Ad client to which the new custom channel will be added.
1035 * [adClientId] - Ad client to which the new custom channel will be added. 1036 ///
1036 * 1037 /// Completes with a [CustomChannel].
1037 * Completes with a [CustomChannel]. 1038 ///
1038 * 1039 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1039 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1040 /// an error.
1040 * error. 1041 ///
1041 * 1042 /// If the used [http.Client] completes with an error when making a REST
1042 * If the used [http.Client] completes with an error when making a REST call, 1043 /// call, this method will complete with the same error.
1043 * this method will complete with the same error. 1044 async.Future<CustomChannel> insert(
1044 */ 1045 CustomChannel request, core.String adClientId) {
1045 async.Future<CustomChannel> insert(CustomChannel request, core.String adClient Id) {
1046 var _url = null; 1046 var _url = null;
1047 var _queryParams = new core.Map(); 1047 var _queryParams = new core.Map();
1048 var _uploadMedia = null; 1048 var _uploadMedia = null;
1049 var _uploadOptions = null; 1049 var _uploadOptions = null;
1050 var _downloadOptions = commons.DownloadOptions.Metadata; 1050 var _downloadOptions = commons.DownloadOptions.Metadata;
1051 var _body = null; 1051 var _body = null;
1052 1052
1053 if (request != null) { 1053 if (request != null) {
1054 _body = convert.JSON.encode((request).toJson()); 1054 _body = convert.JSON.encode((request).toJson());
1055 } 1055 }
1056 if (adClientId == null) { 1056 if (adClientId == null) {
1057 throw new core.ArgumentError("Parameter adClientId is required."); 1057 throw new core.ArgumentError("Parameter adClientId is required.");
1058 } 1058 }
1059 1059
1060 _url = 'adclients/' + commons.Escaper.ecapeVariable('$adClientId') + '/custo mchannels'; 1060 _url = 'adclients/' +
1061 commons.Escaper.ecapeVariable('$adClientId') +
1062 '/customchannels';
1061 1063
1062 var _response = _requester.request(_url, 1064 var _response = _requester.request(_url, "POST",
1063 "POST", 1065 body: _body,
1064 body: _body, 1066 queryParams: _queryParams,
1065 queryParams: _queryParams, 1067 uploadOptions: _uploadOptions,
1066 uploadOptions: _uploadOptions, 1068 uploadMedia: _uploadMedia,
1067 uploadMedia: _uploadMedia, 1069 downloadOptions: _downloadOptions);
1068 downloadOptions: _downloadOptions);
1069 return _response.then((data) => new CustomChannel.fromJson(data)); 1070 return _response.then((data) => new CustomChannel.fromJson(data));
1070 } 1071 }
1071 1072
1072 /** 1073 /// List all host custom channels in this AdSense account.
1073 * List all host custom channels in this AdSense account. 1074 ///
1074 * 1075 /// Request parameters:
1075 * Request parameters: 1076 ///
1076 * 1077 /// [adClientId] - Ad client for which to list custom channels.
1077 * [adClientId] - Ad client for which to list custom channels. 1078 ///
1078 * 1079 /// [maxResults] - The maximum number of custom channels to include in the
1079 * [maxResults] - The maximum number of custom channels to include in the 1080 /// response, used for paging.
1080 * response, used for paging. 1081 /// Value must be between "0" and "10000".
1081 * Value must be between "0" and "10000". 1082 ///
1082 * 1083 /// [pageToken] - A continuation token, used to page through custom channels.
1083 * [pageToken] - A continuation token, used to page through custom channels. 1084 /// To retrieve the next page, set this parameter to the value of
1084 * To retrieve the next page, set this parameter to the value of 1085 /// "nextPageToken" from the previous response.
1085 * "nextPageToken" from the previous response. 1086 ///
1086 * 1087 /// Completes with a [CustomChannels].
1087 * Completes with a [CustomChannels]. 1088 ///
1088 * 1089 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1089 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1090 /// an error.
1090 * error. 1091 ///
1091 * 1092 /// If the used [http.Client] completes with an error when making a REST
1092 * If the used [http.Client] completes with an error when making a REST call, 1093 /// call, this method will complete with the same error.
1093 * this method will complete with the same error. 1094 async.Future<CustomChannels> list(core.String adClientId,
1094 */ 1095 {core.int maxResults, core.String pageToken}) {
1095 async.Future<CustomChannels> list(core.String adClientId, {core.int maxResults , core.String pageToken}) {
1096 var _url = null; 1096 var _url = null;
1097 var _queryParams = new core.Map(); 1097 var _queryParams = new core.Map();
1098 var _uploadMedia = null; 1098 var _uploadMedia = null;
1099 var _uploadOptions = null; 1099 var _uploadOptions = null;
1100 var _downloadOptions = commons.DownloadOptions.Metadata; 1100 var _downloadOptions = commons.DownloadOptions.Metadata;
1101 var _body = null; 1101 var _body = null;
1102 1102
1103 if (adClientId == null) { 1103 if (adClientId == null) {
1104 throw new core.ArgumentError("Parameter adClientId is required."); 1104 throw new core.ArgumentError("Parameter adClientId is required.");
1105 } 1105 }
1106 if (maxResults != null) { 1106 if (maxResults != null) {
1107 _queryParams["maxResults"] = ["${maxResults}"]; 1107 _queryParams["maxResults"] = ["${maxResults}"];
1108 } 1108 }
1109 if (pageToken != null) { 1109 if (pageToken != null) {
1110 _queryParams["pageToken"] = [pageToken]; 1110 _queryParams["pageToken"] = [pageToken];
1111 } 1111 }
1112 1112
1113 _url = 'adclients/' + commons.Escaper.ecapeVariable('$adClientId') + '/custo mchannels'; 1113 _url = 'adclients/' +
1114 commons.Escaper.ecapeVariable('$adClientId') +
1115 '/customchannels';
1114 1116
1115 var _response = _requester.request(_url, 1117 var _response = _requester.request(_url, "GET",
1116 "GET", 1118 body: _body,
1117 body: _body, 1119 queryParams: _queryParams,
1118 queryParams: _queryParams, 1120 uploadOptions: _uploadOptions,
1119 uploadOptions: _uploadOptions, 1121 uploadMedia: _uploadMedia,
1120 uploadMedia: _uploadMedia, 1122 downloadOptions: _downloadOptions);
1121 downloadOptions: _downloadOptions);
1122 return _response.then((data) => new CustomChannels.fromJson(data)); 1123 return _response.then((data) => new CustomChannels.fromJson(data));
1123 } 1124 }
1124 1125
1125 /** 1126 /// Update a custom channel in the host AdSense account. This method supports
1126 * Update a custom channel in the host AdSense account. This method supports 1127 /// patch semantics.
1127 * patch semantics. 1128 ///
1128 * 1129 /// [request] - The metadata request object.
1129 * [request] - The metadata request object. 1130 ///
1130 * 1131 /// Request parameters:
1131 * Request parameters: 1132 ///
1132 * 1133 /// [adClientId] - Ad client in which the custom channel will be updated.
1133 * [adClientId] - Ad client in which the custom channel will be updated. 1134 ///
1134 * 1135 /// [customChannelId] - Custom channel to get.
1135 * [customChannelId] - Custom channel to get. 1136 ///
1136 * 1137 /// Completes with a [CustomChannel].
1137 * Completes with a [CustomChannel]. 1138 ///
1138 * 1139 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1139 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1140 /// an error.
1140 * error. 1141 ///
1141 * 1142 /// If the used [http.Client] completes with an error when making a REST
1142 * If the used [http.Client] completes with an error when making a REST call, 1143 /// call, this method will complete with the same error.
1143 * this method will complete with the same error. 1144 async.Future<CustomChannel> patch(CustomChannel request,
1144 */ 1145 core.String adClientId, core.String customChannelId) {
1145 async.Future<CustomChannel> patch(CustomChannel request, core.String adClientI d, core.String customChannelId) {
1146 var _url = null; 1146 var _url = null;
1147 var _queryParams = new core.Map(); 1147 var _queryParams = new core.Map();
1148 var _uploadMedia = null; 1148 var _uploadMedia = null;
1149 var _uploadOptions = null; 1149 var _uploadOptions = null;
1150 var _downloadOptions = commons.DownloadOptions.Metadata; 1150 var _downloadOptions = commons.DownloadOptions.Metadata;
1151 var _body = null; 1151 var _body = null;
1152 1152
1153 if (request != null) { 1153 if (request != null) {
1154 _body = convert.JSON.encode((request).toJson()); 1154 _body = convert.JSON.encode((request).toJson());
1155 } 1155 }
1156 if (adClientId == null) { 1156 if (adClientId == null) {
1157 throw new core.ArgumentError("Parameter adClientId is required."); 1157 throw new core.ArgumentError("Parameter adClientId is required.");
1158 } 1158 }
1159 if (customChannelId == null) { 1159 if (customChannelId == null) {
1160 throw new core.ArgumentError("Parameter customChannelId is required."); 1160 throw new core.ArgumentError("Parameter customChannelId is required.");
1161 } 1161 }
1162 _queryParams["customChannelId"] = [customChannelId]; 1162 _queryParams["customChannelId"] = [customChannelId];
1163 1163
1164 _url = 'adclients/' + commons.Escaper.ecapeVariable('$adClientId') + '/custo mchannels'; 1164 _url = 'adclients/' +
1165 commons.Escaper.ecapeVariable('$adClientId') +
1166 '/customchannels';
1165 1167
1166 var _response = _requester.request(_url, 1168 var _response = _requester.request(_url, "PATCH",
1167 "PATCH", 1169 body: _body,
1168 body: _body, 1170 queryParams: _queryParams,
1169 queryParams: _queryParams, 1171 uploadOptions: _uploadOptions,
1170 uploadOptions: _uploadOptions, 1172 uploadMedia: _uploadMedia,
1171 uploadMedia: _uploadMedia, 1173 downloadOptions: _downloadOptions);
1172 downloadOptions: _downloadOptions);
1173 return _response.then((data) => new CustomChannel.fromJson(data)); 1174 return _response.then((data) => new CustomChannel.fromJson(data));
1174 } 1175 }
1175 1176
1176 /** 1177 /// Update a custom channel in the host AdSense account.
1177 * Update a custom channel in the host AdSense account. 1178 ///
1178 * 1179 /// [request] - The metadata request object.
1179 * [request] - The metadata request object. 1180 ///
1180 * 1181 /// Request parameters:
1181 * Request parameters: 1182 ///
1182 * 1183 /// [adClientId] - Ad client in which the custom channel will be updated.
1183 * [adClientId] - Ad client in which the custom channel will be updated. 1184 ///
1184 * 1185 /// Completes with a [CustomChannel].
1185 * Completes with a [CustomChannel]. 1186 ///
1186 * 1187 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1187 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1188 /// an error.
1188 * error. 1189 ///
1189 * 1190 /// If the used [http.Client] completes with an error when making a REST
1190 * If the used [http.Client] completes with an error when making a REST call, 1191 /// call, this method will complete with the same error.
1191 * this method will complete with the same error. 1192 async.Future<CustomChannel> update(
1192 */ 1193 CustomChannel request, core.String adClientId) {
1193 async.Future<CustomChannel> update(CustomChannel request, core.String adClient Id) {
1194 var _url = null; 1194 var _url = null;
1195 var _queryParams = new core.Map(); 1195 var _queryParams = new core.Map();
1196 var _uploadMedia = null; 1196 var _uploadMedia = null;
1197 var _uploadOptions = null; 1197 var _uploadOptions = null;
1198 var _downloadOptions = commons.DownloadOptions.Metadata; 1198 var _downloadOptions = commons.DownloadOptions.Metadata;
1199 var _body = null; 1199 var _body = null;
1200 1200
1201 if (request != null) { 1201 if (request != null) {
1202 _body = convert.JSON.encode((request).toJson()); 1202 _body = convert.JSON.encode((request).toJson());
1203 } 1203 }
1204 if (adClientId == null) { 1204 if (adClientId == null) {
1205 throw new core.ArgumentError("Parameter adClientId is required."); 1205 throw new core.ArgumentError("Parameter adClientId is required.");
1206 } 1206 }
1207 1207
1208 _url = 'adclients/' + commons.Escaper.ecapeVariable('$adClientId') + '/custo mchannels'; 1208 _url = 'adclients/' +
1209 commons.Escaper.ecapeVariable('$adClientId') +
1210 '/customchannels';
1209 1211
1210 var _response = _requester.request(_url, 1212 var _response = _requester.request(_url, "PUT",
1211 "PUT", 1213 body: _body,
1212 body: _body, 1214 queryParams: _queryParams,
1213 queryParams: _queryParams, 1215 uploadOptions: _uploadOptions,
1214 uploadOptions: _uploadOptions, 1216 uploadMedia: _uploadMedia,
1215 uploadMedia: _uploadMedia, 1217 downloadOptions: _downloadOptions);
1216 downloadOptions: _downloadOptions);
1217 return _response.then((data) => new CustomChannel.fromJson(data)); 1218 return _response.then((data) => new CustomChannel.fromJson(data));
1218 } 1219 }
1219
1220 } 1220 }
1221 1221
1222
1223 class ReportsResourceApi { 1222 class ReportsResourceApi {
1224 final commons.ApiRequester _requester; 1223 final commons.ApiRequester _requester;
1225 1224
1226 ReportsResourceApi(commons.ApiRequester client) : 1225 ReportsResourceApi(commons.ApiRequester client) : _requester = client;
1227 _requester = client;
1228 1226
1229 /** 1227 /// Generate an AdSense report based on the report request sent in the query
1230 * Generate an AdSense report based on the report request sent in the query 1228 /// parameters. Returns the result as JSON; to retrieve output in CSV format
1231 * parameters. Returns the result as JSON; to retrieve output in CSV format 1229 /// specify "alt=csv" as a query parameter.
1232 * specify "alt=csv" as a query parameter. 1230 ///
1233 * 1231 /// Request parameters:
1234 * Request parameters: 1232 ///
1235 * 1233 /// [startDate] - Start of the date range to report on in "YYYY-MM-DD"
1236 * [startDate] - Start of the date range to report on in "YYYY-MM-DD" format, 1234 /// format, inclusive.
1237 * inclusive. 1235 /// Value must have pattern
1238 * Value must have pattern 1236 /// "\d{4}-\d{2}-\d{2}|(today|startOfMonth|startOfYear)(([\-\+]\d+[dwmy]){0,3} ?)".
1239 * "\d{4}-\d{2}-\d{2}|(today|startOfMonth|startOfYear)(([\-\+]\d+[dwmy]){0,3}? )". 1237 ///
1240 * 1238 /// [endDate] - End of the date range to report on in "YYYY-MM-DD" format,
1241 * [endDate] - End of the date range to report on in "YYYY-MM-DD" format, 1239 /// inclusive.
1242 * inclusive. 1240 /// Value must have pattern
1243 * Value must have pattern 1241 /// "\d{4}-\d{2}-\d{2}|(today|startOfMonth|startOfYear)(([\-\+]\d+[dwmy]){0,3} ?)".
1244 * "\d{4}-\d{2}-\d{2}|(today|startOfMonth|startOfYear)(([\-\+]\d+[dwmy]){0,3}? )". 1242 ///
1245 * 1243 /// [dimension] - Dimensions to base the report on.
1246 * [dimension] - Dimensions to base the report on. 1244 /// Value must have pattern "[a-zA-Z_]+".
1247 * Value must have pattern "[a-zA-Z_]+". 1245 ///
1248 * 1246 /// [filter] - Filters to be run on the report.
1249 * [filter] - Filters to be run on the report. 1247 /// Value must have pattern "[a-zA-Z_]+(==|=@).+".
1250 * Value must have pattern "[a-zA-Z_]+(==|=@).+". 1248 ///
1251 * 1249 /// [locale] - Optional locale to use for translating report output to a
1252 * [locale] - Optional locale to use for translating report output to a local 1250 /// local language. Defaults to "en_US" if not specified.
1253 * language. Defaults to "en_US" if not specified. 1251 /// Value must have pattern "[a-zA-Z_]+".
1254 * Value must have pattern "[a-zA-Z_]+". 1252 ///
1255 * 1253 /// [maxResults] - The maximum number of rows of report data to return.
1256 * [maxResults] - The maximum number of rows of report data to return. 1254 /// Value must be between "0" and "50000".
1257 * Value must be between "0" and "50000". 1255 ///
1258 * 1256 /// [metric] - Numeric columns to include in the report.
1259 * [metric] - Numeric columns to include in the report. 1257 /// Value must have pattern "[a-zA-Z_]+".
1260 * Value must have pattern "[a-zA-Z_]+". 1258 ///
1261 * 1259 /// [sort] - The name of a dimension or metric to sort the resulting report
1262 * [sort] - The name of a dimension or metric to sort the resulting report on, 1260 /// on, optionally prefixed with "+" to sort ascending or "-" to sort
1263 * optionally prefixed with "+" to sort ascending or "-" to sort descending. 1261 /// descending. If no prefix is specified, the column is sorted ascending.
1264 * If no prefix is specified, the column is sorted ascending. 1262 /// Value must have pattern "(\+|-)?[a-zA-Z_]+".
1265 * Value must have pattern "(\+|-)?[a-zA-Z_]+". 1263 ///
1266 * 1264 /// [startIndex] - Index of the first row of report data to return.
1267 * [startIndex] - Index of the first row of report data to return. 1265 /// Value must be between "0" and "5000".
1268 * Value must be between "0" and "5000". 1266 ///
1269 * 1267 /// Completes with a [Report].
1270 * Completes with a [Report]. 1268 ///
1271 * 1269 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1272 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1270 /// an error.
1273 * error. 1271 ///
1274 * 1272 /// If the used [http.Client] completes with an error when making a REST
1275 * If the used [http.Client] completes with an error when making a REST call, 1273 /// call, this method will complete with the same error.
1276 * this method will complete with the same error. 1274 async.Future<Report> generate(core.String startDate, core.String endDate,
1277 */ 1275 {core.List<core.String> dimension,
1278 async.Future<Report> generate(core.String startDate, core.String endDate, {cor e.List<core.String> dimension, core.List<core.String> filter, core.String locale , core.int maxResults, core.List<core.String> metric, core.List<core.String> sor t, core.int startIndex}) { 1276 core.List<core.String> filter,
1277 core.String locale,
1278 core.int maxResults,
1279 core.List<core.String> metric,
1280 core.List<core.String> sort,
1281 core.int startIndex}) {
1279 var _url = null; 1282 var _url = null;
1280 var _queryParams = new core.Map(); 1283 var _queryParams = new core.Map();
1281 var _uploadMedia = null; 1284 var _uploadMedia = null;
1282 var _uploadOptions = null; 1285 var _uploadOptions = null;
1283 var _downloadOptions = commons.DownloadOptions.Metadata; 1286 var _downloadOptions = commons.DownloadOptions.Metadata;
1284 var _body = null; 1287 var _body = null;
1285 1288
1286 if (startDate == null) { 1289 if (startDate == null) {
1287 throw new core.ArgumentError("Parameter startDate is required."); 1290 throw new core.ArgumentError("Parameter startDate is required.");
1288 } 1291 }
(...skipping 19 matching lines...) Expand all
1308 } 1311 }
1309 if (sort != null) { 1312 if (sort != null) {
1310 _queryParams["sort"] = sort; 1313 _queryParams["sort"] = sort;
1311 } 1314 }
1312 if (startIndex != null) { 1315 if (startIndex != null) {
1313 _queryParams["startIndex"] = ["${startIndex}"]; 1316 _queryParams["startIndex"] = ["${startIndex}"];
1314 } 1317 }
1315 1318
1316 _url = 'reports'; 1319 _url = 'reports';
1317 1320
1318 var _response = _requester.request(_url, 1321 var _response = _requester.request(_url, "GET",
1319 "GET", 1322 body: _body,
1320 body: _body, 1323 queryParams: _queryParams,
1321 queryParams: _queryParams, 1324 uploadOptions: _uploadOptions,
1322 uploadOptions: _uploadOptions, 1325 uploadMedia: _uploadMedia,
1323 uploadMedia: _uploadMedia, 1326 downloadOptions: _downloadOptions);
1324 downloadOptions: _downloadOptions);
1325 return _response.then((data) => new Report.fromJson(data)); 1327 return _response.then((data) => new Report.fromJson(data));
1326 } 1328 }
1327
1328 } 1329 }
1329 1330
1330
1331 class UrlchannelsResourceApi { 1331 class UrlchannelsResourceApi {
1332 final commons.ApiRequester _requester; 1332 final commons.ApiRequester _requester;
1333 1333
1334 UrlchannelsResourceApi(commons.ApiRequester client) : 1334 UrlchannelsResourceApi(commons.ApiRequester client) : _requester = client;
1335 _requester = client;
1336 1335
1337 /** 1336 /// Delete a URL channel from the host AdSense account.
1338 * Delete a URL channel from the host AdSense account. 1337 ///
1339 * 1338 /// Request parameters:
1340 * Request parameters: 1339 ///
1341 * 1340 /// [adClientId] - Ad client from which to delete the URL channel.
1342 * [adClientId] - Ad client from which to delete the URL channel. 1341 ///
1343 * 1342 /// [urlChannelId] - URL channel to delete.
1344 * [urlChannelId] - URL channel to delete. 1343 ///
1345 * 1344 /// Completes with a [UrlChannel].
1346 * Completes with a [UrlChannel]. 1345 ///
1347 * 1346 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1348 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1347 /// an error.
1349 * error. 1348 ///
1350 * 1349 /// If the used [http.Client] completes with an error when making a REST
1351 * If the used [http.Client] completes with an error when making a REST call, 1350 /// call, this method will complete with the same error.
1352 * this method will complete with the same error. 1351 async.Future<UrlChannel> delete(
1353 */ 1352 core.String adClientId, core.String urlChannelId) {
1354 async.Future<UrlChannel> delete(core.String adClientId, core.String urlChannel Id) {
1355 var _url = null; 1353 var _url = null;
1356 var _queryParams = new core.Map(); 1354 var _queryParams = new core.Map();
1357 var _uploadMedia = null; 1355 var _uploadMedia = null;
1358 var _uploadOptions = null; 1356 var _uploadOptions = null;
1359 var _downloadOptions = commons.DownloadOptions.Metadata; 1357 var _downloadOptions = commons.DownloadOptions.Metadata;
1360 var _body = null; 1358 var _body = null;
1361 1359
1362 if (adClientId == null) { 1360 if (adClientId == null) {
1363 throw new core.ArgumentError("Parameter adClientId is required."); 1361 throw new core.ArgumentError("Parameter adClientId is required.");
1364 } 1362 }
1365 if (urlChannelId == null) { 1363 if (urlChannelId == null) {
1366 throw new core.ArgumentError("Parameter urlChannelId is required."); 1364 throw new core.ArgumentError("Parameter urlChannelId is required.");
1367 } 1365 }
1368 1366
1369 _url = 'adclients/' + commons.Escaper.ecapeVariable('$adClientId') + '/urlch annels/' + commons.Escaper.ecapeVariable('$urlChannelId'); 1367 _url = 'adclients/' +
1368 commons.Escaper.ecapeVariable('$adClientId') +
1369 '/urlchannels/' +
1370 commons.Escaper.ecapeVariable('$urlChannelId');
1370 1371
1371 var _response = _requester.request(_url, 1372 var _response = _requester.request(_url, "DELETE",
1372 "DELETE", 1373 body: _body,
1373 body: _body, 1374 queryParams: _queryParams,
1374 queryParams: _queryParams, 1375 uploadOptions: _uploadOptions,
1375 uploadOptions: _uploadOptions, 1376 uploadMedia: _uploadMedia,
1376 uploadMedia: _uploadMedia, 1377 downloadOptions: _downloadOptions);
1377 downloadOptions: _downloadOptions);
1378 return _response.then((data) => new UrlChannel.fromJson(data)); 1378 return _response.then((data) => new UrlChannel.fromJson(data));
1379 } 1379 }
1380 1380
1381 /** 1381 /// Add a new URL channel to the host AdSense account.
1382 * Add a new URL channel to the host AdSense account. 1382 ///
1383 * 1383 /// [request] - The metadata request object.
1384 * [request] - The metadata request object. 1384 ///
1385 * 1385 /// Request parameters:
1386 * Request parameters: 1386 ///
1387 * 1387 /// [adClientId] - Ad client to which the new URL channel will be added.
1388 * [adClientId] - Ad client to which the new URL channel will be added. 1388 ///
1389 * 1389 /// Completes with a [UrlChannel].
1390 * Completes with a [UrlChannel]. 1390 ///
1391 * 1391 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1392 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1392 /// an error.
1393 * error. 1393 ///
1394 * 1394 /// If the used [http.Client] completes with an error when making a REST
1395 * If the used [http.Client] completes with an error when making a REST call, 1395 /// call, this method will complete with the same error.
1396 * this method will complete with the same error.
1397 */
1398 async.Future<UrlChannel> insert(UrlChannel request, core.String adClientId) { 1396 async.Future<UrlChannel> insert(UrlChannel request, core.String adClientId) {
1399 var _url = null; 1397 var _url = null;
1400 var _queryParams = new core.Map(); 1398 var _queryParams = new core.Map();
1401 var _uploadMedia = null; 1399 var _uploadMedia = null;
1402 var _uploadOptions = null; 1400 var _uploadOptions = null;
1403 var _downloadOptions = commons.DownloadOptions.Metadata; 1401 var _downloadOptions = commons.DownloadOptions.Metadata;
1404 var _body = null; 1402 var _body = null;
1405 1403
1406 if (request != null) { 1404 if (request != null) {
1407 _body = convert.JSON.encode((request).toJson()); 1405 _body = convert.JSON.encode((request).toJson());
1408 } 1406 }
1409 if (adClientId == null) { 1407 if (adClientId == null) {
1410 throw new core.ArgumentError("Parameter adClientId is required."); 1408 throw new core.ArgumentError("Parameter adClientId is required.");
1411 } 1409 }
1412 1410
1413 _url = 'adclients/' + commons.Escaper.ecapeVariable('$adClientId') + '/urlch annels'; 1411 _url = 'adclients/' +
1412 commons.Escaper.ecapeVariable('$adClientId') +
1413 '/urlchannels';
1414 1414
1415 var _response = _requester.request(_url, 1415 var _response = _requester.request(_url, "POST",
1416 "POST", 1416 body: _body,
1417 body: _body, 1417 queryParams: _queryParams,
1418 queryParams: _queryParams, 1418 uploadOptions: _uploadOptions,
1419 uploadOptions: _uploadOptions, 1419 uploadMedia: _uploadMedia,
1420 uploadMedia: _uploadMedia, 1420 downloadOptions: _downloadOptions);
1421 downloadOptions: _downloadOptions);
1422 return _response.then((data) => new UrlChannel.fromJson(data)); 1421 return _response.then((data) => new UrlChannel.fromJson(data));
1423 } 1422 }
1424 1423
1425 /** 1424 /// List all host URL channels in the host AdSense account.
1426 * List all host URL channels in the host AdSense account. 1425 ///
1427 * 1426 /// Request parameters:
1428 * Request parameters: 1427 ///
1429 * 1428 /// [adClientId] - Ad client for which to list URL channels.
1430 * [adClientId] - Ad client for which to list URL channels. 1429 ///
1431 * 1430 /// [maxResults] - The maximum number of URL channels to include in the
1432 * [maxResults] - The maximum number of URL channels to include in the 1431 /// response, used for paging.
1433 * response, used for paging. 1432 /// Value must be between "0" and "10000".
1434 * Value must be between "0" and "10000". 1433 ///
1435 * 1434 /// [pageToken] - A continuation token, used to page through URL channels. To
1436 * [pageToken] - A continuation token, used to page through URL channels. To 1435 /// retrieve the next page, set this parameter to the value of
1437 * retrieve the next page, set this parameter to the value of "nextPageToken" 1436 /// "nextPageToken" from the previous response.
1438 * from the previous response. 1437 ///
1439 * 1438 /// Completes with a [UrlChannels].
1440 * Completes with a [UrlChannels]. 1439 ///
1441 * 1440 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1442 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1441 /// an error.
1443 * error. 1442 ///
1444 * 1443 /// If the used [http.Client] completes with an error when making a REST
1445 * If the used [http.Client] completes with an error when making a REST call, 1444 /// call, this method will complete with the same error.
1446 * this method will complete with the same error. 1445 async.Future<UrlChannels> list(core.String adClientId,
1447 */ 1446 {core.int maxResults, core.String pageToken}) {
1448 async.Future<UrlChannels> list(core.String adClientId, {core.int maxResults, c ore.String pageToken}) {
1449 var _url = null; 1447 var _url = null;
1450 var _queryParams = new core.Map(); 1448 var _queryParams = new core.Map();
1451 var _uploadMedia = null; 1449 var _uploadMedia = null;
1452 var _uploadOptions = null; 1450 var _uploadOptions = null;
1453 var _downloadOptions = commons.DownloadOptions.Metadata; 1451 var _downloadOptions = commons.DownloadOptions.Metadata;
1454 var _body = null; 1452 var _body = null;
1455 1453
1456 if (adClientId == null) { 1454 if (adClientId == null) {
1457 throw new core.ArgumentError("Parameter adClientId is required."); 1455 throw new core.ArgumentError("Parameter adClientId is required.");
1458 } 1456 }
1459 if (maxResults != null) { 1457 if (maxResults != null) {
1460 _queryParams["maxResults"] = ["${maxResults}"]; 1458 _queryParams["maxResults"] = ["${maxResults}"];
1461 } 1459 }
1462 if (pageToken != null) { 1460 if (pageToken != null) {
1463 _queryParams["pageToken"] = [pageToken]; 1461 _queryParams["pageToken"] = [pageToken];
1464 } 1462 }
1465 1463
1466 _url = 'adclients/' + commons.Escaper.ecapeVariable('$adClientId') + '/urlch annels'; 1464 _url = 'adclients/' +
1465 commons.Escaper.ecapeVariable('$adClientId') +
1466 '/urlchannels';
1467 1467
1468 var _response = _requester.request(_url, 1468 var _response = _requester.request(_url, "GET",
1469 "GET", 1469 body: _body,
1470 body: _body, 1470 queryParams: _queryParams,
1471 queryParams: _queryParams, 1471 uploadOptions: _uploadOptions,
1472 uploadOptions: _uploadOptions, 1472 uploadMedia: _uploadMedia,
1473 uploadMedia: _uploadMedia, 1473 downloadOptions: _downloadOptions);
1474 downloadOptions: _downloadOptions);
1475 return _response.then((data) => new UrlChannels.fromJson(data)); 1474 return _response.then((data) => new UrlChannels.fromJson(data));
1476 } 1475 }
1477
1478 } 1476 }
1479 1477
1478 class Account {
1479 /// Unique identifier of this account.
1480 core.String id;
1480 1481
1482 /// Kind of resource this is, in this case adsensehost#account.
1483 core.String kind;
1481 1484
1482 class Account { 1485 /// Name of this account.
1483 /** Unique identifier of this account. */
1484 core.String id;
1485 /** Kind of resource this is, in this case adsensehost#account. */
1486 core.String kind;
1487 /** Name of this account. */
1488 core.String name; 1486 core.String name;
1489 /** Approval status of this account. One of: PENDING, APPROVED, DISABLED. */ 1487
1488 /// Approval status of this account. One of: PENDING, APPROVED, DISABLED.
1490 core.String status; 1489 core.String status;
1491 1490
1492 Account(); 1491 Account();
1493 1492
1494 Account.fromJson(core.Map _json) { 1493 Account.fromJson(core.Map _json) {
1495 if (_json.containsKey("id")) { 1494 if (_json.containsKey("id")) {
1496 id = _json["id"]; 1495 id = _json["id"];
1497 } 1496 }
1498 if (_json.containsKey("kind")) { 1497 if (_json.containsKey("kind")) {
1499 kind = _json["kind"]; 1498 kind = _json["kind"];
1500 } 1499 }
1501 if (_json.containsKey("name")) { 1500 if (_json.containsKey("name")) {
1502 name = _json["name"]; 1501 name = _json["name"];
1503 } 1502 }
1504 if (_json.containsKey("status")) { 1503 if (_json.containsKey("status")) {
1505 status = _json["status"]; 1504 status = _json["status"];
1506 } 1505 }
1507 } 1506 }
1508 1507
1509 core.Map<core.String, core.Object> toJson() { 1508 core.Map<core.String, core.Object> toJson() {
1510 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1509 final core.Map<core.String, core.Object> _json =
1510 new core.Map<core.String, core.Object>();
1511 if (id != null) { 1511 if (id != null) {
1512 _json["id"] = id; 1512 _json["id"] = id;
1513 } 1513 }
1514 if (kind != null) { 1514 if (kind != null) {
1515 _json["kind"] = kind; 1515 _json["kind"] = kind;
1516 } 1516 }
1517 if (name != null) { 1517 if (name != null) {
1518 _json["name"] = name; 1518 _json["name"] = name;
1519 } 1519 }
1520 if (status != null) { 1520 if (status != null) {
1521 _json["status"] = status; 1521 _json["status"] = status;
1522 } 1522 }
1523 return _json; 1523 return _json;
1524 } 1524 }
1525 } 1525 }
1526 1526
1527 class Accounts { 1527 class Accounts {
1528 /** ETag of this response for caching purposes. */ 1528 /// ETag of this response for caching purposes.
1529 core.String etag; 1529 core.String etag;
1530 /** The accounts returned in this list response. */ 1530
1531 /// The accounts returned in this list response.
1531 core.List<Account> items; 1532 core.List<Account> items;
1532 /** Kind of list this is, in this case adsensehost#accounts. */ 1533
1534 /// Kind of list this is, in this case adsensehost#accounts.
1533 core.String kind; 1535 core.String kind;
1534 1536
1535 Accounts(); 1537 Accounts();
1536 1538
1537 Accounts.fromJson(core.Map _json) { 1539 Accounts.fromJson(core.Map _json) {
1538 if (_json.containsKey("etag")) { 1540 if (_json.containsKey("etag")) {
1539 etag = _json["etag"]; 1541 etag = _json["etag"];
1540 } 1542 }
1541 if (_json.containsKey("items")) { 1543 if (_json.containsKey("items")) {
1542 items = _json["items"].map((value) => new Account.fromJson(value)).toList( ); 1544 items =
1545 _json["items"].map((value) => new Account.fromJson(value)).toList();
1543 } 1546 }
1544 if (_json.containsKey("kind")) { 1547 if (_json.containsKey("kind")) {
1545 kind = _json["kind"]; 1548 kind = _json["kind"];
1546 } 1549 }
1547 } 1550 }
1548 1551
1549 core.Map<core.String, core.Object> toJson() { 1552 core.Map<core.String, core.Object> toJson() {
1550 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1553 final core.Map<core.String, core.Object> _json =
1554 new core.Map<core.String, core.Object>();
1551 if (etag != null) { 1555 if (etag != null) {
1552 _json["etag"] = etag; 1556 _json["etag"] = etag;
1553 } 1557 }
1554 if (items != null) { 1558 if (items != null) {
1555 _json["items"] = items.map((value) => (value).toJson()).toList(); 1559 _json["items"] = items.map((value) => (value).toJson()).toList();
1556 } 1560 }
1557 if (kind != null) { 1561 if (kind != null) {
1558 _json["kind"] = kind; 1562 _json["kind"] = kind;
1559 } 1563 }
1560 return _json; 1564 return _json;
1561 } 1565 }
1562 } 1566 }
1563 1567
1564 class AdClient { 1568 class AdClient {
1565 /** Whether this ad client is opted in to ARC. */ 1569 /// Whether this ad client is opted in to ARC.
1566 core.bool arcOptIn; 1570 core.bool arcOptIn;
1567 /** Unique identifier of this ad client. */ 1571
1572 /// Unique identifier of this ad client.
1568 core.String id; 1573 core.String id;
1569 /** Kind of resource this is, in this case adsensehost#adClient. */ 1574
1575 /// Kind of resource this is, in this case adsensehost#adClient.
1570 core.String kind; 1576 core.String kind;
1571 /** 1577
1572 * This ad client's product code, which corresponds to the PRODUCT_CODE report 1578 /// This ad client's product code, which corresponds to the PRODUCT_CODE
1573 * dimension. 1579 /// report dimension.
1574 */
1575 core.String productCode; 1580 core.String productCode;
1576 /** Whether this ad client supports being reported on. */ 1581
1582 /// Whether this ad client supports being reported on.
1577 core.bool supportsReporting; 1583 core.bool supportsReporting;
1578 1584
1579 AdClient(); 1585 AdClient();
1580 1586
1581 AdClient.fromJson(core.Map _json) { 1587 AdClient.fromJson(core.Map _json) {
1582 if (_json.containsKey("arcOptIn")) { 1588 if (_json.containsKey("arcOptIn")) {
1583 arcOptIn = _json["arcOptIn"]; 1589 arcOptIn = _json["arcOptIn"];
1584 } 1590 }
1585 if (_json.containsKey("id")) { 1591 if (_json.containsKey("id")) {
1586 id = _json["id"]; 1592 id = _json["id"];
1587 } 1593 }
1588 if (_json.containsKey("kind")) { 1594 if (_json.containsKey("kind")) {
1589 kind = _json["kind"]; 1595 kind = _json["kind"];
1590 } 1596 }
1591 if (_json.containsKey("productCode")) { 1597 if (_json.containsKey("productCode")) {
1592 productCode = _json["productCode"]; 1598 productCode = _json["productCode"];
1593 } 1599 }
1594 if (_json.containsKey("supportsReporting")) { 1600 if (_json.containsKey("supportsReporting")) {
1595 supportsReporting = _json["supportsReporting"]; 1601 supportsReporting = _json["supportsReporting"];
1596 } 1602 }
1597 } 1603 }
1598 1604
1599 core.Map<core.String, core.Object> toJson() { 1605 core.Map<core.String, core.Object> toJson() {
1600 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1606 final core.Map<core.String, core.Object> _json =
1607 new core.Map<core.String, core.Object>();
1601 if (arcOptIn != null) { 1608 if (arcOptIn != null) {
1602 _json["arcOptIn"] = arcOptIn; 1609 _json["arcOptIn"] = arcOptIn;
1603 } 1610 }
1604 if (id != null) { 1611 if (id != null) {
1605 _json["id"] = id; 1612 _json["id"] = id;
1606 } 1613 }
1607 if (kind != null) { 1614 if (kind != null) {
1608 _json["kind"] = kind; 1615 _json["kind"] = kind;
1609 } 1616 }
1610 if (productCode != null) { 1617 if (productCode != null) {
1611 _json["productCode"] = productCode; 1618 _json["productCode"] = productCode;
1612 } 1619 }
1613 if (supportsReporting != null) { 1620 if (supportsReporting != null) {
1614 _json["supportsReporting"] = supportsReporting; 1621 _json["supportsReporting"] = supportsReporting;
1615 } 1622 }
1616 return _json; 1623 return _json;
1617 } 1624 }
1618 } 1625 }
1619 1626
1620 class AdClients { 1627 class AdClients {
1621 /** ETag of this response for caching purposes. */ 1628 /// ETag of this response for caching purposes.
1622 core.String etag; 1629 core.String etag;
1623 /** The ad clients returned in this list response. */ 1630
1631 /// The ad clients returned in this list response.
1624 core.List<AdClient> items; 1632 core.List<AdClient> items;
1625 /** Kind of list this is, in this case adsensehost#adClients. */ 1633
1634 /// Kind of list this is, in this case adsensehost#adClients.
1626 core.String kind; 1635 core.String kind;
1627 /** 1636
1628 * Continuation token used to page through ad clients. To retrieve the next 1637 /// Continuation token used to page through ad clients. To retrieve the next
1629 * page of results, set the next request's "pageToken" value to this. 1638 /// page of results, set the next request's "pageToken" value to this.
1630 */
1631 core.String nextPageToken; 1639 core.String nextPageToken;
1632 1640
1633 AdClients(); 1641 AdClients();
1634 1642
1635 AdClients.fromJson(core.Map _json) { 1643 AdClients.fromJson(core.Map _json) {
1636 if (_json.containsKey("etag")) { 1644 if (_json.containsKey("etag")) {
1637 etag = _json["etag"]; 1645 etag = _json["etag"];
1638 } 1646 }
1639 if (_json.containsKey("items")) { 1647 if (_json.containsKey("items")) {
1640 items = _json["items"].map((value) => new AdClient.fromJson(value)).toList (); 1648 items =
1649 _json["items"].map((value) => new AdClient.fromJson(value)).toList();
1641 } 1650 }
1642 if (_json.containsKey("kind")) { 1651 if (_json.containsKey("kind")) {
1643 kind = _json["kind"]; 1652 kind = _json["kind"];
1644 } 1653 }
1645 if (_json.containsKey("nextPageToken")) { 1654 if (_json.containsKey("nextPageToken")) {
1646 nextPageToken = _json["nextPageToken"]; 1655 nextPageToken = _json["nextPageToken"];
1647 } 1656 }
1648 } 1657 }
1649 1658
1650 core.Map<core.String, core.Object> toJson() { 1659 core.Map<core.String, core.Object> toJson() {
1651 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1660 final core.Map<core.String, core.Object> _json =
1661 new core.Map<core.String, core.Object>();
1652 if (etag != null) { 1662 if (etag != null) {
1653 _json["etag"] = etag; 1663 _json["etag"] = etag;
1654 } 1664 }
1655 if (items != null) { 1665 if (items != null) {
1656 _json["items"] = items.map((value) => (value).toJson()).toList(); 1666 _json["items"] = items.map((value) => (value).toJson()).toList();
1657 } 1667 }
1658 if (kind != null) { 1668 if (kind != null) {
1659 _json["kind"] = kind; 1669 _json["kind"] = kind;
1660 } 1670 }
1661 if (nextPageToken != null) { 1671 if (nextPageToken != null) {
1662 _json["nextPageToken"] = nextPageToken; 1672 _json["nextPageToken"] = nextPageToken;
1663 } 1673 }
1664 return _json; 1674 return _json;
1665 } 1675 }
1666 } 1676 }
1667 1677
1668 class AdCode { 1678 class AdCode {
1669 /** The ad code snippet. */ 1679 /// The ad code snippet.
1670 core.String adCode; 1680 core.String adCode;
1671 /** Kind this is, in this case adsensehost#adCode. */ 1681
1682 /// Kind this is, in this case adsensehost#adCode.
1672 core.String kind; 1683 core.String kind;
1673 1684
1674 AdCode(); 1685 AdCode();
1675 1686
1676 AdCode.fromJson(core.Map _json) { 1687 AdCode.fromJson(core.Map _json) {
1677 if (_json.containsKey("adCode")) { 1688 if (_json.containsKey("adCode")) {
1678 adCode = _json["adCode"]; 1689 adCode = _json["adCode"];
1679 } 1690 }
1680 if (_json.containsKey("kind")) { 1691 if (_json.containsKey("kind")) {
1681 kind = _json["kind"]; 1692 kind = _json["kind"];
1682 } 1693 }
1683 } 1694 }
1684 1695
1685 core.Map<core.String, core.Object> toJson() { 1696 core.Map<core.String, core.Object> toJson() {
1686 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1697 final core.Map<core.String, core.Object> _json =
1698 new core.Map<core.String, core.Object>();
1687 if (adCode != null) { 1699 if (adCode != null) {
1688 _json["adCode"] = adCode; 1700 _json["adCode"] = adCode;
1689 } 1701 }
1690 if (kind != null) { 1702 if (kind != null) {
1691 _json["kind"] = kind; 1703 _json["kind"] = kind;
1692 } 1704 }
1693 return _json; 1705 return _json;
1694 } 1706 }
1695 } 1707 }
1696 1708
1697 /** 1709 /// The colors included in the style. These are represented as six hexadecimal
1698 * The colors included in the style. These are represented as six hexadecimal 1710 /// characters, similar to HTML color codes, but without the leading hash.
1699 * characters, similar to HTML color codes, but without the leading hash.
1700 */
1701 class AdStyleColors { 1711 class AdStyleColors {
1702 /** The color of the ad background. */ 1712 /// The color of the ad background.
1703 core.String background; 1713 core.String background;
1704 /** The color of the ad border. */ 1714
1715 /// The color of the ad border.
1705 core.String border; 1716 core.String border;
1706 /** The color of the ad text. */ 1717
1718 /// The color of the ad text.
1707 core.String text; 1719 core.String text;
1708 /** The color of the ad title. */ 1720
1721 /// The color of the ad title.
1709 core.String title; 1722 core.String title;
1710 /** The color of the ad url. */ 1723
1724 /// The color of the ad url.
1711 core.String url; 1725 core.String url;
1712 1726
1713 AdStyleColors(); 1727 AdStyleColors();
1714 1728
1715 AdStyleColors.fromJson(core.Map _json) { 1729 AdStyleColors.fromJson(core.Map _json) {
1716 if (_json.containsKey("background")) { 1730 if (_json.containsKey("background")) {
1717 background = _json["background"]; 1731 background = _json["background"];
1718 } 1732 }
1719 if (_json.containsKey("border")) { 1733 if (_json.containsKey("border")) {
1720 border = _json["border"]; 1734 border = _json["border"];
1721 } 1735 }
1722 if (_json.containsKey("text")) { 1736 if (_json.containsKey("text")) {
1723 text = _json["text"]; 1737 text = _json["text"];
1724 } 1738 }
1725 if (_json.containsKey("title")) { 1739 if (_json.containsKey("title")) {
1726 title = _json["title"]; 1740 title = _json["title"];
1727 } 1741 }
1728 if (_json.containsKey("url")) { 1742 if (_json.containsKey("url")) {
1729 url = _json["url"]; 1743 url = _json["url"];
1730 } 1744 }
1731 } 1745 }
1732 1746
1733 core.Map<core.String, core.Object> toJson() { 1747 core.Map<core.String, core.Object> toJson() {
1734 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1748 final core.Map<core.String, core.Object> _json =
1749 new core.Map<core.String, core.Object>();
1735 if (background != null) { 1750 if (background != null) {
1736 _json["background"] = background; 1751 _json["background"] = background;
1737 } 1752 }
1738 if (border != null) { 1753 if (border != null) {
1739 _json["border"] = border; 1754 _json["border"] = border;
1740 } 1755 }
1741 if (text != null) { 1756 if (text != null) {
1742 _json["text"] = text; 1757 _json["text"] = text;
1743 } 1758 }
1744 if (title != null) { 1759 if (title != null) {
1745 _json["title"] = title; 1760 _json["title"] = title;
1746 } 1761 }
1747 if (url != null) { 1762 if (url != null) {
1748 _json["url"] = url; 1763 _json["url"] = url;
1749 } 1764 }
1750 return _json; 1765 return _json;
1751 } 1766 }
1752 } 1767 }
1753 1768
1754 /** The font which is included in the style. */ 1769 /// The font which is included in the style.
1755 class AdStyleFont { 1770 class AdStyleFont {
1756 /** 1771 /// The family of the font. Possible values are: ACCOUNT_DEFAULT_FAMILY,
1757 * The family of the font. Possible values are: ACCOUNT_DEFAULT_FAMILY, 1772 /// ADSENSE_DEFAULT_FAMILY, ARIAL, TIMES and VERDANA.
1758 * ADSENSE_DEFAULT_FAMILY, ARIAL, TIMES and VERDANA.
1759 */
1760 core.String family; 1773 core.String family;
1761 /** 1774
1762 * The size of the font. Possible values are: ACCOUNT_DEFAULT_SIZE, 1775 /// The size of the font. Possible values are: ACCOUNT_DEFAULT_SIZE,
1763 * ADSENSE_DEFAULT_SIZE, SMALL, MEDIUM and LARGE. 1776 /// ADSENSE_DEFAULT_SIZE, SMALL, MEDIUM and LARGE.
1764 */
1765 core.String size; 1777 core.String size;
1766 1778
1767 AdStyleFont(); 1779 AdStyleFont();
1768 1780
1769 AdStyleFont.fromJson(core.Map _json) { 1781 AdStyleFont.fromJson(core.Map _json) {
1770 if (_json.containsKey("family")) { 1782 if (_json.containsKey("family")) {
1771 family = _json["family"]; 1783 family = _json["family"];
1772 } 1784 }
1773 if (_json.containsKey("size")) { 1785 if (_json.containsKey("size")) {
1774 size = _json["size"]; 1786 size = _json["size"];
1775 } 1787 }
1776 } 1788 }
1777 1789
1778 core.Map<core.String, core.Object> toJson() { 1790 core.Map<core.String, core.Object> toJson() {
1779 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1791 final core.Map<core.String, core.Object> _json =
1792 new core.Map<core.String, core.Object>();
1780 if (family != null) { 1793 if (family != null) {
1781 _json["family"] = family; 1794 _json["family"] = family;
1782 } 1795 }
1783 if (size != null) { 1796 if (size != null) {
1784 _json["size"] = size; 1797 _json["size"] = size;
1785 } 1798 }
1786 return _json; 1799 return _json;
1787 } 1800 }
1788 } 1801 }
1789 1802
1790 class AdStyle { 1803 class AdStyle {
1791 /** 1804 /// The colors included in the style. These are represented as six
1792 * The colors included in the style. These are represented as six hexadecimal 1805 /// hexadecimal characters, similar to HTML color codes, but without the
1793 * characters, similar to HTML color codes, but without the leading hash. 1806 /// leading hash.
1794 */
1795 AdStyleColors colors; 1807 AdStyleColors colors;
1796 /** 1808
1797 * The style of the corners in the ad (deprecated: never populated, ignored). 1809 /// The style of the corners in the ad (deprecated: never populated,
1798 */ 1810 /// ignored).
1799 core.String corners; 1811 core.String corners;
1800 /** The font which is included in the style. */ 1812
1813 /// The font which is included in the style.
1801 AdStyleFont font; 1814 AdStyleFont font;
1802 /** Kind this is, in this case adsensehost#adStyle. */ 1815
1816 /// Kind this is, in this case adsensehost#adStyle.
1803 core.String kind; 1817 core.String kind;
1804 1818
1805 AdStyle(); 1819 AdStyle();
1806 1820
1807 AdStyle.fromJson(core.Map _json) { 1821 AdStyle.fromJson(core.Map _json) {
1808 if (_json.containsKey("colors")) { 1822 if (_json.containsKey("colors")) {
1809 colors = new AdStyleColors.fromJson(_json["colors"]); 1823 colors = new AdStyleColors.fromJson(_json["colors"]);
1810 } 1824 }
1811 if (_json.containsKey("corners")) { 1825 if (_json.containsKey("corners")) {
1812 corners = _json["corners"]; 1826 corners = _json["corners"];
1813 } 1827 }
1814 if (_json.containsKey("font")) { 1828 if (_json.containsKey("font")) {
1815 font = new AdStyleFont.fromJson(_json["font"]); 1829 font = new AdStyleFont.fromJson(_json["font"]);
1816 } 1830 }
1817 if (_json.containsKey("kind")) { 1831 if (_json.containsKey("kind")) {
1818 kind = _json["kind"]; 1832 kind = _json["kind"];
1819 } 1833 }
1820 } 1834 }
1821 1835
1822 core.Map<core.String, core.Object> toJson() { 1836 core.Map<core.String, core.Object> toJson() {
1823 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1837 final core.Map<core.String, core.Object> _json =
1838 new core.Map<core.String, core.Object>();
1824 if (colors != null) { 1839 if (colors != null) {
1825 _json["colors"] = (colors).toJson(); 1840 _json["colors"] = (colors).toJson();
1826 } 1841 }
1827 if (corners != null) { 1842 if (corners != null) {
1828 _json["corners"] = corners; 1843 _json["corners"] = corners;
1829 } 1844 }
1830 if (font != null) { 1845 if (font != null) {
1831 _json["font"] = (font).toJson(); 1846 _json["font"] = (font).toJson();
1832 } 1847 }
1833 if (kind != null) { 1848 if (kind != null) {
1834 _json["kind"] = kind; 1849 _json["kind"] = kind;
1835 } 1850 }
1836 return _json; 1851 return _json;
1837 } 1852 }
1838 } 1853 }
1839 1854
1840 /** The backup option to be used in instances where no ad is available. */ 1855 /// The backup option to be used in instances where no ad is available.
1841 class AdUnitContentAdsSettingsBackupOption { 1856 class AdUnitContentAdsSettingsBackupOption {
1842 /** 1857 /// Color to use when type is set to COLOR. These are represented as six
1843 * Color to use when type is set to COLOR. These are represented as six 1858 /// hexadecimal characters, similar to HTML color codes, but without the
1844 * hexadecimal characters, similar to HTML color codes, but without the 1859 /// leading hash.
1845 * leading hash.
1846 */
1847 core.String color; 1860 core.String color;
1848 /** Type of the backup option. Possible values are BLANK, COLOR and URL. */ 1861
1862 /// Type of the backup option. Possible values are BLANK, COLOR and URL.
1849 core.String type; 1863 core.String type;
1850 /** URL to use when type is set to URL. */ 1864
1865 /// URL to use when type is set to URL.
1851 core.String url; 1866 core.String url;
1852 1867
1853 AdUnitContentAdsSettingsBackupOption(); 1868 AdUnitContentAdsSettingsBackupOption();
1854 1869
1855 AdUnitContentAdsSettingsBackupOption.fromJson(core.Map _json) { 1870 AdUnitContentAdsSettingsBackupOption.fromJson(core.Map _json) {
1856 if (_json.containsKey("color")) { 1871 if (_json.containsKey("color")) {
1857 color = _json["color"]; 1872 color = _json["color"];
1858 } 1873 }
1859 if (_json.containsKey("type")) { 1874 if (_json.containsKey("type")) {
1860 type = _json["type"]; 1875 type = _json["type"];
1861 } 1876 }
1862 if (_json.containsKey("url")) { 1877 if (_json.containsKey("url")) {
1863 url = _json["url"]; 1878 url = _json["url"];
1864 } 1879 }
1865 } 1880 }
1866 1881
1867 core.Map<core.String, core.Object> toJson() { 1882 core.Map<core.String, core.Object> toJson() {
1868 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1883 final core.Map<core.String, core.Object> _json =
1884 new core.Map<core.String, core.Object>();
1869 if (color != null) { 1885 if (color != null) {
1870 _json["color"] = color; 1886 _json["color"] = color;
1871 } 1887 }
1872 if (type != null) { 1888 if (type != null) {
1873 _json["type"] = type; 1889 _json["type"] = type;
1874 } 1890 }
1875 if (url != null) { 1891 if (url != null) {
1876 _json["url"] = url; 1892 _json["url"] = url;
1877 } 1893 }
1878 return _json; 1894 return _json;
1879 } 1895 }
1880 } 1896 }
1881 1897
1882 /** 1898 /// Settings specific to content ads (AFC) and highend mobile content ads (AFMC
1883 * Settings specific to content ads (AFC) and highend mobile content ads (AFMC - 1899 /// - deprecated).
1884 * deprecated).
1885 */
1886 class AdUnitContentAdsSettings { 1900 class AdUnitContentAdsSettings {
1887 /** The backup option to be used in instances where no ad is available. */ 1901 /// The backup option to be used in instances where no ad is available.
1888 AdUnitContentAdsSettingsBackupOption backupOption; 1902 AdUnitContentAdsSettingsBackupOption backupOption;
1889 /** 1903
1890 * Size of this ad unit. Size values are in the form SIZE_{width}_{height}. 1904 /// Size of this ad unit. Size values are in the form SIZE_{width}_{height}.
1891 */
1892 core.String size; 1905 core.String size;
1893 /** 1906
1894 * Type of this ad unit. Possible values are TEXT, TEXT_IMAGE, IMAGE and LINK. 1907 /// Type of this ad unit. Possible values are TEXT, TEXT_IMAGE, IMAGE and
1895 */ 1908 /// LINK.
1896 core.String type; 1909 core.String type;
1897 1910
1898 AdUnitContentAdsSettings(); 1911 AdUnitContentAdsSettings();
1899 1912
1900 AdUnitContentAdsSettings.fromJson(core.Map _json) { 1913 AdUnitContentAdsSettings.fromJson(core.Map _json) {
1901 if (_json.containsKey("backupOption")) { 1914 if (_json.containsKey("backupOption")) {
1902 backupOption = new AdUnitContentAdsSettingsBackupOption.fromJson(_json["ba ckupOption"]); 1915 backupOption = new AdUnitContentAdsSettingsBackupOption.fromJson(
1916 _json["backupOption"]);
1903 } 1917 }
1904 if (_json.containsKey("size")) { 1918 if (_json.containsKey("size")) {
1905 size = _json["size"]; 1919 size = _json["size"];
1906 } 1920 }
1907 if (_json.containsKey("type")) { 1921 if (_json.containsKey("type")) {
1908 type = _json["type"]; 1922 type = _json["type"];
1909 } 1923 }
1910 } 1924 }
1911 1925
1912 core.Map<core.String, core.Object> toJson() { 1926 core.Map<core.String, core.Object> toJson() {
1913 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1927 final core.Map<core.String, core.Object> _json =
1928 new core.Map<core.String, core.Object>();
1914 if (backupOption != null) { 1929 if (backupOption != null) {
1915 _json["backupOption"] = (backupOption).toJson(); 1930 _json["backupOption"] = (backupOption).toJson();
1916 } 1931 }
1917 if (size != null) { 1932 if (size != null) {
1918 _json["size"] = size; 1933 _json["size"] = size;
1919 } 1934 }
1920 if (type != null) { 1935 if (type != null) {
1921 _json["type"] = type; 1936 _json["type"] = type;
1922 } 1937 }
1923 return _json; 1938 return _json;
1924 } 1939 }
1925 } 1940 }
1926 1941
1927 /** Settings specific to WAP mobile content ads (AFMC - deprecated). */ 1942 /// Settings specific to WAP mobile content ads (AFMC - deprecated).
1928 class AdUnitMobileContentAdsSettings { 1943 class AdUnitMobileContentAdsSettings {
1929 /** The markup language to use for this ad unit. */ 1944 /// The markup language to use for this ad unit.
1930 core.String markupLanguage; 1945 core.String markupLanguage;
1931 /** The scripting language to use for this ad unit. */ 1946
1947 /// The scripting language to use for this ad unit.
1932 core.String scriptingLanguage; 1948 core.String scriptingLanguage;
1933 /** Size of this ad unit. */ 1949
1950 /// Size of this ad unit.
1934 core.String size; 1951 core.String size;
1935 /** Type of this ad unit. */ 1952
1953 /// Type of this ad unit.
1936 core.String type; 1954 core.String type;
1937 1955
1938 AdUnitMobileContentAdsSettings(); 1956 AdUnitMobileContentAdsSettings();
1939 1957
1940 AdUnitMobileContentAdsSettings.fromJson(core.Map _json) { 1958 AdUnitMobileContentAdsSettings.fromJson(core.Map _json) {
1941 if (_json.containsKey("markupLanguage")) { 1959 if (_json.containsKey("markupLanguage")) {
1942 markupLanguage = _json["markupLanguage"]; 1960 markupLanguage = _json["markupLanguage"];
1943 } 1961 }
1944 if (_json.containsKey("scriptingLanguage")) { 1962 if (_json.containsKey("scriptingLanguage")) {
1945 scriptingLanguage = _json["scriptingLanguage"]; 1963 scriptingLanguage = _json["scriptingLanguage"];
1946 } 1964 }
1947 if (_json.containsKey("size")) { 1965 if (_json.containsKey("size")) {
1948 size = _json["size"]; 1966 size = _json["size"];
1949 } 1967 }
1950 if (_json.containsKey("type")) { 1968 if (_json.containsKey("type")) {
1951 type = _json["type"]; 1969 type = _json["type"];
1952 } 1970 }
1953 } 1971 }
1954 1972
1955 core.Map<core.String, core.Object> toJson() { 1973 core.Map<core.String, core.Object> toJson() {
1956 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1974 final core.Map<core.String, core.Object> _json =
1975 new core.Map<core.String, core.Object>();
1957 if (markupLanguage != null) { 1976 if (markupLanguage != null) {
1958 _json["markupLanguage"] = markupLanguage; 1977 _json["markupLanguage"] = markupLanguage;
1959 } 1978 }
1960 if (scriptingLanguage != null) { 1979 if (scriptingLanguage != null) {
1961 _json["scriptingLanguage"] = scriptingLanguage; 1980 _json["scriptingLanguage"] = scriptingLanguage;
1962 } 1981 }
1963 if (size != null) { 1982 if (size != null) {
1964 _json["size"] = size; 1983 _json["size"] = size;
1965 } 1984 }
1966 if (type != null) { 1985 if (type != null) {
1967 _json["type"] = type; 1986 _json["type"] = type;
1968 } 1987 }
1969 return _json; 1988 return _json;
1970 } 1989 }
1971 } 1990 }
1972 1991
1973 class AdUnit { 1992 class AdUnit {
1974 /** 1993 /// Identity code of this ad unit, not necessarily unique across ad clients.
1975 * Identity code of this ad unit, not necessarily unique across ad clients.
1976 */
1977 core.String code; 1994 core.String code;
1978 /** 1995
1979 * Settings specific to content ads (AFC) and highend mobile content ads (AFMC 1996 /// Settings specific to content ads (AFC) and highend mobile content ads
1980 * - deprecated). 1997 /// (AFMC - deprecated).
1981 */
1982 AdUnitContentAdsSettings contentAdsSettings; 1998 AdUnitContentAdsSettings contentAdsSettings;
1983 /** Custom style information specific to this ad unit. */ 1999
2000 /// Custom style information specific to this ad unit.
1984 AdStyle customStyle; 2001 AdStyle customStyle;
1985 /** 2002
1986 * Unique identifier of this ad unit. This should be considered an opaque 2003 /// Unique identifier of this ad unit. This should be considered an opaque
1987 * identifier; it is not safe to rely on it being in any particular format. 2004 /// identifier; it is not safe to rely on it being in any particular format.
1988 */
1989 core.String id; 2005 core.String id;
1990 /** Kind of resource this is, in this case adsensehost#adUnit. */ 2006
2007 /// Kind of resource this is, in this case adsensehost#adUnit.
1991 core.String kind; 2008 core.String kind;
1992 /** Settings specific to WAP mobile content ads (AFMC - deprecated). */ 2009
2010 /// Settings specific to WAP mobile content ads (AFMC - deprecated).
1993 AdUnitMobileContentAdsSettings mobileContentAdsSettings; 2011 AdUnitMobileContentAdsSettings mobileContentAdsSettings;
1994 /** Name of this ad unit. */ 2012
2013 /// Name of this ad unit.
1995 core.String name; 2014 core.String name;
1996 /** 2015
1997 * Status of this ad unit. Possible values are: 2016 /// Status of this ad unit. Possible values are:
1998 * NEW: Indicates that the ad unit was created within the last seven days and 2017 /// NEW: Indicates that the ad unit was created within the last seven days
1999 * does not yet have any activity associated with it. 2018 /// and does not yet have any activity associated with it.
2000 * 2019 ///
2001 * ACTIVE: Indicates that there has been activity on this ad unit in the last 2020 /// ACTIVE: Indicates that there has been activity on this ad unit in the
2002 * seven days. 2021 /// last seven days.
2003 * 2022 ///
2004 * INACTIVE: Indicates that there has been no activity on this ad unit in the 2023 /// INACTIVE: Indicates that there has been no activity on this ad unit in
2005 * last seven days. 2024 /// the last seven days.
2006 */
2007 core.String status; 2025 core.String status;
2008 2026
2009 AdUnit(); 2027 AdUnit();
2010 2028
2011 AdUnit.fromJson(core.Map _json) { 2029 AdUnit.fromJson(core.Map _json) {
2012 if (_json.containsKey("code")) { 2030 if (_json.containsKey("code")) {
2013 code = _json["code"]; 2031 code = _json["code"];
2014 } 2032 }
2015 if (_json.containsKey("contentAdsSettings")) { 2033 if (_json.containsKey("contentAdsSettings")) {
2016 contentAdsSettings = new AdUnitContentAdsSettings.fromJson(_json["contentA dsSettings"]); 2034 contentAdsSettings =
2035 new AdUnitContentAdsSettings.fromJson(_json["contentAdsSettings"]);
2017 } 2036 }
2018 if (_json.containsKey("customStyle")) { 2037 if (_json.containsKey("customStyle")) {
2019 customStyle = new AdStyle.fromJson(_json["customStyle"]); 2038 customStyle = new AdStyle.fromJson(_json["customStyle"]);
2020 } 2039 }
2021 if (_json.containsKey("id")) { 2040 if (_json.containsKey("id")) {
2022 id = _json["id"]; 2041 id = _json["id"];
2023 } 2042 }
2024 if (_json.containsKey("kind")) { 2043 if (_json.containsKey("kind")) {
2025 kind = _json["kind"]; 2044 kind = _json["kind"];
2026 } 2045 }
2027 if (_json.containsKey("mobileContentAdsSettings")) { 2046 if (_json.containsKey("mobileContentAdsSettings")) {
2028 mobileContentAdsSettings = new AdUnitMobileContentAdsSettings.fromJson(_js on["mobileContentAdsSettings"]); 2047 mobileContentAdsSettings = new AdUnitMobileContentAdsSettings.fromJson(
2048 _json["mobileContentAdsSettings"]);
2029 } 2049 }
2030 if (_json.containsKey("name")) { 2050 if (_json.containsKey("name")) {
2031 name = _json["name"]; 2051 name = _json["name"];
2032 } 2052 }
2033 if (_json.containsKey("status")) { 2053 if (_json.containsKey("status")) {
2034 status = _json["status"]; 2054 status = _json["status"];
2035 } 2055 }
2036 } 2056 }
2037 2057
2038 core.Map<core.String, core.Object> toJson() { 2058 core.Map<core.String, core.Object> toJson() {
2039 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2059 final core.Map<core.String, core.Object> _json =
2060 new core.Map<core.String, core.Object>();
2040 if (code != null) { 2061 if (code != null) {
2041 _json["code"] = code; 2062 _json["code"] = code;
2042 } 2063 }
2043 if (contentAdsSettings != null) { 2064 if (contentAdsSettings != null) {
2044 _json["contentAdsSettings"] = (contentAdsSettings).toJson(); 2065 _json["contentAdsSettings"] = (contentAdsSettings).toJson();
2045 } 2066 }
2046 if (customStyle != null) { 2067 if (customStyle != null) {
2047 _json["customStyle"] = (customStyle).toJson(); 2068 _json["customStyle"] = (customStyle).toJson();
2048 } 2069 }
2049 if (id != null) { 2070 if (id != null) {
2050 _json["id"] = id; 2071 _json["id"] = id;
2051 } 2072 }
2052 if (kind != null) { 2073 if (kind != null) {
2053 _json["kind"] = kind; 2074 _json["kind"] = kind;
2054 } 2075 }
2055 if (mobileContentAdsSettings != null) { 2076 if (mobileContentAdsSettings != null) {
2056 _json["mobileContentAdsSettings"] = (mobileContentAdsSettings).toJson(); 2077 _json["mobileContentAdsSettings"] = (mobileContentAdsSettings).toJson();
2057 } 2078 }
2058 if (name != null) { 2079 if (name != null) {
2059 _json["name"] = name; 2080 _json["name"] = name;
2060 } 2081 }
2061 if (status != null) { 2082 if (status != null) {
2062 _json["status"] = status; 2083 _json["status"] = status;
2063 } 2084 }
2064 return _json; 2085 return _json;
2065 } 2086 }
2066 } 2087 }
2067 2088
2068 class AdUnits { 2089 class AdUnits {
2069 /** ETag of this response for caching purposes. */ 2090 /// ETag of this response for caching purposes.
2070 core.String etag; 2091 core.String etag;
2071 /** The ad units returned in this list response. */ 2092
2093 /// The ad units returned in this list response.
2072 core.List<AdUnit> items; 2094 core.List<AdUnit> items;
2073 /** Kind of list this is, in this case adsensehost#adUnits. */ 2095
2096 /// Kind of list this is, in this case adsensehost#adUnits.
2074 core.String kind; 2097 core.String kind;
2075 /** 2098
2076 * Continuation token used to page through ad units. To retrieve the next page 2099 /// Continuation token used to page through ad units. To retrieve the next
2077 * of results, set the next request's "pageToken" value to this. 2100 /// page of results, set the next request's "pageToken" value to this.
2078 */
2079 core.String nextPageToken; 2101 core.String nextPageToken;
2080 2102
2081 AdUnits(); 2103 AdUnits();
2082 2104
2083 AdUnits.fromJson(core.Map _json) { 2105 AdUnits.fromJson(core.Map _json) {
2084 if (_json.containsKey("etag")) { 2106 if (_json.containsKey("etag")) {
2085 etag = _json["etag"]; 2107 etag = _json["etag"];
2086 } 2108 }
2087 if (_json.containsKey("items")) { 2109 if (_json.containsKey("items")) {
2088 items = _json["items"].map((value) => new AdUnit.fromJson(value)).toList() ; 2110 items =
2111 _json["items"].map((value) => new AdUnit.fromJson(value)).toList();
2089 } 2112 }
2090 if (_json.containsKey("kind")) { 2113 if (_json.containsKey("kind")) {
2091 kind = _json["kind"]; 2114 kind = _json["kind"];
2092 } 2115 }
2093 if (_json.containsKey("nextPageToken")) { 2116 if (_json.containsKey("nextPageToken")) {
2094 nextPageToken = _json["nextPageToken"]; 2117 nextPageToken = _json["nextPageToken"];
2095 } 2118 }
2096 } 2119 }
2097 2120
2098 core.Map<core.String, core.Object> toJson() { 2121 core.Map<core.String, core.Object> toJson() {
2099 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2122 final core.Map<core.String, core.Object> _json =
2123 new core.Map<core.String, core.Object>();
2100 if (etag != null) { 2124 if (etag != null) {
2101 _json["etag"] = etag; 2125 _json["etag"] = etag;
2102 } 2126 }
2103 if (items != null) { 2127 if (items != null) {
2104 _json["items"] = items.map((value) => (value).toJson()).toList(); 2128 _json["items"] = items.map((value) => (value).toJson()).toList();
2105 } 2129 }
2106 if (kind != null) { 2130 if (kind != null) {
2107 _json["kind"] = kind; 2131 _json["kind"] = kind;
2108 } 2132 }
2109 if (nextPageToken != null) { 2133 if (nextPageToken != null) {
2110 _json["nextPageToken"] = nextPageToken; 2134 _json["nextPageToken"] = nextPageToken;
2111 } 2135 }
2112 return _json; 2136 return _json;
2113 } 2137 }
2114 } 2138 }
2115 2139
2116 class AssociationSession { 2140 class AssociationSession {
2117 /** 2141 /// Hosted account id of the associated publisher after association. Present
2118 * Hosted account id of the associated publisher after association. Present if 2142 /// if status is ACCEPTED.
2119 * status is ACCEPTED.
2120 */
2121 core.String accountId; 2143 core.String accountId;
2122 /** Unique identifier of this association session. */ 2144
2145 /// Unique identifier of this association session.
2123 core.String id; 2146 core.String id;
2124 /** Kind of resource this is, in this case adsensehost#associationSession. */ 2147
2148 /// Kind of resource this is, in this case adsensehost#associationSession.
2125 core.String kind; 2149 core.String kind;
2126 /** 2150
2127 * The products to associate with the user. Options: AFC, AFG, AFV, AFS 2151 /// The products to associate with the user. Options: AFC, AFG, AFV, AFS
2128 * (deprecated), AFMC (deprecated) 2152 /// (deprecated), AFMC (deprecated)
2129 */
2130 core.List<core.String> productCodes; 2153 core.List<core.String> productCodes;
2131 /** 2154
2132 * Redirect URL of this association session. Used to redirect users into the 2155 /// Redirect URL of this association session. Used to redirect users into the
2133 * AdSense association flow. 2156 /// AdSense association flow.
2134 */
2135 core.String redirectUrl; 2157 core.String redirectUrl;
2136 /** 2158
2137 * Status of the completed association, available once the association 2159 /// Status of the completed association, available once the association
2138 * callback token has been verified. One of ACCEPTED, REJECTED, or ERROR. 2160 /// callback token has been verified. One of ACCEPTED, REJECTED, or ERROR.
2139 */
2140 core.String status; 2161 core.String status;
2141 /** 2162
2142 * The preferred locale of the user themselves when going through the AdSense 2163 /// The preferred locale of the user themselves when going through the
2143 * association flow. 2164 /// AdSense association flow.
2144 */
2145 core.String userLocale; 2165 core.String userLocale;
2146 /** The locale of the user's hosted website. */ 2166
2167 /// The locale of the user's hosted website.
2147 core.String websiteLocale; 2168 core.String websiteLocale;
2148 /** The URL of the user's hosted website. */ 2169
2170 /// The URL of the user's hosted website.
2149 core.String websiteUrl; 2171 core.String websiteUrl;
2150 2172
2151 AssociationSession(); 2173 AssociationSession();
2152 2174
2153 AssociationSession.fromJson(core.Map _json) { 2175 AssociationSession.fromJson(core.Map _json) {
2154 if (_json.containsKey("accountId")) { 2176 if (_json.containsKey("accountId")) {
2155 accountId = _json["accountId"]; 2177 accountId = _json["accountId"];
2156 } 2178 }
2157 if (_json.containsKey("id")) { 2179 if (_json.containsKey("id")) {
2158 id = _json["id"]; 2180 id = _json["id"];
(...skipping 15 matching lines...) Expand all
2174 } 2196 }
2175 if (_json.containsKey("websiteLocale")) { 2197 if (_json.containsKey("websiteLocale")) {
2176 websiteLocale = _json["websiteLocale"]; 2198 websiteLocale = _json["websiteLocale"];
2177 } 2199 }
2178 if (_json.containsKey("websiteUrl")) { 2200 if (_json.containsKey("websiteUrl")) {
2179 websiteUrl = _json["websiteUrl"]; 2201 websiteUrl = _json["websiteUrl"];
2180 } 2202 }
2181 } 2203 }
2182 2204
2183 core.Map<core.String, core.Object> toJson() { 2205 core.Map<core.String, core.Object> toJson() {
2184 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2206 final core.Map<core.String, core.Object> _json =
2207 new core.Map<core.String, core.Object>();
2185 if (accountId != null) { 2208 if (accountId != null) {
2186 _json["accountId"] = accountId; 2209 _json["accountId"] = accountId;
2187 } 2210 }
2188 if (id != null) { 2211 if (id != null) {
2189 _json["id"] = id; 2212 _json["id"] = id;
2190 } 2213 }
2191 if (kind != null) { 2214 if (kind != null) {
2192 _json["kind"] = kind; 2215 _json["kind"] = kind;
2193 } 2216 }
2194 if (productCodes != null) { 2217 if (productCodes != null) {
(...skipping 12 matching lines...) Expand all
2207 _json["websiteLocale"] = websiteLocale; 2230 _json["websiteLocale"] = websiteLocale;
2208 } 2231 }
2209 if (websiteUrl != null) { 2232 if (websiteUrl != null) {
2210 _json["websiteUrl"] = websiteUrl; 2233 _json["websiteUrl"] = websiteUrl;
2211 } 2234 }
2212 return _json; 2235 return _json;
2213 } 2236 }
2214 } 2237 }
2215 2238
2216 class CustomChannel { 2239 class CustomChannel {
2217 /** Code of this custom channel, not necessarily unique across ad clients. */ 2240 /// Code of this custom channel, not necessarily unique across ad clients.
2218 core.String code; 2241 core.String code;
2219 /** 2242
2220 * Unique identifier of this custom channel. This should be considered an 2243 /// Unique identifier of this custom channel. This should be considered an
2221 * opaque identifier; it is not safe to rely on it being in any particular 2244 /// opaque identifier; it is not safe to rely on it being in any particular
2222 * format. 2245 /// format.
2223 */
2224 core.String id; 2246 core.String id;
2225 /** Kind of resource this is, in this case adsensehost#customChannel. */ 2247
2248 /// Kind of resource this is, in this case adsensehost#customChannel.
2226 core.String kind; 2249 core.String kind;
2227 /** Name of this custom channel. */ 2250
2251 /// Name of this custom channel.
2228 core.String name; 2252 core.String name;
2229 2253
2230 CustomChannel(); 2254 CustomChannel();
2231 2255
2232 CustomChannel.fromJson(core.Map _json) { 2256 CustomChannel.fromJson(core.Map _json) {
2233 if (_json.containsKey("code")) { 2257 if (_json.containsKey("code")) {
2234 code = _json["code"]; 2258 code = _json["code"];
2235 } 2259 }
2236 if (_json.containsKey("id")) { 2260 if (_json.containsKey("id")) {
2237 id = _json["id"]; 2261 id = _json["id"];
2238 } 2262 }
2239 if (_json.containsKey("kind")) { 2263 if (_json.containsKey("kind")) {
2240 kind = _json["kind"]; 2264 kind = _json["kind"];
2241 } 2265 }
2242 if (_json.containsKey("name")) { 2266 if (_json.containsKey("name")) {
2243 name = _json["name"]; 2267 name = _json["name"];
2244 } 2268 }
2245 } 2269 }
2246 2270
2247 core.Map<core.String, core.Object> toJson() { 2271 core.Map<core.String, core.Object> toJson() {
2248 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2272 final core.Map<core.String, core.Object> _json =
2273 new core.Map<core.String, core.Object>();
2249 if (code != null) { 2274 if (code != null) {
2250 _json["code"] = code; 2275 _json["code"] = code;
2251 } 2276 }
2252 if (id != null) { 2277 if (id != null) {
2253 _json["id"] = id; 2278 _json["id"] = id;
2254 } 2279 }
2255 if (kind != null) { 2280 if (kind != null) {
2256 _json["kind"] = kind; 2281 _json["kind"] = kind;
2257 } 2282 }
2258 if (name != null) { 2283 if (name != null) {
2259 _json["name"] = name; 2284 _json["name"] = name;
2260 } 2285 }
2261 return _json; 2286 return _json;
2262 } 2287 }
2263 } 2288 }
2264 2289
2265 class CustomChannels { 2290 class CustomChannels {
2266 /** ETag of this response for caching purposes. */ 2291 /// ETag of this response for caching purposes.
2267 core.String etag; 2292 core.String etag;
2268 /** The custom channels returned in this list response. */ 2293
2294 /// The custom channels returned in this list response.
2269 core.List<CustomChannel> items; 2295 core.List<CustomChannel> items;
2270 /** Kind of list this is, in this case adsensehost#customChannels. */ 2296
2297 /// Kind of list this is, in this case adsensehost#customChannels.
2271 core.String kind; 2298 core.String kind;
2272 /** 2299
2273 * Continuation token used to page through custom channels. To retrieve the 2300 /// Continuation token used to page through custom channels. To retrieve the
2274 * next page of results, set the next request's "pageToken" value to this. 2301 /// next page of results, set the next request's "pageToken" value to this.
2275 */
2276 core.String nextPageToken; 2302 core.String nextPageToken;
2277 2303
2278 CustomChannels(); 2304 CustomChannels();
2279 2305
2280 CustomChannels.fromJson(core.Map _json) { 2306 CustomChannels.fromJson(core.Map _json) {
2281 if (_json.containsKey("etag")) { 2307 if (_json.containsKey("etag")) {
2282 etag = _json["etag"]; 2308 etag = _json["etag"];
2283 } 2309 }
2284 if (_json.containsKey("items")) { 2310 if (_json.containsKey("items")) {
2285 items = _json["items"].map((value) => new CustomChannel.fromJson(value)).t oList(); 2311 items = _json["items"]
2312 .map((value) => new CustomChannel.fromJson(value))
2313 .toList();
2286 } 2314 }
2287 if (_json.containsKey("kind")) { 2315 if (_json.containsKey("kind")) {
2288 kind = _json["kind"]; 2316 kind = _json["kind"];
2289 } 2317 }
2290 if (_json.containsKey("nextPageToken")) { 2318 if (_json.containsKey("nextPageToken")) {
2291 nextPageToken = _json["nextPageToken"]; 2319 nextPageToken = _json["nextPageToken"];
2292 } 2320 }
2293 } 2321 }
2294 2322
2295 core.Map<core.String, core.Object> toJson() { 2323 core.Map<core.String, core.Object> toJson() {
2296 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2324 final core.Map<core.String, core.Object> _json =
2325 new core.Map<core.String, core.Object>();
2297 if (etag != null) { 2326 if (etag != null) {
2298 _json["etag"] = etag; 2327 _json["etag"] = etag;
2299 } 2328 }
2300 if (items != null) { 2329 if (items != null) {
2301 _json["items"] = items.map((value) => (value).toJson()).toList(); 2330 _json["items"] = items.map((value) => (value).toJson()).toList();
2302 } 2331 }
2303 if (kind != null) { 2332 if (kind != null) {
2304 _json["kind"] = kind; 2333 _json["kind"] = kind;
2305 } 2334 }
2306 if (nextPageToken != null) { 2335 if (nextPageToken != null) {
2307 _json["nextPageToken"] = nextPageToken; 2336 _json["nextPageToken"] = nextPageToken;
2308 } 2337 }
2309 return _json; 2338 return _json;
2310 } 2339 }
2311 } 2340 }
2312 2341
2313 class ReportHeaders { 2342 class ReportHeaders {
2314 /** 2343 /// The currency of this column. Only present if the header type is
2315 * The currency of this column. Only present if the header type is 2344 /// METRIC_CURRENCY.
2316 * METRIC_CURRENCY.
2317 */
2318 core.String currency; 2345 core.String currency;
2319 /** The name of the header. */ 2346
2347 /// The name of the header.
2320 core.String name; 2348 core.String name;
2321 /** 2349
2322 * The type of the header; one of DIMENSION, METRIC_TALLY, METRIC_RATIO, or 2350 /// The type of the header; one of DIMENSION, METRIC_TALLY, METRIC_RATIO, or
2323 * METRIC_CURRENCY. 2351 /// METRIC_CURRENCY.
2324 */
2325 core.String type; 2352 core.String type;
2326 2353
2327 ReportHeaders(); 2354 ReportHeaders();
2328 2355
2329 ReportHeaders.fromJson(core.Map _json) { 2356 ReportHeaders.fromJson(core.Map _json) {
2330 if (_json.containsKey("currency")) { 2357 if (_json.containsKey("currency")) {
2331 currency = _json["currency"]; 2358 currency = _json["currency"];
2332 } 2359 }
2333 if (_json.containsKey("name")) { 2360 if (_json.containsKey("name")) {
2334 name = _json["name"]; 2361 name = _json["name"];
2335 } 2362 }
2336 if (_json.containsKey("type")) { 2363 if (_json.containsKey("type")) {
2337 type = _json["type"]; 2364 type = _json["type"];
2338 } 2365 }
2339 } 2366 }
2340 2367
2341 core.Map<core.String, core.Object> toJson() { 2368 core.Map<core.String, core.Object> toJson() {
2342 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2369 final core.Map<core.String, core.Object> _json =
2370 new core.Map<core.String, core.Object>();
2343 if (currency != null) { 2371 if (currency != null) {
2344 _json["currency"] = currency; 2372 _json["currency"] = currency;
2345 } 2373 }
2346 if (name != null) { 2374 if (name != null) {
2347 _json["name"] = name; 2375 _json["name"] = name;
2348 } 2376 }
2349 if (type != null) { 2377 if (type != null) {
2350 _json["type"] = type; 2378 _json["type"] = type;
2351 } 2379 }
2352 return _json; 2380 return _json;
2353 } 2381 }
2354 } 2382 }
2355 2383
2356 class Report { 2384 class Report {
2357 /** 2385 /// The averages of the report. This is the same length as any other row in
2358 * The averages of the report. This is the same length as any other row in the 2386 /// the report; cells corresponding to dimension columns are empty.
2359 * report; cells corresponding to dimension columns are empty.
2360 */
2361 core.List<core.String> averages; 2387 core.List<core.String> averages;
2362 /** 2388
2363 * The header information of the columns requested in the report. This is a 2389 /// The header information of the columns requested in the report. This is a
2364 * list of headers; one for each dimension in the request, followed by one for 2390 /// list of headers; one for each dimension in the request, followed by one
2365 * each metric in the request. 2391 /// for each metric in the request.
2366 */
2367 core.List<ReportHeaders> headers; 2392 core.List<ReportHeaders> headers;
2368 /** Kind this is, in this case adsensehost#report. */ 2393
2394 /// Kind this is, in this case adsensehost#report.
2369 core.String kind; 2395 core.String kind;
2370 /** 2396
2371 * The output rows of the report. Each row is a list of cells; one for each 2397 /// The output rows of the report. Each row is a list of cells; one for each
2372 * dimension in the request, followed by one for each metric in the request. 2398 /// dimension in the request, followed by one for each metric in the request.
2373 * The dimension cells contain strings, and the metric cells contain numbers. 2399 /// The dimension cells contain strings, and the metric cells contain
2374 */ 2400 /// numbers.
2375 core.List<core.List<core.String>> rows; 2401 core.List<core.List<core.String>> rows;
2376 /** 2402
2377 * The total number of rows matched by the report request. Fewer rows may be 2403 /// The total number of rows matched by the report request. Fewer rows may be
2378 * returned in the response due to being limited by the row count requested or 2404 /// returned in the response due to being limited by the row count requested
2379 * the report row limit. 2405 /// or the report row limit.
2380 */
2381 core.String totalMatchedRows; 2406 core.String totalMatchedRows;
2382 /** 2407
2383 * The totals of the report. This is the same length as any other row in the 2408 /// The totals of the report. This is the same length as any other row in the
2384 * report; cells corresponding to dimension columns are empty. 2409 /// report; cells corresponding to dimension columns are empty.
2385 */
2386 core.List<core.String> totals; 2410 core.List<core.String> totals;
2387 /** Any warnings associated with generation of the report. */ 2411
2412 /// Any warnings associated with generation of the report.
2388 core.List<core.String> warnings; 2413 core.List<core.String> warnings;
2389 2414
2390 Report(); 2415 Report();
2391 2416
2392 Report.fromJson(core.Map _json) { 2417 Report.fromJson(core.Map _json) {
2393 if (_json.containsKey("averages")) { 2418 if (_json.containsKey("averages")) {
2394 averages = _json["averages"]; 2419 averages = _json["averages"];
2395 } 2420 }
2396 if (_json.containsKey("headers")) { 2421 if (_json.containsKey("headers")) {
2397 headers = _json["headers"].map((value) => new ReportHeaders.fromJson(value )).toList(); 2422 headers = _json["headers"]
2423 .map((value) => new ReportHeaders.fromJson(value))
2424 .toList();
2398 } 2425 }
2399 if (_json.containsKey("kind")) { 2426 if (_json.containsKey("kind")) {
2400 kind = _json["kind"]; 2427 kind = _json["kind"];
2401 } 2428 }
2402 if (_json.containsKey("rows")) { 2429 if (_json.containsKey("rows")) {
2403 rows = _json["rows"]; 2430 rows = _json["rows"];
2404 } 2431 }
2405 if (_json.containsKey("totalMatchedRows")) { 2432 if (_json.containsKey("totalMatchedRows")) {
2406 totalMatchedRows = _json["totalMatchedRows"]; 2433 totalMatchedRows = _json["totalMatchedRows"];
2407 } 2434 }
2408 if (_json.containsKey("totals")) { 2435 if (_json.containsKey("totals")) {
2409 totals = _json["totals"]; 2436 totals = _json["totals"];
2410 } 2437 }
2411 if (_json.containsKey("warnings")) { 2438 if (_json.containsKey("warnings")) {
2412 warnings = _json["warnings"]; 2439 warnings = _json["warnings"];
2413 } 2440 }
2414 } 2441 }
2415 2442
2416 core.Map<core.String, core.Object> toJson() { 2443 core.Map<core.String, core.Object> toJson() {
2417 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2444 final core.Map<core.String, core.Object> _json =
2445 new core.Map<core.String, core.Object>();
2418 if (averages != null) { 2446 if (averages != null) {
2419 _json["averages"] = averages; 2447 _json["averages"] = averages;
2420 } 2448 }
2421 if (headers != null) { 2449 if (headers != null) {
2422 _json["headers"] = headers.map((value) => (value).toJson()).toList(); 2450 _json["headers"] = headers.map((value) => (value).toJson()).toList();
2423 } 2451 }
2424 if (kind != null) { 2452 if (kind != null) {
2425 _json["kind"] = kind; 2453 _json["kind"] = kind;
2426 } 2454 }
2427 if (rows != null) { 2455 if (rows != null) {
2428 _json["rows"] = rows; 2456 _json["rows"] = rows;
2429 } 2457 }
2430 if (totalMatchedRows != null) { 2458 if (totalMatchedRows != null) {
2431 _json["totalMatchedRows"] = totalMatchedRows; 2459 _json["totalMatchedRows"] = totalMatchedRows;
2432 } 2460 }
2433 if (totals != null) { 2461 if (totals != null) {
2434 _json["totals"] = totals; 2462 _json["totals"] = totals;
2435 } 2463 }
2436 if (warnings != null) { 2464 if (warnings != null) {
2437 _json["warnings"] = warnings; 2465 _json["warnings"] = warnings;
2438 } 2466 }
2439 return _json; 2467 return _json;
2440 } 2468 }
2441 } 2469 }
2442 2470
2443 class UrlChannel { 2471 class UrlChannel {
2444 /** 2472 /// Unique identifier of this URL channel. This should be considered an
2445 * Unique identifier of this URL channel. This should be considered an opaque 2473 /// opaque identifier; it is not safe to rely on it being in any particular
2446 * identifier; it is not safe to rely on it being in any particular format. 2474 /// format.
2447 */
2448 core.String id; 2475 core.String id;
2449 /** Kind of resource this is, in this case adsensehost#urlChannel. */ 2476
2477 /// Kind of resource this is, in this case adsensehost#urlChannel.
2450 core.String kind; 2478 core.String kind;
2451 /** 2479
2452 * URL Pattern of this URL channel. Does not include "http://" or "https://". 2480 /// URL Pattern of this URL channel. Does not include "http://" or
2453 * Example: www.example.com/home 2481 /// "https://". Example: www.example.com/home
2454 */
2455 core.String urlPattern; 2482 core.String urlPattern;
2456 2483
2457 UrlChannel(); 2484 UrlChannel();
2458 2485
2459 UrlChannel.fromJson(core.Map _json) { 2486 UrlChannel.fromJson(core.Map _json) {
2460 if (_json.containsKey("id")) { 2487 if (_json.containsKey("id")) {
2461 id = _json["id"]; 2488 id = _json["id"];
2462 } 2489 }
2463 if (_json.containsKey("kind")) { 2490 if (_json.containsKey("kind")) {
2464 kind = _json["kind"]; 2491 kind = _json["kind"];
2465 } 2492 }
2466 if (_json.containsKey("urlPattern")) { 2493 if (_json.containsKey("urlPattern")) {
2467 urlPattern = _json["urlPattern"]; 2494 urlPattern = _json["urlPattern"];
2468 } 2495 }
2469 } 2496 }
2470 2497
2471 core.Map<core.String, core.Object> toJson() { 2498 core.Map<core.String, core.Object> toJson() {
2472 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2499 final core.Map<core.String, core.Object> _json =
2500 new core.Map<core.String, core.Object>();
2473 if (id != null) { 2501 if (id != null) {
2474 _json["id"] = id; 2502 _json["id"] = id;
2475 } 2503 }
2476 if (kind != null) { 2504 if (kind != null) {
2477 _json["kind"] = kind; 2505 _json["kind"] = kind;
2478 } 2506 }
2479 if (urlPattern != null) { 2507 if (urlPattern != null) {
2480 _json["urlPattern"] = urlPattern; 2508 _json["urlPattern"] = urlPattern;
2481 } 2509 }
2482 return _json; 2510 return _json;
2483 } 2511 }
2484 } 2512 }
2485 2513
2486 class UrlChannels { 2514 class UrlChannels {
2487 /** ETag of this response for caching purposes. */ 2515 /// ETag of this response for caching purposes.
2488 core.String etag; 2516 core.String etag;
2489 /** The URL channels returned in this list response. */ 2517
2518 /// The URL channels returned in this list response.
2490 core.List<UrlChannel> items; 2519 core.List<UrlChannel> items;
2491 /** Kind of list this is, in this case adsensehost#urlChannels. */ 2520
2521 /// Kind of list this is, in this case adsensehost#urlChannels.
2492 core.String kind; 2522 core.String kind;
2493 /** 2523
2494 * Continuation token used to page through URL channels. To retrieve the next 2524 /// Continuation token used to page through URL channels. To retrieve the
2495 * page of results, set the next request's "pageToken" value to this. 2525 /// next page of results, set the next request's "pageToken" value to this.
2496 */
2497 core.String nextPageToken; 2526 core.String nextPageToken;
2498 2527
2499 UrlChannels(); 2528 UrlChannels();
2500 2529
2501 UrlChannels.fromJson(core.Map _json) { 2530 UrlChannels.fromJson(core.Map _json) {
2502 if (_json.containsKey("etag")) { 2531 if (_json.containsKey("etag")) {
2503 etag = _json["etag"]; 2532 etag = _json["etag"];
2504 } 2533 }
2505 if (_json.containsKey("items")) { 2534 if (_json.containsKey("items")) {
2506 items = _json["items"].map((value) => new UrlChannel.fromJson(value)).toLi st(); 2535 items = _json["items"]
2536 .map((value) => new UrlChannel.fromJson(value))
2537 .toList();
2507 } 2538 }
2508 if (_json.containsKey("kind")) { 2539 if (_json.containsKey("kind")) {
2509 kind = _json["kind"]; 2540 kind = _json["kind"];
2510 } 2541 }
2511 if (_json.containsKey("nextPageToken")) { 2542 if (_json.containsKey("nextPageToken")) {
2512 nextPageToken = _json["nextPageToken"]; 2543 nextPageToken = _json["nextPageToken"];
2513 } 2544 }
2514 } 2545 }
2515 2546
2516 core.Map<core.String, core.Object> toJson() { 2547 core.Map<core.String, core.Object> toJson() {
2517 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2548 final core.Map<core.String, core.Object> _json =
2549 new core.Map<core.String, core.Object>();
2518 if (etag != null) { 2550 if (etag != null) {
2519 _json["etag"] = etag; 2551 _json["etag"] = etag;
2520 } 2552 }
2521 if (items != null) { 2553 if (items != null) {
2522 _json["items"] = items.map((value) => (value).toJson()).toList(); 2554 _json["items"] = items.map((value) => (value).toJson()).toList();
2523 } 2555 }
2524 if (kind != null) { 2556 if (kind != null) {
2525 _json["kind"] = kind; 2557 _json["kind"] = kind;
2526 } 2558 }
2527 if (nextPageToken != null) { 2559 if (nextPageToken != null) {
2528 _json["nextPageToken"] = nextPageToken; 2560 _json["nextPageToken"] = nextPageToken;
2529 } 2561 }
2530 return _json; 2562 return _json;
2531 } 2563 }
2532 } 2564 }
OLDNEW
« no previous file with comments | « generated/googleapis/lib/adsense/v1_4.dart ('k') | generated/googleapis/lib/analytics/v3.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698