google-cloud-metastore-v1 0.4.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 17000829899c2376f3790d4d4c030303eeeb8e1fc0bddb96faf02d7a4d9d6342
4
- data.tar.gz: c007f0e0fc785992e8b17104958c569cbdb44d97f0e8cc87b6cb1fe3f07aead9
3
+ metadata.gz: f58159812c9e69d5495a8eda489e12f4726583cf4c75c576f0e44eeb936c24b9
4
+ data.tar.gz: df707002883d9c591dc49bd8b783af6722a8963b6cb49a65625b9c74c3b2e580
5
5
  SHA512:
6
- metadata.gz: 4e6d3db63254580afe638fa2692e3c2dc0d0482a0cefb9fda92657e823918bc5673340beb24b2aac1f90e162ef5c356cb2f0c10342a0df5278c91cc21e0d40c5
7
- data.tar.gz: 3fbfac751638e5824084b091e0fb0834f7d4b06c9e2dbfd40c09dcac00664373febfaa4f54f60cac04493980995cfc5a619d3b8d13283b199ad9bbfb5d4cc0f9
6
+ metadata.gz: 0fea01f858e303f10d1d00cf404ed49a5eacb1d6a77250be75aa2467af03cb84ced4bf8b16bbcf9c5818b8c433b39be3344f84978f6728dba9c32118d1ff8306
7
+ data.tar.gz: 567f597073c4764db28f1837b3b34444ed5e10af06c537c8cd6f42b85c663386d03878c49e8a5101cc6301b8a5dac921a2b139c24cfefab48e215731a381494a
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Ruby Client for the Dataproc Metastore V1 API
2
2
 
3
- API Client library for the Dataproc Metastore V1 API
3
+ The Dataproc Metastore API is used to manage the lifecycle and configuration of metastore services.
4
4
 
5
5
  Dataproc Metastore is a fully managed, highly available within a region, autohealing serverless Apache Hive metastore (HMS) on Google Cloud for data analytics products. It supports HMS and serves as a critical component for managing the metadata of relational entities and provides interoperability between data processing applications in the open source data ecosystem.
6
6
 
