google-cloud-oracle_database 1.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 91ef005c32d60bc7955b33d8c46822bcdd1f7615384e71b030e466c6e492f07d
4
- data.tar.gz: af90fd65d3d6dd82c519d8a3bcbec11b02c0538cd7d370dd1bec7abed5b5dfc7
3
+ metadata.gz: 1cb0abc498ec657ad4351388108fc2d9545b09a4d21626791d8f0daac30b38d7
4
+ data.tar.gz: 0ab5a16614a94fb410c400c0eb68fa36640c28066fd5f18ec315a5c1feb5c382
5
5
  SHA512:
6
- metadata.gz: e06731a2bbdcd2fab8a6f6c8fcc5a6a713096502e2eda7c27916603b9fdd43e72ac51c03da32b1d9d11d03f525b5906248095e9e16fdc535c271012397020978
7
- data.tar.gz: e568c7fd3edcefb3d7f69d7a9f38ad669cc1138c8055566f9c3c6b5885cb0e28e43ce0eb1e0c4060fc46dcb0952c73f0a23d701c89f7896dcb4fcab3f7036cfb
6
+ metadata.gz: 903168f6a100a0f0164dfd1bc238522ac4c04a8bb1adb7cadcc3bf4a426fbf5f3f7d3511299424ffd399a0861a381f4cdf104a3c95d359c25af4514ef6b0dff3
7
+ data.tar.gz: ea32d0d5595e608eb649a041515578ca7b1660635713b2329a662f026cbc9ca4fa4e8c8327f9404b864881dd64069693f26d72fb113a1071c32c293523f30531
data/README.md CHANGED
@@ -2,7 +2,6 @@
2
2
 
3
3
  The Oracle Database@Google Cloud API provides a set of APIs to manage Oracle database services, such as Exadata and Autonomous Databases.
4
4
 
5
- The Oracle Database@Google Cloud API provides a set of APIs to manage Oracle database services, such as Exadata and Autonomous Databases.
6
5
 
7
6
  Actual client classes for the various versions of this API are defined in
8
7
  _versioned_ client gems, with names of the form `google-cloud-oracle_database-v*`.
@@ -76,12 +75,10 @@ working, try updating the versioned clients in your bundle or installed gems:
76
75
 
77
76
  This library is supported on Ruby 3.2+.
78
77
 
79
- Google provides official support for Ruby versions that are actively supported
80
- by Ruby Core—that is, Ruby versions that are either in normal maintenance or
81
- in security maintenance, and not end of life. Older versions of Ruby _may_
82
- still work, but are unsupported and not recommended. See
83
- https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby
84
- support schedule.
78
+ Google provides official support for Ruby versions as described in the
79
+ [Supported Ruby versions](https://docs.cloud.google.com/ruby/getting-started/supported-ruby-versions)
80
+ policy. Older versions of Ruby _may_ still work, but are unsupported and not
81
+ recommended.
85
82
 
86
83
  ## Which client should I use?
87
84
 
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Cloud
22
22
  module OracleDatabase
23
- VERSION = "1.0.0"
23
+ VERSION = "1.1.0"
24
24
  end
25
25
  end
26
26
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright 2024 Google LLC
3
+ # Copyright 2026 Google LLC
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -34,6 +34,7 @@ require "google/cloud/config"
34
34
  config.add_field! :scope, nil, match: [::Array, ::String]
35
35
  config.add_field! :lib_name, nil, match: ::String
36
36
  config.add_field! :lib_version, nil, match: ::String
37
+ config.add_field! :interceptors, nil, match: ::Array
37
38
  config.add_field! :timeout, nil, match: ::Numeric
38
39
  config.add_field! :metadata, nil, match: ::Hash
39
40
  config.add_field! :retry_policy, nil, match: [::Hash, ::Proc]
@@ -48,15 +49,17 @@ module Google
48
49
  # Create a new client object for OracleDatabase.
49
50
  #
50
51
  # By default, this returns an instance of
51
- # [Google::Cloud::OracleDatabase::V1::OracleDatabase::Rest::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-oracle_database-v1/latest/Google-Cloud-OracleDatabase-V1-OracleDatabase-Rest-Client)
52
- # for a REST client for version V1 of the API.
52
+ # [Google::Cloud::OracleDatabase::V1::OracleDatabase::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-oracle_database-v1/latest/Google-Cloud-OracleDatabase-V1-OracleDatabase-Client)
53
+ # for a gRPC client for version V1 of the API.
53
54
  # However, you can specify a different API version by passing it in the
54
55
  # `version` parameter. If the OracleDatabase service is
55
56
  # supported by that API version, and the corresponding gem is available, the
56
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.
57
60
  #
58
61
  # Raises an exception if the currently installed versioned client gem for the
59
- # given API version does not support the OracleDatabase service.
62
+ # given API version does not support the given transport of the OracleDatabase service.
60
63
  # You can determine whether the method will succeed by calling
61
64
  # {Google::Cloud::OracleDatabase.oracle_database_available?}.
62
65
  #
@@ -66,9 +69,10 @@ module Google
66
69
  #
67
70
  # @param version [::String, ::Symbol] The API version to connect to. Optional.
68
71
  # Defaults to `:v1`.
72
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
69
73
  # @return [::Object] A client object for the specified version.
70
74
  #
71
- def self.oracle_database version: :v1, &block
75
+ def self.oracle_database version: :v1, transport: :grpc, &block
72
76
  require "google/cloud/oracle_database/#{version.to_s.downcase}"
73
77
 
74
78
  package_name = Google::Cloud::OracleDatabase
@@ -76,7 +80,8 @@ module Google
76
80
  .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
77
81
  .first
78
82
  service_module = Google::Cloud::OracleDatabase.const_get(package_name).const_get(:OracleDatabase)
79
- service_module.const_get(:Rest).const_get(:Client).new(&block)
83
+ service_module = service_module.const_get(:Rest) if transport == :rest
84
+ service_module.const_get(:Client).new(&block)
80
85
  end
81
86
 
82
87
  ##
@@ -88,9 +93,10 @@ module Google
88
93
  #
89
94
  # @param version [::String, ::Symbol] The API version to connect to. Optional.
90
95
  # Defaults to `:v1`.
96
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
91
97
  # @return [boolean] Whether the service is available.
92
98
  #
93
- def self.oracle_database_available? version: :v1
99
+ def self.oracle_database_available? version: :v1, transport: :grpc
94
100
  require "google/cloud/oracle_database/#{version.to_s.downcase}"
95
101
  package_name = Google::Cloud::OracleDatabase
96
102
  .constants
@@ -100,8 +106,10 @@ module Google
100
106
  service_module = Google::Cloud::OracleDatabase.const_get package_name
101
107
  return false unless service_module.const_defined? :OracleDatabase
102
108
  service_module = service_module.const_get :OracleDatabase
103
- return false unless service_module.const_defined? :Rest
104
- service_module = service_module.const_get :Rest
109
+ if transport == :rest
110
+ return false unless service_module.const_defined? :Rest
111
+ service_module = service_module.const_get :Rest
112
+ end
105
113
  service_module.const_defined? :Client
106
114
  rescue ::LoadError
107
115
  false
@@ -119,6 +127,8 @@ module Google
119
127
  # The library name as recorded in instrumentation and logging.
120
128
  # * `lib_version` (*type:* `String`) -
121
129
  # The library version as recorded in instrumentation and logging.
130
+ # * `interceptors` (*type:* `Array<GRPC::ClientInterceptor>`) -
131
+ # An array of interceptors that are run before calls are executed.
122
132
  # * `timeout` (*type:* `Numeric`) -
123
133
  # Default timeout in seconds.
124
134
  # * `metadata` (*type:* `Hash{Symbol=>String}`) -
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright 2024 Google LLC
3
+ # Copyright 2026 Google LLC
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-oracle_database
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC