google-cloud-bigquery-data_policies 0.1.0 → 1.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.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +1 -1
- data/README.md +3 -28
- data/lib/google/cloud/bigquery/data_policies/version.rb +1 -1
- data/lib/google/cloud/bigquery/data_policies.rb +13 -9
- metadata +25 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: abbcb149cb8dac65a6916ad9b40e403a31dff0b329a625ebcfa463970ac9c89b
|
4
|
+
data.tar.gz: bf3466e47c1ecfe36fedb5cfdd97b852ed06e90d2bfce74f597f9df140150571
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1ef69aea577d5e320e093ad81d80af3ee2398cd7c2e4958aae8baf1c564e2cafebac9e1e2922dd489c5be2a55d8a742f93612b8a7e08326b38297c77e5e0c4a6
|
7
|
+
data.tar.gz: d4ef7fbfa49f3f4d61d82e76bab3cc432f559306c70db6b1bfb6b0d770b8d6a13936536b9790481e0c3e8d92719611803320e2fa00548351a08549b54884deb3
|
data/AUTHENTICATION.md
CHANGED
@@ -64,7 +64,7 @@ containers where writing files is difficult or not encouraged.
|
|
64
64
|
|
65
65
|
The environment variables that google-cloud-bigquery-data_policies
|
66
66
|
checks for credentials are configured on the service Credentials class (such as
|
67
|
-
`::Google::Cloud::Bigquery::DataPolicies::
|
67
|
+
`::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Credentials`):
|
68
68
|
|
69
69
|
* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
|
70
70
|
* `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
|
data/README.md
CHANGED
@@ -16,6 +16,7 @@ for this library, google-cloud-bigquery-data_policies, to see the convenience me
|
|
16
16
|
constructing client objects. Reference documentation for the client objects
|
17
17
|
themselves can be found in the client library documentation for the versioned
|
18
18
|
client gems:
|
19
|
+
[google-cloud-bigquery-data_policies-v1](https://googleapis.dev/ruby/google-cloud-bigquery-data_policies-v1/latest),
|
19
20
|
[google-cloud-bigquery-data_policies-v1beta1](https://googleapis.dev/ruby/google-cloud-bigquery-data_policies-v1beta1/latest).
|
20
21
|
|
21
22
|
See also the [Product Documentation](https://cloud.google.com/bigquery)
|
@@ -34,32 +35,6 @@ In order to use this library, you first need to go through the following steps:
|
|
34
35
|
1. [Enable the API.](https://console.cloud.google.com/apis/library/bigquerydatapolicy.googleapis.com)
|
35
36
|
1. {file:AUTHENTICATION.md Set up authentication.}
|
36
37
|
|
37
|
-
## Enabling Logging
|
38
|
-
|
39
|
-
To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
|
40
|
-
The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib/libdoc/logger/rdoc/Logger.html) as shown below,
|
41
|
-
or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
|
42
|
-
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)
|
43
|
-
and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
|
44
|
-
|
45
|
-
Configuring a Ruby stdlib logger:
|
46
|
-
|
47
|
-
```ruby
|
48
|
-
require "logger"
|
49
|
-
|
50
|
-
module MyLogger
|
51
|
-
LOGGER = Logger.new $stderr, level: Logger::WARN
|
52
|
-
def logger
|
53
|
-
LOGGER
|
54
|
-
end
|
55
|
-
end
|
56
|
-
|
57
|
-
# Define a gRPC module-level logger method before grpc/logconfig.rb loads.
|
58
|
-
module GRPC
|
59
|
-
extend MyLogger
|
60
|
-
end
|
61
|
-
```
|
62
|
-
|
63
38
|
## Supported Ruby Versions
|
64
39
|
|
65
40
|
This library is supported on Ruby 2.6+.
|
@@ -76,7 +51,7 @@ support schedule.
|
|
76
51
|
Most modern Ruby client libraries for Google APIs come in two flavors: the main
|
77
52
|
client library with a name such as `google-cloud-bigquery-data_policies`,
|
78
53
|
and lower-level _versioned_ client libraries with names such as
|
79
|
-
`google-cloud-bigquery-data_policies-
|
54
|
+
`google-cloud-bigquery-data_policies-v1`.
|
80
55
|
_In most cases, you should install the main client._
|
81
56
|
|
82
57
|
### What's the difference between the main client and a versioned client?
|
@@ -114,7 +89,7 @@ You can use a versioned client if you are content with a possibly lower-level
|
|
114
89
|
class interface, you explicitly want to avoid features provided by the main
|
115
90
|
client, or you want to access a specific service version not be covered by the
|
116
91
|
main client. You can identify versioned client gems because the service version
|
117
|
-
is part of the name, e.g. `google-cloud-bigquery-data_policies-
|
92
|
+
is part of the name, e.g. `google-cloud-bigquery-data_policies-v1`.
|
118
93
|
|
119
94
|
### What about the google-apis-<name> clients?
|
120
95
|
|
@@ -49,30 +49,34 @@ module Google
|
|
49
49
|
# Create a new client object for DataPolicyService.
|
50
50
|
#
|
51
51
|
# By default, this returns an instance of
|
52
|
-
# [Google::Cloud::Bigquery::DataPolicies::
|
53
|
-
# for version
|
54
|
-
# However, you can specify
|
52
|
+
# [Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client](https://googleapis.dev/ruby/google-cloud-bigquery-data_policies-v1/latest/Google/Cloud/Bigquery/DataPolicies/V1/DataPolicyService/Client.html)
|
53
|
+
# for a gRPC client for version V1 of the API.
|
54
|
+
# However, you can specify a different API version by passing it in the
|
55
55
|
# `version` parameter. If the DataPolicyService service is
|
56
56
|
# supported by that API version, and the corresponding gem is available, the
|
57
57
|
# appropriate versioned client will be returned.
|
58
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
59
|
+
# the `transport` parameter.
|
58
60
|
#
|
59
61
|
# ## About DataPolicyService
|
60
62
|
#
|
61
63
|
# Data Policy Service provides APIs for managing the label-policy bindings.
|
62
64
|
#
|
63
65
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
64
|
-
# Defaults to `:
|
65
|
-
# @
|
66
|
+
# Defaults to `:v1`.
|
67
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
68
|
+
# @return [::Object] A client object for the specified version.
|
66
69
|
#
|
67
|
-
def self.data_policy_service version: :
|
70
|
+
def self.data_policy_service version: :v1, transport: :grpc, &block
|
68
71
|
require "google/cloud/bigquery/data_policies/#{version.to_s.downcase}"
|
69
72
|
|
70
73
|
package_name = Google::Cloud::Bigquery::DataPolicies
|
71
74
|
.constants
|
72
75
|
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
73
76
|
.first
|
74
|
-
|
75
|
-
|
77
|
+
service_module = Google::Cloud::Bigquery::DataPolicies.const_get(package_name).const_get(:DataPolicyService)
|
78
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
79
|
+
service_module.const_get(:Client).new(&block)
|
76
80
|
end
|
77
81
|
|
78
82
|
##
|
@@ -92,7 +96,7 @@ module Google
|
|
92
96
|
# * `timeout` (*type:* `Numeric`) -
|
93
97
|
# Default timeout in seconds.
|
94
98
|
# * `metadata` (*type:* `Hash{Symbol=>String}`) -
|
95
|
-
# Additional
|
99
|
+
# Additional headers to be sent with the call.
|
96
100
|
# * `retry_policy` (*type:* `Hash`) -
|
97
101
|
# The retry policy. The value is a hash with the following keys:
|
98
102
|
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
metadata
CHANGED
@@ -1,22 +1,42 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-bigquery-data_policies
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.1.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:
|
11
|
+
date: 2023-03-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: google-cloud-bigquery-data_policies-v1
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.2'
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 2.a
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0.2'
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 2.a
|
13
33
|
- !ruby/object:Gem::Dependency
|
14
34
|
name: google-cloud-bigquery-data_policies-v1beta1
|
15
35
|
requirement: !ruby/object:Gem::Requirement
|
16
36
|
requirements:
|
17
37
|
- - ">="
|
18
38
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
39
|
+
version: '0.1'
|
20
40
|
- - "<"
|
21
41
|
- !ruby/object:Gem::Version
|
22
42
|
version: 2.a
|
@@ -26,7 +46,7 @@ dependencies:
|
|
26
46
|
requirements:
|
27
47
|
- - ">="
|
28
48
|
- !ruby/object:Gem::Version
|
29
|
-
version: '0.
|
49
|
+
version: '0.1'
|
30
50
|
- - "<"
|
31
51
|
- !ruby/object:Gem::Version
|
32
52
|
version: 2.a
|
@@ -189,7 +209,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
189
209
|
- !ruby/object:Gem::Version
|
190
210
|
version: '0'
|
191
211
|
requirements: []
|
192
|
-
rubygems_version: 3.
|
212
|
+
rubygems_version: 3.4.2
|
193
213
|
signing_key:
|
194
214
|
specification_version: 4
|
195
215
|
summary: API Client library for the BigQuery Data Policy Service V1beta1 API
|