@@ -0,0 +1,175 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "gapic/config"
20
+
21
+ module Google
22
+ module Cloud
23
+ module Metastore
24
+ ##
25
+ # @example Loading just the REST part of this package, including all its services, and instantiating a REST client
26
+ #
27
+ # require "google/cloud/metastore/v1/rest"
28
+ # client = ::Google::Cloud::Metastore::V1::DataprocMetastore::Rest::Client.new
29
+ #
30
+ module V1
31
+ ##
32
+ # @private
33
+ # Initialize the mixin bindings configuration
34
+ #
35
+ def self.configure
36
+ @configure ||= begin
37
+ namespace = ["Google", "Cloud", "Metastore"]
38
+ parent_config = while namespace.any?
39
+ parent_name = namespace.join "::"
40
+ parent_const = const_get parent_name
41
+ break parent_const.configure if parent_const.respond_to? :configure
42
+ namespace.pop
43
+ end
44
+
45
+ default_config = Configuration.new parent_config
46
+ default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [
47
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
48
+ uri_method: :get,
49
+ uri_template: "/v1/{name}",
50
+ matches: [
51
+ ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
52
+ ],
53
+ body: nil
54
+ )
55
+ ]
56
+ default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [
57
+
58
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
59
+ uri_method: :get,
60
+ uri_template: "/v1/{name}/locations",
61
+ matches: [
62
+ ["name", %r{^projects/[^/]+/?$}, false]
63
+ ],
64
+ body: nil
65
+ )
66
+ ]
67
+ default_config.bindings_override["google.iam.v1.IAMPolicy.GetIamPolicy"] = [
68
+
69
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
70
+ uri_method: :get,
71
+ uri_template: "/v1/{resource}:getIamPolicy",
72
+ matches: [
73
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/services/[^/]+/?$}, false]
74
+ ],
75
+ body: nil
76
+ ),
77
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
78
+ uri_method: :get,
79
+ uri_template: "/v1/{resource}:getIamPolicy",
80
+ matches: [
81
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/services/[^/]+/backups/[^/]+/?$}, false]
82
+ ],
83
+ body: nil
84
+ ),
85
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
86
+ uri_method: :get,
87
+ uri_template: "/v1/{resource}:getIamPolicy",
88
+ matches: [
89
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/federations/[^/]+/?$}, false]
90
+ ],
91
+ body: nil
92
+ )
93
+ ]
94
+ default_config.bindings_override["google.iam.v1.IAMPolicy.SetIamPolicy"] = [
95
+
96
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
97
+ uri_method: :post,
98
+ uri_template: "/v1/{resource}:setIamPolicy",
99
+ matches: [
100
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/services/[^/]+/?$}, false]
101
+ ],
102
+ body: "*"
103
+ ),
104
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
105
+ uri_method: :post,
106
+ uri_template: "/v1/{resource}:setIamPolicy",
107
+ matches: [
108
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/services/[^/]+/backups/[^/]+/?$}, false]
109
+ ],
110
+ body: "*"
111
+ ),
112
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
113
+ uri_method: :post,
114
+ uri_template: "/v1/{resource}:setIamPolicy",
115
+ matches: [
116
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/federations/[^/]+/?$}, false]
117
+ ],
118
+ body: "*"
119
+ )
120
+ ]
121
+ default_config.bindings_override["google.iam.v1.IAMPolicy.TestIamPermissions"] = [
122
+
123
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
124
+ uri_method: :post,
125
+ uri_template: "/v1/{resource}:testIamPermissions",
126
+ matches: [
127
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/services/[^/]+/?$}, false]
128
+ ],
129
+ body: "*"
130
+ ),
131
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
132
+ uri_method: :post,
133
+ uri_template: "/v1/{resource}:testIamPermissions",
134
+ matches: [
135
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/federations/[^/]+/?$}, false]
136
+ ],
137
+ body: "*"
138
+ )
139
+ ]
140
+ default_config
141
+ end
142
+ yield @configure if block_given?
143
+ @configure
144
+ end
145
+
146
+ ##
147
+ # @private
148
+ # Configuration class for the google.cloud.metastore.v1 package.
149
+ #
150
+ # This class contains common configuration for all services
151
+ # of the google.cloud.metastore.v1 package.
152
+ #
153
+ # This configuration is for internal use of the client library classes,
154
+ # and it is not intended that the end-users will read or change it.
155
+ #
156
+ class Configuration
157
+ extend ::Gapic::Config
158
+
159
+ # @private
160
+ # Overrides for http bindings for the RPC of the mixins for this package.
161
+ # Services in this package should use these when creating clients for the mixin services.
162
+ # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
163
+ config_attr :bindings_override, {}, ::Hash, nil
164
+
165
+ # @private
166
+ def initialize parent_config = nil
167
+ @parent_config = parent_config unless parent_config.nil?
168
+
169
+ yield self if block_given?
170
+ end
171
+ end
172
+ end
173
+ end
174
+ end
175
+ end
@@ -18,6 +18,8 @@
18
18
 
19
19
  require "google/cloud/errors"
20
20
  require "google/cloud/metastore/v1/metastore_pb"
21
+ require "google/cloud/location"
22
+ require "google/iam/v1"
21
23
 
22
24
  module Google
23
25
  module Cloud
@@ -178,6 +180,18 @@ module Google
178
180
  config.endpoint = @config.endpoint
179
181
  end
180
182
 
