OLD | NEW |
(Empty) | |
| 1 // This is a generated file (see the discoveryapis_generator project). |
| 2 |
| 3 library googleapis.vault.v1; |
| 4 |
| 5 import 'dart:core' as core; |
| 6 import 'dart:async' as async; |
| 7 import 'dart:convert' as convert; |
| 8 |
| 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
| 10 import 'package:http/http.dart' as http; |
| 11 |
| 12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show |
| 13 ApiRequestError, DetailedApiRequestError; |
| 14 |
| 15 const core.String USER_AGENT = 'dart-api-client vault/v1'; |
| 16 |
| 17 class VaultApi { |
| 18 |
| 19 final commons.ApiRequester _requester; |
| 20 |
| 21 MattersResourceApi get matters => new MattersResourceApi(_requester); |
| 22 |
| 23 VaultApi(http.Client client, {core.String rootUrl: "https://vault.googleapis.c
om/", core.String servicePath: ""}) : |
| 24 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); |
| 25 } |
| 26 |
| 27 |
| 28 class MattersResourceApi { |
| 29 final commons.ApiRequester _requester; |
| 30 |
| 31 MattersHoldsResourceApi get holds => new MattersHoldsResourceApi(_requester); |
| 32 |
| 33 MattersResourceApi(commons.ApiRequester client) : |
| 34 _requester = client; |
| 35 |
| 36 /** |
| 37 * Adds an account as a matter collaborator. |
| 38 * |
| 39 * [request] - The metadata request object. |
| 40 * |
| 41 * Request parameters: |
| 42 * |
| 43 * [matterId] - The matter ID. |
| 44 * |
| 45 * Completes with a [MatterPermission]. |
| 46 * |
| 47 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 48 * error. |
| 49 * |
| 50 * If the used [http.Client] completes with an error when making a REST call, |
| 51 * this method will complete with the same error. |
| 52 */ |
| 53 async.Future<MatterPermission> addPermissions(AddMatterPermissionsRequest requ
est, core.String matterId) { |
| 54 var _url = null; |
| 55 var _queryParams = new core.Map(); |
| 56 var _uploadMedia = null; |
| 57 var _uploadOptions = null; |
| 58 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 59 var _body = null; |
| 60 |
| 61 if (request != null) { |
| 62 _body = convert.JSON.encode((request).toJson()); |
| 63 } |
| 64 if (matterId == null) { |
| 65 throw new core.ArgumentError("Parameter matterId is required."); |
| 66 } |
| 67 |
| 68 _url = 'v1/matters/' + commons.Escaper.ecapeVariable('$matterId') + ':addPer
missions'; |
| 69 |
| 70 var _response = _requester.request(_url, |
| 71 "POST", |
| 72 body: _body, |
| 73 queryParams: _queryParams, |
| 74 uploadOptions: _uploadOptions, |
| 75 uploadMedia: _uploadMedia, |
| 76 downloadOptions: _downloadOptions); |
| 77 return _response.then((data) => new MatterPermission.fromJson(data)); |
| 78 } |
| 79 |
| 80 /** |
| 81 * Closes the specified matter. Returns matter with updated state. |
| 82 * |
| 83 * [request] - The metadata request object. |
| 84 * |
| 85 * Request parameters: |
| 86 * |
| 87 * [matterId] - The matter ID. |
| 88 * |
| 89 * Completes with a [CloseMatterResponse]. |
| 90 * |
| 91 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 92 * error. |
| 93 * |
| 94 * If the used [http.Client] completes with an error when making a REST call, |
| 95 * this method will complete with the same error. |
| 96 */ |
| 97 async.Future<CloseMatterResponse> close(CloseMatterRequest request, core.Strin
g matterId) { |
| 98 var _url = null; |
| 99 var _queryParams = new core.Map(); |
| 100 var _uploadMedia = null; |
| 101 var _uploadOptions = null; |
| 102 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 103 var _body = null; |
| 104 |
| 105 if (request != null) { |
| 106 _body = convert.JSON.encode((request).toJson()); |
| 107 } |
| 108 if (matterId == null) { |
| 109 throw new core.ArgumentError("Parameter matterId is required."); |
| 110 } |
| 111 |
| 112 _url = 'v1/matters/' + commons.Escaper.ecapeVariable('$matterId') + ':close'
; |
| 113 |
| 114 var _response = _requester.request(_url, |
| 115 "POST", |
| 116 body: _body, |
| 117 queryParams: _queryParams, |
| 118 uploadOptions: _uploadOptions, |
| 119 uploadMedia: _uploadMedia, |
| 120 downloadOptions: _downloadOptions); |
| 121 return _response.then((data) => new CloseMatterResponse.fromJson(data)); |
| 122 } |
| 123 |
| 124 /** |
| 125 * Creates a new matter. Returns created matter with default view. |
| 126 * |
| 127 * [request] - The metadata request object. |
| 128 * |
| 129 * Request parameters: |
| 130 * |
| 131 * Completes with a [Matter]. |
| 132 * |
| 133 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 134 * error. |
| 135 * |
| 136 * If the used [http.Client] completes with an error when making a REST call, |
| 137 * this method will complete with the same error. |
| 138 */ |
| 139 async.Future<Matter> create(Matter request) { |
| 140 var _url = null; |
| 141 var _queryParams = new core.Map(); |
| 142 var _uploadMedia = null; |
| 143 var _uploadOptions = null; |
| 144 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 145 var _body = null; |
| 146 |
| 147 if (request != null) { |
| 148 _body = convert.JSON.encode((request).toJson()); |
| 149 } |
| 150 |
| 151 _url = 'v1/matters'; |
| 152 |
| 153 var _response = _requester.request(_url, |
| 154 "POST", |
| 155 body: _body, |
| 156 queryParams: _queryParams, |
| 157 uploadOptions: _uploadOptions, |
| 158 uploadMedia: _uploadMedia, |
| 159 downloadOptions: _downloadOptions); |
| 160 return _response.then((data) => new Matter.fromJson(data)); |
| 161 } |
| 162 |
| 163 /** |
| 164 * Deletes the specified matter. Returns matter with updated state. |
| 165 * |
| 166 * Request parameters: |
| 167 * |
| 168 * [matterId] - The matter ID |
| 169 * |
| 170 * Completes with a [Matter]. |
| 171 * |
| 172 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 173 * error. |
| 174 * |
| 175 * If the used [http.Client] completes with an error when making a REST call, |
| 176 * this method will complete with the same error. |
| 177 */ |
| 178 async.Future<Matter> delete(core.String matterId) { |
| 179 var _url = null; |
| 180 var _queryParams = new core.Map(); |
| 181 var _uploadMedia = null; |
| 182 var _uploadOptions = null; |
| 183 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 184 var _body = null; |
| 185 |
| 186 if (matterId == null) { |
| 187 throw new core.ArgumentError("Parameter matterId is required."); |
| 188 } |
| 189 |
| 190 _url = 'v1/matters/' + commons.Escaper.ecapeVariable('$matterId'); |
| 191 |
| 192 var _response = _requester.request(_url, |
| 193 "DELETE", |
| 194 body: _body, |
| 195 queryParams: _queryParams, |
| 196 uploadOptions: _uploadOptions, |
| 197 uploadMedia: _uploadMedia, |
| 198 downloadOptions: _downloadOptions); |
| 199 return _response.then((data) => new Matter.fromJson(data)); |
| 200 } |
| 201 |
| 202 /** |
| 203 * Gets the specified matter. |
| 204 * |
| 205 * Request parameters: |
| 206 * |
| 207 * [matterId] - The matter ID. |
| 208 * |
| 209 * [view] - Specifies which parts of the Matter to return in the response. |
| 210 * Possible string values are: |
| 211 * - "VIEW_UNSPECIFIED" : A VIEW_UNSPECIFIED. |
| 212 * - "BASIC" : A BASIC. |
| 213 * - "FULL" : A FULL. |
| 214 * |
| 215 * Completes with a [Matter]. |
| 216 * |
| 217 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 218 * error. |
| 219 * |
| 220 * If the used [http.Client] completes with an error when making a REST call, |
| 221 * this method will complete with the same error. |
| 222 */ |
| 223 async.Future<Matter> get(core.String matterId, {core.String view}) { |
| 224 var _url = null; |
| 225 var _queryParams = new core.Map(); |
| 226 var _uploadMedia = null; |
| 227 var _uploadOptions = null; |
| 228 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 229 var _body = null; |
| 230 |
| 231 if (matterId == null) { |
| 232 throw new core.ArgumentError("Parameter matterId is required."); |
| 233 } |
| 234 if (view != null) { |
| 235 _queryParams["view"] = [view]; |
| 236 } |
| 237 |
| 238 _url = 'v1/matters/' + commons.Escaper.ecapeVariable('$matterId'); |
| 239 |
| 240 var _response = _requester.request(_url, |
| 241 "GET", |
| 242 body: _body, |
| 243 queryParams: _queryParams, |
| 244 uploadOptions: _uploadOptions, |
| 245 uploadMedia: _uploadMedia, |
| 246 downloadOptions: _downloadOptions); |
| 247 return _response.then((data) => new Matter.fromJson(data)); |
| 248 } |
| 249 |
| 250 /** |
| 251 * Lists matters the user has access to. |
| 252 * |
| 253 * Request parameters: |
| 254 * |
| 255 * [pageToken] - The pagination token as returned in the response. |
| 256 * |
| 257 * [pageSize] - The number of matters to return in the response. |
| 258 * Default and maximum are 100. |
| 259 * |
| 260 * [view] - Specifies which parts of the matter to return in response. |
| 261 * Possible string values are: |
| 262 * - "VIEW_UNSPECIFIED" : A VIEW_UNSPECIFIED. |
| 263 * - "BASIC" : A BASIC. |
| 264 * - "FULL" : A FULL. |
| 265 * |
| 266 * Completes with a [ListMattersResponse]. |
| 267 * |
| 268 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 269 * error. |
| 270 * |
| 271 * If the used [http.Client] completes with an error when making a REST call, |
| 272 * this method will complete with the same error. |
| 273 */ |
| 274 async.Future<ListMattersResponse> list({core.String pageToken, core.int pageSi
ze, core.String view}) { |
| 275 var _url = null; |
| 276 var _queryParams = new core.Map(); |
| 277 var _uploadMedia = null; |
| 278 var _uploadOptions = null; |
| 279 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 280 var _body = null; |
| 281 |
| 282 if (pageToken != null) { |
| 283 _queryParams["pageToken"] = [pageToken]; |
| 284 } |
| 285 if (pageSize != null) { |
| 286 _queryParams["pageSize"] = ["${pageSize}"]; |
| 287 } |
| 288 if (view != null) { |
| 289 _queryParams["view"] = [view]; |
| 290 } |
| 291 |
| 292 _url = 'v1/matters'; |
| 293 |
| 294 var _response = _requester.request(_url, |
| 295 "GET", |
| 296 body: _body, |
| 297 queryParams: _queryParams, |
| 298 uploadOptions: _uploadOptions, |
| 299 uploadMedia: _uploadMedia, |
| 300 downloadOptions: _downloadOptions); |
| 301 return _response.then((data) => new ListMattersResponse.fromJson(data)); |
| 302 } |
| 303 |
| 304 /** |
| 305 * Removes an account as a matter collaborator. |
| 306 * |
| 307 * [request] - The metadata request object. |
| 308 * |
| 309 * Request parameters: |
| 310 * |
| 311 * [matterId] - The matter ID. |
| 312 * |
| 313 * Completes with a [Empty]. |
| 314 * |
| 315 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 316 * error. |
| 317 * |
| 318 * If the used [http.Client] completes with an error when making a REST call, |
| 319 * this method will complete with the same error. |
| 320 */ |
| 321 async.Future<Empty> removePermissions(RemoveMatterPermissionsRequest request,
core.String matterId) { |
| 322 var _url = null; |
| 323 var _queryParams = new core.Map(); |
| 324 var _uploadMedia = null; |
| 325 var _uploadOptions = null; |
| 326 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 327 var _body = null; |
| 328 |
| 329 if (request != null) { |
| 330 _body = convert.JSON.encode((request).toJson()); |
| 331 } |
| 332 if (matterId == null) { |
| 333 throw new core.ArgumentError("Parameter matterId is required."); |
| 334 } |
| 335 |
| 336 _url = 'v1/matters/' + commons.Escaper.ecapeVariable('$matterId') + ':remove
Permissions'; |
| 337 |
| 338 var _response = _requester.request(_url, |
| 339 "POST", |
| 340 body: _body, |
| 341 queryParams: _queryParams, |
| 342 uploadOptions: _uploadOptions, |
| 343 uploadMedia: _uploadMedia, |
| 344 downloadOptions: _downloadOptions); |
| 345 return _response.then((data) => new Empty.fromJson(data)); |
| 346 } |
| 347 |
| 348 /** |
| 349 * Reopens the specified matter. Returns matter with updated state. |
| 350 * |
| 351 * [request] - The metadata request object. |
| 352 * |
| 353 * Request parameters: |
| 354 * |
| 355 * [matterId] - The matter ID. |
| 356 * |
| 357 * Completes with a [ReopenMatterResponse]. |
| 358 * |
| 359 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 360 * error. |
| 361 * |
| 362 * If the used [http.Client] completes with an error when making a REST call, |
| 363 * this method will complete with the same error. |
| 364 */ |
| 365 async.Future<ReopenMatterResponse> reopen(ReopenMatterRequest request, core.St
ring matterId) { |
| 366 var _url = null; |
| 367 var _queryParams = new core.Map(); |
| 368 var _uploadMedia = null; |
| 369 var _uploadOptions = null; |
| 370 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 371 var _body = null; |
| 372 |
| 373 if (request != null) { |
| 374 _body = convert.JSON.encode((request).toJson()); |
| 375 } |
| 376 if (matterId == null) { |
| 377 throw new core.ArgumentError("Parameter matterId is required."); |
| 378 } |
| 379 |
| 380 _url = 'v1/matters/' + commons.Escaper.ecapeVariable('$matterId') + ':reopen
'; |
| 381 |
| 382 var _response = _requester.request(_url, |
| 383 "POST", |
| 384 body: _body, |
| 385 queryParams: _queryParams, |
| 386 uploadOptions: _uploadOptions, |
| 387 uploadMedia: _uploadMedia, |
| 388 downloadOptions: _downloadOptions); |
| 389 return _response.then((data) => new ReopenMatterResponse.fromJson(data)); |
| 390 } |
| 391 |
| 392 /** |
| 393 * Undeletes the specified matter. Returns matter with updated state. |
| 394 * |
| 395 * [request] - The metadata request object. |
| 396 * |
| 397 * Request parameters: |
| 398 * |
| 399 * [matterId] - The matter ID. |
| 400 * |
| 401 * Completes with a [Matter]. |
| 402 * |
| 403 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 404 * error. |
| 405 * |
| 406 * If the used [http.Client] completes with an error when making a REST call, |
| 407 * this method will complete with the same error. |
| 408 */ |
| 409 async.Future<Matter> undelete(UndeleteMatterRequest request, core.String matte
rId) { |
| 410 var _url = null; |
| 411 var _queryParams = new core.Map(); |
| 412 var _uploadMedia = null; |
| 413 var _uploadOptions = null; |
| 414 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 415 var _body = null; |
| 416 |
| 417 if (request != null) { |
| 418 _body = convert.JSON.encode((request).toJson()); |
| 419 } |
| 420 if (matterId == null) { |
| 421 throw new core.ArgumentError("Parameter matterId is required."); |
| 422 } |
| 423 |
| 424 _url = 'v1/matters/' + commons.Escaper.ecapeVariable('$matterId') + ':undele
te'; |
| 425 |
| 426 var _response = _requester.request(_url, |
| 427 "POST", |
| 428 body: _body, |
| 429 queryParams: _queryParams, |
| 430 uploadOptions: _uploadOptions, |
| 431 uploadMedia: _uploadMedia, |
| 432 downloadOptions: _downloadOptions); |
| 433 return _response.then((data) => new Matter.fromJson(data)); |
| 434 } |
| 435 |
| 436 /** |
| 437 * Updates the specified matter. |
| 438 * This updates only the name and description of the matter, identified by |
| 439 * matter id. Changes to any other fields are ignored. |
| 440 * Returns the default view of the matter. |
| 441 * |
| 442 * [request] - The metadata request object. |
| 443 * |
| 444 * Request parameters: |
| 445 * |
| 446 * [matterId] - The matter ID. |
| 447 * |
| 448 * Completes with a [Matter]. |
| 449 * |
| 450 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 451 * error. |
| 452 * |
| 453 * If the used [http.Client] completes with an error when making a REST call, |
| 454 * this method will complete with the same error. |
| 455 */ |
| 456 async.Future<Matter> update(Matter request, core.String matterId) { |
| 457 var _url = null; |
| 458 var _queryParams = new core.Map(); |
| 459 var _uploadMedia = null; |
| 460 var _uploadOptions = null; |
| 461 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 462 var _body = null; |
| 463 |
| 464 if (request != null) { |
| 465 _body = convert.JSON.encode((request).toJson()); |
| 466 } |
| 467 if (matterId == null) { |
| 468 throw new core.ArgumentError("Parameter matterId is required."); |
| 469 } |
| 470 |
| 471 _url = 'v1/matters/' + commons.Escaper.ecapeVariable('$matterId'); |
| 472 |
| 473 var _response = _requester.request(_url, |
| 474 "PUT", |
| 475 body: _body, |
| 476 queryParams: _queryParams, |
| 477 uploadOptions: _uploadOptions, |
| 478 uploadMedia: _uploadMedia, |
| 479 downloadOptions: _downloadOptions); |
| 480 return _response.then((data) => new Matter.fromJson(data)); |
| 481 } |
| 482 |
| 483 } |
| 484 |
| 485 |
| 486 class MattersHoldsResourceApi { |
| 487 final commons.ApiRequester _requester; |
| 488 |
| 489 MattersHoldsAccountsResourceApi get accounts => new MattersHoldsAccountsResour
ceApi(_requester); |
| 490 |
| 491 MattersHoldsResourceApi(commons.ApiRequester client) : |
| 492 _requester = client; |
| 493 |
| 494 /** |
| 495 * Creates a hold in the given matter. |
| 496 * |
| 497 * [request] - The metadata request object. |
| 498 * |
| 499 * Request parameters: |
| 500 * |
| 501 * [matterId] - The matter ID. |
| 502 * |
| 503 * Completes with a [Hold]. |
| 504 * |
| 505 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 506 * error. |
| 507 * |
| 508 * If the used [http.Client] completes with an error when making a REST call, |
| 509 * this method will complete with the same error. |
| 510 */ |
| 511 async.Future<Hold> create(Hold request, core.String matterId) { |
| 512 var _url = null; |
| 513 var _queryParams = new core.Map(); |
| 514 var _uploadMedia = null; |
| 515 var _uploadOptions = null; |
| 516 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 517 var _body = null; |
| 518 |
| 519 if (request != null) { |
| 520 _body = convert.JSON.encode((request).toJson()); |
| 521 } |
| 522 if (matterId == null) { |
| 523 throw new core.ArgumentError("Parameter matterId is required."); |
| 524 } |
| 525 |
| 526 _url = 'v1/matters/' + commons.Escaper.ecapeVariable('$matterId') + '/holds'
; |
| 527 |
| 528 var _response = _requester.request(_url, |
| 529 "POST", |
| 530 body: _body, |
| 531 queryParams: _queryParams, |
| 532 uploadOptions: _uploadOptions, |
| 533 uploadMedia: _uploadMedia, |
| 534 downloadOptions: _downloadOptions); |
| 535 return _response.then((data) => new Hold.fromJson(data)); |
| 536 } |
| 537 |
| 538 /** |
| 539 * Removes a hold by ID. This will release any HeldAccounts on this Hold. |
| 540 * |
| 541 * Request parameters: |
| 542 * |
| 543 * [matterId] - The matter ID. |
| 544 * |
| 545 * [holdId] - The hold ID. |
| 546 * |
| 547 * Completes with a [Empty]. |
| 548 * |
| 549 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 550 * error. |
| 551 * |
| 552 * If the used [http.Client] completes with an error when making a REST call, |
| 553 * this method will complete with the same error. |
| 554 */ |
| 555 async.Future<Empty> delete(core.String matterId, core.String holdId) { |
| 556 var _url = null; |
| 557 var _queryParams = new core.Map(); |
| 558 var _uploadMedia = null; |
| 559 var _uploadOptions = null; |
| 560 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 561 var _body = null; |
| 562 |
| 563 if (matterId == null) { |
| 564 throw new core.ArgumentError("Parameter matterId is required."); |
| 565 } |
| 566 if (holdId == null) { |
| 567 throw new core.ArgumentError("Parameter holdId is required."); |
| 568 } |
| 569 |
| 570 _url = 'v1/matters/' + commons.Escaper.ecapeVariable('$matterId') + '/holds/
' + commons.Escaper.ecapeVariable('$holdId'); |
| 571 |
| 572 var _response = _requester.request(_url, |
| 573 "DELETE", |
| 574 body: _body, |
| 575 queryParams: _queryParams, |
| 576 uploadOptions: _uploadOptions, |
| 577 uploadMedia: _uploadMedia, |
| 578 downloadOptions: _downloadOptions); |
| 579 return _response.then((data) => new Empty.fromJson(data)); |
| 580 } |
| 581 |
| 582 /** |
| 583 * Gets a hold by ID. |
| 584 * |
| 585 * Request parameters: |
| 586 * |
| 587 * [matterId] - The matter ID. |
| 588 * |
| 589 * [holdId] - The hold ID. |
| 590 * |
| 591 * Completes with a [Hold]. |
| 592 * |
| 593 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 594 * error. |
| 595 * |
| 596 * If the used [http.Client] completes with an error when making a REST call, |
| 597 * this method will complete with the same error. |
| 598 */ |
| 599 async.Future<Hold> get(core.String matterId, core.String holdId) { |
| 600 var _url = null; |
| 601 var _queryParams = new core.Map(); |
| 602 var _uploadMedia = null; |
| 603 var _uploadOptions = null; |
| 604 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 605 var _body = null; |
| 606 |
| 607 if (matterId == null) { |
| 608 throw new core.ArgumentError("Parameter matterId is required."); |
| 609 } |
| 610 if (holdId == null) { |
| 611 throw new core.ArgumentError("Parameter holdId is required."); |
| 612 } |
| 613 |
| 614 _url = 'v1/matters/' + commons.Escaper.ecapeVariable('$matterId') + '/holds/
' + commons.Escaper.ecapeVariable('$holdId'); |
| 615 |
| 616 var _response = _requester.request(_url, |
| 617 "GET", |
| 618 body: _body, |
| 619 queryParams: _queryParams, |
| 620 uploadOptions: _uploadOptions, |
| 621 uploadMedia: _uploadMedia, |
| 622 downloadOptions: _downloadOptions); |
| 623 return _response.then((data) => new Hold.fromJson(data)); |
| 624 } |
| 625 |
| 626 /** |
| 627 * Lists holds within a matter. An empty page token in ListHoldsResponse |
| 628 * denotes no more holds to list. |
| 629 * |
| 630 * Request parameters: |
| 631 * |
| 632 * [matterId] - The matter ID. |
| 633 * |
| 634 * [pageToken] - The pagination token as returned in the response. |
| 635 * An empty token means start from the beginning. |
| 636 * |
| 637 * [pageSize] - The number of holds to return in the response, between 0 and |
| 638 * 100 inclusive. |
| 639 * Leaving this empty, or as 0, is the same as page_size = 100. |
| 640 * |
| 641 * Completes with a [ListHoldsResponse]. |
| 642 * |
| 643 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 644 * error. |
| 645 * |
| 646 * If the used [http.Client] completes with an error when making a REST call, |
| 647 * this method will complete with the same error. |
| 648 */ |
| 649 async.Future<ListHoldsResponse> list(core.String matterId, {core.String pageTo
ken, core.int pageSize}) { |
| 650 var _url = null; |
| 651 var _queryParams = new core.Map(); |
| 652 var _uploadMedia = null; |
| 653 var _uploadOptions = null; |
| 654 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 655 var _body = null; |
| 656 |
| 657 if (matterId == null) { |
| 658 throw new core.ArgumentError("Parameter matterId is required."); |
| 659 } |
| 660 if (pageToken != null) { |
| 661 _queryParams["pageToken"] = [pageToken]; |
| 662 } |
| 663 if (pageSize != null) { |
| 664 _queryParams["pageSize"] = ["${pageSize}"]; |
| 665 } |
| 666 |
| 667 _url = 'v1/matters/' + commons.Escaper.ecapeVariable('$matterId') + '/holds'
; |
| 668 |
| 669 var _response = _requester.request(_url, |
| 670 "GET", |
| 671 body: _body, |
| 672 queryParams: _queryParams, |
| 673 uploadOptions: _uploadOptions, |
| 674 uploadMedia: _uploadMedia, |
| 675 downloadOptions: _downloadOptions); |
| 676 return _response.then((data) => new ListHoldsResponse.fromJson(data)); |
| 677 } |
| 678 |
| 679 /** |
| 680 * Updates the OU and/or query parameters of a hold. You cannot add accounts |
| 681 * to a hold that covers an OU, nor can you add OUs to a hold that covers |
| 682 * individual accounts. Accounts listed in the hold will be ignored. |
| 683 * |
| 684 * [request] - The metadata request object. |
| 685 * |
| 686 * Request parameters: |
| 687 * |
| 688 * [matterId] - The matter ID. |
| 689 * |
| 690 * [holdId] - The ID of the hold. |
| 691 * |
| 692 * Completes with a [Hold]. |
| 693 * |
| 694 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 695 * error. |
| 696 * |
| 697 * If the used [http.Client] completes with an error when making a REST call, |
| 698 * this method will complete with the same error. |
| 699 */ |
| 700 async.Future<Hold> update(Hold request, core.String matterId, core.String hold
Id) { |
| 701 var _url = null; |
| 702 var _queryParams = new core.Map(); |
| 703 var _uploadMedia = null; |
| 704 var _uploadOptions = null; |
| 705 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 706 var _body = null; |
| 707 |
| 708 if (request != null) { |
| 709 _body = convert.JSON.encode((request).toJson()); |
| 710 } |
| 711 if (matterId == null) { |
| 712 throw new core.ArgumentError("Parameter matterId is required."); |
| 713 } |
| 714 if (holdId == null) { |
| 715 throw new core.ArgumentError("Parameter holdId is required."); |
| 716 } |
| 717 |
| 718 _url = 'v1/matters/' + commons.Escaper.ecapeVariable('$matterId') + '/holds/
' + commons.Escaper.ecapeVariable('$holdId'); |
| 719 |
| 720 var _response = _requester.request(_url, |
| 721 "PUT", |
| 722 body: _body, |
| 723 queryParams: _queryParams, |
| 724 uploadOptions: _uploadOptions, |
| 725 uploadMedia: _uploadMedia, |
| 726 downloadOptions: _downloadOptions); |
| 727 return _response.then((data) => new Hold.fromJson(data)); |
| 728 } |
| 729 |
| 730 } |
| 731 |
| 732 |
| 733 class MattersHoldsAccountsResourceApi { |
| 734 final commons.ApiRequester _requester; |
| 735 |
| 736 MattersHoldsAccountsResourceApi(commons.ApiRequester client) : |
| 737 _requester = client; |
| 738 |
| 739 /** |
| 740 * Adds a HeldAccount to a hold. Accounts can only be added to a hold that |
| 741 * has no held_org_unit set. Attempting to add an account to an OU-based |
| 742 * hold will result in an error. |
| 743 * |
| 744 * [request] - The metadata request object. |
| 745 * |
| 746 * Request parameters: |
| 747 * |
| 748 * [matterId] - The matter ID. |
| 749 * |
| 750 * [holdId] - The hold ID. |
| 751 * |
| 752 * Completes with a [HeldAccount]. |
| 753 * |
| 754 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 755 * error. |
| 756 * |
| 757 * If the used [http.Client] completes with an error when making a REST call, |
| 758 * this method will complete with the same error. |
| 759 */ |
| 760 async.Future<HeldAccount> create(HeldAccount request, core.String matterId, co
re.String holdId) { |
| 761 var _url = null; |
| 762 var _queryParams = new core.Map(); |
| 763 var _uploadMedia = null; |
| 764 var _uploadOptions = null; |
| 765 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 766 var _body = null; |
| 767 |
| 768 if (request != null) { |
| 769 _body = convert.JSON.encode((request).toJson()); |
| 770 } |
| 771 if (matterId == null) { |
| 772 throw new core.ArgumentError("Parameter matterId is required."); |
| 773 } |
| 774 if (holdId == null) { |
| 775 throw new core.ArgumentError("Parameter holdId is required."); |
| 776 } |
| 777 |
| 778 _url = 'v1/matters/' + commons.Escaper.ecapeVariable('$matterId') + '/holds/
' + commons.Escaper.ecapeVariable('$holdId') + '/accounts'; |
| 779 |
| 780 var _response = _requester.request(_url, |
| 781 "POST", |
| 782 body: _body, |
| 783 queryParams: _queryParams, |
| 784 uploadOptions: _uploadOptions, |
| 785 uploadMedia: _uploadMedia, |
| 786 downloadOptions: _downloadOptions); |
| 787 return _response.then((data) => new HeldAccount.fromJson(data)); |
| 788 } |
| 789 |
| 790 /** |
| 791 * Removes a HeldAccount from a hold. If this request leaves the hold with |
| 792 * no held accounts, the hold will not apply to any accounts. |
| 793 * |
| 794 * Request parameters: |
| 795 * |
| 796 * [matterId] - The matter ID. |
| 797 * |
| 798 * [holdId] - The hold ID. |
| 799 * |
| 800 * [accountId] - The ID of the account to remove from the hold. |
| 801 * |
| 802 * Completes with a [Empty]. |
| 803 * |
| 804 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 805 * error. |
| 806 * |
| 807 * If the used [http.Client] completes with an error when making a REST call, |
| 808 * this method will complete with the same error. |
| 809 */ |
| 810 async.Future<Empty> delete(core.String matterId, core.String holdId, core.Stri
ng accountId) { |
| 811 var _url = null; |
| 812 var _queryParams = new core.Map(); |
| 813 var _uploadMedia = null; |
| 814 var _uploadOptions = null; |
| 815 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 816 var _body = null; |
| 817 |
| 818 if (matterId == null) { |
| 819 throw new core.ArgumentError("Parameter matterId is required."); |
| 820 } |
| 821 if (holdId == null) { |
| 822 throw new core.ArgumentError("Parameter holdId is required."); |
| 823 } |
| 824 if (accountId == null) { |
| 825 throw new core.ArgumentError("Parameter accountId is required."); |
| 826 } |
| 827 |
| 828 _url = 'v1/matters/' + commons.Escaper.ecapeVariable('$matterId') + '/holds/
' + commons.Escaper.ecapeVariable('$holdId') + '/accounts/' + commons.Escaper.ec
apeVariable('$accountId'); |
| 829 |
| 830 var _response = _requester.request(_url, |
| 831 "DELETE", |
| 832 body: _body, |
| 833 queryParams: _queryParams, |
| 834 uploadOptions: _uploadOptions, |
| 835 uploadMedia: _uploadMedia, |
| 836 downloadOptions: _downloadOptions); |
| 837 return _response.then((data) => new Empty.fromJson(data)); |
| 838 } |
| 839 |
| 840 /** |
| 841 * Lists HeldAccounts for a hold. This will only list individually specified |
| 842 * held accounts. If the hold is on an OU, then use the |
| 843 * <ahref="https://developers.google.com/admin-sdk/">Admin SDK</a> |
| 844 * to enumerate its members. |
| 845 * |
| 846 * Request parameters: |
| 847 * |
| 848 * [matterId] - The matter ID. |
| 849 * |
| 850 * [holdId] - The hold ID. |
| 851 * |
| 852 * Completes with a [ListHeldAccountsResponse]. |
| 853 * |
| 854 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 855 * error. |
| 856 * |
| 857 * If the used [http.Client] completes with an error when making a REST call, |
| 858 * this method will complete with the same error. |
| 859 */ |
| 860 async.Future<ListHeldAccountsResponse> list(core.String matterId, core.String
holdId) { |
| 861 var _url = null; |
| 862 var _queryParams = new core.Map(); |
| 863 var _uploadMedia = null; |
| 864 var _uploadOptions = null; |
| 865 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 866 var _body = null; |
| 867 |
| 868 if (matterId == null) { |
| 869 throw new core.ArgumentError("Parameter matterId is required."); |
| 870 } |
| 871 if (holdId == null) { |
| 872 throw new core.ArgumentError("Parameter holdId is required."); |
| 873 } |
| 874 |
| 875 _url = 'v1/matters/' + commons.Escaper.ecapeVariable('$matterId') + '/holds/
' + commons.Escaper.ecapeVariable('$holdId') + '/accounts'; |
| 876 |
| 877 var _response = _requester.request(_url, |
| 878 "GET", |
| 879 body: _body, |
| 880 queryParams: _queryParams, |
| 881 uploadOptions: _uploadOptions, |
| 882 uploadMedia: _uploadMedia, |
| 883 downloadOptions: _downloadOptions); |
| 884 return _response.then((data) => new ListHeldAccountsResponse.fromJson(data))
; |
| 885 } |
| 886 |
| 887 } |
| 888 |
| 889 |
| 890 |
| 891 /** |
| 892 * Add an account with the permission specified. The role cannot be owner. |
| 893 * If an account already has a role in the matter, it will be |
| 894 * overwritten. |
| 895 */ |
| 896 class AddMatterPermissionsRequest { |
| 897 /** |
| 898 * Only relevant if send_emails is true. |
| 899 * True to CC requestor in the email message. |
| 900 * False to not CC requestor. |
| 901 */ |
| 902 core.bool ccMe; |
| 903 /** The MatterPermission to add. */ |
| 904 MatterPermission matterPermission; |
| 905 /** |
| 906 * True to send notification email to the added account. |
| 907 * False to not send notification email. |
| 908 */ |
| 909 core.bool sendEmails; |
| 910 |
| 911 AddMatterPermissionsRequest(); |
| 912 |
| 913 AddMatterPermissionsRequest.fromJson(core.Map _json) { |
| 914 if (_json.containsKey("ccMe")) { |
| 915 ccMe = _json["ccMe"]; |
| 916 } |
| 917 if (_json.containsKey("matterPermission")) { |
| 918 matterPermission = new MatterPermission.fromJson(_json["matterPermission"]
); |
| 919 } |
| 920 if (_json.containsKey("sendEmails")) { |
| 921 sendEmails = _json["sendEmails"]; |
| 922 } |
| 923 } |
| 924 |
| 925 core.Map<core.String, core.Object> toJson() { |
| 926 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 927 if (ccMe != null) { |
| 928 _json["ccMe"] = ccMe; |
| 929 } |
| 930 if (matterPermission != null) { |
| 931 _json["matterPermission"] = (matterPermission).toJson(); |
| 932 } |
| 933 if (sendEmails != null) { |
| 934 _json["sendEmails"] = sendEmails; |
| 935 } |
| 936 return _json; |
| 937 } |
| 938 } |
| 939 |
| 940 /** Close a matter by ID. */ |
| 941 class CloseMatterRequest { |
| 942 |
| 943 CloseMatterRequest(); |
| 944 |
| 945 CloseMatterRequest.fromJson(core.Map _json) { |
| 946 } |
| 947 |
| 948 core.Map<core.String, core.Object> toJson() { |
| 949 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 950 return _json; |
| 951 } |
| 952 } |
| 953 |
| 954 /** Response to a CloseMatterRequest. */ |
| 955 class CloseMatterResponse { |
| 956 /** The updated matter, with state CLOSED. */ |
| 957 Matter matter; |
| 958 |
| 959 CloseMatterResponse(); |
| 960 |
| 961 CloseMatterResponse.fromJson(core.Map _json) { |
| 962 if (_json.containsKey("matter")) { |
| 963 matter = new Matter.fromJson(_json["matter"]); |
| 964 } |
| 965 } |
| 966 |
| 967 core.Map<core.String, core.Object> toJson() { |
| 968 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 969 if (matter != null) { |
| 970 _json["matter"] = (matter).toJson(); |
| 971 } |
| 972 return _json; |
| 973 } |
| 974 } |
| 975 |
| 976 /** Corpus specific queries. */ |
| 977 class CorpusQuery { |
| 978 /** Details pertaining to Drive holds. If set, corpus must be Drive. */ |
| 979 HeldDriveQuery driveQuery; |
| 980 /** Details pertaining to Groups holds. If set, corpus must be Groups. */ |
| 981 HeldGroupsQuery groupsQuery; |
| 982 /** Details pertaining to mail holds. If set, corpus must be mail. */ |
| 983 HeldMailQuery mailQuery; |
| 984 |
| 985 CorpusQuery(); |
| 986 |
| 987 CorpusQuery.fromJson(core.Map _json) { |
| 988 if (_json.containsKey("driveQuery")) { |
| 989 driveQuery = new HeldDriveQuery.fromJson(_json["driveQuery"]); |
| 990 } |
| 991 if (_json.containsKey("groupsQuery")) { |
| 992 groupsQuery = new HeldGroupsQuery.fromJson(_json["groupsQuery"]); |
| 993 } |
| 994 if (_json.containsKey("mailQuery")) { |
| 995 mailQuery = new HeldMailQuery.fromJson(_json["mailQuery"]); |
| 996 } |
| 997 } |
| 998 |
| 999 core.Map<core.String, core.Object> toJson() { |
| 1000 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 1001 if (driveQuery != null) { |
| 1002 _json["driveQuery"] = (driveQuery).toJson(); |
| 1003 } |
| 1004 if (groupsQuery != null) { |
| 1005 _json["groupsQuery"] = (groupsQuery).toJson(); |
| 1006 } |
| 1007 if (mailQuery != null) { |
| 1008 _json["mailQuery"] = (mailQuery).toJson(); |
| 1009 } |
| 1010 return _json; |
| 1011 } |
| 1012 } |
| 1013 |
| 1014 /** |
| 1015 * A generic empty message that you can re-use to avoid defining duplicated |
| 1016 * empty messages in your APIs. A typical example is to use it as the request |
| 1017 * or the response type of an API method. For instance: |
| 1018 * |
| 1019 * service Foo { |
| 1020 * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); |
| 1021 * } |
| 1022 * |
| 1023 * The JSON representation for `Empty` is empty JSON object `{}`. |
| 1024 */ |
| 1025 class Empty { |
| 1026 |
| 1027 Empty(); |
| 1028 |
| 1029 Empty.fromJson(core.Map _json) { |
| 1030 } |
| 1031 |
| 1032 core.Map<core.String, core.Object> toJson() { |
| 1033 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 1034 return _json; |
| 1035 } |
| 1036 } |
| 1037 |
| 1038 /** |
| 1039 * An account being held in a particular hold. This structure is immutable. |
| 1040 * This can be either a single user or a google group, depending on the corpus. |
| 1041 */ |
| 1042 class HeldAccount { |
| 1043 /** |
| 1044 * The account's ID as provided by the <a |
| 1045 * href="https://developers.google.com/admin-sdk/">Admin SDK</a>. |
| 1046 */ |
| 1047 core.String accountId; |
| 1048 /** When the account was put on hold. */ |
| 1049 core.String holdTime; |
| 1050 |
| 1051 HeldAccount(); |
| 1052 |
| 1053 HeldAccount.fromJson(core.Map _json) { |
| 1054 if (_json.containsKey("accountId")) { |
| 1055 accountId = _json["accountId"]; |
| 1056 } |
| 1057 if (_json.containsKey("holdTime")) { |
| 1058 holdTime = _json["holdTime"]; |
| 1059 } |
| 1060 } |
| 1061 |
| 1062 core.Map<core.String, core.Object> toJson() { |
| 1063 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 1064 if (accountId != null) { |
| 1065 _json["accountId"] = accountId; |
| 1066 } |
| 1067 if (holdTime != null) { |
| 1068 _json["holdTime"] = holdTime; |
| 1069 } |
| 1070 return _json; |
| 1071 } |
| 1072 } |
| 1073 |
| 1074 /** Query options for drive holds. */ |
| 1075 class HeldDriveQuery { |
| 1076 /** If true, include files in Team Drives in the hold. */ |
| 1077 core.bool includeTeamDriveFiles; |
| 1078 |
| 1079 HeldDriveQuery(); |
| 1080 |
| 1081 HeldDriveQuery.fromJson(core.Map _json) { |
| 1082 if (_json.containsKey("includeTeamDriveFiles")) { |
| 1083 includeTeamDriveFiles = _json["includeTeamDriveFiles"]; |
| 1084 } |
| 1085 } |
| 1086 |
| 1087 core.Map<core.String, core.Object> toJson() { |
| 1088 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 1089 if (includeTeamDriveFiles != null) { |
| 1090 _json["includeTeamDriveFiles"] = includeTeamDriveFiles; |
| 1091 } |
| 1092 return _json; |
| 1093 } |
| 1094 } |
| 1095 |
| 1096 /** Query options for group holds. */ |
| 1097 class HeldGroupsQuery { |
| 1098 /** |
| 1099 * The end date range for the search query. These timestamps are in GMT and |
| 1100 * rounded down to the start of the given date. |
| 1101 */ |
| 1102 core.String endTime; |
| 1103 /** |
| 1104 * The start date range for the search query. These timestamps are in GMT and |
| 1105 * rounded down to the start of the given date. |
| 1106 */ |
| 1107 core.String startTime; |
| 1108 /** The search terms for the hold. */ |
| 1109 core.String terms; |
| 1110 |
| 1111 HeldGroupsQuery(); |
| 1112 |
| 1113 HeldGroupsQuery.fromJson(core.Map _json) { |
| 1114 if (_json.containsKey("endTime")) { |
| 1115 endTime = _json["endTime"]; |
| 1116 } |
| 1117 if (_json.containsKey("startTime")) { |
| 1118 startTime = _json["startTime"]; |
| 1119 } |
| 1120 if (_json.containsKey("terms")) { |
| 1121 terms = _json["terms"]; |
| 1122 } |
| 1123 } |
| 1124 |
| 1125 core.Map<core.String, core.Object> toJson() { |
| 1126 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 1127 if (endTime != null) { |
| 1128 _json["endTime"] = endTime; |
| 1129 } |
| 1130 if (startTime != null) { |
| 1131 _json["startTime"] = startTime; |
| 1132 } |
| 1133 if (terms != null) { |
| 1134 _json["terms"] = terms; |
| 1135 } |
| 1136 return _json; |
| 1137 } |
| 1138 } |
| 1139 |
| 1140 /** Query options for mail holds. */ |
| 1141 class HeldMailQuery { |
| 1142 /** |
| 1143 * The end date range for the search query. These timestamps are in GMT and |
| 1144 * rounded down to the start of the given date. |
| 1145 */ |
| 1146 core.String endTime; |
| 1147 /** |
| 1148 * The start date range for the search query. These timestamps are in GMT and |
| 1149 * rounded down to the start of the given date. |
| 1150 */ |
| 1151 core.String startTime; |
| 1152 /** The search terms for the hold. */ |
| 1153 core.String terms; |
| 1154 |
| 1155 HeldMailQuery(); |
| 1156 |
| 1157 HeldMailQuery.fromJson(core.Map _json) { |
| 1158 if (_json.containsKey("endTime")) { |
| 1159 endTime = _json["endTime"]; |
| 1160 } |
| 1161 if (_json.containsKey("startTime")) { |
| 1162 startTime = _json["startTime"]; |
| 1163 } |
| 1164 if (_json.containsKey("terms")) { |
| 1165 terms = _json["terms"]; |
| 1166 } |
| 1167 } |
| 1168 |
| 1169 core.Map<core.String, core.Object> toJson() { |
| 1170 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 1171 if (endTime != null) { |
| 1172 _json["endTime"] = endTime; |
| 1173 } |
| 1174 if (startTime != null) { |
| 1175 _json["startTime"] = startTime; |
| 1176 } |
| 1177 if (terms != null) { |
| 1178 _json["terms"] = terms; |
| 1179 } |
| 1180 return _json; |
| 1181 } |
| 1182 } |
| 1183 |
| 1184 /** |
| 1185 * A organizational unit being held in a particular hold. |
| 1186 * This structure is immutable. |
| 1187 */ |
| 1188 class HeldOrgUnit { |
| 1189 /** When the org unit was put on hold. This property is immutable. */ |
| 1190 core.String holdTime; |
| 1191 /** The org unit's immutable ID as provided by the admin SDK. */ |
| 1192 core.String orgUnitId; |
| 1193 |
| 1194 HeldOrgUnit(); |
| 1195 |
| 1196 HeldOrgUnit.fromJson(core.Map _json) { |
| 1197 if (_json.containsKey("holdTime")) { |
| 1198 holdTime = _json["holdTime"]; |
| 1199 } |
| 1200 if (_json.containsKey("orgUnitId")) { |
| 1201 orgUnitId = _json["orgUnitId"]; |
| 1202 } |
| 1203 } |
| 1204 |
| 1205 core.Map<core.String, core.Object> toJson() { |
| 1206 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 1207 if (holdTime != null) { |
| 1208 _json["holdTime"] = holdTime; |
| 1209 } |
| 1210 if (orgUnitId != null) { |
| 1211 _json["orgUnitId"] = orgUnitId; |
| 1212 } |
| 1213 return _json; |
| 1214 } |
| 1215 } |
| 1216 |
| 1217 /** |
| 1218 * Represents a hold within Vault. A hold restricts purging of |
| 1219 * artifacts based on the combination of the query and accounts restrictions. |
| 1220 * A hold can be configured to either apply to an explicitly configured set |
| 1221 * of accounts, or can be applied to all members of an organizational unit. |
| 1222 */ |
| 1223 class Hold { |
| 1224 /** |
| 1225 * If set, the hold applies to the enumerated accounts and org_unit must be |
| 1226 * empty. |
| 1227 */ |
| 1228 core.List<HeldAccount> accounts; |
| 1229 /** |
| 1230 * The corpus to be searched. |
| 1231 * Possible string values are: |
| 1232 * - "CORPUS_TYPE_UNSPECIFIED" : No corpus specified. |
| 1233 * - "DRIVE" : Drive. |
| 1234 * - "MAIL" : Mail. |
| 1235 * - "GROUPS" : Groups. |
| 1236 */ |
| 1237 core.String corpus; |
| 1238 /** The unique immutable ID of the hold. Assigned during creation. */ |
| 1239 core.String holdId; |
| 1240 /** The name of the hold. */ |
| 1241 core.String name; |
| 1242 /** |
| 1243 * If set, the hold applies to all members of the organizational unit and |
| 1244 * accounts must be empty. This property is mutable. For groups holds, |
| 1245 * set the accounts field. |
| 1246 */ |
| 1247 HeldOrgUnit orgUnit; |
| 1248 /** |
| 1249 * The corpus-specific query. If set, the corpusQuery must match corpus |
| 1250 * type. |
| 1251 */ |
| 1252 CorpusQuery query; |
| 1253 /** The last time this hold was modified. */ |
| 1254 core.String updateTime; |
| 1255 |
| 1256 Hold(); |
| 1257 |
| 1258 Hold.fromJson(core.Map _json) { |
| 1259 if (_json.containsKey("accounts")) { |
| 1260 accounts = _json["accounts"].map((value) => new HeldAccount.fromJson(value
)).toList(); |
| 1261 } |
| 1262 if (_json.containsKey("corpus")) { |
| 1263 corpus = _json["corpus"]; |
| 1264 } |
| 1265 if (_json.containsKey("holdId")) { |
| 1266 holdId = _json["holdId"]; |
| 1267 } |
| 1268 if (_json.containsKey("name")) { |
| 1269 name = _json["name"]; |
| 1270 } |
| 1271 if (_json.containsKey("orgUnit")) { |
| 1272 orgUnit = new HeldOrgUnit.fromJson(_json["orgUnit"]); |
| 1273 } |
| 1274 if (_json.containsKey("query")) { |
| 1275 query = new CorpusQuery.fromJson(_json["query"]); |
| 1276 } |
| 1277 if (_json.containsKey("updateTime")) { |
| 1278 updateTime = _json["updateTime"]; |
| 1279 } |
| 1280 } |
| 1281 |
| 1282 core.Map<core.String, core.Object> toJson() { |
| 1283 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 1284 if (accounts != null) { |
| 1285 _json["accounts"] = accounts.map((value) => (value).toJson()).toList(); |
| 1286 } |
| 1287 if (corpus != null) { |
| 1288 _json["corpus"] = corpus; |
| 1289 } |
| 1290 if (holdId != null) { |
| 1291 _json["holdId"] = holdId; |
| 1292 } |
| 1293 if (name != null) { |
| 1294 _json["name"] = name; |
| 1295 } |
| 1296 if (orgUnit != null) { |
| 1297 _json["orgUnit"] = (orgUnit).toJson(); |
| 1298 } |
| 1299 if (query != null) { |
| 1300 _json["query"] = (query).toJson(); |
| 1301 } |
| 1302 if (updateTime != null) { |
| 1303 _json["updateTime"] = updateTime; |
| 1304 } |
| 1305 return _json; |
| 1306 } |
| 1307 } |
| 1308 |
| 1309 /** Returns a list of held accounts for a hold. */ |
| 1310 class ListHeldAccountsResponse { |
| 1311 /** The held accounts on a hold. */ |
| 1312 core.List<HeldAccount> accounts; |
| 1313 |
| 1314 ListHeldAccountsResponse(); |
| 1315 |
| 1316 ListHeldAccountsResponse.fromJson(core.Map _json) { |
| 1317 if (_json.containsKey("accounts")) { |
| 1318 accounts = _json["accounts"].map((value) => new HeldAccount.fromJson(value
)).toList(); |
| 1319 } |
| 1320 } |
| 1321 |
| 1322 core.Map<core.String, core.Object> toJson() { |
| 1323 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 1324 if (accounts != null) { |
| 1325 _json["accounts"] = accounts.map((value) => (value).toJson()).toList(); |
| 1326 } |
| 1327 return _json; |
| 1328 } |
| 1329 } |
| 1330 |
| 1331 /** The holds for a matter. */ |
| 1332 class ListHoldsResponse { |
| 1333 /** The list of holds. */ |
| 1334 core.List<Hold> holds; |
| 1335 /** |
| 1336 * Page token to retrieve the next page of results in the list. |
| 1337 * If this is empty, then there are no more holds to list. |
| 1338 */ |
| 1339 core.String nextPageToken; |
| 1340 |
| 1341 ListHoldsResponse(); |
| 1342 |
| 1343 ListHoldsResponse.fromJson(core.Map _json) { |
| 1344 if (_json.containsKey("holds")) { |
| 1345 holds = _json["holds"].map((value) => new Hold.fromJson(value)).toList(); |
| 1346 } |
| 1347 if (_json.containsKey("nextPageToken")) { |
| 1348 nextPageToken = _json["nextPageToken"]; |
| 1349 } |
| 1350 } |
| 1351 |
| 1352 core.Map<core.String, core.Object> toJson() { |
| 1353 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 1354 if (holds != null) { |
| 1355 _json["holds"] = holds.map((value) => (value).toJson()).toList(); |
| 1356 } |
| 1357 if (nextPageToken != null) { |
| 1358 _json["nextPageToken"] = nextPageToken; |
| 1359 } |
| 1360 return _json; |
| 1361 } |
| 1362 } |
| 1363 |
| 1364 /** Provides the list of matters. */ |
| 1365 class ListMattersResponse { |
| 1366 /** List of matters. */ |
| 1367 core.List<Matter> matters; |
| 1368 /** Page token to retrieve the next page of results in the list. */ |
| 1369 core.String nextPageToken; |
| 1370 |
| 1371 ListMattersResponse(); |
| 1372 |
| 1373 ListMattersResponse.fromJson(core.Map _json) { |
| 1374 if (_json.containsKey("matters")) { |
| 1375 matters = _json["matters"].map((value) => new Matter.fromJson(value)).toLi
st(); |
| 1376 } |
| 1377 if (_json.containsKey("nextPageToken")) { |
| 1378 nextPageToken = _json["nextPageToken"]; |
| 1379 } |
| 1380 } |
| 1381 |
| 1382 core.Map<core.String, core.Object> toJson() { |
| 1383 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 1384 if (matters != null) { |
| 1385 _json["matters"] = matters.map((value) => (value).toJson()).toList(); |
| 1386 } |
| 1387 if (nextPageToken != null) { |
| 1388 _json["nextPageToken"] = nextPageToken; |
| 1389 } |
| 1390 return _json; |
| 1391 } |
| 1392 } |
| 1393 |
| 1394 /** Represents a matter. */ |
| 1395 class Matter { |
| 1396 /** The description of the matter. */ |
| 1397 core.String description; |
| 1398 /** |
| 1399 * The matter ID which is generated by the server. |
| 1400 * Should be blank when creating a new matter. |
| 1401 */ |
| 1402 core.String matterId; |
| 1403 /** |
| 1404 * List of users and access to the matter. Currently there is no programmer |
| 1405 * defined limit on the number of permissions a matter can have. |
| 1406 */ |
| 1407 core.List<MatterPermission> matterPermissions; |
| 1408 /** The name of the matter. */ |
| 1409 core.String name; |
| 1410 /** |
| 1411 * The state of the matter. |
| 1412 * Possible string values are: |
| 1413 * - "STATE_UNSPECIFIED" : The matter has no specified state. |
| 1414 * - "OPEN" : This matter is open. |
| 1415 * - "CLOSED" : This matter is closed. |
| 1416 * - "DELETED" : This matter is deleted. |
| 1417 */ |
| 1418 core.String state; |
| 1419 |
| 1420 Matter(); |
| 1421 |
| 1422 Matter.fromJson(core.Map _json) { |
| 1423 if (_json.containsKey("description")) { |
| 1424 description = _json["description"]; |
| 1425 } |
| 1426 if (_json.containsKey("matterId")) { |
| 1427 matterId = _json["matterId"]; |
| 1428 } |
| 1429 if (_json.containsKey("matterPermissions")) { |
| 1430 matterPermissions = _json["matterPermissions"].map((value) => new MatterPe
rmission.fromJson(value)).toList(); |
| 1431 } |
| 1432 if (_json.containsKey("name")) { |
| 1433 name = _json["name"]; |
| 1434 } |
| 1435 if (_json.containsKey("state")) { |
| 1436 state = _json["state"]; |
| 1437 } |
| 1438 } |
| 1439 |
| 1440 core.Map<core.String, core.Object> toJson() { |
| 1441 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 1442 if (description != null) { |
| 1443 _json["description"] = description; |
| 1444 } |
| 1445 if (matterId != null) { |
| 1446 _json["matterId"] = matterId; |
| 1447 } |
| 1448 if (matterPermissions != null) { |
| 1449 _json["matterPermissions"] = matterPermissions.map((value) => (value).toJs
on()).toList(); |
| 1450 } |
| 1451 if (name != null) { |
| 1452 _json["name"] = name; |
| 1453 } |
| 1454 if (state != null) { |
| 1455 _json["state"] = state; |
| 1456 } |
| 1457 return _json; |
| 1458 } |
| 1459 } |
| 1460 |
| 1461 /** |
| 1462 * Currently each matter only has one owner, and all others are collaborators. |
| 1463 * When an account is purged, its corresponding MatterPermission resources |
| 1464 * cease to exist. |
| 1465 */ |
| 1466 class MatterPermission { |
| 1467 /** |
| 1468 * The account id, as provided by <a |
| 1469 * href="https://developers.google.com/admin-sdk/">Admin SDK</a>. |
| 1470 */ |
| 1471 core.String accountId; |
| 1472 /** |
| 1473 * The user's role in this matter. |
| 1474 * Possible string values are: |
| 1475 * - "ROLE_UNSPECIFIED" : No role assigned. |
| 1476 * - "COLLABORATOR" : A collaborator to the matter. |
| 1477 * - "OWNER" : The owner of the matter. |
| 1478 */ |
| 1479 core.String role; |
| 1480 |
| 1481 MatterPermission(); |
| 1482 |
| 1483 MatterPermission.fromJson(core.Map _json) { |
| 1484 if (_json.containsKey("accountId")) { |
| 1485 accountId = _json["accountId"]; |
| 1486 } |
| 1487 if (_json.containsKey("role")) { |
| 1488 role = _json["role"]; |
| 1489 } |
| 1490 } |
| 1491 |
| 1492 core.Map<core.String, core.Object> toJson() { |
| 1493 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 1494 if (accountId != null) { |
| 1495 _json["accountId"] = accountId; |
| 1496 } |
| 1497 if (role != null) { |
| 1498 _json["role"] = role; |
| 1499 } |
| 1500 return _json; |
| 1501 } |
| 1502 } |
| 1503 |
| 1504 /** Remove an account as a matter collaborator. */ |
| 1505 class RemoveMatterPermissionsRequest { |
| 1506 /** The account ID. */ |
| 1507 core.String accountId; |
| 1508 |
| 1509 RemoveMatterPermissionsRequest(); |
| 1510 |
| 1511 RemoveMatterPermissionsRequest.fromJson(core.Map _json) { |
| 1512 if (_json.containsKey("accountId")) { |
| 1513 accountId = _json["accountId"]; |
| 1514 } |
| 1515 } |
| 1516 |
| 1517 core.Map<core.String, core.Object> toJson() { |
| 1518 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 1519 if (accountId != null) { |
| 1520 _json["accountId"] = accountId; |
| 1521 } |
| 1522 return _json; |
| 1523 } |
| 1524 } |
| 1525 |
| 1526 /** Reopen a matter by ID. */ |
| 1527 class ReopenMatterRequest { |
| 1528 |
| 1529 ReopenMatterRequest(); |
| 1530 |
| 1531 ReopenMatterRequest.fromJson(core.Map _json) { |
| 1532 } |
| 1533 |
| 1534 core.Map<core.String, core.Object> toJson() { |
| 1535 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 1536 return _json; |
| 1537 } |
| 1538 } |
| 1539 |
| 1540 /** Response to a ReopenMatterRequest. */ |
| 1541 class ReopenMatterResponse { |
| 1542 /** The updated matter, with state OPEN. */ |
| 1543 Matter matter; |
| 1544 |
| 1545 ReopenMatterResponse(); |
| 1546 |
| 1547 ReopenMatterResponse.fromJson(core.Map _json) { |
| 1548 if (_json.containsKey("matter")) { |
| 1549 matter = new Matter.fromJson(_json["matter"]); |
| 1550 } |
| 1551 } |
| 1552 |
| 1553 core.Map<core.String, core.Object> toJson() { |
| 1554 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 1555 if (matter != null) { |
| 1556 _json["matter"] = (matter).toJson(); |
| 1557 } |
| 1558 return _json; |
| 1559 } |
| 1560 } |
| 1561 |
| 1562 /** Undelete a matter by ID. */ |
| 1563 class UndeleteMatterRequest { |
| 1564 |
| 1565 UndeleteMatterRequest(); |
| 1566 |
| 1567 UndeleteMatterRequest.fromJson(core.Map _json) { |
| 1568 } |
| 1569 |
| 1570 core.Map<core.String, core.Object> toJson() { |
| 1571 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 1572 return _json; |
| 1573 } |
| 1574 } |
OLD | NEW |