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,410 @@
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 'date'
16
+ require 'google/apis/core/base_service'
17
+ require 'google/apis/core/json_representation'
18
+ require 'google/apis/core/hashable'
19
+ require 'google/apis/errors'
20
+
21
+ module Google
22
+ module Apis
23
+ module BiglakeV1
24
+
25
+ # Catalog is the container of databases.
26
+ class Catalog
27
+ include Google::Apis::Core::Hashable
28
+
29
+ # Output only. The creation time of the catalog.
30
+ # Corresponds to the JSON property `createTime`
31
+ # @return [String]
32
+ attr_accessor :create_time
33
+
34
+ # Output only. The deletion time of the catalog. Only set after the catalog is
35
+ # deleted.
36
+ # Corresponds to the JSON property `deleteTime`
37
+ # @return [String]
38
+ attr_accessor :delete_time
39
+
40
+ # Output only. The time when this catalog is considered expired. Only set after
41
+ # the catalog is deleted.
42
+ # Corresponds to the JSON property `expireTime`
43
+ # @return [String]
44
+ attr_accessor :expire_time
45
+
46
+ # Output only. The resource name. Format: projects/`project_id_or_number`/
47
+ # locations/`location_id`/catalogs/`catalog_id`
48
+ # Corresponds to the JSON property `name`
49
+ # @return [String]
50
+ attr_accessor :name
51
+
52
+ # Output only. The last modification time of the catalog.
53
+ # Corresponds to the JSON property `updateTime`
54
+ # @return [String]
55
+ attr_accessor :update_time
56
+
57
+ def initialize(**args)
58
+ update!(**args)
59
+ end
60
+
61
+ # Update properties of this object
62
+ def update!(**args)
63
+ @create_time = args[:create_time] if args.key?(:create_time)
64
+ @delete_time = args[:delete_time] if args.key?(:delete_time)
65
+ @expire_time = args[:expire_time] if args.key?(:expire_time)
66
+ @name = args[:name] if args.key?(:name)
67
+ @update_time = args[:update_time] if args.key?(:update_time)
68
+ end
69
+ end
70
+
71
+ # Database is the container of tables.
72
+ class Database
73
+ include Google::Apis::Core::Hashable
74
+
75
+ # Output only. The creation time of the database.
76
+ # Corresponds to the JSON property `createTime`
77
+ # @return [String]
78
+ attr_accessor :create_time
79
+
80
+ # Output only. The deletion time of the database. Only set after the database is
81
+ # deleted.
82
+ # Corresponds to the JSON property `deleteTime`
83
+ # @return [String]
84
+ attr_accessor :delete_time
85
+
86
+ # Output only. The time when this database is considered expired. Only set after
87
+ # the database is deleted.
88
+ # Corresponds to the JSON property `expireTime`
89
+ # @return [String]
90
+ attr_accessor :expire_time
91
+
92
+ # Options of a Hive database.
93
+ # Corresponds to the JSON property `hiveOptions`
94
+ # @return [Google::Apis::BiglakeV1::HiveDatabaseOptions]
95
+ attr_accessor :hive_options
96
+
97
+ # Output only. The resource name. Format: projects/`project_id_or_number`/
98
+ # locations/`location_id`/catalogs/`catalog_id`/databases/`database_id`
99
+ # Corresponds to the JSON property `name`
100
+ # @return [String]
101
+ attr_accessor :name
102
+
103
+ # The database type.
104
+ # Corresponds to the JSON property `type`
105
+ # @return [String]
106
+ attr_accessor :type
107
+
108
+ # Output only. The last modification time of the database.
109
+ # Corresponds to the JSON property `updateTime`
110
+ # @return [String]
111
+ attr_accessor :update_time
112
+
113
+ def initialize(**args)
114
+ update!(**args)
115
+ end
116
+
117
+ # Update properties of this object
118
+ def update!(**args)
119
+ @create_time = args[:create_time] if args.key?(:create_time)
120
+ @delete_time = args[:delete_time] if args.key?(:delete_time)
121
+ @expire_time = args[:expire_time] if args.key?(:expire_time)
122
+ @hive_options = args[:hive_options] if args.key?(:hive_options)
123
+ @name = args[:name] if args.key?(:name)
124
+ @type = args[:type] if args.key?(:type)
125
+ @update_time = args[:update_time] if args.key?(:update_time)
126
+ end
127
+ end
128
+
129
+ # Options of a Hive database.
130
+ class HiveDatabaseOptions
131
+ include Google::Apis::Core::Hashable
132
+
133
+ # Cloud Storage folder URI where the database data is stored, starting with "gs:/
134
+ # /".
135
+ # Corresponds to the JSON property `locationUri`
136
+ # @return [String]
137
+ attr_accessor :location_uri
138
+
139
+ # Stores user supplied Hive database parameters.
140
+ # Corresponds to the JSON property `parameters`
141
+ # @return [Hash<String,String>]
142
+ attr_accessor :parameters
143
+
144
+ def initialize(**args)
145
+ update!(**args)
146
+ end
147
+
148
+ # Update properties of this object
149
+ def update!(**args)
150
+ @location_uri = args[:location_uri] if args.key?(:location_uri)
151
+ @parameters = args[:parameters] if args.key?(:parameters)
152
+ end
153
+ end
154
+
155
+ # Options of a Hive table.
156
+ class HiveTableOptions
157
+ include Google::Apis::Core::Hashable
158
+
159
+ # Stores user supplied Hive table parameters.
160
+ # Corresponds to the JSON property `parameters`
161
+ # @return [Hash<String,String>]
162
+ attr_accessor :parameters
163
+
164
+ # Stores physical storage information of the data.
165
+ # Corresponds to the JSON property `storageDescriptor`
166
+ # @return [Google::Apis::BiglakeV1::StorageDescriptor]
167
+ attr_accessor :storage_descriptor
168
+
169
+ # Hive table type. For example, MANAGED_TABLE, EXTERNAL_TABLE.
170
+ # Corresponds to the JSON property `tableType`
171
+ # @return [String]
172
+ attr_accessor :table_type
173
+
174
+ def initialize(**args)
175
+ update!(**args)
176
+ end
177
+
178
+ # Update properties of this object
179
+ def update!(**args)
180
+ @parameters = args[:parameters] if args.key?(:parameters)
181
+ @storage_descriptor = args[:storage_descriptor] if args.key?(:storage_descriptor)
182
+ @table_type = args[:table_type] if args.key?(:table_type)
183
+ end
184
+ end
185
+
186
+ # Response message for the ListCatalogs method.
187
+ class ListCatalogsResponse
188
+ include Google::Apis::Core::Hashable
189
+
190
+ # The catalogs from the specified project.
191
+ # Corresponds to the JSON property `catalogs`
192
+ # @return [Array<Google::Apis::BiglakeV1::Catalog>]
193
+ attr_accessor :catalogs
194
+
195
+ # A token, which can be sent as `page_token` to retrieve the next page. If this
196
+ # field is omitted, there are no subsequent pages.
197
+ # Corresponds to the JSON property `nextPageToken`
198
+ # @return [String]
199
+ attr_accessor :next_page_token
200
+
201
+ def initialize(**args)
202
+ update!(**args)
203
+ end
204
+
205
+ # Update properties of this object
206
+ def update!(**args)
207
+ @catalogs = args[:catalogs] if args.key?(:catalogs)
208
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
209
+ end
210
+ end
211
+
212
+ # Response message for the ListDatabases method.
213
+ class ListDatabasesResponse
214
+ include Google::Apis::Core::Hashable
215
+
216
+ # The databases from the specified catalog.
217
+ # Corresponds to the JSON property `databases`
218
+ # @return [Array<Google::Apis::BiglakeV1::Database>]
219
+ attr_accessor :databases
220
+
221
+ # A token, which can be sent as `page_token` to retrieve the next page. If this
222
+ # field is omitted, there are no subsequent pages.
223
+ # Corresponds to the JSON property `nextPageToken`
224
+ # @return [String]
225
+ attr_accessor :next_page_token
226
+
227
+ def initialize(**args)
228
+ update!(**args)
229
+ end
230
+
231
+ # Update properties of this object
232
+ def update!(**args)
233
+ @databases = args[:databases] if args.key?(:databases)
234
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
235
+ end
236
+ end
237
+
238
+ # Response message for the ListTables method.
239
+ class ListTablesResponse
240
+ include Google::Apis::Core::Hashable
241
+
242
+ # A token, which can be sent as `page_token` to retrieve the next page. If this
243
+ # field is omitted, there are no subsequent pages.
244
+ # Corresponds to the JSON property `nextPageToken`
245
+ # @return [String]
246
+ attr_accessor :next_page_token
247
+
248
+ # The tables from the specified database.
249
+ # Corresponds to the JSON property `tables`
250
+ # @return [Array<Google::Apis::BiglakeV1::Table>]
251
+ attr_accessor :tables
252
+
253
+ def initialize(**args)
254
+ update!(**args)
255
+ end
256
+
257
+ # Update properties of this object
258
+ def update!(**args)
259
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
260
+ @tables = args[:tables] if args.key?(:tables)
261
+ end
262
+ end
263
+
264
+ # Request message for the RenameTable method in MetastoreService
265
+ class RenameTableRequest
266
+ include Google::Apis::Core::Hashable
267
+
268
+ # Required. The new `name` for the specified table, must be in the same database.
269
+ # Format: projects/`project_id_or_number`/locations/`location_id`/catalogs/`
270
+ # catalog_id`/databases/`database_id`/tables/`table_id`
271
+ # Corresponds to the JSON property `newName`
272
+ # @return [String]
273
+ attr_accessor :new_name
274
+
275
+ def initialize(**args)
276
+ update!(**args)
277
+ end
278
+
279
+ # Update properties of this object
280
+ def update!(**args)
281
+ @new_name = args[:new_name] if args.key?(:new_name)
282
+ end
283
+ end
284
+
285
+ # Serializer and deserializer information.
286
+ class SerDeInfo
287
+ include Google::Apis::Core::Hashable
288
+
289
+ # The fully qualified Java class name of the serialization library.
290
+ # Corresponds to the JSON property `serializationLib`
291
+ # @return [String]
292
+ attr_accessor :serialization_lib
293
+
294
+ def initialize(**args)
295
+ update!(**args)
296
+ end
297
+
298
+ # Update properties of this object
299
+ def update!(**args)
300
+ @serialization_lib = args[:serialization_lib] if args.key?(:serialization_lib)
301
+ end
302
+ end
303
+
304
+ # Stores physical storage information of the data.
305
+ class StorageDescriptor
306
+ include Google::Apis::Core::Hashable
307
+
308
+ # The fully qualified Java class name of the input format.
309
+ # Corresponds to the JSON property `inputFormat`
310
+ # @return [String]
311
+ attr_accessor :input_format
312
+
313
+ # Cloud Storage folder URI where the table data is stored, starting with "gs://".
314
+ # Corresponds to the JSON property `locationUri`
315
+ # @return [String]
316
+ attr_accessor :location_uri
317
+
318
+ # The fully qualified Java class name of the output format.
319
+ # Corresponds to the JSON property `outputFormat`
320
+ # @return [String]
321
+ attr_accessor :output_format
322
+
323
+ # Serializer and deserializer information.
324
+ # Corresponds to the JSON property `serdeInfo`
325
+ # @return [Google::Apis::BiglakeV1::SerDeInfo]
326
+ attr_accessor :serde_info
327
+
328
+ def initialize(**args)
329
+ update!(**args)
330
+ end
331
+
332
+ # Update properties of this object
333
+ def update!(**args)
334
+ @input_format = args[:input_format] if args.key?(:input_format)
335
+ @location_uri = args[:location_uri] if args.key?(:location_uri)
336
+ @output_format = args[:output_format] if args.key?(:output_format)
337
+ @serde_info = args[:serde_info] if args.key?(:serde_info)
338
+ end
339
+ end
340
+
341
+ # Represents a table.
342
+ class Table
343
+ include Google::Apis::Core::Hashable
344
+
345
+ # Output only. The creation time of the table.
346
+ # Corresponds to the JSON property `createTime`
347
+ # @return [String]
348
+ attr_accessor :create_time
349
+
350
+ # Output only. The deletion time of the table. Only set after the table is
351
+ # deleted.
352
+ # Corresponds to the JSON property `deleteTime`
353
+ # @return [String]
354
+ attr_accessor :delete_time
355
+
356
+ # The checksum of a table object computed by the server based on the value of
357
+ # other fields. It may be sent on update requests to ensure the client has an up-
358
+ # to-date value before proceeding. It is only checked for update table
359
+ # operations.
360
+ # Corresponds to the JSON property `etag`
361
+ # @return [String]
362
+ attr_accessor :etag
363
+
364
+ # Output only. The time when this table is considered expired. Only set after
365
+ # the table is deleted.
366
+ # Corresponds to the JSON property `expireTime`
367
+ # @return [String]
368
+ attr_accessor :expire_time
369
+
370
+ # Options of a Hive table.
371
+ # Corresponds to the JSON property `hiveOptions`
372
+ # @return [Google::Apis::BiglakeV1::HiveTableOptions]
373
+ attr_accessor :hive_options
374
+
375
+ # Output only. The resource name. Format: projects/`project_id_or_number`/
376
+ # locations/`location_id`/catalogs/`catalog_id`/databases/`database_id`/tables/`
377
+ # table_id`
378
+ # Corresponds to the JSON property `name`
379
+ # @return [String]
380
+ attr_accessor :name
381
+
382
+ # The table type.
383
+ # Corresponds to the JSON property `type`
384
+ # @return [String]
385
+ attr_accessor :type
386
+
387
+ # Output only. The last modification time of the table.
388
+ # Corresponds to the JSON property `updateTime`
389
+ # @return [String]
390
+ attr_accessor :update_time
391
+
392
+ def initialize(**args)
393
+ update!(**args)
394
+ end
395
+
396
+ # Update properties of this object
397
+ def update!(**args)
398
+ @create_time = args[:create_time] if args.key?(:create_time)
399
+ @delete_time = args[:delete_time] if args.key?(:delete_time)
400
+ @etag = args[:etag] if args.key?(:etag)
401
+ @expire_time = args[:expire_time] if args.key?(:expire_time)
402
+ @hive_options = args[:hive_options] if args.key?(:hive_options)
403
+ @name = args[:name] if args.key?(:name)
404
+ @type = args[:type] if args.key?(:type)
405
+ @update_time = args[:update_time] if args.key?(:update_time)
406
+ end
407
+ end
408
+ end
409
+ end
410
+ end
@@ -0,0 +1,28 @@
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
+ module Google
16
+ module Apis
17
+ module BiglakeV1
18
+ # Version of the google-apis-biglake_v1 gem
19
+ GEM_VERSION = "0.1.0"
20
+
21
+ # Version of the code generator used to generate this client
22
+ GENERATOR_VERSION = "0.12.0"
23
+
24
+ # Revision of the discovery document this client was generated from
25
+ REVISION = "20231016"
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,202 @@
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 'date'
16
+ require 'google/apis/core/base_service'
17
+ require 'google/apis/core/json_representation'
18
+ require 'google/apis/core/hashable'
19
+ require 'google/apis/errors'
20
+
21
+ module Google
22
+ module Apis
23
+ module BiglakeV1
24
+
25
+ class Catalog
26
+ class Representation < Google::Apis::Core::JsonRepresentation; end
27
+
28
+ include Google::Apis::Core::JsonObjectSupport
29
+ end
30
+
31
+ class Database
32
+ class Representation < Google::Apis::Core::JsonRepresentation; end
33
+
34
+ include Google::Apis::Core::JsonObjectSupport
35
+ end
36
+
37
+ class HiveDatabaseOptions
38
+ class Representation < Google::Apis::Core::JsonRepresentation; end
39
+
40
+ include Google::Apis::Core::JsonObjectSupport
41
+ end
42
+
43
+ class HiveTableOptions
44
+ class Representation < Google::Apis::Core::JsonRepresentation; end
45
+
46
+ include Google::Apis::Core::JsonObjectSupport
47
+ end
48
+
49
+ class ListCatalogsResponse
50
+ class Representation < Google::Apis::Core::JsonRepresentation; end
51
+
52
+ include Google::Apis::Core::JsonObjectSupport
53
+ end
54
+
55
+ class ListDatabasesResponse
56
+ class Representation < Google::Apis::Core::JsonRepresentation; end
57
+
58
+ include Google::Apis::Core::JsonObjectSupport
59
+ end
60
+
61
+ class ListTablesResponse
62
+ class Representation < Google::Apis::Core::JsonRepresentation; end
63
+
64
+ include Google::Apis::Core::JsonObjectSupport
65
+ end
66
+
67
+ class RenameTableRequest
68
+ class Representation < Google::Apis::Core::JsonRepresentation; end
69
+
70
+ include Google::Apis::Core::JsonObjectSupport
71
+ end
72
+
73
+ class SerDeInfo
74
+ class Representation < Google::Apis::Core::JsonRepresentation; end
75
+
76
+ include Google::Apis::Core::JsonObjectSupport
77
+ end
78
+
79
+ class StorageDescriptor
80
+ class Representation < Google::Apis::Core::JsonRepresentation; end
81
+
82
+ include Google::Apis::Core::JsonObjectSupport
83
+ end
84
+
85
+ class Table
86
+ class Representation < Google::Apis::Core::JsonRepresentation; end
87
+
88
+ include Google::Apis::Core::JsonObjectSupport
89
+ end
90
+
91
+ class Catalog
92
+ # @private
93
+ class Representation < Google::Apis::Core::JsonRepresentation
94
+ property :create_time, as: 'createTime'
95
+ property :delete_time, as: 'deleteTime'
96
+ property :expire_time, as: 'expireTime'
97
+ property :name, as: 'name'
98
+ property :update_time, as: 'updateTime'
99
+ end
100
+ end
101
+
102
+ class Database
103
+ # @private
104
+ class Representation < Google::Apis::Core::JsonRepresentation
105
+ property :create_time, as: 'createTime'
106
+ property :delete_time, as: 'deleteTime'
107
+ property :expire_time, as: 'expireTime'
108
+ property :hive_options, as: 'hiveOptions', class: Google::Apis::BiglakeV1::HiveDatabaseOptions, decorator: Google::Apis::BiglakeV1::HiveDatabaseOptions::Representation
109
+
110
+ property :name, as: 'name'
111
+ property :type, as: 'type'
112
+ property :update_time, as: 'updateTime'
113
+ end
114
+ end
115
+
116
+ class HiveDatabaseOptions
117
+ # @private
118
+ class Representation < Google::Apis::Core::JsonRepresentation
119
+ property :location_uri, as: 'locationUri'
120
+ hash :parameters, as: 'parameters'
121
+ end
122
+ end
123
+
124
+ class HiveTableOptions
125
+ # @private
126
+ class Representation < Google::Apis::Core::JsonRepresentation
127
+ hash :parameters, as: 'parameters'
128
+ property :storage_descriptor, as: 'storageDescriptor', class: Google::Apis::BiglakeV1::StorageDescriptor, decorator: Google::Apis::BiglakeV1::StorageDescriptor::Representation
129
+
130
+ property :table_type, as: 'tableType'
131
+ end
132
+ end
133
+
134
+ class ListCatalogsResponse
135
+ # @private
136
+ class Representation < Google::Apis::Core::JsonRepresentation
137
+ collection :catalogs, as: 'catalogs', class: Google::Apis::BiglakeV1::Catalog, decorator: Google::Apis::BiglakeV1::Catalog::Representation
138
+
139
+ property :next_page_token, as: 'nextPageToken'
140
+ end
141
+ end
142
+
143
+ class ListDatabasesResponse
144
+ # @private
145
+ class Representation < Google::Apis::Core::JsonRepresentation
146
+ collection :databases, as: 'databases', class: Google::Apis::BiglakeV1::Database, decorator: Google::Apis::BiglakeV1::Database::Representation
147
+
148
+ property :next_page_token, as: 'nextPageToken'
149
+ end
150
+ end
151
+
152
+ class ListTablesResponse
153
+ # @private
154
+ class Representation < Google::Apis::Core::JsonRepresentation
155
+ property :next_page_token, as: 'nextPageToken'
156
+ collection :tables, as: 'tables', class: Google::Apis::BiglakeV1::Table, decorator: Google::Apis::BiglakeV1::Table::Representation
157
+
158
+ end
159
+ end
160
+
161
+ class RenameTableRequest
162
+ # @private
163
+ class Representation < Google::Apis::Core::JsonRepresentation
164
+ property :new_name, as: 'newName'
165
+ end
166
+ end
167
+
168
+ class SerDeInfo
169
+ # @private
170
+ class Representation < Google::Apis::Core::JsonRepresentation
171
+ property :serialization_lib, as: 'serializationLib'
172
+ end
173
+ end
174
+
175
+ class StorageDescriptor
176
+ # @private
177
+ class Representation < Google::Apis::Core::JsonRepresentation
178
+ property :input_format, as: 'inputFormat'
179
+ property :location_uri, as: 'locationUri'
180
+ property :output_format, as: 'outputFormat'
181
+ property :serde_info, as: 'serdeInfo', class: Google::Apis::BiglakeV1::SerDeInfo, decorator: Google::Apis::BiglakeV1::SerDeInfo::Representation
182
+
183
+ end
184
+ end
185
+
186
+ class Table
187
+ # @private
188
+ class Representation < Google::Apis::Core::JsonRepresentation
189
+ property :create_time, as: 'createTime'
190
+ property :delete_time, as: 'deleteTime'
191
+ property :etag, as: 'etag'
192
+ property :expire_time, as: 'expireTime'
193
+ property :hive_options, as: 'hiveOptions', class: Google::Apis::BiglakeV1::HiveTableOptions, decorator: Google::Apis::BiglakeV1::HiveTableOptions::Representation
194
+
195
+ property :name, as: 'name'
196
+ property :type, as: 'type'
197
+ property :update_time, as: 'updateTime'
198
+ end
199
+ end
200
+ end
201
+ end
202
+ end