183
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
184
+ config.credentials = credentials
185
+ config.quota_project = @quota_project_id
186
+ config.endpoint = @config.endpoint
187
+ end
188
+
189
+ @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
190
+ config.credentials = credentials
191
+ config.quota_project = @quota_project_id
192
+ config.endpoint = @config.endpoint
193
+ end
194
+
181
195
  @dataproc_metastore_stub = ::Gapic::ServiceStub.new(
182
196
  ::Google::Cloud::Metastore::V1::DataprocMetastore::Stub,
183
197
  credentials: credentials,
@@ -194,6 +208,20 @@ module Google
194
208
  #
195
209
  attr_reader :operations_client
196
210
 
211
+ ##
212
+ # Get the associated client for mix-in of the Locations.
213
+ #
214
+ # @return [Google::Cloud::Location::Locations::Client]
215
+ #
216
+ attr_reader :location_client
217
+
218
+ ##
219
+ # Get the associated client for mix-in of the IAMPolicy.
220
+ #
221
+ # @return [Google::Iam::V1::IAMPolicy::Client]
222
+ #
223
+ attr_reader :iam_policy_client
224
+
197
225
  # Service calls
198
226
 
199
227
  ##
@@ -259,13 +287,11 @@ module Google
259
287
  # # Call the list_services method.
260
288
  # result = client.list_services request
261
289
  #
262
- # # The returned object is of type Gapic::PagedEnumerable. You can
263
- # # iterate over all elements by calling #each, and the enumerable
264
- # # will lazily make API calls to fetch subsequent pages. Other
265
- # # methods are also available for managing paging directly.
266
- # result.each do |response|
290
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
291
+ # # over elements, and API calls will be issued to fetch pages as needed.
292
+ # result.each do |item|
267
293
  # # Each element is of type ::Google::Cloud::Metastore::V1::Service.
268
- # p response
294
+ # p item
269
295
  # end
270
296
  #
271
297
  def list_services request, options = nil
@@ -466,14 +492,14 @@ module Google
466
492
  # # Call the create_service method.
467
493
  # result = client.create_service request
468
494
  #
469
- # # The returned object is of type Gapic::Operation. You can use this
470
- # # object to check the status of an operation, cancel it, or wait
471
- # # for results. Here is how to block until completion:
495
+ # # The returned object is of type Gapic::Operation. You can use it to
496
+ # # check the status of an operation, cancel it, or wait for results.
497
+ # # Here is how to wait for a response.
472
498
  # result.wait_until_done! timeout: 60
473
499
  # if result.response?
474
500
  # p result.response
475
501
  # else
476
- # puts "Error!"
502
+ # puts "No response received."
477
503
  # end
478
504
  #
479
505
  def create_service request, options = nil
@@ -581,14 +607,14 @@ module Google
581
607
  # # Call the update_service method.
582
608
  # result = client.update_service request
583
609
  #
584
- # # The returned object is of type Gapic::Operation. You can use this
585
- # # object to check the status of an operation, cancel it, or wait
586
- # # for results. Here is how to block until completion:
610
+ # # The returned object is of type Gapic::Operation. You can use it to
611
+ # # check the status of an operation, cancel it, or wait for results.
612
+ # # Here is how to wait for a response.
587
613
  # result.wait_until_done! timeout: 60
588
614
  # if result.response?
589
615
  # p result.response
590
616
  # else
591
- # puts "Error!"
617
+ # puts "No response received."
592
618
  # end
593
619
  #
594
620
  def update_service request, options = nil
@@ -690,14 +716,14 @@ module Google
690
716
  # # Call the delete_service method.
691
717
  # result = client.delete_service request
692
718
  #
693
- # # The returned object is of type Gapic::Operation. You can use this
694
- # # object to check the status of an operation, cancel it, or wait
695
- # # for results. Here is how to block until completion:
719
+ # # The returned object is of type Gapic::Operation. You can use it to
720
+ # # check the status of an operation, cancel it, or wait for results.
721
+ # # Here is how to wait for a response.
696
722
  # result.wait_until_done! timeout: 60
697
723
  # if result.response?
698
724
  # p result.response
699
725
  # else
700
- # puts "Error!"
726
+ # puts "No response received."
701
727
  # end
702
728
  #
703
729
  def delete_service request, options = nil
@@ -805,13 +831,11 @@ module Google
805
831
  # # Call the list_metadata_imports method.
806
832
  # result = client.list_metadata_imports request
807
833
  #
808
- # # The returned object is of type Gapic::PagedEnumerable. You can
809
- # # iterate over all elements by calling #each, and the enumerable
810
- # # will lazily make API calls to fetch subsequent pages. Other
811
- # # methods are also available for managing paging directly.
812
- # result.each do |response|
834
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
835
+ # # over elements, and API calls will be issued to fetch pages as needed.
836
+ # result.each do |item|
813
837
  # # Each element is of type ::Google::Cloud::Metastore::V1::MetadataImport.
814
- # p response
838
+ # p item
815
839
  # end
816
840
  #
817
841
  def list_metadata_imports request, options = nil
@@ -1012,14 +1036,14 @@ module Google
1012
1036
  # # Call the create_metadata_import method.
1013
1037
  # result = client.create_metadata_import request
1014
1038
  #
1015
- # # The returned object is of type Gapic::Operation. You can use this
1016
- # # object to check the status of an operation, cancel it, or wait
1017
- # # for results. Here is how to block until completion:
1039
+ # # The returned object is of type Gapic::Operation. You can use it to
1040
+ # # check the status of an operation, cancel it, or wait for results.
1041
+ # # Here is how to wait for a response.
1018
1042
  # result.wait_until_done! timeout: 60
1019
1043
  # if result.response?
1020
1044
  # p result.response
1021
1045
  # else
1022
- # puts "Error!"
1046
+ # puts "No response received."
1023
1047
  # end
1024
1048
  #
1025
1049
  def create_metadata_import request, options = nil
@@ -1128,14 +1152,14 @@ module Google
1128
1152
  # # Call the update_metadata_import method.
1129
1153
  # result = client.update_metadata_import request
1130
1154
  #
1131
- # # The returned object is of type Gapic::Operation. You can use this
1132
- # # object to check the status of an operation, cancel it, or wait
1133
- # # for results. Here is how to block until completion:
1155
+ # # The returned object is of type Gapic::Operation. You can use it to
1156
+ # # check the status of an operation, cancel it, or wait for results.
1157
+ # # Here is how to wait for a response.
1134
1158
  # result.wait_until_done! timeout: 60
1135
1159
  # if result.response?
1136
1160
  # p result.response
1137
1161
  # else
1138
- # puts "Error!"
1162
+ # puts "No response received."
1139
1163
  # end
1140
1164
  #
1141
1165
  def update_metadata_import request, options = nil
@@ -1243,14 +1267,14 @@ module Google
1243
1267
  # # Call the export_metadata method.
1244
1268
  # result = client.export_metadata request
1245
1269
  #
1246
- # # The returned object is of type Gapic::Operation. You can use this
1247
- # # object to check the status of an operation, cancel it, or wait
1248
- # # for results. Here is how to block until completion:
1270
+ # # The returned object is of type Gapic::Operation. You can use it to
1271
+ # # check the status of an operation, cancel it, or wait for results.
1272
+ # # Here is how to wait for a response.
1249
1273
  # result.wait_until_done! timeout: 60
1250
1274
  # if result.response?
1251
1275
  # p result.response
1252
1276
  # else
1253
- # puts "Error!"
1277
+ # puts "No response received."
1254
1278
  # end
1255
1279
  #
1256
1280
  def export_metadata request, options = nil
@@ -1359,14 +1383,14 @@ module Google
1359
1383
  # # Call the restore_service method.
1360
1384
  # result = client.restore_service request
1361
1385
  #
1362
- # # The returned object is of type Gapic::Operation. You can use this
1363
- # # object to check the status of an operation, cancel it, or wait
1364
- # # for results. Here is how to block until completion:
1386
+ # # The returned object is of type Gapic::Operation. You can use it to
1387
+ # # check the status of an operation, cancel it, or wait for results.
1388
+ # # Here is how to wait for a response.
1365
1389
  # result.wait_until_done! timeout: 60
1366
1390
  # if result.response?
1367
1391
  # p result.response
1368
1392
  # else
1369
- # puts "Error!"
1393
+ # puts "No response received."
1370
1394
  # end
1371
1395
  #
1372
1396
  def restore_service request, options = nil
@@ -1474,13 +1498,11 @@ module Google
1474
1498
  # # Call the list_backups method.
1475
1499
  # result = client.list_backups request
1476
1500
  #
1477
- # # The returned object is of type Gapic::PagedEnumerable. You can
1478
- # # iterate over all elements by calling #each, and the enumerable
1479
- # # will lazily make API calls to fetch subsequent pages. Other
1480
- # # methods are also available for managing paging directly.
1481
- # result.each do |response|
1501
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1502
+ # # over elements, and API calls will be issued to fetch pages as needed.
1503
+ # result.each do |item|
1482
1504
  # # Each element is of type ::Google::Cloud::Metastore::V1::Backup.
1483
- # p response
1505
+ # p item
1484
1506
  # end
1485
1507
  #
1486
1508
  def list_backups request, options = nil
@@ -1680,14 +1702,14 @@ module Google
1680
1702
  # # Call the create_backup method.
1681
1703
  # result = client.create_backup request
1682
1704
  #
1683
- # # The returned object is of type Gapic::Operation. You can use this
1684
- # # object to check the status of an operation, cancel it, or wait
1685
- # # for results. Here is how to block until completion:
1705
+ # # The returned object is of type Gapic::Operation. You can use it to
1706
+ # # check the status of an operation, cancel it, or wait for results.
1707
+ # # Here is how to wait for a response.
1686
1708
  # result.wait_until_done! timeout: 60
1687
1709
  # if result.response?
1688
1710
  # p result.response
1689
1711
  # else
1690
- # puts "Error!"
1712
+ # puts "No response received."
1691
1713
  # end
1692
1714
  #
1693
1715
  def create_backup request, options = nil
@@ -1789,14 +1811,14 @@ module Google
1789
1811
  # # Call the delete_backup method.
1790
1812
  # result = client.delete_backup request
1791
1813
  #
1792
- # # The returned object is of type Gapic::Operation. You can use this
1793
- # # object to check the status of an operation, cancel it, or wait
1794
- # # for results. Here is how to block until completion:
1814
+ # # The returned object is of type Gapic::Operation. You can use it to
1815
+ # # check the status of an operation, cancel it, or wait for results.
1816
+ # # Here is how to wait for a response.
1795
1817
  # result.wait_until_done! timeout: 60
1796
1818
  # if result.response?
1797
1819
  # p result.response
1798
1820
  # else
1799
- # puts "Error!"
1821
+ # puts "No response received."
1800
1822
  # end
1801
1823
  #
1802
1824
  def delete_backup request, options = nil
@@ -158,13 +158,11 @@ module Google
158
158
  # # Call the list_operations method.
159
159
  # result = client.list_operations request
160
160
  #
161
- # # The returned object is of type Gapic::PagedEnumerable. You can
162
- # # iterate over all elements by calling #each, and the enumerable
163
- # # will lazily make API calls to fetch subsequent pages. Other
164
- # # methods are also available for managing paging directly.
165
- # result.each do |response|
161
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
162
+ # # over elements, and API calls will be issued to fetch pages as needed.
163
+ # result.each do |item|
166
164
  # # Each element is of type ::Google::Longrunning::Operation.
167
- # p response
165
+ # p item
168
166
  # end
169
167
  #
170
168
  def list_operations request, options = nil
@@ -253,14 +251,14 @@ module Google
253
251
  # # Call the get_operation method.
254
252
  # result = client.get_operation request
255
253
  #
256
- # # The returned object is of type Gapic::Operation. You can use this
257
- # # object to check the status of an operation, cancel it, or wait
258
- # # for results. Here is how to block until completion:
254
+ # # The returned object is of type Gapic::Operation. You can use it to
255
+ # # check the status of an operation, cancel it, or wait for results.
256
+ # # Here is how to wait for a response.
259
257
  # result.wait_until_done! timeout: 60
260
258
  # if result.response?
261
259
  # p result.response
262
260
  # else
263
- # puts "Error!"
261
+ # puts "No response received."
264
262
  # end
265
263
  #
266
264
  def get_operation request, options = nil
@@ -540,14 +538,14 @@ module Google
540
538
  # # Call the wait_operation method.
541
539
  # result = client.wait_operation request
542
540
  #
543
- # # The returned object is of type Gapic::Operation. You can use this
544
- # # object to check the status of an operation, cancel it, or wait
545
- # # for results. Here is how to block until completion:
541
+ # # The returned object is of type Gapic::Operation. You can use it to
542
+ # # check the status of an operation, cancel it, or wait for results.
543
+ # # Here is how to wait for a response.
546
544
  # result.wait_until_done! timeout: 60
547
545
  # if result.response?
548
546
  # p result.response
549
547
  # else
550
- # puts "Error!"
548
+ # puts "No response received."
551
549
  # end
552
550
  #
553
551
  def wait_operation request, options = nil