google-cloud-metastore 1.1.0 → 1.3.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: e0234ed329fc7fc5d88ea228030dfed06e2076d46c94d488a5792c78b2d1d817
4
- data.tar.gz: 5bef9f069f0b79ebb28d50d55c4822ee812fddbbd29a60a344e5caa86b0e4599
3
+ metadata.gz: 56a759b8dfd1e778ca20992ac8e6aec6697cd5c11f9c0754ba6a0de2842fc08f
4
+ data.tar.gz: f95c956e8bf83a666fab4eb16cd829057dbfb9f9f80675d9720518d4bf4acaa0
5
5
  SHA512:
6
- metadata.gz: aa0752e667fca98880e59e62ea27d6f837db7788417be7fa6108ed4c64761115765ef8f1867d195ccd2722f7914cff6314c58386ff50fe24abdb2cef014d1ae3
7
- data.tar.gz: d7f996bdc79231dd7efa18e3d51319c938599aa0727cd30110b18f191834be7048aebd8050aaaa7adefb5033a93a4fd2f6d60591d124b8379095779c6a5dc647
6
+ metadata.gz: 48688a71de297b913fe98672c58af0c4b25ae5770d877855a7284c6479147a13693948dc69e23c26b4317c30a582c00d2402360ea89e45d3381790a6c804e7cd
7
+ data.tar.gz: 0d7232f44b7382706fbd4a6d94f424fcfcf6717a87b87bffbf2e463007ecb318407b338f60500bfba8d0ef148c193840837793ebbae9aed45c8bedb321d30077
data/AUTHENTICATION.md CHANGED
@@ -114,7 +114,7 @@ credentials are discovered.
114
114
  To configure your system for this, simply:
115
115
 
