From f9d7cbac5f8a90f50f97706256adc74835b1ad5e Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 20 Feb 2026 00:03:21 +0000 Subject: [PATCH 1/2] feat: Add Secure Source Manager and Generic HTTP Endpoint connection types feat: Add OAuth flow RPCs (StartOAuth, FinishOAuth) feat: Add Gemini Code Assist GitHub App type feat: Add HTTP Proxy base URI field feat: Add Deployment Events to Insights API (GetDeploymentEvent, ListDeploymentEvents) feat: Add Cloud Run and App Hub Service runtimes to InsightsConfig feat: Add Projects field to InsightsConfig for project tracking feat: A new message `google.cloud.developerconnect.v1.GenericHTTPEndpointConfig` is added feat: A new message `google.cloud.developerconnect.v1.SecureSourceManagerInstanceConfig` is added feat: A new message `google.cloud.developerconnect.v1.StartOAuthRequest` is added feat: A new message `google.cloud.developerconnect.v1.StartOAuthResponse` is added feat: A new message `google.cloud.developerconnect.v1.FinishOAuthRequest` is added feat: A new message `google.cloud.developerconnect.v1.FinishOAuthResponse` is added feat: A new message `google.cloud.developerconnect.v1.insights.Projects` is added feat: A new message `google.cloud.developerconnect.v1.insights.GoogleCloudRun` is added feat: A new message `google.cloud.developerconnect.v1.insights.AppHubService` is added feat: A new message `google.cloud.developerconnect.v1.insights.DeploymentEvent` is added feat: A new message `google.cloud.developerconnect.v1.insights.GetDeploymentEventRequest` is added feat: A new message `google.cloud.developerconnect.v1.insights.ListDeploymentEventsRequest` is added feat: A new message `google.cloud.developerconnect.v1.insights.ListDeploymentEventsResponse` is added feat: A new message `google.cloud.developerconnect.v1.insights.ArtifactDeployment` is added feat: A new field `secure_source_manager_instance_config` is added to message `google.cloud.developerconnect.v1.Connection` feat: A new field `http_config` is added to message `google.cloud.developerconnect.v1.Connection` feat: A new field `http_proxy_base_uri` is added to message `google.cloud.developerconnect.v1.HTTPProxyConfig` feat: A new enum value `GEMINI_CODE_ASSIST` is added to enum `google.cloud.developerconnect.v1.GitHubConfig.GitHubApp` feat: A new field `organization` is added to message `google.cloud.developerconnect.v1.GitHubEnterpriseConfig` feat: A new field `projects` is added to message `google.cloud.developerconnect.v1.insights.InsightsConfig` feat: A new field `google_cloud_run` is added to message `google.cloud.developerconnect.v1.insights.RuntimeConfig` feat: A new field `app_hub_service` is added to message `google.cloud.developerconnect.v1.insights.RuntimeConfig` docs: Updated comments to include regional secret patterns for SecretManager fields in `GitHubConfig`, `OAuthCredential`, `UserCredential`, `GitLabConfig`, `GitLabEnterpriseConfig`, `BitbucketDataCenterConfig`, and `BitbucketCloudConfig` docs: Updated comment for `CreateGitRepositoryLink` RPC in `google.cloud.developerconnect.v1.DeveloperConnect` docs: Updated description for `google.cloud.location.Locations.ListLocations` in YAML docs: Corrected typos in comments for `google.cloud.developerconnect.v1.insights.InsightsConfig` and `google.cloud.developerconnect.v1.insights.ArtifactConfig` PiperOrigin-RevId: 872542190 Source-Link: https://github.com/googleapis/googleapis/commit/7ed997c15ea081c509db910b4ea06c9a79cf009e Source-Link: https://github.com/googleapis/googleapis-gen/commit/6db7ec7134872eff2adfb89632e609f4621eaf4d Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRldmVsb3Blcl9jb25uZWN0LXYxLy5Pd2xCb3QueWFtbCIsImgiOiI2ZGI3ZWM3MTM0ODcyZWZmMmFkZmI4OTYzMmU2MDlmNDYyMWVhZjRkIn0= --- .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../google-cloud-developer_connect-v1/Gemfile | 11 + .../LICENSE.md | 201 + .../README.md | 154 + .../Rakefile | 169 + .../gapic_metadata.json | 192 + .../google-cloud-developer_connect-v1.gemspec | 29 + .../lib/google-cloud-developer_connect-v1.rb | 21 + .../lib/google/cloud/developer_connect/v1.rb | 46 + .../developer_connect/v1/bindings_override.rb | 75 + .../developer_connect/v1/developer_connect.rb | 56 + .../v1/developer_connect/client.rb | 3259 +++++++++++++++++ .../v1/developer_connect/credentials.rb | 47 + .../v1/developer_connect/operations.rb | 841 +++++ .../v1/developer_connect/paths.rb | 236 ++ .../v1/developer_connect/rest.rb | 54 + .../v1/developer_connect/rest/client.rb | 3042 +++++++++++++++ .../v1/developer_connect/rest/operations.rb | 925 +++++ .../v1/developer_connect/rest/service_stub.rb | 1675 +++++++++ .../google/cloud/developer_connect/v1/rest.rb | 39 + .../cloud/developer_connect/v1/version.rb | 28 + .../v1/developer_connect_pb.rb | 122 + .../v1/developer_connect_services_pb.rb | 104 + .../developerconnect/v1/insights_config_pb.rb | 78 + .../v1/insights_config_service.rb | 64 + .../v1/insights_config_service/client.rb | 1181 ++++++ .../v1/insights_config_service/credentials.rb | 47 + .../v1/insights_config_service/operations.rb | 841 +++++ .../v1/insights_config_service/paths.rb | 90 + .../v1/insights_config_service/rest.rb | 62 + .../v1/insights_config_service/rest/client.rb | 1097 ++++++ .../rest/operations.rb | 925 +++++ .../rest/service_stub.rb | 510 +++ .../v1/insights_config_services_pb.rb | 65 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 473 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/field_info.rb | 88 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 ++ .../developerconnect/v1/developer_connect.rb | 1581 ++++++++ .../developerconnect/v1/insights_config.rb | 556 +++ .../google/longrunning/operations.rb | 191 + .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 ++ .../proto_docs/google/protobuf/timestamp.rb | 127 + .../proto_docs/google/rpc/status.rb | 48 + .../snippets/Gemfile | 32 + .../create_account_connector.rb | 54 + .../developer_connect/create_connection.rb | 54 + .../create_git_repository_link.rb | 54 + .../delete_account_connector.rb | 54 + .../developer_connect/delete_connection.rb | 54 + .../delete_git_repository_link.rb | 54 + .../snippets/developer_connect/delete_self.rb | 54 + .../snippets/developer_connect/delete_user.rb | 54 + .../developer_connect/fetch_access_token.rb | 47 + .../fetch_git_hub_installations.rb | 47 + .../developer_connect/fetch_git_refs.rb | 47 + .../fetch_linkable_git_repositories.rb | 51 + .../developer_connect/fetch_read_token.rb | 47 + .../fetch_read_write_token.rb | 47 + .../snippets/developer_connect/fetch_self.rb | 47 + .../developer_connect/finish_o_auth.rb | 47 + .../get_account_connector.rb | 47 + .../developer_connect/get_connection.rb | 47 + .../get_git_repository_link.rb | 47 + .../list_account_connectors.rb | 51 + .../developer_connect/list_connections.rb | 51 + .../list_git_repository_links.rb | 51 + .../snippets/developer_connect/list_users.rb | 51 + .../developer_connect/start_o_auth.rb | 47 + .../update_account_connector.rb | 54 + .../developer_connect/update_connection.rb | 54 + .../create_insights_config.rb | 54 + .../delete_insights_config.rb | 54 + .../get_deployment_event.rb | 47 + .../get_insights_config.rb | 47 + .../list_deployment_events.rb | 51 + .../list_insights_configs.rb | 51 + .../update_insights_config.rb | 54 + ...data_google.cloud.developerconnect.v1.json | 1335 +++++++ .../v1/developer_connect_operations_test.rb | 400 ++ .../v1/developer_connect_paths_test.rb | 154 + .../v1/developer_connect_rest_test.rb | 1558 ++++++++ .../v1/developer_connect_test.rb | 1812 +++++++++ ...insights_config_service_operations_test.rb | 400 ++ .../v1/insights_config_service_paths_test.rb | 79 + .../v1/insights_config_service_rest_test.rb | 493 +++ .../v1/insights_config_service_test.rb | 581 +++ .../test/helper.rb | 25 + 99 files changed, 29018 insertions(+) create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/README.md create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/google-cloud-developer_connect-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/lib/google-cloud-developer_connect-v1.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/bindings_override.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/client.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/credentials.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/operations.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/paths.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/rest.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/developer_connect_pb.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/developer_connect_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_pb.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/client.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/api/field_info.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/cloud/developerconnect/v1/developer_connect.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/cloud/developerconnect/v1/insights_config.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/create_account_connector.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/create_connection.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/create_git_repository_link.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/delete_account_connector.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/delete_connection.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/delete_git_repository_link.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/delete_self.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/delete_user.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/fetch_access_token.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/fetch_git_hub_installations.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/fetch_git_refs.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/fetch_linkable_git_repositories.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/fetch_read_token.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/fetch_read_write_token.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/fetch_self.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/finish_o_auth.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/get_account_connector.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/get_connection.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/get_git_repository_link.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/list_account_connectors.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/list_connections.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/list_git_repository_links.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/list_users.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/start_o_auth.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/update_account_connector.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/update_connection.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/insights_config_service/create_insights_config.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/insights_config_service/delete_insights_config.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/insights_config_service/get_deployment_event.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/insights_config_service/get_insights_config.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/insights_config_service/list_deployment_events.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/insights_config_service/list_insights_configs.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/insights_config_service/update_insights_config.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/snippet_metadata_google.cloud.developerconnect.v1.json create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developer_connect/v1/developer_connect_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developer_connect/v1/developer_connect_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developer_connect/v1/developer_connect_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developer_connect/v1/developer_connect_test.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_test.rb create mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/test/helper.rb diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/.gitignore b/owl-bot-staging/google-cloud-developer_connect-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-developer_connect-v1/.repo-metadata.json new file mode 100644 index 000000000000..66b6fbd9f8fd --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "developerconnect.googleapis.com", + "api_shortname": "developerconnect", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-developer_connect-v1/latest", + "distribution_name": "google-cloud-developer_connect-v1", + "is_cloud": true, + "language": "ruby", + "name": "developerconnect", + "name_pretty": "Developer Connect V1 API", + "product_documentation": "https://cloud.google.com/developer-connect/docs/overview", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Developer Connect streamlines integration with third-party source code management platforms by simplifying authentication, authorization, and networking configuration. Note that google-cloud-developer_connect-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-developer_connect instead. See the readme for more details.", + "ruby-cloud-product-url": "https://cloud.google.com/developer-connect/docs/overview", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/.rubocop.yml b/owl-bot-staging/google-cloud-developer_connect-v1/.rubocop.yml new file mode 100644 index 000000000000..d41868966c78 --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-developer_connect-v1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-developer_connect-v1.rb" diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/.toys.rb b/owl-bot-staging/google-cloud-developer_connect-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/.yardopts b/owl-bot-staging/google-cloud-developer_connect-v1/.yardopts new file mode 100644 index 000000000000..2519b5c6a98c --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Developer Connect V1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-developer_connect-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..9177e65da388 --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-developer_connect-v1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-developer_connect-v1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/developer_connect/v1" + +client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/developer_connect/v1" + +::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-cloud-developer_connect-v1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/developer_connect/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-developer_connect-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/Gemfile b/owl-bot-staging/google-cloud-developer_connect-v1/Gemfile new file mode 100644 index 000000000000..6442df18fa2f --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/Gemfile @@ -0,0 +1,11 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.31.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/LICENSE.md b/owl-bot-staging/google-cloud-developer_connect-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/README.md b/owl-bot-staging/google-cloud-developer_connect-v1/README.md new file mode 100644 index 000000000000..10a894de2ec6 --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Developer Connect V1 API + +Connect third-party source code management to Google. + +Developer Connect streamlines integration with third-party source code management platforms by simplifying authentication, authorization, and networking configuration. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Developer Connect V1 API. Most users should consider using +the main client gem, +[google-cloud-developer_connect](https://rubygems.org/gems/google-cloud-developer_connect). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-developer_connect-v1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/developerconnect.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/developer_connect/v1" + +client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new +request = ::Google::Cloud::DeveloperConnect::V1::ListConnectionsRequest.new # (request fields as keyword arguments...) +response = client.list_connections request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-developer_connect-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/developer-connect/docs/overview) +for general usage information. + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +You can customize logging by modifying the `logger` configuration when +constructing a client object. For example: + +```ruby +require "google/cloud/developer_connect/v1" +require "logger" + +client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.0+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-developer_connect`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-developer_connect-v1`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-cloud-developer_connect`. +The main client is recommended because it will embody the best practices for +accessing the service, and may also provide more convenient interfaces or +tighter integration into frameworks and third-party libraries. In addition, the +documentation and samples published by Google will generally demonstrate use of +the main client. + +### Why would I want to use a versioned client? + +You can use a versioned client if you are content with a possibly lower-level +class interface, you explicitly want to avoid features provided by the main +client, or you want to access a specific service version not be covered by the +main client. You can identify versioned client gems because the service version +is part of the name, e.g. `google-cloud-developer_connect-v1`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/Rakefile b/owl-bot-staging/google-cloud-developer_connect-v1/Rakefile new file mode 100644 index 000000000000..c0064da5e8a1 --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-developer_connect-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["GOOGLE_CLOUD_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || + ENV["GCLOUD_TEST_KEYFILE_JSON"] + end + if project.nil? || keyfile.nil? + fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/developer_connect/v1/developer_connect/credentials" + ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["GOOGLE_CLOUD_PROJECT"] = project + ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project + ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile + + Rake::Task["acceptance:run"].invoke +end + +namespace :acceptance do + task :run do + if File.directory? "acceptance" + Rake::Task[:smoke_test].invoke + else + puts "The google-cloud-developer_connect-v1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-developer_connect-v1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-developer_connect-v1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-developer_connect-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-developer_connect-v1" + header "google-cloud-developer_connect-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-developer_connect-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-developer_connect-v1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-developer_connect-v1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-developer_connect-v1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-developer_connect-v1/gapic_metadata.json new file mode 100644 index 000000000000..15e3038a8897 --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/gapic_metadata.json @@ -0,0 +1,192 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.developerconnect.v1", + "libraryPackage": "::Google::Cloud::DeveloperConnect::V1", + "services": { + "DeveloperConnect": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client", + "rpcs": { + "ListConnections": { + "methods": [ + "list_connections" + ] + }, + "GetConnection": { + "methods": [ + "get_connection" + ] + }, + "CreateConnection": { + "methods": [ + "create_connection" + ] + }, + "UpdateConnection": { + "methods": [ + "update_connection" + ] + }, + "DeleteConnection": { + "methods": [ + "delete_connection" + ] + }, + "CreateGitRepositoryLink": { + "methods": [ + "create_git_repository_link" + ] + }, + "DeleteGitRepositoryLink": { + "methods": [ + "delete_git_repository_link" + ] + }, + "ListGitRepositoryLinks": { + "methods": [ + "list_git_repository_links" + ] + }, + "GetGitRepositoryLink": { + "methods": [ + "get_git_repository_link" + ] + }, + "FetchReadWriteToken": { + "methods": [ + "fetch_read_write_token" + ] + }, + "FetchReadToken": { + "methods": [ + "fetch_read_token" + ] + }, + "FetchLinkableGitRepositories": { + "methods": [ + "fetch_linkable_git_repositories" + ] + }, + "FetchGitHubInstallations": { + "methods": [ + "fetch_git_hub_installations" + ] + }, + "FetchGitRefs": { + "methods": [ + "fetch_git_refs" + ] + }, + "ListAccountConnectors": { + "methods": [ + "list_account_connectors" + ] + }, + "GetAccountConnector": { + "methods": [ + "get_account_connector" + ] + }, + "CreateAccountConnector": { + "methods": [ + "create_account_connector" + ] + }, + "UpdateAccountConnector": { + "methods": [ + "update_account_connector" + ] + }, + "DeleteAccountConnector": { + "methods": [ + "delete_account_connector" + ] + }, + "FetchAccessToken": { + "methods": [ + "fetch_access_token" + ] + }, + "ListUsers": { + "methods": [ + "list_users" + ] + }, + "DeleteUser": { + "methods": [ + "delete_user" + ] + }, + "FetchSelf": { + "methods": [ + "fetch_self" + ] + }, + "DeleteSelf": { + "methods": [ + "delete_self" + ] + }, + "StartOAuth": { + "methods": [ + "start_o_auth" + ] + }, + "FinishOAuth": { + "methods": [ + "finish_o_auth" + ] + } + } + } + } + }, + "InsightsConfigService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client", + "rpcs": { + "ListInsightsConfigs": { + "methods": [ + "list_insights_configs" + ] + }, + "CreateInsightsConfig": { + "methods": [ + "create_insights_config" + ] + }, + "GetInsightsConfig": { + "methods": [ + "get_insights_config" + ] + }, + "UpdateInsightsConfig": { + "methods": [ + "update_insights_config" + ] + }, + "DeleteInsightsConfig": { + "methods": [ + "delete_insights_config" + ] + }, + "GetDeploymentEvent": { + "methods": [ + "get_deployment_event" + ] + }, + "ListDeploymentEvents": { + "methods": [ + "list_deployment_events" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/google-cloud-developer_connect-v1.gemspec b/owl-bot-staging/google-cloud-developer_connect-v1/google-cloud-developer_connect-v1.gemspec new file mode 100644 index 000000000000..736cb409d10a --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/google-cloud-developer_connect-v1.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/developer_connect/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-developer_connect-v1" + gem.version = Google::Cloud::DeveloperConnect::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Developer Connect streamlines integration with third-party source code management platforms by simplifying authentication, authorization, and networking configuration. Note that google-cloud-developer_connect-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-developer_connect instead. See the readme for more details." + gem.summary = "Connect third-party source code management to Google." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.1" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-cloud-location", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google-cloud-developer_connect-v1.rb b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google-cloud-developer_connect-v1.rb new file mode 100644 index 000000000000..64f9d87fa987 --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google-cloud-developer_connect-v1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/developer_connect/v1" diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1.rb b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1.rb new file mode 100644 index 000000000000..985f2fce88de --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/developer_connect/v1/developer_connect" +require "google/cloud/developerconnect/v1/insights_config_service" +require "google/cloud/developer_connect/v1/version" + +module Google + module Cloud + module DeveloperConnect + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/developer_connect/v1" + # client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/developer_connect/v1" + # client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/developer_connect/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/bindings_override.rb b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/bindings_override.rb new file mode 100644 index 000000000000..54e590e79097 --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/bindings_override.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" + +module Google + module Cloud + module DeveloperConnect + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/cloud/developer_connect/v1/rest" + # client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new + # + module V1 + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "DeveloperConnect"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config + default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{name}/locations", + matches: [ + ["name", %r{^projects/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config + end + yield @configure if block_given? + @configure + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect.rb b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect.rb new file mode 100644 index 000000000000..d28b5541f061 --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/developer_connect/v1/version" + +require "google/cloud/developer_connect/v1/developer_connect/credentials" +require "google/cloud/developer_connect/v1/developer_connect/paths" +require "google/cloud/developer_connect/v1/developer_connect/operations" +require "google/cloud/developer_connect/v1/developer_connect/client" +require "google/cloud/developer_connect/v1/developer_connect/rest" + +module Google + module Cloud + module DeveloperConnect + module V1 + ## + # Service describing handlers for resources + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/developer_connect/v1/developer_connect" + # client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/developer_connect/v1/developer_connect/rest" + # client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new + # + module DeveloperConnect + end + end + end + end +end + +helper_path = ::File.join __dir__, "developer_connect", "helpers.rb" +require "google/cloud/developer_connect/v1/developer_connect/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/client.rb b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/client.rb new file mode 100644 index 000000000000..6a0bf39a110d --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/client.rb @@ -0,0 +1,3259 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/developerconnect/v1/developer_connect_pb" +require "google/cloud/location" + +module Google + module Cloud + module DeveloperConnect + module V1 + module DeveloperConnect + ## + # Client for the DeveloperConnect service. + # + # Service describing handlers for resources + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "developerconnect.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :developer_connect_stub + + ## + # Configure the DeveloperConnect Client class. + # + # See {::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DeveloperConnect clients + # ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "DeveloperConnect", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.list_connections.timeout = 60.0 + default_config.rpcs.list_connections.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_connection.timeout = 60.0 + default_config.rpcs.get_connection.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_connection.timeout = 60.0 + default_config.rpcs.create_connection.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_connection.timeout = 60.0 + default_config.rpcs.update_connection.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_connection.timeout = 60.0 + default_config.rpcs.delete_connection.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_git_repository_link.timeout = 60.0 + default_config.rpcs.create_git_repository_link.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_git_repository_link.timeout = 60.0 + default_config.rpcs.delete_git_repository_link.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_git_repository_link.timeout = 60.0 + default_config.rpcs.get_git_repository_link.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.fetch_read_write_token.timeout = 60.0 + default_config.rpcs.fetch_read_write_token.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.fetch_read_token.timeout = 60.0 + default_config.rpcs.fetch_read_token.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.fetch_linkable_git_repositories.timeout = 60.0 + default_config.rpcs.fetch_linkable_git_repositories.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.fetch_git_hub_installations.timeout = 60.0 + default_config.rpcs.fetch_git_hub_installations.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the DeveloperConnect Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @developer_connect_stub.universe_domain + end + + ## + # Create a new DeveloperConnect client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DeveloperConnect client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/developerconnect/v1/developer_connect_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @developer_connect_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @developer_connect_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @developer_connect_stub.endpoint + config.universe_domain = @developer_connect_stub.universe_domain + config.logger = @developer_connect_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @developer_connect_stub.logger + end + + # Service calls + + ## + # Lists Connections in a given project and location. + # + # @overload list_connections(request, options = nil) + # Pass arguments to `list_connections` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::ListConnectionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::ListConnectionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_connections(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_connections` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListConnectionsRequest + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results + # @param order_by [::String] + # Optional. Hint for how to order the results + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::Connection>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::Connection>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::ListConnectionsRequest.new + # + # # Call the list_connections method. + # result = client.list_connections request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::DeveloperConnect::V1::Connection. + # p item + # end + # + def list_connections request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::ListConnectionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_connections.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_connections.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_connections.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.call_rpc :list_connections, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @developer_connect_stub, :list_connections, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single Connection. + # + # @overload get_connection(request, options = nil) + # Pass arguments to `get_connection` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::GetConnectionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::GetConnectionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_connection(name: nil) + # Pass arguments to `get_connection` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::DeveloperConnect::V1::Connection] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::DeveloperConnect::V1::Connection] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::GetConnectionRequest.new + # + # # Call the get_connection method. + # result = client.get_connection request + # + # # The returned object is of type Google::Cloud::DeveloperConnect::V1::Connection. + # p result + # + def get_connection request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::GetConnectionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_connection.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_connection.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_connection.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.call_rpc :get_connection, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new Connection in a given project and location. + # + # @overload create_connection(request, options = nil) + # Pass arguments to `create_connection` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::CreateConnectionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::CreateConnectionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_connection(parent: nil, connection_id: nil, connection: nil, request_id: nil, validate_only: nil) + # Pass arguments to `create_connection` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Value for parent. + # @param connection_id [::String] + # Required. Id of the requesting object + # If auto-generating Id server-side, remove this field and + # connection_id from the method_signature of Create RPC + # @param connection [::Google::Cloud::DeveloperConnect::V1::Connection, ::Hash] + # Required. The resource being created + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param validate_only [::Boolean] + # Optional. If set, validate the request, but do not actually post it. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::CreateConnectionRequest.new + # + # # Call the create_connection method. + # result = client.create_connection request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_connection request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::CreateConnectionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_connection.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_connection.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_connection.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.call_rpc :create_connection, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the parameters of a single Connection. + # + # @overload update_connection(request, options = nil) + # Pass arguments to `update_connection` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::UpdateConnectionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::UpdateConnectionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_connection(update_mask: nil, connection: nil, request_id: nil, allow_missing: nil, validate_only: nil) + # Pass arguments to `update_connection` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Field mask is used to specify the fields to be overwritten in the + # Connection resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @param connection [::Google::Cloud::DeveloperConnect::V1::Connection, ::Hash] + # Required. The resource being updated + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param allow_missing [::Boolean] + # Optional. If set to true, and the connection is not found a new connection + # will be created. In this situation `update_mask` is ignored. + # The creation will succeed only if the input connection has all the + # necessary information (e.g a github_config with both user_oauth_token and + # installation_id properties). + # @param validate_only [::Boolean] + # Optional. If set, validate the request, but do not actually post it. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::UpdateConnectionRequest.new + # + # # Call the update_connection method. + # result = client.update_connection request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_connection request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::UpdateConnectionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_connection.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.connection&.name + header_params["connection.name"] = request.connection.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_connection.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_connection.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.call_rpc :update_connection, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single Connection. + # + # @overload delete_connection(request, options = nil) + # Pass arguments to `delete_connection` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::DeleteConnectionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::DeleteConnectionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_connection(name: nil, request_id: nil, validate_only: nil, etag: nil) + # Pass arguments to `delete_connection` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param validate_only [::Boolean] + # Optional. If set, validate the request, but do not actually post it. + # @param etag [::String] + # Optional. The current etag of the Connection. + # If an etag is provided and does not match the current etag of the + # Connection, deletion will be blocked and an ABORTED error will be returned. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::DeleteConnectionRequest.new + # + # # Call the delete_connection method. + # result = client.delete_connection request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_connection request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::DeleteConnectionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_connection.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_connection.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_connection.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.call_rpc :delete_connection, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a GitRepositoryLink. Upon linking a Git Repository, Developer + # Connect will configure the Git Repository to send webhook events to + # Developer Connect. Connections that use Firebase GitHub Application will + # have events forwarded to the Firebase service. Connections that use Gemini + # Code Assist will have events forwarded to Gemini Code Assist service. All + # other Connections will have events forwarded to Cloud Build. + # + # @overload create_git_repository_link(request, options = nil) + # Pass arguments to `create_git_repository_link` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::CreateGitRepositoryLinkRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::CreateGitRepositoryLinkRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_git_repository_link(parent: nil, git_repository_link: nil, git_repository_link_id: nil, request_id: nil, validate_only: nil) + # Pass arguments to `create_git_repository_link` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Value for parent. + # @param git_repository_link [::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink, ::Hash] + # Required. The resource being created + # @param git_repository_link_id [::String] + # Required. The ID to use for the repository, which will become the final + # component of the repository's resource name. This ID should be unique in + # the connection. Allows alphanumeric characters and any of + # -._~%!$&'()*+,;=@. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param validate_only [::Boolean] + # Optional. If set, validate the request, but do not actually post it. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::CreateGitRepositoryLinkRequest.new + # + # # Call the create_git_repository_link method. + # result = client.create_git_repository_link request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_git_repository_link request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::CreateGitRepositoryLinkRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_git_repository_link.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_git_repository_link.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_git_repository_link.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.call_rpc :create_git_repository_link, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single GitRepositoryLink. + # + # @overload delete_git_repository_link(request, options = nil) + # Pass arguments to `delete_git_repository_link` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::DeleteGitRepositoryLinkRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::DeleteGitRepositoryLinkRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_git_repository_link(name: nil, request_id: nil, validate_only: nil, etag: nil) + # Pass arguments to `delete_git_repository_link` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param validate_only [::Boolean] + # Optional. If set, validate the request, but do not actually post it. + # @param etag [::String] + # Optional. This checksum is computed by the server based on the value of + # other fields, and may be sent on update and delete requests to ensure the + # client has an up-to-date value before proceeding. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::DeleteGitRepositoryLinkRequest.new + # + # # Call the delete_git_repository_link method. + # result = client.delete_git_repository_link request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_git_repository_link request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::DeleteGitRepositoryLinkRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_git_repository_link.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_git_repository_link.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_git_repository_link.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.call_rpc :delete_git_repository_link, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists GitRepositoryLinks in a given project, location, and connection. + # + # @overload list_git_repository_links(request, options = nil) + # Pass arguments to `list_git_repository_links` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::ListGitRepositoryLinksRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::ListGitRepositoryLinksRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_git_repository_links(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_git_repository_links` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListGitRepositoryLinksRequest + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results + # @param order_by [::String] + # Optional. Hint for how to order the results + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::ListGitRepositoryLinksRequest.new + # + # # Call the list_git_repository_links method. + # result = client.list_git_repository_links request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink. + # p item + # end + # + def list_git_repository_links request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::ListGitRepositoryLinksRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_git_repository_links.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_git_repository_links.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_git_repository_links.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.call_rpc :list_git_repository_links, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @developer_connect_stub, :list_git_repository_links, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single GitRepositoryLink. + # + # @overload get_git_repository_link(request, options = nil) + # Pass arguments to `get_git_repository_link` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::GetGitRepositoryLinkRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::GetGitRepositoryLinkRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_git_repository_link(name: nil) + # Pass arguments to `get_git_repository_link` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::GetGitRepositoryLinkRequest.new + # + # # Call the get_git_repository_link method. + # result = client.get_git_repository_link request + # + # # The returned object is of type Google::Cloud::DeveloperConnect::V1::GitRepositoryLink. + # p result + # + def get_git_repository_link request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::GetGitRepositoryLinkRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_git_repository_link.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_git_repository_link.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_git_repository_link.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.call_rpc :get_git_repository_link, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Fetches read/write token of a given gitRepositoryLink. + # + # @overload fetch_read_write_token(request, options = nil) + # Pass arguments to `fetch_read_write_token` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload fetch_read_write_token(git_repository_link: nil) + # Pass arguments to `fetch_read_write_token` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param git_repository_link [::String] + # Required. The resource name of the gitRepositoryLink in the format + # `projects/*/locations/*/connections/*/gitRepositoryLinks/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenRequest.new + # + # # Call the fetch_read_write_token method. + # result = client.fetch_read_write_token request + # + # # The returned object is of type Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenResponse. + # p result + # + def fetch_read_write_token request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.fetch_read_write_token.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.git_repository_link + header_params["git_repository_link"] = request.git_repository_link + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.fetch_read_write_token.timeout, + metadata: metadata, + retry_policy: @config.rpcs.fetch_read_write_token.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.call_rpc :fetch_read_write_token, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Fetches read token of a given gitRepositoryLink. + # + # @overload fetch_read_token(request, options = nil) + # Pass arguments to `fetch_read_token` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::FetchReadTokenRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::FetchReadTokenRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload fetch_read_token(git_repository_link: nil) + # Pass arguments to `fetch_read_token` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param git_repository_link [::String] + # Required. The resource name of the gitRepositoryLink in the format + # `projects/*/locations/*/connections/*/gitRepositoryLinks/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::DeveloperConnect::V1::FetchReadTokenResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::DeveloperConnect::V1::FetchReadTokenResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::FetchReadTokenRequest.new + # + # # Call the fetch_read_token method. + # result = client.fetch_read_token request + # + # # The returned object is of type Google::Cloud::DeveloperConnect::V1::FetchReadTokenResponse. + # p result + # + def fetch_read_token request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::FetchReadTokenRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.fetch_read_token.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.git_repository_link + header_params["git_repository_link"] = request.git_repository_link + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.fetch_read_token.timeout, + metadata: metadata, + retry_policy: @config.rpcs.fetch_read_token.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.call_rpc :fetch_read_token, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # FetchLinkableGitRepositories returns a list of git repositories from an SCM + # that are available to be added to a Connection. + # + # @overload fetch_linkable_git_repositories(request, options = nil) + # Pass arguments to `fetch_linkable_git_repositories` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::FetchLinkableGitRepositoriesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::FetchLinkableGitRepositoriesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload fetch_linkable_git_repositories(connection: nil, page_size: nil, page_token: nil) + # Pass arguments to `fetch_linkable_git_repositories` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param connection [::String] + # Required. The name of the Connection. + # Format: `projects/*/locations/*/connections/*`. + # @param page_size [::Integer] + # Optional. Number of results to return in the list. Defaults to 20. + # @param page_token [::String] + # Optional. Page start. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::LinkableGitRepository>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::LinkableGitRepository>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::FetchLinkableGitRepositoriesRequest.new + # + # # Call the fetch_linkable_git_repositories method. + # result = client.fetch_linkable_git_repositories request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::DeveloperConnect::V1::LinkableGitRepository. + # p item + # end + # + def fetch_linkable_git_repositories request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::FetchLinkableGitRepositoriesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.fetch_linkable_git_repositories.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.connection + header_params["connection"] = request.connection + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.fetch_linkable_git_repositories.timeout, + metadata: metadata, + retry_policy: @config.rpcs.fetch_linkable_git_repositories.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.call_rpc :fetch_linkable_git_repositories, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @developer_connect_stub, :fetch_linkable_git_repositories, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # FetchGitHubInstallations returns the list of GitHub Installations that + # are available to be added to a Connection. + # For github.com, only installations accessible to the authorizer token + # are returned. For GitHub Enterprise, all installations are returned. + # + # @overload fetch_git_hub_installations(request, options = nil) + # Pass arguments to `fetch_git_hub_installations` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload fetch_git_hub_installations(connection: nil) + # Pass arguments to `fetch_git_hub_installations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param connection [::String] + # Required. The resource name of the connection in the format + # `projects/*/locations/*/connections/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsRequest.new + # + # # Call the fetch_git_hub_installations method. + # result = client.fetch_git_hub_installations request + # + # # The returned object is of type Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsResponse. + # p result + # + def fetch_git_hub_installations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.fetch_git_hub_installations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.connection + header_params["connection"] = request.connection + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.fetch_git_hub_installations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.fetch_git_hub_installations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.call_rpc :fetch_git_hub_installations, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Fetch the list of branches or tags for a given repository. + # + # @overload fetch_git_refs(request, options = nil) + # Pass arguments to `fetch_git_refs` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::FetchGitRefsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::FetchGitRefsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload fetch_git_refs(git_repository_link: nil, ref_type: nil, page_size: nil, page_token: nil) + # Pass arguments to `fetch_git_refs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param git_repository_link [::String] + # Required. The resource name of GitRepositoryLink in the format + # `projects/*/locations/*/connections/*/gitRepositoryLinks/*`. + # @param ref_type [::Google::Cloud::DeveloperConnect::V1::FetchGitRefsRequest::RefType] + # Required. Type of refs to fetch. + # @param page_size [::Integer] + # Optional. Number of results to return in the list. Default to 20. + # @param page_token [::String] + # Optional. Page start. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::DeveloperConnect::V1::FetchGitRefsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::DeveloperConnect::V1::FetchGitRefsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::FetchGitRefsRequest.new + # + # # Call the fetch_git_refs method. + # result = client.fetch_git_refs request + # + # # The returned object is of type Google::Cloud::DeveloperConnect::V1::FetchGitRefsResponse. + # p result + # + def fetch_git_refs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::FetchGitRefsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.fetch_git_refs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.git_repository_link + header_params["git_repository_link"] = request.git_repository_link + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.fetch_git_refs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.fetch_git_refs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.call_rpc :fetch_git_refs, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists AccountConnectors in a given project and location. + # + # @overload list_account_connectors(request, options = nil) + # Pass arguments to `list_account_connectors` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_account_connectors(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_account_connectors` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListAccountConnectorsRequest + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results + # @param order_by [::String] + # Optional. Hint for how to order the results + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::AccountConnector>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::AccountConnector>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsRequest.new + # + # # Call the list_account_connectors method. + # result = client.list_account_connectors request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::DeveloperConnect::V1::AccountConnector. + # p item + # end + # + def list_account_connectors request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_account_connectors.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_account_connectors.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_account_connectors.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.call_rpc :list_account_connectors, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @developer_connect_stub, :list_account_connectors, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single AccountConnector. + # + # @overload get_account_connector(request, options = nil) + # Pass arguments to `get_account_connector` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::GetAccountConnectorRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::GetAccountConnectorRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_account_connector(name: nil) + # Pass arguments to `get_account_connector` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::DeveloperConnect::V1::AccountConnector] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::DeveloperConnect::V1::AccountConnector] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::GetAccountConnectorRequest.new + # + # # Call the get_account_connector method. + # result = client.get_account_connector request + # + # # The returned object is of type Google::Cloud::DeveloperConnect::V1::AccountConnector. + # p result + # + def get_account_connector request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::GetAccountConnectorRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_account_connector.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_account_connector.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_account_connector.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.call_rpc :get_account_connector, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new AccountConnector in a given project and location. + # + # @overload create_account_connector(request, options = nil) + # Pass arguments to `create_account_connector` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::CreateAccountConnectorRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::CreateAccountConnectorRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_account_connector(parent: nil, account_connector_id: nil, account_connector: nil, request_id: nil, validate_only: nil) + # Pass arguments to `create_account_connector` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Location resource name as the account_connector’s parent. + # @param account_connector_id [::String] + # Required. The ID to use for the AccountConnector, which will become the + # final component of the AccountConnector's resource name. Its format should + # adhere to https://google.aip.dev/122#resource-id-segments Names must be + # unique per-project per-location. + # @param account_connector [::Google::Cloud::DeveloperConnect::V1::AccountConnector, ::Hash] + # Required. The AccountConnector to create. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param validate_only [::Boolean] + # Optional. If set, validate the request, but do not actually post it. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::CreateAccountConnectorRequest.new + # + # # Call the create_account_connector method. + # result = client.create_account_connector request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_account_connector request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::CreateAccountConnectorRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_account_connector.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_account_connector.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_account_connector.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.call_rpc :create_account_connector, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the parameters of a single AccountConnector. + # + # @overload update_account_connector(request, options = nil) + # Pass arguments to `update_account_connector` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::UpdateAccountConnectorRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::UpdateAccountConnectorRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_account_connector(update_mask: nil, account_connector: nil, request_id: nil, allow_missing: nil, validate_only: nil) + # Pass arguments to `update_account_connector` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields to be updated. + # @param account_connector [::Google::Cloud::DeveloperConnect::V1::AccountConnector, ::Hash] + # Required. The AccountConnector to update. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param allow_missing [::Boolean] + # Optional. If set to true, and the accountConnector is not found a new + # accountConnector will be created. In this situation `update_mask` is + # ignored. The creation will succeed only if the input accountConnector has + # all the necessary + # @param validate_only [::Boolean] + # Optional. If set, validate the request, but do not actually post it. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::UpdateAccountConnectorRequest.new + # + # # Call the update_account_connector method. + # result = client.update_account_connector request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_account_connector request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::UpdateAccountConnectorRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_account_connector.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.account_connector&.name + header_params["account_connector.name"] = request.account_connector.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_account_connector.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_account_connector.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.call_rpc :update_account_connector, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single AccountConnector. + # + # @overload delete_account_connector(request, options = nil) + # Pass arguments to `delete_account_connector` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::DeleteAccountConnectorRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::DeleteAccountConnectorRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_account_connector(name: nil, request_id: nil, validate_only: nil, etag: nil, force: nil) + # Pass arguments to `delete_account_connector` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param validate_only [::Boolean] + # Optional. If set, validate the request, but do not actually post it. + # @param etag [::String] + # Optional. The current etag of the AccountConnectorn. + # If an etag is provided and does not match the current etag of the + # AccountConnector, deletion will be blocked and an ABORTED error will be + # returned. + # @param force [::Boolean] + # Optional. If set to true, any Users from this AccountConnector will also + # be deleted. (Otherwise, the request will only work if the AccountConnector + # has no Users.) + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::DeleteAccountConnectorRequest.new + # + # # Call the delete_account_connector method. + # result = client.delete_account_connector request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_account_connector request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::DeleteAccountConnectorRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_account_connector.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_account_connector.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_account_connector.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.call_rpc :delete_account_connector, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Fetches OAuth access token based on end user credentials. + # + # @overload fetch_access_token(request, options = nil) + # Pass arguments to `fetch_access_token` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload fetch_access_token(account_connector: nil) + # Pass arguments to `fetch_access_token` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param account_connector [::String] + # Required. The resource name of the AccountConnector in the format + # `projects/*/locations/*/accountConnectors/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::FetchAccessTokenRequest.new + # + # # Call the fetch_access_token method. + # result = client.fetch_access_token request + # + # # The returned object is of type Google::Cloud::DeveloperConnect::V1::FetchAccessTokenResponse. + # p result + # + def fetch_access_token request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.fetch_access_token.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.account_connector + header_params["account_connector"] = request.account_connector + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.fetch_access_token.timeout, + metadata: metadata, + retry_policy: @config.rpcs.fetch_access_token.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.call_rpc :fetch_access_token, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Users in a given project, location, and account_connector. + # + # @overload list_users(request, options = nil) + # Pass arguments to `list_users` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::ListUsersRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::ListUsersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_users(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_users` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListUsersRequest + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results + # @param order_by [::String] + # Optional. Hint for how to order the results + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::User>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::User>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::ListUsersRequest.new + # + # # Call the list_users method. + # result = client.list_users request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::DeveloperConnect::V1::User. + # p item + # end + # + def list_users request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::ListUsersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_users.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_users.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_users.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.call_rpc :list_users, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @developer_connect_stub, :list_users, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single User. + # + # @overload delete_user(request, options = nil) + # Pass arguments to `delete_user` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::DeleteUserRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::DeleteUserRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_user(name: nil, request_id: nil, validate_only: nil, etag: nil) + # Pass arguments to `delete_user` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param validate_only [::Boolean] + # Optional. If set, validate the request, but do not actually post it. + # @param etag [::String] + # Optional. This checksum is computed by the server based on the value of + # other fields, and may be sent on update and delete requests to ensure the + # client has an up-to-date value before proceeding. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::DeleteUserRequest.new + # + # # Call the delete_user method. + # result = client.delete_user request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_user request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::DeleteUserRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_user.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_user.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_user.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.call_rpc :delete_user, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Fetch the User based on the user credentials. + # + # @overload fetch_self(request, options = nil) + # Pass arguments to `fetch_self` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::FetchSelfRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::FetchSelfRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload fetch_self(name: nil) + # Pass arguments to `fetch_self` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the AccountConnector resource + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::DeveloperConnect::V1::User] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::DeveloperConnect::V1::User] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::FetchSelfRequest.new + # + # # Call the fetch_self method. + # result = client.fetch_self request + # + # # The returned object is of type Google::Cloud::DeveloperConnect::V1::User. + # p result + # + def fetch_self request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::FetchSelfRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.fetch_self.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.fetch_self.timeout, + metadata: metadata, + retry_policy: @config.rpcs.fetch_self.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.call_rpc :fetch_self, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete the User based on the user credentials. + # + # @overload delete_self(request, options = nil) + # Pass arguments to `delete_self` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::DeleteSelfRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::DeleteSelfRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_self(name: nil) + # Pass arguments to `delete_self` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the AccountConnector resource + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::DeleteSelfRequest.new + # + # # Call the delete_self method. + # result = client.delete_self request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_self request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::DeleteSelfRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_self.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_self.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_self.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.call_rpc :delete_self, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts OAuth flow for an account connector. + # + # @overload start_o_auth(request, options = nil) + # Pass arguments to `start_o_auth` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::StartOAuthRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::StartOAuthRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload start_o_auth(account_connector: nil) + # Pass arguments to `start_o_auth` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param account_connector [::String] + # Required. The resource name of the AccountConnector in the format + # `projects/*/locations/*/accountConnectors/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::DeveloperConnect::V1::StartOAuthResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::DeveloperConnect::V1::StartOAuthResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::StartOAuthRequest.new + # + # # Call the start_o_auth method. + # result = client.start_o_auth request + # + # # The returned object is of type Google::Cloud::DeveloperConnect::V1::StartOAuthResponse. + # p result + # + def start_o_auth request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::StartOAuthRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.start_o_auth.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.account_connector + header_params["account_connector"] = request.account_connector + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.start_o_auth.timeout, + metadata: metadata, + retry_policy: @config.rpcs.start_o_auth.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.call_rpc :start_o_auth, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Finishes OAuth flow for an account connector. + # + # @overload finish_o_auth(request, options = nil) + # Pass arguments to `finish_o_auth` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload finish_o_auth(oauth_params: nil, google_oauth_params: nil, account_connector: nil) + # Pass arguments to `finish_o_auth` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param oauth_params [::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest::OAuthParams, ::Hash] + # The params returned by non-Google OAuth 2.0 flow redirect. + # + # Note: The following parameters are mutually exclusive: `oauth_params`, `google_oauth_params`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param google_oauth_params [::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest::GoogleOAuthParams, ::Hash] + # The params returned by Google OAuth flow redirects. + # + # Note: The following parameters are mutually exclusive: `google_oauth_params`, `oauth_params`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param account_connector [::String] + # Required. The resource name of the AccountConnector in the format + # `projects/*/locations/*/accountConnectors/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::DeveloperConnect::V1::FinishOAuthResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::DeveloperConnect::V1::FinishOAuthResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest.new + # + # # Call the finish_o_auth method. + # result = client.finish_o_auth request + # + # # The returned object is of type Google::Cloud::DeveloperConnect::V1::FinishOAuthResponse. + # p result + # + def finish_o_auth request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.finish_o_auth.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.account_connector + header_params["account_connector"] = request.account_connector + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.finish_o_auth.timeout, + metadata: metadata, + retry_policy: @config.rpcs.finish_o_auth.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.call_rpc :finish_o_auth, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the DeveloperConnect API. + # + # This class represents the configuration for DeveloperConnect, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_connections to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_connections.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_connections.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "developerconnect.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the DeveloperConnect API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_connections` + # @return [::Gapic::Config::Method] + # + attr_reader :list_connections + ## + # RPC-specific configuration for `get_connection` + # @return [::Gapic::Config::Method] + # + attr_reader :get_connection + ## + # RPC-specific configuration for `create_connection` + # @return [::Gapic::Config::Method] + # + attr_reader :create_connection + ## + # RPC-specific configuration for `update_connection` + # @return [::Gapic::Config::Method] + # + attr_reader :update_connection + ## + # RPC-specific configuration for `delete_connection` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_connection + ## + # RPC-specific configuration for `create_git_repository_link` + # @return [::Gapic::Config::Method] + # + attr_reader :create_git_repository_link + ## + # RPC-specific configuration for `delete_git_repository_link` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_git_repository_link + ## + # RPC-specific configuration for `list_git_repository_links` + # @return [::Gapic::Config::Method] + # + attr_reader :list_git_repository_links + ## + # RPC-specific configuration for `get_git_repository_link` + # @return [::Gapic::Config::Method] + # + attr_reader :get_git_repository_link + ## + # RPC-specific configuration for `fetch_read_write_token` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_read_write_token + ## + # RPC-specific configuration for `fetch_read_token` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_read_token + ## + # RPC-specific configuration for `fetch_linkable_git_repositories` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_linkable_git_repositories + ## + # RPC-specific configuration for `fetch_git_hub_installations` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_git_hub_installations + ## + # RPC-specific configuration for `fetch_git_refs` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_git_refs + ## + # RPC-specific configuration for `list_account_connectors` + # @return [::Gapic::Config::Method] + # + attr_reader :list_account_connectors + ## + # RPC-specific configuration for `get_account_connector` + # @return [::Gapic::Config::Method] + # + attr_reader :get_account_connector + ## + # RPC-specific configuration for `create_account_connector` + # @return [::Gapic::Config::Method] + # + attr_reader :create_account_connector + ## + # RPC-specific configuration for `update_account_connector` + # @return [::Gapic::Config::Method] + # + attr_reader :update_account_connector + ## + # RPC-specific configuration for `delete_account_connector` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_account_connector + ## + # RPC-specific configuration for `fetch_access_token` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_access_token + ## + # RPC-specific configuration for `list_users` + # @return [::Gapic::Config::Method] + # + attr_reader :list_users + ## + # RPC-specific configuration for `delete_user` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_user + ## + # RPC-specific configuration for `fetch_self` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_self + ## + # RPC-specific configuration for `delete_self` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_self + ## + # RPC-specific configuration for `start_o_auth` + # @return [::Gapic::Config::Method] + # + attr_reader :start_o_auth + ## + # RPC-specific configuration for `finish_o_auth` + # @return [::Gapic::Config::Method] + # + attr_reader :finish_o_auth + + # @private + def initialize parent_rpcs = nil + list_connections_config = parent_rpcs.list_connections if parent_rpcs.respond_to? :list_connections + @list_connections = ::Gapic::Config::Method.new list_connections_config + get_connection_config = parent_rpcs.get_connection if parent_rpcs.respond_to? :get_connection + @get_connection = ::Gapic::Config::Method.new get_connection_config + create_connection_config = parent_rpcs.create_connection if parent_rpcs.respond_to? :create_connection + @create_connection = ::Gapic::Config::Method.new create_connection_config + update_connection_config = parent_rpcs.update_connection if parent_rpcs.respond_to? :update_connection + @update_connection = ::Gapic::Config::Method.new update_connection_config + delete_connection_config = parent_rpcs.delete_connection if parent_rpcs.respond_to? :delete_connection + @delete_connection = ::Gapic::Config::Method.new delete_connection_config + create_git_repository_link_config = parent_rpcs.create_git_repository_link if parent_rpcs.respond_to? :create_git_repository_link + @create_git_repository_link = ::Gapic::Config::Method.new create_git_repository_link_config + delete_git_repository_link_config = parent_rpcs.delete_git_repository_link if parent_rpcs.respond_to? :delete_git_repository_link + @delete_git_repository_link = ::Gapic::Config::Method.new delete_git_repository_link_config + list_git_repository_links_config = parent_rpcs.list_git_repository_links if parent_rpcs.respond_to? :list_git_repository_links + @list_git_repository_links = ::Gapic::Config::Method.new list_git_repository_links_config + get_git_repository_link_config = parent_rpcs.get_git_repository_link if parent_rpcs.respond_to? :get_git_repository_link + @get_git_repository_link = ::Gapic::Config::Method.new get_git_repository_link_config + fetch_read_write_token_config = parent_rpcs.fetch_read_write_token if parent_rpcs.respond_to? :fetch_read_write_token + @fetch_read_write_token = ::Gapic::Config::Method.new fetch_read_write_token_config + fetch_read_token_config = parent_rpcs.fetch_read_token if parent_rpcs.respond_to? :fetch_read_token + @fetch_read_token = ::Gapic::Config::Method.new fetch_read_token_config + fetch_linkable_git_repositories_config = parent_rpcs.fetch_linkable_git_repositories if parent_rpcs.respond_to? :fetch_linkable_git_repositories + @fetch_linkable_git_repositories = ::Gapic::Config::Method.new fetch_linkable_git_repositories_config + fetch_git_hub_installations_config = parent_rpcs.fetch_git_hub_installations if parent_rpcs.respond_to? :fetch_git_hub_installations + @fetch_git_hub_installations = ::Gapic::Config::Method.new fetch_git_hub_installations_config + fetch_git_refs_config = parent_rpcs.fetch_git_refs if parent_rpcs.respond_to? :fetch_git_refs + @fetch_git_refs = ::Gapic::Config::Method.new fetch_git_refs_config + list_account_connectors_config = parent_rpcs.list_account_connectors if parent_rpcs.respond_to? :list_account_connectors + @list_account_connectors = ::Gapic::Config::Method.new list_account_connectors_config + get_account_connector_config = parent_rpcs.get_account_connector if parent_rpcs.respond_to? :get_account_connector + @get_account_connector = ::Gapic::Config::Method.new get_account_connector_config + create_account_connector_config = parent_rpcs.create_account_connector if parent_rpcs.respond_to? :create_account_connector + @create_account_connector = ::Gapic::Config::Method.new create_account_connector_config + update_account_connector_config = parent_rpcs.update_account_connector if parent_rpcs.respond_to? :update_account_connector + @update_account_connector = ::Gapic::Config::Method.new update_account_connector_config + delete_account_connector_config = parent_rpcs.delete_account_connector if parent_rpcs.respond_to? :delete_account_connector + @delete_account_connector = ::Gapic::Config::Method.new delete_account_connector_config + fetch_access_token_config = parent_rpcs.fetch_access_token if parent_rpcs.respond_to? :fetch_access_token + @fetch_access_token = ::Gapic::Config::Method.new fetch_access_token_config + list_users_config = parent_rpcs.list_users if parent_rpcs.respond_to? :list_users + @list_users = ::Gapic::Config::Method.new list_users_config + delete_user_config = parent_rpcs.delete_user if parent_rpcs.respond_to? :delete_user + @delete_user = ::Gapic::Config::Method.new delete_user_config + fetch_self_config = parent_rpcs.fetch_self if parent_rpcs.respond_to? :fetch_self + @fetch_self = ::Gapic::Config::Method.new fetch_self_config + delete_self_config = parent_rpcs.delete_self if parent_rpcs.respond_to? :delete_self + @delete_self = ::Gapic::Config::Method.new delete_self_config + start_o_auth_config = parent_rpcs.start_o_auth if parent_rpcs.respond_to? :start_o_auth + @start_o_auth = ::Gapic::Config::Method.new start_o_auth_config + finish_o_auth_config = parent_rpcs.finish_o_auth if parent_rpcs.respond_to? :finish_o_auth + @finish_o_auth = ::Gapic::Config::Method.new finish_o_auth_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/credentials.rb b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/credentials.rb new file mode 100644 index 000000000000..bc13f563e213 --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module DeveloperConnect + module V1 + module DeveloperConnect + # Credentials for the DeveloperConnect API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/operations.rb b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/operations.rb new file mode 100644 index 000000000000..df0d522b4b72 --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/operations.rb @@ -0,0 +1,841 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module DeveloperConnect + module V1 + module DeveloperConnect + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "developerconnect.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the DeveloperConnect Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the DeveloperConnect Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.wait_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "developerconnect.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/paths.rb b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/paths.rb new file mode 100644 index 000000000000..f1c1b7701c86 --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/paths.rb @@ -0,0 +1,236 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module DeveloperConnect + module V1 + module DeveloperConnect + # Path helper methods for the DeveloperConnect API. + module Paths + ## + # Create a fully-qualified AccountConnector resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/accountConnectors/{account_connector}` + # + # @param project [String] + # @param location [String] + # @param account_connector [String] + # + # @return [::String] + def account_connector_path project:, location:, account_connector: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/accountConnectors/#{account_connector}" + end + + ## + # Create a fully-qualified Connection resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/connections/{connection}` + # + # @param project [String] + # @param location [String] + # @param connection [String] + # + # @return [::String] + def connection_path project:, location:, connection: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/connections/#{connection}" + end + + ## + # Create a fully-qualified CryptoKey resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}` + # + # @param project [String] + # @param location [String] + # @param key_ring [String] + # @param crypto_key [String] + # + # @return [::String] + def crypto_key_path project:, location:, key_ring:, crypto_key: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/" + + "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}" + end + + ## + # Create a fully-qualified GitRepositoryLink resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/connections/{connection}/gitRepositoryLinks/{git_repository_link}` + # + # @param project [String] + # @param location [String] + # @param connection [String] + # @param git_repository_link [String] + # + # @return [::String] + def git_repository_link_path project:, location:, connection:, git_repository_link: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "connection cannot contain /" if connection.to_s.include? "/" + + "projects/#{project}/locations/#{location}/connections/#{connection}/gitRepositoryLinks/#{git_repository_link}" + end + + ## + # Create a fully-qualified Instance resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # + # @return [::String] + def instance_path project:, location:, instance: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}" + end + + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + ## + # Create a fully-qualified SecretVersion resource string. + # + # @overload secret_version_path(project:, secret:, secret_version:) + # The resource will be in the following format: + # + # `projects/{project}/secrets/{secret}/versions/{secret_version}` + # + # @param project [String] + # @param secret [String] + # @param secret_version [String] + # + # @overload secret_version_path(project:, location:, secret:, secret_version:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/secrets/{secret}/versions/{secret_version}` + # + # @param project [String] + # @param location [String] + # @param secret [String] + # @param secret_version [String] + # + # @return [::String] + def secret_version_path **args + resources = { + "project:secret:secret_version" => (proc do |project:, secret:, secret_version:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "secret cannot contain /" if secret.to_s.include? "/" + + "projects/#{project}/secrets/#{secret}/versions/#{secret_version}" + end), + "location:project:secret:secret_version" => (proc do |project:, location:, secret:, secret_version:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "secret cannot contain /" if secret.to_s.include? "/" + + "projects/#{project}/locations/#{location}/secrets/#{secret}/versions/#{secret_version}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified Service resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}` + # + # @param project [String] + # @param location [String] + # @param namespace [String] + # @param service [String] + # + # @return [::String] + def service_path project:, location:, namespace:, service: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "namespace cannot contain /" if namespace.to_s.include? "/" + + "projects/#{project}/locations/#{location}/namespaces/#{namespace}/services/#{service}" + end + + ## + # Create a fully-qualified User resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/accountConnectors/{account_connector}/users/{user}` + # + # @param project [String] + # @param location [String] + # @param account_connector [String] + # @param user [String] + # + # @return [::String] + def user_path project:, location:, account_connector:, user: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "account_connector cannot contain /" if account_connector.to_s.include? "/" + + "projects/#{project}/locations/#{location}/accountConnectors/#{account_connector}/users/#{user}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/rest.rb b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/rest.rb new file mode 100644 index 000000000000..89b64773e97a --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/rest.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/developer_connect/v1/version" +require "google/cloud/developer_connect/v1/bindings_override" + +require "google/cloud/developer_connect/v1/developer_connect/credentials" +require "google/cloud/developer_connect/v1/developer_connect/paths" +require "google/cloud/developer_connect/v1/developer_connect/rest/operations" +require "google/cloud/developer_connect/v1/developer_connect/rest/client" + +module Google + module Cloud + module DeveloperConnect + module V1 + ## + # Service describing handlers for resources + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/developer_connect/v1/developer_connect/rest" + # client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new + # + module DeveloperConnect + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/developer_connect/v1/developer_connect/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/rest/client.rb b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/rest/client.rb new file mode 100644 index 000000000000..0ee6cc9f0727 --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/rest/client.rb @@ -0,0 +1,3042 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/developerconnect/v1/developer_connect_pb" +require "google/cloud/developer_connect/v1/developer_connect/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Cloud + module DeveloperConnect + module V1 + module DeveloperConnect + module Rest + ## + # REST client for the DeveloperConnect service. + # + # Service describing handlers for resources + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "developerconnect.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :developer_connect_stub + + ## + # Configure the DeveloperConnect Client class. + # + # See {::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DeveloperConnect clients + # ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "DeveloperConnect", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.list_connections.timeout = 60.0 + default_config.rpcs.list_connections.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_connection.timeout = 60.0 + default_config.rpcs.get_connection.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_connection.timeout = 60.0 + default_config.rpcs.create_connection.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_connection.timeout = 60.0 + default_config.rpcs.update_connection.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_connection.timeout = 60.0 + default_config.rpcs.delete_connection.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_git_repository_link.timeout = 60.0 + default_config.rpcs.create_git_repository_link.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_git_repository_link.timeout = 60.0 + default_config.rpcs.delete_git_repository_link.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_git_repository_link.timeout = 60.0 + default_config.rpcs.get_git_repository_link.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.fetch_read_write_token.timeout = 60.0 + default_config.rpcs.fetch_read_write_token.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.fetch_read_token.timeout = 60.0 + default_config.rpcs.fetch_read_token.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.fetch_linkable_git_repositories.timeout = 60.0 + default_config.rpcs.fetch_linkable_git_repositories.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.fetch_git_hub_installations.timeout = 60.0 + default_config.rpcs.fetch_git_hub_installations.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the DeveloperConnect Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @developer_connect_stub.universe_domain + end + + ## + # Create a new DeveloperConnect REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DeveloperConnect client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @developer_connect_stub = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @developer_connect_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @developer_connect_stub.endpoint + config.universe_domain = @developer_connect_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @developer_connect_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @developer_connect_stub.logger + end + + # Service calls + + ## + # Lists Connections in a given project and location. + # + # @overload list_connections(request, options = nil) + # Pass arguments to `list_connections` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::ListConnectionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::ListConnectionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_connections(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_connections` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListConnectionsRequest + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results + # @param order_by [::String] + # Optional. Hint for how to order the results + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::Connection>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::Connection>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::ListConnectionsRequest.new + # + # # Call the list_connections method. + # result = client.list_connections request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::DeveloperConnect::V1::Connection. + # p item + # end + # + def list_connections request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::ListConnectionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_connections.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_connections.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_connections.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.list_connections request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @developer_connect_stub, :list_connections, "connections", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single Connection. + # + # @overload get_connection(request, options = nil) + # Pass arguments to `get_connection` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::GetConnectionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::GetConnectionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_connection(name: nil) + # Pass arguments to `get_connection` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::Connection] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DeveloperConnect::V1::Connection] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::GetConnectionRequest.new + # + # # Call the get_connection method. + # result = client.get_connection request + # + # # The returned object is of type Google::Cloud::DeveloperConnect::V1::Connection. + # p result + # + def get_connection request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::GetConnectionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_connection.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_connection.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_connection.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.get_connection request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new Connection in a given project and location. + # + # @overload create_connection(request, options = nil) + # Pass arguments to `create_connection` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::CreateConnectionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::CreateConnectionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_connection(parent: nil, connection_id: nil, connection: nil, request_id: nil, validate_only: nil) + # Pass arguments to `create_connection` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Value for parent. + # @param connection_id [::String] + # Required. Id of the requesting object + # If auto-generating Id server-side, remove this field and + # connection_id from the method_signature of Create RPC + # @param connection [::Google::Cloud::DeveloperConnect::V1::Connection, ::Hash] + # Required. The resource being created + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param validate_only [::Boolean] + # Optional. If set, validate the request, but do not actually post it. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::CreateConnectionRequest.new + # + # # Call the create_connection method. + # result = client.create_connection request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_connection request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::CreateConnectionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_connection.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_connection.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_connection.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.create_connection request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the parameters of a single Connection. + # + # @overload update_connection(request, options = nil) + # Pass arguments to `update_connection` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::UpdateConnectionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::UpdateConnectionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_connection(update_mask: nil, connection: nil, request_id: nil, allow_missing: nil, validate_only: nil) + # Pass arguments to `update_connection` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Field mask is used to specify the fields to be overwritten in the + # Connection resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @param connection [::Google::Cloud::DeveloperConnect::V1::Connection, ::Hash] + # Required. The resource being updated + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param allow_missing [::Boolean] + # Optional. If set to true, and the connection is not found a new connection + # will be created. In this situation `update_mask` is ignored. + # The creation will succeed only if the input connection has all the + # necessary information (e.g a github_config with both user_oauth_token and + # installation_id properties). + # @param validate_only [::Boolean] + # Optional. If set, validate the request, but do not actually post it. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::UpdateConnectionRequest.new + # + # # Call the update_connection method. + # result = client.update_connection request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_connection request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::UpdateConnectionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_connection.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_connection.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_connection.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.update_connection request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single Connection. + # + # @overload delete_connection(request, options = nil) + # Pass arguments to `delete_connection` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::DeleteConnectionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::DeleteConnectionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_connection(name: nil, request_id: nil, validate_only: nil, etag: nil) + # Pass arguments to `delete_connection` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param validate_only [::Boolean] + # Optional. If set, validate the request, but do not actually post it. + # @param etag [::String] + # Optional. The current etag of the Connection. + # If an etag is provided and does not match the current etag of the + # Connection, deletion will be blocked and an ABORTED error will be returned. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::DeleteConnectionRequest.new + # + # # Call the delete_connection method. + # result = client.delete_connection request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_connection request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::DeleteConnectionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_connection.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_connection.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_connection.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.delete_connection request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a GitRepositoryLink. Upon linking a Git Repository, Developer + # Connect will configure the Git Repository to send webhook events to + # Developer Connect. Connections that use Firebase GitHub Application will + # have events forwarded to the Firebase service. Connections that use Gemini + # Code Assist will have events forwarded to Gemini Code Assist service. All + # other Connections will have events forwarded to Cloud Build. + # + # @overload create_git_repository_link(request, options = nil) + # Pass arguments to `create_git_repository_link` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::CreateGitRepositoryLinkRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::CreateGitRepositoryLinkRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_git_repository_link(parent: nil, git_repository_link: nil, git_repository_link_id: nil, request_id: nil, validate_only: nil) + # Pass arguments to `create_git_repository_link` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Value for parent. + # @param git_repository_link [::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink, ::Hash] + # Required. The resource being created + # @param git_repository_link_id [::String] + # Required. The ID to use for the repository, which will become the final + # component of the repository's resource name. This ID should be unique in + # the connection. Allows alphanumeric characters and any of + # -._~%!$&'()*+,;=@. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param validate_only [::Boolean] + # Optional. If set, validate the request, but do not actually post it. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::CreateGitRepositoryLinkRequest.new + # + # # Call the create_git_repository_link method. + # result = client.create_git_repository_link request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_git_repository_link request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::CreateGitRepositoryLinkRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_git_repository_link.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_git_repository_link.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_git_repository_link.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.create_git_repository_link request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single GitRepositoryLink. + # + # @overload delete_git_repository_link(request, options = nil) + # Pass arguments to `delete_git_repository_link` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::DeleteGitRepositoryLinkRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::DeleteGitRepositoryLinkRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_git_repository_link(name: nil, request_id: nil, validate_only: nil, etag: nil) + # Pass arguments to `delete_git_repository_link` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param validate_only [::Boolean] + # Optional. If set, validate the request, but do not actually post it. + # @param etag [::String] + # Optional. This checksum is computed by the server based on the value of + # other fields, and may be sent on update and delete requests to ensure the + # client has an up-to-date value before proceeding. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::DeleteGitRepositoryLinkRequest.new + # + # # Call the delete_git_repository_link method. + # result = client.delete_git_repository_link request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_git_repository_link request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::DeleteGitRepositoryLinkRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_git_repository_link.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_git_repository_link.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_git_repository_link.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.delete_git_repository_link request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists GitRepositoryLinks in a given project, location, and connection. + # + # @overload list_git_repository_links(request, options = nil) + # Pass arguments to `list_git_repository_links` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::ListGitRepositoryLinksRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::ListGitRepositoryLinksRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_git_repository_links(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_git_repository_links` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListGitRepositoryLinksRequest + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results + # @param order_by [::String] + # Optional. Hint for how to order the results + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::ListGitRepositoryLinksRequest.new + # + # # Call the list_git_repository_links method. + # result = client.list_git_repository_links request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink. + # p item + # end + # + def list_git_repository_links request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::ListGitRepositoryLinksRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_git_repository_links.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_git_repository_links.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_git_repository_links.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.list_git_repository_links request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @developer_connect_stub, :list_git_repository_links, "git_repository_links", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single GitRepositoryLink. + # + # @overload get_git_repository_link(request, options = nil) + # Pass arguments to `get_git_repository_link` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::GetGitRepositoryLinkRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::GetGitRepositoryLinkRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_git_repository_link(name: nil) + # Pass arguments to `get_git_repository_link` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::GetGitRepositoryLinkRequest.new + # + # # Call the get_git_repository_link method. + # result = client.get_git_repository_link request + # + # # The returned object is of type Google::Cloud::DeveloperConnect::V1::GitRepositoryLink. + # p result + # + def get_git_repository_link request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::GetGitRepositoryLinkRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_git_repository_link.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_git_repository_link.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_git_repository_link.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.get_git_repository_link request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Fetches read/write token of a given gitRepositoryLink. + # + # @overload fetch_read_write_token(request, options = nil) + # Pass arguments to `fetch_read_write_token` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload fetch_read_write_token(git_repository_link: nil) + # Pass arguments to `fetch_read_write_token` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param git_repository_link [::String] + # Required. The resource name of the gitRepositoryLink in the format + # `projects/*/locations/*/connections/*/gitRepositoryLinks/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenRequest.new + # + # # Call the fetch_read_write_token method. + # result = client.fetch_read_write_token request + # + # # The returned object is of type Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenResponse. + # p result + # + def fetch_read_write_token request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.fetch_read_write_token.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.fetch_read_write_token.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.fetch_read_write_token.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.fetch_read_write_token request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Fetches read token of a given gitRepositoryLink. + # + # @overload fetch_read_token(request, options = nil) + # Pass arguments to `fetch_read_token` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::FetchReadTokenRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::FetchReadTokenRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload fetch_read_token(git_repository_link: nil) + # Pass arguments to `fetch_read_token` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param git_repository_link [::String] + # Required. The resource name of the gitRepositoryLink in the format + # `projects/*/locations/*/connections/*/gitRepositoryLinks/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::FetchReadTokenResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DeveloperConnect::V1::FetchReadTokenResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::FetchReadTokenRequest.new + # + # # Call the fetch_read_token method. + # result = client.fetch_read_token request + # + # # The returned object is of type Google::Cloud::DeveloperConnect::V1::FetchReadTokenResponse. + # p result + # + def fetch_read_token request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::FetchReadTokenRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.fetch_read_token.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.fetch_read_token.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.fetch_read_token.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.fetch_read_token request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # FetchLinkableGitRepositories returns a list of git repositories from an SCM + # that are available to be added to a Connection. + # + # @overload fetch_linkable_git_repositories(request, options = nil) + # Pass arguments to `fetch_linkable_git_repositories` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::FetchLinkableGitRepositoriesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::FetchLinkableGitRepositoriesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload fetch_linkable_git_repositories(connection: nil, page_size: nil, page_token: nil) + # Pass arguments to `fetch_linkable_git_repositories` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param connection [::String] + # Required. The name of the Connection. + # Format: `projects/*/locations/*/connections/*`. + # @param page_size [::Integer] + # Optional. Number of results to return in the list. Defaults to 20. + # @param page_token [::String] + # Optional. Page start. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::LinkableGitRepository>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::LinkableGitRepository>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::FetchLinkableGitRepositoriesRequest.new + # + # # Call the fetch_linkable_git_repositories method. + # result = client.fetch_linkable_git_repositories request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::DeveloperConnect::V1::LinkableGitRepository. + # p item + # end + # + def fetch_linkable_git_repositories request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::FetchLinkableGitRepositoriesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.fetch_linkable_git_repositories.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.fetch_linkable_git_repositories.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.fetch_linkable_git_repositories.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.fetch_linkable_git_repositories request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @developer_connect_stub, :fetch_linkable_git_repositories, "linkable_git_repositories", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # FetchGitHubInstallations returns the list of GitHub Installations that + # are available to be added to a Connection. + # For github.com, only installations accessible to the authorizer token + # are returned. For GitHub Enterprise, all installations are returned. + # + # @overload fetch_git_hub_installations(request, options = nil) + # Pass arguments to `fetch_git_hub_installations` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload fetch_git_hub_installations(connection: nil) + # Pass arguments to `fetch_git_hub_installations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param connection [::String] + # Required. The resource name of the connection in the format + # `projects/*/locations/*/connections/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsRequest.new + # + # # Call the fetch_git_hub_installations method. + # result = client.fetch_git_hub_installations request + # + # # The returned object is of type Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsResponse. + # p result + # + def fetch_git_hub_installations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.fetch_git_hub_installations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.fetch_git_hub_installations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.fetch_git_hub_installations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.fetch_git_hub_installations request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Fetch the list of branches or tags for a given repository. + # + # @overload fetch_git_refs(request, options = nil) + # Pass arguments to `fetch_git_refs` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::FetchGitRefsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::FetchGitRefsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload fetch_git_refs(git_repository_link: nil, ref_type: nil, page_size: nil, page_token: nil) + # Pass arguments to `fetch_git_refs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param git_repository_link [::String] + # Required. The resource name of GitRepositoryLink in the format + # `projects/*/locations/*/connections/*/gitRepositoryLinks/*`. + # @param ref_type [::Google::Cloud::DeveloperConnect::V1::FetchGitRefsRequest::RefType] + # Required. Type of refs to fetch. + # @param page_size [::Integer] + # Optional. Number of results to return in the list. Default to 20. + # @param page_token [::String] + # Optional. Page start. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::FetchGitRefsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DeveloperConnect::V1::FetchGitRefsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::FetchGitRefsRequest.new + # + # # Call the fetch_git_refs method. + # result = client.fetch_git_refs request + # + # # The returned object is of type Google::Cloud::DeveloperConnect::V1::FetchGitRefsResponse. + # p result + # + def fetch_git_refs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::FetchGitRefsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.fetch_git_refs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.fetch_git_refs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.fetch_git_refs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.fetch_git_refs request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists AccountConnectors in a given project and location. + # + # @overload list_account_connectors(request, options = nil) + # Pass arguments to `list_account_connectors` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_account_connectors(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_account_connectors` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListAccountConnectorsRequest + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results + # @param order_by [::String] + # Optional. Hint for how to order the results + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::AccountConnector>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::AccountConnector>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsRequest.new + # + # # Call the list_account_connectors method. + # result = client.list_account_connectors request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::DeveloperConnect::V1::AccountConnector. + # p item + # end + # + def list_account_connectors request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_account_connectors.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_account_connectors.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_account_connectors.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.list_account_connectors request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @developer_connect_stub, :list_account_connectors, "account_connectors", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single AccountConnector. + # + # @overload get_account_connector(request, options = nil) + # Pass arguments to `get_account_connector` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::GetAccountConnectorRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::GetAccountConnectorRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_account_connector(name: nil) + # Pass arguments to `get_account_connector` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::AccountConnector] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DeveloperConnect::V1::AccountConnector] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::GetAccountConnectorRequest.new + # + # # Call the get_account_connector method. + # result = client.get_account_connector request + # + # # The returned object is of type Google::Cloud::DeveloperConnect::V1::AccountConnector. + # p result + # + def get_account_connector request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::GetAccountConnectorRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_account_connector.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_account_connector.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_account_connector.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.get_account_connector request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new AccountConnector in a given project and location. + # + # @overload create_account_connector(request, options = nil) + # Pass arguments to `create_account_connector` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::CreateAccountConnectorRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::CreateAccountConnectorRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_account_connector(parent: nil, account_connector_id: nil, account_connector: nil, request_id: nil, validate_only: nil) + # Pass arguments to `create_account_connector` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Location resource name as the account_connector’s parent. + # @param account_connector_id [::String] + # Required. The ID to use for the AccountConnector, which will become the + # final component of the AccountConnector's resource name. Its format should + # adhere to https://google.aip.dev/122#resource-id-segments Names must be + # unique per-project per-location. + # @param account_connector [::Google::Cloud::DeveloperConnect::V1::AccountConnector, ::Hash] + # Required. The AccountConnector to create. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param validate_only [::Boolean] + # Optional. If set, validate the request, but do not actually post it. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::CreateAccountConnectorRequest.new + # + # # Call the create_account_connector method. + # result = client.create_account_connector request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_account_connector request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::CreateAccountConnectorRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_account_connector.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_account_connector.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_account_connector.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.create_account_connector request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the parameters of a single AccountConnector. + # + # @overload update_account_connector(request, options = nil) + # Pass arguments to `update_account_connector` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::UpdateAccountConnectorRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::UpdateAccountConnectorRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_account_connector(update_mask: nil, account_connector: nil, request_id: nil, allow_missing: nil, validate_only: nil) + # Pass arguments to `update_account_connector` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields to be updated. + # @param account_connector [::Google::Cloud::DeveloperConnect::V1::AccountConnector, ::Hash] + # Required. The AccountConnector to update. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param allow_missing [::Boolean] + # Optional. If set to true, and the accountConnector is not found a new + # accountConnector will be created. In this situation `update_mask` is + # ignored. The creation will succeed only if the input accountConnector has + # all the necessary + # @param validate_only [::Boolean] + # Optional. If set, validate the request, but do not actually post it. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::UpdateAccountConnectorRequest.new + # + # # Call the update_account_connector method. + # result = client.update_account_connector request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_account_connector request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::UpdateAccountConnectorRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_account_connector.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_account_connector.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_account_connector.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.update_account_connector request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single AccountConnector. + # + # @overload delete_account_connector(request, options = nil) + # Pass arguments to `delete_account_connector` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::DeleteAccountConnectorRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::DeleteAccountConnectorRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_account_connector(name: nil, request_id: nil, validate_only: nil, etag: nil, force: nil) + # Pass arguments to `delete_account_connector` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param validate_only [::Boolean] + # Optional. If set, validate the request, but do not actually post it. + # @param etag [::String] + # Optional. The current etag of the AccountConnectorn. + # If an etag is provided and does not match the current etag of the + # AccountConnector, deletion will be blocked and an ABORTED error will be + # returned. + # @param force [::Boolean] + # Optional. If set to true, any Users from this AccountConnector will also + # be deleted. (Otherwise, the request will only work if the AccountConnector + # has no Users.) + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::DeleteAccountConnectorRequest.new + # + # # Call the delete_account_connector method. + # result = client.delete_account_connector request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_account_connector request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::DeleteAccountConnectorRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_account_connector.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_account_connector.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_account_connector.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.delete_account_connector request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Fetches OAuth access token based on end user credentials. + # + # @overload fetch_access_token(request, options = nil) + # Pass arguments to `fetch_access_token` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload fetch_access_token(account_connector: nil) + # Pass arguments to `fetch_access_token` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param account_connector [::String] + # Required. The resource name of the AccountConnector in the format + # `projects/*/locations/*/accountConnectors/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::FetchAccessTokenRequest.new + # + # # Call the fetch_access_token method. + # result = client.fetch_access_token request + # + # # The returned object is of type Google::Cloud::DeveloperConnect::V1::FetchAccessTokenResponse. + # p result + # + def fetch_access_token request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.fetch_access_token.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.fetch_access_token.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.fetch_access_token.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.fetch_access_token request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Users in a given project, location, and account_connector. + # + # @overload list_users(request, options = nil) + # Pass arguments to `list_users` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::ListUsersRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::ListUsersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_users(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_users` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListUsersRequest + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results + # @param order_by [::String] + # Optional. Hint for how to order the results + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::User>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::User>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::ListUsersRequest.new + # + # # Call the list_users method. + # result = client.list_users request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::DeveloperConnect::V1::User. + # p item + # end + # + def list_users request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::ListUsersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_users.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_users.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_users.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.list_users request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @developer_connect_stub, :list_users, "users", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single User. + # + # @overload delete_user(request, options = nil) + # Pass arguments to `delete_user` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::DeleteUserRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::DeleteUserRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_user(name: nil, request_id: nil, validate_only: nil, etag: nil) + # Pass arguments to `delete_user` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param validate_only [::Boolean] + # Optional. If set, validate the request, but do not actually post it. + # @param etag [::String] + # Optional. This checksum is computed by the server based on the value of + # other fields, and may be sent on update and delete requests to ensure the + # client has an up-to-date value before proceeding. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::DeleteUserRequest.new + # + # # Call the delete_user method. + # result = client.delete_user request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_user request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::DeleteUserRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_user.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_user.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_user.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.delete_user request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Fetch the User based on the user credentials. + # + # @overload fetch_self(request, options = nil) + # Pass arguments to `fetch_self` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::FetchSelfRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::FetchSelfRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload fetch_self(name: nil) + # Pass arguments to `fetch_self` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the AccountConnector resource + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::User] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DeveloperConnect::V1::User] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::FetchSelfRequest.new + # + # # Call the fetch_self method. + # result = client.fetch_self request + # + # # The returned object is of type Google::Cloud::DeveloperConnect::V1::User. + # p result + # + def fetch_self request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::FetchSelfRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.fetch_self.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.fetch_self.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.fetch_self.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.fetch_self request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete the User based on the user credentials. + # + # @overload delete_self(request, options = nil) + # Pass arguments to `delete_self` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::DeleteSelfRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::DeleteSelfRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_self(name: nil) + # Pass arguments to `delete_self` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the AccountConnector resource + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::DeleteSelfRequest.new + # + # # Call the delete_self method. + # result = client.delete_self request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_self request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::DeleteSelfRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_self.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_self.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_self.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.delete_self request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts OAuth flow for an account connector. + # + # @overload start_o_auth(request, options = nil) + # Pass arguments to `start_o_auth` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::StartOAuthRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::StartOAuthRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload start_o_auth(account_connector: nil) + # Pass arguments to `start_o_auth` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param account_connector [::String] + # Required. The resource name of the AccountConnector in the format + # `projects/*/locations/*/accountConnectors/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::StartOAuthResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DeveloperConnect::V1::StartOAuthResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::StartOAuthRequest.new + # + # # Call the start_o_auth method. + # result = client.start_o_auth request + # + # # The returned object is of type Google::Cloud::DeveloperConnect::V1::StartOAuthResponse. + # p result + # + def start_o_auth request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::StartOAuthRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.start_o_auth.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.start_o_auth.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.start_o_auth.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.start_o_auth request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Finishes OAuth flow for an account connector. + # + # @overload finish_o_auth(request, options = nil) + # Pass arguments to `finish_o_auth` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload finish_o_auth(oauth_params: nil, google_oauth_params: nil, account_connector: nil) + # Pass arguments to `finish_o_auth` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param oauth_params [::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest::OAuthParams, ::Hash] + # The params returned by non-Google OAuth 2.0 flow redirect. + # + # Note: The following parameters are mutually exclusive: `oauth_params`, `google_oauth_params`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param google_oauth_params [::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest::GoogleOAuthParams, ::Hash] + # The params returned by Google OAuth flow redirects. + # + # Note: The following parameters are mutually exclusive: `google_oauth_params`, `oauth_params`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param account_connector [::String] + # Required. The resource name of the AccountConnector in the format + # `projects/*/locations/*/accountConnectors/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::FinishOAuthResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DeveloperConnect::V1::FinishOAuthResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest.new + # + # # Call the finish_o_auth method. + # result = client.finish_o_auth request + # + # # The returned object is of type Google::Cloud::DeveloperConnect::V1::FinishOAuthResponse. + # p result + # + def finish_o_auth request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.finish_o_auth.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.finish_o_auth.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.finish_o_auth.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.finish_o_auth request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the DeveloperConnect REST API. + # + # This class represents the configuration for DeveloperConnect REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_connections to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_connections.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_connections.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "developerconnect.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + # Overrides for http bindings for the RPCs of this service + # are only used when this service is used as mixin, and only + # by the host service. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the DeveloperConnect API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_connections` + # @return [::Gapic::Config::Method] + # + attr_reader :list_connections + ## + # RPC-specific configuration for `get_connection` + # @return [::Gapic::Config::Method] + # + attr_reader :get_connection + ## + # RPC-specific configuration for `create_connection` + # @return [::Gapic::Config::Method] + # + attr_reader :create_connection + ## + # RPC-specific configuration for `update_connection` + # @return [::Gapic::Config::Method] + # + attr_reader :update_connection + ## + # RPC-specific configuration for `delete_connection` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_connection + ## + # RPC-specific configuration for `create_git_repository_link` + # @return [::Gapic::Config::Method] + # + attr_reader :create_git_repository_link + ## + # RPC-specific configuration for `delete_git_repository_link` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_git_repository_link + ## + # RPC-specific configuration for `list_git_repository_links` + # @return [::Gapic::Config::Method] + # + attr_reader :list_git_repository_links + ## + # RPC-specific configuration for `get_git_repository_link` + # @return [::Gapic::Config::Method] + # + attr_reader :get_git_repository_link + ## + # RPC-specific configuration for `fetch_read_write_token` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_read_write_token + ## + # RPC-specific configuration for `fetch_read_token` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_read_token + ## + # RPC-specific configuration for `fetch_linkable_git_repositories` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_linkable_git_repositories + ## + # RPC-specific configuration for `fetch_git_hub_installations` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_git_hub_installations + ## + # RPC-specific configuration for `fetch_git_refs` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_git_refs + ## + # RPC-specific configuration for `list_account_connectors` + # @return [::Gapic::Config::Method] + # + attr_reader :list_account_connectors + ## + # RPC-specific configuration for `get_account_connector` + # @return [::Gapic::Config::Method] + # + attr_reader :get_account_connector + ## + # RPC-specific configuration for `create_account_connector` + # @return [::Gapic::Config::Method] + # + attr_reader :create_account_connector + ## + # RPC-specific configuration for `update_account_connector` + # @return [::Gapic::Config::Method] + # + attr_reader :update_account_connector + ## + # RPC-specific configuration for `delete_account_connector` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_account_connector + ## + # RPC-specific configuration for `fetch_access_token` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_access_token + ## + # RPC-specific configuration for `list_users` + # @return [::Gapic::Config::Method] + # + attr_reader :list_users + ## + # RPC-specific configuration for `delete_user` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_user + ## + # RPC-specific configuration for `fetch_self` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_self + ## + # RPC-specific configuration for `delete_self` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_self + ## + # RPC-specific configuration for `start_o_auth` + # @return [::Gapic::Config::Method] + # + attr_reader :start_o_auth + ## + # RPC-specific configuration for `finish_o_auth` + # @return [::Gapic::Config::Method] + # + attr_reader :finish_o_auth + + # @private + def initialize parent_rpcs = nil + list_connections_config = parent_rpcs.list_connections if parent_rpcs.respond_to? :list_connections + @list_connections = ::Gapic::Config::Method.new list_connections_config + get_connection_config = parent_rpcs.get_connection if parent_rpcs.respond_to? :get_connection + @get_connection = ::Gapic::Config::Method.new get_connection_config + create_connection_config = parent_rpcs.create_connection if parent_rpcs.respond_to? :create_connection + @create_connection = ::Gapic::Config::Method.new create_connection_config + update_connection_config = parent_rpcs.update_connection if parent_rpcs.respond_to? :update_connection + @update_connection = ::Gapic::Config::Method.new update_connection_config + delete_connection_config = parent_rpcs.delete_connection if parent_rpcs.respond_to? :delete_connection + @delete_connection = ::Gapic::Config::Method.new delete_connection_config + create_git_repository_link_config = parent_rpcs.create_git_repository_link if parent_rpcs.respond_to? :create_git_repository_link + @create_git_repository_link = ::Gapic::Config::Method.new create_git_repository_link_config + delete_git_repository_link_config = parent_rpcs.delete_git_repository_link if parent_rpcs.respond_to? :delete_git_repository_link + @delete_git_repository_link = ::Gapic::Config::Method.new delete_git_repository_link_config + list_git_repository_links_config = parent_rpcs.list_git_repository_links if parent_rpcs.respond_to? :list_git_repository_links + @list_git_repository_links = ::Gapic::Config::Method.new list_git_repository_links_config + get_git_repository_link_config = parent_rpcs.get_git_repository_link if parent_rpcs.respond_to? :get_git_repository_link + @get_git_repository_link = ::Gapic::Config::Method.new get_git_repository_link_config + fetch_read_write_token_config = parent_rpcs.fetch_read_write_token if parent_rpcs.respond_to? :fetch_read_write_token + @fetch_read_write_token = ::Gapic::Config::Method.new fetch_read_write_token_config + fetch_read_token_config = parent_rpcs.fetch_read_token if parent_rpcs.respond_to? :fetch_read_token + @fetch_read_token = ::Gapic::Config::Method.new fetch_read_token_config + fetch_linkable_git_repositories_config = parent_rpcs.fetch_linkable_git_repositories if parent_rpcs.respond_to? :fetch_linkable_git_repositories + @fetch_linkable_git_repositories = ::Gapic::Config::Method.new fetch_linkable_git_repositories_config + fetch_git_hub_installations_config = parent_rpcs.fetch_git_hub_installations if parent_rpcs.respond_to? :fetch_git_hub_installations + @fetch_git_hub_installations = ::Gapic::Config::Method.new fetch_git_hub_installations_config + fetch_git_refs_config = parent_rpcs.fetch_git_refs if parent_rpcs.respond_to? :fetch_git_refs + @fetch_git_refs = ::Gapic::Config::Method.new fetch_git_refs_config + list_account_connectors_config = parent_rpcs.list_account_connectors if parent_rpcs.respond_to? :list_account_connectors + @list_account_connectors = ::Gapic::Config::Method.new list_account_connectors_config + get_account_connector_config = parent_rpcs.get_account_connector if parent_rpcs.respond_to? :get_account_connector + @get_account_connector = ::Gapic::Config::Method.new get_account_connector_config + create_account_connector_config = parent_rpcs.create_account_connector if parent_rpcs.respond_to? :create_account_connector + @create_account_connector = ::Gapic::Config::Method.new create_account_connector_config + update_account_connector_config = parent_rpcs.update_account_connector if parent_rpcs.respond_to? :update_account_connector + @update_account_connector = ::Gapic::Config::Method.new update_account_connector_config + delete_account_connector_config = parent_rpcs.delete_account_connector if parent_rpcs.respond_to? :delete_account_connector + @delete_account_connector = ::Gapic::Config::Method.new delete_account_connector_config + fetch_access_token_config = parent_rpcs.fetch_access_token if parent_rpcs.respond_to? :fetch_access_token + @fetch_access_token = ::Gapic::Config::Method.new fetch_access_token_config + list_users_config = parent_rpcs.list_users if parent_rpcs.respond_to? :list_users + @list_users = ::Gapic::Config::Method.new list_users_config + delete_user_config = parent_rpcs.delete_user if parent_rpcs.respond_to? :delete_user + @delete_user = ::Gapic::Config::Method.new delete_user_config + fetch_self_config = parent_rpcs.fetch_self if parent_rpcs.respond_to? :fetch_self + @fetch_self = ::Gapic::Config::Method.new fetch_self_config + delete_self_config = parent_rpcs.delete_self if parent_rpcs.respond_to? :delete_self + @delete_self = ::Gapic::Config::Method.new delete_self_config + start_o_auth_config = parent_rpcs.start_o_auth if parent_rpcs.respond_to? :start_o_auth + @start_o_auth = ::Gapic::Config::Method.new start_o_auth_config + finish_o_auth_config = parent_rpcs.finish_o_auth if parent_rpcs.respond_to? :finish_o_auth + @finish_o_auth = ::Gapic::Config::Method.new finish_o_auth_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/rest/operations.rb b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/rest/operations.rb new file mode 100644 index 000000000000..fb18de15d190 --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/rest/operations.rb @@ -0,0 +1,925 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Cloud + module DeveloperConnect + module V1 + module DeveloperConnect + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "developerconnect.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the DeveloperConnect Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the DeveloperConnect Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = OperationsServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.list_operations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.get_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.delete_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "developerconnect.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/rest/service_stub.rb b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/rest/service_stub.rb new file mode 100644 index 000000000000..20c0bfe3ae46 --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/rest/service_stub.rb @@ -0,0 +1,1675 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/developerconnect/v1/developer_connect_pb" + +module Google + module Cloud + module DeveloperConnect + module V1 + module DeveloperConnect + module Rest + ## + # REST service stub for the DeveloperConnect service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the list_connections REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::ListConnectionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::ListConnectionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DeveloperConnect::V1::ListConnectionsResponse] + # A result object deserialized from the server's reply + def list_connections request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_connections_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_connections", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::DeveloperConnect::V1::ListConnectionsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_connection REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::GetConnectionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::Connection] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DeveloperConnect::V1::Connection] + # A result object deserialized from the server's reply + def get_connection request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_connection_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_connection", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::DeveloperConnect::V1::Connection.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_connection REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::CreateConnectionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_connection request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_connection_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_connection", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_connection REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::UpdateConnectionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_connection request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_connection_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_connection", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_connection REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::DeleteConnectionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_connection request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_connection_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_connection", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_git_repository_link REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::CreateGitRepositoryLinkRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_git_repository_link request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_git_repository_link_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_git_repository_link", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_git_repository_link REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::DeleteGitRepositoryLinkRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_git_repository_link request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_git_repository_link_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_git_repository_link", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_git_repository_links REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::ListGitRepositoryLinksRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::ListGitRepositoryLinksResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DeveloperConnect::V1::ListGitRepositoryLinksResponse] + # A result object deserialized from the server's reply + def list_git_repository_links request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_git_repository_links_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_git_repository_links", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::DeveloperConnect::V1::ListGitRepositoryLinksResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_git_repository_link REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::GetGitRepositoryLinkRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink] + # A result object deserialized from the server's reply + def get_git_repository_link request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_git_repository_link_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_git_repository_link", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the fetch_read_write_token REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenResponse] + # A result object deserialized from the server's reply + def fetch_read_write_token request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_fetch_read_write_token_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "fetch_read_write_token", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the fetch_read_token REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::FetchReadTokenRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::FetchReadTokenResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DeveloperConnect::V1::FetchReadTokenResponse] + # A result object deserialized from the server's reply + def fetch_read_token request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_fetch_read_token_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "fetch_read_token", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::DeveloperConnect::V1::FetchReadTokenResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the fetch_linkable_git_repositories REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::FetchLinkableGitRepositoriesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::FetchLinkableGitRepositoriesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DeveloperConnect::V1::FetchLinkableGitRepositoriesResponse] + # A result object deserialized from the server's reply + def fetch_linkable_git_repositories request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_fetch_linkable_git_repositories_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "fetch_linkable_git_repositories", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::DeveloperConnect::V1::FetchLinkableGitRepositoriesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the fetch_git_hub_installations REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsResponse] + # A result object deserialized from the server's reply + def fetch_git_hub_installations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_fetch_git_hub_installations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "fetch_git_hub_installations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the fetch_git_refs REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::FetchGitRefsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::FetchGitRefsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DeveloperConnect::V1::FetchGitRefsResponse] + # A result object deserialized from the server's reply + def fetch_git_refs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_fetch_git_refs_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "fetch_git_refs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::DeveloperConnect::V1::FetchGitRefsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_account_connectors REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsResponse] + # A result object deserialized from the server's reply + def list_account_connectors request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_account_connectors_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_account_connectors", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_account_connector REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::GetAccountConnectorRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::AccountConnector] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DeveloperConnect::V1::AccountConnector] + # A result object deserialized from the server's reply + def get_account_connector request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_account_connector_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_account_connector", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::DeveloperConnect::V1::AccountConnector.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_account_connector REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::CreateAccountConnectorRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_account_connector request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_account_connector_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_account_connector", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_account_connector REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::UpdateAccountConnectorRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_account_connector request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_account_connector_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_account_connector", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_account_connector REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::DeleteAccountConnectorRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_account_connector request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_account_connector_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_account_connector", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the fetch_access_token REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenResponse] + # A result object deserialized from the server's reply + def fetch_access_token request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_fetch_access_token_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "fetch_access_token", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_users REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::ListUsersRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::ListUsersResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DeveloperConnect::V1::ListUsersResponse] + # A result object deserialized from the server's reply + def list_users request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_users_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_users", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::DeveloperConnect::V1::ListUsersResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_user REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::DeleteUserRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_user request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_user_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_user", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the fetch_self REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::FetchSelfRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::User] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DeveloperConnect::V1::User] + # A result object deserialized from the server's reply + def fetch_self request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_fetch_self_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "fetch_self", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::DeveloperConnect::V1::User.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_self REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::DeleteSelfRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_self request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_self_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_self", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the start_o_auth REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::StartOAuthRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::StartOAuthResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DeveloperConnect::V1::StartOAuthResponse] + # A result object deserialized from the server's reply + def start_o_auth request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_start_o_auth_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "start_o_auth", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::DeveloperConnect::V1::StartOAuthResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the finish_o_auth REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::FinishOAuthResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DeveloperConnect::V1::FinishOAuthResponse] + # A result object deserialized from the server's reply + def finish_o_auth request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_finish_o_auth_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "finish_o_auth", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::DeveloperConnect::V1::FinishOAuthResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_connections REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::ListConnectionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_connections_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/connections", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_connection REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::GetConnectionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_connection_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/connections/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_connection REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::CreateConnectionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_connection_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/connections", + body: "connection", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_connection REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::UpdateConnectionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_connection_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{connection.name}", + body: "connection", + matches: [ + ["connection.name", %r{^projects/[^/]+/locations/[^/]+/connections/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_connection REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::DeleteConnectionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_connection_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/connections/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_git_repository_link REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::CreateGitRepositoryLinkRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_git_repository_link_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/gitRepositoryLinks", + body: "git_repository_link", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/connections/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_git_repository_link REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::DeleteGitRepositoryLinkRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_git_repository_link_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/connections/[^/]+/gitRepositoryLinks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_git_repository_links REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::ListGitRepositoryLinksRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_git_repository_links_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/gitRepositoryLinks", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/connections/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_git_repository_link REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::GetGitRepositoryLinkRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_git_repository_link_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/connections/[^/]+/gitRepositoryLinks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the fetch_read_write_token REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_fetch_read_write_token_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{git_repository_link}:fetchReadWriteToken", + body: "*", + matches: [ + ["git_repository_link", %r{^projects/[^/]+/locations/[^/]+/connections/[^/]+/gitRepositoryLinks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the fetch_read_token REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::FetchReadTokenRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_fetch_read_token_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{git_repository_link}:fetchReadToken", + body: "*", + matches: [ + ["git_repository_link", %r{^projects/[^/]+/locations/[^/]+/connections/[^/]+/gitRepositoryLinks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the fetch_linkable_git_repositories REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::FetchLinkableGitRepositoriesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_fetch_linkable_git_repositories_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{connection}:fetchLinkableGitRepositories", + matches: [ + ["connection", %r{^projects/[^/]+/locations/[^/]+/connections/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the fetch_git_hub_installations REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_fetch_git_hub_installations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{connection}:fetchGitHubInstallations", + matches: [ + ["connection", %r{^projects/[^/]+/locations/[^/]+/connections/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the fetch_git_refs REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::FetchGitRefsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_fetch_git_refs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{git_repository_link}:fetchGitRefs", + matches: [ + ["git_repository_link", %r{^projects/[^/]+/locations/[^/]+/connections/[^/]+/gitRepositoryLinks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_account_connectors REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_account_connectors_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/accountConnectors", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_account_connector REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::GetAccountConnectorRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_account_connector_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/accountConnectors/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_account_connector REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::CreateAccountConnectorRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_account_connector_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/accountConnectors", + body: "account_connector", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_account_connector REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::UpdateAccountConnectorRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_account_connector_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{account_connector.name}", + body: "account_connector", + matches: [ + ["account_connector.name", %r{^projects/[^/]+/locations/[^/]+/accountConnectors/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_account_connector REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::DeleteAccountConnectorRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_account_connector_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/accountConnectors/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the fetch_access_token REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_fetch_access_token_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{account_connector}/users:fetchAccessToken", + body: "*", + matches: [ + ["account_connector", %r{^projects/[^/]+/locations/[^/]+/accountConnectors/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_users REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::ListUsersRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_users_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/users", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/accountConnectors/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_user REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::DeleteUserRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_user_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/accountConnectors/[^/]+/users/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the fetch_self REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::FetchSelfRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_fetch_self_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/users:fetchSelf", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/accountConnectors/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_self REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::DeleteSelfRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_self_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}/users:deleteSelf", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/accountConnectors/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the start_o_auth REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::StartOAuthRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_start_o_auth_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{account_connector}/users:startOAuthFlow", + matches: [ + ["account_connector", %r{^projects/[^/]+/locations/[^/]+/accountConnectors/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the finish_o_auth REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_finish_o_auth_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{account_connector}/users:finishOAuthFlow", + matches: [ + ["account_connector", %r{^projects/[^/]+/locations/[^/]+/accountConnectors/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/rest.rb b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/rest.rb new file mode 100644 index 000000000000..eef17efca43d --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/rest.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/developer_connect/v1/developer_connect/rest" +require "google/cloud/developerconnect/v1/insights_config_service/rest" +require "google/cloud/developer_connect/v1/bindings_override" +require "google/cloud/developer_connect/v1/version" + +module Google + module Cloud + module DeveloperConnect + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/developer_connect/v1/rest" + # client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/version.rb b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/version.rb new file mode 100644 index 000000000000..05fe2ffabf9a --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/version.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module DeveloperConnect + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/developer_connect_pb.rb b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/developer_connect_pb.rb new file mode 100644 index 000000000000..4a5e4409d71d --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/developer_connect_pb.rb @@ -0,0 +1,122 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/developerconnect/v1/developer_connect.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/field_info_pb' +require 'google/api/resource_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n8google/cloud/developerconnect/v1/developer_connect.proto\x12 google.cloud.developerconnect.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xad\x01\n\x10ListUsersRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$developerconnect.googleapis.com/User\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"x\n\x11ListUsersResponse\x12\x35\n\x05users\x18\x01 \x03(\x0b\x32&.google.cloud.developerconnect.v1.User\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xa6\r\n\nConnection\x12G\n\rgithub_config\x18\x05 \x01(\x0b\x32..google.cloud.developerconnect.v1.GitHubConfigH\x00\x12\\\n\x18github_enterprise_config\x18\r \x01(\x0b\x32\x38.google.cloud.developerconnect.v1.GitHubEnterpriseConfigH\x00\x12G\n\rgitlab_config\x18\x0e \x01(\x0b\x32..google.cloud.developerconnect.v1.GitLabConfigH\x00\x12\\\n\x18gitlab_enterprise_config\x18\x10 \x01(\x0b\x32\x38.google.cloud.developerconnect.v1.GitLabEnterpriseConfigH\x00\x12\x63\n\x1c\x62itbucket_data_center_config\x18\x11 \x01(\x0b\x32;.google.cloud.developerconnect.v1.BitbucketDataCenterConfigH\x00\x12X\n\x16\x62itbucket_cloud_config\x18\x12 \x01(\x0b\x32\x36.google.cloud.developerconnect.v1.BitbucketCloudConfigH\x00\x12t\n%secure_source_manager_instance_config\x18\x14 \x01(\x0b\x32\x43.google.cloud.developerconnect.v1.SecureSourceManagerInstanceConfigH\x00\x12W\n\x0bhttp_config\x18\x15 \x01(\x0b\x32;.google.cloud.developerconnect.v1.GenericHTTPEndpointConfigB\x03\xe0\x41\x01H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12M\n\x06labels\x18\x04 \x03(\x0b\x32\x38.google.cloud.developerconnect.v1.Connection.LabelsEntryB\x03\xe0\x41\x01\x12T\n\x12installation_state\x18\x06 \x01(\x0b\x32\x33.google.cloud.developerconnect.v1.InstallationStateB\x03\xe0\x41\x03\x12\x15\n\x08\x64isabled\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01\x12\x18\n\x0breconciling\x18\x08 \x01(\x08\x42\x03\xe0\x41\x03\x12W\n\x0b\x61nnotations\x18\t \x03(\x0b\x32=.google.cloud.developerconnect.v1.Connection.AnnotationsEntryB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\n \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x03uid\x18\x0c \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12Q\n\x11\x63rypto_key_config\x18\x0f \x01(\x0b\x32\x31.google.cloud.developerconnect.v1.CryptoKeyConfigB\x03\xe0\x41\x01\x12O\n\x10git_proxy_config\x18\x13 \x01(\x0b\x32\x30.google.cloud.developerconnect.v1.GitProxyConfigB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x8e\x01\xea\x41\x8a\x01\n*developerconnect.googleapis.com/Connection\x12@projects/{project}/locations/{location}/connections/{connection}*\x0b\x63onnections2\nconnectionR\x01\x01\x42\x13\n\x11\x63onnection_config\"S\n\x0f\x43ryptoKeyConfig\x12@\n\rkey_reference\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\"H\n\x0eGitProxyConfig\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12 \n\x13http_proxy_base_uri\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\x88\x02\n\x11InstallationState\x12M\n\x05stage\x18\x01 \x01(\x0e\x32\x39.google.cloud.developerconnect.v1.InstallationState.StageB\x03\xe0\x41\x03\x12\x14\n\x07message\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\naction_uri\x18\x03 \x01(\tB\x03\xe0\x41\x03\"u\n\x05Stage\x12\x15\n\x11STAGE_UNSPECIFIED\x10\x00\x12\x16\n\x12PENDING_CREATE_APP\x10\x01\x12\x16\n\x12PENDING_USER_OAUTH\x10\x02\x12\x17\n\x13PENDING_INSTALL_APP\x10\x03\x12\x0c\n\x08\x43OMPLETE\x10\n\"\xcc\x05\n\x19GenericHTTPEndpointConfig\x12t\n\x14\x62\x61sic_authentication\x18\x01 \x01(\x0b\x32O.google.cloud.developerconnect.v1.GenericHTTPEndpointConfig.BasicAuthenticationB\x03\xe0\x41\x01H\x00\x12\x81\x01\n\x1b\x62\x65\x61rer_token_authentication\x18\x02 \x01(\x0b\x32U.google.cloud.developerconnect.v1.GenericHTTPEndpointConfig.BearerTokenAuthenticationB\x03\xe0\x41\x01H\x00\x12\x18\n\x08host_uri\x18\x03 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12_\n\x18service_directory_config\x18\x04 \x01(\x0b\x32\x38.google.cloud.developerconnect.v1.ServiceDirectoryConfigB\x03\xe0\x41\x01\x12\x1f\n\x12ssl_ca_certificate\x18\x05 \x01(\tB\x03\xe0\x41\x01\x1a\x8c\x01\n\x13\x42\x61sicAuthentication\x12R\n\x17password_secret_version\x18\x02 \x01(\tB/\xfa\x41,\n*secretmanager.googleapis.com/SecretVersionH\x00\x12\x15\n\x08username\x18\x01 \x01(\tB\x03\xe0\x41\x02\x42\n\n\x08password\x1ax\n\x19\x42\x65\x61rerTokenAuthentication\x12R\n\x14token_secret_version\x18\x01 \x01(\tB2\xe0\x41\x01\xfa\x41,\n*secretmanager.googleapis.com/SecretVersionH\x00\x42\x07\n\x05tokenB\x10\n\x0e\x61uthentication\"\xe3\x02\n\x0cGitHubConfig\x12T\n\ngithub_app\x18\x01 \x01(\x0e\x32\x38.google.cloud.developerconnect.v1.GitHubConfig.GitHubAppB\x06\xe0\x41\x02\xe0\x41\x05\x12U\n\x15\x61uthorizer_credential\x18\x02 \x01(\x0b\x32\x31.google.cloud.developerconnect.v1.OAuthCredentialB\x03\xe0\x41\x01\x12 \n\x13\x61pp_installation_id\x18\x03 \x01(\x03\x42\x03\xe0\x41\x01\x12\x1d\n\x10installation_uri\x18\x04 \x01(\tB\x03\xe0\x41\x03\"e\n\tGitHubApp\x12\x1b\n\x17GIT_HUB_APP_UNSPECIFIED\x10\x00\x12\x15\n\x11\x44\x45VELOPER_CONNECT\x10\x01\x12\x0c\n\x08\x46IREBASE\x10\x02\x12\x16\n\x12GEMINI_CODE_ASSIST\x10\x03\"\x8c\x04\n\x16GitHubEnterpriseConfig\x12\x15\n\x08host_uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06\x61pp_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01\x12\x15\n\x08\x61pp_slug\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12V\n\x1aprivate_key_secret_version\x18\x04 \x01(\tB2\xe0\x41\x01\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12Y\n\x1dwebhook_secret_secret_version\x18\x05 \x01(\tB2\xe0\x41\x01\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12 \n\x13\x61pp_installation_id\x18\x08 \x01(\x03\x42\x03\xe0\x41\x01\x12\x1d\n\x10installation_uri\x18\t \x01(\tB\x03\xe0\x41\x03\x12_\n\x18service_directory_config\x18\n \x01(\x0b\x32\x38.google.cloud.developerconnect.v1.ServiceDirectoryConfigB\x03\xe0\x41\x01\x12\x1b\n\x0eserver_version\x18\x0c \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x12ssl_ca_certificate\x18\x0e \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0corganization\x18\x0f \x01(\tB\x06\xe0\x41\x01\xe0\x41\x05\"Z\n\x16ServiceDirectoryConfig\x12@\n\x07service\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'servicedirectory.googleapis.com/Service\"\x80\x01\n\x0fOAuthCredential\x12V\n\x1aoauth_token_secret_version\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12\x15\n\x08username\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\x9d\x02\n\x0cGitLabConfig\x12\\\n\x1dwebhook_secret_secret_version\x18\x01 \x01(\tB5\xe0\x41\x02\xe0\x41\x05\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12Y\n\x1aread_authorizer_credential\x18\x02 \x01(\x0b\x32\x30.google.cloud.developerconnect.v1.UserCredentialB\x03\xe0\x41\x02\x12T\n\x15\x61uthorizer_credential\x18\x03 \x01(\x0b\x32\x30.google.cloud.developerconnect.v1.UserCredentialB\x03\xe0\x41\x02\"~\n\x0eUserCredential\x12U\n\x19user_token_secret_version\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12\x15\n\x08username\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\xdd\x03\n\x16GitLabEnterpriseConfig\x12\x15\n\x08host_uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\\\n\x1dwebhook_secret_secret_version\x18\x02 \x01(\tB5\xe0\x41\x02\xe0\x41\x05\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12Y\n\x1aread_authorizer_credential\x18\x03 \x01(\x0b\x32\x30.google.cloud.developerconnect.v1.UserCredentialB\x03\xe0\x41\x02\x12T\n\x15\x61uthorizer_credential\x18\x04 \x01(\x0b\x32\x30.google.cloud.developerconnect.v1.UserCredentialB\x03\xe0\x41\x02\x12_\n\x18service_directory_config\x18\x05 \x01(\x0b\x32\x38.google.cloud.developerconnect.v1.ServiceDirectoryConfigB\x03\xe0\x41\x01\x12\x1f\n\x12ssl_ca_certificate\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0eserver_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\"\xe0\x03\n\x19\x42itbucketDataCenterConfig\x12\x15\n\x08host_uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\\\n\x1dwebhook_secret_secret_version\x18\x02 \x01(\tB5\xe0\x41\x02\xe0\x41\x05\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12Y\n\x1aread_authorizer_credential\x18\x03 \x01(\x0b\x32\x30.google.cloud.developerconnect.v1.UserCredentialB\x03\xe0\x41\x02\x12T\n\x15\x61uthorizer_credential\x18\x04 \x01(\x0b\x32\x30.google.cloud.developerconnect.v1.UserCredentialB\x03\xe0\x41\x02\x12_\n\x18service_directory_config\x18\x05 \x01(\x0b\x32\x38.google.cloud.developerconnect.v1.ServiceDirectoryConfigB\x03\xe0\x41\x01\x12\x1f\n\x12ssl_ca_certificate\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0eserver_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\"\xbd\x02\n\x14\x42itbucketCloudConfig\x12\x16\n\tworkspace\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\\\n\x1dwebhook_secret_secret_version\x18\x02 \x01(\tB5\xe0\x41\x02\xe0\x41\x05\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12Y\n\x1aread_authorizer_credential\x18\x03 \x01(\x0b\x32\x30.google.cloud.developerconnect.v1.UserCredentialB\x03\xe0\x41\x02\x12T\n\x15\x61uthorizer_credential\x18\x04 \x01(\x0b\x32\x30.google.cloud.developerconnect.v1.UserCredentialB\x03\xe0\x41\x02\"m\n!SecureSourceManagerInstanceConfig\x12H\n\x08instance\x18\x01 \x01(\tB6\xe0\x41\x02\xe0\x41\x05\xfa\x41-\n+securesourcemanager.googleapis.com/Instance\"\xb9\x01\n\x16ListConnectionsRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*developerconnect.googleapis.com/Connection\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x8a\x01\n\x17ListConnectionsResponse\x12\x41\n\x0b\x63onnections\x18\x01 \x03(\x0b\x32,.google.cloud.developerconnect.v1.Connection\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"X\n\x14GetConnectionRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*developerconnect.googleapis.com/Connection\"\xfd\x01\n\x17\x43reateConnectionRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*developerconnect.googleapis.com/Connection\x12\x1a\n\rconnection_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x45\n\nconnection\x18\x03 \x01(\x0b\x32,.google.cloud.developerconnect.v1.ConnectionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rvalidate_only\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\xef\x01\n\x17UpdateConnectionRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x45\n\nconnection\x18\x02 \x01(\x0b\x32,.google.cloud.developerconnect.v1.ConnectionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rallow_missing\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\xab\x01\n\x17\x44\x65leteConnectionRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*developerconnect.googleapis.com/Connection\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xc5\x01\n\x1cListAccountConnectorsRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30\x64\x65veloperconnect.googleapis.com/AccountConnector\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x9d\x01\n\x1dListAccountConnectorsResponse\x12N\n\x12\x61\x63\x63ount_connectors\x18\x01 \x03(\x0b\x32\x32.google.cloud.developerconnect.v1.AccountConnector\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"d\n\x1aGetAccountConnectorRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0developerconnect.googleapis.com/AccountConnector\"\x9d\x02\n\x1d\x43reateAccountConnectorRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30\x64\x65veloperconnect.googleapis.com/AccountConnector\x12!\n\x14\x61\x63\x63ount_connector_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12R\n\x11\x61\x63\x63ount_connector\x18\x03 \x01(\x0b\x32\x32.google.cloud.developerconnect.v1.AccountConnectorB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rvalidate_only\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\x82\x02\n\x1dUpdateAccountConnectorRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12R\n\x11\x61\x63\x63ount_connector\x18\x02 \x01(\x0b\x32\x32.google.cloud.developerconnect.v1.AccountConnectorB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rallow_missing\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\xcb\x01\n\x1d\x44\x65leteAccountConnectorRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0developerconnect.googleapis.com/AccountConnector\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\x9f\x01\n\x11\x44\x65leteUserRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$developerconnect.googleapis.com/User\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\"Z\n\x10\x46\x65tchSelfRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0developerconnect.googleapis.com/AccountConnector\"[\n\x11\x44\x65leteSelfRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0developerconnect.googleapis.com/AccountConnector\"n\n\x17\x46\x65tchAccessTokenRequest\x12S\n\x11\x61\x63\x63ount_connector\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0developerconnect.googleapis.com/AccountConnector\"\xb7\x01\n\x18\x46\x65tchAccessTokenResponse\x12\r\n\x05token\x18\x01 \x01(\t\x12\x33\n\x0f\x65xpiration_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0e\n\x06scopes\x18\x03 \x03(\t\x12G\n\x0e\x65xchange_error\x18\x04 \x01(\x0b\x32/.google.cloud.developerconnect.v1.ExchangeError\"h\n\x11StartOAuthRequest\x12S\n\x11\x61\x63\x63ount_connector\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0developerconnect.googleapis.com/AccountConnector\"\xe6\x01\n\x12StartOAuthResponse\x12N\n\x12system_provider_id\x18\x07 \x01(\x0e\x32\x30.google.cloud.developerconnect.v1.SystemProviderH\x00\x12\x0e\n\x06ticket\x18\x01 \x01(\t\x12\x16\n\x0e\x63ode_challenge\x18\x02 \x01(\t\x12\x1d\n\x15\x63ode_challenge_method\x18\x03 \x01(\t\x12\x11\n\tclient_id\x18\x04 \x01(\t\x12\x0e\n\x06scopes\x18\x05 \x03(\t\x12\x10\n\x08\x61uth_uri\x18\x06 \x01(\tB\x04\n\x02id\"\xc5\x03\n\x12\x46inishOAuthRequest\x12X\n\x0coauth_params\x18\x02 \x01(\x0b\x32@.google.cloud.developerconnect.v1.FinishOAuthRequest.OAuthParamsH\x00\x12\x65\n\x13google_oauth_params\x18\x03 \x01(\x0b\x32\x46.google.cloud.developerconnect.v1.FinishOAuthRequest.GoogleOAuthParamsH\x00\x12S\n\x11\x61\x63\x63ount_connector\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0developerconnect.googleapis.com/AccountConnector\x1a\x35\n\x0bOAuthParams\x12\x11\n\x04\x63ode\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06ticket\x18\x02 \x01(\tB\x03\xe0\x41\x02\x1aX\n\x11GoogleOAuthParams\x12\x13\n\x06scopes\x18\x01 \x03(\tB\x03\xe0\x41\x02\x12\x19\n\x0cversion_info\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06ticket\x18\x03 \x01(\tB\x03\xe0\x41\x02\x42\x08\n\x06params\"^\n\x13\x46inishOAuthResponse\x12G\n\x0e\x65xchange_error\x18\x01 \x01(\x0b\x32/.google.cloud.developerconnect.v1.ExchangeError\"2\n\rExchangeError\x12\x0c\n\x04\x63ode\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\"\xc4\x06\n\x11GitRepositoryLink\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x16\n\tclone_uri\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12T\n\x06labels\x18\x06 \x03(\x0b\x32?.google.cloud.developerconnect.v1.GitRepositoryLink.LabelsEntryB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0breconciling\x18\x08 \x01(\x08\x42\x03\xe0\x41\x03\x12^\n\x0b\x61nnotations\x18\t \x03(\x0b\x32\x44.google.cloud.developerconnect.v1.GitRepositoryLink.AnnotationsEntryB\x03\xe0\x41\x01\x12\x18\n\x03uid\x18\n \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x17\n\nwebhook_id\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rgit_proxy_uri\x18\x0c \x01(\tB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xcc\x01\xea\x41\xc8\x01\n1developerconnect.googleapis.com/GitRepositoryLink\x12iprojects/{project}/locations/{location}/connections/{connection}/gitRepositoryLinks/{git_repository_link}*\x12gitRepositoryLinks2\x11gitRepositoryLinkR\x01\x01\"\xa4\x02\n\x1e\x43reateGitRepositoryLinkRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\x12\x31\x64\x65veloperconnect.googleapis.com/GitRepositoryLink\x12U\n\x13git_repository_link\x18\x02 \x01(\x0b\x32\x33.google.cloud.developerconnect.v1.GitRepositoryLinkB\x03\xe0\x41\x02\x12#\n\x16git_repository_link_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rvalidate_only\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\xb9\x01\n\x1e\x44\x65leteGitRepositoryLinkRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1developerconnect.googleapis.com/GitRepositoryLink\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xc7\x01\n\x1dListGitRepositoryLinksRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\x12\x31\x64\x65veloperconnect.googleapis.com/GitRepositoryLink\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xa1\x01\n\x1eListGitRepositoryLinksResponse\x12Q\n\x14git_repository_links\x18\x01 \x03(\x0b\x32\x33.google.cloud.developerconnect.v1.GitRepositoryLink\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"f\n\x1bGetGitRepositoryLinkRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1developerconnect.googleapis.com/GitRepositoryLink\"t\n\x1a\x46\x65tchReadWriteTokenRequest\x12V\n\x13git_repository_link\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1developerconnect.googleapis.com/GitRepositoryLink\"o\n\x15\x46\x65tchReadTokenRequest\x12V\n\x13git_repository_link\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1developerconnect.googleapis.com/GitRepositoryLink\"r\n\x16\x46\x65tchReadTokenResponse\x12\r\n\x05token\x18\x01 \x01(\t\x12\x33\n\x0f\x65xpiration_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x14\n\x0cgit_username\x18\x03 \x01(\t\"w\n\x1b\x46\x65tchReadWriteTokenResponse\x12\r\n\x05token\x18\x01 \x01(\t\x12\x33\n\x0f\x65xpiration_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x14\n\x0cgit_username\x18\x03 \x01(\t\"\x9e\x01\n#FetchLinkableGitRepositoriesRequest\x12\x46\n\nconnection\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*developerconnect.googleapis.com/Connection\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x9b\x01\n$FetchLinkableGitRepositoriesResponse\x12Z\n\x19linkable_git_repositories\x18\x01 \x03(\x0b\x32\x37.google.cloud.developerconnect.v1.LinkableGitRepository\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"*\n\x15LinkableGitRepository\x12\x11\n\tclone_uri\x18\x01 \x01(\t\"i\n\x1f\x46\x65tchGitHubInstallationsRequest\x12\x46\n\nconnection\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*developerconnect.googleapis.com/Connection\"\xc2\x01\n FetchGitHubInstallationsResponse\x12\x66\n\rinstallations\x18\x01 \x03(\x0b\x32O.google.cloud.developerconnect.v1.FetchGitHubInstallationsResponse.Installation\x1a\x36\n\x0cInstallation\x12\n\n\x02id\x18\x01 \x01(\x03\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t\"\xae\x02\n\x13\x46\x65tchGitRefsRequest\x12V\n\x13git_repository_link\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1developerconnect.googleapis.com/GitRepositoryLink\x12T\n\x08ref_type\x18\x02 \x01(\x0e\x32=.google.cloud.developerconnect.v1.FetchGitRefsRequest.RefTypeB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x05 \x01(\tB\x03\xe0\x41\x01\"8\n\x07RefType\x12\x18\n\x14REF_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03TAG\x10\x01\x12\n\n\x06\x42RANCH\x10\x02\"B\n\x14\x46\x65tchGitRefsResponse\x12\x11\n\tref_names\x18\x01 \x03(\t\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x82\x06\n\x10\x41\x63\x63ountConnector\x12[\n\x15provider_oauth_config\x18\x05 \x01(\x0b\x32\x35.google.cloud.developerconnect.v1.ProviderOAuthConfigB\x03\xe0\x41\x01H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12]\n\x0b\x61nnotations\x18\x06 \x03(\x0b\x32\x43.google.cloud.developerconnect.v1.AccountConnector.AnnotationsEntryB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12S\n\x06labels\x18\x08 \x03(\x0b\x32>.google.cloud.developerconnect.v1.AccountConnector.LabelsEntryB\x03\xe0\x41\x01\x12\x1c\n\x0foauth_start_uri\x18\n \x01(\tB\x03\xe0\x41\x03\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xad\x01\xea\x41\xa9\x01\n0developerconnect.googleapis.com/AccountConnector\x12Mprojects/{project}/locations/{location}/accountConnectors/{account_connector}*\x11\x61\x63\x63ountConnectors2\x10\x61\x63\x63ountConnectorR\x01\x01\x42\x1a\n\x18\x61\x63\x63ount_connector_config\"\xc2\x02\n\x04User\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12@\n\x17last_token_request_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:\x93\x01\xea\x41\x8f\x01\n$developerconnect.googleapis.com/User\x12Zprojects/{project}/locations/{location}/accountConnectors/{account_connector}/users/{user}*\x05users2\x04user\"\x97\x01\n\x13ProviderOAuthConfig\x12V\n\x12system_provider_id\x18\x01 \x01(\x0e\x32\x30.google.cloud.developerconnect.v1.SystemProviderB\x06\xe0\x41\x05\xe0\x41\x01H\x00\x12\x13\n\x06scopes\x18\x02 \x03(\tB\x03\xe0\x41\x02\x42\x13\n\x11oauth_provider_id*\x97\x01\n\x0eSystemProvider\x12\x1f\n\x1bSYSTEM_PROVIDER_UNSPECIFIED\x10\x00\x12\n\n\x06GITHUB\x10\x01\x12\n\n\x06GITLAB\x10\x02\x12\n\n\x06GOOGLE\x10\x03\x12\n\n\x06SENTRY\x10\x04\x12\x08\n\x04ROVO\x10\x05\x12\r\n\tNEW_RELIC\x10\x06\x12\x0c\n\x08\x44\x41TASTAX\x10\x07\x12\r\n\tDYNATRACE\x10\x08\x32\xcb\x32\n\x10\x44\x65veloperConnect\x12\xc8\x01\n\x0fListConnections\x12\x38.google.cloud.developerconnect.v1.ListConnectionsRequest\x1a\x39.google.cloud.developerconnect.v1.ListConnectionsResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/connections\x12\xb5\x01\n\rGetConnection\x12\x36.google.cloud.developerconnect.v1.GetConnectionRequest\x1a,.google.cloud.developerconnect.v1.Connection\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/connections/*}\x12\xf6\x01\n\x10\x43reateConnection\x12\x39.google.cloud.developerconnect.v1.CreateConnectionRequest\x1a\x1d.google.longrunning.Operation\"\x87\x01\xca\x41\x1f\n\nConnection\x12\x11OperationMetadata\xda\x41\x1fparent,connection,connection_id\x82\xd3\xe4\x93\x02=\"//v1/{parent=projects/*/locations/*}/connections:\nconnection\x12\xf8\x01\n\x10UpdateConnection\x12\x39.google.cloud.developerconnect.v1.UpdateConnectionRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41\x1f\n\nConnection\x12\x11OperationMetadata\xda\x41\x16\x63onnection,update_mask\x82\xd3\xe4\x93\x02H2:/v1/{connection.name=projects/*/locations/*/connections/*}:\nconnection\x12\xd9\x01\n\x10\x44\x65leteConnection\x12\x39.google.cloud.developerconnect.v1.DeleteConnectionRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/connections/*}\x12\xbb\x02\n\x17\x43reateGitRepositoryLink\x12@.google.cloud.developerconnect.v1.CreateGitRepositoryLinkRequest\x1a\x1d.google.longrunning.Operation\"\xbe\x01\xca\x41&\n\x11GitRepositoryLink\x12\x11OperationMetadata\xda\x41\x31parent,git_repository_link,git_repository_link_id\x82\xd3\xe4\x93\x02[\"D/v1/{parent=projects/*/locations/*/connections/*}/gitRepositoryLinks:\x13git_repository_link\x12\xfd\x01\n\x17\x44\x65leteGitRepositoryLink\x12@.google.cloud.developerconnect.v1.DeleteGitRepositoryLinkRequest\x1a\x1d.google.longrunning.Operation\"\x80\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x46*D/v1/{name=projects/*/locations/*/connections/*/gitRepositoryLinks/*}\x12\xf2\x01\n\x16ListGitRepositoryLinks\x12?.google.cloud.developerconnect.v1.ListGitRepositoryLinksRequest\x1a@.google.cloud.developerconnect.v1.ListGitRepositoryLinksResponse\"U\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x46\x12\x44/v1/{parent=projects/*/locations/*/connections/*}/gitRepositoryLinks\x12\xdf\x01\n\x14GetGitRepositoryLink\x12=.google.cloud.developerconnect.v1.GetGitRepositoryLinkRequest\x1a\x33.google.cloud.developerconnect.v1.GitRepositoryLink\"S\xda\x41\x04name\x82\xd3\xe4\x93\x02\x46\x12\x44/v1/{name=projects/*/locations/*/connections/*/gitRepositoryLinks/*}\x12\x9d\x02\n\x13\x46\x65tchReadWriteToken\x12<.google.cloud.developerconnect.v1.FetchReadWriteTokenRequest\x1a=.google.cloud.developerconnect.v1.FetchReadWriteTokenResponse\"\x88\x01\xda\x41\x13git_repository_link\x82\xd3\xe4\x93\x02l\"g/v1/{git_repository_link=projects/*/locations/*/connections/*/gitRepositoryLinks/*}:fetchReadWriteToken:\x01*\x12\x89\x02\n\x0e\x46\x65tchReadToken\x12\x37.google.cloud.developerconnect.v1.FetchReadTokenRequest\x1a\x38.google.cloud.developerconnect.v1.FetchReadTokenResponse\"\x83\x01\xda\x41\x13git_repository_link\x82\xd3\xe4\x93\x02g\"b/v1/{git_repository_link=projects/*/locations/*/connections/*/gitRepositoryLinks/*}:fetchReadToken:\x01*\x12\x96\x02\n\x1c\x46\x65tchLinkableGitRepositories\x12\x45.google.cloud.developerconnect.v1.FetchLinkableGitRepositoriesRequest\x1a\x46.google.cloud.developerconnect.v1.FetchLinkableGitRepositoriesResponse\"g\xda\x41\nconnection\x82\xd3\xe4\x93\x02T\x12R/v1/{connection=projects/*/locations/*/connections/*}:fetchLinkableGitRepositories\x12\x86\x02\n\x18\x46\x65tchGitHubInstallations\x12\x41.google.cloud.developerconnect.v1.FetchGitHubInstallationsRequest\x1a\x42.google.cloud.developerconnect.v1.FetchGitHubInstallationsResponse\"c\xda\x41\nconnection\x82\xd3\xe4\x93\x02P\x12N/v1/{connection=projects/*/locations/*/connections/*}:fetchGitHubInstallations\x12\x87\x02\n\x0c\x46\x65tchGitRefs\x12\x35.google.cloud.developerconnect.v1.FetchGitRefsRequest\x1a\x36.google.cloud.developerconnect.v1.FetchGitRefsResponse\"\x87\x01\xda\x41\x1cgit_repository_link,ref_type\x82\xd3\xe4\x93\x02\x62\x12`/v1/{git_repository_link=projects/*/locations/*/connections/*/gitRepositoryLinks/*}:fetchGitRefs\x12\xe0\x01\n\x15ListAccountConnectors\x12>.google.cloud.developerconnect.v1.ListAccountConnectorsRequest\x1a?.google.cloud.developerconnect.v1.ListAccountConnectorsResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{parent=projects/*/locations/*}/accountConnectors\x12\xcd\x01\n\x13GetAccountConnector\x12<.google.cloud.developerconnect.v1.GetAccountConnectorRequest\x1a\x32.google.cloud.developerconnect.v1.AccountConnector\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=projects/*/locations/*/accountConnectors/*}\x12\xa3\x02\n\x16\x43reateAccountConnector\x12?.google.cloud.developerconnect.v1.CreateAccountConnectorRequest\x1a\x1d.google.longrunning.Operation\"\xa8\x01\xca\x41%\n\x10\x41\x63\x63ountConnector\x12\x11OperationMetadata\xda\x41-parent,account_connector,account_connector_id\x82\xd3\xe4\x93\x02J\"5/v1/{parent=projects/*/locations/*}/accountConnectors:\x11\x61\x63\x63ount_connector\x12\xa5\x02\n\x16UpdateAccountConnector\x12?.google.cloud.developerconnect.v1.UpdateAccountConnectorRequest\x1a\x1d.google.longrunning.Operation\"\xaa\x01\xca\x41%\n\x10\x41\x63\x63ountConnector\x12\x11OperationMetadata\xda\x41\x1d\x61\x63\x63ount_connector,update_mask\x82\xd3\xe4\x93\x02\\2G/v1/{account_connector.name=projects/*/locations/*/accountConnectors/*}:\x11\x61\x63\x63ount_connector\x12\xeb\x01\n\x16\x44\x65leteAccountConnector\x12?.google.cloud.developerconnect.v1.DeleteAccountConnectorRequest\x1a\x1d.google.longrunning.Operation\"q\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1/{name=projects/*/locations/*/accountConnectors/*}\x12\x83\x02\n\x10\x46\x65tchAccessToken\x12\x39.google.cloud.developerconnect.v1.FetchAccessTokenRequest\x1a:.google.cloud.developerconnect.v1.FetchAccessTokenResponse\"x\xda\x41\x11\x61\x63\x63ount_connector\x82\xd3\xe4\x93\x02^\"Y/v1/{account_connector=projects/*/locations/*/accountConnectors/*}/users:fetchAccessToken:\x01*\x12\xc4\x01\n\tListUsers\x12\x32.google.cloud.developerconnect.v1.ListUsersRequest\x1a\x33.google.cloud.developerconnect.v1.ListUsersResponse\"N\xda\x41\x06parent\x82\xd3\xe4\x93\x02?\x12=/v1/{parent=projects/*/locations/*/accountConnectors/*}/users\x12\xdb\x01\n\nDeleteUser\x12\x33.google.cloud.developerconnect.v1.DeleteUserRequest\x1a\x1d.google.longrunning.Operation\"y\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02?*=/v1/{name=projects/*/locations/*/accountConnectors/*/users/*}\x12\xbd\x01\n\tFetchSelf\x12\x32.google.cloud.developerconnect.v1.FetchSelfRequest\x1a&.google.cloud.developerconnect.v1.User\"T\xda\x41\x04name\x82\xd3\xe4\x93\x02G\x12\x45/v1/{name=projects/*/locations/*/accountConnectors/*}/users:fetchSelf\x12\xe5\x01\n\nDeleteSelf\x12\x33.google.cloud.developerconnect.v1.DeleteSelfRequest\x1a\x1d.google.longrunning.Operation\"\x82\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02H*F/v1/{name=projects/*/locations/*/accountConnectors/*}/users:deleteSelf\x12\xec\x01\n\nStartOAuth\x12\x33.google.cloud.developerconnect.v1.StartOAuthRequest\x1a\x34.google.cloud.developerconnect.v1.StartOAuthResponse\"s\xda\x41\x11\x61\x63\x63ount_connector\x82\xd3\xe4\x93\x02Y\x12W/v1/{account_connector=projects/*/locations/*/accountConnectors/*}/users:startOAuthFlow\x12\xf0\x01\n\x0b\x46inishOAuth\x12\x34.google.cloud.developerconnect.v1.FinishOAuthRequest\x1a\x35.google.cloud.developerconnect.v1.FinishOAuthResponse\"t\xda\x41\x11\x61\x63\x63ount_connector\x82\xd3\xe4\x93\x02Z\x12X/v1/{account_connector=projects/*/locations/*/accountConnectors/*}/users:finishOAuthFlow\x1aS\xca\x41\x1f\x64\x65veloperconnect.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xbb\x06\n$com.google.cloud.developerconnect.v1B\x15\x44\x65veloperConnectProtoP\x01ZPcloud.google.com/go/developerconnect/apiv1/developerconnectpb;developerconnectpb\xa2\x02\x10\x44\x65veloperConnect\xaa\x02 Google.Cloud.DeveloperConnect.V1\xca\x02 Google\\Cloud\\DeveloperConnect\\V1\xea\x02#Google::Cloud::DeveloperConnect::V1\xea\x41\xbf\x01\n*secretmanager.googleapis.com/SecretVersion\x12=projects/{project}/secrets/{secret}/versions/{secret_version}\x12Rprojects/{project}/locations/{location}/secrets/{secret}/versions/{secret_version}\xea\x41x\n!cloudkms.googleapis.com/CryptoKey\x12Sprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}\xea\x41|\n\'servicedirectory.googleapis.com/Service\x12Qprojects/{project}/locations/{location}/namespaces/{namespace}/services/{service}\xea\x41k\n+securesourcemanager.googleapis.com/Instance\x12.google.cloud.developerconnect.v1.ListDeploymentEventsResponse\"W\xda\x41\x06parent\x82\xd3\xe4\x93\x02H\x12\x46/v1/{parent=projects/*/locations/*/insightsConfigs/*}/deploymentEvents\x1aS\xca\x41\x1f\x64\x65veloperconnect.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xd5\x01\n$com.google.cloud.developerconnect.v1B\x13InsightsConfigProtoP\x01ZPcloud.google.com/go/developerconnect/apiv1/developerconnectpb;developerconnectpb\xaa\x02 Google.Cloud.DeveloperConnect.V1\xca\x02 Google\\Cloud\\DeveloperConnect\\V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.rpc.Status", "google/rpc/status.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Developerconnect + module V1 + InsightsConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.InsightsConfig").msgclass + InsightsConfig::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.InsightsConfig.State").enummodule + Projects = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.Projects").msgclass + RuntimeConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.RuntimeConfig").msgclass + RuntimeConfig::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.RuntimeConfig.State").enummodule + GKEWorkload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.GKEWorkload").msgclass + GoogleCloudRun = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.GoogleCloudRun").msgclass + AppHubWorkload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.AppHubWorkload").msgclass + AppHubService = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.AppHubService").msgclass + ArtifactConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.ArtifactConfig").msgclass + GoogleArtifactAnalysis = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.GoogleArtifactAnalysis").msgclass + GoogleArtifactRegistry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.GoogleArtifactRegistry").msgclass + DeploymentEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.DeploymentEvent").msgclass + DeploymentEvent::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.DeploymentEvent.State").enummodule + GetDeploymentEventRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.GetDeploymentEventRequest").msgclass + ListDeploymentEventsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.ListDeploymentEventsRequest").msgclass + ListDeploymentEventsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.ListDeploymentEventsResponse").msgclass + ArtifactDeployment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.ArtifactDeployment").msgclass + CreateInsightsConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.CreateInsightsConfigRequest").msgclass + GetInsightsConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.GetInsightsConfigRequest").msgclass + ListInsightsConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.ListInsightsConfigsRequest").msgclass + ListInsightsConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.ListInsightsConfigsResponse").msgclass + DeleteInsightsConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.DeleteInsightsConfigRequest").msgclass + UpdateInsightsConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.UpdateInsightsConfigRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service.rb b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service.rb new file mode 100644 index 000000000000..82879d3220f4 --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/developer_connect/v1/version" + +require "google/cloud/developerconnect/v1/insights_config_service/credentials" +require "google/cloud/developerconnect/v1/insights_config_service/paths" +require "google/cloud/developerconnect/v1/insights_config_service/operations" +require "google/cloud/developerconnect/v1/insights_config_service/client" +require "google/cloud/developerconnect/v1/insights_config_service/rest" + +module Google + module Cloud + module Developerconnect + module V1 + ## + # Creates and manages InsightsConfigs. + # + # The InsightsConfig resource is the core configuration object to capture + # events from your Software Development Lifecycle. It acts as the central hub + # for managing how Developer Connect understands your application, its runtime + # environments, and the artifacts deployed within them. + # A user can create an InsightsConfig, list previously-requested + # InsightsConfigs or get InsightsConfigs by their ID to determine the status of + # the InsightsConfig. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/developerconnect/v1/insights_config_service" + # client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/developerconnect/v1/insights_config_service/rest" + # client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new + # + module InsightsConfigService + end + end + end + end +end + +helper_path = ::File.join __dir__, "insights_config_service", "helpers.rb" +require "google/cloud/developerconnect/v1/insights_config_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/client.rb b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/client.rb new file mode 100644 index 000000000000..61660fa29322 --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/client.rb @@ -0,0 +1,1181 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/developerconnect/v1/insights_config_pb" +require "google/cloud/location" + +module Google + module Cloud + module Developerconnect + module V1 + module InsightsConfigService + ## + # Client for the InsightsConfigService service. + # + # Creates and manages InsightsConfigs. + # + # The InsightsConfig resource is the core configuration object to capture + # events from your Software Development Lifecycle. It acts as the central hub + # for managing how Developer Connect understands your application, its runtime + # environments, and the artifacts deployed within them. + # A user can create an InsightsConfig, list previously-requested + # InsightsConfigs or get InsightsConfigs by their ID to determine the status of + # the InsightsConfig. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "developerconnect.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :insights_config_service_stub + + ## + # Configure the InsightsConfigService Client class. + # + # See {::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all InsightsConfigService clients + # ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Developerconnect", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the InsightsConfigService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @insights_config_service_stub.universe_domain + end + + ## + # Create a new InsightsConfigService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the InsightsConfigService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/developerconnect/v1/insights_config_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @insights_config_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @insights_config_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @insights_config_service_stub.endpoint + config.universe_domain = @insights_config_service_stub.universe_domain + config.logger = @insights_config_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Developerconnect::V1::InsightsConfigService::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @insights_config_service_stub.logger + end + + # Service calls + + ## + # Lists InsightsConfigs in a given project and location. + # + # @overload list_insights_configs(request, options = nil) + # Pass arguments to `list_insights_configs` via a request object, either of type + # {::Google::Cloud::Developerconnect::V1::ListInsightsConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Developerconnect::V1::ListInsightsConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_insights_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_insights_configs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListInsightsConfigsRequest. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results. See https://google.aip.dev/160 for more + # details. Filter string, adhering to the rules in + # https://google.aip.dev/160. List only InsightsConfigs matching the filter. + # If filter is empty, all InsightsConfigs are listed. + # @param order_by [::String] + # Optional. Hint for how to order the results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Developerconnect::V1::InsightsConfig>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Developerconnect::V1::InsightsConfig>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Developerconnect::V1::ListInsightsConfigsRequest.new + # + # # Call the list_insights_configs method. + # result = client.list_insights_configs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Developerconnect::V1::InsightsConfig. + # p item + # end + # + def list_insights_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Developerconnect::V1::ListInsightsConfigsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_insights_configs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_insights_configs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_insights_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @insights_config_service_stub.call_rpc :list_insights_configs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @insights_config_service_stub, :list_insights_configs, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new InsightsConfig in a given project and location. + # + # @overload create_insights_config(request, options = nil) + # Pass arguments to `create_insights_config` via a request object, either of type + # {::Google::Cloud::Developerconnect::V1::CreateInsightsConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Developerconnect::V1::CreateInsightsConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_insights_config(parent: nil, insights_config_id: nil, insights_config: nil, validate_only: nil) + # Pass arguments to `create_insights_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Value for parent. + # @param insights_config_id [::String] + # Required. ID of the requesting InsightsConfig. + # @param insights_config [::Google::Cloud::Developerconnect::V1::InsightsConfig, ::Hash] + # Required. The resource being created. + # @param validate_only [::Boolean] + # Optional. If set, validate the request, but do not actually post it. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Developerconnect::V1::CreateInsightsConfigRequest.new + # + # # Call the create_insights_config method. + # result = client.create_insights_config request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_insights_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Developerconnect::V1::CreateInsightsConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_insights_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_insights_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_insights_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @insights_config_service_stub.call_rpc :create_insights_config, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single Insight. + # + # @overload get_insights_config(request, options = nil) + # Pass arguments to `get_insights_config` via a request object, either of type + # {::Google::Cloud::Developerconnect::V1::GetInsightsConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Developerconnect::V1::GetInsightsConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_insights_config(name: nil) + # Pass arguments to `get_insights_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Developerconnect::V1::InsightsConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Developerconnect::V1::InsightsConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Developerconnect::V1::GetInsightsConfigRequest.new + # + # # Call the get_insights_config method. + # result = client.get_insights_config request + # + # # The returned object is of type Google::Cloud::Developerconnect::V1::InsightsConfig. + # p result + # + def get_insights_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Developerconnect::V1::GetInsightsConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_insights_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_insights_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_insights_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @insights_config_service_stub.call_rpc :get_insights_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the parameters of a single InsightsConfig. + # + # @overload update_insights_config(request, options = nil) + # Pass arguments to `update_insights_config` via a request object, either of type + # {::Google::Cloud::Developerconnect::V1::UpdateInsightsConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Developerconnect::V1::UpdateInsightsConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_insights_config(insights_config: nil, request_id: nil, allow_missing: nil, validate_only: nil) + # Pass arguments to `update_insights_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param insights_config [::Google::Cloud::Developerconnect::V1::InsightsConfig, ::Hash] + # Required. The resource being updated. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param allow_missing [::Boolean] + # Optional. If set to true, and the insightsConfig is not found a new + # insightsConfig will be created. In this situation `update_mask` is ignored. + # The creation will succeed only if the input insightsConfig has all the + # necessary information (e.g a github_config with both user_oauth_token and + # installation_id properties). + # @param validate_only [::Boolean] + # Optional. If set, validate the request, but do not actually post it. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Developerconnect::V1::UpdateInsightsConfigRequest.new + # + # # Call the update_insights_config method. + # result = client.update_insights_config request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_insights_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Developerconnect::V1::UpdateInsightsConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_insights_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.insights_config&.name + header_params["insights_config.name"] = request.insights_config.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_insights_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_insights_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @insights_config_service_stub.call_rpc :update_insights_config, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single Insight. + # + # @overload delete_insights_config(request, options = nil) + # Pass arguments to `delete_insights_config` via a request object, either of type + # {::Google::Cloud::Developerconnect::V1::DeleteInsightsConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Developerconnect::V1::DeleteInsightsConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_insights_config(name: nil, request_id: nil, validate_only: nil, etag: nil) + # Pass arguments to `delete_insights_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Value for parent. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param validate_only [::Boolean] + # Optional. If set, validate the request, but do not actually post it. + # @param etag [::String] + # Optional. This checksum is computed by the server based on the value of + # other fields, and may be sent on update and delete requests to ensure the + # client has an up-to-date value before proceeding. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Developerconnect::V1::DeleteInsightsConfigRequest.new + # + # # Call the delete_insights_config method. + # result = client.delete_insights_config request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_insights_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Developerconnect::V1::DeleteInsightsConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_insights_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_insights_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_insights_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @insights_config_service_stub.call_rpc :delete_insights_config, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a single Deployment Event. + # + # @overload get_deployment_event(request, options = nil) + # Pass arguments to `get_deployment_event` via a request object, either of type + # {::Google::Cloud::Developerconnect::V1::GetDeploymentEventRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Developerconnect::V1::GetDeploymentEventRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_deployment_event(name: nil) + # Pass arguments to `get_deployment_event` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the deployment event to retrieve. + # Format: + # projects/\\{project}/locations/\\{location}/insightsConfigs/\\{insights_config}/deploymentEvents/\\{uuid} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Developerconnect::V1::DeploymentEvent] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Developerconnect::V1::DeploymentEvent] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Developerconnect::V1::GetDeploymentEventRequest.new + # + # # Call the get_deployment_event method. + # result = client.get_deployment_event request + # + # # The returned object is of type Google::Cloud::Developerconnect::V1::DeploymentEvent. + # p result + # + def get_deployment_event request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Developerconnect::V1::GetDeploymentEventRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_deployment_event.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_deployment_event.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_deployment_event.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @insights_config_service_stub.call_rpc :get_deployment_event, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Deployment Events in a given insights config. + # + # @overload list_deployment_events(request, options = nil) + # Pass arguments to `list_deployment_events` via a request object, either of type + # {::Google::Cloud::Developerconnect::V1::ListDeploymentEventsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Developerconnect::V1::ListDeploymentEventsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_deployment_events(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_deployment_events` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent insights config that owns this collection of + # deployment events. Format: + # projects/\\{project}/locations/\\{location}/insightsConfigs/\\{insights_config} + # @param page_size [::Integer] + # Optional. The maximum number of deployment events to return. The service + # may return fewer than this value. If unspecified, at most 50 deployment + # events will be returned. The maximum value is 1000; values above 1000 will + # be coerced to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListDeploymentEvents` + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListDeploymentEvents` + # must match the call that provided the page token. + # @param filter [::String] + # Optional. Filter expression that matches a subset of the DeploymentEvents. + # https://google.aip.dev/160. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Developerconnect::V1::DeploymentEvent>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Developerconnect::V1::DeploymentEvent>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Developerconnect::V1::ListDeploymentEventsRequest.new + # + # # Call the list_deployment_events method. + # result = client.list_deployment_events request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Developerconnect::V1::DeploymentEvent. + # p item + # end + # + def list_deployment_events request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Developerconnect::V1::ListDeploymentEventsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_deployment_events.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_deployment_events.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_deployment_events.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @insights_config_service_stub.call_rpc :list_deployment_events, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @insights_config_service_stub, :list_deployment_events, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the InsightsConfigService API. + # + # This class represents the configuration for InsightsConfigService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_insights_configs to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_insights_configs.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_insights_configs.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "developerconnect.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the InsightsConfigService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_insights_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_insights_configs + ## + # RPC-specific configuration for `create_insights_config` + # @return [::Gapic::Config::Method] + # + attr_reader :create_insights_config + ## + # RPC-specific configuration for `get_insights_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_insights_config + ## + # RPC-specific configuration for `update_insights_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_insights_config + ## + # RPC-specific configuration for `delete_insights_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_insights_config + ## + # RPC-specific configuration for `get_deployment_event` + # @return [::Gapic::Config::Method] + # + attr_reader :get_deployment_event + ## + # RPC-specific configuration for `list_deployment_events` + # @return [::Gapic::Config::Method] + # + attr_reader :list_deployment_events + + # @private + def initialize parent_rpcs = nil + list_insights_configs_config = parent_rpcs.list_insights_configs if parent_rpcs.respond_to? :list_insights_configs + @list_insights_configs = ::Gapic::Config::Method.new list_insights_configs_config + create_insights_config_config = parent_rpcs.create_insights_config if parent_rpcs.respond_to? :create_insights_config + @create_insights_config = ::Gapic::Config::Method.new create_insights_config_config + get_insights_config_config = parent_rpcs.get_insights_config if parent_rpcs.respond_to? :get_insights_config + @get_insights_config = ::Gapic::Config::Method.new get_insights_config_config + update_insights_config_config = parent_rpcs.update_insights_config if parent_rpcs.respond_to? :update_insights_config + @update_insights_config = ::Gapic::Config::Method.new update_insights_config_config + delete_insights_config_config = parent_rpcs.delete_insights_config if parent_rpcs.respond_to? :delete_insights_config + @delete_insights_config = ::Gapic::Config::Method.new delete_insights_config_config + get_deployment_event_config = parent_rpcs.get_deployment_event if parent_rpcs.respond_to? :get_deployment_event + @get_deployment_event = ::Gapic::Config::Method.new get_deployment_event_config + list_deployment_events_config = parent_rpcs.list_deployment_events if parent_rpcs.respond_to? :list_deployment_events + @list_deployment_events = ::Gapic::Config::Method.new list_deployment_events_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/credentials.rb b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/credentials.rb new file mode 100644 index 000000000000..04f7a7e5641b --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module Developerconnect + module V1 + module InsightsConfigService + # Credentials for the InsightsConfigService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/operations.rb b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/operations.rb new file mode 100644 index 000000000000..bfdc0e88afbf --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/operations.rb @@ -0,0 +1,841 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module Developerconnect + module V1 + module InsightsConfigService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "developerconnect.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the InsightsConfigService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the InsightsConfigService Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.wait_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "developerconnect.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/paths.rb b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/paths.rb new file mode 100644 index 000000000000..a33ff3f047f6 --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/paths.rb @@ -0,0 +1,90 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Developerconnect + module V1 + module InsightsConfigService + # Path helper methods for the InsightsConfigService API. + module Paths + ## + # Create a fully-qualified DeploymentEvent resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/insightsConfigs/{insights_config}/deploymentEvents/{deployment_event}` + # + # @param project [String] + # @param location [String] + # @param insights_config [String] + # @param deployment_event [String] + # + # @return [::String] + def deployment_event_path project:, location:, insights_config:, deployment_event: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "insights_config cannot contain /" if insights_config.to_s.include? "/" + + "projects/#{project}/locations/#{location}/insightsConfigs/#{insights_config}/deploymentEvents/#{deployment_event}" + end + + ## + # Create a fully-qualified InsightsConfig resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/insightsConfigs/{insights_config}` + # + # @param project [String] + # @param location [String] + # @param insights_config [String] + # + # @return [::String] + def insights_config_path project:, location:, insights_config: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/insightsConfigs/#{insights_config}" + end + + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/rest.rb b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/rest.rb new file mode 100644 index 000000000000..e98d3287620a --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/rest.rb @@ -0,0 +1,62 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/developer_connect/v1/version" +require "google/cloud/developer_connect/v1/bindings_override" + +require "google/cloud/developerconnect/v1/insights_config_service/credentials" +require "google/cloud/developerconnect/v1/insights_config_service/paths" +require "google/cloud/developerconnect/v1/insights_config_service/rest/operations" +require "google/cloud/developerconnect/v1/insights_config_service/rest/client" + +module Google + module Cloud + module Developerconnect + module V1 + ## + # Creates and manages InsightsConfigs. + # + # The InsightsConfig resource is the core configuration object to capture + # events from your Software Development Lifecycle. It acts as the central hub + # for managing how Developer Connect understands your application, its runtime + # environments, and the artifacts deployed within them. + # A user can create an InsightsConfig, list previously-requested + # InsightsConfigs or get InsightsConfigs by their ID to determine the status of + # the InsightsConfig. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/developerconnect/v1/insights_config_service/rest" + # client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new + # + module InsightsConfigService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/developerconnect/v1/insights_config_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/rest/client.rb b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/rest/client.rb new file mode 100644 index 000000000000..bd791d832047 --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/rest/client.rb @@ -0,0 +1,1097 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/developerconnect/v1/insights_config_pb" +require "google/cloud/developerconnect/v1/insights_config_service/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Cloud + module Developerconnect + module V1 + module InsightsConfigService + module Rest + ## + # REST client for the InsightsConfigService service. + # + # Creates and manages InsightsConfigs. + # + # The InsightsConfig resource is the core configuration object to capture + # events from your Software Development Lifecycle. It acts as the central hub + # for managing how Developer Connect understands your application, its runtime + # environments, and the artifacts deployed within them. + # A user can create an InsightsConfig, list previously-requested + # InsightsConfigs or get InsightsConfigs by their ID to determine the status of + # the InsightsConfig. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "developerconnect.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :insights_config_service_stub + + ## + # Configure the InsightsConfigService Client class. + # + # See {::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all InsightsConfigService clients + # ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Developerconnect", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the InsightsConfigService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @insights_config_service_stub.universe_domain + end + + ## + # Create a new InsightsConfigService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the InsightsConfigService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @insights_config_service_stub = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @insights_config_service_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @insights_config_service_stub.endpoint + config.universe_domain = @insights_config_service_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @insights_config_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @insights_config_service_stub.logger + end + + # Service calls + + ## + # Lists InsightsConfigs in a given project and location. + # + # @overload list_insights_configs(request, options = nil) + # Pass arguments to `list_insights_configs` via a request object, either of type + # {::Google::Cloud::Developerconnect::V1::ListInsightsConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Developerconnect::V1::ListInsightsConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_insights_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_insights_configs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListInsightsConfigsRequest. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results. See https://google.aip.dev/160 for more + # details. Filter string, adhering to the rules in + # https://google.aip.dev/160. List only InsightsConfigs matching the filter. + # If filter is empty, all InsightsConfigs are listed. + # @param order_by [::String] + # Optional. Hint for how to order the results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Developerconnect::V1::InsightsConfig>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Developerconnect::V1::InsightsConfig>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Developerconnect::V1::ListInsightsConfigsRequest.new + # + # # Call the list_insights_configs method. + # result = client.list_insights_configs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Developerconnect::V1::InsightsConfig. + # p item + # end + # + def list_insights_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Developerconnect::V1::ListInsightsConfigsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_insights_configs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_insights_configs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_insights_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @insights_config_service_stub.list_insights_configs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @insights_config_service_stub, :list_insights_configs, "insights_configs", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new InsightsConfig in a given project and location. + # + # @overload create_insights_config(request, options = nil) + # Pass arguments to `create_insights_config` via a request object, either of type + # {::Google::Cloud::Developerconnect::V1::CreateInsightsConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Developerconnect::V1::CreateInsightsConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_insights_config(parent: nil, insights_config_id: nil, insights_config: nil, validate_only: nil) + # Pass arguments to `create_insights_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Value for parent. + # @param insights_config_id [::String] + # Required. ID of the requesting InsightsConfig. + # @param insights_config [::Google::Cloud::Developerconnect::V1::InsightsConfig, ::Hash] + # Required. The resource being created. + # @param validate_only [::Boolean] + # Optional. If set, validate the request, but do not actually post it. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Developerconnect::V1::CreateInsightsConfigRequest.new + # + # # Call the create_insights_config method. + # result = client.create_insights_config request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_insights_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Developerconnect::V1::CreateInsightsConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_insights_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_insights_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_insights_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @insights_config_service_stub.create_insights_config request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single Insight. + # + # @overload get_insights_config(request, options = nil) + # Pass arguments to `get_insights_config` via a request object, either of type + # {::Google::Cloud::Developerconnect::V1::GetInsightsConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Developerconnect::V1::GetInsightsConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_insights_config(name: nil) + # Pass arguments to `get_insights_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Developerconnect::V1::InsightsConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Developerconnect::V1::InsightsConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Developerconnect::V1::GetInsightsConfigRequest.new + # + # # Call the get_insights_config method. + # result = client.get_insights_config request + # + # # The returned object is of type Google::Cloud::Developerconnect::V1::InsightsConfig. + # p result + # + def get_insights_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Developerconnect::V1::GetInsightsConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_insights_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_insights_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_insights_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @insights_config_service_stub.get_insights_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the parameters of a single InsightsConfig. + # + # @overload update_insights_config(request, options = nil) + # Pass arguments to `update_insights_config` via a request object, either of type + # {::Google::Cloud::Developerconnect::V1::UpdateInsightsConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Developerconnect::V1::UpdateInsightsConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_insights_config(insights_config: nil, request_id: nil, allow_missing: nil, validate_only: nil) + # Pass arguments to `update_insights_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param insights_config [::Google::Cloud::Developerconnect::V1::InsightsConfig, ::Hash] + # Required. The resource being updated. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param allow_missing [::Boolean] + # Optional. If set to true, and the insightsConfig is not found a new + # insightsConfig will be created. In this situation `update_mask` is ignored. + # The creation will succeed only if the input insightsConfig has all the + # necessary information (e.g a github_config with both user_oauth_token and + # installation_id properties). + # @param validate_only [::Boolean] + # Optional. If set, validate the request, but do not actually post it. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Developerconnect::V1::UpdateInsightsConfigRequest.new + # + # # Call the update_insights_config method. + # result = client.update_insights_config request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_insights_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Developerconnect::V1::UpdateInsightsConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_insights_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_insights_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_insights_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @insights_config_service_stub.update_insights_config request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single Insight. + # + # @overload delete_insights_config(request, options = nil) + # Pass arguments to `delete_insights_config` via a request object, either of type + # {::Google::Cloud::Developerconnect::V1::DeleteInsightsConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Developerconnect::V1::DeleteInsightsConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_insights_config(name: nil, request_id: nil, validate_only: nil, etag: nil) + # Pass arguments to `delete_insights_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Value for parent. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param validate_only [::Boolean] + # Optional. If set, validate the request, but do not actually post it. + # @param etag [::String] + # Optional. This checksum is computed by the server based on the value of + # other fields, and may be sent on update and delete requests to ensure the + # client has an up-to-date value before proceeding. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Developerconnect::V1::DeleteInsightsConfigRequest.new + # + # # Call the delete_insights_config method. + # result = client.delete_insights_config request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_insights_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Developerconnect::V1::DeleteInsightsConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_insights_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_insights_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_insights_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @insights_config_service_stub.delete_insights_config request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a single Deployment Event. + # + # @overload get_deployment_event(request, options = nil) + # Pass arguments to `get_deployment_event` via a request object, either of type + # {::Google::Cloud::Developerconnect::V1::GetDeploymentEventRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Developerconnect::V1::GetDeploymentEventRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_deployment_event(name: nil) + # Pass arguments to `get_deployment_event` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the deployment event to retrieve. + # Format: + # projects/\\{project}/locations/\\{location}/insightsConfigs/\\{insights_config}/deploymentEvents/\\{uuid} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Developerconnect::V1::DeploymentEvent] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Developerconnect::V1::DeploymentEvent] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Developerconnect::V1::GetDeploymentEventRequest.new + # + # # Call the get_deployment_event method. + # result = client.get_deployment_event request + # + # # The returned object is of type Google::Cloud::Developerconnect::V1::DeploymentEvent. + # p result + # + def get_deployment_event request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Developerconnect::V1::GetDeploymentEventRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_deployment_event.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_deployment_event.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_deployment_event.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @insights_config_service_stub.get_deployment_event request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Deployment Events in a given insights config. + # + # @overload list_deployment_events(request, options = nil) + # Pass arguments to `list_deployment_events` via a request object, either of type + # {::Google::Cloud::Developerconnect::V1::ListDeploymentEventsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Developerconnect::V1::ListDeploymentEventsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_deployment_events(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_deployment_events` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent insights config that owns this collection of + # deployment events. Format: + # projects/\\{project}/locations/\\{location}/insightsConfigs/\\{insights_config} + # @param page_size [::Integer] + # Optional. The maximum number of deployment events to return. The service + # may return fewer than this value. If unspecified, at most 50 deployment + # events will be returned. The maximum value is 1000; values above 1000 will + # be coerced to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListDeploymentEvents` + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListDeploymentEvents` + # must match the call that provided the page token. + # @param filter [::String] + # Optional. Filter expression that matches a subset of the DeploymentEvents. + # https://google.aip.dev/160. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Developerconnect::V1::DeploymentEvent>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Developerconnect::V1::DeploymentEvent>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Developerconnect::V1::ListDeploymentEventsRequest.new + # + # # Call the list_deployment_events method. + # result = client.list_deployment_events request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Developerconnect::V1::DeploymentEvent. + # p item + # end + # + def list_deployment_events request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Developerconnect::V1::ListDeploymentEventsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_deployment_events.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_deployment_events.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_deployment_events.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @insights_config_service_stub.list_deployment_events request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @insights_config_service_stub, :list_deployment_events, "deployment_events", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the InsightsConfigService REST API. + # + # This class represents the configuration for InsightsConfigService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_insights_configs to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_insights_configs.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_insights_configs.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "developerconnect.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + # Overrides for http bindings for the RPCs of this service + # are only used when this service is used as mixin, and only + # by the host service. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the InsightsConfigService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_insights_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_insights_configs + ## + # RPC-specific configuration for `create_insights_config` + # @return [::Gapic::Config::Method] + # + attr_reader :create_insights_config + ## + # RPC-specific configuration for `get_insights_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_insights_config + ## + # RPC-specific configuration for `update_insights_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_insights_config + ## + # RPC-specific configuration for `delete_insights_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_insights_config + ## + # RPC-specific configuration for `get_deployment_event` + # @return [::Gapic::Config::Method] + # + attr_reader :get_deployment_event + ## + # RPC-specific configuration for `list_deployment_events` + # @return [::Gapic::Config::Method] + # + attr_reader :list_deployment_events + + # @private + def initialize parent_rpcs = nil + list_insights_configs_config = parent_rpcs.list_insights_configs if parent_rpcs.respond_to? :list_insights_configs + @list_insights_configs = ::Gapic::Config::Method.new list_insights_configs_config + create_insights_config_config = parent_rpcs.create_insights_config if parent_rpcs.respond_to? :create_insights_config + @create_insights_config = ::Gapic::Config::Method.new create_insights_config_config + get_insights_config_config = parent_rpcs.get_insights_config if parent_rpcs.respond_to? :get_insights_config + @get_insights_config = ::Gapic::Config::Method.new get_insights_config_config + update_insights_config_config = parent_rpcs.update_insights_config if parent_rpcs.respond_to? :update_insights_config + @update_insights_config = ::Gapic::Config::Method.new update_insights_config_config + delete_insights_config_config = parent_rpcs.delete_insights_config if parent_rpcs.respond_to? :delete_insights_config + @delete_insights_config = ::Gapic::Config::Method.new delete_insights_config_config + get_deployment_event_config = parent_rpcs.get_deployment_event if parent_rpcs.respond_to? :get_deployment_event + @get_deployment_event = ::Gapic::Config::Method.new get_deployment_event_config + list_deployment_events_config = parent_rpcs.list_deployment_events if parent_rpcs.respond_to? :list_deployment_events + @list_deployment_events = ::Gapic::Config::Method.new list_deployment_events_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/rest/operations.rb b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/rest/operations.rb new file mode 100644 index 000000000000..13a697ed01c8 --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/rest/operations.rb @@ -0,0 +1,925 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Cloud + module Developerconnect + module V1 + module InsightsConfigService + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "developerconnect.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the InsightsConfigService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the InsightsConfigService Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = OperationsServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.list_operations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.get_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.delete_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "developerconnect.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/rest/service_stub.rb new file mode 100644 index 000000000000..f6b887c99270 --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/rest/service_stub.rb @@ -0,0 +1,510 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/developerconnect/v1/insights_config_pb" + +module Google + module Cloud + module Developerconnect + module V1 + module InsightsConfigService + module Rest + ## + # REST service stub for the InsightsConfigService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the list_insights_configs REST call + # + # @param request_pb [::Google::Cloud::Developerconnect::V1::ListInsightsConfigsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Developerconnect::V1::ListInsightsConfigsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Developerconnect::V1::ListInsightsConfigsResponse] + # A result object deserialized from the server's reply + def list_insights_configs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_insights_configs_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_insights_configs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Developerconnect::V1::ListInsightsConfigsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_insights_config REST call + # + # @param request_pb [::Google::Cloud::Developerconnect::V1::CreateInsightsConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_insights_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_insights_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_insights_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_insights_config REST call + # + # @param request_pb [::Google::Cloud::Developerconnect::V1::GetInsightsConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Developerconnect::V1::InsightsConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Developerconnect::V1::InsightsConfig] + # A result object deserialized from the server's reply + def get_insights_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_insights_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_insights_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Developerconnect::V1::InsightsConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_insights_config REST call + # + # @param request_pb [::Google::Cloud::Developerconnect::V1::UpdateInsightsConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_insights_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_insights_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_insights_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_insights_config REST call + # + # @param request_pb [::Google::Cloud::Developerconnect::V1::DeleteInsightsConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_insights_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_insights_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_insights_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_deployment_event REST call + # + # @param request_pb [::Google::Cloud::Developerconnect::V1::GetDeploymentEventRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Developerconnect::V1::DeploymentEvent] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Developerconnect::V1::DeploymentEvent] + # A result object deserialized from the server's reply + def get_deployment_event request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_deployment_event_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_deployment_event", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Developerconnect::V1::DeploymentEvent.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_deployment_events REST call + # + # @param request_pb [::Google::Cloud::Developerconnect::V1::ListDeploymentEventsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Developerconnect::V1::ListDeploymentEventsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Developerconnect::V1::ListDeploymentEventsResponse] + # A result object deserialized from the server's reply + def list_deployment_events request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_deployment_events_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_deployment_events", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Developerconnect::V1::ListDeploymentEventsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_insights_configs REST call + # + # @param request_pb [::Google::Cloud::Developerconnect::V1::ListInsightsConfigsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_insights_configs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/insightsConfigs", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_insights_config REST call + # + # @param request_pb [::Google::Cloud::Developerconnect::V1::CreateInsightsConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_insights_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/insightsConfigs", + body: "insights_config", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_insights_config REST call + # + # @param request_pb [::Google::Cloud::Developerconnect::V1::GetInsightsConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_insights_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/insightsConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_insights_config REST call + # + # @param request_pb [::Google::Cloud::Developerconnect::V1::UpdateInsightsConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_insights_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{insights_config.name}", + body: "insights_config", + matches: [ + ["insights_config.name", %r{^projects/[^/]+/locations/[^/]+/insightsConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_insights_config REST call + # + # @param request_pb [::Google::Cloud::Developerconnect::V1::DeleteInsightsConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_insights_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/insightsConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_deployment_event REST call + # + # @param request_pb [::Google::Cloud::Developerconnect::V1::GetDeploymentEventRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_deployment_event_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/insightsConfigs/[^/]+/deploymentEvents/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_deployment_events REST call + # + # @param request_pb [::Google::Cloud::Developerconnect::V1::ListDeploymentEventsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_deployment_events_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/deploymentEvents", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/insightsConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_services_pb.rb b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_services_pb.rb new file mode 100644 index 000000000000..16f8f41a3eb8 --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_services_pb.rb @@ -0,0 +1,65 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/developerconnect/v1/insights_config.proto for package 'google.cloud.developerconnect.v1' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/cloud/developerconnect/v1/insights_config_pb' + +module Google + module Cloud + module Developerconnect + module V1 + module InsightsConfigService + # Creates and manages InsightsConfigs. + # + # The InsightsConfig resource is the core configuration object to capture + # events from your Software Development Lifecycle. It acts as the central hub + # for managing how Developer Connect understands your application, its runtime + # environments, and the artifacts deployed within them. + # A user can create an InsightsConfig, list previously-requested + # InsightsConfigs or get InsightsConfigs by their ID to determine the status of + # the InsightsConfig. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.developerconnect.v1.InsightsConfigService' + + # Lists InsightsConfigs in a given project and location. + rpc :ListInsightsConfigs, ::Google::Cloud::Developerconnect::V1::ListInsightsConfigsRequest, ::Google::Cloud::Developerconnect::V1::ListInsightsConfigsResponse + # Creates a new InsightsConfig in a given project and location. + rpc :CreateInsightsConfig, ::Google::Cloud::Developerconnect::V1::CreateInsightsConfigRequest, ::Google::Longrunning::Operation + # Gets details of a single Insight. + rpc :GetInsightsConfig, ::Google::Cloud::Developerconnect::V1::GetInsightsConfigRequest, ::Google::Cloud::Developerconnect::V1::InsightsConfig + # Updates the parameters of a single InsightsConfig. + rpc :UpdateInsightsConfig, ::Google::Cloud::Developerconnect::V1::UpdateInsightsConfigRequest, ::Google::Longrunning::Operation + # Deletes a single Insight. + rpc :DeleteInsightsConfig, ::Google::Cloud::Developerconnect::V1::DeleteInsightsConfigRequest, ::Google::Longrunning::Operation + # Gets a single Deployment Event. + rpc :GetDeploymentEvent, ::Google::Cloud::Developerconnect::V1::GetDeploymentEventRequest, ::Google::Cloud::Developerconnect::V1::DeploymentEvent + # Lists Deployment Events in a given insights config. + rpc :ListDeploymentEvents, ::Google::Cloud::Developerconnect::V1::ListDeploymentEventsRequest, ::Google::Cloud::Developerconnect::V1::ListDeploymentEventsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/README.md new file mode 100644 index 000000000000..2ccd82ba661b --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Developer Connect V1 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..d59ba51a5612 --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/api/client.rb @@ -0,0 +1,473 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + end +end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/api/field_info.rb b/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/api/field_info.rb new file mode 100644 index 000000000000..0f5acf0a5538 --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/api/field_info.rb @@ -0,0 +1,88 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Rich semantic information of an API field beyond basic typing. + # @!attribute [rw] format + # @return [::Google::Api::FieldInfo::Format] + # The standard format of a field value. This does not explicitly configure + # any API consumer, just documents the API's format for the field it is + # applied to. + # @!attribute [rw] referenced_types + # @return [::Array<::Google::Api::TypeReference>] + # The type(s) that the annotated, generic field may represent. + # + # Currently, this must only be used on fields of type `google.protobuf.Any`. + # Supporting other generic types may be considered in the future. + class FieldInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The standard format of a field value. The supported formats are all backed + # by either an RFC defined by the IETF or a Google-defined AIP. + module Format + # Default, unspecified value. + FORMAT_UNSPECIFIED = 0 + + # Universally Unique Identifier, version 4, value as defined by + # https://datatracker.ietf.org/doc/html/rfc4122. The value may be + # normalized to entirely lowercase letters. For example, the value + # `F47AC10B-58CC-0372-8567-0E02B2C3D479` would be normalized to + # `f47ac10b-58cc-0372-8567-0e02b2c3d479`. + UUID4 = 1 + + # Internet Protocol v4 value as defined by [RFC + # 791](https://datatracker.ietf.org/doc/html/rfc791). The value may be + # condensed, with leading zeros in each octet stripped. For example, + # `001.022.233.040` would be condensed to `1.22.233.40`. + IPV4 = 2 + + # Internet Protocol v6 value as defined by [RFC + # 2460](https://datatracker.ietf.org/doc/html/rfc2460). The value may be + # normalized to entirely lowercase letters with zeros compressed, following + # [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952). For example, + # the value `2001:0DB8:0::0` would be normalized to `2001:db8::`. + IPV6 = 3 + + # An IP address in either v4 or v6 format as described by the individual + # values defined herein. See the comments on the IPV4 and IPV6 types for + # allowed normalizations of each. + IPV4_OR_IPV6 = 4 + end + end + + # A reference to a message type, for use in {::Google::Api::FieldInfo FieldInfo}. + # @!attribute [rw] type_name + # @return [::String] + # The name of the type that the annotated, generic field may represent. + # If the type is in the same protobuf package, the value can be the simple + # message name e.g., `"MyMessage"`. Otherwise, the value must be the + # fully-qualified message name e.g., `"google.library.v1.Book"`. + # + # If the type(s) are unknown to the service (e.g. the field accepts generic + # user input), use the wildcard `"*"` to denote this behavior. + # + # See [AIP-202](https://google.aip.dev/202#type-references) for more details. + class TypeReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/cloud/developerconnect/v1/developer_connect.rb b/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/cloud/developerconnect/v1/developer_connect.rb new file mode 100644 index 000000000000..014efd1d2357 --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/cloud/developerconnect/v1/developer_connect.rb @@ -0,0 +1,1581 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module DeveloperConnect + module V1 + # Message for requesting a list of Users + # @!attribute [rw] parent + # @return [::String] + # Required. Parent value for ListUsersRequest + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filtering results + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint for how to order the results + class ListUsersRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for response to listing Users + # @!attribute [rw] users + # @return [::Array<::Google::Cloud::DeveloperConnect::V1::User>] + # The list of Users + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListUsersResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message describing Connection object + # @!attribute [rw] github_config + # @return [::Google::Cloud::DeveloperConnect::V1::GitHubConfig] + # Configuration for connections to github.com. + # + # Note: The following fields are mutually exclusive: `github_config`, `github_enterprise_config`, `gitlab_config`, `gitlab_enterprise_config`, `bitbucket_data_center_config`, `bitbucket_cloud_config`, `secure_source_manager_instance_config`, `http_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] github_enterprise_config + # @return [::Google::Cloud::DeveloperConnect::V1::GitHubEnterpriseConfig] + # Configuration for connections to an instance of GitHub Enterprise. + # + # Note: The following fields are mutually exclusive: `github_enterprise_config`, `github_config`, `gitlab_config`, `gitlab_enterprise_config`, `bitbucket_data_center_config`, `bitbucket_cloud_config`, `secure_source_manager_instance_config`, `http_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] gitlab_config + # @return [::Google::Cloud::DeveloperConnect::V1::GitLabConfig] + # Configuration for connections to gitlab.com. + # + # Note: The following fields are mutually exclusive: `gitlab_config`, `github_config`, `github_enterprise_config`, `gitlab_enterprise_config`, `bitbucket_data_center_config`, `bitbucket_cloud_config`, `secure_source_manager_instance_config`, `http_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] gitlab_enterprise_config + # @return [::Google::Cloud::DeveloperConnect::V1::GitLabEnterpriseConfig] + # Configuration for connections to an instance of GitLab Enterprise. + # + # Note: The following fields are mutually exclusive: `gitlab_enterprise_config`, `github_config`, `github_enterprise_config`, `gitlab_config`, `bitbucket_data_center_config`, `bitbucket_cloud_config`, `secure_source_manager_instance_config`, `http_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bitbucket_data_center_config + # @return [::Google::Cloud::DeveloperConnect::V1::BitbucketDataCenterConfig] + # Configuration for connections to an instance of Bitbucket Data Center. + # + # Note: The following fields are mutually exclusive: `bitbucket_data_center_config`, `github_config`, `github_enterprise_config`, `gitlab_config`, `gitlab_enterprise_config`, `bitbucket_cloud_config`, `secure_source_manager_instance_config`, `http_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bitbucket_cloud_config + # @return [::Google::Cloud::DeveloperConnect::V1::BitbucketCloudConfig] + # Configuration for connections to an instance of Bitbucket Clouds. + # + # Note: The following fields are mutually exclusive: `bitbucket_cloud_config`, `github_config`, `github_enterprise_config`, `gitlab_config`, `gitlab_enterprise_config`, `bitbucket_data_center_config`, `secure_source_manager_instance_config`, `http_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] secure_source_manager_instance_config + # @return [::Google::Cloud::DeveloperConnect::V1::SecureSourceManagerInstanceConfig] + # Configuration for connections to an instance of Secure Source Manager. + # + # Note: The following fields are mutually exclusive: `secure_source_manager_instance_config`, `github_config`, `github_enterprise_config`, `gitlab_config`, `gitlab_enterprise_config`, `bitbucket_data_center_config`, `bitbucket_cloud_config`, `http_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] http_config + # @return [::Google::Cloud::DeveloperConnect::V1::GenericHTTPEndpointConfig] + # Optional. Configuration for connections to an HTTP service provider. + # + # Note: The following fields are mutually exclusive: `http_config`, `github_config`, `github_enterprise_config`, `gitlab_config`, `gitlab_enterprise_config`, `bitbucket_data_center_config`, `bitbucket_cloud_config`, `secure_source_manager_instance_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the connection, in the format + # `projects/{project}/locations/{location}/connections/{connection_id}`. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. [Output only] Create timestamp + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. [Output only] Update timestamp + # @!attribute [r] delete_time + # @return [::Google::Protobuf::Timestamp] + # Output only. [Output only] Delete timestamp + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Labels as key value pairs + # @!attribute [r] installation_state + # @return [::Google::Cloud::DeveloperConnect::V1::InstallationState] + # Output only. Installation state of the Connection. + # @!attribute [rw] disabled + # @return [::Boolean] + # Optional. If disabled is set to true, functionality is disabled for this + # connection. Repository based API methods and webhooks processing for + # repositories in this connection will be disabled. + # @!attribute [r] reconciling + # @return [::Boolean] + # Output only. Set to true when the connection is being set up or updated in + # the background. + # @!attribute [rw] annotations + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Allows clients to store small amounts of arbitrary data. + # @!attribute [rw] etag + # @return [::String] + # Optional. This checksum is computed by the server based on the value of + # other fields, and may be sent on update and delete requests to ensure the + # client has an up-to-date value before proceeding. + # @!attribute [r] uid + # @return [::String] + # Output only. A system-assigned unique identifier for the Connection. + # @!attribute [rw] crypto_key_config + # @return [::Google::Cloud::DeveloperConnect::V1::CryptoKeyConfig] + # Optional. The crypto key configuration. This field is used by the + # Customer-Managed Encryption Keys (CMEK) feature. + # @!attribute [rw] git_proxy_config + # @return [::Google::Cloud::DeveloperConnect::V1::GitProxyConfig] + # Optional. Configuration for the git proxy feature. Enabling the git proxy + # allows clients to perform git operations on the repositories linked in the + # connection. + class Connection + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class AnnotationsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The crypto key configuration. This field is used by the Customer-managed + # encryption keys (CMEK) feature. + # @!attribute [rw] key_reference + # @return [::String] + # Required. The name of the key which is used to encrypt/decrypt customer + # data. For key in Cloud KMS, the key should be in the format of + # `projects/*/locations/*/keyRings/*/cryptoKeys/*`. + class CryptoKeyConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The git proxy configuration. + # @!attribute [rw] enabled + # @return [::Boolean] + # Optional. Setting this to true allows the git proxy to be used for + # performing git operations on the repositories linked in the connection. + # @!attribute [r] http_proxy_base_uri + # @return [::String] + # Output only. The base URI for the HTTP proxy endpoint. Has + # the format + # `https://{generatedID}-c-h-{shortRegion}.developerconnect.dev` + # Populated only when enabled is set to true. + # This endpoint is used by other Google services that integrate with + # Developer Connect. + class GitProxyConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes stage and necessary actions to be taken by the + # user to complete the installation. Used for GitHub and GitHub Enterprise + # based connections. + # @!attribute [r] stage + # @return [::Google::Cloud::DeveloperConnect::V1::InstallationState::Stage] + # Output only. Current step of the installation process. + # @!attribute [r] message + # @return [::String] + # Output only. Message of what the user should do next to continue the + # installation. Empty string if the installation is already complete. + # @!attribute [r] action_uri + # @return [::String] + # Output only. Link to follow for next action. Empty string if the + # installation is already complete. + class InstallationState + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Stage of the installation process. + module Stage + # No stage specified. + STAGE_UNSPECIFIED = 0 + + # Only for GitHub Enterprise. An App creation has been requested. + # The user needs to confirm the creation in their GitHub enterprise host. + PENDING_CREATE_APP = 1 + + # User needs to authorize the GitHub (or Enterprise) App via OAuth. + PENDING_USER_OAUTH = 2 + + # User needs to follow the link to install the GitHub (or Enterprise) App. + PENDING_INSTALL_APP = 3 + + # Installation process has been completed. + COMPLETE = 10 + end + end + + # Defines the configuration for connections to an HTTP service provider. + # @!attribute [rw] basic_authentication + # @return [::Google::Cloud::DeveloperConnect::V1::GenericHTTPEndpointConfig::BasicAuthentication] + # Optional. Basic authentication with username and password. + # + # Note: The following fields are mutually exclusive: `basic_authentication`, `bearer_token_authentication`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bearer_token_authentication + # @return [::Google::Cloud::DeveloperConnect::V1::GenericHTTPEndpointConfig::BearerTokenAuthentication] + # Optional. Bearer token authentication with a token. + # + # Note: The following fields are mutually exclusive: `bearer_token_authentication`, `basic_authentication`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] host_uri + # @return [::String] + # Required. Immutable. The service provider's https endpoint. + # @!attribute [rw] service_directory_config + # @return [::Google::Cloud::DeveloperConnect::V1::ServiceDirectoryConfig] + # Optional. Configuration for using Service Directory to privately connect to + # a HTTP service provider. This should only be set if the Http service + # provider is hosted on-premises and not reachable by public internet. If + # this field is left empty, calls to the HTTP service provider will be made + # over the public internet. + # @!attribute [rw] ssl_ca_certificate + # @return [::String] + # Optional. The SSL certificate to use for requests to the HTTP service + # provider. + class GenericHTTPEndpointConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Basic authentication with username and password. + # @!attribute [rw] password_secret_version + # @return [::String] + # The password SecretManager secret version to authenticate as. + # @!attribute [rw] username + # @return [::String] + # Required. The username to authenticate as. + class BasicAuthentication + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Bearer token authentication with a token. + # @!attribute [rw] token_secret_version + # @return [::String] + # Optional. The token SecretManager secret version to authenticate as. + class BearerTokenAuthentication + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Configuration for connections to github.com. + # @!attribute [rw] github_app + # @return [::Google::Cloud::DeveloperConnect::V1::GitHubConfig::GitHubApp] + # Required. Immutable. The GitHub Application that was installed to the + # GitHub user or organization. + # @!attribute [rw] authorizer_credential + # @return [::Google::Cloud::DeveloperConnect::V1::OAuthCredential] + # Optional. OAuth credential of the account that authorized the GitHub App. + # It is recommended to use a robot account instead of a human user account. + # The OAuth token must be tied to the GitHub App of this config. + # @!attribute [rw] app_installation_id + # @return [::Integer] + # Optional. GitHub App installation id. + # @!attribute [r] installation_uri + # @return [::String] + # Output only. The URI to navigate to in order to manage the installation + # associated with this GitHubConfig. + class GitHubConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents the various GitHub Applications that can be installed to a + # GitHub user or organization and used with Developer Connect. + module GitHubApp + # GitHub App not specified. + GIT_HUB_APP_UNSPECIFIED = 0 + + # The Developer Connect GitHub Application. + DEVELOPER_CONNECT = 1 + + # The Firebase GitHub Application. + FIREBASE = 2 + + # The Gemini Code Assist Application. + GEMINI_CODE_ASSIST = 3 + end + end + + # Configuration for connections to an instance of GitHub Enterprise. + # @!attribute [rw] host_uri + # @return [::String] + # Required. The URI of the GitHub Enterprise host this connection is for. + # @!attribute [rw] app_id + # @return [::Integer] + # Optional. ID of the GitHub App created from the manifest. + # @!attribute [r] app_slug + # @return [::String] + # Output only. The URL-friendly name of the GitHub App. + # @!attribute [rw] private_key_secret_version + # @return [::String] + # Optional. SecretManager resource containing the private key of the GitHub + # App, formatted as `projects/*/secrets/*/versions/*` or + # `projects/*/locations/*/secrets/*/versions/*` (if regional secrets are + # supported in that location). + # @!attribute [rw] webhook_secret_secret_version + # @return [::String] + # Optional. SecretManager resource containing the webhook secret of the + # GitHub App, formatted as `projects/*/secrets/*/versions/*` or + # `projects/*/locations/*/secrets/*/versions/*` (if regional secrets are + # supported in that location). + # @!attribute [rw] app_installation_id + # @return [::Integer] + # Optional. ID of the installation of the GitHub App. + # @!attribute [r] installation_uri + # @return [::String] + # Output only. The URI to navigate to in order to manage the installation + # associated with this GitHubEnterpriseConfig. + # @!attribute [rw] service_directory_config + # @return [::Google::Cloud::DeveloperConnect::V1::ServiceDirectoryConfig] + # Optional. Configuration for using Service Directory to privately connect to + # a GitHub Enterprise server. This should only be set if the GitHub + # Enterprise server is hosted on-premises and not reachable by public + # internet. If this field is left empty, calls to the GitHub Enterprise + # server will be made over the public internet. + # @!attribute [r] server_version + # @return [::String] + # Output only. GitHub Enterprise version installed at the host_uri. + # @!attribute [rw] ssl_ca_certificate + # @return [::String] + # Optional. SSL certificate to use for requests to GitHub Enterprise. + # @!attribute [rw] organization + # @return [::String] + # Optional. Immutable. GitHub Enterprise organization in which the GitHub App + # is created. + class GitHubEnterpriseConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ServiceDirectoryConfig represents Service Directory configuration for a + # connection. + # @!attribute [rw] service + # @return [::String] + # Required. The Service Directory service name. + # Format: + # projects/\\{project}/locations/\\{location}/namespaces/\\{namespace}/services/\\{service}. + class ServiceDirectoryConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents an OAuth token of the account that authorized the Connection, + # and associated metadata. + # @!attribute [rw] oauth_token_secret_version + # @return [::String] + # Required. A SecretManager resource containing the OAuth token that + # authorizes the connection. Format: `projects/*/secrets/*/versions/*` or + # `projects/*/locations/*/secrets/*/versions/*` (if regional secrets are + # supported in that location). + # @!attribute [r] username + # @return [::String] + # Output only. The username associated with this token. + class OAuthCredential + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for connections to gitlab.com. + # @!attribute [rw] webhook_secret_secret_version + # @return [::String] + # Required. Immutable. SecretManager resource containing the webhook secret + # of a GitLab project, formatted as `projects/*/secrets/*/versions/*` or + # `projects/*/locations/*/secrets/*/versions/*` (if regional secrets are + # supported in that location). This is used to validate webhooks. + # @!attribute [rw] read_authorizer_credential + # @return [::Google::Cloud::DeveloperConnect::V1::UserCredential] + # Required. A GitLab personal access token with the minimum `read_api` scope + # access and a minimum role of `reporter`. The GitLab Projects visible to + # this Personal Access Token will control which Projects Developer Connect + # has access to. + # @!attribute [rw] authorizer_credential + # @return [::Google::Cloud::DeveloperConnect::V1::UserCredential] + # Required. A GitLab personal access token with the minimum `api` scope + # access and a minimum role of `maintainer`. The GitLab Projects visible to + # this Personal Access Token will control which Projects Developer Connect + # has access to. + class GitLabConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a personal access token that authorized the Connection, + # and associated metadata. + # @!attribute [rw] user_token_secret_version + # @return [::String] + # Required. A SecretManager resource containing the user token that + # authorizes the Developer Connect connection. Format: + # `projects/*/secrets/*/versions/*` or + # `projects/*/locations/*/secrets/*/versions/*` (if regional secrets are + # supported in that location). + # @!attribute [r] username + # @return [::String] + # Output only. The username associated with this token. + class UserCredential + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for connections to an instance of GitLab Enterprise. + # @!attribute [rw] host_uri + # @return [::String] + # Required. The URI of the GitLab Enterprise host this connection is for. + # @!attribute [rw] webhook_secret_secret_version + # @return [::String] + # Required. Immutable. SecretManager resource containing the webhook secret + # of a GitLab project, formatted as `projects/*/secrets/*/versions/*` or + # `projects/*/locations/*/secrets/*/versions/*` (if regional secrets are + # supported in that location). This is used to validate webhooks. + # @!attribute [rw] read_authorizer_credential + # @return [::Google::Cloud::DeveloperConnect::V1::UserCredential] + # Required. A GitLab personal access token with the minimum `read_api` scope + # access and a minimum role of `reporter`. The GitLab Projects visible to + # this Personal Access Token will control which Projects Developer Connect + # has access to. + # @!attribute [rw] authorizer_credential + # @return [::Google::Cloud::DeveloperConnect::V1::UserCredential] + # Required. A GitLab personal access token with the minimum `api` scope + # access and a minimum role of `maintainer`. The GitLab Projects visible to + # this Personal Access Token will control which Projects Developer Connect + # has access to. + # @!attribute [rw] service_directory_config + # @return [::Google::Cloud::DeveloperConnect::V1::ServiceDirectoryConfig] + # Optional. Configuration for using Service Directory to privately connect to + # a GitLab Enterprise instance. This should only be set if the GitLab + # Enterprise server is hosted on-premises and not reachable by public + # internet. If this field is left empty, calls to the GitLab Enterprise + # server will be made over the public internet. + # @!attribute [rw] ssl_ca_certificate + # @return [::String] + # Optional. SSL Certificate Authority certificate to use for requests to + # GitLab Enterprise instance. + # @!attribute [r] server_version + # @return [::String] + # Output only. Version of the GitLab Enterprise server running on the + # `host_uri`. + class GitLabEnterpriseConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for connections to an instance of Bitbucket Data Center. + # @!attribute [rw] host_uri + # @return [::String] + # Required. The URI of the Bitbucket Data Center host this connection is for. + # @!attribute [rw] webhook_secret_secret_version + # @return [::String] + # Required. Immutable. SecretManager resource containing the webhook secret + # used to verify webhook events, formatted as + # `projects/*/secrets/*/versions/*` or + # `projects/*/locations/*/secrets/*/versions/*` (if regional secrets are + # supported in that location). This is used to validate webhooks. + # @!attribute [rw] read_authorizer_credential + # @return [::Google::Cloud::DeveloperConnect::V1::UserCredential] + # Required. An http access token with the minimum `Repository read` access. + # It's recommended to use a system account to generate the credentials. + # @!attribute [rw] authorizer_credential + # @return [::Google::Cloud::DeveloperConnect::V1::UserCredential] + # Required. An http access token with the minimum `Repository admin` scope + # access. This is needed to create webhooks. It's recommended to use a system + # account to generate these credentials. + # @!attribute [rw] service_directory_config + # @return [::Google::Cloud::DeveloperConnect::V1::ServiceDirectoryConfig] + # Optional. Configuration for using Service Directory to privately connect to + # a Bitbucket Data Center instance. This should only be set if the Bitbucket + # Data Center is hosted on-premises and not reachable by public internet. If + # this field is left empty, calls to the Bitbucket Data Center will be made + # over the public internet. + # @!attribute [rw] ssl_ca_certificate + # @return [::String] + # Optional. SSL certificate authority to trust when making requests to + # Bitbucket Data Center. + # @!attribute [r] server_version + # @return [::String] + # Output only. Version of the Bitbucket Data Center server running on the + # `host_uri`. + class BitbucketDataCenterConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for connections to an instance of Bitbucket Cloud. + # @!attribute [rw] workspace + # @return [::String] + # Required. The Bitbucket Cloud Workspace ID to be connected to Google Cloud + # Platform. + # @!attribute [rw] webhook_secret_secret_version + # @return [::String] + # Required. Immutable. SecretManager resource containing the webhook secret + # used to verify webhook events, formatted as + # `projects/*/secrets/*/versions/*` or + # `projects/*/locations/*/secrets/*/versions/*` (if regional secrets are + # supported in that location). This is used to validate and create webhooks. + # @!attribute [rw] read_authorizer_credential + # @return [::Google::Cloud::DeveloperConnect::V1::UserCredential] + # Required. An access token with the minimum `repository` access. + # It can either be a workspace, project or repository access token. + # It's recommended to use a system account to generate the credentials. + # @!attribute [rw] authorizer_credential + # @return [::Google::Cloud::DeveloperConnect::V1::UserCredential] + # Required. An access token with the minimum `repository`, `pullrequest` and + # `webhook` scope access. It can either be a workspace, project or repository + # access token. This is needed to create webhooks. It's recommended to use a + # system account to generate these credentials. + class BitbucketCloudConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for connections to Secure Source Manager instance + # @!attribute [rw] instance + # @return [::String] + # Required. Immutable. Secure Source Manager instance resource, formatted as + # `projects/*/locations/*/instances/*` + class SecureSourceManagerInstanceConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for requesting list of Connections + # @!attribute [rw] parent + # @return [::String] + # Required. Parent value for ListConnectionsRequest + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filtering results + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint for how to order the results + class ListConnectionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for response to listing Connections + # @!attribute [rw] connections + # @return [::Array<::Google::Cloud::DeveloperConnect::V1::Connection>] + # The list of Connection + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListConnectionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for getting a Connection + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource + class GetConnectionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for creating a Connection + # @!attribute [rw] parent + # @return [::String] + # Required. Value for parent. + # @!attribute [rw] connection_id + # @return [::String] + # Required. Id of the requesting object + # If auto-generating Id server-side, remove this field and + # connection_id from the method_signature of Create RPC + # @!attribute [rw] connection + # @return [::Google::Cloud::DeveloperConnect::V1::Connection] + # Required. The resource being created + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request, but do not actually post it. + class CreateConnectionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for updating a Connection + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Field mask is used to specify the fields to be overwritten in the + # Connection resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @!attribute [rw] connection + # @return [::Google::Cloud::DeveloperConnect::V1::Connection] + # Required. The resource being updated + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @!attribute [rw] allow_missing + # @return [::Boolean] + # Optional. If set to true, and the connection is not found a new connection + # will be created. In this situation `update_mask` is ignored. + # The creation will succeed only if the input connection has all the + # necessary information (e.g a github_config with both user_oauth_token and + # installation_id properties). + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request, but do not actually post it. + class UpdateConnectionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for deleting a Connection + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request, but do not actually post it. + # @!attribute [rw] etag + # @return [::String] + # Optional. The current etag of the Connection. + # If an etag is provided and does not match the current etag of the + # Connection, deletion will be blocked and an ABORTED error will be returned. + class DeleteConnectionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for requesting list of AccountConnectors + # @!attribute [rw] parent + # @return [::String] + # Required. Parent value for ListAccountConnectorsRequest + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filtering results + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint for how to order the results + class ListAccountConnectorsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for response to listing AccountConnectors + # @!attribute [rw] account_connectors + # @return [::Array<::Google::Cloud::DeveloperConnect::V1::AccountConnector>] + # The list of AccountConnectors + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListAccountConnectorsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for getting a AccountConnector + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource + class GetAccountConnectorRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] parent + # @return [::String] + # Required. Location resource name as the account_connector’s parent. + # @!attribute [rw] account_connector_id + # @return [::String] + # Required. The ID to use for the AccountConnector, which will become the + # final component of the AccountConnector's resource name. Its format should + # adhere to https://google.aip.dev/122#resource-id-segments Names must be + # unique per-project per-location. + # @!attribute [rw] account_connector + # @return [::Google::Cloud::DeveloperConnect::V1::AccountConnector] + # Required. The AccountConnector to create. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request, but do not actually post it. + class CreateAccountConnectorRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for updating a AccountConnector + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. The list of fields to be updated. + # @!attribute [rw] account_connector + # @return [::Google::Cloud::DeveloperConnect::V1::AccountConnector] + # Required. The AccountConnector to update. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @!attribute [rw] allow_missing + # @return [::Boolean] + # Optional. If set to true, and the accountConnector is not found a new + # accountConnector will be created. In this situation `update_mask` is + # ignored. The creation will succeed only if the input accountConnector has + # all the necessary + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request, but do not actually post it. + class UpdateAccountConnectorRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for deleting a AccountConnector + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request, but do not actually post it. + # @!attribute [rw] etag + # @return [::String] + # Optional. The current etag of the AccountConnectorn. + # If an etag is provided and does not match the current etag of the + # AccountConnector, deletion will be blocked and an ABORTED error will be + # returned. + # @!attribute [rw] force + # @return [::Boolean] + # Optional. If set to true, any Users from this AccountConnector will also + # be deleted. (Otherwise, the request will only work if the AccountConnector + # has no Users.) + class DeleteAccountConnectorRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for deleting a User + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request, but do not actually post it. + # @!attribute [rw] etag + # @return [::String] + # Optional. This checksum is computed by the server based on the value of + # other fields, and may be sent on update and delete requests to ensure the + # client has an up-to-date value before proceeding. + class DeleteUserRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents the metadata of the long-running operation. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation was created. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation finished running. + # @!attribute [r] target + # @return [::String] + # Output only. Server-defined resource path for the target of the operation. + # @!attribute [r] verb + # @return [::String] + # Output only. Name of the verb executed by the operation. + # @!attribute [r] status_message + # @return [::String] + # Output only. Human-readable status of the operation, if any. + # @!attribute [r] requested_cancellation + # @return [::Boolean] + # Output only. Identifies whether the user has requested cancellation + # of the operation. Operations that have been cancelled successfully + # have + # {::Google::Longrunning::Operation#error google.longrunning.Operation.error} + # value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1, + # corresponding to `Code.CANCELLED`. + # @!attribute [r] api_version + # @return [::String] + # Output only. API version used to start the operation. + class OperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for fetching a User of the user themselves. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the AccountConnector resource + class FetchSelfRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for deleting a User of the user themselves. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the AccountConnector resource + class DeleteSelfRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for fetching an OAuth access token. + # @!attribute [rw] account_connector + # @return [::String] + # Required. The resource name of the AccountConnector in the format + # `projects/*/locations/*/accountConnectors/*`. + class FetchAccessTokenRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for responding to getting an OAuth access token. + # @!attribute [rw] token + # @return [::String] + # The token content. + # @!attribute [rw] expiration_time + # @return [::Google::Protobuf::Timestamp] + # Expiration timestamp. Can be empty if unknown or non-expiring. + # @!attribute [rw] scopes + # @return [::Array<::String>] + # The scopes of the access token. + # @!attribute [rw] exchange_error + # @return [::Google::Cloud::DeveloperConnect::V1::ExchangeError] + # The error resulted from exchanging OAuth tokens from the service provider. + class FetchAccessTokenResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for starting an OAuth flow. + # @!attribute [rw] account_connector + # @return [::String] + # Required. The resource name of the AccountConnector in the format + # `projects/*/locations/*/accountConnectors/*`. + class StartOAuthRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for responding to starting an OAuth flow. + # @!attribute [rw] system_provider_id + # @return [::Google::Cloud::DeveloperConnect::V1::SystemProvider] + # The ID of the system provider. + # @!attribute [rw] ticket + # @return [::String] + # The ticket to be used for post processing the callback from the service + # provider. + # @!attribute [rw] code_challenge + # @return [::String] + # Please refer to https://datatracker.ietf.org/doc/html/rfc7636#section-4.1 + # @!attribute [rw] code_challenge_method + # @return [::String] + # Please refer to https://datatracker.ietf.org/doc/html/rfc7636#section-4.2 + # @!attribute [rw] client_id + # @return [::String] + # The client ID to the OAuth App of the service provider. + # @!attribute [rw] scopes + # @return [::Array<::String>] + # The list of scopes requested by the application. + # @!attribute [rw] auth_uri + # @return [::String] + # The authorization server URL to the OAuth flow of the service provider. + class StartOAuthResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for finishing an OAuth flow. + # @!attribute [rw] oauth_params + # @return [::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest::OAuthParams] + # The params returned by non-Google OAuth 2.0 flow redirect. + # + # Note: The following fields are mutually exclusive: `oauth_params`, `google_oauth_params`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] google_oauth_params + # @return [::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest::GoogleOAuthParams] + # The params returned by Google OAuth flow redirects. + # + # Note: The following fields are mutually exclusive: `google_oauth_params`, `oauth_params`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] account_connector + # @return [::String] + # Required. The resource name of the AccountConnector in the format + # `projects/*/locations/*/accountConnectors/*`. + class FinishOAuthRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The params returned by non-Google OAuth 2.0 flow redirect. + # @!attribute [rw] code + # @return [::String] + # Required. The code to be used for getting the token from SCM provider. + # @!attribute [rw] ticket + # @return [::String] + # Required. The ticket to be used for post processing the callback from SCM + # provider. + class OAuthParams + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The params returned by Google OAuth flow redirects. + # @!attribute [rw] scopes + # @return [::Array<::String>] + # Required. The scopes returned by Google OAuth flow. + # @!attribute [rw] version_info + # @return [::String] + # Optional. The version info returned by Google OAuth flow. + # @!attribute [rw] ticket + # @return [::String] + # Required. The ticket to be used for post processing the callback from + # Google OAuth flow. + class GoogleOAuthParams + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Message for responding to finishing an OAuth flow. + # @!attribute [rw] exchange_error + # @return [::Google::Cloud::DeveloperConnect::V1::ExchangeError] + # The error resulted from exchanging OAuth tokens from the service provider. + class FinishOAuthResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for representing an error from exchanging OAuth tokens. + # @!attribute [rw] code + # @return [::String] + # https://datatracker.ietf.org/doc/html/rfc6749#section-5.2 - error + # @!attribute [rw] description + # @return [::String] + # https://datatracker.ietf.org/doc/html/rfc6749#section-5.2 - + # error_description + class ExchangeError + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message describing the GitRepositoryLink object + # @!attribute [rw] name + # @return [::String] + # Identifier. Resource name of the repository, in the format + # `projects/*/locations/*/connections/*/gitRepositoryLinks/*`. + # @!attribute [rw] clone_uri + # @return [::String] + # Required. Git Clone URI. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. [Output only] Create timestamp + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. [Output only] Update timestamp + # @!attribute [r] delete_time + # @return [::Google::Protobuf::Timestamp] + # Output only. [Output only] Delete timestamp + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Labels as key value pairs + # @!attribute [rw] etag + # @return [::String] + # Optional. This checksum is computed by the server based on the value of + # other fields, and may be sent on update and delete requests to ensure the + # client has an up-to-date value before proceeding. + # @!attribute [r] reconciling + # @return [::Boolean] + # Output only. Set to true when the connection is being set up or updated in + # the background. + # @!attribute [rw] annotations + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Allows clients to store small amounts of arbitrary data. + # @!attribute [r] uid + # @return [::String] + # Output only. A system-assigned unique identifier for the GitRepositoryLink. + # @!attribute [r] webhook_id + # @return [::String] + # Output only. External ID of the webhook created for the repository. + # @!attribute [r] git_proxy_uri + # @return [::String] + # Output only. URI to access the linked repository through the Git Proxy. + # This field is only populated if the git proxy is enabled for the + # connection. + class GitRepositoryLink + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class AnnotationsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Message for creating a GitRepositoryLink + # @!attribute [rw] parent + # @return [::String] + # Required. Value for parent. + # @!attribute [rw] git_repository_link + # @return [::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink] + # Required. The resource being created + # @!attribute [rw] git_repository_link_id + # @return [::String] + # Required. The ID to use for the repository, which will become the final + # component of the repository's resource name. This ID should be unique in + # the connection. Allows alphanumeric characters and any of + # -._~%!$&'()*+,;=@. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request, but do not actually post it. + class CreateGitRepositoryLinkRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for deleting a GitRepositoryLink + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request, but do not actually post it. + # @!attribute [rw] etag + # @return [::String] + # Optional. This checksum is computed by the server based on the value of + # other fields, and may be sent on update and delete requests to ensure the + # client has an up-to-date value before proceeding. + class DeleteGitRepositoryLinkRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for requesting a list of GitRepositoryLinks + # @!attribute [rw] parent + # @return [::String] + # Required. Parent value for ListGitRepositoryLinksRequest + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filtering results + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint for how to order the results + class ListGitRepositoryLinksRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for response to listing GitRepositoryLinks + # @!attribute [rw] git_repository_links + # @return [::Array<::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink>] + # The list of GitRepositoryLinks + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListGitRepositoryLinksResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for getting a GitRepositoryLink + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource + class GetGitRepositoryLinkRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for fetching SCM read/write token. + # @!attribute [rw] git_repository_link + # @return [::String] + # Required. The resource name of the gitRepositoryLink in the format + # `projects/*/locations/*/connections/*/gitRepositoryLinks/*`. + class FetchReadWriteTokenRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for fetching SCM read token. + # @!attribute [rw] git_repository_link + # @return [::String] + # Required. The resource name of the gitRepositoryLink in the format + # `projects/*/locations/*/connections/*/gitRepositoryLinks/*`. + class FetchReadTokenRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for responding to get read token. + # @!attribute [rw] token + # @return [::String] + # The token content. + # @!attribute [rw] expiration_time + # @return [::Google::Protobuf::Timestamp] + # Expiration timestamp. Can be empty if unknown or non-expiring. + # @!attribute [rw] git_username + # @return [::String] + # The git_username to specify when making a git clone with the + # token. For example, for GitHub GitRepositoryLinks, this would be + # "x-access-token" + class FetchReadTokenResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for responding to get read/write token. + # @!attribute [rw] token + # @return [::String] + # The token content. + # @!attribute [rw] expiration_time + # @return [::Google::Protobuf::Timestamp] + # Expiration timestamp. Can be empty if unknown or non-expiring. + # @!attribute [rw] git_username + # @return [::String] + # The git_username to specify when making a git clone with the + # token. For example, for GitHub GitRepositoryLinks, this would be + # "x-access-token" + class FetchReadWriteTokenResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for FetchLinkableGitRepositoriesRequest. + # @!attribute [rw] connection + # @return [::String] + # Required. The name of the Connection. + # Format: `projects/*/locations/*/connections/*`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Number of results to return in the list. Defaults to 20. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Page start. + class FetchLinkableGitRepositoriesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for FetchLinkableGitRepositories. + # @!attribute [rw] linkable_git_repositories + # @return [::Array<::Google::Cloud::DeveloperConnect::V1::LinkableGitRepository>] + # The git repositories that can be linked to the connection. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + class FetchLinkableGitRepositoriesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # LinkableGitRepository represents a git repository that can be linked to a + # connection. + # @!attribute [rw] clone_uri + # @return [::String] + # The clone uri of the repository. + class LinkableGitRepository + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for fetching github installations. + # @!attribute [rw] connection + # @return [::String] + # Required. The resource name of the connection in the format + # `projects/*/locations/*/connections/*`. + class FetchGitHubInstallationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response of fetching github installations. + # @!attribute [rw] installations + # @return [::Array<::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsResponse::Installation>] + # List of installations available to the OAuth user (for github.com) + # or all the installations (for GitHub enterprise). + class FetchGitHubInstallationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents an installation of the GitHub App. + # @!attribute [rw] id + # @return [::Integer] + # ID of the installation in GitHub. + # @!attribute [rw] name + # @return [::String] + # Name of the GitHub user or organization that owns this installation. + # @!attribute [rw] type + # @return [::String] + # Either "user" or "organization". + class Installation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Request for fetching git refs. + # @!attribute [rw] git_repository_link + # @return [::String] + # Required. The resource name of GitRepositoryLink in the format + # `projects/*/locations/*/connections/*/gitRepositoryLinks/*`. + # @!attribute [rw] ref_type + # @return [::Google::Cloud::DeveloperConnect::V1::FetchGitRefsRequest::RefType] + # Required. Type of refs to fetch. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Number of results to return in the list. Default to 20. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Page start. + class FetchGitRefsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Type of refs. + module RefType + # No type specified. + REF_TYPE_UNSPECIFIED = 0 + + # To fetch tags. + TAG = 1 + + # To fetch branches. + BRANCH = 2 + end + end + + # Response for fetching git refs. + # @!attribute [rw] ref_names + # @return [::Array<::String>] + # Name of the refs fetched. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + class FetchGitRefsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # AccountConnector encapsulates what a platform administrator needs to + # configure for users to connect to the service providers, which includes, + # among other fields, the OAuth client ID, client secret, and authorization and + # token endpoints. + # @!attribute [rw] provider_oauth_config + # @return [::Google::Cloud::DeveloperConnect::V1::ProviderOAuthConfig] + # Optional. Provider OAuth config. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the accountConnector, in the format + # `projects/{project}/locations/{location}/accountConnectors/{account_connector_id}`. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the accountConnector was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the accountConnector was updated. + # @!attribute [rw] annotations + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Allows users to store small amounts of arbitrary data. + # @!attribute [rw] etag + # @return [::String] + # Optional. This checksum is computed by the server based on the value of + # other fields, and may be sent on update and delete requests to ensure the + # client has an up-to-date value before proceeding. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Labels as key value pairs + # @!attribute [r] oauth_start_uri + # @return [::String] + # Output only. Start OAuth flow by clicking on this URL. + class AccountConnector + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class AnnotationsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # User represents a user connected to the service providers through + # a AccountConnector. + # @!attribute [rw] name + # @return [::String] + # Identifier. Resource name of the user, in the format + # `projects/*/locations/*/accountConnectors/*/users/*`. + # @!attribute [r] display_name + # @return [::String] + # Output only. Developer Connect automatically converts user identity + # to some human readable description, e.g., email address. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the user was created. + # @!attribute [r] last_token_request_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the token was last requested. + class User + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ProviderOAuthConfig is the OAuth config for a provider. + # @!attribute [rw] system_provider_id + # @return [::Google::Cloud::DeveloperConnect::V1::SystemProvider] + # Optional. Immutable. Developer Connect provided OAuth. + # @!attribute [rw] scopes + # @return [::Array<::String>] + # Required. User selected scopes to apply to the Oauth config + # In the event of changing scopes, user records under AccountConnector will + # be deleted and users will re-auth again. + class ProviderOAuthConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # SystemProvider is a list of providers that are owned by Developer Connect. + module SystemProvider + # No system provider specified. + SYSTEM_PROVIDER_UNSPECIFIED = 0 + + # GitHub provider. + # Scopes can be found at + # https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/scopes-for-oauth-apps#available-scopes + GITHUB = 1 + + # GitLab provider. + # Scopes can be found at + # https://docs.gitlab.com/user/profile/personal_access_tokens/#personal-access-token-scopes + GITLAB = 2 + + # Google provider. + # Recommended scopes: + # "https://www.googleapis.com/auth/drive.readonly", + # "https://www.googleapis.com/auth/documents.readonly" + GOOGLE = 3 + + # Sentry provider. + # Scopes can be found at + # https://docs.sentry.io/api/permissions/ + SENTRY = 4 + + # Rovo provider. + # Must select the "rovo" scope. + ROVO = 5 + + # New Relic provider. + # No scopes are allowed. + NEW_RELIC = 6 + + # Datastax provider. + # No scopes are allowed. + DATASTAX = 7 + + # Dynatrace provider. + DYNATRACE = 8 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/cloud/developerconnect/v1/insights_config.rb b/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/cloud/developerconnect/v1/insights_config.rb new file mode 100644 index 000000000000..7c6832d251af --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/cloud/developerconnect/v1/insights_config.rb @@ -0,0 +1,556 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Developerconnect + module V1 + # The InsightsConfig resource is the core configuration object to capture + # events from your Software Development Lifecycle. It acts as the central hub + # for managing how Developer Connect understands your application, its runtime + # environments, and the artifacts deployed within them. + # @!attribute [rw] app_hub_application + # @return [::String] + # Optional. The name of the App Hub Application. + # Format: + # projects/\\{project}/locations/\\{location}/applications/\\{application} + # + # Note: The following fields are mutually exclusive: `app_hub_application`, `projects`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] projects + # @return [::Google::Cloud::Developerconnect::V1::Projects] + # Optional. The projects to track with the InsightsConfig. + # + # Note: The following fields are mutually exclusive: `projects`, `app_hub_application`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] name + # @return [::String] + # Identifier. The name of the InsightsConfig. + # Format: + # projects/\\{project}/locations/\\{location}/insightsConfigs/\\{insightsConfig} + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Create timestamp. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Update timestamp. + # @!attribute [r] runtime_configs + # @return [::Array<::Google::Cloud::Developerconnect::V1::RuntimeConfig>] + # Output only. The runtime configurations where the application is deployed. + # @!attribute [rw] artifact_configs + # @return [::Array<::Google::Cloud::Developerconnect::V1::ArtifactConfig>] + # Optional. The artifact configurations of the artifacts that are deployed. + # @!attribute [rw] state + # @return [::Google::Cloud::Developerconnect::V1::InsightsConfig::State] + # Optional. Output only. The state of the InsightsConfig. + # @!attribute [rw] annotations + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User specified annotations. See + # https://google.aip.dev/148#annotations for more details such as format and + # size limitations. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Set of labels associated with an InsightsConfig. + # @!attribute [r] reconciling + # @return [::Boolean] + # Output only. Reconciling (https://google.aip.dev/128#reconciliation). + # Set to true if the current state of InsightsConfig does not match the + # user's intended state, and the service is actively updating the resource to + # reconcile them. This can happen due to user-triggered updates or + # system actions like failover or maintenance. + # @!attribute [r] errors + # @return [::Array<::Google::Rpc::Status>] + # Output only. Any errors that occurred while setting up the InsightsConfig. + # Each error will be in the format: `field_name: error_message`, e.g. + # GetAppHubApplication: Permission denied while getting App Hub + # application. Please grant permissions to the P4SA. + class InsightsConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class AnnotationsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The state of the InsightsConfig. + module State + # No state specified. + STATE_UNSPECIFIED = 0 + + # The InsightsConfig is pending application discovery/runtime discovery. + PENDING = 5 + + # The initial discovery process is complete. + COMPLETE = 3 + + # The InsightsConfig is in an error state. + ERROR = 4 + end + end + + # Projects represents the projects to track with the InsightsConfig. + # @!attribute [rw] project_ids + # @return [::Array<::String>] + # Optional. The project IDs. + # Format: \\{project} + class Projects + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # RuntimeConfig represents the runtimes where the application is + # deployed. + # @!attribute [r] gke_workload + # @return [::Google::Cloud::Developerconnect::V1::GKEWorkload] + # Output only. Google Kubernetes Engine runtime. + # + # Note: The following fields are mutually exclusive: `gke_workload`, `google_cloud_run`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] google_cloud_run + # @return [::Google::Cloud::Developerconnect::V1::GoogleCloudRun] + # Output only. Cloud Run runtime. + # + # Note: The following fields are mutually exclusive: `google_cloud_run`, `gke_workload`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] app_hub_workload + # @return [::Google::Cloud::Developerconnect::V1::AppHubWorkload] + # Output only. App Hub Workload. + # + # Note: The following fields are mutually exclusive: `app_hub_workload`, `app_hub_service`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] app_hub_service + # @return [::Google::Cloud::Developerconnect::V1::AppHubService] + # Output only. App Hub Service. + # + # Note: The following fields are mutually exclusive: `app_hub_service`, `app_hub_workload`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] uri + # @return [::String] + # Required. Immutable. The URI of the runtime configuration. + # For GKE, this is the cluster name. + # For Cloud Run, this is the service name. + # @!attribute [r] state + # @return [::Google::Cloud::Developerconnect::V1::RuntimeConfig::State] + # Output only. The state of the Runtime. + class RuntimeConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The state of the runtime in the InsightsConfig. + # Whether the runtime is linked to the InsightsConfig. + module State + # No state specified. + STATE_UNSPECIFIED = 0 + + # The runtime configuration has been linked to the InsightsConfig. + LINKED = 1 + + # The runtime configuration has been unlinked to the InsightsConfig. + UNLINKED = 2 + end + end + + # GKEWorkload represents the Google Kubernetes Engine runtime. + # @!attribute [rw] cluster + # @return [::String] + # Required. Immutable. The name of the GKE cluster. + # Format: + # `projects/{project}/locations/{location}/clusters/{cluster}`. + # @!attribute [r] deployment + # @return [::String] + # Output only. The name of the GKE deployment. + # Format: + # `projects/{project}/locations/{location}/clusters/{cluster}/namespaces/{namespace}/deployments/{deployment}`. + class GKEWorkload + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # GoogleCloudRun represents the Cloud Run runtime. + # @!attribute [rw] service_uri + # @return [::String] + # Required. Immutable. The name of the Cloud Run service. + # Format: + # `projects/{project}/locations/{location}/services/{service}`. + class GoogleCloudRun + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # AppHubWorkload represents the App Hub Workload. + # @!attribute [r] workload + # @return [::String] + # Required. Output only. Immutable. The name of the App Hub Workload. + # Format: + # `projects/{project}/locations/{location}/applications/{application}/workloads/{workload}`. + # @!attribute [r] criticality + # @return [::String] + # Output only. The criticality of the App Hub Workload. + # @!attribute [r] environment + # @return [::String] + # Output only. The environment of the App Hub Workload. + class AppHubWorkload + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # AppHubService represents the App Hub Service. + # @!attribute [r] apphub_service + # @return [::String] + # Required. Output only. Immutable. The name of the App Hub Service. + # Format: + # `projects/{project}/locations/{location}/applications/{application}/services/{service}`. + # @!attribute [r] criticality + # @return [::String] + # Output only. The criticality of the App Hub Service. + # @!attribute [r] environment + # @return [::String] + # Output only. The environment of the App Hub Service. + class AppHubService + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The artifact config of the artifact that is deployed. + # @!attribute [rw] google_artifact_registry + # @return [::Google::Cloud::Developerconnect::V1::GoogleArtifactRegistry] + # Optional. Set if the artifact is stored in Artifact registry. + # @!attribute [rw] google_artifact_analysis + # @return [::Google::Cloud::Developerconnect::V1::GoogleArtifactAnalysis] + # Optional. Set if the artifact metadata is stored in Artifact analysis. + # @!attribute [rw] uri + # @return [::String] + # Required. Immutable. The URI of the artifact that is deployed. + # e.g. `us-docker.pkg.dev/my-project/my-repo/image`. + # The URI does not include the tag / digest because it captures a lineage of + # artifacts. + class ArtifactConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Google Artifact Analysis configurations. + # @!attribute [rw] project_id + # @return [::String] + # Required. The project id of the project where the provenance is stored. + class GoogleArtifactAnalysis + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Google Artifact Registry configurations. + # @!attribute [rw] project_id + # @return [::String] + # Required. The host project of Artifact Registry. + # @!attribute [rw] artifact_registry_package + # @return [::String] + # Required. Immutable. The name of the artifact registry package. + class GoogleArtifactRegistry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The DeploymentEvent resource represents the deployment of the artifact within + # the InsightsConfig resource. + # @!attribute [rw] name + # @return [::String] + # Identifier. The name of the DeploymentEvent. This name is provided by + # Developer Connect insights. Format: + # projects/\\{project}/locations/\\{location}/insightsConfigs/\\{insights_config}/deploymentEvents/\\{uuid} + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The create time of the DeploymentEvent. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The update time of the DeploymentEvent. + # @!attribute [r] runtime_config + # @return [::Google::Cloud::Developerconnect::V1::RuntimeConfig] + # Output only. The runtime configurations where the DeploymentEvent happened. + # @!attribute [r] runtime_deployment_uri + # @return [::String] + # Output only. The runtime assigned URI of the DeploymentEvent. + # For GKE, this is the fully qualified replica set uri. + # e.g. + # container.googleapis.com/projects/\\{project}/locations/\\{location}/clusters/\\{cluster}/k8s/namespaces/\\{namespace}/apps/replicasets/\\{replica-set-id} + # For Cloud Run, this is the revision name. + # @!attribute [r] state + # @return [::Google::Cloud::Developerconnect::V1::DeploymentEvent::State] + # Output only. The state of the DeploymentEvent. + # @!attribute [r] artifact_deployments + # @return [::Array<::Google::Cloud::Developerconnect::V1::ArtifactDeployment>] + # Output only. The artifact deployments of the DeploymentEvent. Each artifact + # deployment contains the artifact uri and the runtime configuration uri. For + # GKE, this would be all the containers images that are deployed in the pod. + # @!attribute [r] deploy_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the DeploymentEvent was deployed. + # This would be the min of all ArtifactDeployment deploy_times. + # @!attribute [r] undeploy_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the DeploymentEvent was undeployed, all + # artifacts are considered undeployed once this time is set. This would be + # the max of all ArtifactDeployment undeploy_times. If any ArtifactDeployment + # is still active (i.e. does not have an undeploy_time), this field will be + # empty. + class DeploymentEvent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The state of the DeploymentEvent. + module State + # No state specified. + STATE_UNSPECIFIED = 0 + + # The deployment is active in the runtime. + STATE_ACTIVE = 1 + + # The deployment is not in the runtime. + STATE_INACTIVE = 2 + end + end + + # Request for getting a DeploymentEvent. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the deployment event to retrieve. + # Format: + # projects/\\{project}/locations/\\{location}/insightsConfigs/\\{insights_config}/deploymentEvents/\\{uuid} + class GetDeploymentEventRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for requesting list of DeploymentEvents. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent insights config that owns this collection of + # deployment events. Format: + # projects/\\{project}/locations/\\{location}/insightsConfigs/\\{insights_config} + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of deployment events to return. The service + # may return fewer than this value. If unspecified, at most 50 deployment + # events will be returned. The maximum value is 1000; values above 1000 will + # be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListDeploymentEvents` + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListDeploymentEvents` + # must match the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter expression that matches a subset of the DeploymentEvents. + # https://google.aip.dev/160. + class ListDeploymentEventsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response to listing DeploymentEvents. + # @!attribute [rw] deployment_events + # @return [::Array<::Google::Cloud::Developerconnect::V1::DeploymentEvent>] + # The list of DeploymentEvents. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListDeploymentEventsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The ArtifactDeployment resource represents the deployment of the artifact + # within the InsightsConfig resource. + # @!attribute [r] id + # @return [::String] + # Output only. Unique identifier of `ArtifactDeployment`. + # @!attribute [r] artifact_reference + # @return [::String] + # Output only. The artifact that is deployed. + # @!attribute [r] artifact_alias + # @return [::String] + # Output only. The artifact alias in the deployment spec, with Tag/SHA. + # e.g. us-docker.pkg.dev/my-project/my-repo/image:1.0.0 + # @!attribute [r] source_commit_uris + # @return [::Array<::String>] + # Output only. The source commits at which this artifact was built. Extracted + # from provenance. + # @!attribute [r] deploy_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the deployment was deployed. + # @!attribute [r] undeploy_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the deployment was undeployed, all artifacts + # are considered undeployed once this time is set. + # @!attribute [r] container_status_summary + # @return [::String] + # Output only. The summary of container status of the artifact deployment. + # Format as `ContainerStatusState-Reason : restartCount` + # e.g. "Waiting-ImagePullBackOff : 3" + class ArtifactDeployment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for creating an InsightsConfig. + # @!attribute [rw] parent + # @return [::String] + # Required. Value for parent. + # @!attribute [rw] insights_config_id + # @return [::String] + # Required. ID of the requesting InsightsConfig. + # @!attribute [rw] insights_config + # @return [::Google::Cloud::Developerconnect::V1::InsightsConfig] + # Required. The resource being created. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request, but do not actually post it. + class CreateInsightsConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for getting an InsightsConfig. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource. + class GetInsightsConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for requesting list of InsightsConfigs. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent value for ListInsightsConfigsRequest. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filtering results. See https://google.aip.dev/160 for more + # details. Filter string, adhering to the rules in + # https://google.aip.dev/160. List only InsightsConfigs matching the filter. + # If filter is empty, all InsightsConfigs are listed. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint for how to order the results. + class ListInsightsConfigsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for response to listing InsightsConfigs. + # @!attribute [rw] insights_configs + # @return [::Array<::Google::Cloud::Developerconnect::V1::InsightsConfig>] + # The list of InsightsConfigs. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListInsightsConfigsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for deleting an InsightsConfig. + # @!attribute [rw] name + # @return [::String] + # Required. Value for parent. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request, but do not actually post it. + # @!attribute [rw] etag + # @return [::String] + # Optional. This checksum is computed by the server based on the value of + # other fields, and may be sent on update and delete requests to ensure the + # client has an up-to-date value before proceeding. + class DeleteInsightsConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for updating an InsightsConfig. + # @!attribute [rw] insights_config + # @return [::Google::Cloud::Developerconnect::V1::InsightsConfig] + # Required. The resource being updated. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @!attribute [rw] allow_missing + # @return [::Boolean] + # Optional. If set to true, and the insightsConfig is not found a new + # insightsConfig will be created. In this situation `update_mask` is ignored. + # The creation will succeed only if the input insightsConfig has all the + # necessary information (e.g a github_config with both user_oauth_token and + # installation_id properties). + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request, but do not actually post it. + class UpdateInsightsConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/longrunning/operations.rb @@ -0,0 +1,191 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Longrunning + # This resource represents a long-running operation that is the result of a + # network API call. + # @!attribute [rw] name + # @return [::String] + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should be a resource name ending with `operations/{unique_id}`. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Any] + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # @!attribute [rw] done + # @return [::Boolean] + # If the value is `false`, it means the operation is still in progress. + # If `true`, the operation is completed, and either `error` or `response` is + # available. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # The error result of the operation in case of failure or cancellation. + # + # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] response + # @return [::Google::Protobuf::Any] + # The normal, successful response of the operation. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # + # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Operation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.GetOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource. + class GetOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.ListOperations. + # @!attribute [rw] name + # @return [::String] + # The name of the operation's parent resource. + # @!attribute [rw] filter + # @return [::String] + # The standard list filter. + # @!attribute [rw] page_size + # @return [::Integer] + # The standard list page size. + # @!attribute [rw] page_token + # @return [::String] + # The standard list page token. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + class ListOperationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for + # Operations.ListOperations. + # @!attribute [rw] operations + # @return [::Array<::Google::Longrunning::Operation>] + # A list of operations that matches the specified filter in the request. + # @!attribute [rw] next_page_token + # @return [::String] + # The standard List next-page token. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unordered list. Unreachable resources. Populated when the request sets + # `ListOperationsRequest.return_partial_success` and reads across + # collections e.g. when attempting to list all resources across all supported + # locations. + class ListOperationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.CancelOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be cancelled. + class CancelOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.DeleteOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be deleted. + class DeleteOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.WaitOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to wait on. + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + class WaitOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message representing the message types used by a long-running operation. + # + # Example: + # + # rpc Export(ExportRequest) returns (google.longrunning.Operation) { + # option (google.longrunning.operation_info) = { + # response_type: "ExportResponse" + # metadata_type: "ExportMetadata" + # }; + # } + # @!attribute [rw] response_type + # @return [::String] + # Required. The message name of the primary return type for this + # long-running operation. + # This type will be used to deserialize the LRO's response. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + # @!attribute [rw] metadata_type + # @return [::String] + # Required. The message name of the metadata type for this long-running + # operation. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + class OperationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Any` contains an arbitrary serialized protocol buffer message along with a + # URL that describes the type of the serialized message. + # + # Protobuf library provides support to pack/unpack Any values in the form + # of utility functions or additional generated methods of the Any type. + # + # Example 1: Pack and unpack a message in C++. + # + # Foo foo = ...; + # Any any; + # any.PackFrom(foo); + # ... + # if (any.UnpackTo(&foo)) { + # ... + # } + # + # Example 2: Pack and unpack a message in Java. + # + # Foo foo = ...; + # Any any = Any.pack(foo); + # ... + # if (any.is(Foo.class)) { + # foo = any.unpack(Foo.class); + # } + # // or ... + # if (any.isSameTypeAs(Foo.getDefaultInstance())) { + # foo = any.unpack(Foo.getDefaultInstance()); + # } + # + # Example 3: Pack and unpack a message in Python. + # + # foo = Foo(...) + # any = Any() + # any.Pack(foo) + # ... + # if any.Is(Foo.DESCRIPTOR): + # any.Unpack(foo) + # ... + # + # Example 4: Pack and unpack a message in Go + # + # foo := &pb.Foo{...} + # any, err := anypb.New(foo) + # if err != nil { + # ... + # } + # ... + # foo := &pb.Foo{} + # if err := any.UnmarshalTo(foo); err != nil { + # ... + # } + # + # The pack methods provided by protobuf library will by default use + # 'type.googleapis.com/full.type.name' as the type URL and the unpack + # methods only use the fully qualified type name after the last '/' + # in the type URL, for example "foo.bar.com/x/y.z" will yield type + # name "y.z". + # + # JSON + # ==== + # The JSON representation of an `Any` value uses the regular + # representation of the deserialized, embedded message, with an + # additional field `@type` which contains the type URL. Example: + # + # package google.profile; + # message Person { + # string first_name = 1; + # string last_name = 2; + # } + # + # { + # "@type": "type.googleapis.com/google.profile.Person", + # "firstName": , + # "lastName": + # } + # + # If the embedded message type is well-known and has a custom JSON + # representation, that representation will be embedded adding a field + # `value` which holds the custom JSON in addition to the `@type` + # field. Example (for message [google.protobuf.Duration][]): + # + # { + # "@type": "type.googleapis.com/google.protobuf.Duration", + # "value": "1.212s" + # } + # @!attribute [rw] type_url + # @return [::String] + # A URL/resource name that uniquely identifies the type of the serialized + # protocol buffer message. This string must contain at least + # one "/" character. The last segment of the URL's path must represent + # the fully qualified name of the type (as in + # `path/google.protobuf.Duration`). The name should be in a canonical form + # (e.g., leading "." is not accepted). + # + # In practice, teams usually precompile into the binary all types that they + # expect it to use in the context of Any. However, for URLs which use the + # scheme `http`, `https`, or no scheme, one can optionally set up a type + # server that maps type URLs to message definitions as follows: + # + # * If no scheme is provided, `https` is assumed. + # * An HTTP GET on the URL must yield a [google.protobuf.Type][] + # value in binary format, or produce an error. + # * Applications are allowed to cache lookup results based on the + # URL, or have them precompiled into a binary to avoid any + # lookup. Therefore, binary compatibility needs to be preserved + # on changes to types. (Use versioned type names to manage + # breaking changes.) + # + # Note: this functionality is not currently available in the official + # protobuf release, and it is not used for type URLs beginning with + # type.googleapis.com. As of May 2023, there are no widely used type server + # implementations and no plans to implement one. + # + # Schemes other than `http`, `https` (or the empty scheme) might be + # used with implementation specific semantics. + # @!attribute [rw] value + # @return [::String] + # Must be a valid serialized protocol buffer of the above specified type. + class Any + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `FieldMask` represents a set of symbolic field paths, for example: + # + # paths: "f.a" + # paths: "f.b.d" + # + # Here `f` represents a field in some root message, `a` and `b` + # fields in the message found in `f`, and `d` a field found in the + # message in `f.b`. + # + # Field masks are used to specify a subset of fields that should be + # returned by a get operation or modified by an update operation. + # Field masks also have a custom JSON encoding (see below). + # + # # Field Masks in Projections + # + # When used in the context of a projection, a response message or + # sub-message is filtered by the API to only contain those fields as + # specified in the mask. For example, if the mask in the previous + # example is applied to a response message as follows: + # + # f { + # a : 22 + # b { + # d : 1 + # x : 2 + # } + # y : 13 + # } + # z: 8 + # + # The result will not contain specific values for fields x,y and z + # (their value will be set to the default, and omitted in proto text + # output): + # + # + # f { + # a : 22 + # b { + # d : 1 + # } + # } + # + # A repeated field is not allowed except at the last position of a + # paths string. + # + # If a FieldMask object is not present in a get operation, the + # operation applies to all fields (as if a FieldMask of all fields + # had been specified). + # + # Note that a field mask does not necessarily apply to the + # top-level response message. In case of a REST get operation, the + # field mask applies directly to the response, but in case of a REST + # list operation, the mask instead applies to each individual message + # in the returned resource list. In case of a REST custom method, + # other definitions may be used. Where the mask applies will be + # clearly documented together with its declaration in the API. In + # any case, the effect on the returned resource/resources is required + # behavior for APIs. + # + # # Field Masks in Update Operations + # + # A field mask in update operations specifies which fields of the + # targeted resource are going to be updated. The API is required + # to only change the values of the fields as specified in the mask + # and leave the others untouched. If a resource is passed in to + # describe the updated values, the API ignores the values of all + # fields not covered by the mask. + # + # If a repeated field is specified for an update operation, new values will + # be appended to the existing repeated field in the target resource. Note that + # a repeated field is only allowed in the last position of a `paths` string. + # + # If a sub-message is specified in the last position of the field mask for an + # update operation, then new value will be merged into the existing sub-message + # in the target resource. + # + # For example, given the target message: + # + # f { + # b { + # d: 1 + # x: 2 + # } + # c: [1] + # } + # + # And an update message: + # + # f { + # b { + # d: 10 + # } + # c: [2] + # } + # + # then if the field mask is: + # + # paths: ["f.b", "f.c"] + # + # then the result will be: + # + # f { + # b { + # d: 10 + # x: 2 + # } + # c: [1, 2] + # } + # + # An implementation may provide options to override this default behavior for + # repeated and message fields. + # + # In order to reset a field's value to the default, the field must + # be in the mask and set to the default value in the provided resource. + # Hence, in order to reset all fields of a resource, provide a default + # instance of the resource and set all fields in the mask, or do + # not provide a mask as described below. + # + # If a field mask is not present on update, the operation applies to + # all fields (as if a field mask of all fields has been specified). + # Note that in the presence of schema evolution, this may mean that + # fields the client does not know and has therefore not filled into + # the request will be reset to their default. If this is unwanted + # behavior, a specific service may require a client to always specify + # a field mask, producing an error if not. + # + # As with get operations, the location of the resource which + # describes the updated values in the request message depends on the + # operation kind. In any case, the effect of the field mask is + # required to be honored by the API. + # + # ## Considerations for HTTP REST + # + # The HTTP kind of an update operation which uses a field mask must + # be set to PATCH instead of PUT in order to satisfy HTTP semantics + # (PUT must only be used for full updates). + # + # # JSON Encoding of Field Masks + # + # In JSON, a field mask is encoded as a single string where paths are + # separated by a comma. Fields name in each path are converted + # to/from lower-camel naming conventions. + # + # As an example, consider the following message declarations: + # + # message Profile { + # User user = 1; + # Photo photo = 2; + # } + # message User { + # string display_name = 1; + # string address = 2; + # } + # + # In proto a field mask for `Profile` may look as such: + # + # mask { + # paths: "user.display_name" + # paths: "photo" + # } + # + # In JSON, the same mask is represented as below: + # + # { + # mask: "user.displayName,photo" + # } + # + # # Field Masks and Oneof Fields + # + # Field masks treat fields in oneofs just as regular fields. Consider the + # following message: + # + # message SampleMessage { + # oneof test_oneof { + # string name = 4; + # SubMessage sub_message = 9; + # } + # } + # + # The field mask can be: + # + # mask { + # paths: "name" + # } + # + # Or: + # + # mask { + # paths: "sub_message" + # } + # + # Note that oneof type names ("test_oneof" in this case) cannot be used in + # paths. + # + # ## Field Mask Verification + # + # The implementation of any API method which has a FieldMask type field in the + # request should verify the included field paths, and return an + # `INVALID_ARGUMENT` error if any path is unmappable. + # @!attribute [rw] paths + # @return [::Array<::String>] + # The set of field mask paths. + class FieldMask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch + # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + # 9999-12-31T23:59:59Z inclusive. + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. Negative + # second values with fractions must still have non-negative nanos values + # that count forward in time. Must be from 0 to 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/rpc/status.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Rpc + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # @!attribute [rw] code + # @return [::Integer] + # The status code, which should be an enum value of + # [google.rpc.Code][google.rpc.Code]. + # @!attribute [rw] message + # @return [::String] + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized + # by the client. + # @!attribute [rw] details + # @return [::Array<::Google::Protobuf::Any>] + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + class Status + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/Gemfile new file mode 100644 index 000000000000..eb5fff38872e --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-developer_connect-v1", path: "../" +else + gem "google-cloud-developer_connect-v1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/create_account_connector.rb b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/create_account_connector.rb new file mode 100644 index 000000000000..574ffbb423ee --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/create_account_connector.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START developerconnect_v1_generated_DeveloperConnect_CreateAccountConnector_sync] +require "google/cloud/developer_connect/v1" + +## +# Snippet for the create_account_connector call in the DeveloperConnect service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#create_account_connector. +# +def create_account_connector + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::DeveloperConnect::V1::CreateAccountConnectorRequest.new + + # Call the create_account_connector method. + result = client.create_account_connector request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END developerconnect_v1_generated_DeveloperConnect_CreateAccountConnector_sync] diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/create_connection.rb b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/create_connection.rb new file mode 100644 index 000000000000..624d34eb001f --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/create_connection.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START developerconnect_v1_generated_DeveloperConnect_CreateConnection_sync] +require "google/cloud/developer_connect/v1" + +## +# Snippet for the create_connection call in the DeveloperConnect service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#create_connection. +# +def create_connection + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::DeveloperConnect::V1::CreateConnectionRequest.new + + # Call the create_connection method. + result = client.create_connection request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END developerconnect_v1_generated_DeveloperConnect_CreateConnection_sync] diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/create_git_repository_link.rb b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/create_git_repository_link.rb new file mode 100644 index 000000000000..c882c96118eb --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/create_git_repository_link.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START developerconnect_v1_generated_DeveloperConnect_CreateGitRepositoryLink_sync] +require "google/cloud/developer_connect/v1" + +## +# Snippet for the create_git_repository_link call in the DeveloperConnect service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#create_git_repository_link. +# +def create_git_repository_link + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::DeveloperConnect::V1::CreateGitRepositoryLinkRequest.new + + # Call the create_git_repository_link method. + result = client.create_git_repository_link request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END developerconnect_v1_generated_DeveloperConnect_CreateGitRepositoryLink_sync] diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/delete_account_connector.rb b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/delete_account_connector.rb new file mode 100644 index 000000000000..4129f3c192c3 --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/delete_account_connector.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START developerconnect_v1_generated_DeveloperConnect_DeleteAccountConnector_sync] +require "google/cloud/developer_connect/v1" + +## +# Snippet for the delete_account_connector call in the DeveloperConnect service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#delete_account_connector. +# +def delete_account_connector + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::DeveloperConnect::V1::DeleteAccountConnectorRequest.new + + # Call the delete_account_connector method. + result = client.delete_account_connector request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END developerconnect_v1_generated_DeveloperConnect_DeleteAccountConnector_sync] diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/delete_connection.rb b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/delete_connection.rb new file mode 100644 index 000000000000..49e916dfb85f --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/delete_connection.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START developerconnect_v1_generated_DeveloperConnect_DeleteConnection_sync] +require "google/cloud/developer_connect/v1" + +## +# Snippet for the delete_connection call in the DeveloperConnect service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#delete_connection. +# +def delete_connection + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::DeveloperConnect::V1::DeleteConnectionRequest.new + + # Call the delete_connection method. + result = client.delete_connection request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END developerconnect_v1_generated_DeveloperConnect_DeleteConnection_sync] diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/delete_git_repository_link.rb b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/delete_git_repository_link.rb new file mode 100644 index 000000000000..28957ca283d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/delete_git_repository_link.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START developerconnect_v1_generated_DeveloperConnect_DeleteGitRepositoryLink_sync] +require "google/cloud/developer_connect/v1" + +## +# Snippet for the delete_git_repository_link call in the DeveloperConnect service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#delete_git_repository_link. +# +def delete_git_repository_link + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::DeveloperConnect::V1::DeleteGitRepositoryLinkRequest.new + + # Call the delete_git_repository_link method. + result = client.delete_git_repository_link request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END developerconnect_v1_generated_DeveloperConnect_DeleteGitRepositoryLink_sync] diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/delete_self.rb b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/delete_self.rb new file mode 100644 index 000000000000..8cd2d6696c22 --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/delete_self.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START developerconnect_v1_generated_DeveloperConnect_DeleteSelf_sync] +require "google/cloud/developer_connect/v1" + +## +# Snippet for the delete_self call in the DeveloperConnect service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#delete_self. +# +def delete_self + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::DeveloperConnect::V1::DeleteSelfRequest.new + + # Call the delete_self method. + result = client.delete_self request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END developerconnect_v1_generated_DeveloperConnect_DeleteSelf_sync] diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/delete_user.rb b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/delete_user.rb new file mode 100644 index 000000000000..274546104716 --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/delete_user.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START developerconnect_v1_generated_DeveloperConnect_DeleteUser_sync] +require "google/cloud/developer_connect/v1" + +## +# Snippet for the delete_user call in the DeveloperConnect service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#delete_user. +# +def delete_user + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::DeveloperConnect::V1::DeleteUserRequest.new + + # Call the delete_user method. + result = client.delete_user request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END developerconnect_v1_generated_DeveloperConnect_DeleteUser_sync] diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/fetch_access_token.rb b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/fetch_access_token.rb new file mode 100644 index 000000000000..33966d9486aa --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/fetch_access_token.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START developerconnect_v1_generated_DeveloperConnect_FetchAccessToken_sync] +require "google/cloud/developer_connect/v1" + +## +# Snippet for the fetch_access_token call in the DeveloperConnect service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#fetch_access_token. +# +def fetch_access_token + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::DeveloperConnect::V1::FetchAccessTokenRequest.new + + # Call the fetch_access_token method. + result = client.fetch_access_token request + + # The returned object is of type Google::Cloud::DeveloperConnect::V1::FetchAccessTokenResponse. + p result +end +# [END developerconnect_v1_generated_DeveloperConnect_FetchAccessToken_sync] diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/fetch_git_hub_installations.rb b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/fetch_git_hub_installations.rb new file mode 100644 index 000000000000..0d1635747699 --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/fetch_git_hub_installations.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START developerconnect_v1_generated_DeveloperConnect_FetchGitHubInstallations_sync] +require "google/cloud/developer_connect/v1" + +## +# Snippet for the fetch_git_hub_installations call in the DeveloperConnect service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#fetch_git_hub_installations. +# +def fetch_git_hub_installations + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsRequest.new + + # Call the fetch_git_hub_installations method. + result = client.fetch_git_hub_installations request + + # The returned object is of type Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsResponse. + p result +end +# [END developerconnect_v1_generated_DeveloperConnect_FetchGitHubInstallations_sync] diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/fetch_git_refs.rb b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/fetch_git_refs.rb new file mode 100644 index 000000000000..94bfcdd36ebd --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/fetch_git_refs.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START developerconnect_v1_generated_DeveloperConnect_FetchGitRefs_sync] +require "google/cloud/developer_connect/v1" + +## +# Snippet for the fetch_git_refs call in the DeveloperConnect service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#fetch_git_refs. +# +def fetch_git_refs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::DeveloperConnect::V1::FetchGitRefsRequest.new + + # Call the fetch_git_refs method. + result = client.fetch_git_refs request + + # The returned object is of type Google::Cloud::DeveloperConnect::V1::FetchGitRefsResponse. + p result +end +# [END developerconnect_v1_generated_DeveloperConnect_FetchGitRefs_sync] diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/fetch_linkable_git_repositories.rb b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/fetch_linkable_git_repositories.rb new file mode 100644 index 000000000000..66640e9a75b1 --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/fetch_linkable_git_repositories.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START developerconnect_v1_generated_DeveloperConnect_FetchLinkableGitRepositories_sync] +require "google/cloud/developer_connect/v1" + +## +# Snippet for the fetch_linkable_git_repositories call in the DeveloperConnect service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#fetch_linkable_git_repositories. +# +def fetch_linkable_git_repositories + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::DeveloperConnect::V1::FetchLinkableGitRepositoriesRequest.new + + # Call the fetch_linkable_git_repositories method. + result = client.fetch_linkable_git_repositories request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::DeveloperConnect::V1::LinkableGitRepository. + p item + end +end +# [END developerconnect_v1_generated_DeveloperConnect_FetchLinkableGitRepositories_sync] diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/fetch_read_token.rb b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/fetch_read_token.rb new file mode 100644 index 000000000000..294dd5edeba7 --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/fetch_read_token.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START developerconnect_v1_generated_DeveloperConnect_FetchReadToken_sync] +require "google/cloud/developer_connect/v1" + +## +# Snippet for the fetch_read_token call in the DeveloperConnect service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#fetch_read_token. +# +def fetch_read_token + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::DeveloperConnect::V1::FetchReadTokenRequest.new + + # Call the fetch_read_token method. + result = client.fetch_read_token request + + # The returned object is of type Google::Cloud::DeveloperConnect::V1::FetchReadTokenResponse. + p result +end +# [END developerconnect_v1_generated_DeveloperConnect_FetchReadToken_sync] diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/fetch_read_write_token.rb b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/fetch_read_write_token.rb new file mode 100644 index 000000000000..c6def00afe4e --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/fetch_read_write_token.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START developerconnect_v1_generated_DeveloperConnect_FetchReadWriteToken_sync] +require "google/cloud/developer_connect/v1" + +## +# Snippet for the fetch_read_write_token call in the DeveloperConnect service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#fetch_read_write_token. +# +def fetch_read_write_token + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenRequest.new + + # Call the fetch_read_write_token method. + result = client.fetch_read_write_token request + + # The returned object is of type Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenResponse. + p result +end +# [END developerconnect_v1_generated_DeveloperConnect_FetchReadWriteToken_sync] diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/fetch_self.rb b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/fetch_self.rb new file mode 100644 index 000000000000..893ef898186a --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/fetch_self.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START developerconnect_v1_generated_DeveloperConnect_FetchSelf_sync] +require "google/cloud/developer_connect/v1" + +## +# Snippet for the fetch_self call in the DeveloperConnect service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#fetch_self. +# +def fetch_self + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::DeveloperConnect::V1::FetchSelfRequest.new + + # Call the fetch_self method. + result = client.fetch_self request + + # The returned object is of type Google::Cloud::DeveloperConnect::V1::User. + p result +end +# [END developerconnect_v1_generated_DeveloperConnect_FetchSelf_sync] diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/finish_o_auth.rb b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/finish_o_auth.rb new file mode 100644 index 000000000000..3c616f2538c5 --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/finish_o_auth.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START developerconnect_v1_generated_DeveloperConnect_FinishOAuth_sync] +require "google/cloud/developer_connect/v1" + +## +# Snippet for the finish_o_auth call in the DeveloperConnect service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#finish_o_auth. +# +def finish_o_auth + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest.new + + # Call the finish_o_auth method. + result = client.finish_o_auth request + + # The returned object is of type Google::Cloud::DeveloperConnect::V1::FinishOAuthResponse. + p result +end +# [END developerconnect_v1_generated_DeveloperConnect_FinishOAuth_sync] diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/get_account_connector.rb b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/get_account_connector.rb new file mode 100644 index 000000000000..d2b532b984eb --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/get_account_connector.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START developerconnect_v1_generated_DeveloperConnect_GetAccountConnector_sync] +require "google/cloud/developer_connect/v1" + +## +# Snippet for the get_account_connector call in the DeveloperConnect service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#get_account_connector. +# +def get_account_connector + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::DeveloperConnect::V1::GetAccountConnectorRequest.new + + # Call the get_account_connector method. + result = client.get_account_connector request + + # The returned object is of type Google::Cloud::DeveloperConnect::V1::AccountConnector. + p result +end +# [END developerconnect_v1_generated_DeveloperConnect_GetAccountConnector_sync] diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/get_connection.rb b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/get_connection.rb new file mode 100644 index 000000000000..bd3c5a7876b9 --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/get_connection.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START developerconnect_v1_generated_DeveloperConnect_GetConnection_sync] +require "google/cloud/developer_connect/v1" + +## +# Snippet for the get_connection call in the DeveloperConnect service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#get_connection. +# +def get_connection + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::DeveloperConnect::V1::GetConnectionRequest.new + + # Call the get_connection method. + result = client.get_connection request + + # The returned object is of type Google::Cloud::DeveloperConnect::V1::Connection. + p result +end +# [END developerconnect_v1_generated_DeveloperConnect_GetConnection_sync] diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/get_git_repository_link.rb b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/get_git_repository_link.rb new file mode 100644 index 000000000000..6f258d5bd384 --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/get_git_repository_link.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START developerconnect_v1_generated_DeveloperConnect_GetGitRepositoryLink_sync] +require "google/cloud/developer_connect/v1" + +## +# Snippet for the get_git_repository_link call in the DeveloperConnect service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#get_git_repository_link. +# +def get_git_repository_link + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::DeveloperConnect::V1::GetGitRepositoryLinkRequest.new + + # Call the get_git_repository_link method. + result = client.get_git_repository_link request + + # The returned object is of type Google::Cloud::DeveloperConnect::V1::GitRepositoryLink. + p result +end +# [END developerconnect_v1_generated_DeveloperConnect_GetGitRepositoryLink_sync] diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/list_account_connectors.rb b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/list_account_connectors.rb new file mode 100644 index 000000000000..5b3509dd1a19 --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/list_account_connectors.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START developerconnect_v1_generated_DeveloperConnect_ListAccountConnectors_sync] +require "google/cloud/developer_connect/v1" + +## +# Snippet for the list_account_connectors call in the DeveloperConnect service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#list_account_connectors. +# +def list_account_connectors + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsRequest.new + + # Call the list_account_connectors method. + result = client.list_account_connectors request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::DeveloperConnect::V1::AccountConnector. + p item + end +end +# [END developerconnect_v1_generated_DeveloperConnect_ListAccountConnectors_sync] diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/list_connections.rb b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/list_connections.rb new file mode 100644 index 000000000000..5125df97f8ea --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/list_connections.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START developerconnect_v1_generated_DeveloperConnect_ListConnections_sync] +require "google/cloud/developer_connect/v1" + +## +# Snippet for the list_connections call in the DeveloperConnect service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#list_connections. +# +def list_connections + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::DeveloperConnect::V1::ListConnectionsRequest.new + + # Call the list_connections method. + result = client.list_connections request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::DeveloperConnect::V1::Connection. + p item + end +end +# [END developerconnect_v1_generated_DeveloperConnect_ListConnections_sync] diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/list_git_repository_links.rb b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/list_git_repository_links.rb new file mode 100644 index 000000000000..4e5046791fe2 --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/list_git_repository_links.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START developerconnect_v1_generated_DeveloperConnect_ListGitRepositoryLinks_sync] +require "google/cloud/developer_connect/v1" + +## +# Snippet for the list_git_repository_links call in the DeveloperConnect service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#list_git_repository_links. +# +def list_git_repository_links + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::DeveloperConnect::V1::ListGitRepositoryLinksRequest.new + + # Call the list_git_repository_links method. + result = client.list_git_repository_links request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink. + p item + end +end +# [END developerconnect_v1_generated_DeveloperConnect_ListGitRepositoryLinks_sync] diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/list_users.rb b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/list_users.rb new file mode 100644 index 000000000000..a9e288da2693 --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/list_users.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START developerconnect_v1_generated_DeveloperConnect_ListUsers_sync] +require "google/cloud/developer_connect/v1" + +## +# Snippet for the list_users call in the DeveloperConnect service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#list_users. +# +def list_users + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::DeveloperConnect::V1::ListUsersRequest.new + + # Call the list_users method. + result = client.list_users request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::DeveloperConnect::V1::User. + p item + end +end +# [END developerconnect_v1_generated_DeveloperConnect_ListUsers_sync] diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/start_o_auth.rb b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/start_o_auth.rb new file mode 100644 index 000000000000..d45766a5b6fc --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/start_o_auth.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START developerconnect_v1_generated_DeveloperConnect_StartOAuth_sync] +require "google/cloud/developer_connect/v1" + +## +# Snippet for the start_o_auth call in the DeveloperConnect service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#start_o_auth. +# +def start_o_auth + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::DeveloperConnect::V1::StartOAuthRequest.new + + # Call the start_o_auth method. + result = client.start_o_auth request + + # The returned object is of type Google::Cloud::DeveloperConnect::V1::StartOAuthResponse. + p result +end +# [END developerconnect_v1_generated_DeveloperConnect_StartOAuth_sync] diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/update_account_connector.rb b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/update_account_connector.rb new file mode 100644 index 000000000000..75d6640c663d --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/update_account_connector.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START developerconnect_v1_generated_DeveloperConnect_UpdateAccountConnector_sync] +require "google/cloud/developer_connect/v1" + +## +# Snippet for the update_account_connector call in the DeveloperConnect service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#update_account_connector. +# +def update_account_connector + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::DeveloperConnect::V1::UpdateAccountConnectorRequest.new + + # Call the update_account_connector method. + result = client.update_account_connector request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END developerconnect_v1_generated_DeveloperConnect_UpdateAccountConnector_sync] diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/update_connection.rb b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/update_connection.rb new file mode 100644 index 000000000000..dadc6d150627 --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/update_connection.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START developerconnect_v1_generated_DeveloperConnect_UpdateConnection_sync] +require "google/cloud/developer_connect/v1" + +## +# Snippet for the update_connection call in the DeveloperConnect service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#update_connection. +# +def update_connection + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::DeveloperConnect::V1::UpdateConnectionRequest.new + + # Call the update_connection method. + result = client.update_connection request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END developerconnect_v1_generated_DeveloperConnect_UpdateConnection_sync] diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/insights_config_service/create_insights_config.rb b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/insights_config_service/create_insights_config.rb new file mode 100644 index 000000000000..c4114015b48d --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/insights_config_service/create_insights_config.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START developerconnect_v1_generated_InsightsConfigService_CreateInsightsConfig_sync] +require "google/cloud/developer_connect/v1" + +## +# Snippet for the create_insights_config call in the InsightsConfigService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Developerconnect::V1::InsightsConfigService::Client#create_insights_config. +# +def create_insights_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Developerconnect::V1::CreateInsightsConfigRequest.new + + # Call the create_insights_config method. + result = client.create_insights_config request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END developerconnect_v1_generated_InsightsConfigService_CreateInsightsConfig_sync] diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/insights_config_service/delete_insights_config.rb b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/insights_config_service/delete_insights_config.rb new file mode 100644 index 000000000000..8a0899806409 --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/insights_config_service/delete_insights_config.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START developerconnect_v1_generated_InsightsConfigService_DeleteInsightsConfig_sync] +require "google/cloud/developer_connect/v1" + +## +# Snippet for the delete_insights_config call in the InsightsConfigService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Developerconnect::V1::InsightsConfigService::Client#delete_insights_config. +# +def delete_insights_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Developerconnect::V1::DeleteInsightsConfigRequest.new + + # Call the delete_insights_config method. + result = client.delete_insights_config request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END developerconnect_v1_generated_InsightsConfigService_DeleteInsightsConfig_sync] diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/insights_config_service/get_deployment_event.rb b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/insights_config_service/get_deployment_event.rb new file mode 100644 index 000000000000..2bc65055e42c --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/insights_config_service/get_deployment_event.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START developerconnect_v1_generated_InsightsConfigService_GetDeploymentEvent_sync] +require "google/cloud/developer_connect/v1" + +## +# Snippet for the get_deployment_event call in the InsightsConfigService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Developerconnect::V1::InsightsConfigService::Client#get_deployment_event. +# +def get_deployment_event + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Developerconnect::V1::GetDeploymentEventRequest.new + + # Call the get_deployment_event method. + result = client.get_deployment_event request + + # The returned object is of type Google::Cloud::Developerconnect::V1::DeploymentEvent. + p result +end +# [END developerconnect_v1_generated_InsightsConfigService_GetDeploymentEvent_sync] diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/insights_config_service/get_insights_config.rb b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/insights_config_service/get_insights_config.rb new file mode 100644 index 000000000000..021d656a7190 --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/insights_config_service/get_insights_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START developerconnect_v1_generated_InsightsConfigService_GetInsightsConfig_sync] +require "google/cloud/developer_connect/v1" + +## +# Snippet for the get_insights_config call in the InsightsConfigService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Developerconnect::V1::InsightsConfigService::Client#get_insights_config. +# +def get_insights_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Developerconnect::V1::GetInsightsConfigRequest.new + + # Call the get_insights_config method. + result = client.get_insights_config request + + # The returned object is of type Google::Cloud::Developerconnect::V1::InsightsConfig. + p result +end +# [END developerconnect_v1_generated_InsightsConfigService_GetInsightsConfig_sync] diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/insights_config_service/list_deployment_events.rb b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/insights_config_service/list_deployment_events.rb new file mode 100644 index 000000000000..6418f23f9b86 --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/insights_config_service/list_deployment_events.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START developerconnect_v1_generated_InsightsConfigService_ListDeploymentEvents_sync] +require "google/cloud/developer_connect/v1" + +## +# Snippet for the list_deployment_events call in the InsightsConfigService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Developerconnect::V1::InsightsConfigService::Client#list_deployment_events. +# +def list_deployment_events + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Developerconnect::V1::ListDeploymentEventsRequest.new + + # Call the list_deployment_events method. + result = client.list_deployment_events request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Developerconnect::V1::DeploymentEvent. + p item + end +end +# [END developerconnect_v1_generated_InsightsConfigService_ListDeploymentEvents_sync] diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/insights_config_service/list_insights_configs.rb b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/insights_config_service/list_insights_configs.rb new file mode 100644 index 000000000000..504560fe4d7d --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/insights_config_service/list_insights_configs.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START developerconnect_v1_generated_InsightsConfigService_ListInsightsConfigs_sync] +require "google/cloud/developer_connect/v1" + +## +# Snippet for the list_insights_configs call in the InsightsConfigService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Developerconnect::V1::InsightsConfigService::Client#list_insights_configs. +# +def list_insights_configs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Developerconnect::V1::ListInsightsConfigsRequest.new + + # Call the list_insights_configs method. + result = client.list_insights_configs request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Developerconnect::V1::InsightsConfig. + p item + end +end +# [END developerconnect_v1_generated_InsightsConfigService_ListInsightsConfigs_sync] diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/insights_config_service/update_insights_config.rb b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/insights_config_service/update_insights_config.rb new file mode 100644 index 000000000000..6f48df4eba2c --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/insights_config_service/update_insights_config.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START developerconnect_v1_generated_InsightsConfigService_UpdateInsightsConfig_sync] +require "google/cloud/developer_connect/v1" + +## +# Snippet for the update_insights_config call in the InsightsConfigService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Developerconnect::V1::InsightsConfigService::Client#update_insights_config. +# +def update_insights_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Developerconnect::V1::UpdateInsightsConfigRequest.new + + # Call the update_insights_config method. + result = client.update_insights_config request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END developerconnect_v1_generated_InsightsConfigService_UpdateInsightsConfig_sync] diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/snippet_metadata_google.cloud.developerconnect.v1.json b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/snippet_metadata_google.cloud.developerconnect.v1.json new file mode 100644 index 000000000000..9cb1ca02d8ec --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/snippet_metadata_google.cloud.developerconnect.v1.json @@ -0,0 +1,1335 @@ +{ + "client_library": { + "name": "google-cloud-developer_connect-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.developerconnect.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "developerconnect_v1_generated_DeveloperConnect_ListConnections_sync", + "title": "Snippet for the list_connections call in the DeveloperConnect service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#list_connections.", + "file": "developer_connect/list_connections.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_connections", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#list_connections", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DeveloperConnect::V1::ListConnectionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::DeveloperConnect::V1::ListConnectionsResponse", + "client": { + "short_name": "DeveloperConnect::Client", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" + }, + "method": { + "short_name": "ListConnections", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.ListConnections", + "service": { + "short_name": "DeveloperConnect", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "developerconnect_v1_generated_DeveloperConnect_GetConnection_sync", + "title": "Snippet for the get_connection call in the DeveloperConnect service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#get_connection.", + "file": "developer_connect/get_connection.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_connection", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#get_connection", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DeveloperConnect::V1::GetConnectionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::DeveloperConnect::V1::Connection", + "client": { + "short_name": "DeveloperConnect::Client", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" + }, + "method": { + "short_name": "GetConnection", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.GetConnection", + "service": { + "short_name": "DeveloperConnect", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "developerconnect_v1_generated_DeveloperConnect_CreateConnection_sync", + "title": "Snippet for the create_connection call in the DeveloperConnect service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#create_connection.", + "file": "developer_connect/create_connection.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_connection", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#create_connection", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DeveloperConnect::V1::CreateConnectionRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DeveloperConnect::Client", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" + }, + "method": { + "short_name": "CreateConnection", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.CreateConnection", + "service": { + "short_name": "DeveloperConnect", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "developerconnect_v1_generated_DeveloperConnect_UpdateConnection_sync", + "title": "Snippet for the update_connection call in the DeveloperConnect service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#update_connection.", + "file": "developer_connect/update_connection.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_connection", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#update_connection", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DeveloperConnect::V1::UpdateConnectionRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DeveloperConnect::Client", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" + }, + "method": { + "short_name": "UpdateConnection", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.UpdateConnection", + "service": { + "short_name": "DeveloperConnect", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "developerconnect_v1_generated_DeveloperConnect_DeleteConnection_sync", + "title": "Snippet for the delete_connection call in the DeveloperConnect service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#delete_connection.", + "file": "developer_connect/delete_connection.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_connection", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#delete_connection", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DeveloperConnect::V1::DeleteConnectionRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DeveloperConnect::Client", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" + }, + "method": { + "short_name": "DeleteConnection", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.DeleteConnection", + "service": { + "short_name": "DeveloperConnect", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "developerconnect_v1_generated_DeveloperConnect_CreateGitRepositoryLink_sync", + "title": "Snippet for the create_git_repository_link call in the DeveloperConnect service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#create_git_repository_link.", + "file": "developer_connect/create_git_repository_link.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_git_repository_link", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#create_git_repository_link", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DeveloperConnect::V1::CreateGitRepositoryLinkRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DeveloperConnect::Client", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" + }, + "method": { + "short_name": "CreateGitRepositoryLink", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.CreateGitRepositoryLink", + "service": { + "short_name": "DeveloperConnect", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "developerconnect_v1_generated_DeveloperConnect_DeleteGitRepositoryLink_sync", + "title": "Snippet for the delete_git_repository_link call in the DeveloperConnect service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#delete_git_repository_link.", + "file": "developer_connect/delete_git_repository_link.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_git_repository_link", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#delete_git_repository_link", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DeveloperConnect::V1::DeleteGitRepositoryLinkRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DeveloperConnect::Client", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" + }, + "method": { + "short_name": "DeleteGitRepositoryLink", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.DeleteGitRepositoryLink", + "service": { + "short_name": "DeveloperConnect", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "developerconnect_v1_generated_DeveloperConnect_ListGitRepositoryLinks_sync", + "title": "Snippet for the list_git_repository_links call in the DeveloperConnect service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#list_git_repository_links.", + "file": "developer_connect/list_git_repository_links.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_git_repository_links", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#list_git_repository_links", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DeveloperConnect::V1::ListGitRepositoryLinksRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::DeveloperConnect::V1::ListGitRepositoryLinksResponse", + "client": { + "short_name": "DeveloperConnect::Client", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" + }, + "method": { + "short_name": "ListGitRepositoryLinks", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.ListGitRepositoryLinks", + "service": { + "short_name": "DeveloperConnect", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "developerconnect_v1_generated_DeveloperConnect_GetGitRepositoryLink_sync", + "title": "Snippet for the get_git_repository_link call in the DeveloperConnect service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#get_git_repository_link.", + "file": "developer_connect/get_git_repository_link.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_git_repository_link", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#get_git_repository_link", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DeveloperConnect::V1::GetGitRepositoryLinkRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink", + "client": { + "short_name": "DeveloperConnect::Client", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" + }, + "method": { + "short_name": "GetGitRepositoryLink", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.GetGitRepositoryLink", + "service": { + "short_name": "DeveloperConnect", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "developerconnect_v1_generated_DeveloperConnect_FetchReadWriteToken_sync", + "title": "Snippet for the fetch_read_write_token call in the DeveloperConnect service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#fetch_read_write_token.", + "file": "developer_connect/fetch_read_write_token.rb", + "language": "RUBY", + "client_method": { + "short_name": "fetch_read_write_token", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#fetch_read_write_token", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenResponse", + "client": { + "short_name": "DeveloperConnect::Client", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" + }, + "method": { + "short_name": "FetchReadWriteToken", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.FetchReadWriteToken", + "service": { + "short_name": "DeveloperConnect", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "developerconnect_v1_generated_DeveloperConnect_FetchReadToken_sync", + "title": "Snippet for the fetch_read_token call in the DeveloperConnect service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#fetch_read_token.", + "file": "developer_connect/fetch_read_token.rb", + "language": "RUBY", + "client_method": { + "short_name": "fetch_read_token", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#fetch_read_token", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DeveloperConnect::V1::FetchReadTokenRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::DeveloperConnect::V1::FetchReadTokenResponse", + "client": { + "short_name": "DeveloperConnect::Client", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" + }, + "method": { + "short_name": "FetchReadToken", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.FetchReadToken", + "service": { + "short_name": "DeveloperConnect", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "developerconnect_v1_generated_DeveloperConnect_FetchLinkableGitRepositories_sync", + "title": "Snippet for the fetch_linkable_git_repositories call in the DeveloperConnect service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#fetch_linkable_git_repositories.", + "file": "developer_connect/fetch_linkable_git_repositories.rb", + "language": "RUBY", + "client_method": { + "short_name": "fetch_linkable_git_repositories", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#fetch_linkable_git_repositories", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DeveloperConnect::V1::FetchLinkableGitRepositoriesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::DeveloperConnect::V1::FetchLinkableGitRepositoriesResponse", + "client": { + "short_name": "DeveloperConnect::Client", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" + }, + "method": { + "short_name": "FetchLinkableGitRepositories", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.FetchLinkableGitRepositories", + "service": { + "short_name": "DeveloperConnect", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "developerconnect_v1_generated_DeveloperConnect_FetchGitHubInstallations_sync", + "title": "Snippet for the fetch_git_hub_installations call in the DeveloperConnect service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#fetch_git_hub_installations.", + "file": "developer_connect/fetch_git_hub_installations.rb", + "language": "RUBY", + "client_method": { + "short_name": "fetch_git_hub_installations", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#fetch_git_hub_installations", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsResponse", + "client": { + "short_name": "DeveloperConnect::Client", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" + }, + "method": { + "short_name": "FetchGitHubInstallations", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.FetchGitHubInstallations", + "service": { + "short_name": "DeveloperConnect", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "developerconnect_v1_generated_DeveloperConnect_FetchGitRefs_sync", + "title": "Snippet for the fetch_git_refs call in the DeveloperConnect service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#fetch_git_refs.", + "file": "developer_connect/fetch_git_refs.rb", + "language": "RUBY", + "client_method": { + "short_name": "fetch_git_refs", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#fetch_git_refs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DeveloperConnect::V1::FetchGitRefsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::DeveloperConnect::V1::FetchGitRefsResponse", + "client": { + "short_name": "DeveloperConnect::Client", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" + }, + "method": { + "short_name": "FetchGitRefs", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.FetchGitRefs", + "service": { + "short_name": "DeveloperConnect", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "developerconnect_v1_generated_DeveloperConnect_ListAccountConnectors_sync", + "title": "Snippet for the list_account_connectors call in the DeveloperConnect service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#list_account_connectors.", + "file": "developer_connect/list_account_connectors.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_account_connectors", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#list_account_connectors", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsResponse", + "client": { + "short_name": "DeveloperConnect::Client", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" + }, + "method": { + "short_name": "ListAccountConnectors", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.ListAccountConnectors", + "service": { + "short_name": "DeveloperConnect", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "developerconnect_v1_generated_DeveloperConnect_GetAccountConnector_sync", + "title": "Snippet for the get_account_connector call in the DeveloperConnect service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#get_account_connector.", + "file": "developer_connect/get_account_connector.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_account_connector", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#get_account_connector", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DeveloperConnect::V1::GetAccountConnectorRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::DeveloperConnect::V1::AccountConnector", + "client": { + "short_name": "DeveloperConnect::Client", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" + }, + "method": { + "short_name": "GetAccountConnector", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.GetAccountConnector", + "service": { + "short_name": "DeveloperConnect", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "developerconnect_v1_generated_DeveloperConnect_CreateAccountConnector_sync", + "title": "Snippet for the create_account_connector call in the DeveloperConnect service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#create_account_connector.", + "file": "developer_connect/create_account_connector.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_account_connector", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#create_account_connector", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DeveloperConnect::V1::CreateAccountConnectorRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DeveloperConnect::Client", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" + }, + "method": { + "short_name": "CreateAccountConnector", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.CreateAccountConnector", + "service": { + "short_name": "DeveloperConnect", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "developerconnect_v1_generated_DeveloperConnect_UpdateAccountConnector_sync", + "title": "Snippet for the update_account_connector call in the DeveloperConnect service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#update_account_connector.", + "file": "developer_connect/update_account_connector.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_account_connector", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#update_account_connector", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DeveloperConnect::V1::UpdateAccountConnectorRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DeveloperConnect::Client", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" + }, + "method": { + "short_name": "UpdateAccountConnector", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.UpdateAccountConnector", + "service": { + "short_name": "DeveloperConnect", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "developerconnect_v1_generated_DeveloperConnect_DeleteAccountConnector_sync", + "title": "Snippet for the delete_account_connector call in the DeveloperConnect service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#delete_account_connector.", + "file": "developer_connect/delete_account_connector.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_account_connector", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#delete_account_connector", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DeveloperConnect::V1::DeleteAccountConnectorRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DeveloperConnect::Client", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" + }, + "method": { + "short_name": "DeleteAccountConnector", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.DeleteAccountConnector", + "service": { + "short_name": "DeveloperConnect", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "developerconnect_v1_generated_DeveloperConnect_FetchAccessToken_sync", + "title": "Snippet for the fetch_access_token call in the DeveloperConnect service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#fetch_access_token.", + "file": "developer_connect/fetch_access_token.rb", + "language": "RUBY", + "client_method": { + "short_name": "fetch_access_token", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#fetch_access_token", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenResponse", + "client": { + "short_name": "DeveloperConnect::Client", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" + }, + "method": { + "short_name": "FetchAccessToken", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.FetchAccessToken", + "service": { + "short_name": "DeveloperConnect", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "developerconnect_v1_generated_DeveloperConnect_ListUsers_sync", + "title": "Snippet for the list_users call in the DeveloperConnect service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#list_users.", + "file": "developer_connect/list_users.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_users", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#list_users", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DeveloperConnect::V1::ListUsersRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::DeveloperConnect::V1::ListUsersResponse", + "client": { + "short_name": "DeveloperConnect::Client", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" + }, + "method": { + "short_name": "ListUsers", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.ListUsers", + "service": { + "short_name": "DeveloperConnect", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "developerconnect_v1_generated_DeveloperConnect_DeleteUser_sync", + "title": "Snippet for the delete_user call in the DeveloperConnect service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#delete_user.", + "file": "developer_connect/delete_user.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_user", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#delete_user", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DeveloperConnect::V1::DeleteUserRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DeveloperConnect::Client", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" + }, + "method": { + "short_name": "DeleteUser", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.DeleteUser", + "service": { + "short_name": "DeveloperConnect", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "developerconnect_v1_generated_DeveloperConnect_FetchSelf_sync", + "title": "Snippet for the fetch_self call in the DeveloperConnect service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#fetch_self.", + "file": "developer_connect/fetch_self.rb", + "language": "RUBY", + "client_method": { + "short_name": "fetch_self", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#fetch_self", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DeveloperConnect::V1::FetchSelfRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::DeveloperConnect::V1::User", + "client": { + "short_name": "DeveloperConnect::Client", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" + }, + "method": { + "short_name": "FetchSelf", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.FetchSelf", + "service": { + "short_name": "DeveloperConnect", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "developerconnect_v1_generated_DeveloperConnect_DeleteSelf_sync", + "title": "Snippet for the delete_self call in the DeveloperConnect service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#delete_self.", + "file": "developer_connect/delete_self.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_self", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#delete_self", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DeveloperConnect::V1::DeleteSelfRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DeveloperConnect::Client", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" + }, + "method": { + "short_name": "DeleteSelf", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.DeleteSelf", + "service": { + "short_name": "DeveloperConnect", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "developerconnect_v1_generated_DeveloperConnect_StartOAuth_sync", + "title": "Snippet for the start_o_auth call in the DeveloperConnect service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#start_o_auth.", + "file": "developer_connect/start_o_auth.rb", + "language": "RUBY", + "client_method": { + "short_name": "start_o_auth", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#start_o_auth", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DeveloperConnect::V1::StartOAuthRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::DeveloperConnect::V1::StartOAuthResponse", + "client": { + "short_name": "DeveloperConnect::Client", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" + }, + "method": { + "short_name": "StartOAuth", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.StartOAuth", + "service": { + "short_name": "DeveloperConnect", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "developerconnect_v1_generated_DeveloperConnect_FinishOAuth_sync", + "title": "Snippet for the finish_o_auth call in the DeveloperConnect service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#finish_o_auth.", + "file": "developer_connect/finish_o_auth.rb", + "language": "RUBY", + "client_method": { + "short_name": "finish_o_auth", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#finish_o_auth", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::DeveloperConnect::V1::FinishOAuthResponse", + "client": { + "short_name": "DeveloperConnect::Client", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" + }, + "method": { + "short_name": "FinishOAuth", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.FinishOAuth", + "service": { + "short_name": "DeveloperConnect", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "developerconnect_v1_generated_InsightsConfigService_ListInsightsConfigs_sync", + "title": "Snippet for the list_insights_configs call in the InsightsConfigService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Developerconnect::V1::InsightsConfigService::Client#list_insights_configs.", + "file": "insights_config_service/list_insights_configs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_insights_configs", + "full_name": "::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client#list_insights_configs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Developerconnect::V1::ListInsightsConfigsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Developerconnect::V1::ListInsightsConfigsResponse", + "client": { + "short_name": "InsightsConfigService::Client", + "full_name": "::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client" + }, + "method": { + "short_name": "ListInsightsConfigs", + "full_name": "google.cloud.developerconnect.v1.InsightsConfigService.ListInsightsConfigs", + "service": { + "short_name": "InsightsConfigService", + "full_name": "google.cloud.developerconnect.v1.InsightsConfigService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "developerconnect_v1_generated_InsightsConfigService_CreateInsightsConfig_sync", + "title": "Snippet for the create_insights_config call in the InsightsConfigService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Developerconnect::V1::InsightsConfigService::Client#create_insights_config.", + "file": "insights_config_service/create_insights_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_insights_config", + "full_name": "::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client#create_insights_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Developerconnect::V1::CreateInsightsConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "InsightsConfigService::Client", + "full_name": "::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client" + }, + "method": { + "short_name": "CreateInsightsConfig", + "full_name": "google.cloud.developerconnect.v1.InsightsConfigService.CreateInsightsConfig", + "service": { + "short_name": "InsightsConfigService", + "full_name": "google.cloud.developerconnect.v1.InsightsConfigService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "developerconnect_v1_generated_InsightsConfigService_GetInsightsConfig_sync", + "title": "Snippet for the get_insights_config call in the InsightsConfigService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Developerconnect::V1::InsightsConfigService::Client#get_insights_config.", + "file": "insights_config_service/get_insights_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_insights_config", + "full_name": "::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client#get_insights_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Developerconnect::V1::GetInsightsConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Developerconnect::V1::InsightsConfig", + "client": { + "short_name": "InsightsConfigService::Client", + "full_name": "::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client" + }, + "method": { + "short_name": "GetInsightsConfig", + "full_name": "google.cloud.developerconnect.v1.InsightsConfigService.GetInsightsConfig", + "service": { + "short_name": "InsightsConfigService", + "full_name": "google.cloud.developerconnect.v1.InsightsConfigService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "developerconnect_v1_generated_InsightsConfigService_UpdateInsightsConfig_sync", + "title": "Snippet for the update_insights_config call in the InsightsConfigService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Developerconnect::V1::InsightsConfigService::Client#update_insights_config.", + "file": "insights_config_service/update_insights_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_insights_config", + "full_name": "::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client#update_insights_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Developerconnect::V1::UpdateInsightsConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "InsightsConfigService::Client", + "full_name": "::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client" + }, + "method": { + "short_name": "UpdateInsightsConfig", + "full_name": "google.cloud.developerconnect.v1.InsightsConfigService.UpdateInsightsConfig", + "service": { + "short_name": "InsightsConfigService", + "full_name": "google.cloud.developerconnect.v1.InsightsConfigService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "developerconnect_v1_generated_InsightsConfigService_DeleteInsightsConfig_sync", + "title": "Snippet for the delete_insights_config call in the InsightsConfigService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Developerconnect::V1::InsightsConfigService::Client#delete_insights_config.", + "file": "insights_config_service/delete_insights_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_insights_config", + "full_name": "::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client#delete_insights_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Developerconnect::V1::DeleteInsightsConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "InsightsConfigService::Client", + "full_name": "::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client" + }, + "method": { + "short_name": "DeleteInsightsConfig", + "full_name": "google.cloud.developerconnect.v1.InsightsConfigService.DeleteInsightsConfig", + "service": { + "short_name": "InsightsConfigService", + "full_name": "google.cloud.developerconnect.v1.InsightsConfigService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "developerconnect_v1_generated_InsightsConfigService_GetDeploymentEvent_sync", + "title": "Snippet for the get_deployment_event call in the InsightsConfigService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Developerconnect::V1::InsightsConfigService::Client#get_deployment_event.", + "file": "insights_config_service/get_deployment_event.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_deployment_event", + "full_name": "::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client#get_deployment_event", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Developerconnect::V1::GetDeploymentEventRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Developerconnect::V1::DeploymentEvent", + "client": { + "short_name": "InsightsConfigService::Client", + "full_name": "::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client" + }, + "method": { + "short_name": "GetDeploymentEvent", + "full_name": "google.cloud.developerconnect.v1.InsightsConfigService.GetDeploymentEvent", + "service": { + "short_name": "InsightsConfigService", + "full_name": "google.cloud.developerconnect.v1.InsightsConfigService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "developerconnect_v1_generated_InsightsConfigService_ListDeploymentEvents_sync", + "title": "Snippet for the list_deployment_events call in the InsightsConfigService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Developerconnect::V1::InsightsConfigService::Client#list_deployment_events.", + "file": "insights_config_service/list_deployment_events.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_deployment_events", + "full_name": "::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client#list_deployment_events", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Developerconnect::V1::ListDeploymentEventsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Developerconnect::V1::ListDeploymentEventsResponse", + "client": { + "short_name": "InsightsConfigService::Client", + "full_name": "::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client" + }, + "method": { + "short_name": "ListDeploymentEvents", + "full_name": "google.cloud.developerconnect.v1.InsightsConfigService.ListDeploymentEvents", + "service": { + "short_name": "InsightsConfigService", + "full_name": "google.cloud.developerconnect.v1.InsightsConfigService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developer_connect/v1/developer_connect_operations_test.rb b/owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developer_connect/v1/developer_connect_operations_test.rb new file mode 100644 index 000000000000..bc56f660f19d --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developer_connect/v1/developer_connect_operations_test.rb @@ -0,0 +1,400 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/developerconnect/v1/developer_connect_pb" +require "google/cloud/developerconnect/v1/developer_connect_services_pb" +require "google/cloud/developer_connect/v1/developer_connect" + +class ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Operations.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developer_connect/v1/developer_connect_paths_test.rb b/owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developer_connect/v1/developer_connect_paths_test.rb new file mode 100644 index 000000000000..8b16bcd9dd39 --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developer_connect/v1/developer_connect_paths_test.rb @@ -0,0 +1,154 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/developer_connect/v1/developer_connect" + +class ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_account_connector_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_connector_path project: "value0", location: "value1", account_connector: "value2" + assert_equal "projects/value0/locations/value1/accountConnectors/value2", path + end + end + + def test_connection_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.connection_path project: "value0", location: "value1", connection: "value2" + assert_equal "projects/value0/locations/value1/connections/value2", path + end + end + + def test_crypto_key_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.crypto_key_path project: "value0", location: "value1", key_ring: "value2", crypto_key: "value3" + assert_equal "projects/value0/locations/value1/keyRings/value2/cryptoKeys/value3", path + end + end + + def test_git_repository_link_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.git_repository_link_path project: "value0", location: "value1", connection: "value2", git_repository_link: "value3" + assert_equal "projects/value0/locations/value1/connections/value2/gitRepositoryLinks/value3", path + end + end + + def test_instance_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.instance_path project: "value0", location: "value1", instance: "value2" + assert_equal "projects/value0/locations/value1/instances/value2", path + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end + + def test_secret_version_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.secret_version_path project: "value0", secret: "value1", secret_version: "value2" + assert_equal "projects/value0/secrets/value1/versions/value2", path + + path = client.secret_version_path project: "value0", location: "value1", secret: "value2", secret_version: "value3" + assert_equal "projects/value0/locations/value1/secrets/value2/versions/value3", path + end + end + + def test_service_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.service_path project: "value0", location: "value1", namespace: "value2", service: "value3" + assert_equal "projects/value0/locations/value1/namespaces/value2/services/value3", path + end + end + + def test_user_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.user_path project: "value0", location: "value1", account_connector: "value2", user: "value3" + assert_equal "projects/value0/locations/value1/accountConnectors/value2/users/value3", path + end + end +end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developer_connect/v1/developer_connect_rest_test.rb b/owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developer_connect/v1/developer_connect_rest_test.rb new file mode 100644 index 000000000000..337b15ffa2f9 --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developer_connect/v1/developer_connect_rest_test.rb @@ -0,0 +1,1558 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/developerconnect/v1/developer_connect_pb" +require "google/cloud/developer_connect/v1/developer_connect/rest" + + +class ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_connections + # Create test objects. + client_result = ::Google::Cloud::DeveloperConnect::V1::ListConnectionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_connections_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_list_connections_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_connections_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_connections({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_connections parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_connections ::Google::Cloud::DeveloperConnect::V1::ListConnectionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_connections({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_connections(::Google::Cloud::DeveloperConnect::V1::ListConnectionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_connections_client_stub.call_count + end + end + end + + def test_get_connection + # Create test objects. + client_result = ::Google::Cloud::DeveloperConnect::V1::Connection.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_connection_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_get_connection_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_connection_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_connection({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_connection name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_connection ::Google::Cloud::DeveloperConnect::V1::GetConnectionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_connection({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_connection(::Google::Cloud::DeveloperConnect::V1::GetConnectionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_connection_client_stub.call_count + end + end + end + + def test_create_connection + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + connection_id = "hello world" + connection = {} + request_id = "hello world" + validate_only = true + + create_connection_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_create_connection_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_connection_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_connection({ parent: parent, connection_id: connection_id, connection: connection, request_id: request_id, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_connection parent: parent, connection_id: connection_id, connection: connection, request_id: request_id, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_connection ::Google::Cloud::DeveloperConnect::V1::CreateConnectionRequest.new(parent: parent, connection_id: connection_id, connection: connection, request_id: request_id, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_connection({ parent: parent, connection_id: connection_id, connection: connection, request_id: request_id, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_connection(::Google::Cloud::DeveloperConnect::V1::CreateConnectionRequest.new(parent: parent, connection_id: connection_id, connection: connection, request_id: request_id, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_connection_client_stub.call_count + end + end + end + + def test_update_connection + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + update_mask = {} + connection = {} + request_id = "hello world" + allow_missing = true + validate_only = true + + update_connection_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_update_connection_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_connection_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_connection({ update_mask: update_mask, connection: connection, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_connection update_mask: update_mask, connection: connection, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_connection ::Google::Cloud::DeveloperConnect::V1::UpdateConnectionRequest.new(update_mask: update_mask, connection: connection, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_connection({ update_mask: update_mask, connection: connection, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_connection(::Google::Cloud::DeveloperConnect::V1::UpdateConnectionRequest.new(update_mask: update_mask, connection: connection, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_connection_client_stub.call_count + end + end + end + + def test_delete_connection + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + validate_only = true + etag = "hello world" + + delete_connection_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_delete_connection_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_connection_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_connection({ name: name, request_id: request_id, validate_only: validate_only, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_connection name: name, request_id: request_id, validate_only: validate_only, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_connection ::Google::Cloud::DeveloperConnect::V1::DeleteConnectionRequest.new(name: name, request_id: request_id, validate_only: validate_only, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_connection({ name: name, request_id: request_id, validate_only: validate_only, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_connection(::Google::Cloud::DeveloperConnect::V1::DeleteConnectionRequest.new(name: name, request_id: request_id, validate_only: validate_only, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_connection_client_stub.call_count + end + end + end + + def test_create_git_repository_link + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + git_repository_link = {} + git_repository_link_id = "hello world" + request_id = "hello world" + validate_only = true + + create_git_repository_link_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_create_git_repository_link_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_git_repository_link_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_git_repository_link({ parent: parent, git_repository_link: git_repository_link, git_repository_link_id: git_repository_link_id, request_id: request_id, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_git_repository_link parent: parent, git_repository_link: git_repository_link, git_repository_link_id: git_repository_link_id, request_id: request_id, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_git_repository_link ::Google::Cloud::DeveloperConnect::V1::CreateGitRepositoryLinkRequest.new(parent: parent, git_repository_link: git_repository_link, git_repository_link_id: git_repository_link_id, request_id: request_id, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_git_repository_link({ parent: parent, git_repository_link: git_repository_link, git_repository_link_id: git_repository_link_id, request_id: request_id, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_git_repository_link(::Google::Cloud::DeveloperConnect::V1::CreateGitRepositoryLinkRequest.new(parent: parent, git_repository_link: git_repository_link, git_repository_link_id: git_repository_link_id, request_id: request_id, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_git_repository_link_client_stub.call_count + end + end + end + + def test_delete_git_repository_link + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + validate_only = true + etag = "hello world" + + delete_git_repository_link_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_delete_git_repository_link_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_git_repository_link_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_git_repository_link({ name: name, request_id: request_id, validate_only: validate_only, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_git_repository_link name: name, request_id: request_id, validate_only: validate_only, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_git_repository_link ::Google::Cloud::DeveloperConnect::V1::DeleteGitRepositoryLinkRequest.new(name: name, request_id: request_id, validate_only: validate_only, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_git_repository_link({ name: name, request_id: request_id, validate_only: validate_only, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_git_repository_link(::Google::Cloud::DeveloperConnect::V1::DeleteGitRepositoryLinkRequest.new(name: name, request_id: request_id, validate_only: validate_only, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_git_repository_link_client_stub.call_count + end + end + end + + def test_list_git_repository_links + # Create test objects. + client_result = ::Google::Cloud::DeveloperConnect::V1::ListGitRepositoryLinksResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_git_repository_links_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_list_git_repository_links_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_git_repository_links_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_git_repository_links({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_git_repository_links parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_git_repository_links ::Google::Cloud::DeveloperConnect::V1::ListGitRepositoryLinksRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_git_repository_links({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_git_repository_links(::Google::Cloud::DeveloperConnect::V1::ListGitRepositoryLinksRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_git_repository_links_client_stub.call_count + end + end + end + + def test_get_git_repository_link + # Create test objects. + client_result = ::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_git_repository_link_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_get_git_repository_link_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_git_repository_link_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_git_repository_link({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_git_repository_link name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_git_repository_link ::Google::Cloud::DeveloperConnect::V1::GetGitRepositoryLinkRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_git_repository_link({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_git_repository_link(::Google::Cloud::DeveloperConnect::V1::GetGitRepositoryLinkRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_git_repository_link_client_stub.call_count + end + end + end + + def test_fetch_read_write_token + # Create test objects. + client_result = ::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + git_repository_link = "hello world" + + fetch_read_write_token_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_fetch_read_write_token_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, fetch_read_write_token_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.fetch_read_write_token({ git_repository_link: git_repository_link }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.fetch_read_write_token git_repository_link: git_repository_link do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.fetch_read_write_token ::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenRequest.new(git_repository_link: git_repository_link) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.fetch_read_write_token({ git_repository_link: git_repository_link }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.fetch_read_write_token(::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenRequest.new(git_repository_link: git_repository_link), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, fetch_read_write_token_client_stub.call_count + end + end + end + + def test_fetch_read_token + # Create test objects. + client_result = ::Google::Cloud::DeveloperConnect::V1::FetchReadTokenResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + git_repository_link = "hello world" + + fetch_read_token_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_fetch_read_token_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, fetch_read_token_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.fetch_read_token({ git_repository_link: git_repository_link }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.fetch_read_token git_repository_link: git_repository_link do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.fetch_read_token ::Google::Cloud::DeveloperConnect::V1::FetchReadTokenRequest.new(git_repository_link: git_repository_link) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.fetch_read_token({ git_repository_link: git_repository_link }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.fetch_read_token(::Google::Cloud::DeveloperConnect::V1::FetchReadTokenRequest.new(git_repository_link: git_repository_link), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, fetch_read_token_client_stub.call_count + end + end + end + + def test_fetch_linkable_git_repositories + # Create test objects. + client_result = ::Google::Cloud::DeveloperConnect::V1::FetchLinkableGitRepositoriesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + connection = "hello world" + page_size = 42 + page_token = "hello world" + + fetch_linkable_git_repositories_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_fetch_linkable_git_repositories_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, fetch_linkable_git_repositories_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.fetch_linkable_git_repositories({ connection: connection, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.fetch_linkable_git_repositories connection: connection, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.fetch_linkable_git_repositories ::Google::Cloud::DeveloperConnect::V1::FetchLinkableGitRepositoriesRequest.new(connection: connection, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.fetch_linkable_git_repositories({ connection: connection, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.fetch_linkable_git_repositories(::Google::Cloud::DeveloperConnect::V1::FetchLinkableGitRepositoriesRequest.new(connection: connection, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, fetch_linkable_git_repositories_client_stub.call_count + end + end + end + + def test_fetch_git_hub_installations + # Create test objects. + client_result = ::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + connection = "hello world" + + fetch_git_hub_installations_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_fetch_git_hub_installations_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, fetch_git_hub_installations_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.fetch_git_hub_installations({ connection: connection }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.fetch_git_hub_installations connection: connection do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.fetch_git_hub_installations ::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsRequest.new(connection: connection) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.fetch_git_hub_installations({ connection: connection }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.fetch_git_hub_installations(::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsRequest.new(connection: connection), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, fetch_git_hub_installations_client_stub.call_count + end + end + end + + def test_fetch_git_refs + # Create test objects. + client_result = ::Google::Cloud::DeveloperConnect::V1::FetchGitRefsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + git_repository_link = "hello world" + ref_type = :REF_TYPE_UNSPECIFIED + page_size = 42 + page_token = "hello world" + + fetch_git_refs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_fetch_git_refs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, fetch_git_refs_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.fetch_git_refs({ git_repository_link: git_repository_link, ref_type: ref_type, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.fetch_git_refs git_repository_link: git_repository_link, ref_type: ref_type, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.fetch_git_refs ::Google::Cloud::DeveloperConnect::V1::FetchGitRefsRequest.new(git_repository_link: git_repository_link, ref_type: ref_type, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.fetch_git_refs({ git_repository_link: git_repository_link, ref_type: ref_type, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.fetch_git_refs(::Google::Cloud::DeveloperConnect::V1::FetchGitRefsRequest.new(git_repository_link: git_repository_link, ref_type: ref_type, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, fetch_git_refs_client_stub.call_count + end + end + end + + def test_list_account_connectors + # Create test objects. + client_result = ::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_account_connectors_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_list_account_connectors_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_account_connectors_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_account_connectors({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_account_connectors parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_account_connectors ::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_account_connectors({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_account_connectors(::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_account_connectors_client_stub.call_count + end + end + end + + def test_get_account_connector + # Create test objects. + client_result = ::Google::Cloud::DeveloperConnect::V1::AccountConnector.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_account_connector_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_get_account_connector_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_account_connector_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_account_connector({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_account_connector name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_account_connector ::Google::Cloud::DeveloperConnect::V1::GetAccountConnectorRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_account_connector({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_account_connector(::Google::Cloud::DeveloperConnect::V1::GetAccountConnectorRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_account_connector_client_stub.call_count + end + end + end + + def test_create_account_connector + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + account_connector_id = "hello world" + account_connector = {} + request_id = "hello world" + validate_only = true + + create_account_connector_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_create_account_connector_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_account_connector_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_account_connector({ parent: parent, account_connector_id: account_connector_id, account_connector: account_connector, request_id: request_id, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_account_connector parent: parent, account_connector_id: account_connector_id, account_connector: account_connector, request_id: request_id, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_account_connector ::Google::Cloud::DeveloperConnect::V1::CreateAccountConnectorRequest.new(parent: parent, account_connector_id: account_connector_id, account_connector: account_connector, request_id: request_id, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_account_connector({ parent: parent, account_connector_id: account_connector_id, account_connector: account_connector, request_id: request_id, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_account_connector(::Google::Cloud::DeveloperConnect::V1::CreateAccountConnectorRequest.new(parent: parent, account_connector_id: account_connector_id, account_connector: account_connector, request_id: request_id, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_account_connector_client_stub.call_count + end + end + end + + def test_update_account_connector + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + update_mask = {} + account_connector = {} + request_id = "hello world" + allow_missing = true + validate_only = true + + update_account_connector_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_update_account_connector_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_account_connector_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_account_connector({ update_mask: update_mask, account_connector: account_connector, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_account_connector update_mask: update_mask, account_connector: account_connector, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_account_connector ::Google::Cloud::DeveloperConnect::V1::UpdateAccountConnectorRequest.new(update_mask: update_mask, account_connector: account_connector, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_account_connector({ update_mask: update_mask, account_connector: account_connector, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_account_connector(::Google::Cloud::DeveloperConnect::V1::UpdateAccountConnectorRequest.new(update_mask: update_mask, account_connector: account_connector, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_account_connector_client_stub.call_count + end + end + end + + def test_delete_account_connector + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + validate_only = true + etag = "hello world" + force = true + + delete_account_connector_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_delete_account_connector_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_account_connector_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_account_connector({ name: name, request_id: request_id, validate_only: validate_only, etag: etag, force: force }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_account_connector name: name, request_id: request_id, validate_only: validate_only, etag: etag, force: force do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_account_connector ::Google::Cloud::DeveloperConnect::V1::DeleteAccountConnectorRequest.new(name: name, request_id: request_id, validate_only: validate_only, etag: etag, force: force) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_account_connector({ name: name, request_id: request_id, validate_only: validate_only, etag: etag, force: force }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_account_connector(::Google::Cloud::DeveloperConnect::V1::DeleteAccountConnectorRequest.new(name: name, request_id: request_id, validate_only: validate_only, etag: etag, force: force), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_account_connector_client_stub.call_count + end + end + end + + def test_fetch_access_token + # Create test objects. + client_result = ::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + account_connector = "hello world" + + fetch_access_token_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_fetch_access_token_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, fetch_access_token_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.fetch_access_token({ account_connector: account_connector }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.fetch_access_token account_connector: account_connector do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.fetch_access_token ::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenRequest.new(account_connector: account_connector) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.fetch_access_token({ account_connector: account_connector }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.fetch_access_token(::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenRequest.new(account_connector: account_connector), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, fetch_access_token_client_stub.call_count + end + end + end + + def test_list_users + # Create test objects. + client_result = ::Google::Cloud::DeveloperConnect::V1::ListUsersResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_users_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_list_users_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_users_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_users({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_users parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_users ::Google::Cloud::DeveloperConnect::V1::ListUsersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_users({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_users(::Google::Cloud::DeveloperConnect::V1::ListUsersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_users_client_stub.call_count + end + end + end + + def test_delete_user + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + validate_only = true + etag = "hello world" + + delete_user_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_delete_user_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_user_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_user({ name: name, request_id: request_id, validate_only: validate_only, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_user name: name, request_id: request_id, validate_only: validate_only, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_user ::Google::Cloud::DeveloperConnect::V1::DeleteUserRequest.new(name: name, request_id: request_id, validate_only: validate_only, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_user({ name: name, request_id: request_id, validate_only: validate_only, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_user(::Google::Cloud::DeveloperConnect::V1::DeleteUserRequest.new(name: name, request_id: request_id, validate_only: validate_only, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_user_client_stub.call_count + end + end + end + + def test_fetch_self + # Create test objects. + client_result = ::Google::Cloud::DeveloperConnect::V1::User.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + fetch_self_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_fetch_self_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, fetch_self_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.fetch_self({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.fetch_self name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.fetch_self ::Google::Cloud::DeveloperConnect::V1::FetchSelfRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.fetch_self({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.fetch_self(::Google::Cloud::DeveloperConnect::V1::FetchSelfRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, fetch_self_client_stub.call_count + end + end + end + + def test_delete_self + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_self_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_delete_self_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_self_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_self({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_self name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_self ::Google::Cloud::DeveloperConnect::V1::DeleteSelfRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_self({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_self(::Google::Cloud::DeveloperConnect::V1::DeleteSelfRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_self_client_stub.call_count + end + end + end + + def test_start_o_auth + # Create test objects. + client_result = ::Google::Cloud::DeveloperConnect::V1::StartOAuthResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + account_connector = "hello world" + + start_o_auth_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_start_o_auth_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, start_o_auth_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.start_o_auth({ account_connector: account_connector }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.start_o_auth account_connector: account_connector do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.start_o_auth ::Google::Cloud::DeveloperConnect::V1::StartOAuthRequest.new(account_connector: account_connector) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.start_o_auth({ account_connector: account_connector }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.start_o_auth(::Google::Cloud::DeveloperConnect::V1::StartOAuthRequest.new(account_connector: account_connector), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, start_o_auth_client_stub.call_count + end + end + end + + def test_finish_o_auth + # Create test objects. + client_result = ::Google::Cloud::DeveloperConnect::V1::FinishOAuthResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + oauth_params = {} + account_connector = "hello world" + + finish_o_auth_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_finish_o_auth_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, finish_o_auth_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.finish_o_auth({ oauth_params: oauth_params, account_connector: account_connector }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.finish_o_auth oauth_params: oauth_params, account_connector: account_connector do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.finish_o_auth ::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest.new(oauth_params: oauth_params, account_connector: account_connector) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.finish_o_auth({ oauth_params: oauth_params, account_connector: account_connector }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.finish_o_auth(::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest.new(oauth_params: oauth_params, account_connector: account_connector), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, finish_o_auth_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developer_connect/v1/developer_connect_test.rb b/owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developer_connect/v1/developer_connect_test.rb new file mode 100644 index 000000000000..46566c674fcc --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developer_connect/v1/developer_connect_test.rb @@ -0,0 +1,1812 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/developerconnect/v1/developer_connect_pb" +require "google/cloud/developer_connect/v1/developer_connect" + +class ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_connections + # Create GRPC objects. + grpc_response = ::Google::Cloud::DeveloperConnect::V1::ListConnectionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_connections_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_connections, name + assert_kind_of ::Google::Cloud::DeveloperConnect::V1::ListConnectionsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_connections_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_connections({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_connections parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_connections ::Google::Cloud::DeveloperConnect::V1::ListConnectionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_connections({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_connections(::Google::Cloud::DeveloperConnect::V1::ListConnectionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_connections_client_stub.call_rpc_count + end + end + + def test_get_connection + # Create GRPC objects. + grpc_response = ::Google::Cloud::DeveloperConnect::V1::Connection.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_connection_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_connection, name + assert_kind_of ::Google::Cloud::DeveloperConnect::V1::GetConnectionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_connection_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_connection({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_connection name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_connection ::Google::Cloud::DeveloperConnect::V1::GetConnectionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_connection({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_connection(::Google::Cloud::DeveloperConnect::V1::GetConnectionRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_connection_client_stub.call_rpc_count + end + end + + def test_create_connection + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + connection_id = "hello world" + connection = {} + request_id = "hello world" + validate_only = true + + create_connection_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_connection, name + assert_kind_of ::Google::Cloud::DeveloperConnect::V1::CreateConnectionRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["connection_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::DeveloperConnect::V1::Connection), request["connection"] + assert_equal "hello world", request["request_id"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_connection_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_connection({ parent: parent, connection_id: connection_id, connection: connection, request_id: request_id, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_connection parent: parent, connection_id: connection_id, connection: connection, request_id: request_id, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_connection ::Google::Cloud::DeveloperConnect::V1::CreateConnectionRequest.new(parent: parent, connection_id: connection_id, connection: connection, request_id: request_id, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_connection({ parent: parent, connection_id: connection_id, connection: connection, request_id: request_id, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_connection(::Google::Cloud::DeveloperConnect::V1::CreateConnectionRequest.new(parent: parent, connection_id: connection_id, connection: connection, request_id: request_id, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_connection_client_stub.call_rpc_count + end + end + + def test_update_connection + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + update_mask = {} + connection = {} + request_id = "hello world" + allow_missing = true + validate_only = true + + update_connection_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_connection, name + assert_kind_of ::Google::Cloud::DeveloperConnect::V1::UpdateConnectionRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::DeveloperConnect::V1::Connection), request["connection"] + assert_equal "hello world", request["request_id"] + assert_equal true, request["allow_missing"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_connection_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_connection({ update_mask: update_mask, connection: connection, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_connection update_mask: update_mask, connection: connection, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_connection ::Google::Cloud::DeveloperConnect::V1::UpdateConnectionRequest.new(update_mask: update_mask, connection: connection, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_connection({ update_mask: update_mask, connection: connection, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_connection(::Google::Cloud::DeveloperConnect::V1::UpdateConnectionRequest.new(update_mask: update_mask, connection: connection, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_connection_client_stub.call_rpc_count + end + end + + def test_delete_connection + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + validate_only = true + etag = "hello world" + + delete_connection_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_connection, name + assert_kind_of ::Google::Cloud::DeveloperConnect::V1::DeleteConnectionRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + assert_equal true, request["validate_only"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_connection_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_connection({ name: name, request_id: request_id, validate_only: validate_only, etag: etag }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_connection name: name, request_id: request_id, validate_only: validate_only, etag: etag do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_connection ::Google::Cloud::DeveloperConnect::V1::DeleteConnectionRequest.new(name: name, request_id: request_id, validate_only: validate_only, etag: etag) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_connection({ name: name, request_id: request_id, validate_only: validate_only, etag: etag }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_connection(::Google::Cloud::DeveloperConnect::V1::DeleteConnectionRequest.new(name: name, request_id: request_id, validate_only: validate_only, etag: etag), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_connection_client_stub.call_rpc_count + end + end + + def test_create_git_repository_link + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + git_repository_link = {} + git_repository_link_id = "hello world" + request_id = "hello world" + validate_only = true + + create_git_repository_link_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_git_repository_link, name + assert_kind_of ::Google::Cloud::DeveloperConnect::V1::CreateGitRepositoryLinkRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink), request["git_repository_link"] + assert_equal "hello world", request["git_repository_link_id"] + assert_equal "hello world", request["request_id"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_git_repository_link_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_git_repository_link({ parent: parent, git_repository_link: git_repository_link, git_repository_link_id: git_repository_link_id, request_id: request_id, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_git_repository_link parent: parent, git_repository_link: git_repository_link, git_repository_link_id: git_repository_link_id, request_id: request_id, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_git_repository_link ::Google::Cloud::DeveloperConnect::V1::CreateGitRepositoryLinkRequest.new(parent: parent, git_repository_link: git_repository_link, git_repository_link_id: git_repository_link_id, request_id: request_id, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_git_repository_link({ parent: parent, git_repository_link: git_repository_link, git_repository_link_id: git_repository_link_id, request_id: request_id, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_git_repository_link(::Google::Cloud::DeveloperConnect::V1::CreateGitRepositoryLinkRequest.new(parent: parent, git_repository_link: git_repository_link, git_repository_link_id: git_repository_link_id, request_id: request_id, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_git_repository_link_client_stub.call_rpc_count + end + end + + def test_delete_git_repository_link + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + validate_only = true + etag = "hello world" + + delete_git_repository_link_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_git_repository_link, name + assert_kind_of ::Google::Cloud::DeveloperConnect::V1::DeleteGitRepositoryLinkRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + assert_equal true, request["validate_only"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_git_repository_link_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_git_repository_link({ name: name, request_id: request_id, validate_only: validate_only, etag: etag }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_git_repository_link name: name, request_id: request_id, validate_only: validate_only, etag: etag do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_git_repository_link ::Google::Cloud::DeveloperConnect::V1::DeleteGitRepositoryLinkRequest.new(name: name, request_id: request_id, validate_only: validate_only, etag: etag) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_git_repository_link({ name: name, request_id: request_id, validate_only: validate_only, etag: etag }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_git_repository_link(::Google::Cloud::DeveloperConnect::V1::DeleteGitRepositoryLinkRequest.new(name: name, request_id: request_id, validate_only: validate_only, etag: etag), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_git_repository_link_client_stub.call_rpc_count + end + end + + def test_list_git_repository_links + # Create GRPC objects. + grpc_response = ::Google::Cloud::DeveloperConnect::V1::ListGitRepositoryLinksResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_git_repository_links_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_git_repository_links, name + assert_kind_of ::Google::Cloud::DeveloperConnect::V1::ListGitRepositoryLinksRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_git_repository_links_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_git_repository_links({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_git_repository_links parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_git_repository_links ::Google::Cloud::DeveloperConnect::V1::ListGitRepositoryLinksRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_git_repository_links({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_git_repository_links(::Google::Cloud::DeveloperConnect::V1::ListGitRepositoryLinksRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_git_repository_links_client_stub.call_rpc_count + end + end + + def test_get_git_repository_link + # Create GRPC objects. + grpc_response = ::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_git_repository_link_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_git_repository_link, name + assert_kind_of ::Google::Cloud::DeveloperConnect::V1::GetGitRepositoryLinkRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_git_repository_link_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_git_repository_link({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_git_repository_link name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_git_repository_link ::Google::Cloud::DeveloperConnect::V1::GetGitRepositoryLinkRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_git_repository_link({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_git_repository_link(::Google::Cloud::DeveloperConnect::V1::GetGitRepositoryLinkRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_git_repository_link_client_stub.call_rpc_count + end + end + + def test_fetch_read_write_token + # Create GRPC objects. + grpc_response = ::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + git_repository_link = "hello world" + + fetch_read_write_token_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :fetch_read_write_token, name + assert_kind_of ::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenRequest, request + assert_equal "hello world", request["git_repository_link"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, fetch_read_write_token_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.fetch_read_write_token({ git_repository_link: git_repository_link }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.fetch_read_write_token git_repository_link: git_repository_link do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.fetch_read_write_token ::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenRequest.new(git_repository_link: git_repository_link) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.fetch_read_write_token({ git_repository_link: git_repository_link }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.fetch_read_write_token(::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenRequest.new(git_repository_link: git_repository_link), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, fetch_read_write_token_client_stub.call_rpc_count + end + end + + def test_fetch_read_token + # Create GRPC objects. + grpc_response = ::Google::Cloud::DeveloperConnect::V1::FetchReadTokenResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + git_repository_link = "hello world" + + fetch_read_token_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :fetch_read_token, name + assert_kind_of ::Google::Cloud::DeveloperConnect::V1::FetchReadTokenRequest, request + assert_equal "hello world", request["git_repository_link"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, fetch_read_token_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.fetch_read_token({ git_repository_link: git_repository_link }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.fetch_read_token git_repository_link: git_repository_link do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.fetch_read_token ::Google::Cloud::DeveloperConnect::V1::FetchReadTokenRequest.new(git_repository_link: git_repository_link) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.fetch_read_token({ git_repository_link: git_repository_link }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.fetch_read_token(::Google::Cloud::DeveloperConnect::V1::FetchReadTokenRequest.new(git_repository_link: git_repository_link), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, fetch_read_token_client_stub.call_rpc_count + end + end + + def test_fetch_linkable_git_repositories + # Create GRPC objects. + grpc_response = ::Google::Cloud::DeveloperConnect::V1::FetchLinkableGitRepositoriesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + connection = "hello world" + page_size = 42 + page_token = "hello world" + + fetch_linkable_git_repositories_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :fetch_linkable_git_repositories, name + assert_kind_of ::Google::Cloud::DeveloperConnect::V1::FetchLinkableGitRepositoriesRequest, request + assert_equal "hello world", request["connection"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, fetch_linkable_git_repositories_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.fetch_linkable_git_repositories({ connection: connection, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.fetch_linkable_git_repositories connection: connection, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.fetch_linkable_git_repositories ::Google::Cloud::DeveloperConnect::V1::FetchLinkableGitRepositoriesRequest.new(connection: connection, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.fetch_linkable_git_repositories({ connection: connection, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.fetch_linkable_git_repositories(::Google::Cloud::DeveloperConnect::V1::FetchLinkableGitRepositoriesRequest.new(connection: connection, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, fetch_linkable_git_repositories_client_stub.call_rpc_count + end + end + + def test_fetch_git_hub_installations + # Create GRPC objects. + grpc_response = ::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + connection = "hello world" + + fetch_git_hub_installations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :fetch_git_hub_installations, name + assert_kind_of ::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsRequest, request + assert_equal "hello world", request["connection"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, fetch_git_hub_installations_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.fetch_git_hub_installations({ connection: connection }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.fetch_git_hub_installations connection: connection do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.fetch_git_hub_installations ::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsRequest.new(connection: connection) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.fetch_git_hub_installations({ connection: connection }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.fetch_git_hub_installations(::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsRequest.new(connection: connection), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, fetch_git_hub_installations_client_stub.call_rpc_count + end + end + + def test_fetch_git_refs + # Create GRPC objects. + grpc_response = ::Google::Cloud::DeveloperConnect::V1::FetchGitRefsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + git_repository_link = "hello world" + ref_type = :REF_TYPE_UNSPECIFIED + page_size = 42 + page_token = "hello world" + + fetch_git_refs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :fetch_git_refs, name + assert_kind_of ::Google::Cloud::DeveloperConnect::V1::FetchGitRefsRequest, request + assert_equal "hello world", request["git_repository_link"] + assert_equal :REF_TYPE_UNSPECIFIED, request["ref_type"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, fetch_git_refs_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.fetch_git_refs({ git_repository_link: git_repository_link, ref_type: ref_type, page_size: page_size, page_token: page_token }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.fetch_git_refs git_repository_link: git_repository_link, ref_type: ref_type, page_size: page_size, page_token: page_token do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.fetch_git_refs ::Google::Cloud::DeveloperConnect::V1::FetchGitRefsRequest.new(git_repository_link: git_repository_link, ref_type: ref_type, page_size: page_size, page_token: page_token) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.fetch_git_refs({ git_repository_link: git_repository_link, ref_type: ref_type, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.fetch_git_refs(::Google::Cloud::DeveloperConnect::V1::FetchGitRefsRequest.new(git_repository_link: git_repository_link, ref_type: ref_type, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, fetch_git_refs_client_stub.call_rpc_count + end + end + + def test_list_account_connectors + # Create GRPC objects. + grpc_response = ::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_account_connectors_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_account_connectors, name + assert_kind_of ::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_account_connectors_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_account_connectors({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_account_connectors parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_account_connectors ::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_account_connectors({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_account_connectors(::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_account_connectors_client_stub.call_rpc_count + end + end + + def test_get_account_connector + # Create GRPC objects. + grpc_response = ::Google::Cloud::DeveloperConnect::V1::AccountConnector.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_account_connector_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_account_connector, name + assert_kind_of ::Google::Cloud::DeveloperConnect::V1::GetAccountConnectorRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_account_connector_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_account_connector({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_account_connector name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_account_connector ::Google::Cloud::DeveloperConnect::V1::GetAccountConnectorRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_account_connector({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_account_connector(::Google::Cloud::DeveloperConnect::V1::GetAccountConnectorRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_account_connector_client_stub.call_rpc_count + end + end + + def test_create_account_connector + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + account_connector_id = "hello world" + account_connector = {} + request_id = "hello world" + validate_only = true + + create_account_connector_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_account_connector, name + assert_kind_of ::Google::Cloud::DeveloperConnect::V1::CreateAccountConnectorRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["account_connector_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::DeveloperConnect::V1::AccountConnector), request["account_connector"] + assert_equal "hello world", request["request_id"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_account_connector_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_account_connector({ parent: parent, account_connector_id: account_connector_id, account_connector: account_connector, request_id: request_id, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_account_connector parent: parent, account_connector_id: account_connector_id, account_connector: account_connector, request_id: request_id, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_account_connector ::Google::Cloud::DeveloperConnect::V1::CreateAccountConnectorRequest.new(parent: parent, account_connector_id: account_connector_id, account_connector: account_connector, request_id: request_id, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_account_connector({ parent: parent, account_connector_id: account_connector_id, account_connector: account_connector, request_id: request_id, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_account_connector(::Google::Cloud::DeveloperConnect::V1::CreateAccountConnectorRequest.new(parent: parent, account_connector_id: account_connector_id, account_connector: account_connector, request_id: request_id, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_account_connector_client_stub.call_rpc_count + end + end + + def test_update_account_connector + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + update_mask = {} + account_connector = {} + request_id = "hello world" + allow_missing = true + validate_only = true + + update_account_connector_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_account_connector, name + assert_kind_of ::Google::Cloud::DeveloperConnect::V1::UpdateAccountConnectorRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::DeveloperConnect::V1::AccountConnector), request["account_connector"] + assert_equal "hello world", request["request_id"] + assert_equal true, request["allow_missing"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_account_connector_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_account_connector({ update_mask: update_mask, account_connector: account_connector, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_account_connector update_mask: update_mask, account_connector: account_connector, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_account_connector ::Google::Cloud::DeveloperConnect::V1::UpdateAccountConnectorRequest.new(update_mask: update_mask, account_connector: account_connector, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_account_connector({ update_mask: update_mask, account_connector: account_connector, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_account_connector(::Google::Cloud::DeveloperConnect::V1::UpdateAccountConnectorRequest.new(update_mask: update_mask, account_connector: account_connector, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_account_connector_client_stub.call_rpc_count + end + end + + def test_delete_account_connector + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + validate_only = true + etag = "hello world" + force = true + + delete_account_connector_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_account_connector, name + assert_kind_of ::Google::Cloud::DeveloperConnect::V1::DeleteAccountConnectorRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + assert_equal true, request["validate_only"] + assert_equal "hello world", request["etag"] + assert_equal true, request["force"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_account_connector_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_account_connector({ name: name, request_id: request_id, validate_only: validate_only, etag: etag, force: force }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_account_connector name: name, request_id: request_id, validate_only: validate_only, etag: etag, force: force do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_account_connector ::Google::Cloud::DeveloperConnect::V1::DeleteAccountConnectorRequest.new(name: name, request_id: request_id, validate_only: validate_only, etag: etag, force: force) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_account_connector({ name: name, request_id: request_id, validate_only: validate_only, etag: etag, force: force }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_account_connector(::Google::Cloud::DeveloperConnect::V1::DeleteAccountConnectorRequest.new(name: name, request_id: request_id, validate_only: validate_only, etag: etag, force: force), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_account_connector_client_stub.call_rpc_count + end + end + + def test_fetch_access_token + # Create GRPC objects. + grpc_response = ::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + account_connector = "hello world" + + fetch_access_token_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :fetch_access_token, name + assert_kind_of ::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenRequest, request + assert_equal "hello world", request["account_connector"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, fetch_access_token_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.fetch_access_token({ account_connector: account_connector }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.fetch_access_token account_connector: account_connector do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.fetch_access_token ::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenRequest.new(account_connector: account_connector) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.fetch_access_token({ account_connector: account_connector }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.fetch_access_token(::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenRequest.new(account_connector: account_connector), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, fetch_access_token_client_stub.call_rpc_count + end + end + + def test_list_users + # Create GRPC objects. + grpc_response = ::Google::Cloud::DeveloperConnect::V1::ListUsersResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_users_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_users, name + assert_kind_of ::Google::Cloud::DeveloperConnect::V1::ListUsersRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_users_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_users({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_users parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_users ::Google::Cloud::DeveloperConnect::V1::ListUsersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_users({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_users(::Google::Cloud::DeveloperConnect::V1::ListUsersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_users_client_stub.call_rpc_count + end + end + + def test_delete_user + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + validate_only = true + etag = "hello world" + + delete_user_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_user, name + assert_kind_of ::Google::Cloud::DeveloperConnect::V1::DeleteUserRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + assert_equal true, request["validate_only"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_user_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_user({ name: name, request_id: request_id, validate_only: validate_only, etag: etag }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_user name: name, request_id: request_id, validate_only: validate_only, etag: etag do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_user ::Google::Cloud::DeveloperConnect::V1::DeleteUserRequest.new(name: name, request_id: request_id, validate_only: validate_only, etag: etag) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_user({ name: name, request_id: request_id, validate_only: validate_only, etag: etag }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_user(::Google::Cloud::DeveloperConnect::V1::DeleteUserRequest.new(name: name, request_id: request_id, validate_only: validate_only, etag: etag), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_user_client_stub.call_rpc_count + end + end + + def test_fetch_self + # Create GRPC objects. + grpc_response = ::Google::Cloud::DeveloperConnect::V1::User.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + fetch_self_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :fetch_self, name + assert_kind_of ::Google::Cloud::DeveloperConnect::V1::FetchSelfRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, fetch_self_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.fetch_self({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.fetch_self name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.fetch_self ::Google::Cloud::DeveloperConnect::V1::FetchSelfRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.fetch_self({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.fetch_self(::Google::Cloud::DeveloperConnect::V1::FetchSelfRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, fetch_self_client_stub.call_rpc_count + end + end + + def test_delete_self + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_self_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_self, name + assert_kind_of ::Google::Cloud::DeveloperConnect::V1::DeleteSelfRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_self_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_self({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_self name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_self ::Google::Cloud::DeveloperConnect::V1::DeleteSelfRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_self({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_self(::Google::Cloud::DeveloperConnect::V1::DeleteSelfRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_self_client_stub.call_rpc_count + end + end + + def test_start_o_auth + # Create GRPC objects. + grpc_response = ::Google::Cloud::DeveloperConnect::V1::StartOAuthResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + account_connector = "hello world" + + start_o_auth_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :start_o_auth, name + assert_kind_of ::Google::Cloud::DeveloperConnect::V1::StartOAuthRequest, request + assert_equal "hello world", request["account_connector"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, start_o_auth_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.start_o_auth({ account_connector: account_connector }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.start_o_auth account_connector: account_connector do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.start_o_auth ::Google::Cloud::DeveloperConnect::V1::StartOAuthRequest.new(account_connector: account_connector) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.start_o_auth({ account_connector: account_connector }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.start_o_auth(::Google::Cloud::DeveloperConnect::V1::StartOAuthRequest.new(account_connector: account_connector), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, start_o_auth_client_stub.call_rpc_count + end + end + + def test_finish_o_auth + # Create GRPC objects. + grpc_response = ::Google::Cloud::DeveloperConnect::V1::FinishOAuthResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + oauth_params = {} + account_connector = "hello world" + + finish_o_auth_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :finish_o_auth, name + assert_kind_of ::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest::OAuthParams), request["oauth_params"] + assert_equal :oauth_params, request.params + assert_equal "hello world", request["account_connector"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, finish_o_auth_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.finish_o_auth({ oauth_params: oauth_params, account_connector: account_connector }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.finish_o_auth oauth_params: oauth_params, account_connector: account_connector do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.finish_o_auth ::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest.new(oauth_params: oauth_params, account_connector: account_connector) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.finish_o_auth({ oauth_params: oauth_params, account_connector: account_connector }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.finish_o_auth(::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest.new(oauth_params: oauth_params, account_connector: account_connector), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, finish_o_auth_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client, client + assert_equal creds, client.configure.credentials + end + end + + def test_operations_client + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_operations_test.rb b/owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_operations_test.rb new file mode 100644 index 000000000000..9f825a22b059 --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_operations_test.rb @@ -0,0 +1,400 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/developerconnect/v1/insights_config_pb" +require "google/cloud/developerconnect/v1/insights_config_services_pb" +require "google/cloud/developerconnect/v1/insights_config_service" + +class ::Google::Cloud::Developerconnect::V1::InsightsConfigService::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Operations.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_paths_test.rb b/owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_paths_test.rb new file mode 100644 index 000000000000..19e736bd61d6 --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_paths_test.rb @@ -0,0 +1,79 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/developerconnect/v1/insights_config_service" + +class ::Google::Cloud::Developerconnect::V1::InsightsConfigService::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_deployment_event_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.deployment_event_path project: "value0", location: "value1", insights_config: "value2", deployment_event: "value3" + assert_equal "projects/value0/locations/value1/insightsConfigs/value2/deploymentEvents/value3", path + end + end + + def test_insights_config_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.insights_config_path project: "value0", location: "value1", insights_config: "value2" + assert_equal "projects/value0/locations/value1/insightsConfigs/value2", path + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end +end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_rest_test.rb b/owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_rest_test.rb new file mode 100644 index 000000000000..a55bee7d8853 --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_rest_test.rb @@ -0,0 +1,493 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/developerconnect/v1/insights_config_pb" +require "google/cloud/developerconnect/v1/insights_config_service/rest" + + +class ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_insights_configs + # Create test objects. + client_result = ::Google::Cloud::Developerconnect::V1::ListInsightsConfigsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_insights_configs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::ServiceStub.stub :transcode_list_insights_configs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_insights_configs_client_stub do + # Create client + client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_insights_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_insights_configs parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_insights_configs ::Google::Cloud::Developerconnect::V1::ListInsightsConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_insights_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_insights_configs(::Google::Cloud::Developerconnect::V1::ListInsightsConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_insights_configs_client_stub.call_count + end + end + end + + def test_create_insights_config + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + insights_config_id = "hello world" + insights_config = {} + validate_only = true + + create_insights_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::ServiceStub.stub :transcode_create_insights_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_insights_config_client_stub do + # Create client + client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_insights_config({ parent: parent, insights_config_id: insights_config_id, insights_config: insights_config, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_insights_config parent: parent, insights_config_id: insights_config_id, insights_config: insights_config, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_insights_config ::Google::Cloud::Developerconnect::V1::CreateInsightsConfigRequest.new(parent: parent, insights_config_id: insights_config_id, insights_config: insights_config, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_insights_config({ parent: parent, insights_config_id: insights_config_id, insights_config: insights_config, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_insights_config(::Google::Cloud::Developerconnect::V1::CreateInsightsConfigRequest.new(parent: parent, insights_config_id: insights_config_id, insights_config: insights_config, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_insights_config_client_stub.call_count + end + end + end + + def test_get_insights_config + # Create test objects. + client_result = ::Google::Cloud::Developerconnect::V1::InsightsConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_insights_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::ServiceStub.stub :transcode_get_insights_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_insights_config_client_stub do + # Create client + client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_insights_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_insights_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_insights_config ::Google::Cloud::Developerconnect::V1::GetInsightsConfigRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_insights_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_insights_config(::Google::Cloud::Developerconnect::V1::GetInsightsConfigRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_insights_config_client_stub.call_count + end + end + end + + def test_update_insights_config + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + insights_config = {} + request_id = "hello world" + allow_missing = true + validate_only = true + + update_insights_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::ServiceStub.stub :transcode_update_insights_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_insights_config_client_stub do + # Create client + client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_insights_config({ insights_config: insights_config, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_insights_config insights_config: insights_config, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_insights_config ::Google::Cloud::Developerconnect::V1::UpdateInsightsConfigRequest.new(insights_config: insights_config, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_insights_config({ insights_config: insights_config, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_insights_config(::Google::Cloud::Developerconnect::V1::UpdateInsightsConfigRequest.new(insights_config: insights_config, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_insights_config_client_stub.call_count + end + end + end + + def test_delete_insights_config + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + validate_only = true + etag = "hello world" + + delete_insights_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::ServiceStub.stub :transcode_delete_insights_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_insights_config_client_stub do + # Create client + client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_insights_config({ name: name, request_id: request_id, validate_only: validate_only, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_insights_config name: name, request_id: request_id, validate_only: validate_only, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_insights_config ::Google::Cloud::Developerconnect::V1::DeleteInsightsConfigRequest.new(name: name, request_id: request_id, validate_only: validate_only, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_insights_config({ name: name, request_id: request_id, validate_only: validate_only, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_insights_config(::Google::Cloud::Developerconnect::V1::DeleteInsightsConfigRequest.new(name: name, request_id: request_id, validate_only: validate_only, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_insights_config_client_stub.call_count + end + end + end + + def test_get_deployment_event + # Create test objects. + client_result = ::Google::Cloud::Developerconnect::V1::DeploymentEvent.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_deployment_event_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::ServiceStub.stub :transcode_get_deployment_event_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_deployment_event_client_stub do + # Create client + client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_deployment_event({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_deployment_event name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_deployment_event ::Google::Cloud::Developerconnect::V1::GetDeploymentEventRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_deployment_event({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_deployment_event(::Google::Cloud::Developerconnect::V1::GetDeploymentEventRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_deployment_event_client_stub.call_count + end + end + end + + def test_list_deployment_events + # Create test objects. + client_result = ::Google::Cloud::Developerconnect::V1::ListDeploymentEventsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_deployment_events_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::ServiceStub.stub :transcode_list_deployment_events_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_deployment_events_client_stub do + # Create client + client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_deployment_events({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_deployment_events parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_deployment_events ::Google::Cloud::Developerconnect::V1::ListDeploymentEventsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_deployment_events({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_deployment_events(::Google::Cloud::Developerconnect::V1::ListDeploymentEventsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_deployment_events_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_test.rb b/owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_test.rb new file mode 100644 index 000000000000..f1702220ee8e --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_test.rb @@ -0,0 +1,581 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/developerconnect/v1/insights_config_pb" +require "google/cloud/developerconnect/v1/insights_config_service" + +class ::Google::Cloud::Developerconnect::V1::InsightsConfigService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_insights_configs + # Create GRPC objects. + grpc_response = ::Google::Cloud::Developerconnect::V1::ListInsightsConfigsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_insights_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_insights_configs, name + assert_kind_of ::Google::Cloud::Developerconnect::V1::ListInsightsConfigsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_insights_configs_client_stub do + # Create client + client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_insights_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_insights_configs parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_insights_configs ::Google::Cloud::Developerconnect::V1::ListInsightsConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_insights_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_insights_configs(::Google::Cloud::Developerconnect::V1::ListInsightsConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_insights_configs_client_stub.call_rpc_count + end + end + + def test_create_insights_config + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + insights_config_id = "hello world" + insights_config = {} + validate_only = true + + create_insights_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_insights_config, name + assert_kind_of ::Google::Cloud::Developerconnect::V1::CreateInsightsConfigRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["insights_config_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Developerconnect::V1::InsightsConfig), request["insights_config"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_insights_config_client_stub do + # Create client + client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_insights_config({ parent: parent, insights_config_id: insights_config_id, insights_config: insights_config, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_insights_config parent: parent, insights_config_id: insights_config_id, insights_config: insights_config, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_insights_config ::Google::Cloud::Developerconnect::V1::CreateInsightsConfigRequest.new(parent: parent, insights_config_id: insights_config_id, insights_config: insights_config, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_insights_config({ parent: parent, insights_config_id: insights_config_id, insights_config: insights_config, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_insights_config(::Google::Cloud::Developerconnect::V1::CreateInsightsConfigRequest.new(parent: parent, insights_config_id: insights_config_id, insights_config: insights_config, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_insights_config_client_stub.call_rpc_count + end + end + + def test_get_insights_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::Developerconnect::V1::InsightsConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_insights_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_insights_config, name + assert_kind_of ::Google::Cloud::Developerconnect::V1::GetInsightsConfigRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_insights_config_client_stub do + # Create client + client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_insights_config({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_insights_config name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_insights_config ::Google::Cloud::Developerconnect::V1::GetInsightsConfigRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_insights_config({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_insights_config(::Google::Cloud::Developerconnect::V1::GetInsightsConfigRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_insights_config_client_stub.call_rpc_count + end + end + + def test_update_insights_config + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + insights_config = {} + request_id = "hello world" + allow_missing = true + validate_only = true + + update_insights_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_insights_config, name + assert_kind_of ::Google::Cloud::Developerconnect::V1::UpdateInsightsConfigRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Developerconnect::V1::InsightsConfig), request["insights_config"] + assert_equal "hello world", request["request_id"] + assert_equal true, request["allow_missing"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_insights_config_client_stub do + # Create client + client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_insights_config({ insights_config: insights_config, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_insights_config insights_config: insights_config, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_insights_config ::Google::Cloud::Developerconnect::V1::UpdateInsightsConfigRequest.new(insights_config: insights_config, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_insights_config({ insights_config: insights_config, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_insights_config(::Google::Cloud::Developerconnect::V1::UpdateInsightsConfigRequest.new(insights_config: insights_config, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_insights_config_client_stub.call_rpc_count + end + end + + def test_delete_insights_config + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + validate_only = true + etag = "hello world" + + delete_insights_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_insights_config, name + assert_kind_of ::Google::Cloud::Developerconnect::V1::DeleteInsightsConfigRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + assert_equal true, request["validate_only"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_insights_config_client_stub do + # Create client + client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_insights_config({ name: name, request_id: request_id, validate_only: validate_only, etag: etag }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_insights_config name: name, request_id: request_id, validate_only: validate_only, etag: etag do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_insights_config ::Google::Cloud::Developerconnect::V1::DeleteInsightsConfigRequest.new(name: name, request_id: request_id, validate_only: validate_only, etag: etag) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_insights_config({ name: name, request_id: request_id, validate_only: validate_only, etag: etag }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_insights_config(::Google::Cloud::Developerconnect::V1::DeleteInsightsConfigRequest.new(name: name, request_id: request_id, validate_only: validate_only, etag: etag), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_insights_config_client_stub.call_rpc_count + end + end + + def test_get_deployment_event + # Create GRPC objects. + grpc_response = ::Google::Cloud::Developerconnect::V1::DeploymentEvent.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_deployment_event_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_deployment_event, name + assert_kind_of ::Google::Cloud::Developerconnect::V1::GetDeploymentEventRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_deployment_event_client_stub do + # Create client + client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_deployment_event({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_deployment_event name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_deployment_event ::Google::Cloud::Developerconnect::V1::GetDeploymentEventRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_deployment_event({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_deployment_event(::Google::Cloud::Developerconnect::V1::GetDeploymentEventRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_deployment_event_client_stub.call_rpc_count + end + end + + def test_list_deployment_events + # Create GRPC objects. + grpc_response = ::Google::Cloud::Developerconnect::V1::ListDeploymentEventsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_deployment_events_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_deployment_events, name + assert_kind_of ::Google::Cloud::Developerconnect::V1::ListDeploymentEventsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_deployment_events_client_stub do + # Create client + client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_deployment_events({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_deployment_events parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_deployment_events ::Google::Cloud::Developerconnect::V1::ListDeploymentEventsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_deployment_events({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_deployment_events(::Google::Cloud::Developerconnect::V1::ListDeploymentEventsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_deployment_events_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client, client + assert_equal creds, client.configure.credentials + end + end + + def test_operations_client + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/test/helper.rb b/owl-bot-staging/google-cloud-developer_connect-v1/test/helper.rb new file mode 100644 index 000000000000..f0e715458fa2 --- /dev/null +++ b/owl-bot-staging/google-cloud-developer_connect-v1/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct" From eaa413b782e0c264f451e0e1c66f0c31ff7950fe Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 20 Feb 2026 00:06:40 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .../.owlbot-manifest.json | 4 + .../gapic_metadata.json | 20 + .../v1/developer_connect/client.rb | 199 +- .../v1/developer_connect/paths.rb | 65 +- .../v1/developer_connect/rest/client.rb | 185 +- .../v1/developer_connect/rest/service_stub.rb | 122 + .../v1/developer_connect_pb.rb | 12 +- .../v1/developer_connect_services_pb.rb | 9 +- .../developerconnect/v1/insights_config_pb.rb | 11 +- .../v1/insights_config_service.rb | 2 +- .../v1/insights_config_service/client.rb | 212 +- .../v1/insights_config_service/paths.rb | 21 + .../v1/insights_config_service/rest.rb | 2 +- .../v1/insights_config_service/rest/client.rb | 198 +- .../rest/service_stub.rb | 122 + .../v1/insights_config_services_pb.rb | 8 +- .../developerconnect/v1/developer_connect.rb | 233 +- .../developerconnect/v1/insights_config.rb | 211 +- .../developer_connect/finish_o_auth.rb | 0 .../developer_connect/start_o_auth.rb | 0 .../get_deployment_event.rb | 0 .../list_deployment_events.rb | 0 ...data_google.cloud.developerconnect.v1.json | 160 + .../v1/developer_connect_paths_test.rb | 15 + .../v1/developer_connect_rest_test.rb | 109 + .../v1/developer_connect_test.rb | 119 + .../v1/insights_config_service_paths_test.rb | 12 + .../v1/insights_config_service_rest_test.rb | 111 + .../v1/insights_config_service_test.rb | 127 + .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../google-cloud-developer_connect-v1/Gemfile | 11 - .../LICENSE.md | 201 - .../README.md | 154 - .../Rakefile | 169 - .../gapic_metadata.json | 192 - .../google-cloud-developer_connect-v1.gemspec | 29 - .../lib/google-cloud-developer_connect-v1.rb | 21 - .../lib/google/cloud/developer_connect/v1.rb | 46 - .../developer_connect/v1/bindings_override.rb | 75 - .../developer_connect/v1/developer_connect.rb | 56 - .../v1/developer_connect/client.rb | 3259 ----------------- .../v1/developer_connect/credentials.rb | 47 - .../v1/developer_connect/operations.rb | 841 ----- .../v1/developer_connect/paths.rb | 236 -- .../v1/developer_connect/rest.rb | 54 - .../v1/developer_connect/rest/client.rb | 3042 --------------- .../v1/developer_connect/rest/operations.rb | 925 ----- .../v1/developer_connect/rest/service_stub.rb | 1675 --------- .../google/cloud/developer_connect/v1/rest.rb | 39 - .../cloud/developer_connect/v1/version.rb | 28 - .../v1/developer_connect_pb.rb | 122 - .../v1/developer_connect_services_pb.rb | 104 - .../developerconnect/v1/insights_config_pb.rb | 78 - .../v1/insights_config_service.rb | 64 - .../v1/insights_config_service/client.rb | 1181 ------ .../v1/insights_config_service/credentials.rb | 47 - .../v1/insights_config_service/operations.rb | 841 ----- .../v1/insights_config_service/paths.rb | 90 - .../v1/insights_config_service/rest.rb | 62 - .../v1/insights_config_service/rest/client.rb | 1097 ------ .../rest/operations.rb | 925 ----- .../rest/service_stub.rb | 510 --- .../v1/insights_config_services_pb.rb | 65 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 473 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/field_info.rb | 88 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../developerconnect/v1/developer_connect.rb | 1581 -------- .../developerconnect/v1/insights_config.rb | 556 --- .../google/longrunning/operations.rb | 191 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 -- .../proto_docs/google/protobuf/timestamp.rb | 127 - .../proto_docs/google/rpc/status.rb | 48 - .../snippets/Gemfile | 32 - .../create_account_connector.rb | 54 - .../developer_connect/create_connection.rb | 54 - .../create_git_repository_link.rb | 54 - .../delete_account_connector.rb | 54 - .../developer_connect/delete_connection.rb | 54 - .../delete_git_repository_link.rb | 54 - .../snippets/developer_connect/delete_self.rb | 54 - .../snippets/developer_connect/delete_user.rb | 54 - .../developer_connect/fetch_access_token.rb | 47 - .../fetch_git_hub_installations.rb | 47 - .../developer_connect/fetch_git_refs.rb | 47 - .../fetch_linkable_git_repositories.rb | 51 - .../developer_connect/fetch_read_token.rb | 47 - .../fetch_read_write_token.rb | 47 - .../snippets/developer_connect/fetch_self.rb | 47 - .../get_account_connector.rb | 47 - .../developer_connect/get_connection.rb | 47 - .../get_git_repository_link.rb | 47 - .../list_account_connectors.rb | 51 - .../developer_connect/list_connections.rb | 51 - .../list_git_repository_links.rb | 51 - .../snippets/developer_connect/list_users.rb | 51 - .../update_account_connector.rb | 54 - .../developer_connect/update_connection.rb | 54 - .../create_insights_config.rb | 54 - .../delete_insights_config.rb | 54 - .../get_insights_config.rb | 47 - .../list_insights_configs.rb | 51 - .../update_insights_config.rb | 54 - ...data_google.cloud.developerconnect.v1.json | 1335 ------- .../v1/developer_connect_operations_test.rb | 400 -- .../v1/developer_connect_paths_test.rb | 154 - .../v1/developer_connect_rest_test.rb | 1558 -------- .../v1/developer_connect_test.rb | 1812 --------- ...insights_config_service_operations_test.rb | 400 -- .../v1/insights_config_service_paths_test.rb | 79 - .../v1/insights_config_service_rest_test.rb | 493 --- .../v1/insights_config_service_test.rb | 581 --- .../test/helper.rb | 25 - 124 files changed, 2240 insertions(+), 28875 deletions(-) rename {owl-bot-staging/google-cloud-developer_connect-v1 => google-cloud-developer_connect-v1}/snippets/developer_connect/finish_o_auth.rb (100%) rename {owl-bot-staging/google-cloud-developer_connect-v1 => google-cloud-developer_connect-v1}/snippets/developer_connect/start_o_auth.rb (100%) rename {owl-bot-staging/google-cloud-developer_connect-v1 => google-cloud-developer_connect-v1}/snippets/insights_config_service/get_deployment_event.rb (100%) rename {owl-bot-staging/google-cloud-developer_connect-v1 => google-cloud-developer_connect-v1}/snippets/insights_config_service/list_deployment_events.rb (100%) delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/google-cloud-developer_connect-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/lib/google-cloud-developer_connect-v1.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/bindings_override.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/client.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/operations.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/paths.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/rest.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/developer_connect_pb.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/developer_connect_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_pb.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/api/field_info.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/cloud/developerconnect/v1/developer_connect.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/cloud/developerconnect/v1/insights_config.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/create_account_connector.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/create_connection.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/create_git_repository_link.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/delete_account_connector.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/delete_connection.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/delete_git_repository_link.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/delete_self.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/delete_user.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/fetch_access_token.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/fetch_git_hub_installations.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/fetch_git_refs.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/fetch_linkable_git_repositories.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/fetch_read_token.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/fetch_read_write_token.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/fetch_self.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/get_account_connector.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/get_connection.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/get_git_repository_link.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/list_account_connectors.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/list_connections.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/list_git_repository_links.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/list_users.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/update_account_connector.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/update_connection.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/insights_config_service/create_insights_config.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/insights_config_service/delete_insights_config.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/insights_config_service/get_insights_config.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/insights_config_service/list_insights_configs.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/insights_config_service/update_insights_config.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/snippets/snippet_metadata_google.cloud.developerconnect.v1.json delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developer_connect/v1/developer_connect_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developer_connect/v1/developer_connect_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developer_connect/v1/developer_connect_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developer_connect/v1/developer_connect_test.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-developer_connect-v1/test/helper.rb diff --git a/google-cloud-developer_connect-v1/.owlbot-manifest.json b/google-cloud-developer_connect-v1/.owlbot-manifest.json index 7e6f16b594f7..853b70d2c296 100644 --- a/google-cloud-developer_connect-v1/.owlbot-manifest.json +++ b/google-cloud-developer_connect-v1/.owlbot-manifest.json @@ -71,6 +71,7 @@ "snippets/developer_connect/fetch_read_token.rb", "snippets/developer_connect/fetch_read_write_token.rb", "snippets/developer_connect/fetch_self.rb", + "snippets/developer_connect/finish_o_auth.rb", "snippets/developer_connect/get_account_connector.rb", "snippets/developer_connect/get_connection.rb", "snippets/developer_connect/get_git_repository_link.rb", @@ -78,11 +79,14 @@ "snippets/developer_connect/list_connections.rb", "snippets/developer_connect/list_git_repository_links.rb", "snippets/developer_connect/list_users.rb", + "snippets/developer_connect/start_o_auth.rb", "snippets/developer_connect/update_account_connector.rb", "snippets/developer_connect/update_connection.rb", "snippets/insights_config_service/create_insights_config.rb", "snippets/insights_config_service/delete_insights_config.rb", + "snippets/insights_config_service/get_deployment_event.rb", "snippets/insights_config_service/get_insights_config.rb", + "snippets/insights_config_service/list_deployment_events.rb", "snippets/insights_config_service/list_insights_configs.rb", "snippets/insights_config_service/update_insights_config.rb", "snippets/snippet_metadata_google.cloud.developerconnect.v1.json", diff --git a/google-cloud-developer_connect-v1/gapic_metadata.json b/google-cloud-developer_connect-v1/gapic_metadata.json index 5d05627c8b48..15e3038a8897 100644 --- a/google-cloud-developer_connect-v1/gapic_metadata.json +++ b/google-cloud-developer_connect-v1/gapic_metadata.json @@ -129,6 +129,16 @@ "methods": [ "delete_self" ] + }, + "StartOAuth": { + "methods": [ + "start_o_auth" + ] + }, + "FinishOAuth": { + "methods": [ + "finish_o_auth" + ] } } } @@ -163,6 +173,16 @@ "methods": [ "delete_insights_config" ] + }, + "GetDeploymentEvent": { + "methods": [ + "get_deployment_event" + ] + }, + "ListDeploymentEvents": { + "methods": [ + "list_deployment_events" + ] } } } diff --git a/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/client.rb b/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/client.rb index 493624d6bb5a..5a255d86d03c 100644 --- a/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/client.rb +++ b/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/client.rb @@ -814,8 +814,9 @@ def delete_connection request, options = nil # Creates a GitRepositoryLink. Upon linking a Git Repository, Developer # Connect will configure the Git Repository to send webhook events to # Developer Connect. Connections that use Firebase GitHub Application will - # have events forwarded to the Firebase service. All other Connections will - # have events forwarded to Cloud Build. + # have events forwarded to the Firebase service. Connections that use Gemini + # Code Assist will have events forwarded to Gemini Code Assist service. All + # other Connections will have events forwarded to Cloud Build. # # @overload create_git_repository_link(request, options = nil) # Pass arguments to `create_git_repository_link` via a request object, either of type @@ -2697,6 +2698,186 @@ def delete_self request, options = nil raise ::Google::Cloud::Error.from_error(e) end + ## + # Starts OAuth flow for an account connector. + # + # @overload start_o_auth(request, options = nil) + # Pass arguments to `start_o_auth` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::StartOAuthRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::StartOAuthRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload start_o_auth(account_connector: nil) + # Pass arguments to `start_o_auth` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param account_connector [::String] + # Required. The resource name of the AccountConnector in the format + # `projects/*/locations/*/accountConnectors/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::DeveloperConnect::V1::StartOAuthResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::DeveloperConnect::V1::StartOAuthResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::StartOAuthRequest.new + # + # # Call the start_o_auth method. + # result = client.start_o_auth request + # + # # The returned object is of type Google::Cloud::DeveloperConnect::V1::StartOAuthResponse. + # p result + # + def start_o_auth request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::StartOAuthRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.start_o_auth.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.account_connector + header_params["account_connector"] = request.account_connector + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.start_o_auth.timeout, + metadata: metadata, + retry_policy: @config.rpcs.start_o_auth.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.call_rpc :start_o_auth, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Finishes OAuth flow for an account connector. + # + # @overload finish_o_auth(request, options = nil) + # Pass arguments to `finish_o_auth` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload finish_o_auth(oauth_params: nil, google_oauth_params: nil, account_connector: nil) + # Pass arguments to `finish_o_auth` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param oauth_params [::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest::OAuthParams, ::Hash] + # The params returned by non-Google OAuth 2.0 flow redirect. + # + # Note: The following parameters are mutually exclusive: `oauth_params`, `google_oauth_params`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param google_oauth_params [::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest::GoogleOAuthParams, ::Hash] + # The params returned by Google OAuth flow redirects. + # + # Note: The following parameters are mutually exclusive: `google_oauth_params`, `oauth_params`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param account_connector [::String] + # Required. The resource name of the AccountConnector in the format + # `projects/*/locations/*/accountConnectors/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::DeveloperConnect::V1::FinishOAuthResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::DeveloperConnect::V1::FinishOAuthResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest.new + # + # # Call the finish_o_auth method. + # result = client.finish_o_auth request + # + # # The returned object is of type Google::Cloud::DeveloperConnect::V1::FinishOAuthResponse. + # p result + # + def finish_o_auth request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.finish_o_auth.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.account_connector + header_params["account_connector"] = request.account_connector + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.finish_o_auth.timeout, + metadata: metadata, + retry_policy: @config.rpcs.finish_o_auth.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.call_rpc :finish_o_auth, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + ## # Configuration class for the DeveloperConnect API. # @@ -3000,6 +3181,16 @@ class Rpcs # @return [::Gapic::Config::Method] # attr_reader :delete_self + ## + # RPC-specific configuration for `start_o_auth` + # @return [::Gapic::Config::Method] + # + attr_reader :start_o_auth + ## + # RPC-specific configuration for `finish_o_auth` + # @return [::Gapic::Config::Method] + # + attr_reader :finish_o_auth # @private def initialize parent_rpcs = nil @@ -3051,6 +3242,10 @@ def initialize parent_rpcs = nil @fetch_self = ::Gapic::Config::Method.new fetch_self_config delete_self_config = parent_rpcs.delete_self if parent_rpcs.respond_to? :delete_self @delete_self = ::Gapic::Config::Method.new delete_self_config + start_o_auth_config = parent_rpcs.start_o_auth if parent_rpcs.respond_to? :start_o_auth + @start_o_auth = ::Gapic::Config::Method.new start_o_auth_config + finish_o_auth_config = parent_rpcs.finish_o_auth if parent_rpcs.respond_to? :finish_o_auth + @finish_o_auth = ::Gapic::Config::Method.new finish_o_auth_config yield self if block_given? end diff --git a/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/paths.rb b/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/paths.rb index b36358f00311..03d70818f7c5 100644 --- a/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/paths.rb +++ b/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/paths.rb @@ -104,6 +104,25 @@ def git_repository_link_path project:, location:, connection:, git_repository_li "projects/#{project}/locations/#{location}/connections/#{connection}/gitRepositoryLinks/#{git_repository_link}" end + ## + # Create a fully-qualified Instance resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # + # @return [::String] + def instance_path project:, location:, instance: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}" + end + ## # Create a fully-qualified Location resource string. # @@ -124,20 +143,46 @@ def location_path project:, location: ## # Create a fully-qualified SecretVersion resource string. # - # The resource will be in the following format: + # @overload secret_version_path(project:, secret:, secret_version:) + # The resource will be in the following format: # - # `projects/{project}/secrets/{secret}/versions/{secret_version}` + # `projects/{project}/secrets/{secret}/versions/{secret_version}` # - # @param project [String] - # @param secret [String] - # @param secret_version [String] + # @param project [String] + # @param secret [String] + # @param secret_version [String] + # + # @overload secret_version_path(project:, location:, secret:, secret_version:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/secrets/{secret}/versions/{secret_version}` + # + # @param project [String] + # @param location [String] + # @param secret [String] + # @param secret_version [String] # # @return [::String] - def secret_version_path project:, secret:, secret_version: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "secret cannot contain /" if secret.to_s.include? "/" - - "projects/#{project}/secrets/#{secret}/versions/#{secret_version}" + def secret_version_path **args + resources = { + "project:secret:secret_version" => (proc do |project:, secret:, secret_version:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "secret cannot contain /" if secret.to_s.include? "/" + + "projects/#{project}/secrets/#{secret}/versions/#{secret_version}" + end), + "location:project:secret:secret_version" => (proc do |project:, location:, secret:, secret_version:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "secret cannot contain /" if secret.to_s.include? "/" + + "projects/#{project}/locations/#{location}/secrets/#{secret}/versions/#{secret_version}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) end ## diff --git a/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/rest/client.rb b/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/rest/client.rb index 1e6a67595680..bfae2a68eb8c 100644 --- a/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/rest/client.rb +++ b/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/rest/client.rb @@ -773,8 +773,9 @@ def delete_connection request, options = nil # Creates a GitRepositoryLink. Upon linking a Git Repository, Developer # Connect will configure the Git Repository to send webhook events to # Developer Connect. Connections that use Firebase GitHub Application will - # have events forwarded to the Firebase service. All other Connections will - # have events forwarded to Cloud Build. + # have events forwarded to the Firebase service. Connections that use Gemini + # Code Assist will have events forwarded to Gemini Code Assist service. All + # other Connections will have events forwarded to Cloud Build. # # @overload create_git_repository_link(request, options = nil) # Pass arguments to `create_git_repository_link` via a request object, either of type @@ -2523,6 +2524,172 @@ def delete_self request, options = nil raise ::Google::Cloud::Error.from_error(e) end + ## + # Starts OAuth flow for an account connector. + # + # @overload start_o_auth(request, options = nil) + # Pass arguments to `start_o_auth` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::StartOAuthRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::StartOAuthRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload start_o_auth(account_connector: nil) + # Pass arguments to `start_o_auth` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param account_connector [::String] + # Required. The resource name of the AccountConnector in the format + # `projects/*/locations/*/accountConnectors/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::StartOAuthResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DeveloperConnect::V1::StartOAuthResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::StartOAuthRequest.new + # + # # Call the start_o_auth method. + # result = client.start_o_auth request + # + # # The returned object is of type Google::Cloud::DeveloperConnect::V1::StartOAuthResponse. + # p result + # + def start_o_auth request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::StartOAuthRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.start_o_auth.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.start_o_auth.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.start_o_auth.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.start_o_auth request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Finishes OAuth flow for an account connector. + # + # @overload finish_o_auth(request, options = nil) + # Pass arguments to `finish_o_auth` via a request object, either of type + # {::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload finish_o_auth(oauth_params: nil, google_oauth_params: nil, account_connector: nil) + # Pass arguments to `finish_o_auth` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param oauth_params [::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest::OAuthParams, ::Hash] + # The params returned by non-Google OAuth 2.0 flow redirect. + # + # Note: The following parameters are mutually exclusive: `oauth_params`, `google_oauth_params`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param google_oauth_params [::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest::GoogleOAuthParams, ::Hash] + # The params returned by Google OAuth flow redirects. + # + # Note: The following parameters are mutually exclusive: `google_oauth_params`, `oauth_params`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param account_connector [::String] + # Required. The resource name of the AccountConnector in the format + # `projects/*/locations/*/accountConnectors/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::FinishOAuthResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DeveloperConnect::V1::FinishOAuthResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest.new + # + # # Call the finish_o_auth method. + # result = client.finish_o_auth request + # + # # The returned object is of type Google::Cloud::DeveloperConnect::V1::FinishOAuthResponse. + # p result + # + def finish_o_auth request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.finish_o_auth.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.finish_o_auth.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.finish_o_auth.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @developer_connect_stub.finish_o_auth request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + ## # Configuration class for the DeveloperConnect REST API. # @@ -2796,6 +2963,16 @@ class Rpcs # @return [::Gapic::Config::Method] # attr_reader :delete_self + ## + # RPC-specific configuration for `start_o_auth` + # @return [::Gapic::Config::Method] + # + attr_reader :start_o_auth + ## + # RPC-specific configuration for `finish_o_auth` + # @return [::Gapic::Config::Method] + # + attr_reader :finish_o_auth # @private def initialize parent_rpcs = nil @@ -2847,6 +3024,10 @@ def initialize parent_rpcs = nil @fetch_self = ::Gapic::Config::Method.new fetch_self_config delete_self_config = parent_rpcs.delete_self if parent_rpcs.respond_to? :delete_self @delete_self = ::Gapic::Config::Method.new delete_self_config + start_o_auth_config = parent_rpcs.start_o_auth if parent_rpcs.respond_to? :start_o_auth + @start_o_auth = ::Gapic::Config::Method.new start_o_auth_config + finish_o_auth_config = parent_rpcs.finish_o_auth if parent_rpcs.respond_to? :finish_o_auth + @finish_o_auth = ::Gapic::Config::Method.new finish_o_auth_config yield self if block_given? end diff --git a/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/rest/service_stub.rb b/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/rest/service_stub.rb index 48181d92aba3..04c485c60174 100644 --- a/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/rest/service_stub.rb +++ b/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/rest/service_stub.rb @@ -1033,6 +1033,86 @@ def delete_self request_pb, options = nil end end + ## + # Baseline implementation for the start_o_auth REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::StartOAuthRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::StartOAuthResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DeveloperConnect::V1::StartOAuthResponse] + # A result object deserialized from the server's reply + def start_o_auth request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_start_o_auth_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "start_o_auth", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::DeveloperConnect::V1::StartOAuthResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the finish_o_auth REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::FinishOAuthResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DeveloperConnect::V1::FinishOAuthResponse] + # A result object deserialized from the server's reply + def finish_o_auth request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_finish_o_auth_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "finish_o_auth", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::DeveloperConnect::V1::FinishOAuthResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + ## # @private # @@ -1544,6 +1624,48 @@ def self.transcode_delete_self_request request_pb ) transcoder.transcode request_pb end + + ## + # @private + # + # GRPC transcoding helper method for the start_o_auth REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::StartOAuthRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_start_o_auth_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{account_connector}/users:startOAuthFlow", + matches: [ + ["account_connector", %r{^projects/[^/]+/locations/[^/]+/accountConnectors/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the finish_o_auth REST call + # + # @param request_pb [::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_finish_o_auth_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{account_connector}/users:finishOAuthFlow", + matches: [ + ["account_connector", %r{^projects/[^/]+/locations/[^/]+/accountConnectors/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end end end end diff --git a/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/developer_connect_pb.rb b/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/developer_connect_pb.rb index b59eb7b4f21d..4a5e4409d71d 100644 --- a/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/developer_connect_pb.rb +++ b/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/developer_connect_pb.rb @@ -15,7 +15,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n8google/cloud/developerconnect/v1/developer_connect.proto\x12 google.cloud.developerconnect.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xad\x01\n\x10ListUsersRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$developerconnect.googleapis.com/User\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"x\n\x11ListUsersResponse\x12\x35\n\x05users\x18\x01 \x03(\x0b\x32&.google.cloud.developerconnect.v1.User\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xd7\x0b\n\nConnection\x12G\n\rgithub_config\x18\x05 \x01(\x0b\x32..google.cloud.developerconnect.v1.GitHubConfigH\x00\x12\\\n\x18github_enterprise_config\x18\r \x01(\x0b\x32\x38.google.cloud.developerconnect.v1.GitHubEnterpriseConfigH\x00\x12G\n\rgitlab_config\x18\x0e \x01(\x0b\x32..google.cloud.developerconnect.v1.GitLabConfigH\x00\x12\\\n\x18gitlab_enterprise_config\x18\x10 \x01(\x0b\x32\x38.google.cloud.developerconnect.v1.GitLabEnterpriseConfigH\x00\x12\x63\n\x1c\x62itbucket_data_center_config\x18\x11 \x01(\x0b\x32;.google.cloud.developerconnect.v1.BitbucketDataCenterConfigH\x00\x12X\n\x16\x62itbucket_cloud_config\x18\x12 \x01(\x0b\x32\x36.google.cloud.developerconnect.v1.BitbucketCloudConfigH\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12M\n\x06labels\x18\x04 \x03(\x0b\x32\x38.google.cloud.developerconnect.v1.Connection.LabelsEntryB\x03\xe0\x41\x01\x12T\n\x12installation_state\x18\x06 \x01(\x0b\x32\x33.google.cloud.developerconnect.v1.InstallationStateB\x03\xe0\x41\x03\x12\x15\n\x08\x64isabled\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01\x12\x18\n\x0breconciling\x18\x08 \x01(\x08\x42\x03\xe0\x41\x03\x12W\n\x0b\x61nnotations\x18\t \x03(\x0b\x32=.google.cloud.developerconnect.v1.Connection.AnnotationsEntryB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\n \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x03uid\x18\x0c \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12Q\n\x11\x63rypto_key_config\x18\x0f \x01(\x0b\x32\x31.google.cloud.developerconnect.v1.CryptoKeyConfigB\x03\xe0\x41\x01\x12O\n\x10git_proxy_config\x18\x13 \x01(\x0b\x32\x30.google.cloud.developerconnect.v1.GitProxyConfigB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x8e\x01\xea\x41\x8a\x01\n*developerconnect.googleapis.com/Connection\x12@projects/{project}/locations/{location}/connections/{connection}*\x0b\x63onnections2\nconnectionR\x01\x01\x42\x13\n\x11\x63onnection_config\"S\n\x0f\x43ryptoKeyConfig\x12@\n\rkey_reference\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\"&\n\x0eGitProxyConfig\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\"\x88\x02\n\x11InstallationState\x12M\n\x05stage\x18\x01 \x01(\x0e\x32\x39.google.cloud.developerconnect.v1.InstallationState.StageB\x03\xe0\x41\x03\x12\x14\n\x07message\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\naction_uri\x18\x03 \x01(\tB\x03\xe0\x41\x03\"u\n\x05Stage\x12\x15\n\x11STAGE_UNSPECIFIED\x10\x00\x12\x16\n\x12PENDING_CREATE_APP\x10\x01\x12\x16\n\x12PENDING_USER_OAUTH\x10\x02\x12\x17\n\x13PENDING_INSTALL_APP\x10\x03\x12\x0c\n\x08\x43OMPLETE\x10\n\"\xcb\x02\n\x0cGitHubConfig\x12T\n\ngithub_app\x18\x01 \x01(\x0e\x32\x38.google.cloud.developerconnect.v1.GitHubConfig.GitHubAppB\x06\xe0\x41\x02\xe0\x41\x05\x12U\n\x15\x61uthorizer_credential\x18\x02 \x01(\x0b\x32\x31.google.cloud.developerconnect.v1.OAuthCredentialB\x03\xe0\x41\x01\x12 \n\x13\x61pp_installation_id\x18\x03 \x01(\x03\x42\x03\xe0\x41\x01\x12\x1d\n\x10installation_uri\x18\x04 \x01(\tB\x03\xe0\x41\x03\"M\n\tGitHubApp\x12\x1b\n\x17GIT_HUB_APP_UNSPECIFIED\x10\x00\x12\x15\n\x11\x44\x45VELOPER_CONNECT\x10\x01\x12\x0c\n\x08\x46IREBASE\x10\x02\"\xee\x03\n\x16GitHubEnterpriseConfig\x12\x15\n\x08host_uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06\x61pp_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01\x12\x15\n\x08\x61pp_slug\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12V\n\x1aprivate_key_secret_version\x18\x04 \x01(\tB2\xe0\x41\x01\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12Y\n\x1dwebhook_secret_secret_version\x18\x05 \x01(\tB2\xe0\x41\x01\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12 \n\x13\x61pp_installation_id\x18\x08 \x01(\x03\x42\x03\xe0\x41\x01\x12\x1d\n\x10installation_uri\x18\t \x01(\tB\x03\xe0\x41\x03\x12_\n\x18service_directory_config\x18\n \x01(\x0b\x32\x38.google.cloud.developerconnect.v1.ServiceDirectoryConfigB\x03\xe0\x41\x01\x12\x1b\n\x0eserver_version\x18\x0c \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x12ssl_ca_certificate\x18\x0e \x01(\tB\x03\xe0\x41\x01\"Z\n\x16ServiceDirectoryConfig\x12@\n\x07service\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'servicedirectory.googleapis.com/Service\"\x80\x01\n\x0fOAuthCredential\x12V\n\x1aoauth_token_secret_version\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12\x15\n\x08username\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\x9d\x02\n\x0cGitLabConfig\x12\\\n\x1dwebhook_secret_secret_version\x18\x01 \x01(\tB5\xe0\x41\x02\xe0\x41\x05\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12Y\n\x1aread_authorizer_credential\x18\x02 \x01(\x0b\x32\x30.google.cloud.developerconnect.v1.UserCredentialB\x03\xe0\x41\x02\x12T\n\x15\x61uthorizer_credential\x18\x03 \x01(\x0b\x32\x30.google.cloud.developerconnect.v1.UserCredentialB\x03\xe0\x41\x02\"~\n\x0eUserCredential\x12U\n\x19user_token_secret_version\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12\x15\n\x08username\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\xdd\x03\n\x16GitLabEnterpriseConfig\x12\x15\n\x08host_uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\\\n\x1dwebhook_secret_secret_version\x18\x02 \x01(\tB5\xe0\x41\x02\xe0\x41\x05\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12Y\n\x1aread_authorizer_credential\x18\x03 \x01(\x0b\x32\x30.google.cloud.developerconnect.v1.UserCredentialB\x03\xe0\x41\x02\x12T\n\x15\x61uthorizer_credential\x18\x04 \x01(\x0b\x32\x30.google.cloud.developerconnect.v1.UserCredentialB\x03\xe0\x41\x02\x12_\n\x18service_directory_config\x18\x05 \x01(\x0b\x32\x38.google.cloud.developerconnect.v1.ServiceDirectoryConfigB\x03\xe0\x41\x01\x12\x1f\n\x12ssl_ca_certificate\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0eserver_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\"\xe0\x03\n\x19\x42itbucketDataCenterConfig\x12\x15\n\x08host_uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\\\n\x1dwebhook_secret_secret_version\x18\x02 \x01(\tB5\xe0\x41\x02\xe0\x41\x05\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12Y\n\x1aread_authorizer_credential\x18\x03 \x01(\x0b\x32\x30.google.cloud.developerconnect.v1.UserCredentialB\x03\xe0\x41\x02\x12T\n\x15\x61uthorizer_credential\x18\x04 \x01(\x0b\x32\x30.google.cloud.developerconnect.v1.UserCredentialB\x03\xe0\x41\x02\x12_\n\x18service_directory_config\x18\x05 \x01(\x0b\x32\x38.google.cloud.developerconnect.v1.ServiceDirectoryConfigB\x03\xe0\x41\x01\x12\x1f\n\x12ssl_ca_certificate\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0eserver_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\"\xbd\x02\n\x14\x42itbucketCloudConfig\x12\x16\n\tworkspace\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\\\n\x1dwebhook_secret_secret_version\x18\x02 \x01(\tB5\xe0\x41\x02\xe0\x41\x05\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12Y\n\x1aread_authorizer_credential\x18\x03 \x01(\x0b\x32\x30.google.cloud.developerconnect.v1.UserCredentialB\x03\xe0\x41\x02\x12T\n\x15\x61uthorizer_credential\x18\x04 \x01(\x0b\x32\x30.google.cloud.developerconnect.v1.UserCredentialB\x03\xe0\x41\x02\"\xb9\x01\n\x16ListConnectionsRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*developerconnect.googleapis.com/Connection\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x8a\x01\n\x17ListConnectionsResponse\x12\x41\n\x0b\x63onnections\x18\x01 \x03(\x0b\x32,.google.cloud.developerconnect.v1.Connection\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"X\n\x14GetConnectionRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*developerconnect.googleapis.com/Connection\"\xfd\x01\n\x17\x43reateConnectionRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*developerconnect.googleapis.com/Connection\x12\x1a\n\rconnection_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x45\n\nconnection\x18\x03 \x01(\x0b\x32,.google.cloud.developerconnect.v1.ConnectionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rvalidate_only\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\xef\x01\n\x17UpdateConnectionRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x45\n\nconnection\x18\x02 \x01(\x0b\x32,.google.cloud.developerconnect.v1.ConnectionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rallow_missing\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\xab\x01\n\x17\x44\x65leteConnectionRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*developerconnect.googleapis.com/Connection\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xc5\x01\n\x1cListAccountConnectorsRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30\x64\x65veloperconnect.googleapis.com/AccountConnector\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x9d\x01\n\x1dListAccountConnectorsResponse\x12N\n\x12\x61\x63\x63ount_connectors\x18\x01 \x03(\x0b\x32\x32.google.cloud.developerconnect.v1.AccountConnector\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"d\n\x1aGetAccountConnectorRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0developerconnect.googleapis.com/AccountConnector\"\x9d\x02\n\x1d\x43reateAccountConnectorRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30\x64\x65veloperconnect.googleapis.com/AccountConnector\x12!\n\x14\x61\x63\x63ount_connector_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12R\n\x11\x61\x63\x63ount_connector\x18\x03 \x01(\x0b\x32\x32.google.cloud.developerconnect.v1.AccountConnectorB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rvalidate_only\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\x82\x02\n\x1dUpdateAccountConnectorRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12R\n\x11\x61\x63\x63ount_connector\x18\x02 \x01(\x0b\x32\x32.google.cloud.developerconnect.v1.AccountConnectorB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rallow_missing\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\xcb\x01\n\x1d\x44\x65leteAccountConnectorRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0developerconnect.googleapis.com/AccountConnector\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\x9f\x01\n\x11\x44\x65leteUserRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$developerconnect.googleapis.com/User\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\"Z\n\x10\x46\x65tchSelfRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0developerconnect.googleapis.com/AccountConnector\"[\n\x11\x44\x65leteSelfRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0developerconnect.googleapis.com/AccountConnector\"n\n\x17\x46\x65tchAccessTokenRequest\x12S\n\x11\x61\x63\x63ount_connector\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0developerconnect.googleapis.com/AccountConnector\"\xb7\x01\n\x18\x46\x65tchAccessTokenResponse\x12\r\n\x05token\x18\x01 \x01(\t\x12\x33\n\x0f\x65xpiration_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0e\n\x06scopes\x18\x03 \x03(\t\x12G\n\x0e\x65xchange_error\x18\x04 \x01(\x0b\x32/.google.cloud.developerconnect.v1.ExchangeError\"2\n\rExchangeError\x12\x0c\n\x04\x63ode\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\"\xc4\x06\n\x11GitRepositoryLink\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x16\n\tclone_uri\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12T\n\x06labels\x18\x06 \x03(\x0b\x32?.google.cloud.developerconnect.v1.GitRepositoryLink.LabelsEntryB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0breconciling\x18\x08 \x01(\x08\x42\x03\xe0\x41\x03\x12^\n\x0b\x61nnotations\x18\t \x03(\x0b\x32\x44.google.cloud.developerconnect.v1.GitRepositoryLink.AnnotationsEntryB\x03\xe0\x41\x01\x12\x18\n\x03uid\x18\n \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x17\n\nwebhook_id\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rgit_proxy_uri\x18\x0c \x01(\tB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xcc\x01\xea\x41\xc8\x01\n1developerconnect.googleapis.com/GitRepositoryLink\x12iprojects/{project}/locations/{location}/connections/{connection}/gitRepositoryLinks/{git_repository_link}*\x12gitRepositoryLinks2\x11gitRepositoryLinkR\x01\x01\"\xa4\x02\n\x1e\x43reateGitRepositoryLinkRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\x12\x31\x64\x65veloperconnect.googleapis.com/GitRepositoryLink\x12U\n\x13git_repository_link\x18\x02 \x01(\x0b\x32\x33.google.cloud.developerconnect.v1.GitRepositoryLinkB\x03\xe0\x41\x02\x12#\n\x16git_repository_link_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rvalidate_only\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\xb9\x01\n\x1e\x44\x65leteGitRepositoryLinkRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1developerconnect.googleapis.com/GitRepositoryLink\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xc7\x01\n\x1dListGitRepositoryLinksRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\x12\x31\x64\x65veloperconnect.googleapis.com/GitRepositoryLink\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xa1\x01\n\x1eListGitRepositoryLinksResponse\x12Q\n\x14git_repository_links\x18\x01 \x03(\x0b\x32\x33.google.cloud.developerconnect.v1.GitRepositoryLink\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"f\n\x1bGetGitRepositoryLinkRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1developerconnect.googleapis.com/GitRepositoryLink\"t\n\x1a\x46\x65tchReadWriteTokenRequest\x12V\n\x13git_repository_link\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1developerconnect.googleapis.com/GitRepositoryLink\"o\n\x15\x46\x65tchReadTokenRequest\x12V\n\x13git_repository_link\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1developerconnect.googleapis.com/GitRepositoryLink\"r\n\x16\x46\x65tchReadTokenResponse\x12\r\n\x05token\x18\x01 \x01(\t\x12\x33\n\x0f\x65xpiration_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x14\n\x0cgit_username\x18\x03 \x01(\t\"w\n\x1b\x46\x65tchReadWriteTokenResponse\x12\r\n\x05token\x18\x01 \x01(\t\x12\x33\n\x0f\x65xpiration_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x14\n\x0cgit_username\x18\x03 \x01(\t\"\x9e\x01\n#FetchLinkableGitRepositoriesRequest\x12\x46\n\nconnection\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*developerconnect.googleapis.com/Connection\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x9b\x01\n$FetchLinkableGitRepositoriesResponse\x12Z\n\x19linkable_git_repositories\x18\x01 \x03(\x0b\x32\x37.google.cloud.developerconnect.v1.LinkableGitRepository\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"*\n\x15LinkableGitRepository\x12\x11\n\tclone_uri\x18\x01 \x01(\t\"i\n\x1f\x46\x65tchGitHubInstallationsRequest\x12\x46\n\nconnection\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*developerconnect.googleapis.com/Connection\"\xc2\x01\n FetchGitHubInstallationsResponse\x12\x66\n\rinstallations\x18\x01 \x03(\x0b\x32O.google.cloud.developerconnect.v1.FetchGitHubInstallationsResponse.Installation\x1a\x36\n\x0cInstallation\x12\n\n\x02id\x18\x01 \x01(\x03\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t\"\xae\x02\n\x13\x46\x65tchGitRefsRequest\x12V\n\x13git_repository_link\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1developerconnect.googleapis.com/GitRepositoryLink\x12T\n\x08ref_type\x18\x02 \x01(\x0e\x32=.google.cloud.developerconnect.v1.FetchGitRefsRequest.RefTypeB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x05 \x01(\tB\x03\xe0\x41\x01\"8\n\x07RefType\x12\x18\n\x14REF_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03TAG\x10\x01\x12\n\n\x06\x42RANCH\x10\x02\"B\n\x14\x46\x65tchGitRefsResponse\x12\x11\n\tref_names\x18\x01 \x03(\t\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xfd\x05\n\x10\x41\x63\x63ountConnector\x12V\n\x15provider_oauth_config\x18\x05 \x01(\x0b\x32\x35.google.cloud.developerconnect.v1.ProviderOAuthConfigH\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12]\n\x0b\x61nnotations\x18\x06 \x03(\x0b\x32\x43.google.cloud.developerconnect.v1.AccountConnector.AnnotationsEntryB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12S\n\x06labels\x18\x08 \x03(\x0b\x32>.google.cloud.developerconnect.v1.AccountConnector.LabelsEntryB\x03\xe0\x41\x01\x12\x1c\n\x0foauth_start_uri\x18\n \x01(\tB\x03\xe0\x41\x03\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xad\x01\xea\x41\xa9\x01\n0developerconnect.googleapis.com/AccountConnector\x12Mprojects/{project}/locations/{location}/accountConnectors/{account_connector}*\x11\x61\x63\x63ountConnectors2\x10\x61\x63\x63ountConnectorR\x01\x01\x42\x1a\n\x18\x61\x63\x63ount_connector_config\"\xc2\x02\n\x04User\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12@\n\x17last_token_request_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:\x93\x01\xea\x41\x8f\x01\n$developerconnect.googleapis.com/User\x12Zprojects/{project}/locations/{location}/accountConnectors/{account_connector}/users/{user}*\x05users2\x04user\"\x94\x01\n\x13ProviderOAuthConfig\x12S\n\x12system_provider_id\x18\x01 \x01(\x0e\x32\x30.google.cloud.developerconnect.v1.SystemProviderB\x03\xe0\x41\x05H\x00\x12\x13\n\x06scopes\x18\x02 \x03(\tB\x03\xe0\x41\x02\x42\x13\n\x11oauth_provider_id*\x97\x01\n\x0eSystemProvider\x12\x1f\n\x1bSYSTEM_PROVIDER_UNSPECIFIED\x10\x00\x12\n\n\x06GITHUB\x10\x01\x12\n\n\x06GITLAB\x10\x02\x12\n\n\x06GOOGLE\x10\x03\x12\n\n\x06SENTRY\x10\x04\x12\x08\n\x04ROVO\x10\x05\x12\r\n\tNEW_RELIC\x10\x06\x12\x0c\n\x08\x44\x41TASTAX\x10\x07\x12\r\n\tDYNATRACE\x10\x08\x32\xe9.\n\x10\x44\x65veloperConnect\x12\xc8\x01\n\x0fListConnections\x12\x38.google.cloud.developerconnect.v1.ListConnectionsRequest\x1a\x39.google.cloud.developerconnect.v1.ListConnectionsResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/connections\x12\xb5\x01\n\rGetConnection\x12\x36.google.cloud.developerconnect.v1.GetConnectionRequest\x1a,.google.cloud.developerconnect.v1.Connection\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/connections/*}\x12\xf6\x01\n\x10\x43reateConnection\x12\x39.google.cloud.developerconnect.v1.CreateConnectionRequest\x1a\x1d.google.longrunning.Operation\"\x87\x01\xca\x41\x1f\n\nConnection\x12\x11OperationMetadata\xda\x41\x1fparent,connection,connection_id\x82\xd3\xe4\x93\x02=\"//v1/{parent=projects/*/locations/*}/connections:\nconnection\x12\xf8\x01\n\x10UpdateConnection\x12\x39.google.cloud.developerconnect.v1.UpdateConnectionRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41\x1f\n\nConnection\x12\x11OperationMetadata\xda\x41\x16\x63onnection,update_mask\x82\xd3\xe4\x93\x02H2:/v1/{connection.name=projects/*/locations/*/connections/*}:\nconnection\x12\xd9\x01\n\x10\x44\x65leteConnection\x12\x39.google.cloud.developerconnect.v1.DeleteConnectionRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/connections/*}\x12\xbb\x02\n\x17\x43reateGitRepositoryLink\x12@.google.cloud.developerconnect.v1.CreateGitRepositoryLinkRequest\x1a\x1d.google.longrunning.Operation\"\xbe\x01\xca\x41&\n\x11GitRepositoryLink\x12\x11OperationMetadata\xda\x41\x31parent,git_repository_link,git_repository_link_id\x82\xd3\xe4\x93\x02[\"D/v1/{parent=projects/*/locations/*/connections/*}/gitRepositoryLinks:\x13git_repository_link\x12\xfd\x01\n\x17\x44\x65leteGitRepositoryLink\x12@.google.cloud.developerconnect.v1.DeleteGitRepositoryLinkRequest\x1a\x1d.google.longrunning.Operation\"\x80\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x46*D/v1/{name=projects/*/locations/*/connections/*/gitRepositoryLinks/*}\x12\xf2\x01\n\x16ListGitRepositoryLinks\x12?.google.cloud.developerconnect.v1.ListGitRepositoryLinksRequest\x1a@.google.cloud.developerconnect.v1.ListGitRepositoryLinksResponse\"U\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x46\x12\x44/v1/{parent=projects/*/locations/*/connections/*}/gitRepositoryLinks\x12\xdf\x01\n\x14GetGitRepositoryLink\x12=.google.cloud.developerconnect.v1.GetGitRepositoryLinkRequest\x1a\x33.google.cloud.developerconnect.v1.GitRepositoryLink\"S\xda\x41\x04name\x82\xd3\xe4\x93\x02\x46\x12\x44/v1/{name=projects/*/locations/*/connections/*/gitRepositoryLinks/*}\x12\x9d\x02\n\x13\x46\x65tchReadWriteToken\x12<.google.cloud.developerconnect.v1.FetchReadWriteTokenRequest\x1a=.google.cloud.developerconnect.v1.FetchReadWriteTokenResponse\"\x88\x01\xda\x41\x13git_repository_link\x82\xd3\xe4\x93\x02l\"g/v1/{git_repository_link=projects/*/locations/*/connections/*/gitRepositoryLinks/*}:fetchReadWriteToken:\x01*\x12\x89\x02\n\x0e\x46\x65tchReadToken\x12\x37.google.cloud.developerconnect.v1.FetchReadTokenRequest\x1a\x38.google.cloud.developerconnect.v1.FetchReadTokenResponse\"\x83\x01\xda\x41\x13git_repository_link\x82\xd3\xe4\x93\x02g\"b/v1/{git_repository_link=projects/*/locations/*/connections/*/gitRepositoryLinks/*}:fetchReadToken:\x01*\x12\x96\x02\n\x1c\x46\x65tchLinkableGitRepositories\x12\x45.google.cloud.developerconnect.v1.FetchLinkableGitRepositoriesRequest\x1a\x46.google.cloud.developerconnect.v1.FetchLinkableGitRepositoriesResponse\"g\xda\x41\nconnection\x82\xd3\xe4\x93\x02T\x12R/v1/{connection=projects/*/locations/*/connections/*}:fetchLinkableGitRepositories\x12\x86\x02\n\x18\x46\x65tchGitHubInstallations\x12\x41.google.cloud.developerconnect.v1.FetchGitHubInstallationsRequest\x1a\x42.google.cloud.developerconnect.v1.FetchGitHubInstallationsResponse\"c\xda\x41\nconnection\x82\xd3\xe4\x93\x02P\x12N/v1/{connection=projects/*/locations/*/connections/*}:fetchGitHubInstallations\x12\x87\x02\n\x0c\x46\x65tchGitRefs\x12\x35.google.cloud.developerconnect.v1.FetchGitRefsRequest\x1a\x36.google.cloud.developerconnect.v1.FetchGitRefsResponse\"\x87\x01\xda\x41\x1cgit_repository_link,ref_type\x82\xd3\xe4\x93\x02\x62\x12`/v1/{git_repository_link=projects/*/locations/*/connections/*/gitRepositoryLinks/*}:fetchGitRefs\x12\xe0\x01\n\x15ListAccountConnectors\x12>.google.cloud.developerconnect.v1.ListAccountConnectorsRequest\x1a?.google.cloud.developerconnect.v1.ListAccountConnectorsResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{parent=projects/*/locations/*}/accountConnectors\x12\xcd\x01\n\x13GetAccountConnector\x12<.google.cloud.developerconnect.v1.GetAccountConnectorRequest\x1a\x32.google.cloud.developerconnect.v1.AccountConnector\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=projects/*/locations/*/accountConnectors/*}\x12\xa3\x02\n\x16\x43reateAccountConnector\x12?.google.cloud.developerconnect.v1.CreateAccountConnectorRequest\x1a\x1d.google.longrunning.Operation\"\xa8\x01\xca\x41%\n\x10\x41\x63\x63ountConnector\x12\x11OperationMetadata\xda\x41-parent,account_connector,account_connector_id\x82\xd3\xe4\x93\x02J\"5/v1/{parent=projects/*/locations/*}/accountConnectors:\x11\x61\x63\x63ount_connector\x12\xa5\x02\n\x16UpdateAccountConnector\x12?.google.cloud.developerconnect.v1.UpdateAccountConnectorRequest\x1a\x1d.google.longrunning.Operation\"\xaa\x01\xca\x41%\n\x10\x41\x63\x63ountConnector\x12\x11OperationMetadata\xda\x41\x1d\x61\x63\x63ount_connector,update_mask\x82\xd3\xe4\x93\x02\\2G/v1/{account_connector.name=projects/*/locations/*/accountConnectors/*}:\x11\x61\x63\x63ount_connector\x12\xeb\x01\n\x16\x44\x65leteAccountConnector\x12?.google.cloud.developerconnect.v1.DeleteAccountConnectorRequest\x1a\x1d.google.longrunning.Operation\"q\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1/{name=projects/*/locations/*/accountConnectors/*}\x12\x83\x02\n\x10\x46\x65tchAccessToken\x12\x39.google.cloud.developerconnect.v1.FetchAccessTokenRequest\x1a:.google.cloud.developerconnect.v1.FetchAccessTokenResponse\"x\xda\x41\x11\x61\x63\x63ount_connector\x82\xd3\xe4\x93\x02^\"Y/v1/{account_connector=projects/*/locations/*/accountConnectors/*}/users:fetchAccessToken:\x01*\x12\xc4\x01\n\tListUsers\x12\x32.google.cloud.developerconnect.v1.ListUsersRequest\x1a\x33.google.cloud.developerconnect.v1.ListUsersResponse\"N\xda\x41\x06parent\x82\xd3\xe4\x93\x02?\x12=/v1/{parent=projects/*/locations/*/accountConnectors/*}/users\x12\xdb\x01\n\nDeleteUser\x12\x33.google.cloud.developerconnect.v1.DeleteUserRequest\x1a\x1d.google.longrunning.Operation\"y\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02?*=/v1/{name=projects/*/locations/*/accountConnectors/*/users/*}\x12\xbd\x01\n\tFetchSelf\x12\x32.google.cloud.developerconnect.v1.FetchSelfRequest\x1a&.google.cloud.developerconnect.v1.User\"T\xda\x41\x04name\x82\xd3\xe4\x93\x02G\x12\x45/v1/{name=projects/*/locations/*/accountConnectors/*}/users:fetchSelf\x12\xe5\x01\n\nDeleteSelf\x12\x33.google.cloud.developerconnect.v1.DeleteSelfRequest\x1a\x1d.google.longrunning.Operation\"\x82\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02H*F/v1/{name=projects/*/locations/*/accountConnectors/*}/users:deleteSelf\x1aS\xca\x41\x1f\x64\x65veloperconnect.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xf8\x04\n$com.google.cloud.developerconnect.v1B\x15\x44\x65veloperConnectProtoP\x01ZPcloud.google.com/go/developerconnect/apiv1/developerconnectpb;developerconnectpb\xa2\x02\x10\x44\x65veloperConnect\xaa\x02 Google.Cloud.DeveloperConnect.V1\xca\x02 Google\\Cloud\\DeveloperConnect\\V1\xea\x02#Google::Cloud::DeveloperConnect::V1\xea\x41k\n*secretmanager.googleapis.com/SecretVersion\x12=projects/{project}/secrets/{secret}/versions/{secret_version}\xea\x41x\n!cloudkms.googleapis.com/CryptoKey\x12Sprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}\xea\x41|\n\'servicedirectory.googleapis.com/Service\x12Qprojects/{project}/locations/{location}/namespaces/{namespace}/services/{service}b\x06proto3" +descriptor_data = "\n8google/cloud/developerconnect/v1/developer_connect.proto\x12 google.cloud.developerconnect.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xad\x01\n\x10ListUsersRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$developerconnect.googleapis.com/User\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"x\n\x11ListUsersResponse\x12\x35\n\x05users\x18\x01 \x03(\x0b\x32&.google.cloud.developerconnect.v1.User\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xa6\r\n\nConnection\x12G\n\rgithub_config\x18\x05 \x01(\x0b\x32..google.cloud.developerconnect.v1.GitHubConfigH\x00\x12\\\n\x18github_enterprise_config\x18\r \x01(\x0b\x32\x38.google.cloud.developerconnect.v1.GitHubEnterpriseConfigH\x00\x12G\n\rgitlab_config\x18\x0e \x01(\x0b\x32..google.cloud.developerconnect.v1.GitLabConfigH\x00\x12\\\n\x18gitlab_enterprise_config\x18\x10 \x01(\x0b\x32\x38.google.cloud.developerconnect.v1.GitLabEnterpriseConfigH\x00\x12\x63\n\x1c\x62itbucket_data_center_config\x18\x11 \x01(\x0b\x32;.google.cloud.developerconnect.v1.BitbucketDataCenterConfigH\x00\x12X\n\x16\x62itbucket_cloud_config\x18\x12 \x01(\x0b\x32\x36.google.cloud.developerconnect.v1.BitbucketCloudConfigH\x00\x12t\n%secure_source_manager_instance_config\x18\x14 \x01(\x0b\x32\x43.google.cloud.developerconnect.v1.SecureSourceManagerInstanceConfigH\x00\x12W\n\x0bhttp_config\x18\x15 \x01(\x0b\x32;.google.cloud.developerconnect.v1.GenericHTTPEndpointConfigB\x03\xe0\x41\x01H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12M\n\x06labels\x18\x04 \x03(\x0b\x32\x38.google.cloud.developerconnect.v1.Connection.LabelsEntryB\x03\xe0\x41\x01\x12T\n\x12installation_state\x18\x06 \x01(\x0b\x32\x33.google.cloud.developerconnect.v1.InstallationStateB\x03\xe0\x41\x03\x12\x15\n\x08\x64isabled\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01\x12\x18\n\x0breconciling\x18\x08 \x01(\x08\x42\x03\xe0\x41\x03\x12W\n\x0b\x61nnotations\x18\t \x03(\x0b\x32=.google.cloud.developerconnect.v1.Connection.AnnotationsEntryB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\n \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x03uid\x18\x0c \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12Q\n\x11\x63rypto_key_config\x18\x0f \x01(\x0b\x32\x31.google.cloud.developerconnect.v1.CryptoKeyConfigB\x03\xe0\x41\x01\x12O\n\x10git_proxy_config\x18\x13 \x01(\x0b\x32\x30.google.cloud.developerconnect.v1.GitProxyConfigB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x8e\x01\xea\x41\x8a\x01\n*developerconnect.googleapis.com/Connection\x12@projects/{project}/locations/{location}/connections/{connection}*\x0b\x63onnections2\nconnectionR\x01\x01\x42\x13\n\x11\x63onnection_config\"S\n\x0f\x43ryptoKeyConfig\x12@\n\rkey_reference\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\"H\n\x0eGitProxyConfig\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12 \n\x13http_proxy_base_uri\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\x88\x02\n\x11InstallationState\x12M\n\x05stage\x18\x01 \x01(\x0e\x32\x39.google.cloud.developerconnect.v1.InstallationState.StageB\x03\xe0\x41\x03\x12\x14\n\x07message\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\naction_uri\x18\x03 \x01(\tB\x03\xe0\x41\x03\"u\n\x05Stage\x12\x15\n\x11STAGE_UNSPECIFIED\x10\x00\x12\x16\n\x12PENDING_CREATE_APP\x10\x01\x12\x16\n\x12PENDING_USER_OAUTH\x10\x02\x12\x17\n\x13PENDING_INSTALL_APP\x10\x03\x12\x0c\n\x08\x43OMPLETE\x10\n\"\xcc\x05\n\x19GenericHTTPEndpointConfig\x12t\n\x14\x62\x61sic_authentication\x18\x01 \x01(\x0b\x32O.google.cloud.developerconnect.v1.GenericHTTPEndpointConfig.BasicAuthenticationB\x03\xe0\x41\x01H\x00\x12\x81\x01\n\x1b\x62\x65\x61rer_token_authentication\x18\x02 \x01(\x0b\x32U.google.cloud.developerconnect.v1.GenericHTTPEndpointConfig.BearerTokenAuthenticationB\x03\xe0\x41\x01H\x00\x12\x18\n\x08host_uri\x18\x03 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12_\n\x18service_directory_config\x18\x04 \x01(\x0b\x32\x38.google.cloud.developerconnect.v1.ServiceDirectoryConfigB\x03\xe0\x41\x01\x12\x1f\n\x12ssl_ca_certificate\x18\x05 \x01(\tB\x03\xe0\x41\x01\x1a\x8c\x01\n\x13\x42\x61sicAuthentication\x12R\n\x17password_secret_version\x18\x02 \x01(\tB/\xfa\x41,\n*secretmanager.googleapis.com/SecretVersionH\x00\x12\x15\n\x08username\x18\x01 \x01(\tB\x03\xe0\x41\x02\x42\n\n\x08password\x1ax\n\x19\x42\x65\x61rerTokenAuthentication\x12R\n\x14token_secret_version\x18\x01 \x01(\tB2\xe0\x41\x01\xfa\x41,\n*secretmanager.googleapis.com/SecretVersionH\x00\x42\x07\n\x05tokenB\x10\n\x0e\x61uthentication\"\xe3\x02\n\x0cGitHubConfig\x12T\n\ngithub_app\x18\x01 \x01(\x0e\x32\x38.google.cloud.developerconnect.v1.GitHubConfig.GitHubAppB\x06\xe0\x41\x02\xe0\x41\x05\x12U\n\x15\x61uthorizer_credential\x18\x02 \x01(\x0b\x32\x31.google.cloud.developerconnect.v1.OAuthCredentialB\x03\xe0\x41\x01\x12 \n\x13\x61pp_installation_id\x18\x03 \x01(\x03\x42\x03\xe0\x41\x01\x12\x1d\n\x10installation_uri\x18\x04 \x01(\tB\x03\xe0\x41\x03\"e\n\tGitHubApp\x12\x1b\n\x17GIT_HUB_APP_UNSPECIFIED\x10\x00\x12\x15\n\x11\x44\x45VELOPER_CONNECT\x10\x01\x12\x0c\n\x08\x46IREBASE\x10\x02\x12\x16\n\x12GEMINI_CODE_ASSIST\x10\x03\"\x8c\x04\n\x16GitHubEnterpriseConfig\x12\x15\n\x08host_uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06\x61pp_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01\x12\x15\n\x08\x61pp_slug\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12V\n\x1aprivate_key_secret_version\x18\x04 \x01(\tB2\xe0\x41\x01\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12Y\n\x1dwebhook_secret_secret_version\x18\x05 \x01(\tB2\xe0\x41\x01\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12 \n\x13\x61pp_installation_id\x18\x08 \x01(\x03\x42\x03\xe0\x41\x01\x12\x1d\n\x10installation_uri\x18\t \x01(\tB\x03\xe0\x41\x03\x12_\n\x18service_directory_config\x18\n \x01(\x0b\x32\x38.google.cloud.developerconnect.v1.ServiceDirectoryConfigB\x03\xe0\x41\x01\x12\x1b\n\x0eserver_version\x18\x0c \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x12ssl_ca_certificate\x18\x0e \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0corganization\x18\x0f \x01(\tB\x06\xe0\x41\x01\xe0\x41\x05\"Z\n\x16ServiceDirectoryConfig\x12@\n\x07service\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'servicedirectory.googleapis.com/Service\"\x80\x01\n\x0fOAuthCredential\x12V\n\x1aoauth_token_secret_version\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12\x15\n\x08username\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\x9d\x02\n\x0cGitLabConfig\x12\\\n\x1dwebhook_secret_secret_version\x18\x01 \x01(\tB5\xe0\x41\x02\xe0\x41\x05\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12Y\n\x1aread_authorizer_credential\x18\x02 \x01(\x0b\x32\x30.google.cloud.developerconnect.v1.UserCredentialB\x03\xe0\x41\x02\x12T\n\x15\x61uthorizer_credential\x18\x03 \x01(\x0b\x32\x30.google.cloud.developerconnect.v1.UserCredentialB\x03\xe0\x41\x02\"~\n\x0eUserCredential\x12U\n\x19user_token_secret_version\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12\x15\n\x08username\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\xdd\x03\n\x16GitLabEnterpriseConfig\x12\x15\n\x08host_uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\\\n\x1dwebhook_secret_secret_version\x18\x02 \x01(\tB5\xe0\x41\x02\xe0\x41\x05\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12Y\n\x1aread_authorizer_credential\x18\x03 \x01(\x0b\x32\x30.google.cloud.developerconnect.v1.UserCredentialB\x03\xe0\x41\x02\x12T\n\x15\x61uthorizer_credential\x18\x04 \x01(\x0b\x32\x30.google.cloud.developerconnect.v1.UserCredentialB\x03\xe0\x41\x02\x12_\n\x18service_directory_config\x18\x05 \x01(\x0b\x32\x38.google.cloud.developerconnect.v1.ServiceDirectoryConfigB\x03\xe0\x41\x01\x12\x1f\n\x12ssl_ca_certificate\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0eserver_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\"\xe0\x03\n\x19\x42itbucketDataCenterConfig\x12\x15\n\x08host_uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\\\n\x1dwebhook_secret_secret_version\x18\x02 \x01(\tB5\xe0\x41\x02\xe0\x41\x05\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12Y\n\x1aread_authorizer_credential\x18\x03 \x01(\x0b\x32\x30.google.cloud.developerconnect.v1.UserCredentialB\x03\xe0\x41\x02\x12T\n\x15\x61uthorizer_credential\x18\x04 \x01(\x0b\x32\x30.google.cloud.developerconnect.v1.UserCredentialB\x03\xe0\x41\x02\x12_\n\x18service_directory_config\x18\x05 \x01(\x0b\x32\x38.google.cloud.developerconnect.v1.ServiceDirectoryConfigB\x03\xe0\x41\x01\x12\x1f\n\x12ssl_ca_certificate\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0eserver_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\"\xbd\x02\n\x14\x42itbucketCloudConfig\x12\x16\n\tworkspace\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\\\n\x1dwebhook_secret_secret_version\x18\x02 \x01(\tB5\xe0\x41\x02\xe0\x41\x05\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12Y\n\x1aread_authorizer_credential\x18\x03 \x01(\x0b\x32\x30.google.cloud.developerconnect.v1.UserCredentialB\x03\xe0\x41\x02\x12T\n\x15\x61uthorizer_credential\x18\x04 \x01(\x0b\x32\x30.google.cloud.developerconnect.v1.UserCredentialB\x03\xe0\x41\x02\"m\n!SecureSourceManagerInstanceConfig\x12H\n\x08instance\x18\x01 \x01(\tB6\xe0\x41\x02\xe0\x41\x05\xfa\x41-\n+securesourcemanager.googleapis.com/Instance\"\xb9\x01\n\x16ListConnectionsRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*developerconnect.googleapis.com/Connection\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x8a\x01\n\x17ListConnectionsResponse\x12\x41\n\x0b\x63onnections\x18\x01 \x03(\x0b\x32,.google.cloud.developerconnect.v1.Connection\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"X\n\x14GetConnectionRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*developerconnect.googleapis.com/Connection\"\xfd\x01\n\x17\x43reateConnectionRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*developerconnect.googleapis.com/Connection\x12\x1a\n\rconnection_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x45\n\nconnection\x18\x03 \x01(\x0b\x32,.google.cloud.developerconnect.v1.ConnectionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rvalidate_only\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\xef\x01\n\x17UpdateConnectionRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x45\n\nconnection\x18\x02 \x01(\x0b\x32,.google.cloud.developerconnect.v1.ConnectionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rallow_missing\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\xab\x01\n\x17\x44\x65leteConnectionRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*developerconnect.googleapis.com/Connection\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xc5\x01\n\x1cListAccountConnectorsRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30\x64\x65veloperconnect.googleapis.com/AccountConnector\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x9d\x01\n\x1dListAccountConnectorsResponse\x12N\n\x12\x61\x63\x63ount_connectors\x18\x01 \x03(\x0b\x32\x32.google.cloud.developerconnect.v1.AccountConnector\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"d\n\x1aGetAccountConnectorRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0developerconnect.googleapis.com/AccountConnector\"\x9d\x02\n\x1d\x43reateAccountConnectorRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30\x64\x65veloperconnect.googleapis.com/AccountConnector\x12!\n\x14\x61\x63\x63ount_connector_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12R\n\x11\x61\x63\x63ount_connector\x18\x03 \x01(\x0b\x32\x32.google.cloud.developerconnect.v1.AccountConnectorB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rvalidate_only\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\x82\x02\n\x1dUpdateAccountConnectorRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12R\n\x11\x61\x63\x63ount_connector\x18\x02 \x01(\x0b\x32\x32.google.cloud.developerconnect.v1.AccountConnectorB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rallow_missing\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\xcb\x01\n\x1d\x44\x65leteAccountConnectorRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0developerconnect.googleapis.com/AccountConnector\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\x9f\x01\n\x11\x44\x65leteUserRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$developerconnect.googleapis.com/User\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\"Z\n\x10\x46\x65tchSelfRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0developerconnect.googleapis.com/AccountConnector\"[\n\x11\x44\x65leteSelfRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0developerconnect.googleapis.com/AccountConnector\"n\n\x17\x46\x65tchAccessTokenRequest\x12S\n\x11\x61\x63\x63ount_connector\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0developerconnect.googleapis.com/AccountConnector\"\xb7\x01\n\x18\x46\x65tchAccessTokenResponse\x12\r\n\x05token\x18\x01 \x01(\t\x12\x33\n\x0f\x65xpiration_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0e\n\x06scopes\x18\x03 \x03(\t\x12G\n\x0e\x65xchange_error\x18\x04 \x01(\x0b\x32/.google.cloud.developerconnect.v1.ExchangeError\"h\n\x11StartOAuthRequest\x12S\n\x11\x61\x63\x63ount_connector\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0developerconnect.googleapis.com/AccountConnector\"\xe6\x01\n\x12StartOAuthResponse\x12N\n\x12system_provider_id\x18\x07 \x01(\x0e\x32\x30.google.cloud.developerconnect.v1.SystemProviderH\x00\x12\x0e\n\x06ticket\x18\x01 \x01(\t\x12\x16\n\x0e\x63ode_challenge\x18\x02 \x01(\t\x12\x1d\n\x15\x63ode_challenge_method\x18\x03 \x01(\t\x12\x11\n\tclient_id\x18\x04 \x01(\t\x12\x0e\n\x06scopes\x18\x05 \x03(\t\x12\x10\n\x08\x61uth_uri\x18\x06 \x01(\tB\x04\n\x02id\"\xc5\x03\n\x12\x46inishOAuthRequest\x12X\n\x0coauth_params\x18\x02 \x01(\x0b\x32@.google.cloud.developerconnect.v1.FinishOAuthRequest.OAuthParamsH\x00\x12\x65\n\x13google_oauth_params\x18\x03 \x01(\x0b\x32\x46.google.cloud.developerconnect.v1.FinishOAuthRequest.GoogleOAuthParamsH\x00\x12S\n\x11\x61\x63\x63ount_connector\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0developerconnect.googleapis.com/AccountConnector\x1a\x35\n\x0bOAuthParams\x12\x11\n\x04\x63ode\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06ticket\x18\x02 \x01(\tB\x03\xe0\x41\x02\x1aX\n\x11GoogleOAuthParams\x12\x13\n\x06scopes\x18\x01 \x03(\tB\x03\xe0\x41\x02\x12\x19\n\x0cversion_info\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06ticket\x18\x03 \x01(\tB\x03\xe0\x41\x02\x42\x08\n\x06params\"^\n\x13\x46inishOAuthResponse\x12G\n\x0e\x65xchange_error\x18\x01 \x01(\x0b\x32/.google.cloud.developerconnect.v1.ExchangeError\"2\n\rExchangeError\x12\x0c\n\x04\x63ode\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\"\xc4\x06\n\x11GitRepositoryLink\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x16\n\tclone_uri\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12T\n\x06labels\x18\x06 \x03(\x0b\x32?.google.cloud.developerconnect.v1.GitRepositoryLink.LabelsEntryB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0breconciling\x18\x08 \x01(\x08\x42\x03\xe0\x41\x03\x12^\n\x0b\x61nnotations\x18\t \x03(\x0b\x32\x44.google.cloud.developerconnect.v1.GitRepositoryLink.AnnotationsEntryB\x03\xe0\x41\x01\x12\x18\n\x03uid\x18\n \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x17\n\nwebhook_id\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rgit_proxy_uri\x18\x0c \x01(\tB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xcc\x01\xea\x41\xc8\x01\n1developerconnect.googleapis.com/GitRepositoryLink\x12iprojects/{project}/locations/{location}/connections/{connection}/gitRepositoryLinks/{git_repository_link}*\x12gitRepositoryLinks2\x11gitRepositoryLinkR\x01\x01\"\xa4\x02\n\x1e\x43reateGitRepositoryLinkRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\x12\x31\x64\x65veloperconnect.googleapis.com/GitRepositoryLink\x12U\n\x13git_repository_link\x18\x02 \x01(\x0b\x32\x33.google.cloud.developerconnect.v1.GitRepositoryLinkB\x03\xe0\x41\x02\x12#\n\x16git_repository_link_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rvalidate_only\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\xb9\x01\n\x1e\x44\x65leteGitRepositoryLinkRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1developerconnect.googleapis.com/GitRepositoryLink\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xc7\x01\n\x1dListGitRepositoryLinksRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\x12\x31\x64\x65veloperconnect.googleapis.com/GitRepositoryLink\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xa1\x01\n\x1eListGitRepositoryLinksResponse\x12Q\n\x14git_repository_links\x18\x01 \x03(\x0b\x32\x33.google.cloud.developerconnect.v1.GitRepositoryLink\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"f\n\x1bGetGitRepositoryLinkRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1developerconnect.googleapis.com/GitRepositoryLink\"t\n\x1a\x46\x65tchReadWriteTokenRequest\x12V\n\x13git_repository_link\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1developerconnect.googleapis.com/GitRepositoryLink\"o\n\x15\x46\x65tchReadTokenRequest\x12V\n\x13git_repository_link\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1developerconnect.googleapis.com/GitRepositoryLink\"r\n\x16\x46\x65tchReadTokenResponse\x12\r\n\x05token\x18\x01 \x01(\t\x12\x33\n\x0f\x65xpiration_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x14\n\x0cgit_username\x18\x03 \x01(\t\"w\n\x1b\x46\x65tchReadWriteTokenResponse\x12\r\n\x05token\x18\x01 \x01(\t\x12\x33\n\x0f\x65xpiration_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x14\n\x0cgit_username\x18\x03 \x01(\t\"\x9e\x01\n#FetchLinkableGitRepositoriesRequest\x12\x46\n\nconnection\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*developerconnect.googleapis.com/Connection\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x9b\x01\n$FetchLinkableGitRepositoriesResponse\x12Z\n\x19linkable_git_repositories\x18\x01 \x03(\x0b\x32\x37.google.cloud.developerconnect.v1.LinkableGitRepository\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"*\n\x15LinkableGitRepository\x12\x11\n\tclone_uri\x18\x01 \x01(\t\"i\n\x1f\x46\x65tchGitHubInstallationsRequest\x12\x46\n\nconnection\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*developerconnect.googleapis.com/Connection\"\xc2\x01\n FetchGitHubInstallationsResponse\x12\x66\n\rinstallations\x18\x01 \x03(\x0b\x32O.google.cloud.developerconnect.v1.FetchGitHubInstallationsResponse.Installation\x1a\x36\n\x0cInstallation\x12\n\n\x02id\x18\x01 \x01(\x03\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t\"\xae\x02\n\x13\x46\x65tchGitRefsRequest\x12V\n\x13git_repository_link\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1developerconnect.googleapis.com/GitRepositoryLink\x12T\n\x08ref_type\x18\x02 \x01(\x0e\x32=.google.cloud.developerconnect.v1.FetchGitRefsRequest.RefTypeB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x05 \x01(\tB\x03\xe0\x41\x01\"8\n\x07RefType\x12\x18\n\x14REF_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03TAG\x10\x01\x12\n\n\x06\x42RANCH\x10\x02\"B\n\x14\x46\x65tchGitRefsResponse\x12\x11\n\tref_names\x18\x01 \x03(\t\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x82\x06\n\x10\x41\x63\x63ountConnector\x12[\n\x15provider_oauth_config\x18\x05 \x01(\x0b\x32\x35.google.cloud.developerconnect.v1.ProviderOAuthConfigB\x03\xe0\x41\x01H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12]\n\x0b\x61nnotations\x18\x06 \x03(\x0b\x32\x43.google.cloud.developerconnect.v1.AccountConnector.AnnotationsEntryB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12S\n\x06labels\x18\x08 \x03(\x0b\x32>.google.cloud.developerconnect.v1.AccountConnector.LabelsEntryB\x03\xe0\x41\x01\x12\x1c\n\x0foauth_start_uri\x18\n \x01(\tB\x03\xe0\x41\x03\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xad\x01\xea\x41\xa9\x01\n0developerconnect.googleapis.com/AccountConnector\x12Mprojects/{project}/locations/{location}/accountConnectors/{account_connector}*\x11\x61\x63\x63ountConnectors2\x10\x61\x63\x63ountConnectorR\x01\x01\x42\x1a\n\x18\x61\x63\x63ount_connector_config\"\xc2\x02\n\x04User\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12@\n\x17last_token_request_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:\x93\x01\xea\x41\x8f\x01\n$developerconnect.googleapis.com/User\x12Zprojects/{project}/locations/{location}/accountConnectors/{account_connector}/users/{user}*\x05users2\x04user\"\x97\x01\n\x13ProviderOAuthConfig\x12V\n\x12system_provider_id\x18\x01 \x01(\x0e\x32\x30.google.cloud.developerconnect.v1.SystemProviderB\x06\xe0\x41\x05\xe0\x41\x01H\x00\x12\x13\n\x06scopes\x18\x02 \x03(\tB\x03\xe0\x41\x02\x42\x13\n\x11oauth_provider_id*\x97\x01\n\x0eSystemProvider\x12\x1f\n\x1bSYSTEM_PROVIDER_UNSPECIFIED\x10\x00\x12\n\n\x06GITHUB\x10\x01\x12\n\n\x06GITLAB\x10\x02\x12\n\n\x06GOOGLE\x10\x03\x12\n\n\x06SENTRY\x10\x04\x12\x08\n\x04ROVO\x10\x05\x12\r\n\tNEW_RELIC\x10\x06\x12\x0c\n\x08\x44\x41TASTAX\x10\x07\x12\r\n\tDYNATRACE\x10\x08\x32\xcb\x32\n\x10\x44\x65veloperConnect\x12\xc8\x01\n\x0fListConnections\x12\x38.google.cloud.developerconnect.v1.ListConnectionsRequest\x1a\x39.google.cloud.developerconnect.v1.ListConnectionsResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/connections\x12\xb5\x01\n\rGetConnection\x12\x36.google.cloud.developerconnect.v1.GetConnectionRequest\x1a,.google.cloud.developerconnect.v1.Connection\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/connections/*}\x12\xf6\x01\n\x10\x43reateConnection\x12\x39.google.cloud.developerconnect.v1.CreateConnectionRequest\x1a\x1d.google.longrunning.Operation\"\x87\x01\xca\x41\x1f\n\nConnection\x12\x11OperationMetadata\xda\x41\x1fparent,connection,connection_id\x82\xd3\xe4\x93\x02=\"//v1/{parent=projects/*/locations/*}/connections:\nconnection\x12\xf8\x01\n\x10UpdateConnection\x12\x39.google.cloud.developerconnect.v1.UpdateConnectionRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41\x1f\n\nConnection\x12\x11OperationMetadata\xda\x41\x16\x63onnection,update_mask\x82\xd3\xe4\x93\x02H2:/v1/{connection.name=projects/*/locations/*/connections/*}:\nconnection\x12\xd9\x01\n\x10\x44\x65leteConnection\x12\x39.google.cloud.developerconnect.v1.DeleteConnectionRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/connections/*}\x12\xbb\x02\n\x17\x43reateGitRepositoryLink\x12@.google.cloud.developerconnect.v1.CreateGitRepositoryLinkRequest\x1a\x1d.google.longrunning.Operation\"\xbe\x01\xca\x41&\n\x11GitRepositoryLink\x12\x11OperationMetadata\xda\x41\x31parent,git_repository_link,git_repository_link_id\x82\xd3\xe4\x93\x02[\"D/v1/{parent=projects/*/locations/*/connections/*}/gitRepositoryLinks:\x13git_repository_link\x12\xfd\x01\n\x17\x44\x65leteGitRepositoryLink\x12@.google.cloud.developerconnect.v1.DeleteGitRepositoryLinkRequest\x1a\x1d.google.longrunning.Operation\"\x80\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x46*D/v1/{name=projects/*/locations/*/connections/*/gitRepositoryLinks/*}\x12\xf2\x01\n\x16ListGitRepositoryLinks\x12?.google.cloud.developerconnect.v1.ListGitRepositoryLinksRequest\x1a@.google.cloud.developerconnect.v1.ListGitRepositoryLinksResponse\"U\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x46\x12\x44/v1/{parent=projects/*/locations/*/connections/*}/gitRepositoryLinks\x12\xdf\x01\n\x14GetGitRepositoryLink\x12=.google.cloud.developerconnect.v1.GetGitRepositoryLinkRequest\x1a\x33.google.cloud.developerconnect.v1.GitRepositoryLink\"S\xda\x41\x04name\x82\xd3\xe4\x93\x02\x46\x12\x44/v1/{name=projects/*/locations/*/connections/*/gitRepositoryLinks/*}\x12\x9d\x02\n\x13\x46\x65tchReadWriteToken\x12<.google.cloud.developerconnect.v1.FetchReadWriteTokenRequest\x1a=.google.cloud.developerconnect.v1.FetchReadWriteTokenResponse\"\x88\x01\xda\x41\x13git_repository_link\x82\xd3\xe4\x93\x02l\"g/v1/{git_repository_link=projects/*/locations/*/connections/*/gitRepositoryLinks/*}:fetchReadWriteToken:\x01*\x12\x89\x02\n\x0e\x46\x65tchReadToken\x12\x37.google.cloud.developerconnect.v1.FetchReadTokenRequest\x1a\x38.google.cloud.developerconnect.v1.FetchReadTokenResponse\"\x83\x01\xda\x41\x13git_repository_link\x82\xd3\xe4\x93\x02g\"b/v1/{git_repository_link=projects/*/locations/*/connections/*/gitRepositoryLinks/*}:fetchReadToken:\x01*\x12\x96\x02\n\x1c\x46\x65tchLinkableGitRepositories\x12\x45.google.cloud.developerconnect.v1.FetchLinkableGitRepositoriesRequest\x1a\x46.google.cloud.developerconnect.v1.FetchLinkableGitRepositoriesResponse\"g\xda\x41\nconnection\x82\xd3\xe4\x93\x02T\x12R/v1/{connection=projects/*/locations/*/connections/*}:fetchLinkableGitRepositories\x12\x86\x02\n\x18\x46\x65tchGitHubInstallations\x12\x41.google.cloud.developerconnect.v1.FetchGitHubInstallationsRequest\x1a\x42.google.cloud.developerconnect.v1.FetchGitHubInstallationsResponse\"c\xda\x41\nconnection\x82\xd3\xe4\x93\x02P\x12N/v1/{connection=projects/*/locations/*/connections/*}:fetchGitHubInstallations\x12\x87\x02\n\x0c\x46\x65tchGitRefs\x12\x35.google.cloud.developerconnect.v1.FetchGitRefsRequest\x1a\x36.google.cloud.developerconnect.v1.FetchGitRefsResponse\"\x87\x01\xda\x41\x1cgit_repository_link,ref_type\x82\xd3\xe4\x93\x02\x62\x12`/v1/{git_repository_link=projects/*/locations/*/connections/*/gitRepositoryLinks/*}:fetchGitRefs\x12\xe0\x01\n\x15ListAccountConnectors\x12>.google.cloud.developerconnect.v1.ListAccountConnectorsRequest\x1a?.google.cloud.developerconnect.v1.ListAccountConnectorsResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{parent=projects/*/locations/*}/accountConnectors\x12\xcd\x01\n\x13GetAccountConnector\x12<.google.cloud.developerconnect.v1.GetAccountConnectorRequest\x1a\x32.google.cloud.developerconnect.v1.AccountConnector\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=projects/*/locations/*/accountConnectors/*}\x12\xa3\x02\n\x16\x43reateAccountConnector\x12?.google.cloud.developerconnect.v1.CreateAccountConnectorRequest\x1a\x1d.google.longrunning.Operation\"\xa8\x01\xca\x41%\n\x10\x41\x63\x63ountConnector\x12\x11OperationMetadata\xda\x41-parent,account_connector,account_connector_id\x82\xd3\xe4\x93\x02J\"5/v1/{parent=projects/*/locations/*}/accountConnectors:\x11\x61\x63\x63ount_connector\x12\xa5\x02\n\x16UpdateAccountConnector\x12?.google.cloud.developerconnect.v1.UpdateAccountConnectorRequest\x1a\x1d.google.longrunning.Operation\"\xaa\x01\xca\x41%\n\x10\x41\x63\x63ountConnector\x12\x11OperationMetadata\xda\x41\x1d\x61\x63\x63ount_connector,update_mask\x82\xd3\xe4\x93\x02\\2G/v1/{account_connector.name=projects/*/locations/*/accountConnectors/*}:\x11\x61\x63\x63ount_connector\x12\xeb\x01\n\x16\x44\x65leteAccountConnector\x12?.google.cloud.developerconnect.v1.DeleteAccountConnectorRequest\x1a\x1d.google.longrunning.Operation\"q\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1/{name=projects/*/locations/*/accountConnectors/*}\x12\x83\x02\n\x10\x46\x65tchAccessToken\x12\x39.google.cloud.developerconnect.v1.FetchAccessTokenRequest\x1a:.google.cloud.developerconnect.v1.FetchAccessTokenResponse\"x\xda\x41\x11\x61\x63\x63ount_connector\x82\xd3\xe4\x93\x02^\"Y/v1/{account_connector=projects/*/locations/*/accountConnectors/*}/users:fetchAccessToken:\x01*\x12\xc4\x01\n\tListUsers\x12\x32.google.cloud.developerconnect.v1.ListUsersRequest\x1a\x33.google.cloud.developerconnect.v1.ListUsersResponse\"N\xda\x41\x06parent\x82\xd3\xe4\x93\x02?\x12=/v1/{parent=projects/*/locations/*/accountConnectors/*}/users\x12\xdb\x01\n\nDeleteUser\x12\x33.google.cloud.developerconnect.v1.DeleteUserRequest\x1a\x1d.google.longrunning.Operation\"y\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02?*=/v1/{name=projects/*/locations/*/accountConnectors/*/users/*}\x12\xbd\x01\n\tFetchSelf\x12\x32.google.cloud.developerconnect.v1.FetchSelfRequest\x1a&.google.cloud.developerconnect.v1.User\"T\xda\x41\x04name\x82\xd3\xe4\x93\x02G\x12\x45/v1/{name=projects/*/locations/*/accountConnectors/*}/users:fetchSelf\x12\xe5\x01\n\nDeleteSelf\x12\x33.google.cloud.developerconnect.v1.DeleteSelfRequest\x1a\x1d.google.longrunning.Operation\"\x82\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02H*F/v1/{name=projects/*/locations/*/accountConnectors/*}/users:deleteSelf\x12\xec\x01\n\nStartOAuth\x12\x33.google.cloud.developerconnect.v1.StartOAuthRequest\x1a\x34.google.cloud.developerconnect.v1.StartOAuthResponse\"s\xda\x41\x11\x61\x63\x63ount_connector\x82\xd3\xe4\x93\x02Y\x12W/v1/{account_connector=projects/*/locations/*/accountConnectors/*}/users:startOAuthFlow\x12\xf0\x01\n\x0b\x46inishOAuth\x12\x34.google.cloud.developerconnect.v1.FinishOAuthRequest\x1a\x35.google.cloud.developerconnect.v1.FinishOAuthResponse\"t\xda\x41\x11\x61\x63\x63ount_connector\x82\xd3\xe4\x93\x02Z\x12X/v1/{account_connector=projects/*/locations/*/accountConnectors/*}/users:finishOAuthFlow\x1aS\xca\x41\x1f\x64\x65veloperconnect.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xbb\x06\n$com.google.cloud.developerconnect.v1B\x15\x44\x65veloperConnectProtoP\x01ZPcloud.google.com/go/developerconnect/apiv1/developerconnectpb;developerconnectpb\xa2\x02\x10\x44\x65veloperConnect\xaa\x02 Google.Cloud.DeveloperConnect.V1\xca\x02 Google\\Cloud\\DeveloperConnect\\V1\xea\x02#Google::Cloud::DeveloperConnect::V1\xea\x41\xbf\x01\n*secretmanager.googleapis.com/SecretVersion\x12=projects/{project}/secrets/{secret}/versions/{secret_version}\x12Rprojects/{project}/locations/{location}/secrets/{secret}/versions/{secret_version}\xea\x41x\n!cloudkms.googleapis.com/CryptoKey\x12Sprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}\xea\x41|\n\'servicedirectory.googleapis.com/Service\x12Qprojects/{project}/locations/{location}/namespaces/{namespace}/services/{service}\xea\x41k\n+securesourcemanager.googleapis.com/Instance\x12.google.cloud.developerconnect.v1.ListDeploymentEventsResponse\"W\xda\x41\x06parent\x82\xd3\xe4\x93\x02H\x12\x46/v1/{parent=projects/*/locations/*/insightsConfigs/*}/deploymentEvents\x1aS\xca\x41\x1f\x64\x65veloperconnect.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xd5\x01\n$com.google.cloud.developerconnect.v1B\x13InsightsConfigProtoP\x01ZPcloud.google.com/go/developerconnect/apiv1/developerconnectpb;developerconnectpb\xaa\x02 Google.Cloud.DeveloperConnect.V1\xca\x02 Google\\Cloud\\DeveloperConnect\\V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -50,13 +50,22 @@ module Developerconnect module V1 InsightsConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.InsightsConfig").msgclass InsightsConfig::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.InsightsConfig.State").enummodule + Projects = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.Projects").msgclass RuntimeConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.RuntimeConfig").msgclass RuntimeConfig::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.RuntimeConfig.State").enummodule GKEWorkload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.GKEWorkload").msgclass + GoogleCloudRun = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.GoogleCloudRun").msgclass AppHubWorkload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.AppHubWorkload").msgclass + AppHubService = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.AppHubService").msgclass ArtifactConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.ArtifactConfig").msgclass GoogleArtifactAnalysis = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.GoogleArtifactAnalysis").msgclass GoogleArtifactRegistry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.GoogleArtifactRegistry").msgclass + DeploymentEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.DeploymentEvent").msgclass + DeploymentEvent::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.DeploymentEvent.State").enummodule + GetDeploymentEventRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.GetDeploymentEventRequest").msgclass + ListDeploymentEventsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.ListDeploymentEventsRequest").msgclass + ListDeploymentEventsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.ListDeploymentEventsResponse").msgclass + ArtifactDeployment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.ArtifactDeployment").msgclass CreateInsightsConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.CreateInsightsConfigRequest").msgclass GetInsightsConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.GetInsightsConfigRequest").msgclass ListInsightsConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.ListInsightsConfigsRequest").msgclass diff --git a/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service.rb b/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service.rb index 54b6cac20165..d107015a6797 100644 --- a/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service.rb +++ b/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service.rb @@ -37,7 +37,7 @@ module V1 # # The InsightsConfig resource is the core configuration object to capture # events from your Software Development Lifecycle. It acts as the central hub - # for managing how Developer connect understands your application, its runtime + # for managing how Developer Connect understands your application, its runtime # environments, and the artifacts deployed within them. # A user can create an InsightsConfig, list previously-requested # InsightsConfigs or get InsightsConfigs by their ID to determine the status of diff --git a/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/client.rb b/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/client.rb index a04d87621a71..d8fede737e38 100644 --- a/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/client.rb +++ b/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/client.rb @@ -32,7 +32,7 @@ module InsightsConfigService # # The InsightsConfig resource is the core configuration object to capture # events from your Software Development Lifecycle. It acts as the central hub - # for managing how Developer connect understands your application, its runtime + # for managing how Developer Connect understands your application, its runtime # environments, and the artifacts deployed within them. # A user can create an InsightsConfig, list previously-requested # InsightsConfigs or get InsightsConfigs by their ID to determine the status of @@ -626,7 +626,7 @@ def update_insights_config request, options = nil end ## - # Delete a single Insight. + # Deletes a single Insight. # # @overload delete_insights_config(request, options = nil) # Pass arguments to `delete_insights_config` via a request object, either of type @@ -739,6 +739,200 @@ def delete_insights_config request, options = nil raise ::Google::Cloud::Error.from_error(e) end + ## + # Gets a single Deployment Event. + # + # @overload get_deployment_event(request, options = nil) + # Pass arguments to `get_deployment_event` via a request object, either of type + # {::Google::Cloud::Developerconnect::V1::GetDeploymentEventRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Developerconnect::V1::GetDeploymentEventRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_deployment_event(name: nil) + # Pass arguments to `get_deployment_event` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the deployment event to retrieve. + # Format: + # projects/\\{project}/locations/\\{location}/insightsConfigs/\\{insights_config}/deploymentEvents/\\{uuid} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Developerconnect::V1::DeploymentEvent] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Developerconnect::V1::DeploymentEvent] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Developerconnect::V1::GetDeploymentEventRequest.new + # + # # Call the get_deployment_event method. + # result = client.get_deployment_event request + # + # # The returned object is of type Google::Cloud::Developerconnect::V1::DeploymentEvent. + # p result + # + def get_deployment_event request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Developerconnect::V1::GetDeploymentEventRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_deployment_event.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_deployment_event.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_deployment_event.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @insights_config_service_stub.call_rpc :get_deployment_event, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Deployment Events in a given insights config. + # + # @overload list_deployment_events(request, options = nil) + # Pass arguments to `list_deployment_events` via a request object, either of type + # {::Google::Cloud::Developerconnect::V1::ListDeploymentEventsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Developerconnect::V1::ListDeploymentEventsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_deployment_events(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_deployment_events` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent insights config that owns this collection of + # deployment events. Format: + # projects/\\{project}/locations/\\{location}/insightsConfigs/\\{insights_config} + # @param page_size [::Integer] + # Optional. The maximum number of deployment events to return. The service + # may return fewer than this value. If unspecified, at most 50 deployment + # events will be returned. The maximum value is 1000; values above 1000 will + # be coerced to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListDeploymentEvents` + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListDeploymentEvents` + # must match the call that provided the page token. + # @param filter [::String] + # Optional. Filter expression that matches a subset of the DeploymentEvents. + # https://google.aip.dev/160. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Developerconnect::V1::DeploymentEvent>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Developerconnect::V1::DeploymentEvent>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Developerconnect::V1::ListDeploymentEventsRequest.new + # + # # Call the list_deployment_events method. + # result = client.list_deployment_events request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Developerconnect::V1::DeploymentEvent. + # p item + # end + # + def list_deployment_events request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Developerconnect::V1::ListDeploymentEventsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_deployment_events.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_deployment_events.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_deployment_events.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @insights_config_service_stub.call_rpc :list_deployment_events, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @insights_config_service_stub, :list_deployment_events, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + ## # Configuration class for the InsightsConfigService API. # @@ -947,6 +1141,16 @@ class Rpcs # @return [::Gapic::Config::Method] # attr_reader :delete_insights_config + ## + # RPC-specific configuration for `get_deployment_event` + # @return [::Gapic::Config::Method] + # + attr_reader :get_deployment_event + ## + # RPC-specific configuration for `list_deployment_events` + # @return [::Gapic::Config::Method] + # + attr_reader :list_deployment_events # @private def initialize parent_rpcs = nil @@ -960,6 +1164,10 @@ def initialize parent_rpcs = nil @update_insights_config = ::Gapic::Config::Method.new update_insights_config_config delete_insights_config_config = parent_rpcs.delete_insights_config if parent_rpcs.respond_to? :delete_insights_config @delete_insights_config = ::Gapic::Config::Method.new delete_insights_config_config + get_deployment_event_config = parent_rpcs.get_deployment_event if parent_rpcs.respond_to? :get_deployment_event + @get_deployment_event = ::Gapic::Config::Method.new get_deployment_event_config + list_deployment_events_config = parent_rpcs.list_deployment_events if parent_rpcs.respond_to? :list_deployment_events + @list_deployment_events = ::Gapic::Config::Method.new list_deployment_events_config yield self if block_given? end diff --git a/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/paths.rb b/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/paths.rb index 81463ad592ee..5143676aa284 100644 --- a/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/paths.rb +++ b/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/paths.rb @@ -24,6 +24,27 @@ module V1 module InsightsConfigService # Path helper methods for the InsightsConfigService API. module Paths + ## + # Create a fully-qualified DeploymentEvent resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/insightsConfigs/{insights_config}/deploymentEvents/{deployment_event}` + # + # @param project [String] + # @param location [String] + # @param insights_config [String] + # @param deployment_event [String] + # + # @return [::String] + def deployment_event_path project:, location:, insights_config:, deployment_event: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "insights_config cannot contain /" if insights_config.to_s.include? "/" + + "projects/#{project}/locations/#{location}/insightsConfigs/#{insights_config}/deploymentEvents/#{deployment_event}" + end + ## # Create a fully-qualified InsightsConfig resource string. # diff --git a/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/rest.rb b/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/rest.rb index fc6f250374d0..0f78850a39ba 100644 --- a/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/rest.rb +++ b/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/rest.rb @@ -37,7 +37,7 @@ module V1 # # The InsightsConfig resource is the core configuration object to capture # events from your Software Development Lifecycle. It acts as the central hub - # for managing how Developer connect understands your application, its runtime + # for managing how Developer Connect understands your application, its runtime # environments, and the artifacts deployed within them. # A user can create an InsightsConfig, list previously-requested # InsightsConfigs or get InsightsConfigs by their ID to determine the status of diff --git a/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/rest/client.rb b/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/rest/client.rb index 3278319a8bc4..1c5b68763790 100644 --- a/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/rest/client.rb +++ b/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/rest/client.rb @@ -34,7 +34,7 @@ module Rest # # The InsightsConfig resource is the core configuration object to capture # events from your Software Development Lifecycle. It acts as the central hub - # for managing how Developer connect understands your application, its runtime + # for managing how Developer Connect understands your application, its runtime # environments, and the artifacts deployed within them. # A user can create an InsightsConfig, list previously-requested # InsightsConfigs or get InsightsConfigs by their ID to determine the status of @@ -592,7 +592,7 @@ def update_insights_config request, options = nil end ## - # Delete a single Insight. + # Deletes a single Insight. # # @overload delete_insights_config(request, options = nil) # Pass arguments to `delete_insights_config` via a request object, either of type @@ -698,6 +698,186 @@ def delete_insights_config request, options = nil raise ::Google::Cloud::Error.from_error(e) end + ## + # Gets a single Deployment Event. + # + # @overload get_deployment_event(request, options = nil) + # Pass arguments to `get_deployment_event` via a request object, either of type + # {::Google::Cloud::Developerconnect::V1::GetDeploymentEventRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Developerconnect::V1::GetDeploymentEventRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_deployment_event(name: nil) + # Pass arguments to `get_deployment_event` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the deployment event to retrieve. + # Format: + # projects/\\{project}/locations/\\{location}/insightsConfigs/\\{insights_config}/deploymentEvents/\\{uuid} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Developerconnect::V1::DeploymentEvent] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Developerconnect::V1::DeploymentEvent] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Developerconnect::V1::GetDeploymentEventRequest.new + # + # # Call the get_deployment_event method. + # result = client.get_deployment_event request + # + # # The returned object is of type Google::Cloud::Developerconnect::V1::DeploymentEvent. + # p result + # + def get_deployment_event request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Developerconnect::V1::GetDeploymentEventRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_deployment_event.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_deployment_event.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_deployment_event.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @insights_config_service_stub.get_deployment_event request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Deployment Events in a given insights config. + # + # @overload list_deployment_events(request, options = nil) + # Pass arguments to `list_deployment_events` via a request object, either of type + # {::Google::Cloud::Developerconnect::V1::ListDeploymentEventsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Developerconnect::V1::ListDeploymentEventsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_deployment_events(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_deployment_events` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent insights config that owns this collection of + # deployment events. Format: + # projects/\\{project}/locations/\\{location}/insightsConfigs/\\{insights_config} + # @param page_size [::Integer] + # Optional. The maximum number of deployment events to return. The service + # may return fewer than this value. If unspecified, at most 50 deployment + # events will be returned. The maximum value is 1000; values above 1000 will + # be coerced to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListDeploymentEvents` + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListDeploymentEvents` + # must match the call that provided the page token. + # @param filter [::String] + # Optional. Filter expression that matches a subset of the DeploymentEvents. + # https://google.aip.dev/160. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Developerconnect::V1::DeploymentEvent>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Developerconnect::V1::DeploymentEvent>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/developer_connect/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Developerconnect::V1::ListDeploymentEventsRequest.new + # + # # Call the list_deployment_events method. + # result = client.list_deployment_events request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Developerconnect::V1::DeploymentEvent. + # p item + # end + # + def list_deployment_events request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Developerconnect::V1::ListDeploymentEventsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_deployment_events.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_deployment_events.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_deployment_events.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @insights_config_service_stub.list_deployment_events request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @insights_config_service_stub, :list_deployment_events, "deployment_events", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + ## # Configuration class for the InsightsConfigService REST API. # @@ -876,6 +1056,16 @@ class Rpcs # @return [::Gapic::Config::Method] # attr_reader :delete_insights_config + ## + # RPC-specific configuration for `get_deployment_event` + # @return [::Gapic::Config::Method] + # + attr_reader :get_deployment_event + ## + # RPC-specific configuration for `list_deployment_events` + # @return [::Gapic::Config::Method] + # + attr_reader :list_deployment_events # @private def initialize parent_rpcs = nil @@ -889,6 +1079,10 @@ def initialize parent_rpcs = nil @update_insights_config = ::Gapic::Config::Method.new update_insights_config_config delete_insights_config_config = parent_rpcs.delete_insights_config if parent_rpcs.respond_to? :delete_insights_config @delete_insights_config = ::Gapic::Config::Method.new delete_insights_config_config + get_deployment_event_config = parent_rpcs.get_deployment_event if parent_rpcs.respond_to? :get_deployment_event + @get_deployment_event = ::Gapic::Config::Method.new get_deployment_event_config + list_deployment_events_config = parent_rpcs.list_deployment_events if parent_rpcs.respond_to? :list_deployment_events + @list_deployment_events = ::Gapic::Config::Method.new list_deployment_events_config yield self if block_given? end diff --git a/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/rest/service_stub.rb b/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/rest/service_stub.rb index e51c2ace0801..40f8de75c850 100644 --- a/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/rest/service_stub.rb +++ b/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/rest/service_stub.rb @@ -273,6 +273,86 @@ def delete_insights_config request_pb, options = nil end end + ## + # Baseline implementation for the get_deployment_event REST call + # + # @param request_pb [::Google::Cloud::Developerconnect::V1::GetDeploymentEventRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Developerconnect::V1::DeploymentEvent] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Developerconnect::V1::DeploymentEvent] + # A result object deserialized from the server's reply + def get_deployment_event request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_deployment_event_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_deployment_event", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Developerconnect::V1::DeploymentEvent.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_deployment_events REST call + # + # @param request_pb [::Google::Cloud::Developerconnect::V1::ListDeploymentEventsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Developerconnect::V1::ListDeploymentEventsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Developerconnect::V1::ListDeploymentEventsResponse] + # A result object deserialized from the server's reply + def list_deployment_events request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_deployment_events_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_deployment_events", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Developerconnect::V1::ListDeploymentEventsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + ## # @private # @@ -379,6 +459,48 @@ def self.transcode_delete_insights_config_request request_pb ) transcoder.transcode request_pb end + + ## + # @private + # + # GRPC transcoding helper method for the get_deployment_event REST call + # + # @param request_pb [::Google::Cloud::Developerconnect::V1::GetDeploymentEventRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_deployment_event_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/insightsConfigs/[^/]+/deploymentEvents/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_deployment_events REST call + # + # @param request_pb [::Google::Cloud::Developerconnect::V1::ListDeploymentEventsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_deployment_events_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/deploymentEvents", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/insightsConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end end end end diff --git a/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_services_pb.rb b/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_services_pb.rb index bdba72420b8f..9203835e19ec 100644 --- a/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_services_pb.rb +++ b/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_services_pb.rb @@ -28,7 +28,7 @@ module InsightsConfigService # # The InsightsConfig resource is the core configuration object to capture # events from your Software Development Lifecycle. It acts as the central hub - # for managing how Developer connect understands your application, its runtime + # for managing how Developer Connect understands your application, its runtime # environments, and the artifacts deployed within them. # A user can create an InsightsConfig, list previously-requested # InsightsConfigs or get InsightsConfigs by their ID to determine the status of @@ -49,8 +49,12 @@ class Service rpc :GetInsightsConfig, ::Google::Cloud::Developerconnect::V1::GetInsightsConfigRequest, ::Google::Cloud::Developerconnect::V1::InsightsConfig # Updates the parameters of a single InsightsConfig. rpc :UpdateInsightsConfig, ::Google::Cloud::Developerconnect::V1::UpdateInsightsConfigRequest, ::Google::Longrunning::Operation - # Delete a single Insight. + # Deletes a single Insight. rpc :DeleteInsightsConfig, ::Google::Cloud::Developerconnect::V1::DeleteInsightsConfigRequest, ::Google::Longrunning::Operation + # Gets a single Deployment Event. + rpc :GetDeploymentEvent, ::Google::Cloud::Developerconnect::V1::GetDeploymentEventRequest, ::Google::Cloud::Developerconnect::V1::DeploymentEvent + # Lists Deployment Events in a given insights config. + rpc :ListDeploymentEvents, ::Google::Cloud::Developerconnect::V1::ListDeploymentEventsRequest, ::Google::Cloud::Developerconnect::V1::ListDeploymentEventsResponse end Stub = Service.rpc_stub_class diff --git a/google-cloud-developer_connect-v1/proto_docs/google/cloud/developerconnect/v1/developer_connect.rb b/google-cloud-developer_connect-v1/proto_docs/google/cloud/developerconnect/v1/developer_connect.rb index 7b74b09c71e6..ac6ea2998f0b 100644 --- a/google-cloud-developer_connect-v1/proto_docs/google/cloud/developerconnect/v1/developer_connect.rb +++ b/google-cloud-developer_connect-v1/proto_docs/google/cloud/developerconnect/v1/developer_connect.rb @@ -63,32 +63,42 @@ class ListUsersResponse # @return [::Google::Cloud::DeveloperConnect::V1::GitHubConfig] # Configuration for connections to github.com. # - # Note: The following fields are mutually exclusive: `github_config`, `github_enterprise_config`, `gitlab_config`, `gitlab_enterprise_config`, `bitbucket_data_center_config`, `bitbucket_cloud_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following fields are mutually exclusive: `github_config`, `github_enterprise_config`, `gitlab_config`, `gitlab_enterprise_config`, `bitbucket_data_center_config`, `bitbucket_cloud_config`, `secure_source_manager_instance_config`, `http_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] github_enterprise_config # @return [::Google::Cloud::DeveloperConnect::V1::GitHubEnterpriseConfig] # Configuration for connections to an instance of GitHub Enterprise. # - # Note: The following fields are mutually exclusive: `github_enterprise_config`, `github_config`, `gitlab_config`, `gitlab_enterprise_config`, `bitbucket_data_center_config`, `bitbucket_cloud_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following fields are mutually exclusive: `github_enterprise_config`, `github_config`, `gitlab_config`, `gitlab_enterprise_config`, `bitbucket_data_center_config`, `bitbucket_cloud_config`, `secure_source_manager_instance_config`, `http_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] gitlab_config # @return [::Google::Cloud::DeveloperConnect::V1::GitLabConfig] # Configuration for connections to gitlab.com. # - # Note: The following fields are mutually exclusive: `gitlab_config`, `github_config`, `github_enterprise_config`, `gitlab_enterprise_config`, `bitbucket_data_center_config`, `bitbucket_cloud_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following fields are mutually exclusive: `gitlab_config`, `github_config`, `github_enterprise_config`, `gitlab_enterprise_config`, `bitbucket_data_center_config`, `bitbucket_cloud_config`, `secure_source_manager_instance_config`, `http_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] gitlab_enterprise_config # @return [::Google::Cloud::DeveloperConnect::V1::GitLabEnterpriseConfig] # Configuration for connections to an instance of GitLab Enterprise. # - # Note: The following fields are mutually exclusive: `gitlab_enterprise_config`, `github_config`, `github_enterprise_config`, `gitlab_config`, `bitbucket_data_center_config`, `bitbucket_cloud_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following fields are mutually exclusive: `gitlab_enterprise_config`, `github_config`, `github_enterprise_config`, `gitlab_config`, `bitbucket_data_center_config`, `bitbucket_cloud_config`, `secure_source_manager_instance_config`, `http_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] bitbucket_data_center_config # @return [::Google::Cloud::DeveloperConnect::V1::BitbucketDataCenterConfig] # Configuration for connections to an instance of Bitbucket Data Center. # - # Note: The following fields are mutually exclusive: `bitbucket_data_center_config`, `github_config`, `github_enterprise_config`, `gitlab_config`, `gitlab_enterprise_config`, `bitbucket_cloud_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following fields are mutually exclusive: `bitbucket_data_center_config`, `github_config`, `github_enterprise_config`, `gitlab_config`, `gitlab_enterprise_config`, `bitbucket_cloud_config`, `secure_source_manager_instance_config`, `http_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] bitbucket_cloud_config # @return [::Google::Cloud::DeveloperConnect::V1::BitbucketCloudConfig] # Configuration for connections to an instance of Bitbucket Clouds. # - # Note: The following fields are mutually exclusive: `bitbucket_cloud_config`, `github_config`, `github_enterprise_config`, `gitlab_config`, `gitlab_enterprise_config`, `bitbucket_data_center_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following fields are mutually exclusive: `bitbucket_cloud_config`, `github_config`, `github_enterprise_config`, `gitlab_config`, `gitlab_enterprise_config`, `bitbucket_data_center_config`, `secure_source_manager_instance_config`, `http_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] secure_source_manager_instance_config + # @return [::Google::Cloud::DeveloperConnect::V1::SecureSourceManagerInstanceConfig] + # Configuration for connections to an instance of Secure Source Manager. + # + # Note: The following fields are mutually exclusive: `secure_source_manager_instance_config`, `github_config`, `github_enterprise_config`, `gitlab_config`, `gitlab_enterprise_config`, `bitbucket_data_center_config`, `bitbucket_cloud_config`, `http_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] http_config + # @return [::Google::Cloud::DeveloperConnect::V1::GenericHTTPEndpointConfig] + # Optional. Configuration for connections to an HTTP service provider. + # + # Note: The following fields are mutually exclusive: `http_config`, `github_config`, `github_enterprise_config`, `gitlab_config`, `gitlab_enterprise_config`, `bitbucket_data_center_config`, `bitbucket_cloud_config`, `secure_source_manager_instance_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] name # @return [::String] # Identifier. The resource name of the connection, in the format @@ -177,6 +187,14 @@ class CryptoKeyConfig # @return [::Boolean] # Optional. Setting this to true allows the git proxy to be used for # performing git operations on the repositories linked in the connection. + # @!attribute [r] http_proxy_base_uri + # @return [::String] + # Output only. The base URI for the HTTP proxy endpoint. Has + # the format + # `https://{generatedID}-c-h-{shortRegion}.developerconnect.dev` + # Populated only when enabled is set to true. + # This endpoint is used by other Google services that integrate with + # Developer Connect. class GitProxyConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -220,6 +238,57 @@ module Stage end end + # Defines the configuration for connections to an HTTP service provider. + # @!attribute [rw] basic_authentication + # @return [::Google::Cloud::DeveloperConnect::V1::GenericHTTPEndpointConfig::BasicAuthentication] + # Optional. Basic authentication with username and password. + # + # Note: The following fields are mutually exclusive: `basic_authentication`, `bearer_token_authentication`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bearer_token_authentication + # @return [::Google::Cloud::DeveloperConnect::V1::GenericHTTPEndpointConfig::BearerTokenAuthentication] + # Optional. Bearer token authentication with a token. + # + # Note: The following fields are mutually exclusive: `bearer_token_authentication`, `basic_authentication`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] host_uri + # @return [::String] + # Required. Immutable. The service provider's https endpoint. + # @!attribute [rw] service_directory_config + # @return [::Google::Cloud::DeveloperConnect::V1::ServiceDirectoryConfig] + # Optional. Configuration for using Service Directory to privately connect to + # a HTTP service provider. This should only be set if the Http service + # provider is hosted on-premises and not reachable by public internet. If + # this field is left empty, calls to the HTTP service provider will be made + # over the public internet. + # @!attribute [rw] ssl_ca_certificate + # @return [::String] + # Optional. The SSL certificate to use for requests to the HTTP service + # provider. + class GenericHTTPEndpointConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Basic authentication with username and password. + # @!attribute [rw] password_secret_version + # @return [::String] + # The password SecretManager secret version to authenticate as. + # @!attribute [rw] username + # @return [::String] + # Required. The username to authenticate as. + class BasicAuthentication + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Bearer token authentication with a token. + # @!attribute [rw] token_secret_version + # @return [::String] + # Optional. The token SecretManager secret version to authenticate as. + class BearerTokenAuthentication + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + # Configuration for connections to github.com. # @!attribute [rw] github_app # @return [::Google::Cloud::DeveloperConnect::V1::GitHubConfig::GitHubApp] @@ -252,6 +321,9 @@ module GitHubApp # The Firebase GitHub Application. FIREBASE = 2 + + # The Gemini Code Assist Application. + GEMINI_CODE_ASSIST = 3 end end @@ -268,11 +340,15 @@ module GitHubApp # @!attribute [rw] private_key_secret_version # @return [::String] # Optional. SecretManager resource containing the private key of the GitHub - # App, formatted as `projects/*/secrets/*/versions/*`. + # App, formatted as `projects/*/secrets/*/versions/*` or + # `projects/*/locations/*/secrets/*/versions/*` (if regional secrets are + # supported in that location). # @!attribute [rw] webhook_secret_secret_version # @return [::String] # Optional. SecretManager resource containing the webhook secret of the - # GitHub App, formatted as `projects/*/secrets/*/versions/*`. + # GitHub App, formatted as `projects/*/secrets/*/versions/*` or + # `projects/*/locations/*/secrets/*/versions/*` (if regional secrets are + # supported in that location). # @!attribute [rw] app_installation_id # @return [::Integer] # Optional. ID of the installation of the GitHub App. @@ -293,6 +369,10 @@ module GitHubApp # @!attribute [rw] ssl_ca_certificate # @return [::String] # Optional. SSL certificate to use for requests to GitHub Enterprise. + # @!attribute [rw] organization + # @return [::String] + # Optional. Immutable. GitHub Enterprise organization in which the GitHub App + # is created. class GitHubEnterpriseConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -315,7 +395,9 @@ class ServiceDirectoryConfig # @!attribute [rw] oauth_token_secret_version # @return [::String] # Required. A SecretManager resource containing the OAuth token that - # authorizes the connection. Format: `projects/*/secrets/*/versions/*`. + # authorizes the connection. Format: `projects/*/secrets/*/versions/*` or + # `projects/*/locations/*/secrets/*/versions/*` (if regional secrets are + # supported in that location). # @!attribute [r] username # @return [::String] # Output only. The username associated with this token. @@ -328,8 +410,9 @@ class OAuthCredential # @!attribute [rw] webhook_secret_secret_version # @return [::String] # Required. Immutable. SecretManager resource containing the webhook secret - # of a GitLab project, formatted as `projects/*/secrets/*/versions/*`. This - # is used to validate webhooks. + # of a GitLab project, formatted as `projects/*/secrets/*/versions/*` or + # `projects/*/locations/*/secrets/*/versions/*` (if regional secrets are + # supported in that location). This is used to validate webhooks. # @!attribute [rw] read_authorizer_credential # @return [::Google::Cloud::DeveloperConnect::V1::UserCredential] # Required. A GitLab personal access token with the minimum `read_api` scope @@ -353,7 +436,9 @@ class GitLabConfig # @return [::String] # Required. A SecretManager resource containing the user token that # authorizes the Developer Connect connection. Format: - # `projects/*/secrets/*/versions/*`. + # `projects/*/secrets/*/versions/*` or + # `projects/*/locations/*/secrets/*/versions/*` (if regional secrets are + # supported in that location). # @!attribute [r] username # @return [::String] # Output only. The username associated with this token. @@ -369,8 +454,9 @@ class UserCredential # @!attribute [rw] webhook_secret_secret_version # @return [::String] # Required. Immutable. SecretManager resource containing the webhook secret - # of a GitLab project, formatted as `projects/*/secrets/*/versions/*`. This - # is used to validate webhooks. + # of a GitLab project, formatted as `projects/*/secrets/*/versions/*` or + # `projects/*/locations/*/secrets/*/versions/*` (if regional secrets are + # supported in that location). This is used to validate webhooks. # @!attribute [rw] read_authorizer_credential # @return [::Google::Cloud::DeveloperConnect::V1::UserCredential] # Required. A GitLab personal access token with the minimum `read_api` scope @@ -411,7 +497,9 @@ class GitLabEnterpriseConfig # @return [::String] # Required. Immutable. SecretManager resource containing the webhook secret # used to verify webhook events, formatted as - # `projects/*/secrets/*/versions/*`. This is used to validate webhooks. + # `projects/*/secrets/*/versions/*` or + # `projects/*/locations/*/secrets/*/versions/*` (if regional secrets are + # supported in that location). This is used to validate webhooks. # @!attribute [rw] read_authorizer_credential # @return [::Google::Cloud::DeveloperConnect::V1::UserCredential] # Required. An http access token with the minimum `Repository read` access. @@ -450,8 +538,9 @@ class BitbucketDataCenterConfig # @return [::String] # Required. Immutable. SecretManager resource containing the webhook secret # used to verify webhook events, formatted as - # `projects/*/secrets/*/versions/*`. This is used to validate and create - # webhooks. + # `projects/*/secrets/*/versions/*` or + # `projects/*/locations/*/secrets/*/versions/*` (if regional secrets are + # supported in that location). This is used to validate and create webhooks. # @!attribute [rw] read_authorizer_credential # @return [::Google::Cloud::DeveloperConnect::V1::UserCredential] # Required. An access token with the minimum `repository` access. @@ -468,6 +557,16 @@ class BitbucketCloudConfig extend ::Google::Protobuf::MessageExts::ClassMethods end + # Configuration for connections to Secure Source Manager instance + # @!attribute [rw] instance + # @return [::String] + # Required. Immutable. Secure Source Manager instance resource, formatted as + # `projects/*/locations/*/instances/*` + class SecureSourceManagerInstanceConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # Message for requesting list of Connections # @!attribute [rw] parent # @return [::String] @@ -887,6 +986,102 @@ class FetchAccessTokenResponse extend ::Google::Protobuf::MessageExts::ClassMethods end + # Message for starting an OAuth flow. + # @!attribute [rw] account_connector + # @return [::String] + # Required. The resource name of the AccountConnector in the format + # `projects/*/locations/*/accountConnectors/*`. + class StartOAuthRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for responding to starting an OAuth flow. + # @!attribute [rw] system_provider_id + # @return [::Google::Cloud::DeveloperConnect::V1::SystemProvider] + # The ID of the system provider. + # @!attribute [rw] ticket + # @return [::String] + # The ticket to be used for post processing the callback from the service + # provider. + # @!attribute [rw] code_challenge + # @return [::String] + # Please refer to https://datatracker.ietf.org/doc/html/rfc7636#section-4.1 + # @!attribute [rw] code_challenge_method + # @return [::String] + # Please refer to https://datatracker.ietf.org/doc/html/rfc7636#section-4.2 + # @!attribute [rw] client_id + # @return [::String] + # The client ID to the OAuth App of the service provider. + # @!attribute [rw] scopes + # @return [::Array<::String>] + # The list of scopes requested by the application. + # @!attribute [rw] auth_uri + # @return [::String] + # The authorization server URL to the OAuth flow of the service provider. + class StartOAuthResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for finishing an OAuth flow. + # @!attribute [rw] oauth_params + # @return [::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest::OAuthParams] + # The params returned by non-Google OAuth 2.0 flow redirect. + # + # Note: The following fields are mutually exclusive: `oauth_params`, `google_oauth_params`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] google_oauth_params + # @return [::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest::GoogleOAuthParams] + # The params returned by Google OAuth flow redirects. + # + # Note: The following fields are mutually exclusive: `google_oauth_params`, `oauth_params`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] account_connector + # @return [::String] + # Required. The resource name of the AccountConnector in the format + # `projects/*/locations/*/accountConnectors/*`. + class FinishOAuthRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The params returned by non-Google OAuth 2.0 flow redirect. + # @!attribute [rw] code + # @return [::String] + # Required. The code to be used for getting the token from SCM provider. + # @!attribute [rw] ticket + # @return [::String] + # Required. The ticket to be used for post processing the callback from SCM + # provider. + class OAuthParams + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The params returned by Google OAuth flow redirects. + # @!attribute [rw] scopes + # @return [::Array<::String>] + # Required. The scopes returned by Google OAuth flow. + # @!attribute [rw] version_info + # @return [::String] + # Optional. The version info returned by Google OAuth flow. + # @!attribute [rw] ticket + # @return [::String] + # Required. The ticket to be used for post processing the callback from + # Google OAuth flow. + class GoogleOAuthParams + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Message for responding to finishing an OAuth flow. + # @!attribute [rw] exchange_error + # @return [::Google::Cloud::DeveloperConnect::V1::ExchangeError] + # The error resulted from exchanging OAuth tokens from the service provider. + class FinishOAuthResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # Message for representing an error from exchanging OAuth tokens. # @!attribute [rw] code # @return [::String] @@ -1256,7 +1451,7 @@ class FetchGitRefsResponse # token endpoints. # @!attribute [rw] provider_oauth_config # @return [::Google::Cloud::DeveloperConnect::V1::ProviderOAuthConfig] - # Provider OAuth config. + # Optional. Provider OAuth config. # @!attribute [rw] name # @return [::String] # Identifier. The resource name of the accountConnector, in the format @@ -1328,7 +1523,7 @@ class User # ProviderOAuthConfig is the OAuth config for a provider. # @!attribute [rw] system_provider_id # @return [::Google::Cloud::DeveloperConnect::V1::SystemProvider] - # Immutable. Developer Connect provided OAuth. + # Optional. Immutable. Developer Connect provided OAuth. # @!attribute [rw] scopes # @return [::Array<::String>] # Required. User selected scopes to apply to the Oauth config diff --git a/google-cloud-developer_connect-v1/proto_docs/google/cloud/developerconnect/v1/insights_config.rb b/google-cloud-developer_connect-v1/proto_docs/google/cloud/developerconnect/v1/insights_config.rb index cf43b8b20420..2ca9342d475b 100644 --- a/google-cloud-developer_connect-v1/proto_docs/google/cloud/developerconnect/v1/insights_config.rb +++ b/google-cloud-developer_connect-v1/proto_docs/google/cloud/developerconnect/v1/insights_config.rb @@ -23,13 +23,20 @@ module Developerconnect module V1 # The InsightsConfig resource is the core configuration object to capture # events from your Software Development Lifecycle. It acts as the central hub - # for managing how Developer connect understands your application, its runtime + # for managing how Developer Connect understands your application, its runtime # environments, and the artifacts deployed within them. # @!attribute [rw] app_hub_application # @return [::String] # Optional. The name of the App Hub Application. # Format: # projects/\\{project}/locations/\\{location}/applications/\\{application} + # + # Note: The following fields are mutually exclusive: `app_hub_application`, `projects`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] projects + # @return [::Google::Cloud::Developerconnect::V1::Projects] + # Optional. The projects to track with the InsightsConfig. + # + # Note: The following fields are mutually exclusive: `projects`, `app_hub_application`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] name # @return [::String] # Identifier. The name of the InsightsConfig. @@ -37,10 +44,10 @@ module V1 # projects/\\{project}/locations/\\{location}/insightsConfigs/\\{insightsConfig} # @!attribute [r] create_time # @return [::Google::Protobuf::Timestamp] - # Output only. [Output only] Create timestamp + # Output only. Create timestamp. # @!attribute [r] update_time # @return [::Google::Protobuf::Timestamp] - # Output only. [Output only] Update timestamp + # Output only. Update timestamp. # @!attribute [r] runtime_configs # @return [::Array<::Google::Cloud::Developerconnect::V1::RuntimeConfig>] # Output only. The runtime configurations where the application is deployed. @@ -109,14 +116,38 @@ module State end end + # Projects represents the projects to track with the InsightsConfig. + # @!attribute [rw] project_ids + # @return [::Array<::String>] + # Optional. The project IDs. + # Format: \\{project} + class Projects + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # RuntimeConfig represents the runtimes where the application is # deployed. # @!attribute [r] gke_workload # @return [::Google::Cloud::Developerconnect::V1::GKEWorkload] # Output only. Google Kubernetes Engine runtime. + # + # Note: The following fields are mutually exclusive: `gke_workload`, `google_cloud_run`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] google_cloud_run + # @return [::Google::Cloud::Developerconnect::V1::GoogleCloudRun] + # Output only. Cloud Run runtime. + # + # Note: The following fields are mutually exclusive: `google_cloud_run`, `gke_workload`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [r] app_hub_workload # @return [::Google::Cloud::Developerconnect::V1::AppHubWorkload] # Output only. App Hub Workload. + # + # Note: The following fields are mutually exclusive: `app_hub_workload`, `app_hub_service`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] app_hub_service + # @return [::Google::Cloud::Developerconnect::V1::AppHubService] + # Output only. App Hub Service. + # + # Note: The following fields are mutually exclusive: `app_hub_service`, `app_hub_workload`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] uri # @return [::String] # Required. Immutable. The URI of the runtime configuration. @@ -159,6 +190,17 @@ class GKEWorkload extend ::Google::Protobuf::MessageExts::ClassMethods end + # GoogleCloudRun represents the Cloud Run runtime. + # @!attribute [rw] service_uri + # @return [::String] + # Required. Immutable. The name of the Cloud Run service. + # Format: + # `projects/{project}/locations/{location}/services/{service}`. + class GoogleCloudRun + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # AppHubWorkload represents the App Hub Workload. # @!attribute [r] workload # @return [::String] @@ -176,10 +218,27 @@ class AppHubWorkload extend ::Google::Protobuf::MessageExts::ClassMethods end + # AppHubService represents the App Hub Service. + # @!attribute [r] apphub_service + # @return [::String] + # Required. Output only. Immutable. The name of the App Hub Service. + # Format: + # `projects/{project}/locations/{location}/applications/{application}/services/{service}`. + # @!attribute [r] criticality + # @return [::String] + # Output only. The criticality of the App Hub Service. + # @!attribute [r] environment + # @return [::String] + # Output only. The environment of the App Hub Service. + class AppHubService + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # The artifact config of the artifact that is deployed. # @!attribute [rw] google_artifact_registry # @return [::Google::Cloud::Developerconnect::V1::GoogleArtifactRegistry] - # Optional. Set if the artifact is stored in Artifact regsitry. + # Optional. Set if the artifact is stored in Artifact registry. # @!attribute [rw] google_artifact_analysis # @return [::Google::Cloud::Developerconnect::V1::GoogleArtifactAnalysis] # Optional. Set if the artifact metadata is stored in Artifact analysis. @@ -215,6 +274,150 @@ class GoogleArtifactRegistry extend ::Google::Protobuf::MessageExts::ClassMethods end + # The DeploymentEvent resource represents the deployment of the artifact within + # the InsightsConfig resource. + # @!attribute [rw] name + # @return [::String] + # Identifier. The name of the DeploymentEvent. This name is provided by + # Developer Connect insights. Format: + # projects/\\{project}/locations/\\{location}/insightsConfigs/\\{insights_config}/deploymentEvents/\\{uuid} + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The create time of the DeploymentEvent. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The update time of the DeploymentEvent. + # @!attribute [r] runtime_config + # @return [::Google::Cloud::Developerconnect::V1::RuntimeConfig] + # Output only. The runtime configurations where the DeploymentEvent happened. + # @!attribute [r] runtime_deployment_uri + # @return [::String] + # Output only. The runtime assigned URI of the DeploymentEvent. + # For GKE, this is the fully qualified replica set uri. + # e.g. + # container.googleapis.com/projects/\\{project}/locations/\\{location}/clusters/\\{cluster}/k8s/namespaces/\\{namespace}/apps/replicasets/\\{replica-set-id} + # For Cloud Run, this is the revision name. + # @!attribute [r] state + # @return [::Google::Cloud::Developerconnect::V1::DeploymentEvent::State] + # Output only. The state of the DeploymentEvent. + # @!attribute [r] artifact_deployments + # @return [::Array<::Google::Cloud::Developerconnect::V1::ArtifactDeployment>] + # Output only. The artifact deployments of the DeploymentEvent. Each artifact + # deployment contains the artifact uri and the runtime configuration uri. For + # GKE, this would be all the containers images that are deployed in the pod. + # @!attribute [r] deploy_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the DeploymentEvent was deployed. + # This would be the min of all ArtifactDeployment deploy_times. + # @!attribute [r] undeploy_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the DeploymentEvent was undeployed, all + # artifacts are considered undeployed once this time is set. This would be + # the max of all ArtifactDeployment undeploy_times. If any ArtifactDeployment + # is still active (i.e. does not have an undeploy_time), this field will be + # empty. + class DeploymentEvent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The state of the DeploymentEvent. + module State + # No state specified. + STATE_UNSPECIFIED = 0 + + # The deployment is active in the runtime. + STATE_ACTIVE = 1 + + # The deployment is not in the runtime. + STATE_INACTIVE = 2 + end + end + + # Request for getting a DeploymentEvent. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the deployment event to retrieve. + # Format: + # projects/\\{project}/locations/\\{location}/insightsConfigs/\\{insights_config}/deploymentEvents/\\{uuid} + class GetDeploymentEventRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for requesting list of DeploymentEvents. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent insights config that owns this collection of + # deployment events. Format: + # projects/\\{project}/locations/\\{location}/insightsConfigs/\\{insights_config} + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of deployment events to return. The service + # may return fewer than this value. If unspecified, at most 50 deployment + # events will be returned. The maximum value is 1000; values above 1000 will + # be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListDeploymentEvents` + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListDeploymentEvents` + # must match the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter expression that matches a subset of the DeploymentEvents. + # https://google.aip.dev/160. + class ListDeploymentEventsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response to listing DeploymentEvents. + # @!attribute [rw] deployment_events + # @return [::Array<::Google::Cloud::Developerconnect::V1::DeploymentEvent>] + # The list of DeploymentEvents. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListDeploymentEventsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The ArtifactDeployment resource represents the deployment of the artifact + # within the InsightsConfig resource. + # @!attribute [r] id + # @return [::String] + # Output only. Unique identifier of `ArtifactDeployment`. + # @!attribute [r] artifact_reference + # @return [::String] + # Output only. The artifact that is deployed. + # @!attribute [r] artifact_alias + # @return [::String] + # Output only. The artifact alias in the deployment spec, with Tag/SHA. + # e.g. us-docker.pkg.dev/my-project/my-repo/image:1.0.0 + # @!attribute [r] source_commit_uris + # @return [::Array<::String>] + # Output only. The source commits at which this artifact was built. Extracted + # from provenance. + # @!attribute [r] deploy_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the deployment was deployed. + # @!attribute [r] undeploy_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the deployment was undeployed, all artifacts + # are considered undeployed once this time is set. + # @!attribute [r] container_status_summary + # @return [::String] + # Output only. The summary of container status of the artifact deployment. + # Format as `ContainerStatusState-Reason : restartCount` + # e.g. "Waiting-ImagePullBackOff : 3" + class ArtifactDeployment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # Request for creating an InsightsConfig. # @!attribute [rw] parent # @return [::String] diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/finish_o_auth.rb b/google-cloud-developer_connect-v1/snippets/developer_connect/finish_o_auth.rb similarity index 100% rename from owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/finish_o_auth.rb rename to google-cloud-developer_connect-v1/snippets/developer_connect/finish_o_auth.rb diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/start_o_auth.rb b/google-cloud-developer_connect-v1/snippets/developer_connect/start_o_auth.rb similarity index 100% rename from owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/start_o_auth.rb rename to google-cloud-developer_connect-v1/snippets/developer_connect/start_o_auth.rb diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/insights_config_service/get_deployment_event.rb b/google-cloud-developer_connect-v1/snippets/insights_config_service/get_deployment_event.rb similarity index 100% rename from owl-bot-staging/google-cloud-developer_connect-v1/snippets/insights_config_service/get_deployment_event.rb rename to google-cloud-developer_connect-v1/snippets/insights_config_service/get_deployment_event.rb diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/insights_config_service/list_deployment_events.rb b/google-cloud-developer_connect-v1/snippets/insights_config_service/list_deployment_events.rb similarity index 100% rename from owl-bot-staging/google-cloud-developer_connect-v1/snippets/insights_config_service/list_deployment_events.rb rename to google-cloud-developer_connect-v1/snippets/insights_config_service/list_deployment_events.rb diff --git a/google-cloud-developer_connect-v1/snippets/snippet_metadata_google.cloud.developerconnect.v1.json b/google-cloud-developer_connect-v1/snippets/snippet_metadata_google.cloud.developerconnect.v1.json index d35fcd1d7e8d..1ef1a6b95d26 100644 --- a/google-cloud-developer_connect-v1/snippets/snippet_metadata_google.cloud.developerconnect.v1.json +++ b/google-cloud-developer_connect-v1/snippets/snippet_metadata_google.cloud.developerconnect.v1.json @@ -971,6 +971,86 @@ } ] }, + { + "region_tag": "developerconnect_v1_generated_DeveloperConnect_StartOAuth_sync", + "title": "Snippet for the start_o_auth call in the DeveloperConnect service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#start_o_auth.", + "file": "developer_connect/start_o_auth.rb", + "language": "RUBY", + "client_method": { + "short_name": "start_o_auth", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#start_o_auth", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DeveloperConnect::V1::StartOAuthRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::DeveloperConnect::V1::StartOAuthResponse", + "client": { + "short_name": "DeveloperConnect::Client", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" + }, + "method": { + "short_name": "StartOAuth", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.StartOAuth", + "service": { + "short_name": "DeveloperConnect", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "developerconnect_v1_generated_DeveloperConnect_FinishOAuth_sync", + "title": "Snippet for the finish_o_auth call in the DeveloperConnect service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#finish_o_auth.", + "file": "developer_connect/finish_o_auth.rb", + "language": "RUBY", + "client_method": { + "short_name": "finish_o_auth", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#finish_o_auth", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::DeveloperConnect::V1::FinishOAuthResponse", + "client": { + "short_name": "DeveloperConnect::Client", + "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" + }, + "method": { + "short_name": "FinishOAuth", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.FinishOAuth", + "service": { + "short_name": "DeveloperConnect", + "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, { "region_tag": "developerconnect_v1_generated_InsightsConfigService_ListInsightsConfigs_sync", "title": "Snippet for the list_insights_configs call in the InsightsConfigService service", @@ -1170,6 +1250,86 @@ "type": "FULL" } ] + }, + { + "region_tag": "developerconnect_v1_generated_InsightsConfigService_GetDeploymentEvent_sync", + "title": "Snippet for the get_deployment_event call in the InsightsConfigService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Developerconnect::V1::InsightsConfigService::Client#get_deployment_event.", + "file": "insights_config_service/get_deployment_event.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_deployment_event", + "full_name": "::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client#get_deployment_event", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Developerconnect::V1::GetDeploymentEventRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Developerconnect::V1::DeploymentEvent", + "client": { + "short_name": "InsightsConfigService::Client", + "full_name": "::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client" + }, + "method": { + "short_name": "GetDeploymentEvent", + "full_name": "google.cloud.developerconnect.v1.InsightsConfigService.GetDeploymentEvent", + "service": { + "short_name": "InsightsConfigService", + "full_name": "google.cloud.developerconnect.v1.InsightsConfigService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "developerconnect_v1_generated_InsightsConfigService_ListDeploymentEvents_sync", + "title": "Snippet for the list_deployment_events call in the InsightsConfigService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Developerconnect::V1::InsightsConfigService::Client#list_deployment_events.", + "file": "insights_config_service/list_deployment_events.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_deployment_events", + "full_name": "::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client#list_deployment_events", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Developerconnect::V1::ListDeploymentEventsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Developerconnect::V1::ListDeploymentEventsResponse", + "client": { + "short_name": "InsightsConfigService::Client", + "full_name": "::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client" + }, + "method": { + "short_name": "ListDeploymentEvents", + "full_name": "google.cloud.developerconnect.v1.InsightsConfigService.ListDeploymentEvents", + "service": { + "short_name": "InsightsConfigService", + "full_name": "google.cloud.developerconnect.v1.InsightsConfigService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] } ] } \ No newline at end of file diff --git a/google-cloud-developer_connect-v1/test/google/cloud/developer_connect/v1/developer_connect_paths_test.rb b/google-cloud-developer_connect-v1/test/google/cloud/developer_connect/v1/developer_connect_paths_test.rb index 956117691ccb..b636cf18fb09 100644 --- a/google-cloud-developer_connect-v1/test/google/cloud/developer_connect/v1/developer_connect_paths_test.rb +++ b/google-cloud-developer_connect-v1/test/google/cloud/developer_connect/v1/developer_connect_paths_test.rb @@ -89,6 +89,18 @@ def test_git_repository_link_path end end + def test_instance_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.instance_path project: "value0", location: "value1", instance: "value2" + assert_equal "projects/value0/locations/value1/instances/value2", path + end + end + def test_location_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, DummyStub.new do @@ -110,6 +122,9 @@ def test_secret_version_path path = client.secret_version_path project: "value0", secret: "value1", secret_version: "value2" assert_equal "projects/value0/secrets/value1/versions/value2", path + + path = client.secret_version_path project: "value0", location: "value1", secret: "value2", secret_version: "value3" + assert_equal "projects/value0/locations/value1/secrets/value2/versions/value3", path end end diff --git a/google-cloud-developer_connect-v1/test/google/cloud/developer_connect/v1/developer_connect_rest_test.rb b/google-cloud-developer_connect-v1/test/google/cloud/developer_connect/v1/developer_connect_rest_test.rb index a27e42d603a5..7546d75debba 100644 --- a/google-cloud-developer_connect-v1/test/google/cloud/developer_connect/v1/developer_connect_rest_test.rb +++ b/google-cloud-developer_connect-v1/test/google/cloud/developer_connect/v1/developer_connect_rest_test.rb @@ -1428,6 +1428,115 @@ def test_delete_self end end + def test_start_o_auth + # Create test objects. + client_result = ::Google::Cloud::DeveloperConnect::V1::StartOAuthResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + account_connector = "hello world" + + start_o_auth_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_start_o_auth_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, start_o_auth_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.start_o_auth({ account_connector: account_connector }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.start_o_auth account_connector: account_connector do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.start_o_auth ::Google::Cloud::DeveloperConnect::V1::StartOAuthRequest.new(account_connector: account_connector) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.start_o_auth({ account_connector: account_connector }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.start_o_auth(::Google::Cloud::DeveloperConnect::V1::StartOAuthRequest.new(account_connector: account_connector), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, start_o_auth_client_stub.call_count + end + end + end + + def test_finish_o_auth + # Create test objects. + client_result = ::Google::Cloud::DeveloperConnect::V1::FinishOAuthResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + oauth_params = {} + account_connector = "hello world" + + finish_o_auth_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_finish_o_auth_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, finish_o_auth_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.finish_o_auth({ oauth_params: oauth_params, account_connector: account_connector }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.finish_o_auth oauth_params: oauth_params, account_connector: account_connector do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.finish_o_auth ::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest.new(oauth_params: oauth_params, account_connector: account_connector) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.finish_o_auth({ oauth_params: oauth_params, account_connector: account_connector }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.finish_o_auth(::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest.new(oauth_params: oauth_params, account_connector: account_connector), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, finish_o_auth_client_stub.call_count + end + end + end + def test_configure credentials_token = :dummy_value diff --git a/google-cloud-developer_connect-v1/test/google/cloud/developer_connect/v1/developer_connect_test.rb b/google-cloud-developer_connect-v1/test/google/cloud/developer_connect/v1/developer_connect_test.rb index 69d99795e73c..809aabff221a 100644 --- a/google-cloud-developer_connect-v1/test/google/cloud/developer_connect/v1/developer_connect_test.rb +++ b/google-cloud-developer_connect-v1/test/google/cloud/developer_connect/v1/developer_connect_test.rb @@ -1638,6 +1638,125 @@ def test_delete_self end end + def test_start_o_auth + # Create GRPC objects. + grpc_response = ::Google::Cloud::DeveloperConnect::V1::StartOAuthResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + account_connector = "hello world" + + start_o_auth_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :start_o_auth, name + assert_kind_of ::Google::Cloud::DeveloperConnect::V1::StartOAuthRequest, request + assert_equal "hello world", request["account_connector"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, start_o_auth_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.start_o_auth({ account_connector: account_connector }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.start_o_auth account_connector: account_connector do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.start_o_auth ::Google::Cloud::DeveloperConnect::V1::StartOAuthRequest.new(account_connector: account_connector) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.start_o_auth({ account_connector: account_connector }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.start_o_auth(::Google::Cloud::DeveloperConnect::V1::StartOAuthRequest.new(account_connector: account_connector), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, start_o_auth_client_stub.call_rpc_count + end + end + + def test_finish_o_auth + # Create GRPC objects. + grpc_response = ::Google::Cloud::DeveloperConnect::V1::FinishOAuthResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + oauth_params = {} + account_connector = "hello world" + + finish_o_auth_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :finish_o_auth, name + assert_kind_of ::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest::OAuthParams), request["oauth_params"] + assert_equal :oauth_params, request.params + assert_equal "hello world", request["account_connector"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, finish_o_auth_client_stub do + # Create client + client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.finish_o_auth({ oauth_params: oauth_params, account_connector: account_connector }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.finish_o_auth oauth_params: oauth_params, account_connector: account_connector do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.finish_o_auth ::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest.new(oauth_params: oauth_params, account_connector: account_connector) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.finish_o_auth({ oauth_params: oauth_params, account_connector: account_connector }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.finish_o_auth(::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest.new(oauth_params: oauth_params, account_connector: account_connector), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, finish_o_auth_client_stub.call_rpc_count + end + end + def test_configure grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure diff --git a/google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_paths_test.rb b/google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_paths_test.rb index 74c5831d3177..dd2b20121873 100644 --- a/google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_paths_test.rb +++ b/google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_paths_test.rb @@ -41,6 +41,18 @@ def logger end end + def test_deployment_event_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.deployment_event_path project: "value0", location: "value1", insights_config: "value2", deployment_event: "value3" + assert_equal "projects/value0/locations/value1/insightsConfigs/value2/deploymentEvents/value3", path + end + end + def test_insights_config_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, DummyStub.new do diff --git a/google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_rest_test.rb b/google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_rest_test.rb index 92b7cc84be1f..4654bcd9f870 100644 --- a/google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_rest_test.rb +++ b/google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_rest_test.rb @@ -361,6 +361,117 @@ def test_delete_insights_config end end + def test_get_deployment_event + # Create test objects. + client_result = ::Google::Cloud::Developerconnect::V1::DeploymentEvent.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_deployment_event_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::ServiceStub.stub :transcode_get_deployment_event_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_deployment_event_client_stub do + # Create client + client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_deployment_event({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_deployment_event name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_deployment_event ::Google::Cloud::Developerconnect::V1::GetDeploymentEventRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_deployment_event({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_deployment_event(::Google::Cloud::Developerconnect::V1::GetDeploymentEventRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_deployment_event_client_stub.call_count + end + end + end + + def test_list_deployment_events + # Create test objects. + client_result = ::Google::Cloud::Developerconnect::V1::ListDeploymentEventsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_deployment_events_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::ServiceStub.stub :transcode_list_deployment_events_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_deployment_events_client_stub do + # Create client + client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_deployment_events({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_deployment_events parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_deployment_events ::Google::Cloud::Developerconnect::V1::ListDeploymentEventsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_deployment_events({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_deployment_events(::Google::Cloud::Developerconnect::V1::ListDeploymentEventsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_deployment_events_client_stub.call_count + end + end + end + def test_configure credentials_token = :dummy_value diff --git a/google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_test.rb b/google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_test.rb index cc37e4eb8238..8c27e8e91cc5 100644 --- a/google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_test.rb +++ b/google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_test.rb @@ -399,6 +399,133 @@ def test_delete_insights_config end end + def test_get_deployment_event + # Create GRPC objects. + grpc_response = ::Google::Cloud::Developerconnect::V1::DeploymentEvent.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_deployment_event_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_deployment_event, name + assert_kind_of ::Google::Cloud::Developerconnect::V1::GetDeploymentEventRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_deployment_event_client_stub do + # Create client + client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_deployment_event({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_deployment_event name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_deployment_event ::Google::Cloud::Developerconnect::V1::GetDeploymentEventRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_deployment_event({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_deployment_event(::Google::Cloud::Developerconnect::V1::GetDeploymentEventRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_deployment_event_client_stub.call_rpc_count + end + end + + def test_list_deployment_events + # Create GRPC objects. + grpc_response = ::Google::Cloud::Developerconnect::V1::ListDeploymentEventsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_deployment_events_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_deployment_events, name + assert_kind_of ::Google::Cloud::Developerconnect::V1::ListDeploymentEventsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_deployment_events_client_stub do + # Create client + client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_deployment_events({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_deployment_events parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_deployment_events ::Google::Cloud::Developerconnect::V1::ListDeploymentEventsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_deployment_events({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_deployment_events(::Google::Cloud::Developerconnect::V1::ListDeploymentEventsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_deployment_events_client_stub.call_rpc_count + end + end + def test_configure grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/.gitignore b/owl-bot-staging/google-cloud-developer_connect-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-developer_connect-v1/.repo-metadata.json deleted file mode 100644 index 66b6fbd9f8fd..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "developerconnect.googleapis.com", - "api_shortname": "developerconnect", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-developer_connect-v1/latest", - "distribution_name": "google-cloud-developer_connect-v1", - "is_cloud": true, - "language": "ruby", - "name": "developerconnect", - "name_pretty": "Developer Connect V1 API", - "product_documentation": "https://cloud.google.com/developer-connect/docs/overview", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Developer Connect streamlines integration with third-party source code management platforms by simplifying authentication, authorization, and networking configuration. Note that google-cloud-developer_connect-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-developer_connect instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/developer-connect/docs/overview", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/.rubocop.yml b/owl-bot-staging/google-cloud-developer_connect-v1/.rubocop.yml deleted file mode 100644 index d41868966c78..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-developer_connect-v1.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-developer_connect-v1.rb" diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/.toys.rb b/owl-bot-staging/google-cloud-developer_connect-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/.yardopts b/owl-bot-staging/google-cloud-developer_connect-v1/.yardopts deleted file mode 100644 index 2519b5c6a98c..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Developer Connect V1 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-developer_connect-v1/AUTHENTICATION.md deleted file mode 100644 index 9177e65da388..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-developer_connect-v1 library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-developer_connect-v1 library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/developer_connect/v1" - -client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/developer_connect/v1" - -::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-cloud-developer_connect-v1 -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/developer_connect/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-developer_connect-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/Gemfile b/owl-bot-staging/google-cloud-developer_connect-v1/Gemfile deleted file mode 100644 index 6442df18fa2f..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/Gemfile +++ /dev/null @@ -1,11 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.31.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/LICENSE.md b/owl-bot-staging/google-cloud-developer_connect-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/README.md b/owl-bot-staging/google-cloud-developer_connect-v1/README.md deleted file mode 100644 index 10a894de2ec6..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Developer Connect V1 API - -Connect third-party source code management to Google. - -Developer Connect streamlines integration with third-party source code management platforms by simplifying authentication, authorization, and networking configuration. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Developer Connect V1 API. Most users should consider using -the main client gem, -[google-cloud-developer_connect](https://rubygems.org/gems/google-cloud-developer_connect). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-developer_connect-v1 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/developerconnect.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/developer_connect/v1" - -client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new -request = ::Google::Cloud::DeveloperConnect::V1::ListConnectionsRequest.new # (request fields as keyword arguments...) -response = client.list_connections request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-developer_connect-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/developer-connect/docs/overview) -for general usage information. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/cloud/developer_connect/v1" -require "logger" - -client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.0+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-developer_connect`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-developer_connect-v1`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-cloud-developer_connect`. -The main client is recommended because it will embody the best practices for -accessing the service, and may also provide more convenient interfaces or -tighter integration into frameworks and third-party libraries. In addition, the -documentation and samples published by Google will generally demonstrate use of -the main client. - -### Why would I want to use a versioned client? - -You can use a versioned client if you are content with a possibly lower-level -class interface, you explicitly want to avoid features provided by the main -client, or you want to access a specific service version not be covered by the -main client. You can identify versioned client gems because the service version -is part of the name, e.g. `google-cloud-developer_connect-v1`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/Rakefile b/owl-bot-staging/google-cloud-developer_connect-v1/Rakefile deleted file mode 100644 index c0064da5e8a1..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-developer_connect-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["GOOGLE_CLOUD_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/developer_connect/v1/developer_connect/credentials" - ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["GOOGLE_CLOUD_PROJECT"] = project - ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project - ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile - - Rake::Task["acceptance:run"].invoke -end - -namespace :acceptance do - task :run do - if File.directory? "acceptance" - Rake::Task[:smoke_test].invoke - else - puts "The google-cloud-developer_connect-v1 gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-developer_connect-v1 gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-developer_connect-v1 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-developer_connect-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-developer_connect-v1" - header "google-cloud-developer_connect-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-developer_connect-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-developer_connect-v1 test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-developer_connect-v1 smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-developer_connect-v1 acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-developer_connect-v1/gapic_metadata.json deleted file mode 100644 index 15e3038a8897..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/gapic_metadata.json +++ /dev/null @@ -1,192 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.developerconnect.v1", - "libraryPackage": "::Google::Cloud::DeveloperConnect::V1", - "services": { - "DeveloperConnect": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client", - "rpcs": { - "ListConnections": { - "methods": [ - "list_connections" - ] - }, - "GetConnection": { - "methods": [ - "get_connection" - ] - }, - "CreateConnection": { - "methods": [ - "create_connection" - ] - }, - "UpdateConnection": { - "methods": [ - "update_connection" - ] - }, - "DeleteConnection": { - "methods": [ - "delete_connection" - ] - }, - "CreateGitRepositoryLink": { - "methods": [ - "create_git_repository_link" - ] - }, - "DeleteGitRepositoryLink": { - "methods": [ - "delete_git_repository_link" - ] - }, - "ListGitRepositoryLinks": { - "methods": [ - "list_git_repository_links" - ] - }, - "GetGitRepositoryLink": { - "methods": [ - "get_git_repository_link" - ] - }, - "FetchReadWriteToken": { - "methods": [ - "fetch_read_write_token" - ] - }, - "FetchReadToken": { - "methods": [ - "fetch_read_token" - ] - }, - "FetchLinkableGitRepositories": { - "methods": [ - "fetch_linkable_git_repositories" - ] - }, - "FetchGitHubInstallations": { - "methods": [ - "fetch_git_hub_installations" - ] - }, - "FetchGitRefs": { - "methods": [ - "fetch_git_refs" - ] - }, - "ListAccountConnectors": { - "methods": [ - "list_account_connectors" - ] - }, - "GetAccountConnector": { - "methods": [ - "get_account_connector" - ] - }, - "CreateAccountConnector": { - "methods": [ - "create_account_connector" - ] - }, - "UpdateAccountConnector": { - "methods": [ - "update_account_connector" - ] - }, - "DeleteAccountConnector": { - "methods": [ - "delete_account_connector" - ] - }, - "FetchAccessToken": { - "methods": [ - "fetch_access_token" - ] - }, - "ListUsers": { - "methods": [ - "list_users" - ] - }, - "DeleteUser": { - "methods": [ - "delete_user" - ] - }, - "FetchSelf": { - "methods": [ - "fetch_self" - ] - }, - "DeleteSelf": { - "methods": [ - "delete_self" - ] - }, - "StartOAuth": { - "methods": [ - "start_o_auth" - ] - }, - "FinishOAuth": { - "methods": [ - "finish_o_auth" - ] - } - } - } - } - }, - "InsightsConfigService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client", - "rpcs": { - "ListInsightsConfigs": { - "methods": [ - "list_insights_configs" - ] - }, - "CreateInsightsConfig": { - "methods": [ - "create_insights_config" - ] - }, - "GetInsightsConfig": { - "methods": [ - "get_insights_config" - ] - }, - "UpdateInsightsConfig": { - "methods": [ - "update_insights_config" - ] - }, - "DeleteInsightsConfig": { - "methods": [ - "delete_insights_config" - ] - }, - "GetDeploymentEvent": { - "methods": [ - "get_deployment_event" - ] - }, - "ListDeploymentEvents": { - "methods": [ - "list_deployment_events" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/google-cloud-developer_connect-v1.gemspec b/owl-bot-staging/google-cloud-developer_connect-v1/google-cloud-developer_connect-v1.gemspec deleted file mode 100644 index 736cb409d10a..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/google-cloud-developer_connect-v1.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/developer_connect/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-developer_connect-v1" - gem.version = Google::Cloud::DeveloperConnect::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Developer Connect streamlines integration with third-party source code management platforms by simplifying authentication, authorization, and networking configuration. Note that google-cloud-developer_connect-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-developer_connect instead. See the readme for more details." - gem.summary = "Connect third-party source code management to Google." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.1" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google-cloud-developer_connect-v1.rb b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google-cloud-developer_connect-v1.rb deleted file mode 100644 index 64f9d87fa987..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google-cloud-developer_connect-v1.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/developer_connect/v1" diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1.rb b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1.rb deleted file mode 100644 index 985f2fce88de..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/developer_connect/v1/developer_connect" -require "google/cloud/developerconnect/v1/insights_config_service" -require "google/cloud/developer_connect/v1/version" - -module Google - module Cloud - module DeveloperConnect - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/developer_connect/v1" - # client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/developer_connect/v1" - # client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/developer_connect/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/bindings_override.rb b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/bindings_override.rb deleted file mode 100644 index 54e590e79097..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/bindings_override.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" - -module Google - module Cloud - module DeveloperConnect - ## - # @example Loading just the REST part of this package, including all its services, and instantiating a REST client - # - # require "google/cloud/developer_connect/v1/rest" - # client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new - # - module V1 - ## - # @private - # Initialize the mixin bindings configuration - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "DeveloperConnect"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - - default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config - default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{name}/locations", - matches: [ - ["name", %r{^projects/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config - end - yield @configure if block_given? - @configure - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect.rb b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect.rb deleted file mode 100644 index d28b5541f061..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/developer_connect/v1/version" - -require "google/cloud/developer_connect/v1/developer_connect/credentials" -require "google/cloud/developer_connect/v1/developer_connect/paths" -require "google/cloud/developer_connect/v1/developer_connect/operations" -require "google/cloud/developer_connect/v1/developer_connect/client" -require "google/cloud/developer_connect/v1/developer_connect/rest" - -module Google - module Cloud - module DeveloperConnect - module V1 - ## - # Service describing handlers for resources - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/developer_connect/v1/developer_connect" - # client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/developer_connect/v1/developer_connect/rest" - # client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new - # - module DeveloperConnect - end - end - end - end -end - -helper_path = ::File.join __dir__, "developer_connect", "helpers.rb" -require "google/cloud/developer_connect/v1/developer_connect/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/client.rb b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/client.rb deleted file mode 100644 index 6a0bf39a110d..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/client.rb +++ /dev/null @@ -1,3259 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/developerconnect/v1/developer_connect_pb" -require "google/cloud/location" - -module Google - module Cloud - module DeveloperConnect - module V1 - module DeveloperConnect - ## - # Client for the DeveloperConnect service. - # - # Service describing handlers for resources - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "developerconnect.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :developer_connect_stub - - ## - # Configure the DeveloperConnect Client class. - # - # See {::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DeveloperConnect clients - # ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "DeveloperConnect", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.list_connections.timeout = 60.0 - default_config.rpcs.list_connections.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_connection.timeout = 60.0 - default_config.rpcs.get_connection.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_connection.timeout = 60.0 - default_config.rpcs.create_connection.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_connection.timeout = 60.0 - default_config.rpcs.update_connection.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_connection.timeout = 60.0 - default_config.rpcs.delete_connection.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_git_repository_link.timeout = 60.0 - default_config.rpcs.create_git_repository_link.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_git_repository_link.timeout = 60.0 - default_config.rpcs.delete_git_repository_link.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_git_repository_link.timeout = 60.0 - default_config.rpcs.get_git_repository_link.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.fetch_read_write_token.timeout = 60.0 - default_config.rpcs.fetch_read_write_token.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.fetch_read_token.timeout = 60.0 - default_config.rpcs.fetch_read_token.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.fetch_linkable_git_repositories.timeout = 60.0 - default_config.rpcs.fetch_linkable_git_repositories.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.fetch_git_hub_installations.timeout = 60.0 - default_config.rpcs.fetch_git_hub_installations.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the DeveloperConnect Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @developer_connect_stub.universe_domain - end - - ## - # Create a new DeveloperConnect client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DeveloperConnect client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/developerconnect/v1/developer_connect_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @developer_connect_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @developer_connect_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @developer_connect_stub.endpoint - config.universe_domain = @developer_connect_stub.universe_domain - config.logger = @developer_connect_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Client] - # - attr_reader :location_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @developer_connect_stub.logger - end - - # Service calls - - ## - # Lists Connections in a given project and location. - # - # @overload list_connections(request, options = nil) - # Pass arguments to `list_connections` via a request object, either of type - # {::Google::Cloud::DeveloperConnect::V1::ListConnectionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::DeveloperConnect::V1::ListConnectionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_connections(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_connections` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value for ListConnectionsRequest - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering results - # @param order_by [::String] - # Optional. Hint for how to order the results - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::Connection>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::Connection>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::DeveloperConnect::V1::ListConnectionsRequest.new - # - # # Call the list_connections method. - # result = client.list_connections request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::DeveloperConnect::V1::Connection. - # p item - # end - # - def list_connections request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::ListConnectionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_connections.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_connections.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_connections.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_connect_stub.call_rpc :list_connections, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @developer_connect_stub, :list_connections, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single Connection. - # - # @overload get_connection(request, options = nil) - # Pass arguments to `get_connection` via a request object, either of type - # {::Google::Cloud::DeveloperConnect::V1::GetConnectionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::DeveloperConnect::V1::GetConnectionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_connection(name: nil) - # Pass arguments to `get_connection` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::DeveloperConnect::V1::Connection] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::DeveloperConnect::V1::Connection] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::DeveloperConnect::V1::GetConnectionRequest.new - # - # # Call the get_connection method. - # result = client.get_connection request - # - # # The returned object is of type Google::Cloud::DeveloperConnect::V1::Connection. - # p result - # - def get_connection request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::GetConnectionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_connection.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_connection.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_connection.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_connect_stub.call_rpc :get_connection, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new Connection in a given project and location. - # - # @overload create_connection(request, options = nil) - # Pass arguments to `create_connection` via a request object, either of type - # {::Google::Cloud::DeveloperConnect::V1::CreateConnectionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::DeveloperConnect::V1::CreateConnectionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_connection(parent: nil, connection_id: nil, connection: nil, request_id: nil, validate_only: nil) - # Pass arguments to `create_connection` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Value for parent. - # @param connection_id [::String] - # Required. Id of the requesting object - # If auto-generating Id server-side, remove this field and - # connection_id from the method_signature of Create RPC - # @param connection [::Google::Cloud::DeveloperConnect::V1::Connection, ::Hash] - # Required. The resource being created - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @param validate_only [::Boolean] - # Optional. If set, validate the request, but do not actually post it. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::DeveloperConnect::V1::CreateConnectionRequest.new - # - # # Call the create_connection method. - # result = client.create_connection request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_connection request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::CreateConnectionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_connection.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_connection.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_connection.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_connect_stub.call_rpc :create_connection, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of a single Connection. - # - # @overload update_connection(request, options = nil) - # Pass arguments to `update_connection` via a request object, either of type - # {::Google::Cloud::DeveloperConnect::V1::UpdateConnectionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::DeveloperConnect::V1::UpdateConnectionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_connection(update_mask: nil, connection: nil, request_id: nil, allow_missing: nil, validate_only: nil) - # Pass arguments to `update_connection` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Field mask is used to specify the fields to be overwritten in the - # Connection resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @param connection [::Google::Cloud::DeveloperConnect::V1::Connection, ::Hash] - # Required. The resource being updated - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @param allow_missing [::Boolean] - # Optional. If set to true, and the connection is not found a new connection - # will be created. In this situation `update_mask` is ignored. - # The creation will succeed only if the input connection has all the - # necessary information (e.g a github_config with both user_oauth_token and - # installation_id properties). - # @param validate_only [::Boolean] - # Optional. If set, validate the request, but do not actually post it. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::DeveloperConnect::V1::UpdateConnectionRequest.new - # - # # Call the update_connection method. - # result = client.update_connection request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_connection request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::UpdateConnectionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_connection.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.connection&.name - header_params["connection.name"] = request.connection.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_connection.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_connection.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_connect_stub.call_rpc :update_connection, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single Connection. - # - # @overload delete_connection(request, options = nil) - # Pass arguments to `delete_connection` via a request object, either of type - # {::Google::Cloud::DeveloperConnect::V1::DeleteConnectionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::DeveloperConnect::V1::DeleteConnectionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_connection(name: nil, request_id: nil, validate_only: nil, etag: nil) - # Pass arguments to `delete_connection` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @param validate_only [::Boolean] - # Optional. If set, validate the request, but do not actually post it. - # @param etag [::String] - # Optional. The current etag of the Connection. - # If an etag is provided and does not match the current etag of the - # Connection, deletion will be blocked and an ABORTED error will be returned. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::DeveloperConnect::V1::DeleteConnectionRequest.new - # - # # Call the delete_connection method. - # result = client.delete_connection request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_connection request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::DeleteConnectionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_connection.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_connection.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_connection.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_connect_stub.call_rpc :delete_connection, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a GitRepositoryLink. Upon linking a Git Repository, Developer - # Connect will configure the Git Repository to send webhook events to - # Developer Connect. Connections that use Firebase GitHub Application will - # have events forwarded to the Firebase service. Connections that use Gemini - # Code Assist will have events forwarded to Gemini Code Assist service. All - # other Connections will have events forwarded to Cloud Build. - # - # @overload create_git_repository_link(request, options = nil) - # Pass arguments to `create_git_repository_link` via a request object, either of type - # {::Google::Cloud::DeveloperConnect::V1::CreateGitRepositoryLinkRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::DeveloperConnect::V1::CreateGitRepositoryLinkRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_git_repository_link(parent: nil, git_repository_link: nil, git_repository_link_id: nil, request_id: nil, validate_only: nil) - # Pass arguments to `create_git_repository_link` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Value for parent. - # @param git_repository_link [::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink, ::Hash] - # Required. The resource being created - # @param git_repository_link_id [::String] - # Required. The ID to use for the repository, which will become the final - # component of the repository's resource name. This ID should be unique in - # the connection. Allows alphanumeric characters and any of - # -._~%!$&'()*+,;=@. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @param validate_only [::Boolean] - # Optional. If set, validate the request, but do not actually post it. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::DeveloperConnect::V1::CreateGitRepositoryLinkRequest.new - # - # # Call the create_git_repository_link method. - # result = client.create_git_repository_link request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_git_repository_link request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::CreateGitRepositoryLinkRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_git_repository_link.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_git_repository_link.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_git_repository_link.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_connect_stub.call_rpc :create_git_repository_link, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single GitRepositoryLink. - # - # @overload delete_git_repository_link(request, options = nil) - # Pass arguments to `delete_git_repository_link` via a request object, either of type - # {::Google::Cloud::DeveloperConnect::V1::DeleteGitRepositoryLinkRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::DeveloperConnect::V1::DeleteGitRepositoryLinkRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_git_repository_link(name: nil, request_id: nil, validate_only: nil, etag: nil) - # Pass arguments to `delete_git_repository_link` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @param validate_only [::Boolean] - # Optional. If set, validate the request, but do not actually post it. - # @param etag [::String] - # Optional. This checksum is computed by the server based on the value of - # other fields, and may be sent on update and delete requests to ensure the - # client has an up-to-date value before proceeding. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::DeveloperConnect::V1::DeleteGitRepositoryLinkRequest.new - # - # # Call the delete_git_repository_link method. - # result = client.delete_git_repository_link request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_git_repository_link request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::DeleteGitRepositoryLinkRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_git_repository_link.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_git_repository_link.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_git_repository_link.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_connect_stub.call_rpc :delete_git_repository_link, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists GitRepositoryLinks in a given project, location, and connection. - # - # @overload list_git_repository_links(request, options = nil) - # Pass arguments to `list_git_repository_links` via a request object, either of type - # {::Google::Cloud::DeveloperConnect::V1::ListGitRepositoryLinksRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::DeveloperConnect::V1::ListGitRepositoryLinksRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_git_repository_links(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_git_repository_links` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value for ListGitRepositoryLinksRequest - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering results - # @param order_by [::String] - # Optional. Hint for how to order the results - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::DeveloperConnect::V1::ListGitRepositoryLinksRequest.new - # - # # Call the list_git_repository_links method. - # result = client.list_git_repository_links request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink. - # p item - # end - # - def list_git_repository_links request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::ListGitRepositoryLinksRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_git_repository_links.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_git_repository_links.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_git_repository_links.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_connect_stub.call_rpc :list_git_repository_links, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @developer_connect_stub, :list_git_repository_links, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single GitRepositoryLink. - # - # @overload get_git_repository_link(request, options = nil) - # Pass arguments to `get_git_repository_link` via a request object, either of type - # {::Google::Cloud::DeveloperConnect::V1::GetGitRepositoryLinkRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::DeveloperConnect::V1::GetGitRepositoryLinkRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_git_repository_link(name: nil) - # Pass arguments to `get_git_repository_link` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::DeveloperConnect::V1::GetGitRepositoryLinkRequest.new - # - # # Call the get_git_repository_link method. - # result = client.get_git_repository_link request - # - # # The returned object is of type Google::Cloud::DeveloperConnect::V1::GitRepositoryLink. - # p result - # - def get_git_repository_link request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::GetGitRepositoryLinkRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_git_repository_link.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_git_repository_link.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_git_repository_link.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_connect_stub.call_rpc :get_git_repository_link, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Fetches read/write token of a given gitRepositoryLink. - # - # @overload fetch_read_write_token(request, options = nil) - # Pass arguments to `fetch_read_write_token` via a request object, either of type - # {::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload fetch_read_write_token(git_repository_link: nil) - # Pass arguments to `fetch_read_write_token` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param git_repository_link [::String] - # Required. The resource name of the gitRepositoryLink in the format - # `projects/*/locations/*/connections/*/gitRepositoryLinks/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenRequest.new - # - # # Call the fetch_read_write_token method. - # result = client.fetch_read_write_token request - # - # # The returned object is of type Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenResponse. - # p result - # - def fetch_read_write_token request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.fetch_read_write_token.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.git_repository_link - header_params["git_repository_link"] = request.git_repository_link - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.fetch_read_write_token.timeout, - metadata: metadata, - retry_policy: @config.rpcs.fetch_read_write_token.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_connect_stub.call_rpc :fetch_read_write_token, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Fetches read token of a given gitRepositoryLink. - # - # @overload fetch_read_token(request, options = nil) - # Pass arguments to `fetch_read_token` via a request object, either of type - # {::Google::Cloud::DeveloperConnect::V1::FetchReadTokenRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::DeveloperConnect::V1::FetchReadTokenRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload fetch_read_token(git_repository_link: nil) - # Pass arguments to `fetch_read_token` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param git_repository_link [::String] - # Required. The resource name of the gitRepositoryLink in the format - # `projects/*/locations/*/connections/*/gitRepositoryLinks/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::DeveloperConnect::V1::FetchReadTokenResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::DeveloperConnect::V1::FetchReadTokenResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::DeveloperConnect::V1::FetchReadTokenRequest.new - # - # # Call the fetch_read_token method. - # result = client.fetch_read_token request - # - # # The returned object is of type Google::Cloud::DeveloperConnect::V1::FetchReadTokenResponse. - # p result - # - def fetch_read_token request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::FetchReadTokenRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.fetch_read_token.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.git_repository_link - header_params["git_repository_link"] = request.git_repository_link - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.fetch_read_token.timeout, - metadata: metadata, - retry_policy: @config.rpcs.fetch_read_token.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_connect_stub.call_rpc :fetch_read_token, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # FetchLinkableGitRepositories returns a list of git repositories from an SCM - # that are available to be added to a Connection. - # - # @overload fetch_linkable_git_repositories(request, options = nil) - # Pass arguments to `fetch_linkable_git_repositories` via a request object, either of type - # {::Google::Cloud::DeveloperConnect::V1::FetchLinkableGitRepositoriesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::DeveloperConnect::V1::FetchLinkableGitRepositoriesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload fetch_linkable_git_repositories(connection: nil, page_size: nil, page_token: nil) - # Pass arguments to `fetch_linkable_git_repositories` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param connection [::String] - # Required. The name of the Connection. - # Format: `projects/*/locations/*/connections/*`. - # @param page_size [::Integer] - # Optional. Number of results to return in the list. Defaults to 20. - # @param page_token [::String] - # Optional. Page start. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::LinkableGitRepository>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::LinkableGitRepository>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::DeveloperConnect::V1::FetchLinkableGitRepositoriesRequest.new - # - # # Call the fetch_linkable_git_repositories method. - # result = client.fetch_linkable_git_repositories request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::DeveloperConnect::V1::LinkableGitRepository. - # p item - # end - # - def fetch_linkable_git_repositories request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::FetchLinkableGitRepositoriesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.fetch_linkable_git_repositories.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.connection - header_params["connection"] = request.connection - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.fetch_linkable_git_repositories.timeout, - metadata: metadata, - retry_policy: @config.rpcs.fetch_linkable_git_repositories.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_connect_stub.call_rpc :fetch_linkable_git_repositories, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @developer_connect_stub, :fetch_linkable_git_repositories, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # FetchGitHubInstallations returns the list of GitHub Installations that - # are available to be added to a Connection. - # For github.com, only installations accessible to the authorizer token - # are returned. For GitHub Enterprise, all installations are returned. - # - # @overload fetch_git_hub_installations(request, options = nil) - # Pass arguments to `fetch_git_hub_installations` via a request object, either of type - # {::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload fetch_git_hub_installations(connection: nil) - # Pass arguments to `fetch_git_hub_installations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param connection [::String] - # Required. The resource name of the connection in the format - # `projects/*/locations/*/connections/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsRequest.new - # - # # Call the fetch_git_hub_installations method. - # result = client.fetch_git_hub_installations request - # - # # The returned object is of type Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsResponse. - # p result - # - def fetch_git_hub_installations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.fetch_git_hub_installations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.connection - header_params["connection"] = request.connection - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.fetch_git_hub_installations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.fetch_git_hub_installations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_connect_stub.call_rpc :fetch_git_hub_installations, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Fetch the list of branches or tags for a given repository. - # - # @overload fetch_git_refs(request, options = nil) - # Pass arguments to `fetch_git_refs` via a request object, either of type - # {::Google::Cloud::DeveloperConnect::V1::FetchGitRefsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::DeveloperConnect::V1::FetchGitRefsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload fetch_git_refs(git_repository_link: nil, ref_type: nil, page_size: nil, page_token: nil) - # Pass arguments to `fetch_git_refs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param git_repository_link [::String] - # Required. The resource name of GitRepositoryLink in the format - # `projects/*/locations/*/connections/*/gitRepositoryLinks/*`. - # @param ref_type [::Google::Cloud::DeveloperConnect::V1::FetchGitRefsRequest::RefType] - # Required. Type of refs to fetch. - # @param page_size [::Integer] - # Optional. Number of results to return in the list. Default to 20. - # @param page_token [::String] - # Optional. Page start. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::DeveloperConnect::V1::FetchGitRefsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::DeveloperConnect::V1::FetchGitRefsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::DeveloperConnect::V1::FetchGitRefsRequest.new - # - # # Call the fetch_git_refs method. - # result = client.fetch_git_refs request - # - # # The returned object is of type Google::Cloud::DeveloperConnect::V1::FetchGitRefsResponse. - # p result - # - def fetch_git_refs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::FetchGitRefsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.fetch_git_refs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.git_repository_link - header_params["git_repository_link"] = request.git_repository_link - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.fetch_git_refs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.fetch_git_refs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_connect_stub.call_rpc :fetch_git_refs, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists AccountConnectors in a given project and location. - # - # @overload list_account_connectors(request, options = nil) - # Pass arguments to `list_account_connectors` via a request object, either of type - # {::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_account_connectors(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_account_connectors` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value for ListAccountConnectorsRequest - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering results - # @param order_by [::String] - # Optional. Hint for how to order the results - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::AccountConnector>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::AccountConnector>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsRequest.new - # - # # Call the list_account_connectors method. - # result = client.list_account_connectors request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::DeveloperConnect::V1::AccountConnector. - # p item - # end - # - def list_account_connectors request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_account_connectors.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_account_connectors.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_account_connectors.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_connect_stub.call_rpc :list_account_connectors, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @developer_connect_stub, :list_account_connectors, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single AccountConnector. - # - # @overload get_account_connector(request, options = nil) - # Pass arguments to `get_account_connector` via a request object, either of type - # {::Google::Cloud::DeveloperConnect::V1::GetAccountConnectorRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::DeveloperConnect::V1::GetAccountConnectorRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_account_connector(name: nil) - # Pass arguments to `get_account_connector` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::DeveloperConnect::V1::AccountConnector] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::DeveloperConnect::V1::AccountConnector] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::DeveloperConnect::V1::GetAccountConnectorRequest.new - # - # # Call the get_account_connector method. - # result = client.get_account_connector request - # - # # The returned object is of type Google::Cloud::DeveloperConnect::V1::AccountConnector. - # p result - # - def get_account_connector request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::GetAccountConnectorRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_account_connector.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_account_connector.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_account_connector.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_connect_stub.call_rpc :get_account_connector, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new AccountConnector in a given project and location. - # - # @overload create_account_connector(request, options = nil) - # Pass arguments to `create_account_connector` via a request object, either of type - # {::Google::Cloud::DeveloperConnect::V1::CreateAccountConnectorRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::DeveloperConnect::V1::CreateAccountConnectorRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_account_connector(parent: nil, account_connector_id: nil, account_connector: nil, request_id: nil, validate_only: nil) - # Pass arguments to `create_account_connector` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Location resource name as the account_connector’s parent. - # @param account_connector_id [::String] - # Required. The ID to use for the AccountConnector, which will become the - # final component of the AccountConnector's resource name. Its format should - # adhere to https://google.aip.dev/122#resource-id-segments Names must be - # unique per-project per-location. - # @param account_connector [::Google::Cloud::DeveloperConnect::V1::AccountConnector, ::Hash] - # Required. The AccountConnector to create. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @param validate_only [::Boolean] - # Optional. If set, validate the request, but do not actually post it. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::DeveloperConnect::V1::CreateAccountConnectorRequest.new - # - # # Call the create_account_connector method. - # result = client.create_account_connector request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_account_connector request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::CreateAccountConnectorRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_account_connector.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_account_connector.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_account_connector.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_connect_stub.call_rpc :create_account_connector, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of a single AccountConnector. - # - # @overload update_account_connector(request, options = nil) - # Pass arguments to `update_account_connector` via a request object, either of type - # {::Google::Cloud::DeveloperConnect::V1::UpdateAccountConnectorRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::DeveloperConnect::V1::UpdateAccountConnectorRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_account_connector(update_mask: nil, account_connector: nil, request_id: nil, allow_missing: nil, validate_only: nil) - # Pass arguments to `update_account_connector` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of fields to be updated. - # @param account_connector [::Google::Cloud::DeveloperConnect::V1::AccountConnector, ::Hash] - # Required. The AccountConnector to update. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @param allow_missing [::Boolean] - # Optional. If set to true, and the accountConnector is not found a new - # accountConnector will be created. In this situation `update_mask` is - # ignored. The creation will succeed only if the input accountConnector has - # all the necessary - # @param validate_only [::Boolean] - # Optional. If set, validate the request, but do not actually post it. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::DeveloperConnect::V1::UpdateAccountConnectorRequest.new - # - # # Call the update_account_connector method. - # result = client.update_account_connector request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_account_connector request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::UpdateAccountConnectorRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_account_connector.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.account_connector&.name - header_params["account_connector.name"] = request.account_connector.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_account_connector.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_account_connector.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_connect_stub.call_rpc :update_account_connector, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single AccountConnector. - # - # @overload delete_account_connector(request, options = nil) - # Pass arguments to `delete_account_connector` via a request object, either of type - # {::Google::Cloud::DeveloperConnect::V1::DeleteAccountConnectorRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::DeveloperConnect::V1::DeleteAccountConnectorRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_account_connector(name: nil, request_id: nil, validate_only: nil, etag: nil, force: nil) - # Pass arguments to `delete_account_connector` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @param validate_only [::Boolean] - # Optional. If set, validate the request, but do not actually post it. - # @param etag [::String] - # Optional. The current etag of the AccountConnectorn. - # If an etag is provided and does not match the current etag of the - # AccountConnector, deletion will be blocked and an ABORTED error will be - # returned. - # @param force [::Boolean] - # Optional. If set to true, any Users from this AccountConnector will also - # be deleted. (Otherwise, the request will only work if the AccountConnector - # has no Users.) - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::DeveloperConnect::V1::DeleteAccountConnectorRequest.new - # - # # Call the delete_account_connector method. - # result = client.delete_account_connector request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_account_connector request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::DeleteAccountConnectorRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_account_connector.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_account_connector.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_account_connector.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_connect_stub.call_rpc :delete_account_connector, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Fetches OAuth access token based on end user credentials. - # - # @overload fetch_access_token(request, options = nil) - # Pass arguments to `fetch_access_token` via a request object, either of type - # {::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload fetch_access_token(account_connector: nil) - # Pass arguments to `fetch_access_token` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param account_connector [::String] - # Required. The resource name of the AccountConnector in the format - # `projects/*/locations/*/accountConnectors/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::DeveloperConnect::V1::FetchAccessTokenRequest.new - # - # # Call the fetch_access_token method. - # result = client.fetch_access_token request - # - # # The returned object is of type Google::Cloud::DeveloperConnect::V1::FetchAccessTokenResponse. - # p result - # - def fetch_access_token request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.fetch_access_token.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.account_connector - header_params["account_connector"] = request.account_connector - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.fetch_access_token.timeout, - metadata: metadata, - retry_policy: @config.rpcs.fetch_access_token.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_connect_stub.call_rpc :fetch_access_token, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists Users in a given project, location, and account_connector. - # - # @overload list_users(request, options = nil) - # Pass arguments to `list_users` via a request object, either of type - # {::Google::Cloud::DeveloperConnect::V1::ListUsersRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::DeveloperConnect::V1::ListUsersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_users(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_users` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value for ListUsersRequest - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering results - # @param order_by [::String] - # Optional. Hint for how to order the results - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::User>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::User>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::DeveloperConnect::V1::ListUsersRequest.new - # - # # Call the list_users method. - # result = client.list_users request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::DeveloperConnect::V1::User. - # p item - # end - # - def list_users request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::ListUsersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_users.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_users.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_users.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_connect_stub.call_rpc :list_users, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @developer_connect_stub, :list_users, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single User. - # - # @overload delete_user(request, options = nil) - # Pass arguments to `delete_user` via a request object, either of type - # {::Google::Cloud::DeveloperConnect::V1::DeleteUserRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::DeveloperConnect::V1::DeleteUserRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_user(name: nil, request_id: nil, validate_only: nil, etag: nil) - # Pass arguments to `delete_user` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @param validate_only [::Boolean] - # Optional. If set, validate the request, but do not actually post it. - # @param etag [::String] - # Optional. This checksum is computed by the server based on the value of - # other fields, and may be sent on update and delete requests to ensure the - # client has an up-to-date value before proceeding. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::DeveloperConnect::V1::DeleteUserRequest.new - # - # # Call the delete_user method. - # result = client.delete_user request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_user request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::DeleteUserRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_user.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_user.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_user.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_connect_stub.call_rpc :delete_user, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Fetch the User based on the user credentials. - # - # @overload fetch_self(request, options = nil) - # Pass arguments to `fetch_self` via a request object, either of type - # {::Google::Cloud::DeveloperConnect::V1::FetchSelfRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::DeveloperConnect::V1::FetchSelfRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload fetch_self(name: nil) - # Pass arguments to `fetch_self` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the AccountConnector resource - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::DeveloperConnect::V1::User] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::DeveloperConnect::V1::User] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::DeveloperConnect::V1::FetchSelfRequest.new - # - # # Call the fetch_self method. - # result = client.fetch_self request - # - # # The returned object is of type Google::Cloud::DeveloperConnect::V1::User. - # p result - # - def fetch_self request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::FetchSelfRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.fetch_self.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.fetch_self.timeout, - metadata: metadata, - retry_policy: @config.rpcs.fetch_self.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_connect_stub.call_rpc :fetch_self, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete the User based on the user credentials. - # - # @overload delete_self(request, options = nil) - # Pass arguments to `delete_self` via a request object, either of type - # {::Google::Cloud::DeveloperConnect::V1::DeleteSelfRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::DeveloperConnect::V1::DeleteSelfRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_self(name: nil) - # Pass arguments to `delete_self` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the AccountConnector resource - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::DeveloperConnect::V1::DeleteSelfRequest.new - # - # # Call the delete_self method. - # result = client.delete_self request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_self request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::DeleteSelfRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_self.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_self.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_self.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_connect_stub.call_rpc :delete_self, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts OAuth flow for an account connector. - # - # @overload start_o_auth(request, options = nil) - # Pass arguments to `start_o_auth` via a request object, either of type - # {::Google::Cloud::DeveloperConnect::V1::StartOAuthRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::DeveloperConnect::V1::StartOAuthRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload start_o_auth(account_connector: nil) - # Pass arguments to `start_o_auth` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param account_connector [::String] - # Required. The resource name of the AccountConnector in the format - # `projects/*/locations/*/accountConnectors/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::DeveloperConnect::V1::StartOAuthResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::DeveloperConnect::V1::StartOAuthResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::DeveloperConnect::V1::StartOAuthRequest.new - # - # # Call the start_o_auth method. - # result = client.start_o_auth request - # - # # The returned object is of type Google::Cloud::DeveloperConnect::V1::StartOAuthResponse. - # p result - # - def start_o_auth request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::StartOAuthRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.start_o_auth.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.account_connector - header_params["account_connector"] = request.account_connector - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.start_o_auth.timeout, - metadata: metadata, - retry_policy: @config.rpcs.start_o_auth.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_connect_stub.call_rpc :start_o_auth, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Finishes OAuth flow for an account connector. - # - # @overload finish_o_auth(request, options = nil) - # Pass arguments to `finish_o_auth` via a request object, either of type - # {::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload finish_o_auth(oauth_params: nil, google_oauth_params: nil, account_connector: nil) - # Pass arguments to `finish_o_auth` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param oauth_params [::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest::OAuthParams, ::Hash] - # The params returned by non-Google OAuth 2.0 flow redirect. - # - # Note: The following parameters are mutually exclusive: `oauth_params`, `google_oauth_params`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param google_oauth_params [::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest::GoogleOAuthParams, ::Hash] - # The params returned by Google OAuth flow redirects. - # - # Note: The following parameters are mutually exclusive: `google_oauth_params`, `oauth_params`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param account_connector [::String] - # Required. The resource name of the AccountConnector in the format - # `projects/*/locations/*/accountConnectors/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::DeveloperConnect::V1::FinishOAuthResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::DeveloperConnect::V1::FinishOAuthResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest.new - # - # # Call the finish_o_auth method. - # result = client.finish_o_auth request - # - # # The returned object is of type Google::Cloud::DeveloperConnect::V1::FinishOAuthResponse. - # p result - # - def finish_o_auth request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.finish_o_auth.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.account_connector - header_params["account_connector"] = request.account_connector - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.finish_o_auth.timeout, - metadata: metadata, - retry_policy: @config.rpcs.finish_o_auth.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_connect_stub.call_rpc :finish_o_auth, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the DeveloperConnect API. - # - # This class represents the configuration for DeveloperConnect, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_connections to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_connections.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_connections.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "developerconnect.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the DeveloperConnect API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_connections` - # @return [::Gapic::Config::Method] - # - attr_reader :list_connections - ## - # RPC-specific configuration for `get_connection` - # @return [::Gapic::Config::Method] - # - attr_reader :get_connection - ## - # RPC-specific configuration for `create_connection` - # @return [::Gapic::Config::Method] - # - attr_reader :create_connection - ## - # RPC-specific configuration for `update_connection` - # @return [::Gapic::Config::Method] - # - attr_reader :update_connection - ## - # RPC-specific configuration for `delete_connection` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_connection - ## - # RPC-specific configuration for `create_git_repository_link` - # @return [::Gapic::Config::Method] - # - attr_reader :create_git_repository_link - ## - # RPC-specific configuration for `delete_git_repository_link` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_git_repository_link - ## - # RPC-specific configuration for `list_git_repository_links` - # @return [::Gapic::Config::Method] - # - attr_reader :list_git_repository_links - ## - # RPC-specific configuration for `get_git_repository_link` - # @return [::Gapic::Config::Method] - # - attr_reader :get_git_repository_link - ## - # RPC-specific configuration for `fetch_read_write_token` - # @return [::Gapic::Config::Method] - # - attr_reader :fetch_read_write_token - ## - # RPC-specific configuration for `fetch_read_token` - # @return [::Gapic::Config::Method] - # - attr_reader :fetch_read_token - ## - # RPC-specific configuration for `fetch_linkable_git_repositories` - # @return [::Gapic::Config::Method] - # - attr_reader :fetch_linkable_git_repositories - ## - # RPC-specific configuration for `fetch_git_hub_installations` - # @return [::Gapic::Config::Method] - # - attr_reader :fetch_git_hub_installations - ## - # RPC-specific configuration for `fetch_git_refs` - # @return [::Gapic::Config::Method] - # - attr_reader :fetch_git_refs - ## - # RPC-specific configuration for `list_account_connectors` - # @return [::Gapic::Config::Method] - # - attr_reader :list_account_connectors - ## - # RPC-specific configuration for `get_account_connector` - # @return [::Gapic::Config::Method] - # - attr_reader :get_account_connector - ## - # RPC-specific configuration for `create_account_connector` - # @return [::Gapic::Config::Method] - # - attr_reader :create_account_connector - ## - # RPC-specific configuration for `update_account_connector` - # @return [::Gapic::Config::Method] - # - attr_reader :update_account_connector - ## - # RPC-specific configuration for `delete_account_connector` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_account_connector - ## - # RPC-specific configuration for `fetch_access_token` - # @return [::Gapic::Config::Method] - # - attr_reader :fetch_access_token - ## - # RPC-specific configuration for `list_users` - # @return [::Gapic::Config::Method] - # - attr_reader :list_users - ## - # RPC-specific configuration for `delete_user` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_user - ## - # RPC-specific configuration for `fetch_self` - # @return [::Gapic::Config::Method] - # - attr_reader :fetch_self - ## - # RPC-specific configuration for `delete_self` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_self - ## - # RPC-specific configuration for `start_o_auth` - # @return [::Gapic::Config::Method] - # - attr_reader :start_o_auth - ## - # RPC-specific configuration for `finish_o_auth` - # @return [::Gapic::Config::Method] - # - attr_reader :finish_o_auth - - # @private - def initialize parent_rpcs = nil - list_connections_config = parent_rpcs.list_connections if parent_rpcs.respond_to? :list_connections - @list_connections = ::Gapic::Config::Method.new list_connections_config - get_connection_config = parent_rpcs.get_connection if parent_rpcs.respond_to? :get_connection - @get_connection = ::Gapic::Config::Method.new get_connection_config - create_connection_config = parent_rpcs.create_connection if parent_rpcs.respond_to? :create_connection - @create_connection = ::Gapic::Config::Method.new create_connection_config - update_connection_config = parent_rpcs.update_connection if parent_rpcs.respond_to? :update_connection - @update_connection = ::Gapic::Config::Method.new update_connection_config - delete_connection_config = parent_rpcs.delete_connection if parent_rpcs.respond_to? :delete_connection - @delete_connection = ::Gapic::Config::Method.new delete_connection_config - create_git_repository_link_config = parent_rpcs.create_git_repository_link if parent_rpcs.respond_to? :create_git_repository_link - @create_git_repository_link = ::Gapic::Config::Method.new create_git_repository_link_config - delete_git_repository_link_config = parent_rpcs.delete_git_repository_link if parent_rpcs.respond_to? :delete_git_repository_link - @delete_git_repository_link = ::Gapic::Config::Method.new delete_git_repository_link_config - list_git_repository_links_config = parent_rpcs.list_git_repository_links if parent_rpcs.respond_to? :list_git_repository_links - @list_git_repository_links = ::Gapic::Config::Method.new list_git_repository_links_config - get_git_repository_link_config = parent_rpcs.get_git_repository_link if parent_rpcs.respond_to? :get_git_repository_link - @get_git_repository_link = ::Gapic::Config::Method.new get_git_repository_link_config - fetch_read_write_token_config = parent_rpcs.fetch_read_write_token if parent_rpcs.respond_to? :fetch_read_write_token - @fetch_read_write_token = ::Gapic::Config::Method.new fetch_read_write_token_config - fetch_read_token_config = parent_rpcs.fetch_read_token if parent_rpcs.respond_to? :fetch_read_token - @fetch_read_token = ::Gapic::Config::Method.new fetch_read_token_config - fetch_linkable_git_repositories_config = parent_rpcs.fetch_linkable_git_repositories if parent_rpcs.respond_to? :fetch_linkable_git_repositories - @fetch_linkable_git_repositories = ::Gapic::Config::Method.new fetch_linkable_git_repositories_config - fetch_git_hub_installations_config = parent_rpcs.fetch_git_hub_installations if parent_rpcs.respond_to? :fetch_git_hub_installations - @fetch_git_hub_installations = ::Gapic::Config::Method.new fetch_git_hub_installations_config - fetch_git_refs_config = parent_rpcs.fetch_git_refs if parent_rpcs.respond_to? :fetch_git_refs - @fetch_git_refs = ::Gapic::Config::Method.new fetch_git_refs_config - list_account_connectors_config = parent_rpcs.list_account_connectors if parent_rpcs.respond_to? :list_account_connectors - @list_account_connectors = ::Gapic::Config::Method.new list_account_connectors_config - get_account_connector_config = parent_rpcs.get_account_connector if parent_rpcs.respond_to? :get_account_connector - @get_account_connector = ::Gapic::Config::Method.new get_account_connector_config - create_account_connector_config = parent_rpcs.create_account_connector if parent_rpcs.respond_to? :create_account_connector - @create_account_connector = ::Gapic::Config::Method.new create_account_connector_config - update_account_connector_config = parent_rpcs.update_account_connector if parent_rpcs.respond_to? :update_account_connector - @update_account_connector = ::Gapic::Config::Method.new update_account_connector_config - delete_account_connector_config = parent_rpcs.delete_account_connector if parent_rpcs.respond_to? :delete_account_connector - @delete_account_connector = ::Gapic::Config::Method.new delete_account_connector_config - fetch_access_token_config = parent_rpcs.fetch_access_token if parent_rpcs.respond_to? :fetch_access_token - @fetch_access_token = ::Gapic::Config::Method.new fetch_access_token_config - list_users_config = parent_rpcs.list_users if parent_rpcs.respond_to? :list_users - @list_users = ::Gapic::Config::Method.new list_users_config - delete_user_config = parent_rpcs.delete_user if parent_rpcs.respond_to? :delete_user - @delete_user = ::Gapic::Config::Method.new delete_user_config - fetch_self_config = parent_rpcs.fetch_self if parent_rpcs.respond_to? :fetch_self - @fetch_self = ::Gapic::Config::Method.new fetch_self_config - delete_self_config = parent_rpcs.delete_self if parent_rpcs.respond_to? :delete_self - @delete_self = ::Gapic::Config::Method.new delete_self_config - start_o_auth_config = parent_rpcs.start_o_auth if parent_rpcs.respond_to? :start_o_auth - @start_o_auth = ::Gapic::Config::Method.new start_o_auth_config - finish_o_auth_config = parent_rpcs.finish_o_auth if parent_rpcs.respond_to? :finish_o_auth - @finish_o_auth = ::Gapic::Config::Method.new finish_o_auth_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/credentials.rb b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/credentials.rb deleted file mode 100644 index bc13f563e213..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module DeveloperConnect - module V1 - module DeveloperConnect - # Credentials for the DeveloperConnect API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/operations.rb b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/operations.rb deleted file mode 100644 index df0d522b4b72..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/operations.rb +++ /dev/null @@ -1,841 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module DeveloperConnect - module V1 - module DeveloperConnect - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "developerconnect.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the DeveloperConnect Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the DeveloperConnect Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/longrunning/operations_services_pb" - - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = ::Gapic::ServiceStub.new( - ::Google::Longrunning::Operations::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| - wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } - response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Waits until the specified long-running operation is done or reaches at most - # a specified timeout, returning the latest state. If the operation is - # already done, the latest state is immediately returned. If the timeout - # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - # timeout is used. If the server does not support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # Note that this method is on a best-effort basis. It may return the latest - # state before the specified timeout (including immediately), meaning even an - # immediate response is no guarantee that the operation is done. - # - # @overload wait_operation(request, options = nil) - # Pass arguments to `wait_operation` via a request object, either of type - # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload wait_operation(name: nil, timeout: nil) - # Pass arguments to `wait_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to wait on. - # @param timeout [::Google::Protobuf::Duration, ::Hash] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::WaitOperationRequest.new - # - # # Call the wait_operation method. - # result = client.wait_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def wait_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.wait_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "developerconnect.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/paths.rb b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/paths.rb deleted file mode 100644 index f1c1b7701c86..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/paths.rb +++ /dev/null @@ -1,236 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module DeveloperConnect - module V1 - module DeveloperConnect - # Path helper methods for the DeveloperConnect API. - module Paths - ## - # Create a fully-qualified AccountConnector resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/accountConnectors/{account_connector}` - # - # @param project [String] - # @param location [String] - # @param account_connector [String] - # - # @return [::String] - def account_connector_path project:, location:, account_connector: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/accountConnectors/#{account_connector}" - end - - ## - # Create a fully-qualified Connection resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/connections/{connection}` - # - # @param project [String] - # @param location [String] - # @param connection [String] - # - # @return [::String] - def connection_path project:, location:, connection: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/connections/#{connection}" - end - - ## - # Create a fully-qualified CryptoKey resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}` - # - # @param project [String] - # @param location [String] - # @param key_ring [String] - # @param crypto_key [String] - # - # @return [::String] - def crypto_key_path project:, location:, key_ring:, crypto_key: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/" - - "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}" - end - - ## - # Create a fully-qualified GitRepositoryLink resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/connections/{connection}/gitRepositoryLinks/{git_repository_link}` - # - # @param project [String] - # @param location [String] - # @param connection [String] - # @param git_repository_link [String] - # - # @return [::String] - def git_repository_link_path project:, location:, connection:, git_repository_link: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "connection cannot contain /" if connection.to_s.include? "/" - - "projects/#{project}/locations/#{location}/connections/#{connection}/gitRepositoryLinks/#{git_repository_link}" - end - - ## - # Create a fully-qualified Instance resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # - # @return [::String] - def instance_path project:, location:, instance: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}" - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - ## - # Create a fully-qualified SecretVersion resource string. - # - # @overload secret_version_path(project:, secret:, secret_version:) - # The resource will be in the following format: - # - # `projects/{project}/secrets/{secret}/versions/{secret_version}` - # - # @param project [String] - # @param secret [String] - # @param secret_version [String] - # - # @overload secret_version_path(project:, location:, secret:, secret_version:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/secrets/{secret}/versions/{secret_version}` - # - # @param project [String] - # @param location [String] - # @param secret [String] - # @param secret_version [String] - # - # @return [::String] - def secret_version_path **args - resources = { - "project:secret:secret_version" => (proc do |project:, secret:, secret_version:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "secret cannot contain /" if secret.to_s.include? "/" - - "projects/#{project}/secrets/#{secret}/versions/#{secret_version}" - end), - "location:project:secret:secret_version" => (proc do |project:, location:, secret:, secret_version:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "secret cannot contain /" if secret.to_s.include? "/" - - "projects/#{project}/locations/#{location}/secrets/#{secret}/versions/#{secret_version}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified Service resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}` - # - # @param project [String] - # @param location [String] - # @param namespace [String] - # @param service [String] - # - # @return [::String] - def service_path project:, location:, namespace:, service: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "namespace cannot contain /" if namespace.to_s.include? "/" - - "projects/#{project}/locations/#{location}/namespaces/#{namespace}/services/#{service}" - end - - ## - # Create a fully-qualified User resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/accountConnectors/{account_connector}/users/{user}` - # - # @param project [String] - # @param location [String] - # @param account_connector [String] - # @param user [String] - # - # @return [::String] - def user_path project:, location:, account_connector:, user: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "account_connector cannot contain /" if account_connector.to_s.include? "/" - - "projects/#{project}/locations/#{location}/accountConnectors/#{account_connector}/users/#{user}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/rest.rb b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/rest.rb deleted file mode 100644 index 89b64773e97a..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/rest.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/developer_connect/v1/version" -require "google/cloud/developer_connect/v1/bindings_override" - -require "google/cloud/developer_connect/v1/developer_connect/credentials" -require "google/cloud/developer_connect/v1/developer_connect/paths" -require "google/cloud/developer_connect/v1/developer_connect/rest/operations" -require "google/cloud/developer_connect/v1/developer_connect/rest/client" - -module Google - module Cloud - module DeveloperConnect - module V1 - ## - # Service describing handlers for resources - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/developer_connect/v1/developer_connect/rest" - # client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new - # - module DeveloperConnect - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/developer_connect/v1/developer_connect/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/rest/client.rb b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/rest/client.rb deleted file mode 100644 index 0ee6cc9f0727..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/rest/client.rb +++ /dev/null @@ -1,3042 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/developerconnect/v1/developer_connect_pb" -require "google/cloud/developer_connect/v1/developer_connect/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Cloud - module DeveloperConnect - module V1 - module DeveloperConnect - module Rest - ## - # REST client for the DeveloperConnect service. - # - # Service describing handlers for resources - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "developerconnect.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :developer_connect_stub - - ## - # Configure the DeveloperConnect Client class. - # - # See {::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DeveloperConnect clients - # ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "DeveloperConnect", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.list_connections.timeout = 60.0 - default_config.rpcs.list_connections.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_connection.timeout = 60.0 - default_config.rpcs.get_connection.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_connection.timeout = 60.0 - default_config.rpcs.create_connection.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_connection.timeout = 60.0 - default_config.rpcs.update_connection.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_connection.timeout = 60.0 - default_config.rpcs.delete_connection.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_git_repository_link.timeout = 60.0 - default_config.rpcs.create_git_repository_link.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_git_repository_link.timeout = 60.0 - default_config.rpcs.delete_git_repository_link.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_git_repository_link.timeout = 60.0 - default_config.rpcs.get_git_repository_link.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.fetch_read_write_token.timeout = 60.0 - default_config.rpcs.fetch_read_write_token.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.fetch_read_token.timeout = 60.0 - default_config.rpcs.fetch_read_token.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.fetch_linkable_git_repositories.timeout = 60.0 - default_config.rpcs.fetch_linkable_git_repositories.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.fetch_git_hub_installations.timeout = 60.0 - default_config.rpcs.fetch_git_hub_installations.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the DeveloperConnect Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @developer_connect_stub.universe_domain - end - - ## - # Create a new DeveloperConnect REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DeveloperConnect client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @developer_connect_stub = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @developer_connect_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @developer_connect_stub.endpoint - config.universe_domain = @developer_connect_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @developer_connect_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Rest::Client] - # - attr_reader :location_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @developer_connect_stub.logger - end - - # Service calls - - ## - # Lists Connections in a given project and location. - # - # @overload list_connections(request, options = nil) - # Pass arguments to `list_connections` via a request object, either of type - # {::Google::Cloud::DeveloperConnect::V1::ListConnectionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::DeveloperConnect::V1::ListConnectionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_connections(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_connections` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value for ListConnectionsRequest - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering results - # @param order_by [::String] - # Optional. Hint for how to order the results - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::Connection>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::Connection>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::DeveloperConnect::V1::ListConnectionsRequest.new - # - # # Call the list_connections method. - # result = client.list_connections request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::DeveloperConnect::V1::Connection. - # p item - # end - # - def list_connections request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::ListConnectionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_connections.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_connections.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_connections.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_connect_stub.list_connections request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @developer_connect_stub, :list_connections, "connections", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single Connection. - # - # @overload get_connection(request, options = nil) - # Pass arguments to `get_connection` via a request object, either of type - # {::Google::Cloud::DeveloperConnect::V1::GetConnectionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::DeveloperConnect::V1::GetConnectionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_connection(name: nil) - # Pass arguments to `get_connection` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::Connection] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::DeveloperConnect::V1::Connection] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::DeveloperConnect::V1::GetConnectionRequest.new - # - # # Call the get_connection method. - # result = client.get_connection request - # - # # The returned object is of type Google::Cloud::DeveloperConnect::V1::Connection. - # p result - # - def get_connection request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::GetConnectionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_connection.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_connection.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_connection.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_connect_stub.get_connection request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new Connection in a given project and location. - # - # @overload create_connection(request, options = nil) - # Pass arguments to `create_connection` via a request object, either of type - # {::Google::Cloud::DeveloperConnect::V1::CreateConnectionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::DeveloperConnect::V1::CreateConnectionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_connection(parent: nil, connection_id: nil, connection: nil, request_id: nil, validate_only: nil) - # Pass arguments to `create_connection` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Value for parent. - # @param connection_id [::String] - # Required. Id of the requesting object - # If auto-generating Id server-side, remove this field and - # connection_id from the method_signature of Create RPC - # @param connection [::Google::Cloud::DeveloperConnect::V1::Connection, ::Hash] - # Required. The resource being created - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @param validate_only [::Boolean] - # Optional. If set, validate the request, but do not actually post it. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::DeveloperConnect::V1::CreateConnectionRequest.new - # - # # Call the create_connection method. - # result = client.create_connection request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_connection request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::CreateConnectionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_connection.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_connection.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_connection.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_connect_stub.create_connection request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of a single Connection. - # - # @overload update_connection(request, options = nil) - # Pass arguments to `update_connection` via a request object, either of type - # {::Google::Cloud::DeveloperConnect::V1::UpdateConnectionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::DeveloperConnect::V1::UpdateConnectionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_connection(update_mask: nil, connection: nil, request_id: nil, allow_missing: nil, validate_only: nil) - # Pass arguments to `update_connection` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Field mask is used to specify the fields to be overwritten in the - # Connection resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @param connection [::Google::Cloud::DeveloperConnect::V1::Connection, ::Hash] - # Required. The resource being updated - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @param allow_missing [::Boolean] - # Optional. If set to true, and the connection is not found a new connection - # will be created. In this situation `update_mask` is ignored. - # The creation will succeed only if the input connection has all the - # necessary information (e.g a github_config with both user_oauth_token and - # installation_id properties). - # @param validate_only [::Boolean] - # Optional. If set, validate the request, but do not actually post it. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::DeveloperConnect::V1::UpdateConnectionRequest.new - # - # # Call the update_connection method. - # result = client.update_connection request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_connection request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::UpdateConnectionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_connection.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_connection.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_connection.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_connect_stub.update_connection request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single Connection. - # - # @overload delete_connection(request, options = nil) - # Pass arguments to `delete_connection` via a request object, either of type - # {::Google::Cloud::DeveloperConnect::V1::DeleteConnectionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::DeveloperConnect::V1::DeleteConnectionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_connection(name: nil, request_id: nil, validate_only: nil, etag: nil) - # Pass arguments to `delete_connection` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @param validate_only [::Boolean] - # Optional. If set, validate the request, but do not actually post it. - # @param etag [::String] - # Optional. The current etag of the Connection. - # If an etag is provided and does not match the current etag of the - # Connection, deletion will be blocked and an ABORTED error will be returned. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::DeveloperConnect::V1::DeleteConnectionRequest.new - # - # # Call the delete_connection method. - # result = client.delete_connection request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_connection request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::DeleteConnectionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_connection.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_connection.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_connection.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_connect_stub.delete_connection request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a GitRepositoryLink. Upon linking a Git Repository, Developer - # Connect will configure the Git Repository to send webhook events to - # Developer Connect. Connections that use Firebase GitHub Application will - # have events forwarded to the Firebase service. Connections that use Gemini - # Code Assist will have events forwarded to Gemini Code Assist service. All - # other Connections will have events forwarded to Cloud Build. - # - # @overload create_git_repository_link(request, options = nil) - # Pass arguments to `create_git_repository_link` via a request object, either of type - # {::Google::Cloud::DeveloperConnect::V1::CreateGitRepositoryLinkRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::DeveloperConnect::V1::CreateGitRepositoryLinkRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_git_repository_link(parent: nil, git_repository_link: nil, git_repository_link_id: nil, request_id: nil, validate_only: nil) - # Pass arguments to `create_git_repository_link` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Value for parent. - # @param git_repository_link [::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink, ::Hash] - # Required. The resource being created - # @param git_repository_link_id [::String] - # Required. The ID to use for the repository, which will become the final - # component of the repository's resource name. This ID should be unique in - # the connection. Allows alphanumeric characters and any of - # -._~%!$&'()*+,;=@. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @param validate_only [::Boolean] - # Optional. If set, validate the request, but do not actually post it. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::DeveloperConnect::V1::CreateGitRepositoryLinkRequest.new - # - # # Call the create_git_repository_link method. - # result = client.create_git_repository_link request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_git_repository_link request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::CreateGitRepositoryLinkRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_git_repository_link.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_git_repository_link.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_git_repository_link.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_connect_stub.create_git_repository_link request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single GitRepositoryLink. - # - # @overload delete_git_repository_link(request, options = nil) - # Pass arguments to `delete_git_repository_link` via a request object, either of type - # {::Google::Cloud::DeveloperConnect::V1::DeleteGitRepositoryLinkRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::DeveloperConnect::V1::DeleteGitRepositoryLinkRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_git_repository_link(name: nil, request_id: nil, validate_only: nil, etag: nil) - # Pass arguments to `delete_git_repository_link` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @param validate_only [::Boolean] - # Optional. If set, validate the request, but do not actually post it. - # @param etag [::String] - # Optional. This checksum is computed by the server based on the value of - # other fields, and may be sent on update and delete requests to ensure the - # client has an up-to-date value before proceeding. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::DeveloperConnect::V1::DeleteGitRepositoryLinkRequest.new - # - # # Call the delete_git_repository_link method. - # result = client.delete_git_repository_link request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_git_repository_link request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::DeleteGitRepositoryLinkRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_git_repository_link.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_git_repository_link.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_git_repository_link.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_connect_stub.delete_git_repository_link request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists GitRepositoryLinks in a given project, location, and connection. - # - # @overload list_git_repository_links(request, options = nil) - # Pass arguments to `list_git_repository_links` via a request object, either of type - # {::Google::Cloud::DeveloperConnect::V1::ListGitRepositoryLinksRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::DeveloperConnect::V1::ListGitRepositoryLinksRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_git_repository_links(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_git_repository_links` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value for ListGitRepositoryLinksRequest - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering results - # @param order_by [::String] - # Optional. Hint for how to order the results - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::DeveloperConnect::V1::ListGitRepositoryLinksRequest.new - # - # # Call the list_git_repository_links method. - # result = client.list_git_repository_links request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink. - # p item - # end - # - def list_git_repository_links request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::ListGitRepositoryLinksRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_git_repository_links.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_git_repository_links.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_git_repository_links.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_connect_stub.list_git_repository_links request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @developer_connect_stub, :list_git_repository_links, "git_repository_links", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single GitRepositoryLink. - # - # @overload get_git_repository_link(request, options = nil) - # Pass arguments to `get_git_repository_link` via a request object, either of type - # {::Google::Cloud::DeveloperConnect::V1::GetGitRepositoryLinkRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::DeveloperConnect::V1::GetGitRepositoryLinkRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_git_repository_link(name: nil) - # Pass arguments to `get_git_repository_link` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::DeveloperConnect::V1::GetGitRepositoryLinkRequest.new - # - # # Call the get_git_repository_link method. - # result = client.get_git_repository_link request - # - # # The returned object is of type Google::Cloud::DeveloperConnect::V1::GitRepositoryLink. - # p result - # - def get_git_repository_link request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::GetGitRepositoryLinkRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_git_repository_link.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_git_repository_link.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_git_repository_link.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_connect_stub.get_git_repository_link request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Fetches read/write token of a given gitRepositoryLink. - # - # @overload fetch_read_write_token(request, options = nil) - # Pass arguments to `fetch_read_write_token` via a request object, either of type - # {::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload fetch_read_write_token(git_repository_link: nil) - # Pass arguments to `fetch_read_write_token` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param git_repository_link [::String] - # Required. The resource name of the gitRepositoryLink in the format - # `projects/*/locations/*/connections/*/gitRepositoryLinks/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenRequest.new - # - # # Call the fetch_read_write_token method. - # result = client.fetch_read_write_token request - # - # # The returned object is of type Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenResponse. - # p result - # - def fetch_read_write_token request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.fetch_read_write_token.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.fetch_read_write_token.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.fetch_read_write_token.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_connect_stub.fetch_read_write_token request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Fetches read token of a given gitRepositoryLink. - # - # @overload fetch_read_token(request, options = nil) - # Pass arguments to `fetch_read_token` via a request object, either of type - # {::Google::Cloud::DeveloperConnect::V1::FetchReadTokenRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::DeveloperConnect::V1::FetchReadTokenRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload fetch_read_token(git_repository_link: nil) - # Pass arguments to `fetch_read_token` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param git_repository_link [::String] - # Required. The resource name of the gitRepositoryLink in the format - # `projects/*/locations/*/connections/*/gitRepositoryLinks/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::FetchReadTokenResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::DeveloperConnect::V1::FetchReadTokenResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::DeveloperConnect::V1::FetchReadTokenRequest.new - # - # # Call the fetch_read_token method. - # result = client.fetch_read_token request - # - # # The returned object is of type Google::Cloud::DeveloperConnect::V1::FetchReadTokenResponse. - # p result - # - def fetch_read_token request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::FetchReadTokenRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.fetch_read_token.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.fetch_read_token.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.fetch_read_token.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_connect_stub.fetch_read_token request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # FetchLinkableGitRepositories returns a list of git repositories from an SCM - # that are available to be added to a Connection. - # - # @overload fetch_linkable_git_repositories(request, options = nil) - # Pass arguments to `fetch_linkable_git_repositories` via a request object, either of type - # {::Google::Cloud::DeveloperConnect::V1::FetchLinkableGitRepositoriesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::DeveloperConnect::V1::FetchLinkableGitRepositoriesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload fetch_linkable_git_repositories(connection: nil, page_size: nil, page_token: nil) - # Pass arguments to `fetch_linkable_git_repositories` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param connection [::String] - # Required. The name of the Connection. - # Format: `projects/*/locations/*/connections/*`. - # @param page_size [::Integer] - # Optional. Number of results to return in the list. Defaults to 20. - # @param page_token [::String] - # Optional. Page start. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::LinkableGitRepository>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::LinkableGitRepository>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::DeveloperConnect::V1::FetchLinkableGitRepositoriesRequest.new - # - # # Call the fetch_linkable_git_repositories method. - # result = client.fetch_linkable_git_repositories request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::DeveloperConnect::V1::LinkableGitRepository. - # p item - # end - # - def fetch_linkable_git_repositories request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::FetchLinkableGitRepositoriesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.fetch_linkable_git_repositories.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.fetch_linkable_git_repositories.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.fetch_linkable_git_repositories.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_connect_stub.fetch_linkable_git_repositories request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @developer_connect_stub, :fetch_linkable_git_repositories, "linkable_git_repositories", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # FetchGitHubInstallations returns the list of GitHub Installations that - # are available to be added to a Connection. - # For github.com, only installations accessible to the authorizer token - # are returned. For GitHub Enterprise, all installations are returned. - # - # @overload fetch_git_hub_installations(request, options = nil) - # Pass arguments to `fetch_git_hub_installations` via a request object, either of type - # {::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload fetch_git_hub_installations(connection: nil) - # Pass arguments to `fetch_git_hub_installations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param connection [::String] - # Required. The resource name of the connection in the format - # `projects/*/locations/*/connections/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsRequest.new - # - # # Call the fetch_git_hub_installations method. - # result = client.fetch_git_hub_installations request - # - # # The returned object is of type Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsResponse. - # p result - # - def fetch_git_hub_installations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.fetch_git_hub_installations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.fetch_git_hub_installations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.fetch_git_hub_installations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_connect_stub.fetch_git_hub_installations request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Fetch the list of branches or tags for a given repository. - # - # @overload fetch_git_refs(request, options = nil) - # Pass arguments to `fetch_git_refs` via a request object, either of type - # {::Google::Cloud::DeveloperConnect::V1::FetchGitRefsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::DeveloperConnect::V1::FetchGitRefsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload fetch_git_refs(git_repository_link: nil, ref_type: nil, page_size: nil, page_token: nil) - # Pass arguments to `fetch_git_refs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param git_repository_link [::String] - # Required. The resource name of GitRepositoryLink in the format - # `projects/*/locations/*/connections/*/gitRepositoryLinks/*`. - # @param ref_type [::Google::Cloud::DeveloperConnect::V1::FetchGitRefsRequest::RefType] - # Required. Type of refs to fetch. - # @param page_size [::Integer] - # Optional. Number of results to return in the list. Default to 20. - # @param page_token [::String] - # Optional. Page start. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::FetchGitRefsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::DeveloperConnect::V1::FetchGitRefsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::DeveloperConnect::V1::FetchGitRefsRequest.new - # - # # Call the fetch_git_refs method. - # result = client.fetch_git_refs request - # - # # The returned object is of type Google::Cloud::DeveloperConnect::V1::FetchGitRefsResponse. - # p result - # - def fetch_git_refs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::FetchGitRefsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.fetch_git_refs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.fetch_git_refs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.fetch_git_refs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_connect_stub.fetch_git_refs request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists AccountConnectors in a given project and location. - # - # @overload list_account_connectors(request, options = nil) - # Pass arguments to `list_account_connectors` via a request object, either of type - # {::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_account_connectors(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_account_connectors` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value for ListAccountConnectorsRequest - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering results - # @param order_by [::String] - # Optional. Hint for how to order the results - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::AccountConnector>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::AccountConnector>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsRequest.new - # - # # Call the list_account_connectors method. - # result = client.list_account_connectors request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::DeveloperConnect::V1::AccountConnector. - # p item - # end - # - def list_account_connectors request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_account_connectors.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_account_connectors.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_account_connectors.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_connect_stub.list_account_connectors request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @developer_connect_stub, :list_account_connectors, "account_connectors", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single AccountConnector. - # - # @overload get_account_connector(request, options = nil) - # Pass arguments to `get_account_connector` via a request object, either of type - # {::Google::Cloud::DeveloperConnect::V1::GetAccountConnectorRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::DeveloperConnect::V1::GetAccountConnectorRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_account_connector(name: nil) - # Pass arguments to `get_account_connector` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::AccountConnector] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::DeveloperConnect::V1::AccountConnector] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::DeveloperConnect::V1::GetAccountConnectorRequest.new - # - # # Call the get_account_connector method. - # result = client.get_account_connector request - # - # # The returned object is of type Google::Cloud::DeveloperConnect::V1::AccountConnector. - # p result - # - def get_account_connector request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::GetAccountConnectorRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_account_connector.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_account_connector.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_account_connector.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_connect_stub.get_account_connector request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new AccountConnector in a given project and location. - # - # @overload create_account_connector(request, options = nil) - # Pass arguments to `create_account_connector` via a request object, either of type - # {::Google::Cloud::DeveloperConnect::V1::CreateAccountConnectorRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::DeveloperConnect::V1::CreateAccountConnectorRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_account_connector(parent: nil, account_connector_id: nil, account_connector: nil, request_id: nil, validate_only: nil) - # Pass arguments to `create_account_connector` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Location resource name as the account_connector’s parent. - # @param account_connector_id [::String] - # Required. The ID to use for the AccountConnector, which will become the - # final component of the AccountConnector's resource name. Its format should - # adhere to https://google.aip.dev/122#resource-id-segments Names must be - # unique per-project per-location. - # @param account_connector [::Google::Cloud::DeveloperConnect::V1::AccountConnector, ::Hash] - # Required. The AccountConnector to create. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @param validate_only [::Boolean] - # Optional. If set, validate the request, but do not actually post it. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::DeveloperConnect::V1::CreateAccountConnectorRequest.new - # - # # Call the create_account_connector method. - # result = client.create_account_connector request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_account_connector request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::CreateAccountConnectorRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_account_connector.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_account_connector.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_account_connector.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_connect_stub.create_account_connector request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of a single AccountConnector. - # - # @overload update_account_connector(request, options = nil) - # Pass arguments to `update_account_connector` via a request object, either of type - # {::Google::Cloud::DeveloperConnect::V1::UpdateAccountConnectorRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::DeveloperConnect::V1::UpdateAccountConnectorRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_account_connector(update_mask: nil, account_connector: nil, request_id: nil, allow_missing: nil, validate_only: nil) - # Pass arguments to `update_account_connector` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of fields to be updated. - # @param account_connector [::Google::Cloud::DeveloperConnect::V1::AccountConnector, ::Hash] - # Required. The AccountConnector to update. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @param allow_missing [::Boolean] - # Optional. If set to true, and the accountConnector is not found a new - # accountConnector will be created. In this situation `update_mask` is - # ignored. The creation will succeed only if the input accountConnector has - # all the necessary - # @param validate_only [::Boolean] - # Optional. If set, validate the request, but do not actually post it. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::DeveloperConnect::V1::UpdateAccountConnectorRequest.new - # - # # Call the update_account_connector method. - # result = client.update_account_connector request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_account_connector request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::UpdateAccountConnectorRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_account_connector.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_account_connector.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_account_connector.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_connect_stub.update_account_connector request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single AccountConnector. - # - # @overload delete_account_connector(request, options = nil) - # Pass arguments to `delete_account_connector` via a request object, either of type - # {::Google::Cloud::DeveloperConnect::V1::DeleteAccountConnectorRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::DeveloperConnect::V1::DeleteAccountConnectorRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_account_connector(name: nil, request_id: nil, validate_only: nil, etag: nil, force: nil) - # Pass arguments to `delete_account_connector` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @param validate_only [::Boolean] - # Optional. If set, validate the request, but do not actually post it. - # @param etag [::String] - # Optional. The current etag of the AccountConnectorn. - # If an etag is provided and does not match the current etag of the - # AccountConnector, deletion will be blocked and an ABORTED error will be - # returned. - # @param force [::Boolean] - # Optional. If set to true, any Users from this AccountConnector will also - # be deleted. (Otherwise, the request will only work if the AccountConnector - # has no Users.) - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::DeveloperConnect::V1::DeleteAccountConnectorRequest.new - # - # # Call the delete_account_connector method. - # result = client.delete_account_connector request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_account_connector request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::DeleteAccountConnectorRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_account_connector.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_account_connector.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_account_connector.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_connect_stub.delete_account_connector request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Fetches OAuth access token based on end user credentials. - # - # @overload fetch_access_token(request, options = nil) - # Pass arguments to `fetch_access_token` via a request object, either of type - # {::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload fetch_access_token(account_connector: nil) - # Pass arguments to `fetch_access_token` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param account_connector [::String] - # Required. The resource name of the AccountConnector in the format - # `projects/*/locations/*/accountConnectors/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::DeveloperConnect::V1::FetchAccessTokenRequest.new - # - # # Call the fetch_access_token method. - # result = client.fetch_access_token request - # - # # The returned object is of type Google::Cloud::DeveloperConnect::V1::FetchAccessTokenResponse. - # p result - # - def fetch_access_token request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.fetch_access_token.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.fetch_access_token.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.fetch_access_token.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_connect_stub.fetch_access_token request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists Users in a given project, location, and account_connector. - # - # @overload list_users(request, options = nil) - # Pass arguments to `list_users` via a request object, either of type - # {::Google::Cloud::DeveloperConnect::V1::ListUsersRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::DeveloperConnect::V1::ListUsersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_users(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_users` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value for ListUsersRequest - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering results - # @param order_by [::String] - # Optional. Hint for how to order the results - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::User>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::User>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::DeveloperConnect::V1::ListUsersRequest.new - # - # # Call the list_users method. - # result = client.list_users request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::DeveloperConnect::V1::User. - # p item - # end - # - def list_users request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::ListUsersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_users.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_users.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_users.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_connect_stub.list_users request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @developer_connect_stub, :list_users, "users", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single User. - # - # @overload delete_user(request, options = nil) - # Pass arguments to `delete_user` via a request object, either of type - # {::Google::Cloud::DeveloperConnect::V1::DeleteUserRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::DeveloperConnect::V1::DeleteUserRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_user(name: nil, request_id: nil, validate_only: nil, etag: nil) - # Pass arguments to `delete_user` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @param validate_only [::Boolean] - # Optional. If set, validate the request, but do not actually post it. - # @param etag [::String] - # Optional. This checksum is computed by the server based on the value of - # other fields, and may be sent on update and delete requests to ensure the - # client has an up-to-date value before proceeding. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::DeveloperConnect::V1::DeleteUserRequest.new - # - # # Call the delete_user method. - # result = client.delete_user request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_user request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::DeleteUserRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_user.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_user.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_user.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_connect_stub.delete_user request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Fetch the User based on the user credentials. - # - # @overload fetch_self(request, options = nil) - # Pass arguments to `fetch_self` via a request object, either of type - # {::Google::Cloud::DeveloperConnect::V1::FetchSelfRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::DeveloperConnect::V1::FetchSelfRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload fetch_self(name: nil) - # Pass arguments to `fetch_self` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the AccountConnector resource - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::User] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::DeveloperConnect::V1::User] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::DeveloperConnect::V1::FetchSelfRequest.new - # - # # Call the fetch_self method. - # result = client.fetch_self request - # - # # The returned object is of type Google::Cloud::DeveloperConnect::V1::User. - # p result - # - def fetch_self request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::FetchSelfRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.fetch_self.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.fetch_self.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.fetch_self.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_connect_stub.fetch_self request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete the User based on the user credentials. - # - # @overload delete_self(request, options = nil) - # Pass arguments to `delete_self` via a request object, either of type - # {::Google::Cloud::DeveloperConnect::V1::DeleteSelfRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::DeveloperConnect::V1::DeleteSelfRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_self(name: nil) - # Pass arguments to `delete_self` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the AccountConnector resource - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::DeveloperConnect::V1::DeleteSelfRequest.new - # - # # Call the delete_self method. - # result = client.delete_self request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_self request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::DeleteSelfRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_self.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_self.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_self.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_connect_stub.delete_self request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts OAuth flow for an account connector. - # - # @overload start_o_auth(request, options = nil) - # Pass arguments to `start_o_auth` via a request object, either of type - # {::Google::Cloud::DeveloperConnect::V1::StartOAuthRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::DeveloperConnect::V1::StartOAuthRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload start_o_auth(account_connector: nil) - # Pass arguments to `start_o_auth` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param account_connector [::String] - # Required. The resource name of the AccountConnector in the format - # `projects/*/locations/*/accountConnectors/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::StartOAuthResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::DeveloperConnect::V1::StartOAuthResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::DeveloperConnect::V1::StartOAuthRequest.new - # - # # Call the start_o_auth method. - # result = client.start_o_auth request - # - # # The returned object is of type Google::Cloud::DeveloperConnect::V1::StartOAuthResponse. - # p result - # - def start_o_auth request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::StartOAuthRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.start_o_auth.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.start_o_auth.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.start_o_auth.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_connect_stub.start_o_auth request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Finishes OAuth flow for an account connector. - # - # @overload finish_o_auth(request, options = nil) - # Pass arguments to `finish_o_auth` via a request object, either of type - # {::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload finish_o_auth(oauth_params: nil, google_oauth_params: nil, account_connector: nil) - # Pass arguments to `finish_o_auth` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param oauth_params [::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest::OAuthParams, ::Hash] - # The params returned by non-Google OAuth 2.0 flow redirect. - # - # Note: The following parameters are mutually exclusive: `oauth_params`, `google_oauth_params`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param google_oauth_params [::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest::GoogleOAuthParams, ::Hash] - # The params returned by Google OAuth flow redirects. - # - # Note: The following parameters are mutually exclusive: `google_oauth_params`, `oauth_params`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param account_connector [::String] - # Required. The resource name of the AccountConnector in the format - # `projects/*/locations/*/accountConnectors/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::FinishOAuthResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::DeveloperConnect::V1::FinishOAuthResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest.new - # - # # Call the finish_o_auth method. - # result = client.finish_o_auth request - # - # # The returned object is of type Google::Cloud::DeveloperConnect::V1::FinishOAuthResponse. - # p result - # - def finish_o_auth request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.finish_o_auth.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.finish_o_auth.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.finish_o_auth.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @developer_connect_stub.finish_o_auth request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the DeveloperConnect REST API. - # - # This class represents the configuration for DeveloperConnect REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_connections to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_connections.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_connections.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "developerconnect.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - # Overrides for http bindings for the RPCs of this service - # are only used when this service is used as mixin, and only - # by the host service. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the DeveloperConnect API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_connections` - # @return [::Gapic::Config::Method] - # - attr_reader :list_connections - ## - # RPC-specific configuration for `get_connection` - # @return [::Gapic::Config::Method] - # - attr_reader :get_connection - ## - # RPC-specific configuration for `create_connection` - # @return [::Gapic::Config::Method] - # - attr_reader :create_connection - ## - # RPC-specific configuration for `update_connection` - # @return [::Gapic::Config::Method] - # - attr_reader :update_connection - ## - # RPC-specific configuration for `delete_connection` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_connection - ## - # RPC-specific configuration for `create_git_repository_link` - # @return [::Gapic::Config::Method] - # - attr_reader :create_git_repository_link - ## - # RPC-specific configuration for `delete_git_repository_link` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_git_repository_link - ## - # RPC-specific configuration for `list_git_repository_links` - # @return [::Gapic::Config::Method] - # - attr_reader :list_git_repository_links - ## - # RPC-specific configuration for `get_git_repository_link` - # @return [::Gapic::Config::Method] - # - attr_reader :get_git_repository_link - ## - # RPC-specific configuration for `fetch_read_write_token` - # @return [::Gapic::Config::Method] - # - attr_reader :fetch_read_write_token - ## - # RPC-specific configuration for `fetch_read_token` - # @return [::Gapic::Config::Method] - # - attr_reader :fetch_read_token - ## - # RPC-specific configuration for `fetch_linkable_git_repositories` - # @return [::Gapic::Config::Method] - # - attr_reader :fetch_linkable_git_repositories - ## - # RPC-specific configuration for `fetch_git_hub_installations` - # @return [::Gapic::Config::Method] - # - attr_reader :fetch_git_hub_installations - ## - # RPC-specific configuration for `fetch_git_refs` - # @return [::Gapic::Config::Method] - # - attr_reader :fetch_git_refs - ## - # RPC-specific configuration for `list_account_connectors` - # @return [::Gapic::Config::Method] - # - attr_reader :list_account_connectors - ## - # RPC-specific configuration for `get_account_connector` - # @return [::Gapic::Config::Method] - # - attr_reader :get_account_connector - ## - # RPC-specific configuration for `create_account_connector` - # @return [::Gapic::Config::Method] - # - attr_reader :create_account_connector - ## - # RPC-specific configuration for `update_account_connector` - # @return [::Gapic::Config::Method] - # - attr_reader :update_account_connector - ## - # RPC-specific configuration for `delete_account_connector` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_account_connector - ## - # RPC-specific configuration for `fetch_access_token` - # @return [::Gapic::Config::Method] - # - attr_reader :fetch_access_token - ## - # RPC-specific configuration for `list_users` - # @return [::Gapic::Config::Method] - # - attr_reader :list_users - ## - # RPC-specific configuration for `delete_user` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_user - ## - # RPC-specific configuration for `fetch_self` - # @return [::Gapic::Config::Method] - # - attr_reader :fetch_self - ## - # RPC-specific configuration for `delete_self` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_self - ## - # RPC-specific configuration for `start_o_auth` - # @return [::Gapic::Config::Method] - # - attr_reader :start_o_auth - ## - # RPC-specific configuration for `finish_o_auth` - # @return [::Gapic::Config::Method] - # - attr_reader :finish_o_auth - - # @private - def initialize parent_rpcs = nil - list_connections_config = parent_rpcs.list_connections if parent_rpcs.respond_to? :list_connections - @list_connections = ::Gapic::Config::Method.new list_connections_config - get_connection_config = parent_rpcs.get_connection if parent_rpcs.respond_to? :get_connection - @get_connection = ::Gapic::Config::Method.new get_connection_config - create_connection_config = parent_rpcs.create_connection if parent_rpcs.respond_to? :create_connection - @create_connection = ::Gapic::Config::Method.new create_connection_config - update_connection_config = parent_rpcs.update_connection if parent_rpcs.respond_to? :update_connection - @update_connection = ::Gapic::Config::Method.new update_connection_config - delete_connection_config = parent_rpcs.delete_connection if parent_rpcs.respond_to? :delete_connection - @delete_connection = ::Gapic::Config::Method.new delete_connection_config - create_git_repository_link_config = parent_rpcs.create_git_repository_link if parent_rpcs.respond_to? :create_git_repository_link - @create_git_repository_link = ::Gapic::Config::Method.new create_git_repository_link_config - delete_git_repository_link_config = parent_rpcs.delete_git_repository_link if parent_rpcs.respond_to? :delete_git_repository_link - @delete_git_repository_link = ::Gapic::Config::Method.new delete_git_repository_link_config - list_git_repository_links_config = parent_rpcs.list_git_repository_links if parent_rpcs.respond_to? :list_git_repository_links - @list_git_repository_links = ::Gapic::Config::Method.new list_git_repository_links_config - get_git_repository_link_config = parent_rpcs.get_git_repository_link if parent_rpcs.respond_to? :get_git_repository_link - @get_git_repository_link = ::Gapic::Config::Method.new get_git_repository_link_config - fetch_read_write_token_config = parent_rpcs.fetch_read_write_token if parent_rpcs.respond_to? :fetch_read_write_token - @fetch_read_write_token = ::Gapic::Config::Method.new fetch_read_write_token_config - fetch_read_token_config = parent_rpcs.fetch_read_token if parent_rpcs.respond_to? :fetch_read_token - @fetch_read_token = ::Gapic::Config::Method.new fetch_read_token_config - fetch_linkable_git_repositories_config = parent_rpcs.fetch_linkable_git_repositories if parent_rpcs.respond_to? :fetch_linkable_git_repositories - @fetch_linkable_git_repositories = ::Gapic::Config::Method.new fetch_linkable_git_repositories_config - fetch_git_hub_installations_config = parent_rpcs.fetch_git_hub_installations if parent_rpcs.respond_to? :fetch_git_hub_installations - @fetch_git_hub_installations = ::Gapic::Config::Method.new fetch_git_hub_installations_config - fetch_git_refs_config = parent_rpcs.fetch_git_refs if parent_rpcs.respond_to? :fetch_git_refs - @fetch_git_refs = ::Gapic::Config::Method.new fetch_git_refs_config - list_account_connectors_config = parent_rpcs.list_account_connectors if parent_rpcs.respond_to? :list_account_connectors - @list_account_connectors = ::Gapic::Config::Method.new list_account_connectors_config - get_account_connector_config = parent_rpcs.get_account_connector if parent_rpcs.respond_to? :get_account_connector - @get_account_connector = ::Gapic::Config::Method.new get_account_connector_config - create_account_connector_config = parent_rpcs.create_account_connector if parent_rpcs.respond_to? :create_account_connector - @create_account_connector = ::Gapic::Config::Method.new create_account_connector_config - update_account_connector_config = parent_rpcs.update_account_connector if parent_rpcs.respond_to? :update_account_connector - @update_account_connector = ::Gapic::Config::Method.new update_account_connector_config - delete_account_connector_config = parent_rpcs.delete_account_connector if parent_rpcs.respond_to? :delete_account_connector - @delete_account_connector = ::Gapic::Config::Method.new delete_account_connector_config - fetch_access_token_config = parent_rpcs.fetch_access_token if parent_rpcs.respond_to? :fetch_access_token - @fetch_access_token = ::Gapic::Config::Method.new fetch_access_token_config - list_users_config = parent_rpcs.list_users if parent_rpcs.respond_to? :list_users - @list_users = ::Gapic::Config::Method.new list_users_config - delete_user_config = parent_rpcs.delete_user if parent_rpcs.respond_to? :delete_user - @delete_user = ::Gapic::Config::Method.new delete_user_config - fetch_self_config = parent_rpcs.fetch_self if parent_rpcs.respond_to? :fetch_self - @fetch_self = ::Gapic::Config::Method.new fetch_self_config - delete_self_config = parent_rpcs.delete_self if parent_rpcs.respond_to? :delete_self - @delete_self = ::Gapic::Config::Method.new delete_self_config - start_o_auth_config = parent_rpcs.start_o_auth if parent_rpcs.respond_to? :start_o_auth - @start_o_auth = ::Gapic::Config::Method.new start_o_auth_config - finish_o_auth_config = parent_rpcs.finish_o_auth if parent_rpcs.respond_to? :finish_o_auth - @finish_o_auth = ::Gapic::Config::Method.new finish_o_auth_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/rest/operations.rb b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/rest/operations.rb deleted file mode 100644 index fb18de15d190..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/rest/operations.rb +++ /dev/null @@ -1,925 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module DeveloperConnect - module V1 - module DeveloperConnect - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "developerconnect.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the DeveloperConnect Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the DeveloperConnect Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = OperationsServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.list_operations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.get_operation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.delete_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "developerconnect.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}/operations", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/rest/service_stub.rb b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/rest/service_stub.rb deleted file mode 100644 index 20c0bfe3ae46..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/developer_connect/rest/service_stub.rb +++ /dev/null @@ -1,1675 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/developerconnect/v1/developer_connect_pb" - -module Google - module Cloud - module DeveloperConnect - module V1 - module DeveloperConnect - module Rest - ## - # REST service stub for the DeveloperConnect service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the list_connections REST call - # - # @param request_pb [::Google::Cloud::DeveloperConnect::V1::ListConnectionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::ListConnectionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::DeveloperConnect::V1::ListConnectionsResponse] - # A result object deserialized from the server's reply - def list_connections request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_connections_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_connections", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::DeveloperConnect::V1::ListConnectionsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_connection REST call - # - # @param request_pb [::Google::Cloud::DeveloperConnect::V1::GetConnectionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::Connection] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::DeveloperConnect::V1::Connection] - # A result object deserialized from the server's reply - def get_connection request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_connection_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_connection", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::DeveloperConnect::V1::Connection.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_connection REST call - # - # @param request_pb [::Google::Cloud::DeveloperConnect::V1::CreateConnectionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_connection request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_connection_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_connection", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_connection REST call - # - # @param request_pb [::Google::Cloud::DeveloperConnect::V1::UpdateConnectionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_connection request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_connection_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_connection", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_connection REST call - # - # @param request_pb [::Google::Cloud::DeveloperConnect::V1::DeleteConnectionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_connection request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_connection_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_connection", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_git_repository_link REST call - # - # @param request_pb [::Google::Cloud::DeveloperConnect::V1::CreateGitRepositoryLinkRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_git_repository_link request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_git_repository_link_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_git_repository_link", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_git_repository_link REST call - # - # @param request_pb [::Google::Cloud::DeveloperConnect::V1::DeleteGitRepositoryLinkRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_git_repository_link request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_git_repository_link_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_git_repository_link", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_git_repository_links REST call - # - # @param request_pb [::Google::Cloud::DeveloperConnect::V1::ListGitRepositoryLinksRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::ListGitRepositoryLinksResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::DeveloperConnect::V1::ListGitRepositoryLinksResponse] - # A result object deserialized from the server's reply - def list_git_repository_links request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_git_repository_links_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_git_repository_links", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::DeveloperConnect::V1::ListGitRepositoryLinksResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_git_repository_link REST call - # - # @param request_pb [::Google::Cloud::DeveloperConnect::V1::GetGitRepositoryLinkRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink] - # A result object deserialized from the server's reply - def get_git_repository_link request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_git_repository_link_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_git_repository_link", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the fetch_read_write_token REST call - # - # @param request_pb [::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenResponse] - # A result object deserialized from the server's reply - def fetch_read_write_token request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_fetch_read_write_token_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "fetch_read_write_token", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the fetch_read_token REST call - # - # @param request_pb [::Google::Cloud::DeveloperConnect::V1::FetchReadTokenRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::FetchReadTokenResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::DeveloperConnect::V1::FetchReadTokenResponse] - # A result object deserialized from the server's reply - def fetch_read_token request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_fetch_read_token_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "fetch_read_token", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::DeveloperConnect::V1::FetchReadTokenResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the fetch_linkable_git_repositories REST call - # - # @param request_pb [::Google::Cloud::DeveloperConnect::V1::FetchLinkableGitRepositoriesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::FetchLinkableGitRepositoriesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::DeveloperConnect::V1::FetchLinkableGitRepositoriesResponse] - # A result object deserialized from the server's reply - def fetch_linkable_git_repositories request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_fetch_linkable_git_repositories_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "fetch_linkable_git_repositories", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::DeveloperConnect::V1::FetchLinkableGitRepositoriesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the fetch_git_hub_installations REST call - # - # @param request_pb [::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsResponse] - # A result object deserialized from the server's reply - def fetch_git_hub_installations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_fetch_git_hub_installations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "fetch_git_hub_installations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the fetch_git_refs REST call - # - # @param request_pb [::Google::Cloud::DeveloperConnect::V1::FetchGitRefsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::FetchGitRefsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::DeveloperConnect::V1::FetchGitRefsResponse] - # A result object deserialized from the server's reply - def fetch_git_refs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_fetch_git_refs_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "fetch_git_refs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::DeveloperConnect::V1::FetchGitRefsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_account_connectors REST call - # - # @param request_pb [::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsResponse] - # A result object deserialized from the server's reply - def list_account_connectors request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_account_connectors_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_account_connectors", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_account_connector REST call - # - # @param request_pb [::Google::Cloud::DeveloperConnect::V1::GetAccountConnectorRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::AccountConnector] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::DeveloperConnect::V1::AccountConnector] - # A result object deserialized from the server's reply - def get_account_connector request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_account_connector_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_account_connector", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::DeveloperConnect::V1::AccountConnector.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_account_connector REST call - # - # @param request_pb [::Google::Cloud::DeveloperConnect::V1::CreateAccountConnectorRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_account_connector request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_account_connector_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_account_connector", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_account_connector REST call - # - # @param request_pb [::Google::Cloud::DeveloperConnect::V1::UpdateAccountConnectorRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_account_connector request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_account_connector_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_account_connector", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_account_connector REST call - # - # @param request_pb [::Google::Cloud::DeveloperConnect::V1::DeleteAccountConnectorRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_account_connector request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_account_connector_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_account_connector", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the fetch_access_token REST call - # - # @param request_pb [::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenResponse] - # A result object deserialized from the server's reply - def fetch_access_token request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_fetch_access_token_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "fetch_access_token", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_users REST call - # - # @param request_pb [::Google::Cloud::DeveloperConnect::V1::ListUsersRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::ListUsersResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::DeveloperConnect::V1::ListUsersResponse] - # A result object deserialized from the server's reply - def list_users request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_users_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_users", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::DeveloperConnect::V1::ListUsersResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_user REST call - # - # @param request_pb [::Google::Cloud::DeveloperConnect::V1::DeleteUserRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_user request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_user_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_user", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the fetch_self REST call - # - # @param request_pb [::Google::Cloud::DeveloperConnect::V1::FetchSelfRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::User] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::DeveloperConnect::V1::User] - # A result object deserialized from the server's reply - def fetch_self request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_fetch_self_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "fetch_self", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::DeveloperConnect::V1::User.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_self REST call - # - # @param request_pb [::Google::Cloud::DeveloperConnect::V1::DeleteSelfRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_self request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_self_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_self", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the start_o_auth REST call - # - # @param request_pb [::Google::Cloud::DeveloperConnect::V1::StartOAuthRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::StartOAuthResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::DeveloperConnect::V1::StartOAuthResponse] - # A result object deserialized from the server's reply - def start_o_auth request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_start_o_auth_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "start_o_auth", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::DeveloperConnect::V1::StartOAuthResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the finish_o_auth REST call - # - # @param request_pb [::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::DeveloperConnect::V1::FinishOAuthResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::DeveloperConnect::V1::FinishOAuthResponse] - # A result object deserialized from the server's reply - def finish_o_auth request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_finish_o_auth_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "finish_o_auth", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::DeveloperConnect::V1::FinishOAuthResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_connections REST call - # - # @param request_pb [::Google::Cloud::DeveloperConnect::V1::ListConnectionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_connections_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/connections", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_connection REST call - # - # @param request_pb [::Google::Cloud::DeveloperConnect::V1::GetConnectionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_connection_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/connections/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_connection REST call - # - # @param request_pb [::Google::Cloud::DeveloperConnect::V1::CreateConnectionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_connection_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/connections", - body: "connection", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_connection REST call - # - # @param request_pb [::Google::Cloud::DeveloperConnect::V1::UpdateConnectionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_connection_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{connection.name}", - body: "connection", - matches: [ - ["connection.name", %r{^projects/[^/]+/locations/[^/]+/connections/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_connection REST call - # - # @param request_pb [::Google::Cloud::DeveloperConnect::V1::DeleteConnectionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_connection_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/connections/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_git_repository_link REST call - # - # @param request_pb [::Google::Cloud::DeveloperConnect::V1::CreateGitRepositoryLinkRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_git_repository_link_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/gitRepositoryLinks", - body: "git_repository_link", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/connections/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_git_repository_link REST call - # - # @param request_pb [::Google::Cloud::DeveloperConnect::V1::DeleteGitRepositoryLinkRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_git_repository_link_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/connections/[^/]+/gitRepositoryLinks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_git_repository_links REST call - # - # @param request_pb [::Google::Cloud::DeveloperConnect::V1::ListGitRepositoryLinksRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_git_repository_links_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/gitRepositoryLinks", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/connections/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_git_repository_link REST call - # - # @param request_pb [::Google::Cloud::DeveloperConnect::V1::GetGitRepositoryLinkRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_git_repository_link_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/connections/[^/]+/gitRepositoryLinks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the fetch_read_write_token REST call - # - # @param request_pb [::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_fetch_read_write_token_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{git_repository_link}:fetchReadWriteToken", - body: "*", - matches: [ - ["git_repository_link", %r{^projects/[^/]+/locations/[^/]+/connections/[^/]+/gitRepositoryLinks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the fetch_read_token REST call - # - # @param request_pb [::Google::Cloud::DeveloperConnect::V1::FetchReadTokenRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_fetch_read_token_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{git_repository_link}:fetchReadToken", - body: "*", - matches: [ - ["git_repository_link", %r{^projects/[^/]+/locations/[^/]+/connections/[^/]+/gitRepositoryLinks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the fetch_linkable_git_repositories REST call - # - # @param request_pb [::Google::Cloud::DeveloperConnect::V1::FetchLinkableGitRepositoriesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_fetch_linkable_git_repositories_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{connection}:fetchLinkableGitRepositories", - matches: [ - ["connection", %r{^projects/[^/]+/locations/[^/]+/connections/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the fetch_git_hub_installations REST call - # - # @param request_pb [::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_fetch_git_hub_installations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{connection}:fetchGitHubInstallations", - matches: [ - ["connection", %r{^projects/[^/]+/locations/[^/]+/connections/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the fetch_git_refs REST call - # - # @param request_pb [::Google::Cloud::DeveloperConnect::V1::FetchGitRefsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_fetch_git_refs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{git_repository_link}:fetchGitRefs", - matches: [ - ["git_repository_link", %r{^projects/[^/]+/locations/[^/]+/connections/[^/]+/gitRepositoryLinks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_account_connectors REST call - # - # @param request_pb [::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_account_connectors_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/accountConnectors", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_account_connector REST call - # - # @param request_pb [::Google::Cloud::DeveloperConnect::V1::GetAccountConnectorRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_account_connector_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/accountConnectors/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_account_connector REST call - # - # @param request_pb [::Google::Cloud::DeveloperConnect::V1::CreateAccountConnectorRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_account_connector_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/accountConnectors", - body: "account_connector", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_account_connector REST call - # - # @param request_pb [::Google::Cloud::DeveloperConnect::V1::UpdateAccountConnectorRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_account_connector_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{account_connector.name}", - body: "account_connector", - matches: [ - ["account_connector.name", %r{^projects/[^/]+/locations/[^/]+/accountConnectors/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_account_connector REST call - # - # @param request_pb [::Google::Cloud::DeveloperConnect::V1::DeleteAccountConnectorRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_account_connector_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/accountConnectors/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the fetch_access_token REST call - # - # @param request_pb [::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_fetch_access_token_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{account_connector}/users:fetchAccessToken", - body: "*", - matches: [ - ["account_connector", %r{^projects/[^/]+/locations/[^/]+/accountConnectors/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_users REST call - # - # @param request_pb [::Google::Cloud::DeveloperConnect::V1::ListUsersRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_users_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/users", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/accountConnectors/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_user REST call - # - # @param request_pb [::Google::Cloud::DeveloperConnect::V1::DeleteUserRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_user_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/accountConnectors/[^/]+/users/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the fetch_self REST call - # - # @param request_pb [::Google::Cloud::DeveloperConnect::V1::FetchSelfRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_fetch_self_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}/users:fetchSelf", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/accountConnectors/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_self REST call - # - # @param request_pb [::Google::Cloud::DeveloperConnect::V1::DeleteSelfRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_self_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}/users:deleteSelf", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/accountConnectors/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the start_o_auth REST call - # - # @param request_pb [::Google::Cloud::DeveloperConnect::V1::StartOAuthRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_start_o_auth_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{account_connector}/users:startOAuthFlow", - matches: [ - ["account_connector", %r{^projects/[^/]+/locations/[^/]+/accountConnectors/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the finish_o_auth REST call - # - # @param request_pb [::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_finish_o_auth_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{account_connector}/users:finishOAuthFlow", - matches: [ - ["account_connector", %r{^projects/[^/]+/locations/[^/]+/accountConnectors/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/rest.rb b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/rest.rb deleted file mode 100644 index eef17efca43d..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/rest.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/developer_connect/v1/developer_connect/rest" -require "google/cloud/developerconnect/v1/insights_config_service/rest" -require "google/cloud/developer_connect/v1/bindings_override" -require "google/cloud/developer_connect/v1/version" - -module Google - module Cloud - module DeveloperConnect - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/developer_connect/v1/rest" - # client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/version.rb b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/version.rb deleted file mode 100644 index 05fe2ffabf9a..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developer_connect/v1/version.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module DeveloperConnect - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/developer_connect_pb.rb b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/developer_connect_pb.rb deleted file mode 100644 index 4a5e4409d71d..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/developer_connect_pb.rb +++ /dev/null @@ -1,122 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/developerconnect/v1/developer_connect.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/field_info_pb' -require 'google/api/resource_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n8google/cloud/developerconnect/v1/developer_connect.proto\x12 google.cloud.developerconnect.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xad\x01\n\x10ListUsersRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$developerconnect.googleapis.com/User\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"x\n\x11ListUsersResponse\x12\x35\n\x05users\x18\x01 \x03(\x0b\x32&.google.cloud.developerconnect.v1.User\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xa6\r\n\nConnection\x12G\n\rgithub_config\x18\x05 \x01(\x0b\x32..google.cloud.developerconnect.v1.GitHubConfigH\x00\x12\\\n\x18github_enterprise_config\x18\r \x01(\x0b\x32\x38.google.cloud.developerconnect.v1.GitHubEnterpriseConfigH\x00\x12G\n\rgitlab_config\x18\x0e \x01(\x0b\x32..google.cloud.developerconnect.v1.GitLabConfigH\x00\x12\\\n\x18gitlab_enterprise_config\x18\x10 \x01(\x0b\x32\x38.google.cloud.developerconnect.v1.GitLabEnterpriseConfigH\x00\x12\x63\n\x1c\x62itbucket_data_center_config\x18\x11 \x01(\x0b\x32;.google.cloud.developerconnect.v1.BitbucketDataCenterConfigH\x00\x12X\n\x16\x62itbucket_cloud_config\x18\x12 \x01(\x0b\x32\x36.google.cloud.developerconnect.v1.BitbucketCloudConfigH\x00\x12t\n%secure_source_manager_instance_config\x18\x14 \x01(\x0b\x32\x43.google.cloud.developerconnect.v1.SecureSourceManagerInstanceConfigH\x00\x12W\n\x0bhttp_config\x18\x15 \x01(\x0b\x32;.google.cloud.developerconnect.v1.GenericHTTPEndpointConfigB\x03\xe0\x41\x01H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12M\n\x06labels\x18\x04 \x03(\x0b\x32\x38.google.cloud.developerconnect.v1.Connection.LabelsEntryB\x03\xe0\x41\x01\x12T\n\x12installation_state\x18\x06 \x01(\x0b\x32\x33.google.cloud.developerconnect.v1.InstallationStateB\x03\xe0\x41\x03\x12\x15\n\x08\x64isabled\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01\x12\x18\n\x0breconciling\x18\x08 \x01(\x08\x42\x03\xe0\x41\x03\x12W\n\x0b\x61nnotations\x18\t \x03(\x0b\x32=.google.cloud.developerconnect.v1.Connection.AnnotationsEntryB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\n \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x03uid\x18\x0c \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12Q\n\x11\x63rypto_key_config\x18\x0f \x01(\x0b\x32\x31.google.cloud.developerconnect.v1.CryptoKeyConfigB\x03\xe0\x41\x01\x12O\n\x10git_proxy_config\x18\x13 \x01(\x0b\x32\x30.google.cloud.developerconnect.v1.GitProxyConfigB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x8e\x01\xea\x41\x8a\x01\n*developerconnect.googleapis.com/Connection\x12@projects/{project}/locations/{location}/connections/{connection}*\x0b\x63onnections2\nconnectionR\x01\x01\x42\x13\n\x11\x63onnection_config\"S\n\x0f\x43ryptoKeyConfig\x12@\n\rkey_reference\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\"H\n\x0eGitProxyConfig\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12 \n\x13http_proxy_base_uri\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\x88\x02\n\x11InstallationState\x12M\n\x05stage\x18\x01 \x01(\x0e\x32\x39.google.cloud.developerconnect.v1.InstallationState.StageB\x03\xe0\x41\x03\x12\x14\n\x07message\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\naction_uri\x18\x03 \x01(\tB\x03\xe0\x41\x03\"u\n\x05Stage\x12\x15\n\x11STAGE_UNSPECIFIED\x10\x00\x12\x16\n\x12PENDING_CREATE_APP\x10\x01\x12\x16\n\x12PENDING_USER_OAUTH\x10\x02\x12\x17\n\x13PENDING_INSTALL_APP\x10\x03\x12\x0c\n\x08\x43OMPLETE\x10\n\"\xcc\x05\n\x19GenericHTTPEndpointConfig\x12t\n\x14\x62\x61sic_authentication\x18\x01 \x01(\x0b\x32O.google.cloud.developerconnect.v1.GenericHTTPEndpointConfig.BasicAuthenticationB\x03\xe0\x41\x01H\x00\x12\x81\x01\n\x1b\x62\x65\x61rer_token_authentication\x18\x02 \x01(\x0b\x32U.google.cloud.developerconnect.v1.GenericHTTPEndpointConfig.BearerTokenAuthenticationB\x03\xe0\x41\x01H\x00\x12\x18\n\x08host_uri\x18\x03 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12_\n\x18service_directory_config\x18\x04 \x01(\x0b\x32\x38.google.cloud.developerconnect.v1.ServiceDirectoryConfigB\x03\xe0\x41\x01\x12\x1f\n\x12ssl_ca_certificate\x18\x05 \x01(\tB\x03\xe0\x41\x01\x1a\x8c\x01\n\x13\x42\x61sicAuthentication\x12R\n\x17password_secret_version\x18\x02 \x01(\tB/\xfa\x41,\n*secretmanager.googleapis.com/SecretVersionH\x00\x12\x15\n\x08username\x18\x01 \x01(\tB\x03\xe0\x41\x02\x42\n\n\x08password\x1ax\n\x19\x42\x65\x61rerTokenAuthentication\x12R\n\x14token_secret_version\x18\x01 \x01(\tB2\xe0\x41\x01\xfa\x41,\n*secretmanager.googleapis.com/SecretVersionH\x00\x42\x07\n\x05tokenB\x10\n\x0e\x61uthentication\"\xe3\x02\n\x0cGitHubConfig\x12T\n\ngithub_app\x18\x01 \x01(\x0e\x32\x38.google.cloud.developerconnect.v1.GitHubConfig.GitHubAppB\x06\xe0\x41\x02\xe0\x41\x05\x12U\n\x15\x61uthorizer_credential\x18\x02 \x01(\x0b\x32\x31.google.cloud.developerconnect.v1.OAuthCredentialB\x03\xe0\x41\x01\x12 \n\x13\x61pp_installation_id\x18\x03 \x01(\x03\x42\x03\xe0\x41\x01\x12\x1d\n\x10installation_uri\x18\x04 \x01(\tB\x03\xe0\x41\x03\"e\n\tGitHubApp\x12\x1b\n\x17GIT_HUB_APP_UNSPECIFIED\x10\x00\x12\x15\n\x11\x44\x45VELOPER_CONNECT\x10\x01\x12\x0c\n\x08\x46IREBASE\x10\x02\x12\x16\n\x12GEMINI_CODE_ASSIST\x10\x03\"\x8c\x04\n\x16GitHubEnterpriseConfig\x12\x15\n\x08host_uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06\x61pp_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01\x12\x15\n\x08\x61pp_slug\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12V\n\x1aprivate_key_secret_version\x18\x04 \x01(\tB2\xe0\x41\x01\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12Y\n\x1dwebhook_secret_secret_version\x18\x05 \x01(\tB2\xe0\x41\x01\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12 \n\x13\x61pp_installation_id\x18\x08 \x01(\x03\x42\x03\xe0\x41\x01\x12\x1d\n\x10installation_uri\x18\t \x01(\tB\x03\xe0\x41\x03\x12_\n\x18service_directory_config\x18\n \x01(\x0b\x32\x38.google.cloud.developerconnect.v1.ServiceDirectoryConfigB\x03\xe0\x41\x01\x12\x1b\n\x0eserver_version\x18\x0c \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x12ssl_ca_certificate\x18\x0e \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0corganization\x18\x0f \x01(\tB\x06\xe0\x41\x01\xe0\x41\x05\"Z\n\x16ServiceDirectoryConfig\x12@\n\x07service\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'servicedirectory.googleapis.com/Service\"\x80\x01\n\x0fOAuthCredential\x12V\n\x1aoauth_token_secret_version\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12\x15\n\x08username\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\x9d\x02\n\x0cGitLabConfig\x12\\\n\x1dwebhook_secret_secret_version\x18\x01 \x01(\tB5\xe0\x41\x02\xe0\x41\x05\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12Y\n\x1aread_authorizer_credential\x18\x02 \x01(\x0b\x32\x30.google.cloud.developerconnect.v1.UserCredentialB\x03\xe0\x41\x02\x12T\n\x15\x61uthorizer_credential\x18\x03 \x01(\x0b\x32\x30.google.cloud.developerconnect.v1.UserCredentialB\x03\xe0\x41\x02\"~\n\x0eUserCredential\x12U\n\x19user_token_secret_version\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12\x15\n\x08username\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\xdd\x03\n\x16GitLabEnterpriseConfig\x12\x15\n\x08host_uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\\\n\x1dwebhook_secret_secret_version\x18\x02 \x01(\tB5\xe0\x41\x02\xe0\x41\x05\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12Y\n\x1aread_authorizer_credential\x18\x03 \x01(\x0b\x32\x30.google.cloud.developerconnect.v1.UserCredentialB\x03\xe0\x41\x02\x12T\n\x15\x61uthorizer_credential\x18\x04 \x01(\x0b\x32\x30.google.cloud.developerconnect.v1.UserCredentialB\x03\xe0\x41\x02\x12_\n\x18service_directory_config\x18\x05 \x01(\x0b\x32\x38.google.cloud.developerconnect.v1.ServiceDirectoryConfigB\x03\xe0\x41\x01\x12\x1f\n\x12ssl_ca_certificate\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0eserver_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\"\xe0\x03\n\x19\x42itbucketDataCenterConfig\x12\x15\n\x08host_uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\\\n\x1dwebhook_secret_secret_version\x18\x02 \x01(\tB5\xe0\x41\x02\xe0\x41\x05\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12Y\n\x1aread_authorizer_credential\x18\x03 \x01(\x0b\x32\x30.google.cloud.developerconnect.v1.UserCredentialB\x03\xe0\x41\x02\x12T\n\x15\x61uthorizer_credential\x18\x04 \x01(\x0b\x32\x30.google.cloud.developerconnect.v1.UserCredentialB\x03\xe0\x41\x02\x12_\n\x18service_directory_config\x18\x05 \x01(\x0b\x32\x38.google.cloud.developerconnect.v1.ServiceDirectoryConfigB\x03\xe0\x41\x01\x12\x1f\n\x12ssl_ca_certificate\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0eserver_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\"\xbd\x02\n\x14\x42itbucketCloudConfig\x12\x16\n\tworkspace\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\\\n\x1dwebhook_secret_secret_version\x18\x02 \x01(\tB5\xe0\x41\x02\xe0\x41\x05\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12Y\n\x1aread_authorizer_credential\x18\x03 \x01(\x0b\x32\x30.google.cloud.developerconnect.v1.UserCredentialB\x03\xe0\x41\x02\x12T\n\x15\x61uthorizer_credential\x18\x04 \x01(\x0b\x32\x30.google.cloud.developerconnect.v1.UserCredentialB\x03\xe0\x41\x02\"m\n!SecureSourceManagerInstanceConfig\x12H\n\x08instance\x18\x01 \x01(\tB6\xe0\x41\x02\xe0\x41\x05\xfa\x41-\n+securesourcemanager.googleapis.com/Instance\"\xb9\x01\n\x16ListConnectionsRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*developerconnect.googleapis.com/Connection\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x8a\x01\n\x17ListConnectionsResponse\x12\x41\n\x0b\x63onnections\x18\x01 \x03(\x0b\x32,.google.cloud.developerconnect.v1.Connection\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"X\n\x14GetConnectionRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*developerconnect.googleapis.com/Connection\"\xfd\x01\n\x17\x43reateConnectionRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*developerconnect.googleapis.com/Connection\x12\x1a\n\rconnection_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x45\n\nconnection\x18\x03 \x01(\x0b\x32,.google.cloud.developerconnect.v1.ConnectionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rvalidate_only\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\xef\x01\n\x17UpdateConnectionRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x45\n\nconnection\x18\x02 \x01(\x0b\x32,.google.cloud.developerconnect.v1.ConnectionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rallow_missing\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\xab\x01\n\x17\x44\x65leteConnectionRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*developerconnect.googleapis.com/Connection\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xc5\x01\n\x1cListAccountConnectorsRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30\x64\x65veloperconnect.googleapis.com/AccountConnector\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x9d\x01\n\x1dListAccountConnectorsResponse\x12N\n\x12\x61\x63\x63ount_connectors\x18\x01 \x03(\x0b\x32\x32.google.cloud.developerconnect.v1.AccountConnector\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"d\n\x1aGetAccountConnectorRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0developerconnect.googleapis.com/AccountConnector\"\x9d\x02\n\x1d\x43reateAccountConnectorRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30\x64\x65veloperconnect.googleapis.com/AccountConnector\x12!\n\x14\x61\x63\x63ount_connector_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12R\n\x11\x61\x63\x63ount_connector\x18\x03 \x01(\x0b\x32\x32.google.cloud.developerconnect.v1.AccountConnectorB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rvalidate_only\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\x82\x02\n\x1dUpdateAccountConnectorRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12R\n\x11\x61\x63\x63ount_connector\x18\x02 \x01(\x0b\x32\x32.google.cloud.developerconnect.v1.AccountConnectorB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rallow_missing\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\xcb\x01\n\x1d\x44\x65leteAccountConnectorRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0developerconnect.googleapis.com/AccountConnector\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\x9f\x01\n\x11\x44\x65leteUserRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$developerconnect.googleapis.com/User\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\"Z\n\x10\x46\x65tchSelfRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0developerconnect.googleapis.com/AccountConnector\"[\n\x11\x44\x65leteSelfRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0developerconnect.googleapis.com/AccountConnector\"n\n\x17\x46\x65tchAccessTokenRequest\x12S\n\x11\x61\x63\x63ount_connector\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0developerconnect.googleapis.com/AccountConnector\"\xb7\x01\n\x18\x46\x65tchAccessTokenResponse\x12\r\n\x05token\x18\x01 \x01(\t\x12\x33\n\x0f\x65xpiration_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0e\n\x06scopes\x18\x03 \x03(\t\x12G\n\x0e\x65xchange_error\x18\x04 \x01(\x0b\x32/.google.cloud.developerconnect.v1.ExchangeError\"h\n\x11StartOAuthRequest\x12S\n\x11\x61\x63\x63ount_connector\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0developerconnect.googleapis.com/AccountConnector\"\xe6\x01\n\x12StartOAuthResponse\x12N\n\x12system_provider_id\x18\x07 \x01(\x0e\x32\x30.google.cloud.developerconnect.v1.SystemProviderH\x00\x12\x0e\n\x06ticket\x18\x01 \x01(\t\x12\x16\n\x0e\x63ode_challenge\x18\x02 \x01(\t\x12\x1d\n\x15\x63ode_challenge_method\x18\x03 \x01(\t\x12\x11\n\tclient_id\x18\x04 \x01(\t\x12\x0e\n\x06scopes\x18\x05 \x03(\t\x12\x10\n\x08\x61uth_uri\x18\x06 \x01(\tB\x04\n\x02id\"\xc5\x03\n\x12\x46inishOAuthRequest\x12X\n\x0coauth_params\x18\x02 \x01(\x0b\x32@.google.cloud.developerconnect.v1.FinishOAuthRequest.OAuthParamsH\x00\x12\x65\n\x13google_oauth_params\x18\x03 \x01(\x0b\x32\x46.google.cloud.developerconnect.v1.FinishOAuthRequest.GoogleOAuthParamsH\x00\x12S\n\x11\x61\x63\x63ount_connector\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0developerconnect.googleapis.com/AccountConnector\x1a\x35\n\x0bOAuthParams\x12\x11\n\x04\x63ode\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06ticket\x18\x02 \x01(\tB\x03\xe0\x41\x02\x1aX\n\x11GoogleOAuthParams\x12\x13\n\x06scopes\x18\x01 \x03(\tB\x03\xe0\x41\x02\x12\x19\n\x0cversion_info\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06ticket\x18\x03 \x01(\tB\x03\xe0\x41\x02\x42\x08\n\x06params\"^\n\x13\x46inishOAuthResponse\x12G\n\x0e\x65xchange_error\x18\x01 \x01(\x0b\x32/.google.cloud.developerconnect.v1.ExchangeError\"2\n\rExchangeError\x12\x0c\n\x04\x63ode\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\"\xc4\x06\n\x11GitRepositoryLink\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x16\n\tclone_uri\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12T\n\x06labels\x18\x06 \x03(\x0b\x32?.google.cloud.developerconnect.v1.GitRepositoryLink.LabelsEntryB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0breconciling\x18\x08 \x01(\x08\x42\x03\xe0\x41\x03\x12^\n\x0b\x61nnotations\x18\t \x03(\x0b\x32\x44.google.cloud.developerconnect.v1.GitRepositoryLink.AnnotationsEntryB\x03\xe0\x41\x01\x12\x18\n\x03uid\x18\n \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x17\n\nwebhook_id\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rgit_proxy_uri\x18\x0c \x01(\tB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xcc\x01\xea\x41\xc8\x01\n1developerconnect.googleapis.com/GitRepositoryLink\x12iprojects/{project}/locations/{location}/connections/{connection}/gitRepositoryLinks/{git_repository_link}*\x12gitRepositoryLinks2\x11gitRepositoryLinkR\x01\x01\"\xa4\x02\n\x1e\x43reateGitRepositoryLinkRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\x12\x31\x64\x65veloperconnect.googleapis.com/GitRepositoryLink\x12U\n\x13git_repository_link\x18\x02 \x01(\x0b\x32\x33.google.cloud.developerconnect.v1.GitRepositoryLinkB\x03\xe0\x41\x02\x12#\n\x16git_repository_link_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rvalidate_only\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\xb9\x01\n\x1e\x44\x65leteGitRepositoryLinkRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1developerconnect.googleapis.com/GitRepositoryLink\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xc7\x01\n\x1dListGitRepositoryLinksRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\x12\x31\x64\x65veloperconnect.googleapis.com/GitRepositoryLink\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xa1\x01\n\x1eListGitRepositoryLinksResponse\x12Q\n\x14git_repository_links\x18\x01 \x03(\x0b\x32\x33.google.cloud.developerconnect.v1.GitRepositoryLink\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"f\n\x1bGetGitRepositoryLinkRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1developerconnect.googleapis.com/GitRepositoryLink\"t\n\x1a\x46\x65tchReadWriteTokenRequest\x12V\n\x13git_repository_link\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1developerconnect.googleapis.com/GitRepositoryLink\"o\n\x15\x46\x65tchReadTokenRequest\x12V\n\x13git_repository_link\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1developerconnect.googleapis.com/GitRepositoryLink\"r\n\x16\x46\x65tchReadTokenResponse\x12\r\n\x05token\x18\x01 \x01(\t\x12\x33\n\x0f\x65xpiration_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x14\n\x0cgit_username\x18\x03 \x01(\t\"w\n\x1b\x46\x65tchReadWriteTokenResponse\x12\r\n\x05token\x18\x01 \x01(\t\x12\x33\n\x0f\x65xpiration_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x14\n\x0cgit_username\x18\x03 \x01(\t\"\x9e\x01\n#FetchLinkableGitRepositoriesRequest\x12\x46\n\nconnection\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*developerconnect.googleapis.com/Connection\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x9b\x01\n$FetchLinkableGitRepositoriesResponse\x12Z\n\x19linkable_git_repositories\x18\x01 \x03(\x0b\x32\x37.google.cloud.developerconnect.v1.LinkableGitRepository\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"*\n\x15LinkableGitRepository\x12\x11\n\tclone_uri\x18\x01 \x01(\t\"i\n\x1f\x46\x65tchGitHubInstallationsRequest\x12\x46\n\nconnection\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*developerconnect.googleapis.com/Connection\"\xc2\x01\n FetchGitHubInstallationsResponse\x12\x66\n\rinstallations\x18\x01 \x03(\x0b\x32O.google.cloud.developerconnect.v1.FetchGitHubInstallationsResponse.Installation\x1a\x36\n\x0cInstallation\x12\n\n\x02id\x18\x01 \x01(\x03\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t\"\xae\x02\n\x13\x46\x65tchGitRefsRequest\x12V\n\x13git_repository_link\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1developerconnect.googleapis.com/GitRepositoryLink\x12T\n\x08ref_type\x18\x02 \x01(\x0e\x32=.google.cloud.developerconnect.v1.FetchGitRefsRequest.RefTypeB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x05 \x01(\tB\x03\xe0\x41\x01\"8\n\x07RefType\x12\x18\n\x14REF_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03TAG\x10\x01\x12\n\n\x06\x42RANCH\x10\x02\"B\n\x14\x46\x65tchGitRefsResponse\x12\x11\n\tref_names\x18\x01 \x03(\t\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x82\x06\n\x10\x41\x63\x63ountConnector\x12[\n\x15provider_oauth_config\x18\x05 \x01(\x0b\x32\x35.google.cloud.developerconnect.v1.ProviderOAuthConfigB\x03\xe0\x41\x01H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12]\n\x0b\x61nnotations\x18\x06 \x03(\x0b\x32\x43.google.cloud.developerconnect.v1.AccountConnector.AnnotationsEntryB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12S\n\x06labels\x18\x08 \x03(\x0b\x32>.google.cloud.developerconnect.v1.AccountConnector.LabelsEntryB\x03\xe0\x41\x01\x12\x1c\n\x0foauth_start_uri\x18\n \x01(\tB\x03\xe0\x41\x03\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xad\x01\xea\x41\xa9\x01\n0developerconnect.googleapis.com/AccountConnector\x12Mprojects/{project}/locations/{location}/accountConnectors/{account_connector}*\x11\x61\x63\x63ountConnectors2\x10\x61\x63\x63ountConnectorR\x01\x01\x42\x1a\n\x18\x61\x63\x63ount_connector_config\"\xc2\x02\n\x04User\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12@\n\x17last_token_request_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:\x93\x01\xea\x41\x8f\x01\n$developerconnect.googleapis.com/User\x12Zprojects/{project}/locations/{location}/accountConnectors/{account_connector}/users/{user}*\x05users2\x04user\"\x97\x01\n\x13ProviderOAuthConfig\x12V\n\x12system_provider_id\x18\x01 \x01(\x0e\x32\x30.google.cloud.developerconnect.v1.SystemProviderB\x06\xe0\x41\x05\xe0\x41\x01H\x00\x12\x13\n\x06scopes\x18\x02 \x03(\tB\x03\xe0\x41\x02\x42\x13\n\x11oauth_provider_id*\x97\x01\n\x0eSystemProvider\x12\x1f\n\x1bSYSTEM_PROVIDER_UNSPECIFIED\x10\x00\x12\n\n\x06GITHUB\x10\x01\x12\n\n\x06GITLAB\x10\x02\x12\n\n\x06GOOGLE\x10\x03\x12\n\n\x06SENTRY\x10\x04\x12\x08\n\x04ROVO\x10\x05\x12\r\n\tNEW_RELIC\x10\x06\x12\x0c\n\x08\x44\x41TASTAX\x10\x07\x12\r\n\tDYNATRACE\x10\x08\x32\xcb\x32\n\x10\x44\x65veloperConnect\x12\xc8\x01\n\x0fListConnections\x12\x38.google.cloud.developerconnect.v1.ListConnectionsRequest\x1a\x39.google.cloud.developerconnect.v1.ListConnectionsResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/connections\x12\xb5\x01\n\rGetConnection\x12\x36.google.cloud.developerconnect.v1.GetConnectionRequest\x1a,.google.cloud.developerconnect.v1.Connection\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/connections/*}\x12\xf6\x01\n\x10\x43reateConnection\x12\x39.google.cloud.developerconnect.v1.CreateConnectionRequest\x1a\x1d.google.longrunning.Operation\"\x87\x01\xca\x41\x1f\n\nConnection\x12\x11OperationMetadata\xda\x41\x1fparent,connection,connection_id\x82\xd3\xe4\x93\x02=\"//v1/{parent=projects/*/locations/*}/connections:\nconnection\x12\xf8\x01\n\x10UpdateConnection\x12\x39.google.cloud.developerconnect.v1.UpdateConnectionRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41\x1f\n\nConnection\x12\x11OperationMetadata\xda\x41\x16\x63onnection,update_mask\x82\xd3\xe4\x93\x02H2:/v1/{connection.name=projects/*/locations/*/connections/*}:\nconnection\x12\xd9\x01\n\x10\x44\x65leteConnection\x12\x39.google.cloud.developerconnect.v1.DeleteConnectionRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/connections/*}\x12\xbb\x02\n\x17\x43reateGitRepositoryLink\x12@.google.cloud.developerconnect.v1.CreateGitRepositoryLinkRequest\x1a\x1d.google.longrunning.Operation\"\xbe\x01\xca\x41&\n\x11GitRepositoryLink\x12\x11OperationMetadata\xda\x41\x31parent,git_repository_link,git_repository_link_id\x82\xd3\xe4\x93\x02[\"D/v1/{parent=projects/*/locations/*/connections/*}/gitRepositoryLinks:\x13git_repository_link\x12\xfd\x01\n\x17\x44\x65leteGitRepositoryLink\x12@.google.cloud.developerconnect.v1.DeleteGitRepositoryLinkRequest\x1a\x1d.google.longrunning.Operation\"\x80\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x46*D/v1/{name=projects/*/locations/*/connections/*/gitRepositoryLinks/*}\x12\xf2\x01\n\x16ListGitRepositoryLinks\x12?.google.cloud.developerconnect.v1.ListGitRepositoryLinksRequest\x1a@.google.cloud.developerconnect.v1.ListGitRepositoryLinksResponse\"U\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x46\x12\x44/v1/{parent=projects/*/locations/*/connections/*}/gitRepositoryLinks\x12\xdf\x01\n\x14GetGitRepositoryLink\x12=.google.cloud.developerconnect.v1.GetGitRepositoryLinkRequest\x1a\x33.google.cloud.developerconnect.v1.GitRepositoryLink\"S\xda\x41\x04name\x82\xd3\xe4\x93\x02\x46\x12\x44/v1/{name=projects/*/locations/*/connections/*/gitRepositoryLinks/*}\x12\x9d\x02\n\x13\x46\x65tchReadWriteToken\x12<.google.cloud.developerconnect.v1.FetchReadWriteTokenRequest\x1a=.google.cloud.developerconnect.v1.FetchReadWriteTokenResponse\"\x88\x01\xda\x41\x13git_repository_link\x82\xd3\xe4\x93\x02l\"g/v1/{git_repository_link=projects/*/locations/*/connections/*/gitRepositoryLinks/*}:fetchReadWriteToken:\x01*\x12\x89\x02\n\x0e\x46\x65tchReadToken\x12\x37.google.cloud.developerconnect.v1.FetchReadTokenRequest\x1a\x38.google.cloud.developerconnect.v1.FetchReadTokenResponse\"\x83\x01\xda\x41\x13git_repository_link\x82\xd3\xe4\x93\x02g\"b/v1/{git_repository_link=projects/*/locations/*/connections/*/gitRepositoryLinks/*}:fetchReadToken:\x01*\x12\x96\x02\n\x1c\x46\x65tchLinkableGitRepositories\x12\x45.google.cloud.developerconnect.v1.FetchLinkableGitRepositoriesRequest\x1a\x46.google.cloud.developerconnect.v1.FetchLinkableGitRepositoriesResponse\"g\xda\x41\nconnection\x82\xd3\xe4\x93\x02T\x12R/v1/{connection=projects/*/locations/*/connections/*}:fetchLinkableGitRepositories\x12\x86\x02\n\x18\x46\x65tchGitHubInstallations\x12\x41.google.cloud.developerconnect.v1.FetchGitHubInstallationsRequest\x1a\x42.google.cloud.developerconnect.v1.FetchGitHubInstallationsResponse\"c\xda\x41\nconnection\x82\xd3\xe4\x93\x02P\x12N/v1/{connection=projects/*/locations/*/connections/*}:fetchGitHubInstallations\x12\x87\x02\n\x0c\x46\x65tchGitRefs\x12\x35.google.cloud.developerconnect.v1.FetchGitRefsRequest\x1a\x36.google.cloud.developerconnect.v1.FetchGitRefsResponse\"\x87\x01\xda\x41\x1cgit_repository_link,ref_type\x82\xd3\xe4\x93\x02\x62\x12`/v1/{git_repository_link=projects/*/locations/*/connections/*/gitRepositoryLinks/*}:fetchGitRefs\x12\xe0\x01\n\x15ListAccountConnectors\x12>.google.cloud.developerconnect.v1.ListAccountConnectorsRequest\x1a?.google.cloud.developerconnect.v1.ListAccountConnectorsResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{parent=projects/*/locations/*}/accountConnectors\x12\xcd\x01\n\x13GetAccountConnector\x12<.google.cloud.developerconnect.v1.GetAccountConnectorRequest\x1a\x32.google.cloud.developerconnect.v1.AccountConnector\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=projects/*/locations/*/accountConnectors/*}\x12\xa3\x02\n\x16\x43reateAccountConnector\x12?.google.cloud.developerconnect.v1.CreateAccountConnectorRequest\x1a\x1d.google.longrunning.Operation\"\xa8\x01\xca\x41%\n\x10\x41\x63\x63ountConnector\x12\x11OperationMetadata\xda\x41-parent,account_connector,account_connector_id\x82\xd3\xe4\x93\x02J\"5/v1/{parent=projects/*/locations/*}/accountConnectors:\x11\x61\x63\x63ount_connector\x12\xa5\x02\n\x16UpdateAccountConnector\x12?.google.cloud.developerconnect.v1.UpdateAccountConnectorRequest\x1a\x1d.google.longrunning.Operation\"\xaa\x01\xca\x41%\n\x10\x41\x63\x63ountConnector\x12\x11OperationMetadata\xda\x41\x1d\x61\x63\x63ount_connector,update_mask\x82\xd3\xe4\x93\x02\\2G/v1/{account_connector.name=projects/*/locations/*/accountConnectors/*}:\x11\x61\x63\x63ount_connector\x12\xeb\x01\n\x16\x44\x65leteAccountConnector\x12?.google.cloud.developerconnect.v1.DeleteAccountConnectorRequest\x1a\x1d.google.longrunning.Operation\"q\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1/{name=projects/*/locations/*/accountConnectors/*}\x12\x83\x02\n\x10\x46\x65tchAccessToken\x12\x39.google.cloud.developerconnect.v1.FetchAccessTokenRequest\x1a:.google.cloud.developerconnect.v1.FetchAccessTokenResponse\"x\xda\x41\x11\x61\x63\x63ount_connector\x82\xd3\xe4\x93\x02^\"Y/v1/{account_connector=projects/*/locations/*/accountConnectors/*}/users:fetchAccessToken:\x01*\x12\xc4\x01\n\tListUsers\x12\x32.google.cloud.developerconnect.v1.ListUsersRequest\x1a\x33.google.cloud.developerconnect.v1.ListUsersResponse\"N\xda\x41\x06parent\x82\xd3\xe4\x93\x02?\x12=/v1/{parent=projects/*/locations/*/accountConnectors/*}/users\x12\xdb\x01\n\nDeleteUser\x12\x33.google.cloud.developerconnect.v1.DeleteUserRequest\x1a\x1d.google.longrunning.Operation\"y\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02?*=/v1/{name=projects/*/locations/*/accountConnectors/*/users/*}\x12\xbd\x01\n\tFetchSelf\x12\x32.google.cloud.developerconnect.v1.FetchSelfRequest\x1a&.google.cloud.developerconnect.v1.User\"T\xda\x41\x04name\x82\xd3\xe4\x93\x02G\x12\x45/v1/{name=projects/*/locations/*/accountConnectors/*}/users:fetchSelf\x12\xe5\x01\n\nDeleteSelf\x12\x33.google.cloud.developerconnect.v1.DeleteSelfRequest\x1a\x1d.google.longrunning.Operation\"\x82\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02H*F/v1/{name=projects/*/locations/*/accountConnectors/*}/users:deleteSelf\x12\xec\x01\n\nStartOAuth\x12\x33.google.cloud.developerconnect.v1.StartOAuthRequest\x1a\x34.google.cloud.developerconnect.v1.StartOAuthResponse\"s\xda\x41\x11\x61\x63\x63ount_connector\x82\xd3\xe4\x93\x02Y\x12W/v1/{account_connector=projects/*/locations/*/accountConnectors/*}/users:startOAuthFlow\x12\xf0\x01\n\x0b\x46inishOAuth\x12\x34.google.cloud.developerconnect.v1.FinishOAuthRequest\x1a\x35.google.cloud.developerconnect.v1.FinishOAuthResponse\"t\xda\x41\x11\x61\x63\x63ount_connector\x82\xd3\xe4\x93\x02Z\x12X/v1/{account_connector=projects/*/locations/*/accountConnectors/*}/users:finishOAuthFlow\x1aS\xca\x41\x1f\x64\x65veloperconnect.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xbb\x06\n$com.google.cloud.developerconnect.v1B\x15\x44\x65veloperConnectProtoP\x01ZPcloud.google.com/go/developerconnect/apiv1/developerconnectpb;developerconnectpb\xa2\x02\x10\x44\x65veloperConnect\xaa\x02 Google.Cloud.DeveloperConnect.V1\xca\x02 Google\\Cloud\\DeveloperConnect\\V1\xea\x02#Google::Cloud::DeveloperConnect::V1\xea\x41\xbf\x01\n*secretmanager.googleapis.com/SecretVersion\x12=projects/{project}/secrets/{secret}/versions/{secret_version}\x12Rprojects/{project}/locations/{location}/secrets/{secret}/versions/{secret_version}\xea\x41x\n!cloudkms.googleapis.com/CryptoKey\x12Sprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}\xea\x41|\n\'servicedirectory.googleapis.com/Service\x12Qprojects/{project}/locations/{location}/namespaces/{namespace}/services/{service}\xea\x41k\n+securesourcemanager.googleapis.com/Instance\x12.google.cloud.developerconnect.v1.ListDeploymentEventsResponse\"W\xda\x41\x06parent\x82\xd3\xe4\x93\x02H\x12\x46/v1/{parent=projects/*/locations/*/insightsConfigs/*}/deploymentEvents\x1aS\xca\x41\x1f\x64\x65veloperconnect.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xd5\x01\n$com.google.cloud.developerconnect.v1B\x13InsightsConfigProtoP\x01ZPcloud.google.com/go/developerconnect/apiv1/developerconnectpb;developerconnectpb\xaa\x02 Google.Cloud.DeveloperConnect.V1\xca\x02 Google\\Cloud\\DeveloperConnect\\V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ["google.rpc.Status", "google/rpc/status.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Developerconnect - module V1 - InsightsConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.InsightsConfig").msgclass - InsightsConfig::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.InsightsConfig.State").enummodule - Projects = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.Projects").msgclass - RuntimeConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.RuntimeConfig").msgclass - RuntimeConfig::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.RuntimeConfig.State").enummodule - GKEWorkload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.GKEWorkload").msgclass - GoogleCloudRun = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.GoogleCloudRun").msgclass - AppHubWorkload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.AppHubWorkload").msgclass - AppHubService = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.AppHubService").msgclass - ArtifactConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.ArtifactConfig").msgclass - GoogleArtifactAnalysis = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.GoogleArtifactAnalysis").msgclass - GoogleArtifactRegistry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.GoogleArtifactRegistry").msgclass - DeploymentEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.DeploymentEvent").msgclass - DeploymentEvent::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.DeploymentEvent.State").enummodule - GetDeploymentEventRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.GetDeploymentEventRequest").msgclass - ListDeploymentEventsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.ListDeploymentEventsRequest").msgclass - ListDeploymentEventsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.ListDeploymentEventsResponse").msgclass - ArtifactDeployment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.ArtifactDeployment").msgclass - CreateInsightsConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.CreateInsightsConfigRequest").msgclass - GetInsightsConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.GetInsightsConfigRequest").msgclass - ListInsightsConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.ListInsightsConfigsRequest").msgclass - ListInsightsConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.ListInsightsConfigsResponse").msgclass - DeleteInsightsConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.DeleteInsightsConfigRequest").msgclass - UpdateInsightsConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.developerconnect.v1.UpdateInsightsConfigRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service.rb b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service.rb deleted file mode 100644 index 82879d3220f4..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service.rb +++ /dev/null @@ -1,64 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/developer_connect/v1/version" - -require "google/cloud/developerconnect/v1/insights_config_service/credentials" -require "google/cloud/developerconnect/v1/insights_config_service/paths" -require "google/cloud/developerconnect/v1/insights_config_service/operations" -require "google/cloud/developerconnect/v1/insights_config_service/client" -require "google/cloud/developerconnect/v1/insights_config_service/rest" - -module Google - module Cloud - module Developerconnect - module V1 - ## - # Creates and manages InsightsConfigs. - # - # The InsightsConfig resource is the core configuration object to capture - # events from your Software Development Lifecycle. It acts as the central hub - # for managing how Developer Connect understands your application, its runtime - # environments, and the artifacts deployed within them. - # A user can create an InsightsConfig, list previously-requested - # InsightsConfigs or get InsightsConfigs by their ID to determine the status of - # the InsightsConfig. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/developerconnect/v1/insights_config_service" - # client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/developerconnect/v1/insights_config_service/rest" - # client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new - # - module InsightsConfigService - end - end - end - end -end - -helper_path = ::File.join __dir__, "insights_config_service", "helpers.rb" -require "google/cloud/developerconnect/v1/insights_config_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/client.rb b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/client.rb deleted file mode 100644 index 61660fa29322..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/client.rb +++ /dev/null @@ -1,1181 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/developerconnect/v1/insights_config_pb" -require "google/cloud/location" - -module Google - module Cloud - module Developerconnect - module V1 - module InsightsConfigService - ## - # Client for the InsightsConfigService service. - # - # Creates and manages InsightsConfigs. - # - # The InsightsConfig resource is the core configuration object to capture - # events from your Software Development Lifecycle. It acts as the central hub - # for managing how Developer Connect understands your application, its runtime - # environments, and the artifacts deployed within them. - # A user can create an InsightsConfig, list previously-requested - # InsightsConfigs or get InsightsConfigs by their ID to determine the status of - # the InsightsConfig. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "developerconnect.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :insights_config_service_stub - - ## - # Configure the InsightsConfigService Client class. - # - # See {::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all InsightsConfigService clients - # ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Developerconnect", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the InsightsConfigService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @insights_config_service_stub.universe_domain - end - - ## - # Create a new InsightsConfigService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the InsightsConfigService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/developerconnect/v1/insights_config_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @insights_config_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @insights_config_service_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @insights_config_service_stub.endpoint - config.universe_domain = @insights_config_service_stub.universe_domain - config.logger = @insights_config_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Developerconnect::V1::InsightsConfigService::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Client] - # - attr_reader :location_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @insights_config_service_stub.logger - end - - # Service calls - - ## - # Lists InsightsConfigs in a given project and location. - # - # @overload list_insights_configs(request, options = nil) - # Pass arguments to `list_insights_configs` via a request object, either of type - # {::Google::Cloud::Developerconnect::V1::ListInsightsConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Developerconnect::V1::ListInsightsConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_insights_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_insights_configs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value for ListInsightsConfigsRequest. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering results. See https://google.aip.dev/160 for more - # details. Filter string, adhering to the rules in - # https://google.aip.dev/160. List only InsightsConfigs matching the filter. - # If filter is empty, all InsightsConfigs are listed. - # @param order_by [::String] - # Optional. Hint for how to order the results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Developerconnect::V1::InsightsConfig>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Developerconnect::V1::InsightsConfig>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Developerconnect::V1::ListInsightsConfigsRequest.new - # - # # Call the list_insights_configs method. - # result = client.list_insights_configs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Developerconnect::V1::InsightsConfig. - # p item - # end - # - def list_insights_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Developerconnect::V1::ListInsightsConfigsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_insights_configs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_insights_configs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_insights_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @insights_config_service_stub.call_rpc :list_insights_configs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @insights_config_service_stub, :list_insights_configs, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new InsightsConfig in a given project and location. - # - # @overload create_insights_config(request, options = nil) - # Pass arguments to `create_insights_config` via a request object, either of type - # {::Google::Cloud::Developerconnect::V1::CreateInsightsConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Developerconnect::V1::CreateInsightsConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_insights_config(parent: nil, insights_config_id: nil, insights_config: nil, validate_only: nil) - # Pass arguments to `create_insights_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Value for parent. - # @param insights_config_id [::String] - # Required. ID of the requesting InsightsConfig. - # @param insights_config [::Google::Cloud::Developerconnect::V1::InsightsConfig, ::Hash] - # Required. The resource being created. - # @param validate_only [::Boolean] - # Optional. If set, validate the request, but do not actually post it. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Developerconnect::V1::CreateInsightsConfigRequest.new - # - # # Call the create_insights_config method. - # result = client.create_insights_config request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_insights_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Developerconnect::V1::CreateInsightsConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_insights_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_insights_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_insights_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @insights_config_service_stub.call_rpc :create_insights_config, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single Insight. - # - # @overload get_insights_config(request, options = nil) - # Pass arguments to `get_insights_config` via a request object, either of type - # {::Google::Cloud::Developerconnect::V1::GetInsightsConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Developerconnect::V1::GetInsightsConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_insights_config(name: nil) - # Pass arguments to `get_insights_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Developerconnect::V1::InsightsConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Developerconnect::V1::InsightsConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Developerconnect::V1::GetInsightsConfigRequest.new - # - # # Call the get_insights_config method. - # result = client.get_insights_config request - # - # # The returned object is of type Google::Cloud::Developerconnect::V1::InsightsConfig. - # p result - # - def get_insights_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Developerconnect::V1::GetInsightsConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_insights_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_insights_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_insights_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @insights_config_service_stub.call_rpc :get_insights_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of a single InsightsConfig. - # - # @overload update_insights_config(request, options = nil) - # Pass arguments to `update_insights_config` via a request object, either of type - # {::Google::Cloud::Developerconnect::V1::UpdateInsightsConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Developerconnect::V1::UpdateInsightsConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_insights_config(insights_config: nil, request_id: nil, allow_missing: nil, validate_only: nil) - # Pass arguments to `update_insights_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param insights_config [::Google::Cloud::Developerconnect::V1::InsightsConfig, ::Hash] - # Required. The resource being updated. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @param allow_missing [::Boolean] - # Optional. If set to true, and the insightsConfig is not found a new - # insightsConfig will be created. In this situation `update_mask` is ignored. - # The creation will succeed only if the input insightsConfig has all the - # necessary information (e.g a github_config with both user_oauth_token and - # installation_id properties). - # @param validate_only [::Boolean] - # Optional. If set, validate the request, but do not actually post it. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Developerconnect::V1::UpdateInsightsConfigRequest.new - # - # # Call the update_insights_config method. - # result = client.update_insights_config request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_insights_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Developerconnect::V1::UpdateInsightsConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_insights_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.insights_config&.name - header_params["insights_config.name"] = request.insights_config.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_insights_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_insights_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @insights_config_service_stub.call_rpc :update_insights_config, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single Insight. - # - # @overload delete_insights_config(request, options = nil) - # Pass arguments to `delete_insights_config` via a request object, either of type - # {::Google::Cloud::Developerconnect::V1::DeleteInsightsConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Developerconnect::V1::DeleteInsightsConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_insights_config(name: nil, request_id: nil, validate_only: nil, etag: nil) - # Pass arguments to `delete_insights_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Value for parent. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @param validate_only [::Boolean] - # Optional. If set, validate the request, but do not actually post it. - # @param etag [::String] - # Optional. This checksum is computed by the server based on the value of - # other fields, and may be sent on update and delete requests to ensure the - # client has an up-to-date value before proceeding. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Developerconnect::V1::DeleteInsightsConfigRequest.new - # - # # Call the delete_insights_config method. - # result = client.delete_insights_config request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_insights_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Developerconnect::V1::DeleteInsightsConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_insights_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_insights_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_insights_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @insights_config_service_stub.call_rpc :delete_insights_config, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a single Deployment Event. - # - # @overload get_deployment_event(request, options = nil) - # Pass arguments to `get_deployment_event` via a request object, either of type - # {::Google::Cloud::Developerconnect::V1::GetDeploymentEventRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Developerconnect::V1::GetDeploymentEventRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_deployment_event(name: nil) - # Pass arguments to `get_deployment_event` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the deployment event to retrieve. - # Format: - # projects/\\{project}/locations/\\{location}/insightsConfigs/\\{insights_config}/deploymentEvents/\\{uuid} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Developerconnect::V1::DeploymentEvent] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Developerconnect::V1::DeploymentEvent] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Developerconnect::V1::GetDeploymentEventRequest.new - # - # # Call the get_deployment_event method. - # result = client.get_deployment_event request - # - # # The returned object is of type Google::Cloud::Developerconnect::V1::DeploymentEvent. - # p result - # - def get_deployment_event request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Developerconnect::V1::GetDeploymentEventRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_deployment_event.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_deployment_event.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_deployment_event.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @insights_config_service_stub.call_rpc :get_deployment_event, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists Deployment Events in a given insights config. - # - # @overload list_deployment_events(request, options = nil) - # Pass arguments to `list_deployment_events` via a request object, either of type - # {::Google::Cloud::Developerconnect::V1::ListDeploymentEventsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Developerconnect::V1::ListDeploymentEventsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_deployment_events(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_deployment_events` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent insights config that owns this collection of - # deployment events. Format: - # projects/\\{project}/locations/\\{location}/insightsConfigs/\\{insights_config} - # @param page_size [::Integer] - # Optional. The maximum number of deployment events to return. The service - # may return fewer than this value. If unspecified, at most 50 deployment - # events will be returned. The maximum value is 1000; values above 1000 will - # be coerced to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListDeploymentEvents` - # call. Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListDeploymentEvents` - # must match the call that provided the page token. - # @param filter [::String] - # Optional. Filter expression that matches a subset of the DeploymentEvents. - # https://google.aip.dev/160. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Developerconnect::V1::DeploymentEvent>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Developerconnect::V1::DeploymentEvent>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Developerconnect::V1::ListDeploymentEventsRequest.new - # - # # Call the list_deployment_events method. - # result = client.list_deployment_events request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Developerconnect::V1::DeploymentEvent. - # p item - # end - # - def list_deployment_events request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Developerconnect::V1::ListDeploymentEventsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_deployment_events.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_deployment_events.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_deployment_events.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @insights_config_service_stub.call_rpc :list_deployment_events, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @insights_config_service_stub, :list_deployment_events, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the InsightsConfigService API. - # - # This class represents the configuration for InsightsConfigService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_insights_configs to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_insights_configs.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_insights_configs.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "developerconnect.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the InsightsConfigService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_insights_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_insights_configs - ## - # RPC-specific configuration for `create_insights_config` - # @return [::Gapic::Config::Method] - # - attr_reader :create_insights_config - ## - # RPC-specific configuration for `get_insights_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_insights_config - ## - # RPC-specific configuration for `update_insights_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_insights_config - ## - # RPC-specific configuration for `delete_insights_config` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_insights_config - ## - # RPC-specific configuration for `get_deployment_event` - # @return [::Gapic::Config::Method] - # - attr_reader :get_deployment_event - ## - # RPC-specific configuration for `list_deployment_events` - # @return [::Gapic::Config::Method] - # - attr_reader :list_deployment_events - - # @private - def initialize parent_rpcs = nil - list_insights_configs_config = parent_rpcs.list_insights_configs if parent_rpcs.respond_to? :list_insights_configs - @list_insights_configs = ::Gapic::Config::Method.new list_insights_configs_config - create_insights_config_config = parent_rpcs.create_insights_config if parent_rpcs.respond_to? :create_insights_config - @create_insights_config = ::Gapic::Config::Method.new create_insights_config_config - get_insights_config_config = parent_rpcs.get_insights_config if parent_rpcs.respond_to? :get_insights_config - @get_insights_config = ::Gapic::Config::Method.new get_insights_config_config - update_insights_config_config = parent_rpcs.update_insights_config if parent_rpcs.respond_to? :update_insights_config - @update_insights_config = ::Gapic::Config::Method.new update_insights_config_config - delete_insights_config_config = parent_rpcs.delete_insights_config if parent_rpcs.respond_to? :delete_insights_config - @delete_insights_config = ::Gapic::Config::Method.new delete_insights_config_config - get_deployment_event_config = parent_rpcs.get_deployment_event if parent_rpcs.respond_to? :get_deployment_event - @get_deployment_event = ::Gapic::Config::Method.new get_deployment_event_config - list_deployment_events_config = parent_rpcs.list_deployment_events if parent_rpcs.respond_to? :list_deployment_events - @list_deployment_events = ::Gapic::Config::Method.new list_deployment_events_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/credentials.rb b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/credentials.rb deleted file mode 100644 index 04f7a7e5641b..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module Developerconnect - module V1 - module InsightsConfigService - # Credentials for the InsightsConfigService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/operations.rb b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/operations.rb deleted file mode 100644 index bfdc0e88afbf..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/operations.rb +++ /dev/null @@ -1,841 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module Developerconnect - module V1 - module InsightsConfigService - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "developerconnect.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the InsightsConfigService Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the InsightsConfigService Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/longrunning/operations_services_pb" - - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = ::Gapic::ServiceStub.new( - ::Google::Longrunning::Operations::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| - wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } - response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Waits until the specified long-running operation is done or reaches at most - # a specified timeout, returning the latest state. If the operation is - # already done, the latest state is immediately returned. If the timeout - # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - # timeout is used. If the server does not support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # Note that this method is on a best-effort basis. It may return the latest - # state before the specified timeout (including immediately), meaning even an - # immediate response is no guarantee that the operation is done. - # - # @overload wait_operation(request, options = nil) - # Pass arguments to `wait_operation` via a request object, either of type - # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload wait_operation(name: nil, timeout: nil) - # Pass arguments to `wait_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to wait on. - # @param timeout [::Google::Protobuf::Duration, ::Hash] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::WaitOperationRequest.new - # - # # Call the wait_operation method. - # result = client.wait_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def wait_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.wait_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "developerconnect.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/paths.rb b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/paths.rb deleted file mode 100644 index a33ff3f047f6..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/paths.rb +++ /dev/null @@ -1,90 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Developerconnect - module V1 - module InsightsConfigService - # Path helper methods for the InsightsConfigService API. - module Paths - ## - # Create a fully-qualified DeploymentEvent resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/insightsConfigs/{insights_config}/deploymentEvents/{deployment_event}` - # - # @param project [String] - # @param location [String] - # @param insights_config [String] - # @param deployment_event [String] - # - # @return [::String] - def deployment_event_path project:, location:, insights_config:, deployment_event: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "insights_config cannot contain /" if insights_config.to_s.include? "/" - - "projects/#{project}/locations/#{location}/insightsConfigs/#{insights_config}/deploymentEvents/#{deployment_event}" - end - - ## - # Create a fully-qualified InsightsConfig resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/insightsConfigs/{insights_config}` - # - # @param project [String] - # @param location [String] - # @param insights_config [String] - # - # @return [::String] - def insights_config_path project:, location:, insights_config: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/insightsConfigs/#{insights_config}" - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/rest.rb b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/rest.rb deleted file mode 100644 index e98d3287620a..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/rest.rb +++ /dev/null @@ -1,62 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/developer_connect/v1/version" -require "google/cloud/developer_connect/v1/bindings_override" - -require "google/cloud/developerconnect/v1/insights_config_service/credentials" -require "google/cloud/developerconnect/v1/insights_config_service/paths" -require "google/cloud/developerconnect/v1/insights_config_service/rest/operations" -require "google/cloud/developerconnect/v1/insights_config_service/rest/client" - -module Google - module Cloud - module Developerconnect - module V1 - ## - # Creates and manages InsightsConfigs. - # - # The InsightsConfig resource is the core configuration object to capture - # events from your Software Development Lifecycle. It acts as the central hub - # for managing how Developer Connect understands your application, its runtime - # environments, and the artifacts deployed within them. - # A user can create an InsightsConfig, list previously-requested - # InsightsConfigs or get InsightsConfigs by their ID to determine the status of - # the InsightsConfig. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/developerconnect/v1/insights_config_service/rest" - # client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new - # - module InsightsConfigService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/developerconnect/v1/insights_config_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/rest/client.rb b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/rest/client.rb deleted file mode 100644 index bd791d832047..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/rest/client.rb +++ /dev/null @@ -1,1097 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/developerconnect/v1/insights_config_pb" -require "google/cloud/developerconnect/v1/insights_config_service/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Cloud - module Developerconnect - module V1 - module InsightsConfigService - module Rest - ## - # REST client for the InsightsConfigService service. - # - # Creates and manages InsightsConfigs. - # - # The InsightsConfig resource is the core configuration object to capture - # events from your Software Development Lifecycle. It acts as the central hub - # for managing how Developer Connect understands your application, its runtime - # environments, and the artifacts deployed within them. - # A user can create an InsightsConfig, list previously-requested - # InsightsConfigs or get InsightsConfigs by their ID to determine the status of - # the InsightsConfig. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "developerconnect.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :insights_config_service_stub - - ## - # Configure the InsightsConfigService Client class. - # - # See {::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all InsightsConfigService clients - # ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Developerconnect", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the InsightsConfigService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @insights_config_service_stub.universe_domain - end - - ## - # Create a new InsightsConfigService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the InsightsConfigService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @insights_config_service_stub = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @insights_config_service_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @insights_config_service_stub.endpoint - config.universe_domain = @insights_config_service_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @insights_config_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Rest::Client] - # - attr_reader :location_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @insights_config_service_stub.logger - end - - # Service calls - - ## - # Lists InsightsConfigs in a given project and location. - # - # @overload list_insights_configs(request, options = nil) - # Pass arguments to `list_insights_configs` via a request object, either of type - # {::Google::Cloud::Developerconnect::V1::ListInsightsConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Developerconnect::V1::ListInsightsConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_insights_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_insights_configs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value for ListInsightsConfigsRequest. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering results. See https://google.aip.dev/160 for more - # details. Filter string, adhering to the rules in - # https://google.aip.dev/160. List only InsightsConfigs matching the filter. - # If filter is empty, all InsightsConfigs are listed. - # @param order_by [::String] - # Optional. Hint for how to order the results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Developerconnect::V1::InsightsConfig>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Developerconnect::V1::InsightsConfig>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Developerconnect::V1::ListInsightsConfigsRequest.new - # - # # Call the list_insights_configs method. - # result = client.list_insights_configs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Developerconnect::V1::InsightsConfig. - # p item - # end - # - def list_insights_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Developerconnect::V1::ListInsightsConfigsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_insights_configs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_insights_configs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_insights_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @insights_config_service_stub.list_insights_configs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @insights_config_service_stub, :list_insights_configs, "insights_configs", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new InsightsConfig in a given project and location. - # - # @overload create_insights_config(request, options = nil) - # Pass arguments to `create_insights_config` via a request object, either of type - # {::Google::Cloud::Developerconnect::V1::CreateInsightsConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Developerconnect::V1::CreateInsightsConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_insights_config(parent: nil, insights_config_id: nil, insights_config: nil, validate_only: nil) - # Pass arguments to `create_insights_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Value for parent. - # @param insights_config_id [::String] - # Required. ID of the requesting InsightsConfig. - # @param insights_config [::Google::Cloud::Developerconnect::V1::InsightsConfig, ::Hash] - # Required. The resource being created. - # @param validate_only [::Boolean] - # Optional. If set, validate the request, but do not actually post it. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Developerconnect::V1::CreateInsightsConfigRequest.new - # - # # Call the create_insights_config method. - # result = client.create_insights_config request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_insights_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Developerconnect::V1::CreateInsightsConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_insights_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_insights_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_insights_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @insights_config_service_stub.create_insights_config request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single Insight. - # - # @overload get_insights_config(request, options = nil) - # Pass arguments to `get_insights_config` via a request object, either of type - # {::Google::Cloud::Developerconnect::V1::GetInsightsConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Developerconnect::V1::GetInsightsConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_insights_config(name: nil) - # Pass arguments to `get_insights_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Developerconnect::V1::InsightsConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Developerconnect::V1::InsightsConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Developerconnect::V1::GetInsightsConfigRequest.new - # - # # Call the get_insights_config method. - # result = client.get_insights_config request - # - # # The returned object is of type Google::Cloud::Developerconnect::V1::InsightsConfig. - # p result - # - def get_insights_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Developerconnect::V1::GetInsightsConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_insights_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_insights_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_insights_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @insights_config_service_stub.get_insights_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of a single InsightsConfig. - # - # @overload update_insights_config(request, options = nil) - # Pass arguments to `update_insights_config` via a request object, either of type - # {::Google::Cloud::Developerconnect::V1::UpdateInsightsConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Developerconnect::V1::UpdateInsightsConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_insights_config(insights_config: nil, request_id: nil, allow_missing: nil, validate_only: nil) - # Pass arguments to `update_insights_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param insights_config [::Google::Cloud::Developerconnect::V1::InsightsConfig, ::Hash] - # Required. The resource being updated. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @param allow_missing [::Boolean] - # Optional. If set to true, and the insightsConfig is not found a new - # insightsConfig will be created. In this situation `update_mask` is ignored. - # The creation will succeed only if the input insightsConfig has all the - # necessary information (e.g a github_config with both user_oauth_token and - # installation_id properties). - # @param validate_only [::Boolean] - # Optional. If set, validate the request, but do not actually post it. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Developerconnect::V1::UpdateInsightsConfigRequest.new - # - # # Call the update_insights_config method. - # result = client.update_insights_config request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_insights_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Developerconnect::V1::UpdateInsightsConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_insights_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_insights_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_insights_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @insights_config_service_stub.update_insights_config request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single Insight. - # - # @overload delete_insights_config(request, options = nil) - # Pass arguments to `delete_insights_config` via a request object, either of type - # {::Google::Cloud::Developerconnect::V1::DeleteInsightsConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Developerconnect::V1::DeleteInsightsConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_insights_config(name: nil, request_id: nil, validate_only: nil, etag: nil) - # Pass arguments to `delete_insights_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Value for parent. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @param validate_only [::Boolean] - # Optional. If set, validate the request, but do not actually post it. - # @param etag [::String] - # Optional. This checksum is computed by the server based on the value of - # other fields, and may be sent on update and delete requests to ensure the - # client has an up-to-date value before proceeding. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Developerconnect::V1::DeleteInsightsConfigRequest.new - # - # # Call the delete_insights_config method. - # result = client.delete_insights_config request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_insights_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Developerconnect::V1::DeleteInsightsConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_insights_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_insights_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_insights_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @insights_config_service_stub.delete_insights_config request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a single Deployment Event. - # - # @overload get_deployment_event(request, options = nil) - # Pass arguments to `get_deployment_event` via a request object, either of type - # {::Google::Cloud::Developerconnect::V1::GetDeploymentEventRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Developerconnect::V1::GetDeploymentEventRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_deployment_event(name: nil) - # Pass arguments to `get_deployment_event` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the deployment event to retrieve. - # Format: - # projects/\\{project}/locations/\\{location}/insightsConfigs/\\{insights_config}/deploymentEvents/\\{uuid} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Developerconnect::V1::DeploymentEvent] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Developerconnect::V1::DeploymentEvent] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Developerconnect::V1::GetDeploymentEventRequest.new - # - # # Call the get_deployment_event method. - # result = client.get_deployment_event request - # - # # The returned object is of type Google::Cloud::Developerconnect::V1::DeploymentEvent. - # p result - # - def get_deployment_event request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Developerconnect::V1::GetDeploymentEventRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_deployment_event.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_deployment_event.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_deployment_event.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @insights_config_service_stub.get_deployment_event request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists Deployment Events in a given insights config. - # - # @overload list_deployment_events(request, options = nil) - # Pass arguments to `list_deployment_events` via a request object, either of type - # {::Google::Cloud::Developerconnect::V1::ListDeploymentEventsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Developerconnect::V1::ListDeploymentEventsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_deployment_events(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_deployment_events` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent insights config that owns this collection of - # deployment events. Format: - # projects/\\{project}/locations/\\{location}/insightsConfigs/\\{insights_config} - # @param page_size [::Integer] - # Optional. The maximum number of deployment events to return. The service - # may return fewer than this value. If unspecified, at most 50 deployment - # events will be returned. The maximum value is 1000; values above 1000 will - # be coerced to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListDeploymentEvents` - # call. Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListDeploymentEvents` - # must match the call that provided the page token. - # @param filter [::String] - # Optional. Filter expression that matches a subset of the DeploymentEvents. - # https://google.aip.dev/160. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Developerconnect::V1::DeploymentEvent>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Developerconnect::V1::DeploymentEvent>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/developer_connect/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Developerconnect::V1::ListDeploymentEventsRequest.new - # - # # Call the list_deployment_events method. - # result = client.list_deployment_events request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Developerconnect::V1::DeploymentEvent. - # p item - # end - # - def list_deployment_events request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Developerconnect::V1::ListDeploymentEventsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_deployment_events.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_deployment_events.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_deployment_events.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @insights_config_service_stub.list_deployment_events request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @insights_config_service_stub, :list_deployment_events, "deployment_events", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the InsightsConfigService REST API. - # - # This class represents the configuration for InsightsConfigService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_insights_configs to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_insights_configs.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_insights_configs.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "developerconnect.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - # Overrides for http bindings for the RPCs of this service - # are only used when this service is used as mixin, and only - # by the host service. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the InsightsConfigService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_insights_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_insights_configs - ## - # RPC-specific configuration for `create_insights_config` - # @return [::Gapic::Config::Method] - # - attr_reader :create_insights_config - ## - # RPC-specific configuration for `get_insights_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_insights_config - ## - # RPC-specific configuration for `update_insights_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_insights_config - ## - # RPC-specific configuration for `delete_insights_config` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_insights_config - ## - # RPC-specific configuration for `get_deployment_event` - # @return [::Gapic::Config::Method] - # - attr_reader :get_deployment_event - ## - # RPC-specific configuration for `list_deployment_events` - # @return [::Gapic::Config::Method] - # - attr_reader :list_deployment_events - - # @private - def initialize parent_rpcs = nil - list_insights_configs_config = parent_rpcs.list_insights_configs if parent_rpcs.respond_to? :list_insights_configs - @list_insights_configs = ::Gapic::Config::Method.new list_insights_configs_config - create_insights_config_config = parent_rpcs.create_insights_config if parent_rpcs.respond_to? :create_insights_config - @create_insights_config = ::Gapic::Config::Method.new create_insights_config_config - get_insights_config_config = parent_rpcs.get_insights_config if parent_rpcs.respond_to? :get_insights_config - @get_insights_config = ::Gapic::Config::Method.new get_insights_config_config - update_insights_config_config = parent_rpcs.update_insights_config if parent_rpcs.respond_to? :update_insights_config - @update_insights_config = ::Gapic::Config::Method.new update_insights_config_config - delete_insights_config_config = parent_rpcs.delete_insights_config if parent_rpcs.respond_to? :delete_insights_config - @delete_insights_config = ::Gapic::Config::Method.new delete_insights_config_config - get_deployment_event_config = parent_rpcs.get_deployment_event if parent_rpcs.respond_to? :get_deployment_event - @get_deployment_event = ::Gapic::Config::Method.new get_deployment_event_config - list_deployment_events_config = parent_rpcs.list_deployment_events if parent_rpcs.respond_to? :list_deployment_events - @list_deployment_events = ::Gapic::Config::Method.new list_deployment_events_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/rest/operations.rb b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/rest/operations.rb deleted file mode 100644 index 13a697ed01c8..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/rest/operations.rb +++ /dev/null @@ -1,925 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module Developerconnect - module V1 - module InsightsConfigService - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "developerconnect.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the InsightsConfigService Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the InsightsConfigService Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = OperationsServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.list_operations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.get_operation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.delete_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "developerconnect.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}/operations", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/rest/service_stub.rb deleted file mode 100644 index f6b887c99270..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_service/rest/service_stub.rb +++ /dev/null @@ -1,510 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/developerconnect/v1/insights_config_pb" - -module Google - module Cloud - module Developerconnect - module V1 - module InsightsConfigService - module Rest - ## - # REST service stub for the InsightsConfigService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the list_insights_configs REST call - # - # @param request_pb [::Google::Cloud::Developerconnect::V1::ListInsightsConfigsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Developerconnect::V1::ListInsightsConfigsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Developerconnect::V1::ListInsightsConfigsResponse] - # A result object deserialized from the server's reply - def list_insights_configs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_insights_configs_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_insights_configs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Developerconnect::V1::ListInsightsConfigsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_insights_config REST call - # - # @param request_pb [::Google::Cloud::Developerconnect::V1::CreateInsightsConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_insights_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_insights_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_insights_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_insights_config REST call - # - # @param request_pb [::Google::Cloud::Developerconnect::V1::GetInsightsConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Developerconnect::V1::InsightsConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Developerconnect::V1::InsightsConfig] - # A result object deserialized from the server's reply - def get_insights_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_insights_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_insights_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Developerconnect::V1::InsightsConfig.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_insights_config REST call - # - # @param request_pb [::Google::Cloud::Developerconnect::V1::UpdateInsightsConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_insights_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_insights_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_insights_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_insights_config REST call - # - # @param request_pb [::Google::Cloud::Developerconnect::V1::DeleteInsightsConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_insights_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_insights_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_insights_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_deployment_event REST call - # - # @param request_pb [::Google::Cloud::Developerconnect::V1::GetDeploymentEventRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Developerconnect::V1::DeploymentEvent] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Developerconnect::V1::DeploymentEvent] - # A result object deserialized from the server's reply - def get_deployment_event request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_deployment_event_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_deployment_event", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Developerconnect::V1::DeploymentEvent.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_deployment_events REST call - # - # @param request_pb [::Google::Cloud::Developerconnect::V1::ListDeploymentEventsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Developerconnect::V1::ListDeploymentEventsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Developerconnect::V1::ListDeploymentEventsResponse] - # A result object deserialized from the server's reply - def list_deployment_events request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_deployment_events_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_deployment_events", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Developerconnect::V1::ListDeploymentEventsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_insights_configs REST call - # - # @param request_pb [::Google::Cloud::Developerconnect::V1::ListInsightsConfigsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_insights_configs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/insightsConfigs", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_insights_config REST call - # - # @param request_pb [::Google::Cloud::Developerconnect::V1::CreateInsightsConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_insights_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/insightsConfigs", - body: "insights_config", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_insights_config REST call - # - # @param request_pb [::Google::Cloud::Developerconnect::V1::GetInsightsConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_insights_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/insightsConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_insights_config REST call - # - # @param request_pb [::Google::Cloud::Developerconnect::V1::UpdateInsightsConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_insights_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{insights_config.name}", - body: "insights_config", - matches: [ - ["insights_config.name", %r{^projects/[^/]+/locations/[^/]+/insightsConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_insights_config REST call - # - # @param request_pb [::Google::Cloud::Developerconnect::V1::DeleteInsightsConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_insights_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/insightsConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_deployment_event REST call - # - # @param request_pb [::Google::Cloud::Developerconnect::V1::GetDeploymentEventRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_deployment_event_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/insightsConfigs/[^/]+/deploymentEvents/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_deployment_events REST call - # - # @param request_pb [::Google::Cloud::Developerconnect::V1::ListDeploymentEventsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_deployment_events_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/deploymentEvents", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/insightsConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_services_pb.rb b/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_services_pb.rb deleted file mode 100644 index 16f8f41a3eb8..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/lib/google/cloud/developerconnect/v1/insights_config_services_pb.rb +++ /dev/null @@ -1,65 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/developerconnect/v1/insights_config.proto for package 'google.cloud.developerconnect.v1' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/cloud/developerconnect/v1/insights_config_pb' - -module Google - module Cloud - module Developerconnect - module V1 - module InsightsConfigService - # Creates and manages InsightsConfigs. - # - # The InsightsConfig resource is the core configuration object to capture - # events from your Software Development Lifecycle. It acts as the central hub - # for managing how Developer Connect understands your application, its runtime - # environments, and the artifacts deployed within them. - # A user can create an InsightsConfig, list previously-requested - # InsightsConfigs or get InsightsConfigs by their ID to determine the status of - # the InsightsConfig. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.developerconnect.v1.InsightsConfigService' - - # Lists InsightsConfigs in a given project and location. - rpc :ListInsightsConfigs, ::Google::Cloud::Developerconnect::V1::ListInsightsConfigsRequest, ::Google::Cloud::Developerconnect::V1::ListInsightsConfigsResponse - # Creates a new InsightsConfig in a given project and location. - rpc :CreateInsightsConfig, ::Google::Cloud::Developerconnect::V1::CreateInsightsConfigRequest, ::Google::Longrunning::Operation - # Gets details of a single Insight. - rpc :GetInsightsConfig, ::Google::Cloud::Developerconnect::V1::GetInsightsConfigRequest, ::Google::Cloud::Developerconnect::V1::InsightsConfig - # Updates the parameters of a single InsightsConfig. - rpc :UpdateInsightsConfig, ::Google::Cloud::Developerconnect::V1::UpdateInsightsConfigRequest, ::Google::Longrunning::Operation - # Deletes a single Insight. - rpc :DeleteInsightsConfig, ::Google::Cloud::Developerconnect::V1::DeleteInsightsConfigRequest, ::Google::Longrunning::Operation - # Gets a single Deployment Event. - rpc :GetDeploymentEvent, ::Google::Cloud::Developerconnect::V1::GetDeploymentEventRequest, ::Google::Cloud::Developerconnect::V1::DeploymentEvent - # Lists Deployment Events in a given insights config. - rpc :ListDeploymentEvents, ::Google::Cloud::Developerconnect::V1::ListDeploymentEventsRequest, ::Google::Cloud::Developerconnect::V1::ListDeploymentEventsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/README.md deleted file mode 100644 index 2ccd82ba661b..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Developer Connect V1 Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/api/client.rb deleted file mode 100644 index d59ba51a5612..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,473 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - end -end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/api/field_info.rb b/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/api/field_info.rb deleted file mode 100644 index 0f5acf0a5538..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/api/field_info.rb +++ /dev/null @@ -1,88 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Rich semantic information of an API field beyond basic typing. - # @!attribute [rw] format - # @return [::Google::Api::FieldInfo::Format] - # The standard format of a field value. This does not explicitly configure - # any API consumer, just documents the API's format for the field it is - # applied to. - # @!attribute [rw] referenced_types - # @return [::Array<::Google::Api::TypeReference>] - # The type(s) that the annotated, generic field may represent. - # - # Currently, this must only be used on fields of type `google.protobuf.Any`. - # Supporting other generic types may be considered in the future. - class FieldInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The standard format of a field value. The supported formats are all backed - # by either an RFC defined by the IETF or a Google-defined AIP. - module Format - # Default, unspecified value. - FORMAT_UNSPECIFIED = 0 - - # Universally Unique Identifier, version 4, value as defined by - # https://datatracker.ietf.org/doc/html/rfc4122. The value may be - # normalized to entirely lowercase letters. For example, the value - # `F47AC10B-58CC-0372-8567-0E02B2C3D479` would be normalized to - # `f47ac10b-58cc-0372-8567-0e02b2c3d479`. - UUID4 = 1 - - # Internet Protocol v4 value as defined by [RFC - # 791](https://datatracker.ietf.org/doc/html/rfc791). The value may be - # condensed, with leading zeros in each octet stripped. For example, - # `001.022.233.040` would be condensed to `1.22.233.40`. - IPV4 = 2 - - # Internet Protocol v6 value as defined by [RFC - # 2460](https://datatracker.ietf.org/doc/html/rfc2460). The value may be - # normalized to entirely lowercase letters with zeros compressed, following - # [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952). For example, - # the value `2001:0DB8:0::0` would be normalized to `2001:db8::`. - IPV6 = 3 - - # An IP address in either v4 or v6 format as described by the individual - # values defined herein. See the comments on the IPV4 and IPV6 types for - # allowed normalizations of each. - IPV4_OR_IPV6 = 4 - end - end - - # A reference to a message type, for use in {::Google::Api::FieldInfo FieldInfo}. - # @!attribute [rw] type_name - # @return [::String] - # The name of the type that the annotated, generic field may represent. - # If the type is in the same protobuf package, the value can be the simple - # message name e.g., `"MyMessage"`. Otherwise, the value must be the - # fully-qualified message name e.g., `"google.library.v1.Book"`. - # - # If the type(s) are unknown to the service (e.g. the field accepts generic - # user input), use the wildcard `"*"` to denote this behavior. - # - # See [AIP-202](https://google.aip.dev/202#type-references) for more details. - class TypeReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/cloud/developerconnect/v1/developer_connect.rb b/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/cloud/developerconnect/v1/developer_connect.rb deleted file mode 100644 index 014efd1d2357..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/cloud/developerconnect/v1/developer_connect.rb +++ /dev/null @@ -1,1581 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module DeveloperConnect - module V1 - # Message for requesting a list of Users - # @!attribute [rw] parent - # @return [::String] - # Required. Parent value for ListUsersRequest - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results the server should return. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filtering results - # @!attribute [rw] order_by - # @return [::String] - # Optional. Hint for how to order the results - class ListUsersRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for response to listing Users - # @!attribute [rw] users - # @return [::Array<::Google::Cloud::DeveloperConnect::V1::User>] - # The list of Users - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results the server should return. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListUsersResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message describing Connection object - # @!attribute [rw] github_config - # @return [::Google::Cloud::DeveloperConnect::V1::GitHubConfig] - # Configuration for connections to github.com. - # - # Note: The following fields are mutually exclusive: `github_config`, `github_enterprise_config`, `gitlab_config`, `gitlab_enterprise_config`, `bitbucket_data_center_config`, `bitbucket_cloud_config`, `secure_source_manager_instance_config`, `http_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] github_enterprise_config - # @return [::Google::Cloud::DeveloperConnect::V1::GitHubEnterpriseConfig] - # Configuration for connections to an instance of GitHub Enterprise. - # - # Note: The following fields are mutually exclusive: `github_enterprise_config`, `github_config`, `gitlab_config`, `gitlab_enterprise_config`, `bitbucket_data_center_config`, `bitbucket_cloud_config`, `secure_source_manager_instance_config`, `http_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] gitlab_config - # @return [::Google::Cloud::DeveloperConnect::V1::GitLabConfig] - # Configuration for connections to gitlab.com. - # - # Note: The following fields are mutually exclusive: `gitlab_config`, `github_config`, `github_enterprise_config`, `gitlab_enterprise_config`, `bitbucket_data_center_config`, `bitbucket_cloud_config`, `secure_source_manager_instance_config`, `http_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] gitlab_enterprise_config - # @return [::Google::Cloud::DeveloperConnect::V1::GitLabEnterpriseConfig] - # Configuration for connections to an instance of GitLab Enterprise. - # - # Note: The following fields are mutually exclusive: `gitlab_enterprise_config`, `github_config`, `github_enterprise_config`, `gitlab_config`, `bitbucket_data_center_config`, `bitbucket_cloud_config`, `secure_source_manager_instance_config`, `http_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bitbucket_data_center_config - # @return [::Google::Cloud::DeveloperConnect::V1::BitbucketDataCenterConfig] - # Configuration for connections to an instance of Bitbucket Data Center. - # - # Note: The following fields are mutually exclusive: `bitbucket_data_center_config`, `github_config`, `github_enterprise_config`, `gitlab_config`, `gitlab_enterprise_config`, `bitbucket_cloud_config`, `secure_source_manager_instance_config`, `http_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bitbucket_cloud_config - # @return [::Google::Cloud::DeveloperConnect::V1::BitbucketCloudConfig] - # Configuration for connections to an instance of Bitbucket Clouds. - # - # Note: The following fields are mutually exclusive: `bitbucket_cloud_config`, `github_config`, `github_enterprise_config`, `gitlab_config`, `gitlab_enterprise_config`, `bitbucket_data_center_config`, `secure_source_manager_instance_config`, `http_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] secure_source_manager_instance_config - # @return [::Google::Cloud::DeveloperConnect::V1::SecureSourceManagerInstanceConfig] - # Configuration for connections to an instance of Secure Source Manager. - # - # Note: The following fields are mutually exclusive: `secure_source_manager_instance_config`, `github_config`, `github_enterprise_config`, `gitlab_config`, `gitlab_enterprise_config`, `bitbucket_data_center_config`, `bitbucket_cloud_config`, `http_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] http_config - # @return [::Google::Cloud::DeveloperConnect::V1::GenericHTTPEndpointConfig] - # Optional. Configuration for connections to an HTTP service provider. - # - # Note: The following fields are mutually exclusive: `http_config`, `github_config`, `github_enterprise_config`, `gitlab_config`, `gitlab_enterprise_config`, `bitbucket_data_center_config`, `bitbucket_cloud_config`, `secure_source_manager_instance_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the connection, in the format - # `projects/{project}/locations/{location}/connections/{connection_id}`. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. [Output only] Create timestamp - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. [Output only] Update timestamp - # @!attribute [r] delete_time - # @return [::Google::Protobuf::Timestamp] - # Output only. [Output only] Delete timestamp - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Labels as key value pairs - # @!attribute [r] installation_state - # @return [::Google::Cloud::DeveloperConnect::V1::InstallationState] - # Output only. Installation state of the Connection. - # @!attribute [rw] disabled - # @return [::Boolean] - # Optional. If disabled is set to true, functionality is disabled for this - # connection. Repository based API methods and webhooks processing for - # repositories in this connection will be disabled. - # @!attribute [r] reconciling - # @return [::Boolean] - # Output only. Set to true when the connection is being set up or updated in - # the background. - # @!attribute [rw] annotations - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Allows clients to store small amounts of arbitrary data. - # @!attribute [rw] etag - # @return [::String] - # Optional. This checksum is computed by the server based on the value of - # other fields, and may be sent on update and delete requests to ensure the - # client has an up-to-date value before proceeding. - # @!attribute [r] uid - # @return [::String] - # Output only. A system-assigned unique identifier for the Connection. - # @!attribute [rw] crypto_key_config - # @return [::Google::Cloud::DeveloperConnect::V1::CryptoKeyConfig] - # Optional. The crypto key configuration. This field is used by the - # Customer-Managed Encryption Keys (CMEK) feature. - # @!attribute [rw] git_proxy_config - # @return [::Google::Cloud::DeveloperConnect::V1::GitProxyConfig] - # Optional. Configuration for the git proxy feature. Enabling the git proxy - # allows clients to perform git operations on the repositories linked in the - # connection. - class Connection - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class AnnotationsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The crypto key configuration. This field is used by the Customer-managed - # encryption keys (CMEK) feature. - # @!attribute [rw] key_reference - # @return [::String] - # Required. The name of the key which is used to encrypt/decrypt customer - # data. For key in Cloud KMS, the key should be in the format of - # `projects/*/locations/*/keyRings/*/cryptoKeys/*`. - class CryptoKeyConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The git proxy configuration. - # @!attribute [rw] enabled - # @return [::Boolean] - # Optional. Setting this to true allows the git proxy to be used for - # performing git operations on the repositories linked in the connection. - # @!attribute [r] http_proxy_base_uri - # @return [::String] - # Output only. The base URI for the HTTP proxy endpoint. Has - # the format - # `https://{generatedID}-c-h-{shortRegion}.developerconnect.dev` - # Populated only when enabled is set to true. - # This endpoint is used by other Google services that integrate with - # Developer Connect. - class GitProxyConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes stage and necessary actions to be taken by the - # user to complete the installation. Used for GitHub and GitHub Enterprise - # based connections. - # @!attribute [r] stage - # @return [::Google::Cloud::DeveloperConnect::V1::InstallationState::Stage] - # Output only. Current step of the installation process. - # @!attribute [r] message - # @return [::String] - # Output only. Message of what the user should do next to continue the - # installation. Empty string if the installation is already complete. - # @!attribute [r] action_uri - # @return [::String] - # Output only. Link to follow for next action. Empty string if the - # installation is already complete. - class InstallationState - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Stage of the installation process. - module Stage - # No stage specified. - STAGE_UNSPECIFIED = 0 - - # Only for GitHub Enterprise. An App creation has been requested. - # The user needs to confirm the creation in their GitHub enterprise host. - PENDING_CREATE_APP = 1 - - # User needs to authorize the GitHub (or Enterprise) App via OAuth. - PENDING_USER_OAUTH = 2 - - # User needs to follow the link to install the GitHub (or Enterprise) App. - PENDING_INSTALL_APP = 3 - - # Installation process has been completed. - COMPLETE = 10 - end - end - - # Defines the configuration for connections to an HTTP service provider. - # @!attribute [rw] basic_authentication - # @return [::Google::Cloud::DeveloperConnect::V1::GenericHTTPEndpointConfig::BasicAuthentication] - # Optional. Basic authentication with username and password. - # - # Note: The following fields are mutually exclusive: `basic_authentication`, `bearer_token_authentication`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bearer_token_authentication - # @return [::Google::Cloud::DeveloperConnect::V1::GenericHTTPEndpointConfig::BearerTokenAuthentication] - # Optional. Bearer token authentication with a token. - # - # Note: The following fields are mutually exclusive: `bearer_token_authentication`, `basic_authentication`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] host_uri - # @return [::String] - # Required. Immutable. The service provider's https endpoint. - # @!attribute [rw] service_directory_config - # @return [::Google::Cloud::DeveloperConnect::V1::ServiceDirectoryConfig] - # Optional. Configuration for using Service Directory to privately connect to - # a HTTP service provider. This should only be set if the Http service - # provider is hosted on-premises and not reachable by public internet. If - # this field is left empty, calls to the HTTP service provider will be made - # over the public internet. - # @!attribute [rw] ssl_ca_certificate - # @return [::String] - # Optional. The SSL certificate to use for requests to the HTTP service - # provider. - class GenericHTTPEndpointConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Basic authentication with username and password. - # @!attribute [rw] password_secret_version - # @return [::String] - # The password SecretManager secret version to authenticate as. - # @!attribute [rw] username - # @return [::String] - # Required. The username to authenticate as. - class BasicAuthentication - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Bearer token authentication with a token. - # @!attribute [rw] token_secret_version - # @return [::String] - # Optional. The token SecretManager secret version to authenticate as. - class BearerTokenAuthentication - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Configuration for connections to github.com. - # @!attribute [rw] github_app - # @return [::Google::Cloud::DeveloperConnect::V1::GitHubConfig::GitHubApp] - # Required. Immutable. The GitHub Application that was installed to the - # GitHub user or organization. - # @!attribute [rw] authorizer_credential - # @return [::Google::Cloud::DeveloperConnect::V1::OAuthCredential] - # Optional. OAuth credential of the account that authorized the GitHub App. - # It is recommended to use a robot account instead of a human user account. - # The OAuth token must be tied to the GitHub App of this config. - # @!attribute [rw] app_installation_id - # @return [::Integer] - # Optional. GitHub App installation id. - # @!attribute [r] installation_uri - # @return [::String] - # Output only. The URI to navigate to in order to manage the installation - # associated with this GitHubConfig. - class GitHubConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents the various GitHub Applications that can be installed to a - # GitHub user or organization and used with Developer Connect. - module GitHubApp - # GitHub App not specified. - GIT_HUB_APP_UNSPECIFIED = 0 - - # The Developer Connect GitHub Application. - DEVELOPER_CONNECT = 1 - - # The Firebase GitHub Application. - FIREBASE = 2 - - # The Gemini Code Assist Application. - GEMINI_CODE_ASSIST = 3 - end - end - - # Configuration for connections to an instance of GitHub Enterprise. - # @!attribute [rw] host_uri - # @return [::String] - # Required. The URI of the GitHub Enterprise host this connection is for. - # @!attribute [rw] app_id - # @return [::Integer] - # Optional. ID of the GitHub App created from the manifest. - # @!attribute [r] app_slug - # @return [::String] - # Output only. The URL-friendly name of the GitHub App. - # @!attribute [rw] private_key_secret_version - # @return [::String] - # Optional. SecretManager resource containing the private key of the GitHub - # App, formatted as `projects/*/secrets/*/versions/*` or - # `projects/*/locations/*/secrets/*/versions/*` (if regional secrets are - # supported in that location). - # @!attribute [rw] webhook_secret_secret_version - # @return [::String] - # Optional. SecretManager resource containing the webhook secret of the - # GitHub App, formatted as `projects/*/secrets/*/versions/*` or - # `projects/*/locations/*/secrets/*/versions/*` (if regional secrets are - # supported in that location). - # @!attribute [rw] app_installation_id - # @return [::Integer] - # Optional. ID of the installation of the GitHub App. - # @!attribute [r] installation_uri - # @return [::String] - # Output only. The URI to navigate to in order to manage the installation - # associated with this GitHubEnterpriseConfig. - # @!attribute [rw] service_directory_config - # @return [::Google::Cloud::DeveloperConnect::V1::ServiceDirectoryConfig] - # Optional. Configuration for using Service Directory to privately connect to - # a GitHub Enterprise server. This should only be set if the GitHub - # Enterprise server is hosted on-premises and not reachable by public - # internet. If this field is left empty, calls to the GitHub Enterprise - # server will be made over the public internet. - # @!attribute [r] server_version - # @return [::String] - # Output only. GitHub Enterprise version installed at the host_uri. - # @!attribute [rw] ssl_ca_certificate - # @return [::String] - # Optional. SSL certificate to use for requests to GitHub Enterprise. - # @!attribute [rw] organization - # @return [::String] - # Optional. Immutable. GitHub Enterprise organization in which the GitHub App - # is created. - class GitHubEnterpriseConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ServiceDirectoryConfig represents Service Directory configuration for a - # connection. - # @!attribute [rw] service - # @return [::String] - # Required. The Service Directory service name. - # Format: - # projects/\\{project}/locations/\\{location}/namespaces/\\{namespace}/services/\\{service}. - class ServiceDirectoryConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents an OAuth token of the account that authorized the Connection, - # and associated metadata. - # @!attribute [rw] oauth_token_secret_version - # @return [::String] - # Required. A SecretManager resource containing the OAuth token that - # authorizes the connection. Format: `projects/*/secrets/*/versions/*` or - # `projects/*/locations/*/secrets/*/versions/*` (if regional secrets are - # supported in that location). - # @!attribute [r] username - # @return [::String] - # Output only. The username associated with this token. - class OAuthCredential - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration for connections to gitlab.com. - # @!attribute [rw] webhook_secret_secret_version - # @return [::String] - # Required. Immutable. SecretManager resource containing the webhook secret - # of a GitLab project, formatted as `projects/*/secrets/*/versions/*` or - # `projects/*/locations/*/secrets/*/versions/*` (if regional secrets are - # supported in that location). This is used to validate webhooks. - # @!attribute [rw] read_authorizer_credential - # @return [::Google::Cloud::DeveloperConnect::V1::UserCredential] - # Required. A GitLab personal access token with the minimum `read_api` scope - # access and a minimum role of `reporter`. The GitLab Projects visible to - # this Personal Access Token will control which Projects Developer Connect - # has access to. - # @!attribute [rw] authorizer_credential - # @return [::Google::Cloud::DeveloperConnect::V1::UserCredential] - # Required. A GitLab personal access token with the minimum `api` scope - # access and a minimum role of `maintainer`. The GitLab Projects visible to - # this Personal Access Token will control which Projects Developer Connect - # has access to. - class GitLabConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a personal access token that authorized the Connection, - # and associated metadata. - # @!attribute [rw] user_token_secret_version - # @return [::String] - # Required. A SecretManager resource containing the user token that - # authorizes the Developer Connect connection. Format: - # `projects/*/secrets/*/versions/*` or - # `projects/*/locations/*/secrets/*/versions/*` (if regional secrets are - # supported in that location). - # @!attribute [r] username - # @return [::String] - # Output only. The username associated with this token. - class UserCredential - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration for connections to an instance of GitLab Enterprise. - # @!attribute [rw] host_uri - # @return [::String] - # Required. The URI of the GitLab Enterprise host this connection is for. - # @!attribute [rw] webhook_secret_secret_version - # @return [::String] - # Required. Immutable. SecretManager resource containing the webhook secret - # of a GitLab project, formatted as `projects/*/secrets/*/versions/*` or - # `projects/*/locations/*/secrets/*/versions/*` (if regional secrets are - # supported in that location). This is used to validate webhooks. - # @!attribute [rw] read_authorizer_credential - # @return [::Google::Cloud::DeveloperConnect::V1::UserCredential] - # Required. A GitLab personal access token with the minimum `read_api` scope - # access and a minimum role of `reporter`. The GitLab Projects visible to - # this Personal Access Token will control which Projects Developer Connect - # has access to. - # @!attribute [rw] authorizer_credential - # @return [::Google::Cloud::DeveloperConnect::V1::UserCredential] - # Required. A GitLab personal access token with the minimum `api` scope - # access and a minimum role of `maintainer`. The GitLab Projects visible to - # this Personal Access Token will control which Projects Developer Connect - # has access to. - # @!attribute [rw] service_directory_config - # @return [::Google::Cloud::DeveloperConnect::V1::ServiceDirectoryConfig] - # Optional. Configuration for using Service Directory to privately connect to - # a GitLab Enterprise instance. This should only be set if the GitLab - # Enterprise server is hosted on-premises and not reachable by public - # internet. If this field is left empty, calls to the GitLab Enterprise - # server will be made over the public internet. - # @!attribute [rw] ssl_ca_certificate - # @return [::String] - # Optional. SSL Certificate Authority certificate to use for requests to - # GitLab Enterprise instance. - # @!attribute [r] server_version - # @return [::String] - # Output only. Version of the GitLab Enterprise server running on the - # `host_uri`. - class GitLabEnterpriseConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration for connections to an instance of Bitbucket Data Center. - # @!attribute [rw] host_uri - # @return [::String] - # Required. The URI of the Bitbucket Data Center host this connection is for. - # @!attribute [rw] webhook_secret_secret_version - # @return [::String] - # Required. Immutable. SecretManager resource containing the webhook secret - # used to verify webhook events, formatted as - # `projects/*/secrets/*/versions/*` or - # `projects/*/locations/*/secrets/*/versions/*` (if regional secrets are - # supported in that location). This is used to validate webhooks. - # @!attribute [rw] read_authorizer_credential - # @return [::Google::Cloud::DeveloperConnect::V1::UserCredential] - # Required. An http access token with the minimum `Repository read` access. - # It's recommended to use a system account to generate the credentials. - # @!attribute [rw] authorizer_credential - # @return [::Google::Cloud::DeveloperConnect::V1::UserCredential] - # Required. An http access token with the minimum `Repository admin` scope - # access. This is needed to create webhooks. It's recommended to use a system - # account to generate these credentials. - # @!attribute [rw] service_directory_config - # @return [::Google::Cloud::DeveloperConnect::V1::ServiceDirectoryConfig] - # Optional. Configuration for using Service Directory to privately connect to - # a Bitbucket Data Center instance. This should only be set if the Bitbucket - # Data Center is hosted on-premises and not reachable by public internet. If - # this field is left empty, calls to the Bitbucket Data Center will be made - # over the public internet. - # @!attribute [rw] ssl_ca_certificate - # @return [::String] - # Optional. SSL certificate authority to trust when making requests to - # Bitbucket Data Center. - # @!attribute [r] server_version - # @return [::String] - # Output only. Version of the Bitbucket Data Center server running on the - # `host_uri`. - class BitbucketDataCenterConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration for connections to an instance of Bitbucket Cloud. - # @!attribute [rw] workspace - # @return [::String] - # Required. The Bitbucket Cloud Workspace ID to be connected to Google Cloud - # Platform. - # @!attribute [rw] webhook_secret_secret_version - # @return [::String] - # Required. Immutable. SecretManager resource containing the webhook secret - # used to verify webhook events, formatted as - # `projects/*/secrets/*/versions/*` or - # `projects/*/locations/*/secrets/*/versions/*` (if regional secrets are - # supported in that location). This is used to validate and create webhooks. - # @!attribute [rw] read_authorizer_credential - # @return [::Google::Cloud::DeveloperConnect::V1::UserCredential] - # Required. An access token with the minimum `repository` access. - # It can either be a workspace, project or repository access token. - # It's recommended to use a system account to generate the credentials. - # @!attribute [rw] authorizer_credential - # @return [::Google::Cloud::DeveloperConnect::V1::UserCredential] - # Required. An access token with the minimum `repository`, `pullrequest` and - # `webhook` scope access. It can either be a workspace, project or repository - # access token. This is needed to create webhooks. It's recommended to use a - # system account to generate these credentials. - class BitbucketCloudConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration for connections to Secure Source Manager instance - # @!attribute [rw] instance - # @return [::String] - # Required. Immutable. Secure Source Manager instance resource, formatted as - # `projects/*/locations/*/instances/*` - class SecureSourceManagerInstanceConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for requesting list of Connections - # @!attribute [rw] parent - # @return [::String] - # Required. Parent value for ListConnectionsRequest - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results the server should return. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filtering results - # @!attribute [rw] order_by - # @return [::String] - # Optional. Hint for how to order the results - class ListConnectionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for response to listing Connections - # @!attribute [rw] connections - # @return [::Array<::Google::Cloud::DeveloperConnect::V1::Connection>] - # The list of Connection - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results the server should return. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListConnectionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for getting a Connection - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource - class GetConnectionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for creating a Connection - # @!attribute [rw] parent - # @return [::String] - # Required. Value for parent. - # @!attribute [rw] connection_id - # @return [::String] - # Required. Id of the requesting object - # If auto-generating Id server-side, remove this field and - # connection_id from the method_signature of Create RPC - # @!attribute [rw] connection - # @return [::Google::Cloud::DeveloperConnect::V1::Connection] - # Required. The resource being created - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request, but do not actually post it. - class CreateConnectionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for updating a Connection - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Field mask is used to specify the fields to be overwritten in the - # Connection resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @!attribute [rw] connection - # @return [::Google::Cloud::DeveloperConnect::V1::Connection] - # Required. The resource being updated - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @!attribute [rw] allow_missing - # @return [::Boolean] - # Optional. If set to true, and the connection is not found a new connection - # will be created. In this situation `update_mask` is ignored. - # The creation will succeed only if the input connection has all the - # necessary information (e.g a github_config with both user_oauth_token and - # installation_id properties). - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request, but do not actually post it. - class UpdateConnectionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for deleting a Connection - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request, but do not actually post it. - # @!attribute [rw] etag - # @return [::String] - # Optional. The current etag of the Connection. - # If an etag is provided and does not match the current etag of the - # Connection, deletion will be blocked and an ABORTED error will be returned. - class DeleteConnectionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for requesting list of AccountConnectors - # @!attribute [rw] parent - # @return [::String] - # Required. Parent value for ListAccountConnectorsRequest - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results the server should return. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filtering results - # @!attribute [rw] order_by - # @return [::String] - # Optional. Hint for how to order the results - class ListAccountConnectorsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for response to listing AccountConnectors - # @!attribute [rw] account_connectors - # @return [::Array<::Google::Cloud::DeveloperConnect::V1::AccountConnector>] - # The list of AccountConnectors - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results the server should return. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListAccountConnectorsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for getting a AccountConnector - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource - class GetAccountConnectorRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] parent - # @return [::String] - # Required. Location resource name as the account_connector’s parent. - # @!attribute [rw] account_connector_id - # @return [::String] - # Required. The ID to use for the AccountConnector, which will become the - # final component of the AccountConnector's resource name. Its format should - # adhere to https://google.aip.dev/122#resource-id-segments Names must be - # unique per-project per-location. - # @!attribute [rw] account_connector - # @return [::Google::Cloud::DeveloperConnect::V1::AccountConnector] - # Required. The AccountConnector to create. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request, but do not actually post it. - class CreateAccountConnectorRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for updating a AccountConnector - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. The list of fields to be updated. - # @!attribute [rw] account_connector - # @return [::Google::Cloud::DeveloperConnect::V1::AccountConnector] - # Required. The AccountConnector to update. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @!attribute [rw] allow_missing - # @return [::Boolean] - # Optional. If set to true, and the accountConnector is not found a new - # accountConnector will be created. In this situation `update_mask` is - # ignored. The creation will succeed only if the input accountConnector has - # all the necessary - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request, but do not actually post it. - class UpdateAccountConnectorRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for deleting a AccountConnector - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request, but do not actually post it. - # @!attribute [rw] etag - # @return [::String] - # Optional. The current etag of the AccountConnectorn. - # If an etag is provided and does not match the current etag of the - # AccountConnector, deletion will be blocked and an ABORTED error will be - # returned. - # @!attribute [rw] force - # @return [::Boolean] - # Optional. If set to true, any Users from this AccountConnector will also - # be deleted. (Otherwise, the request will only work if the AccountConnector - # has no Users.) - class DeleteAccountConnectorRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for deleting a User - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request, but do not actually post it. - # @!attribute [rw] etag - # @return [::String] - # Optional. This checksum is computed by the server based on the value of - # other fields, and may be sent on update and delete requests to ensure the - # client has an up-to-date value before proceeding. - class DeleteUserRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents the metadata of the long-running operation. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the operation was created. - # @!attribute [r] end_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the operation finished running. - # @!attribute [r] target - # @return [::String] - # Output only. Server-defined resource path for the target of the operation. - # @!attribute [r] verb - # @return [::String] - # Output only. Name of the verb executed by the operation. - # @!attribute [r] status_message - # @return [::String] - # Output only. Human-readable status of the operation, if any. - # @!attribute [r] requested_cancellation - # @return [::Boolean] - # Output only. Identifies whether the user has requested cancellation - # of the operation. Operations that have been cancelled successfully - # have - # {::Google::Longrunning::Operation#error google.longrunning.Operation.error} - # value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1, - # corresponding to `Code.CANCELLED`. - # @!attribute [r] api_version - # @return [::String] - # Output only. API version used to start the operation. - class OperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for fetching a User of the user themselves. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the AccountConnector resource - class FetchSelfRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for deleting a User of the user themselves. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the AccountConnector resource - class DeleteSelfRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for fetching an OAuth access token. - # @!attribute [rw] account_connector - # @return [::String] - # Required. The resource name of the AccountConnector in the format - # `projects/*/locations/*/accountConnectors/*`. - class FetchAccessTokenRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for responding to getting an OAuth access token. - # @!attribute [rw] token - # @return [::String] - # The token content. - # @!attribute [rw] expiration_time - # @return [::Google::Protobuf::Timestamp] - # Expiration timestamp. Can be empty if unknown or non-expiring. - # @!attribute [rw] scopes - # @return [::Array<::String>] - # The scopes of the access token. - # @!attribute [rw] exchange_error - # @return [::Google::Cloud::DeveloperConnect::V1::ExchangeError] - # The error resulted from exchanging OAuth tokens from the service provider. - class FetchAccessTokenResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for starting an OAuth flow. - # @!attribute [rw] account_connector - # @return [::String] - # Required. The resource name of the AccountConnector in the format - # `projects/*/locations/*/accountConnectors/*`. - class StartOAuthRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for responding to starting an OAuth flow. - # @!attribute [rw] system_provider_id - # @return [::Google::Cloud::DeveloperConnect::V1::SystemProvider] - # The ID of the system provider. - # @!attribute [rw] ticket - # @return [::String] - # The ticket to be used for post processing the callback from the service - # provider. - # @!attribute [rw] code_challenge - # @return [::String] - # Please refer to https://datatracker.ietf.org/doc/html/rfc7636#section-4.1 - # @!attribute [rw] code_challenge_method - # @return [::String] - # Please refer to https://datatracker.ietf.org/doc/html/rfc7636#section-4.2 - # @!attribute [rw] client_id - # @return [::String] - # The client ID to the OAuth App of the service provider. - # @!attribute [rw] scopes - # @return [::Array<::String>] - # The list of scopes requested by the application. - # @!attribute [rw] auth_uri - # @return [::String] - # The authorization server URL to the OAuth flow of the service provider. - class StartOAuthResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for finishing an OAuth flow. - # @!attribute [rw] oauth_params - # @return [::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest::OAuthParams] - # The params returned by non-Google OAuth 2.0 flow redirect. - # - # Note: The following fields are mutually exclusive: `oauth_params`, `google_oauth_params`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] google_oauth_params - # @return [::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest::GoogleOAuthParams] - # The params returned by Google OAuth flow redirects. - # - # Note: The following fields are mutually exclusive: `google_oauth_params`, `oauth_params`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] account_connector - # @return [::String] - # Required. The resource name of the AccountConnector in the format - # `projects/*/locations/*/accountConnectors/*`. - class FinishOAuthRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The params returned by non-Google OAuth 2.0 flow redirect. - # @!attribute [rw] code - # @return [::String] - # Required. The code to be used for getting the token from SCM provider. - # @!attribute [rw] ticket - # @return [::String] - # Required. The ticket to be used for post processing the callback from SCM - # provider. - class OAuthParams - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The params returned by Google OAuth flow redirects. - # @!attribute [rw] scopes - # @return [::Array<::String>] - # Required. The scopes returned by Google OAuth flow. - # @!attribute [rw] version_info - # @return [::String] - # Optional. The version info returned by Google OAuth flow. - # @!attribute [rw] ticket - # @return [::String] - # Required. The ticket to be used for post processing the callback from - # Google OAuth flow. - class GoogleOAuthParams - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Message for responding to finishing an OAuth flow. - # @!attribute [rw] exchange_error - # @return [::Google::Cloud::DeveloperConnect::V1::ExchangeError] - # The error resulted from exchanging OAuth tokens from the service provider. - class FinishOAuthResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for representing an error from exchanging OAuth tokens. - # @!attribute [rw] code - # @return [::String] - # https://datatracker.ietf.org/doc/html/rfc6749#section-5.2 - error - # @!attribute [rw] description - # @return [::String] - # https://datatracker.ietf.org/doc/html/rfc6749#section-5.2 - - # error_description - class ExchangeError - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message describing the GitRepositoryLink object - # @!attribute [rw] name - # @return [::String] - # Identifier. Resource name of the repository, in the format - # `projects/*/locations/*/connections/*/gitRepositoryLinks/*`. - # @!attribute [rw] clone_uri - # @return [::String] - # Required. Git Clone URI. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. [Output only] Create timestamp - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. [Output only] Update timestamp - # @!attribute [r] delete_time - # @return [::Google::Protobuf::Timestamp] - # Output only. [Output only] Delete timestamp - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Labels as key value pairs - # @!attribute [rw] etag - # @return [::String] - # Optional. This checksum is computed by the server based on the value of - # other fields, and may be sent on update and delete requests to ensure the - # client has an up-to-date value before proceeding. - # @!attribute [r] reconciling - # @return [::Boolean] - # Output only. Set to true when the connection is being set up or updated in - # the background. - # @!attribute [rw] annotations - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Allows clients to store small amounts of arbitrary data. - # @!attribute [r] uid - # @return [::String] - # Output only. A system-assigned unique identifier for the GitRepositoryLink. - # @!attribute [r] webhook_id - # @return [::String] - # Output only. External ID of the webhook created for the repository. - # @!attribute [r] git_proxy_uri - # @return [::String] - # Output only. URI to access the linked repository through the Git Proxy. - # This field is only populated if the git proxy is enabled for the - # connection. - class GitRepositoryLink - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class AnnotationsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Message for creating a GitRepositoryLink - # @!attribute [rw] parent - # @return [::String] - # Required. Value for parent. - # @!attribute [rw] git_repository_link - # @return [::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink] - # Required. The resource being created - # @!attribute [rw] git_repository_link_id - # @return [::String] - # Required. The ID to use for the repository, which will become the final - # component of the repository's resource name. This ID should be unique in - # the connection. Allows alphanumeric characters and any of - # -._~%!$&'()*+,;=@. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request, but do not actually post it. - class CreateGitRepositoryLinkRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for deleting a GitRepositoryLink - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request, but do not actually post it. - # @!attribute [rw] etag - # @return [::String] - # Optional. This checksum is computed by the server based on the value of - # other fields, and may be sent on update and delete requests to ensure the - # client has an up-to-date value before proceeding. - class DeleteGitRepositoryLinkRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for requesting a list of GitRepositoryLinks - # @!attribute [rw] parent - # @return [::String] - # Required. Parent value for ListGitRepositoryLinksRequest - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results the server should return. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filtering results - # @!attribute [rw] order_by - # @return [::String] - # Optional. Hint for how to order the results - class ListGitRepositoryLinksRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for response to listing GitRepositoryLinks - # @!attribute [rw] git_repository_links - # @return [::Array<::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink>] - # The list of GitRepositoryLinks - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results the server should return. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListGitRepositoryLinksResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for getting a GitRepositoryLink - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource - class GetGitRepositoryLinkRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for fetching SCM read/write token. - # @!attribute [rw] git_repository_link - # @return [::String] - # Required. The resource name of the gitRepositoryLink in the format - # `projects/*/locations/*/connections/*/gitRepositoryLinks/*`. - class FetchReadWriteTokenRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for fetching SCM read token. - # @!attribute [rw] git_repository_link - # @return [::String] - # Required. The resource name of the gitRepositoryLink in the format - # `projects/*/locations/*/connections/*/gitRepositoryLinks/*`. - class FetchReadTokenRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for responding to get read token. - # @!attribute [rw] token - # @return [::String] - # The token content. - # @!attribute [rw] expiration_time - # @return [::Google::Protobuf::Timestamp] - # Expiration timestamp. Can be empty if unknown or non-expiring. - # @!attribute [rw] git_username - # @return [::String] - # The git_username to specify when making a git clone with the - # token. For example, for GitHub GitRepositoryLinks, this would be - # "x-access-token" - class FetchReadTokenResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for responding to get read/write token. - # @!attribute [rw] token - # @return [::String] - # The token content. - # @!attribute [rw] expiration_time - # @return [::Google::Protobuf::Timestamp] - # Expiration timestamp. Can be empty if unknown or non-expiring. - # @!attribute [rw] git_username - # @return [::String] - # The git_username to specify when making a git clone with the - # token. For example, for GitHub GitRepositoryLinks, this would be - # "x-access-token" - class FetchReadWriteTokenResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for FetchLinkableGitRepositoriesRequest. - # @!attribute [rw] connection - # @return [::String] - # Required. The name of the Connection. - # Format: `projects/*/locations/*/connections/*`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Number of results to return in the list. Defaults to 20. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Page start. - class FetchLinkableGitRepositoriesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for FetchLinkableGitRepositories. - # @!attribute [rw] linkable_git_repositories - # @return [::Array<::Google::Cloud::DeveloperConnect::V1::LinkableGitRepository>] - # The git repositories that can be linked to the connection. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results the server should return. - class FetchLinkableGitRepositoriesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # LinkableGitRepository represents a git repository that can be linked to a - # connection. - # @!attribute [rw] clone_uri - # @return [::String] - # The clone uri of the repository. - class LinkableGitRepository - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for fetching github installations. - # @!attribute [rw] connection - # @return [::String] - # Required. The resource name of the connection in the format - # `projects/*/locations/*/connections/*`. - class FetchGitHubInstallationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response of fetching github installations. - # @!attribute [rw] installations - # @return [::Array<::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsResponse::Installation>] - # List of installations available to the OAuth user (for github.com) - # or all the installations (for GitHub enterprise). - class FetchGitHubInstallationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents an installation of the GitHub App. - # @!attribute [rw] id - # @return [::Integer] - # ID of the installation in GitHub. - # @!attribute [rw] name - # @return [::String] - # Name of the GitHub user or organization that owns this installation. - # @!attribute [rw] type - # @return [::String] - # Either "user" or "organization". - class Installation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Request for fetching git refs. - # @!attribute [rw] git_repository_link - # @return [::String] - # Required. The resource name of GitRepositoryLink in the format - # `projects/*/locations/*/connections/*/gitRepositoryLinks/*`. - # @!attribute [rw] ref_type - # @return [::Google::Cloud::DeveloperConnect::V1::FetchGitRefsRequest::RefType] - # Required. Type of refs to fetch. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Number of results to return in the list. Default to 20. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Page start. - class FetchGitRefsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Type of refs. - module RefType - # No type specified. - REF_TYPE_UNSPECIFIED = 0 - - # To fetch tags. - TAG = 1 - - # To fetch branches. - BRANCH = 2 - end - end - - # Response for fetching git refs. - # @!attribute [rw] ref_names - # @return [::Array<::String>] - # Name of the refs fetched. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results the server should return. - class FetchGitRefsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # AccountConnector encapsulates what a platform administrator needs to - # configure for users to connect to the service providers, which includes, - # among other fields, the OAuth client ID, client secret, and authorization and - # token endpoints. - # @!attribute [rw] provider_oauth_config - # @return [::Google::Cloud::DeveloperConnect::V1::ProviderOAuthConfig] - # Optional. Provider OAuth config. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the accountConnector, in the format - # `projects/{project}/locations/{location}/accountConnectors/{account_connector_id}`. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the accountConnector was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the accountConnector was updated. - # @!attribute [rw] annotations - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Allows users to store small amounts of arbitrary data. - # @!attribute [rw] etag - # @return [::String] - # Optional. This checksum is computed by the server based on the value of - # other fields, and may be sent on update and delete requests to ensure the - # client has an up-to-date value before proceeding. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Labels as key value pairs - # @!attribute [r] oauth_start_uri - # @return [::String] - # Output only. Start OAuth flow by clicking on this URL. - class AccountConnector - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class AnnotationsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # User represents a user connected to the service providers through - # a AccountConnector. - # @!attribute [rw] name - # @return [::String] - # Identifier. Resource name of the user, in the format - # `projects/*/locations/*/accountConnectors/*/users/*`. - # @!attribute [r] display_name - # @return [::String] - # Output only. Developer Connect automatically converts user identity - # to some human readable description, e.g., email address. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the user was created. - # @!attribute [r] last_token_request_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the token was last requested. - class User - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ProviderOAuthConfig is the OAuth config for a provider. - # @!attribute [rw] system_provider_id - # @return [::Google::Cloud::DeveloperConnect::V1::SystemProvider] - # Optional. Immutable. Developer Connect provided OAuth. - # @!attribute [rw] scopes - # @return [::Array<::String>] - # Required. User selected scopes to apply to the Oauth config - # In the event of changing scopes, user records under AccountConnector will - # be deleted and users will re-auth again. - class ProviderOAuthConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # SystemProvider is a list of providers that are owned by Developer Connect. - module SystemProvider - # No system provider specified. - SYSTEM_PROVIDER_UNSPECIFIED = 0 - - # GitHub provider. - # Scopes can be found at - # https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/scopes-for-oauth-apps#available-scopes - GITHUB = 1 - - # GitLab provider. - # Scopes can be found at - # https://docs.gitlab.com/user/profile/personal_access_tokens/#personal-access-token-scopes - GITLAB = 2 - - # Google provider. - # Recommended scopes: - # "https://www.googleapis.com/auth/drive.readonly", - # "https://www.googleapis.com/auth/documents.readonly" - GOOGLE = 3 - - # Sentry provider. - # Scopes can be found at - # https://docs.sentry.io/api/permissions/ - SENTRY = 4 - - # Rovo provider. - # Must select the "rovo" scope. - ROVO = 5 - - # New Relic provider. - # No scopes are allowed. - NEW_RELIC = 6 - - # Datastax provider. - # No scopes are allowed. - DATASTAX = 7 - - # Dynatrace provider. - DYNATRACE = 8 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/cloud/developerconnect/v1/insights_config.rb b/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/cloud/developerconnect/v1/insights_config.rb deleted file mode 100644 index 7c6832d251af..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/cloud/developerconnect/v1/insights_config.rb +++ /dev/null @@ -1,556 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Developerconnect - module V1 - # The InsightsConfig resource is the core configuration object to capture - # events from your Software Development Lifecycle. It acts as the central hub - # for managing how Developer Connect understands your application, its runtime - # environments, and the artifacts deployed within them. - # @!attribute [rw] app_hub_application - # @return [::String] - # Optional. The name of the App Hub Application. - # Format: - # projects/\\{project}/locations/\\{location}/applications/\\{application} - # - # Note: The following fields are mutually exclusive: `app_hub_application`, `projects`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] projects - # @return [::Google::Cloud::Developerconnect::V1::Projects] - # Optional. The projects to track with the InsightsConfig. - # - # Note: The following fields are mutually exclusive: `projects`, `app_hub_application`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] name - # @return [::String] - # Identifier. The name of the InsightsConfig. - # Format: - # projects/\\{project}/locations/\\{location}/insightsConfigs/\\{insightsConfig} - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Create timestamp. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Update timestamp. - # @!attribute [r] runtime_configs - # @return [::Array<::Google::Cloud::Developerconnect::V1::RuntimeConfig>] - # Output only. The runtime configurations where the application is deployed. - # @!attribute [rw] artifact_configs - # @return [::Array<::Google::Cloud::Developerconnect::V1::ArtifactConfig>] - # Optional. The artifact configurations of the artifacts that are deployed. - # @!attribute [rw] state - # @return [::Google::Cloud::Developerconnect::V1::InsightsConfig::State] - # Optional. Output only. The state of the InsightsConfig. - # @!attribute [rw] annotations - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User specified annotations. See - # https://google.aip.dev/148#annotations for more details such as format and - # size limitations. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Set of labels associated with an InsightsConfig. - # @!attribute [r] reconciling - # @return [::Boolean] - # Output only. Reconciling (https://google.aip.dev/128#reconciliation). - # Set to true if the current state of InsightsConfig does not match the - # user's intended state, and the service is actively updating the resource to - # reconcile them. This can happen due to user-triggered updates or - # system actions like failover or maintenance. - # @!attribute [r] errors - # @return [::Array<::Google::Rpc::Status>] - # Output only. Any errors that occurred while setting up the InsightsConfig. - # Each error will be in the format: `field_name: error_message`, e.g. - # GetAppHubApplication: Permission denied while getting App Hub - # application. Please grant permissions to the P4SA. - class InsightsConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class AnnotationsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The state of the InsightsConfig. - module State - # No state specified. - STATE_UNSPECIFIED = 0 - - # The InsightsConfig is pending application discovery/runtime discovery. - PENDING = 5 - - # The initial discovery process is complete. - COMPLETE = 3 - - # The InsightsConfig is in an error state. - ERROR = 4 - end - end - - # Projects represents the projects to track with the InsightsConfig. - # @!attribute [rw] project_ids - # @return [::Array<::String>] - # Optional. The project IDs. - # Format: \\{project} - class Projects - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # RuntimeConfig represents the runtimes where the application is - # deployed. - # @!attribute [r] gke_workload - # @return [::Google::Cloud::Developerconnect::V1::GKEWorkload] - # Output only. Google Kubernetes Engine runtime. - # - # Note: The following fields are mutually exclusive: `gke_workload`, `google_cloud_run`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] google_cloud_run - # @return [::Google::Cloud::Developerconnect::V1::GoogleCloudRun] - # Output only. Cloud Run runtime. - # - # Note: The following fields are mutually exclusive: `google_cloud_run`, `gke_workload`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] app_hub_workload - # @return [::Google::Cloud::Developerconnect::V1::AppHubWorkload] - # Output only. App Hub Workload. - # - # Note: The following fields are mutually exclusive: `app_hub_workload`, `app_hub_service`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] app_hub_service - # @return [::Google::Cloud::Developerconnect::V1::AppHubService] - # Output only. App Hub Service. - # - # Note: The following fields are mutually exclusive: `app_hub_service`, `app_hub_workload`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] uri - # @return [::String] - # Required. Immutable. The URI of the runtime configuration. - # For GKE, this is the cluster name. - # For Cloud Run, this is the service name. - # @!attribute [r] state - # @return [::Google::Cloud::Developerconnect::V1::RuntimeConfig::State] - # Output only. The state of the Runtime. - class RuntimeConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The state of the runtime in the InsightsConfig. - # Whether the runtime is linked to the InsightsConfig. - module State - # No state specified. - STATE_UNSPECIFIED = 0 - - # The runtime configuration has been linked to the InsightsConfig. - LINKED = 1 - - # The runtime configuration has been unlinked to the InsightsConfig. - UNLINKED = 2 - end - end - - # GKEWorkload represents the Google Kubernetes Engine runtime. - # @!attribute [rw] cluster - # @return [::String] - # Required. Immutable. The name of the GKE cluster. - # Format: - # `projects/{project}/locations/{location}/clusters/{cluster}`. - # @!attribute [r] deployment - # @return [::String] - # Output only. The name of the GKE deployment. - # Format: - # `projects/{project}/locations/{location}/clusters/{cluster}/namespaces/{namespace}/deployments/{deployment}`. - class GKEWorkload - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # GoogleCloudRun represents the Cloud Run runtime. - # @!attribute [rw] service_uri - # @return [::String] - # Required. Immutable. The name of the Cloud Run service. - # Format: - # `projects/{project}/locations/{location}/services/{service}`. - class GoogleCloudRun - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # AppHubWorkload represents the App Hub Workload. - # @!attribute [r] workload - # @return [::String] - # Required. Output only. Immutable. The name of the App Hub Workload. - # Format: - # `projects/{project}/locations/{location}/applications/{application}/workloads/{workload}`. - # @!attribute [r] criticality - # @return [::String] - # Output only. The criticality of the App Hub Workload. - # @!attribute [r] environment - # @return [::String] - # Output only. The environment of the App Hub Workload. - class AppHubWorkload - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # AppHubService represents the App Hub Service. - # @!attribute [r] apphub_service - # @return [::String] - # Required. Output only. Immutable. The name of the App Hub Service. - # Format: - # `projects/{project}/locations/{location}/applications/{application}/services/{service}`. - # @!attribute [r] criticality - # @return [::String] - # Output only. The criticality of the App Hub Service. - # @!attribute [r] environment - # @return [::String] - # Output only. The environment of the App Hub Service. - class AppHubService - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The artifact config of the artifact that is deployed. - # @!attribute [rw] google_artifact_registry - # @return [::Google::Cloud::Developerconnect::V1::GoogleArtifactRegistry] - # Optional. Set if the artifact is stored in Artifact registry. - # @!attribute [rw] google_artifact_analysis - # @return [::Google::Cloud::Developerconnect::V1::GoogleArtifactAnalysis] - # Optional. Set if the artifact metadata is stored in Artifact analysis. - # @!attribute [rw] uri - # @return [::String] - # Required. Immutable. The URI of the artifact that is deployed. - # e.g. `us-docker.pkg.dev/my-project/my-repo/image`. - # The URI does not include the tag / digest because it captures a lineage of - # artifacts. - class ArtifactConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Google Artifact Analysis configurations. - # @!attribute [rw] project_id - # @return [::String] - # Required. The project id of the project where the provenance is stored. - class GoogleArtifactAnalysis - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Google Artifact Registry configurations. - # @!attribute [rw] project_id - # @return [::String] - # Required. The host project of Artifact Registry. - # @!attribute [rw] artifact_registry_package - # @return [::String] - # Required. Immutable. The name of the artifact registry package. - class GoogleArtifactRegistry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The DeploymentEvent resource represents the deployment of the artifact within - # the InsightsConfig resource. - # @!attribute [rw] name - # @return [::String] - # Identifier. The name of the DeploymentEvent. This name is provided by - # Developer Connect insights. Format: - # projects/\\{project}/locations/\\{location}/insightsConfigs/\\{insights_config}/deploymentEvents/\\{uuid} - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The create time of the DeploymentEvent. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The update time of the DeploymentEvent. - # @!attribute [r] runtime_config - # @return [::Google::Cloud::Developerconnect::V1::RuntimeConfig] - # Output only. The runtime configurations where the DeploymentEvent happened. - # @!attribute [r] runtime_deployment_uri - # @return [::String] - # Output only. The runtime assigned URI of the DeploymentEvent. - # For GKE, this is the fully qualified replica set uri. - # e.g. - # container.googleapis.com/projects/\\{project}/locations/\\{location}/clusters/\\{cluster}/k8s/namespaces/\\{namespace}/apps/replicasets/\\{replica-set-id} - # For Cloud Run, this is the revision name. - # @!attribute [r] state - # @return [::Google::Cloud::Developerconnect::V1::DeploymentEvent::State] - # Output only. The state of the DeploymentEvent. - # @!attribute [r] artifact_deployments - # @return [::Array<::Google::Cloud::Developerconnect::V1::ArtifactDeployment>] - # Output only. The artifact deployments of the DeploymentEvent. Each artifact - # deployment contains the artifact uri and the runtime configuration uri. For - # GKE, this would be all the containers images that are deployed in the pod. - # @!attribute [r] deploy_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which the DeploymentEvent was deployed. - # This would be the min of all ArtifactDeployment deploy_times. - # @!attribute [r] undeploy_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which the DeploymentEvent was undeployed, all - # artifacts are considered undeployed once this time is set. This would be - # the max of all ArtifactDeployment undeploy_times. If any ArtifactDeployment - # is still active (i.e. does not have an undeploy_time), this field will be - # empty. - class DeploymentEvent - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The state of the DeploymentEvent. - module State - # No state specified. - STATE_UNSPECIFIED = 0 - - # The deployment is active in the runtime. - STATE_ACTIVE = 1 - - # The deployment is not in the runtime. - STATE_INACTIVE = 2 - end - end - - # Request for getting a DeploymentEvent. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the deployment event to retrieve. - # Format: - # projects/\\{project}/locations/\\{location}/insightsConfigs/\\{insights_config}/deploymentEvents/\\{uuid} - class GetDeploymentEventRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for requesting list of DeploymentEvents. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent insights config that owns this collection of - # deployment events. Format: - # projects/\\{project}/locations/\\{location}/insightsConfigs/\\{insights_config} - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of deployment events to return. The service - # may return fewer than this value. If unspecified, at most 50 deployment - # events will be returned. The maximum value is 1000; values above 1000 will - # be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListDeploymentEvents` - # call. Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListDeploymentEvents` - # must match the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter expression that matches a subset of the DeploymentEvents. - # https://google.aip.dev/160. - class ListDeploymentEventsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response to listing DeploymentEvents. - # @!attribute [rw] deployment_events - # @return [::Array<::Google::Cloud::Developerconnect::V1::DeploymentEvent>] - # The list of DeploymentEvents. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListDeploymentEventsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The ArtifactDeployment resource represents the deployment of the artifact - # within the InsightsConfig resource. - # @!attribute [r] id - # @return [::String] - # Output only. Unique identifier of `ArtifactDeployment`. - # @!attribute [r] artifact_reference - # @return [::String] - # Output only. The artifact that is deployed. - # @!attribute [r] artifact_alias - # @return [::String] - # Output only. The artifact alias in the deployment spec, with Tag/SHA. - # e.g. us-docker.pkg.dev/my-project/my-repo/image:1.0.0 - # @!attribute [r] source_commit_uris - # @return [::Array<::String>] - # Output only. The source commits at which this artifact was built. Extracted - # from provenance. - # @!attribute [r] deploy_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which the deployment was deployed. - # @!attribute [r] undeploy_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which the deployment was undeployed, all artifacts - # are considered undeployed once this time is set. - # @!attribute [r] container_status_summary - # @return [::String] - # Output only. The summary of container status of the artifact deployment. - # Format as `ContainerStatusState-Reason : restartCount` - # e.g. "Waiting-ImagePullBackOff : 3" - class ArtifactDeployment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for creating an InsightsConfig. - # @!attribute [rw] parent - # @return [::String] - # Required. Value for parent. - # @!attribute [rw] insights_config_id - # @return [::String] - # Required. ID of the requesting InsightsConfig. - # @!attribute [rw] insights_config - # @return [::Google::Cloud::Developerconnect::V1::InsightsConfig] - # Required. The resource being created. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request, but do not actually post it. - class CreateInsightsConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for getting an InsightsConfig. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource. - class GetInsightsConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for requesting list of InsightsConfigs. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent value for ListInsightsConfigsRequest. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results the server should return. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filtering results. See https://google.aip.dev/160 for more - # details. Filter string, adhering to the rules in - # https://google.aip.dev/160. List only InsightsConfigs matching the filter. - # If filter is empty, all InsightsConfigs are listed. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Hint for how to order the results. - class ListInsightsConfigsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for response to listing InsightsConfigs. - # @!attribute [rw] insights_configs - # @return [::Array<::Google::Cloud::Developerconnect::V1::InsightsConfig>] - # The list of InsightsConfigs. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results the server should return. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListInsightsConfigsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for deleting an InsightsConfig. - # @!attribute [rw] name - # @return [::String] - # Required. Value for parent. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request, but do not actually post it. - # @!attribute [rw] etag - # @return [::String] - # Optional. This checksum is computed by the server based on the value of - # other fields, and may be sent on update and delete requests to ensure the - # client has an up-to-date value before proceeding. - class DeleteInsightsConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for updating an InsightsConfig. - # @!attribute [rw] insights_config - # @return [::Google::Cloud::Developerconnect::V1::InsightsConfig] - # Required. The resource being updated. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @!attribute [rw] allow_missing - # @return [::Boolean] - # Optional. If set to true, and the insightsConfig is not found a new - # insightsConfig will be created. In this situation `update_mask` is ignored. - # The creation will succeed only if the input insightsConfig has all the - # necessary information (e.g a github_config with both user_oauth_token and - # installation_id properties). - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request, but do not actually post it. - class UpdateInsightsConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/longrunning/operations.rb +++ /dev/null @@ -1,191 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Longrunning - # This resource represents a long-running operation that is the result of a - # network API call. - # @!attribute [rw] name - # @return [::String] - # The server-assigned name, which is only unique within the same service that - # originally returns it. If you use the default HTTP mapping, the - # `name` should be a resource name ending with `operations/{unique_id}`. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Any] - # Service-specific metadata associated with the operation. It typically - # contains progress information and common metadata such as create time. - # Some services might not provide such metadata. Any method that returns a - # long-running operation should document the metadata type, if any. - # @!attribute [rw] done - # @return [::Boolean] - # If the value is `false`, it means the operation is still in progress. - # If `true`, the operation is completed, and either `error` or `response` is - # available. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # The error result of the operation in case of failure or cancellation. - # - # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] response - # @return [::Google::Protobuf::Any] - # The normal, successful response of the operation. If the original - # method returns no data on success, such as `Delete`, the response is - # `google.protobuf.Empty`. If the original method is standard - # `Get`/`Create`/`Update`, the response should be the resource. For other - # methods, the response should have the type `XxxResponse`, where `Xxx` - # is the original method name. For example, if the original method name - # is `TakeSnapshot()`, the inferred response type is - # `TakeSnapshotResponse`. - # - # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Operation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.GetOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource. - class GetOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.ListOperations. - # @!attribute [rw] name - # @return [::String] - # The name of the operation's parent resource. - # @!attribute [rw] filter - # @return [::String] - # The standard list filter. - # @!attribute [rw] page_size - # @return [::Integer] - # The standard list page size. - # @!attribute [rw] page_token - # @return [::String] - # The standard list page token. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - class ListOperationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for - # Operations.ListOperations. - # @!attribute [rw] operations - # @return [::Array<::Google::Longrunning::Operation>] - # A list of operations that matches the specified filter in the request. - # @!attribute [rw] next_page_token - # @return [::String] - # The standard List next-page token. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unordered list. Unreachable resources. Populated when the request sets - # `ListOperationsRequest.return_partial_success` and reads across - # collections e.g. when attempting to list all resources across all supported - # locations. - class ListOperationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.CancelOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be cancelled. - class CancelOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.DeleteOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be deleted. - class DeleteOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.WaitOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to wait on. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - class WaitOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message representing the message types used by a long-running operation. - # - # Example: - # - # rpc Export(ExportRequest) returns (google.longrunning.Operation) { - # option (google.longrunning.operation_info) = { - # response_type: "ExportResponse" - # metadata_type: "ExportMetadata" - # }; - # } - # @!attribute [rw] response_type - # @return [::String] - # Required. The message name of the primary return type for this - # long-running operation. - # This type will be used to deserialize the LRO's response. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - # @!attribute [rw] metadata_type - # @return [::String] - # Required. The message name of the metadata type for this long-running - # operation. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - class OperationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `FieldMask` represents a set of symbolic field paths, for example: - # - # paths: "f.a" - # paths: "f.b.d" - # - # Here `f` represents a field in some root message, `a` and `b` - # fields in the message found in `f`, and `d` a field found in the - # message in `f.b`. - # - # Field masks are used to specify a subset of fields that should be - # returned by a get operation or modified by an update operation. - # Field masks also have a custom JSON encoding (see below). - # - # # Field Masks in Projections - # - # When used in the context of a projection, a response message or - # sub-message is filtered by the API to only contain those fields as - # specified in the mask. For example, if the mask in the previous - # example is applied to a response message as follows: - # - # f { - # a : 22 - # b { - # d : 1 - # x : 2 - # } - # y : 13 - # } - # z: 8 - # - # The result will not contain specific values for fields x,y and z - # (their value will be set to the default, and omitted in proto text - # output): - # - # - # f { - # a : 22 - # b { - # d : 1 - # } - # } - # - # A repeated field is not allowed except at the last position of a - # paths string. - # - # If a FieldMask object is not present in a get operation, the - # operation applies to all fields (as if a FieldMask of all fields - # had been specified). - # - # Note that a field mask does not necessarily apply to the - # top-level response message. In case of a REST get operation, the - # field mask applies directly to the response, but in case of a REST - # list operation, the mask instead applies to each individual message - # in the returned resource list. In case of a REST custom method, - # other definitions may be used. Where the mask applies will be - # clearly documented together with its declaration in the API. In - # any case, the effect on the returned resource/resources is required - # behavior for APIs. - # - # # Field Masks in Update Operations - # - # A field mask in update operations specifies which fields of the - # targeted resource are going to be updated. The API is required - # to only change the values of the fields as specified in the mask - # and leave the others untouched. If a resource is passed in to - # describe the updated values, the API ignores the values of all - # fields not covered by the mask. - # - # If a repeated field is specified for an update operation, new values will - # be appended to the existing repeated field in the target resource. Note that - # a repeated field is only allowed in the last position of a `paths` string. - # - # If a sub-message is specified in the last position of the field mask for an - # update operation, then new value will be merged into the existing sub-message - # in the target resource. - # - # For example, given the target message: - # - # f { - # b { - # d: 1 - # x: 2 - # } - # c: [1] - # } - # - # And an update message: - # - # f { - # b { - # d: 10 - # } - # c: [2] - # } - # - # then if the field mask is: - # - # paths: ["f.b", "f.c"] - # - # then the result will be: - # - # f { - # b { - # d: 10 - # x: 2 - # } - # c: [1, 2] - # } - # - # An implementation may provide options to override this default behavior for - # repeated and message fields. - # - # In order to reset a field's value to the default, the field must - # be in the mask and set to the default value in the provided resource. - # Hence, in order to reset all fields of a resource, provide a default - # instance of the resource and set all fields in the mask, or do - # not provide a mask as described below. - # - # If a field mask is not present on update, the operation applies to - # all fields (as if a field mask of all fields has been specified). - # Note that in the presence of schema evolution, this may mean that - # fields the client does not know and has therefore not filled into - # the request will be reset to their default. If this is unwanted - # behavior, a specific service may require a client to always specify - # a field mask, producing an error if not. - # - # As with get operations, the location of the resource which - # describes the updated values in the request message depends on the - # operation kind. In any case, the effect of the field mask is - # required to be honored by the API. - # - # ## Considerations for HTTP REST - # - # The HTTP kind of an update operation which uses a field mask must - # be set to PATCH instead of PUT in order to satisfy HTTP semantics - # (PUT must only be used for full updates). - # - # # JSON Encoding of Field Masks - # - # In JSON, a field mask is encoded as a single string where paths are - # separated by a comma. Fields name in each path are converted - # to/from lower-camel naming conventions. - # - # As an example, consider the following message declarations: - # - # message Profile { - # User user = 1; - # Photo photo = 2; - # } - # message User { - # string display_name = 1; - # string address = 2; - # } - # - # In proto a field mask for `Profile` may look as such: - # - # mask { - # paths: "user.display_name" - # paths: "photo" - # } - # - # In JSON, the same mask is represented as below: - # - # { - # mask: "user.displayName,photo" - # } - # - # # Field Masks and Oneof Fields - # - # Field masks treat fields in oneofs just as regular fields. Consider the - # following message: - # - # message SampleMessage { - # oneof test_oneof { - # string name = 4; - # SubMessage sub_message = 9; - # } - # } - # - # The field mask can be: - # - # mask { - # paths: "name" - # } - # - # Or: - # - # mask { - # paths: "sub_message" - # } - # - # Note that oneof type names ("test_oneof" in this case) cannot be used in - # paths. - # - # ## Field Mask Verification - # - # The implementation of any API method which has a FieldMask type field in the - # request should verify the included field paths, and return an - # `INVALID_ARGUMENT` error if any path is unmappable. - # @!attribute [rw] paths - # @return [::Array<::String>] - # The set of field mask paths. - class FieldMask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/proto_docs/google/rpc/status.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Rpc - # The `Status` type defines a logical error model that is suitable for - # different programming environments, including REST APIs and RPC APIs. It is - # used by [gRPC](https://github.com/grpc). Each `Status` message contains - # three pieces of data: error code, error message, and error details. - # - # You can find out more about this error model and how to work with it in the - # [API Design Guide](https://cloud.google.com/apis/design/errors). - # @!attribute [rw] code - # @return [::Integer] - # The status code, which should be an enum value of - # [google.rpc.Code][google.rpc.Code]. - # @!attribute [rw] message - # @return [::String] - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized - # by the client. - # @!attribute [rw] details - # @return [::Array<::Google::Protobuf::Any>] - # A list of messages that carry the error details. There is a common set of - # message types for APIs to use. - class Status - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/Gemfile deleted file mode 100644 index eb5fff38872e..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-developer_connect-v1", path: "../" -else - gem "google-cloud-developer_connect-v1" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/create_account_connector.rb b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/create_account_connector.rb deleted file mode 100644 index 574ffbb423ee..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/create_account_connector.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START developerconnect_v1_generated_DeveloperConnect_CreateAccountConnector_sync] -require "google/cloud/developer_connect/v1" - -## -# Snippet for the create_account_connector call in the DeveloperConnect service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#create_account_connector. -# -def create_account_connector - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::DeveloperConnect::V1::CreateAccountConnectorRequest.new - - # Call the create_account_connector method. - result = client.create_account_connector request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END developerconnect_v1_generated_DeveloperConnect_CreateAccountConnector_sync] diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/create_connection.rb b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/create_connection.rb deleted file mode 100644 index 624d34eb001f..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/create_connection.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START developerconnect_v1_generated_DeveloperConnect_CreateConnection_sync] -require "google/cloud/developer_connect/v1" - -## -# Snippet for the create_connection call in the DeveloperConnect service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#create_connection. -# -def create_connection - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::DeveloperConnect::V1::CreateConnectionRequest.new - - # Call the create_connection method. - result = client.create_connection request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END developerconnect_v1_generated_DeveloperConnect_CreateConnection_sync] diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/create_git_repository_link.rb b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/create_git_repository_link.rb deleted file mode 100644 index c882c96118eb..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/create_git_repository_link.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START developerconnect_v1_generated_DeveloperConnect_CreateGitRepositoryLink_sync] -require "google/cloud/developer_connect/v1" - -## -# Snippet for the create_git_repository_link call in the DeveloperConnect service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#create_git_repository_link. -# -def create_git_repository_link - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::DeveloperConnect::V1::CreateGitRepositoryLinkRequest.new - - # Call the create_git_repository_link method. - result = client.create_git_repository_link request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END developerconnect_v1_generated_DeveloperConnect_CreateGitRepositoryLink_sync] diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/delete_account_connector.rb b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/delete_account_connector.rb deleted file mode 100644 index 4129f3c192c3..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/delete_account_connector.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START developerconnect_v1_generated_DeveloperConnect_DeleteAccountConnector_sync] -require "google/cloud/developer_connect/v1" - -## -# Snippet for the delete_account_connector call in the DeveloperConnect service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#delete_account_connector. -# -def delete_account_connector - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::DeveloperConnect::V1::DeleteAccountConnectorRequest.new - - # Call the delete_account_connector method. - result = client.delete_account_connector request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END developerconnect_v1_generated_DeveloperConnect_DeleteAccountConnector_sync] diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/delete_connection.rb b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/delete_connection.rb deleted file mode 100644 index 49e916dfb85f..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/delete_connection.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START developerconnect_v1_generated_DeveloperConnect_DeleteConnection_sync] -require "google/cloud/developer_connect/v1" - -## -# Snippet for the delete_connection call in the DeveloperConnect service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#delete_connection. -# -def delete_connection - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::DeveloperConnect::V1::DeleteConnectionRequest.new - - # Call the delete_connection method. - result = client.delete_connection request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END developerconnect_v1_generated_DeveloperConnect_DeleteConnection_sync] diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/delete_git_repository_link.rb b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/delete_git_repository_link.rb deleted file mode 100644 index 28957ca283d2..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/delete_git_repository_link.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START developerconnect_v1_generated_DeveloperConnect_DeleteGitRepositoryLink_sync] -require "google/cloud/developer_connect/v1" - -## -# Snippet for the delete_git_repository_link call in the DeveloperConnect service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#delete_git_repository_link. -# -def delete_git_repository_link - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::DeveloperConnect::V1::DeleteGitRepositoryLinkRequest.new - - # Call the delete_git_repository_link method. - result = client.delete_git_repository_link request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END developerconnect_v1_generated_DeveloperConnect_DeleteGitRepositoryLink_sync] diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/delete_self.rb b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/delete_self.rb deleted file mode 100644 index 8cd2d6696c22..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/delete_self.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START developerconnect_v1_generated_DeveloperConnect_DeleteSelf_sync] -require "google/cloud/developer_connect/v1" - -## -# Snippet for the delete_self call in the DeveloperConnect service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#delete_self. -# -def delete_self - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::DeveloperConnect::V1::DeleteSelfRequest.new - - # Call the delete_self method. - result = client.delete_self request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END developerconnect_v1_generated_DeveloperConnect_DeleteSelf_sync] diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/delete_user.rb b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/delete_user.rb deleted file mode 100644 index 274546104716..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/delete_user.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START developerconnect_v1_generated_DeveloperConnect_DeleteUser_sync] -require "google/cloud/developer_connect/v1" - -## -# Snippet for the delete_user call in the DeveloperConnect service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#delete_user. -# -def delete_user - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::DeveloperConnect::V1::DeleteUserRequest.new - - # Call the delete_user method. - result = client.delete_user request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END developerconnect_v1_generated_DeveloperConnect_DeleteUser_sync] diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/fetch_access_token.rb b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/fetch_access_token.rb deleted file mode 100644 index 33966d9486aa..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/fetch_access_token.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START developerconnect_v1_generated_DeveloperConnect_FetchAccessToken_sync] -require "google/cloud/developer_connect/v1" - -## -# Snippet for the fetch_access_token call in the DeveloperConnect service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#fetch_access_token. -# -def fetch_access_token - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::DeveloperConnect::V1::FetchAccessTokenRequest.new - - # Call the fetch_access_token method. - result = client.fetch_access_token request - - # The returned object is of type Google::Cloud::DeveloperConnect::V1::FetchAccessTokenResponse. - p result -end -# [END developerconnect_v1_generated_DeveloperConnect_FetchAccessToken_sync] diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/fetch_git_hub_installations.rb b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/fetch_git_hub_installations.rb deleted file mode 100644 index 0d1635747699..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/fetch_git_hub_installations.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START developerconnect_v1_generated_DeveloperConnect_FetchGitHubInstallations_sync] -require "google/cloud/developer_connect/v1" - -## -# Snippet for the fetch_git_hub_installations call in the DeveloperConnect service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#fetch_git_hub_installations. -# -def fetch_git_hub_installations - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsRequest.new - - # Call the fetch_git_hub_installations method. - result = client.fetch_git_hub_installations request - - # The returned object is of type Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsResponse. - p result -end -# [END developerconnect_v1_generated_DeveloperConnect_FetchGitHubInstallations_sync] diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/fetch_git_refs.rb b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/fetch_git_refs.rb deleted file mode 100644 index 94bfcdd36ebd..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/fetch_git_refs.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START developerconnect_v1_generated_DeveloperConnect_FetchGitRefs_sync] -require "google/cloud/developer_connect/v1" - -## -# Snippet for the fetch_git_refs call in the DeveloperConnect service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#fetch_git_refs. -# -def fetch_git_refs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::DeveloperConnect::V1::FetchGitRefsRequest.new - - # Call the fetch_git_refs method. - result = client.fetch_git_refs request - - # The returned object is of type Google::Cloud::DeveloperConnect::V1::FetchGitRefsResponse. - p result -end -# [END developerconnect_v1_generated_DeveloperConnect_FetchGitRefs_sync] diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/fetch_linkable_git_repositories.rb b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/fetch_linkable_git_repositories.rb deleted file mode 100644 index 66640e9a75b1..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/fetch_linkable_git_repositories.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START developerconnect_v1_generated_DeveloperConnect_FetchLinkableGitRepositories_sync] -require "google/cloud/developer_connect/v1" - -## -# Snippet for the fetch_linkable_git_repositories call in the DeveloperConnect service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#fetch_linkable_git_repositories. -# -def fetch_linkable_git_repositories - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::DeveloperConnect::V1::FetchLinkableGitRepositoriesRequest.new - - # Call the fetch_linkable_git_repositories method. - result = client.fetch_linkable_git_repositories request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::DeveloperConnect::V1::LinkableGitRepository. - p item - end -end -# [END developerconnect_v1_generated_DeveloperConnect_FetchLinkableGitRepositories_sync] diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/fetch_read_token.rb b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/fetch_read_token.rb deleted file mode 100644 index 294dd5edeba7..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/fetch_read_token.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START developerconnect_v1_generated_DeveloperConnect_FetchReadToken_sync] -require "google/cloud/developer_connect/v1" - -## -# Snippet for the fetch_read_token call in the DeveloperConnect service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#fetch_read_token. -# -def fetch_read_token - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::DeveloperConnect::V1::FetchReadTokenRequest.new - - # Call the fetch_read_token method. - result = client.fetch_read_token request - - # The returned object is of type Google::Cloud::DeveloperConnect::V1::FetchReadTokenResponse. - p result -end -# [END developerconnect_v1_generated_DeveloperConnect_FetchReadToken_sync] diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/fetch_read_write_token.rb b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/fetch_read_write_token.rb deleted file mode 100644 index c6def00afe4e..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/fetch_read_write_token.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START developerconnect_v1_generated_DeveloperConnect_FetchReadWriteToken_sync] -require "google/cloud/developer_connect/v1" - -## -# Snippet for the fetch_read_write_token call in the DeveloperConnect service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#fetch_read_write_token. -# -def fetch_read_write_token - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenRequest.new - - # Call the fetch_read_write_token method. - result = client.fetch_read_write_token request - - # The returned object is of type Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenResponse. - p result -end -# [END developerconnect_v1_generated_DeveloperConnect_FetchReadWriteToken_sync] diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/fetch_self.rb b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/fetch_self.rb deleted file mode 100644 index 893ef898186a..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/fetch_self.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START developerconnect_v1_generated_DeveloperConnect_FetchSelf_sync] -require "google/cloud/developer_connect/v1" - -## -# Snippet for the fetch_self call in the DeveloperConnect service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#fetch_self. -# -def fetch_self - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::DeveloperConnect::V1::FetchSelfRequest.new - - # Call the fetch_self method. - result = client.fetch_self request - - # The returned object is of type Google::Cloud::DeveloperConnect::V1::User. - p result -end -# [END developerconnect_v1_generated_DeveloperConnect_FetchSelf_sync] diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/get_account_connector.rb b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/get_account_connector.rb deleted file mode 100644 index d2b532b984eb..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/get_account_connector.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START developerconnect_v1_generated_DeveloperConnect_GetAccountConnector_sync] -require "google/cloud/developer_connect/v1" - -## -# Snippet for the get_account_connector call in the DeveloperConnect service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#get_account_connector. -# -def get_account_connector - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::DeveloperConnect::V1::GetAccountConnectorRequest.new - - # Call the get_account_connector method. - result = client.get_account_connector request - - # The returned object is of type Google::Cloud::DeveloperConnect::V1::AccountConnector. - p result -end -# [END developerconnect_v1_generated_DeveloperConnect_GetAccountConnector_sync] diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/get_connection.rb b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/get_connection.rb deleted file mode 100644 index bd3c5a7876b9..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/get_connection.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START developerconnect_v1_generated_DeveloperConnect_GetConnection_sync] -require "google/cloud/developer_connect/v1" - -## -# Snippet for the get_connection call in the DeveloperConnect service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#get_connection. -# -def get_connection - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::DeveloperConnect::V1::GetConnectionRequest.new - - # Call the get_connection method. - result = client.get_connection request - - # The returned object is of type Google::Cloud::DeveloperConnect::V1::Connection. - p result -end -# [END developerconnect_v1_generated_DeveloperConnect_GetConnection_sync] diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/get_git_repository_link.rb b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/get_git_repository_link.rb deleted file mode 100644 index 6f258d5bd384..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/get_git_repository_link.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START developerconnect_v1_generated_DeveloperConnect_GetGitRepositoryLink_sync] -require "google/cloud/developer_connect/v1" - -## -# Snippet for the get_git_repository_link call in the DeveloperConnect service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#get_git_repository_link. -# -def get_git_repository_link - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::DeveloperConnect::V1::GetGitRepositoryLinkRequest.new - - # Call the get_git_repository_link method. - result = client.get_git_repository_link request - - # The returned object is of type Google::Cloud::DeveloperConnect::V1::GitRepositoryLink. - p result -end -# [END developerconnect_v1_generated_DeveloperConnect_GetGitRepositoryLink_sync] diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/list_account_connectors.rb b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/list_account_connectors.rb deleted file mode 100644 index 5b3509dd1a19..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/list_account_connectors.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START developerconnect_v1_generated_DeveloperConnect_ListAccountConnectors_sync] -require "google/cloud/developer_connect/v1" - -## -# Snippet for the list_account_connectors call in the DeveloperConnect service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#list_account_connectors. -# -def list_account_connectors - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsRequest.new - - # Call the list_account_connectors method. - result = client.list_account_connectors request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::DeveloperConnect::V1::AccountConnector. - p item - end -end -# [END developerconnect_v1_generated_DeveloperConnect_ListAccountConnectors_sync] diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/list_connections.rb b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/list_connections.rb deleted file mode 100644 index 5125df97f8ea..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/list_connections.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START developerconnect_v1_generated_DeveloperConnect_ListConnections_sync] -require "google/cloud/developer_connect/v1" - -## -# Snippet for the list_connections call in the DeveloperConnect service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#list_connections. -# -def list_connections - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::DeveloperConnect::V1::ListConnectionsRequest.new - - # Call the list_connections method. - result = client.list_connections request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::DeveloperConnect::V1::Connection. - p item - end -end -# [END developerconnect_v1_generated_DeveloperConnect_ListConnections_sync] diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/list_git_repository_links.rb b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/list_git_repository_links.rb deleted file mode 100644 index 4e5046791fe2..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/list_git_repository_links.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START developerconnect_v1_generated_DeveloperConnect_ListGitRepositoryLinks_sync] -require "google/cloud/developer_connect/v1" - -## -# Snippet for the list_git_repository_links call in the DeveloperConnect service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#list_git_repository_links. -# -def list_git_repository_links - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::DeveloperConnect::V1::ListGitRepositoryLinksRequest.new - - # Call the list_git_repository_links method. - result = client.list_git_repository_links request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink. - p item - end -end -# [END developerconnect_v1_generated_DeveloperConnect_ListGitRepositoryLinks_sync] diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/list_users.rb b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/list_users.rb deleted file mode 100644 index a9e288da2693..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/list_users.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START developerconnect_v1_generated_DeveloperConnect_ListUsers_sync] -require "google/cloud/developer_connect/v1" - -## -# Snippet for the list_users call in the DeveloperConnect service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#list_users. -# -def list_users - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::DeveloperConnect::V1::ListUsersRequest.new - - # Call the list_users method. - result = client.list_users request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::DeveloperConnect::V1::User. - p item - end -end -# [END developerconnect_v1_generated_DeveloperConnect_ListUsers_sync] diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/update_account_connector.rb b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/update_account_connector.rb deleted file mode 100644 index 75d6640c663d..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/update_account_connector.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START developerconnect_v1_generated_DeveloperConnect_UpdateAccountConnector_sync] -require "google/cloud/developer_connect/v1" - -## -# Snippet for the update_account_connector call in the DeveloperConnect service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#update_account_connector. -# -def update_account_connector - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::DeveloperConnect::V1::UpdateAccountConnectorRequest.new - - # Call the update_account_connector method. - result = client.update_account_connector request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END developerconnect_v1_generated_DeveloperConnect_UpdateAccountConnector_sync] diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/update_connection.rb b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/update_connection.rb deleted file mode 100644 index dadc6d150627..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/developer_connect/update_connection.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START developerconnect_v1_generated_DeveloperConnect_UpdateConnection_sync] -require "google/cloud/developer_connect/v1" - -## -# Snippet for the update_connection call in the DeveloperConnect service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#update_connection. -# -def update_connection - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::DeveloperConnect::V1::UpdateConnectionRequest.new - - # Call the update_connection method. - result = client.update_connection request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END developerconnect_v1_generated_DeveloperConnect_UpdateConnection_sync] diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/insights_config_service/create_insights_config.rb b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/insights_config_service/create_insights_config.rb deleted file mode 100644 index c4114015b48d..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/insights_config_service/create_insights_config.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START developerconnect_v1_generated_InsightsConfigService_CreateInsightsConfig_sync] -require "google/cloud/developer_connect/v1" - -## -# Snippet for the create_insights_config call in the InsightsConfigService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Developerconnect::V1::InsightsConfigService::Client#create_insights_config. -# -def create_insights_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Developerconnect::V1::CreateInsightsConfigRequest.new - - # Call the create_insights_config method. - result = client.create_insights_config request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END developerconnect_v1_generated_InsightsConfigService_CreateInsightsConfig_sync] diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/insights_config_service/delete_insights_config.rb b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/insights_config_service/delete_insights_config.rb deleted file mode 100644 index 8a0899806409..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/insights_config_service/delete_insights_config.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START developerconnect_v1_generated_InsightsConfigService_DeleteInsightsConfig_sync] -require "google/cloud/developer_connect/v1" - -## -# Snippet for the delete_insights_config call in the InsightsConfigService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Developerconnect::V1::InsightsConfigService::Client#delete_insights_config. -# -def delete_insights_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Developerconnect::V1::DeleteInsightsConfigRequest.new - - # Call the delete_insights_config method. - result = client.delete_insights_config request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END developerconnect_v1_generated_InsightsConfigService_DeleteInsightsConfig_sync] diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/insights_config_service/get_insights_config.rb b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/insights_config_service/get_insights_config.rb deleted file mode 100644 index 021d656a7190..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/insights_config_service/get_insights_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START developerconnect_v1_generated_InsightsConfigService_GetInsightsConfig_sync] -require "google/cloud/developer_connect/v1" - -## -# Snippet for the get_insights_config call in the InsightsConfigService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Developerconnect::V1::InsightsConfigService::Client#get_insights_config. -# -def get_insights_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Developerconnect::V1::GetInsightsConfigRequest.new - - # Call the get_insights_config method. - result = client.get_insights_config request - - # The returned object is of type Google::Cloud::Developerconnect::V1::InsightsConfig. - p result -end -# [END developerconnect_v1_generated_InsightsConfigService_GetInsightsConfig_sync] diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/insights_config_service/list_insights_configs.rb b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/insights_config_service/list_insights_configs.rb deleted file mode 100644 index 504560fe4d7d..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/insights_config_service/list_insights_configs.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START developerconnect_v1_generated_InsightsConfigService_ListInsightsConfigs_sync] -require "google/cloud/developer_connect/v1" - -## -# Snippet for the list_insights_configs call in the InsightsConfigService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Developerconnect::V1::InsightsConfigService::Client#list_insights_configs. -# -def list_insights_configs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Developerconnect::V1::ListInsightsConfigsRequest.new - - # Call the list_insights_configs method. - result = client.list_insights_configs request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Developerconnect::V1::InsightsConfig. - p item - end -end -# [END developerconnect_v1_generated_InsightsConfigService_ListInsightsConfigs_sync] diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/insights_config_service/update_insights_config.rb b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/insights_config_service/update_insights_config.rb deleted file mode 100644 index 6f48df4eba2c..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/insights_config_service/update_insights_config.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START developerconnect_v1_generated_InsightsConfigService_UpdateInsightsConfig_sync] -require "google/cloud/developer_connect/v1" - -## -# Snippet for the update_insights_config call in the InsightsConfigService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Developerconnect::V1::InsightsConfigService::Client#update_insights_config. -# -def update_insights_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Developerconnect::V1::UpdateInsightsConfigRequest.new - - # Call the update_insights_config method. - result = client.update_insights_config request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END developerconnect_v1_generated_InsightsConfigService_UpdateInsightsConfig_sync] diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/snippet_metadata_google.cloud.developerconnect.v1.json b/owl-bot-staging/google-cloud-developer_connect-v1/snippets/snippet_metadata_google.cloud.developerconnect.v1.json deleted file mode 100644 index 9cb1ca02d8ec..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/snippets/snippet_metadata_google.cloud.developerconnect.v1.json +++ /dev/null @@ -1,1335 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-developer_connect-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.developerconnect.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "developerconnect_v1_generated_DeveloperConnect_ListConnections_sync", - "title": "Snippet for the list_connections call in the DeveloperConnect service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#list_connections.", - "file": "developer_connect/list_connections.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_connections", - "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#list_connections", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::DeveloperConnect::V1::ListConnectionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::DeveloperConnect::V1::ListConnectionsResponse", - "client": { - "short_name": "DeveloperConnect::Client", - "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" - }, - "method": { - "short_name": "ListConnections", - "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.ListConnections", - "service": { - "short_name": "DeveloperConnect", - "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "developerconnect_v1_generated_DeveloperConnect_GetConnection_sync", - "title": "Snippet for the get_connection call in the DeveloperConnect service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#get_connection.", - "file": "developer_connect/get_connection.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_connection", - "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#get_connection", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::DeveloperConnect::V1::GetConnectionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::DeveloperConnect::V1::Connection", - "client": { - "short_name": "DeveloperConnect::Client", - "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" - }, - "method": { - "short_name": "GetConnection", - "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.GetConnection", - "service": { - "short_name": "DeveloperConnect", - "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "developerconnect_v1_generated_DeveloperConnect_CreateConnection_sync", - "title": "Snippet for the create_connection call in the DeveloperConnect service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#create_connection.", - "file": "developer_connect/create_connection.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_connection", - "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#create_connection", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::DeveloperConnect::V1::CreateConnectionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DeveloperConnect::Client", - "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" - }, - "method": { - "short_name": "CreateConnection", - "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.CreateConnection", - "service": { - "short_name": "DeveloperConnect", - "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "developerconnect_v1_generated_DeveloperConnect_UpdateConnection_sync", - "title": "Snippet for the update_connection call in the DeveloperConnect service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#update_connection.", - "file": "developer_connect/update_connection.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_connection", - "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#update_connection", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::DeveloperConnect::V1::UpdateConnectionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DeveloperConnect::Client", - "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" - }, - "method": { - "short_name": "UpdateConnection", - "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.UpdateConnection", - "service": { - "short_name": "DeveloperConnect", - "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "developerconnect_v1_generated_DeveloperConnect_DeleteConnection_sync", - "title": "Snippet for the delete_connection call in the DeveloperConnect service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#delete_connection.", - "file": "developer_connect/delete_connection.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_connection", - "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#delete_connection", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::DeveloperConnect::V1::DeleteConnectionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DeveloperConnect::Client", - "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" - }, - "method": { - "short_name": "DeleteConnection", - "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.DeleteConnection", - "service": { - "short_name": "DeveloperConnect", - "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "developerconnect_v1_generated_DeveloperConnect_CreateGitRepositoryLink_sync", - "title": "Snippet for the create_git_repository_link call in the DeveloperConnect service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#create_git_repository_link.", - "file": "developer_connect/create_git_repository_link.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_git_repository_link", - "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#create_git_repository_link", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::DeveloperConnect::V1::CreateGitRepositoryLinkRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DeveloperConnect::Client", - "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" - }, - "method": { - "short_name": "CreateGitRepositoryLink", - "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.CreateGitRepositoryLink", - "service": { - "short_name": "DeveloperConnect", - "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "developerconnect_v1_generated_DeveloperConnect_DeleteGitRepositoryLink_sync", - "title": "Snippet for the delete_git_repository_link call in the DeveloperConnect service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#delete_git_repository_link.", - "file": "developer_connect/delete_git_repository_link.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_git_repository_link", - "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#delete_git_repository_link", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::DeveloperConnect::V1::DeleteGitRepositoryLinkRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DeveloperConnect::Client", - "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" - }, - "method": { - "short_name": "DeleteGitRepositoryLink", - "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.DeleteGitRepositoryLink", - "service": { - "short_name": "DeveloperConnect", - "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "developerconnect_v1_generated_DeveloperConnect_ListGitRepositoryLinks_sync", - "title": "Snippet for the list_git_repository_links call in the DeveloperConnect service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#list_git_repository_links.", - "file": "developer_connect/list_git_repository_links.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_git_repository_links", - "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#list_git_repository_links", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::DeveloperConnect::V1::ListGitRepositoryLinksRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::DeveloperConnect::V1::ListGitRepositoryLinksResponse", - "client": { - "short_name": "DeveloperConnect::Client", - "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" - }, - "method": { - "short_name": "ListGitRepositoryLinks", - "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.ListGitRepositoryLinks", - "service": { - "short_name": "DeveloperConnect", - "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "developerconnect_v1_generated_DeveloperConnect_GetGitRepositoryLink_sync", - "title": "Snippet for the get_git_repository_link call in the DeveloperConnect service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#get_git_repository_link.", - "file": "developer_connect/get_git_repository_link.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_git_repository_link", - "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#get_git_repository_link", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::DeveloperConnect::V1::GetGitRepositoryLinkRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink", - "client": { - "short_name": "DeveloperConnect::Client", - "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" - }, - "method": { - "short_name": "GetGitRepositoryLink", - "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.GetGitRepositoryLink", - "service": { - "short_name": "DeveloperConnect", - "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "developerconnect_v1_generated_DeveloperConnect_FetchReadWriteToken_sync", - "title": "Snippet for the fetch_read_write_token call in the DeveloperConnect service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#fetch_read_write_token.", - "file": "developer_connect/fetch_read_write_token.rb", - "language": "RUBY", - "client_method": { - "short_name": "fetch_read_write_token", - "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#fetch_read_write_token", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenResponse", - "client": { - "short_name": "DeveloperConnect::Client", - "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" - }, - "method": { - "short_name": "FetchReadWriteToken", - "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.FetchReadWriteToken", - "service": { - "short_name": "DeveloperConnect", - "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "developerconnect_v1_generated_DeveloperConnect_FetchReadToken_sync", - "title": "Snippet for the fetch_read_token call in the DeveloperConnect service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#fetch_read_token.", - "file": "developer_connect/fetch_read_token.rb", - "language": "RUBY", - "client_method": { - "short_name": "fetch_read_token", - "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#fetch_read_token", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::DeveloperConnect::V1::FetchReadTokenRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::DeveloperConnect::V1::FetchReadTokenResponse", - "client": { - "short_name": "DeveloperConnect::Client", - "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" - }, - "method": { - "short_name": "FetchReadToken", - "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.FetchReadToken", - "service": { - "short_name": "DeveloperConnect", - "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "developerconnect_v1_generated_DeveloperConnect_FetchLinkableGitRepositories_sync", - "title": "Snippet for the fetch_linkable_git_repositories call in the DeveloperConnect service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#fetch_linkable_git_repositories.", - "file": "developer_connect/fetch_linkable_git_repositories.rb", - "language": "RUBY", - "client_method": { - "short_name": "fetch_linkable_git_repositories", - "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#fetch_linkable_git_repositories", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::DeveloperConnect::V1::FetchLinkableGitRepositoriesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::DeveloperConnect::V1::FetchLinkableGitRepositoriesResponse", - "client": { - "short_name": "DeveloperConnect::Client", - "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" - }, - "method": { - "short_name": "FetchLinkableGitRepositories", - "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.FetchLinkableGitRepositories", - "service": { - "short_name": "DeveloperConnect", - "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "developerconnect_v1_generated_DeveloperConnect_FetchGitHubInstallations_sync", - "title": "Snippet for the fetch_git_hub_installations call in the DeveloperConnect service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#fetch_git_hub_installations.", - "file": "developer_connect/fetch_git_hub_installations.rb", - "language": "RUBY", - "client_method": { - "short_name": "fetch_git_hub_installations", - "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#fetch_git_hub_installations", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsResponse", - "client": { - "short_name": "DeveloperConnect::Client", - "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" - }, - "method": { - "short_name": "FetchGitHubInstallations", - "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.FetchGitHubInstallations", - "service": { - "short_name": "DeveloperConnect", - "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "developerconnect_v1_generated_DeveloperConnect_FetchGitRefs_sync", - "title": "Snippet for the fetch_git_refs call in the DeveloperConnect service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#fetch_git_refs.", - "file": "developer_connect/fetch_git_refs.rb", - "language": "RUBY", - "client_method": { - "short_name": "fetch_git_refs", - "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#fetch_git_refs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::DeveloperConnect::V1::FetchGitRefsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::DeveloperConnect::V1::FetchGitRefsResponse", - "client": { - "short_name": "DeveloperConnect::Client", - "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" - }, - "method": { - "short_name": "FetchGitRefs", - "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.FetchGitRefs", - "service": { - "short_name": "DeveloperConnect", - "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "developerconnect_v1_generated_DeveloperConnect_ListAccountConnectors_sync", - "title": "Snippet for the list_account_connectors call in the DeveloperConnect service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#list_account_connectors.", - "file": "developer_connect/list_account_connectors.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_account_connectors", - "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#list_account_connectors", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsResponse", - "client": { - "short_name": "DeveloperConnect::Client", - "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" - }, - "method": { - "short_name": "ListAccountConnectors", - "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.ListAccountConnectors", - "service": { - "short_name": "DeveloperConnect", - "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "developerconnect_v1_generated_DeveloperConnect_GetAccountConnector_sync", - "title": "Snippet for the get_account_connector call in the DeveloperConnect service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#get_account_connector.", - "file": "developer_connect/get_account_connector.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_account_connector", - "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#get_account_connector", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::DeveloperConnect::V1::GetAccountConnectorRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::DeveloperConnect::V1::AccountConnector", - "client": { - "short_name": "DeveloperConnect::Client", - "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" - }, - "method": { - "short_name": "GetAccountConnector", - "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.GetAccountConnector", - "service": { - "short_name": "DeveloperConnect", - "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "developerconnect_v1_generated_DeveloperConnect_CreateAccountConnector_sync", - "title": "Snippet for the create_account_connector call in the DeveloperConnect service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#create_account_connector.", - "file": "developer_connect/create_account_connector.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_account_connector", - "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#create_account_connector", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::DeveloperConnect::V1::CreateAccountConnectorRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DeveloperConnect::Client", - "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" - }, - "method": { - "short_name": "CreateAccountConnector", - "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.CreateAccountConnector", - "service": { - "short_name": "DeveloperConnect", - "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "developerconnect_v1_generated_DeveloperConnect_UpdateAccountConnector_sync", - "title": "Snippet for the update_account_connector call in the DeveloperConnect service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#update_account_connector.", - "file": "developer_connect/update_account_connector.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_account_connector", - "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#update_account_connector", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::DeveloperConnect::V1::UpdateAccountConnectorRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DeveloperConnect::Client", - "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" - }, - "method": { - "short_name": "UpdateAccountConnector", - "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.UpdateAccountConnector", - "service": { - "short_name": "DeveloperConnect", - "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "developerconnect_v1_generated_DeveloperConnect_DeleteAccountConnector_sync", - "title": "Snippet for the delete_account_connector call in the DeveloperConnect service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#delete_account_connector.", - "file": "developer_connect/delete_account_connector.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_account_connector", - "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#delete_account_connector", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::DeveloperConnect::V1::DeleteAccountConnectorRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DeveloperConnect::Client", - "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" - }, - "method": { - "short_name": "DeleteAccountConnector", - "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.DeleteAccountConnector", - "service": { - "short_name": "DeveloperConnect", - "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "developerconnect_v1_generated_DeveloperConnect_FetchAccessToken_sync", - "title": "Snippet for the fetch_access_token call in the DeveloperConnect service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#fetch_access_token.", - "file": "developer_connect/fetch_access_token.rb", - "language": "RUBY", - "client_method": { - "short_name": "fetch_access_token", - "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#fetch_access_token", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenResponse", - "client": { - "short_name": "DeveloperConnect::Client", - "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" - }, - "method": { - "short_name": "FetchAccessToken", - "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.FetchAccessToken", - "service": { - "short_name": "DeveloperConnect", - "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "developerconnect_v1_generated_DeveloperConnect_ListUsers_sync", - "title": "Snippet for the list_users call in the DeveloperConnect service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#list_users.", - "file": "developer_connect/list_users.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_users", - "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#list_users", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::DeveloperConnect::V1::ListUsersRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::DeveloperConnect::V1::ListUsersResponse", - "client": { - "short_name": "DeveloperConnect::Client", - "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" - }, - "method": { - "short_name": "ListUsers", - "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.ListUsers", - "service": { - "short_name": "DeveloperConnect", - "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "developerconnect_v1_generated_DeveloperConnect_DeleteUser_sync", - "title": "Snippet for the delete_user call in the DeveloperConnect service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#delete_user.", - "file": "developer_connect/delete_user.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_user", - "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#delete_user", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::DeveloperConnect::V1::DeleteUserRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DeveloperConnect::Client", - "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" - }, - "method": { - "short_name": "DeleteUser", - "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.DeleteUser", - "service": { - "short_name": "DeveloperConnect", - "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "developerconnect_v1_generated_DeveloperConnect_FetchSelf_sync", - "title": "Snippet for the fetch_self call in the DeveloperConnect service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#fetch_self.", - "file": "developer_connect/fetch_self.rb", - "language": "RUBY", - "client_method": { - "short_name": "fetch_self", - "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#fetch_self", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::DeveloperConnect::V1::FetchSelfRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::DeveloperConnect::V1::User", - "client": { - "short_name": "DeveloperConnect::Client", - "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" - }, - "method": { - "short_name": "FetchSelf", - "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.FetchSelf", - "service": { - "short_name": "DeveloperConnect", - "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "developerconnect_v1_generated_DeveloperConnect_DeleteSelf_sync", - "title": "Snippet for the delete_self call in the DeveloperConnect service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#delete_self.", - "file": "developer_connect/delete_self.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_self", - "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#delete_self", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::DeveloperConnect::V1::DeleteSelfRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DeveloperConnect::Client", - "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" - }, - "method": { - "short_name": "DeleteSelf", - "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.DeleteSelf", - "service": { - "short_name": "DeveloperConnect", - "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "developerconnect_v1_generated_DeveloperConnect_StartOAuth_sync", - "title": "Snippet for the start_o_auth call in the DeveloperConnect service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#start_o_auth.", - "file": "developer_connect/start_o_auth.rb", - "language": "RUBY", - "client_method": { - "short_name": "start_o_auth", - "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#start_o_auth", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::DeveloperConnect::V1::StartOAuthRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::DeveloperConnect::V1::StartOAuthResponse", - "client": { - "short_name": "DeveloperConnect::Client", - "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" - }, - "method": { - "short_name": "StartOAuth", - "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.StartOAuth", - "service": { - "short_name": "DeveloperConnect", - "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "developerconnect_v1_generated_DeveloperConnect_FinishOAuth_sync", - "title": "Snippet for the finish_o_auth call in the DeveloperConnect service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#finish_o_auth.", - "file": "developer_connect/finish_o_auth.rb", - "language": "RUBY", - "client_method": { - "short_name": "finish_o_auth", - "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client#finish_o_auth", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::DeveloperConnect::V1::FinishOAuthResponse", - "client": { - "short_name": "DeveloperConnect::Client", - "full_name": "::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client" - }, - "method": { - "short_name": "FinishOAuth", - "full_name": "google.cloud.developerconnect.v1.DeveloperConnect.FinishOAuth", - "service": { - "short_name": "DeveloperConnect", - "full_name": "google.cloud.developerconnect.v1.DeveloperConnect" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "developerconnect_v1_generated_InsightsConfigService_ListInsightsConfigs_sync", - "title": "Snippet for the list_insights_configs call in the InsightsConfigService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Developerconnect::V1::InsightsConfigService::Client#list_insights_configs.", - "file": "insights_config_service/list_insights_configs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_insights_configs", - "full_name": "::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client#list_insights_configs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Developerconnect::V1::ListInsightsConfigsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Developerconnect::V1::ListInsightsConfigsResponse", - "client": { - "short_name": "InsightsConfigService::Client", - "full_name": "::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client" - }, - "method": { - "short_name": "ListInsightsConfigs", - "full_name": "google.cloud.developerconnect.v1.InsightsConfigService.ListInsightsConfigs", - "service": { - "short_name": "InsightsConfigService", - "full_name": "google.cloud.developerconnect.v1.InsightsConfigService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "developerconnect_v1_generated_InsightsConfigService_CreateInsightsConfig_sync", - "title": "Snippet for the create_insights_config call in the InsightsConfigService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Developerconnect::V1::InsightsConfigService::Client#create_insights_config.", - "file": "insights_config_service/create_insights_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_insights_config", - "full_name": "::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client#create_insights_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Developerconnect::V1::CreateInsightsConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "InsightsConfigService::Client", - "full_name": "::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client" - }, - "method": { - "short_name": "CreateInsightsConfig", - "full_name": "google.cloud.developerconnect.v1.InsightsConfigService.CreateInsightsConfig", - "service": { - "short_name": "InsightsConfigService", - "full_name": "google.cloud.developerconnect.v1.InsightsConfigService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "developerconnect_v1_generated_InsightsConfigService_GetInsightsConfig_sync", - "title": "Snippet for the get_insights_config call in the InsightsConfigService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Developerconnect::V1::InsightsConfigService::Client#get_insights_config.", - "file": "insights_config_service/get_insights_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_insights_config", - "full_name": "::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client#get_insights_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Developerconnect::V1::GetInsightsConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Developerconnect::V1::InsightsConfig", - "client": { - "short_name": "InsightsConfigService::Client", - "full_name": "::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client" - }, - "method": { - "short_name": "GetInsightsConfig", - "full_name": "google.cloud.developerconnect.v1.InsightsConfigService.GetInsightsConfig", - "service": { - "short_name": "InsightsConfigService", - "full_name": "google.cloud.developerconnect.v1.InsightsConfigService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "developerconnect_v1_generated_InsightsConfigService_UpdateInsightsConfig_sync", - "title": "Snippet for the update_insights_config call in the InsightsConfigService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Developerconnect::V1::InsightsConfigService::Client#update_insights_config.", - "file": "insights_config_service/update_insights_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_insights_config", - "full_name": "::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client#update_insights_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Developerconnect::V1::UpdateInsightsConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "InsightsConfigService::Client", - "full_name": "::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client" - }, - "method": { - "short_name": "UpdateInsightsConfig", - "full_name": "google.cloud.developerconnect.v1.InsightsConfigService.UpdateInsightsConfig", - "service": { - "short_name": "InsightsConfigService", - "full_name": "google.cloud.developerconnect.v1.InsightsConfigService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "developerconnect_v1_generated_InsightsConfigService_DeleteInsightsConfig_sync", - "title": "Snippet for the delete_insights_config call in the InsightsConfigService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Developerconnect::V1::InsightsConfigService::Client#delete_insights_config.", - "file": "insights_config_service/delete_insights_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_insights_config", - "full_name": "::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client#delete_insights_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Developerconnect::V1::DeleteInsightsConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "InsightsConfigService::Client", - "full_name": "::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client" - }, - "method": { - "short_name": "DeleteInsightsConfig", - "full_name": "google.cloud.developerconnect.v1.InsightsConfigService.DeleteInsightsConfig", - "service": { - "short_name": "InsightsConfigService", - "full_name": "google.cloud.developerconnect.v1.InsightsConfigService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "developerconnect_v1_generated_InsightsConfigService_GetDeploymentEvent_sync", - "title": "Snippet for the get_deployment_event call in the InsightsConfigService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Developerconnect::V1::InsightsConfigService::Client#get_deployment_event.", - "file": "insights_config_service/get_deployment_event.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_deployment_event", - "full_name": "::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client#get_deployment_event", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Developerconnect::V1::GetDeploymentEventRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Developerconnect::V1::DeploymentEvent", - "client": { - "short_name": "InsightsConfigService::Client", - "full_name": "::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client" - }, - "method": { - "short_name": "GetDeploymentEvent", - "full_name": "google.cloud.developerconnect.v1.InsightsConfigService.GetDeploymentEvent", - "service": { - "short_name": "InsightsConfigService", - "full_name": "google.cloud.developerconnect.v1.InsightsConfigService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "developerconnect_v1_generated_InsightsConfigService_ListDeploymentEvents_sync", - "title": "Snippet for the list_deployment_events call in the InsightsConfigService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Developerconnect::V1::InsightsConfigService::Client#list_deployment_events.", - "file": "insights_config_service/list_deployment_events.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_deployment_events", - "full_name": "::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client#list_deployment_events", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Developerconnect::V1::ListDeploymentEventsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Developerconnect::V1::ListDeploymentEventsResponse", - "client": { - "short_name": "InsightsConfigService::Client", - "full_name": "::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client" - }, - "method": { - "short_name": "ListDeploymentEvents", - "full_name": "google.cloud.developerconnect.v1.InsightsConfigService.ListDeploymentEvents", - "service": { - "short_name": "InsightsConfigService", - "full_name": "google.cloud.developerconnect.v1.InsightsConfigService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developer_connect/v1/developer_connect_operations_test.rb b/owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developer_connect/v1/developer_connect_operations_test.rb deleted file mode 100644 index bc56f660f19d..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developer_connect/v1/developer_connect_operations_test.rb +++ /dev/null @@ -1,400 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/developerconnect/v1/developer_connect_pb" -require "google/cloud/developerconnect/v1/developer_connect_services_pb" -require "google/cloud/developer_connect/v1/developer_connect" - -class ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Operations.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developer_connect/v1/developer_connect_paths_test.rb b/owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developer_connect/v1/developer_connect_paths_test.rb deleted file mode 100644 index 8b16bcd9dd39..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developer_connect/v1/developer_connect_paths_test.rb +++ /dev/null @@ -1,154 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/developer_connect/v1/developer_connect" - -class ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_account_connector_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_connector_path project: "value0", location: "value1", account_connector: "value2" - assert_equal "projects/value0/locations/value1/accountConnectors/value2", path - end - end - - def test_connection_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.connection_path project: "value0", location: "value1", connection: "value2" - assert_equal "projects/value0/locations/value1/connections/value2", path - end - end - - def test_crypto_key_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.crypto_key_path project: "value0", location: "value1", key_ring: "value2", crypto_key: "value3" - assert_equal "projects/value0/locations/value1/keyRings/value2/cryptoKeys/value3", path - end - end - - def test_git_repository_link_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.git_repository_link_path project: "value0", location: "value1", connection: "value2", git_repository_link: "value3" - assert_equal "projects/value0/locations/value1/connections/value2/gitRepositoryLinks/value3", path - end - end - - def test_instance_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.instance_path project: "value0", location: "value1", instance: "value2" - assert_equal "projects/value0/locations/value1/instances/value2", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end - - def test_secret_version_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.secret_version_path project: "value0", secret: "value1", secret_version: "value2" - assert_equal "projects/value0/secrets/value1/versions/value2", path - - path = client.secret_version_path project: "value0", location: "value1", secret: "value2", secret_version: "value3" - assert_equal "projects/value0/locations/value1/secrets/value2/versions/value3", path - end - end - - def test_service_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.service_path project: "value0", location: "value1", namespace: "value2", service: "value3" - assert_equal "projects/value0/locations/value1/namespaces/value2/services/value3", path - end - end - - def test_user_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.user_path project: "value0", location: "value1", account_connector: "value2", user: "value3" - assert_equal "projects/value0/locations/value1/accountConnectors/value2/users/value3", path - end - end -end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developer_connect/v1/developer_connect_rest_test.rb b/owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developer_connect/v1/developer_connect_rest_test.rb deleted file mode 100644 index 337b15ffa2f9..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developer_connect/v1/developer_connect_rest_test.rb +++ /dev/null @@ -1,1558 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/developerconnect/v1/developer_connect_pb" -require "google/cloud/developer_connect/v1/developer_connect/rest" - - -class ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_connections - # Create test objects. - client_result = ::Google::Cloud::DeveloperConnect::V1::ListConnectionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_connections_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_list_connections_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_connections_client_stub do - # Create client - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_connections({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_connections parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_connections ::Google::Cloud::DeveloperConnect::V1::ListConnectionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_connections({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_connections(::Google::Cloud::DeveloperConnect::V1::ListConnectionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_connections_client_stub.call_count - end - end - end - - def test_get_connection - # Create test objects. - client_result = ::Google::Cloud::DeveloperConnect::V1::Connection.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_connection_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_get_connection_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_connection_client_stub do - # Create client - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_connection({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_connection name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_connection ::Google::Cloud::DeveloperConnect::V1::GetConnectionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_connection({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_connection(::Google::Cloud::DeveloperConnect::V1::GetConnectionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_connection_client_stub.call_count - end - end - end - - def test_create_connection - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - connection_id = "hello world" - connection = {} - request_id = "hello world" - validate_only = true - - create_connection_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_create_connection_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_connection_client_stub do - # Create client - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_connection({ parent: parent, connection_id: connection_id, connection: connection, request_id: request_id, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_connection parent: parent, connection_id: connection_id, connection: connection, request_id: request_id, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_connection ::Google::Cloud::DeveloperConnect::V1::CreateConnectionRequest.new(parent: parent, connection_id: connection_id, connection: connection, request_id: request_id, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_connection({ parent: parent, connection_id: connection_id, connection: connection, request_id: request_id, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_connection(::Google::Cloud::DeveloperConnect::V1::CreateConnectionRequest.new(parent: parent, connection_id: connection_id, connection: connection, request_id: request_id, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_connection_client_stub.call_count - end - end - end - - def test_update_connection - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - update_mask = {} - connection = {} - request_id = "hello world" - allow_missing = true - validate_only = true - - update_connection_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_update_connection_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_connection_client_stub do - # Create client - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_connection({ update_mask: update_mask, connection: connection, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_connection update_mask: update_mask, connection: connection, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_connection ::Google::Cloud::DeveloperConnect::V1::UpdateConnectionRequest.new(update_mask: update_mask, connection: connection, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_connection({ update_mask: update_mask, connection: connection, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_connection(::Google::Cloud::DeveloperConnect::V1::UpdateConnectionRequest.new(update_mask: update_mask, connection: connection, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_connection_client_stub.call_count - end - end - end - - def test_delete_connection - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - validate_only = true - etag = "hello world" - - delete_connection_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_delete_connection_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_connection_client_stub do - # Create client - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_connection({ name: name, request_id: request_id, validate_only: validate_only, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_connection name: name, request_id: request_id, validate_only: validate_only, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_connection ::Google::Cloud::DeveloperConnect::V1::DeleteConnectionRequest.new(name: name, request_id: request_id, validate_only: validate_only, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_connection({ name: name, request_id: request_id, validate_only: validate_only, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_connection(::Google::Cloud::DeveloperConnect::V1::DeleteConnectionRequest.new(name: name, request_id: request_id, validate_only: validate_only, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_connection_client_stub.call_count - end - end - end - - def test_create_git_repository_link - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - git_repository_link = {} - git_repository_link_id = "hello world" - request_id = "hello world" - validate_only = true - - create_git_repository_link_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_create_git_repository_link_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_git_repository_link_client_stub do - # Create client - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_git_repository_link({ parent: parent, git_repository_link: git_repository_link, git_repository_link_id: git_repository_link_id, request_id: request_id, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_git_repository_link parent: parent, git_repository_link: git_repository_link, git_repository_link_id: git_repository_link_id, request_id: request_id, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_git_repository_link ::Google::Cloud::DeveloperConnect::V1::CreateGitRepositoryLinkRequest.new(parent: parent, git_repository_link: git_repository_link, git_repository_link_id: git_repository_link_id, request_id: request_id, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_git_repository_link({ parent: parent, git_repository_link: git_repository_link, git_repository_link_id: git_repository_link_id, request_id: request_id, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_git_repository_link(::Google::Cloud::DeveloperConnect::V1::CreateGitRepositoryLinkRequest.new(parent: parent, git_repository_link: git_repository_link, git_repository_link_id: git_repository_link_id, request_id: request_id, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_git_repository_link_client_stub.call_count - end - end - end - - def test_delete_git_repository_link - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - validate_only = true - etag = "hello world" - - delete_git_repository_link_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_delete_git_repository_link_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_git_repository_link_client_stub do - # Create client - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_git_repository_link({ name: name, request_id: request_id, validate_only: validate_only, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_git_repository_link name: name, request_id: request_id, validate_only: validate_only, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_git_repository_link ::Google::Cloud::DeveloperConnect::V1::DeleteGitRepositoryLinkRequest.new(name: name, request_id: request_id, validate_only: validate_only, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_git_repository_link({ name: name, request_id: request_id, validate_only: validate_only, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_git_repository_link(::Google::Cloud::DeveloperConnect::V1::DeleteGitRepositoryLinkRequest.new(name: name, request_id: request_id, validate_only: validate_only, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_git_repository_link_client_stub.call_count - end - end - end - - def test_list_git_repository_links - # Create test objects. - client_result = ::Google::Cloud::DeveloperConnect::V1::ListGitRepositoryLinksResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_git_repository_links_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_list_git_repository_links_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_git_repository_links_client_stub do - # Create client - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_git_repository_links({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_git_repository_links parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_git_repository_links ::Google::Cloud::DeveloperConnect::V1::ListGitRepositoryLinksRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_git_repository_links({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_git_repository_links(::Google::Cloud::DeveloperConnect::V1::ListGitRepositoryLinksRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_git_repository_links_client_stub.call_count - end - end - end - - def test_get_git_repository_link - # Create test objects. - client_result = ::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_git_repository_link_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_get_git_repository_link_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_git_repository_link_client_stub do - # Create client - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_git_repository_link({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_git_repository_link name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_git_repository_link ::Google::Cloud::DeveloperConnect::V1::GetGitRepositoryLinkRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_git_repository_link({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_git_repository_link(::Google::Cloud::DeveloperConnect::V1::GetGitRepositoryLinkRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_git_repository_link_client_stub.call_count - end - end - end - - def test_fetch_read_write_token - # Create test objects. - client_result = ::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - git_repository_link = "hello world" - - fetch_read_write_token_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_fetch_read_write_token_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, fetch_read_write_token_client_stub do - # Create client - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.fetch_read_write_token({ git_repository_link: git_repository_link }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.fetch_read_write_token git_repository_link: git_repository_link do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.fetch_read_write_token ::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenRequest.new(git_repository_link: git_repository_link) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.fetch_read_write_token({ git_repository_link: git_repository_link }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.fetch_read_write_token(::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenRequest.new(git_repository_link: git_repository_link), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, fetch_read_write_token_client_stub.call_count - end - end - end - - def test_fetch_read_token - # Create test objects. - client_result = ::Google::Cloud::DeveloperConnect::V1::FetchReadTokenResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - git_repository_link = "hello world" - - fetch_read_token_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_fetch_read_token_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, fetch_read_token_client_stub do - # Create client - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.fetch_read_token({ git_repository_link: git_repository_link }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.fetch_read_token git_repository_link: git_repository_link do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.fetch_read_token ::Google::Cloud::DeveloperConnect::V1::FetchReadTokenRequest.new(git_repository_link: git_repository_link) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.fetch_read_token({ git_repository_link: git_repository_link }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.fetch_read_token(::Google::Cloud::DeveloperConnect::V1::FetchReadTokenRequest.new(git_repository_link: git_repository_link), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, fetch_read_token_client_stub.call_count - end - end - end - - def test_fetch_linkable_git_repositories - # Create test objects. - client_result = ::Google::Cloud::DeveloperConnect::V1::FetchLinkableGitRepositoriesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - connection = "hello world" - page_size = 42 - page_token = "hello world" - - fetch_linkable_git_repositories_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_fetch_linkable_git_repositories_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, fetch_linkable_git_repositories_client_stub do - # Create client - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.fetch_linkable_git_repositories({ connection: connection, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.fetch_linkable_git_repositories connection: connection, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.fetch_linkable_git_repositories ::Google::Cloud::DeveloperConnect::V1::FetchLinkableGitRepositoriesRequest.new(connection: connection, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.fetch_linkable_git_repositories({ connection: connection, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.fetch_linkable_git_repositories(::Google::Cloud::DeveloperConnect::V1::FetchLinkableGitRepositoriesRequest.new(connection: connection, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, fetch_linkable_git_repositories_client_stub.call_count - end - end - end - - def test_fetch_git_hub_installations - # Create test objects. - client_result = ::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - connection = "hello world" - - fetch_git_hub_installations_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_fetch_git_hub_installations_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, fetch_git_hub_installations_client_stub do - # Create client - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.fetch_git_hub_installations({ connection: connection }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.fetch_git_hub_installations connection: connection do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.fetch_git_hub_installations ::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsRequest.new(connection: connection) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.fetch_git_hub_installations({ connection: connection }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.fetch_git_hub_installations(::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsRequest.new(connection: connection), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, fetch_git_hub_installations_client_stub.call_count - end - end - end - - def test_fetch_git_refs - # Create test objects. - client_result = ::Google::Cloud::DeveloperConnect::V1::FetchGitRefsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - git_repository_link = "hello world" - ref_type = :REF_TYPE_UNSPECIFIED - page_size = 42 - page_token = "hello world" - - fetch_git_refs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_fetch_git_refs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, fetch_git_refs_client_stub do - # Create client - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.fetch_git_refs({ git_repository_link: git_repository_link, ref_type: ref_type, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.fetch_git_refs git_repository_link: git_repository_link, ref_type: ref_type, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.fetch_git_refs ::Google::Cloud::DeveloperConnect::V1::FetchGitRefsRequest.new(git_repository_link: git_repository_link, ref_type: ref_type, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.fetch_git_refs({ git_repository_link: git_repository_link, ref_type: ref_type, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.fetch_git_refs(::Google::Cloud::DeveloperConnect::V1::FetchGitRefsRequest.new(git_repository_link: git_repository_link, ref_type: ref_type, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, fetch_git_refs_client_stub.call_count - end - end - end - - def test_list_account_connectors - # Create test objects. - client_result = ::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_account_connectors_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_list_account_connectors_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_account_connectors_client_stub do - # Create client - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_account_connectors({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_account_connectors parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_account_connectors ::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_account_connectors({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_account_connectors(::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_account_connectors_client_stub.call_count - end - end - end - - def test_get_account_connector - # Create test objects. - client_result = ::Google::Cloud::DeveloperConnect::V1::AccountConnector.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_account_connector_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_get_account_connector_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_account_connector_client_stub do - # Create client - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_account_connector({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_account_connector name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_account_connector ::Google::Cloud::DeveloperConnect::V1::GetAccountConnectorRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_account_connector({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_account_connector(::Google::Cloud::DeveloperConnect::V1::GetAccountConnectorRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_account_connector_client_stub.call_count - end - end - end - - def test_create_account_connector - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - account_connector_id = "hello world" - account_connector = {} - request_id = "hello world" - validate_only = true - - create_account_connector_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_create_account_connector_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_account_connector_client_stub do - # Create client - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_account_connector({ parent: parent, account_connector_id: account_connector_id, account_connector: account_connector, request_id: request_id, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_account_connector parent: parent, account_connector_id: account_connector_id, account_connector: account_connector, request_id: request_id, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_account_connector ::Google::Cloud::DeveloperConnect::V1::CreateAccountConnectorRequest.new(parent: parent, account_connector_id: account_connector_id, account_connector: account_connector, request_id: request_id, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_account_connector({ parent: parent, account_connector_id: account_connector_id, account_connector: account_connector, request_id: request_id, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_account_connector(::Google::Cloud::DeveloperConnect::V1::CreateAccountConnectorRequest.new(parent: parent, account_connector_id: account_connector_id, account_connector: account_connector, request_id: request_id, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_account_connector_client_stub.call_count - end - end - end - - def test_update_account_connector - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - update_mask = {} - account_connector = {} - request_id = "hello world" - allow_missing = true - validate_only = true - - update_account_connector_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_update_account_connector_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_account_connector_client_stub do - # Create client - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_account_connector({ update_mask: update_mask, account_connector: account_connector, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_account_connector update_mask: update_mask, account_connector: account_connector, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_account_connector ::Google::Cloud::DeveloperConnect::V1::UpdateAccountConnectorRequest.new(update_mask: update_mask, account_connector: account_connector, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_account_connector({ update_mask: update_mask, account_connector: account_connector, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_account_connector(::Google::Cloud::DeveloperConnect::V1::UpdateAccountConnectorRequest.new(update_mask: update_mask, account_connector: account_connector, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_account_connector_client_stub.call_count - end - end - end - - def test_delete_account_connector - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - validate_only = true - etag = "hello world" - force = true - - delete_account_connector_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_delete_account_connector_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_account_connector_client_stub do - # Create client - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_account_connector({ name: name, request_id: request_id, validate_only: validate_only, etag: etag, force: force }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_account_connector name: name, request_id: request_id, validate_only: validate_only, etag: etag, force: force do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_account_connector ::Google::Cloud::DeveloperConnect::V1::DeleteAccountConnectorRequest.new(name: name, request_id: request_id, validate_only: validate_only, etag: etag, force: force) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_account_connector({ name: name, request_id: request_id, validate_only: validate_only, etag: etag, force: force }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_account_connector(::Google::Cloud::DeveloperConnect::V1::DeleteAccountConnectorRequest.new(name: name, request_id: request_id, validate_only: validate_only, etag: etag, force: force), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_account_connector_client_stub.call_count - end - end - end - - def test_fetch_access_token - # Create test objects. - client_result = ::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - account_connector = "hello world" - - fetch_access_token_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_fetch_access_token_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, fetch_access_token_client_stub do - # Create client - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.fetch_access_token({ account_connector: account_connector }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.fetch_access_token account_connector: account_connector do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.fetch_access_token ::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenRequest.new(account_connector: account_connector) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.fetch_access_token({ account_connector: account_connector }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.fetch_access_token(::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenRequest.new(account_connector: account_connector), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, fetch_access_token_client_stub.call_count - end - end - end - - def test_list_users - # Create test objects. - client_result = ::Google::Cloud::DeveloperConnect::V1::ListUsersResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_users_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_list_users_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_users_client_stub do - # Create client - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_users({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_users parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_users ::Google::Cloud::DeveloperConnect::V1::ListUsersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_users({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_users(::Google::Cloud::DeveloperConnect::V1::ListUsersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_users_client_stub.call_count - end - end - end - - def test_delete_user - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - validate_only = true - etag = "hello world" - - delete_user_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_delete_user_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_user_client_stub do - # Create client - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_user({ name: name, request_id: request_id, validate_only: validate_only, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_user name: name, request_id: request_id, validate_only: validate_only, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_user ::Google::Cloud::DeveloperConnect::V1::DeleteUserRequest.new(name: name, request_id: request_id, validate_only: validate_only, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_user({ name: name, request_id: request_id, validate_only: validate_only, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_user(::Google::Cloud::DeveloperConnect::V1::DeleteUserRequest.new(name: name, request_id: request_id, validate_only: validate_only, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_user_client_stub.call_count - end - end - end - - def test_fetch_self - # Create test objects. - client_result = ::Google::Cloud::DeveloperConnect::V1::User.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - fetch_self_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_fetch_self_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, fetch_self_client_stub do - # Create client - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.fetch_self({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.fetch_self name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.fetch_self ::Google::Cloud::DeveloperConnect::V1::FetchSelfRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.fetch_self({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.fetch_self(::Google::Cloud::DeveloperConnect::V1::FetchSelfRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, fetch_self_client_stub.call_count - end - end - end - - def test_delete_self - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_self_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_delete_self_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_self_client_stub do - # Create client - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_self({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_self name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_self ::Google::Cloud::DeveloperConnect::V1::DeleteSelfRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_self({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_self(::Google::Cloud::DeveloperConnect::V1::DeleteSelfRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_self_client_stub.call_count - end - end - end - - def test_start_o_auth - # Create test objects. - client_result = ::Google::Cloud::DeveloperConnect::V1::StartOAuthResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - account_connector = "hello world" - - start_o_auth_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_start_o_auth_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, start_o_auth_client_stub do - # Create client - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.start_o_auth({ account_connector: account_connector }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.start_o_auth account_connector: account_connector do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.start_o_auth ::Google::Cloud::DeveloperConnect::V1::StartOAuthRequest.new(account_connector: account_connector) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.start_o_auth({ account_connector: account_connector }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.start_o_auth(::Google::Cloud::DeveloperConnect::V1::StartOAuthRequest.new(account_connector: account_connector), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, start_o_auth_client_stub.call_count - end - end - end - - def test_finish_o_auth - # Create test objects. - client_result = ::Google::Cloud::DeveloperConnect::V1::FinishOAuthResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - oauth_params = {} - account_connector = "hello world" - - finish_o_auth_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.stub :transcode_finish_o_auth_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, finish_o_auth_client_stub do - # Create client - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.finish_o_auth({ oauth_params: oauth_params, account_connector: account_connector }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.finish_o_auth oauth_params: oauth_params, account_connector: account_connector do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.finish_o_auth ::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest.new(oauth_params: oauth_params, account_connector: account_connector) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.finish_o_auth({ oauth_params: oauth_params, account_connector: account_connector }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.finish_o_auth(::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest.new(oauth_params: oauth_params, account_connector: account_connector), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, finish_o_auth_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developer_connect/v1/developer_connect_test.rb b/owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developer_connect/v1/developer_connect_test.rb deleted file mode 100644 index 46566c674fcc..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developer_connect/v1/developer_connect_test.rb +++ /dev/null @@ -1,1812 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/developerconnect/v1/developer_connect_pb" -require "google/cloud/developer_connect/v1/developer_connect" - -class ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_connections - # Create GRPC objects. - grpc_response = ::Google::Cloud::DeveloperConnect::V1::ListConnectionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_connections_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_connections, name - assert_kind_of ::Google::Cloud::DeveloperConnect::V1::ListConnectionsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_connections_client_stub do - # Create client - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_connections({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_connections parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_connections ::Google::Cloud::DeveloperConnect::V1::ListConnectionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_connections({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_connections(::Google::Cloud::DeveloperConnect::V1::ListConnectionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_connections_client_stub.call_rpc_count - end - end - - def test_get_connection - # Create GRPC objects. - grpc_response = ::Google::Cloud::DeveloperConnect::V1::Connection.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_connection_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_connection, name - assert_kind_of ::Google::Cloud::DeveloperConnect::V1::GetConnectionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_connection_client_stub do - # Create client - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_connection({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_connection name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_connection ::Google::Cloud::DeveloperConnect::V1::GetConnectionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_connection({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_connection(::Google::Cloud::DeveloperConnect::V1::GetConnectionRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_connection_client_stub.call_rpc_count - end - end - - def test_create_connection - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - connection_id = "hello world" - connection = {} - request_id = "hello world" - validate_only = true - - create_connection_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_connection, name - assert_kind_of ::Google::Cloud::DeveloperConnect::V1::CreateConnectionRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["connection_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::DeveloperConnect::V1::Connection), request["connection"] - assert_equal "hello world", request["request_id"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_connection_client_stub do - # Create client - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_connection({ parent: parent, connection_id: connection_id, connection: connection, request_id: request_id, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_connection parent: parent, connection_id: connection_id, connection: connection, request_id: request_id, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_connection ::Google::Cloud::DeveloperConnect::V1::CreateConnectionRequest.new(parent: parent, connection_id: connection_id, connection: connection, request_id: request_id, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_connection({ parent: parent, connection_id: connection_id, connection: connection, request_id: request_id, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_connection(::Google::Cloud::DeveloperConnect::V1::CreateConnectionRequest.new(parent: parent, connection_id: connection_id, connection: connection, request_id: request_id, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_connection_client_stub.call_rpc_count - end - end - - def test_update_connection - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - update_mask = {} - connection = {} - request_id = "hello world" - allow_missing = true - validate_only = true - - update_connection_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_connection, name - assert_kind_of ::Google::Cloud::DeveloperConnect::V1::UpdateConnectionRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::DeveloperConnect::V1::Connection), request["connection"] - assert_equal "hello world", request["request_id"] - assert_equal true, request["allow_missing"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_connection_client_stub do - # Create client - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_connection({ update_mask: update_mask, connection: connection, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_connection update_mask: update_mask, connection: connection, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_connection ::Google::Cloud::DeveloperConnect::V1::UpdateConnectionRequest.new(update_mask: update_mask, connection: connection, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_connection({ update_mask: update_mask, connection: connection, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_connection(::Google::Cloud::DeveloperConnect::V1::UpdateConnectionRequest.new(update_mask: update_mask, connection: connection, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_connection_client_stub.call_rpc_count - end - end - - def test_delete_connection - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - validate_only = true - etag = "hello world" - - delete_connection_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_connection, name - assert_kind_of ::Google::Cloud::DeveloperConnect::V1::DeleteConnectionRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - assert_equal true, request["validate_only"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_connection_client_stub do - # Create client - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_connection({ name: name, request_id: request_id, validate_only: validate_only, etag: etag }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_connection name: name, request_id: request_id, validate_only: validate_only, etag: etag do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_connection ::Google::Cloud::DeveloperConnect::V1::DeleteConnectionRequest.new(name: name, request_id: request_id, validate_only: validate_only, etag: etag) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_connection({ name: name, request_id: request_id, validate_only: validate_only, etag: etag }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_connection(::Google::Cloud::DeveloperConnect::V1::DeleteConnectionRequest.new(name: name, request_id: request_id, validate_only: validate_only, etag: etag), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_connection_client_stub.call_rpc_count - end - end - - def test_create_git_repository_link - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - git_repository_link = {} - git_repository_link_id = "hello world" - request_id = "hello world" - validate_only = true - - create_git_repository_link_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_git_repository_link, name - assert_kind_of ::Google::Cloud::DeveloperConnect::V1::CreateGitRepositoryLinkRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink), request["git_repository_link"] - assert_equal "hello world", request["git_repository_link_id"] - assert_equal "hello world", request["request_id"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_git_repository_link_client_stub do - # Create client - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_git_repository_link({ parent: parent, git_repository_link: git_repository_link, git_repository_link_id: git_repository_link_id, request_id: request_id, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_git_repository_link parent: parent, git_repository_link: git_repository_link, git_repository_link_id: git_repository_link_id, request_id: request_id, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_git_repository_link ::Google::Cloud::DeveloperConnect::V1::CreateGitRepositoryLinkRequest.new(parent: parent, git_repository_link: git_repository_link, git_repository_link_id: git_repository_link_id, request_id: request_id, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_git_repository_link({ parent: parent, git_repository_link: git_repository_link, git_repository_link_id: git_repository_link_id, request_id: request_id, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_git_repository_link(::Google::Cloud::DeveloperConnect::V1::CreateGitRepositoryLinkRequest.new(parent: parent, git_repository_link: git_repository_link, git_repository_link_id: git_repository_link_id, request_id: request_id, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_git_repository_link_client_stub.call_rpc_count - end - end - - def test_delete_git_repository_link - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - validate_only = true - etag = "hello world" - - delete_git_repository_link_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_git_repository_link, name - assert_kind_of ::Google::Cloud::DeveloperConnect::V1::DeleteGitRepositoryLinkRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - assert_equal true, request["validate_only"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_git_repository_link_client_stub do - # Create client - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_git_repository_link({ name: name, request_id: request_id, validate_only: validate_only, etag: etag }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_git_repository_link name: name, request_id: request_id, validate_only: validate_only, etag: etag do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_git_repository_link ::Google::Cloud::DeveloperConnect::V1::DeleteGitRepositoryLinkRequest.new(name: name, request_id: request_id, validate_only: validate_only, etag: etag) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_git_repository_link({ name: name, request_id: request_id, validate_only: validate_only, etag: etag }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_git_repository_link(::Google::Cloud::DeveloperConnect::V1::DeleteGitRepositoryLinkRequest.new(name: name, request_id: request_id, validate_only: validate_only, etag: etag), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_git_repository_link_client_stub.call_rpc_count - end - end - - def test_list_git_repository_links - # Create GRPC objects. - grpc_response = ::Google::Cloud::DeveloperConnect::V1::ListGitRepositoryLinksResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_git_repository_links_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_git_repository_links, name - assert_kind_of ::Google::Cloud::DeveloperConnect::V1::ListGitRepositoryLinksRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_git_repository_links_client_stub do - # Create client - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_git_repository_links({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_git_repository_links parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_git_repository_links ::Google::Cloud::DeveloperConnect::V1::ListGitRepositoryLinksRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_git_repository_links({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_git_repository_links(::Google::Cloud::DeveloperConnect::V1::ListGitRepositoryLinksRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_git_repository_links_client_stub.call_rpc_count - end - end - - def test_get_git_repository_link - # Create GRPC objects. - grpc_response = ::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_git_repository_link_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_git_repository_link, name - assert_kind_of ::Google::Cloud::DeveloperConnect::V1::GetGitRepositoryLinkRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_git_repository_link_client_stub do - # Create client - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_git_repository_link({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_git_repository_link name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_git_repository_link ::Google::Cloud::DeveloperConnect::V1::GetGitRepositoryLinkRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_git_repository_link({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_git_repository_link(::Google::Cloud::DeveloperConnect::V1::GetGitRepositoryLinkRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_git_repository_link_client_stub.call_rpc_count - end - end - - def test_fetch_read_write_token - # Create GRPC objects. - grpc_response = ::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - git_repository_link = "hello world" - - fetch_read_write_token_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :fetch_read_write_token, name - assert_kind_of ::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenRequest, request - assert_equal "hello world", request["git_repository_link"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, fetch_read_write_token_client_stub do - # Create client - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.fetch_read_write_token({ git_repository_link: git_repository_link }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.fetch_read_write_token git_repository_link: git_repository_link do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.fetch_read_write_token ::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenRequest.new(git_repository_link: git_repository_link) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.fetch_read_write_token({ git_repository_link: git_repository_link }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.fetch_read_write_token(::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenRequest.new(git_repository_link: git_repository_link), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, fetch_read_write_token_client_stub.call_rpc_count - end - end - - def test_fetch_read_token - # Create GRPC objects. - grpc_response = ::Google::Cloud::DeveloperConnect::V1::FetchReadTokenResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - git_repository_link = "hello world" - - fetch_read_token_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :fetch_read_token, name - assert_kind_of ::Google::Cloud::DeveloperConnect::V1::FetchReadTokenRequest, request - assert_equal "hello world", request["git_repository_link"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, fetch_read_token_client_stub do - # Create client - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.fetch_read_token({ git_repository_link: git_repository_link }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.fetch_read_token git_repository_link: git_repository_link do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.fetch_read_token ::Google::Cloud::DeveloperConnect::V1::FetchReadTokenRequest.new(git_repository_link: git_repository_link) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.fetch_read_token({ git_repository_link: git_repository_link }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.fetch_read_token(::Google::Cloud::DeveloperConnect::V1::FetchReadTokenRequest.new(git_repository_link: git_repository_link), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, fetch_read_token_client_stub.call_rpc_count - end - end - - def test_fetch_linkable_git_repositories - # Create GRPC objects. - grpc_response = ::Google::Cloud::DeveloperConnect::V1::FetchLinkableGitRepositoriesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - connection = "hello world" - page_size = 42 - page_token = "hello world" - - fetch_linkable_git_repositories_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :fetch_linkable_git_repositories, name - assert_kind_of ::Google::Cloud::DeveloperConnect::V1::FetchLinkableGitRepositoriesRequest, request - assert_equal "hello world", request["connection"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, fetch_linkable_git_repositories_client_stub do - # Create client - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.fetch_linkable_git_repositories({ connection: connection, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.fetch_linkable_git_repositories connection: connection, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.fetch_linkable_git_repositories ::Google::Cloud::DeveloperConnect::V1::FetchLinkableGitRepositoriesRequest.new(connection: connection, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.fetch_linkable_git_repositories({ connection: connection, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.fetch_linkable_git_repositories(::Google::Cloud::DeveloperConnect::V1::FetchLinkableGitRepositoriesRequest.new(connection: connection, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, fetch_linkable_git_repositories_client_stub.call_rpc_count - end - end - - def test_fetch_git_hub_installations - # Create GRPC objects. - grpc_response = ::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - connection = "hello world" - - fetch_git_hub_installations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :fetch_git_hub_installations, name - assert_kind_of ::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsRequest, request - assert_equal "hello world", request["connection"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, fetch_git_hub_installations_client_stub do - # Create client - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.fetch_git_hub_installations({ connection: connection }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.fetch_git_hub_installations connection: connection do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.fetch_git_hub_installations ::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsRequest.new(connection: connection) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.fetch_git_hub_installations({ connection: connection }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.fetch_git_hub_installations(::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsRequest.new(connection: connection), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, fetch_git_hub_installations_client_stub.call_rpc_count - end - end - - def test_fetch_git_refs - # Create GRPC objects. - grpc_response = ::Google::Cloud::DeveloperConnect::V1::FetchGitRefsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - git_repository_link = "hello world" - ref_type = :REF_TYPE_UNSPECIFIED - page_size = 42 - page_token = "hello world" - - fetch_git_refs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :fetch_git_refs, name - assert_kind_of ::Google::Cloud::DeveloperConnect::V1::FetchGitRefsRequest, request - assert_equal "hello world", request["git_repository_link"] - assert_equal :REF_TYPE_UNSPECIFIED, request["ref_type"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, fetch_git_refs_client_stub do - # Create client - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.fetch_git_refs({ git_repository_link: git_repository_link, ref_type: ref_type, page_size: page_size, page_token: page_token }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.fetch_git_refs git_repository_link: git_repository_link, ref_type: ref_type, page_size: page_size, page_token: page_token do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.fetch_git_refs ::Google::Cloud::DeveloperConnect::V1::FetchGitRefsRequest.new(git_repository_link: git_repository_link, ref_type: ref_type, page_size: page_size, page_token: page_token) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.fetch_git_refs({ git_repository_link: git_repository_link, ref_type: ref_type, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.fetch_git_refs(::Google::Cloud::DeveloperConnect::V1::FetchGitRefsRequest.new(git_repository_link: git_repository_link, ref_type: ref_type, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, fetch_git_refs_client_stub.call_rpc_count - end - end - - def test_list_account_connectors - # Create GRPC objects. - grpc_response = ::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_account_connectors_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_account_connectors, name - assert_kind_of ::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_account_connectors_client_stub do - # Create client - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_account_connectors({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_account_connectors parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_account_connectors ::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_account_connectors({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_account_connectors(::Google::Cloud::DeveloperConnect::V1::ListAccountConnectorsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_account_connectors_client_stub.call_rpc_count - end - end - - def test_get_account_connector - # Create GRPC objects. - grpc_response = ::Google::Cloud::DeveloperConnect::V1::AccountConnector.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_account_connector_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_account_connector, name - assert_kind_of ::Google::Cloud::DeveloperConnect::V1::GetAccountConnectorRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_account_connector_client_stub do - # Create client - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_account_connector({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_account_connector name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_account_connector ::Google::Cloud::DeveloperConnect::V1::GetAccountConnectorRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_account_connector({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_account_connector(::Google::Cloud::DeveloperConnect::V1::GetAccountConnectorRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_account_connector_client_stub.call_rpc_count - end - end - - def test_create_account_connector - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - account_connector_id = "hello world" - account_connector = {} - request_id = "hello world" - validate_only = true - - create_account_connector_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_account_connector, name - assert_kind_of ::Google::Cloud::DeveloperConnect::V1::CreateAccountConnectorRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["account_connector_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::DeveloperConnect::V1::AccountConnector), request["account_connector"] - assert_equal "hello world", request["request_id"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_account_connector_client_stub do - # Create client - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_account_connector({ parent: parent, account_connector_id: account_connector_id, account_connector: account_connector, request_id: request_id, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_account_connector parent: parent, account_connector_id: account_connector_id, account_connector: account_connector, request_id: request_id, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_account_connector ::Google::Cloud::DeveloperConnect::V1::CreateAccountConnectorRequest.new(parent: parent, account_connector_id: account_connector_id, account_connector: account_connector, request_id: request_id, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_account_connector({ parent: parent, account_connector_id: account_connector_id, account_connector: account_connector, request_id: request_id, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_account_connector(::Google::Cloud::DeveloperConnect::V1::CreateAccountConnectorRequest.new(parent: parent, account_connector_id: account_connector_id, account_connector: account_connector, request_id: request_id, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_account_connector_client_stub.call_rpc_count - end - end - - def test_update_account_connector - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - update_mask = {} - account_connector = {} - request_id = "hello world" - allow_missing = true - validate_only = true - - update_account_connector_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_account_connector, name - assert_kind_of ::Google::Cloud::DeveloperConnect::V1::UpdateAccountConnectorRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::DeveloperConnect::V1::AccountConnector), request["account_connector"] - assert_equal "hello world", request["request_id"] - assert_equal true, request["allow_missing"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_account_connector_client_stub do - # Create client - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_account_connector({ update_mask: update_mask, account_connector: account_connector, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_account_connector update_mask: update_mask, account_connector: account_connector, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_account_connector ::Google::Cloud::DeveloperConnect::V1::UpdateAccountConnectorRequest.new(update_mask: update_mask, account_connector: account_connector, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_account_connector({ update_mask: update_mask, account_connector: account_connector, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_account_connector(::Google::Cloud::DeveloperConnect::V1::UpdateAccountConnectorRequest.new(update_mask: update_mask, account_connector: account_connector, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_account_connector_client_stub.call_rpc_count - end - end - - def test_delete_account_connector - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - validate_only = true - etag = "hello world" - force = true - - delete_account_connector_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_account_connector, name - assert_kind_of ::Google::Cloud::DeveloperConnect::V1::DeleteAccountConnectorRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - assert_equal true, request["validate_only"] - assert_equal "hello world", request["etag"] - assert_equal true, request["force"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_account_connector_client_stub do - # Create client - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_account_connector({ name: name, request_id: request_id, validate_only: validate_only, etag: etag, force: force }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_account_connector name: name, request_id: request_id, validate_only: validate_only, etag: etag, force: force do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_account_connector ::Google::Cloud::DeveloperConnect::V1::DeleteAccountConnectorRequest.new(name: name, request_id: request_id, validate_only: validate_only, etag: etag, force: force) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_account_connector({ name: name, request_id: request_id, validate_only: validate_only, etag: etag, force: force }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_account_connector(::Google::Cloud::DeveloperConnect::V1::DeleteAccountConnectorRequest.new(name: name, request_id: request_id, validate_only: validate_only, etag: etag, force: force), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_account_connector_client_stub.call_rpc_count - end - end - - def test_fetch_access_token - # Create GRPC objects. - grpc_response = ::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - account_connector = "hello world" - - fetch_access_token_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :fetch_access_token, name - assert_kind_of ::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenRequest, request - assert_equal "hello world", request["account_connector"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, fetch_access_token_client_stub do - # Create client - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.fetch_access_token({ account_connector: account_connector }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.fetch_access_token account_connector: account_connector do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.fetch_access_token ::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenRequest.new(account_connector: account_connector) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.fetch_access_token({ account_connector: account_connector }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.fetch_access_token(::Google::Cloud::DeveloperConnect::V1::FetchAccessTokenRequest.new(account_connector: account_connector), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, fetch_access_token_client_stub.call_rpc_count - end - end - - def test_list_users - # Create GRPC objects. - grpc_response = ::Google::Cloud::DeveloperConnect::V1::ListUsersResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_users_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_users, name - assert_kind_of ::Google::Cloud::DeveloperConnect::V1::ListUsersRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_users_client_stub do - # Create client - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_users({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_users parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_users ::Google::Cloud::DeveloperConnect::V1::ListUsersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_users({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_users(::Google::Cloud::DeveloperConnect::V1::ListUsersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_users_client_stub.call_rpc_count - end - end - - def test_delete_user - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - validate_only = true - etag = "hello world" - - delete_user_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_user, name - assert_kind_of ::Google::Cloud::DeveloperConnect::V1::DeleteUserRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - assert_equal true, request["validate_only"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_user_client_stub do - # Create client - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_user({ name: name, request_id: request_id, validate_only: validate_only, etag: etag }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_user name: name, request_id: request_id, validate_only: validate_only, etag: etag do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_user ::Google::Cloud::DeveloperConnect::V1::DeleteUserRequest.new(name: name, request_id: request_id, validate_only: validate_only, etag: etag) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_user({ name: name, request_id: request_id, validate_only: validate_only, etag: etag }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_user(::Google::Cloud::DeveloperConnect::V1::DeleteUserRequest.new(name: name, request_id: request_id, validate_only: validate_only, etag: etag), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_user_client_stub.call_rpc_count - end - end - - def test_fetch_self - # Create GRPC objects. - grpc_response = ::Google::Cloud::DeveloperConnect::V1::User.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - fetch_self_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :fetch_self, name - assert_kind_of ::Google::Cloud::DeveloperConnect::V1::FetchSelfRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, fetch_self_client_stub do - # Create client - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.fetch_self({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.fetch_self name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.fetch_self ::Google::Cloud::DeveloperConnect::V1::FetchSelfRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.fetch_self({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.fetch_self(::Google::Cloud::DeveloperConnect::V1::FetchSelfRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, fetch_self_client_stub.call_rpc_count - end - end - - def test_delete_self - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_self_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_self, name - assert_kind_of ::Google::Cloud::DeveloperConnect::V1::DeleteSelfRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_self_client_stub do - # Create client - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_self({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_self name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_self ::Google::Cloud::DeveloperConnect::V1::DeleteSelfRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_self({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_self(::Google::Cloud::DeveloperConnect::V1::DeleteSelfRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_self_client_stub.call_rpc_count - end - end - - def test_start_o_auth - # Create GRPC objects. - grpc_response = ::Google::Cloud::DeveloperConnect::V1::StartOAuthResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - account_connector = "hello world" - - start_o_auth_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :start_o_auth, name - assert_kind_of ::Google::Cloud::DeveloperConnect::V1::StartOAuthRequest, request - assert_equal "hello world", request["account_connector"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, start_o_auth_client_stub do - # Create client - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.start_o_auth({ account_connector: account_connector }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.start_o_auth account_connector: account_connector do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.start_o_auth ::Google::Cloud::DeveloperConnect::V1::StartOAuthRequest.new(account_connector: account_connector) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.start_o_auth({ account_connector: account_connector }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.start_o_auth(::Google::Cloud::DeveloperConnect::V1::StartOAuthRequest.new(account_connector: account_connector), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, start_o_auth_client_stub.call_rpc_count - end - end - - def test_finish_o_auth - # Create GRPC objects. - grpc_response = ::Google::Cloud::DeveloperConnect::V1::FinishOAuthResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - oauth_params = {} - account_connector = "hello world" - - finish_o_auth_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :finish_o_auth, name - assert_kind_of ::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest::OAuthParams), request["oauth_params"] - assert_equal :oauth_params, request.params - assert_equal "hello world", request["account_connector"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, finish_o_auth_client_stub do - # Create client - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.finish_o_auth({ oauth_params: oauth_params, account_connector: account_connector }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.finish_o_auth oauth_params: oauth_params, account_connector: account_connector do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.finish_o_auth ::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest.new(oauth_params: oauth_params, account_connector: account_connector) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.finish_o_auth({ oauth_params: oauth_params, account_connector: account_connector }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.finish_o_auth(::Google::Cloud::DeveloperConnect::V1::FinishOAuthRequest.new(oauth_params: oauth_params, account_connector: account_connector), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, finish_o_auth_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client, client - assert_equal creds, client.configure.credentials - end - end - - def test_operations_client - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_operations_test.rb b/owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_operations_test.rb deleted file mode 100644 index 9f825a22b059..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_operations_test.rb +++ /dev/null @@ -1,400 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/developerconnect/v1/insights_config_pb" -require "google/cloud/developerconnect/v1/insights_config_services_pb" -require "google/cloud/developerconnect/v1/insights_config_service" - -class ::Google::Cloud::Developerconnect::V1::InsightsConfigService::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Operations.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_paths_test.rb b/owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_paths_test.rb deleted file mode 100644 index 19e736bd61d6..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_paths_test.rb +++ /dev/null @@ -1,79 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/developerconnect/v1/insights_config_service" - -class ::Google::Cloud::Developerconnect::V1::InsightsConfigService::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_deployment_event_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.deployment_event_path project: "value0", location: "value1", insights_config: "value2", deployment_event: "value3" - assert_equal "projects/value0/locations/value1/insightsConfigs/value2/deploymentEvents/value3", path - end - end - - def test_insights_config_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.insights_config_path project: "value0", location: "value1", insights_config: "value2" - assert_equal "projects/value0/locations/value1/insightsConfigs/value2", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end -end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_rest_test.rb b/owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_rest_test.rb deleted file mode 100644 index a55bee7d8853..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_rest_test.rb +++ /dev/null @@ -1,493 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/developerconnect/v1/insights_config_pb" -require "google/cloud/developerconnect/v1/insights_config_service/rest" - - -class ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_insights_configs - # Create test objects. - client_result = ::Google::Cloud::Developerconnect::V1::ListInsightsConfigsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_insights_configs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::ServiceStub.stub :transcode_list_insights_configs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_insights_configs_client_stub do - # Create client - client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_insights_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_insights_configs parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_insights_configs ::Google::Cloud::Developerconnect::V1::ListInsightsConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_insights_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_insights_configs(::Google::Cloud::Developerconnect::V1::ListInsightsConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_insights_configs_client_stub.call_count - end - end - end - - def test_create_insights_config - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - insights_config_id = "hello world" - insights_config = {} - validate_only = true - - create_insights_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::ServiceStub.stub :transcode_create_insights_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_insights_config_client_stub do - # Create client - client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_insights_config({ parent: parent, insights_config_id: insights_config_id, insights_config: insights_config, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_insights_config parent: parent, insights_config_id: insights_config_id, insights_config: insights_config, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_insights_config ::Google::Cloud::Developerconnect::V1::CreateInsightsConfigRequest.new(parent: parent, insights_config_id: insights_config_id, insights_config: insights_config, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_insights_config({ parent: parent, insights_config_id: insights_config_id, insights_config: insights_config, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_insights_config(::Google::Cloud::Developerconnect::V1::CreateInsightsConfigRequest.new(parent: parent, insights_config_id: insights_config_id, insights_config: insights_config, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_insights_config_client_stub.call_count - end - end - end - - def test_get_insights_config - # Create test objects. - client_result = ::Google::Cloud::Developerconnect::V1::InsightsConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_insights_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::ServiceStub.stub :transcode_get_insights_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_insights_config_client_stub do - # Create client - client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_insights_config({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_insights_config name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_insights_config ::Google::Cloud::Developerconnect::V1::GetInsightsConfigRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_insights_config({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_insights_config(::Google::Cloud::Developerconnect::V1::GetInsightsConfigRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_insights_config_client_stub.call_count - end - end - end - - def test_update_insights_config - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - insights_config = {} - request_id = "hello world" - allow_missing = true - validate_only = true - - update_insights_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::ServiceStub.stub :transcode_update_insights_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_insights_config_client_stub do - # Create client - client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_insights_config({ insights_config: insights_config, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_insights_config insights_config: insights_config, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_insights_config ::Google::Cloud::Developerconnect::V1::UpdateInsightsConfigRequest.new(insights_config: insights_config, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_insights_config({ insights_config: insights_config, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_insights_config(::Google::Cloud::Developerconnect::V1::UpdateInsightsConfigRequest.new(insights_config: insights_config, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_insights_config_client_stub.call_count - end - end - end - - def test_delete_insights_config - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - validate_only = true - etag = "hello world" - - delete_insights_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::ServiceStub.stub :transcode_delete_insights_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_insights_config_client_stub do - # Create client - client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_insights_config({ name: name, request_id: request_id, validate_only: validate_only, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_insights_config name: name, request_id: request_id, validate_only: validate_only, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_insights_config ::Google::Cloud::Developerconnect::V1::DeleteInsightsConfigRequest.new(name: name, request_id: request_id, validate_only: validate_only, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_insights_config({ name: name, request_id: request_id, validate_only: validate_only, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_insights_config(::Google::Cloud::Developerconnect::V1::DeleteInsightsConfigRequest.new(name: name, request_id: request_id, validate_only: validate_only, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_insights_config_client_stub.call_count - end - end - end - - def test_get_deployment_event - # Create test objects. - client_result = ::Google::Cloud::Developerconnect::V1::DeploymentEvent.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_deployment_event_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::ServiceStub.stub :transcode_get_deployment_event_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_deployment_event_client_stub do - # Create client - client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_deployment_event({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_deployment_event name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_deployment_event ::Google::Cloud::Developerconnect::V1::GetDeploymentEventRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_deployment_event({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_deployment_event(::Google::Cloud::Developerconnect::V1::GetDeploymentEventRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_deployment_event_client_stub.call_count - end - end - end - - def test_list_deployment_events - # Create test objects. - client_result = ::Google::Cloud::Developerconnect::V1::ListDeploymentEventsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_deployment_events_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::ServiceStub.stub :transcode_list_deployment_events_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_deployment_events_client_stub do - # Create client - client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_deployment_events({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_deployment_events parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_deployment_events ::Google::Cloud::Developerconnect::V1::ListDeploymentEventsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_deployment_events({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_deployment_events(::Google::Cloud::Developerconnect::V1::ListDeploymentEventsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_deployment_events_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_test.rb b/owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_test.rb deleted file mode 100644 index f1702220ee8e..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/test/google/cloud/developerconnect/v1/insights_config_service_test.rb +++ /dev/null @@ -1,581 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/developerconnect/v1/insights_config_pb" -require "google/cloud/developerconnect/v1/insights_config_service" - -class ::Google::Cloud::Developerconnect::V1::InsightsConfigService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_insights_configs - # Create GRPC objects. - grpc_response = ::Google::Cloud::Developerconnect::V1::ListInsightsConfigsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_insights_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_insights_configs, name - assert_kind_of ::Google::Cloud::Developerconnect::V1::ListInsightsConfigsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_insights_configs_client_stub do - # Create client - client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_insights_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_insights_configs parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_insights_configs ::Google::Cloud::Developerconnect::V1::ListInsightsConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_insights_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_insights_configs(::Google::Cloud::Developerconnect::V1::ListInsightsConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_insights_configs_client_stub.call_rpc_count - end - end - - def test_create_insights_config - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - insights_config_id = "hello world" - insights_config = {} - validate_only = true - - create_insights_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_insights_config, name - assert_kind_of ::Google::Cloud::Developerconnect::V1::CreateInsightsConfigRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["insights_config_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Developerconnect::V1::InsightsConfig), request["insights_config"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_insights_config_client_stub do - # Create client - client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_insights_config({ parent: parent, insights_config_id: insights_config_id, insights_config: insights_config, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_insights_config parent: parent, insights_config_id: insights_config_id, insights_config: insights_config, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_insights_config ::Google::Cloud::Developerconnect::V1::CreateInsightsConfigRequest.new(parent: parent, insights_config_id: insights_config_id, insights_config: insights_config, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_insights_config({ parent: parent, insights_config_id: insights_config_id, insights_config: insights_config, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_insights_config(::Google::Cloud::Developerconnect::V1::CreateInsightsConfigRequest.new(parent: parent, insights_config_id: insights_config_id, insights_config: insights_config, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_insights_config_client_stub.call_rpc_count - end - end - - def test_get_insights_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::Developerconnect::V1::InsightsConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_insights_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_insights_config, name - assert_kind_of ::Google::Cloud::Developerconnect::V1::GetInsightsConfigRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_insights_config_client_stub do - # Create client - client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_insights_config({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_insights_config name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_insights_config ::Google::Cloud::Developerconnect::V1::GetInsightsConfigRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_insights_config({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_insights_config(::Google::Cloud::Developerconnect::V1::GetInsightsConfigRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_insights_config_client_stub.call_rpc_count - end - end - - def test_update_insights_config - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - insights_config = {} - request_id = "hello world" - allow_missing = true - validate_only = true - - update_insights_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_insights_config, name - assert_kind_of ::Google::Cloud::Developerconnect::V1::UpdateInsightsConfigRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Developerconnect::V1::InsightsConfig), request["insights_config"] - assert_equal "hello world", request["request_id"] - assert_equal true, request["allow_missing"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_insights_config_client_stub do - # Create client - client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_insights_config({ insights_config: insights_config, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_insights_config insights_config: insights_config, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_insights_config ::Google::Cloud::Developerconnect::V1::UpdateInsightsConfigRequest.new(insights_config: insights_config, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_insights_config({ insights_config: insights_config, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_insights_config(::Google::Cloud::Developerconnect::V1::UpdateInsightsConfigRequest.new(insights_config: insights_config, request_id: request_id, allow_missing: allow_missing, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_insights_config_client_stub.call_rpc_count - end - end - - def test_delete_insights_config - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - validate_only = true - etag = "hello world" - - delete_insights_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_insights_config, name - assert_kind_of ::Google::Cloud::Developerconnect::V1::DeleteInsightsConfigRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - assert_equal true, request["validate_only"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_insights_config_client_stub do - # Create client - client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_insights_config({ name: name, request_id: request_id, validate_only: validate_only, etag: etag }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_insights_config name: name, request_id: request_id, validate_only: validate_only, etag: etag do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_insights_config ::Google::Cloud::Developerconnect::V1::DeleteInsightsConfigRequest.new(name: name, request_id: request_id, validate_only: validate_only, etag: etag) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_insights_config({ name: name, request_id: request_id, validate_only: validate_only, etag: etag }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_insights_config(::Google::Cloud::Developerconnect::V1::DeleteInsightsConfigRequest.new(name: name, request_id: request_id, validate_only: validate_only, etag: etag), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_insights_config_client_stub.call_rpc_count - end - end - - def test_get_deployment_event - # Create GRPC objects. - grpc_response = ::Google::Cloud::Developerconnect::V1::DeploymentEvent.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_deployment_event_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_deployment_event, name - assert_kind_of ::Google::Cloud::Developerconnect::V1::GetDeploymentEventRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_deployment_event_client_stub do - # Create client - client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_deployment_event({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_deployment_event name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_deployment_event ::Google::Cloud::Developerconnect::V1::GetDeploymentEventRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_deployment_event({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_deployment_event(::Google::Cloud::Developerconnect::V1::GetDeploymentEventRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_deployment_event_client_stub.call_rpc_count - end - end - - def test_list_deployment_events - # Create GRPC objects. - grpc_response = ::Google::Cloud::Developerconnect::V1::ListDeploymentEventsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_deployment_events_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_deployment_events, name - assert_kind_of ::Google::Cloud::Developerconnect::V1::ListDeploymentEventsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_deployment_events_client_stub do - # Create client - client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_deployment_events({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_deployment_events parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_deployment_events ::Google::Cloud::Developerconnect::V1::ListDeploymentEventsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_deployment_events({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_deployment_events(::Google::Cloud::Developerconnect::V1::ListDeploymentEventsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_deployment_events_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client, client - assert_equal creds, client.configure.credentials - end - end - - def test_operations_client - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-developer_connect-v1/test/helper.rb b/owl-bot-staging/google-cloud-developer_connect-v1/test/helper.rb deleted file mode 100644 index f0e715458fa2..000000000000 --- a/owl-bot-staging/google-cloud-developer_connect-v1/test/helper.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/rg" - -require "grpc" - -require "ostruct"