Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix!: remove gRPC support for client libraries #27296

Merged
merged 2 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 2 additions & 24 deletions google-cloud-api_hub-v1/.owlbot-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,53 +16,45 @@
"lib/google-cloud-api_hub-v1.rb",
"lib/google/cloud/api_hub/v1.rb",
"lib/google/cloud/api_hub/v1/api_hub.rb",
"lib/google/cloud/api_hub/v1/api_hub/client.rb",
"lib/google/cloud/api_hub/v1/api_hub/credentials.rb",
"lib/google/cloud/api_hub/v1/api_hub/paths.rb",
"lib/google/cloud/api_hub/v1/api_hub/rest.rb",
"lib/google/cloud/api_hub/v1/api_hub/rest/client.rb",
"lib/google/cloud/api_hub/v1/api_hub/rest/service_stub.rb",
"lib/google/cloud/api_hub/v1/api_hub_dependencies.rb",
"lib/google/cloud/api_hub/v1/api_hub_dependencies/client.rb",
"lib/google/cloud/api_hub/v1/api_hub_dependencies/credentials.rb",
"lib/google/cloud/api_hub/v1/api_hub_dependencies/paths.rb",
"lib/google/cloud/api_hub/v1/api_hub_dependencies/rest.rb",
"lib/google/cloud/api_hub/v1/api_hub_dependencies/rest/client.rb",
"lib/google/cloud/api_hub/v1/api_hub_dependencies/rest/service_stub.rb",
"lib/google/cloud/api_hub/v1/api_hub_plugin.rb",
"lib/google/cloud/api_hub/v1/api_hub_plugin/client.rb",
"lib/google/cloud/api_hub/v1/api_hub_plugin/credentials.rb",
"lib/google/cloud/api_hub/v1/api_hub_plugin/paths.rb",
"lib/google/cloud/api_hub/v1/api_hub_plugin/rest.rb",
"lib/google/cloud/api_hub/v1/api_hub_plugin/rest/client.rb",
"lib/google/cloud/api_hub/v1/api_hub_plugin/rest/service_stub.rb",
"lib/google/cloud/api_hub/v1/bindings_override.rb",
"lib/google/cloud/api_hub/v1/host_project_registration_service.rb",
"lib/google/cloud/api_hub/v1/host_project_registration_service/client.rb",
"lib/google/cloud/api_hub/v1/host_project_registration_service/credentials.rb",
"lib/google/cloud/api_hub/v1/host_project_registration_service/paths.rb",
"lib/google/cloud/api_hub/v1/host_project_registration_service/rest.rb",
"lib/google/cloud/api_hub/v1/host_project_registration_service/rest/client.rb",
"lib/google/cloud/api_hub/v1/host_project_registration_service/rest/service_stub.rb",
"lib/google/cloud/api_hub/v1/linting_service.rb",
"lib/google/cloud/api_hub/v1/linting_service/client.rb",
"lib/google/cloud/api_hub/v1/linting_service/credentials.rb",
"lib/google/cloud/api_hub/v1/linting_service/paths.rb",
"lib/google/cloud/api_hub/v1/linting_service/rest.rb",
"lib/google/cloud/api_hub/v1/linting_service/rest/client.rb",
"lib/google/cloud/api_hub/v1/linting_service/rest/service_stub.rb",
"lib/google/cloud/api_hub/v1/provisioning.rb",
"lib/google/cloud/api_hub/v1/provisioning/client.rb",
"lib/google/cloud/api_hub/v1/provisioning/credentials.rb",
"lib/google/cloud/api_hub/v1/provisioning/operations.rb",
"lib/google/cloud/api_hub/v1/provisioning/paths.rb",
"lib/google/cloud/api_hub/v1/provisioning/rest.rb",
"lib/google/cloud/api_hub/v1/provisioning/rest/client.rb",
"lib/google/cloud/api_hub/v1/provisioning/rest/operations.rb",
"lib/google/cloud/api_hub/v1/provisioning/rest/service_stub.rb",
"lib/google/cloud/api_hub/v1/rest.rb",
"lib/google/cloud/api_hub/v1/runtime_project_attachment_service.rb",
"lib/google/cloud/api_hub/v1/runtime_project_attachment_service/client.rb",
"lib/google/cloud/api_hub/v1/runtime_project_attachment_service/credentials.rb",
"lib/google/cloud/api_hub/v1/runtime_project_attachment_service/paths.rb",
"lib/google/cloud/api_hub/v1/runtime_project_attachment_service/rest.rb",
Expand Down Expand Up @@ -161,31 +153,17 @@
"snippets/runtime_project_attachment_service/list_runtime_project_attachments.rb",
"snippets/runtime_project_attachment_service/lookup_runtime_project_attachment.rb",
"snippets/snippet_metadata_google.cloud.apihub.v1.json",
"test/google/cloud/api_hub/v1/api_hub_dependencies_paths_test.rb",
"test/google/cloud/api_hub/v1/api_hub_dependencies_rest_test.rb",
"test/google/cloud/api_hub/v1/api_hub_dependencies_test.rb",
"test/google/cloud/api_hub/v1/api_hub_paths_test.rb",
"test/google/cloud/api_hub/v1/api_hub_plugin_paths_test.rb",
"test/google/cloud/api_hub/v1/api_hub_plugin_rest_test.rb",
"test/google/cloud/api_hub/v1/api_hub_plugin_test.rb",
"test/google/cloud/api_hub/v1/api_hub_rest_test.rb",
"test/google/cloud/api_hub/v1/api_hub_test.rb",
"test/google/cloud/api_hub/v1/host_project_registration_service_paths_test.rb",
"test/google/cloud/api_hub/v1/host_project_registration_service_rest_test.rb",
"test/google/cloud/api_hub/v1/host_project_registration_service_test.rb",
"test/google/cloud/api_hub/v1/linting_service_paths_test.rb",
"test/google/cloud/api_hub/v1/linting_service_rest_test.rb",
"test/google/cloud/api_hub/v1/linting_service_test.rb",
"test/google/cloud/api_hub/v1/provisioning_operations_test.rb",
"test/google/cloud/api_hub/v1/provisioning_paths_test.rb",
"test/google/cloud/api_hub/v1/provisioning_rest_test.rb",
"test/google/cloud/api_hub/v1/provisioning_test.rb",
"test/google/cloud/api_hub/v1/runtime_project_attachment_service_paths_test.rb",
"test/google/cloud/api_hub/v1/runtime_project_attachment_service_rest_test.rb",
"test/google/cloud/api_hub/v1/runtime_project_attachment_service_test.rb",
"test/helper.rb"
],
"static": [
".OwlBot.yaml"
".OwlBot.yaml",
".owlbot.rb"
]
}
8 changes: 4 additions & 4 deletions google-cloud-api_hub-v1/AUTHENTICATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ To configure a credentials file for an individual client initialization:
```ruby
require "google/cloud/api_hub/v1"

client = ::Google::Cloud::ApiHub::V1::ApiHub::Client.new do |config|
client = ::Google::Cloud::ApiHub::V1::ApiHub::Rest::Client.new do |config|
config.credentials = "path/to/credentialfile.json"
end
```
Expand All @@ -66,11 +66,11 @@ To configure a credentials file globally for all clients:
```ruby
require "google/cloud/api_hub/v1"

::Google::Cloud::ApiHub::V1::ApiHub::Client.configure do |config|
::Google::Cloud::ApiHub::V1::ApiHub::Rest::Client.configure do |config|
config.credentials = "path/to/credentialfile.json"
end

client = ::Google::Cloud::ApiHub::V1::ApiHub::Client.new
client = ::Google::Cloud::ApiHub::V1::ApiHub::Rest::Client.new
```

