| OLD | NEW |
| 1 // This is a generated file (see the discoveryapis_generator project). |
| 2 |
| 1 library googleapis.admin.reports_v1; | 3 library googleapis.admin.reports_v1; |
| 2 | 4 |
| 3 import "dart:core" as core; | 5 import 'dart:core' as core; |
| 4 import "dart:collection" as collection; | 6 import 'dart:collection' as collection; |
| 5 import "dart:async" as async; | 7 import 'dart:async' as async; |
| 6 import "dart:convert" as convert; | 8 import 'dart:convert' as convert; |
| 7 | 9 |
| 8 import "package:crypto/crypto.dart" as crypto; | 10 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
| 11 import 'package:crypto/crypto.dart' as crypto; |
| 9 import 'package:http/http.dart' as http; | 12 import 'package:http/http.dart' as http; |
| 10 import '../src/common_internal.dart' as common_internal; | |
| 11 import '../common/common.dart' as common; | |
| 12 | 13 |
| 13 export '../common/common.dart' show ApiRequestError; | 14 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show |
| 14 export '../common/common.dart' show DetailedApiRequestError; | 15 ApiRequestError, DetailedApiRequestError; |
| 16 |
| 17 const core.String USER_AGENT = 'dart-api-client admin/reports_v1'; |
| 15 | 18 |
| 16 /** | 19 /** |
| 17 * Allows the administrators of Google Apps customers to fetch reports about the | 20 * Allows the administrators of Google Apps customers to fetch reports about the |
| 18 * usage, collaboration, security and risk for their users. | 21 * usage, collaboration, security and risk for their users. |
| 19 */ | 22 */ |
| 20 class AdminApi { | 23 class AdminApi { |
| 21 /** View audit reports of Google Apps for your domain */ | 24 /** View audit reports of Google Apps for your domain */ |
| 22 static const AdminReportsAuditReadonlyScope = "https://www.googleapis.com/auth
/admin.reports.audit.readonly"; | 25 static const AdminReportsAuditReadonlyScope = "https://www.googleapis.com/auth
/admin.reports.audit.readonly"; |
| 23 | 26 |
| 24 /** View usage reports of Google Apps for your domain */ | 27 /** View usage reports of Google Apps for your domain */ |
| 25 static const AdminReportsUsageReadonlyScope = "https://www.googleapis.com/auth
/admin.reports.usage.readonly"; | 28 static const AdminReportsUsageReadonlyScope = "https://www.googleapis.com/auth
/admin.reports.usage.readonly"; |
| 26 | 29 |
| 27 | 30 |
| 28 final common_internal.ApiRequester _requester; | 31 final commons.ApiRequester _requester; |
| 29 | 32 |
| 30 ActivitiesResourceApi get activities => new ActivitiesResourceApi(_requester); | 33 ActivitiesResourceApi get activities => new ActivitiesResourceApi(_requester); |
| 31 ChannelsResourceApi get channels => new ChannelsResourceApi(_requester); | 34 ChannelsResourceApi get channels => new ChannelsResourceApi(_requester); |
| 32 CustomerUsageReportsResourceApi get customerUsageReports => new CustomerUsageR
eportsResourceApi(_requester); | 35 CustomerUsageReportsResourceApi get customerUsageReports => new CustomerUsageR
eportsResourceApi(_requester); |
| 33 UserUsageReportResourceApi get userUsageReport => new UserUsageReportResourceA
pi(_requester); | 36 UserUsageReportResourceApi get userUsageReport => new UserUsageReportResourceA
pi(_requester); |
| 34 | 37 |
| 35 AdminApi(http.Client client, {core.String rootUrl: "https://www.googleapis.com
/", core.String servicePath: "admin/reports/v1/"}) : | 38 AdminApi(http.Client client, {core.String rootUrl: "https://www.googleapis.com
/", core.String servicePath: "admin/reports/v1/"}) : |
| 36 _requester = new common_internal.ApiRequester(client, rootUrl, servicePath
); | 39 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); |
| 37 } | 40 } |
| 38 | 41 |
| 39 | 42 |
| 40 /** Not documented yet. */ | |
| 41 class ActivitiesResourceApi { | 43 class ActivitiesResourceApi { |
| 42 final common_internal.ApiRequester _requester; | 44 final commons.ApiRequester _requester; |
| 43 | 45 |
| 44 ActivitiesResourceApi(common_internal.ApiRequester client) : | 46 ActivitiesResourceApi(commons.ApiRequester client) : |
| 45 _requester = client; | 47 _requester = client; |
| 46 | 48 |
| 47 /** | 49 /** |
| 48 * Retrieves a list of activities for a specific customer and application. | 50 * Retrieves a list of activities for a specific customer and application. |
| 49 * | 51 * |
| 50 * Request parameters: | 52 * Request parameters: |
| 51 * | 53 * |
| 52 * [userKey] - Represents the profile id or the user email for which the data | 54 * [userKey] - Represents the profile id or the user email for which the data |
| 53 * should be filtered. When 'all' is specified as the userKey, it returns | 55 * should be filtered. When 'all' is specified as the userKey, it returns |
| 54 * usageReports for all users. | 56 * usageReports for all users. |
| (...skipping 24 matching lines...) Expand all Loading... |
| 79 * Value must be between "1" and "1000". | 81 * Value must be between "1" and "1000". |
| 80 * | 82 * |
| 81 * [pageToken] - Token to specify next page. | 83 * [pageToken] - Token to specify next page. |
| 82 * | 84 * |
| 83 * [startTime] - Return events which occured at or after this time. | 85 * [startTime] - Return events which occured at or after this time. |
| 84 * Value must have pattern | 86 * Value must have pattern |
| 85 * "(\d\d\d\d)-(\d\d)-(\d\d)T(\d\d):(\d\d):(\d\d)(?:\.(\d+))?(?:(Z)|([-+])(\d\
d):(\d\d))". | 87 * "(\d\d\d\d)-(\d\d)-(\d\d)T(\d\d):(\d\d):(\d\d)(?:\.(\d+))?(?:(Z)|([-+])(\d\
d):(\d\d))". |
| 86 * | 88 * |
| 87 * Completes with a [Activities]. | 89 * Completes with a [Activities]. |
| 88 * | 90 * |
| 89 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 91 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 90 * error. | 92 * error. |
| 91 * | 93 * |
| 92 * If the used [http.Client] completes with an error when making a REST call, | 94 * If the used [http.Client] completes with an error when making a REST call, |
| 93 * this method will complete with the same error. | 95 * this method will complete with the same error. |
| 94 */ | 96 */ |
| 95 async.Future<Activities> list(core.String userKey, core.String applicationName
, {core.String actorIpAddress, core.String customerId, core.String endTime, core
.String eventName, core.String filters, core.int maxResults, core.String pageTok
en, core.String startTime}) { | 97 async.Future<Activities> list(core.String userKey, core.String applicationName
, {core.String actorIpAddress, core.String customerId, core.String endTime, core
.String eventName, core.String filters, core.int maxResults, core.String pageTok
en, core.String startTime}) { |
| 96 var _url = null; | 98 var _url = null; |
| 97 var _queryParams = new core.Map(); | 99 var _queryParams = new core.Map(); |
| 98 var _uploadMedia = null; | 100 var _uploadMedia = null; |
| 99 var _uploadOptions = null; | 101 var _uploadOptions = null; |
| 100 var _downloadOptions = common.DownloadOptions.Metadata; | 102 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 101 var _body = null; | 103 var _body = null; |
| 102 | 104 |
| 103 if (userKey == null) { | 105 if (userKey == null) { |
| 104 throw new core.ArgumentError("Parameter userKey is required."); | 106 throw new core.ArgumentError("Parameter userKey is required."); |
| 105 } | 107 } |
| 106 if (applicationName == null) { | 108 if (applicationName == null) { |
| 107 throw new core.ArgumentError("Parameter applicationName is required."); | 109 throw new core.ArgumentError("Parameter applicationName is required."); |
| 108 } | 110 } |
| 109 if (actorIpAddress != null) { | 111 if (actorIpAddress != null) { |
| 110 _queryParams["actorIpAddress"] = [actorIpAddress]; | 112 _queryParams["actorIpAddress"] = [actorIpAddress]; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 125 _queryParams["maxResults"] = ["${maxResults}"]; | 127 _queryParams["maxResults"] = ["${maxResults}"]; |
| 126 } | 128 } |
| 127 if (pageToken != null) { | 129 if (pageToken != null) { |
| 128 _queryParams["pageToken"] = [pageToken]; | 130 _queryParams["pageToken"] = [pageToken]; |
| 129 } | 131 } |
| 130 if (startTime != null) { | 132 if (startTime != null) { |
| 131 _queryParams["startTime"] = [startTime]; | 133 _queryParams["startTime"] = [startTime]; |
| 132 } | 134 } |
| 133 | 135 |
| 134 | 136 |
| 135 _url = 'activity/users/' + common_internal.Escaper.ecapeVariable('$userKey')
+ '/applications/' + common_internal.Escaper.ecapeVariable('$applicationName'); | 137 _url = 'activity/users/' + commons.Escaper.ecapeVariable('$userKey') + '/app
lications/' + commons.Escaper.ecapeVariable('$applicationName'); |
| 136 | 138 |
| 137 var _response = _requester.request(_url, | 139 var _response = _requester.request(_url, |
| 138 "GET", | 140 "GET", |
| 139 body: _body, | 141 body: _body, |
| 140 queryParams: _queryParams, | 142 queryParams: _queryParams, |
| 141 uploadOptions: _uploadOptions, | 143 uploadOptions: _uploadOptions, |
| 142 uploadMedia: _uploadMedia, | 144 uploadMedia: _uploadMedia, |
| 143 downloadOptions: _downloadOptions); | 145 downloadOptions: _downloadOptions); |
| 144 return _response.then((data) => new Activities.fromJson(data)); | 146 return _response.then((data) => new Activities.fromJson(data)); |
| 145 } | 147 } |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 * Value must be between "1" and "1000". | 183 * Value must be between "1" and "1000". |
| 182 * | 184 * |
| 183 * [pageToken] - Token to specify next page. | 185 * [pageToken] - Token to specify next page. |
| 184 * | 186 * |
| 185 * [startTime] - Return events which occured at or after this time. | 187 * [startTime] - Return events which occured at or after this time. |
| 186 * Value must have pattern | 188 * Value must have pattern |
| 187 * "(\d\d\d\d)-(\d\d)-(\d\d)T(\d\d):(\d\d):(\d\d)(?:\.(\d+))?(?:(Z)|([-+])(\d\
d):(\d\d))". | 189 * "(\d\d\d\d)-(\d\d)-(\d\d)T(\d\d):(\d\d):(\d\d)(?:\.(\d+))?(?:(Z)|([-+])(\d\
d):(\d\d))". |
| 188 * | 190 * |
| 189 * Completes with a [Channel]. | 191 * Completes with a [Channel]. |
| 190 * | 192 * |
| 191 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 193 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 192 * error. | 194 * error. |
| 193 * | 195 * |
| 194 * If the used [http.Client] completes with an error when making a REST call, | 196 * If the used [http.Client] completes with an error when making a REST call, |
| 195 * this method will complete with the same error. | 197 * this method will complete with the same error. |
| 196 */ | 198 */ |
| 197 async.Future<Channel> watch(Channel request, core.String userKey, core.String
applicationName, {core.String actorIpAddress, core.String customerId, core.Strin
g endTime, core.String eventName, core.String filters, core.int maxResults, core
.String pageToken, core.String startTime}) { | 199 async.Future<Channel> watch(Channel request, core.String userKey, core.String
applicationName, {core.String actorIpAddress, core.String customerId, core.Strin
g endTime, core.String eventName, core.String filters, core.int maxResults, core
.String pageToken, core.String startTime}) { |
| 198 var _url = null; | 200 var _url = null; |
| 199 var _queryParams = new core.Map(); | 201 var _queryParams = new core.Map(); |
| 200 var _uploadMedia = null; | 202 var _uploadMedia = null; |
| 201 var _uploadOptions = null; | 203 var _uploadOptions = null; |
| 202 var _downloadOptions = common.DownloadOptions.Metadata; | 204 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 203 var _body = null; | 205 var _body = null; |
| 204 | 206 |
| 205 if (request != null) { | 207 if (request != null) { |
| 206 _body = convert.JSON.encode((request).toJson()); | 208 _body = convert.JSON.encode((request).toJson()); |
| 207 } | 209 } |
| 208 if (userKey == null) { | 210 if (userKey == null) { |
| 209 throw new core.ArgumentError("Parameter userKey is required."); | 211 throw new core.ArgumentError("Parameter userKey is required."); |
| 210 } | 212 } |
| 211 if (applicationName == null) { | 213 if (applicationName == null) { |
| 212 throw new core.ArgumentError("Parameter applicationName is required."); | 214 throw new core.ArgumentError("Parameter applicationName is required."); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 230 _queryParams["maxResults"] = ["${maxResults}"]; | 232 _queryParams["maxResults"] = ["${maxResults}"]; |
| 231 } | 233 } |
| 232 if (pageToken != null) { | 234 if (pageToken != null) { |
| 233 _queryParams["pageToken"] = [pageToken]; | 235 _queryParams["pageToken"] = [pageToken]; |
| 234 } | 236 } |
| 235 if (startTime != null) { | 237 if (startTime != null) { |
| 236 _queryParams["startTime"] = [startTime]; | 238 _queryParams["startTime"] = [startTime]; |
| 237 } | 239 } |
| 238 | 240 |
| 239 | 241 |
| 240 _url = 'activity/users/' + common_internal.Escaper.ecapeVariable('$userKey')
+ '/applications/' + common_internal.Escaper.ecapeVariable('$applicationName')
+ '/watch'; | 242 _url = 'activity/users/' + commons.Escaper.ecapeVariable('$userKey') + '/app
lications/' + commons.Escaper.ecapeVariable('$applicationName') + '/watch'; |
| 241 | 243 |
| 242 var _response = _requester.request(_url, | 244 var _response = _requester.request(_url, |
| 243 "POST", | 245 "POST", |
| 244 body: _body, | 246 body: _body, |
| 245 queryParams: _queryParams, | 247 queryParams: _queryParams, |
| 246 uploadOptions: _uploadOptions, | 248 uploadOptions: _uploadOptions, |
| 247 uploadMedia: _uploadMedia, | 249 uploadMedia: _uploadMedia, |
| 248 downloadOptions: _downloadOptions); | 250 downloadOptions: _downloadOptions); |
| 249 return _response.then((data) => new Channel.fromJson(data)); | 251 return _response.then((data) => new Channel.fromJson(data)); |
| 250 } | 252 } |
| 251 | 253 |
| 252 } | 254 } |
| 253 | 255 |
| 254 | 256 |
| 255 /** Not documented yet. */ | |
| 256 class ChannelsResourceApi { | 257 class ChannelsResourceApi { |
| 257 final common_internal.ApiRequester _requester; | 258 final commons.ApiRequester _requester; |
| 258 | 259 |
| 259 ChannelsResourceApi(common_internal.ApiRequester client) : | 260 ChannelsResourceApi(commons.ApiRequester client) : |
| 260 _requester = client; | 261 _requester = client; |
| 261 | 262 |
| 262 /** | 263 /** |
| 263 * Stop watching resources through this channel | 264 * Stop watching resources through this channel |
| 264 * | 265 * |
| 265 * [request] - The metadata request object. | 266 * [request] - The metadata request object. |
| 266 * | 267 * |
| 267 * Request parameters: | 268 * Request parameters: |
| 268 * | 269 * |
| 269 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 270 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 270 * error. | 271 * error. |
| 271 * | 272 * |
| 272 * If the used [http.Client] completes with an error when making a REST call, | 273 * If the used [http.Client] completes with an error when making a REST call, |
| 273 * this method will complete with the same error. | 274 * this method will complete with the same error. |
| 274 */ | 275 */ |
| 275 async.Future stop(Channel request) { | 276 async.Future stop(Channel request) { |
| 276 var _url = null; | 277 var _url = null; |
| 277 var _queryParams = new core.Map(); | 278 var _queryParams = new core.Map(); |
| 278 var _uploadMedia = null; | 279 var _uploadMedia = null; |
| 279 var _uploadOptions = null; | 280 var _uploadOptions = null; |
| 280 var _downloadOptions = common.DownloadOptions.Metadata; | 281 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 281 var _body = null; | 282 var _body = null; |
| 282 | 283 |
| 283 if (request != null) { | 284 if (request != null) { |
| 284 _body = convert.JSON.encode((request).toJson()); | 285 _body = convert.JSON.encode((request).toJson()); |
| 285 } | 286 } |
| 286 | 287 |
| 287 _downloadOptions = null; | 288 _downloadOptions = null; |
| 288 | 289 |
| 289 _url = '/admin/reports_v1/channels/stop'; | 290 _url = '/admin/reports_v1/channels/stop'; |
| 290 | 291 |
| 291 var _response = _requester.request(_url, | 292 var _response = _requester.request(_url, |
| 292 "POST", | 293 "POST", |
| 293 body: _body, | 294 body: _body, |
| 294 queryParams: _queryParams, | 295 queryParams: _queryParams, |
| 295 uploadOptions: _uploadOptions, | 296 uploadOptions: _uploadOptions, |
| 296 uploadMedia: _uploadMedia, | 297 uploadMedia: _uploadMedia, |
| 297 downloadOptions: _downloadOptions); | 298 downloadOptions: _downloadOptions); |
| 298 return _response.then((data) => null); | 299 return _response.then((data) => null); |
| 299 } | 300 } |
| 300 | 301 |
| 301 } | 302 } |
| 302 | 303 |
| 303 | 304 |
| 304 /** Not documented yet. */ | |
| 305 class CustomerUsageReportsResourceApi { | 305 class CustomerUsageReportsResourceApi { |
| 306 final common_internal.ApiRequester _requester; | 306 final commons.ApiRequester _requester; |
| 307 | 307 |
| 308 CustomerUsageReportsResourceApi(common_internal.ApiRequester client) : | 308 CustomerUsageReportsResourceApi(commons.ApiRequester client) : |
| 309 _requester = client; | 309 _requester = client; |
| 310 | 310 |
| 311 /** | 311 /** |
| 312 * Retrieves a report which is a collection of properties / statistics for a | 312 * Retrieves a report which is a collection of properties / statistics for a |
| 313 * specific customer. | 313 * specific customer. |
| 314 * | 314 * |
| 315 * Request parameters: | 315 * Request parameters: |
| 316 * | 316 * |
| 317 * [date] - Represents the date in yyyy-mm-dd format for which the data is to | 317 * [date] - Represents the date in yyyy-mm-dd format for which the data is to |
| 318 * be fetched. | 318 * be fetched. |
| 319 * Value must have pattern "(\d){4}-(\d){2}-(\d){2}". | 319 * Value must have pattern "(\d){4}-(\d){2}-(\d){2}". |
| 320 * | 320 * |
| 321 * [customerId] - Represents the customer for which the data is to be fetched. | 321 * [customerId] - Represents the customer for which the data is to be fetched. |
| 322 * Value must have pattern "C.+". | 322 * Value must have pattern "C.+". |
| 323 * | 323 * |
| 324 * [pageToken] - Token to specify next page. | 324 * [pageToken] - Token to specify next page. |
| 325 * | 325 * |
| 326 * [parameters] - Represents the application name, parameter name pairs to | 326 * [parameters] - Represents the application name, parameter name pairs to |
| 327 * fetch in csv as app_name1:param_name1, app_name2:param_name2. | 327 * fetch in csv as app_name1:param_name1, app_name2:param_name2. |
| 328 * Value must have pattern | 328 * Value must have pattern |
| 329 * "(((accounts)|(cros)|(gmail)|(calendar)|(docs)|(gplus)|(sites)|(device_mana
gement)):.+,)*(((accounts)|(cros)|(gmail)|(calendar)|(docs)|(gplus)|(sites)|(dev
ice_management)):.+)". | 329 * "(((accounts)|(cros)|(gmail)|(calendar)|(docs)|(gplus)|(sites)|(device_mana
gement)):.+,)*(((accounts)|(cros)|(gmail)|(calendar)|(docs)|(gplus)|(sites)|(dev
ice_management)):.+)". |
| 330 * | 330 * |
| 331 * Completes with a [UsageReports]. | 331 * Completes with a [UsageReports]. |
| 332 * | 332 * |
| 333 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 333 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 334 * error. | 334 * error. |
| 335 * | 335 * |
| 336 * If the used [http.Client] completes with an error when making a REST call, | 336 * If the used [http.Client] completes with an error when making a REST call, |
| 337 * this method will complete with the same error. | 337 * this method will complete with the same error. |
| 338 */ | 338 */ |
| 339 async.Future<UsageReports> get(core.String date, {core.String customerId, core
.String pageToken, core.String parameters}) { | 339 async.Future<UsageReports> get(core.String date, {core.String customerId, core
.String pageToken, core.String parameters}) { |
| 340 var _url = null; | 340 var _url = null; |
| 341 var _queryParams = new core.Map(); | 341 var _queryParams = new core.Map(); |
| 342 var _uploadMedia = null; | 342 var _uploadMedia = null; |
| 343 var _uploadOptions = null; | 343 var _uploadOptions = null; |
| 344 var _downloadOptions = common.DownloadOptions.Metadata; | 344 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 345 var _body = null; | 345 var _body = null; |
| 346 | 346 |
| 347 if (date == null) { | 347 if (date == null) { |
| 348 throw new core.ArgumentError("Parameter date is required."); | 348 throw new core.ArgumentError("Parameter date is required."); |
| 349 } | 349 } |
| 350 if (customerId != null) { | 350 if (customerId != null) { |
| 351 _queryParams["customerId"] = [customerId]; | 351 _queryParams["customerId"] = [customerId]; |
| 352 } | 352 } |
| 353 if (pageToken != null) { | 353 if (pageToken != null) { |
| 354 _queryParams["pageToken"] = [pageToken]; | 354 _queryParams["pageToken"] = [pageToken]; |
| 355 } | 355 } |
| 356 if (parameters != null) { | 356 if (parameters != null) { |
| 357 _queryParams["parameters"] = [parameters]; | 357 _queryParams["parameters"] = [parameters]; |
| 358 } | 358 } |
| 359 | 359 |
| 360 | 360 |
| 361 _url = 'usage/dates/' + common_internal.Escaper.ecapeVariable('$date'); | 361 _url = 'usage/dates/' + commons.Escaper.ecapeVariable('$date'); |
| 362 | 362 |
| 363 var _response = _requester.request(_url, | 363 var _response = _requester.request(_url, |
| 364 "GET", | 364 "GET", |
| 365 body: _body, | 365 body: _body, |
| 366 queryParams: _queryParams, | 366 queryParams: _queryParams, |
| 367 uploadOptions: _uploadOptions, | 367 uploadOptions: _uploadOptions, |
| 368 uploadMedia: _uploadMedia, | 368 uploadMedia: _uploadMedia, |
| 369 downloadOptions: _downloadOptions); | 369 downloadOptions: _downloadOptions); |
| 370 return _response.then((data) => new UsageReports.fromJson(data)); | 370 return _response.then((data) => new UsageReports.fromJson(data)); |
| 371 } | 371 } |
| 372 | 372 |
| 373 } | 373 } |
| 374 | 374 |
| 375 | 375 |
| 376 /** Not documented yet. */ | |
| 377 class UserUsageReportResourceApi { | 376 class UserUsageReportResourceApi { |
| 378 final common_internal.ApiRequester _requester; | 377 final commons.ApiRequester _requester; |
| 379 | 378 |
| 380 UserUsageReportResourceApi(common_internal.ApiRequester client) : | 379 UserUsageReportResourceApi(commons.ApiRequester client) : |
| 381 _requester = client; | 380 _requester = client; |
| 382 | 381 |
| 383 /** | 382 /** |
| 384 * Retrieves a report which is a collection of properties / statistics for a | 383 * Retrieves a report which is a collection of properties / statistics for a |
| 385 * set of users. | 384 * set of users. |
| 386 * | 385 * |
| 387 * Request parameters: | 386 * Request parameters: |
| 388 * | 387 * |
| 389 * [userKey] - Represents the profile id or the user email for which the data | 388 * [userKey] - Represents the profile id or the user email for which the data |
| 390 * should be filtered. | 389 * should be filtered. |
| (...skipping 14 matching lines...) Expand all Loading... |
| 405 * | 404 * |
| 406 * [pageToken] - Token to specify next page. | 405 * [pageToken] - Token to specify next page. |
| 407 * | 406 * |
| 408 * [parameters] - Represents the application name, parameter name pairs to | 407 * [parameters] - Represents the application name, parameter name pairs to |
| 409 * fetch in csv as app_name1:param_name1, app_name2:param_name2. | 408 * fetch in csv as app_name1:param_name1, app_name2:param_name2. |
| 410 * Value must have pattern | 409 * Value must have pattern |
| 411 * "(((accounts)|(cros)|(gmail)|(calendar)|(docs)|(gplus)|(sites)|(device_mana
gement)):.+,)*(((accounts)|(cros)|(gmail)|(calendar)|(docs)|(gplus)|(sites)|(dev
ice_management)):.+)". | 410 * "(((accounts)|(cros)|(gmail)|(calendar)|(docs)|(gplus)|(sites)|(device_mana
gement)):.+,)*(((accounts)|(cros)|(gmail)|(calendar)|(docs)|(gplus)|(sites)|(dev
ice_management)):.+)". |
| 412 * | 411 * |
| 413 * Completes with a [UsageReports]. | 412 * Completes with a [UsageReports]. |
| 414 * | 413 * |
| 415 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 414 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 416 * error. | 415 * error. |
| 417 * | 416 * |
| 418 * If the used [http.Client] completes with an error when making a REST call, | 417 * If the used [http.Client] completes with an error when making a REST call, |
| 419 * this method will complete with the same error. | 418 * this method will complete with the same error. |
| 420 */ | 419 */ |
| 421 async.Future<UsageReports> get(core.String userKey, core.String date, {core.St
ring customerId, core.String filters, core.int maxResults, core.String pageToken
, core.String parameters}) { | 420 async.Future<UsageReports> get(core.String userKey, core.String date, {core.St
ring customerId, core.String filters, core.int maxResults, core.String pageToken
, core.String parameters}) { |
| 422 var _url = null; | 421 var _url = null; |
| 423 var _queryParams = new core.Map(); | 422 var _queryParams = new core.Map(); |
| 424 var _uploadMedia = null; | 423 var _uploadMedia = null; |
| 425 var _uploadOptions = null; | 424 var _uploadOptions = null; |
| 426 var _downloadOptions = common.DownloadOptions.Metadata; | 425 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 427 var _body = null; | 426 var _body = null; |
| 428 | 427 |
| 429 if (userKey == null) { | 428 if (userKey == null) { |
| 430 throw new core.ArgumentError("Parameter userKey is required."); | 429 throw new core.ArgumentError("Parameter userKey is required."); |
| 431 } | 430 } |
| 432 if (date == null) { | 431 if (date == null) { |
| 433 throw new core.ArgumentError("Parameter date is required."); | 432 throw new core.ArgumentError("Parameter date is required."); |
| 434 } | 433 } |
| 435 if (customerId != null) { | 434 if (customerId != null) { |
| 436 _queryParams["customerId"] = [customerId]; | 435 _queryParams["customerId"] = [customerId]; |
| 437 } | 436 } |
| 438 if (filters != null) { | 437 if (filters != null) { |
| 439 _queryParams["filters"] = [filters]; | 438 _queryParams["filters"] = [filters]; |
| 440 } | 439 } |
| 441 if (maxResults != null) { | 440 if (maxResults != null) { |
| 442 _queryParams["maxResults"] = ["${maxResults}"]; | 441 _queryParams["maxResults"] = ["${maxResults}"]; |
| 443 } | 442 } |
| 444 if (pageToken != null) { | 443 if (pageToken != null) { |
| 445 _queryParams["pageToken"] = [pageToken]; | 444 _queryParams["pageToken"] = [pageToken]; |
| 446 } | 445 } |
| 447 if (parameters != null) { | 446 if (parameters != null) { |
| 448 _queryParams["parameters"] = [parameters]; | 447 _queryParams["parameters"] = [parameters]; |
| 449 } | 448 } |
| 450 | 449 |
| 451 | 450 |
| 452 _url = 'usage/users/' + common_internal.Escaper.ecapeVariable('$userKey') +
'/dates/' + common_internal.Escaper.ecapeVariable('$date'); | 451 _url = 'usage/users/' + commons.Escaper.ecapeVariable('$userKey') + '/dates/
' + commons.Escaper.ecapeVariable('$date'); |
| 453 | 452 |
| 454 var _response = _requester.request(_url, | 453 var _response = _requester.request(_url, |
| 455 "GET", | 454 "GET", |
| 456 body: _body, | 455 body: _body, |
| 457 queryParams: _queryParams, | 456 queryParams: _queryParams, |
| 458 uploadOptions: _uploadOptions, | 457 uploadOptions: _uploadOptions, |
| 459 uploadMedia: _uploadMedia, | 458 uploadMedia: _uploadMedia, |
| 460 downloadOptions: _downloadOptions); | 459 downloadOptions: _downloadOptions); |
| 461 return _response.then((data) => new UsageReports.fromJson(data)); | 460 return _response.then((data) => new UsageReports.fromJson(data)); |
| 462 } | 461 } |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 560 _json["key"] = key; | 559 _json["key"] = key; |
| 561 } | 560 } |
| 562 if (profileId != null) { | 561 if (profileId != null) { |
| 563 _json["profileId"] = profileId; | 562 _json["profileId"] = profileId; |
| 564 } | 563 } |
| 565 return _json; | 564 return _json; |
| 566 } | 565 } |
| 567 } | 566 } |
| 568 | 567 |
| 569 | 568 |
| 570 /** Not documented yet. */ | |
| 571 class ActivityEventsParameters { | 569 class ActivityEventsParameters { |
| 572 /** Boolean value of the parameter. */ | 570 /** Boolean value of the parameter. */ |
| 573 core.bool boolValue; | 571 core.bool boolValue; |
| 574 | 572 |
| 575 /** Integral value of the parameter. */ | 573 /** Integral value of the parameter. */ |
| 576 core.String intValue; | 574 core.String intValue; |
| 577 | 575 |
| 578 /** Multi-int value of the parameter. */ | 576 /** Multi-int value of the parameter. */ |
| 579 core.List<core.String> multiIntValue; | 577 core.List<core.String> multiIntValue; |
| 580 | 578 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 629 _json["name"] = name; | 627 _json["name"] = name; |
| 630 } | 628 } |
| 631 if (value != null) { | 629 if (value != null) { |
| 632 _json["value"] = value; | 630 _json["value"] = value; |
| 633 } | 631 } |
| 634 return _json; | 632 return _json; |
| 635 } | 633 } |
| 636 } | 634 } |
| 637 | 635 |
| 638 | 636 |
| 639 /** Not documented yet. */ | |
| 640 class ActivityEvents { | 637 class ActivityEvents { |
| 641 /** Name of event. */ | 638 /** Name of event. */ |
| 642 core.String name; | 639 core.String name; |
| 643 | 640 |
| 644 /** Parameter value pairs for various applications. */ | 641 /** Parameter value pairs for various applications. */ |
| 645 core.List<ActivityEventsParameters> parameters; | 642 core.List<ActivityEventsParameters> parameters; |
| 646 | 643 |
| 647 /** Type of event. */ | 644 /** Type of event. */ |
| 648 core.String type; | 645 core.String type; |
| 649 | 646 |
| (...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 968 _json["type"] = type; | 965 _json["type"] = type; |
| 969 } | 966 } |
| 970 if (userEmail != null) { | 967 if (userEmail != null) { |
| 971 _json["userEmail"] = userEmail; | 968 _json["userEmail"] = userEmail; |
| 972 } | 969 } |
| 973 return _json; | 970 return _json; |
| 974 } | 971 } |
| 975 } | 972 } |
| 976 | 973 |
| 977 | 974 |
| 978 /** Not documented yet. */ | |
| 979 class UsageReportParameters { | 975 class UsageReportParameters { |
| 980 /** Boolean value of the parameter. */ | 976 /** Boolean value of the parameter. */ |
| 981 core.bool boolValue; | 977 core.bool boolValue; |
| 982 | 978 |
| 983 /** RFC 3339 formatted value of the parameter. */ | 979 /** RFC 3339 formatted value of the parameter. */ |
| 984 core.DateTime datetimeValue; | 980 core.DateTime datetimeValue; |
| 985 | 981 |
| 986 /** Integral value of the parameter. */ | 982 /** Integral value of the parameter. */ |
| 987 core.String intValue; | 983 core.String intValue; |
| 988 | 984 |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1102 _json["kind"] = kind; | 1098 _json["kind"] = kind; |
| 1103 } | 1099 } |
| 1104 if (parameters != null) { | 1100 if (parameters != null) { |
| 1105 _json["parameters"] = parameters.map((value) => (value).toJson()).toList()
; | 1101 _json["parameters"] = parameters.map((value) => (value).toJson()).toList()
; |
| 1106 } | 1102 } |
| 1107 return _json; | 1103 return _json; |
| 1108 } | 1104 } |
| 1109 } | 1105 } |
| 1110 | 1106 |
| 1111 | 1107 |
| 1112 /** Not documented yet. */ | |
| 1113 class UsageReportsWarningsData { | 1108 class UsageReportsWarningsData { |
| 1114 /** | 1109 /** |
| 1115 * Key associated with a key-value pair to give detailed information on the | 1110 * Key associated with a key-value pair to give detailed information on the |
| 1116 * warning. | 1111 * warning. |
| 1117 */ | 1112 */ |
| 1118 core.String key; | 1113 core.String key; |
| 1119 | 1114 |
| 1120 /** | 1115 /** |
| 1121 * Value associated with a key-value pair to give detailed information on the | 1116 * Value associated with a key-value pair to give detailed information on the |
| 1122 * warning. | 1117 * warning. |
| (...skipping 18 matching lines...) Expand all Loading... |
| 1141 _json["key"] = key; | 1136 _json["key"] = key; |
| 1142 } | 1137 } |
| 1143 if (value != null) { | 1138 if (value != null) { |
| 1144 _json["value"] = value; | 1139 _json["value"] = value; |
| 1145 } | 1140 } |
| 1146 return _json; | 1141 return _json; |
| 1147 } | 1142 } |
| 1148 } | 1143 } |
| 1149 | 1144 |
| 1150 | 1145 |
| 1151 /** Not documented yet. */ | |
| 1152 class UsageReportsWarnings { | 1146 class UsageReportsWarnings { |
| 1153 /** Machine readable code / warning type. */ | 1147 /** Machine readable code / warning type. */ |
| 1154 core.String code; | 1148 core.String code; |
| 1155 | 1149 |
| 1156 /** Key-Value pairs to give detailed information on the warning. */ | 1150 /** Key-Value pairs to give detailed information on the warning. */ |
| 1157 core.List<UsageReportsWarningsData> data; | 1151 core.List<UsageReportsWarningsData> data; |
| 1158 | 1152 |
| 1159 /** Human readable message for the warning. */ | 1153 /** Human readable message for the warning. */ |
| 1160 core.String message; | 1154 core.String message; |
| 1161 | 1155 |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1241 } | 1235 } |
| 1242 if (usageReports != null) { | 1236 if (usageReports != null) { |
| 1243 _json["usageReports"] = usageReports.map((value) => (value).toJson()).toLi
st(); | 1237 _json["usageReports"] = usageReports.map((value) => (value).toJson()).toLi
st(); |
| 1244 } | 1238 } |
| 1245 if (warnings != null) { | 1239 if (warnings != null) { |
| 1246 _json["warnings"] = warnings.map((value) => (value).toJson()).toList(); | 1240 _json["warnings"] = warnings.map((value) => (value).toJson()).toList(); |
| 1247 } | 1241 } |
| 1248 return _json; | 1242 return _json; |
| 1249 } | 1243 } |
| 1250 } | 1244 } |
| 1251 | |
| 1252 | |
| OLD | NEW |