google-cloud-oracle_database 1.0.0 → 1.0.2

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: 6e3f118374ed7c841a4d73e4feebefd45580f03e1cd7b8d0dbd8963d070be487
4
+ data.tar.gz: acbe5ea4b97d70157138a5af991640443af0616d0f28b5adb37c548acf5b02a6
5
5
  SHA512:
6
- metadata.gz: e06731a2bbdcd2fab8a6f6c8fcc5a6a713096502e2eda7c27916603b9fdd43e72ac51c03da32b1d9d11d03f525b5906248095e9e16fdc535c271012397020978
7
- data.tar.gz: e568c7fd3edcefb3d7f69d7a9f38ad669cc1138c8055566f9c3c6b5885cb0e28e43ce0eb1e0c4060fc46dcb0952c73f0a23d701c89f7896dcb4fcab3f7036cfb
6
+ metadata.gz: 01e134a34f96ca5c683e0a480c01916dab5123042591b34eb39c908bbff36491f0e540d45a213d7d55eb6a18d8db48c8f29f7ee5214654674dbad603a2d8c2e0
7
+ data.tar.gz: '00081a3ca023e1ba255f7c1b18234317f8e34f3e7a17d6d9cc592aec40b98a5c7bfeedbd52edb4a45e75ff915fe037868442e8ea0b34bc5a9b6123b63496fc0e'
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*`.
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Cloud
22
22
  module OracleDatabase
23
- VERSION = "1.0.0"
23
+ VERSION = "1.0.2"
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.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC