google-cloud-dataplex 0.1.0 → 0.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 53102c0c2b4ef2d77eea7c49240f75cfe9cd662a70b8b08236f3d198a47974fd
4
- data.tar.gz: 4d0cdfb81463447280db93eb30d0fbf61b37e2d840e09d604c00ed0040b75f5b
3
+ metadata.gz: b10e84cac18a8c07cf7d7dd53d7fea5a2fe24b72c34b4c9cd490a707492e4975
4
+ data.tar.gz: 30d682560a81ea7d03b7b849de3a565a6eecc25a25dcf01147115fbf7907b7fb
5
5
  SHA512:
6
- metadata.gz: 43b49658a8f9475998182b8689a61e66e771c7e269003bbdae78f6242038ec302b4ca098f4392582f06cd13895e8091ca647ee71857bf4a5837783881ab72e2c
7
- data.tar.gz: a567741bdd55702a022410ed76da833cbb18d47dc3e9186c436417aa3ea76c9f54e7bb4f057aa0d86bfb53aa88737ab90597667296229af7aaef705d7570fe1d
6
+ metadata.gz: 4b876fefdf49413f95c7d42bbd6b7d84c99f93793ac844fca72ce69b1ae6aa4fae463e17a643cd1f52f1ad6b4efe723129c932c3b88fcecba24ace8d566059ad
7
+ data.tar.gz: '027630867540035665058e5fdc959d997cd9691c2be3d86b85605fe1555b15b8cad30ebd40099aa4af1a4aa20f4087a9f556b6d4e3512155caeb1631291e1455'
data/AUTHENTICATION.md CHANGED
@@ -27,7 +27,7 @@ export GOOGLE_CLOUD_CREDENTIALS=path/to/keyfile.json
27
27
  ```ruby
28
28
  require "google/cloud/dataplex"
29
29
 
30
- client = Google::Cloud::Dataplex.metadata_service
30
+ client = Google::Cloud::Dataplex.content_service
31
31
  ```
32
32
 
33
33
  ## Credential Lookup
@@ -64,7 +64,7 @@ containers where writing files is difficult or not encouraged.
64
64
 
65
65
  The environment variables that google-cloud-dataplex
66
66
  checks for credentials are configured on the service Credentials class (such as
67
- `::Google::Cloud::Dataplex::V1::MetadataService::Credentials`):
67
+ `::Google::Cloud::Dataplex::V1::ContentService::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
@@ -75,7 +75,7 @@ require "google/cloud/dataplex"
75
75
 
76
76
  ENV["GOOGLE_CLOUD_CREDENTIALS"] = "path/to/keyfile.json"
77
77
 
78
- client = Google::Cloud::Dataplex.metadata_service
78
+ client = Google::Cloud::Dataplex.content_service
79
79
  ```
80
80
 
81
81
  ### Configuration
@@ -86,7 +86,7 @@ it in an environment variable. Either on an individual client initialization:
86
86
  ```ruby
87
87
  require "google/cloud/dataplex"
88
88
 
89
- client = Google::Cloud::Dataplex.metadata_service do |config|
89
+ client = Google::Cloud::Dataplex.content_service do |config|
90
90
  config.credentials = "path/to/keyfile.json"
91
91
  end
92
92
  ```
@@ -100,7 +100,7 @@ Google::Cloud::Dataplex.configure do |config|
100
100
  config.credentials = "path/to/keyfile.json"
101
101
  end
102
102
 
103
- client = Google::Cloud::Dataplex.metadata_service
103
+ client = Google::Cloud::Dataplex.content_service
104
104
  ```
105
105
 
106
106
  ### Cloud SDK
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Cloud
22
22
  module Dataplex
23
- VERSION = "0.1.0"
23
+ VERSION = "0.2.0"
24
24
  end
25
25
  end
26
26
  end
@@ -44,6 +44,36 @@ end
44
44
  module Google
45
45
  module Cloud
46
46
  module Dataplex
47
+ ##
48
+ # Create a new client object for ContentService.
49
+ #
50
+ # By default, this returns an instance of
51
+ # [Google::Cloud::Dataplex::V1::ContentService::Client](https://googleapis.dev/ruby/google-cloud-dataplex-v1/latest/Google/Cloud/Dataplex/V1/ContentService/Client.html)
52
+ # for version V1 of the API.
53
+ # However, you can specify specify a different API version by passing it in the
54
+ # `version` parameter. If the ContentService service is
55
+ # supported by that API version, and the corresponding gem is available, the
56
+ # appropriate versioned client will be returned.
57
+ #
58
+ # ## About ContentService
59
+ #
60
+ # ContentService manages Notebook and SQL Scripts for Dataplex.
61
+ #
62
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
63
+ # Defaults to `:v1`.
64
+ # @return [ContentService::Client] A client object for the specified version.
65
+ #
66
+ def self.content_service version: :v1, &block
67
+ require "google/cloud/dataplex/#{version.to_s.downcase}"
68
+
69
+ package_name = Google::Cloud::Dataplex
70
+ .constants
71
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
72
+ .first
73
+ package_module = Google::Cloud::Dataplex.const_get package_name
74
+ package_module.const_get(:ContentService).const_get(:Client).new(&block)
75
+ end
76
+
47
77
  ##
48
78
  # Create a new client object for MetadataService.
49
79
  #
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-dataplex
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.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-02-16 00:00:00.000000000 Z
11
+ date: 2022-02-18 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.2'
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.2'
44
44
  - - "<"
45
45
  - !ruby/object:Gem::Version
46
46
  version: 2.a