google-apis-vault_v1 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1221 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'google/apis/core/base_service'
16
+ require 'google/apis/core/json_representation'
17
+ require 'google/apis/core/hashable'
18
+ require 'google/apis/errors'
19
+
20
+ module Google
21
+ module Apis
22
+ module VaultV1
23
+ # G Suite Vault API
24
+ #
25
+ # Archiving and eDiscovery for G Suite.
26
+ #
27
+ # @example
28
+ # require 'google/apis/vault_v1'
29
+ #
30
+ # Vault = Google::Apis::VaultV1 # Alias the module
31
+ # service = Vault::VaultService.new
32
+ #
33
+ # @see https://developers.google.com/vault
34
+ class VaultService < Google::Apis::Core::BaseService
35
+ # @return [String]
36
+ # API key. Your API key identifies your project and provides you with API access,
37
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
38
+ attr_accessor :key
39
+
40
+ # @return [String]
41
+ # Available to use for quota purposes for server-side applications. Can be any
42
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
43
+ attr_accessor :quota_user
44
+
45
+ def initialize
46
+ super('https://vault.googleapis.com/', '',
47
+ client_name: 'google-apis-vault_v1',
48
+ client_version: Google::Apis::VaultV1::GEM_VERSION)
49
+ @batch_path = 'batch'
50
+ end
51
+
52
+ # Adds an account as a matter collaborator.
53
+ # @param [String] matter_id
54
+ # The matter ID.
55
+ # @param [Google::Apis::VaultV1::AddMatterPermissionsRequest] add_matter_permissions_request_object
56
+ # @param [String] fields
57
+ # Selector specifying which fields to include in a partial response.
58
+ # @param [String] quota_user
59
+ # Available to use for quota purposes for server-side applications. Can be any
60
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
61
+ # @param [Google::Apis::RequestOptions] options
62
+ # Request-specific options
63
+ #
64
+ # @yield [result, err] Result & error if block supplied
65
+ # @yieldparam result [Google::Apis::VaultV1::MatterPermission] parsed result object
66
+ # @yieldparam err [StandardError] error object if request failed
67
+ #
68
+ # @return [Google::Apis::VaultV1::MatterPermission]
69
+ #
70
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
71
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
72
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
73
+ def add_matter_permissions(matter_id, add_matter_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
74
+ command = make_simple_command(:post, 'v1/matters/{matterId}:addPermissions', options)
75
+ command.request_representation = Google::Apis::VaultV1::AddMatterPermissionsRequest::Representation
76
+ command.request_object = add_matter_permissions_request_object
77
+ command.response_representation = Google::Apis::VaultV1::MatterPermission::Representation
78
+ command.response_class = Google::Apis::VaultV1::MatterPermission
79
+ command.params['matterId'] = matter_id unless matter_id.nil?
80
+ command.query['fields'] = fields unless fields.nil?
81
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
82
+ execute_or_queue_command(command, &block)
83
+ end
84
+
85
+ # Closes the specified matter. Returns matter with updated state.
86
+ # @param [String] matter_id
87
+ # The matter ID.
88
+ # @param [Google::Apis::VaultV1::CloseMatterRequest] close_matter_request_object
89
+ # @param [String] fields
90
+ # Selector specifying which fields to include in a partial response.
91
+ # @param [String] quota_user
92
+ # Available to use for quota purposes for server-side applications. Can be any
93
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
94
+ # @param [Google::Apis::RequestOptions] options
95
+ # Request-specific options
96
+ #
97
+ # @yield [result, err] Result & error if block supplied
98
+ # @yieldparam result [Google::Apis::VaultV1::CloseMatterResponse] parsed result object
99
+ # @yieldparam err [StandardError] error object if request failed
100
+ #
101
+ # @return [Google::Apis::VaultV1::CloseMatterResponse]
102
+ #
103
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
104
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
105
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
106
+ def close_matter(matter_id, close_matter_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
107
+ command = make_simple_command(:post, 'v1/matters/{matterId}:close', options)
108
+ command.request_representation = Google::Apis::VaultV1::CloseMatterRequest::Representation
109
+ command.request_object = close_matter_request_object
110
+ command.response_representation = Google::Apis::VaultV1::CloseMatterResponse::Representation
111
+ command.response_class = Google::Apis::VaultV1::CloseMatterResponse
112
+ command.params['matterId'] = matter_id unless matter_id.nil?
113
+ command.query['fields'] = fields unless fields.nil?
114
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
115
+ execute_or_queue_command(command, &block)
116
+ end
117
+
118
+ # Counts the artifacts within the context of a matter and returns a detailed
119
+ # breakdown of metrics.
120
+ # @param [String] matter_id
121
+ # The matter ID.
122
+ # @param [Google::Apis::VaultV1::CountArtifactsRequest] count_artifacts_request_object
123
+ # @param [String] fields
124
+ # Selector specifying which fields to include in a partial response.
125
+ # @param [String] quota_user
126
+ # Available to use for quota purposes for server-side applications. Can be any
127
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
128
+ # @param [Google::Apis::RequestOptions] options
129
+ # Request-specific options
130
+ #
131
+ # @yield [result, err] Result & error if block supplied
132
+ # @yieldparam result [Google::Apis::VaultV1::Operation] parsed result object
133
+ # @yieldparam err [StandardError] error object if request failed
134
+ #
135
+ # @return [Google::Apis::VaultV1::Operation]
136
+ #
137
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
138
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
139
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
140
+ def count_matter_artifacts(matter_id, count_artifacts_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
141
+ command = make_simple_command(:post, 'v1/matters/{matterId}:count', options)
142
+ command.request_representation = Google::Apis::VaultV1::CountArtifactsRequest::Representation
143
+ command.request_object = count_artifacts_request_object
144
+ command.response_representation = Google::Apis::VaultV1::Operation::Representation
145
+ command.response_class = Google::Apis::VaultV1::Operation
146
+ command.params['matterId'] = matter_id unless matter_id.nil?
147
+ command.query['fields'] = fields unless fields.nil?
148
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
149
+ execute_or_queue_command(command, &block)
150
+ end
151
+
152
+ # Creates a new matter with the given name and description. The initial state is
153
+ # open, and the owner is the method caller. Returns the created matter with
154
+ # default view.
155
+ # @param [Google::Apis::VaultV1::Matter] matter_object
156
+ # @param [String] fields
157
+ # Selector specifying which fields to include in a partial response.
158
+ # @param [String] quota_user
159
+ # Available to use for quota purposes for server-side applications. Can be any
160
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
161
+ # @param [Google::Apis::RequestOptions] options
162
+ # Request-specific options
163
+ #
164
+ # @yield [result, err] Result & error if block supplied
165
+ # @yieldparam result [Google::Apis::VaultV1::Matter] parsed result object
166
+ # @yieldparam err [StandardError] error object if request failed
167
+ #
168
+ # @return [Google::Apis::VaultV1::Matter]
169
+ #
170
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
171
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
172
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
173
+ def create_matter(matter_object = nil, fields: nil, quota_user: nil, options: nil, &block)
174
+ command = make_simple_command(:post, 'v1/matters', options)
175
+ command.request_representation = Google::Apis::VaultV1::Matter::Representation
176
+ command.request_object = matter_object
177
+ command.response_representation = Google::Apis::VaultV1::Matter::Representation
178
+ command.response_class = Google::Apis::VaultV1::Matter
179
+ command.query['fields'] = fields unless fields.nil?
180
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
181
+ execute_or_queue_command(command, &block)
182
+ end
183
+
184
+ # Deletes the specified matter. Returns matter with updated state.
185
+ # @param [String] matter_id
186
+ # The matter ID
187
+ # @param [String] fields
188
+ # Selector specifying which fields to include in a partial response.
189
+ # @param [String] quota_user
190
+ # Available to use for quota purposes for server-side applications. Can be any
191
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
192
+ # @param [Google::Apis::RequestOptions] options
193
+ # Request-specific options
194
+ #
195
+ # @yield [result, err] Result & error if block supplied
196
+ # @yieldparam result [Google::Apis::VaultV1::Matter] parsed result object
197
+ # @yieldparam err [StandardError] error object if request failed
198
+ #
199
+ # @return [Google::Apis::VaultV1::Matter]
200
+ #
201
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
202
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
203
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
204
+ def delete_matter(matter_id, fields: nil, quota_user: nil, options: nil, &block)
205
+ command = make_simple_command(:delete, 'v1/matters/{matterId}', options)
206
+ command.response_representation = Google::Apis::VaultV1::Matter::Representation
207
+ command.response_class = Google::Apis::VaultV1::Matter
208
+ command.params['matterId'] = matter_id unless matter_id.nil?
209
+ command.query['fields'] = fields unless fields.nil?
210
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
211
+ execute_or_queue_command(command, &block)
212
+ end
213
+
214
+ # Gets the specified matter.
215
+ # @param [String] matter_id
216
+ # The matter ID.
217
+ # @param [String] view
218
+ # Specifies which parts of the Matter to return in the response.
219
+ # @param [String] fields
220
+ # Selector specifying which fields to include in a partial response.
221
+ # @param [String] quota_user
222
+ # Available to use for quota purposes for server-side applications. Can be any
223
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
224
+ # @param [Google::Apis::RequestOptions] options
225
+ # Request-specific options
226
+ #
227
+ # @yield [result, err] Result & error if block supplied
228
+ # @yieldparam result [Google::Apis::VaultV1::Matter] parsed result object
229
+ # @yieldparam err [StandardError] error object if request failed
230
+ #
231
+ # @return [Google::Apis::VaultV1::Matter]
232
+ #
233
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
234
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
235
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
236
+ def get_matter(matter_id, view: nil, fields: nil, quota_user: nil, options: nil, &block)
237
+ command = make_simple_command(:get, 'v1/matters/{matterId}', options)
238
+ command.response_representation = Google::Apis::VaultV1::Matter::Representation
239
+ command.response_class = Google::Apis::VaultV1::Matter
240
+ command.params['matterId'] = matter_id unless matter_id.nil?
241
+ command.query['view'] = view unless view.nil?
242
+ command.query['fields'] = fields unless fields.nil?
243
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
244
+ execute_or_queue_command(command, &block)
245
+ end
246
+
247
+ # Lists matters the user has access to.
248
+ # @param [Fixnum] page_size
249
+ # The number of matters to return in the response. Default and maximum are 100.
250
+ # @param [String] page_token
251
+ # The pagination token as returned in the response.
252
+ # @param [String] state
253
+ # If set, list only matters with that specific state. The default is listing
254
+ # matters of all states.
255
+ # @param [String] view
256
+ # Specifies which parts of the matter to return in response.
257
+ # @param [String] fields
258
+ # Selector specifying which fields to include in a partial response.
259
+ # @param [String] quota_user
260
+ # Available to use for quota purposes for server-side applications. Can be any
261
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
262
+ # @param [Google::Apis::RequestOptions] options
263
+ # Request-specific options
264
+ #
265
+ # @yield [result, err] Result & error if block supplied
266
+ # @yieldparam result [Google::Apis::VaultV1::ListMattersResponse] parsed result object
267
+ # @yieldparam err [StandardError] error object if request failed
268
+ #
269
+ # @return [Google::Apis::VaultV1::ListMattersResponse]
270
+ #
271
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
272
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
273
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
274
+ def list_matters(page_size: nil, page_token: nil, state: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block)
275
+ command = make_simple_command(:get, 'v1/matters', options)
276
+ command.response_representation = Google::Apis::VaultV1::ListMattersResponse::Representation
277
+ command.response_class = Google::Apis::VaultV1::ListMattersResponse
278
+ command.query['pageSize'] = page_size unless page_size.nil?
279
+ command.query['pageToken'] = page_token unless page_token.nil?
280
+ command.query['state'] = state unless state.nil?
281
+ command.query['view'] = view unless view.nil?
282
+ command.query['fields'] = fields unless fields.nil?
283
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
284
+ execute_or_queue_command(command, &block)
285
+ end
286
+
287
+ # Removes an account as a matter collaborator.
288
+ # @param [String] matter_id
289
+ # The matter ID.
290
+ # @param [Google::Apis::VaultV1::RemoveMatterPermissionsRequest] remove_matter_permissions_request_object
291
+ # @param [String] fields
292
+ # Selector specifying which fields to include in a partial response.
293
+ # @param [String] quota_user
294
+ # Available to use for quota purposes for server-side applications. Can be any
295
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
296
+ # @param [Google::Apis::RequestOptions] options
297
+ # Request-specific options
298
+ #
299
+ # @yield [result, err] Result & error if block supplied
300
+ # @yieldparam result [Google::Apis::VaultV1::Empty] parsed result object
301
+ # @yieldparam err [StandardError] error object if request failed
302
+ #
303
+ # @return [Google::Apis::VaultV1::Empty]
304
+ #
305
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
306
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
307
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
308
+ def remove_matter_permissions(matter_id, remove_matter_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
309
+ command = make_simple_command(:post, 'v1/matters/{matterId}:removePermissions', options)
310
+ command.request_representation = Google::Apis::VaultV1::RemoveMatterPermissionsRequest::Representation
311
+ command.request_object = remove_matter_permissions_request_object
312
+ command.response_representation = Google::Apis::VaultV1::Empty::Representation
313
+ command.response_class = Google::Apis::VaultV1::Empty
314
+ command.params['matterId'] = matter_id unless matter_id.nil?
315
+ command.query['fields'] = fields unless fields.nil?
316
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
317
+ execute_or_queue_command(command, &block)
318
+ end
319
+
320
+ # Reopens the specified matter. Returns matter with updated state.
321
+ # @param [String] matter_id
322
+ # The matter ID.
323
+ # @param [Google::Apis::VaultV1::ReopenMatterRequest] reopen_matter_request_object
324
+ # @param [String] fields
325
+ # Selector specifying which fields to include in a partial response.
326
+ # @param [String] quota_user
327
+ # Available to use for quota purposes for server-side applications. Can be any
328
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
329
+ # @param [Google::Apis::RequestOptions] options
330
+ # Request-specific options
331
+ #
332
+ # @yield [result, err] Result & error if block supplied
333
+ # @yieldparam result [Google::Apis::VaultV1::ReopenMatterResponse] parsed result object
334
+ # @yieldparam err [StandardError] error object if request failed
335
+ #
336
+ # @return [Google::Apis::VaultV1::ReopenMatterResponse]
337
+ #
338
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
339
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
340
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
341
+ def reopen_matter(matter_id, reopen_matter_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
342
+ command = make_simple_command(:post, 'v1/matters/{matterId}:reopen', options)
343
+ command.request_representation = Google::Apis::VaultV1::ReopenMatterRequest::Representation
344
+ command.request_object = reopen_matter_request_object
345
+ command.response_representation = Google::Apis::VaultV1::ReopenMatterResponse::Representation
346
+ command.response_class = Google::Apis::VaultV1::ReopenMatterResponse
347
+ command.params['matterId'] = matter_id unless matter_id.nil?
348
+ command.query['fields'] = fields unless fields.nil?
349
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
350
+ execute_or_queue_command(command, &block)
351
+ end
352
+
353
+ # Undeletes the specified matter. Returns matter with updated state.
354
+ # @param [String] matter_id
355
+ # The matter ID.
356
+ # @param [Google::Apis::VaultV1::UndeleteMatterRequest] undelete_matter_request_object
357
+ # @param [String] fields
358
+ # Selector specifying which fields to include in a partial response.
359
+ # @param [String] quota_user
360
+ # Available to use for quota purposes for server-side applications. Can be any
361
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
362
+ # @param [Google::Apis::RequestOptions] options
363
+ # Request-specific options
364
+ #
365
+ # @yield [result, err] Result & error if block supplied
366
+ # @yieldparam result [Google::Apis::VaultV1::Matter] parsed result object
367
+ # @yieldparam err [StandardError] error object if request failed
368
+ #
369
+ # @return [Google::Apis::VaultV1::Matter]
370
+ #
371
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
372
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
373
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
374
+ def undelete_matter(matter_id, undelete_matter_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
375
+ command = make_simple_command(:post, 'v1/matters/{matterId}:undelete', options)
376
+ command.request_representation = Google::Apis::VaultV1::UndeleteMatterRequest::Representation
377
+ command.request_object = undelete_matter_request_object
378
+ command.response_representation = Google::Apis::VaultV1::Matter::Representation
379
+ command.response_class = Google::Apis::VaultV1::Matter
380
+ command.params['matterId'] = matter_id unless matter_id.nil?
381
+ command.query['fields'] = fields unless fields.nil?
382
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
383
+ execute_or_queue_command(command, &block)
384
+ end
385
+
386
+ # Updates the specified matter. This updates only the name and description of
387
+ # the matter, identified by matter ID. Changes to any other fields are ignored.
388
+ # Returns the default view of the matter.
389
+ # @param [String] matter_id
390
+ # The matter ID.
391
+ # @param [Google::Apis::VaultV1::Matter] matter_object
392
+ # @param [String] fields
393
+ # Selector specifying which fields to include in a partial response.
394
+ # @param [String] quota_user
395
+ # Available to use for quota purposes for server-side applications. Can be any
396
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
397
+ # @param [Google::Apis::RequestOptions] options
398
+ # Request-specific options
399
+ #
400
+ # @yield [result, err] Result & error if block supplied
401
+ # @yieldparam result [Google::Apis::VaultV1::Matter] parsed result object
402
+ # @yieldparam err [StandardError] error object if request failed
403
+ #
404
+ # @return [Google::Apis::VaultV1::Matter]
405
+ #
406
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
407
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
408
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
409
+ def update_matter(matter_id, matter_object = nil, fields: nil, quota_user: nil, options: nil, &block)
410
+ command = make_simple_command(:put, 'v1/matters/{matterId}', options)
411
+ command.request_representation = Google::Apis::VaultV1::Matter::Representation
412
+ command.request_object = matter_object
413
+ command.response_representation = Google::Apis::VaultV1::Matter::Representation
414
+ command.response_class = Google::Apis::VaultV1::Matter
415
+ command.params['matterId'] = matter_id unless matter_id.nil?
416
+ command.query['fields'] = fields unless fields.nil?
417
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
418
+ execute_or_queue_command(command, &block)
419
+ end
420
+
421
+ # Creates an Export.
422
+ # @param [String] matter_id
423
+ # The matter ID.
424
+ # @param [Google::Apis::VaultV1::Export] export_object
425
+ # @param [String] fields
426
+ # Selector specifying which fields to include in a partial response.
427
+ # @param [String] quota_user
428
+ # Available to use for quota purposes for server-side applications. Can be any
429
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
430
+ # @param [Google::Apis::RequestOptions] options
431
+ # Request-specific options
432
+ #
433
+ # @yield [result, err] Result & error if block supplied
434
+ # @yieldparam result [Google::Apis::VaultV1::Export] parsed result object
435
+ # @yieldparam err [StandardError] error object if request failed
436
+ #
437
+ # @return [Google::Apis::VaultV1::Export]
438
+ #
439
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
440
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
441
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
442
+ def create_matter_export(matter_id, export_object = nil, fields: nil, quota_user: nil, options: nil, &block)
443
+ command = make_simple_command(:post, 'v1/matters/{matterId}/exports', options)
444
+ command.request_representation = Google::Apis::VaultV1::Export::Representation
445
+ command.request_object = export_object
446
+ command.response_representation = Google::Apis::VaultV1::Export::Representation
447
+ command.response_class = Google::Apis::VaultV1::Export
448
+ command.params['matterId'] = matter_id unless matter_id.nil?
449
+ command.query['fields'] = fields unless fields.nil?
450
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
451
+ execute_or_queue_command(command, &block)
452
+ end
453
+
454
+ # Deletes an Export.
455
+ # @param [String] matter_id
456
+ # The matter ID.
457
+ # @param [String] export_id
458
+ # The export ID.
459
+ # @param [String] fields
460
+ # Selector specifying which fields to include in a partial response.
461
+ # @param [String] quota_user
462
+ # Available to use for quota purposes for server-side applications. Can be any
463
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
464
+ # @param [Google::Apis::RequestOptions] options
465
+ # Request-specific options
466
+ #
467
+ # @yield [result, err] Result & error if block supplied
468
+ # @yieldparam result [Google::Apis::VaultV1::Empty] parsed result object
469
+ # @yieldparam err [StandardError] error object if request failed
470
+ #
471
+ # @return [Google::Apis::VaultV1::Empty]
472
+ #
473
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
474
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
475
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
476
+ def delete_matter_export(matter_id, export_id, fields: nil, quota_user: nil, options: nil, &block)
477
+ command = make_simple_command(:delete, 'v1/matters/{matterId}/exports/{exportId}', options)
478
+ command.response_representation = Google::Apis::VaultV1::Empty::Representation
479
+ command.response_class = Google::Apis::VaultV1::Empty
480
+ command.params['matterId'] = matter_id unless matter_id.nil?
481
+ command.params['exportId'] = export_id unless export_id.nil?
482
+ command.query['fields'] = fields unless fields.nil?
483
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
484
+ execute_or_queue_command(command, &block)
485
+ end
486
+
487
+ # Gets an Export.
488
+ # @param [String] matter_id
489
+ # The matter ID.
490
+ # @param [String] export_id
491
+ # The export ID.
492
+ # @param [String] fields
493
+ # Selector specifying which fields to include in a partial response.
494
+ # @param [String] quota_user
495
+ # Available to use for quota purposes for server-side applications. Can be any
496
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
497
+ # @param [Google::Apis::RequestOptions] options
498
+ # Request-specific options
499
+ #
500
+ # @yield [result, err] Result & error if block supplied
501
+ # @yieldparam result [Google::Apis::VaultV1::Export] parsed result object
502
+ # @yieldparam err [StandardError] error object if request failed
503
+ #
504
+ # @return [Google::Apis::VaultV1::Export]
505
+ #
506
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
507
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
508
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
509
+ def get_matter_export(matter_id, export_id, fields: nil, quota_user: nil, options: nil, &block)
510
+ command = make_simple_command(:get, 'v1/matters/{matterId}/exports/{exportId}', options)
511
+ command.response_representation = Google::Apis::VaultV1::Export::Representation
512
+ command.response_class = Google::Apis::VaultV1::Export
513
+ command.params['matterId'] = matter_id unless matter_id.nil?
514
+ command.params['exportId'] = export_id unless export_id.nil?
515
+ command.query['fields'] = fields unless fields.nil?
516
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
517
+ execute_or_queue_command(command, &block)
518
+ end
519
+
520
+ # Lists Exports.
521
+ # @param [String] matter_id
522
+ # The matter ID.
523
+ # @param [Fixnum] page_size
524
+ # The number of exports to return in the response.
525
+ # @param [String] page_token
526
+ # The pagination token as returned in the response.
527
+ # @param [String] fields
528
+ # Selector specifying which fields to include in a partial response.
529
+ # @param [String] quota_user
530
+ # Available to use for quota purposes for server-side applications. Can be any
531
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
532
+ # @param [Google::Apis::RequestOptions] options
533
+ # Request-specific options
534
+ #
535
+ # @yield [result, err] Result & error if block supplied
536
+ # @yieldparam result [Google::Apis::VaultV1::ListExportsResponse] parsed result object
537
+ # @yieldparam err [StandardError] error object if request failed
538
+ #
539
+ # @return [Google::Apis::VaultV1::ListExportsResponse]
540
+ #
541
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
542
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
543
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
544
+ def list_matter_exports(matter_id, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
545
+ command = make_simple_command(:get, 'v1/matters/{matterId}/exports', options)
546
+ command.response_representation = Google::Apis::VaultV1::ListExportsResponse::Representation
547
+ command.response_class = Google::Apis::VaultV1::ListExportsResponse
548
+ command.params['matterId'] = matter_id unless matter_id.nil?
549
+ command.query['pageSize'] = page_size unless page_size.nil?
550
+ command.query['pageToken'] = page_token unless page_token.nil?
551
+ command.query['fields'] = fields unless fields.nil?
552
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
553
+ execute_or_queue_command(command, &block)
554
+ end
555
+
556
+ # Adds HeldAccounts to a hold. Returns a list of accounts that have been
557
+ # successfully added. Accounts can only be added to an existing account-based
558
+ # hold.
559
+ # @param [String] matter_id
560
+ # The matter ID.
561
+ # @param [String] hold_id
562
+ # The hold ID.
563
+ # @param [Google::Apis::VaultV1::AddHeldAccountsRequest] add_held_accounts_request_object
564
+ # @param [String] fields
565
+ # Selector specifying which fields to include in a partial response.
566
+ # @param [String] quota_user
567
+ # Available to use for quota purposes for server-side applications. Can be any
568
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
569
+ # @param [Google::Apis::RequestOptions] options
570
+ # Request-specific options
571
+ #
572
+ # @yield [result, err] Result & error if block supplied
573
+ # @yieldparam result [Google::Apis::VaultV1::AddHeldAccountsResponse] parsed result object
574
+ # @yieldparam err [StandardError] error object if request failed
575
+ #
576
+ # @return [Google::Apis::VaultV1::AddHeldAccountsResponse]
577
+ #
578
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
579
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
580
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
581
+ def add_hold_held_accounts(matter_id, hold_id, add_held_accounts_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
582
+ command = make_simple_command(:post, 'v1/matters/{matterId}/holds/{holdId}:addHeldAccounts', options)
583
+ command.request_representation = Google::Apis::VaultV1::AddHeldAccountsRequest::Representation
584
+ command.request_object = add_held_accounts_request_object
585
+ command.response_representation = Google::Apis::VaultV1::AddHeldAccountsResponse::Representation
586
+ command.response_class = Google::Apis::VaultV1::AddHeldAccountsResponse
587
+ command.params['matterId'] = matter_id unless matter_id.nil?
588
+ command.params['holdId'] = hold_id unless hold_id.nil?
589
+ command.query['fields'] = fields unless fields.nil?
590
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
591
+ execute_or_queue_command(command, &block)
592
+ end
593
+
594
+ # Creates a hold in the given matter.
595
+ # @param [String] matter_id
596
+ # The matter ID.
597
+ # @param [Google::Apis::VaultV1::Hold] hold_object
598
+ # @param [String] fields
599
+ # Selector specifying which fields to include in a partial response.
600
+ # @param [String] quota_user
601
+ # Available to use for quota purposes for server-side applications. Can be any
602
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
603
+ # @param [Google::Apis::RequestOptions] options
604
+ # Request-specific options
605
+ #
606
+ # @yield [result, err] Result & error if block supplied
607
+ # @yieldparam result [Google::Apis::VaultV1::Hold] parsed result object
608
+ # @yieldparam err [StandardError] error object if request failed
609
+ #
610
+ # @return [Google::Apis::VaultV1::Hold]
611
+ #
612
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
613
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
614
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
615
+ def create_matter_hold(matter_id, hold_object = nil, fields: nil, quota_user: nil, options: nil, &block)
616
+ command = make_simple_command(:post, 'v1/matters/{matterId}/holds', options)
617
+ command.request_representation = Google::Apis::VaultV1::Hold::Representation
618
+ command.request_object = hold_object
619
+ command.response_representation = Google::Apis::VaultV1::Hold::Representation
620
+ command.response_class = Google::Apis::VaultV1::Hold
621
+ command.params['matterId'] = matter_id unless matter_id.nil?
622
+ command.query['fields'] = fields unless fields.nil?
623
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
624
+ execute_or_queue_command(command, &block)
625
+ end
626
+
627
+ # Removes a hold by ID. This will release any HeldAccounts on this Hold.
628
+ # @param [String] matter_id
629
+ # The matter ID.
630
+ # @param [String] hold_id
631
+ # The hold ID.
632
+ # @param [String] fields
633
+ # Selector specifying which fields to include in a partial response.
634
+ # @param [String] quota_user
635
+ # Available to use for quota purposes for server-side applications. Can be any
636
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
637
+ # @param [Google::Apis::RequestOptions] options
638
+ # Request-specific options
639
+ #
640
+ # @yield [result, err] Result & error if block supplied
641
+ # @yieldparam result [Google::Apis::VaultV1::Empty] parsed result object
642
+ # @yieldparam err [StandardError] error object if request failed
643
+ #
644
+ # @return [Google::Apis::VaultV1::Empty]
645
+ #
646
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
647
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
648
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
649
+ def delete_matter_hold(matter_id, hold_id, fields: nil, quota_user: nil, options: nil, &block)
650
+ command = make_simple_command(:delete, 'v1/matters/{matterId}/holds/{holdId}', options)
651
+ command.response_representation = Google::Apis::VaultV1::Empty::Representation
652
+ command.response_class = Google::Apis::VaultV1::Empty
653
+ command.params['matterId'] = matter_id unless matter_id.nil?
654
+ command.params['holdId'] = hold_id unless hold_id.nil?
655
+ command.query['fields'] = fields unless fields.nil?
656
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
657
+ execute_or_queue_command(command, &block)
658
+ end
659
+
660
+ # Gets a hold by ID.
661
+ # @param [String] matter_id
662
+ # The matter ID.
663
+ # @param [String] hold_id
664
+ # The hold ID.
665
+ # @param [String] view
666
+ # Specifies which parts of the Hold to return.
667
+ # @param [String] fields
668
+ # Selector specifying which fields to include in a partial response.
669
+ # @param [String] quota_user
670
+ # Available to use for quota purposes for server-side applications. Can be any
671
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
672
+ # @param [Google::Apis::RequestOptions] options
673
+ # Request-specific options
674
+ #
675
+ # @yield [result, err] Result & error if block supplied
676
+ # @yieldparam result [Google::Apis::VaultV1::Hold] parsed result object
677
+ # @yieldparam err [StandardError] error object if request failed
678
+ #
679
+ # @return [Google::Apis::VaultV1::Hold]
680
+ #
681
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
682
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
683
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
684
+ def get_matter_hold(matter_id, hold_id, view: nil, fields: nil, quota_user: nil, options: nil, &block)
685
+ command = make_simple_command(:get, 'v1/matters/{matterId}/holds/{holdId}', options)
686
+ command.response_representation = Google::Apis::VaultV1::Hold::Representation
687
+ command.response_class = Google::Apis::VaultV1::Hold
688
+ command.params['matterId'] = matter_id unless matter_id.nil?
689
+ command.params['holdId'] = hold_id unless hold_id.nil?
690
+ command.query['view'] = view unless view.nil?
691
+ command.query['fields'] = fields unless fields.nil?
692
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
693
+ execute_or_queue_command(command, &block)
694
+ end
695
+
696
+ # Lists holds within a matter. An empty page token in ListHoldsResponse denotes
697
+ # no more holds to list.
698
+ # @param [String] matter_id
699
+ # The matter ID.
700
+ # @param [Fixnum] page_size
701
+ # The number of holds to return in the response, between 0 and 100 inclusive.
702
+ # Leaving this empty, or as 0, is the same as page_size = 100.
703
+ # @param [String] page_token
704
+ # The pagination token as returned in the response. An empty token means start
705
+ # from the beginning.
706
+ # @param [String] view
707
+ # Specifies which parts of the Hold to return.
708
+ # @param [String] fields
709
+ # Selector specifying which fields to include in a partial response.
710
+ # @param [String] quota_user
711
+ # Available to use for quota purposes for server-side applications. Can be any
712
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
713
+ # @param [Google::Apis::RequestOptions] options
714
+ # Request-specific options
715
+ #
716
+ # @yield [result, err] Result & error if block supplied
717
+ # @yieldparam result [Google::Apis::VaultV1::ListHoldsResponse] parsed result object
718
+ # @yieldparam err [StandardError] error object if request failed
719
+ #
720
+ # @return [Google::Apis::VaultV1::ListHoldsResponse]
721
+ #
722
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
723
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
724
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
725
+ def list_matter_holds(matter_id, page_size: nil, page_token: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block)
726
+ command = make_simple_command(:get, 'v1/matters/{matterId}/holds', options)
727
+ command.response_representation = Google::Apis::VaultV1::ListHoldsResponse::Representation
728
+ command.response_class = Google::Apis::VaultV1::ListHoldsResponse
729
+ command.params['matterId'] = matter_id unless matter_id.nil?
730
+ command.query['pageSize'] = page_size unless page_size.nil?
731
+ command.query['pageToken'] = page_token unless page_token.nil?
732
+ command.query['view'] = view unless view.nil?
733
+ command.query['fields'] = fields unless fields.nil?
734
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
735
+ execute_or_queue_command(command, &block)
736
+ end
737
+
738
+ # Removes HeldAccounts from a hold. Returns a list of statuses in the same order
739
+ # as the request. If this request leaves the hold with no held accounts, the
740
+ # hold will not apply to any accounts.
741
+ # @param [String] matter_id
742
+ # The matter ID.
743
+ # @param [String] hold_id
744
+ # The hold ID.
745
+ # @param [Google::Apis::VaultV1::RemoveHeldAccountsRequest] remove_held_accounts_request_object
746
+ # @param [String] fields
747
+ # Selector specifying which fields to include in a partial response.
748
+ # @param [String] quota_user
749
+ # Available to use for quota purposes for server-side applications. Can be any
750
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
751
+ # @param [Google::Apis::RequestOptions] options
752
+ # Request-specific options
753
+ #
754
+ # @yield [result, err] Result & error if block supplied
755
+ # @yieldparam result [Google::Apis::VaultV1::RemoveHeldAccountsResponse] parsed result object
756
+ # @yieldparam err [StandardError] error object if request failed
757
+ #
758
+ # @return [Google::Apis::VaultV1::RemoveHeldAccountsResponse]
759
+ #
760
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
761
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
762
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
763
+ def remove_hold_held_accounts(matter_id, hold_id, remove_held_accounts_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
764
+ command = make_simple_command(:post, 'v1/matters/{matterId}/holds/{holdId}:removeHeldAccounts', options)
765
+ command.request_representation = Google::Apis::VaultV1::RemoveHeldAccountsRequest::Representation
766
+ command.request_object = remove_held_accounts_request_object
767
+ command.response_representation = Google::Apis::VaultV1::RemoveHeldAccountsResponse::Representation
768
+ command.response_class = Google::Apis::VaultV1::RemoveHeldAccountsResponse
769
+ command.params['matterId'] = matter_id unless matter_id.nil?
770
+ command.params['holdId'] = hold_id unless hold_id.nil?
771
+ command.query['fields'] = fields unless fields.nil?
772
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
773
+ execute_or_queue_command(command, &block)
774
+ end
775
+
776
+ # Updates the OU and/or query parameters of a hold. You cannot add accounts to a
777
+ # hold that covers an OU, nor can you add OUs to a hold that covers individual
778
+ # accounts. Accounts listed in the hold will be ignored.
779
+ # @param [String] matter_id
780
+ # The matter ID.
781
+ # @param [String] hold_id
782
+ # The ID of the hold.
783
+ # @param [Google::Apis::VaultV1::Hold] hold_object
784
+ # @param [String] fields
785
+ # Selector specifying which fields to include in a partial response.
786
+ # @param [String] quota_user
787
+ # Available to use for quota purposes for server-side applications. Can be any
788
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
789
+ # @param [Google::Apis::RequestOptions] options
790
+ # Request-specific options
791
+ #
792
+ # @yield [result, err] Result & error if block supplied
793
+ # @yieldparam result [Google::Apis::VaultV1::Hold] parsed result object
794
+ # @yieldparam err [StandardError] error object if request failed
795
+ #
796
+ # @return [Google::Apis::VaultV1::Hold]
797
+ #
798
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
799
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
800
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
801
+ def update_matter_hold(matter_id, hold_id, hold_object = nil, fields: nil, quota_user: nil, options: nil, &block)
802
+ command = make_simple_command(:put, 'v1/matters/{matterId}/holds/{holdId}', options)
803
+ command.request_representation = Google::Apis::VaultV1::Hold::Representation
804
+ command.request_object = hold_object
805
+ command.response_representation = Google::Apis::VaultV1::Hold::Representation
806
+ command.response_class = Google::Apis::VaultV1::Hold
807
+ command.params['matterId'] = matter_id unless matter_id.nil?
808
+ command.params['holdId'] = hold_id unless hold_id.nil?
809
+ command.query['fields'] = fields unless fields.nil?
810
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
811
+ execute_or_queue_command(command, &block)
812
+ end
813
+
814
+ # Adds a HeldAccount to a hold. Accounts can only be added to a hold that has no
815
+ # held_org_unit set. Attempting to add an account to an OU-based hold will
816
+ # result in an error.
817
+ # @param [String] matter_id
818
+ # The matter ID.
819
+ # @param [String] hold_id
820
+ # The hold ID.
821
+ # @param [Google::Apis::VaultV1::HeldAccount] held_account_object
822
+ # @param [String] fields
823
+ # Selector specifying which fields to include in a partial response.
824
+ # @param [String] quota_user
825
+ # Available to use for quota purposes for server-side applications. Can be any
826
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
827
+ # @param [Google::Apis::RequestOptions] options
828
+ # Request-specific options
829
+ #
830
+ # @yield [result, err] Result & error if block supplied
831
+ # @yieldparam result [Google::Apis::VaultV1::HeldAccount] parsed result object
832
+ # @yieldparam err [StandardError] error object if request failed
833
+ #
834
+ # @return [Google::Apis::VaultV1::HeldAccount]
835
+ #
836
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
837
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
838
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
839
+ def create_matter_hold_account(matter_id, hold_id, held_account_object = nil, fields: nil, quota_user: nil, options: nil, &block)
840
+ command = make_simple_command(:post, 'v1/matters/{matterId}/holds/{holdId}/accounts', options)
841
+ command.request_representation = Google::Apis::VaultV1::HeldAccount::Representation
842
+ command.request_object = held_account_object
843
+ command.response_representation = Google::Apis::VaultV1::HeldAccount::Representation
844
+ command.response_class = Google::Apis::VaultV1::HeldAccount
845
+ command.params['matterId'] = matter_id unless matter_id.nil?
846
+ command.params['holdId'] = hold_id unless hold_id.nil?
847
+ command.query['fields'] = fields unless fields.nil?
848
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
849
+ execute_or_queue_command(command, &block)
850
+ end
851
+
852
+ # Removes a HeldAccount from a hold. If this request leaves the hold with no
853
+ # held accounts, the hold will not apply to any accounts.
854
+ # @param [String] matter_id
855
+ # The matter ID.
856
+ # @param [String] hold_id
857
+ # The hold ID.
858
+ # @param [String] account_id
859
+ # The ID of the account to remove from the hold.
860
+ # @param [String] fields
861
+ # Selector specifying which fields to include in a partial response.
862
+ # @param [String] quota_user
863
+ # Available to use for quota purposes for server-side applications. Can be any
864
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
865
+ # @param [Google::Apis::RequestOptions] options
866
+ # Request-specific options
867
+ #
868
+ # @yield [result, err] Result & error if block supplied
869
+ # @yieldparam result [Google::Apis::VaultV1::Empty] parsed result object
870
+ # @yieldparam err [StandardError] error object if request failed
871
+ #
872
+ # @return [Google::Apis::VaultV1::Empty]
873
+ #
874
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
875
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
876
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
877
+ def delete_matter_hold_account(matter_id, hold_id, account_id, fields: nil, quota_user: nil, options: nil, &block)
878
+ command = make_simple_command(:delete, 'v1/matters/{matterId}/holds/{holdId}/accounts/{accountId}', options)
879
+ command.response_representation = Google::Apis::VaultV1::Empty::Representation
880
+ command.response_class = Google::Apis::VaultV1::Empty
881
+ command.params['matterId'] = matter_id unless matter_id.nil?
882
+ command.params['holdId'] = hold_id unless hold_id.nil?
883
+ command.params['accountId'] = account_id unless account_id.nil?
884
+ command.query['fields'] = fields unless fields.nil?
885
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
886
+ execute_or_queue_command(command, &block)
887
+ end
888
+
889
+ # Lists HeldAccounts for a hold. This will only list individually specified held
890
+ # accounts. If the hold is on an OU, then use Admin SDK to enumerate its members.
891
+ # @param [String] matter_id
892
+ # The matter ID.
893
+ # @param [String] hold_id
894
+ # The hold ID.
895
+ # @param [String] fields
896
+ # Selector specifying which fields to include in a partial response.
897
+ # @param [String] quota_user
898
+ # Available to use for quota purposes for server-side applications. Can be any
899
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
900
+ # @param [Google::Apis::RequestOptions] options
901
+ # Request-specific options
902
+ #
903
+ # @yield [result, err] Result & error if block supplied
904
+ # @yieldparam result [Google::Apis::VaultV1::ListHeldAccountsResponse] parsed result object
905
+ # @yieldparam err [StandardError] error object if request failed
906
+ #
907
+ # @return [Google::Apis::VaultV1::ListHeldAccountsResponse]
908
+ #
909
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
910
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
911
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
912
+ def list_matter_hold_accounts(matter_id, hold_id, fields: nil, quota_user: nil, options: nil, &block)
913
+ command = make_simple_command(:get, 'v1/matters/{matterId}/holds/{holdId}/accounts', options)
914
+ command.response_representation = Google::Apis::VaultV1::ListHeldAccountsResponse::Representation
915
+ command.response_class = Google::Apis::VaultV1::ListHeldAccountsResponse
916
+ command.params['matterId'] = matter_id unless matter_id.nil?
917
+ command.params['holdId'] = hold_id unless hold_id.nil?
918
+ command.query['fields'] = fields unless fields.nil?
919
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
920
+ execute_or_queue_command(command, &block)
921
+ end
922
+
923
+ # Creates a saved query.
924
+ # @param [String] matter_id
925
+ # The matter ID of the parent matter for which the saved query is to be created.
926
+ # @param [Google::Apis::VaultV1::SavedQuery] saved_query_object
927
+ # @param [String] fields
928
+ # Selector specifying which fields to include in a partial response.
929
+ # @param [String] quota_user
930
+ # Available to use for quota purposes for server-side applications. Can be any
931
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
932
+ # @param [Google::Apis::RequestOptions] options
933
+ # Request-specific options
934
+ #
935
+ # @yield [result, err] Result & error if block supplied
936
+ # @yieldparam result [Google::Apis::VaultV1::SavedQuery] parsed result object
937
+ # @yieldparam err [StandardError] error object if request failed
938
+ #
939
+ # @return [Google::Apis::VaultV1::SavedQuery]
940
+ #
941
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
942
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
943
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
944
+ def create_matter_saved_query(matter_id, saved_query_object = nil, fields: nil, quota_user: nil, options: nil, &block)
945
+ command = make_simple_command(:post, 'v1/matters/{matterId}/savedQueries', options)
946
+ command.request_representation = Google::Apis::VaultV1::SavedQuery::Representation
947
+ command.request_object = saved_query_object
948
+ command.response_representation = Google::Apis::VaultV1::SavedQuery::Representation
949
+ command.response_class = Google::Apis::VaultV1::SavedQuery
950
+ command.params['matterId'] = matter_id unless matter_id.nil?
951
+ command.query['fields'] = fields unless fields.nil?
952
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
953
+ execute_or_queue_command(command, &block)
954
+ end
955
+
956
+ # Deletes a saved query by Id.
957
+ # @param [String] matter_id
958
+ # The matter ID of the parent matter for which the saved query is to be deleted.
959
+ # @param [String] saved_query_id
960
+ # ID of the saved query to be deleted.
961
+ # @param [String] fields
962
+ # Selector specifying which fields to include in a partial response.
963
+ # @param [String] quota_user
964
+ # Available to use for quota purposes for server-side applications. Can be any
965
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
966
+ # @param [Google::Apis::RequestOptions] options
967
+ # Request-specific options
968
+ #
969
+ # @yield [result, err] Result & error if block supplied
970
+ # @yieldparam result [Google::Apis::VaultV1::Empty] parsed result object
971
+ # @yieldparam err [StandardError] error object if request failed
972
+ #
973
+ # @return [Google::Apis::VaultV1::Empty]
974
+ #
975
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
976
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
977
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
978
+ def delete_matter_saved_query(matter_id, saved_query_id, fields: nil, quota_user: nil, options: nil, &block)
979
+ command = make_simple_command(:delete, 'v1/matters/{matterId}/savedQueries/{savedQueryId}', options)
980
+ command.response_representation = Google::Apis::VaultV1::Empty::Representation
981
+ command.response_class = Google::Apis::VaultV1::Empty
982
+ command.params['matterId'] = matter_id unless matter_id.nil?
983
+ command.params['savedQueryId'] = saved_query_id unless saved_query_id.nil?
984
+ command.query['fields'] = fields unless fields.nil?
985
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
986
+ execute_or_queue_command(command, &block)
987
+ end
988
+
989
+ # Retrieves a saved query by Id.
990
+ # @param [String] matter_id
991
+ # The matter ID of the parent matter for which the saved query is to be
992
+ # retrieved.
993
+ # @param [String] saved_query_id
994
+ # ID of the saved query to be retrieved.
995
+ # @param [String] fields
996
+ # Selector specifying which fields to include in a partial response.
997
+ # @param [String] quota_user
998
+ # Available to use for quota purposes for server-side applications. Can be any
999
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1000
+ # @param [Google::Apis::RequestOptions] options
1001
+ # Request-specific options
1002
+ #
1003
+ # @yield [result, err] Result & error if block supplied
1004
+ # @yieldparam result [Google::Apis::VaultV1::SavedQuery] parsed result object
1005
+ # @yieldparam err [StandardError] error object if request failed
1006
+ #
1007
+ # @return [Google::Apis::VaultV1::SavedQuery]
1008
+ #
1009
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1010
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1011
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1012
+ def get_matter_saved_query(matter_id, saved_query_id, fields: nil, quota_user: nil, options: nil, &block)
1013
+ command = make_simple_command(:get, 'v1/matters/{matterId}/savedQueries/{savedQueryId}', options)
1014
+ command.response_representation = Google::Apis::VaultV1::SavedQuery::Representation
1015
+ command.response_class = Google::Apis::VaultV1::SavedQuery
1016
+ command.params['matterId'] = matter_id unless matter_id.nil?
1017
+ command.params['savedQueryId'] = saved_query_id unless saved_query_id.nil?
1018
+ command.query['fields'] = fields unless fields.nil?
1019
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1020
+ execute_or_queue_command(command, &block)
1021
+ end
1022
+
1023
+ # Lists saved queries within a matter. An empty page token in
1024
+ # ListSavedQueriesResponse denotes no more saved queries to list.
1025
+ # @param [String] matter_id
1026
+ # The matter ID of the parent matter for which the saved queries are to be
1027
+ # retrieved.
1028
+ # @param [Fixnum] page_size
1029
+ # The maximum number of saved queries to return.
1030
+ # @param [String] page_token
1031
+ # The pagination token as returned in the previous response. An empty token
1032
+ # means start from the beginning.
1033
+ # @param [String] fields
1034
+ # Selector specifying which fields to include in a partial response.
1035
+ # @param [String] quota_user
1036
+ # Available to use for quota purposes for server-side applications. Can be any
1037
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1038
+ # @param [Google::Apis::RequestOptions] options
1039
+ # Request-specific options
1040
+ #
1041
+ # @yield [result, err] Result & error if block supplied
1042
+ # @yieldparam result [Google::Apis::VaultV1::ListSavedQueriesResponse] parsed result object
1043
+ # @yieldparam err [StandardError] error object if request failed
1044
+ #
1045
+ # @return [Google::Apis::VaultV1::ListSavedQueriesResponse]
1046
+ #
1047
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1048
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1049
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1050
+ def list_matter_saved_queries(matter_id, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1051
+ command = make_simple_command(:get, 'v1/matters/{matterId}/savedQueries', options)
1052
+ command.response_representation = Google::Apis::VaultV1::ListSavedQueriesResponse::Representation
1053
+ command.response_class = Google::Apis::VaultV1::ListSavedQueriesResponse
1054
+ command.params['matterId'] = matter_id unless matter_id.nil?
1055
+ command.query['pageSize'] = page_size unless page_size.nil?
1056
+ command.query['pageToken'] = page_token unless page_token.nil?
1057
+ command.query['fields'] = fields unless fields.nil?
1058
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1059
+ execute_or_queue_command(command, &block)
1060
+ end
1061
+
1062
+ # Starts asynchronous cancellation on a long-running operation. The server makes
1063
+ # a best effort to cancel the operation, but success is not guaranteed. If the
1064
+ # server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
1065
+ # Clients can use Operations.GetOperation or other methods to check whether the
1066
+ # cancellation succeeded or whether the operation completed despite cancellation.
1067
+ # On successful cancellation, the operation is not deleted; instead, it becomes
1068
+ # an operation with an Operation.error value with a google.rpc.Status.code of 1,
1069
+ # corresponding to `Code.CANCELLED`.
1070
+ # @param [String] name
1071
+ # The name of the operation resource to be cancelled.
1072
+ # @param [Google::Apis::VaultV1::CancelOperationRequest] cancel_operation_request_object
1073
+ # @param [String] fields
1074
+ # Selector specifying which fields to include in a partial response.
1075
+ # @param [String] quota_user
1076
+ # Available to use for quota purposes for server-side applications. Can be any
1077
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1078
+ # @param [Google::Apis::RequestOptions] options
1079
+ # Request-specific options
1080
+ #
1081
+ # @yield [result, err] Result & error if block supplied
1082
+ # @yieldparam result [Google::Apis::VaultV1::Empty] parsed result object
1083
+ # @yieldparam err [StandardError] error object if request failed
1084
+ #
1085
+ # @return [Google::Apis::VaultV1::Empty]
1086
+ #
1087
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1088
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1089
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1090
+ def cancel_operation(name, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1091
+ command = make_simple_command(:post, 'v1/{+name}:cancel', options)
1092
+ command.request_representation = Google::Apis::VaultV1::CancelOperationRequest::Representation
1093
+ command.request_object = cancel_operation_request_object
1094
+ command.response_representation = Google::Apis::VaultV1::Empty::Representation
1095
+ command.response_class = Google::Apis::VaultV1::Empty
1096
+ command.params['name'] = name unless name.nil?
1097
+ command.query['fields'] = fields unless fields.nil?
1098
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1099
+ execute_or_queue_command(command, &block)
1100
+ end
1101
+
1102
+ # Deletes a long-running operation. This method indicates that the client is no
1103
+ # longer interested in the operation result. It does not cancel the operation.
1104
+ # If the server doesn't support this method, it returns `google.rpc.Code.
1105
+ # UNIMPLEMENTED`.
1106
+ # @param [String] name
1107
+ # The name of the operation resource to be deleted.
1108
+ # @param [String] fields
1109
+ # Selector specifying which fields to include in a partial response.
1110
+ # @param [String] quota_user
1111
+ # Available to use for quota purposes for server-side applications. Can be any
1112
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1113
+ # @param [Google::Apis::RequestOptions] options
1114
+ # Request-specific options
1115
+ #
1116
+ # @yield [result, err] Result & error if block supplied
1117
+ # @yieldparam result [Google::Apis::VaultV1::Empty] parsed result object
1118
+ # @yieldparam err [StandardError] error object if request failed
1119
+ #
1120
+ # @return [Google::Apis::VaultV1::Empty]
1121
+ #
1122
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1123
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1124
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1125
+ def delete_operation(name, fields: nil, quota_user: nil, options: nil, &block)
1126
+ command = make_simple_command(:delete, 'v1/{+name}', options)
1127
+ command.response_representation = Google::Apis::VaultV1::Empty::Representation
1128
+ command.response_class = Google::Apis::VaultV1::Empty
1129
+ command.params['name'] = name unless name.nil?
1130
+ command.query['fields'] = fields unless fields.nil?
1131
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1132
+ execute_or_queue_command(command, &block)
1133
+ end
1134
+
1135
+ # Gets the latest state of a long-running operation. Clients can use this method
1136
+ # to poll the operation result at intervals as recommended by the API service.
1137
+ # @param [String] name
1138
+ # The name of the operation resource.
1139
+ # @param [String] fields
1140
+ # Selector specifying which fields to include in a partial response.
1141
+ # @param [String] quota_user
1142
+ # Available to use for quota purposes for server-side applications. Can be any
1143
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1144
+ # @param [Google::Apis::RequestOptions] options
1145
+ # Request-specific options
1146
+ #
1147
+ # @yield [result, err] Result & error if block supplied
1148
+ # @yieldparam result [Google::Apis::VaultV1::Operation] parsed result object
1149
+ # @yieldparam err [StandardError] error object if request failed
1150
+ #
1151
+ # @return [Google::Apis::VaultV1::Operation]
1152
+ #
1153
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1154
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1155
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1156
+ def get_operation(name, fields: nil, quota_user: nil, options: nil, &block)
1157
+ command = make_simple_command(:get, 'v1/{+name}', options)
1158
+ command.response_representation = Google::Apis::VaultV1::Operation::Representation
1159
+ command.response_class = Google::Apis::VaultV1::Operation
1160
+ command.params['name'] = name unless name.nil?
1161
+ command.query['fields'] = fields unless fields.nil?
1162
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1163
+ execute_or_queue_command(command, &block)
1164
+ end
1165
+
1166
+ # Lists operations that match the specified filter in the request. If the server
1167
+ # doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name`
1168
+ # binding allows API services to override the binding to use different resource
1169
+ # name schemes, such as `users/*/operations`. To override the binding, API
1170
+ # services can add a binding such as `"/v1/`name=users/*`/operations"` to their
1171
+ # service configuration. For backwards compatibility, the default name includes
1172
+ # the operations collection id, however overriding users must ensure the name
1173
+ # binding is the parent resource, without the operations collection id.
1174
+ # @param [String] name
1175
+ # The name of the operation's parent resource.
1176
+ # @param [String] filter
1177
+ # The standard list filter.
1178
+ # @param [Fixnum] page_size
1179
+ # The standard list page size.
1180
+ # @param [String] page_token
1181
+ # The standard list page token.
1182
+ # @param [String] fields
1183
+ # Selector specifying which fields to include in a partial response.
1184
+ # @param [String] quota_user
1185
+ # Available to use for quota purposes for server-side applications. Can be any
1186
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1187
+ # @param [Google::Apis::RequestOptions] options
1188
+ # Request-specific options
1189
+ #
1190
+ # @yield [result, err] Result & error if block supplied
1191
+ # @yieldparam result [Google::Apis::VaultV1::ListOperationsResponse] parsed result object
1192
+ # @yieldparam err [StandardError] error object if request failed
1193
+ #
1194
+ # @return [Google::Apis::VaultV1::ListOperationsResponse]
1195
+ #
1196
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1197
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1198
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1199
+ def list_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1200
+ command = make_simple_command(:get, 'v1/{+name}', options)
1201
+ command.response_representation = Google::Apis::VaultV1::ListOperationsResponse::Representation
1202
+ command.response_class = Google::Apis::VaultV1::ListOperationsResponse
1203
+ command.params['name'] = name unless name.nil?
1204
+ command.query['filter'] = filter unless filter.nil?
1205
+ command.query['pageSize'] = page_size unless page_size.nil?
1206
+ command.query['pageToken'] = page_token unless page_token.nil?
1207
+ command.query['fields'] = fields unless fields.nil?
1208
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1209
+ execute_or_queue_command(command, &block)
1210
+ end
1211
+
1212
+ protected
1213
+
1214
+ def apply_command_defaults(command)
1215
+ command.query['key'] = key unless key.nil?
1216
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1217
+ end
1218
+ end
1219
+ end
1220
+ end
1221
+ end