google-apis-contentwarehouse_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,1182 @@
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 ContentwarehouseV1
23
+ # contentwarehouse API
24
+ #
25
+ #
26
+ #
27
+ # @example
28
+ # require 'google/apis/contentwarehouse_v1'
29
+ #
30
+ # Contentwarehouse = Google::Apis::ContentwarehouseV1 # Alias the module
31
+ # service = Contentwarehouse::ContentwarehouseService.new
32
+ #
33
+ # @see https://cloud.google.com/document-warehouse
34
+ class ContentwarehouseService < 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://contentwarehouse.googleapis.com/', '',
47
+ client_name: 'google-apis-contentwarehouse_v1',
48
+ client_version: Google::Apis::ContentwarehouseV1::GEM_VERSION)
49
+ @batch_path = 'batch'
50
+ end
51
+
52
+ # Gets the access control policy for a resource. Returns NOT_FOUND error if the
53
+ # resource does not exist. Returns an empty policy if the resource exists but
54
+ # does not have a policy set.
55
+ # @param [String] resource
56
+ # Required. REQUIRED: The resource for which the policy is being requested.
57
+ # Format for document: projects/`project_number`/locations/`location`/documents/`
58
+ # document_id`. Format for project: projects/`project_number`.
59
+ # @param [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1FetchAclRequest] google_cloud_contentwarehouse_v1_fetch_acl_request_object
60
+ # @param [String] fields
61
+ # Selector specifying which fields to include in a partial response.
62
+ # @param [String] quota_user
63
+ # Available to use for quota purposes for server-side applications. Can be any
64
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
65
+ # @param [Google::Apis::RequestOptions] options
66
+ # Request-specific options
67
+ #
68
+ # @yield [result, err] Result & error if block supplied
69
+ # @yieldparam result [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1FetchAclResponse] parsed result object
70
+ # @yieldparam err [StandardError] error object if request failed
71
+ #
72
+ # @return [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1FetchAclResponse]
73
+ #
74
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
75
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
76
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
77
+ def fetch_project_acl(resource, google_cloud_contentwarehouse_v1_fetch_acl_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
78
+ command = make_simple_command(:post, 'v1/{+resource}:fetchAcl', options)
79
+ command.request_representation = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1FetchAclRequest::Representation
80
+ command.request_object = google_cloud_contentwarehouse_v1_fetch_acl_request_object
81
+ command.response_representation = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1FetchAclResponse::Representation
82
+ command.response_class = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1FetchAclResponse
83
+ command.params['resource'] = resource unless resource.nil?
84
+ command.query['fields'] = fields unless fields.nil?
85
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
86
+ execute_or_queue_command(command, &block)
87
+ end
88
+
89
+ # Sets the access control policy for a resource. Replaces any existing policy.
90
+ # @param [String] resource
91
+ # Required. REQUIRED: The resource for which the policy is being requested.
92
+ # Format for document: projects/`project_number`/locations/`location`/documents/`
93
+ # document_id`. Format for project: projects/`project_number`.
94
+ # @param [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1SetAclRequest] google_cloud_contentwarehouse_v1_set_acl_request_object
95
+ # @param [String] fields
96
+ # Selector specifying which fields to include in a partial response.
97
+ # @param [String] quota_user
98
+ # Available to use for quota purposes for server-side applications. Can be any
99
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
100
+ # @param [Google::Apis::RequestOptions] options
101
+ # Request-specific options
102
+ #
103
+ # @yield [result, err] Result & error if block supplied
104
+ # @yieldparam result [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1SetAclResponse] parsed result object
105
+ # @yieldparam err [StandardError] error object if request failed
106
+ #
107
+ # @return [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1SetAclResponse]
108
+ #
109
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
110
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
111
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
112
+ def set_project_acl(resource, google_cloud_contentwarehouse_v1_set_acl_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
113
+ command = make_simple_command(:post, 'v1/{+resource}:setAcl', options)
114
+ command.request_representation = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1SetAclRequest::Representation
115
+ command.request_object = google_cloud_contentwarehouse_v1_set_acl_request_object
116
+ command.response_representation = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1SetAclResponse::Representation
117
+ command.response_class = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1SetAclResponse
118
+ command.params['resource'] = resource unless resource.nil?
119
+ command.query['fields'] = fields unless fields.nil?
120
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
121
+ execute_or_queue_command(command, &block)
122
+ end
123
+
124
+ # Provisions resources for given tenant project. Returns a long running
125
+ # operation.
126
+ # @param [String] location
127
+ # Required. The location to be initialized Format: projects/`project_number`/
128
+ # locations/`location`.
129
+ # @param [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1InitializeProjectRequest] google_cloud_contentwarehouse_v1_initialize_project_request_object
130
+ # @param [String] fields
131
+ # Selector specifying which fields to include in a partial response.
132
+ # @param [String] quota_user
133
+ # Available to use for quota purposes for server-side applications. Can be any
134
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
135
+ # @param [Google::Apis::RequestOptions] options
136
+ # Request-specific options
137
+ #
138
+ # @yield [result, err] Result & error if block supplied
139
+ # @yieldparam result [Google::Apis::ContentwarehouseV1::GoogleLongrunningOperation] parsed result object
140
+ # @yieldparam err [StandardError] error object if request failed
141
+ #
142
+ # @return [Google::Apis::ContentwarehouseV1::GoogleLongrunningOperation]
143
+ #
144
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
145
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
146
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
147
+ def initialize_project_location(location, google_cloud_contentwarehouse_v1_initialize_project_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
148
+ command = make_simple_command(:post, 'v1/{+location}:initialize', options)
149
+ command.request_representation = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1InitializeProjectRequest::Representation
150
+ command.request_object = google_cloud_contentwarehouse_v1_initialize_project_request_object
151
+ command.response_representation = Google::Apis::ContentwarehouseV1::GoogleLongrunningOperation::Representation
152
+ command.response_class = Google::Apis::ContentwarehouseV1::GoogleLongrunningOperation
153
+ command.params['location'] = location unless location.nil?
154
+ command.query['fields'] = fields unless fields.nil?
155
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
156
+ execute_or_queue_command(command, &block)
157
+ end
158
+
159
+ # Creates a document schema.
160
+ # @param [String] parent
161
+ # Required. The parent name.
162
+ # @param [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1DocumentSchema] google_cloud_contentwarehouse_v1_document_schema_object
163
+ # @param [String] fields
164
+ # Selector specifying which fields to include in a partial response.
165
+ # @param [String] quota_user
166
+ # Available to use for quota purposes for server-side applications. Can be any
167
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
168
+ # @param [Google::Apis::RequestOptions] options
169
+ # Request-specific options
170
+ #
171
+ # @yield [result, err] Result & error if block supplied
172
+ # @yieldparam result [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1DocumentSchema] parsed result object
173
+ # @yieldparam err [StandardError] error object if request failed
174
+ #
175
+ # @return [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1DocumentSchema]
176
+ #
177
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
178
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
179
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
180
+ def create_project_location_document_schema(parent, google_cloud_contentwarehouse_v1_document_schema_object = nil, fields: nil, quota_user: nil, options: nil, &block)
181
+ command = make_simple_command(:post, 'v1/{+parent}/documentSchemas', options)
182
+ command.request_representation = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1DocumentSchema::Representation
183
+ command.request_object = google_cloud_contentwarehouse_v1_document_schema_object
184
+ command.response_representation = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1DocumentSchema::Representation
185
+ command.response_class = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1DocumentSchema
186
+ command.params['parent'] = parent unless parent.nil?
187
+ command.query['fields'] = fields unless fields.nil?
188
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
189
+ execute_or_queue_command(command, &block)
190
+ end
191
+
192
+ # Deletes a document schema. Returns NOT_FOUND if the document schema does not
193
+ # exist.
194
+ # @param [String] name
195
+ # Required. The name of the document schema to delete.
196
+ # @param [String] fields
197
+ # Selector specifying which fields to include in a partial response.
198
+ # @param [String] quota_user
199
+ # Available to use for quota purposes for server-side applications. Can be any
200
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
201
+ # @param [Google::Apis::RequestOptions] options
202
+ # Request-specific options
203
+ #
204
+ # @yield [result, err] Result & error if block supplied
205
+ # @yieldparam result [Google::Apis::ContentwarehouseV1::GoogleProtobufEmpty] parsed result object
206
+ # @yieldparam err [StandardError] error object if request failed
207
+ #
208
+ # @return [Google::Apis::ContentwarehouseV1::GoogleProtobufEmpty]
209
+ #
210
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
211
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
212
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
213
+ def delete_project_location_document_schema(name, fields: nil, quota_user: nil, options: nil, &block)
214
+ command = make_simple_command(:delete, 'v1/{+name}', options)
215
+ command.response_representation = Google::Apis::ContentwarehouseV1::GoogleProtobufEmpty::Representation
216
+ command.response_class = Google::Apis::ContentwarehouseV1::GoogleProtobufEmpty
217
+ command.params['name'] = name unless name.nil?
218
+ command.query['fields'] = fields unless fields.nil?
219
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
220
+ execute_or_queue_command(command, &block)
221
+ end
222
+
223
+ # Gets a document schema. Returns NOT_FOUND if the document schema does not
224
+ # exist.
225
+ # @param [String] name
226
+ # Required. The name of the document schema to retrieve.
227
+ # @param [String] fields
228
+ # Selector specifying which fields to include in a partial response.
229
+ # @param [String] quota_user
230
+ # Available to use for quota purposes for server-side applications. Can be any
231
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
232
+ # @param [Google::Apis::RequestOptions] options
233
+ # Request-specific options
234
+ #
235
+ # @yield [result, err] Result & error if block supplied
236
+ # @yieldparam result [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1DocumentSchema] parsed result object
237
+ # @yieldparam err [StandardError] error object if request failed
238
+ #
239
+ # @return [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1DocumentSchema]
240
+ #
241
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
242
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
243
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
244
+ def get_project_location_document_schema(name, fields: nil, quota_user: nil, options: nil, &block)
245
+ command = make_simple_command(:get, 'v1/{+name}', options)
246
+ command.response_representation = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1DocumentSchema::Representation
247
+ command.response_class = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1DocumentSchema
248
+ command.params['name'] = name unless name.nil?
249
+ command.query['fields'] = fields unless fields.nil?
250
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
251
+ execute_or_queue_command(command, &block)
252
+ end
253
+
254
+ # Lists document schemas.
255
+ # @param [String] parent
256
+ # Required. The parent, which owns this collection of document schemas. Format:
257
+ # projects/`project_number`/locations/`location`.
258
+ # @param [Fixnum] page_size
259
+ # The maximum number of document schemas to return. The service may return fewer
260
+ # than this value. If unspecified, at most 50 document schemas will be returned.
261
+ # The maximum value is 1000; values above 1000 will be coerced to 1000.
262
+ # @param [String] page_token
263
+ # A page token, received from a previous `ListDocumentSchemas` call. Provide
264
+ # this to retrieve the subsequent page. When paginating, all other parameters
265
+ # provided to `ListDocumentSchemas` must match the call that provided the page
266
+ # token.
267
+ # @param [String] fields
268
+ # Selector specifying which fields to include in a partial response.
269
+ # @param [String] quota_user
270
+ # Available to use for quota purposes for server-side applications. Can be any
271
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
272
+ # @param [Google::Apis::RequestOptions] options
273
+ # Request-specific options
274
+ #
275
+ # @yield [result, err] Result & error if block supplied
276
+ # @yieldparam result [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1ListDocumentSchemasResponse] parsed result object
277
+ # @yieldparam err [StandardError] error object if request failed
278
+ #
279
+ # @return [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1ListDocumentSchemasResponse]
280
+ #
281
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
282
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
283
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
284
+ def list_project_location_document_schemas(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
285
+ command = make_simple_command(:get, 'v1/{+parent}/documentSchemas', options)
286
+ command.response_representation = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1ListDocumentSchemasResponse::Representation
287
+ command.response_class = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1ListDocumentSchemasResponse
288
+ command.params['parent'] = parent unless parent.nil?
289
+ command.query['pageSize'] = page_size unless page_size.nil?
290
+ command.query['pageToken'] = page_token unless page_token.nil?
291
+ command.query['fields'] = fields unless fields.nil?
292
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
293
+ execute_or_queue_command(command, &block)
294
+ end
295
+
296
+ # Updates a Document Schema. Returns INVALID_ARGUMENT if the name of the
297
+ # Document Schema is non-empty and does not equal the existing name. Supports
298
+ # only appending new properties and updating existing properties will result
299
+ # into INVALID_ARGUMENT.
300
+ # @param [String] name
301
+ # Required. The name of the document schema to update. Format: projects/`
302
+ # project_number`/locations/`location`/documentSchemas/`document_schema_id`.
303
+ # @param [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1UpdateDocumentSchemaRequest] google_cloud_contentwarehouse_v1_update_document_schema_request_object
304
+ # @param [String] fields
305
+ # Selector specifying which fields to include in a partial response.
306
+ # @param [String] quota_user
307
+ # Available to use for quota purposes for server-side applications. Can be any
308
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
309
+ # @param [Google::Apis::RequestOptions] options
310
+ # Request-specific options
311
+ #
312
+ # @yield [result, err] Result & error if block supplied
313
+ # @yieldparam result [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1DocumentSchema] parsed result object
314
+ # @yieldparam err [StandardError] error object if request failed
315
+ #
316
+ # @return [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1DocumentSchema]
317
+ #
318
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
319
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
320
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
321
+ def patch_project_location_document_schema(name, google_cloud_contentwarehouse_v1_update_document_schema_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
322
+ command = make_simple_command(:patch, 'v1/{+name}', options)
323
+ command.request_representation = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1UpdateDocumentSchemaRequest::Representation
324
+ command.request_object = google_cloud_contentwarehouse_v1_update_document_schema_request_object
325
+ command.response_representation = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1DocumentSchema::Representation
326
+ command.response_class = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1DocumentSchema
327
+ command.params['name'] = name unless name.nil?
328
+ command.query['fields'] = fields unless fields.nil?
329
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
330
+ execute_or_queue_command(command, &block)
331
+ end
332
+
333
+ # Creates a document.
334
+ # @param [String] parent
335
+ # Required. The parent name. Format: projects/`project_number`/locations/`
336
+ # location`.
337
+ # @param [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1CreateDocumentRequest] google_cloud_contentwarehouse_v1_create_document_request_object
338
+ # @param [String] fields
339
+ # Selector specifying which fields to include in a partial response.
340
+ # @param [String] quota_user
341
+ # Available to use for quota purposes for server-side applications. Can be any
342
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
343
+ # @param [Google::Apis::RequestOptions] options
344
+ # Request-specific options
345
+ #
346
+ # @yield [result, err] Result & error if block supplied
347
+ # @yieldparam result [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1CreateDocumentResponse] parsed result object
348
+ # @yieldparam err [StandardError] error object if request failed
349
+ #
350
+ # @return [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1CreateDocumentResponse]
351
+ #
352
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
353
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
354
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
355
+ def create_project_location_document(parent, google_cloud_contentwarehouse_v1_create_document_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
356
+ command = make_simple_command(:post, 'v1/{+parent}/documents', options)
357
+ command.request_representation = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1CreateDocumentRequest::Representation
358
+ command.request_object = google_cloud_contentwarehouse_v1_create_document_request_object
359
+ command.response_representation = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1CreateDocumentResponse::Representation
360
+ command.response_class = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1CreateDocumentResponse
361
+ command.params['parent'] = parent unless parent.nil?
362
+ command.query['fields'] = fields unless fields.nil?
363
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
364
+ execute_or_queue_command(command, &block)
365
+ end
366
+
367
+ # Deletes a document. Returns NOT_FOUND if the document does not exist.
368
+ # @param [String] name
369
+ # Required. The name of the document to delete. Format: projects/`project_number`
370
+ # /locations/`location`/documents/`document_id` or projects/`project_number`/
371
+ # locations/`location`/documents/referenceId/`reference_id`.
372
+ # @param [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1DeleteDocumentRequest] google_cloud_contentwarehouse_v1_delete_document_request_object
373
+ # @param [String] fields
374
+ # Selector specifying which fields to include in a partial response.
375
+ # @param [String] quota_user
376
+ # Available to use for quota purposes for server-side applications. Can be any
377
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
378
+ # @param [Google::Apis::RequestOptions] options
379
+ # Request-specific options
380
+ #
381
+ # @yield [result, err] Result & error if block supplied
382
+ # @yieldparam result [Google::Apis::ContentwarehouseV1::GoogleProtobufEmpty] parsed result object
383
+ # @yieldparam err [StandardError] error object if request failed
384
+ #
385
+ # @return [Google::Apis::ContentwarehouseV1::GoogleProtobufEmpty]
386
+ #
387
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
388
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
389
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
390
+ def delete_project_location_document(name, google_cloud_contentwarehouse_v1_delete_document_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
391
+ command = make_simple_command(:post, 'v1/{+name}:delete', options)
392
+ command.request_representation = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1DeleteDocumentRequest::Representation
393
+ command.request_object = google_cloud_contentwarehouse_v1_delete_document_request_object
394
+ command.response_representation = Google::Apis::ContentwarehouseV1::GoogleProtobufEmpty::Representation
395
+ command.response_class = Google::Apis::ContentwarehouseV1::GoogleProtobufEmpty
396
+ command.params['name'] = name unless name.nil?
397
+ command.query['fields'] = fields unless fields.nil?
398
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
399
+ execute_or_queue_command(command, &block)
400
+ end
401
+
402
+ # Gets the access control policy for a resource. Returns NOT_FOUND error if the
403
+ # resource does not exist. Returns an empty policy if the resource exists but
404
+ # does not have a policy set.
405
+ # @param [String] resource
406
+ # Required. REQUIRED: The resource for which the policy is being requested.
407
+ # Format for document: projects/`project_number`/locations/`location`/documents/`
408
+ # document_id`. Format for project: projects/`project_number`.
409
+ # @param [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1FetchAclRequest] google_cloud_contentwarehouse_v1_fetch_acl_request_object
410
+ # @param [String] fields
411
+ # Selector specifying which fields to include in a partial response.
412
+ # @param [String] quota_user
413
+ # Available to use for quota purposes for server-side applications. Can be any
414
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
415
+ # @param [Google::Apis::RequestOptions] options
416
+ # Request-specific options
417
+ #
418
+ # @yield [result, err] Result & error if block supplied
419
+ # @yieldparam result [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1FetchAclResponse] parsed result object
420
+ # @yieldparam err [StandardError] error object if request failed
421
+ #
422
+ # @return [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1FetchAclResponse]
423
+ #
424
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
425
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
426
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
427
+ def fetch_project_location_document_acl(resource, google_cloud_contentwarehouse_v1_fetch_acl_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
428
+ command = make_simple_command(:post, 'v1/{+resource}:fetchAcl', options)
429
+ command.request_representation = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1FetchAclRequest::Representation
430
+ command.request_object = google_cloud_contentwarehouse_v1_fetch_acl_request_object
431
+ command.response_representation = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1FetchAclResponse::Representation
432
+ command.response_class = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1FetchAclResponse
433
+ command.params['resource'] = resource unless resource.nil?
434
+ command.query['fields'] = fields unless fields.nil?
435
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
436
+ execute_or_queue_command(command, &block)
437
+ end
438
+
439
+ # Gets a document. Returns NOT_FOUND if the document does not exist.
440
+ # @param [String] name
441
+ # Required. The name of the document to retrieve. Format: projects/`
442
+ # project_number`/locations/`location`/documents/`document_id` or projects/`
443
+ # project_number`/locations/`location`/documents/referenceId/`reference_id`.
444
+ # @param [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1GetDocumentRequest] google_cloud_contentwarehouse_v1_get_document_request_object
445
+ # @param [String] fields
446
+ # Selector specifying which fields to include in a partial response.
447
+ # @param [String] quota_user
448
+ # Available to use for quota purposes for server-side applications. Can be any
449
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
450
+ # @param [Google::Apis::RequestOptions] options
451
+ # Request-specific options
452
+ #
453
+ # @yield [result, err] Result & error if block supplied
454
+ # @yieldparam result [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1Document] parsed result object
455
+ # @yieldparam err [StandardError] error object if request failed
456
+ #
457
+ # @return [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1Document]
458
+ #
459
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
460
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
461
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
462
+ def get_project_location_document(name, google_cloud_contentwarehouse_v1_get_document_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
463
+ command = make_simple_command(:post, 'v1/{+name}:get', options)
464
+ command.request_representation = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1GetDocumentRequest::Representation
465
+ command.request_object = google_cloud_contentwarehouse_v1_get_document_request_object
466
+ command.response_representation = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1Document::Representation
467
+ command.response_class = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1Document
468
+ command.params['name'] = name unless name.nil?
469
+ command.query['fields'] = fields unless fields.nil?
470
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
471
+ execute_or_queue_command(command, &block)
472
+ end
473
+
474
+ # Return all source document-links from the document.
475
+ # @param [String] parent
476
+ # Required. The name of the document, for which all source links are returned.
477
+ # Format: projects/`project_number`/locations/`location`/documents/`
478
+ # source_document_id`.
479
+ # @param [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1ListLinkedSourcesRequest] google_cloud_contentwarehouse_v1_list_linked_sources_request_object
480
+ # @param [String] fields
481
+ # Selector specifying which fields to include in a partial response.
482
+ # @param [String] quota_user
483
+ # Available to use for quota purposes for server-side applications. Can be any
484
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
485
+ # @param [Google::Apis::RequestOptions] options
486
+ # Request-specific options
487
+ #
488
+ # @yield [result, err] Result & error if block supplied
489
+ # @yieldparam result [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1ListLinkedSourcesResponse] parsed result object
490
+ # @yieldparam err [StandardError] error object if request failed
491
+ #
492
+ # @return [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1ListLinkedSourcesResponse]
493
+ #
494
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
495
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
496
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
497
+ def linked_project_location_document_sources(parent, google_cloud_contentwarehouse_v1_list_linked_sources_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
498
+ command = make_simple_command(:post, 'v1/{+parent}/linkedSources', options)
499
+ command.request_representation = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1ListLinkedSourcesRequest::Representation
500
+ command.request_object = google_cloud_contentwarehouse_v1_list_linked_sources_request_object
501
+ command.response_representation = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1ListLinkedSourcesResponse::Representation
502
+ command.response_class = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1ListLinkedSourcesResponse
503
+ command.params['parent'] = parent unless parent.nil?
504
+ command.query['fields'] = fields unless fields.nil?
505
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
506
+ execute_or_queue_command(command, &block)
507
+ end
508
+
509
+ # Return all target document-links from the document.
510
+ # @param [String] parent
511
+ # Required. The name of the document, for which all target links are returned.
512
+ # Format: projects/`project_number`/locations/`location`/documents/`
513
+ # target_document_id`.
514
+ # @param [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1ListLinkedTargetsRequest] google_cloud_contentwarehouse_v1_list_linked_targets_request_object
515
+ # @param [String] fields
516
+ # Selector specifying which fields to include in a partial response.
517
+ # @param [String] quota_user
518
+ # Available to use for quota purposes for server-side applications. Can be any
519
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
520
+ # @param [Google::Apis::RequestOptions] options
521
+ # Request-specific options
522
+ #
523
+ # @yield [result, err] Result & error if block supplied
524
+ # @yieldparam result [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1ListLinkedTargetsResponse] parsed result object
525
+ # @yieldparam err [StandardError] error object if request failed
526
+ #
527
+ # @return [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1ListLinkedTargetsResponse]
528
+ #
529
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
530
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
531
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
532
+ def linked_project_location_document_targets(parent, google_cloud_contentwarehouse_v1_list_linked_targets_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
533
+ command = make_simple_command(:post, 'v1/{+parent}/linkedTargets', options)
534
+ command.request_representation = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1ListLinkedTargetsRequest::Representation
535
+ command.request_object = google_cloud_contentwarehouse_v1_list_linked_targets_request_object
536
+ command.response_representation = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1ListLinkedTargetsResponse::Representation
537
+ command.response_class = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1ListLinkedTargetsResponse
538
+ command.params['parent'] = parent unless parent.nil?
539
+ command.query['fields'] = fields unless fields.nil?
540
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
541
+ execute_or_queue_command(command, &block)
542
+ end
543
+
544
+ # Updates a document. Returns INVALID_ARGUMENT if the name of the document is
545
+ # non-empty and does not equal the existing name.
546
+ # @param [String] name
547
+ # Required. The name of the document to update. Format: projects/`project_number`
548
+ # /locations/`location`/documents/`document_id` or projects/`project_number`/
549
+ # locations/`location`/documents/referenceId/`reference_id`.
550
+ # @param [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1UpdateDocumentRequest] google_cloud_contentwarehouse_v1_update_document_request_object
551
+ # @param [String] fields
552
+ # Selector specifying which fields to include in a partial response.
553
+ # @param [String] quota_user
554
+ # Available to use for quota purposes for server-side applications. Can be any
555
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
556
+ # @param [Google::Apis::RequestOptions] options
557
+ # Request-specific options
558
+ #
559
+ # @yield [result, err] Result & error if block supplied
560
+ # @yieldparam result [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1UpdateDocumentResponse] parsed result object
561
+ # @yieldparam err [StandardError] error object if request failed
562
+ #
563
+ # @return [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1UpdateDocumentResponse]
564
+ #
565
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
566
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
567
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
568
+ def patch_project_location_document(name, google_cloud_contentwarehouse_v1_update_document_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
569
+ command = make_simple_command(:patch, 'v1/{+name}', options)
570
+ command.request_representation = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1UpdateDocumentRequest::Representation
571
+ command.request_object = google_cloud_contentwarehouse_v1_update_document_request_object
572
+ command.response_representation = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1UpdateDocumentResponse::Representation
573
+ command.response_class = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1UpdateDocumentResponse
574
+ command.params['name'] = name unless name.nil?
575
+ command.query['fields'] = fields unless fields.nil?
576
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
577
+ execute_or_queue_command(command, &block)
578
+ end
579
+
580
+ # Searches for documents using provided SearchDocumentsRequest. This call only
581
+ # returns documents that the caller has permission to search against.
582
+ # @param [String] parent
583
+ # Required. The parent, which owns this collection of documents. Format:
584
+ # projects/`project_number`/locations/`location`.
585
+ # @param [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1SearchDocumentsRequest] google_cloud_contentwarehouse_v1_search_documents_request_object
586
+ # @param [String] fields
587
+ # Selector specifying which fields to include in a partial response.
588
+ # @param [String] quota_user
589
+ # Available to use for quota purposes for server-side applications. Can be any
590
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
591
+ # @param [Google::Apis::RequestOptions] options
592
+ # Request-specific options
593
+ #
594
+ # @yield [result, err] Result & error if block supplied
595
+ # @yieldparam result [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1SearchDocumentsResponse] parsed result object
596
+ # @yieldparam err [StandardError] error object if request failed
597
+ #
598
+ # @return [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1SearchDocumentsResponse]
599
+ #
600
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
601
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
602
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
603
+ def search_project_location_documents(parent, google_cloud_contentwarehouse_v1_search_documents_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
604
+ command = make_simple_command(:post, 'v1/{+parent}/documents:search', options)
605
+ command.request_representation = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1SearchDocumentsRequest::Representation
606
+ command.request_object = google_cloud_contentwarehouse_v1_search_documents_request_object
607
+ command.response_representation = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1SearchDocumentsResponse::Representation
608
+ command.response_class = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1SearchDocumentsResponse
609
+ command.params['parent'] = parent unless parent.nil?
610
+ command.query['fields'] = fields unless fields.nil?
611
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
612
+ execute_or_queue_command(command, &block)
613
+ end
614
+
615
+ # Sets the access control policy for a resource. Replaces any existing policy.
616
+ # @param [String] resource
617
+ # Required. REQUIRED: The resource for which the policy is being requested.
618
+ # Format for document: projects/`project_number`/locations/`location`/documents/`
619
+ # document_id`. Format for project: projects/`project_number`.
620
+ # @param [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1SetAclRequest] google_cloud_contentwarehouse_v1_set_acl_request_object
621
+ # @param [String] fields
622
+ # Selector specifying which fields to include in a partial response.
623
+ # @param [String] quota_user
624
+ # Available to use for quota purposes for server-side applications. Can be any
625
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
626
+ # @param [Google::Apis::RequestOptions] options
627
+ # Request-specific options
628
+ #
629
+ # @yield [result, err] Result & error if block supplied
630
+ # @yieldparam result [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1SetAclResponse] parsed result object
631
+ # @yieldparam err [StandardError] error object if request failed
632
+ #
633
+ # @return [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1SetAclResponse]
634
+ #
635
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
636
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
637
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
638
+ def set_project_location_document_acl(resource, google_cloud_contentwarehouse_v1_set_acl_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
639
+ command = make_simple_command(:post, 'v1/{+resource}:setAcl', options)
640
+ command.request_representation = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1SetAclRequest::Representation
641
+ command.request_object = google_cloud_contentwarehouse_v1_set_acl_request_object
642
+ command.response_representation = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1SetAclResponse::Representation
643
+ command.response_class = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1SetAclResponse
644
+ command.params['resource'] = resource unless resource.nil?
645
+ command.query['fields'] = fields unless fields.nil?
646
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
647
+ execute_or_queue_command(command, &block)
648
+ end
649
+
650
+ # Create a link between a source document and a target document.
651
+ # @param [String] parent
652
+ # Required. Parent of the document-link to be created. parent of document-link
653
+ # should be a document. Format: projects/`project_number`/locations/`location`/
654
+ # documents/`source_document_id`.
655
+ # @param [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1CreateDocumentLinkRequest] google_cloud_contentwarehouse_v1_create_document_link_request_object
656
+ # @param [String] fields
657
+ # Selector specifying which fields to include in a partial response.
658
+ # @param [String] quota_user
659
+ # Available to use for quota purposes for server-side applications. Can be any
660
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
661
+ # @param [Google::Apis::RequestOptions] options
662
+ # Request-specific options
663
+ #
664
+ # @yield [result, err] Result & error if block supplied
665
+ # @yieldparam result [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1DocumentLink] parsed result object
666
+ # @yieldparam err [StandardError] error object if request failed
667
+ #
668
+ # @return [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1DocumentLink]
669
+ #
670
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
671
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
672
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
673
+ def create_project_location_document_document_link(parent, google_cloud_contentwarehouse_v1_create_document_link_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
674
+ command = make_simple_command(:post, 'v1/{+parent}/documentLinks', options)
675
+ command.request_representation = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1CreateDocumentLinkRequest::Representation
676
+ command.request_object = google_cloud_contentwarehouse_v1_create_document_link_request_object
677
+ command.response_representation = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1DocumentLink::Representation
678
+ command.response_class = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1DocumentLink
679
+ command.params['parent'] = parent unless parent.nil?
680
+ command.query['fields'] = fields unless fields.nil?
681
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
682
+ execute_or_queue_command(command, &block)
683
+ end
684
+
685
+ # Remove the link between the source and target documents.
686
+ # @param [String] name
687
+ # Required. The name of the document-link to be deleted. Format: projects/`
688
+ # project_number`/locations/`location`/documents/`source_document_id`/
689
+ # documentLinks/`document_link_id`.
690
+ # @param [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1DeleteDocumentLinkRequest] google_cloud_contentwarehouse_v1_delete_document_link_request_object
691
+ # @param [String] fields
692
+ # Selector specifying which fields to include in a partial response.
693
+ # @param [String] quota_user
694
+ # Available to use for quota purposes for server-side applications. Can be any
695
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
696
+ # @param [Google::Apis::RequestOptions] options
697
+ # Request-specific options
698
+ #
699
+ # @yield [result, err] Result & error if block supplied
700
+ # @yieldparam result [Google::Apis::ContentwarehouseV1::GoogleProtobufEmpty] parsed result object
701
+ # @yieldparam err [StandardError] error object if request failed
702
+ #
703
+ # @return [Google::Apis::ContentwarehouseV1::GoogleProtobufEmpty]
704
+ #
705
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
706
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
707
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
708
+ def delete_project_location_document_document_link(name, google_cloud_contentwarehouse_v1_delete_document_link_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
709
+ command = make_simple_command(:post, 'v1/{+name}:delete', options)
710
+ command.request_representation = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1DeleteDocumentLinkRequest::Representation
711
+ command.request_object = google_cloud_contentwarehouse_v1_delete_document_link_request_object
712
+ command.response_representation = Google::Apis::ContentwarehouseV1::GoogleProtobufEmpty::Representation
713
+ command.response_class = Google::Apis::ContentwarehouseV1::GoogleProtobufEmpty
714
+ command.params['name'] = name unless name.nil?
715
+ command.query['fields'] = fields unless fields.nil?
716
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
717
+ execute_or_queue_command(command, &block)
718
+ end
719
+
720
+ # Deletes a document. Returns NOT_FOUND if the document does not exist.
721
+ # @param [String] name
722
+ # Required. The name of the document to delete. Format: projects/`project_number`
723
+ # /locations/`location`/documents/`document_id` or projects/`project_number`/
724
+ # locations/`location`/documents/referenceId/`reference_id`.
725
+ # @param [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1DeleteDocumentRequest] google_cloud_contentwarehouse_v1_delete_document_request_object
726
+ # @param [String] fields
727
+ # Selector specifying which fields to include in a partial response.
728
+ # @param [String] quota_user
729
+ # Available to use for quota purposes for server-side applications. Can be any
730
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
731
+ # @param [Google::Apis::RequestOptions] options
732
+ # Request-specific options
733
+ #
734
+ # @yield [result, err] Result & error if block supplied
735
+ # @yieldparam result [Google::Apis::ContentwarehouseV1::GoogleProtobufEmpty] parsed result object
736
+ # @yieldparam err [StandardError] error object if request failed
737
+ #
738
+ # @return [Google::Apis::ContentwarehouseV1::GoogleProtobufEmpty]
739
+ #
740
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
741
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
742
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
743
+ def delete_project_location_document_reference_id(name, google_cloud_contentwarehouse_v1_delete_document_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
744
+ command = make_simple_command(:post, 'v1/{+name}:delete', options)
745
+ command.request_representation = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1DeleteDocumentRequest::Representation
746
+ command.request_object = google_cloud_contentwarehouse_v1_delete_document_request_object
747
+ command.response_representation = Google::Apis::ContentwarehouseV1::GoogleProtobufEmpty::Representation
748
+ command.response_class = Google::Apis::ContentwarehouseV1::GoogleProtobufEmpty
749
+ command.params['name'] = name unless name.nil?
750
+ command.query['fields'] = fields unless fields.nil?
751
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
752
+ execute_or_queue_command(command, &block)
753
+ end
754
+
755
+ # Gets a document. Returns NOT_FOUND if the document does not exist.
756
+ # @param [String] name
757
+ # Required. The name of the document to retrieve. Format: projects/`
758
+ # project_number`/locations/`location`/documents/`document_id` or projects/`
759
+ # project_number`/locations/`location`/documents/referenceId/`reference_id`.
760
+ # @param [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1GetDocumentRequest] google_cloud_contentwarehouse_v1_get_document_request_object
761
+ # @param [String] fields
762
+ # Selector specifying which fields to include in a partial response.
763
+ # @param [String] quota_user
764
+ # Available to use for quota purposes for server-side applications. Can be any
765
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
766
+ # @param [Google::Apis::RequestOptions] options
767
+ # Request-specific options
768
+ #
769
+ # @yield [result, err] Result & error if block supplied
770
+ # @yieldparam result [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1Document] parsed result object
771
+ # @yieldparam err [StandardError] error object if request failed
772
+ #
773
+ # @return [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1Document]
774
+ #
775
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
776
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
777
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
778
+ def get_project_location_document_reference_id(name, google_cloud_contentwarehouse_v1_get_document_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
779
+ command = make_simple_command(:post, 'v1/{+name}:get', options)
780
+ command.request_representation = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1GetDocumentRequest::Representation
781
+ command.request_object = google_cloud_contentwarehouse_v1_get_document_request_object
782
+ command.response_representation = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1Document::Representation
783
+ command.response_class = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1Document
784
+ command.params['name'] = name unless name.nil?
785
+ command.query['fields'] = fields unless fields.nil?
786
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
787
+ execute_or_queue_command(command, &block)
788
+ end
789
+
790
+ # Updates a document. Returns INVALID_ARGUMENT if the name of the document is
791
+ # non-empty and does not equal the existing name.
792
+ # @param [String] name
793
+ # Required. The name of the document to update. Format: projects/`project_number`
794
+ # /locations/`location`/documents/`document_id` or projects/`project_number`/
795
+ # locations/`location`/documents/referenceId/`reference_id`.
796
+ # @param [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1UpdateDocumentRequest] google_cloud_contentwarehouse_v1_update_document_request_object
797
+ # @param [String] fields
798
+ # Selector specifying which fields to include in a partial response.
799
+ # @param [String] quota_user
800
+ # Available to use for quota purposes for server-side applications. Can be any
801
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
802
+ # @param [Google::Apis::RequestOptions] options
803
+ # Request-specific options
804
+ #
805
+ # @yield [result, err] Result & error if block supplied
806
+ # @yieldparam result [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1UpdateDocumentResponse] parsed result object
807
+ # @yieldparam err [StandardError] error object if request failed
808
+ #
809
+ # @return [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1UpdateDocumentResponse]
810
+ #
811
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
812
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
813
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
814
+ def patch_project_location_document_reference_id(name, google_cloud_contentwarehouse_v1_update_document_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
815
+ command = make_simple_command(:patch, 'v1/{+name}', options)
816
+ command.request_representation = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1UpdateDocumentRequest::Representation
817
+ command.request_object = google_cloud_contentwarehouse_v1_update_document_request_object
818
+ command.response_representation = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1UpdateDocumentResponse::Representation
819
+ command.response_class = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1UpdateDocumentResponse
820
+ command.params['name'] = name unless name.nil?
821
+ command.query['fields'] = fields unless fields.nil?
822
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
823
+ execute_or_queue_command(command, &block)
824
+ end
825
+
826
+ # Creates a ruleset.
827
+ # @param [String] parent
828
+ # Required. The parent name. Format: projects/`project_number`/locations/`
829
+ # location`.
830
+ # @param [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1RuleSet] google_cloud_contentwarehouse_v1_rule_set_object
831
+ # @param [String] fields
832
+ # Selector specifying which fields to include in a partial response.
833
+ # @param [String] quota_user
834
+ # Available to use for quota purposes for server-side applications. Can be any
835
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
836
+ # @param [Google::Apis::RequestOptions] options
837
+ # Request-specific options
838
+ #
839
+ # @yield [result, err] Result & error if block supplied
840
+ # @yieldparam result [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1RuleSet] parsed result object
841
+ # @yieldparam err [StandardError] error object if request failed
842
+ #
843
+ # @return [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1RuleSet]
844
+ #
845
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
846
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
847
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
848
+ def create_project_location_rule_set(parent, google_cloud_contentwarehouse_v1_rule_set_object = nil, fields: nil, quota_user: nil, options: nil, &block)
849
+ command = make_simple_command(:post, 'v1/{+parent}/ruleSets', options)
850
+ command.request_representation = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1RuleSet::Representation
851
+ command.request_object = google_cloud_contentwarehouse_v1_rule_set_object
852
+ command.response_representation = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1RuleSet::Representation
853
+ command.response_class = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1RuleSet
854
+ command.params['parent'] = parent unless parent.nil?
855
+ command.query['fields'] = fields unless fields.nil?
856
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
857
+ execute_or_queue_command(command, &block)
858
+ end
859
+
860
+ # Deletes a ruleset. Returns NOT_FOUND if the document does not exist.
861
+ # @param [String] name
862
+ # Required. The name of the rule set to delete. Format: projects/`project_number`
863
+ # /locations/`location`/ruleSets/`rule_set_id`.
864
+ # @param [String] fields
865
+ # Selector specifying which fields to include in a partial response.
866
+ # @param [String] quota_user
867
+ # Available to use for quota purposes for server-side applications. Can be any
868
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
869
+ # @param [Google::Apis::RequestOptions] options
870
+ # Request-specific options
871
+ #
872
+ # @yield [result, err] Result & error if block supplied
873
+ # @yieldparam result [Google::Apis::ContentwarehouseV1::GoogleProtobufEmpty] parsed result object
874
+ # @yieldparam err [StandardError] error object if request failed
875
+ #
876
+ # @return [Google::Apis::ContentwarehouseV1::GoogleProtobufEmpty]
877
+ #
878
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
879
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
880
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
881
+ def delete_project_location_rule_set(name, fields: nil, quota_user: nil, options: nil, &block)
882
+ command = make_simple_command(:delete, 'v1/{+name}', options)
883
+ command.response_representation = Google::Apis::ContentwarehouseV1::GoogleProtobufEmpty::Representation
884
+ command.response_class = Google::Apis::ContentwarehouseV1::GoogleProtobufEmpty
885
+ command.params['name'] = name unless name.nil?
886
+ command.query['fields'] = fields unless fields.nil?
887
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
888
+ execute_or_queue_command(command, &block)
889
+ end
890
+
891
+ # Gets a ruleset. Returns NOT_FOUND if the ruleset does not exist.
892
+ # @param [String] name
893
+ # Required. The name of the rule set to retrieve. Format: projects/`
894
+ # project_number`/locations/`location`/ruleSets/`rule_set_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::ContentwarehouseV1::GoogleCloudContentwarehouseV1RuleSet] parsed result object
905
+ # @yieldparam err [StandardError] error object if request failed
906
+ #
907
+ # @return [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1RuleSet]
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 get_project_location_rule_set(name, fields: nil, quota_user: nil, options: nil, &block)
913
+ command = make_simple_command(:get, 'v1/{+name}', options)
914
+ command.response_representation = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1RuleSet::Representation
915
+ command.response_class = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1RuleSet
916
+ command.params['name'] = name unless name.nil?
917
+ command.query['fields'] = fields unless fields.nil?
918
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
919
+ execute_or_queue_command(command, &block)
920
+ end
921
+
922
+ # Lists rulesets.
923
+ # @param [String] parent
924
+ # Required. The parent, which owns this collection of document. Format: projects/
925
+ # `project_number`/locations/`location`.
926
+ # @param [Fixnum] page_size
927
+ # The maximum number of rule sets to return. The service may return fewer than
928
+ # this value. If unspecified, at most 50 rule sets will be returned. The maximum
929
+ # value is 1000; values above 1000 will be coerced to 1000.
930
+ # @param [String] page_token
931
+ # A page token, received from a previous `ListRuleSets` call. Provide this to
932
+ # retrieve the subsequent page. When paginating, all other parameters provided
933
+ # to `ListRuleSets` must match the call that provided the page token.
934
+ # @param [String] fields
935
+ # Selector specifying which fields to include in a partial response.
936
+ # @param [String] quota_user
937
+ # Available to use for quota purposes for server-side applications. Can be any
938
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
939
+ # @param [Google::Apis::RequestOptions] options
940
+ # Request-specific options
941
+ #
942
+ # @yield [result, err] Result & error if block supplied
943
+ # @yieldparam result [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1ListRuleSetsResponse] parsed result object
944
+ # @yieldparam err [StandardError] error object if request failed
945
+ #
946
+ # @return [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1ListRuleSetsResponse]
947
+ #
948
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
949
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
950
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
951
+ def list_project_location_rule_sets(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
952
+ command = make_simple_command(:get, 'v1/{+parent}/ruleSets', options)
953
+ command.response_representation = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1ListRuleSetsResponse::Representation
954
+ command.response_class = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1ListRuleSetsResponse
955
+ command.params['parent'] = parent unless parent.nil?
956
+ command.query['pageSize'] = page_size unless page_size.nil?
957
+ command.query['pageToken'] = page_token unless page_token.nil?
958
+ command.query['fields'] = fields unless fields.nil?
959
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
960
+ execute_or_queue_command(command, &block)
961
+ end
962
+
963
+ # Updates a ruleset. Returns INVALID_ARGUMENT if the name of the ruleset is non-
964
+ # empty and does not equal the existing name.
965
+ # @param [String] name
966
+ # Required. The name of the rule set to update. Format: projects/`project_number`
967
+ # /locations/`location`/ruleSets/`rule_set_id`.
968
+ # @param [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1UpdateRuleSetRequest] google_cloud_contentwarehouse_v1_update_rule_set_request_object
969
+ # @param [String] fields
970
+ # Selector specifying which fields to include in a partial response.
971
+ # @param [String] quota_user
972
+ # Available to use for quota purposes for server-side applications. Can be any
973
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
974
+ # @param [Google::Apis::RequestOptions] options
975
+ # Request-specific options
976
+ #
977
+ # @yield [result, err] Result & error if block supplied
978
+ # @yieldparam result [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1RuleSet] parsed result object
979
+ # @yieldparam err [StandardError] error object if request failed
980
+ #
981
+ # @return [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1RuleSet]
982
+ #
983
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
984
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
985
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
986
+ def patch_project_location_rule_set(name, google_cloud_contentwarehouse_v1_update_rule_set_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
987
+ command = make_simple_command(:patch, 'v1/{+name}', options)
988
+ command.request_representation = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1UpdateRuleSetRequest::Representation
989
+ command.request_object = google_cloud_contentwarehouse_v1_update_rule_set_request_object
990
+ command.response_representation = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1RuleSet::Representation
991
+ command.response_class = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1RuleSet
992
+ command.params['name'] = name unless name.nil?
993
+ command.query['fields'] = fields unless fields.nil?
994
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
995
+ execute_or_queue_command(command, &block)
996
+ end
997
+
998
+ # Creates a SynonymSet for a single context. Throws an ALREADY_EXISTS exception
999
+ # if a synonymset already exists for the context.
1000
+ # @param [String] parent
1001
+ # Required. The parent name. Format: projects/`project_number`/locations/`
1002
+ # location`.
1003
+ # @param [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1SynonymSet] google_cloud_contentwarehouse_v1_synonym_set_object
1004
+ # @param [String] fields
1005
+ # Selector specifying which fields to include in a partial response.
1006
+ # @param [String] quota_user
1007
+ # Available to use for quota purposes for server-side applications. Can be any
1008
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1009
+ # @param [Google::Apis::RequestOptions] options
1010
+ # Request-specific options
1011
+ #
1012
+ # @yield [result, err] Result & error if block supplied
1013
+ # @yieldparam result [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1SynonymSet] parsed result object
1014
+ # @yieldparam err [StandardError] error object if request failed
1015
+ #
1016
+ # @return [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1SynonymSet]
1017
+ #
1018
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1019
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1020
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1021
+ def create_project_location_synonym_set(parent, google_cloud_contentwarehouse_v1_synonym_set_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1022
+ command = make_simple_command(:post, 'v1/{+parent}/synonymSets', options)
1023
+ command.request_representation = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1SynonymSet::Representation
1024
+ command.request_object = google_cloud_contentwarehouse_v1_synonym_set_object
1025
+ command.response_representation = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1SynonymSet::Representation
1026
+ command.response_class = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1SynonymSet
1027
+ command.params['parent'] = parent unless parent.nil?
1028
+ command.query['fields'] = fields unless fields.nil?
1029
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1030
+ execute_or_queue_command(command, &block)
1031
+ end
1032
+
1033
+ # Deletes a SynonymSet for a given context. Throws a NOT_FOUND exception if the
1034
+ # SynonymSet is not found.
1035
+ # @param [String] name
1036
+ # Required. The name of the synonymSet to delete Format: projects/`
1037
+ # project_number`/locations/`location`/synonymSets/`context`.
1038
+ # @param [String] fields
1039
+ # Selector specifying which fields to include in a partial response.
1040
+ # @param [String] quota_user
1041
+ # Available to use for quota purposes for server-side applications. Can be any
1042
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1043
+ # @param [Google::Apis::RequestOptions] options
1044
+ # Request-specific options
1045
+ #
1046
+ # @yield [result, err] Result & error if block supplied
1047
+ # @yieldparam result [Google::Apis::ContentwarehouseV1::GoogleProtobufEmpty] parsed result object
1048
+ # @yieldparam err [StandardError] error object if request failed
1049
+ #
1050
+ # @return [Google::Apis::ContentwarehouseV1::GoogleProtobufEmpty]
1051
+ #
1052
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1053
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1054
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1055
+ def delete_project_location_synonym_set(name, fields: nil, quota_user: nil, options: nil, &block)
1056
+ command = make_simple_command(:delete, 'v1/{+name}', options)
1057
+ command.response_representation = Google::Apis::ContentwarehouseV1::GoogleProtobufEmpty::Representation
1058
+ command.response_class = Google::Apis::ContentwarehouseV1::GoogleProtobufEmpty
1059
+ command.params['name'] = name unless name.nil?
1060
+ command.query['fields'] = fields unless fields.nil?
1061
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1062
+ execute_or_queue_command(command, &block)
1063
+ end
1064
+
1065
+ # Gets a SynonymSet for a particular context. Throws a NOT_FOUND exception if
1066
+ # the Synonymset does not exist
1067
+ # @param [String] name
1068
+ # Required. The name of the synonymSet to retrieve Format: projects/`
1069
+ # project_number`/locations/`location`/synonymSets/`context`.
1070
+ # @param [String] fields
1071
+ # Selector specifying which fields to include in a partial response.
1072
+ # @param [String] quota_user
1073
+ # Available to use for quota purposes for server-side applications. Can be any
1074
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1075
+ # @param [Google::Apis::RequestOptions] options
1076
+ # Request-specific options
1077
+ #
1078
+ # @yield [result, err] Result & error if block supplied
1079
+ # @yieldparam result [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1SynonymSet] parsed result object
1080
+ # @yieldparam err [StandardError] error object if request failed
1081
+ #
1082
+ # @return [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1SynonymSet]
1083
+ #
1084
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1085
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1086
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1087
+ def get_project_location_synonym_set(name, fields: nil, quota_user: nil, options: nil, &block)
1088
+ command = make_simple_command(:get, 'v1/{+name}', options)
1089
+ command.response_representation = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1SynonymSet::Representation
1090
+ command.response_class = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1SynonymSet
1091
+ command.params['name'] = name unless name.nil?
1092
+ command.query['fields'] = fields unless fields.nil?
1093
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1094
+ execute_or_queue_command(command, &block)
1095
+ end
1096
+
1097
+ # Returns all SynonymSets (for all contexts) for the specified location.
1098
+ # @param [String] parent
1099
+ # Required. The parent name. Format: projects/`project_number`/locations/`
1100
+ # location`.
1101
+ # @param [Fixnum] page_size
1102
+ # The maximum number of synonymSets to return. The service may return fewer than
1103
+ # this value. If unspecified, at most 50 rule sets will be returned. The maximum
1104
+ # value is 1000; values above 1000 will be coerced to 1000.
1105
+ # @param [String] page_token
1106
+ # A page token, received from a previous `ListSynonymSets` call. Provide this to
1107
+ # retrieve the subsequent page. When paginating, all other parameters provided
1108
+ # to `ListSynonymSets` must match the call that provided the page token.
1109
+ # @param [String] fields
1110
+ # Selector specifying which fields to include in a partial response.
1111
+ # @param [String] quota_user
1112
+ # Available to use for quota purposes for server-side applications. Can be any
1113
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1114
+ # @param [Google::Apis::RequestOptions] options
1115
+ # Request-specific options
1116
+ #
1117
+ # @yield [result, err] Result & error if block supplied
1118
+ # @yieldparam result [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1ListSynonymSetsResponse] parsed result object
1119
+ # @yieldparam err [StandardError] error object if request failed
1120
+ #
1121
+ # @return [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1ListSynonymSetsResponse]
1122
+ #
1123
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1124
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1125
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1126
+ def list_project_location_synonym_sets(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1127
+ command = make_simple_command(:get, 'v1/{+parent}/synonymSets', options)
1128
+ command.response_representation = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1ListSynonymSetsResponse::Representation
1129
+ command.response_class = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1ListSynonymSetsResponse
1130
+ command.params['parent'] = parent unless parent.nil?
1131
+ command.query['pageSize'] = page_size unless page_size.nil?
1132
+ command.query['pageToken'] = page_token unless page_token.nil?
1133
+ command.query['fields'] = fields unless fields.nil?
1134
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1135
+ execute_or_queue_command(command, &block)
1136
+ end
1137
+
1138
+ # Remove the existing SynonymSet for the context and replaces it with a new one.
1139
+ # Throws a NOT_FOUND exception if the SynonymSet is not found.
1140
+ # @param [String] name
1141
+ # Required. The name of the synonymSet to update Format: projects/`
1142
+ # project_number`/locations/`location`/synonymSets/`context`.
1143
+ # @param [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1SynonymSet] google_cloud_contentwarehouse_v1_synonym_set_object
1144
+ # @param [String] fields
1145
+ # Selector specifying which fields to include in a partial response.
1146
+ # @param [String] quota_user
1147
+ # Available to use for quota purposes for server-side applications. Can be any
1148
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1149
+ # @param [Google::Apis::RequestOptions] options
1150
+ # Request-specific options
1151
+ #
1152
+ # @yield [result, err] Result & error if block supplied
1153
+ # @yieldparam result [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1SynonymSet] parsed result object
1154
+ # @yieldparam err [StandardError] error object if request failed
1155
+ #
1156
+ # @return [Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1SynonymSet]
1157
+ #
1158
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1159
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1160
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1161
+ def patch_project_location_synonym_set(name, google_cloud_contentwarehouse_v1_synonym_set_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1162
+ command = make_simple_command(:patch, 'v1/{+name}', options)
1163
+ command.request_representation = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1SynonymSet::Representation
1164
+ command.request_object = google_cloud_contentwarehouse_v1_synonym_set_object
1165
+ command.response_representation = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1SynonymSet::Representation
1166
+ command.response_class = Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1SynonymSet
1167
+ command.params['name'] = name unless name.nil?
1168
+ command.query['fields'] = fields unless fields.nil?
1169
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1170
+ execute_or_queue_command(command, &block)
1171
+ end
1172
+
1173
+ protected
1174
+
1175
+ def apply_command_defaults(command)
1176
+ command.query['key'] = key unless key.nil?
1177
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1178
+ end
1179
+ end
1180
+ end
1181
+ end
1182
+ end