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