116
116
  1. [Download and install the Cloud SDK](https://cloud.google.com/sdk)
117
- 2. Authenticate using OAuth 2.0 `$ gcloud auth login`
117
+ 2. Authenticate using OAuth 2.0 `$ gcloud auth application-default login`
118
118
  3. Write code as if already authenticated.
119
119
 
120
120
  **NOTE:** This is _not_ recommended for running in production. The Cloud SDK
data/README.md CHANGED
@@ -35,32 +35,6 @@ In order to use this library, you first need to go through the following steps:
35
35
  1. [Enable the API.](https://console.cloud.google.com/apis/library/metastore.googleapis.com)
36
36
  1. {file:AUTHENTICATION.md Set up authentication.}
37
37
 
38
- ## Enabling Logging
39
-
40
- To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
41
- The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib/libdoc/logger/rdoc/Logger.html) as shown below,
42
- or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
43
- that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
44
- and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
45
-
46
- Configuring a Ruby stdlib logger:
47
-
48
- ```ruby
49
- require "logger"
50
-
51
- module MyLogger
52
- LOGGER = Logger.new $stderr, level: Logger::WARN
53
- def logger
54
- LOGGER
55
- end
56
- end
57
-
58
- # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
59
- module GRPC
60
- extend MyLogger
61
- end
62
- ```
63
-
64
38
  ## Supported Ruby Versions
65
39
 
66
40
  This library is supported on Ruby 2.6+.
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Cloud
22
22
  module Metastore
23
- VERSION = "1.1.0"
23
+ VERSION = "1.3.0"
24
24
  end
25
25
  end
26
26
  end
@@ -49,11 +49,13 @@ module Google
49
49
  #
50
50
  # By default, this returns an instance of
51
51
  # [Google::Cloud::Metastore::V1::DataprocMetastore::Client](https://googleapis.dev/ruby/google-cloud-metastore-v1/latest/Google/Cloud/Metastore/V1/DataprocMetastore/Client.html)
52
- # for version V1 of the API.
53
- # However, you can specify specify a different API version by passing it in the
52
+ # for a gRPC client for version V1 of the API.
53
+ # However, you can specify a different API version by passing it in the
54
54
  # `version` parameter. If the DataprocMetastore service is
55
55
  # supported by that API version, and the corresponding gem is available, the
56
56
  # appropriate versioned client will be returned.
57
+ # You can also specify a different transport by passing `:rest` or `:grpc` in
58
+ # the `transport` parameter.
57
59
  #
58
60
  # ## About DataprocMetastore
59
61
  #
@@ -77,17 +79,65 @@ module Google
77
79
  #
78
80
  # @param version [::String, ::Symbol] The API version to connect to. Optional.
79
81
  # Defaults to `:v1`.
80
- # @return [DataprocMetastore::Client] A client object for the specified version.
82
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
83
+ # @return [::Object] A client object for the specified version.
81
84
  #
82
- def self.dataproc_metastore version: :v1, &block
85
+ def self.dataproc_metastore version: :v1, transport: :grpc, &block
83
86
  require "google/cloud/metastore/#{version.to_s.downcase}"
84
87
 
85
88
  package_name = Google::Cloud::Metastore
86
89
  .constants
87
90
  .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
88
91
  .first
89
- package_module = Google::Cloud::Metastore.const_get package_name
90
- package_module.const_get(:DataprocMetastore).const_get(:Client).new(&block)
92
+ service_module = Google::Cloud::Metastore.const_get(package_name).const_get(:DataprocMetastore)
93
+ service_module = service_module.const_get(:Rest) if transport == :rest
94
+ service_module.const_get(:Client).new(&block)
95
+ end
96
+
97
+ ##
98
+ # Create a new client object for DataprocMetastoreFederation.
99
+ #
100
+ # By default, this returns an instance of
101
+ # [Google::Cloud::Metastore::V1::DataprocMetastoreFederation::Client](https://googleapis.dev/ruby/google-cloud-metastore-v1/latest/Google/Cloud/Metastore/V1/DataprocMetastoreFederation/Client.html)
102
+ # for a gRPC client for version V1 of the API.
103
+ # However, you can specify a different API version by passing it in the
104
+ # `version` parameter. If the DataprocMetastoreFederation service is
105
+ # supported by that API version, and the corresponding gem is available, the
106
+ # appropriate versioned client will be returned.
107
+ # You can also specify a different transport by passing `:rest` or `:grpc` in
108
+ # the `transport` parameter.
109
+ #
110
+ # ## About DataprocMetastoreFederation
111
+ #
112
+ # Configures and manages metastore federation services.
113
+ # Dataproc Metastore Federation Service allows federating a collection of
114
+ # backend metastores like BigQuery, Dataplex Lakes, and other Dataproc
115
+ # Metastores. The Federation Service exposes a gRPC URL through which metadata
116
+ # from the backend metastores are served at query time.
117
+ #
118
+ # The Dataproc Metastore Federation API defines the following resource model:
119
+ # * The service works with a collection of Google Cloud projects.
120
+ # * Each project has a collection of available locations.
121
+ # * Each location has a collection of federations.
122
+ # * Dataproc Metastore Federations are resources with names of the
123
+ # form:
124
+ # `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
125
+ #
126
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
127
+ # Defaults to `:v1`.
128
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
129
+ # @return [::Object] A client object for the specified version.
130
+ #
131
+ def self.dataproc_metastore_federation version: :v1, transport: :grpc, &block
132
+ require "google/cloud/metastore/#{version.to_s.downcase}"
133
+
134
+ package_name = Google::Cloud::Metastore
135
+ .constants
136
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
137
+ .first
138
+ service_module = Google::Cloud::Metastore.const_get(package_name).const_get(:DataprocMetastoreFederation)
139
+ service_module = service_module.const_get(:Rest) if transport == :rest
140
+ service_module.const_get(:Client).new(&block)
91
141
  end
92
142
 
93
143
  ##
@@ -107,7 +157,7 @@ module Google
107
157
  # * `timeout` (*type:* `Numeric`) -
108
158
  # Default timeout in seconds.
109
159
  # * `metadata` (*type:* `Hash{Symbol=>String}`) -
110
- # Additional gRPC headers to be sent with the call.
160
+ # Additional headers to be sent with the call.
111
161
  # * `retry_policy` (*type:* `Hash`) -
112
162
  # The retry policy. The value is a hash with the following keys:
113
163
  # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-metastore
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-07-05 00:00:00.000000000 Z
11
+ date: 2023-03-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-cloud-core
@@ -30,7 +30,7 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '0.0'
33
+ version: '0.6'
34
34
  - - "<"
35
35
  - !ruby/object:Gem::Version
36
36
  version: 2.a
@@ -40,7 +40,7 @@ dependencies:
40
40
  requirements:
41
41
  - - ">="
42
42
  - !ruby/object:Gem::Version
43
- version: '0.0'
43
+ version: '0.6'
44
44
  - - "<"
45
45
  - !ruby/object:Gem::Version
46
46
  version: 2.a
@@ -50,7 +50,7 @@ dependencies:
50
50
  requirements:
51
51
  - - ">="
52
52
  - !ruby/object:Gem::Version
53
- version: '0.0'
53
+ version: '0.6'
54
54
  - - "<"
55
55
  - !ruby/object:Gem::Version
56
56
  version: 2.a
@@ -60,7 +60,7 @@ dependencies:
60
60
  requirements:
61
61
  - - ">="
62
62
  - !ruby/object:Gem::Version
63
- version: '0.0'
63
+ version: '0.6'
64
64
  - - "<"
65
65
  - !ruby/object:Gem::Version
66
66
  version: 2.a
@@ -212,7 +212,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
212
212
  - !ruby/object:Gem::Version
213
213
  version: '0'
214
214
  requirements: []
215
- rubygems_version: 3.3.14
215
+ rubygems_version: 3.4.2
216
216
  signing_key:
217
217
  specification_version: 4
218
218
  summary: API Client library for the Dataproc Metastore API