### Environment Variables
Expand Down Expand Up @@ -100,7 +100,7 @@ require "google/cloud/api_hub/v1"

ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json"

client = ::Google::Cloud::ApiHub::V1::ApiHub::Client.new
client = ::Google::Cloud::ApiHub::V1::ApiHub::Rest::Client.new
```

### Local ADC file
Expand Down
28 changes: 1 addition & 27 deletions google-cloud-api_hub-v1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ In order to use this library, you first need to go through the following steps:
```ruby
require "google/cloud/api_hub/v1"

client = ::Google::Cloud::ApiHub::V1::ApiHub::Client.new
client = ::Google::Cloud::ApiHub::V1::ApiHub::Rest::Client.new
request = ::Google::Cloud::ApiHub::V1::CreateApiRequest.new # (request fields as keyword arguments...)
response = client.create_api request
```
Expand All @@ -43,32 +43,6 @@ for class and method documentation.
See also the [Product Documentation](https://cloud.google.com/apigee/docs/apihub/what-is-api-hub)
for general usage information.

## Enabling Logging

To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest)
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)
and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.

Configuring a Ruby stdlib logger:

```ruby
require "logger"

module MyLogger
LOGGER = Logger.new $stderr, level: Logger::WARN
def logger
LOGGER
end
end

# Define a gRPC module-level logger method before grpc/logconfig.rb loads.
module GRPC
extend MyLogger
end
```


## Google Cloud Samples

Expand Down
5 changes: 0 additions & 5 deletions google-cloud-api_hub-v1/lib/google/cloud/api_hub/v1.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@ module ApiHub
##
# API client module.
#
# @example Load this package, including all its services, and instantiate a gRPC client
#
# require "google/cloud/api_hub/v1"
# client = ::Google::Cloud::ApiHub::V1::ApiHub::Client.new
#
# @example Load this package, including all its services, and instantiate a REST client
#
# require "google/cloud/api_hub/v1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,13 @@

# Auto-generated by gapic-generator-ruby. DO NOT EDIT!

require "gapic/common"
require "gapic/config"
require "gapic/config/method"

require "google/cloud/api_hub/v1/version"

require "google/cloud/api_hub/v1/api_hub/credentials"
require "google/cloud/api_hub/v1/api_hub/paths"
require "google/cloud/api_hub/v1/api_hub/client"
require "google/cloud/api_hub/v1/api_hub/rest"

module Google
Expand All @@ -34,11 +32,6 @@ module V1
##
# This service provides all methods related to the API hub.
#
# @example Load this service and instantiate a gRPC client
#
# require "google/cloud/api_hub/v1/api_hub"
# client = ::Google::Cloud::ApiHub::V1::ApiHub::Client.new
#
# @example Load this service and instantiate a REST client
#
# require "google/cloud/api_hub/v1/api_hub/rest"
Expand Down
Loading