google-apis-biglake_v1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,609 @@
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 BiglakeV1
23
+ # BigLake API
24
+ #
25
+ # The BigLake API provides access to BigLake Metastore, a serverless, fully
26
+ # managed, and highly available metastore for open-source data that can be used
27
+ # for querying Apache Iceberg tables in BigQuery.
28
+ #
29
+ # @example
30
+ # require 'google/apis/biglake_v1'
31
+ #
32
+ # Biglake = Google::Apis::BiglakeV1 # Alias the module
33
+ # service = Biglake::BigLakeServiceService.new
34
+ #
35
+ # @see https://cloud.google.com/bigquery/
36
+ class BigLakeServiceService < Google::Apis::Core::BaseService
37
+ # @return [String]
38
+ # API key. Your API key identifies your project and provides you with API access,
39
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
40
+ attr_accessor :key
41
+
42
+ # @return [String]
43
+ # Available to use for quota purposes for server-side applications. Can be any
44
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
45
+ attr_accessor :quota_user
46
+
47
+ def initialize
48
+ super('https://biglake.googleapis.com/', '',
49
+ client_name: 'google-apis-biglake_v1',
50
+ client_version: Google::Apis::BiglakeV1::GEM_VERSION)
51
+ @batch_path = 'batch'
52
+ end
53
+
54
+ # Creates a new catalog.
55
+ # @param [String] parent
56
+ # Required. The parent resource where this catalog will be created. Format:
57
+ # projects/`project_id_or_number`/locations/`location_id`
58
+ # @param [Google::Apis::BiglakeV1::Catalog] catalog_object
59
+ # @param [String] catalog_id
60
+ # Required. The ID to use for the catalog, which will become the final component
61
+ # of the catalog's resource name.
62
+ # @param [String] fields
63
+ # Selector specifying which fields to include in a partial response.
64
+ # @param [String] quota_user
65
+ # Available to use for quota purposes for server-side applications. Can be any
66
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
67
+ # @param [Google::Apis::RequestOptions] options
68
+ # Request-specific options
69
+ #
70
+ # @yield [result, err] Result & error if block supplied
71
+ # @yieldparam result [Google::Apis::BiglakeV1::Catalog] parsed result object
72
+ # @yieldparam err [StandardError] error object if request failed
73
+ #
74
+ # @return [Google::Apis::BiglakeV1::Catalog]
75
+ #
76
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
77
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
78
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
79
+ def create_project_location_catalog(parent, catalog_object = nil, catalog_id: nil, fields: nil, quota_user: nil, options: nil, &block)
80
+ command = make_simple_command(:post, 'v1/{+parent}/catalogs', options)
81
+ command.request_representation = Google::Apis::BiglakeV1::Catalog::Representation
82
+ command.request_object = catalog_object
83
+ command.response_representation = Google::Apis::BiglakeV1::Catalog::Representation
84
+ command.response_class = Google::Apis::BiglakeV1::Catalog
85
+ command.params['parent'] = parent unless parent.nil?
86
+ command.query['catalogId'] = catalog_id unless catalog_id.nil?
87
+ command.query['fields'] = fields unless fields.nil?
88
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
89
+ execute_or_queue_command(command, &block)
90
+ end
91
+
92
+ # Deletes an existing catalog specified by the catalog ID.
93
+ # @param [String] name
94
+ # Required. The name of the catalog to delete. Format: projects/`
95
+ # project_id_or_number`/locations/`location_id`/catalogs/`catalog_id`
96
+ # @param [String] fields
97
+ # Selector specifying which fields to include in a partial response.
98
+ # @param [String] quota_user
99
+ # Available to use for quota purposes for server-side applications. Can be any
100
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
101
+ # @param [Google::Apis::RequestOptions] options
102
+ # Request-specific options
103
+ #
104
+ # @yield [result, err] Result & error if block supplied
105
+ # @yieldparam result [Google::Apis::BiglakeV1::Catalog] parsed result object
106
+ # @yieldparam err [StandardError] error object if request failed
107
+ #
108
+ # @return [Google::Apis::BiglakeV1::Catalog]
109
+ #
110
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
111
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
112
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
113
+ def delete_project_location_catalog(name, fields: nil, quota_user: nil, options: nil, &block)
114
+ command = make_simple_command(:delete, 'v1/{+name}', options)
115
+ command.response_representation = Google::Apis::BiglakeV1::Catalog::Representation
116
+ command.response_class = Google::Apis::BiglakeV1::Catalog
117
+ command.params['name'] = name unless name.nil?
118
+ command.query['fields'] = fields unless fields.nil?
119
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
120
+ execute_or_queue_command(command, &block)
121
+ end
122
+
123
+ # Gets the catalog specified by the resource name.
124
+ # @param [String] name
125
+ # Required. The name of the catalog to retrieve. Format: projects/`
126
+ # project_id_or_number`/locations/`location_id`/catalogs/`catalog_id`
127
+ # @param [String] fields
128
+ # Selector specifying which fields to include in a partial response.
129
+ # @param [String] quota_user
130
+ # Available to use for quota purposes for server-side applications. Can be any
131
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
132
+ # @param [Google::Apis::RequestOptions] options
133
+ # Request-specific options
134
+ #
135
+ # @yield [result, err] Result & error if block supplied
136
+ # @yieldparam result [Google::Apis::BiglakeV1::Catalog] parsed result object
137
+ # @yieldparam err [StandardError] error object if request failed
138
+ #
139
+ # @return [Google::Apis::BiglakeV1::Catalog]
140
+ #
141
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
142
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
143
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
144
+ def get_project_location_catalog(name, fields: nil, quota_user: nil, options: nil, &block)
145
+ command = make_simple_command(:get, 'v1/{+name}', options)
146
+ command.response_representation = Google::Apis::BiglakeV1::Catalog::Representation
147
+ command.response_class = Google::Apis::BiglakeV1::Catalog
148
+ command.params['name'] = name unless name.nil?
149
+ command.query['fields'] = fields unless fields.nil?
150
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
151
+ execute_or_queue_command(command, &block)
152
+ end
153
+
154
+ # List all catalogs in a specified project.
155
+ # @param [String] parent
156
+ # Required. The parent, which owns this collection of catalogs. Format: projects/
157
+ # `project_id_or_number`/locations/`location_id`
158
+ # @param [Fixnum] page_size
159
+ # The maximum number of catalogs to return. The service may return fewer than
160
+ # this value. If unspecified, at most 50 catalogs will be returned. The maximum
161
+ # value is 1000; values above 1000 will be coerced to 1000.
162
+ # @param [String] page_token
163
+ # A page token, received from a previous `ListCatalogs` call. Provide this to
164
+ # retrieve the subsequent page. When paginating, all other parameters provided
165
+ # to `ListCatalogs` must match the call that provided the page token.
166
+ # @param [String] fields
167
+ # Selector specifying which fields to include in a partial response.
168
+ # @param [String] quota_user
169
+ # Available to use for quota purposes for server-side applications. Can be any
170
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
171
+ # @param [Google::Apis::RequestOptions] options
172
+ # Request-specific options
173
+ #
174
+ # @yield [result, err] Result & error if block supplied
175
+ # @yieldparam result [Google::Apis::BiglakeV1::ListCatalogsResponse] parsed result object
176
+ # @yieldparam err [StandardError] error object if request failed
177
+ #
178
+ # @return [Google::Apis::BiglakeV1::ListCatalogsResponse]
179
+ #
180
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
181
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
182
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
183
+ def list_project_location_catalogs(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
184
+ command = make_simple_command(:get, 'v1/{+parent}/catalogs', options)
185
+ command.response_representation = Google::Apis::BiglakeV1::ListCatalogsResponse::Representation
186
+ command.response_class = Google::Apis::BiglakeV1::ListCatalogsResponse
187
+ command.params['parent'] = parent unless parent.nil?
188
+ command.query['pageSize'] = page_size unless page_size.nil?
189
+ command.query['pageToken'] = page_token unless page_token.nil?
190
+ command.query['fields'] = fields unless fields.nil?
191
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
192
+ execute_or_queue_command(command, &block)
193
+ end
194
+
195
+ # Creates a new database.
196
+ # @param [String] parent
197
+ # Required. The parent resource where this database will be created. Format:
198
+ # projects/`project_id_or_number`/locations/`location_id`/catalogs/`catalog_id`
199
+ # @param [Google::Apis::BiglakeV1::Database] database_object
200
+ # @param [String] database_id
201
+ # Required. The ID to use for the database, which will become the final
202
+ # component of the database's resource name.
203
+ # @param [String] fields
204
+ # Selector specifying which fields to include in a partial response.
205
+ # @param [String] quota_user
206
+ # Available to use for quota purposes for server-side applications. Can be any
207
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
208
+ # @param [Google::Apis::RequestOptions] options
209
+ # Request-specific options
210
+ #
211
+ # @yield [result, err] Result & error if block supplied
212
+ # @yieldparam result [Google::Apis::BiglakeV1::Database] parsed result object
213
+ # @yieldparam err [StandardError] error object if request failed
214
+ #
215
+ # @return [Google::Apis::BiglakeV1::Database]
216
+ #
217
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
218
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
219
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
220
+ def create_project_location_catalog_database(parent, database_object = nil, database_id: nil, fields: nil, quota_user: nil, options: nil, &block)
221
+ command = make_simple_command(:post, 'v1/{+parent}/databases', options)
222
+ command.request_representation = Google::Apis::BiglakeV1::Database::Representation
223
+ command.request_object = database_object
224
+ command.response_representation = Google::Apis::BiglakeV1::Database::Representation
225
+ command.response_class = Google::Apis::BiglakeV1::Database
226
+ command.params['parent'] = parent unless parent.nil?
227
+ command.query['databaseId'] = database_id unless database_id.nil?
228
+ command.query['fields'] = fields unless fields.nil?
229
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
230
+ execute_or_queue_command(command, &block)
231
+ end
232
+
233
+ # Deletes an existing database specified by the database ID.
234
+ # @param [String] name
235
+ # Required. The name of the database to delete. Format: projects/`
236
+ # project_id_or_number`/locations/`location_id`/catalogs/`catalog_id`/databases/`
237
+ # database_id`
238
+ # @param [String] fields
239
+ # Selector specifying which fields to include in a partial response.
240
+ # @param [String] quota_user
241
+ # Available to use for quota purposes for server-side applications. Can be any
242
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
243
+ # @param [Google::Apis::RequestOptions] options
244
+ # Request-specific options
245
+ #
246
+ # @yield [result, err] Result & error if block supplied
247
+ # @yieldparam result [Google::Apis::BiglakeV1::Database] parsed result object
248
+ # @yieldparam err [StandardError] error object if request failed
249
+ #
250
+ # @return [Google::Apis::BiglakeV1::Database]
251
+ #
252
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
253
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
254
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
255
+ def delete_project_location_catalog_database(name, fields: nil, quota_user: nil, options: nil, &block)
256
+ command = make_simple_command(:delete, 'v1/{+name}', options)
257
+ command.response_representation = Google::Apis::BiglakeV1::Database::Representation
258
+ command.response_class = Google::Apis::BiglakeV1::Database
259
+ command.params['name'] = name unless name.nil?
260
+ command.query['fields'] = fields unless fields.nil?
261
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
262
+ execute_or_queue_command(command, &block)
263
+ end
264
+
265
+ # Gets the database specified by the resource name.
266
+ # @param [String] name
267
+ # Required. The name of the database to retrieve. Format: projects/`
268
+ # project_id_or_number`/locations/`location_id`/catalogs/`catalog_id`/databases/`
269
+ # database_id`
270
+ # @param [String] fields
271
+ # Selector specifying which fields to include in a partial response.
272
+ # @param [String] quota_user
273
+ # Available to use for quota purposes for server-side applications. Can be any
274
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
275
+ # @param [Google::Apis::RequestOptions] options
276
+ # Request-specific options
277
+ #
278
+ # @yield [result, err] Result & error if block supplied
279
+ # @yieldparam result [Google::Apis::BiglakeV1::Database] parsed result object
280
+ # @yieldparam err [StandardError] error object if request failed
281
+ #
282
+ # @return [Google::Apis::BiglakeV1::Database]
283
+ #
284
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
285
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
286
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
287
+ def get_project_location_catalog_database(name, fields: nil, quota_user: nil, options: nil, &block)
288
+ command = make_simple_command(:get, 'v1/{+name}', options)
289
+ command.response_representation = Google::Apis::BiglakeV1::Database::Representation
290
+ command.response_class = Google::Apis::BiglakeV1::Database
291
+ command.params['name'] = name unless name.nil?
292
+ command.query['fields'] = fields unless fields.nil?
293
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
294
+ execute_or_queue_command(command, &block)
295
+ end
296
+
297
+ # List all databases in a specified catalog.
298
+ # @param [String] parent
299
+ # Required. The parent, which owns this collection of databases. Format:
300
+ # projects/`project_id_or_number`/locations/`location_id`/catalogs/`catalog_id`
301
+ # @param [Fixnum] page_size
302
+ # The maximum number of databases to return. The service may return fewer than
303
+ # this value. If unspecified, at most 50 databases will be returned. The maximum
304
+ # value is 1000; values above 1000 will be coerced to 1000.
305
+ # @param [String] page_token
306
+ # A page token, received from a previous `ListDatabases` call. Provide this to
307
+ # retrieve the subsequent page. When paginating, all other parameters provided
308
+ # to `ListDatabases` must match the call that provided the page token.
309
+ # @param [String] fields
310
+ # Selector specifying which fields to include in a partial response.
311
+ # @param [String] quota_user
312
+ # Available to use for quota purposes for server-side applications. Can be any
313
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
314
+ # @param [Google::Apis::RequestOptions] options
315
+ # Request-specific options
316
+ #
317
+ # @yield [result, err] Result & error if block supplied
318
+ # @yieldparam result [Google::Apis::BiglakeV1::ListDatabasesResponse] parsed result object
319
+ # @yieldparam err [StandardError] error object if request failed
320
+ #
321
+ # @return [Google::Apis::BiglakeV1::ListDatabasesResponse]
322
+ #
323
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
324
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
325
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
326
+ def list_project_location_catalog_databases(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
327
+ command = make_simple_command(:get, 'v1/{+parent}/databases', options)
328
+ command.response_representation = Google::Apis::BiglakeV1::ListDatabasesResponse::Representation
329
+ command.response_class = Google::Apis::BiglakeV1::ListDatabasesResponse
330
+ command.params['parent'] = parent unless parent.nil?
331
+ command.query['pageSize'] = page_size unless page_size.nil?
332
+ command.query['pageToken'] = page_token unless page_token.nil?
333
+ command.query['fields'] = fields unless fields.nil?
334
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
335
+ execute_or_queue_command(command, &block)
336
+ end
337
+
338
+ # Updates an existing database specified by the database ID.
339
+ # @param [String] name
340
+ # Output only. The resource name. Format: projects/`project_id_or_number`/
341
+ # locations/`location_id`/catalogs/`catalog_id`/databases/`database_id`
342
+ # @param [Google::Apis::BiglakeV1::Database] database_object
343
+ # @param [String] update_mask
344
+ # The list of fields to update. For the `FieldMask` definition, see https://
345
+ # developers.google.com/protocol-buffers/docs/reference/google.protobuf#
346
+ # fieldmask If not set, defaults to all of the fields that are allowed to update.
347
+ # @param [String] fields
348
+ # Selector specifying which fields to include in a partial response.
349
+ # @param [String] quota_user
350
+ # Available to use for quota purposes for server-side applications. Can be any
351
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
352
+ # @param [Google::Apis::RequestOptions] options
353
+ # Request-specific options
354
+ #
355
+ # @yield [result, err] Result & error if block supplied
356
+ # @yieldparam result [Google::Apis::BiglakeV1::Database] parsed result object
357
+ # @yieldparam err [StandardError] error object if request failed
358
+ #
359
+ # @return [Google::Apis::BiglakeV1::Database]
360
+ #
361
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
362
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
363
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
364
+ def patch_project_location_catalog_database(name, database_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
365
+ command = make_simple_command(:patch, 'v1/{+name}', options)
366
+ command.request_representation = Google::Apis::BiglakeV1::Database::Representation
367
+ command.request_object = database_object
368
+ command.response_representation = Google::Apis::BiglakeV1::Database::Representation
369
+ command.response_class = Google::Apis::BiglakeV1::Database
370
+ command.params['name'] = name unless name.nil?
371
+ command.query['updateMask'] = update_mask unless update_mask.nil?
372
+ command.query['fields'] = fields unless fields.nil?
373
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
374
+ execute_or_queue_command(command, &block)
375
+ end
376
+
377
+ # Creates a new table.
378
+ # @param [String] parent
379
+ # Required. The parent resource where this table will be created. Format:
380
+ # projects/`project_id_or_number`/locations/`location_id`/catalogs/`catalog_id`/
381
+ # databases/`database_id`
382
+ # @param [Google::Apis::BiglakeV1::Table] table_object
383
+ # @param [String] table_id
384
+ # Required. The ID to use for the table, which will become the final component
385
+ # of the table's resource name.
386
+ # @param [String] fields
387
+ # Selector specifying which fields to include in a partial response.
388
+ # @param [String] quota_user
389
+ # Available to use for quota purposes for server-side applications. Can be any
390
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
391
+ # @param [Google::Apis::RequestOptions] options
392
+ # Request-specific options
393
+ #
394
+ # @yield [result, err] Result & error if block supplied
395
+ # @yieldparam result [Google::Apis::BiglakeV1::Table] parsed result object
396
+ # @yieldparam err [StandardError] error object if request failed
397
+ #
398
+ # @return [Google::Apis::BiglakeV1::Table]
399
+ #
400
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
401
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
402
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
403
+ def create_project_location_catalog_database_table(parent, table_object = nil, table_id: nil, fields: nil, quota_user: nil, options: nil, &block)
404
+ command = make_simple_command(:post, 'v1/{+parent}/tables', options)
405
+ command.request_representation = Google::Apis::BiglakeV1::Table::Representation
406
+ command.request_object = table_object
407
+ command.response_representation = Google::Apis::BiglakeV1::Table::Representation
408
+ command.response_class = Google::Apis::BiglakeV1::Table
409
+ command.params['parent'] = parent unless parent.nil?
410
+ command.query['tableId'] = table_id unless table_id.nil?
411
+ command.query['fields'] = fields unless fields.nil?
412
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
413
+ execute_or_queue_command(command, &block)
414
+ end
415
+
416
+ # Deletes an existing table specified by the table ID.
417
+ # @param [String] name
418
+ # Required. The name of the table to delete. Format: projects/`
419
+ # project_id_or_number`/locations/`location_id`/catalogs/`catalog_id`/databases/`
420
+ # database_id`/tables/`table_id`
421
+ # @param [String] fields
422
+ # Selector specifying which fields to include in a partial response.
423
+ # @param [String] quota_user
424
+ # Available to use for quota purposes for server-side applications. Can be any
425
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
426
+ # @param [Google::Apis::RequestOptions] options
427
+ # Request-specific options
428
+ #
429
+ # @yield [result, err] Result & error if block supplied
430
+ # @yieldparam result [Google::Apis::BiglakeV1::Table] parsed result object
431
+ # @yieldparam err [StandardError] error object if request failed
432
+ #
433
+ # @return [Google::Apis::BiglakeV1::Table]
434
+ #
435
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
436
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
437
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
438
+ def delete_project_location_catalog_database_table(name, fields: nil, quota_user: nil, options: nil, &block)
439
+ command = make_simple_command(:delete, 'v1/{+name}', options)
440
+ command.response_representation = Google::Apis::BiglakeV1::Table::Representation
441
+ command.response_class = Google::Apis::BiglakeV1::Table
442
+ command.params['name'] = name unless name.nil?
443
+ command.query['fields'] = fields unless fields.nil?
444
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
445
+ execute_or_queue_command(command, &block)
446
+ end
447
+
448
+ # Gets the table specified by the resource name.
449
+ # @param [String] name
450
+ # Required. The name of the table to retrieve. Format: projects/`
451
+ # project_id_or_number`/locations/`location_id`/catalogs/`catalog_id`/databases/`
452
+ # database_id`/tables/`table_id`
453
+ # @param [String] fields
454
+ # Selector specifying which fields to include in a partial response.
455
+ # @param [String] quota_user
456
+ # Available to use for quota purposes for server-side applications. Can be any
457
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
458
+ # @param [Google::Apis::RequestOptions] options
459
+ # Request-specific options
460
+ #
461
+ # @yield [result, err] Result & error if block supplied
462
+ # @yieldparam result [Google::Apis::BiglakeV1::Table] parsed result object
463
+ # @yieldparam err [StandardError] error object if request failed
464
+ #
465
+ # @return [Google::Apis::BiglakeV1::Table]
466
+ #
467
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
468
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
469
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
470
+ def get_project_location_catalog_database_table(name, fields: nil, quota_user: nil, options: nil, &block)
471
+ command = make_simple_command(:get, 'v1/{+name}', options)
472
+ command.response_representation = Google::Apis::BiglakeV1::Table::Representation
473
+ command.response_class = Google::Apis::BiglakeV1::Table
474
+ command.params['name'] = name unless name.nil?
475
+ command.query['fields'] = fields unless fields.nil?
476
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
477
+ execute_or_queue_command(command, &block)
478
+ end
479
+
480
+ # List all tables in a specified database.
481
+ # @param [String] parent
482
+ # Required. The parent, which owns this collection of tables. Format: projects/`
483
+ # project_id_or_number`/locations/`location_id`/catalogs/`catalog_id`/databases/`
484
+ # database_id`
485
+ # @param [Fixnum] page_size
486
+ # The maximum number of tables to return. The service may return fewer than this
487
+ # value. If unspecified, at most 50 tables will be returned. The maximum value
488
+ # is 1000; values above 1000 will be coerced to 1000.
489
+ # @param [String] page_token
490
+ # A page token, received from a previous `ListTables` call. Provide this to
491
+ # retrieve the subsequent page. When paginating, all other parameters provided
492
+ # to `ListTables` must match the call that provided the page token.
493
+ # @param [String] view
494
+ # The view for the returned tables.
495
+ # @param [String] fields
496
+ # Selector specifying which fields to include in a partial response.
497
+ # @param [String] quota_user
498
+ # Available to use for quota purposes for server-side applications. Can be any
499
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
500
+ # @param [Google::Apis::RequestOptions] options
501
+ # Request-specific options
502
+ #
503
+ # @yield [result, err] Result & error if block supplied
504
+ # @yieldparam result [Google::Apis::BiglakeV1::ListTablesResponse] parsed result object
505
+ # @yieldparam err [StandardError] error object if request failed
506
+ #
507
+ # @return [Google::Apis::BiglakeV1::ListTablesResponse]
508
+ #
509
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
510
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
511
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
512
+ def list_project_location_catalog_database_tables(parent, page_size: nil, page_token: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block)
513
+ command = make_simple_command(:get, 'v1/{+parent}/tables', options)
514
+ command.response_representation = Google::Apis::BiglakeV1::ListTablesResponse::Representation
515
+ command.response_class = Google::Apis::BiglakeV1::ListTablesResponse
516
+ command.params['parent'] = parent unless parent.nil?
517
+ command.query['pageSize'] = page_size unless page_size.nil?
518
+ command.query['pageToken'] = page_token unless page_token.nil?
519
+ command.query['view'] = view unless view.nil?
520
+ command.query['fields'] = fields unless fields.nil?
521
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
522
+ execute_or_queue_command(command, &block)
523
+ end
524
+
525
+ # Updates an existing table specified by the table ID.
526
+ # @param [String] name
527
+ # Output only. The resource name. Format: projects/`project_id_or_number`/
528
+ # locations/`location_id`/catalogs/`catalog_id`/databases/`database_id`/tables/`
529
+ # table_id`
530
+ # @param [Google::Apis::BiglakeV1::Table] table_object
531
+ # @param [String] update_mask
532
+ # The list of fields to update. For the `FieldMask` definition, see https://
533
+ # developers.google.com/protocol-buffers/docs/reference/google.protobuf#
534
+ # fieldmask If not set, defaults to all of the fields that are allowed to update.
535
+ # @param [String] fields
536
+ # Selector specifying which fields to include in a partial response.
537
+ # @param [String] quota_user
538
+ # Available to use for quota purposes for server-side applications. Can be any
539
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
540
+ # @param [Google::Apis::RequestOptions] options
541
+ # Request-specific options
542
+ #
543
+ # @yield [result, err] Result & error if block supplied
544
+ # @yieldparam result [Google::Apis::BiglakeV1::Table] parsed result object
545
+ # @yieldparam err [StandardError] error object if request failed
546
+ #
547
+ # @return [Google::Apis::BiglakeV1::Table]
548
+ #
549
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
550
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
551
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
552
+ def patch_project_location_catalog_database_table(name, table_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
553
+ command = make_simple_command(:patch, 'v1/{+name}', options)
554
+ command.request_representation = Google::Apis::BiglakeV1::Table::Representation
555
+ command.request_object = table_object
556
+ command.response_representation = Google::Apis::BiglakeV1::Table::Representation
557
+ command.response_class = Google::Apis::BiglakeV1::Table
558
+ command.params['name'] = name unless name.nil?
559
+ command.query['updateMask'] = update_mask unless update_mask.nil?
560
+ command.query['fields'] = fields unless fields.nil?
561
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
562
+ execute_or_queue_command(command, &block)
563
+ end
564
+
565
+ # Renames an existing table specified by the table ID.
566
+ # @param [String] name
567
+ # Required. The table's `name` field is used to identify the table to rename.
568
+ # Format: projects/`project_id_or_number`/locations/`location_id`/catalogs/`
569
+ # catalog_id`/databases/`database_id`/tables/`table_id`
570
+ # @param [Google::Apis::BiglakeV1::RenameTableRequest] rename_table_request_object
571
+ # @param [String] fields
572
+ # Selector specifying which fields to include in a partial response.
573
+ # @param [String] quota_user
574
+ # Available to use for quota purposes for server-side applications. Can be any
575
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
576
+ # @param [Google::Apis::RequestOptions] options
577
+ # Request-specific options
578
+ #
579
+ # @yield [result, err] Result & error if block supplied
580
+ # @yieldparam result [Google::Apis::BiglakeV1::Table] parsed result object
581
+ # @yieldparam err [StandardError] error object if request failed
582
+ #
583
+ # @return [Google::Apis::BiglakeV1::Table]
584
+ #
585
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
586
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
587
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
588
+ def rename_table(name, rename_table_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
589
+ command = make_simple_command(:post, 'v1/{+name}:rename', options)
590
+ command.request_representation = Google::Apis::BiglakeV1::RenameTableRequest::Representation
591
+ command.request_object = rename_table_request_object
592
+ command.response_representation = Google::Apis::BiglakeV1::Table::Representation
593
+ command.response_class = Google::Apis::BiglakeV1::Table
594
+ command.params['name'] = name unless name.nil?
595
+ command.query['fields'] = fields unless fields.nil?
596
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
597
+ execute_or_queue_command(command, &block)
598
+ end
599
+
600
+ protected
601
+
602
+ def apply_command_defaults(command)
603
+ command.query['key'] = key unless key.nil?
604
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
605
+ end
606
+ end
607
+ end
608
+ end
609
+ end
@@ -0,0 +1,41 @@
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/biglake_v1/service.rb'
16
+ require 'google/apis/biglake_v1/classes.rb'
17
+ require 'google/apis/biglake_v1/representations.rb'
18
+ require 'google/apis/biglake_v1/gem_version.rb'
19
+
20
+ module Google
21
+ module Apis
22
+ # BigLake API
23
+ #
24
+ # The BigLake API provides access to BigLake Metastore, a serverless, fully
25
+ # managed, and highly available metastore for open-source data that can be used
26
+ # for querying Apache Iceberg tables in BigQuery.
27
+ #
28
+ # @see https://cloud.google.com/bigquery/
29
+ module BiglakeV1
30
+ # Version of the BigLake API this client connects to.
31
+ # This is NOT the gem version.
32
+ VERSION = 'V1'
33
+
34
+ # View and manage your data in Google BigQuery and see the email address for your Google Account
35
+ AUTH_BIGQUERY = 'https://www.googleapis.com/auth/bigquery'
36
+
37
+ # See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.
38
+ AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
39
+ end
40
+ end
41
+ end
@@ -0,0 +1,15 @@
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/biglake_v1"